debian-forge/stages
Michael Vogt 0a2e0bb3d2 stages: add org.osbuild.machine-id stage
This is a variation of PR https://github.com/osbuild/osbuild/pull/960
that put the machine-id handling into it's own stage and adds
explicit handling what should happen with it.

For machine-id(5) we essentially want the following three states
implemented:

1. `first-boot: yes` will ensure that /etc/machine-id is
   in the "uninitialized" state. This means on boot the systemd
   `ConditionFirstBoot` is triggered and a new id in `/etc/machine-id`
   is created. This will work for systemd v247+.
2. `first-boot: no` will ensure that /etc/machine-id exists but
   is empty. This will trigger the creation of a new machine-id but
   will *not* trigger `ConditionFirstBoot`.
3. `first-boot: preserve` will just keep the existing machine-id.
   Note that it will error if there is no /etc/machine-id

Note that the `org.osbuild.rpm` will also create a
`{tree}/etc/machine-id` while it runs to ensure that postinst
scripts will not fail that rely on this file. This is an
implementation detail but unfortunately the rpm stage will
leave an empty machine-id file if it was missing. So we cannot
just remove /etc/machine-id because any following rpm stage
would re-create it again (and we cannot change that without
breaking backward compatiblity). Thanks to the special semantic
that a missing /etc/machine-id and an /etc/machine-id with
the `uninitialized` string are equivalent we don't care.

To support systemd versions below v247 we could offer an option
to remove /etc/machine-id. But the downside of this is that
it would only work if the org.osbuild.machine-id stage is after
the rpm stage.

See also the discussion in PR#960.

