-
Notifications
You must be signed in to change notification settings - Fork 210
Building
The artifacts source code build using Python distutils, which support building a MSI and RPM.
Or directly packaged with different package managers:
- Using Debian package tools (DEB)
- Using Mac OS X package tools (PKG)
artifacts depends on various other projects. These currently are:
- Python 2.7
- PyYAML
artifacts uses Python distutils.
You can obtain artifacts by checking the source out of git repository:
git clone https://github.com/ForensicArtifacts/artifacts.git
If you're running git on Windows make sure you have autocrlf turned off otherwise the tests using the test text files will fail.
git config --global core.autocrlf false
To build artifacts run:
python setup.py build
To install run:
sudo python setup.py install
On Windows sudo is not available so run the command without it but make sure you can write to the Python site-packages (or equivalent) directory. On Windows it might be easier to build and install a MSI package.
To build a distributable source package run:
python setup.py sdist
This will create a tar.gz file in the dist sub directory, e.g.
dist/artifacts-20150409.tar.gz
To build a msi package run:
python setup.py bdist_msi
This will create a msi file in the dist sub directory, e.g.
dist\artifacts-20150409.1.win32-py2.7.msi
To build a rpm package run:
python setup.py bdist_rpm
This will create a rpm file in the dist sub directory, e.g.
dist/artifacts-20150409-1.noarch.rpm
To install run:
sudo rpm -ivh dist/artifacts-20150409-1.noarch.rpm
Distutils has no build-in support for building dpkg (deb) packages.
To build a dpkg package run:
cd artifacts
cp -rf config/dpkg/ debian
dpkg-buildpackage -rfakeroot
cd ..
This will create a deb file in the current directory, e.g.
python-artifacts_20150409-1_all.deb
To install run:
sudo dpkg -i python-artifacts_20150409-1_all.deb
pkgbuild can be used to create a Mac OS X package.
The following instructions show how to build artifacts.pkg and artifacts.dmg from the command line.
First build artifacts:
/usr/bin/python setup.py build
Next install the build files
/usr/bin/python setup.py install --root $PWD/tmp
If you are planning to distribute artifacts.pkg make sure it contains a copy of the APL license:
find $PWD/tmp -type d -name \*.egg-info -exec cp LICENSE {} \;
To create the package (directory):
pkgbuild --root $PWD/tmp --identifier com.github.ForensicArtifacts.artifacts --version <version> --ownership recommended ../artifacts-<version>.pkg
To create a distributable disk image:
hdiutil create ../artifacts-<version>.dmg -srcfolder ../artifacts-<version>.pkg -fs HFS+