diff --git a/usr/lib/archboot/container.sh b/usr/lib/archboot/container.sh index 0154049af..904def944 100644 --- a/usr/lib/archboot/container.sh +++ b/usr/lib/archboot/container.sh @@ -199,14 +199,14 @@ _set_hostname() { # patch mkinitcpio to preserve permissions and use bsdcpio # Result is this code: -# find . | bsdcpio --quiet -o -H newc | +# find . | cpio --reproducible --quiet -o -H newc | # $compress "${COMPRESSION_OPTIONS[@]}" > "$compressout") # pipeprogs=("find" "bsdcpio" "$compress") _fix_initramfs_permissions() { echo "Preserving permissions and bsdcpio usage in mkinitcpio run..." - sed -i -e 's#find . -mindepth 1 -printf .*#find . | LANG=C bsdcpio --quiet -o -H newc |#g' "${1}"/usr/bin/mkinitcpio + sed -i -e 's#find . -mindepth 1 -printf .*#find . -mindepth 1 | cpio --reproducible --quiet -o -H newc |#g' "${1}"/usr/bin/mkinitcpio sed -i -e '/sort -z |/d' "${1}"/usr/bin/mkinitcpio sed -i -e '/LANG=C bsdtar .*/d' "${1}"/usr/bin/mkinitcpio - sed -i -e 's#pipeprogs=.*#pipeprogs=\("find" "bsdcpio" "$compress"\)#g' "${1}"/usr/bin/mkinitcpio + sed -i -e 's#pipeprogs=.*#pipeprogs=\("find" "cpio" "$compress"\)#g' "${1}"/usr/bin/mkinitcpio } # vim: set ft=sh ts=4 sw=4 et: diff --git a/usr/lib/archboot/update-installer/update-installer.sh b/usr/lib/archboot/update-installer/update-installer.sh index 824094953..27899504f 100644 --- a/usr/lib/archboot/update-installer/update-installer.sh +++ b/usr/lib/archboot/update-installer/update-installer.sh @@ -240,7 +240,7 @@ _create_initramfs() { # https://www.kernel.org/doc/Documentation/filesystems/ramfs-rootfs-initramfs.txt # compress image with zstd cd "${_W_DIR}"/tmp || exit 1 - find . | LANG=C bsdcpio --quiet -o -H newc | zstd --rm -T0> ${_RAM}/${_INITRD} & + find . -mindepth 1 | cpio --reproducible --quiet -o -H newc | zstd --rm -T0> ${_RAM}/${_INITRD} & sleep 2 while pgrep -x zstd &>/dev/null; do _clean_kernel_cache diff --git a/usr/lib/initcpio/install/archboot_base b/usr/lib/initcpio/install/archboot_base index 0e987bafa..82fbe76ce 100644 --- a/usr/lib/initcpio/install/archboot_base +++ b/usr/lib/initcpio/install/archboot_base @@ -7,7 +7,7 @@ build () map add_binary head id cksum tail test uptime w who whoami xargs \ swapon uniq seq fdisk sfdisk cfdisk parted free less \ chgrp chown dialog dmesg egrep fgrep stty sync hdparm \ - dirname chroot expr bzip2 su sdparm tput \ + dirname chroot expr bzip2 su sdparm tput bsdtar bsdcpio \ losetup mkfifo mknod readlink lzmadec lzop xz last wall mesg utmpdump \ xzdec switch_root pivot_root chcpu ctrlaltdel gdisk sgdisk cgdisk fixparts findmnt \ lsfd lsblk swaplabel cal chrt col colcrt colrm column fallocate flock getopt \ diff --git a/usr/lib/initcpio/install/archboot_base_cleanup b/usr/lib/initcpio/install/archboot_base_cleanup index 388919211..9c3bfc20c 100644 --- a/usr/lib/initcpio/install/archboot_base_cleanup +++ b/usr/lib/initcpio/install/archboot_base_cleanup @@ -6,7 +6,7 @@ build () { apps="head id cksum tail test uptime w who whoami xargs \ swapon uniq seq fdisk sfdisk cfdisk parted free less \ - chgrp dialog dmesg egrep fgrep stty sync hdparm \ + chgrp dialog dmesg egrep fgrep stty sync hdparm bsdtar bsdcpio\ dirname chroot expr bunzip2 bzcat bzip2 su sdparm tput \ losetup mkfifo mknod lzmadec lzop lzma lzcat unlzma unxz xzcat \ lastb last wall mesg utmpdump xzdec switch_root pivot_root chcpu ctrlaltdel \ diff --git a/usr/lib/initcpio/install/archboot_base_common b/usr/lib/initcpio/install/archboot_base_common index e6544771f..7d0c3744e 100644 --- a/usr/lib/initcpio/install/archboot_base_common +++ b/usr/lib/initcpio/install/archboot_base_common @@ -16,10 +16,10 @@ build () ### add basic apps map add_binary init agetty basename mount umount clear env printf gawk tty bash rbash \ partprobe cp dir du ls mv rm sed grep kill killall more ps pwd rmdir true cat \ - mkdir echo false sleep kmod pidof touch chmod find wc uname bsdtar yes awk halt \ + mkdir echo false sleep kmod pidof touch chmod find wc uname yes awk halt \ shutdown reboot poweroff insmod modprobe sh dd sort zstd date tee mktemp \ install pgrep mkfs.btrfs rmmod mountpoint gzip ldconfig nscd ln top df cut \ - stat tr passwd od tar bsdcpio + stat tr passwd od tar cpio ### add nano add_binary nano