Thanks to Tom, Christian for the PR and the background.
2023-11-30 13:30:32 +01:00
..
test stages: add org.osbuild.machine-id stage 2023-11-30 13:30:32 +01:00
org.osbuild.anaconda stage: anaconda, allow access to more config 2023-07-18 13:41:05 +02:00
org.osbuild.authconfig autopep8: Update with changes to make autopep8 -a -a -a happy 2023-08-10 13:04:14 +02:00
org.osbuild.authselect osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.bootiso.mono autopep8: Update with changes to make autopep8 -a -a -a happy 2023-08-10 13:04:14 +02:00
org.osbuild.btrfs.subvol stages: add org.osbuild.btrfs.subvol 2023-08-25 12:35:56 +02:00
org.osbuild.buildstamp osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.chmod stages/chmod: SCHEMA_2 2021-07-01 10:49:38 +02:00
org.osbuild.chown Add org.osbuild.chown stage 2023-02-07 12:14:01 +01:00
org.osbuild.chrony osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.clevis.luks-bind osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.cloud-init osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.containers.storage.conf stages/containers.storage: ability to specify a base file 2022-11-15 11:34:15 +01:00
org.osbuild.copy stage/copy: fix exception msg when parsing mounts and inputs 2023-11-01 15:26:05 +01:00
org.osbuild.cpio.out stages: add new cpio.out stage 2022-11-03 17:26:43 +01:00
org.osbuild.cron.script osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.crypttab osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.debug-shell osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.discinfo osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.dnf-automatic.config osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.dnf.config autopep8: Update with changes to make autopep8 -a -a -a happy 2023-08-10 13:04:14 +02:00
org.osbuild.dnf4.mark dnf4.mark: mark packages in DNF state database 2023-08-15 00:37:06 +02:00
org.osbuild.dracut stages/dracut: add dracut omit drivers option 2023-08-28 13:25:04 +02:00
org.osbuild.dracut.conf stages/dracut: add dracut omit drivers option 2023-08-28 13:25:04 +02:00
org.osbuild.error osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.experimental.ostree.config Add org.osbuild.experimental.ostree.config stage with composefs option 2023-11-22 16:39:04 +01:00
org.osbuild.fdo osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.firewall stages/firewall: change zones/sources handling 2022-10-26 12:07:21 +02:00
org.osbuild.first-boot tox: add tox 2023-08-01 15:01:13 +02:00
org.osbuild.fix-bls osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.fstab osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.gcp.guest-agent.conf osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.greenboot stages/greenboot: avoid new pylint suppressions 2022-09-14 12:26:37 +02:00
org.osbuild.groups osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.grub2 tox: add tox 2023-08-01 15:01:13 +02:00
org.osbuild.grub2.inst osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.grub2.iso grub2.iso: add timeout option 2022-11-11 17:22:14 +01:00
org.osbuild.grub2.legacy osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.gunzip osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.gzip osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.hostname osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.ignition stages/ignition: support multi kargs in network kcmdline 2023-02-27 17:39:14 +01:00
org.osbuild.implantisomd5 osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.isolinux stages/isolinux: default list 2023-05-23 10:13:15 +02:00
org.osbuild.kernel-cmdline osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.kernel-cmdline.bls-append stages: add kernel-cmdline.bls-append stage 2023-11-14 23:58:08 +01:00
org.osbuild.keymap stages/org.osbuild.keymap: create xorg.conf.d if it doesn't exist 2023-11-14 10:45:44 -08:00
org.osbuild.kickstart stages(kickstart): add validation for the hostname 2023-11-27 15:10:29 +01:00
org.osbuild.livesys stage: add a livesys stage 2023-05-31 09:30:55 +02:00
org.osbuild.locale osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.lorax-script stages/lorax-script: add missing type of path to the schema 2023-04-19 12:42:27 +02:00
org.osbuild.luks2.format osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.luks2.remove-key osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.lvm2.create osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.lvm2.metadata stages/lvm2.metadata: fix typo in regex 2021-08-21 09:10:42 +02:00
org.osbuild.machine-id stages: add org.osbuild.machine-id stage 2023-11-30 13:30:32 +01:00
org.osbuild.mkdir stages/mkdir: fix its schema 2023-10-30 13:31:15 +01:00
org.osbuild.mkfs.btrfs org.osbuild.mkfs.btrfs: add support for -m argument 2023-08-25 12:35:56 +02:00
org.osbuild.mkfs.ext4 org.osbuild.mkfs.ext4: Add verity option to 2023-05-16 00:03:16 +02:00
org.osbuild.mkfs.fat Create additional option to setup FS geometry 2023-10-05 20:17:40 +02:00
org.osbuild.mkfs.xfs osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.mkinitcpio Add mkinitcpio stage 2021-12-21 10:44:55 +01:00
org.osbuild.modprobe osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.nginx.conf modules: explicit encodings for open() 2022-09-09 15:33:29 +02:00
org.osbuild.nm.conf osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.nm.conn osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.noop osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.oci-archive tox: add tox 2023-08-01 15:01:13 +02:00
org.osbuild.oscap.autotailor stages: add openscap autotailor stage 2023-07-18 15:29:13 -07:00
org.osbuild.oscap.remediation stage(oscap.remediation): link /proc/self/fd to /dev/fd 2023-11-23 17:56:19 +01:00
org.osbuild.ostree stages/ostree: add deprecation notice/warning 2023-10-06 15:55:26 +02:00
org.osbuild.ostree.commit Add selinux-label-version to the org.osbuild.ostree.commit stage 2023-10-28 15:37:56 -04:00
org.osbuild.ostree.config osbuild/util: hoist ostree code into util/ostree 2023-10-06 15:55:26 +02:00
org.osbuild.ostree.deploy stages/ostree.deploy: create ostree_commit_deploy function 2023-10-24 13:46:10 -04:00
org.osbuild.ostree.deploy.container stages: add ostree.deploy.container stage 2023-10-24 13:46:10 -04:00
org.osbuild.ostree.encapsulate stages/ostree.encapsulate: use new entrypoint on rpm-ostree >=2023.2 2023-08-08 12:41:17 +02:00
org.osbuild.ostree.fillvar osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.ostree.genkey Add org.osbuild.ostree.genkey stage 2023-11-14 13:49:39 +01:00
org.osbuild.ostree.init osbuild/util: hoist ostree code into util/ostree 2023-10-06 15:55:26 +02:00
org.osbuild.ostree.init-fs osbuild/util: hoist ostree code into util/ostree 2023-10-06 15:55:26 +02:00
org.osbuild.ostree.os-init osbuild/util: hoist ostree code into util/ostree 2023-10-06 15:55:26 +02:00
org.osbuild.ostree.passwd osbuild/util: hoist ostree code into util/ostree 2023-10-06 15:55:26 +02:00
org.osbuild.ostree.post-copy Add org.osbuild.ostree.post-copy stage 2023-11-22 16:39:04 +01:00
org.osbuild.ostree.preptree autopep8: Update with changes to make autopep8 -a -a -a happy 2023-08-10 13:04:14 +02:00
org.osbuild.ostree.pull osbuild/util: create pull_local function in util/ostree 2023-10-06 15:55:26 +02:00
org.osbuild.ostree.remotes osbuild/util: hoist ostree code into util/ostree 2023-10-06 15:55:26 +02:00
org.osbuild.ostree.selinux osbuild.ostree.selinux: xref ostree issue for this 2023-08-31 14:01:12 +02:00
org.osbuild.ostree.sign org.osbuild.ostree.sign: Support ostree sign to sign commits 2023-11-14 13:49:39 +01:00
org.osbuild.ovf tox: add tox 2023-08-01 15:01:13 +02:00
org.osbuild.pacman osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.pacman-keyring stages: add pacman keyring stage 2022-03-01 16:07:27 +01:00
org.osbuild.pacman.conf osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.pacman.mirrorlist.conf osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.pam.limits.conf osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.parted autopep8: Update with changes to make autopep8 -a -a -a happy 2023-08-10 13:04:14 +02:00
org.osbuild.pwquality.conf osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.qemu osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.resolv-conf osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.rhsm osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.rhsm.facts stages/rhsm.facts: create facts file in /etc 2023-01-03 09:27:13 +01:00
org.osbuild.rpm runners: create fake machine id when needed 2023-11-28 11:50:31 +01:00
org.osbuild.rpm-ostree osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.rpm.macros osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.rpmkeys.import osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.selinux osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.selinux.config osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.sfdisk stages/sfdisk: support changing GPT partition attribute bits 2023-05-25 14:57:28 +02:00
org.osbuild.sgdisk autopep8: Update with changes to make autopep8 -a -a -a happy 2023-08-10 13:04:14 +02:00
org.osbuild.shell.init stages/shell.init: add top-level files property 2023-02-15 18:14:01 +01:00
org.osbuild.skopeo osbuild/util: add containers_source helper 2023-09-30 02:29:05 +02:00
org.osbuild.squashfs stages/squashfs: add support for zstd compression 2023-07-18 08:58:26 +02:00
org.osbuild.sshd.config osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.sysconfig stages/sysconfig: add desktop support 2023-07-17 12:15:12 +02:00
org.osbuild.sysctld osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.systemd osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.systemd-journald stages: add org.osbuild.systemd-journald stage 2022-10-21 09:04:51 +02:00
org.osbuild.systemd-logind stages/logind-systemd: add ReserveVT option 2022-10-22 14:58:44 +02:00
org.osbuild.systemd.preset stage/systemd.preset: be able to write a preset file 2023-04-05 14:34:39 +02:00
org.osbuild.systemd.unit stages/systemd:support for user service dropin 2023-08-16 13:23:16 +02:00
org.osbuild.tar osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.test osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.timezone osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.tmpfilesd osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.truncate osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.tuned osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.udev.rules osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.uki stages: add stage to build unified kernel images 2022-11-14 20:10:59 +01:00
org.osbuild.untar osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.update-crypto-policies stages: add org.osbuild.update-crypto-policies stage 2023-11-15 17:15:10 +01:00
org.osbuild.users stages/org.osbuild.users: support multiple SSH keys 2023-10-16 18:05:27 +02:00
org.osbuild.vagrant osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.waagent.conf osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.wsl.conf stages/org.osbuild.wsl.conf: add stage to configure WSL settings 2023-04-11 10:11:08 +02:00
org.osbuild.xorrisofs osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.xz osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.yum.config osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.yum.repos stages/yum.repo: add sslverify field 2023-05-03 20:53:52 +02:00
org.osbuild.zipl osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.zipl.inst osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
org.osbuild.zstd stages: add new zstd stage 2023-06-14 09:44:00 +02:00