You are not logged in.
Hey all,
EDIT: Python dep, not Perl...
I'm trying to write a PKGBUILD for kojoney, but I'm getting stuck on a dependency - TwistedConch for Python.
Kojoney comes with all it's Perl and Python dependencies, but I can satisfy all of them from either the repos or AUR, except for TwistedConch. I've installed all the deps from extra and the AUR, but when I try and build TwistedConch, this is the error I get:
Traceback (most recent call last):
File "setup.py", line 47, in <module>
**extraMeta)
File "/usr/lib/python2.6/site-packages/twisted/python/dist.py", line 47, in setup
return core.setup(**get_setup_args(**kw))
File "/usr/lib/python2.6/site-packages/twisted/python/dist.py", line 58, in get_setup_args
kw['version'] = getVersion(projname)
File "/usr/lib/python2.6/site-packages/twisted/python/dist.py", line 119, in getVersion
execfile(vfile, ns)
IOError: [Errno 2] No such file or directory: 'twisted/conch/_version.py'
==> ERROR: Build Failed.
Here's my PKGBUILD thus far.
# Contributor: Phillip Smith <fukawi2@NO-SPAM.gmail.com>
pkgname=kojoney
pkgver=0.0.4.1
pkgrel=1
pkgdesc="Low level interaction honeypot that emulates an SSH server"
arch=(any)
url="http://kojoney.sourceforge.net"
url="http://lampsecurity.org/kojoney"
license=('GPLv2')
depends=(openssl python sh zope-interface twisted pycrypto ip-country geography-countries)
#backup=()
optdepends=(perl)
#install=$pkgname.install
source=("http://download.sourceforge.net/sourceforge/kojoney/$pkgname-$pkgver.tar.gz")
build() {
_SRCDIR="$srcdir/kojoney"
_KOJONEY_PATH="$pkgdir/usr/share/kojoney"
echo "Creating dirs..."
mkdir -p $pkgdir/{usr/share/kojoney/,etc/kojoney/,usr/local/man/man1/,usr/bin/,var/log/kojoney/,etc/rc.d/}
echo "Copying files..."
cp $_SRCDIR/*.py* $_KOJONEY_PATH
cp $_SRCDIR/fake_users $pkgdir/etc/kojoney
cp $_SRCDIR/reports/* $_KOJONEY_PATH/
echo "Done"
temp_dir=`mktemp -d`
echo "Temp directory is $temp_dir"
echo "Copying base libraries"
cp --recursive $_SRCDIR/libs/* $temp_dir
old_dir=`pwd`
cd $temp_dir
echo "Extracting libraries in temporary directory"
find $temp_dir -name "*.tar.gz" -exec tar -xzf {} \;
echo "Building libraries"
cd $temp_dir
cd TwistedConch*
echo " - Building and installing [Twisted Conch extension]"
python setup.py build 2>&1 || return 1
python setup.py install --root=${pkgdir} || return 1
cd $old_dir
rm -Rf $temp_dir
echo "Copying man pages"
cp $_SRCDIR/docs/man/* $pkgdir/usr/local/man/man1/
echo "Changing permissions and creating symbolic links"
chmod u+x $_KOJONEY_PATH/kojoney.py || die "FAILED on chmod"
ln -s $_KOJONEY_PATH/kojoney.py $pkgdir/usr/bin/kojoneyd || die "Step 4"
ln -s $_KOJONEY_PATH/kojreport $pkgdir/usr/bin/kojreport || die "Step 4"
ln -s $_KOJONEY_PATH/kojreport-filter $pkgdir/usr/bin/kojreport-filter || die "Step 4"
ln -s $_KOJONEY_PATH/kip2country $pkgdir/usr/bin/kip2country || die "Step 4"
ln -s $_KOJONEY_PATH/kojhumans $pkgdir/usr/bin/kojhumans || die "Step 4"
ln -s $_KOJONEY_PATH/kojsession $pkgdir/usr/bin/kojsession || die "Step 4"
echo "Copying init script"
cp $_SRCDIR/init.d/* $pkgdir/etc/rc.d/ || die "FAILED"
echo "All done!"
}
Any ideas what's wrong? Or is there an easier way to install Python modules via a PKGBUILD?
Last edited by fukawi2 (2009-05-30 12:25:08)
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
'.py' means python, not perl <shrugs> - version mismatch?
Other that this wild guess, I don't see how I could help: http://gathering.tweakers.net/forum/lis … es/1241820
Last edited by karol (2009-05-30 10:27:02)
Offline
Ah bugger, my bad... Yes, Python sorry, not Perl. There's perl deps too but they were found in 'extra' and I just got confused with all my perl'ing and python'ing
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline