-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] provide setup.py for proper installation and linux distro packaging #1585
Comments
User specific install can be done by utilizing https://github.com/MobSF/Mobile-Security-Framework-MobSF/blob/master/MobSF/settings.py#L37 All data/config will be used from the user's HOME directory. These changes are done to support distros like Android Tamer, BlackArch etc. I wish it is as simple as |
Thanks for highlighting USE_HOME. I'll utlise it. But the main issue about setup.py is still there. setup.py handles dependencies properly, plus a proper installation/uninstallation of cause. EDIT: You can just use requirements.txt list in setup.py btw. |
I can create a setup.py with pythonic dependencies. But a user need to have other dependencies like these installed before running setup.py
|
yes, that's correct. User would need to install these non-python packages manually. In fact, these instructions are distro specific, so users would need to adjust commands and package names |
Python setup.py #1585 directory refactoring
Hi @blshkv setup.py is now available in the latest master. once all the requirements here https://mobsf.github.io/docs/#/requirements are met, you could do
Migrate DB
To run MobSF
Do let me know if this is what you are expecting. |
Ok, great progress thank you. There is 1 more point to resolve:
|
also, I changed USE_HOME = True and ran mobsfdb, got the following error:
|
You do not have to change I can change pinning for some of the dependencies. But not all of them. |
confirmed there is no "migration" directory, but mobsfdb is trying to run 0001_initial.py:
|
So when you run mobsfdb, django tries to create the migration related python files under |
Also, I have unpinned the ones I can. https://github.com/MobSF/Mobile-Security-Framework-MobSF/blob/master/requirements.txt We normally recommend users to install mobsf and related python dependencies in a venv. |
Another option is to pre-generate the migration before running
Now you have the migrations related python files already created. You could do |
Im packaging your tool for pentoo and can't afford venv for each tool ;-) . So we find the best combination where modules can be reused as it supposed to be |
I hope the new changes with requirements.txt can address it. The few remaining pinned ones are unfortunately required for API compatibility. |
I think you fixed everything here. I'm closing the ticket. Thanks a lot for all your work! |
Awesome 👍 |
This is a common problem that many tools which we want to distribute do not support system wide installation. Some of these tools provide their own "install.sh" or "setup.sh" with a distro specific commands (sudo apt-install) to install dependencies instead of a proper setup.py.
With a proper setup.py script, an end user can install it using the following single command:
python3 setup.py install --user. It also a distro friendly and makes life for maintainers easier.
The end result, a FHS compliant directory structure should be created.
In case if software produce any output, a local user directory should be used, such as ~.//
There are some custom cases (installing non-python packages, data files etc) which have been resolved in other packages. Bellow, are reference points on such bug reports with solutions (patches)
pentoo/pentoo-overlay#596
The text was updated successfully, but these errors were encountered: