Skip to content

Commit 3282d7e

Browse files
committed
Normalize UID and GID entries
1 parent 2f1891c commit 3282d7e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

base/debloat.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#!/bin/bash
22
set -euo pipefail
33

4+
# Ensure deterministic ordering of uid and gids before debloating
5+
# See Debian issue #963788
6+
mkosi-chroot pwck --sort >/dev/null
7+
mkosi-chroot grpck --sort >/dev/null
8+
49
# Remove all logs and cache, but keep directory structure intact
510
find "$BUILDROOT/var/log" -type f -delete
611
find "$BUILDROOT/var/cache" -type f -delete
@@ -34,6 +39,7 @@ debloat_paths=(
3439
"/usr/lib/systemd/network"
3540
"/usr/lib/pcrlock.d"
3641
"/usr/lib/tmpfiles.d"
42+
"/var/lib/ucf"
3743
"/etc/systemd/network"
3844
"/etc/credstore"
3945
"/nix"

0 commit comments

Comments
 (0)