[enh/venv]: feat(install): introduce venv-based runtime setup with proper permissions#153
Open
KoenigMjr wants to merge 3 commits intoBOSWatch:developfrom
Open
[enh/venv]: feat(install): introduce venv-based runtime setup with proper permissions#153KoenigMjr wants to merge 3 commits intoBOSWatch:developfrom
KoenigMjr wants to merge 3 commits intoBOSWatch:developfrom
Conversation
…oper permissions Replace the implicit dependency on system-wide Python packages with a dedicated virtual environment and explicit runtime dependency management. Changes: - Create a project-local Python venv during installation - Install runtime dependencies explicitly via requirements-runtime.txt - Fix ModuleNotFoundError issues in isolated environments (e.g. requests) - Detect the actual user when running via sudo (SUDO_USER) - Assign correct ownership to the BOSWatch directory for venv usage - Apply setgid (2775) to the log directory so files created with sudo remain manageable by the user - Set explicit permissions for Python scripts and config files This ensures a reproducible, system-independent installation and prevents permission issues during runtime and log creation.
including Colorama into requirements-runtime.txt due to minimum required space (~50–100 KB) removing colorama-installation in install_service.py (obsolete)
Contributor
Author
|
ah ja, vergessen.... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🇩🇪 DE
Ersetzt die implizite Abhängigkeit von systemweiten Python-Paketen durch eine dedizierte virtuelle Umgebung und explizites Laufzeitabhängigkeitsmanagement.
Änderungen:
Dies gewährleistet eine reproduzierbare, systemunabhängige Installation und verhindert Berechtigungsprobleme während der Laufzeit und bei der Log-Erstellung
Caution
BEKANNTE EINSCHRÄNKUNGEN
Durch die vollständige Installation von allen benötigten Dependencies ist die Installation nun natürlich a) bisschen langsamer und b) größer.
OOTB ist das gesamte Programm nun 177MB schwer, alleine die mysql-Lib ist ca. 60MB groß.
IMHO ist das derzeit vertretbar - sollten mehrere Module/Plugins noch dazukommen, muss umgedacht werden. Zum Vorteil des Userkomfort habe ich mich, abweichend von der derzeitigen Strategie, dafür entschieden.
z.B. es später mal ein Tool gibt, was die Installation, Update, Service-Installation und Library-(Nach-)Installation aufgrund der Config übernimmt (Check).
Können gerne darüber diskutieren!
Und bitte, wie immer, meinen Code-Änderungen kritisch prüfen!
🇬🇧 EN
Replace the implicit dependency on system-wide Python packages with a
dedicated virtual environment and explicit runtime dependency management.
Changes:
remain manageable by the user
This ensures a reproducible, system-independent installation and prevents
permission issues during runtime and log creation.
Caution
KNOWN LIMITATIONS:
Due to the complete installation of all required dependencies, the installation is now naturally a) a bit slower and b) larger.
Out of the box, the entire program is now 177MB, with the MySQL library alone being approximately 60MB.
IMHO, this is currently acceptable – if more modules/plugins are added, a rethink will be necessary. For the sake of user comfort, I decided to deviate from the usual strategy.
E.g.: a tool would be available later that handles installation, updates, service installation, and library (post-)installation based on the configuration (Check)
You are welcomed to discuss!
And please, as always, critically examine my code changes!
#144 , #146 , #147 , #148 sollten damit erledigt sein / should be done.