[PR #6162] [MERGED] Fixed the previous fix of the anti-nag hook and propagated fixes everywhere #6419

Closed
opened 2025-11-20 07:10:31 -05:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE/pull/6162
Author: @imcrazytwkr
Created: 7/22/2025
Status: Merged
Merged: 7/22/2025
Merged by: @tremor021

Base: mainHead: fix-no-nag


📝 Commits (1)

  • 9c9795c Fixed the previous fix on anti-nag hook, propagated fixed to other ProxMox products and fixed 8.0 compatibility

📊 Changes

3 files changed (+40 additions, -44 deletions)

View changed files

📝 tools/pve/post-pbs-install.sh (+16 -18)
📝 tools/pve/post-pmg-install.sh (+23 -25)
📝 tools/pve/post-pve-install.sh (+1 -1)

📄 Description

✍️ Description

The old fix of the anti-nag apt hook had some unintended side effects as reported today by @memesalot and @vsc55 in #6078. This PR fixes this. What is being done in particular:

  • && chaining is replaced back with an if-condition because otherwise the hook returns with a non-0 exit code when JS patching is not needed and apt scares users with an error message
  • dpkg -V check has been replaced with a grep -F check to avoid stdout leaking ??5?????? /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js (I couldn't reproduce that on my installs, glad others helped with testing)
  • Reverted the sed change that replaced ! with = back to just deleting ! to return compatibility with 8.0 (tested on 8.0.0 and 8.0.3) Thanks to @vsc55 for reporting!
  • Propagated changes from #6098 to the other proxmox post-install scripts (fixes #6158)

Link: #6078
Link: #6084
Link: #6095
Link: #6098
Link: #6158

Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected. Tested myself on 8.0.0, 8.0.3, 8.4.1 and 8.4.5. This time also tested by @vsc55 (message link) and @memesalot (message link)
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/community-scripts/ProxmoxVE/pull/6162 **Author:** [@imcrazytwkr](https://github.com/imcrazytwkr) **Created:** 7/22/2025 **Status:** ✅ Merged **Merged:** 7/22/2025 **Merged by:** [@tremor021](https://github.com/tremor021) **Base:** `main` ← **Head:** `fix-no-nag` --- ### 📝 Commits (1) - [`9c9795c`](https://github.com/community-scripts/ProxmoxVE/commit/9c9795c4694b7cc0fbf3904a79a3d965db69b98a) Fixed the previous fix on anti-nag hook, propagated fixed to other ProxMox products and fixed 8.0 compatibility ### 📊 Changes **3 files changed** (+40 additions, -44 deletions) <details> <summary>View changed files</summary> 📝 `tools/pve/post-pbs-install.sh` (+16 -18) 📝 `tools/pve/post-pmg-install.sh` (+23 -25) 📝 `tools/pve/post-pve-install.sh` (+1 -1) </details> ### 📄 Description ## ✍️ Description [The old fix](https://github.com/community-scripts/ProxmoxVE/pull/6084) of the anti-nag apt hook had some unintended side effects as reported today by @memesalot and @vsc55 in #6078. This PR fixes this. What is being done in particular: - `&&` chaining is replaced back with an if-condition because otherwise the hook returns with a non-0 exit code when JS patching is not needed and `apt` scares users with an error message - `dpkg -V` check has been replaced with a `grep -F` check to avoid stdout leaking `??5?????? /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js` (I couldn't reproduce that on my installs, glad others helped with testing) - Reverted the sed change that replaced `!` with `=` back to just deleting `!` to return compatibility with 8.0 (tested on 8.0.0 and 8.0.3) Thanks to @vsc55 for reporting! - Propagated changes from #6098 to the other proxmox post-install scripts (fixes #6158) ## 🔗 Related PR / Issue Link: #6078 Link: #6084 Link: #6095 Link: #6098 Link: #6158 ## ✅ Prerequisites (**X** in brackets) - [x] **Self-review completed** – Code follows project standards. - [x] **Tested thoroughly** – Changes work as expected. Tested myself on 8.0.0, 8.0.3, 8.4.1 and 8.4.5. This time also tested by @vsc55 ([message link](https://github.com/community-scripts/ProxmoxVE/issues/6078#issuecomment-3094439446)) and @memesalot ([message link](https://github.com/community-scripts/ProxmoxVE/pull/6095#issuecomment-3094450946)) - [x] **No security risks** – No hardcoded secrets, unnecessary privilege escalations, or permission issues. --- ## 🛠️ Type of Change (**X** in brackets) - [x] 🐞 **Bug fix** – Resolves an issue without breaking functionality. - [ ] ✨ **New feature** – Adds new, non-breaking functionality. - [ ] 💥 **Breaking change** – Alters existing functionality in a way that may require updates. - [ ] 🆕 **New script** – A fully functional and tested script or script set. - [ ] 🌍 **Website update** – Changes to website-related JSON files or metadata. - [ ] 🔧 **Refactoring / Code Cleanup** – Improves readability or maintainability without changing functionality. - [ ] 📝 **Documentation update** – Changes to `README`, `AppName.md`, `CONTRIBUTING.md`, or other docs. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2025-11-20 07:10:31 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE#6419