mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
replace find with faster fd call
This commit is contained in:
parent
44f2dfe015
commit
a945ae0bf3
4 changed files with 9 additions and 9 deletions
|
@ -249,9 +249,9 @@ _create_cpio() {
|
|||
echo "Creating zstd compressed image..."
|
||||
pushd "${_ROOTFS}" >"${_NO_LOG}" || return
|
||||
# Reproducibility: set all timestamps to 0
|
||||
find . -mindepth 1 -execdir touch -hcd "@0" "{}" +
|
||||
fd . -u --min-depth 1 -X touch -hcd "@0"
|
||||
# use zstd only it has best compression and decompression
|
||||
find . -mindepth 1 -printf '%P\0' | sort -z |
|
||||
fd . -u --min-depth 1 -0 | sort -z |
|
||||
LANG=C bsdtar --null -cnf - -T - |
|
||||
LANG=C bsdtar --null -cf - --format=newc @- |
|
||||
zstd -T0 -19 > "${_GENERATE_IMAGE}" || _abort "Image creation failed!"
|
||||
|
|
|
@ -178,7 +178,7 @@ _prepare_background() {
|
|||
_reproducibility() {
|
||||
# Reproducibility: set all timestamps to 0
|
||||
# from /usr/bin/mkinitcpio
|
||||
find "${_ISODIR}" -mindepth 1 -execdir touch -hcd "@0" "{}" +
|
||||
fd . "${_ISODIR}" -u --min-depth 1 -X touch -hcd "@0"
|
||||
}
|
||||
|
||||
_prepare_uefi_image() {
|
||||
|
@ -193,10 +193,10 @@ _prepare_uefi_image() {
|
|||
mcopy -m -i "${VFAT_IMAGE}" -s "${_ISODIR}"/EFI "${_ISODIR}"/boot ::/
|
||||
# leave EFI/ and /boot/kernel for virtualbox and other restricted VM emulators :(
|
||||
if [[ "${_ARCH}" == "x86_64" || "${_ARCH}" == "riscv64" ]]; then
|
||||
find "${_ISODIR}"/boot/* ! -name "vmlinuz-${_ARCH}" -delete
|
||||
fd -u -t f -E "vmlinuz-${_ARCH}" . "${_ISODIR}"/boot/ -X rm
|
||||
fi
|
||||
if [[ "${_ARCH}" == "aarch64" ]]; then
|
||||
find "${_ISODIR}"/boot/* ! -name "Image-${_ARCH}.gz" -delete
|
||||
fd -u -t f -E "Image-${_ARCH}.gz" . "${_ISODIR}"/boot/ -X rm
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -35,9 +35,9 @@ _compress_initrd() {
|
|||
echo "Creating zstd compressed image: ${1}"
|
||||
pushd "${_W_DIR}/tmp/initrd" >"${_NO_LOG}" || return
|
||||
# Reproducibility: set all timestamps to 0
|
||||
find . -mindepth 1 -execdir touch -hcd "@0" "{}" +
|
||||
fd . -u --min-depth 1 -X touch -hcd "@0"
|
||||
# use zstd only it has best compression and decompression
|
||||
find . -mindepth 1 -printf '%P\0' | sort -z |
|
||||
fd . -u --min-depth 1 -0 | sort -z |
|
||||
LANG=C bsdtar --null -cnf - -T - |
|
||||
LANG=C bsdtar --null -cf - --format=newc @- |
|
||||
zstd -T0 -19 > "../../${1}" || exit 1
|
||||
|
|
|
@ -802,12 +802,12 @@ The calculated size to boot the image follows the formula:<br>
|
|||
</tr>
|
||||
<tr class="even">
|
||||
<td>ROOTFS size in MiB</td>
|
||||
<td class="MyYes">743</td>
|
||||
<td class="MyYes">723</td>
|
||||
<td class="MyNo">1900</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>ROOTFS packages</td>
|
||||
<td class="MyYes">202</td>
|
||||
<td class="MyYes">212</td>
|
||||
<td class="MyNo">426</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
|
|
Loading…
Reference in a new issue