From 85df8c3ea931919f8cca2cc1921794c3fd2dcda9 Mon Sep 17 00:00:00 2001 From: James Swineson Date: Sat, 22 Jun 2019 23:00:22 +0800 Subject: [PATCH] basic build scripts --- .gitignore | 197 ++++++++++++++++++ package.sh | 17 ++ .../local/bin/pve-fake-subscription | 2 + 3 files changed, 216 insertions(+) create mode 100644 .gitignore create mode 100755 package.sh rename fake-pve-subscription.py => usr/local/bin/pve-fake-subscription (99%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0855866 --- /dev/null +++ b/.gitignore @@ -0,0 +1,197 @@ +*.deb + + +# Created by https://www.gitignore.io/api/macos,python,windows,visualstudiocode +# Edit at https://www.gitignore.io/?templates=macos,python,windows,visualstudiocode + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### Python ### +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don’t work, or not +# install all needed dependencies. +#Pipfile.lock + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# End of https://www.gitignore.io/api/macos,python,windows,visualstudiocode + diff --git a/package.sh b/package.sh new file mode 100755 index 0000000..eeaf124 --- /dev/null +++ b/package.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +cd "$( dirname "${BASH_SOURCE[0]}" )" + +fpm -s dir -t deb \ + -n pve-fake-subscription \ + --description "Pollute Proxmox VE 5.x subscription cache so it won't alert you on dashboard login" \ + --url "https://github.com/Jamesits/proxmox-ve-i-really-have-no-money-to-buy-a-subscription" \ + -v 0.0.1 \ + --license "GLWTS(Good Luck With That Shit) Public License" \ + --depends "python3" \ + --architecture all \ + --deb-dist "unstable" \ + --deb-priority "optional" \ + --deb-systemd "usr/lib/systemd/system/pve-fake-subscription.timer" \ + ./usr + diff --git a/fake-pve-subscription.py b/usr/local/bin/pve-fake-subscription similarity index 99% rename from fake-pve-subscription.py rename to usr/local/bin/pve-fake-subscription index 6a95cd9..98645be 100755 --- a/fake-pve-subscription.py +++ b/usr/local/bin/pve-fake-subscription @@ -1,4 +1,5 @@ #!/usr/bin/env python3 + # Pollute Proxmox VE 5.x subscription cache so it won't alert you on dashboard login # If you need to prevent it checking keys against a server, please block "shop.maurer-it.com" import hashlib @@ -67,3 +68,4 @@ if __name__ == "__main__": # write license file with open(subscription_file, "w") as f: f.write(subscription) +