[Git][reproducible-builds/reproducible-website][master] docs: document reproducible XFS filesystems
Chris Lamb (@lamby)
gitlab at salsa.debian.org
Mon Dec 15 17:12:58 UTC 2025
Chris Lamb pushed to branch master at Reproducible Builds / reproducible-website
Commits:
2cf0f4c8 by Luca Di Maio at 2025-12-15T18:04:37+01:00
docs: document reproducible XFS filesystems
As of the upcoming 6.18.0 release it will be possible to create
reproducible XFS system images. Adding them to the docs.
Signed-off-by: Luca Di Maio <luca.dimaio1 at gmail.com>
- - - - -
1 changed file:
- _docs/system_images.md
Changes:
=====================================
_docs/system_images.md
=====================================
@@ -44,6 +44,39 @@ It is also possible to produce bit-reproducible filesystems with recent mkfs.ext
tar --sort=name --mtime=@$SOURCE_DATE_EPOCH --clamp-mtime --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime -cf /tmp/root.tar -C $rootdir .
mkfs.ext2 -F -d /tmp/root.tar -E hash_seed=035cb65d-0a86-404a-bad7-19c88d05e400 -U 12341234-a4ec-4304-a70f-c549ea829da9 -L root $rootdev
+XFS
+===
+
+Recent versions of `mkfs.xfs` from xfsprogs support creating bit-reproducible XFS filesystems through
+environment variables and direct directory population capabilities.
+
+The reproducible build support was introduced through two key features:
+
+**Environment Variables for Deterministic Behavior:**
+
+* `SOURCE_DATE_EPOCH`: When set, all filesystem timestamps use this value instead of the current time.
+* `DETERMINISTIC_SEED=1`: When set, uses a fixed seed value for random number generation instead of reading from `/dev/urandom`.
+
+**Directory Population:**
+
+The `-p file=/path/to/directory` option allows populating a newly created XFS filesystem directly from
+an existing directory structure, without needing to mount the filesystem.
+
+ export SOURCE_DATE_EPOCH=1234567890 \
+ export DETERMINISTIC_SEED=1 \
+ mkfs.xfs \
+ -m uuid=12341234-a4ec-4304-a70f-c549ea829da9 \
+ -L my-label \
+ -p file=/path/to/rootfs \
+ disk.img
+
+**Important Notes:**
+
+* The UUID should be explicitly set with `-m uuid=` to ensure reproducibility
+* The filesystem label shold be explicitly set with `-L` option
+
+`xfsprogs` version 6.18.0 and higher is needed for this to work.
+
ISO filesystem
==============
View it on GitLab: https://salsa.debian.org/reproducible-builds/reproducible-website/-/commit/2cf0f4c8dd6464f0ea2a22ed2508f98922758889
--
View it on GitLab: https://salsa.debian.org/reproducible-builds/reproducible-website/-/commit/2cf0f4c8dd6464f0ea2a22ed2508f98922758889
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20251215/c58f97bd/attachment.htm>
More information about the rb-commits
mailing list