OSDN Git Service

[fix] : copy airootfs (archiso 45)
authorhayao <shun819.mail@gmail.com>
Wed, 29 Jul 2020 09:23:41 +0000 (18:23 +0900)
committerhayao <shun819.mail@gmail.com>
Wed, 29 Jul 2020 09:42:30 +0000 (18:42 +0900)
Fixing ownership in airootfs customization

Fixing wrong ownership of files when copying overlay modifications from
the config's airootfs directory to the working directory in
make_customize_airootfs() by using the cp flag
'--no-preserve=ownership'.

Thanks to Marcos Mello and Francois Dupoux of sysresccd
(https://gitlab.com/fdupoux/sysresccd-src) for making this fix available.

build.sh

index a7d7af0..8f9b90e 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -787,7 +787,7 @@ make_customize_airootfs() {
         for i in "${@}"; do
             local _dir="${i%/}"
             if [[ -d "${_dir}" ]]; then
-                cp -af "${_dir}"/* "${work_dir}/${arch}/airootfs"
+                cp -af --no-preserve=ownership "${_dir}"/* "${work_dir}/${arch}/airootfs"
             fi
         done
     }