Accepting request 489777 from Base:System
----------------------- -------------------------------------------- - Ensure hisi_sas_v2_hw gets included (bsc#1034597) * adds 0515-90kernel-modules-also-add-block-device-driver-revers.patch (forwarded request 489776 from dmolkentin) OBS-URL: https://build.opensuse.org/request/show/489777 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dracut?expand=0&rev=106
This commit is contained in:
commit
7c42192506
@ -0,0 +1,51 @@
|
|||||||
|
From f8d2fa4312ba7989e30b60e5f287c91a1f4b7450 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Daniel Molkentin <dmolkentin@suse.com>
|
||||||
|
Date: Mon, 3 Apr 2017 15:23:37 +0200
|
||||||
|
Subject: [PATCH] Make binutils optional when elfutils are available
|
||||||
|
|
||||||
|
Binutils increase the size of initramfs by 36 MB. We only need "strip",
|
||||||
|
which exists as eu-strip in elfutils, which in turn is < 1 MB in size.
|
||||||
|
|
||||||
|
Note that the tests (TEST-04-FULL-SYSTEMD/test.sh) still depend on
|
||||||
|
strip from binutils. It could use sstrip in the future.
|
||||||
|
---
|
||||||
|
dracut.sh | 10 +++++++---
|
||||||
|
1 file changed, 7 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/dracut.sh b/dracut.sh
|
||||||
|
index d25da8e3..f4794d1d 100755
|
||||||
|
--- a/dracut.sh
|
||||||
|
+++ b/dracut.sh
|
||||||
|
@@ -1624,7 +1624,11 @@ fi
|
||||||
|
|
||||||
|
# strip binaries
|
||||||
|
if [[ $do_strip = yes ]] ; then
|
||||||
|
- for p in strip xargs find; do
|
||||||
|
+ # Prefer strip from elfutils for package size
|
||||||
|
+ declare strip_cmd=$(command -v eu-strip)
|
||||||
|
+ test -z "$strip_cmd" && strip_cmd="strip"
|
||||||
|
+
|
||||||
|
+ for p in $strip_cmd xargs find; do
|
||||||
|
if ! type -P $p >/dev/null; then
|
||||||
|
dinfo "Could not find '$p'. Not stripping the initramfs."
|
||||||
|
do_strip=no
|
||||||
|
@@ -1636,14 +1640,14 @@ if [[ $do_strip = yes ]] && ! [[ $DRACUT_FIPS_MODE ]]; then
|
||||||
|
dinfo "*** Stripping files ***"
|
||||||
|
find "$initdir" -type f \
|
||||||
|
-executable -not -path '*/lib/modules/*.ko' -print0 \
|
||||||
|
- | xargs -r -0 strip -g 2>/dev/null
|
||||||
|
+ | xargs -r -0 $strip_cmd -g 2>/dev/null
|
||||||
|
|
||||||
|
# strip kernel modules, but do not touch signed modules
|
||||||
|
find "$initdir" -type f -path '*/lib/modules/*.ko' -print0 \
|
||||||
|
| while read -r -d $'\0' f || [ -n "$f" ]; do
|
||||||
|
SIG=$(tail -c 28 "$f" | tr -d '\000')
|
||||||
|
[[ $SIG == '~Module signature appended~' ]] || { printf "%s\000" "$f"; }
|
||||||
|
- done | xargs -r -0 strip -g
|
||||||
|
+ done | xargs -r -0 $strip_cmd -g
|
||||||
|
|
||||||
|
dinfo "*** Stripping files done ***"
|
||||||
|
fi
|
||||||
|
--
|
||||||
|
2.12.0
|
||||||
|
|
@ -0,0 +1,56 @@
|
|||||||
|
From 31445aa3a415f9586f3bd6f6b14f0ae668d30ff9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Daniel Molkentin <dmolkentin@suse.com>
|
||||||
|
Date: Thu, 9 Mar 2017 11:45:47 +0100
|
||||||
|
Subject: [PATCH 1/2] Fix regression caused by
|
||||||
|
6f9bf2b8ac436259bdccb11054562aedaa78c496
|
||||||
|
|
||||||
|
This was trying to fix bsc#998860, but introduced a regression:
|
||||||
|
|
||||||
|
62-md-dracut-uuid.rules was not generated in /etc/udev/rules.d and
|
||||||
|
therefore not processed.
|
||||||
|
|
||||||
|
Also, force reassembly of raid arrays given at the command line
|
||||||
|
and ensure IMSM_NO_PLATFORM is set correctly.
|
||||||
|
|
||||||
|
Reference: bsc#1028542
|
||||||
|
|
||||||
|
Signed-Off-By: Daniel Molkentin <dmolkentin@suse.com>
|
||||||
|
Signed-Off-By: Thomas Blume <thomas.blume@suse.com>
|
||||||
|
---
|
||||||
|
modules.d/90mdraid/parse-md.sh | 6 ++++--
|
||||||
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/90mdraid/parse-md.sh b/modules.d/90mdraid/parse-md.sh
|
||||||
|
index c187a916..91e52f2d 100755
|
||||||
|
--- a/modules.d/90mdraid/parse-md.sh
|
||||||
|
+++ b/modules.d/90mdraid/parse-md.sh
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
MD_UUID=$(getargs rd.md.uuid -d rd_MD_UUID=)
|
||||||
|
-MD_RULES=/etc/udev/62-md-dracut-uuid.rules
|
||||||
|
+MD_RULES=/etc/udev/rules.d/62-md-dracut-uuid.rules
|
||||||
|
|
||||||
|
if ( ! [ -n "$MD_UUID" ] && ! getargbool 0 rd.auto ) || ! getargbool 1 rd.md -d -n rd_NO_MD; then
|
||||||
|
info "rd.md=0: removing MD RAID activation"
|
||||||
|
@@ -13,6 +13,8 @@ else
|
||||||
|
printf 'SUBSYSTEM!="block", GOTO="md_uuid_end"\n' >> $MD_RULES
|
||||||
|
printf 'ENV{ID_FS_TYPE}!="ddf_raid_member", ENV{ID_FS_TYPE}!="isw_raid_member", ENV{ID_FS_TYPE}!="linux_raid_member", GOTO="md_uuid_end"\n' >> $MD_RULES
|
||||||
|
|
||||||
|
+ #check for array components
|
||||||
|
+ printf 'IMPORT{program}="/sbin/mdadm --examine --export $tempnode"\n' >> $MD_RULES
|
||||||
|
for uuid in $MD_UUID; do
|
||||||
|
printf 'ENV{MD_UUID}=="%s", GOTO="md_uuid_ok"\n' $uuid >> $MD_RULES
|
||||||
|
printf 'ENV{ID_FS_UUID}=="%s", GOTO="md_uuid_ok"\n' $uuid >> $MD_RULES
|
||||||
|
@@ -20,7 +22,7 @@ else
|
||||||
|
printf 'ENV{ID_FS_TYPE}="unknown"\n' >> $MD_RULES
|
||||||
|
printf 'GOTO="md_uuid_end"\n' >> $MD_RULES
|
||||||
|
printf 'LABEL="md_uuid_ok"\n' >> $MD_RULES
|
||||||
|
- printf 'ENV{IMSM_NO_PLATFORM}="1"' >> $MD_RULES
|
||||||
|
+ printf 'ENV{IMSM_NO_PLATFORM}="1"\n' >> $MD_RULES
|
||||||
|
printf 'LABEL="md_uuid_end"\n' >> $MD_RULES
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
--
|
||||||
|
2.12.0
|
||||||
|
|
33
0514-man-make-the-k-option-clear-using-mkinitrd.patch
Normal file
33
0514-man-make-the-k-option-clear-using-mkinitrd.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
From fff87a6a53c322448ddd42a47c839570091cb824 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Lidong Zhong <lidong.zhong@suse.com>
|
||||||
|
Date: Fri, 2 Dec 2016 14:32:09 +0800
|
||||||
|
Subject: [PATCH 2/2] man: make the -k option clear using mkinitrd
|
||||||
|
|
||||||
|
For example under x86, someone maybe missunderstand that the vmlinuz
|
||||||
|
is the link /boot/vmlinuz points to a specific kernel image and use
|
||||||
|
the following command directly.
|
||||||
|
|
||||||
|
mkinitrd -k vmlinuz
|
||||||
|
---
|
||||||
|
mkinitrd-suse.8.asc | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/mkinitrd-suse.8.asc b/mkinitrd-suse.8.asc
|
||||||
|
index cdb8e3aa..91ec4695 100644
|
||||||
|
--- a/mkinitrd-suse.8.asc
|
||||||
|
+++ b/mkinitrd-suse.8.asc
|
||||||
|
@@ -29,8 +29,9 @@ OPTIONS
|
||||||
|
|
||||||
|
**-k** _<kernel_list>_::
|
||||||
|
List of kernel images for which initrd files are created (relative
|
||||||
|
- to _boot_dir_), defaults to _vmlinux_ on ppc/ppc64, _image_ on s390/s390x
|
||||||
|
- and _vmlinuz_ for everything else.
|
||||||
|
+ to _boot_dir_), Image name should begin with the following string,
|
||||||
|
+ defaults to _vmlinux_ on ppc/ppc64, _image_ on s390/s390x and _vmlinuz_
|
||||||
|
+ for everything else.
|
||||||
|
|
||||||
|
**-i** _<initrd_list>_::
|
||||||
|
List of file names (relative to _boot_dir_) for the initrd; positions
|
||||||
|
--
|
||||||
|
2.12.0
|
||||||
|
|
@ -0,0 +1,67 @@
|
|||||||
|
From a929c6f1b19cc945c119802feff2d8e111954f5c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Daniel Molkentin <dmolkentin@suse.com>
|
||||||
|
Date: Thu, 20 Apr 2017 21:54:38 +0200
|
||||||
|
Subject: [PATCH] 90kernel-modules: also add block device driver reverse
|
||||||
|
dependencies
|
||||||
|
|
||||||
|
The code finds relevant modules by symbol. Some drivers, such as
|
||||||
|
the hisi_sas has two slightly different implementations with
|
||||||
|
a common backend which contain the relevant symbols. However,
|
||||||
|
we also need to include the modules that depend on these
|
||||||
|
implementations.
|
||||||
|
|
||||||
|
Ex: hisi_sas_v{1,2}_hw -> hisi_sas_main
|
||||||
|
|
||||||
|
We use a simple reverse lookup for all modules via modules.dep to
|
||||||
|
include direct reverse dependencies.
|
||||||
|
|
||||||
|
Reference: bnc#1034597
|
||||||
|
---
|
||||||
|
modules.d/90kernel-modules/module-setup.sh | 24 +++++++++++++++++++++++-
|
||||||
|
1 file changed, 23 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh
|
||||||
|
index 67d0e01e..bc00991d 100755
|
||||||
|
--- a/modules.d/90kernel-modules/module-setup.sh
|
||||||
|
+++ b/modules.d/90kernel-modules/module-setup.sh
|
||||||
|
@@ -3,6 +3,28 @@
|
||||||
|
# called by dracut
|
||||||
|
installkernel() {
|
||||||
|
if [[ -z $drivers ]]; then
|
||||||
|
+ # modules with symbols might have abstractions that depend on them, so let's add those
|
||||||
|
+ add_rev_deps() {
|
||||||
|
+ local _module
|
||||||
|
+ local _line
|
||||||
|
+ [[ -f "$srcmods/modules.dep" ]] || return 0
|
||||||
|
+ while read _module; do
|
||||||
|
+ local _mod
|
||||||
|
+ local _deps
|
||||||
|
+ _module=${_module##$srcmods/}
|
||||||
|
+ printf "%s\n" "$_module"
|
||||||
|
+ egrep ".*:.*$_module.*" $srcmods/modules.dep | (
|
||||||
|
+ local _OLDIFS=$IFS
|
||||||
|
+ IFS=:
|
||||||
|
+ while read _mod _deps; do
|
||||||
|
+ printf "%s\n" "$srcmods/$_mod"
|
||||||
|
+ done
|
||||||
|
+ IFS=$_OLDIFS
|
||||||
|
+ )
|
||||||
|
+ done | sort -u
|
||||||
|
+ return 0
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
block_module_filter() {
|
||||||
|
local _blockfuncs='ahci_platform_get_resources|ata_scsi_ioctl|scsi_add_host|blk_cleanup_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device|usb_stor_disconnect|mmc_add_host|sdhci_add_host'
|
||||||
|
# subfunctions inherit following FDs
|
||||||
|
@@ -65,7 +87,7 @@ installkernel() {
|
||||||
|
instmods virtio virtio_blk virtio_ring virtio_pci virtio_scsi \
|
||||||
|
"=drivers/pcmcia" =ide "=drivers/usb/storage"
|
||||||
|
|
||||||
|
- find_kernel_modules | block_module_filter | instmods
|
||||||
|
+ find_kernel_modules | block_module_filter | add_rev_deps | instmods
|
||||||
|
|
||||||
|
# if not on hostonly mode, install all known filesystems,
|
||||||
|
# if the required list is not set via the filesystems variable
|
||||||
|
--
|
||||||
|
2.12.0
|
||||||
|
|
@ -75,7 +75,7 @@ fi
|
|||||||
|
|
||||||
cp -fp $BOOTIMAGE $INSTALL_PATH/$BOOTFILE-$KERNEL_VERSION
|
cp -fp $BOOTIMAGE $INSTALL_PATH/$BOOTFILE-$KERNEL_VERSION
|
||||||
cp -fp $MAPFILE $INSTALL_PATH/System.map-$KERNEL_VERSION
|
cp -fp $MAPFILE $INSTALL_PATH/System.map-$KERNEL_VERSION
|
||||||
[ -f .config] && cp -fp .config $INSTALL_PATH/$CONFIGFILE
|
[ -f .config ] && cp -fp .config $INSTALL_PATH/$CONFIGFILE
|
||||||
|
|
||||||
|
|
||||||
# If the kernel has module support, recreate modules.dep using depmod
|
# If the kernel has module support, recreate modules.dep using depmod
|
||||||
|
@ -1,3 +1,28 @@
|
|||||||
|
----------------------- --------------------------------------------
|
||||||
|
Thu Apr 20 20:28:43 UTC 2017 - daniel.molkentin@suse.com
|
||||||
|
|
||||||
|
- Ensure hisi_sas_v2_hw gets included (bsc#1034597)
|
||||||
|
* adds 0515-90kernel-modules-also-add-block-device-driver-revers.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Apr 7 10:03:36 UTC 2017 - daniel.molkentin@suse.com
|
||||||
|
|
||||||
|
- Fix mdraid regression (bsc#1028542)
|
||||||
|
* adds 0513-Fix-regression-caused-by-6f9bf2b8ac436259bdccb110545.patch
|
||||||
|
- man: make the -k option clear using mkinitrd (bsc#1012656)
|
||||||
|
* adds 0514-man-make-the-k-option-clear-using-mkinitrd.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 6 09:35:11 UTC 2017 - daniel.molkentin@suse.com
|
||||||
|
|
||||||
|
- Fix typo in installkernel script (bsc#1032576)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 3 13:30:20 UTC 2017 - daniel.molkentin@suse.com
|
||||||
|
|
||||||
|
- Drop binutils dependency in favor of elfutils
|
||||||
|
* add 0512-Make-binutils-optional-when-elfutils-are-available.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Mar 17 10:09:57 UTC 2017 - daniel.molkentin@suse.com
|
Fri Mar 17 10:09:57 UTC 2017 - daniel.molkentin@suse.com
|
||||||
|
|
||||||
|
13
dracut.spec
13
dracut.spec
@ -191,6 +191,10 @@ Patch504: 0504-ibft-fix-boot-flag-check.patch
|
|||||||
Patch505: 0505-Allow-booting-from-degraded-MD-RAID-arrays.patch
|
Patch505: 0505-Allow-booting-from-degraded-MD-RAID-arrays.patch
|
||||||
Patch507: 0507-Set-TaskMax-inifinite-for-the-emergency-shell.patch
|
Patch507: 0507-Set-TaskMax-inifinite-for-the-emergency-shell.patch
|
||||||
Patch508: 0508-90multipath-start-before-local-fs-pre.target.patch
|
Patch508: 0508-90multipath-start-before-local-fs-pre.target.patch
|
||||||
|
Patch512: 0512-Make-binutils-optional-when-elfutils-are-available.patch
|
||||||
|
Patch513: 0513-Fix-regression-caused-by-6f9bf2b8ac436259bdccb110545.patch
|
||||||
|
Patch514: 0514-man-make-the-k-option-clear-using-mkinitrd.patch
|
||||||
|
Patch515: 0515-90kernel-modules-also-add-block-device-driver-revers.patch
|
||||||
|
|
||||||
BuildRequires: asciidoc
|
BuildRequires: asciidoc
|
||||||
BuildRequires: bash
|
BuildRequires: bash
|
||||||
@ -201,9 +205,9 @@ BuildRequires: pkgconfig(systemd) >= 219
|
|||||||
Requires: %{_bindir}/get_kernel_version
|
Requires: %{_bindir}/get_kernel_version
|
||||||
Requires: bash
|
Requires: bash
|
||||||
# systemd-sysvinit provides: poweroff, reboot, halt
|
# systemd-sysvinit provides: poweroff, reboot, halt
|
||||||
Requires: binutils
|
|
||||||
Requires: coreutils
|
Requires: coreutils
|
||||||
Requires: cpio
|
Requires: cpio
|
||||||
|
Requires: elfutils
|
||||||
Requires: file
|
Requires: file
|
||||||
Requires: filesystem
|
Requires: filesystem
|
||||||
Requires: findutils
|
Requires: findutils
|
||||||
@ -406,6 +410,10 @@ chmod a+x modules.d/91zipl/install_zipl_cmdline.sh
|
|||||||
%patch509 -p1
|
%patch509 -p1
|
||||||
%patch510 -p1
|
%patch510 -p1
|
||||||
%patch511 -p1
|
%patch511 -p1
|
||||||
|
%patch512 -p1
|
||||||
|
%patch513 -p1
|
||||||
|
%patch514 -p1
|
||||||
|
%patch515 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure\
|
%configure\
|
||||||
@ -537,6 +545,9 @@ ln -s %{dracutlibdir}/modules.d/45ifcfg/write-ifcfg-redhat.sh %{buildroot}/%{dra
|
|||||||
%ifarch %ix86 x86_64
|
%ifarch %ix86 x86_64
|
||||||
%config %{_sysconfdir}/dracut.conf.d/02-early-microcode.conf
|
%config %{_sysconfdir}/dracut.conf.d/02-early-microcode.conf
|
||||||
%endif
|
%endif
|
||||||
|
%ifarch s390 s390x
|
||||||
|
%config %{_sysconfdir}/dracut.conf.d/10-s390x_persistent_device.conf
|
||||||
|
%endif
|
||||||
|
|
||||||
%{_mandir}/man8/dracut.8*
|
%{_mandir}/man8/dracut.8*
|
||||||
%{_mandir}/man8/mkinitrd.8*
|
%{_mandir}/man8/mkinitrd.8*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user