diff --git a/SOURCES/e2fsprogs-1.42.10-Fix-nroff-macro-issue-in-chattr-man-page.patch b/SOURCES/e2fsprogs-1.42.10-Fix-nroff-macro-issue-in-chattr-man-page.patch new file mode 100644 index 0000000..7b0a257 --- /dev/null +++ b/SOURCES/e2fsprogs-1.42.10-Fix-nroff-macro-issue-in-chattr-man-page.patch @@ -0,0 +1,31 @@ +From 6883c622c9971fb8f9fb6d5a8839fc2b0199d918 Mon Sep 17 00:00:00 2001 +From: Theodore Ts'o +Date: Thu, 10 Jul 2014 00:47:40 -0400 +Subject: [PATCH] Fix nroff macro issue in chattr man page + +The single quote character must not be in the first character in a +line, or else it can get mistaken as a macro call. + +Signed-off-by: Theodore Ts'o +--- + misc/chattr.1.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/misc/chattr.1.in b/misc/chattr.1.in +index 23b6938..75b3ed8 100644 +--- a/misc/chattr.1.in ++++ b/misc/chattr.1.in +@@ -22,8 +22,8 @@ changes the file attributes on a Linux file system. + The format of a symbolic mode is +-=[aAcCdDeijsStTu]. + .PP + The operator '+' causes the selected attributes to be added to the +-existing attributes of the files; '-' causes them to be removed; and +-'=' causes them to be the only attributes that the files have. ++existing attributes of the files; '-' causes them to be removed; and '=' ++causes them to be the only attributes that the files have. + .PP + The letters 'aAcCdDeijsStTu' select the new attributes for the files: + append only (a), +-- +2.7.4 + diff --git a/SOURCES/e2fsprogs-1.43.3-libext2fs-don-t-ignore-fsync-errors.patch b/SOURCES/e2fsprogs-1.43.3-libext2fs-don-t-ignore-fsync-errors.patch new file mode 100644 index 0000000..af1b509 --- /dev/null +++ b/SOURCES/e2fsprogs-1.43.3-libext2fs-don-t-ignore-fsync-errors.patch @@ -0,0 +1,87 @@ +From 2ded6409b3a22e68c19236153f0456e1c079d0da Mon Sep 17 00:00:00 2001 +From: Eric Sandeen +Date: Tue, 20 Dec 2016 09:23:29 -0600 +Subject: [PATCH] libext2fs: don't ignore fsync errors + +Today, if mke2fs experiences IO errors (say, on a thin device +which filled up during mkfs), mke2fs is silent and returns +success even though the filesystem was not properly created. + +Catch errors from the io_channel_flush() callchain to +fix this up. Fix formatting of the printed error as +well: + +... +Creating journal (262144 blocks): done +Writing superblocks and filesystem accounting information: +Warning, had trouble writing out superblocks. +# echo $? +5 + +Signed-off-by: Eric Sandeen +Signed-off-by: Theodore Ts'o +--- + lib/ext2fs/closefs.c | 10 ++++++++-- + lib/ext2fs/unix_io.c | 3 ++- + misc/mke2fs.c | 2 +- + 3 files changed, 11 insertions(+), 4 deletions(-) + +diff --git a/lib/ext2fs/closefs.c b/lib/ext2fs/closefs.c +index a73c53f..000ebd8 100644 +--- a/lib/ext2fs/closefs.c ++++ b/lib/ext2fs/closefs.c +@@ -410,16 +410,22 @@ write_primary_superblock_only: + ext2fs_swap_super(super_shadow); + #endif + +- if (!(flags & EXT2_FLAG_FLUSH_NO_SYNC)) ++ if (!(flags & EXT2_FLAG_FLUSH_NO_SYNC)) { + retval = io_channel_flush(fs->io); ++ if (retval) ++ goto errout; ++ } + retval = write_primary_superblock(fs, super_shadow); + if (retval) + goto errout; + + fs->flags &= ~EXT2_FLAG_DIRTY; + +- if (!(flags & EXT2_FLAG_FLUSH_NO_SYNC)) ++ if (!(flags & EXT2_FLAG_FLUSH_NO_SYNC)) { + retval = io_channel_flush(fs->io); ++ if (retval) ++ goto errout; ++ } + errout: + fs->super->s_state = fs_state; + #ifdef WORDS_BIGENDIAN +diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c +index 19be630..a2069f0 100644 +--- a/lib/ext2fs/unix_io.c ++++ b/lib/ext2fs/unix_io.c +@@ -885,7 +885,8 @@ static errcode_t unix_flush(io_channel channel) + #ifndef NO_IO_CACHE + retval = flush_cached_blocks(channel, data, 0); + #endif +- fsync(data->dev); ++ if (!retval && fsync(data->dev) != 0) ++ return errno; + return retval; + } + +diff --git a/misc/mke2fs.c b/misc/mke2fs.c +index 3e3ef95..8952a5f 100644 +--- a/misc/mke2fs.c ++++ b/misc/mke2fs.c +@@ -2764,7 +2764,7 @@ no_journal: + retval = ext2fs_close(fs); + if (retval) { + fprintf(stderr, "%s", +- _("\nWarning, had trouble writing out superblocks.")); ++ _("\nWarning, had trouble writing out superblocks.\n")); + } else if (!quiet) { + printf("%s", _("done\n\n")); + if (!getenv("MKE2FS_SKIP_CHECK_MSG")) +-- +2.7.4 + diff --git a/SPECS/e2fsprogs.spec b/SPECS/e2fsprogs.spec index 9cc5b37..1b1d08c 100644 --- a/SPECS/e2fsprogs.spec +++ b/SPECS/e2fsprogs.spec @@ -1,7 +1,7 @@ Summary: Utilities for managing ext2, ext3, and ext4 filesystems Name: e2fsprogs Version: 1.42.9 -Release: 9%{?dist} +Release: 10%{?dist} # License tags based on COPYING file distinctions for various components License: GPLv2 @@ -32,6 +32,8 @@ Patch19: e2fsprogs-1.42.9-mkfs-revision-too-high.patch Patch20: e2fsprogs-1.42.9-libext2fs-avoid-buffer-overflow.patch Patch21: e2fsprogs-1.42.9-libext2fs-buffer-overflow-closefs.patch Patch22: e2fsprogs-1.42.9-resize2fs-clear-uninit-BG.patch +Patch23: e2fsprogs-1.43.3-libext2fs-don-t-ignore-fsync-errors.patch +Patch24: e2fsprogs-1.42.10-Fix-nroff-macro-issue-in-chattr-man-page.patch Url: http://e2fsprogs.sourceforge.net/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -203,6 +205,8 @@ It was originally inspired by the Multics SubSystem library. %patch20 -p1 %patch21 -p1 %patch22 -p1 +%patch23 -p1 +%patch24 -p1 %build %configure --enable-elf-shlibs --enable-nls --disable-uuidd --disable-fsck \ @@ -390,6 +394,10 @@ exit 0 %{_libdir}/pkgconfig/ss.pc %changelog +* Thu Mar 16 2017 Lukas Czerner 1.42.9-10 +- libext2fs: don't ignore fsync errors (#1405049) +- Fix nroff macro issue in chattr man page (#1429213) + * Mon Jun 13 2016 Eric Sandeen 1.42.9-9 - resize2fs: clear uninit BG if allocating from new group (#1262498)