-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
image: unset password reset date to ensure reprodicibility (#3466)
* image: unset password reset date
- Loading branch information
Showing
2 changed files
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
set -euxo pipefail | ||
|
||
# For some reason yet unknown, SourceDateEpoch is not applied correctly to the | ||
# users added by systemd-sysusers. This has only been observed in our mkosi | ||
# flake so far, not in an upstream mkosi configuration. | ||
# TODO(burgerdev): wait for a couple of Nix package upgrades and try again? | ||
|
||
# Strategy: unset the "last password change" date without leaving a trace in | ||
# /etc/shadow-. | ||
tmp=$(mktemp) | ||
cp -a "${BUILDROOT}/etc/shadow-" "${tmp}" | ||
mkosi-chroot chage -d "" etcd | ||
cp -a "${tmp}" "${BUILDROOT}/etc/shadow-" |