Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornl6720 <nl6720@gmail.com>2020-09-28 20:12:01 +0300
committernl6720 <nl6720@gmail.com>2020-10-07 11:42:08 +0300
commitf45fc29fe09a98c46e85da56f1709be438d4c33f (patch)
tree515c4b4eb09300241aec4bd9a87af6f52f23f424
parent455e2b94c00f748707f3dac6f0bb9a8c67dee4fe (diff)
Save SOURCE_DATE_EPOCH to a file and read it from the file when resuming a build
Print the build date. Don't re-run mksquashfs if it succeeded, but the failure was in gpg signing. For example, if the gpg pinentry timed out.
-rwxr-xr-xarchiso/mkarchiso18
1 files changed, 12 insertions, 6 deletions
diff --git a/archiso/mkarchiso b/archiso/mkarchiso
index 2e31e65..6153c4e 100755
--- a/archiso/mkarchiso
+++ b/archiso/mkarchiso
@@ -149,7 +149,8 @@ ENDUSAGETEXT
# Shows configuration according to command mode.
# $1: build_profile | init | install | run | prepare | iso
_show_config() {
- local _mode="$1"
+ local _mode="$1" build_date
+ build_date="$(date --utc --iso-8601=seconds -d "@${SOURCE_DATE_EPOCH}")"
_msg_info "${app_name} configuration settings"
[[ ! -d "${command_name}" ]] && _msg_info " Legacy Command: ${command_name}"
_msg_info " Architecture: ${arch}"
@@ -157,6 +158,7 @@ _show_config() {
_msg_info " Installation directory: ${install_dir}"
case "${_mode}" in
build_profile)
+ _msg_info " Build date: ${build_date}"
_msg_info " Output directory: ${out_dir}"
_msg_info " GPG key: ${gpg_key:-None}"
_msg_info " Profile: ${profile}"
@@ -597,9 +599,9 @@ _make_boot_uefi-x64.systemd-boot.eltorito() {
# Build airootfs filesystem image
_make_prepare() {
if [[ "${sfs_mode}" == "sfs" ]]; then
- _mkairootfs_sfs
+ _run_once _mkairootfs_sfs
else
- _mkairootfs_img
+ _run_once _mkairootfs_img
fi
_mkchecksum
if [[ "${gpg_key}" ]]; then
@@ -783,12 +785,16 @@ command_build_profile() {
isofs_dir="${work_dir}/iso"
# Set ISO file name
img_name="${iso_name}-${iso_version}-${arch}.iso"
-
- _show_config "${FUNCNAME[0]#command_}"
-
# Create working directory
[[ -d "${work_dir}" ]] || install -d -- "${work_dir}"
+ # Write build date to file or if the file exists, read it from there
+ if [[ -e "${work_dir}/build_date" ]]; then
+ SOURCE_DATE_EPOCH="$(<"${work_dir}/build_date")"
+ else
+ printf '%s\n' "$SOURCE_DATE_EPOCH" > "${work_dir}/build_date"
+ fi
+ _show_config "${FUNCNAME[0]#command_}"
_run_once _make_pacman_conf
_run_once _export_gpg_publickey
_run_once _make_custom_airootfs