rpms/e2fsprogs/F-12 e2fsprogs-1.41.9-dlopen-fix.patch, NONE, 1.1 e2fsprogs-1.41.9-resize-array.patch, NONE, 1.1 e2fsprogs-1.41.9-s_jnl_blocks-swap.patch, NONE, 1.1 e2fsprogs.spec, 1.153, 1.154

Eric Sandeen sandeen at fedoraproject.org
Tue Jan 26 05:02:05 UTC 2010


Author: sandeen

Update of /cvs/pkgs/rpms/e2fsprogs/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv12725

Modified Files:
	e2fsprogs.spec 
Added Files:
	e2fsprogs-1.41.9-dlopen-fix.patch 
	e2fsprogs-1.41.9-resize-array.patch 
	e2fsprogs-1.41.9-s_jnl_blocks-swap.patch 
Log Message:
* Sat Jan 23 2010 Eric Sandeen <sandeen at redhat.com> 1.41.9-6
- Turn make check back on
- Fix up journal swap issue on ppc
- Fix dlopen issues for newer libreadline
- Fix access beyond end of array in resize2fs


e2fsprogs-1.41.9-dlopen-fix.patch:
 get_readline.c |    2 +-
 invocation.c   |    1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

--- NEW FILE e2fsprogs-1.41.9-dlopen-fix.patch ---
commit 06ef971be505678ee462ae1844204ed24f14aedc
Author: Theodore Ts'o <tytso at mit.edu>
Date:   Thu Nov 12 17:54:45 2009 -0500

    libss: initialize function pointer for readline_shutdown()

    Clear the function pointer for readline_shutdown() so that if libss is
    linking against a readline library which doesn't supply a
    readline_shutdown() function, ss_delete_invocation() won't seg fault.

    Thanks to Solar Designer <solar at openwall.com> for reporting this
    problem to me.

    Signed-off-by: "Theodore Ts'o" <tytso at mit.edu>

libss: add newer libreadline to dlopen path

Rawhide now has libreadline.so.6 ... add it to the ever-expanding
list of libs to look for.

Unfortunately without commit 06ef971be505678ee462ae1844204ed24f14aedc
this fails in a rather cryptic way.

Signed-off-by: Eric Sandeen <sandeen at redhat.com>
---

Index: e2fsprogs-1.41.9/lib/ss/invocation.c
===================================================================
--- e2fsprogs-1.41.9.orig/lib/ss/invocation.c
+++ e2fsprogs-1.41.9/lib/ss/invocation.c
@@ -71,6 +71,7 @@ int ss_create_invocation(subsystem_name,
 	*(new_table->rqt_tables+1) = (ss_request_table *) NULL;
 
 	new_table->readline_handle = 0;
+	new_table->readline_shutdown = 0;
 	new_table->readline = 0;
 	new_table->add_history = 0;
 	new_table->redisplay = 0;
Index: e2fsprogs-1.41.9/lib/ss/get_readline.c
===================================================================
--- e2fsprogs-1.41.9.orig/lib/ss/get_readline.c
+++ e2fsprogs-1.41.9/lib/ss/get_readline.c
@@ -36,7 +36,7 @@ static void ss_release_readline(ss_data 
 }
 
 /* Libraries we will try to use for readline/editline functionality */
-#define DEFAULT_LIBPATH "libreadline.so.5:libreadline.so.4:libreadline.so:libedit.so.2:libedit.so:libeditline.so.0:libeditline.so"
+#define DEFAULT_LIBPATH "libreadline.so.6:libreadline.so.5:libreadline.so.4:libreadline.so:libedit.so.2:libedit.so:libeditline.so.0:libeditline.so"
 
 void ss_get_readline(int sci_idx)
 {


e2fsprogs-1.41.9-resize-array.patch:
 resize2fs.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

--- NEW FILE e2fsprogs-1.41.9-resize-array.patch ---
Index: e2fsprogs-1.41.9/resize/resize2fs.c
===================================================================
--- e2fsprogs-1.41.9.orig/resize/resize2fs.c
+++ e2fsprogs-1.41.9/resize/resize2fs.c
@@ -1818,9 +1818,6 @@ static errcode_t ext2fs_calculate_summar
 			fs->group_desc[group].bg_free_blocks_count =
 				group_free;
 			ext2fs_group_desc_csum_set(fs, group);
-			group++;
-			count = 0;
-			group_free = 0;
 			uninit = (fs->group_desc[group].bg_flags &
 				  EXT2_BG_BLOCK_UNINIT);
 			ext2fs_super_and_bgd_loc(fs, group, &super_blk,
@@ -1832,6 +1829,9 @@ static errcode_t ext2fs_calculate_summar
 			else
 				old_desc_blocks = fs->desc_blocks +
 					fs->super->s_reserved_gdt_blocks;
+			group++;
+			count = 0;
+			group_free = 0;
 		}
 	}
 	fs->super->s_free_blocks_count = total_free;
@@ -1858,11 +1858,11 @@ static errcode_t ext2fs_calculate_summar
 			fs->group_desc[group].bg_free_inodes_count =
 				group_free;
 			ext2fs_group_desc_csum_set(fs, group);
+			uninit = (fs->group_desc[group].bg_flags &
+				  EXT2_BG_INODE_UNINIT);
 			group++;
 			count = 0;
 			group_free = 0;
-			uninit = (fs->group_desc[group].bg_flags &
-				  EXT2_BG_INODE_UNINIT);
 		}
 	}
 	fs->super->s_free_inodes_count = total_free;

