You are not logged in.
This is my first attempt at writing a PKGBUILD so be gentle. Also, I'm some what of a LINUX newbie as well.
Anyway, my 'makepkg PKGBUILD' dies after the make step. Basically, I just need root to do a 'make install' command. Here are the last few lines of the 'makepkg PKGBUILD'
LE -I/home/squeeze/bcrypt/src/bcrypt-1.6-25/mod/../include/ -I/lib/modules/2.6.28-LinHES/build/include/asm/mach-default/ -I/lib/modules/2.6.28-LinHES/build/include2/asm/mach-default/ -fno-stack-protector -mregparm=3 -I/lib/modules/2.6.28-LinHES/build/include/ -O6 -fno-strength-reduce -fno-strict-aliasing " KVER=2.6 MODNAME=bc_$i TARGET=bc_$i.ko PWD=/home/squeeze/bcrypt/src/bcrypt-1.6-25/mod/$i ; \
done
make[2]: Entering directory `/home/squeeze/bcrypt/src/bcrypt-1.6-25/mod/gost'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/squeeze/bcrypt/src/bcrypt-1.6-25/mod/gost'
make[2]: Entering directory `/home/squeeze/bcrypt/src/bcrypt-1.6-25/mod/blowfish'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/squeeze/bcrypt/src/bcrypt-1.6-25/mod/blowfish'
make[2]: Entering directory `/home/squeeze/bcrypt/src/bcrypt-1.6-25/mod/twofish'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/squeeze/bcrypt/src/bcrypt-1.6-25/mod/twofish'
make[2]: Entering directory `/home/squeeze/bcrypt/src/bcrypt-1.6-25/mod/des'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/squeeze/bcrypt/src/bcrypt-1.6-25/mod/des'
make[2]: Entering directory `/home/squeeze/bcrypt/src/bcrypt-1.6-25/mod/bf128'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/squeeze/bcrypt/src/bcrypt-1.6-25/mod/bf128'
make[2]: Entering directory `/home/squeeze/bcrypt/src/bcrypt-1.6-25/mod/bf448'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/squeeze/bcrypt/src/bcrypt-1.6-25/mod/bf448'
make[2]: Entering directory `/home/squeeze/bcrypt/src/bcrypt-1.6-25/mod/cast'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/squeeze/bcrypt/src/bcrypt-1.6-25/mod/cast'
make[2]: Entering directory `/home/squeeze/bcrypt/src/bcrypt-1.6-25/mod/idea'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/squeeze/bcrypt/src/bcrypt-1.6-25/mod/idea'
make[2]: Entering directory `/home/squeeze/bcrypt/src/bcrypt-1.6-25/mod/3des'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/squeeze/bcrypt/src/bcrypt-1.6-25/mod/3des'
make[2]: Entering directory `/home/squeeze/bcrypt/src/bcrypt-1.6-25/mod/rijn'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/squeeze/bcrypt/src/bcrypt-1.6-25/mod/rijn'
make[1]: Leaving directory `/home/squeeze/bcrypt/src/bcrypt-1.6-25/mod'
install -o root -m 4755 -s bin/bctool //usr/bin/
install: cannot create regular file `//usr/bin/bctool': Permission denied
make: *** [install] Error 1
==> ERROR: Build Failed.
Aborting...
And here is my PKGBUILD file (note that I read the wiki article about using hyphens, but I can't seem to the "${pkgver//_/-}" syntax right which is why I'm not using the $pkgname and $pkgver variables.
pkgname=bcrypt
pkgver=1.6.25
pkgrel=1
pkgdesc="Bestcrypt encryption package"
arch=('i686' 'x86_64')
url="http://www.jetico.com/linux/"
license=('GPL2')
depends=('zlib')
conflicts=('bcrypt')
provides=('bcrypt')
source=(http://www.jetico.com/linux/BestCrypt-1.6-25.tar.gz)
md5sums=('3b37bd06035344c36f89bc2e35be8076')
sha1sums=('812829af54e16736ee1a852565afb0f98968ad5a')
options=('!emptydirs')
build() {
mkdir -p /etc/rc.d/rc0.d
mkdir -p /etc/rc.d/rc1.d
mkdir -p /etc/rc.d/rc2.d
mkdir -p /etc/rc.d/rc3.d
mkdir -p /etc/rc.d/rc4.d
mkdir -p /etc/rc.d/rc5.d
mkdir -p /etc/rc.d/rc6.d
cd $startdir/src/$pkgname-1.6-25
make || return 1
make DESTDIR=${pkgdir} install || return 1
rm -rf /etc/rc.d/rc0.d
rm -rf /etc/rc.d/rc1.d
rm -rf /etc/rc.d/rc2.d
rm -rf /etc/rc.d/rc3.d
rm -rf /etc/rc.d/rc4.d
rm -rf /etc/rc.d/rc5.d
rm -rf /etc/rc.d/rc6.d
}
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
install -o root -m 4755 -s bin/bctool //usr/bin/
install: cannot create regular file `//usr/bin/bctool': Permission denied
make: *** [install] Error 1
==> ERROR: Build Failed.
Aborting...
Something seems wrong here. It has //usr instead of /usr. I haven't tried it out yet, coz I am at work on a XP machine. But I will try it out later tonight and get back,
Last edited by Inxsible (2009-03-13 21:14:01)
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
Thank you for the reply, Inxsible. You might not want to bother/if you didn't reply, I would delete the thread:
1) bcrypt is designed for debian I think since it has many references to /etc/rcx.d as you can see in my PKGBUILD. I have no idea how to handle these in Arch.
2) I just found truecrypt in the Arch repo and installation was trivial
Last edited by graysky (2009-03-13 21:23:34)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
...scratch that. If you're willing to have a look, I would like to know what I'm doing wrong to learn.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
The problem is that it's trying to copy files to locations outside of $pkgdir. If you look at the main Makefile, it defines a $root variable and sets it to "/". Further down, this variable is used to compile the installation paths (i.e.: $(root)/usr/bin/). You could use sed to modify $root to point to $pkgdir:
sed -i "s|^root=/|root=\"$pkgdir\"|" Makefile
However, I find the way this Makefile is written quite messy, tbh. It's probably easier to do the installation manually from the PKGBUILD, instead of calling `make install' with the provided Makefile. Something like this:
pkgname=bcrypt
pkgver=1.6.25
pkgrel=1
pkgdesc="Bestcrypt encryption package"
arch=('i686' 'x86_64')
url="http://www.jetico.com/linux/"
license=('GPL2')
depends=('zlib')
conflicts=('bcrypt')
provides=('bcrypt')
source=(http://www.jetico.com/linux/BestCrypt-1.6-25.tar.gz)
md5sums=('3b37bd06035344c36f89bc2e35be8076')
sha1sums=('812829af54e16736ee1a852565afb0f98968ad5a')
options=('!emptydirs')
build() {
cd "$srcdir/$pkgname-1.6-25"
make || return 1
install -Dm4755 bin/bctool "$pkgdir/usr/bin/bctool"
install -Dm755 lib/libkgsha.so "$pkgdir/usr/lib/libkgsha.so"
install -Dm755 lib/libkgsha256.so "$pkgdir/usr/lib/libkgsha256.so"
for bin in bcmount bcumount bcformat bcfsck bcnew bcpasswd bcinfo bclink bcunlink bcmake_hidden bcreencrypt; do
ln -sf bctool "$pkgdir/usr/bin/$bin"
done
install -Dm644 etc/bc.conf "$pkgdir/etc/bc.conf"
install -Dm755 etc/bcrypt "$pkgdir/etc/rc.d/bcrypt"
install -Dm644 man/bctool.8 "$pkgdir/usr/share/man/man8/bctool.8"
install -dm755 "$pkgdir"/lib/modules/$(uname -r)/kernel/drivers/block
install -m644 bin/{bc,bc_3des,bc_bf128,bc_bf448,bc_blowfish,bc_cast,bc_des,bc_gost,bc_idea,bc_rijn,bc_twofish}.ko \
"$pkgdir"/lib/modules/$(uname -r)/kernel/drivers/block
}
Mind you, I didn't test the generated package; I'm not sure how. :<
One last comment, in regard to your PKGBUILD, is that you have included conflicts/provides on bcrypt, which also happens to be the name of the package you're making.
If something seems confusing, don't hesitate to ask for further clarification.
Offline
Also remove the provides= and conflicts=, it doesn't make sense to have them in there.
+1 on manually installing instead of using the Makefile
[git] | [AURpkgs] | [arch-games]
Offline
Thank you for the reply, Inxsible. You might not want to bother/if you didn't reply, I would delete the thread:
1) bcrypt is designed for debian I think since it has many references to /etc/rcx.d as you can see in my PKGBUILD. I have no idea how to handle these in Arch.
2) I just found truecrypt in the Arch repo and installation was trivial
Even if this software is written for Debian, you don't try to turn Arch into Debian. So no /etc/rc.d/rc* subdirs, please . Then you might as well save you the trouble and run Debian alltogether. Also: do NOT install to the real root. The ${pkg} variable is meant exactly for that - any manual installations you make in the PKGBUILD should be prefixed with that.
Try to find out the debian-specific references in the source files (often it's installation just installation paths) and adapt them to Arch. To keep it clean, after you changed the code, diff it to a clean source tree so you can reapply your changes automatically and integrate it into your PKGBUILD.
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
@B - I just did that so the installer would complete. I also removed them but I think editing the make file or doing as foutrelis suggested it best
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
@foutrelis - your PKGBUILD works great. Thank you!
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline