upgrade vertion to 050

This commit is contained in:
Yangyang Shen 2020-05-11 21:28:08 +08:00
parent c0ec4a1aac
commit a6ecb496fd
11 changed files with 42 additions and 335 deletions

View File

@ -1,44 +0,0 @@
From 6d886bb74d1608e4565d926aa259ea5afc9df7b9 Mon Sep 17 00:00:00 2001
From: Mike Gilbert <floppym@gentoo.org>
Date: Thu, 4 Oct 2018 16:45:47 -0400
Subject: [PATCH 103/145] dracut-install: simplify ldd parsing logic
The previous logic would not handle absolute paths on the left side of
the "=>" properly. For example, on Gentoo ARM64, ldd outputs this:
/lib/ld-linux-aarch64.so.1 => /lib64/ld-linux-aarch64.so.1
At runtime, the kernel tries to load the file from /lib, and fails if we
only provide it in /lib64.
Instead of looking for the first slash after the "=>", just look for the
first slash, period. This would fail if we somehow had a relative path
on the left side (foo/libbar.so), but I'm not aware of any binaries that
would contain such an entry in DT_NEEDED.
Bug: https://bugs.gentoo.org/667752
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
---
install/dracut-install.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/install/dracut-install.c b/install/dracut-install.c
index 88bca1d4..5f352b36 100644
--- a/install/dracut-install.c
+++ b/install/dracut-install.c
@@ -479,11 +479,7 @@ static int resolve_deps(const char *src)
if (strstr(buf, destrootdir))
break;
- p = strstr(buf, "=>");
- if (!p)
- p = buf;
-
- p = strchr(p, '/');
+ p = strchr(buf, '/');
if (p) {
char *q;
--
2.19.1

View File

@ -1,45 +0,0 @@
From 48c283a29638e2c1e24cf282e673ddf8525b4199 Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
Date: Thu, 25 Oct 2018 15:30:36 +0200
Subject: [PATCH 113/145] dracut.install: call dracut with --force
The kernel-install is called even if you run make install.
Since we don't call dracut with -f a second make install will fail
because initrd with same version is already there.
This makes kernel developers feel miserable.
https://bugzilla.redhat.com/show_bug.cgi?id=1642402
---
50-dracut.install | 2 +-
51-dracut-rescue.install | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/50-dracut.install b/50-dracut.install
index 64e3549f..bbb73442 100755
--- a/50-dracut.install
+++ b/50-dracut.install
@@ -49,7 +49,7 @@ case "$COMMAND" in
break
fi
done
- dracut ${noimageifnotneeded:+--noimageifnotneeded} "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION"
+ dracut -f ${noimageifnotneeded:+--noimageifnotneeded} "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION"
ret=$?
;;
remove)
diff --git a/51-dracut-rescue.install b/51-dracut-rescue.install
index 6ddafdb6..ef8afac1 100755
--- a/51-dracut-rescue.install
+++ b/51-dracut-rescue.install
@@ -98,7 +98,7 @@ case "$COMMAND" in
fi
if [[ ! -f "$BOOT_DIR_ABS/$INITRD" ]]; then
- dracut --no-hostonly -a "rescue" "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION"
+ dracut -f --no-hostonly -a "rescue" "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION"
((ret+=$?))
fi
--
2.19.1

View File

