aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/mkinitfs/0001-init-fix-inittab-for-users-who-upgrades-from-pre-ope.patch35
-rw-r--r--main/mkinitfs/0001-init-search-boot-repositories-after-relocation.patch44
-rw-r--r--main/mkinitfs/APKBUILD6
3 files changed, 84 insertions, 1 deletions
diff --git a/main/mkinitfs/0001-init-fix-inittab-for-users-who-upgrades-from-pre-ope.patch b/main/mkinitfs/0001-init-fix-inittab-for-users-who-upgrades-from-pre-ope.patch
new file mode 100644
index 0000000000..a1bc1b36d4
--- /dev/null
+++ b/main/mkinitfs/0001-init-fix-inittab-for-users-who-upgrades-from-pre-ope.patch
@@ -0,0 +1,35 @@
+From 8da5b2ebf893af5710024e7111143f2521707647 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 2 May 2012 09:21:05 +0000
+Subject: [PATCH] init: fix inittab for users who upgrades from pre openrc
+
+The /etc/init.d/rc[SLK] have been replaced with openrc but users
+might have references to the old scripts in their /etc/inittab.
+
+We fix this from initramfs init.
+---
+ initramfs-init.in | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/initramfs-init.in b/initramfs-init.in
+index bec3b52..4425990 100755
+--- a/initramfs-init.in
++++ b/initramfs-init.in
+@@ -490,6 +490,14 @@ if [ -f "$ovl" ]; then
+ break;
+ fi
+ done
++
++ # fix up inittab from pre openrc times (alpine v1.8)
++ if [ -f "$sysroot"/etc/inittab ]; then
++ sed -i -e 's|:/etc/init.d/rcS|:/sbin/rc sysinit|' \
++ -e 's|:/etc/init.d/rcL|:/sbin/rc default|' \
++ -e 's|:/etc/init.d/rcK|:/sbin/rc shutdown|' \
++ "$sysroot"/etc/inittab
++ fi
+ else
+ # add some boot services by default
+ rc_add devfs sysinit
+--
+1.7.10
+
diff --git a/main/mkinitfs/0001-init-search-boot-repositories-after-relocation.patch b/main/mkinitfs/0001-init-search-boot-repositories-after-relocation.patch
new file mode 100644
index 0000000000..293ab3ea93
--- /dev/null
+++ b/main/mkinitfs/0001-init-search-boot-repositories-after-relocation.patch
@@ -0,0 +1,44 @@
+From 5da682acedf4011a647394843e819c50e8f5200b Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 2 May 2012 11:44:04 +0000
+Subject: [PATCH] init: search boot repositories after relocation
+
+---
+ initramfs-init.in | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/initramfs-init.in b/initramfs-init.in
+index 4425990..b14ebf9 100755
+--- a/initramfs-init.in
++++ b/initramfs-init.in
+@@ -84,6 +84,7 @@ unpack_apkovl() {
+ fi
+
+ # we need openssl. let apk handle deps
++ find_boot_repositories > /tmp/repositories
+ apk add --quiet --initdb --repositories-file /tmp/repositories openssl\
+ || return 1
+
+@@ -434,9 +435,6 @@ fi
+ retry_mount -o ro $mount_opts $ALPINE_DEV $ALPINE_MNT >/dev/null 2>&1
+ eend $?
+
+-# generate apk repositories file
+-find_boot_repositories > /tmp/repositories
+-
+ # early console?
+ if [ "$SINGLEMODE" = "yes" ]; then
+ echo "Entering single mode. Type 'exit' to continue booting."
+@@ -543,6 +541,9 @@ pkgs="$pkgs alpine-base"
+ mkdir -p $sysroot/etc/apk/keys/
+ cp -a /etc/apk/keys $sysroot/etc/apk
+
++# generate apk repositories file. needs to be done after relocation
++find_boot_repositories > /tmp/repositories
++
+ # generate repo opts for apk
+ for i in $(cat /tmp/repositories); do
+ repo_opt="$repo_opt --repository $i"
+--
+1.7.10
+
diff --git a/main/mkinitfs/APKBUILD b/main/mkinitfs/APKBUILD
index cb09a673c3..9384e20080 100644
--- a/main/mkinitfs/APKBUILD
+++ b/main/mkinitfs/APKBUILD
@@ -1,12 +1,14 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mkinitfs
pkgver=2.4.3
-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
+ 0001-init-fix-inittab-for-users-who-upgrades-from-pre-ope.patch
+ 0001-init-search-boot-repositories-after-relocation.patch
eglibc.patch
"
arch="noarch"
@@ -43,4 +45,6 @@ package() {
make install DESTDIR="$pkgdir" || return 1
}
md5sums="7373acb2159e24ba120ee46b0deb6bc4 mkinitfs-2.4.3.tar.bz2
+ba969f3b8d8a0dd74319492eb41a712b 0001-init-fix-inittab-for-users-who-upgrades-from-pre-ope.patch
+bd9fd3813c9c28b42a1eeb30f65718e5 0001-init-search-boot-repositories-after-relocation.patch
e59c2f7de496fe430b07e32fd812ebe0 eglibc.patch"