* Thu Aug 23 2007 Eric Sandeen <esandeen@redhat.com> 1.40.2-3

- Update license tags
- Fix one open-create caller with no mode
- Protect ->open ops from glibc open-create-mode-checker
- Fix source URL
- Add gawk to BuildRequires
This commit is contained in:
Eric Sandeen 2007-08-23 22:56:33 +00:00
parent 1ac029d892
commit 49c4241563
3 changed files with 132 additions and 4 deletions

View File

@ -0,0 +1,13 @@
Index: e2fsprogs-1.40.2/lib/ext2fs/ismounted.c
===================================================================
--- e2fsprogs-1.40.2.orig/lib/ext2fs/ismounted.c
+++ e2fsprogs-1.40.2/lib/ext2fs/ismounted.c
@@ -147,7 +147,7 @@ static errcode_t check_mntent_file(const
is_root:
#define TEST_FILE "/.ismount-test-file"
*mount_flags |= EXT2_MF_ISROOT;
- fd = open(TEST_FILE, O_RDWR|O_CREAT);
+ fd = open(TEST_FILE, O_RDWR|O_CREAT, 0644);
if (fd < 0) {
if (errno == EROFS)
*mount_flags |= EXT2_MF_READONLY;

View File

@ -0,0 +1,91 @@
Index: e2fsprogs-1.40.2/debugfs/debugfs.c
===================================================================
--- e2fsprogs-1.40.2.orig/debugfs/debugfs.c
+++ e2fsprogs-1.40.2/debugfs/debugfs.c
@@ -62,7 +62,7 @@ static void open_filesystem(char *device
current_fs = NULL;
return;
}
- retval = unix_io_manager->open(data_filename, 0, &data_io);
+ retval = (unix_io_manager->open)(data_filename, 0, &data_io);
if (retval) {
com_err(data_filename, 0, "while opening data source");
current_fs = NULL;
Index: e2fsprogs-1.40.2/e2fsck/journal.c
===================================================================
--- e2fsprogs-1.40.2.orig/e2fsck/journal.c
+++ e2fsprogs-1.40.2/e2fsck/journal.c
@@ -362,7 +362,7 @@ static errcode_t e2fsck_get_journal(e2fs
#ifndef USE_INODE_IO
if (ext_journal)
#endif
- retval = io_ptr->open(journal_name, IO_FLAG_RW,
+ retval = (io_ptr->open)(journal_name, IO_FLAG_RW,
&ctx->journal_io);
if (retval)
goto errout;
Index: e2fsprogs-1.40.2/e2fsck/util.c
===================================================================
--- e2fsprogs-1.40.2.orig/e2fsck/util.c
+++ e2fsprogs-1.40.2/e2fsck/util.c
@@ -435,7 +435,7 @@ blk_t get_backup_sb(e2fsck_t ctx, ext2_f
if (!name || !manager)
goto cleanup;
- if (manager->open(name, 0, &io) != 0)
+ if ((manager->open)(name, 0, &io) != 0)
goto cleanup;
if (ext2fs_get_mem(SUPERBLOCK_SIZE, &buf))
Index: e2fsprogs-1.40.2/lib/ext2fs/initialize.c
===================================================================
--- e2fsprogs-1.40.2.orig/lib/ext2fs/initialize.c
+++ e2fsprogs-1.40.2/lib/ext2fs/initialize.c
@@ -124,7 +124,7 @@ errcode_t ext2fs_initialize(const char *
io_flags = IO_FLAG_RW;
if (flags & EXT2_FLAG_EXCLUSIVE)
io_flags |= IO_FLAG_EXCLUSIVE;
- retval = manager->open(name, io_flags, &fs->io);
+ retval = (manager->open)(name, io_flags, &fs->io);
if (retval)
goto cleanup;
fs->image_io = fs->io;
Index: e2fsprogs-1.40.2/lib/ext2fs/openfs.c
===================================================================
--- e2fsprogs-1.40.2.orig/lib/ext2fs/openfs.c
+++ e2fsprogs-1.40.2/lib/ext2fs/openfs.c
@@ -119,7 +119,7 @@ errcode_t ext2fs_open2(const char *name,
io_flags |= IO_FLAG_RW;
if (flags & EXT2_FLAG_EXCLUSIVE)
io_flags |= IO_FLAG_EXCLUSIVE;
- retval = manager->open(fs->device_name, io_flags, &fs->io);
+ retval = (manager->open)(fs->device_name, io_flags, &fs->io);
if (retval)
goto cleanup;
if (io_options &&
Index: e2fsprogs-1.40.2/lib/ext2fs/test_io.c
===================================================================
--- e2fsprogs-1.40.2.orig/lib/ext2fs/test_io.c
+++ e2fsprogs-1.40.2/lib/ext2fs/test_io.c
@@ -195,7 +195,7 @@ static errcode_t test_open(const char *n
memset(data, 0, sizeof(struct test_private_data));
data->magic = EXT2_ET_MAGIC_TEST_IO_CHANNEL;
if (test_io_backing_manager) {
- retval = test_io_backing_manager->open(name, flags,
+ retval = (test_io_backing_manager->open)(name, flags,
&data->real);
if (retval)
goto cleanup;
Index: e2fsprogs-1.40.2/misc/e2image.c
===================================================================
--- e2fsprogs-1.40.2.orig/misc/e2image.c
+++ e2fsprogs-1.40.2/misc/e2image.c
@@ -584,7 +584,7 @@ static void install_image(char *device,
exit(1);
}
- retval = io_ptr->open(device, IO_FLAG_RW, &io);
+ retval = (io_ptr->open)(device, IO_FLAG_RW, &io);
if (retval) {
com_err(device, 0, "while opening device file");
exit(1);

View File

@ -4,10 +4,12 @@
Summary: Utilities for managing the second and third extended (ext2/ext3) filesystems
Name: e2fsprogs
Version: 1.40.2
Release: 2%{?dist}
License: GPL
Release: 3%{?dist}
# License based on upstream-modified COPYING file,
# which clearly states "V2" intent.
License: GPLv2
Group: System Environment/Base
Source: ftp://download.sourceforge.net/pub/sourceforge/e2fsprogs/e2fsprogs-%{version}.tar.gz
Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Patch30: e2fsprogs-1.38-resize-inode.patch
Patch32: e2fsprogs-1.38-no_pottcdate.patch
Patch34: e2fsprogs-1.39-blkid-devmapper.patch
@ -16,12 +18,15 @@ Patch39: e2fsprogs-1.39-multilib.patch
Patch62: e2fsprogs-1.39-mkinstalldirs.patch
Patch63: e2fsprogs-1.40.2-warning-fixes.patch
Patch64: e2fsprogs-1.40.2-swapfs.patch
Patch65: e2fsprogs-1.40.2-fix-open-create-modes.patch
Patch66: e2fsprogs-1.40.2-protect-open-ops.patch
Url: http://e2fsprogs.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: e2fsprogs-libs = %{version}-%{release}, device-mapper
BuildRequires: gettext, texinfo, autoconf, automake >= 1.10, libselinux-devel
BuildRequires: libsepol-devel, gettext-devel, pkgconfig
BuildRequires: device-mapper-devel
BuildRequires: device-mapper-devel gawk
%description
The e2fsprogs package contains a number of utilities for creating,
@ -41,6 +46,10 @@ performance of an ext2 and/or ext3 filesystem.
%package libs
Summary: Ext2/3 filesystem-specific static libraries and headers
Group: Development/Libraries
# License based on upstream-modified COPYING file,
# which clearly states "V2" intent as well as other
# licenses for various libs, which also have in-source specification.
License: GPLv2 and LGPLv2 and BSD and MIT
Requires(post): /sbin/ldconfig
%description libs
@ -49,6 +58,10 @@ E2fsprogs-lib contains the libraries of the e2fsprogs package.
%package devel
Summary: Ext2/3 filesystem-specific static libraries and headers
Group: Development/Libraries
# License based on upstream-modified COPYING file,
# which clearly states [L]GPLv2 intent as well as other
# licenses for various libs, which also have in-source specification.
License: GPLv2 and LGPLv2 and BSD and MIT
Requires: e2fsprogs-libs = %{version}-%{release}
Requires(post): /sbin/install-info
Requires(postun): /sbin/install-info
@ -80,6 +93,10 @@ also want to install e2fsprogs.
%patch63 -p1 -b .warnings
# Fix ext2fs_swap_inode_full() on bigendian boxes
%patch64 -p1 -b .swapfs
# fix one open("foo", O_CREAT) caller with no mode
%patch65 -p1 -b .creatmode
# protect ->open ops from glibc open-create-mode-checker
%patch66 -p1 -b .open
%build
aclocal
autoconf
@ -230,6 +247,13 @@ exit 0
%{_mandir}/man3/uuid_unparse.3*
%changelog
* Thu Aug 23 2007 Eric Sandeen <esandeen@redhat.com> 1.40.2-3
- Update license tags
- Fix one open-create caller with no mode
- Protect ->open ops from glibc open-create-mode-checker
- Fix source URL
- Add gawk to BuildRequires
* Wed Jul 18 2007 Eric Sandeen <esandeen@redhat.com> 1.40.2-2
- Fix bug in ext2fs_swap_inode_full() on big-endian boxes