Open
Conversation
- Replace python-magic (libmagic) with pure-Python magic-byte MIME detection so no system library (libmagic1 / file-libs) is needed - Add text/plain and application/json to ALLOWED_MIME_TYPES (fixes uncompressed .log/.json file validation) - Patch Flask app to resolve templates/images via sys._MEIPASS when running as a PyInstaller bundle - Add PyInstaller spec file (mongosync_insights.spec) for one-dir builds - Add build_rpm.sh script: creates venv, runs PyInstaller, packages as RPM via fpm — output is a single .rpm with embedded Python and all deps - Add systemd service file with env-file support (/etc/mongosync-insights/env) - Add PACKAGING.md with build, install, configure, and run instructions - Update README.md: remove libmagic install steps, add RPM install option - Remove python-magic from requirements.txt
…m packages PyInstaller bundles system .so files (libz, libssl, libncurses, etc.) whose .build-id symlinks conflict with RHEL packages like zlib, openssl-libs, and ncurses-libs. Remove .build-id directories from the staging area and add --exclude '**/.build-id' to the fpm invocation.
The previous find+exclude approach was insufficient — rpmbuild itself auto-generates .build-id symlinks for every ELF binary it encounters. Add --rpm-rpmbuild-define '_build_id_links none' to tell rpmbuild to skip .build-id generation entirely, preventing conflicts with system packages like zlib, openssl-libs, ncurses-libs, etc.
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.
Summary
python-magic/libmagicdependency.build-idgeneration to avoid conflicts with RHEL system packagesTesting
.build-idinstall conflicts