diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-10-27 12:34:23 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-10-27 12:34:38 +0000 |
commit | bdfdb55775ea003ed817e322f08760d4c532aae5 (patch) | |
tree | 370b2390ca5868b01a984b5b41e957bac436b7f7 | |
parent | 9dd186c8278db659af0a97cf9f4ad84370933611 (diff) | |
download | alpine_aports-bdfdb55775ea003ed817e322f08760d4c532aae5.tar.bz2 alpine_aports-bdfdb55775ea003ed817e322f08760d4c532aae5.tar.xz alpine_aports-bdfdb55775ea003ed817e322f08760d4c532aae5.zip |
main/mkinitfs: upgrade to 2.1
-rw-r--r-- | main/mkinitfs/0001-init-add-support-for-pkgs-.-boot-opt-and-UUID-in-alp.patch | 72 | ||||
-rw-r--r-- | main/mkinitfs/APKBUILD | 15 | ||||
-rw-r--r-- | main/mkinitfs/fix-dev-null.patch | 12 |
3 files changed, 4 insertions, 95 deletions
diff --git a/main/mkinitfs/0001-init-add-support-for-pkgs-.-boot-opt-and-UUID-in-alp.patch b/main/mkinitfs/0001-init-add-support-for-pkgs-.-boot-opt-and-UUID-in-alp.patch deleted file mode 100644 index da0b4647ba..0000000000 --- a/main/mkinitfs/0001-init-add-support-for-pkgs-.-boot-opt-and-UUID-in-alp.patch +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | From f8542102cc332ac9916ef3ef1c7a8123157cf4b1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Natanael Copa <ncopa@alpinelinux.org> | ||
3 | Date: Fri, 22 Oct 2010 10:35:55 +0000 | ||
4 | Subject: [PATCH] init: add support for pkgs=... boot opt and UUID in alpine_dev | ||
5 | |||
6 | --- | ||
7 | initramfs-init.in | 20 +++++++++++++++----- | ||
8 | 1 files changed, 15 insertions(+), 5 deletions(-) | ||
9 | |||
10 | diff --git a/initramfs-init.in b/initramfs-init.in | ||
11 | index 9642ce6..1680543 100755 | ||
12 | --- a/initramfs-init.in | ||
13 | +++ b/initramfs-init.in | ||
14 | @@ -220,9 +220,14 @@ if [ -n "$KOPT_ovl_dev" ] ; then | ||
15 | fi | ||
16 | fi | ||
17 | |||
18 | +case "$ALPINE_DEV" in | ||
19 | + UUID=*) ;; | ||
20 | + *) ALPINE_DEV=/dev/$ALPINE_DEV ;; | ||
21 | +esac | ||
22 | + | ||
23 | # look for standard mountpoint locations | ||
24 | -ALPINE_MNT=$(find_mnt /dev/$ALPINE_DEV /etc/fstab) | ||
25 | -[ -z "$ALPINE_MNT" ] && ALPINE_MNT=/media/$ALPINE_DEV | ||
26 | +ALPINE_MNT=$(find_mnt $ALPINE_DEV /etc/fstab) | ||
27 | +[ -z "$ALPINE_MNT" ] && ALPINE_MNT=/media/${ALPINE_DEV##*/} | ||
28 | |||
29 | # hide kernel messages | ||
30 | [ "$KOPT_quiet" = yes ] && dmesg -n 1 | ||
31 | @@ -296,7 +301,7 @@ if [ -n "$ALPINE_DEV_FS" ]; then | ||
32 | mount_opts="-t $ALPINE_DEV_FS" | ||
33 | fi | ||
34 | |||
35 | -retry_mount $mount_opts /dev/$ALPINE_DEV $ALPINE_MNT >/dev/null 2>&1 | ||
36 | +retry_mount $mount_opts $ALPINE_DEV $ALPINE_MNT >/dev/null 2>&1 | ||
37 | eend $? | ||
38 | |||
39 | # early console? | ||
40 | @@ -328,6 +333,11 @@ if ! [ -f "$ovl" ]; then | ||
41 | ovl=$(find_ovl $ALPINE_MNT) | ||
42 | fi | ||
43 | |||
44 | +# parse pkgs=pkg1,pkg2 | ||
45 | +if [ -n "$KOPT_pkgs" ]; then | ||
46 | + pkgs=$(echo "$KOPT_pkgs" | tr ',' ' ' ) | ||
47 | +fi | ||
48 | + | ||
49 | if [ -f "$ovl" ]; then | ||
50 | ebegin "Loading user settings from $ovl" | ||
51 | # create apk db and needed /dev/null and /tmp first | ||
52 | @@ -338,7 +348,7 @@ if [ -f "$ovl" ]; then | ||
53 | # hack, incase /root/.ssh was included in apkovl | ||
54 | [ -d "$sysroot/root" ] && chmod 700 "$sysroot/root" | ||
55 | umount /media/$i 2>/dev/null & | ||
56 | - pkgs=$(sed 's/\#.*//' $sysroot/etc/lbu/packages.list 2>/dev/null) | ||
57 | + pkgs="$pkgs $(sed 's/\#.*//' $sysroot/etc/lbu/packages.list 2>/dev/null)" | ||
58 | rm -f "$sysroot"/etc/lbu/packages.list | ||
59 | pkgs="$pkgs $(cat $sysroot/var/lib/apk/world 2>/dev/null)" | ||
60 | else | ||
61 | @@ -377,7 +387,7 @@ pkgs="$pkgs alpine-base" | ||
62 | |||
63 | # move the ALPINE_MNT if ALPINE_DEV is specified in users fstab | ||
64 | # this is so a generated /etc/apk/repositories will use correct mount dir | ||
65 | -new_mnt=$(find_mnt /dev/$ALPINE_DEV $sysroot/etc/fstab) | ||
66 | +new_mnt=$(find_mnt $ALPINE_DEV $sysroot/etc/fstab) | ||
67 | if [ -n "$new_mnt" ] && [ "$new_mnt" != "$ALPINE_MNT" ]; then | ||
68 | mkdir -p $new_mnt | ||
69 | mount -o move $ALPINE_MNT $new_mnt | ||
70 | -- | ||
71 | 1.7.3.1 | ||
72 | |||
diff --git a/main/mkinitfs/APKBUILD b/main/mkinitfs/APKBUILD index 687b8a78ac..c7f6a927c9 100644 --- a/main/mkinitfs/APKBUILD +++ b/main/mkinitfs/APKBUILD | |||
@@ -1,23 +1,18 @@ | |||
1 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> | 1 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> |
2 | pkgname=mkinitfs | 2 | pkgname=mkinitfs |
3 | pkgver=2.0 | 3 | pkgver=2.1 |
4 | pkgrel=2 | 4 | pkgrel=0 |
5 | pkgdesc="Tool to generate initramfs images for Alpine" | 5 | pkgdesc="Tool to generate initramfs images for Alpine" |
6 | url=http://git.alpinelinux.org/cgit/mkinitfs | 6 | url=http://git.alpinelinux.org/cgit/mkinitfs |
7 | depends="busybox apk-tools>=2.0" | 7 | depends="busybox apk-tools>=2.0" |
8 | triggers="$pkgname.trigger:/usr/share/kernel/*" | 8 | triggers="$pkgname.trigger:/usr/share/kernel/*" |
9 | source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2 | 9 | source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2 |
10 | eglibc.patch | 10 | eglibc.patch |
11 | fix-dev-null.patch | ||
12 | 0001-init-add-support-for-pkgs-.-boot-opt-and-UUID-in-alp.patch | ||
13 | " | 11 | " |
14 | license="GPL-2" | 12 | license="GPL-2" |
15 | 13 | ||
16 | prepare() { | 14 | prepare() { |
17 | cd "$srcdir"/$pkgname-$pkgver | 15 | cd "$srcdir"/$pkgname-$pkgver |
18 | patch -p1 -i "$srcdir"/0001-init-add-support-for-pkgs-.-boot-opt-and-UUID-in-alp.patch || return 1 | ||
19 | # seems dev null is not properly created after switch root | ||
20 | patch -p1 -i "$srcdir"/fix-dev-null.patch || return 1 | ||
21 | # If we are using eglibc we need to include eglibc libs | 16 | # If we are using eglibc we need to include eglibc libs |
22 | # instead of uclibc libs. | 17 | # instead of uclibc libs. |
23 | if [ "$ALPINE_LIBC" = "eglibc" ]; then | 18 | if [ "$ALPINE_LIBC" = "eglibc" ]; then |
@@ -34,7 +29,5 @@ package() { | |||
34 | cd "$srcdir"/$pkgname-$pkgver | 29 | cd "$srcdir"/$pkgname-$pkgver |
35 | make install DESTDIR="$pkgdir" || return 1 | 30 | make install DESTDIR="$pkgdir" || return 1 |
36 | } | 31 | } |
37 | md5sums="b43a5eae02a1f97362ca66e7b5108593 mkinitfs-2.0.tar.bz2 | 32 | md5sums="c09af8dcaf276b0c16dd732e504b4af6 mkinitfs-2.1.tar.bz2 |
38 | e59c2f7de496fe430b07e32fd812ebe0 eglibc.patch | 33 | e59c2f7de496fe430b07e32fd812ebe0 eglibc.patch" |
39 | 0f8c809b2f3530519025a52aaccbd296 fix-dev-null.patch | ||
40 | 9576c3d8f1d4be82ffa478c3d603837f 0001-init-add-support-for-pkgs-.-boot-opt-and-UUID-in-alp.patch" | ||
diff --git a/main/mkinitfs/fix-dev-null.patch b/main/mkinitfs/fix-dev-null.patch deleted file mode 100644 index 8b1161cee9..0000000000 --- a/main/mkinitfs/fix-dev-null.patch +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | --- a/initramfs-init.in | ||
2 | +++ b/initramfs-init.in | ||
3 | @@ -235,6 +235,9 @@ | ||
4 | RC=$? | ||
5 | [ -d /dev/pts ] || mkdir -m 755 /dev/pts | ||
6 | [ -c /dev/ptmx ] || mknod -m 666 /dev/ptmx c 5 2 | ||
7 | +# make sure /dev/null is setup correctly | ||
8 | +[ -f /dev/null ] && rm -f /dev/null | ||
9 | +[ -c /dev/null ] || mknod -m 666 /dev/null c 1 3 | ||
10 | mount -t devpts -o gid=5,mode=0620,noexec,nosuid devpts /dev/pts | ||
11 | [ -d /dev/shm ] || mkdir /dev/shm | ||
12 | mount -t tmpfs -o nodev,nosuid,noexec shm /dev/shm | ||