diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-05-19 11:48:50 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-05-19 11:50:31 +0000 |
commit | 756a86906db7d0b5303b0a7043672a6326f5f50a (patch) | |
tree | 8cc8c2667abfdfc380445afa73f239aa06802844 /main/apk-tools | |
parent | ef905175a4166e2c380c3e1dfdbc94db69db23ce (diff) | |
download | aports-756a86906db7d0b5303b0a7043672a6326f5f50a.tar.bz2 aports-756a86906db7d0b5303b0a7043672a6326f5f50a.tar.xz |
main/apk-tools: sign the apk.static
See http://www.mail-archive.com/lxc-devel@lists.sourceforge.net/msg03378.html
Diffstat (limited to 'main/apk-tools')
-rw-r--r-- | main/apk-tools/APKBUILD | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/main/apk-tools/APKBUILD b/main/apk-tools/APKBUILD index f6f8ec0b7..2f748023d 100644 --- a/main/apk-tools/APKBUILD +++ b/main/apk-tools/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=apk-tools pkgver=2.3.4 -pkgrel=0 +pkgrel=1 pkgdesc="Alpine Package Keeper - package manager for alpine" subpackages="$pkgname-static lua-apk:luaapk" depends= @@ -50,6 +50,19 @@ static() { pkgdesc="Alpine Package Keeper - static binary" install -Dm755 "$srcdir"/$pkgname-$pkgver/src/apk.static \ "$subpkgdir"/sbin/apk.static + + # lets sign the static binary so it can be vefified from distros + # that does not have apk-tools + local abuild_conf=${ABUILD_CONF:-"/etc/abuild.conf"} + local abuild_home=${ABUILD_USERDIR:-"$HOME/.abuild"} + local abuild_userconf=${ABUILD_USERCONF:-"$abuild_home/abuild.conf"} + [ -f "$abuild_userconf" ] && . "$abuild_userconf" + local privkey="$PACKAGER_PRIVKEY" + local pubkey=${PACKAGER_PUBKEY:-"${privkey}.pub"} + local keyname=${pubkey##*/} + openssl dgst -sha1 -sign "$privkey" \ + -out "$subpkgdir"/sbin/apk.static.SIGN.RSA.$keyname \ + "$subpkgdir"/sbin/apk.static || return 1 } luaapk() { |