sysusers: make sp_lstchg shadow field reproducible

If the environment variable SOURCE_DATE_EPOCH is set, use its value
instead of the current time.
This commit is contained in:
Johannes Schauer Marin Rodrigues
2022-09-02 07:17:25 +02:00
committed by Lennart Poettering
parent dddec402de
commit 3fa8a1148a
4 changed files with 38 additions and 1 deletions
+10
View File
@@ -310,6 +310,16 @@ All tools:
subvolumes if the backing filesystem supports them. If set to `0`, these
lines will always create directories.
`systemd-sysusers`
* `SOURCE_DATE_EPOCH` — if unset, the field of the date of last password change
in `/etc/shadow` will be the number of days from Jan 1, 1970 00:00 UTC until
today. If SOURCE_DATE_EPOCH is set to a valid UNIX epoch value in seconds,
then the field will be the number of days until that time instead. This is to
support creating bit-by-bit reproducible system images by choosing a
reproducible value for the field of the date of last password change in
`/etc/shadow`. See: https://reproducible-builds.org/specs/source-date-epoch/
`systemd-sysv-generator`:
* `$SYSTEMD_SYSVINIT_PATH` — Controls where `systemd-sysv-generator` looks for