Auto sync2gitlab import of e2fsprogs-1.45.6-4.el8.src.rpm

This commit is contained in:
James Antill 2022-05-26 06:45:25 -04:00
parent 136f6f994a
commit 147e9e022c
15 changed files with 3096 additions and 1 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/e2fsprogs-1.45.6.tar.xz

View File

@ -0,0 +1,126 @@
From 2c98da4e6a3e106c340972adedc6f79c4c1969f2 Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <tytso@mit.edu>
Date: Tue, 28 Dec 2021 12:33:15 -0500
Subject: [PATCH] reisze2fs: sanity check free block group counts when
calculating minimum size
If one or more block group descriptor's free blocks count is insane,
it's possible this can lead to a infinite loop in the function
calculate_minimum_resize_size(), which is called by resize2fs -P or
resize2fs -M.
Add some sanity checks to avoid this. In the case where the file
system is corrupt, this will result in resize2fs -P reporting an
incorrect value, but that's OK, since when we try to do an actual
resize operation, resize2fs requires that the file system be freshly
checked using e2fsck.
https://github.com/tytso/e2fsprogs/issues/94
Fixes: ac94445fc01f ("resize2fs: make minimum size estimates more reliable for mounted fs")
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
resize/resize2fs.c | 13 +++++++++--
tests/r_corrupt_fs/expect | 4 ++++
tests/r_corrupt_fs/name | 1 +
tests/r_corrupt_fs/script | 45 +++++++++++++++++++++++++++++++++++++++
4 files changed, 61 insertions(+), 2 deletions(-)
create mode 100644 tests/r_corrupt_fs/expect
create mode 100644 tests/r_corrupt_fs/name
create mode 100644 tests/r_corrupt_fs/script
diff --git a/resize/resize2fs.c b/resize/resize2fs.c
index 8a3d08db..26050fec 100644
--- a/resize/resize2fs.c
+++ b/resize/resize2fs.c
@@ -2928,8 +2928,17 @@ blk64_t calculate_minimum_resize_size(ext2_filsys fs, int flags)
/* calculate how many blocks are needed for data */
data_needed = ext2fs_blocks_count(fs->super);
for (grp = 0; grp < fs->group_desc_count; grp++) {
- data_needed -= calc_group_overhead(fs, grp, old_desc_blocks);
- data_needed -= ext2fs_bg_free_blocks_count(fs, grp);
+ __u32 n = ext2fs_bg_free_blocks_count(fs, grp);
+
+ if (n > EXT2_BLOCKS_PER_GROUP(fs->super))
+ n = EXT2_BLOCKS_PER_GROUP(fs->super);
+ n += calc_group_overhead(fs, grp, old_desc_blocks);
+ if (data_needed < n) {
+ if (flags & RESIZE_DEBUG_MIN_CALC)
+ printf("file system appears inconsistent?!?\n");
+ return ext2fs_blocks_count(fs->super);
+ }
+ data_needed -= n;
}
#ifdef RESIZE2FS_DEBUG
if (flags & RESIZE_DEBUG_MIN_CALC)
diff --git a/tests/r_corrupt_fs/expect b/tests/r_corrupt_fs/expect
new file mode 100644
index 00000000..fe0f2bc4
--- /dev/null
+++ b/tests/r_corrupt_fs/expect
@@ -0,0 +1,4 @@
+mke2fs -q -F -t ext4 -o Linux -b 1024 test.img 32M
+debugfs -w -R "set_bg 1 free_blocks_count 65536" /tmp/foo.img
+resize2fs -P /tmp/foo.img
+Estimated minimum size of the filesystem: 6604
diff --git a/tests/r_corrupt_fs/name b/tests/r_corrupt_fs/name
new file mode 100644
index 00000000..ed627419
--- /dev/null
+++ b/tests/r_corrupt_fs/name
@@ -0,0 +1 @@
+resize2fs -P of a corrupted file system
diff --git a/tests/r_corrupt_fs/script b/tests/r_corrupt_fs/script
new file mode 100644
index 00000000..08af91ed
--- /dev/null
+++ b/tests/r_corrupt_fs/script
@@ -0,0 +1,45 @@
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+echo mke2fs -q -F -t ext4 -o Linux -b 1024 test.img 32M > $OUT.new
+$MKE2FS -q -F -t ext4 -o Linux -b 1024 $TMPFILE 32M >> $OUT.new 2>&1
+
+echo debugfs -w -R \"set_bg 1 free_blocks_count 65536\" /tmp/foo.img >> $OUT.new
+$DEBUGFS -w -R "set_bg 1 free_blocks_count 65536" $TMPFILE > /dev/null 2>&1
+
+if type timeout > /dev/null 2>&1 ; then
+ TIMEOUT="timeout -v 30s"
+else
+ TIMEOUT=
+fi
+
+echo resize2fs -P /tmp/foo.img >> $OUT.new
+$TIMEOUT $RESIZE2FS -P $TMPFILE >> $OUT.new 2>&1
+
+sed -f $cmd_dir/filter.sed < $OUT.new > $OUT
+
+rm -f $TMPFILE $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE OUT EXP TIMEOUT
--
2.34.1

