You are not logged in.
Hello
I wanted to try the calpp backend for pyrit (a WPA cracking utility), but couldn't find them in either the official repositiories or in AUR. There for I have created new PKGBUILDs for these, they work on my system (x86_64 3.1.0-4-ARCH), but as these are my first ones I wanted to post them here for review before I upload them to AUR.
The main thing I have doubts about are the dependencies. I think I have listed them all but I'm not sure.
Here is the PKGBUILD for calpp:
# Maintainer: Martin R. <mr-ger [at] hotmail [dot] com>
pkgname=calpp
pkgver=0.90
pkgrel=2
pkgdesc="Library to allow writing ATI CAL kernels in C++"
arch=('i686' 'x86_64')
url="http://sourceforge.net/projects/calpp/"
license=('GPL3')
depends=('amdstream' 'boost')
makedepends=('cmake')
source=("http://sourceforge.net/projects/calpp/files/$pkgname-$pkgver/$pkgname-$pkgver.tar.gz")
md5sums=('efc3f519492ac8d3178fe42115ce3637')
_streamdir='/opt/amdstream'
build() {
cd "$srcdir/$pkgname-$pkgver"
sed -i "s|\$ENV{ATISTREAMSDKROOT}/lib|${_streamdir}/lib|g" CMakeLists.txt
sed -i "s|\$ENV{ATISTREAMSDKROOT}/include|/${_streamdir}/include/CAL|" CMakeLists.txt
cmake -DCMAKE_INSTALL_PREFIX=/usr .
make
}
package() {
cd "$srcdir/$pkgname-$pkgver"
make DESTDIR="$pkgdir/" install
}And here is the PKGBUILD for cpyrit-calpp:
# Maintainer: Martin R. <mr-ger [at] hotmail [dot] com>
pkgname=cpyrit-calpp-svn
pkgver=308
pkgrel=3
pkgdesc="CAL++ backend for accelerated attack against WPA-PSK authentication, development version"
url="http://code.google.com/p/pyrit/"
license=('GPL3')
arch=('i686' 'x86_64')
depends=('python2' 'catalyst-utils' 'pyrit-svn')
makedepends=('calpp')
conflicts=('cpyrit-opencl-svn')
_svntrunk='http://pyrit.googlecode.com/svn/trunk'
_svnmod='cpyrit_calpp'
_caldir='/usr/include/CAL/'
build() {
svn co "${_svntrunk}/${_svnmod}"
cd "${_svnmod}"
sed -i "s|VERSION = '0.4.0-dev'|VERSION = '0.4.1-dev'|" setup.py
sed -i "s|CALPP_INC_DIRS = \[\]|CALPP_INC_DIRS = \[\'${_caldir}\'\]|" setup.py
LDFLAGS="" python2 setup.py build
}
package() {
cd "${srcdir}/${_svnmod}"
python2 setup.py install --root="${pkgdir}" --optimize=1
}Thanks in advance
EDIT = Updated the PKGBUILDs
Last edited by ozon-eatar (2011-11-30 22:15:56)
Offline
As nobody has replied I can only assume that there aint no major issues with these PKGBUILDs, and therefore I will upload them to the AUR :-)
Offline
You might want to quote your variables in the 'cpyrit-calpp' PKGBUILD. Also add '--optimize=1' to the python setup script arguments as per https://wiki.archlinux.org/index.php/Py … Guidelines. As gcc is in the base-devel group, it doesn't need to be in the makedepends. Try running namcap on your PKGBUILDs and the resulting packages.
--edit: AFAIK, only 'boost-libs' needs to be in the depends arrays. The 'boost' package is for building (it only needs to be in the makedepends).
Last edited by Stebalien (2011-11-29 20:45:44)
Offline
Thanks for the respones Stebalien! I have changed the things you pointed out and updated my first post.
I have also run namcap on both packages and their PKGBUILDs. The only thing namcap complains about on the PKGBUILDs are the lack of contributer tag, which I think is unnecessary as I'm listed as the maintainer.
On the cpyrit-calpp package namcap complains about unnecessary dependencies:
cpyrit-calpp-svn I: Depends as namcap sees them: depends=(catalyst-utils python2)I tried this dep array with all packages listed before uninstalled (well, catalyst and libpcap I couldn't uninstall) and it didn't work. When I added 'calpp' to makedepends it worked, and it ran after I uninstalled calpp again.
As cpyrit-calpp-svn is a backend to the pyrit-svn package and pointless to install without pyrit-svn I added it back to the array. Might add that this is how the dep array looked before:
depends=('python2' 'openssl' 'zlib' 'libpcap' 'amdstream' 'catalyst' 'calpp' 'pyrit-svn')This is what namcap is telling me about calpp:
calpp I: Depends as namcap sees them: depends=()BUT it will neither build nor will it compile one of the examples without both amdstream and boost (not just boost-libs). Therefore I have not changed the dep array for calpp.
Offline
Sorry, I didn't realize that calpp compiled programs that used boost (I thought that it used boost itself). Also, namcap often incorrectly reports dependencies as unnecessary. If namcap could check dependencies perfectly, there would be no need for a depends array. Are you sure that cpyrit-calpp doesn't depend on boost-libs?
Offline
Sorry, I didn't realize that calpp compiled programs that used boost (I thought that it used boost itself).
calpp in itself is just a bunch of C++ header files (.hpp) and I compiled the included examplecode with g++, and it complain about missing boost. It fails with boost installed too but not because of boost anymore. But as the examplecode isn't included in the package built with makepkg boost isn't a dependence after all ?
Also, namcap often incorrectly reports dependencies as unnecessary. If namcap could check dependencies perfectly, there would be no need for a depends array.
Yes, I've noticed that ![]()
Are you sure that cpyrit-calpp doesn't depend on boost-libs?
I tried the benchmark in pyrit and the cpyrit-calpp part still worked with boost (and boost-libs) uninstalled, but it's needed for building the package. As both calpp and boost is needed to build and boost is a dependence for calpp I don't really need to specifiy boost in cpyrit-calpp aswell ?
Offline