Compare commits
No commits in common. "520c178b87e3e0bb387f1fff20dc03b15ccf7067" and "617fa5d6030dc07691d76b46590d9b7d3f9c8eb7" have entirely different histories.
520c178b87
...
617fa5d603
@ -1,45 +0,0 @@
|
|||||||
From 097d4bdb20443c1c5a86cc617ac2ab0c24193d75 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Pavel Valena <pvalena@redhat.com>
|
|
||||||
Date: Sat, 17 Aug 2024 01:43:50 +0200
|
|
||||||
Subject: [PATCH] feat(dracut-init.sh): give --force-add precedence over --omit
|
|
||||||
|
|
||||||
This gives precedence of force_add_dracutmodules to omit_dracutmodules,
|
|
||||||
as there is not other way to override omit_dracutmodules list, and users
|
|
||||||
would expect it to be overriden from command line.
|
|
||||||
|
|
||||||
Ref: https://github.com/dracut-ng/dracut-ng/pull/569
|
|
||||||
|
|
||||||
This way, `--add` retains it behaviour, and `--force-add` gains additional
|
|
||||||
functionality in non-hostonly mode. The module may still be skipped
|
|
||||||
if the module check returns 1, but it should throw error (as I'd expect
|
|
||||||
for `--force-add`).
|
|
||||||
|
|
||||||
Ref: https://issues.redhat.com/browse/RHEL-26114
|
|
||||||
|
|
||||||
(cherry picked from commit a669346f48cbb3278c51ba5e95b1b91f9bfdee0a)
|
|
||||||
|
|
||||||
Resolves: RHEL-26114
|
|
||||||
---
|
|
||||||
dracut-init.sh | 6 ++++--
|
|
||||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/dracut-init.sh b/dracut-init.sh
|
|
||||||
index fe1b1426..27abb07b 100644
|
|
||||||
--- a/dracut-init.sh
|
|
||||||
+++ b/dracut-init.sh
|
|
||||||
@@ -921,8 +921,10 @@ check_module() {
|
|
||||||
[[ $2 ]] || mods_checked_as_dep+=" $_mod "
|
|
||||||
|
|
||||||
if [[ " $omit_dracutmodules " == *\ $_mod\ * ]]; then
|
|
||||||
- ddebug "dracut module '$_mod' will not be installed, because it's in the list to be omitted!"
|
|
||||||
- return 1
|
|
||||||
+ if [[ " $force_add_dracutmodules " != *\ $_mod\ * ]]; then
|
|
||||||
+ ddebug "Module '$_mod' will not be installed, because it's in the list to be omitted!"
|
|
||||||
+ return 1
|
|
||||||
+ fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ " $dracutmodules $add_dracutmodules $force_add_dracutmodules" == *\ $_mod\ * ]]; then
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
||||||
@ -1,100 +0,0 @@
|
|||||||
From 1cf0db26e43fe4c6173acdb8047f16666ebf070a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Huaxin Lu <luhuaxin1@huawei.com>
|
|
||||||
Date: Thu, 20 Jun 2024 13:38:26 +0800
|
|
||||||
Subject: [PATCH] fix(dracut-install): copy xattr when use clone ioctl
|
|
||||||
|
|
||||||
When use clone ioctl to copy a file, the extended attributes of files are
|
|
||||||
missing, which is inconsistent with the result by using the cp command.
|
|
||||||
This commit add the process to copy extended attributes after clone_file().
|
|
||||||
|
|
||||||
Signed-off-by: Huaxin Lu <luhuaxin1@huawei.com>
|
|
||||||
|
|
||||||
Reference:https://github.com/dracut-ng/dracut-ng/pull/461/commits/1cf0db26e43fe4c6173acdb8047f16666ebf070a
|
|
||||||
Conflict:NA
|
|
||||||
---
|
|
||||||
src/install/dracut-install.c | 56 ++++++++++++++++++++++++++++++++++++
|
|
||||||
1 file changed, 56 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/install/dracut-install.c b/src/install/dracut-install.c
|
|
||||||
index 1862c599d..dd70382cb 100644
|
|
||||||
--- a/src/install/dracut-install.c
|
|
||||||
+++ b/src/install/dracut-install.c
|
|
||||||
@@ -42,6 +42,7 @@
|
|
||||||
#include <fts.h>
|
|
||||||
#include <regex.h>
|
|
||||||
#include <sys/utsname.h>
|
|
||||||
+#include <sys/xattr.h>
|
|
||||||
|
|
||||||
#include "log.h"
|
|
||||||
#include "hashmap.h"
|
|
||||||
@@ -292,6 +293,56 @@ static inline int clone_file(int dest_fd, int src_fd)
|
|
||||||
return ioctl(dest_fd, BTRFS_IOC_CLONE, src_fd);
|
|
||||||
}
|
|
||||||
|
|
||||||
+static int copy_xattr(int dest_fd, int src_fd)
|
|
||||||
+{
|
|
||||||
+ int ret = 0;
|
|
||||||
+ ssize_t name_len = 0, value_len = 0;
|
|
||||||
+ char *name_buf = NULL, *name = NULL, *value = NULL, *value_save = NULL;
|
|
||||||
+
|
|
||||||
+ name_len = flistxattr(src_fd, NULL, 0);
|
|
||||||
+ if (name_len < 0)
|
|
||||||
+ return -1;
|
|
||||||
+
|
|
||||||
+ name_buf = calloc(1, name_len + 1);
|
|
||||||
+ if (name_buf == NULL)
|
|
||||||
+ return -1;
|
|
||||||
+
|
|
||||||
+ name_len = flistxattr(src_fd, name_buf, name_len);
|
|
||||||
+ if (name_len < 0)
|
|
||||||
+ goto out;
|
|
||||||
+
|
|
||||||
+ for (name = name_buf; name != name_buf + name_len; name = strchr(name, '\0') + 1) {
|
|
||||||
+ value_len = fgetxattr(src_fd, name, NULL, 0);
|
|
||||||
+ if (value_len < 0) {
|
|
||||||
+ ret = -1;
|
|
||||||
+ continue;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ value_save = value;
|
|
||||||
+ value = realloc(value, value_len);
|
|
||||||
+ if (value == NULL) {
|
|
||||||
+ value = value_save;
|
|
||||||
+ ret = -1;
|
|
||||||
+ goto out;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ value_len = fgetxattr(src_fd, name, value, value_len);
|
|
||||||
+ if (value_len < 0) {
|
|
||||||
+ ret = -1;
|
|
||||||
+ continue;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ value_len = fsetxattr(dest_fd, name, value, value_len, 0);
|
|
||||||
+ if (value_len < 0)
|
|
||||||
+ ret = -1;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+out:
|
|
||||||
+ free(name_buf);
|
|
||||||
+ free(value);
|
|
||||||
+ return ret;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static bool use_clone = true;
|
|
||||||
|
|
||||||
static int cp(const char *src, const char *dst)
|
|
||||||
@@ -333,6 +384,11 @@ static int cp(const char *src, const char *dst)
|
|
||||||
log_info("Failed to chown %s: %m", dst);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (geteuid() == 0 && no_xattr == false) {
|
|
||||||
+ if (copy_xattr(dest_desc, source_desc) != 0)
|
|
||||||
+ log_error("Failed to copy xattr %s: %m", dst);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
tv[0].tv_sec = sb.st_atime;
|
|
||||||
tv[0].tv_usec = 0;
|
|
||||||
tv[1].tv_sec = sb.st_mtime;
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
@ -1,31 +0,0 @@
|
|||||||
From 5d2bda46f4e75e85445ee4d3bd3f68bf966287b9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ihno Krumreich <ihno@suse.com>
|
|
||||||
Date: Wed, 28 Feb 2024 08:24:35 +0100
|
|
||||||
Subject: [PATCH] fix(zfcp_rules): correct shellcheck regression when parsing
|
|
||||||
ccw args
|
|
||||||
|
|
||||||
Fixes 032ecd95c94b77f3f08237e0f765b355dacb9573
|
|
||||||
|
|
||||||
Conflict:NA
|
|
||||||
Reference:https://github.com/dracutdevs/dracut/commit/5d2bda46f4e75e85445ee4d3bd3f68bf966287b9
|
|
||||||
---
|
|
||||||
modules.d/95zfcp_rules/parse-zfcp.sh | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/95zfcp_rules/parse-zfcp.sh b/modules.d/95zfcp_rules/parse-zfcp.sh
|
|
||||||
index 5e7d9095..a474b81b 100755
|
|
||||||
--- a/modules.d/95zfcp_rules/parse-zfcp.sh
|
|
||||||
+++ b/modules.d/95zfcp_rules/parse-zfcp.sh
|
|
||||||
@@ -63,7 +63,8 @@ for zfcp_arg in $(getargs root=) $(getargs resume=); do
|
|
||||||
if [ -n "$ccw_arg" ]; then
|
|
||||||
OLDIFS="$IFS"
|
|
||||||
IFS="-"
|
|
||||||
- set -- "$ccw_arg"
|
|
||||||
+ # shellcheck disable=SC2086
|
|
||||||
+ set -- $ccw_arg
|
|
||||||
IFS="$OLDIFS"
|
|
||||||
_wwpn=${4%:*}
|
|
||||||
_lun=${4#*:}
|
|
||||||
--
|
|
||||||
2.33.0
|
|
||||||
|
|
||||||
23
dracut.spec
23
dracut.spec
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
Name: dracut
|
Name: dracut
|
||||||
Version: 059
|
Version: 059
|
||||||
Release: 11
|
Release: 6
|
||||||
|
|
||||||
Summary: Initramfs generator using udev
|
Summary: Initramfs generator using udev
|
||||||
|
|
||||||
@ -39,12 +39,6 @@ Patch11: backport-fix-fs-lib-remove-quoting-form-the-first-argument-of.patch
|
|||||||
Patch12: backport-feat-systemd-install-systemd-executor.patch
|
Patch12: backport-feat-systemd-install-systemd-executor.patch
|
||||||
|
|
||||||
Patch6000: backport-fix-dracut.sh-remove-microcode-check-based-on-CONFIG.patch
|
Patch6000: backport-fix-dracut.sh-remove-microcode-check-based-on-CONFIG.patch
|
||||||
Patch6001: backport-fix-zfcp_rules-correct-shellcheck-regression-when-pa.patch
|
|
||||||
Patch6003: backport-fix-dracut-install-copy-xattr-when-use-clone-ioctl.patch
|
|
||||||
Patch6004: fix-dracut-install-copy-mode-when-use-clone-ioctl.patch
|
|
||||||
Patch6005: backport-feat-dracut-init.sh-give-force-add-precedence-over-o.patch
|
|
||||||
|
|
||||||
Patch9000: remove-iscsi-related-code-since-it-is-no-longer-main.patch
|
|
||||||
|
|
||||||
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
|
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
|
||||||
Source2: openEuler.conf.example
|
Source2: openEuler.conf.example
|
||||||
@ -533,21 +527,6 @@ rm -f 51-dracut-rescue-postinst.sh
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Nov 25 2024 andy <liuyang01@kylinos.cn> - 059-11
|
|
||||||
- add backport-feat-dracut-init.sh-give-force-add-precedence-over-o.patch
|
|
||||||
|
|
||||||
* Fri Sep 6 2024 luhuaxin <luhuaxin1@huawei.com> - 059-10
|
|
||||||
- fix(dracut-install): copy mode when use clone ioctl
|
|
||||||
|
|
||||||
* Mon Aug 26 2024 yanshuai <yanshuai01@kylinos.cn> - 059-9
|
|
||||||
- remove iscsi-related code since it is no longer maintained by open-iscsi
|
|
||||||
|
|
||||||
* Thu Jul 11 2024 zhengxiaoxiao <zhengxiaoxiao2@huawei.com> - 059-8
|
|
||||||
- add backport-fix-dracut-install-copy-xattr-when-use-clone-ioctl.patch
|
|
||||||
|
|
||||||
* Thu Jun 13 2024 hongjinghao <hongjinghao@huawei.com> - 059-7
|
|
||||||
- backport update stream
|
|
||||||
|
|
||||||
* Thu Apr 18 2024 wangyuhang <wangyuhang27@huawei.com> - 059-6
|
* Thu Apr 18 2024 wangyuhang <wangyuhang27@huawei.com> - 059-6
|
||||||
- Backport patches to remove microcode check based on CONFIG_MICROCODE_[AMD|INTEL]
|
- Backport patches to remove microcode check based on CONFIG_MICROCODE_[AMD|INTEL]
|
||||||
|
|
||||||
|
|||||||
@ -1,31 +0,0 @@
|
|||||||
From a1c9480ac9791eb961507b44b7c0813a9ffd4ca4 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Huaxin Lu <luhuaxin1@huawei.com>
|
|
||||||
Date: Wed, 21 Aug 2024 14:51:53 +0800
|
|
||||||
Subject: [PATCH] fix(dracut-install): copy mode when use clone ioctl
|
|
||||||
|
|
||||||
When use clone ioctl to copy a file, the mode of files are missing,
|
|
||||||
which is inconsistent with the result by using the cp command.
|
|
||||||
This commit add the process to set mode after clone_file().
|
|
||||||
|
|
||||||
Signed-off-by: Huaxin Lu <luhuaxin1@huawei.com>
|
|
||||||
---
|
|
||||||
src/install/dracut-install.c | 3 +++
|
|
||||||
1 file changed, 3 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/install/dracut-install.c b/src/install/dracut-install.c
|
|
||||||
index 291c70a..47b799e 100644
|
|
||||||
--- a/src/install/dracut-install.c
|
|
||||||
+++ b/src/install/dracut-install.c
|
|
||||||
@@ -363,6 +363,9 @@ static int cp(const char *src, const char *dst)
|
|
||||||
log_info("Failed to chown %s: %m", dst);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (fchmod(dest_desc, sb.st_mode) != 0)
|
|
||||||
+ log_error("Failed to chown %s: %m", dst);
|
|
||||||
+
|
|
||||||
if (geteuid() == 0 && no_xattr == false) {
|
|
||||||
if (copy_xattr(dest_desc, source_desc) != 0)
|
|
||||||
log_error("Failed to copy xattr %s: %m", dst);
|
|
||||||
--
|
|
||||||
2.33.0
|
|
||||||
|
|
||||||
@ -1,129 +0,0 @@
|
|||||||
From 38a3ee547e93c0b11020818cc4a244f89d492031 Mon Sep 17 00:00:00 2001
|
|
||||||
From: luck <lucx_ii@163.com>
|
|
||||||
Date: Sun, 4 Dec 2022 16:00:32 +0800
|
|
||||||
Subject: [PATCH] remove iscsi-related code since it is no longer maintained by
|
|
||||||
open-iscsi
|
|
||||||
|
|
||||||
---
|
|
||||||
modules.d/95iscsi/cleanup-iscsi.sh | 3 ---
|
|
||||||
modules.d/95iscsi/iscsiroot.sh | 8 -------
|
|
||||||
modules.d/95iscsi/module-setup.sh | 29 +++--------------------
|
|
||||||
test/container/Dockerfile-OpenSuse-latest | 2 +-
|
|
||||||
4 files changed, 4 insertions(+), 38 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/95iscsi/cleanup-iscsi.sh b/modules.d/95iscsi/cleanup-iscsi.sh
|
|
||||||
index 8338503..13f4793 100755
|
|
||||||
--- a/modules.d/95iscsi/cleanup-iscsi.sh
|
|
||||||
+++ b/modules.d/95iscsi/cleanup-iscsi.sh
|
|
||||||
@@ -1,5 +1,2 @@
|
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
-if [ -z "${DRACUT_SYSTEMD}" ] && { [ -e /sys/module/bnx2i ] || [ -e /sys/module/qedi ]; }; then
|
|
||||||
- killproc iscsiuio
|
|
||||||
-fi
|
|
||||||
diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh
|
|
||||||
index b6af7f4..39c5f6d 100755
|
|
||||||
--- a/modules.d/95iscsi/iscsiroot.sh
|
|
||||||
+++ b/modules.d/95iscsi/iscsiroot.sh
|
|
||||||
@@ -36,14 +36,6 @@ iroot=${iroot#:}
|
|
||||||
# figured out a way how to check whether this is built-in or not
|
|
||||||
modprobe crc32c 2> /dev/null
|
|
||||||
|
|
||||||
-# start iscsiuio if needed
|
|
||||||
-if [ -z "${DRACUT_SYSTEMD}" ] \
|
|
||||||
- && { [ -e /sys/module/bnx2i ] || [ -e /sys/module/qedi ]; } \
|
|
||||||
- && ! [ -e /tmp/iscsiuio-started ]; then
|
|
||||||
- iscsiuio
|
|
||||||
- : > /tmp/iscsiuio-started
|
|
||||||
-fi
|
|
||||||
-
|
|
||||||
handle_firmware() {
|
|
||||||
local ifaces retry _res
|
|
||||||
|
|
||||||
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
|
|
||||||
index e7d74fe..dcb6eea 100755
|
|
||||||
--- a/modules.d/95iscsi/module-setup.sh
|
|
||||||
+++ b/modules.d/95iscsi/module-setup.sh
|
|
||||||
@@ -185,7 +185,6 @@ cmdline() {
|
|
||||||
|
|
||||||
# called by dracut
|
|
||||||
install() {
|
|
||||||
- inst_multiple -o iscsiuio
|
|
||||||
inst_libdir_file 'libgcc_s.so*'
|
|
||||||
inst_multiple umount iscsi-iname iscsiadm iscsid
|
|
||||||
inst_binary sort
|
|
||||||
@@ -193,10 +192,7 @@ install() {
|
|
||||||
inst_multiple -o \
|
|
||||||
"$systemdsystemunitdir"/iscsid.socket \
|
|
||||||
"$systemdsystemunitdir"/iscsid.service \
|
|
||||||
- "$systemdsystemunitdir"/iscsiuio.service \
|
|
||||||
- "$systemdsystemunitdir"/iscsiuio.socket \
|
|
||||||
- "$systemdsystemunitdir"/sockets.target.wants/iscsid.socket \
|
|
||||||
- "$systemdsystemunitdir"/sockets.target.wants/iscsiuio.socket
|
|
||||||
+ "$systemdsystemunitdir"/sockets.target.wants/iscsid.socket
|
|
||||||
|
|
||||||
if [[ $hostonly ]]; then
|
|
||||||
local -a _filenames
|
|
||||||
@@ -227,13 +223,10 @@ install() {
|
|
||||||
"$systemdsystemunitdir"/iscsi-init.service \
|
|
||||||
"$systemdsystemunitdir"/iscsid.service \
|
|
||||||
"$systemdsystemunitdir"/iscsid.socket \
|
|
||||||
- "$systemdsystemunitdir"/iscsiuio.service \
|
|
||||||
- "$systemdsystemunitdir"/iscsiuio.socket \
|
|
||||||
iscsiadm iscsid
|
|
||||||
|
|
||||||
for i in \
|
|
||||||
- iscsid.socket \
|
|
||||||
- iscsiuio.socket; do
|
|
||||||
+ iscsid.socket; do
|
|
||||||
$SYSTEMCTL -q --root "$initdir" enable "$i"
|
|
||||||
done
|
|
||||||
|
|
||||||
@@ -253,22 +246,6 @@ install() {
|
|
||||||
echo "Before=shutdown.target sockets.target"
|
|
||||||
} > "${initdir}/$systemdsystemunitdir/iscsid.socket.d/dracut.conf"
|
|
||||||
|
|
||||||
- mkdir -p "${initdir}/$systemdsystemunitdir/iscsiuio.service.d"
|
|
||||||
- {
|
|
||||||
- echo "[Unit]"
|
|
||||||
- echo "DefaultDependencies=no"
|
|
||||||
- echo "Conflicts=shutdown.target"
|
|
||||||
- echo "Before=shutdown.target"
|
|
||||||
- } > "${initdir}/$systemdsystemunitdir/iscsiuio.service.d/dracut.conf"
|
|
||||||
-
|
|
||||||
- mkdir -p "${initdir}/$systemdsystemunitdir/iscsiuio.socket.d"
|
|
||||||
- {
|
|
||||||
- echo "[Unit]"
|
|
||||||
- echo "DefaultDependencies=no"
|
|
||||||
- echo "Conflicts=shutdown.target"
|
|
||||||
- echo "Before=shutdown.target sockets.target"
|
|
||||||
- } > "${initdir}/$systemdsystemunitdir/iscsiuio.socket.d/dracut.conf"
|
|
||||||
-
|
|
||||||
# Fedora 34 iscsid requires iscsi-shutdown.service
|
|
||||||
# which would terminate all iSCSI connections on switch root
|
|
||||||
cat > "${initdir}/$systemdsystemunitdir/iscsi-shutdown.service" << EOF
|
|
||||||
@@ -277,7 +254,7 @@ Description=Dummy iscsi-shutdown.service for the initrd
|
|
||||||
Documentation=man:iscsid(8) man:iscsiadm(8)
|
|
||||||
DefaultDependencies=no
|
|
||||||
Conflicts=shutdown.target
|
|
||||||
-After=systemd-remount-fs.service network.target iscsid.service iscsiuio.service
|
|
||||||
+After=systemd-remount-fs.service network.target iscsid.service
|
|
||||||
Before=remote-fs-pre.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
diff --git a/test/container/Dockerfile-OpenSuse-latest b/test/container/Dockerfile-OpenSuse-latest
|
|
||||||
index 9007865..32dd8b1 100644
|
|
||||||
--- a/test/container/Dockerfile-OpenSuse-latest
|
|
||||||
+++ b/test/container/Dockerfile-OpenSuse-latest
|
|
||||||
@@ -13,7 +13,7 @@ RUN dnf -y install --setopt=install_weak_deps=False \
|
|
||||||
strace libkmod-devel gcc bzip2 xz tar wget rpm-build make git bash-completion \
|
|
||||||
sudo kernel dhcp-client qemu-kvm /usr/bin/qemu-system-$(uname -m) e2fsprogs \
|
|
||||||
tcpdump iproute iputils kbd NetworkManager btrfsprogs tgt dbus-broker \
|
|
||||||
- iscsiuio open-iscsi which ShellCheck shfmt procps pigz parted squashfs ntfsprogs \
|
|
||||||
+ open-iscsi which ShellCheck shfmt procps pigz parted squashfs ntfsprogs \
|
|
||||||
&& dnf -y remove dracut && dnf -y update && dnf clean all
|
|
||||||
|
|
||||||
# Set default command
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user