From a4fc0af1050e5e0cc3d241279b92ea8c75aeeb8e Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Sun, 22 Aug 2021 14:50:28 +0200 Subject: e2fsprogs: upgrade 1.46.2 -> 1.46.4 Drop big-inodes-for-small-fs.patch: upstream made the same fix. Drop 0001-lib-ext2fs-unix_io.c-do-unlock-on-error.patch 0001-lib-ext2fs-unix_io.c-revert-parts-of-libext2fs-fix-p.patch (upstream has fixed the issue). Add 0001-lib-ext2fs-unix_io.c-revert-parts-of-libext2fs-fix-p.patch to correct a ptest failure due to incorrectly expected inode size (recent change that wasn't run against the tests upstream?). Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- ...1-lib-ext2fs-unix_io.c-do-unlock-on-error.patch | 24 ---- ...unix_io.c-revert-parts-of-libext2fs-fix-p.patch | 48 ------- ..._direct_io-expect-correct-expected-output.patch | 69 ++++++++++ .../e2fsprogs/big-inodes-for-small-fs.patch | 22 ---- ...s-fix-missing-check-for-permission-denied.patch | 4 +- .../e2fsprogs/e2fsprogs/quiet-debugfs.patch | 2 +- .../recipes-devtools/e2fsprogs/e2fsprogs_1.46.2.bb | 144 --------------------- .../recipes-devtools/e2fsprogs/e2fsprogs_1.46.4.bb | 141 ++++++++++++++++++++ 8 files changed, 213 insertions(+), 241 deletions(-) delete mode 100644 meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-lib-ext2fs-unix_io.c-do-unlock-on-error.patch delete mode 100644 meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-lib-ext2fs-unix_io.c-revert-parts-of-libext2fs-fix-p.patch create mode 100644 meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-tests-u_direct_io-expect-correct-expected-output.patch delete mode 100644 meta/recipes-devtools/e2fsprogs/e2fsprogs/big-inodes-for-small-fs.patch delete mode 100644 meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.2.bb create mode 100644 meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.4.bb (limited to 'meta/recipes-devtools') diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-lib-ext2fs-unix_io.c-do-unlock-on-error.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-lib-ext2fs-unix_io.c-do-unlock-on-error.patch deleted file mode 100644 index 26f972b313..0000000000 --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-lib-ext2fs-unix_io.c-do-unlock-on-error.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 42ba67f9a51ef959e7fd8dac29b5398c121c6976 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Fri, 30 Apr 2021 23:45:56 +0200 -Subject: [PATCH] lib/ext2fs/unix_io.c: do unlock on error - -Upstream-Status: Submitted [https://github.com/tytso/e2fsprogs/pull/68] -Signed-off-by: Alexander Kanavin ---- - lib/ext2fs/unix_io.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c -index 64eee342..528c2fbc 100644 ---- a/lib/ext2fs/unix_io.c -+++ b/lib/ext2fs/unix_io.c -@@ -398,7 +398,7 @@ static errcode_t raw_write_blk(io_channel channel, - mutex_lock(data, BOUNCE_MTX); - if (ext2fs_llseek(data->dev, location, SEEK_SET) < 0) { - retval = errno ? errno : EXT2_ET_LLSEEK_FAILED; -- goto error_out; -+ goto error_unlock; - } - actual = write(data->dev, buf, size); - mutex_unlock(data, BOUNCE_MTX); diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-lib-ext2fs-unix_io.c-revert-parts-of-libext2fs-fix-p.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-lib-ext2fs-unix_io.c-revert-parts-of-libext2fs-fix-p.patch deleted file mode 100644 index 2452f7e08e..0000000000 --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-lib-ext2fs-unix_io.c-revert-parts-of-libext2fs-fix-p.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 3593063f735f453d43f461292e26913436c11ca3 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Sat, 1 May 2021 13:06:12 +0200 -Subject: [PATCH] lib/ext2fs/unix_io.c: revert parts of "libext2fs: fix - potential races in unix_io" - -Upstream-Status: Submitted [https://github.com/tytso/e2fsprogs/pull/68] -Signed-off-by: Alexander Kanavin ---- - lib/ext2fs/unix_io.c | 15 ++++++++------- - 1 file changed, 8 insertions(+), 7 deletions(-) - -diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c -index 528c2fbc..f4916b21 100644 ---- a/lib/ext2fs/unix_io.c -+++ b/lib/ext2fs/unix_io.c -@@ -311,10 +311,10 @@ bounce_read: - size += really_read; - goto short_read; - } -- actual = size; -- if (actual > align_size) -- actual = align_size; -- actual -= offset; -+ if ((actual + offset) > align_size) -+ actual = align_size - offset; -+ if (actual > size) -+ actual = size; - memcpy(buf, data->bounce + offset, actual); - - really_read += actual; -@@ -455,9 +455,10 @@ bounce_write: - } - } - actual = size; -- if (actual > align_size) -- actual = align_size; -- actual -= offset; -+ if ((actual + offset) > align_size) -+ actual = align_size - offset; -+ if (actual > size) -+ actual = size; - memcpy(((char *)data->bounce) + offset, buf, actual); - if (ext2fs_llseek(data->dev, aligned_blk * align_size, SEEK_SET) < 0) { - retval = errno ? errno : EXT2_ET_LLSEEK_FAILED; --- -2.24.0 - diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-tests-u_direct_io-expect-correct-expected-output.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-tests-u_direct_io-expect-correct-expected-output.patch new file mode 100644 index 0000000000..f198df83eb --- /dev/null +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-tests-u_direct_io-expect-correct-expected-output.patch @@ -0,0 +1,69 @@ +From ea5adf259e01c790f9ba69d6fe88d691de410b6f Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Sun, 22 Aug 2021 14:37:32 +0200 +Subject: [PATCH] tests/u_direct_io/expect: correct expected output + +This is likely the right fix, but upstream needs to confirm. + +Upstream-Status: Inappropriate [issue reported https://github.com/tytso/e2fsprogs/issues/80] +Signed-off-by: Alexander Kanavin +--- + tests/u_direct_io/expect | 16 +++++++++------- + 1 file changed, 9 insertions(+), 7 deletions(-) + +diff --git a/tests/u_direct_io/expect b/tests/u_direct_io/expect +index b0cdc730..830cbd75 100644 +--- a/tests/u_direct_io/expect ++++ b/tests/u_direct_io/expect +@@ -19,8 +19,8 @@ Filesystem OS type: Linux + Inode count: 32768 + Block count: 32768 + Reserved block count: 1638 +-Overhead clusters: 5131 +-Free blocks: 27631 ++Overhead clusters: 6155 ++Free blocks: 26607 + Free inodes: 32757 + First block: 0 + Block size: 4096 +@@ -29,27 +29,29 @@ Reserved GDT blocks: 7 + Blocks per group: 32768 + Fragments per group: 32768 + Inodes per group: 32768 +-Inode blocks per group: 1024 ++Inode blocks per group: 2048 + Flex block group size: 16 + Mount count: 0 + Check interval: 15552000 (6 months) + Reserved blocks uid: 0 + Reserved blocks gid: 0 + First inode: 11 +-Inode size: 128 ++Inode size: 256 ++Required extra isize: 32 ++Desired extra isize: 32 + Journal inode: 8 + Default directory hash: half_md4 + Journal backup: inode blocks + Directories: 2 + Group 0: block bitmap at 9, inode bitmap at 25, inode table at 41 +- 27631 free blocks, 32757 free inodes, 2 used directories ++ 26607 free blocks, 32757 free inodes, 2 used directories + e2fsck -fn -N test_filesys $LOOP + Pass 1: Checking inodes, blocks, and sizes + Pass 2: Checking directory structure + Pass 3: Checking directory connectivity + Pass 4: Checking reference counts + Pass 5: Checking group summary information +-test_filesys: 11/32768 files (9.1% non-contiguous), 5137/32768 blocks ++test_filesys: 11/32768 files (9.1% non-contiguous), 6161/32768 blocks + Exit status is 0 + e2fsck -fn -N test_filesys $TMPFILE + Pass 1: Checking inodes, blocks, and sizes +@@ -57,5 +59,5 @@ Pass 2: Checking directory structure + Pass 3: Checking directory connectivity + Pass 4: Checking reference counts + Pass 5: Checking group summary information +-test_filesys: 11/32768 files (9.1% non-contiguous), 5137/32768 blocks ++test_filesys: 11/32768 files (9.1% non-contiguous), 6161/32768 blocks + Exit status is 0 diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/big-inodes-for-small-fs.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/big-inodes-for-small-fs.patch deleted file mode 100644 index caeb560d32..0000000000 --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/big-inodes-for-small-fs.patch +++ /dev/null @@ -1,22 +0,0 @@ -Ensure "small" file systems also have the default inode size (256 bytes) so that -can store 64-bit timestamps and work past 2038. - -The "small" type is any size >3MB and <512MB, which covers a lot of relatively -small filesystems built by OE, especially when they're sized to fit the contents -and expand to the storage on boot. - -Upstream-Status: Inappropriate -Signed-off-by: Ross Burton - -diff --git a/misc/mke2fs.conf.in b/misc/mke2fs.conf.in -index 01e35cf8..29f41dc0 100644 ---- a/misc/mke2fs.conf.in -+++ b/misc/mke2fs.conf.in -@@ -16,7 +16,6 @@ - } - small = { - blocksize = 1024 -- inode_size = 128 - inode_ratio = 4096 - } - floppy = { diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch index e8b2aafbf3..a4f98246bb 100644 --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch @@ -1,4 +1,4 @@ -From 8957443bcbea43685c76eb3cbc5009f7fd529283 Mon Sep 17 00:00:00 2001 +From f1e161a48f74b46ae3c99921971c4b5ae8d587c9 Mon Sep 17 00:00:00 2001 From: Jackie Huang Date: Wed, 10 Aug 2016 11:19:44 +0800 Subject: [PATCH] Fix missing check for permission denied. @@ -19,7 +19,7 @@ Signed-off-by: Jackie Huang 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/support/profile.c b/lib/support/profile.c -index 585ed595..810dd66b 100644 +index f54739e7..53ea68f1 100644 --- a/lib/support/profile.c +++ b/lib/support/profile.c @@ -335,7 +335,7 @@ profile_init(const char * const *files, profile_t *ret_profile) diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch index 96eb7f20df..41a4047622 100644 --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch @@ -1,4 +1,4 @@ -From 3b75308cc75adc249db6ca36e42fe93309b9a018 Mon Sep 17 00:00:00 2001 +From 550b5fbece84dde16ce9910c2cad390ea4a2f5d5 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Mon, 23 Dec 2013 13:38:34 +0000 Subject: [PATCH] e2fsprogs: silence debugfs diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.2.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.2.bb deleted file mode 100644 index 8cc046c794..0000000000 --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.2.bb +++ /dev/null @@ -1,144 +0,0 @@ -require e2fsprogs.inc - -SRC_URI += "file://remove.ldconfig.call.patch \ - file://run-ptest \ - file://ptest.patch \ - file://mkdir_p.patch \ - file://0001-lib-ext2fs-unix_io.c-do-unlock-on-error.patch \ - file://0001-lib-ext2fs-unix_io.c-revert-parts-of-libext2fs-fix-p.patch \ - " - -SRC_URI:append:class-native = " file://e2fsprogs-fix-missing-check-for-permission-denied.patch \ - file://quiet-debugfs.patch \ - file://big-inodes-for-small-fs.patch \ -" - - -SRCREV = "1eea0e2bd9a6760ebad834d5d2cf700fffe5ebe2" -UPSTREAM_CHECK_GITTAGREGEX = "v(?P\d+\.\d+(\.\d+)*)$" - -EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \ - --enable-elf-shlibs --disable-libuuid --disable-uuidd \ - --disable-libblkid --enable-verbose-makecmds \ - --with-crond-dir=no" - -EXTRA_OECONF:darwin = "--libdir=${base_libdir} --sbindir=${base_sbindir} --enable-bsd-shlibs" - -PACKAGECONFIG ??= "" -PACKAGECONFIG[fuse] = '--enable-fuse2fs,--disable-fuse2fs,fuse' - -# make locale rules sometimes fire, sometimes don't as git doesn't preserve -# file mktime. Touch the files introducing non-determinism to the build -do_compile:prepend (){ - find ${S}/po -type f -name "*.po" -exec touch {} + -} - -do_install () { - oe_runmake 'DESTDIR=${D}' install - oe_runmake 'DESTDIR=${D}' install-libs - # We use blkid from util-linux now so remove from here - rm -f ${D}${base_libdir}/libblkid* - rm -rf ${D}${includedir}/blkid - rm -f ${D}${base_libdir}/pkgconfig/blkid.pc - rm -f ${D}${base_sbindir}/blkid - rm -f ${D}${base_sbindir}/fsck - rm -f ${D}${base_sbindir}/findfs - - # e2initrd_helper and the pkgconfig files belong in libdir - if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then - install -d ${D}${libdir} - mv ${D}${base_libdir}/e2initrd_helper ${D}${libdir} - mv ${D}${base_libdir}/pkgconfig ${D}${libdir} - fi - - oe_multilib_header ext2fs/ext2_types.h - install -d ${D}${base_bindir} - mv ${D}${bindir}/chattr ${D}${base_bindir}/chattr.e2fsprogs - - install -v -m 755 ${S}/contrib/populate-extfs.sh ${D}${base_sbindir}/ - - # Clean host path (build directory) in compile_et, mk_cmds - sed -i -e "s,\(ET_DIR=.*\)${S}/lib/et\(.*\),\1${datadir}/et\2,g" ${D}${bindir}/compile_et - sed -i -e "s,\(SS_DIR=.*\)${S}/lib/ss\(.*\),\1${datadir}/ss\2,g" ${D}${bindir}/mk_cmds -} - -# Need to find the right mke2fs.conf file -e2fsprogs_conf_fixup () { - for i in mke2fs mkfs.ext2 mkfs.ext3 mkfs.ext4; do - create_wrapper ${D}${base_sbindir}/$i MKE2FS_CONFIG=${sysconfdir}/mke2fs.conf - done -} - -do_install:append:class-native() { - e2fsprogs_conf_fixup -} - -do_install:append:class-nativesdk() { - e2fsprogs_conf_fixup -} - -do_install:append:class-target() { - mv ${D}${base_sbindir}/mke2fs ${D}${base_sbindir}/mke2fs.e2fsprogs - mv ${D}${base_sbindir}/mkfs.ext2 ${D}${base_sbindir}/mkfs.ext2.e2fsprogs - mv ${D}${base_sbindir}/tune2fs ${D}${base_sbindir}/tune2fs.e2fsprogs -} - -RDEPENDS:e2fsprogs = "e2fsprogs-badblocks e2fsprogs-dumpe2fs" -RRECOMMENDS:e2fsprogs = "e2fsprogs-mke2fs e2fsprogs-e2fsck" - -PACKAGES =+ "e2fsprogs-badblocks e2fsprogs-dumpe2fs e2fsprogs-e2fsck e2fsprogs-e2scrub e2fsprogs-mke2fs e2fsprogs-resize2fs e2fsprogs-tune2fs" -PACKAGES =+ "libcomerr libss libe2p libext2fs" - -FILES:e2fsprogs-dumpe2fs = "${base_sbindir}/dumpe2fs" -FILES:e2fsprogs-resize2fs = "${base_sbindir}/resize2fs*" -FILES:e2fsprogs-e2fsck = "${base_sbindir}/e2fsck ${base_sbindir}/fsck.ext*" -FILES:e2fsprogs-e2scrub = "${base_sbindir}/e2scrub*" -FILES:e2fsprogs-mke2fs = "${base_sbindir}/mke2fs.e2fsprogs ${base_sbindir}/mkfs.ext* ${sysconfdir}/mke2fs.conf" -FILES:e2fsprogs-tune2fs = "${base_sbindir}/tune2fs.e2fsprogs ${base_sbindir}/e2label" -FILES:e2fsprogs-badblocks = "${base_sbindir}/badblocks" -FILES:libcomerr = "${base_libdir}/libcom_err.so.*" -FILES:libss = "${base_libdir}/libss.so.*" -FILES:libe2p = "${base_libdir}/libe2p.so.*" -FILES:libext2fs = "${libdir}/e2initrd_helper ${base_libdir}/libext2fs.so.*" -FILES:${PN}-dev += "${datadir}/*/*.awk ${datadir}/*/*.sed ${base_libdir}/*.so ${bindir}/compile_et ${bindir}/mk_cmds" - -ALTERNATIVE:${PN} = "chattr" -ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE_LINK_NAME[chattr] = "${base_bindir}/chattr" -ALTERNATIVE_TARGET[chattr] = "${base_bindir}/chattr.e2fsprogs" - -ALTERNATIVE:${PN}-doc = "fsck.8" -ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8" - -ALTERNATIVE:${PN}-mke2fs = "mke2fs mkfs.ext2" -ALTERNATIVE_LINK_NAME[mke2fs] = "${base_sbindir}/mke2fs" -ALTERNATIVE_LINK_NAME[mkfs.ext2] = "${base_sbindir}/mkfs.ext2" - -ALTERNATIVE:${PN}-tune2fs = "tune2fs" -ALTERNATIVE_LINK_NAME[tune2fs] = "${base_sbindir}/tune2fs" - -RDEPENDS:e2fsprogs-e2scrub = "bash" -RDEPENDS:${PN}-ptest += "coreutils procps bash bzip2 diffutils perl sed" -RDEPENDS:${PN}-ptest += "e2fsprogs-badblocks e2fsprogs-dumpe2fs e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-resize2fs e2fsprogs-tune2fs" - -do_compile_ptest() { - oe_runmake -C ${B}/tests -} - -do_install_ptest() { - # This file's permissions depends on the host umask so be deterministic - chmod 0644 ${B}/tests/test_data.tmp - cp -R --no-dereference --preserve=mode,links -v ${B}/tests ${D}${PTEST_PATH}/test - cp -R --no-dereference --preserve=mode,links -v ${S}/tests/* ${D}${PTEST_PATH}/test - sed -e 's!../e2fsck/e2fsck!e2fsck!g' \ - -e 's!../misc/tune2fs!tune2fs!g' -i ${D}${PTEST_PATH}/test/*/expect* - sed -e 's!../e2fsck/e2fsck!${base_sbindir}/e2fsck!g' -i ${D}${PTEST_PATH}/test/*/script - - # Remove various files - find "${D}${PTEST_PATH}" -type f \ - \( -name 'Makefile' -o -name 'Makefile.in' -o -name '*.o' -o -name '*.c' -o -name '*.h' \)\ - -exec rm -f {} + - - install -d ${D}${PTEST_PATH}/lib - install -m 0644 ${B}/lib/config.h ${D}${PTEST_PATH}/lib/ -} diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.4.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.4.bb new file mode 100644 index 0000000000..f42cefcaf9 --- /dev/null +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.4.bb @@ -0,0 +1,141 @@ +require e2fsprogs.inc + +SRC_URI += "file://remove.ldconfig.call.patch \ + file://run-ptest \ + file://ptest.patch \ + file://mkdir_p.patch \ + file://0001-tests-u_direct_io-expect-correct-expected-output.patch \ + " + +SRC_URI:append:class-native = " file://e2fsprogs-fix-missing-check-for-permission-denied.patch \ + file://quiet-debugfs.patch \ +" + +SRCREV = "849005eac51ea2097bd9e5f2b0adc16b53c5486d" +UPSTREAM_CHECK_GITTAGREGEX = "v(?P\d+\.\d+(\.\d+)*)$" + +EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \ + --enable-elf-shlibs --disable-libuuid --disable-uuidd \ + --disable-libblkid --enable-verbose-makecmds \ + --with-crond-dir=no" + +EXTRA_OECONF:darwin = "--libdir=${base_libdir} --sbindir=${base_sbindir} --enable-bsd-shlibs" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[fuse] = '--enable-fuse2fs,--disable-fuse2fs,fuse' + +# make locale rules sometimes fire, sometimes don't as git doesn't preserve +# file mktime. Touch the files introducing non-determinism to the build +do_compile:prepend (){ + find ${S}/po -type f -name "*.po" -exec touch {} + +} + +do_install () { + oe_runmake 'DESTDIR=${D}' install + oe_runmake 'DESTDIR=${D}' install-libs + # We use blkid from util-linux now so remove from here + rm -f ${D}${base_libdir}/libblkid* + rm -rf ${D}${includedir}/blkid + rm -f ${D}${base_libdir}/pkgconfig/blkid.pc + rm -f ${D}${base_sbindir}/blkid + rm -f ${D}${base_sbindir}/fsck + rm -f ${D}${base_sbindir}/findfs + + # e2initrd_helper and the pkgconfig files belong in libdir + if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then + install -d ${D}${libdir} + mv ${D}${base_libdir}/e2initrd_helper ${D}${libdir} + mv ${D}${base_libdir}/pkgconfig ${D}${libdir} + fi + + oe_multilib_header ext2fs/ext2_types.h + install -d ${D}${base_bindir} + mv ${D}${bindir}/chattr ${D}${base_bindir}/chattr.e2fsprogs + + install -v -m 755 ${S}/contrib/populate-extfs.sh ${D}${base_sbindir}/ + + # Clean host path (build directory) in compile_et, mk_cmds + sed -i -e "s,\(ET_DIR=.*\)${S}/lib/et\(.*\),\1${datadir}/et\2,g" ${D}${bindir}/compile_et + sed -i -e "s,\(SS_DIR=.*\)${S}/lib/ss\(.*\),\1${datadir}/ss\2,g" ${D}${bindir}/mk_cmds +} + +# Need to find the right mke2fs.conf file +e2fsprogs_conf_fixup () { + for i in mke2fs mkfs.ext2 mkfs.ext3 mkfs.ext4; do + create_wrapper ${D}${base_sbindir}/$i MKE2FS_CONFIG=${sysconfdir}/mke2fs.conf + done +} + +do_install:append:class-native() { + e2fsprogs_conf_fixup +} + +do_install:append:class-nativesdk() { + e2fsprogs_conf_fixup +} + +do_install:append:class-target() { + mv ${D}${base_sbindir}/mke2fs ${D}${base_sbindir}/mke2fs.e2fsprogs + mv ${D}${base_sbindir}/mkfs.ext2 ${D}${base_sbindir}/mkfs.ext2.e2fsprogs + mv ${D}${base_sbindir}/tune2fs ${D}${base_sbindir}/tune2fs.e2fsprogs +} + +RDEPENDS:e2fsprogs = "e2fsprogs-badblocks e2fsprogs-dumpe2fs" +RRECOMMENDS:e2fsprogs = "e2fsprogs-mke2fs e2fsprogs-e2fsck" + +PACKAGES =+ "e2fsprogs-badblocks e2fsprogs-dumpe2fs e2fsprogs-e2fsck e2fsprogs-e2scrub e2fsprogs-mke2fs e2fsprogs-resize2fs e2fsprogs-tune2fs" +PACKAGES =+ "libcomerr libss libe2p libext2fs" + +FILES:e2fsprogs-dumpe2fs = "${base_sbindir}/dumpe2fs" +FILES:e2fsprogs-resize2fs = "${base_sbindir}/resize2fs*" +FILES:e2fsprogs-e2fsck = "${base_sbindir}/e2fsck ${base_sbindir}/fsck.ext*" +FILES:e2fsprogs-e2scrub = "${base_sbindir}/e2scrub*" +FILES:e2fsprogs-mke2fs = "${base_sbindir}/mke2fs.e2fsprogs ${base_sbindir}/mkfs.ext* ${sysconfdir}/mke2fs.conf" +FILES:e2fsprogs-tune2fs = "${base_sbindir}/tune2fs.e2fsprogs ${base_sbindir}/e2label" +FILES:e2fsprogs-badblocks = "${base_sbindir}/badblocks" +FILES:libcomerr = "${base_libdir}/libcom_err.so.*" +FILES:libss = "${base_libdir}/libss.so.*" +FILES:libe2p = "${base_libdir}/libe2p.so.*" +FILES:libext2fs = "${libdir}/e2initrd_helper ${base_libdir}/libext2fs.so.*" +FILES:${PN}-dev += "${datadir}/*/*.awk ${datadir}/*/*.sed ${base_libdir}/*.so ${bindir}/compile_et ${bindir}/mk_cmds" + +ALTERNATIVE:${PN} = "chattr" +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_LINK_NAME[chattr] = "${base_bindir}/chattr" +ALTERNATIVE_TARGET[chattr] = "${base_bindir}/chattr.e2fsprogs" + +ALTERNATIVE:${PN}-doc = "fsck.8" +ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8" + +ALTERNATIVE:${PN}-mke2fs = "mke2fs mkfs.ext2" +ALTERNATIVE_LINK_NAME[mke2fs] = "${base_sbindir}/mke2fs" +ALTERNATIVE_LINK_NAME[mkfs.ext2] = "${base_sbindir}/mkfs.ext2" + +ALTERNATIVE:${PN}-tune2fs = "tune2fs" +ALTERNATIVE_LINK_NAME[tune2fs] = "${base_sbindir}/tune2fs" + +RDEPENDS:e2fsprogs-e2scrub = "bash" +RDEPENDS:${PN}-ptest += "coreutils procps bash bzip2 diffutils perl sed" +RDEPENDS:${PN}-ptest += "e2fsprogs-badblocks e2fsprogs-dumpe2fs e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-resize2fs e2fsprogs-tune2fs" + +do_compile_ptest() { + oe_runmake -C ${B}/tests +} + +do_install_ptest() { + # This file's permissions depends on the host umask so be deterministic + chmod 0644 ${B}/tests/test_data.tmp + cp -R --no-dereference --preserve=mode,links -v ${B}/tests ${D}${PTEST_PATH}/test + cp -R --no-dereference --preserve=mode,links -v ${S}/tests/* ${D}${PTEST_PATH}/test + sed -e 's!../e2fsck/e2fsck!e2fsck!g' \ + -e 's!../misc/tune2fs!tune2fs!g' -i ${D}${PTEST_PATH}/test/*/expect* + sed -e 's!../e2fsck/e2fsck!${base_sbindir}/e2fsck!g' -i ${D}${PTEST_PATH}/test/*/script + + # Remove various files + find "${D}${PTEST_PATH}" -type f \ + \( -name 'Makefile' -o -name 'Makefile.in' -o -name '*.o' -o -name '*.c' -o -name '*.h' \)\ + -exec rm -f {} + + + install -d ${D}${PTEST_PATH}/lib + install -m 0644 ${B}/lib/config.h ${D}${PTEST_PATH}/lib/ +} -- cgit 1.2.3-korg