Skip to content

Instantly share code, notes, and snippets.

@gwillem
Created January 7, 2017 16:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gwillem/046c45ff6ea90f812a332e4bc5b43594 to your computer and use it in GitHub Desktop.
Save gwillem/046c45ff6ea90f812a332e4bc5b43594 to your computer and use it in GitHub Desktop.
# boot clean precise 12.04 instance
# Add universe upstream sources to apt/sources.list:
deb-src http://mirrors.digitalocean.com/ubuntu xenial universe
apt-get update
apt-get source yara

apt-get install python3 python3.2 python3-minimal

# need dh_python, which isnt included in precise
wget http://ppa.launchpad.net/libreoffice/ppa/ubuntu/pool/main/d/dh-python/dh-python_1.20140128-1ubuntu8~ctools1_all.deb
dpkg -i dh-python_1.20140128-1ubuntu8~ctools1_all.deb

apt-get -f install

apt-get build-dep python-yara

# add to debian/rules:
override_dh_python2:
        dh_python2 $@ --no-ext-rename

# and remove from debian/rules:
--enable-cuckoo

# and then build the stuff
debuild -uc -us

Notes:

  • Couldn't get backportpackage to work
  • dh_python auto renames .so files to <ext>-<arch>.so which doesn't work with python on precise, so you need to use --no-ext-rename.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment