Compare commits

...

10 commits

Author SHA1 Message Date
Tobias Powalowski
17f08c28e1 bump to latest version 2024-07-22 23:13:32 +02:00
Tobias Powalowski
63ffdde7b6 readd quotes 2024-07-22 21:58:32 +02:00
Tobias Powalowski
291d512cbe fix kernel version in release 2024-07-22 21:56:29 +02:00
Tobias Powalowski
5626ba8229 update CHANGELOG 2024-07-22 21:44:20 +02:00
Tobias Powalowski
d0a2d26e95 readd quotes 2024-07-22 21:14:48 +02:00
Tobias Powalowski
440b1441cc don't source all configs 2024-07-22 21:13:30 +02:00
Tobias Powalowski
1c4c699c6e resolve always _KERNEL 2024-07-22 20:40:41 +02:00
Tobias Powalowski
ff0999e469 reproducible package database 2024-07-22 20:22:43 +02:00
Tobias Powalowski
350c1142e7 reproducible package database 2024-07-22 20:02:10 +02:00
Tobias Powalowski
5b621e283b reproducible package database 2024-07-22 19:59:56 +02:00
3 changed files with 32 additions and 15 deletions

View file

@ -29,6 +29,8 @@ testsuite:
- log to /dev/tty11 | VC11
server-release:
- use local files instead of resync from source server'
- switched db compression to zst
- make db files reproducible
setup:
- abort on pacman package installation error
---

View file

@ -164,12 +164,13 @@ _run_update_environment() {
}
_kver() {
# x86_64: rg -Noazm 1 'ABCDEF\x00+(.*) \(.*@' -r '$1' ${1}
# aarch64 compressed and uncompressed:
# rg -Noazm 1 'Linux version (.*) \(.*@' -r '$1' ${1}
# riscv64: zcat ${1} | rg -Noazm 1 'Linux version (.*) \(.*@' -r '$1'
if [[ -f "${1}" ]]; then
# x86_64 default image
rg -Noazm 1 'ABCDEF\x00+(.*) \(.*@' -r '$1' "${1}" ||
# aarch64, works for compressed and uncompressed image
rg -Noazm 1 'Linux version (.*) \(.*@' -r '$1' "${1}" ||
# riscv64, rg cannot detect compression without suffix
rg -Noazm 1 'ABCDEF\x00+(.*) \(.*@' -r '$1' "${1}" ||\
rg -Noazm 1 'Linux version (.*) \(.*@' -r '$1' "${1}" ||\
zcat "${1}" | rg -Noazm 1 'Linux version (.*) \(.*@' -r '$1'
fi
}
@ -247,10 +248,27 @@ _fix_network() {
}
_create_archboot_db() {
echo "Creating archboot repository db..."
sync
echo "Creating reproducible repository db..."
pushd ${1} >"${_NO_LOG}" || return 1
#shellcheck disable=SC2046
LC_ALL=C.UTF-8 fd -u -t f -E '*.sig' . "${1}"/ -X repo-add -q "${1}"/archboot.db.tar.gz
LC_ALL=C.UTF-8 fd -u -t f -E '*.sig' . -X repo-add -q archboot.db.tar
for i in archboot.{db.tar,files.tar}; do
mkdir repro
cd repro
bsdtar -xf ../${i} || return 1
fd . -u --min-depth 1 -X touch -hcd "@0"
fd --strip-cwd-prefix -t f -t l -u --min-depth 1 -0 | sort -z |
LC_ALL=C.UTF-8 bsdtar --null -cnf - -T - |
LC_ALL=C.UTF-8 bsdtar --null -cf - --format=gnutar @- |
zstd -T0 -19 >> "../${i}.zst" || return 1
cd ..
rm -r repro
done
rm archboot.{db,files}
rm archboot.{db,files}.tar
ln -s archboot.db.tar.zst archboot.db
ln -s archboot.files.tar.zst archboot.files
popd >"${_NO_LOG}" || return 1
}
_pacman_parameters() {
@ -320,7 +338,7 @@ _create_cpio() {
# use zstd it has best compression and decompression
# Result:
# Multi CPIO archive, extractable with 3cpio
pushd "${1}" >"${_NO_LOG}" || return
pushd "${1}" >"${_NO_LOG}" || return 1
echo "Creating initramfs:"
fd . -u --min-depth 1 -X touch -hcd "@0"
echo "Appending directories..."
@ -339,7 +357,7 @@ _create_cpio() {
LC_ALL=C.UTF-8 bsdtar --null -cnf - -T - |
LC_ALL=C.UTF-8 bsdtar --null -cf - --format=newc @- |
zstd -T0 -19 >> "${2}" || _abort "Image creation failed!"
popd >"${_NO_LOG}" || return
popd >"${_NO_LOG}" || return 1
echo "Build complete."
}
# vim: set ft=sh ts=4 sw=4 et:

View file

@ -39,31 +39,28 @@ _create_iso() {
_create_archboot_db "${_W_DIR}${_CACHEDIR}"
#shellcheck disable=SC1090
. "${_W_DIR}/etc/archboot/${_ARCH}.conf"
_KERNEL="$(echo ${_W_DIR}/${_KERNEL})"
#shellcheck disable=SC2116,SC2046,SC2027,2086
_ISONAME="archboot-$(date +%Y.%m.%d-%H.%M)-$(_kver ${_W_DIR}/${_KERNEL})"
_ISONAME="archboot-$(date +%Y.%m.%d-%H.%M)-$(_kver ${_KERNEL})"
if ! [[ "${_RUNNING_ARCH}" == "${_ARCH}" ]]; then
### to speedup build for riscv64 and aarch64 on x86_64, run compressor on host system
echo "Generating initramdisks..."
# init ramdisk
_create_initrd_dir "${_ARCH}-init.conf"
. "/etc/archboot/${_ARCH}-init.conf"
_create_cpio "${_W_DIR}/tmp/initrd" "../../init-${_ARCH}.img"
if ! [[ "${_ARCH}" == "riscv64" ]]; then
# local ramdisk
echo "Generating local initramfs..."
_create_initrd_dir "${_W_DIR}/tmp/initrd" "${_CONFIG_LOCAL}"
. "/etc/archboot/${_CONFIG_LOCAL}"
_create_cpio "${_W_DIR}/tmp/initrd" "../../initrd-local-${_ARCH}.img"
# latest ramdisk
echo "Generating latest initramfs..."
_create_initrd_dir "${_CONFIG_LATEST}"
. "/etc/archboot/${_CONFIG_LATEST}"
_create_cpio "${_W_DIR}/tmp/initrd" "../../initrd-latest-${_ARCH}.img"
fi
# normal ramdisk
echo "Generating normal initramfs..."
_create_initrd_dir "${_ARCH}.conf"
. "/etc/archboot/${_ARCH}.conf"
_create_cpio "${_W_DIR}/tmp/initrd" "../../initrd-${_ARCH}.img"
fi
# riscv64 does not support kexec at the moment