Package: release.debian.org
Severity: normal
User: release.debian@packages.debian.org
Usertags: unblock
Please unblock package reiser4progs
[ Reason ]
1.2.1-3 added 2 patches to make sure that the created reiser4
filesystem will have a correct UUID.
See also Debian bug #985586
[ Impact ]
There's a small chance that a reiser4 fs will end up without an UUID.
[ Tests ]
Small test script provided in the Debian bug #985586
[ Risks ]
Small code changes. Leaf package which isn't used much.
[ Checklist ]
[X] all changes are documented in the d/changelog
[X] I reviewed all changes and I approve them
[X] attach debdiff against the package in testing
unblock reiser4progs/1.2.1-3
diff -Nru reiser4progs-1.2.1/debian/changelog
reiser4progs-1.2.1/debian/changelog
--- reiser4progs-1.2.1/debian/changelog 2020-07-24 08:21:25.0 +0200
+++ reiser4progs-1.2.1/debian/changelog 2021-03-20 15:02:23.0 +0100
@@ -1,9 +1,17 @@
-reiser4progs (1.2.1-2) UNRELEASED; urgency=medium
+reiser4progs (1.2.1-3) unstable; urgency=medium
+
+ * Add patches to fix creation of filesystems without an UUID. Thanks
+Mike Fleetwood for the report + patches! (Closes: #985586)
+
+ -- Felix Zielcke Sat, 20 Mar 2021 15:02:23 +0100
+
+reiser4progs (1.2.1-2) unstable; urgency=medium
* Build with libedit instead of orphaned libreadline5. Thanks Bastian
Germann for the patch! (Closes: #966149)
+ * Bump Standards-Version to 4.5.0.
- -- Felix Zielcke Fri, 24 Jul 2020 08:21:25 +0200
+ -- Felix Zielcke Fri, 24 Jul 2020 08:25:47 +0200
reiser4progs (1.2.1-1) unstable; urgency=medium
diff -Nru reiser4progs-1.2.1/debian/control reiser4progs-1.2.1/debian/control
--- reiser4progs-1.2.1/debian/control 2020-07-24 08:17:36.0 +0200
+++ reiser4progs-1.2.1/debian/control 2020-07-24 08:25:43.0 +0200
@@ -7,7 +7,7 @@
libaal-dev (>= 1.0.7),
libedit-dev,
uuid-dev
-Standards-Version: 4.4.0
+Standards-Version: 4.5.0
Homepage: https://reiser4.wiki.kernel.org
Package: reiser4progs
diff -Nru reiser4progs-1.2.1/debian/patches/fix_null_uuid.patch
reiser4progs-1.2.1/debian/patches/fix_null_uuid.patch
--- reiser4progs-1.2.1/debian/patches/fix_null_uuid.patch 1970-01-01
01:00:00.0 +0100
+++ reiser4progs-1.2.1/debian/patches/fix_null_uuid.patch 2021-03-20
14:58:26.0 +0100
@@ -0,0 +1,52 @@
+Author: Mike Fleetwood
+Date: Mon Mar 15 21:09:17 2021 +
+Subject: Stop occasionally making file systems with null UUIDs
+
+mkfs.reiser4 was using strncpy() to copy a binary UUID into the
+in-memory copy of the superblock. So if there was a zero byte in the
+UUID, then from that point to the end was set to all zeros. If the
+first byte was zero, a 1 in 256 chance, then the whole UUID was set to
+zero generating a null UUID for the file system. Fix this.
+
+Test case:
+truncate -s 256M test.img
+i=0
+while :
+do
+mkfs.reiser4 --force --yes --label '' test.img
+line=`debugfs.reiser4 test.img 2> /dev/null | egrep '^uuid:'`
+((i++))
+echo "[$i] $line"
+echo "$line" | grep -q '' && break
+done
+
+Output fragment:
+[1] uuid: 17073919-e41d-4892-9b22-4294d1544c4a
+[2] uuid: af2821de-ea85-4f20-9621-4fbd128b3fb8
+[3] uuid: c0fb805b-e224-4695-a504-d87460d158ae
+...
+[34] uuid: b747540d-5280-4e0f-bae2-9222
+[35] uuid: d604794d-097f-4810-bbb3-01a1518f3ef1
+[36] uuid: 9634100c-1f98-42b3-a684-c9df77ab54e2
+[37] uuid:
+
+Signed-off-by: Mike Fleetwood
+
+Origin: upstream,
https://github.com/edward6/reiser4progs/commit/44cc024f398f60adef1519426d65f3f081ee826a
+Bug-Debian: https://bugs.debian.org/985586
+
+diff --git a/libreiser4/master.c b/libreiser4/master.c
+index 649434d96..825fd38d1 100644
+--- a/libreiser4/master.c
b/libreiser4/master.c
+@@ -295,8 +295,8 @@ void reiser4_master_set_uuid(reiser4_master_t *master,
+ sizeof(SUPER(master)->ms_uuid));
+
+ if (uuid) {
+- aal_strncpy(SUPER(master)->ms_uuid, uuid,
+- sizeof(SUPER(master)->ms_uuid));
++ aal_memcpy(SUPER(master)->ms_uuid, uuid,
++ sizeof(SUPER(master)->ms_uuid));
+ }
+ master->dirty = 1;
+ }
diff -Nru reiser4progs-1.2.1/debian/patches/fix_print_uuid.patch
reiser4progs-1.2.1/debian/patches/fix_print_uuid.patch
--- reiser4progs-1.2.1/debian/patches/fix_print_uuid.patch 1970-01-01
01:00:00.0 +0100
+++ reiser4progs-1.2.1/debian/patches/fix_print_uuid.patch 2021-03-20
14:57:41.0 +0100
@@ -0,0 +1,42 @@
+Author: Edward Shishkin
+Date: Sat Mar 13 15:21:09 2021 +0100
+Subject: Fix up repair_master_print()
+
+Use the right criteria to make sure that uuid is set
+
+Signed-off-by: Edward Shishkin
+
+Origin: upstream,