[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#985595: unblock: reiser4progs/1.2.1-3



Package: release.debian.org
Severity: normal
User: release.debian.org@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.000000000 +0200
+++ reiser4progs-1.2.1/debian/changelog	2021-03-20 15:02:23.000000000 +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 <fzielcke@z-51.de>  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 <fzielcke@z-51.de>  Fri, 24 Jul 2020 08:21:25 +0200
+ -- Felix Zielcke <fzielcke@z-51.de>  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.000000000 +0200
+++ reiser4progs-1.2.1/debian/control	2020-07-24 08:25:43.000000000 +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.000000000 +0100
+++ reiser4progs-1.2.1/debian/patches/fix_null_uuid.patch	2021-03-20 14:58:26.000000000 +0100
@@ -0,0 +1,52 @@
+Author: Mike Fleetwood <mike.fleetwood@googlemail.com>
+Date:   Mon Mar 15 21:09:17 2021 +0000
+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 '<none>' && 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-922200000000
+    [35] uuid:              d604794d-097f-4810-bbb3-01a1518f3ef1
+    [36] uuid:              9634100c-1f98-42b3-a684-c9df77ab54e2
+    [37] uuid:              <none>
+
+Signed-off-by: Mike Fleetwood <mike.fleetwood@googlemail.com>
+
+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.000000000 +0100
+++ reiser4progs-1.2.1/debian/patches/fix_print_uuid.patch	2021-03-20 14:57:41.000000000 +0100
@@ -0,0 +1,42 @@
+Author: Edward Shishkin <edward.shishkin@gmail.com>
+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 <edward.shishkin@gmail.com>
+
+Origin: upstream, https://github.com/edward6/reiser4progs/commit/4802cdb18ae03031d0e51a58b6655f3b99021ec2
+Bug-Debian: https://bugs.debian.org/985586
+
+diff --git a/librepair/master.c b/librepair/master.c
+index c7806c566..dadf21a3c 100644
+--- a/librepair/master.c
++++ b/librepair/master.c
+@@ -4,6 +4,14 @@
+    librepair/master.c - methods are needed for work with broken master 
+    super block. */
+ 
++#ifdef HAVE_CONFIG_H
++#  include <config.h>
++#endif
++
++#if defined(HAVE_LIBUUID) && defined(HAVE_UUID_UUID_H)
++#  include <uuid/uuid.h>
++#endif
++
+ #include <repair/librepair.h>
+ 
+ /* Checks the blocksize. */
+@@ -347,9 +355,9 @@ void repair_master_print(reiser4_master_t *master,
+ 			  pid, plug ? plug->label : "absent");
+ 
+ #if defined(HAVE_LIBUUID) && defined(HAVE_UUID_UUID_H)
+-	if (*master->ent.ms_uuid != '\0') {
++	if (!uuid_is_null((unsigned char *)master->ent.ms_uuid)) {
+ 		char uuid[37];
+-		
++
+ 		uuid[36] = '\0';
+ 		unparse(reiser4_master_get_uuid(master), uuid);
+ 		aal_stream_format(stream, "uuid:\t\t%s\n", uuid);
diff -Nru reiser4progs-1.2.1/debian/patches/series reiser4progs-1.2.1/debian/patches/series
--- reiser4progs-1.2.1/debian/patches/series	2020-07-24 08:17:51.000000000 +0200
+++ reiser4progs-1.2.1/debian/patches/series	2021-03-20 14:46:10.000000000 +0100
@@ -1,3 +1,5 @@
 fix_ldconfig.patch
 05_libreiser4~profile.c.patch
 Build-with-libedit-instead-of-readline.patch
+fix_print_uuid.patch
+fix_null_uuid.patch

Reply to: