From 15609c6abbdbdc803e1a05b3075c5482e5971b90 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Thu, 4 Jun 2009 15:10:48 +0000 Subject: core/mkinitfs: fix for encrypted apkovls should fix #40 --- core/mkinitfs/APKBUILD | 10 +++++++--- core/mkinitfs/init.patch | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 core/mkinitfs/init.patch (limited to 'core/mkinitfs') diff --git a/core/mkinitfs/APKBUILD b/core/mkinitfs/APKBUILD index f4a37223..bc79fc14 100644 --- a/core/mkinitfs/APKBUILD +++ b/core/mkinitfs/APKBUILD @@ -1,16 +1,20 @@ # Maintainer: Natanael Copa pkgname=mkinitfs pkgver=1.5 -pkgrel=0 +pkgrel=1 pkgdesc="Tool to generate initramfs images for Alpine" url=http://git.alpinelinux.org/cgit/mkinitfs depends="busybox" -source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2" +source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2 + init.patch + " license="GPL-2" build() { cd "$srcdir"/$pkgname-$pkgver + patch -p1 < ../init.patch make make install DESTDIR="$pkgdir" || return 1 } -md5sums="0a7eefb454fc96763983048ee60a1bcd mkinitfs-1.5.tar.bz2" +md5sums="0a7eefb454fc96763983048ee60a1bcd mkinitfs-1.5.tar.bz2 +deb3fa8e83c877e72e6b3b420cef3864 init.patch" diff --git a/core/mkinitfs/init.patch b/core/mkinitfs/init.patch new file mode 100644 index 00000000..6f2c367e --- /dev/null +++ b/core/mkinitfs/init.patch @@ -0,0 +1,39 @@ +commit db606b4b4861076524232f52002411dc900a03ad +Author: Natanael Copa +Date: Thu Jun 4 14:56:28 2009 +0000 + + init: unpack uclibc when dealing with encrypted apkovls + + openssl needs libdl which is not there by default. + +diff --git a/initramfs-init.in b/initramfs-init.in +index f8827a0..ae82e8a 100755 +--- a/initramfs-init.in ++++ b/initramfs-init.in +@@ -66,6 +66,14 @@ retry_mount() { + return 1 + } + ++unpack_apk() { ++ local i ++ for i in $ALPINE_MNT/*/*/$1-[0-9]*.apk $ALPINE_MNT/*/$1-[0-9]*.apk; do ++ [ -f "$i" ] && tar --numeric-owner -C / -zxf $i && return 0 ++ done ++ return 1 ++} ++ + unpack_apkovl() { + local ovl="$1" + local dest="$2" +@@ -76,9 +84,8 @@ unpack_apkovl() { + return $? + fi + +- for i in $ALPINE_MNT/*/*/openssl-[0-9]*.apk $ALPINE_MNT/*/openssl-[0-9]*.apk; do +- [ -f "$i" ] && tar --numeric-owner -C / -zxf $i && break +- done ++ unpack_apk uclibc ++ unpack_apk openssl + + if ! openssl list-cipher-commands | grep "^$suffix$" > /dev/null; then + errstr="Cipher $suffix is not supported" -- cgit v1.2.3