Preserve timestamps
This commit is contained in:
parent
3f7dd00fcb
commit
037e93fe37
|
@ -137,13 +137,13 @@ do
|
|||
then
|
||||
case "${LB_DEBIAN_INSTALLER}" in
|
||||
cdrom)
|
||||
cp "${LOCATION}/${LB_PARENT_DISTRIBUTION_BINARY}/${LB_ARCHITECTURE}_udeb_include" binary/.disk/udeb_include
|
||||
cp -a "${LOCATION}/${LB_PARENT_DISTRIBUTION_BINARY}/${LB_ARCHITECTURE}_udeb_include" binary/.disk/udeb_include
|
||||
;;
|
||||
netinst|live)
|
||||
cp "${LOCATION}/${LB_PARENT_DISTRIBUTION_BINARY}/${LB_ARCHITECTURE}_netinst_udeb_include" binary/.disk/udeb_include
|
||||
cp -a "${LOCATION}/${LB_PARENT_DISTRIBUTION_BINARY}/${LB_ARCHITECTURE}_netinst_udeb_include" binary/.disk/udeb_include
|
||||
;;
|
||||
businesscard)
|
||||
cp "${LOCATION}/${LB_PARENT_DISTRIBUTION_BINARY}/${LB_ARCHITECTURE}_businesscard_udeb_include" binary/.disk/udeb_include
|
||||
cp -a "${LOCATION}/${LB_PARENT_DISTRIBUTION_BINARY}/${LB_ARCHITECTURE}_businesscard_udeb_include" binary/.disk/udeb_include
|
||||
;;
|
||||
none|netboot)
|
||||
;;
|
||||
|
|
|
@ -165,8 +165,8 @@ gen_efi_boot_img(){
|
|||
local outdir="grub-efi-temp-\${platform}"
|
||||
"\${LIVE_BUILD_PATH}/efi-image" "${_CHROOT_DIR}/\$outdir" "\$platform" "\$efi_name" "\$netboot_prefix"
|
||||
mkdir -p ${_CHROOT_DIR}/grub-efi-temp/EFI/boot
|
||||
mcopy -n -i ${_CHROOT_DIR}/\$outdir/efi.img '::efi/boot/boot*.efi' ${_CHROOT_DIR}/grub-efi-temp/EFI/boot
|
||||
cp -r "${_CHROOT_DIR}"/\$outdir/* "${_CHROOT_DIR}/grub-efi-temp/"
|
||||
mcopy -m -n -i ${_CHROOT_DIR}/\$outdir/efi.img '::efi/boot/boot*.efi' ${_CHROOT_DIR}/grub-efi-temp/EFI/boot
|
||||
cp -a "${_CHROOT_DIR}"/\$outdir/* "${_CHROOT_DIR}/grub-efi-temp/"
|
||||
|
||||
# Secure Boot support:
|
||||
# - create the EFI directory in the ESP with uppercase letters to make
|
||||
|
@ -188,9 +188,9 @@ gen_efi_boot_img(){
|
|||
if [ -r ${_CHROOT_DIR}/usr/lib/grub/\$platform-signed/gcd\$efi_name.efi.signed -a \
|
||||
-r ${_CHROOT_DIR}/usr/lib/shim/shim\$efi_name.efi.signed -a \
|
||||
"${LB_UEFI_SECURE_BOOT}" != "disable" ]; then
|
||||
cp ${_CHROOT_DIR}/usr/lib/grub/\$platform-signed/gcd\$efi_name.efi.signed \
|
||||
cp -a ${_CHROOT_DIR}/usr/lib/grub/\$platform-signed/gcd\$efi_name.efi.signed \
|
||||
${_CHROOT_DIR}/grub-efi-temp/EFI/boot/grub\$efi_name.efi
|
||||
cp ${_CHROOT_DIR}/usr/lib/shim/shim\$efi_name.efi.signed \
|
||||
cp -a ${_CHROOT_DIR}/usr/lib/shim/shim\$efi_name.efi.signed \
|
||||
${_CHROOT_DIR}/grub-efi-temp/EFI/boot/boot\$efi_name.efi
|
||||
fi
|
||||
}
|
||||
|
@ -259,12 +259,12 @@ rm -f ${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img
|
|||
mkfs.msdos -C "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" \$blocks >/dev/null
|
||||
mmd -i "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" ::EFI
|
||||
mmd -i "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" ::EFI/boot
|
||||
mcopy -o -i "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" ${_CHROOT_DIR}/grub-efi-temp/EFI/boot/*.efi \
|
||||
mcopy -m -o -i "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" ${_CHROOT_DIR}/grub-efi-temp/EFI/boot/*.efi \
|
||||
"::EFI/boot"
|
||||
|
||||
mmd -i "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" ::boot
|
||||
mmd -i "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" ::boot/grub
|
||||
mcopy -o -i "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" ${_CHROOT_DIR}/grub-efi-temp-cfg/grub.cfg \
|
||||
mcopy -m -o -i "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" ${_CHROOT_DIR}/grub-efi-temp-cfg/grub.cfg \
|
||||
"::boot/grub"
|
||||
END
|
||||
|
||||
|
@ -294,7 +294,7 @@ rm -f chroot/grub-efi-temp/bootnetaa64.efi
|
|||
rm -f chroot/grub-efi-temp/bootnetarm.efi
|
||||
|
||||
mkdir -p binary
|
||||
cp -r chroot/grub-efi-temp/* binary/
|
||||
cp -a chroot/grub-efi-temp/* binary/
|
||||
rm -rf chroot/grub-efi-temp-x86_64-efi
|
||||
rm -rf chroot/grub-efi-temp-i386-efi
|
||||
rm -rf chroot/grub-efi-temp-arm64-efi
|
||||
|
|
|
@ -60,8 +60,10 @@ case "${LB_ARCHITECTURE}" in
|
|||
|
||||
# Copying loadlin
|
||||
mkdir -p binary/tools
|
||||
gunzip -c "${_PREFIX}/usr/lib/loadlin/loadlin.exe.gz" > binary/tools/loadlin.exe
|
||||
gunzip -c "${_PREFIX}/usr/share/doc/loadlin/manual.txt.gz" > binary/tools/loadlin.txt
|
||||
cp -a "${_PREFIX}/usr/lib/loadlin/loadlin.exe.gz" binary/tools
|
||||
cp -a "${_PREFIX}/usr/share/doc/loadlin/manual.txt.gz" binary/tools/loadlin.txt.gz
|
||||
gunzip binary/tools/loadlin.exe.gz
|
||||
gunzip binary/tools/loadlin.txt.gz
|
||||
|
||||
# Saving cache
|
||||
Save_package_cache binary
|
||||
|
|
|
@ -50,13 +50,17 @@ case "${LB_INITRAMFS}" in
|
|||
esac
|
||||
|
||||
# Add filesystem.packages
|
||||
cp chroot.packages.live "binary/${INITFS}/filesystem.${SUFFIX}"
|
||||
echo "$(diff chroot.packages.live chroot.packages.install | awk '/^< / { print $2 }')" \
|
||||
cp -a chroot.packages.live "binary/${INITFS}/filesystem.${SUFFIX}"
|
||||
diff chroot.packages.live chroot.packages.install | awk '/^< / { print $2 }' \
|
||||
> "binary/${INITFS}/filesystem.${SUFFIX}-remove"
|
||||
if [ ! -s "binary/${INITFS}/filesystem.${SUFFIX}-remove" ]
|
||||
then
|
||||
rm "binary/${INITFS}/filesystem.${SUFFIX}-remove"
|
||||
fi
|
||||
|
||||
cp chroot.packages.live ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.packages
|
||||
cp -a chroot.packages.live ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.packages
|
||||
|
||||
cp chroot.files ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.files
|
||||
cp -a chroot.files ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.files
|
||||
|
||||
# Creating stage file
|
||||
Create_stagefile
|
||||
|
|
|
@ -89,11 +89,11 @@ mkdir -p "${DESTDIR}"
|
|||
# Installing memtest
|
||||
case "${LB_BUILD_WITH_CHROOT}" in
|
||||
true)
|
||||
cp chroot/boot/${LB_MEMTEST}.bin "${DESTDIR}"/memtest
|
||||
cp -a chroot/boot/${LB_MEMTEST}.bin "${DESTDIR}"/memtest
|
||||
;;
|
||||
|
||||
false)
|
||||
cp /boot/${LB_MEMTEST}.bin "${DESTDIR}"/memtest
|
||||
cp -a /boot/${LB_MEMTEST}.bin "${DESTDIR}"/memtest
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -278,11 +278,11 @@ case "${LB_CHROOT_FILESYSTEM}" in
|
|||
|
||||
case "${LB_BUILD_WITH_CHROOT}" in
|
||||
true)
|
||||
cp config/rootfs/squashfs.sort chroot
|
||||
cp -a config/rootfs/squashfs.sort chroot
|
||||
;;
|
||||
|
||||
false)
|
||||
cp config/rootfs/squashfs.sort .
|
||||
cp -a config/rootfs/squashfs.sort .
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
@ -304,7 +304,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
|
|||
true)
|
||||
if [ -e config/rootfs/excludes ]
|
||||
then
|
||||
cp config/rootfs/excludes chroot/excludes
|
||||
cp -a config/rootfs/excludes chroot/excludes
|
||||
|
||||
MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -wildcards -ef /excludes"
|
||||
fi
|
||||
|
|
|
@ -53,9 +53,9 @@ case "${LB_ARCHITECTURE}" in
|
|||
if [ "${LB_BUILD_WITH_CHROOT}" = "true" ]
|
||||
then
|
||||
# Copying win32-loader
|
||||
cp -r chroot/usr/share/win32/* binary
|
||||
cp -a chroot/usr/share/win32/* binary
|
||||
else
|
||||
cp -r usr/share/win32/* binary
|
||||
cp -a usr/share/win32/* binary
|
||||
fi
|
||||
|
||||
mv binary/win32-loader.exe binary/setup.exe
|
||||
|
|
|
@ -78,10 +78,10 @@ mkfs.msdos -C "$outdir/efi.img" \
|
|||
/ 32 * 32 ))
|
||||
mmd -i "$outdir/efi.img" ::efi
|
||||
mmd -i "$outdir/efi.img" ::efi/boot
|
||||
mcopy -i "$outdir/efi.img" "$workdir/boot$efi_name.efi" \
|
||||
mcopy -m -i "$outdir/efi.img" "$workdir/boot$efi_name.efi" \
|
||||
"::efi/boot/boot$efi_name.efi"
|
||||
|
||||
grub-cpmodules "$outdir" "$platform"
|
||||
cp /usr/share/grub/unicode.pf2 "$outdir/boot/grub/"
|
||||
cp -a /usr/share/grub/unicode.pf2 "$outdir/boot/grub/"
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -178,7 +178,7 @@ Install_file() {
|
|||
mkdir -p "${TARGET}"/"${LETTER}"/"${SOURCE}"
|
||||
|
||||
# Move files
|
||||
cp "${FILE}" "${TARGET}"/"${LETTER}"/"${SOURCE}"
|
||||
cp -a "${FILE}" "${TARGET}"/"${LETTER}"/"${SOURCE}"
|
||||
}
|
||||
|
||||
# Set absolute directory for caching; we require it when we call Download_file
|
||||
|
@ -215,7 +215,7 @@ Download_file () {
|
|||
CP_OPTIONS="-l"
|
||||
fi
|
||||
|
||||
cp -f ${CP_OPTIONS} -- "${_LB_CACHE_FILE}" "${_LB_TARGET}"
|
||||
cp -a -f ${CP_OPTIONS} -- "${_LB_CACHE_FILE}" "${_LB_TARGET}"
|
||||
}
|
||||
|
||||
VMLINUZ_DI="vmlinuz"
|
||||
|
@ -550,7 +550,7 @@ EOF
|
|||
# Copy from cache if available, otherwise download
|
||||
if [ -f "${UDEB_CACHE_DIR}/${_UDEB_FILENAME}" ]; then
|
||||
Echo_debug "Copying %s from cache" "${UDEB}"
|
||||
cp "${UDEB_CACHE_DIR}/${_UDEB_FILENAME}" ./
|
||||
cp -a "${UDEB_CACHE_DIR}/${_UDEB_FILENAME}" ./
|
||||
else
|
||||
Echo_debug "Downloading %s" "${UDEB}"
|
||||
wget ${WGET_OPTIONS} "${LB_PARENT_MIRROR_CHROOT}/${UDEB}"
|
||||
|
@ -566,7 +566,7 @@ EOF
|
|||
# Copy from cache if available, otherwise download
|
||||
if [ -f "${UDEB_CACHE_DIR}/${_UDEB_FILENAME}" ]; then
|
||||
Echo_debug "Copying %s from cache" "${UDEB}"
|
||||
cp "${UDEB_CACHE_DIR}/${_UDEB_FILENAME}" ./
|
||||
cp -a "${UDEB_CACHE_DIR}/${_UDEB_FILENAME}" ./
|
||||
else
|
||||
Echo_debug "Downloading %s" "${UDEB}"
|
||||
wget ${WGET_OPTIONS} "${LB_MIRROR_CHROOT}/${UDEB}"
|
||||
|
@ -578,7 +578,7 @@ EOF
|
|||
Echo_debug "Refreshing udeb cache"
|
||||
rm -rf "${UDEB_CACHE_DIR}"
|
||||
mkdir -p "${UDEB_CACHE_DIR}"
|
||||
cp *.udeb "${UDEB_CACHE_DIR}"
|
||||
cp -a *.udeb "${UDEB_CACHE_DIR}"
|
||||
|
||||
Echo_debug "Including local udebs"
|
||||
|
||||
|
|
Loading…
Reference in New Issue