diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-10-25 13:12:05 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-10-25 13:12:49 +0000 |
commit | 3548df55a79208129a8adc388e16f7d9d23df438 (patch) | |
tree | 6cc544ebcfc0e0a013548b8f3c73a62448e1b80a /main | |
parent | 35e969b9350351dc5c96cbc3b04067d859d0550c (diff) | |
download | aports-3548df55a79208129a8adc388e16f7d9d23df438.tar.bz2 aports-3548df55a79208129a8adc388e16f7d9d23df438.tar.xz |
main/mkinitfs: support for alpine_dev=UUID
Diffstat (limited to 'main')
-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 | 7 |
2 files changed, 77 insertions, 2 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 new file mode 100644 index 0000000000..da0b4647ba --- /dev/null +++ b/main/mkinitfs/0001-init-add-support-for-pkgs-.-boot-opt-and-UUID-in-alp.patch @@ -0,0 +1,72 @@ +From f8542102cc332ac9916ef3ef1c7a8123157cf4b1 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Fri, 22 Oct 2010 10:35:55 +0000 +Subject: [PATCH] init: add support for pkgs=... boot opt and UUID in alpine_dev + +--- + initramfs-init.in | 20 +++++++++++++++----- + 1 files changed, 15 insertions(+), 5 deletions(-) + +diff --git a/initramfs-init.in b/initramfs-init.in +index 9642ce6..1680543 100755 +--- a/initramfs-init.in ++++ b/initramfs-init.in +@@ -220,9 +220,14 @@ if [ -n "$KOPT_ovl_dev" ] ; then + fi + fi + ++case "$ALPINE_DEV" in ++ UUID=*) ;; ++ *) ALPINE_DEV=/dev/$ALPINE_DEV ;; ++esac ++ + # look for standard mountpoint locations +-ALPINE_MNT=$(find_mnt /dev/$ALPINE_DEV /etc/fstab) +-[ -z "$ALPINE_MNT" ] && ALPINE_MNT=/media/$ALPINE_DEV ++ALPINE_MNT=$(find_mnt $ALPINE_DEV /etc/fstab) ++[ -z "$ALPINE_MNT" ] && ALPINE_MNT=/media/${ALPINE_DEV##*/} + + # hide kernel messages + [ "$KOPT_quiet" = yes ] && dmesg -n 1 +@@ -296,7 +301,7 @@ if [ -n "$ALPINE_DEV_FS" ]; then + mount_opts="-t $ALPINE_DEV_FS" + fi + +-retry_mount $mount_opts /dev/$ALPINE_DEV $ALPINE_MNT >/dev/null 2>&1 ++retry_mount $mount_opts $ALPINE_DEV $ALPINE_MNT >/dev/null 2>&1 + eend $? + + # early console? +@@ -328,6 +333,11 @@ if ! [ -f "$ovl" ]; then + ovl=$(find_ovl $ALPINE_MNT) + fi + ++# parse pkgs=pkg1,pkg2 ++if [ -n "$KOPT_pkgs" ]; then ++ pkgs=$(echo "$KOPT_pkgs" | tr ',' ' ' ) ++fi ++ + if [ -f "$ovl" ]; then + ebegin "Loading user settings from $ovl" + # create apk db and needed /dev/null and /tmp first +@@ -338,7 +348,7 @@ if [ -f "$ovl" ]; then + # hack, incase /root/.ssh was included in apkovl + [ -d "$sysroot/root" ] && chmod 700 "$sysroot/root" + umount /media/$i 2>/dev/null & +- pkgs=$(sed 's/\#.*//' $sysroot/etc/lbu/packages.list 2>/dev/null) ++ pkgs="$pkgs $(sed 's/\#.*//' $sysroot/etc/lbu/packages.list 2>/dev/null)" + rm -f "$sysroot"/etc/lbu/packages.list + pkgs="$pkgs $(cat $sysroot/var/lib/apk/world 2>/dev/null)" + else +@@ -377,7 +387,7 @@ pkgs="$pkgs alpine-base" + + # move the ALPINE_MNT if ALPINE_DEV is specified in users fstab + # this is so a generated /etc/apk/repositories will use correct mount dir +-new_mnt=$(find_mnt /dev/$ALPINE_DEV $sysroot/etc/fstab) ++new_mnt=$(find_mnt $ALPINE_DEV $sysroot/etc/fstab) + if [ -n "$new_mnt" ] && [ "$new_mnt" != "$ALPINE_MNT" ]; then + mkdir -p $new_mnt + mount -o move $ALPINE_MNT $new_mnt +-- +1.7.3.1 + diff --git a/main/mkinitfs/APKBUILD b/main/mkinitfs/APKBUILD index 065cbab969..687b8a78ac 100644 --- a/main/mkinitfs/APKBUILD +++ b/main/mkinitfs/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=mkinitfs pkgver=2.0 -pkgrel=1 +pkgrel=2 pkgdesc="Tool to generate initramfs images for Alpine" url=http://git.alpinelinux.org/cgit/mkinitfs depends="busybox apk-tools>=2.0" @@ -9,11 +9,13 @@ triggers="$pkgname.trigger:/usr/share/kernel/*" source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2 eglibc.patch fix-dev-null.patch + 0001-init-add-support-for-pkgs-.-boot-opt-and-UUID-in-alp.patch " license="GPL-2" prepare() { cd "$srcdir"/$pkgname-$pkgver + patch -p1 -i "$srcdir"/0001-init-add-support-for-pkgs-.-boot-opt-and-UUID-in-alp.patch || return 1 # 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 @@ -34,4 +36,5 @@ package() { } md5sums="b43a5eae02a1f97362ca66e7b5108593 mkinitfs-2.0.tar.bz2 e59c2f7de496fe430b07e32fd812ebe0 eglibc.patch -0f8c809b2f3530519025a52aaccbd296 fix-dev-null.patch" +0f8c809b2f3530519025a52aaccbd296 fix-dev-null.patch +9576c3d8f1d4be82ffa478c3d603837f 0001-init-add-support-for-pkgs-.-boot-opt-and-UUID-in-alp.patch" |