Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornl6720 <nl6720@gmail.com>2022-12-24 10:30:22 +0200
committernl6720 <nl6720@gmail.com>2022-12-24 10:30:22 +0200
commit995e0b7fb90049e70d4e175e7df8f4aa09622186 (patch)
tree079f8fffdc31cf0d5464a69bcc5b340e4f03d503
parent55a1b132a0bb6865d327726afdf21bc7e2d105db (diff)
parent6e1be91961967a6485901ac431f6f6b06675b750 (diff)
Merge remote-tracking branch 'origin/merge-requests/303'
By Christian Hesse * origin/merge-requests/303: archiso/mkarchiso: write "uninitialized" to /etc/machine-id See merge request https://gitlab.archlinux.org/archlinux/archiso/-/merge_requests/303
-rw-r--r--CHANGELOG.rst3
-rwxr-xr-xarchiso/mkarchiso5
2 files changed, 6 insertions, 2 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 4966b84..19a4d91 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -18,6 +18,9 @@ Changed
- Error out early if any of the code signing certificate files passed with option ``-c`` do not exist.
- Use LZMA compressed EROFS image for the baseline profile. Now that xz 5.4 is out and erofs-utils is built with LZMA
support, using a higher compression is possible.
+- Add ``/etc/machine-id`` with special value ``uninitialized``. The final id is generated at boot time, and systemd's
+ first-boot mechanim (see ``First Boot Semantics`` in ``machine-id(5)``) applies. No functional change unless that
+ ``ConditionFirstBoot=yes`` is true and passive unit ``first-boot-complete.target`` activates for ordering.
Removed
-------
diff --git a/archiso/mkarchiso b/archiso/mkarchiso
index 8449f51..7331bb0 100755
--- a/archiso/mkarchiso
+++ b/archiso/mkarchiso
@@ -163,9 +163,10 @@ _cleanup_pacstrap_dir() {
[[ -d "${pacstrap_dir}/var/tmp" ]] && find "${pacstrap_dir}/var/tmp" -mindepth 1 -delete
# Delete package pacman related files.
find "${work_dir}" \( -name '*.pacnew' -o -name '*.pacsave' -o -name '*.pacorig' \) -delete
- # Create an empty /etc/machine-id
+ # Create /etc/machine-id with special value 'uninitialized': the final id is
+ # generated on first boot, systemd's first-boot mechanism applies (see machine-id(5))
rm -f -- "${pacstrap_dir}/etc/machine-id"
- printf '' > "${pacstrap_dir}/etc/machine-id"
+ printf 'uninitialized\n' > "${pacstrap_dir}/etc/machine-id"
_msg_info "Done!"
}