Fix the mkarchiso script's cp command to offset the change in GNU Coreutils version 9.2

The Problem

A recent change in GNU Coreutils breaks any ArchISO configuration where users have custom .bashrc or .zshrc files. This causes mkarchiso to exit with failure while building an ISO.

The Cause

GNU Coreutils recently changed the behavior of cp in version 9.2 such the -n (or --no-clobber) option now returns a failure exit status. They document --update=none to be equivalent to the --no-clobber behavior from before coreutils 9.2. Reference: https://bugs.gnu.org/62572 .

mkarchiso is set to exit on failure, so it fails in _make_customize_airootfs while copying any custom .bashrc or .zshrc files from airootfs skel or home directories (because at least one package, like grml-zsh-config, which is included in the releng configuration by default, also has conflicting shell configuration file(s)).

The Fix

To restore the previously correct behavior of copy, make the below changes in archiso/mkarchiso:

From:

cp -dnRT --preserve=mode,timestamps,links -- "${pacstrap_dir}/etc/skel/." "${pacstrap_dir}${passwd[5]}"

To:

cp -dRT --update=none --preserve=mode,timestamps,links -- "${pacstrap_dir}/etc/skel/." "${pacstrap_dir}${passwd[5]}"
Edited by shivanandvp P