mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 11:30:37 +02:00
add comment about cpio creation
This commit is contained in:
parent
4739557062
commit
a92633a10c
1 changed files with 10 additions and 1 deletions
|
@ -246,9 +246,17 @@ _install_libs() {
|
|||
}
|
||||
|
||||
_create_cpio() {
|
||||
# Reproducibility:
|
||||
# set all timestamps to 0
|
||||
# fd . -u --min-depth 1 -X touch -hcd "@0"
|
||||
# Pipe needed as is, bsdcpio is not reproducible!
|
||||
# cpio, pax, tar are slower than bsdtar!
|
||||
# LC_ALL=C.UTF-8 bsdtar --null -cnf - -T - |
|
||||
# LC_ALL=C.UTF-8 bsdtar --null -cf - --format=newc @-
|
||||
# Result:
|
||||
# Multi CPIO archive, extractable with 3cpio
|
||||
pushd "${_ROOTFS}" >"${_NO_LOG}" || return
|
||||
echo "Creating initramfs:"
|
||||
# Reproducibility: set all timestamps to 0
|
||||
fd . -u --min-depth 1 -X touch -hcd "@0"
|
||||
echo "Appending directories..."
|
||||
fd . -u -t d -0 | sort -z |
|
||||
|
@ -258,6 +266,7 @@ _create_cpio() {
|
|||
fd . -t f -t l -u -e 'bz2' -e 'gz' -e 'xz' -e 'zst' --min-depth 1 -0 | sort -z |
|
||||
LC_ALL=C.UTF-8 bsdtar --null -cnf - -T - |
|
||||
LC_ALL=C.UTF-8 bsdtar --null -cf - --format=newc @- >> "${_GENERATE_IMAGE}" || _abort "Image creation failed!"
|
||||
echo "Removing compressed files..."
|
||||
fd . -u -e 'bz2' -e 'gz' -e 'xz' -e 'zst' --min-depth 1 -X rm
|
||||
fd . -u --min-depth 1 -X touch -hcd "@0"
|
||||
echo "Appending zstd compressed image..."
|
||||
|
|
Loading…
Reference in a new issue