View File

@ -0,0 +1,43 @@
From 0ec67ba5063b1fdcad4142633338c2cc98b60b5b Mon Sep 17 00:00:00 2001
From: Lukas Czerner <lczerner@redhat.com>
Date: Wed, 16 Feb 2022 11:12:28 +0100
Subject: [PATCH] tests: specify inode size in r_corrupt_fs
Inode size will have an effect on the minimum resize size and this will
have an effect on the test output. Stabilize the output by specifying
the inode size instead of relying on the system configuration.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
tests/r_corrupt_fs/expect | 2 +-
tests/r_corrupt_fs/script | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/r_corrupt_fs/expect b/tests/r_corrupt_fs/expect
index fe0f2bc4..fbc0c23e 100644
--- a/tests/r_corrupt_fs/expect
+++ b/tests/r_corrupt_fs/expect
@@ -1,4 +1,4 @@
-mke2fs -q -F -t ext4 -o Linux -b 1024 test.img 32M
+mke2fs -q -F -t ext4 -o Linux -b 1024 -I 256 test.img 32M
debugfs -w -R "set_bg 1 free_blocks_count 65536" /tmp/foo.img
resize2fs -P /tmp/foo.img
Estimated minimum size of the filesystem: 6604
diff --git a/tests/r_corrupt_fs/script b/tests/r_corrupt_fs/script
index f6d3a89d..45bbe071 100644
--- a/tests/r_corrupt_fs/script
+++ b/tests/r_corrupt_fs/script
@@ -11,8 +11,8 @@ else
EXP=$test_dir/expect
fi
-echo mke2fs -q -F -t ext4 -o Linux -b 1024 test.img 32M > $OUT.new
-$MKE2FS -q -F -t ext4 -o Linux -b 1024 $TMPFILE 32M >> $OUT.new 2>&1
+echo mke2fs -q -F -t ext4 -o Linux -b 1024 -I 256 test.img 32M > $OUT.new
+$MKE2FS -q -F -t ext4 -o Linux -b 1024 -I 256 $TMPFILE 32M >> $OUT.new 2>&1
echo debugfs -w -R \"set_bg 1 free_blocks_count 65536\" /tmp/foo.img >> $OUT.new
$DEBUGFS -w -R "set_bg 1 free_blocks_count 65536" $TMPFILE > /dev/null 2>&1
--
2.34.1

View File

@ -0,0 +1,31 @@
From af09db229f74f447aec12e440252d8a94c049f26 Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <tytso@mit.edu>
Date: Mon, 3 Jan 2022 22:45:37 -0500
Subject: [PATCH] tests: support older versions of timeout in r_corrupt_fs
Older versions of the timeout program in coreutils don't support the
-v option. (This is apparently still in use in the GNU/FreeBSD Debain
port since coreutils hasn't built successfully since Coreutils version
8.28.)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
tests/r_corrupt_fs/script | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/r_corrupt_fs/script b/tests/r_corrupt_fs/script
index 08af91ed..f6d3a89d 100644
--- a/tests/r_corrupt_fs/script
+++ b/tests/r_corrupt_fs/script
@@ -17,7 +17,7 @@ $MKE2FS -q -F -t ext4 -o Linux -b 1024 $TMPFILE 32M >> $OUT.new 2>&1
echo debugfs -w -R \"set_bg 1 free_blocks_count 65536\" /tmp/foo.img >> $OUT.new
$DEBUGFS -w -R "set_bg 1 free_blocks_count 65536" $TMPFILE > /dev/null 2>&1
-if type timeout > /dev/null 2>&1 ; then
+if timeout -v 1s true > /dev/null 2>&1 ; then
TIMEOUT="timeout -v 30s"
else
TIMEOUT=
--
2.34.1

