Skip to content

Commit 9d01e38

Browse files
authored
Merge pull request #51537 from 89luca89/feat/xfs_populate_patches
feat: add xfs patches to enable populating from directory
2 parents 9f43b73 + b9e3629 commit 9d01e38

2 files changed

Lines changed: 1135 additions & 0 deletions

File tree

xfsprogs.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ pipeline:
3737
uri: https://mirrors.edge.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/xfsprogs-${{package.version}}.tar.xz
3838
expected-sha512: 249a64fb5a92ceb9e58b75a270a90773cfe2c90e863d3f9853c14b3eb0f414bf55b8b67c220a1d7386894ef9295622e224977bd3c6600c9dcba826cb4a634f49
3939

40+
# Import downstream patches from https://lore.kernel.org/linux-xfs/20250423104535.628057-1-luca.dimaio1@gmail.com/
41+
# waiting for upstream to merge.
42+
- uses: patch
43+
with:
44+
patches: v10-0001-proto-add-ability-to-populate-a-filesystem-from-.patch
45+
4046
- uses: autoconf/configure
4147
with:
4248
opts: |
@@ -170,6 +176,7 @@ subpackages:
170176
packages:
171177
- busybox
172178
- file
179+
- libfaketime
173180
pipeline:
174181
- uses: test/tw/ldd-check
175182
- name: "Check -V(version) output of binaries"
@@ -220,6 +227,55 @@ subpackages:
220227
mkfs.xfs xfs.img
221228
xfs_admin -L "TestXFS" xfs.img
222229
xfs_admin -l xfs.img | grep 'TestXFS'
230+
- name: "Test xfs reproducibility"
231+
runs: |
232+
dd if=/dev/zero of=xfs1.img bs=1M count=300
233+
dd if=/dev/zero of=xfs2.img bs=1M count=300
234+
SOURCE_DATE_EPOCH=1744654025
235+
FAKE_TIME="$(date -d @"$SOURCE_DATE_EPOCH" +'%Y-%m-%d %H:%M:%S')"
236+
export LD_PRELOAD="/usr/lib/faketime/libfaketime.so.1"
237+
export FAKERANDOM_SEED="0x12345678DEADBEEF"
238+
export FAKETIME="$FAKE_TIME"
239+
export NO_FAKE_STAT=1
240+
mkfs.xfs \
241+
-b size=4096 \
242+
-d agcount=4 \
243+
-d noalign \
244+
-i attr=2 \
245+
-i projid32bit=1 \
246+
-i size=512 \
247+
-l size=67108864 \
248+
-l su=4096 \
249+
-l version=2 \
250+
-m crc=1 \
251+
-m finobt=1 \
252+
-m uuid=44444444-4444-4444-4444-444444444444 \
253+
-n size=16384 \
254+
-n version=2 \
255+
-p file=/usr \
256+
xfs1.img
257+
258+
sleep 5
259+
260+
mkfs.xfs \
261+
-b size=4096 \
262+
-d agcount=4 \
263+
-d noalign \
264+
-i attr=2 \
265+
-i projid32bit=1 \
266+
-i size=512 \
267+
-l size=67108864 \
268+
-l su=4096 \
269+
-l version=2 \
270+
-m crc=1 \
271+
-m finobt=1 \
272+
-m uuid=44444444-4444-4444-4444-444444444444 \
273+
-n size=16384 \
274+
-n version=2 \
275+
-p file=/usr \
276+
xfs2.img
277+
278+
cmp xfs1.img xfs2.img
223279
224280
update:
225281
enabled: true

0 commit comments

Comments
 (0)