diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2010-09-15 23:17:06 +0000 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2010-09-15 23:17:06 +0000 |
commit | 8cb2e4459f3e714a255d65226234751351934736 (patch) | |
tree | 62aea7703c52ded6a6e38fc601d2b97e08604a94 | |
parent | 7b1bc8906be3de400eb759694f4af8cc0d926106 (diff) | |
download | aports-8cb2e4459f3e714a255d65226234751351934736.tar.bz2 aports-8cb2e4459f3e714a255d65226234751351934736.tar.xz |
main/mkinitfs: fix for eglibc and dev/null
* when building on with eglibc we need to replace libs inside initramfs
* seems dev/null is a regular file on .35 kernel with eglibc
-rw-r--r-- | main/mkinitfs/APKBUILD | 20 | ||||
-rw-r--r-- | main/mkinitfs/eglibc.patch | 17 | ||||
-rw-r--r-- | main/mkinitfs/fix-dev-null.patch | 12 |
3 files changed, 42 insertions, 7 deletions
diff --git a/main/mkinitfs/APKBUILD b/main/mkinitfs/APKBUILD index 930ddb7ac5..065cbab969 100644 --- a/main/mkinitfs/APKBUILD +++ b/main/mkinitfs/APKBUILD @@ -1,22 +1,26 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=mkinitfs pkgver=2.0 -pkgrel=0 +pkgrel=1 pkgdesc="Tool to generate initramfs images for Alpine" url=http://git.alpinelinux.org/cgit/mkinitfs depends="busybox apk-tools>=2.0" triggers="$pkgname.trigger:/usr/share/kernel/*" source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2 + eglibc.patch + fix-dev-null.patch " license="GPL-2" prepare() { cd "$srcdir"/$pkgname-$pkgver - for i in $source; do - case "$i" in - *.patch) patch -p1 -i "$srcdir"/$i || return 1;; - esac - done + # seems dev null is not properly created after switch root + patch -p1 -i "$srcdir"/fix-dev-null.patch || return 1 + # If we are using eglibc we need to include eglibc libs + # instead of uclibc libs. + if [ "$ALPINE_LIBC" = "eglibc" ]; then + patch -p1 -i "$srcdir"/eglibc.patch || return 1 + fi } build() { @@ -28,4 +32,6 @@ package() { cd "$srcdir"/$pkgname-$pkgver make install DESTDIR="$pkgdir" || return 1 } -md5sums="b43a5eae02a1f97362ca66e7b5108593 mkinitfs-2.0.tar.bz2" +md5sums="b43a5eae02a1f97362ca66e7b5108593 mkinitfs-2.0.tar.bz2 +e59c2f7de496fe430b07e32fd812ebe0 eglibc.patch +0f8c809b2f3530519025a52aaccbd296 fix-dev-null.patch" diff --git a/main/mkinitfs/eglibc.patch b/main/mkinitfs/eglibc.patch new file mode 100644 index 0000000000..24f1e1e9a3 --- /dev/null +++ b/main/mkinitfs/eglibc.patch @@ -0,0 +1,17 @@ +--- a/files.d/base ++++ b/files.d/base +@@ -7,11 +7,11 @@ + /lib/libdl.so* + /lib/libm-[0-9]* + /lib/libm.so.* +-/lib/libuClibc-[0-9]* ++/lib/libc-[0-9]* + /lib/libc.so.* + /lib/libz.* +-/lib/ld-uClibc-[0-9]* +-/lib/ld-uClibc.so* ++/lib/ld-[0-9]* ++/lib/ld-linux.so* + /lib/mdev + /sbin/apk + /etc/modprobe.d/blacklist diff --git a/main/mkinitfs/fix-dev-null.patch b/main/mkinitfs/fix-dev-null.patch new file mode 100644 index 0000000000..8b1161cee9 --- /dev/null +++ b/main/mkinitfs/fix-dev-null.patch @@ -0,0 +1,12 @@ +--- a/initramfs-init.in ++++ b/initramfs-init.in +@@ -235,6 +235,9 @@ + RC=$? + [ -d /dev/pts ] || mkdir -m 755 /dev/pts + [ -c /dev/ptmx ] || mknod -m 666 /dev/ptmx c 5 2 ++# make sure /dev/null is setup correctly ++[ -f /dev/null ] && rm -f /dev/null ++[ -c /dev/null ] || mknod -m 666 /dev/null c 1 3 + mount -t devpts -o gid=5,mode=0620,noexec,nosuid devpts /dev/pts + [ -d /dev/shm ] || mkdir /dev/shm + mount -t tmpfs -o nodev,nosuid,noexec shm /dev/shm |