Rev openSUSE:Factory/15 Md5 151b39310bfd9a685901921947cc5998 2007-07-26 23:24:33 unknown None

This commit is contained in:
OBS User unknown 2007-07-26 23:24:33 +00:00 committed by Git OBS Bridge
parent fe0a7532e9
commit b24af7fab4
5 changed files with 112 additions and 73 deletions

View File

@ -0,0 +1,32 @@
commit db9097caca17401313c0dc840b4ae683e5b5c1df
Author: Eric Sandeen <sandeen@redhat.com>
Date: Tue Jul 17 20:40:25 2007 -0500
Fix big-endian byte-swapping bug in ext2fs_swap_inode_full()
We need to set t->i_file_acl before we test it in
ext2fs_inode_data_blocks()
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
diff --git a/lib/ext2fs/swapfs.c b/lib/ext2fs/swapfs.c
index a40caa9..6576c59 100644
--- a/lib/ext2fs/swapfs.c
+++ b/lib/ext2fs/swapfs.c
@@ -150,6 +150,7 @@ void ext2fs_swap_inode_full(ext2_filsys fs, struct ext2_inode_large *t,
t->i_dtime = ext2fs_swab32(f->i_dtime);
t->i_gid = ext2fs_swab16(f->i_gid);
t->i_links_count = ext2fs_swab16(f->i_links_count);
+ t->i_file_acl = ext2fs_swab32(f->i_file_acl);
if (hostorder)
has_data_blocks = ext2fs_inode_data_blocks(fs,
(struct ext2_inode *) f);
@@ -158,7 +159,6 @@ void ext2fs_swap_inode_full(ext2_filsys fs, struct ext2_inode_large *t,
has_data_blocks = ext2fs_inode_data_blocks(fs,
(struct ext2_inode *) t);
t->i_flags = ext2fs_swab32(f->i_flags);
- t->i_file_acl = ext2fs_swab32(f->i_file_acl);
t->i_dir_acl = ext2fs_swab32(f->i_dir_acl);
if (!islnk || has_data_blocks ) {
for (i = 0; i < EXT2_N_BLOCKS; i++)

View File

@ -1,65 +0,0 @@
Index: e2fsprogs-1.40/lib/blkid/probe.c
===================================================================
--- e2fsprogs-1.40.orig/lib/blkid/probe.c
+++ e2fsprogs-1.40/lib/blkid/probe.c
@@ -148,6 +148,39 @@ static void get_ext2_info(blkid_dev dev,
set_uuid(dev, es->s_uuid, 0);
}
+static int probe_ext4(struct blkid_probe *probe,
+ struct blkid_magic *id __BLKID_ATTR((unused)),
+ unsigned char *buf)
+{
+ struct ext2_super_block *es;
+ es = (struct ext2_super_block *)buf;
+
+ /* Distinguish between jbd and ext2/3 fs */
+ if (blkid_le32(es->s_feature_incompat) &
+ EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)
+ return -BLKID_ERR_PARAM;
+
+ /* Distinguish between ext3 and ext2 */
+ if (!(blkid_le32(es->s_feature_compat) &
+ EXT3_FEATURE_COMPAT_HAS_JOURNAL))
+ return -BLKID_ERR_PARAM;
+
+ /* Distinguish between ext4 and ext3 */
+ if (!(blkid_le32(es->s_feature_incompat) &
+ EXT3_FEATURE_INCOMPAT_EXTENTS))
+ return -BLKID_ERR_PARAM;
+
+ get_ext2_info(probe->dev, buf);
+
+ if ((es->s_feature_incompat & EXT3_FEATURE_COMPAT_HAS_JOURNAL) &&
+ !uuid_is_null(es->s_journal_uuid))
+ set_uuid(probe->dev, es->s_journal_uuid, "EXT_JOURNAL");
+
+ blkid_set_tag(probe->dev, "SEC_TYPE", "ext2", sizeof("ext2"));
+
+ return 0;
+}
+
static int probe_ext3(struct blkid_probe *probe,
struct blkid_magic *id __BLKID_ATTR((unused)),
unsigned char *buf)
@@ -830,6 +863,7 @@ static struct blkid_magic type_array[] =
/* type kboff sboff len magic probe */
{ "oracleasm", 0, 32, 8, "ORCLDISK", probe_oracleasm },
{ "ntfs", 0, 3, 8, "NTFS ", probe_ntfs },
+ { "ext4dev", 1, 0x38, 2, "\123\357", probe_ext4 },
{ "jbd", 1, 0x38, 2, "\123\357", probe_jbd },
{ "ext3", 1, 0x38, 2, "\123\357", probe_ext3 },
{ "ext2", 1, 0x38, 2, "\123\357", probe_ext2 },
Index: e2fsprogs-1.40/lib/blkid/probe.h
===================================================================
--- e2fsprogs-1.40.orig/lib/blkid/probe.h
+++ e2fsprogs-1.40/lib/blkid/probe.h
@@ -87,6 +87,8 @@ struct ext2_super_block {
#define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x00000004
#define EXT3_FEATURE_INCOMPAT_RECOVER 0x00000004
#define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x00000008
+#define EXT3_FEATURE_INCOMPAT_EXTENTS 0x00000040
+
struct xfs_super_block {
unsigned char xs_magic[4];

View File

@ -0,0 +1,33 @@
# bk@suse.de:
# This patch is just here to silence the (in this case) stupid gcc warning,
# where gcc says that b is used uninitialized. "may" whould have been more
# correct, but even that is wrong because as block_ind_bmap() where the
# uninitialized access could have happened, is declared static and both
# callers which gcc warns about call block_ind_bmap() with flags & ~BMAP_SET,
# which means that
# if (flags & BMAP_SET) {
# b = *ret_blk;
# which is the line which gcc offends, is never reached, so that's a clearly
# bogus "is using uninitialized" warning. Anyway, to prevent others from
# investgating again, just initialize them:
#
--- lib/ext2fs/bmap.c
+++ lib/ext2fs/bmap.c
@@ -99,7 +99,7 @@ static _BMAP_INLINE_ errcode_t block_din
int *blocks_alloc,
blk_t nr, blk_t *ret_blk)
{
- blk_t b;
+ blk_t b = 0;
errcode_t retval;
blk_t addr_per_block;
@@ -119,7 +119,7 @@ static _BMAP_INLINE_ errcode_t block_tin
int *blocks_alloc,
blk_t nr, blk_t *ret_blk)
{
- blk_t b;
+ blk_t b = 0;
errcode_t retval;
blk_t addr_per_block;

View File

@ -1,3 +1,22 @@
-------------------------------------------------------------------
Thu Jul 26 12:35:50 CEST 2007 - mkoenig@suse.de
- Fix big-endian byte-swapping bug in ext2fs_swap_inode_full()
e2fsprogs-1.40-be_swap_fix.patch
-------------------------------------------------------------------
Wed Jul 25 17:30:25 CEST 2007 - bk@suse.de
- e2fsprogs requires libext2fs2 of the same version number to work
- enable make check and make gcc-wall in %check (executed last)
- shut up bogus gcc warning for use of uninitialised variables
-------------------------------------------------------------------
Wed Jul 25 11:18:46 CEST 2007 - mkoenig@suse.de
- remove e2fsprogs-blkid_probe_ext4.patch
broken and it is way too early to support
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jul 18 16:53:21 CEST 2007 - mkoenig@suse.de Wed Jul 18 16:53:21 CEST 2007 - mkoenig@suse.de

View File

@ -11,7 +11,9 @@
# norootforbuild # norootforbuild
Name: e2fsprogs Name: e2fsprogs
%define no_command_hiding 1 # This breaks make check and changes the Makefiles at other places too,
# do not use for production builds until it's carefully reviewed:
%define no_command_hiding 0
BuildRequires: libvolume_id-devel BuildRequires: libvolume_id-devel
License: GPL v2 or later License: GPL v2 or later
Group: System/Filesystems Group: System/Filesystems
@ -19,7 +21,7 @@ Supplements: filesystem(ext2) filesystem(ext3)
PreReq: %install_info_prereq PreReq: %install_info_prereq
Autoreqprov: on Autoreqprov: on
Version: 1.40.2 Version: 1.40.2
Release: 1 Release: 4
Summary: Utilities for the Second Extended File System Summary: Utilities for the Second Extended File System
URL: http://e2fsprogs.sourceforge.net URL: http://e2fsprogs.sourceforge.net
Source: %{name}-%{version}.tar.bz2 Source: %{name}-%{version}.tar.bz2
@ -41,8 +43,9 @@ Patch13: e2fsprogs-special_make_targets.patch
Patch15: e2fsprogs-1.39-uuid_duplicates.patch Patch15: e2fsprogs-1.39-uuid_duplicates.patch
Patch16: e2fsprogs-1.39-resize2fs_manpage.patch Patch16: e2fsprogs-1.39-resize2fs_manpage.patch
Patch17: e2fsprogs-strncat.patch Patch17: e2fsprogs-strncat.patch
Patch19: e2fsprogs-blkid_probe_ext4.patch
Patch20: e2fsprogs-blkid_probe_hfsplus.patch Patch20: e2fsprogs-blkid_probe_hfsplus.patch
Patch21: e2fsprogs-uninitialized.diff
Patch22: e2fsprogs-1.40-be_swap_fix.patch
# libcom_err patches # libcom_err patches
Patch30: libcom_err-no-static-buffer.patch Patch30: libcom_err-no-static-buffer.patch
Patch31: libcom_err-no-init_error_table.patch Patch31: libcom_err-no-init_error_table.patch
@ -52,6 +55,7 @@ Patch34: libcom_err-compile_et_permissions.patch
# Do not suppress make commands # Do not suppress make commands
Patch99: e2fsprogs-no_cmd_hiding.patch Patch99: e2fsprogs-no_cmd_hiding.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: libext2fs2 = %{version} libcom_err2 = %{version} libuuid1 = %{version} libblkid1 = %{version}
%description %description
Utilities needed to create and maintain ext2 and ext3 file systems Utilities needed to create and maintain ext2 and ext3 file systems
@ -227,15 +231,16 @@ Authors:
%patch15 -p1 %patch15 -p1
%patch16 %patch16
%patch17 -p1 %patch17 -p1
%patch19 -p1
%patch20 -p1 %patch20 -p1
%patch21
%patch22 -p1
# libcom_err patches # libcom_err patches
%patch30 -p1 %patch30 -p1
%patch31 -p1 %patch31 -p1
%patch32 -p1 %patch32 -p1
%patch33 -p1 %patch33 -p1
%patch34 -p1 %patch34 -p1
%if no_command_hiding %if %{no_command_hiding}
%patch99 %patch99
%endif %endif
cp %{S:1} po cp %{S:1} po
@ -256,10 +261,8 @@ patch -p0 -i %{P:13}
--enable-elf-shlibs \ --enable-elf-shlibs \
--disable-evms \ --disable-evms \
--with-ldopts=-pthread \ --with-ldopts=-pthread \
CFLAGS="$RPM_OPT_FLAGS" CFLAGS="$RPM_OPT_FLAGS -fsigned-char"
make make
#make check
#make gcc-wall
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
@ -267,6 +270,13 @@ make install install-libs DESTDIR=$RPM_BUILD_ROOT lib=%{_lib}
%{find_lang} %{name} %{find_lang} %{name}
rm $RPM_BUILD_ROOT%{_libdir}/e2initrd_helper rm $RPM_BUILD_ROOT%{_libdir}/e2initrd_helper
%check
%if !%{no_command_hiding}
# always run make check when e2fsprogs-no_cmd_hiding.patch is fixed!
make check ||
make gcc-wall
%endif
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
@ -410,6 +420,16 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man3/com_err.3.gz %{_mandir}/man3/com_err.3.gz
%changelog %changelog
* Thu Jul 26 2007 - mkoenig@suse.de
- Fix big-endian byte-swapping bug in ext2fs_swap_inode_full()
e2fsprogs-1.40-be_swap_fix.patch
* Wed Jul 25 2007 - bk@suse.de
- e2fsprogs requires libext2fs2 of the same version number to work
- enable make check and make gcc-wall in %%check (executed last)
- shut up bogus gcc warning for use of uninitialised variables
* Wed Jul 25 2007 - mkoenig@suse.de
- remove e2fsprogs-blkid_probe_ext4.patch
broken and it is way too early to support
* Wed Jul 18 2007 - mkoenig@suse.de * Wed Jul 18 2007 - mkoenig@suse.de
- update to version 1.40.2 - update to version 1.40.2
bugfix release bugfix release