Created
October 7, 2019 04:11
-
-
Save scresante/ca744b5e1023c4ccffdb6de08ec7fbdc to your computer and use it in GitHub Desktop.
the developer of nfqueue doesn't know what he's doing packaging something like this
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
#!/bin/sh | |
cwd=$PWD | |
# intended use: install oschameleon on centos7 | |
# as root without any bloody care for proper procedures | |
yum upgrade -y | |
yum install epel-release -y | |
yum install wget alien git python-pip gcc -y | |
pip install gevent | |
# adapted from https://pypi.org/project/OSfooler-ng/ | |
wget http://mirrors.kernel.org/ubuntu/pool/universe/n/nfqueue-bindings/python-nfqueue_0.6-1build2_amd64.deb | |
# taken from https://www.electricmonk.nl/log/2017/02/23/how-to-solve-rpms-created-by-alien-having-file-conflicts/ | |
pname=python-nfqueue-0.6 | |
rel="-2" | |
alien -r -g python-nfqueue_0.6-1build2_amd64.deb | |
cd $pname | |
sed -i 's#%dir "/"##' $pname$rel.spec | |
sed -i 's#%dir "/usr/lib/"##' $pname$rel.spec | |
sed -i 's#%dir "/usr/lib/"##' $pname$rel.spec | |
#sed -i 's/dist-packages/site-packages/g' $pname$rel.spec | |
rpmbuild --target=x86_64 --buildroot=$PWD -bb $pname$rel.spec | |
cd $cwd | |
yum install ./python-nfqueue-0.6-2.x86_64.rpm -y | |
# centos uses site-packages but debian uses dist-packages | |
# manually fix the package installation | |
cd /usr/lib/python2.7/dist-packages/ | |
#cp -rav ./* ../site-packages/ | |
cd $cwd | |
#git clone https://github.com/mushorg/oschameleon.git | |
#cd oschameleon | |
#python setup.py install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment