summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs.inc2
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch34
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/xattr_ordering.patch219
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43..bb (renamed from meta/recipes-devtools/e2fsprogs/e2fsprogs_git.bb)5
4 files changed, 2 insertions, 258 deletions
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc b/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc
index 09e4ea5bb6..74e92f6b19 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc
@@ -9,7 +9,7 @@ LICENSE_e2fsprogs-mke2fs = "GPLv2"
9LICENSE_e2fsprogs-fsck = "GPLv2" 9LICENSE_e2fsprogs-fsck = "GPLv2"
10LICENSE_e2fsprogs-tune2fs = "GPLv2" 10LICENSE_e2fsprogs-tune2fs = "GPLv2"
11LICENSE_e2fsprogs-badblocks = "GPLv2" 11LICENSE_e2fsprogs-badblocks = "GPLv2"
12LIC_FILES_CHKSUM = "file://COPYING;md5=b48f21d765b875bd10400975d12c1ca2 \ 12LIC_FILES_CHKSUM = "file://NOTICE;md5=b48f21d765b875bd10400975d12c1ca2 \
13 file://lib/ext2fs/ext2fs.h;beginline=1;endline=9;md5=596a8dedcb4e731c6b21c7a46fba6bef \ 13 file://lib/ext2fs/ext2fs.h;beginline=1;endline=9;md5=596a8dedcb4e731c6b21c7a46fba6bef \
14 file://lib/e2p/e2p.h;beginline=1;endline=7;md5=8a74ade8f9d65095d70ef2d4bf48e36a \ 14 file://lib/e2p/e2p.h;beginline=1;endline=7;md5=8a74ade8f9d65095d70ef2d4bf48e36a \
15 file://lib/uuid/uuid.h.in;beginline=1;endline=32;md5=dbb8079e114a5f841934b99e59c8820a \ 15 file://lib/uuid/uuid.h.in;beginline=1;endline=32;md5=dbb8079e114a5f841934b99e59c8820a \
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch
deleted file mode 100644
index 656fb6efbd..0000000000
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1From 0a392baf1874964651115d9f77b0daa6851d1daa Mon Sep 17 00:00:00 2001
2From: Jonathan Liu <net147@gmail.com>
3Date: Tue, 1 Mar 2016 14:28:01 +1100
4Subject: [PATCH] Revert "mke2fs: enable the metadata_csum and 64bit features
5 by default"
6
7This reverts commit cd27af3ecb83e8fd1e3eaa14994284a1818c7c15 as we
8don't want to enable features by default that are not supported by
9the latest stable e2fsprogs release.
10
11Upstream-Status: Inappropriate [configuration]
12
13Signed-off-by: Jonathan Liu <net147@gmail.com>
14---
15 misc/mke2fs.conf.in | 3 ++-
16 1 file changed, 2 insertions(+), 1 deletion(-)
17
18diff --git a/misc/mke2fs.conf.in b/misc/mke2fs.conf.in
19index a049d61..106ee80 100644
20--- a/misc/mke2fs.conf.in
21+++ b/misc/mke2fs.conf.in
22@@ -11,7 +11,8 @@
23 features = has_journal
24 }
25 ext4 = {
26- features = has_journal,extent,huge_file,flex_bg,metadata_csum,64bit,dir_nlink,extra_isize
27+ features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
28+ auto_64-bit_support = 1
29 inode_size = 256
30 }
31 ext4dev = {
32--
332.7.2
34
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/xattr_ordering.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/xattr_ordering.patch
deleted file mode 100644
index 782a7b187e..0000000000
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/xattr_ordering.patch
+++ /dev/null
@@ -1,219 +0,0 @@
1From: "Darrick J. Wong" <darrick.wong@oracle.com>
2To: tytso@mit.edu, darrick.wong@oracle.com
3Cc: linux-ext4@vger.kernel.org, Darren Hart <dvhart@linux.intel.com>,
4 Richard Purdie <richard.purdie@linuxfoundation.org>
5Date: Sat, 13 Feb 2016 14:38:24 -0800
6Message-ID: <20160213223824.25381.8002.stgit@birch.djwong.org>
7In-Reply-To: <20160213223725.25381.20929.stgit@birch.djwong.org>
8References: <20160213223725.25381.20929.stgit@birch.djwong.org>
9User-Agent: StGit/0.17.1-dirty
10MIME-Version: 1.0
11Content-Type: text/plain; charset="utf-8"
12X-Source-IP: aserv0022.oracle.com [141.146.126.234]
13X-Evolution-Source: 1358860361.4566.33@ted
14Content-Transfer-Encoding: 8bit
15
16Richard Purdie reports that libext2fs doesn't sort attribute keys in
17the xattr block correctly, causing the kernel to return -ENODATA when
18querying attributes that should be there. Therefore, sort attributes
19so that whatever ends up in the xattr block is sorted according to
20what the kernel expects.
21
22Cc: Darren Hart <dvhart@linux.intel.com>
23Reported-by: Richard Purdie <richard.purdie@linuxfoundation.org>
24Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
25---
26 lib/ext2fs/ext_attr.c | 24 +++++++++++-
27 tests/d_xattr_sorting/expect | 29 ++++++++++++++
28 tests/d_xattr_sorting/name | 1
29 tests/d_xattr_sorting/script | 86 ++++++++++++++++++++++++++++++++++++++++++
30 4 files changed, 139 insertions(+), 1 deletion(-)
31 create mode 100644 tests/d_xattr_sorting/expect
32 create mode 100644 tests/d_xattr_sorting/name
33 create mode 100644 tests/d_xattr_sorting/script
34
35Upstream-Status: Submitted
36
37
38diff --git a/lib/ext2fs/ext_attr.c b/lib/ext2fs/ext_attr.c
39index 0a4f8c0..b121837 100644
40--- a/lib/ext2fs/ext_attr.c
41+++ b/lib/ext2fs/ext_attr.c
42@@ -254,10 +254,15 @@ static struct ea_name_index ea_names[] = {
43 {0, NULL},
44 };
45
46+static int find_ea_index(char *fullname, char **name, int *index);
47+
48 /* Push empty attributes to the end and inlinedata to the front. */
49 static int attr_compare(const void *a, const void *b)
50 {
51 const struct ext2_xattr *xa = a, *xb = b;
52+ char *xa_suffix, *xb_suffix;
53+ int xa_idx, xb_idx;
54+ int cmp;
55
56 if (xa->name == NULL)
57 return +1;
58@@ -267,7 +272,24 @@ static int attr_compare(const void *a, const void *b)
59 return -1;
60 else if (!strcmp(xb->name, "system.data"))
61 return +1;
62- return 0;
63+
64+ /*
65+ * Duplicate the kernel's sorting algorithm because xattr blocks
66+ * require sorted keys.
67+ */
68+ xa_suffix = xa->name;
69+ xb_suffix = xb->name;
70+ xa_idx = xb_idx = 0;
71+ find_ea_index(xa->name, &xa_suffix, &xa_idx);
72+ find_ea_index(xb->name, &xb_suffix, &xb_idx);
73+ cmp = xa_idx - xb_idx;
74+ if (cmp)
75+ return cmp;
76+ cmp = strlen(xa_suffix) - strlen(xb_suffix);
77+ if (cmp)
78+ return cmp;
79+ cmp = strcmp(xa_suffix, xb_suffix);
80+ return cmp;
81 }
82
83 static const char *find_ea_prefix(int index)
84diff --git a/tests/d_xattr_sorting/expect b/tests/d_xattr_sorting/expect
85new file mode 100644
86index 0000000..17da663
87--- /dev/null
88+++ b/tests/d_xattr_sorting/expect
89@@ -0,0 +1,29 @@
90+debugfs sort extended attributes
91+mke2fs -Fq -b 1024 test.img 512
92+Exit status is 0
93+ea_set / security.SMEG64 -f /tmp/b
94+Exit status is 0
95+ea_set / security.imb -f /tmp/b
96+Exit status is 0
97+ea_set / user.moo cow
98+Exit status is 0
99+ea_list /
100+Extended attributes:
101+ user.moo = "cow" (3)
102+ security.imb = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" (256)
103+ security.SMEG64 = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" (256)
104+Exit status is 0
105+ea_get / security.imb
106+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
107+Exit status is 0
108+ea_get / nosuchea
109+ea_get: Extended attribute key not found while getting extended attribute
110+Exit status is 0
111+e2fsck -yf -N test_filesys
112+Pass 1: Checking inodes, blocks, and sizes
113+Pass 2: Checking directory structure
114+Pass 3: Checking directory connectivity
115+Pass 4: Checking reference counts
116+Pass 5: Checking group summary information
117+test_filesys: 11/64 files (0.0% non-contiguous), 29/512 blocks
118+Exit status is 0
119diff --git a/tests/d_xattr_sorting/name b/tests/d_xattr_sorting/name
120new file mode 100644
121index 0000000..dde8926
122--- /dev/null
123+++ b/tests/d_xattr_sorting/name
124@@ -0,0 +1 @@
125+sort extended attributes in debugfs
126diff --git a/tests/d_xattr_sorting/script b/tests/d_xattr_sorting/script
127new file mode 100644
128index 0000000..30c189a
129--- /dev/null
130+++ b/tests/d_xattr_sorting/script
131@@ -0,0 +1,86 @@
132+if test -x $DEBUGFS_EXE; then
133+
134+OUT=$test_name.log
135+EXP=$test_dir/expect
136+VERIFY_FSCK_OPT=-yf
137+
138+TEST_DATA=$test_name.tmp
139+VERIFY_DATA=$test_name.ver.tmp
140+
141+echo "debugfs sort extended attributes" > $OUT
142+
143+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
144+
145+echo "mke2fs -Fq -b 1024 test.img 512" >> $OUT
146+
147+$MKE2FS -Fq $TMPFILE 512 > /dev/null 2>&1
148+status=$?
149+echo Exit status is $status >> $OUT
150+
151+perl -e 'print "x" x 256;' > /tmp/b
152+
153+echo "ea_set / security.SMEG64 -f /tmp/b" > $OUT.new
154+$DEBUGFS -w -R "ea_set / security.SMEG64 -f /tmp/b" $TMPFILE >> $OUT.new 2>&1
155+status=$?
156+echo Exit status is $status >> $OUT.new
157+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
158+
159+echo "ea_set / security.imb -f /tmp/b" > $OUT.new
160+$DEBUGFS -w -R "ea_set / security.imb -f /tmp/b" $TMPFILE >> $OUT.new 2>&1
161+status=$?
162+echo Exit status is $status >> $OUT.new
163+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
164+
165+echo "ea_set / user.moo cow" > $OUT.new
166+$DEBUGFS -w -R "ea_set / user.moo cow" $TMPFILE >> $OUT.new 2>&1
167+status=$?
168+echo Exit status is $status >> $OUT.new
169+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
170+
171+rm -rf /tmp/b
172+
173+echo "ea_list /" > $OUT.new
174+$DEBUGFS -w -R "ea_list /" $TMPFILE >> $OUT.new 2>&1
175+status=$?
176+echo Exit status is $status >> $OUT.new
177+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
178+
179+echo "ea_get / security.imb" > $OUT.new
180+$DEBUGFS -w -R "ea_get / security.imb" $TMPFILE >> $OUT.new 2>&1
181+status=$?
182+echo Exit status is $status >> $OUT.new
183+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
184+
185+echo "ea_get / nosuchea" > $OUT.new
186+$DEBUGFS -w -R "ea_get / nosuchea" $TMPFILE >> $OUT.new 2>&1
187+status=$?
188+echo Exit status is $status >> $OUT.new
189+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
190+
191+echo e2fsck $VERIFY_FSCK_OPT -N test_filesys > $OUT.new
192+$FSCK $VERIFY_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
193+status=$?
194+echo Exit status is $status >> $OUT.new
195+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
196+
197+#
198+# Do the verification
199+#
200+
201+rm -f $TMPFILE $OUT.new
202+cmp -s $OUT $EXP
203+status=$?
204+
205+if [ "$status" = 0 ] ; then
206+ echo "$test_name: $test_description: ok"
207+ touch $test_name.ok
208+else
209+ echo "$test_name: $test_description: failed"
210+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
211+fi
212+
213+unset VERIFY_FSCK_OPT NATIVE_FSCK_OPT OUT EXP TEST_DATA VERIFY_DATA
214+
215+else #if test -x $DEBUGFS_EXE; then
216+ echo "$test_name: $test_description: skipped"
217+fi
218
219
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_git.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43..bb
index 9cde8e46b7..e4695fbbec 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_git.bb
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43..bb
@@ -6,12 +6,9 @@ SRC_URI += "file://acinclude.m4 \
6 file://run-ptest \ 6 file://run-ptest \
7 file://ptest.patch \ 7 file://ptest.patch \
8 file://mkdir.patch \ 8 file://mkdir.patch \
9 file://xattr_ordering.patch \
10 file://Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch \
11" 9"
12 10
13SRCREV = "0f26747167cc9d82df849b0aad387bf824f04544" 11SRCREV = "d6adf070b0e85f209c0d7f310188b134b5cb7180"
14PV = "1.42.99+1.43+git${SRCPV}"
15UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+(\.\d+)*)$" 12UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+(\.\d+)*)$"
16 13
17EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \ 14EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \