diff options
Diffstat (limited to 'repo/util/dracut')
-rw-r--r-- | repo/util/dracut/dracut.xibuild | 43 | ||||
-rw-r--r-- | repo/util/dracut/fix-sbase-coreutils.patch | 41 |
2 files changed, 84 insertions, 0 deletions
diff --git a/repo/util/dracut/dracut.xibuild b/repo/util/dracut/dracut.xibuild new file mode 100644 index 0000000..3bc9e0a --- /dev/null +++ b/repo/util/dracut/dracut.xibuild @@ -0,0 +1,43 @@ +#!/bin/sh + +MAKEDEPS="make asciidoc musl-fts" +DEPS="bash sbase cpio findutils grep gzip kmod pkgconf procps-ng sed util-linux xz" + +DESC="An initramfs infastructure aimin gto have as little possible hardcoded into the initramfs" + +PKG_VER=055 +SOURCE=https://mirrors.edge.kernel.org/pub/linux/utils/boot/dracut/dracut-$PKG_VER.tar.xz +ADDITIONAL=" + fix-sbase-coreutils.patch +" + +prepare () { + apply_patches + # make all this into a patch + find ./ -name "*.sh" | xargs sed -i "s/ln -sfn/ln -sf/g" + find ./ -name "*.sh" | xargs sed -i "s/ln -sfr/ln -sf/g" + find ./ -name "*.sh" | xargs sed -i "s/sort -Vu/sort -u/g" + find ./ -name "*.sh" | xargs sed -i "s/realpath -e/realpath /g" + find ./ -name "*.sh" | xargs sed -i "s/cp --reflink=auto/cp /g" + find ./ -name "*.sh" | xargs sed -i "s/cp -axT/cp -a/g" + find ./ -name "*.sh" | xargs sed -i "s/cp -ax/cp -a/g" + find ./ -name "*.sh" | xargs sed -i "s/cp -a -t/cp -a/g" + find ./ -name "*.sh" | xargs sed -i "s/cp -af \. -t/cp -af . /g" + find ./ -name "*.sh" | xargs sed -i "s/cp -a -l/cp -a/g" + find ./ -name "*.sh" | xargs sed -i "s/cp -a --/cp -a/g" + find ./ -name "*.sh" | xargs sed -i "s/cp -f --/cp -f/g" + find ./ -name "*.sh" | xargs sed -i "s/cp --sparse=auto --preserve=.* -dfr/cp -fr/g" + find ./ -name "*.sh" | xargs sed -i "s/\$CP_HARDLINK --backup --suffix=.usrmove~//g" + find ./ -name "*.sh" | xargs sed -i "s/find . -print0 | sort -z/find . -print0/g" + +} + +build () { + ./configure --prefix=/usr + make sysconfdir=/etc +} + +package () { + make DESTDIR="$PKG_DEST" sysconfdir=/etc install +} + diff --git a/repo/util/dracut/fix-sbase-coreutils.patch b/repo/util/dracut/fix-sbase-coreutils.patch new file mode 100644 index 0000000..0ff740f --- /dev/null +++ b/repo/util/dracut/fix-sbase-coreutils.patch @@ -0,0 +1,41 @@ +diff -rNu a/Makefile b/Makefile +--- a/Makefile 2021-05-27 13:34:19.000000000 +0100 ++++ b/Makefile 2022-03-09 16:32:58.455844674 +0000 +@@ -158,7 +158,7 @@ + ln -fs dracut-functions.sh $(DESTDIR)$(pkglibdir)/dracut-functions + install -m 0755 dracut-logger.sh $(DESTDIR)$(pkglibdir)/dracut-logger.sh + install -m 0755 dracut-initramfs-restore.sh $(DESTDIR)$(pkglibdir)/dracut-initramfs-restore +- cp -arx modules.d $(DESTDIR)$(pkglibdir) ++ cp -ar modules.d $(DESTDIR)$(pkglibdir) + ifneq ($(enable_documentation),no) + for i in $(man1pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man1/$${i##*/}; done + for i in $(man5pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man5/$${i##*/}; done +--- a/src/install/dracut-install.c 2021-05-27 13:34:19.000000000 +0100 ++++ b/src/install/dracut-install.c 2022-03-29 21:40:51.220267462 +0100 +@@ -324,10 +324,10 @@ + pid = fork(); + if (pid == 0) { + if (geteuid() == 0 && no_xattr == false) +- execlp("cp", "cp", "--reflink=auto", "--sparse=auto", "--preserve=mode,xattr,timestamps", "-fL", ++ execlp("cp", "cp", "-fL", + src, dst, NULL); + else +- execlp("cp", "cp", "--reflink=auto", "--sparse=auto", "--preserve=mode,timestamps", "-fL", src, ++ execlp("cp", "cp", "-fL", src, + dst, NULL); + _exit(EXIT_FAILURE); + } +@@ -336,10 +336,10 @@ + if (errno != EINTR) { + ret = -1; + if (geteuid() == 0 && no_xattr == false) +- log_error("Failed: cp --reflink=auto --sparse=auto --preserve=mode,xattr,timestamps -fL %s %s", ++ log_error("Failed: cp -fL %s %s", + src, dst); + else +- log_error("Failed: cp --reflink=auto --sparse=auto --preserve=mode,timestamps -fL %s %s", ++ log_error("Failed: cp -fL %s %s", + src, dst); + break; + } + |