diff options
| author | Simon Rettberg | 2025-11-21 17:10:28 +0100 |
|---|---|---|
| committer | Simon Rettberg | 2025-11-21 17:10:28 +0100 |
| commit | 97418ba5d3882eb7b1fdf40a048ddb9644b28a16 (patch) | |
| tree | b1aecc58c3b6499a7d52421146b5597791d50269 | |
| parent | Update dracut to 109 (diff) | |
| download | systemd-init-97418ba5d3882eb7b1fdf40a048ddb9644b28a16.tar.gz systemd-init-97418ba5d3882eb7b1fdf40a048ddb9644b28a16.tar.xz systemd-init-97418ba5d3882eb7b1fdf40a048ddb9644b28a16.zip | |
Try to fix cp over dangling symlink
| -rwxr-xr-x | build-initramfs.sh | 6 | ||||
| -rw-r--r-- | patches/dracut/dracut-install-ash.patch | 11 |
2 files changed, 10 insertions, 7 deletions
diff --git a/build-initramfs.sh b/build-initramfs.sh index 2934b079..c2c9c9a1 100755 --- a/build-initramfs.sh +++ b/build-initramfs.sh @@ -33,13 +33,7 @@ all_microcode=no declare -rg _repo_dir="${_root_dir}/systemd-init" declare -rg _dracut_dir="${_root_dir}/dracut" -# Autodetect the kmod version present on the system to decide which dracut version to get -# * v59 requires kmod >= 23 (Available in Ubuntu 18.04) -# * v46 works with kmod == 20 (CentOS 7.5 only provides kmod v20) declare -g _dracut_version="109" -if [ "$(pkg-config --modversion libkmod)" -lt 23 ]; then - _dracut_version="046" -fi declare -A core_repo=( [handler]="git" diff --git a/patches/dracut/dracut-install-ash.patch b/patches/dracut/dracut-install-ash.patch index 8c9c75ba..5cae3d9b 100644 --- a/patches/dracut/dracut-install-ash.patch +++ b/patches/dracut/dracut-install-ash.patch @@ -1,7 +1,16 @@ diff --git a/src/install/dracut-install.c b/src/install/dracut-install.c -index b1b2391b..ce58da36 100644 +index b1b2391b..6cee3f8e 100644 --- a/src/install/dracut-install.c +++ b/src/install/dracut-install.c +@@ -440,7 +440,7 @@ normal_copy: + const char *preservation = (geteuid() == 0 + && no_xattr == false) ? "--preserve=mode,xattr,timestamps,ownership" : "--preserve=mode,timestamps,ownership"; + if (pid == 0) { +- execlp("cp", "cp", "--reflink=auto", "--sparse=auto", preservation, "-fL", src, dst, NULL); ++ execlp("cp", "cp", "--remove-destination", "--reflink=auto", "--sparse=auto", preservation, "-fL", src, dst, NULL); + _exit(errno == ENOENT ? 127 : 126); + } + @@ -1203,6 +1203,8 @@ static int resolve_deps(const char *src, Hashmap *pdeps) char *p, *q; for (p = &shebang[2]; *p && isspace(*p); p++) ; |
