From 635801f8291c801ddf28277b9cf6afd08f0dd2bf Mon Sep 17 00:00:00 2001 From: Scott B <28817345+foundObjects@users.noreply.github.com> Date: Sat, 1 May 2021 18:51:28 -0700 Subject: [PATCH] version 4; fixed for pve 6.3+ --- README.md | 58 +++++++++--------------------------------- install.sh | 64 ++++++++++++++++++++--------------------------- make-release.sh | 4 +-- pve-nag-buster.sh | 4 +-- 4 files changed, 43 insertions(+), 87 deletions(-) diff --git a/README.md b/README.md index ad34370..640202e 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,16 @@ https://github.com/foundObjects/pve-nag-buster This is a dpkg post install hook script that persistently removes license nags -from Proxmox VE 5.x and up. Install it once and you won't see another license +from Proxmox VE 6.x and up. Install it once and you won't see another license nag until Proxmox changes their web-ui code significantly. Please support the Proxmox team by [buying a subscription](https://www.proxmox.com/en/proxmox-ve/pricing) if it's within your means. High quality open source software like Proxmox needs our support! +### News: + +Last updated for: pve-manager/6.4-4/337d6701 (running kernel: 5.4.106-1-pve) + ### How does it work? The included hook script removes the "unlicensed node" popup nag from the web @@ -15,10 +19,9 @@ gui and disables the pve-enterprise repository list. This script is called every time a package updates the web gui or the pve-enterprise source list and will only run if packages containing those files are changed. -The installer drops the hook script and creates dpkg hooks to call it then adds -the pve-no-subscription repo list and calls the hook script once. There are no -external dependencies beyond the base packages installed with PVE by default -(awk, sed, grep, wget). +The installer creates a dpkg hook script, adds the pve-no-subscription repo list +and calls the hook script once. There are no external dependencies beyond the base +packages installed with PVE by default. ### Installation ```sh @@ -46,44 +49,6 @@ sudo ./install.sh --uninstall ``` ### Notes: -#### Updating an old copy of the repo - -Sorry to those of you who forked the repo before about 2020-01-20; I rewrote -git history to cleanup the commit noise from adding files through GitHub's web -UI originally. - -If you need to sync a cloned repo with the new history and haven't made any -changes: - -```sh -git fetch --all -p -P -git push -f . origin/master:master -``` - -If you've made changes to the code: - -Migrating to the new master branch should be fairly straightforward, the v02 -tag repo state in the new commit history is identical to the repo state before -the rebase. - -```sh -# save and commit your work -git commit -a -m "WIP" - -# make a backup of your branch Just In Case™ -git checkout -b backup -git checkout - - -# from your branch -git fetch --all -git rebase -f --onto v02 origin/old-master -``` - -I highly recommend picking at least the following bugfix commits if you don't -want to track new work in master, they fix a couple of potential problems. - -* a260891 hook script: fixed grep test issue -* 427b23b more reliable hook trigger removal #### Why is there base64 in my peanut-butter? @@ -95,13 +60,14 @@ To inspect the base64 encoded script run `./install.sh --emit`; this dumps the encoded copy to stdout and quits. To install using the stored copy just run `sudo ./install.sh --offline`, no internet required. -### Credits: +### Thanks to: -Thanks to John McLaren for his [blog post](https://www.reddit.com/user/seaqueue) documenting the web gui patch. +- John McLaren for his [blog post](https://www.reddit.com/user/seaqueue) documenting the web gui patch. +- [Marlin Sööse](https://github.com/msoose) for the update for PVE 6.3+ ### Contact: -[Open an issue](https://github.com/foundObjects/pve-nag-buster/issues) on GitHub or contact me as [/u/SeaQueue on Reddit](https://www.reddit.com/user/seaqueue). +[Open an issue](https://github.com/foundObjects/pve-nag-buster/issues) on GitHub Please get in touch if you find a way to improve anything, otherwise enjoy! diff --git a/install.sh b/install.sh index 868fce7..a5bf0b5 100755 --- a/install.sh +++ b/install.sh @@ -1,11 +1,11 @@ #!/bin/sh # shellcheck disable=SC2064 -case "$(readlink /proc/$$/exe)" in */bash) set -euo pipefail ;; *) set -eu ;; esac +set -eu -# pve-nag-buster (v03) https://github.com/foundObjects/pve-nag-buster +# pve-nag-buster (v04) https://github.com/foundObjects/pve-nag-buster # Copyright (C) 2019 /u/seaQueue (reddit.com/u/seaQueue) # -# Removes Proxmox VE 5.x+ license nags automatically after updates +# Removes Proxmox VE 6.x+ license nags automatically after updates # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -71,21 +71,11 @@ _install() { VERSION_CODENAME='' ID='' . /etc/os-release - case "$ID" in - "debian") - if [ -n "$VERSION_CODENAME" ]; then - RELEASE="$VERSION_CODENAME" - else - RELEASE=$(awk -F"[)(]+" '/VERSION=/ {print $2}' /etc/os-release) - fi - ;; - #"ubuntu") # it doesn't look like this is possible anymore - # ;; - *) - echo "Sorry, I don't know how to handle your Linux distribution '$ID'" - exit 1 - ;; - esac + if [ -n "$VERSION_CODENAME" ]; then + RELEASE="$VERSION_CODENAME" + else + RELEASE=$(awk -F"[)(]+" '/VERSION=/ {print $2}' /etc/os-release) + fi # create the pve-no-subscription list echo "Creating PVE no-subscription repo list ..." @@ -146,28 +136,28 @@ _install() { # Important: if you're not me you should probably decode this and read it to make sure I'm not doing # something malicious like mining dogecoin or stealing your valuable cat pictures -# pve-nag-buster.sh (v03) encoded below: +# pve-nag-buster.sh (v04) encoded below: emit_script() { base64 -d << 'YEET' | unxz -/Td6WFoAAATm1rRGAgAhARwAAAAQz1jM4AX2A4pdABGIQkY99BY0cwoNj8U0dcgowbs41qLC+aej -mGQYj9kDeUYQYXlQbEahoJLO08e8hIe8MoGJqvcVxM5VQehFNPqq4OH1KhbHgYGz5QSdcYFBPv2D -jY49iua72aQVDTzDsGFB7NKSSnbJvwPX6WvyHPM+YSTXqQiWDjian8iINwzsA43yWdFI1mOKn0/4 -hRFy2JOUfs8lSPi0/lWwPBTpu1rk8jjFllid/53iIKUdAJXEB46QLnHWh93dffa4T3Nw1iUFI8t7 -qYqwC05lZZRcxH6rR5siMu0IvrWPOFdk3RC+Hxu6cWGNwQU3Qg2Fp1eL6OxV25ZlKkxHsbV/1RZQ -v6oO3yN+u+fE8Hosh5Menm0W/xjo3+gN//tRxBjE7djbi3yE58fcnL00PCgdpZ7jbVUMBOSxafAK -QvTqN2M66xEeugkFWTXwj/j1ByAa3vCbmgfvUDFsznJs88AlZIlUfI8FJY7DW715ULQ1A7Ot/u29 -cj9ZY9m6TgbXY1CvOb3HPcVxTUWT86agk3YSDiuIEuTXUTY/CF3mtDhk51uWI16D8K/P3JkBnZJl -Iv1jMe8GbydGG6vzOkzowGdOdYaktPn595lEAhwqSPgRwvBth+1x/gWiHhycK0ggFWUpclYOM3WH -+JAerc7G41krKJQ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QARfe321vH +ICPQMtds3p/nuCpmMNex8SorApU6X0jvw18w9uMIF7dE2tk0Ge58qiIOH/+V2uVZzAUAUpTa7Gb8 +0aKWiai6f4bMXfLwvUOiDOucGAW2mMzXClpI7m4jrBy+TjSjPSR1JvS2e9ppcVH2vwcXdUOxxybB +aDCozlkd9DecONOygFJz7J+V323Oe/kocpUmrZjsQTv0kIveFoPKTTkVYX7JPhePK4FJ884pSafp +D+KYD3iGv3QqUt0rJBFP1IHhCKsRBNAGgDEaWUUCpT7XVRgGnhXcbQYyegBik+zenQOK6VV/t61Y +S4Jy/U332GBwLIFRjJotutij5xQmly2AnADFu5LauI9Ud8/JaR9A/AnY05eP8LbotD5oAZf973pI +UJ5kAdMn+tgw4OP26QC35iaDK/EPWNOyz+1pjrfY/cybwBjwstmu4BaTdbNzb3im39wIX7wOcX8e +NCixn7Q/gi9gDK+i0Ulfi5R20+QenkgNssOJ3kLfhuutsj5mYJ6wYeEE0mshgzDuXK2fW+ehHqtS +SOTIUn3cTl74GhjX9tlotUaFGdt/yR/8N8TDzc9dRd7As9Eg4gKfP6pnZJnutTB7k7feponsA+3h +Qbgm0NdjrxL93IdmB6cgJnMUm/A6GJTv5UynUDYwjZO82rUl3zkVGfu5nNKyEWN7K5gfRBi2l5oQ +kckHNZJwTLt7Vta4OAfd5fraF37aRquLfrI0TGU+wHAqKpwoBpU3YOZ7o5//2CEVk7vrz5O4N6e4 +erl0B2a6XTQ2u/ICDkCLaA2q4FIbMtlCsNHjkKPV5xQO+/maKQAAABUX772XxF0fAAGyB4cMAABV +zeNfscRn+wIAAAAABFla YEET } diff --git a/make-release.sh b/make-release.sh index d552dd1..64b3d1a 100755 --- a/make-release.sh +++ b/make-release.sh @@ -1,7 +1,7 @@ #!/bin/sh -_VERS="v03" -_BRANCH=$(git branch --show-current) >/dev/null 2>&1 || +_VERS="v04" +_BRANCH=$(git rev-parse --abbrev-ref HEAD) >/dev/null 2>&1 || { echo "can't poll branch, defaulting to master" && _BRANCH="master"; } # update versions before packing install.sh diff --git a/pve-nag-buster.sh b/pve-nag-buster.sh index 6e9c71a..f166543 100755 --- a/pve-nag-buster.sh +++ b/pve-nag-buster.sh @@ -1,9 +1,9 @@ #!/bin/sh # -# pve-nag-buster.sh (v03) https://github.com/foundObjects/pve-nag-buster +# pve-nag-buster.sh (v04) https://github.com/foundObjects/pve-nag-buster # Copyright (C) 2019 /u/seaQueue (reddit.com/u/seaQueue) # -# Removes Proxmox VE 5.x+ license nags automatically after updates +# Removes Proxmox VE 6.x+ license nags automatically after updates # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License