
It doesn’t attempt to understand the contents of files – if you have modified a config file in any way, that wins
When OSTree creates a deployment, it performs a 3-way merge using the old default configuration, the active system’s /etc, and the new default configuration. In the final filesystem tree for a deployment then, /etc is a regular writable directory.
How it works is:
- Files in the currently booted deployment's
which were modified from the default (of the same deployment) are retained./etc- Files in the currently booted deployment's
which were not modified from the default (of the same deployment) are upgraded to the new defaults from the new deployment's ./etc
passwd. That would be bad. /usr/etc//usr/etc//usr/etc//etc//usr/etc/usr/etc/usr/etcshadow$ sudo ostree admin config-diff
M adjtime
M group
M passwd
M gshadow
M shadow
M machine-id
M subgid
M subuid
...rm -rf /etc/*$ podman run --rm -it fedora-minimal:38
bash-5.2# cat /etc/passwd
root❌0:0:Super User:/root:/bin/bash
bin❌1:1:bin:/bin:/usr/sbin/nologin
daemon❌2:2:daemon:/sbin:/usr/sbin/nologin
adm❌3:4:adm:/var/adm:/usr/sbin/nologin
lp❌4:7:lp:/var/spool/lpd:/usr/sbin/nologin
sync❌5:0:sync:/sbin:/bin/sync
shutdown❌6:0:shutdown:/sbin:/sbin/shutdown
halt❌7:0:halt:/sbin:/sbin/halt
mail❌8:12:mail:/var/spool/mail:/usr/sbin/nologin
operator❌11:0:operator:/root:/usr/sbin/nologin
games❌12💯games:/usr/games:/usr/sbin/nologin
ftp❌14:50:FTP User:/var/ftp:/usr/sbin/nologin
nobody❌65534:65534:Kernel Overflow User:/:/usr/sbin/nologin.dinclude