e2fsprogs-1.41.9-s_jnl_blocks-swap.patch:
 swapfs.c |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

--- NEW FILE e2fsprogs-1.41.9-s_jnl_blocks-swap.patch ---
libext2fs: don't swap extent-based journal backup on read

The f_illitable_flexbg test was failing on ppc, because
e2fsck_move_ext3_journal is doing a direct memcmp of i_block with 
s_jnl_blocks, and failing.

This is because we don't swap extent data on read from disk; rather
we do it when we access the extents.  However, ext2fs_swap_super
was swapping s_jnl_blocks unconditionally, so these didn't match.

Looks like we need to treat s_jnl_blocks the same as i_block, and
swap it on access, not on read.  Except for the last i_size bit...

Signed-off-by: Eric Sandeen <sandeen at redhat.com>
---

diff --git a/lib/ext2fs/swapfs.c b/lib/ext2fs/swapfs.c
index 42bc01e..38f5f9b 100644
--- a/lib/ext2fs/swapfs.c
+++ b/lib/ext2fs/swapfs.c
@@ -73,9 +73,19 @@ void ext2fs_swap_super(struct ext2_super_block * sb)
 	sb->s_kbytes_written = ext2fs_swab64(sb->s_kbytes_written);
 	for (i=0; i < 4; i++)
 		sb->s_hash_seed[i] = ext2fs_swab32(sb->s_hash_seed[i]);
+
+	/* if journal backup is for a valid extent-based journal... */
+	if (!ext2fs_extent_header_verify(sb->s_jnl_blocks,
+					 sizeof(sb->s_jnl_blocks))) {
+		/* ... swap only the journal i_size */
+		sb->s_jnl_blocks[16] = ext2fs_swab32(sb->s_jnl_blocks[16]);
+		/* and the extent data is not swapped on read */
+		return;
+	}
+
+	/* direct/indirect journal: swap it all */
 	for (i=0; i < 17; i++)
 		sb->s_jnl_blocks[i] = ext2fs_swab32(sb->s_jnl_blocks[i]);
-
 }
 
 void ext2fs_swap_group_desc(struct ext2_group_desc *gdp)


--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



Index: e2fsprogs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/e2fsprogs/F-12/e2fsprogs.spec,v
retrieving revision 1.153
retrieving revision 1.154
diff -u -p -r1.153 -r1.154
--- e2fsprogs.spec	19 Oct 2009 17:59:17 -0000	1.153
+++ e2fsprogs.spec	26 Jan 2010 05:02:05 -0000	1.154
@@ -4,7 +4,7 @@
 Summary: Utilities for managing ext2, ext3, and ext4 filesystems
 Name: e2fsprogs
 Version: 1.41.9
-Release: 5%{?dist}
+Release: 6%{?dist}
 
 # License tags based on COPYING file distinctions for various components
 License: GPLv2
@@ -15,6 +15,9 @@ Source1: ext2_types-wrapper.h
 Patch2: e2fsprogs-1.40.4-sb_feature_check_ignore.patch
 Patch4: e2fsprogs-resize-minimum-fix.patch
 Patch5: e2fsprogs-1.41.9-24hr-fsck-grace.patch
+Patch6: e2fsprogs-1.41.9-s_jnl_blocks-swap.patch
+Patch7: e2fsprogs-1.41.9-resize-array.patch
+Patch8: e2fsprogs-1.41.9-dlopen-fix.patch
 
 Url: http://e2fsprogs.sourceforge.net/
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -142,11 +145,14 @@ It was originally inspired by the Multic
 %patch2 -p1 -b .featurecheck
 %patch4 -p1 -b .resize
 %patch5 -p1 -b .24h
+%patch6 -p1 -b .swap
+%patch7 -p1 -b .resize2
+%patch8 -p1 -b .dlopen
 
 %build
 %configure --enable-elf-shlibs --enable-nls --disable-uuidd --disable-fsck \
 	   --disable-e2initrd-helper --disable-libblkid --disable-libuuid
-make %{?_smp_mflags} V=1
+make %{?_smp_mflags}
 
 %install
 rm -rf %{buildroot}
@@ -166,7 +172,7 @@ install -p -m 644 %{SOURCE1} %{buildroot
 %find_lang %{name}
 
 %check
-# make check
+make check
 
 %clean
 rm -rf %{buildroot}
@@ -299,6 +305,12 @@ exit 0
 %{_libdir}/pkgconfig/ss.pc
 
 %changelog
+* Sat Jan 23 2010 Eric Sandeen <sandeen at redhat.com> 1.41.9-6
+- Turn make check back on
+- Fix up journal swap issue on ppc
+- Fix dlopen issues for newer libreadline
+- Fix access beyond end of array in resize2fs
+
 * Mon Oct 19 2009 Eric Sandeen <sandeen at redhat.com> 1.41.9-5
 - Allow superblock timestamp differences up to 24h (#522969)
 



More information about the scm-commits mailing list