From 0d55c8c013b2ced916bf5355de227341a87e09dd Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Sun, 4 Dec 2022 09:05:22 +0100 Subject: [PATCH] update patch --- usr/lib/initcpio/install/archboot_filesystems | 2 +- .../archboot/patches/33-initcpio.functions.fixed | 13 +++---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/usr/lib/initcpio/install/archboot_filesystems b/usr/lib/initcpio/install/archboot_filesystems index 0188475f2..12f8ff987 100644 --- a/usr/lib/initcpio/install/archboot_filesystems +++ b/usr/lib/initcpio/install/archboot_filesystems @@ -22,7 +22,7 @@ build () xfs_scrub xfs_scrub_all xfs_spaceman compile_et mk_cmds fsck.xfs xfs_admin xfs_bmap xfs_freeze \ xfs_info xfs_metadump xfs_mkfile xfs_ncheck gpart map add_file "/etc/nilfs_cleanerd.conf" "/etc/nvme/discovery.conf" - map add_full_dir "/etc/cifs-utils" "etc/request-key.d" + map add_full_dir "/etc/cifs-utils" "/etc/request-key.d" # fix licenses add_file "/usr/share/licenses/e2fsprogs/MIT-LICENSE" } diff --git a/usr/share/archboot/patches/33-initcpio.functions.fixed b/usr/share/archboot/patches/33-initcpio.functions.fixed index 280e086b7..e5b6c7d6e 100644 --- a/usr/share/archboot/patches/33-initcpio.functions.fixed +++ b/usr/share/archboot/patches/33-initcpio.functions.fixed @@ -633,7 +633,7 @@ add_file() { (( $# )) || return 1 # determine source and destination - local src=$1 dest=${2:-$1} mode=$3 srcrealpath + local src="$1" dest="${2:-$1}" mode="$3" srcrealpath if [[ ! -f $src ]]; then error "file not found: \`%s'" "$src" @@ -650,19 +650,12 @@ add_file() { # add the file srcrealpath="$(realpath -- "$src")" add_file "$srcrealpath" "$srcrealpath" "$mode" - [[ -d "${BUILDROOT}${dest%/*}" ]] || add_dir "${dest%/*}" # create the symlink add_symlink "$dest" "$src" else + add_dir "${dest%/*}" if [[ -z "$mode" ]]; then - # check if destination is same - if [[ "$src" == "$dest" ]]; then - command cp --preserve=mode,ownership --parents "$src" "$BUILDROOT" - else - # cp cannot handle mkdir :( - [[ -d "${BUILDROOT}${dest%/*}" ]] || add_dir "${dest%/*}" - command cp --preserve=mode,ownership "$src" "${BUILDROOT}${dest}" - fi + command cp --preserve=mode,ownership "$src" "${BUILDROOT}${dest}" else command install -Dm"$mode" "$src" "${BUILDROOT}${dest}" fi