@ -1,88 +0,0 @@
From 09d2a1605b1b2663e3c25f1d9950b23a2bf4ad89 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Sun, 6 Jan 2019 11:48:02 +0700
Subject: [PATCH 129/145] remove bashism in various boot scripts
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When using dash as initramfs shell, the boot process is broken.
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
---
modules.d/90crypt/crypt-lib.sh | 2 +-
modules.d/90crypt/parse-keydev.sh | 2 +-
modules.d/91crypt-gpg/crypt-gpg-lib.sh | 2 +-
modules.d/95dcssblk/parse-dcssblk.sh | 2 +-
modules.d/98syslog/rsyslogd-start.sh | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules.d/90crypt/crypt-lib.sh b/modules.d/90crypt/crypt-lib.sh
index bbf485e0..688ea251 100755
--- a/modules.d/90crypt/crypt-lib.sh
+++ b/modules.d/90crypt/crypt-lib.sh
@@ -191,7 +191,7 @@ readkey() {
local device="$3"
# No mounting needed if the keyfile resides inside the initrd
- if [ "/" == "$keydev" ]; then
+ if [ "/" = "$keydev" ]; then
local mntp=/
else
# This creates a unique single mountpoint for *, or several for explicitly
diff --git a/modules.d/90crypt/parse-keydev.sh b/modules.d/90crypt/parse-keydev.sh
index a45b2fb5..04813414 100755
--- a/modules.d/90crypt/parse-keydev.sh
+++ b/modules.d/90crypt/parse-keydev.sh
@@ -18,7 +18,7 @@ if getargbool 1 rd.luks -n rd_NO_LUKS && \
fi
# A keydev of '/' is treated as the initrd itself
- if [ "/" == "$keydev" ]; then
+ if [ "/" = "$keydev" ]; then
[ -z "$luksdev" ] && luksdev='*'
echo "$luksdev:$keydev:$keypath" >> /tmp/luks.keys
continue
diff --git a/modules.d/91crypt-gpg/crypt-gpg-lib.sh b/modules.d/91crypt-gpg/crypt-gpg-lib.sh
index b85ed2b8..c051b430 100755
--- a/modules.d/91crypt-gpg/crypt-gpg-lib.sh
+++ b/modules.d/91crypt-gpg/crypt-gpg-lib.sh
@@ -53,7 +53,7 @@ gpg_decrypt() {
--tries 3 --tty-echo-off
# Clean up the smartcard gpg-agent
- if [ "${useSmartcard}" == "1" ]; then
+ if [ "${useSmartcard}" = "1" ]; then
GNUPGHOME="$gpghome" gpg-connect-agent 1>/dev/null killagent /bye
fi
diff --git a/modules.d/95dcssblk/parse-dcssblk.sh b/modules.d/95dcssblk/parse-dcssblk.sh
index 8f174408..27ac1d8d 100644
--- a/modules.d/95dcssblk/parse-dcssblk.sh
+++ b/modules.d/95dcssblk/parse-dcssblk.sh
@@ -2,7 +2,7 @@
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
dcssblk_arg=$(getarg rd.dcssblk=)
-if [ $? == 0 ];then
+if [ $? = 0 ];then
info "Loading dcssblk segments=$dcssblk_arg"
modprobe dcssblk segments=$dcssblk_arg
fi
diff --git a/modules.d/98syslog/rsyslogd-start.sh b/modules.d/98syslog/rsyslogd-start.sh
index c64f2121..86ad50ea 100755
--- a/modules.d/98syslog/rsyslogd-start.sh
+++ b/modules.d/98syslog/rsyslogd-start.sh
@@ -38,7 +38,7 @@ rsyslog_config() {
[ -f /tmp/syslog.conf ] && read conf < /tmp/syslog.conf
[ -z "$conf" ] && conf="/etc/rsyslog.conf" && echo "$conf" > /tmp/syslog.conf
-if [ $type == "rsyslogd" ]; then
+if [ $type = "rsyslogd" ]; then
template=/etc/templates/rsyslog.conf
if [ -n "$server" ]; then
rsyslog_config "$server" "$template" "$filters" > $conf
--
2.19.1

View File

@ -1,44 +0,0 @@
From 58e0d2d5b5b3a5e7d6dbf74baa2f08f041de5a81 Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <dmolkentin@suse.com>
Date: Sun, 20 Jan 2019 21:56:05 +0100
Subject: [PATCH 136/145] Fix a missing space in example configs
It has
omit_drivers+=" i2o_scsi"
which would break the next omit_drivers+="foo " if it's
missing a space at the beginning.
Reference: boo#1121251
---
dracut.conf.d/gentoo.conf.example | 2 +-
dracut.conf.d/suse.conf.example | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dracut.conf.d/gentoo.conf.example b/dracut.conf.d/gentoo.conf.example
index 26e73147..df102e00 100644
--- a/dracut.conf.d/gentoo.conf.example
+++ b/dracut.conf.d/gentoo.conf.example
@@ -12,4 +12,4 @@ ro_mnt=yes
i18n_vars="/etc/conf.d/keymaps:keymap-KEYMAP,extended_keymaps-EXT_KEYMAPS /etc/conf.d/consolefont:consolefont-FONT,consoletranslation-FONT_MAP /etc/rc.conf:unicode-UNICODE"
i18n_default_font="LatArCyrHeb-16"
-omit_drivers+=" i2o_scsi"
+omit_drivers+=" i2o_scsi "
diff --git a/dracut.conf.d/suse.conf.example b/dracut.conf.d/suse.conf.example
index b5d962db..06573d59 100644
--- a/dracut.conf.d/suse.conf.example
+++ b/dracut.conf.d/suse.conf.example
@@ -10,7 +10,7 @@ hostonly_cmdline="yes"
compress="xz -0 --check=crc32 --memlimit-compress=50%"
i18n_vars="/etc/sysconfig/language:RC_LANG-LANG,RC_LC_ALL-LC_ALL /etc/sysconfig/console:CONSOLE_UNICODEMAP-FONT_UNIMAP,CONSOLE_FONT-FONT,CONSOLE_SCREENMAP-FONT_MAP /etc/sysconfig/keyboard:KEYTABLE-KEYMAP"
-omit_drivers+=" i2o_scsi"
+omit_drivers+=" i2o_scsi "
# Below adds additional tools to the initrd which are not urgently necessary to
# bring up the system, but help to debug problems.
--
2.19.1

View File

@ -1,35 +0,0 @@
From 44f2fe5170b3f5f161cfee04e62b713f2e47237d Mon Sep 17 00:00:00 2001
From: Jens Heise <46450477+heisej@users.noreply.github.com>
Date: Mon, 7 Jan 2019 16:47:23 +0100
Subject: [PATCH 137/145] 10i18n: Fix keymaps not getting included sometimes
Eliminate erroneous substring matches when looking up already processed keymaps to prevent necessary keymaps not getting added to the initramfs sometimes e.g. if there are the files 'compose.latin1' and 'compose.latin1.add' the unfixed version would skip processing 'compose.latin1' if find returned 'compose.latin1.add' first due to the directory listing not being in sorted order.
---
modules.d/10i18n/module-setup.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh
index 08971814..6db5a9ca 100755
--- a/modules.d/10i18n/module-setup.sh
+++ b/modules.d/10i18n/module-setup.sh
@@ -36,7 +36,7 @@ install() {
MAPS=$(find ${kbddir}/keymaps -type f -name ${MAPNAME} -o -name ${MAPNAME}.map -o -name ${MAPNAME}.map.\*)
for map in $MAPS; do
- KEYMAPS="$KEYMAPS $map"
+ KEYMAPS="$KEYMAPS $map "
case $map in
*.gz) cmd=zgrep;;
*.bz2) cmd=bzgrep;;
@@ -45,7 +45,7 @@ install() {
for INCL in $($cmd "^include " $map | while read a a b || [ -n "$a" ]; do echo ${a//\"/}; done); do
for FN in $(find ${kbddir}/keymaps -type f -name $INCL\*); do
- strstr "$KEYMAPS" "$FN" || findkeymap $FN
+ strstr "$KEYMAPS" " $FN " || findkeymap $FN
done
done
done
--
2.19.1

View File

@ -1,28 +0,0 @@
From 94eccd15c533f9e10cb0ccdec7e8a42c29bbc8d0 Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
Date: Thu, 7 Feb 2019 16:09:43 +0100
Subject: [PATCH 141/145] 95iscsi:
/sys/devices/platform/*/flashnode_sess-*/is_boot_target sometimes does not
exist
cat: '/sys/devices/platform/host2/flashnode_sess-*/is_boot_target': No such file or directory
/usr/lib/dracut/modules.d/95iscsi/module-setup.sh: line 90: [: -eq: unary operator expected
---
modules.d/95iscsi/module-setup.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
index f6f3520d..4b6c4a3c 100755
--- a/modules.d/95iscsi/module-setup.sh
+++ b/modules.d/95iscsi/module-setup.sh
@@ -86,6 +86,7 @@ install_iscsiroot() {
iscsi_host=${host##*/}
for flash in ${host}/flashnode_sess-* ; do
+ [ ! -e "$flash/is_boot_target" ] && continue
is_boot=$(cat $flash/is_boot_target)
if [ $is_boot -eq 1 ] ; then
# qla4xxx flashnode session; skip iBFT discovery
--
2.19.1

View File

@ -1,32 +0,0 @@
From fc613d0d2ca74a39bd76d4defc5bdf479e921272 Mon Sep 17 00:00:00 2001
From: gaoyi <gaoyi15@huawei.com>
Date: Wed, 14 Aug 2019 07:22:22 -0400
Subject: [PATCH] check_vol_slaves_all must return 1 when lvm vgs failed
reason: when filter/global_filter is set in lvm.conf, lvm vgs may be
failed
Signed-off-by: gaoyi <gaoyi15@huawei.com>
---
dracut-functions.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dracut-functions.sh b/dracut-functions.sh
index 7c408f8..c50d328 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -595,6 +595,12 @@ check_vol_slaves_all() {
# strip space
_vg="${_vg//[[:space:]]/}"
if [[ $_vg ]]; then
+ # when filter/global_filter is set, lvm may be failed
+ lvm lvs --noheadings -o vg_name $_vg 2>/dev/null 1>/dev/null
+ if [ $? -ne 0 ]; then
+ return 1
+ fi
+
for _pv in $(lvm vgs --noheadings -o pv_name "$_vg" 2>/dev/null)
do
check_block_and_slaves_all $1 $(get_maj_min $_pv)
--
2.19.1

Binary file not shown.

BIN
dracut-050.tar.xz Normal file

Binary file not shown.

View File

@ -8,8 +8,8 @@
%global __requires_exclude pkg-config
Name: dracut
Version: 049
Release: 8
Version: 050
Release: 1
Summary: Initramfs generator using udev
@ -21,19 +21,13 @@ URL: https://dracut.wiki.kernel.org/
# Source can be generated by
# http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%%{version};sf=tgz
#Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.xz
Source0: https://git.kernel.org/pub/scm/boot/dracut/dracut.git/snapshot/dracut-%{version}.tar.gz
Patch6000: 0103-dracut-install-simplify-ldd-parsing-logic.patch
Patch6001: 0113-dracut.install-call-dracut-with-force.patch
Patch6002: 0129-remove-bashism-in-various-boot-scripts.patch
Patch6003: 0136-Fix-a-missing-space-in-example-configs.patch
Patch6004: 0137-10i18n-Fix-keymaps-not-getting-included-sometimes.patch
Patch6005: 0141-95iscsi-sys-devices-platform-flashnode_sess-is_boot_.patch
Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.xz
#Source0: https://git.kernel.org/pub/scm/boot/dracut/dracut.git/snapshot/dracut-%{version}.tar.gz
Patch9000: check_vol_slaves_all-must-return-1-when-lvm-vgs-fail.patch
Patch9001: dracut-network-fixed-net-rules-issue-hence-systemd-r.patch
Patch9002: skip-the-broken-sd-in-initqueue.patch
Patch9003: use-sleep-replace-check-sys-block.patch
Patch0000: systemd-skip-dependency-add-for-non-existent-units.patch
Patch0001: dracut-network-fixed-net-rules-issue-hence-systemd-r.patch
Patch0002: skip-the-broken-sd-in-initqueue.patch
Patch0003: use-sleep-replace-check-sys-block.patch
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
Source2: openEuler.conf.example
@ -288,7 +282,7 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
%files
%if %{with doc}
%doc README HACKING TODO AUTHORS NEWS dracut.html dracut.png dracut.svg
%doc README.md HACKING TODO AUTHORS NEWS dracut.html dracut.png dracut.svg
%endif
%{!?_licensedir:%global license %%doc}
%license COPYING lgpl-2.1.txt
@ -344,11 +338,13 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
%if 0%{?openEuler} || 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
%{dracutlibdir}/modules.d/01fips
%endif
%{dracutlibdir}/modules.d/00mksh
%{dracutlibdir}/modules.d/01systemd-initrd
%{dracutlibdir}/modules.d/03modsign
%{dracutlibdir}/modules.d/03rescue
%{dracutlibdir}/modules.d/04watchdog
%{dracutlibdir}/modules.d/05busybox
%{dracutlibdir}/modules.d/06rngd
%{dracutlibdir}/modules.d/10i18n
%{dracutlibdir}/modules.d/30convertfs
%{dracutlibdir}/modules.d/45url-lib
@ -366,6 +362,7 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
%{dracutlibdir}/modules.d/90multipath
%{dracutlibdir}/modules.d/90stratis
%{dracutlibdir}/modules.d/90qemu
%{dracutlibdir}/modules.d/90ppcmac
%{dracutlibdir}/modules.d/91crypt-gpg
%{dracutlibdir}/modules.d/91crypt-loop
%{dracutlibdir}/modules.d/95debug
@ -481,12 +478,13 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
%endif
%changelog
* Sat Mar 21 2020 openEuler Buildteam <buildteam@openeuler.or
g> - 049-8
* Mon May 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 050-1
- Upgrade to 050
* Sat Mar 21 2020 openEuler Buildteam <buildteam@openeuler.org> - 049-8
- Add buildrequires of gdb
* Fri Mar 20 2020 openEuler Buildteam <buildteam@openeuler.or
g> - 049-7
* Fri Mar 20 2020 openEuler Buildteam <buildteam@openeuler.org> - 049-7
- Add judgement of openEuler
* Mon Feb 24 2020 openEuler Buildteam <buildteam@openeuler.org> - 049-6

View File

@ -0,0 +1,25 @@
From 3a4a212649bd89f5a07ccf87a53b3103094748a3 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 20 Apr 2020 15:07:02 +0200
Subject: [PATCH] systemd: skip dependency add for non-existent units
Fixes: https://github.com/dracutdevs/dracut/issues/795
---
modules.d/00systemd/module-setup.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh
index 5ebdfc3..17be74f 100755
--- a/modules.d/00systemd/module-setup.sh
+++ b/modules.d/00systemd/module-setup.sh
@@ -241,6 +241,7 @@ install() {
systemd-ask-password-console.service \
systemd-ask-password-plymouth.service \
; do
+ [[ -f $systemdsystemunitdir/$i ]] || continue
systemctl -q --root "$initdir" add-wants "$i" systemd-vconsole-setup.service
done
--
1.8.3.1