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