diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2019-02-08 19:00:38 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2019-02-26 18:27:11 +0100 |
commit | 17bb28059bbb00e41c2f32227e54e237551b601d (patch) | |
tree | 8b0604623667f42705eab358382e74435fb6f964 | |
parent | 267ee53412691dbdd967dfd1497b45a3f711ccd1 (diff) | |
download | alpine_aports-17bb28059bbb00e41c2f32227e54e237551b601d.tar.bz2 alpine_aports-17bb28059bbb00e41c2f32227e54e237551b601d.tar.xz alpine_aports-17bb28059bbb00e41c2f32227e54e237551b601d.zip |
main/mkinitfs: upgrade to 3.4.1
fixes #9961
(cherry picked from commit b5fca7279cf14ae2c843d9649715f71a98b5626b)
-rw-r--r-- | main/mkinitfs/0001-features-add-crc32-modules-to-f2fs.patch | 21 | ||||
-rw-r--r-- | main/mkinitfs/0001-nlplug-findfs-detect-zfs-pool.patch | 63 | ||||
-rw-r--r-- | main/mkinitfs/0002-init-fix-root-ZFS.-from-grub.patch | 59 | ||||
-rw-r--r-- | main/mkinitfs/0003-init-fix-fbsplash.patch | 27 | ||||
-rw-r--r-- | main/mkinitfs/APKBUILD | 14 |
5 files changed, 3 insertions, 181 deletions
diff --git a/main/mkinitfs/0001-features-add-crc32-modules-to-f2fs.patch b/main/mkinitfs/0001-features-add-crc32-modules-to-f2fs.patch deleted file mode 100644 index 6cfa8742ad..0000000000 --- a/main/mkinitfs/0001-features-add-crc32-modules-to-f2fs.patch +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | From fd347152fd873803441570c29fbcee90326722d9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Natanael Copa <ncopa@alpinelinux.org> | ||
3 | Date: Fri, 25 Jan 2019 16:05:28 +0000 | ||
4 | Subject: [PATCH] features: add crc32 modules to f2fs | ||
5 | |||
6 | --- | ||
7 | features.d/f2fs.modules | 3 +++ | ||
8 | 1 file changed, 3 insertions(+) | ||
9 | |||
10 | diff --git a/features.d/f2fs.modules b/features.d/f2fs.modules | ||
11 | index b16edae..920b83c 100644 | ||
12 | --- a/features.d/f2fs.modules | ||
13 | +++ b/features.d/f2fs.modules | ||
14 | @@ -1 +1,4 @@ | ||
15 | +kernel/arch/*/crypto/crc32* | ||
16 | +kernel/crypto/crc32* | ||
17 | +kernel/fs/crypto/fscrypto | ||
18 | kernel/fs/f2fs | ||
19 | -- | ||
20 | 2.20.1 | ||
21 | |||
diff --git a/main/mkinitfs/0001-nlplug-findfs-detect-zfs-pool.patch b/main/mkinitfs/0001-nlplug-findfs-detect-zfs-pool.patch deleted file mode 100644 index d7a146f6bd..0000000000 --- a/main/mkinitfs/0001-nlplug-findfs-detect-zfs-pool.patch +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | From 76530be3c34db2e4fdbe9eefd86384ad5f2f38e2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Natanael Copa <ncopa@alpinelinux.org> | ||
3 | Date: Fri, 25 Jan 2019 18:15:48 +0000 | ||
4 | Subject: [PATCH 1/2] nlplug-findfs: detect zfs pool | ||
5 | |||
6 | if search device is prefixed with ZFS= then we search for a label with | ||
7 | the zpool name in the zfs path. For example, if search device is | ||
8 | "ZFS=tank/alpine/root" then we search for device that is type | ||
9 | "zfs_member" and label "tank". | ||
10 | |||
11 | This makes it work better with grub which creates a boot cmdline with | ||
12 | ZFS= | ||
13 | --- | ||
14 | nlplug-findfs.c | 16 +++++++++++++++- | ||
15 | 1 file changed, 15 insertions(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/nlplug-findfs.c b/nlplug-findfs.c | ||
18 | index e037a93..0283161 100644 | ||
19 | --- a/nlplug-findfs.c | ||
20 | +++ b/nlplug-findfs.c | ||
21 | @@ -961,6 +961,16 @@ static void founddev(struct ueventconf *conf, int found) | ||
22 | } | ||
23 | } | ||
24 | |||
25 | +static int is_zfs_pool(const char *path, const char *label) | ||
26 | +{ | ||
27 | + char pool_name[256]; | ||
28 | + char *p; | ||
29 | + snprintf(pool_name, sizeof(pool_name), "%s", path); | ||
30 | + if ((p = strchr(pool_name, '/'))) | ||
31 | + *p = '\0'; | ||
32 | + return strcmp(label, pool_name) == 0 ? FOUND_DEVICE : 0; | ||
33 | +} | ||
34 | + | ||
35 | static int searchdev(struct uevent *ev, const char *searchdev, int scanbootmedia) | ||
36 | { | ||
37 | struct ueventconf *conf = ev->conf; | ||
38 | @@ -981,10 +991,10 @@ static int searchdev(struct uevent *ev, const char *searchdev, int scanbootmedia | ||
39 | |||
40 | type = blkid_get_tag_value(conf->blkid_cache, "TYPE", ev->devnode); | ||
41 | uuid = blkid_get_tag_value(conf->blkid_cache, "UUID", ev->devnode); | ||
42 | + label = blkid_get_tag_value(conf->blkid_cache, "LABEL", ev->devnode); | ||
43 | |||
44 | if (searchdev != NULL) { | ||
45 | if (strncmp("LABEL=", searchdev, 6) == 0) { | ||
46 | - label = blkid_get_tag_value(conf->blkid_cache, "LABEL", ev->devnode); | ||
47 | if (label && strcmp(label, searchdev+6) == 0) | ||
48 | rc = FOUND_DEVICE; | ||
49 | } else if (strncmp("UUID=", searchdev, 5) == 0) { | ||
50 | @@ -1003,6 +1013,10 @@ static int searchdev(struct uevent *ev, const char *searchdev, int scanbootmedia | ||
51 | start_lvm2(ev->devnode); | ||
52 | } else if (strcmp("zfs_member", type) == 0) { | ||
53 | start_zpool(uuid); | ||
54 | + if (searchdev != NULL && label != NULL | ||
55 | + && strncmp("ZFS=", searchdev, 4) == 0) { | ||
56 | + rc = is_zfs_pool(&searchdev[4], label); | ||
57 | + } | ||
58 | } else if (scanbootmedia) { | ||
59 | rc = scandev(conf, ev->devnode, type); | ||
60 | } | ||
61 | -- | ||
62 | 2.20.1 | ||
63 | |||
diff --git a/main/mkinitfs/0002-init-fix-root-ZFS.-from-grub.patch b/main/mkinitfs/0002-init-fix-root-ZFS.-from-grub.patch deleted file mode 100644 index 5b3fd46eb3..0000000000 --- a/main/mkinitfs/0002-init-fix-root-ZFS.-from-grub.patch +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | From 61bb69ba80ed8d46429b717ff4e40f5e78f434a0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Natanael Copa <ncopa@alpinelinux.org> | ||
3 | Date: Fri, 25 Jan 2019 18:32:20 +0000 | ||
4 | Subject: [PATCH 2/2] init: fix root=ZFS... from grub | ||
5 | |||
6 | grub will set root=ZFS=... when root is zfs but will not add rootfstype, | ||
7 | so make a special case for zfs | ||
8 | --- | ||
9 | initramfs-init.in | 16 ++++++++++++---- | ||
10 | 1 file changed, 12 insertions(+), 4 deletions(-) | ||
11 | |||
12 | diff --git a/initramfs-init.in b/initramfs-init.in | ||
13 | index 69f917e..252b9ca 100755 | ||
14 | --- a/initramfs-init.in | ||
15 | +++ b/initramfs-init.in | ||
16 | @@ -401,10 +401,18 @@ if [ "${KOPT_s390x_net%%,*}" = "qeth_l2" ]; then | ||
17 | echo 1 > /sys/bus/ccwgroup/drivers/qeth/"${_channel%%,*}"/online | ||
18 | fi | ||
19 | |||
20 | +# make sure we load zfs module if root=ZFS=... | ||
21 | +rootfstype=${KOPT_rootfstype} | ||
22 | +if [ -z "$rootfstype" ]; then | ||
23 | + case "$KOPT_root" in | ||
24 | + ZFS=*) rootfstype=zfs ;; | ||
25 | + esac | ||
26 | +fi | ||
27 | + | ||
28 | # load available drivers to get access to modloop media | ||
29 | ebegin "Loading boot drivers" | ||
30 | |||
31 | -modprobe -a $(echo "$KOPT_modules $KOPT_rootfstype" | tr ',' ' ' ) loop squashfs 2> /dev/null | ||
32 | +modprobe -a $(echo "$KOPT_modules $rootfstype" | tr ',' ' ' ) loop squashfs 2> /dev/null | ||
33 | if [ -f /etc/modules ] ; then | ||
34 | sed 's/\#.*//g' < /etc/modules | | ||
35 | while read module args; do | ||
36 | @@ -454,7 +462,7 @@ if [ -n "$KOPT_root" ]; then | ||
37 | nlplug-findfs $cryptopts -p /sbin/mdev ${KOPT_debug_init:+-d} \ | ||
38 | $KOPT_root | ||
39 | |||
40 | - if echo "$KOPT_modules $KOPT_rootfstype" | grep -qw btrfs; then | ||
41 | + if echo "$KOPT_modules $rootfstype" | grep -qw btrfs; then | ||
42 | /sbin/btrfs device scan >/dev/null || \ | ||
43 | echo "Failed to scan devices for btrfs filesystem." | ||
44 | fi | ||
45 | @@ -476,9 +484,9 @@ if [ -n "$KOPT_root" ]; then | ||
46 | mkdir -p /media/root-rw/work /media/root-rw/root | ||
47 | mount -t overlay -o lowerdir=/media/root-ro,upperdir=/media/root-rw/root,workdir=/media/root-rw/work overlayfs $sysroot | ||
48 | else | ||
49 | - mount ${KOPT_rootfstype:+-t} ${KOPT_rootfstype} \ | ||
50 | + mount ${rootfstype:+-t} ${rootfstype} \ | ||
51 | -o ${KOPT_rootflags:-ro} \ | ||
52 | - $KOPT_root $sysroot | ||
53 | + ${KOPT_root#ZFS=} $sysroot | ||
54 | fi | ||
55 | |||
56 | eend $? | ||
57 | -- | ||
58 | 2.20.1 | ||
59 | |||
diff --git a/main/mkinitfs/0003-init-fix-fbsplash.patch b/main/mkinitfs/0003-init-fix-fbsplash.patch deleted file mode 100644 index 8340b6ebd3..0000000000 --- a/main/mkinitfs/0003-init-fix-fbsplash.patch +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | From d7ee92e1cb19bc37688bfaea0efb6308febb47b4 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> | ||
3 | Date: Wed, 6 Feb 2019 11:38:49 +0200 | ||
4 | Subject: [PATCH] init: fix fbsplash | ||
5 | |||
6 | The configuration option was renamed when parts of our patch | ||
7 | were upstreamed to busybox. | ||
8 | --- | ||
9 | initramfs-init.in | 2 +- | ||
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
11 | |||
12 | diff --git a/initramfs-init.in b/initramfs-init.in | ||
13 | index 252b9ca..62b041d 100755 | ||
14 | --- a/initramfs-init.in | ||
15 | +++ b/initramfs-init.in | ||
16 | @@ -596,7 +596,7 @@ if [ -f "$sysroot/etc/.default_boot_services" -o ! -f "$ovl" ]; then | ||
17 | fi | ||
18 | |||
19 | if [ "$KOPT_splash" != "no" ]; then | ||
20 | - echo "IMAGE_ALIGN=CM" > /tmp/fbsplash.cfg | ||
21 | + echo "IMG_ALIGN=CM" > /tmp/fbsplash.cfg | ||
22 | for fbdev in /dev/fb[0-9]; do | ||
23 | [ -e "$fbdev" ] || break | ||
24 | num="${fbdev#/dev/fb}" | ||
25 | -- | ||
26 | 2.20.1 | ||
27 | |||
diff --git a/main/mkinitfs/APKBUILD b/main/mkinitfs/APKBUILD index 32df0ecdbc..92c7deaf5b 100644 --- a/main/mkinitfs/APKBUILD +++ b/main/mkinitfs/APKBUILD | |||
@@ -1,8 +1,8 @@ | |||
1 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> | 1 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> |
2 | pkgname=mkinitfs | 2 | pkgname=mkinitfs |
3 | pkgver=3.4.0 | 3 | pkgver=3.4.1 |
4 | _ver=${pkgver%_git*} | 4 | _ver=${pkgver%_git*} |
5 | pkgrel=3 | 5 | pkgrel=0 |
6 | pkgdesc="Tool to generate initramfs images for Alpine" | 6 | pkgdesc="Tool to generate initramfs images for Alpine" |
7 | url="https://git.alpinelinux.org/cgit/mkinitfs" | 7 | url="https://git.alpinelinux.org/cgit/mkinitfs" |
8 | arch="all" | 8 | arch="all" |
@@ -17,10 +17,6 @@ subpackages="$pkgname-doc" | |||
17 | install="$pkgname.pre-upgrade $pkgname.post-install $pkgname.post-upgrade" | 17 | install="$pkgname.pre-upgrade $pkgname.post-install $pkgname.post-upgrade" |
18 | triggers="$pkgname.trigger=/usr/share/kernel/*" | 18 | triggers="$pkgname.trigger=/usr/share/kernel/*" |
19 | source="https://dev.alpinelinux.org/archive/$pkgname/$pkgname-$_ver.tar.xz | 19 | source="https://dev.alpinelinux.org/archive/$pkgname/$pkgname-$_ver.tar.xz |
20 | 0001-features-add-crc32-modules-to-f2fs.patch | ||
21 | 0001-nlplug-findfs-detect-zfs-pool.patch | ||
22 | 0002-init-fix-root-ZFS.-from-grub.patch | ||
23 | 0003-init-fix-fbsplash.patch | ||
24 | " | 20 | " |
25 | 21 | ||
26 | builddir="$srcdir/$pkgname-$_ver" | 22 | builddir="$srcdir/$pkgname-$_ver" |
@@ -35,8 +31,4 @@ package() { | |||
35 | make install DESTDIR="$pkgdir" | 31 | make install DESTDIR="$pkgdir" |
36 | } | 32 | } |
37 | 33 | ||
38 | sha512sums="6c7c1e49e49203f50784e08c8dec9b6bc3bbe5e238d91e85a0a61c09623f6c7b7dfcb490f20e1d6317cbb87287d23e7ef848f1ebf563392cee4b80499676cffc mkinitfs-3.4.0.tar.xz | 34 | sha512sums="3839f3ec4ca9f7318a611397c7190d19ae2267f31ffa97bb3777a024940799bccef3db7374d3c840b95290c493b2d3795ed2d03d72eb984c202de00c182eef77 mkinitfs-3.4.1.tar.xz" |
39 | 00d598c5bbcfc0cc99a43aefae388bb1740e5e6c678c0eca14c3707f81d6378f9385bc15da3cd383e97e4a107adea739bdb1a80c1100f93597dcea37eaf8c6f8 0001-features-add-crc32-modules-to-f2fs.patch | ||
40 | 064ee531edff553f2a1eacba9805d156e3257c87cfacd075f149a318132dd0cc96ff1a7c2766d370b4d4a1c3aa5bb6f6dfb3a76f2696f105df3787ade1f1f73b 0001-nlplug-findfs-detect-zfs-pool.patch | ||
41 | 7ad0a117678b2e7e1a6366db7194525aca3cff04159bba8199feeb5e51399745436e52129d61ad7d48b880dd0a6e6b50d529f0ce2361580ed60e49d9e5b90017 0002-init-fix-root-ZFS.-from-grub.patch | ||
42 | 056460d45346530be78aa9c1764d9f0bf14d94e5f518f3f796b00a9e2e922e3468177cc0032addc1e152fec00a20027ce498d7ef781d796c0414de7d388a1ede 0003-init-fix-fbsplash.patch" | ||