USArmyResearchLab / Dshell

Dshell is a network forensic analysis framework.
Other
5.45k stars 1.14k forks source link

setup.py, Python Distutils #81

Closed necrose99 closed 3 years ago

necrose99 commented 8 years ago

DestDir isnt cleanly defined in makefile so thus its a royal pest to package DSHELL on many distros....

gentoo uses sandbox /var/portage/$Packagename/$package-version/build , D$ would fake the root based on DestDir's else i have to force {$ROOT} to force make a root-fs tree in sandbox (and it works about as well as a cluster-F####) {9999 is customary for Live-git version } once built then it gets copied over to actual install tree and temp paths removed. unfortunately .dshellrc dshell-decode dshell gets real paths and has to get fixed. basically it jumps out of security sandbox so it doesn't package well as is.
however python most of all DISTUTILS packages goes up without a hitch. some require nominal patching to behave...

A: distro or system Agnostic is the power of distutils https://docs.python.org/2/distutils/setupscript.html ie python setup.py /Dshell/share/GeoIP copy if exsits /usr/share/GeoIP file symlinks etc.
B: makes for Easier Agnostic Packaging by Linux distros , adds consistent directories for 3rd parity add on modules. C: Can define USER or SYSTEM mode installs default-sysntem .dshell > /etc/skel/ so thus it is copied over to many users on login (usr /home/$username/Dshell-path/....... Symlink /opt/bin/Dshell or /usr/bin/Dshell/ dshell-decode dshell @/usr/bin Dshell/docs to /usr/share/doc/Dshell as many of the docs are dynamically generated. d: RPM/DEB /MSI ETC are a nice added bonus feature of python distutils , In theory Dshell could be just as easily patched for windows Boxes with a good and proper Python setup. and or even MACOS etc natives. as add-on modules that do added packaging, RPM or Deb , etc could be added on to the main modules , and then system packages generated for users conveniences latter. E: find any missing docs or apply updates. new modules etc.

https://pythonhosted.org/setuptools/python3.html https://github.com/pypa/sampleproject https://docs.python.org/2.0/dist/creating-rpms.html https://ghantoos.org/2008/10/19/creating-a-deb-package-from-a-python-setuppy/ http://cyrille.rossant.net/create-a-standalone-windows-installer-for-your-python-application/

[install] prefix=/usr/bin/Dshell install_lib=//usr/bin/Dshell/lib install_scripts=/usr/bin/Dshell/bin etc.

[bdist_wininst] prefix=/c:/Dshell install_lib=/some/lib/path install_scripts=/some/bin/path

necrose99 commented 7 years ago

https://github.com/USArmyResearchLab/Dshell/tree/makefile-updates

had to create and copy /opt/dshell and copy files over , however after that the directory works as agreed. with make , its just not copying files over form $(PWD) as root , however seams to work as the same.

namely bin/ decoders/ , and sub directories are not being pulled from local or temp. on make

once copied , to /opt/dshell , the make in local dir will spawn the make install. make /opt/dhsell skell mkdir {/opt/dshell , /opt/dshell/bin/ ,

@dev195

Finally got a Linux drive for laptop being on the road alot has greatly impeded many a task.

dek443 commented 3 years ago

The Python 2 version of Dshell is now deprecated and frozen as Release v2.4.10. We are closing all Pull Requests and Issues associated with that version, as Dshell development has shifted to the current version for Python 3. Thank you for your support.

necrose99 commented 3 years ago

DShell could be ported to py3 with hopefully minimal effort.

dek443 commented 3 years ago

Dshell was rewritten from the ground up in Python 3 was just released within this repository at version 3.1.3. Check out the new version and the README for details on all of the new features and improvements.