1
EMPTY
View File

@ -1 +0,0 @@

View File

@ -0,0 +1,38 @@
From 06116f6d053e398d13634df911bcb105d0fb2416 Mon Sep 17 00:00:00 2001
From: Lukas Czerner <lczerner@redhat.com>
Date: Sun, 15 Dec 2019 12:42:28 +0100
Subject: [PATCH 1/7] Makefile.in: Disable e2scrub
e2scrub system is still new and we're not ready to support it yet, so
just disbale it and not even build it.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
Makefile.in | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index b951c017..34e2048d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -13,7 +13,6 @@ INSTALL = @INSTALL@
@DEBUGFS_CMT@DEBUGFS_DIR= debugfs
@UUID_CMT@UUID_LIB_SUBDIR= lib/uuid
@BLKID_CMT@BLKID_LIB_SUBDIR= lib/blkid
-@E2SCRUB_CMT@E2SCRUB_DIR= scrub
@ALL_CMT@SUPPORT_LIB_SUBDIR= lib/support
@ALL_CMT@E2P_LIB_SUBDIR= lib/e2p
@ALL_CMT@EXT2FS_LIB_SUBDIR= lib/ext2fs
@@ -21,8 +20,7 @@ INSTALL = @INSTALL@
LIB_SUBDIRS=lib/et lib/ss $(E2P_LIB_SUBDIR) $(UUID_LIB_SUBDIR) \
$(BLKID_LIB_SUBDIR) $(SUPPORT_LIB_SUBDIR) $(EXT2FS_LIB_SUBDIR) intl
-PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs po \
- $(E2SCRUB_DIR)
+PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs po
SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests
--
2.21.3

View File

@ -0,0 +1,45 @@
From f2bb71bdbedf33f4fae4e1402ec23fe58eece1a7 Mon Sep 17 00:00:00 2001
From: Lukas Czerner <lczerner@redhat.com>
Date: Sun, 15 Dec 2019 14:39:46 +0100
Subject: [PATCH 2/7] Revert "fuse2fs: install fuse2fs in /usr/bin instead of
/usr/sbin"
This reverts commit b71150355dca5409cf8e82a7e715e459a795bbf8.
---
debian/fuse2fs.install | 2 +-
misc/Makefile.in | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/debian/fuse2fs.install b/debian/fuse2fs.install
index 2ed4c3c0..cd37a70e 100644
--- a/debian/fuse2fs.install
+++ b/debian/fuse2fs.install
@@ -1,2 +1,2 @@
-/usr/bin/fuse2fs
+/usr/sbin/fuse2fs
/usr/share/man/man1/fuse2fs.1
diff --git a/misc/Makefile.in b/misc/Makefile.in
index 9f2a8939..216fc771 100644
--- a/misc/Makefile.in
+++ b/misc/Makefile.in
@@ -35,7 +35,7 @@ INSTALL = @INSTALL@
SPROGS= mke2fs badblocks tune2fs dumpe2fs $(BLKID_PROG) logsave \
$(E2IMAGE_PROG) @FSCK_PROG@ e2undo
USPROGS= mklost+found filefrag e2freefrag $(UUIDD_PROG) \
- $(E4DEFRAG_PROG) $(E4CRYPT_PROG)
+ $(E4DEFRAG_PROG) $(E4CRYPT_PROG) $(FUSE_PROG)
SMANPAGES= tune2fs.8 mklost+found.8 mke2fs.8 dumpe2fs.8 badblocks.8 \
e2label.8 $(FINDFS_MAN) $(BLKID_MAN) $(E2IMAGE_MAN) \
logsave.8 filefrag.8 e2freefrag.8 e2undo.8 \
@@ -43,7 +43,7 @@ SMANPAGES= tune2fs.8 mklost+found.8 mke2fs.8 dumpe2fs.8 badblocks.8 \
e2mmpstatus.8
FMANPAGES= mke2fs.conf.5 ext4.5
-UPROGS= chattr lsattr $(FUSE_PROG) @UUID_CMT@ uuidgen
+UPROGS= chattr lsattr @UUID_CMT@ uuidgen
UMANPAGES= chattr.1 lsattr.1 @UUID_CMT@ uuidgen.1
UMANPAGES+= @FUSE_CMT@ fuse2fs.1
--
2.21.3

