summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-05-06 14:21:44 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-05-06 14:22:25 +0000
commit8e3040ef37715e8631d286887c2f3117fd28ecd4 (patch)
tree9f030152929a92cfb048167798e249bc2f3484e6
parent0c19a1c49190e38ea1c490e364d21b095b99cd70 (diff)
downloadaports-8e3040ef37715e8631d286887c2f3117fd28ecd4.tar.bz2
aports-8e3040ef37715e8631d286887c2f3117fd28ecd4.tar.xz
main/mkinitfs: backport support for apkovl boot option
-rw-r--r--main/mkinitfs/APKBUILD8
-rw-r--r--main/mkinitfs/git.patch55
2 files changed, 44 insertions, 19 deletions
diff --git a/main/mkinitfs/APKBUILD b/main/mkinitfs/APKBUILD
index 17d1fce9b..9641c8253 100644
--- a/main/mkinitfs/APKBUILD
+++ b/main/mkinitfs/APKBUILD
@@ -1,6 +1,6 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mkinitfs
-pkgver=2.4.4_git20130502
+pkgver=2.4.4_git20130506
_ver=${pkgver%_git*}
pkgrel=0
pkgdesc="Tool to generate initramfs images for Alpine"
@@ -46,11 +46,11 @@ package() {
make install DESTDIR="$pkgdir" || return 1
}
md5sums="5b897ab38204bf62ed8abf63d6b7cafd mkinitfs-2.4.4.tar.bz2
-6727bb8b3a5cc0ac415a8fb7ae871e87 git.patch
+b6f5ce5713d9592f942d9cb0ce3ea18b git.patch
067649665a767ff1a08578e1f4e61524 eglibc.patch"
sha256sums="454e43149322e9cdfd7ea397480621b42169b5d78dd8eab1be46b96762fc5dc5 mkinitfs-2.4.4.tar.bz2
-d95bc897f7f850ba2057af5ccaf5814f5ff8d42a2932a3943d390fcfe088bd87 git.patch
+6bc549d1ba8b953d5ab871147f83fe8317bfa152e7a95a51fef9d37ebd27c6e8 git.patch
2db513d1a058be0f5794dc74d00418807253d8ac850c9713ea0eeb0be5f3f65a eglibc.patch"
sha512sums="9f0e49b20a592b4315155453e4398abf710c8bae62496d4b8d281e21d13366804084be26f0303d35ef3f0bf295eba76885ca43ff452d4aea1e59f0bdce0de18e mkinitfs-2.4.4.tar.bz2
-4e07de46376df4e1a82e04e2276a389c8dfdb9ad43c58b6c3daf2b199f549996562d41cb5f39e85c2c974200acb851bfedb405e1911fbf55d89ca3ae556286c7 git.patch
+6f4e9f1d1070b7b2bb1b18ae1d4eb584c178ba8bf97df63cc731509a6daafc3c41e6bb79bb194ff983e4ed3f8a4e634bd9df8c51e2cfd95f8091dd0d61e4851a git.patch
3498d9930889cd776a34863733d467b50b83679ea7f91d79963c81e4f1dc138f887ef1f2a696da6d836d1f6f862dcfd2c2fb9a55b0e3b2926e9f3fc648bc5a15 eglibc.patch"
diff --git a/main/mkinitfs/git.patch b/main/mkinitfs/git.patch
index b82239e41..dfa0719c2 100644
--- a/main/mkinitfs/git.patch
+++ b/main/mkinitfs/git.patch
@@ -1,8 +1,20 @@
diff --git a/initramfs-init.in b/initramfs-init.in
-index 3c05f81..5d07157 100755
+index 3c05f81..0050787 100755
--- a/initramfs-init.in
+++ b/initramfs-init.in
-@@ -191,7 +191,7 @@ setup_inittab_console(){
+@@ -52,6 +52,11 @@ find_ovl() {
+ local ovl
+ local lines
+
++ if [ -n "$APKOVL" ]; then
++ [ -f "$mnt/$APKOVL" ] && echo "$mnt/$APKOVL"
++ return
++ fi
++
+ # look for apkovl's on mounted media
+ ovl=$( ls -1 "$mnt"/*.apkovl.tar.gz* 2>/dev/null ) || return 1
+ lines=$(echo "$ovl" | wc -l)
+@@ -191,7 +196,7 @@ setup_inittab_console(){
esac
shift
@@ -11,7 +23,7 @@ index 3c05f81..5d07157 100755
[ "$tty" = "tty0" ] && continue
# do nothing if inittab already have the tty set up
-@@ -240,6 +240,81 @@ start_lvm() {
+@@ -240,6 +245,81 @@ start_lvm() {
lvm vgchange --ignorelockingfailure -a y >/dev/null 2>&1
}
@@ -93,7 +105,7 @@ index 3c05f81..5d07157 100755
# resolve an uuid or symlink to the real device
resolve_dev() {
case "$1" in
-@@ -275,8 +350,12 @@ find_fs_type() {
+@@ -275,8 +355,12 @@ find_fs_type() {
# find the dirs under ALPINE_MNT that are boot repositories
find_boot_repositories() {
@@ -108,7 +120,7 @@ index 3c05f81..5d07157 100755
}
# gotta start from somewhere :)
-@@ -286,8 +365,9 @@ echo "Alpine Init $VERSION"
+@@ -286,8 +370,9 @@ echo "Alpine Init $VERSION"
# acpi_osi="!Windows 2006"
eval set -- `cat /proc/cmdline`
@@ -120,7 +132,7 @@ index 3c05f81..5d07157 100755
for opt; do
case "$opt" in
-@@ -340,6 +420,8 @@ ALPINE_DEV_FS=${KOPT_alpine_dev##*:}
+@@ -340,6 +425,8 @@ ALPINE_DEV_FS=${KOPT_alpine_dev##*:}
if [ "$ALPINE_DEV_FS" = "$ALPINE_DEV" ]; then
unset ALPINE_DEV_FS
fi
@@ -129,7 +141,7 @@ index 3c05f81..5d07157 100755
if [ -n "$KOPT_ovl_dev" ] ; then
OVL_DEV=${KOPT_ovl_dev%%:*}
OVL_DEV_FS=${KOPT_ovl_dev##*:}
-@@ -348,13 +430,31 @@ if [ -n "$KOPT_ovl_dev" ] ; then
+@@ -348,13 +435,44 @@ if [ -n "$KOPT_ovl_dev" ] ; then
fi
fi
@@ -137,6 +149,19 @@ index 3c05f81..5d07157 100755
+case "$KOPT_apkovl" in
+ http://*|https://|ftp://*)
+ OVL_DEV="$KOPT_apkovl";;
++ *:*:*) # apkovl=sda1:ext4:/subdir/host.apkovl.tar.gz
++ OVL_DEV="${KOPT_apkovl%%:*}"
++ OVL_DEV_FS="${KOPT_apkovl%:*}"
++ OVL_DEV_FS="${OVL_DEV_FS#*:}"
++ APKOVL="${KOPT_apkovl##*:}"
++ ;;
++ *:*) # apkovl=sda1:/subdir/host.apkovl.tar.gz
++ OVL_DEV=${KOPT_apkovl%%:*}
++ APKOVL=${KOPT_apkovl##*:}
++ ;;
++ *) # apkovl=subdir/host.apkovl.tar.gz
++ APKOVL="${KOPT_apkovl}"
++ ;;
+esac
+
case "$ALPINE_DEV" in
@@ -161,7 +186,7 @@ index 3c05f81..5d07157 100755
[ -z "$ALPINE_MNT" ] && ALPINE_MNT=/media/${ALPINE_DEV##*/}
# hide kernel messages
-@@ -428,6 +528,9 @@ if [ -z "${ALPINE_DEV##*usb*}" ]; then
+@@ -428,6 +546,9 @@ if [ -z "${ALPINE_DEV##*usb*}" ]; then
wait_usb
fi
@@ -171,7 +196,7 @@ index 3c05f81..5d07157 100755
# incase we have alpine_dev on raid device...
start_raid
start_cryptsetup
-@@ -444,6 +547,7 @@ fi
+@@ -444,6 +565,7 @@ fi
if [ -n "$ALPINE_DEV_FS" ]; then
mount_opts="-t $ALPINE_DEV_FS"
@@ -179,7 +204,7 @@ index 3c05f81..5d07157 100755
fi
retry_mount -o ro $mount_opts $ALPINE_DEV $ALPINE_MNT >/dev/null 2>&1
-@@ -462,19 +566,27 @@ if [ -n "$KOPT_root_size" ]; then
+@@ -462,19 +584,27 @@ if [ -n "$KOPT_root_size" ]; then
fi
mount -t tmpfs $root_opts tmpfs $sysroot
@@ -220,7 +245,7 @@ index 3c05f81..5d07157 100755
if ! [ -f "$ovl" ]; then
ovl=$(find_ovl $ALPINE_MNT)
fi
-@@ -508,7 +620,8 @@ if [ -f "$ovl" ]; then
+@@ -508,7 +638,8 @@ if [ -f "$ovl" ]; then
-e 's|:/etc/init.d/rcK|:/sbin/rc shutdown|' \
"$sysroot"/etc/inittab
fi
@@ -230,7 +255,7 @@ index 3c05f81..5d07157 100755
# add some boot services by default
rc_add devfs sysinit
rc_add dmesg sysinit
-@@ -524,6 +637,8 @@ else
+@@ -524,6 +655,8 @@ else
rc_add mount-ro shutdown
rc_add killprocs shutdown
rc_add savecache shutdown
@@ -239,7 +264,7 @@ index 3c05f81..5d07157 100755
fi
if [ -f $sysroot/etc/fstab ]; then
-@@ -569,7 +684,14 @@ ebegin "Installing packages to root filesystem"
+@@ -569,7 +702,14 @@ ebegin "Installing packages to root filesystem"
if [ "$KOPT_chart" = yes ]; then
pkgs="$pkgs acct"
fi
@@ -255,7 +280,7 @@ index 3c05f81..5d07157 100755
if [ -n "$KOPT_quiet" ]; then
apkflags="$apkflags --quiet"
fi
-@@ -580,7 +702,7 @@ if [ "$KOPT_keep_apk_new" != yes ]; then
+@@ -580,7 +720,7 @@ if [ "$KOPT_keep_apk_new" != yes ]; then
fi
if [ -n "$ovlfiles" ]; then
@@ -264,7 +289,7 @@ index 3c05f81..5d07157 100755
else
apk add --root $sysroot $repo_opt $apkflags $pkgs >/dev/null
fi
-@@ -613,11 +735,14 @@ fi
+@@ -613,11 +753,14 @@ fi
setup_inittab_console $CONSOLE
# copy alpine release info