View File

@ -0,0 +1,86 @@
From cdbe6f07c929b0c9a80b7fbeb61b3a9f66015085 Mon Sep 17 00:00:00 2001
From: Lukas Czerner <lczerner@redhat.com>
Date: Tue, 14 Jan 2020 09:49:31 +0100
Subject: [PATCH 6/7] Revert "libext2fs: hide struct ext2fs_hashmap as an
internal implementation detail"
This reverts commit ef54444e6d1da4b464c11e749c9643ed945a770b
because it breaks ABI.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
lib/ext2fs/hashmap.c | 16 ----------------
lib/ext2fs/hashmap.h | 30 +++++++++++++++++++++---------
2 files changed, 21 insertions(+), 25 deletions(-)
diff --git a/lib/ext2fs/hashmap.c b/lib/ext2fs/hashmap.c
index ffe61ce9..3d8ee814 100644
--- a/lib/ext2fs/hashmap.c
+++ b/lib/ext2fs/hashmap.c
@@ -1,22 +1,6 @@
#include "hashmap.h"
#include <string.h>
-struct ext2fs_hashmap {
- uint32_t size;
- uint32_t(*hash)(const void *key, size_t len);
- void(*free)(void*);
- struct ext2fs_hashmap_entry *first;
- struct ext2fs_hashmap_entry *last;
-#if __GNUC_PREREQ (4, 8)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-#endif
- struct ext2fs_hashmap_entry *entries[0];
-#if __GNUC_PREREQ (4, 8)
-#pragma GCC diagnostic pop
-#endif
-};
-
uint32_t ext2fs_djb2_hash(const void *str, size_t size)
{
int c;
diff --git a/lib/ext2fs/hashmap.h b/lib/ext2fs/hashmap.h
index dcfa7455..656d3d90 100644
--- a/lib/ext2fs/hashmap.h
+++ b/lib/ext2fs/hashmap.h
@@ -13,15 +13,27 @@
#endif
#endif
-struct ext2fs_hashmap;
-
-struct ext2fs_hashmap_entry {
- void *data;
- const void *key;
- size_t key_len;
- struct ext2fs_hashmap_entry *next;
- struct ext2fs_hashmap_entry *list_next;
- struct ext2fs_hashmap_entry *list_prev;
+struct ext2fs_hashmap {
+ uint32_t size;
+ uint32_t(*hash)(const void *key, size_t len);
+ void(*free)(void*);
+ struct ext2fs_hashmap_entry *first;
+ struct ext2fs_hashmap_entry *last;
+ struct ext2fs_hashmap_entry {
+ void *data;
+ const void *key;
+ size_t key_len;
+ struct ext2fs_hashmap_entry *next;
+ struct ext2fs_hashmap_entry *list_next;
+ struct ext2fs_hashmap_entry *list_prev;
+#if __GNUC_PREREQ (4, 8)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic"
+#endif
+ } *entries[0];
+#if __GNUC_PREREQ (4, 8)
+#pragma GCC diagnostic pop
+#endif
};
struct ext2fs_hashmap *ext2fs_hashmap_create(
--
2.21.3

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,51 @@
From 9039cf5c5da439f6c65435c0a2b9ae16989940e1 Mon Sep 17 00:00:00 2001
From: Lukas Czerner <lczerner@redhat.com>
Date: Tue, 14 Jan 2020 20:56:41 +0100
Subject: [PATCH 7/7] ext2fs: fix ABI change in the struct_ext2_filsys
structure
Upstream increased size of the struct_ext2_filsys structure by adding
new encoding member. However this represents ABI breakage within a major
RHEL release. To avoid it use some of the reserved space in the
struct_ext2_filsys structure.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
lib/ext2fs/ext2fs.h | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h
index ba83534c..32c75171 100644
--- a/lib/ext2fs/ext2fs.h
+++ b/lib/ext2fs/ext2fs.h
@@ -250,10 +250,17 @@ struct struct_ext2_filsys {
int cluster_ratio_bits;
__u16 default_bitmap_type;
__u16 pad;
+
+ /*
+ * RedHat specific change to prevent ABI change by using 8
+ * reserved bytes
+ */
+ const struct ext2fs_nls_table *encoding;
+
/*
* Reserved for future expansion
*/
- __u32 reserved[5];
+ __u32 reserved[5 - (sizeof(long int)/4)];
/*
* Reserved for the use of the calling application.
@@ -304,8 +311,6 @@ struct struct_ext2_filsys {
/* hashmap for SHA of data blocks */
struct ext2fs_hashmap* block_sha_map;
-
- const struct ext2fs_nls_table *encoding;
};
#if EXT2_FLAT_INCLUDES
--
2.21.3

View File

@ -0,0 +1,133 @@
From b46e1de31f31b9564445a094e1c9cb592062868c Mon Sep 17 00:00:00 2001
From: Lukas Czerner <lczerner@redhat.com>
Date: Wed, 18 Dec 2019 11:03:37 +0100
Subject: [PATCH 4/7] man: Add note about RHEL8 supported features and mount
options
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
misc/ext4.5.in | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
misc/mke2fs.8.in | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 96 insertions(+)
diff --git a/misc/ext4.5.in b/misc/ext4.5.in
index 1db61a5f..39b1412e 100644
--- a/misc/ext4.5.in
+++ b/misc/ext4.5.in
@@ -19,6 +19,54 @@ previously intended for use with the ext2 and ext3 file systems can be
mounted using the ext4 file system driver, and indeed in many modern
Linux distributions, the ext4 file system driver has been configured
to handle mount requests for ext2 and ext3 file systems.
+.SH RED HAT ENTERPRISE LINUX 8
+The Ext4 file system is fully supported by Red Hat when using default
+mke2fs and mount options. In addition, the following non-default mke2fs
+features and mount options are also fully supported.
+.SH "Non-default features:"
+project
+.br
+quota
+.br
+mmp
+.br
+.SH "Non-default mount options:"
+bsddf|minixdf
+.br
+grpid|bsdgroups and nogrpid|sysvgroups
+.br
+resgid=n and resuid=n
+.br
+errors={continue|remount-ro|panic}
+.br
+commit=nrsec
+.br
+max_batch_time=usec
+.br
+min_batch_time=usec
+.br
+grpquota|noquota|quota|usrquota
+.br
+prjquota
+.br
+dax
+.br
+lazytime|nolazytime
+.br
+discard|nodiscard
+.br
+init_itable|noinit_itable
+.br
+jqfmt={vfsold|vfsv0|vfsv1}
+.br
+usrjquota=aquota.user|grpjquota=aquota.group
+.PP
+For more information on features and mount options, see the
+.BR ext4
+man page. Ext4 features and mount options not listed above may not be
+fully supported by Red Hat. If your workload requires a feature or mount
+option that is not fully in this Red Hat release, contact Red Hat support
+to evaluate it for inclusion in our supported list.
.SH FILE SYSTEM FEATURES
A file system formatted for ext2, ext3, or ext4 can have some
collection of the following file system feature flags enabled. Some of
diff --git a/misc/mke2fs.8.in b/misc/mke2fs.8.in
index e6bfc6d6..6106342b 100644
--- a/misc/mke2fs.8.in
+++ b/misc/mke2fs.8.in
@@ -204,6 +204,54 @@ overridden by the options listed below, are controlled by the
configuration file. See the
.BR mke2fs.conf (5)
manual page for more details.
+.SH RED HAT ENTERPRISE LINUX 8
+The Ext4 file system is fully supported by Red Hat when using default
+mke2fs and mount options. In addition, the following non-default mke2fs
+features and mount options are also fully supported.
+.SH "Non-default features:"
+project
+.br
+quota
+.br
+mmp
+.br
+.SH "Non-default mount options:"
+bsddf|minixdf
+.br
+grpid|bsdgroups and nogrpid|sysvgroups
+.br
+resgid=n and resuid=n
+.br
+errors={continue|remount-ro|panic}
+.br
+commit=nrsec
+.br
+max_batch_time=usec
+.br
+min_batch_time=usec
+.br
+grpquota|noquota|quota|usrquota
+.br
+prjquota
+.br
+dax
+.br
+lazytime|nolazytime
+.br
+discard|nodiscard
+.br
+init_itable|noinit_itable
+.br
+jqfmt={vfsold|vfsv0|vfsv1}
+.br
+usrjquota=aquota.user|grpjquota=aquota.group
+.PP
+For more information on features and mount options, see the
+.BR ext4
+man page. Ext4 features and mount options not listed above may not be
+fully supported by Red Hat. If your workload requires a feature or mount
+option that is not fully in this Red Hat release, contact Red Hat support
+to evaluate it for inclusion in our supported list.
.SH OPTIONS
.TP
.BI \-b " block-size"
--
2.21.3

View File

@ -0,0 +1,52 @@
From 6fa8edd0fde7a540b41d78e45743208c8edab0b1 Mon Sep 17 00:00:00 2001
From: Lukas Czerner <lczerner@redhat.com>
Date: Mon, 2 Nov 2020 15:26:31 +0100
Subject: [PATCH] mke2fs: Escape double quotes when parsing mke2fs.conf
Currently, when constructing the <default> configuration pseudo-file using
the profile-to-c.awk script we will just pass the double quotes as they
appear in the mke2fs.conf.
This is problematic, because the resulting default_profile.c will either
fail to compile because of syntax error, or leave the resulting
configuration invalid.
It can be reproduced by adding the following line somewhere into
mke2fs.conf configuration and forcing mke2fs to use the <default>
configuration by specifying nonexistent mke2fs.conf
MKE2FS_CONFIG="nonexistent" ./misc/mke2fs -T ext4 /dev/device
default_mntopts = "acl,user_xattr"
^ this will fail to compile
default_mntopts = ""
^ this will result in invalid config file
Syntax error in mke2fs config file (<default>, line #4)
Unknown code prof 17
Fix it by escaping the double quotes with a backslash in
profile-to-c.awk script.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
misc/profile-to-c.awk | 1 +
1 file changed, 1 insertion(+)
diff --git a/misc/profile-to-c.awk b/misc/profile-to-c.awk
index f964efd6..814f7236 100644
--- a/misc/profile-to-c.awk
+++ b/misc/profile-to-c.awk
@@ -4,6 +4,7 @@ BEGIN {
}
{
+ gsub("\"","\\\"",$0);
printf(" \"%s\\n\"\n", $0);
}
--
2.26.3

View File

@ -0,0 +1,34 @@
From 42e4b2148a42ce35d5bc86586341a887928ec4dc Mon Sep 17 00:00:00 2001
From: Lukas Czerner <lczerner@redhat.com>
Date: Tue, 17 Dec 2019 11:24:31 +0100
Subject: [PATCH 3/7] mke2fs.conf: Introduce rhel6 and rhel7 fs_type
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
misc/mke2fs.conf.in | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/misc/mke2fs.conf.in b/misc/mke2fs.conf.in
index 01e35cf8..a533b210 100644
--- a/misc/mke2fs.conf.in
+++ b/misc/mke2fs.conf.in
@@ -14,6 +14,16 @@
features = has_journal,extent,huge_file,flex_bg,metadata_csum,64bit,dir_nlink,extra_isize
inode_size = 256
}
+ rhel6_ext4 = {
+ features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
+ inode_size = 256
+ enable_periodic_fsck = 1
+ default_mntopts = ""
+ }
+ rhel7_ext4 = {
+ features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,64bit
+ inode_size = 256
+ }
small = {
blocksize = 1024
inode_size = 128
--
2.21.3

1034
e2fsprogs.spec Normal file

File diff suppressed because it is too large Load Diff

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (e2fsprogs-1.45.6.tar.xz) = f3abfb6fe7ef632bb81152e2127d601cadd3fa93162178576a1d5ed82c2286627184b207b85a5b2a1793db0addf0885dfc3b9523bb340443224caf9c6d613b84