From 8c4d69059f3456a53c9652fe4113b3ad13dbcd92 Mon Sep 17 00:00:00 2001 From: lixiaoyong Date: Wed, 12 Jan 2022 16:02:28 +0800 Subject: [PATCH 1/6] add recipe for dosfstools Signed-off-by: lixiaoyong --- .../recipes-core/dosfstools/dosfstools_4.2.bb | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 meta-openeuler/recipes-core/dosfstools/dosfstools_4.2.bb diff --git a/meta-openeuler/recipes-core/dosfstools/dosfstools_4.2.bb b/meta-openeuler/recipes-core/dosfstools/dosfstools_4.2.bb new file mode 100644 index 00000000000..3c26fb9e5ed --- /dev/null +++ b/meta-openeuler/recipes-core/dosfstools/dosfstools_4.2.bb @@ -0,0 +1,26 @@ +# dosfstools OE build file +# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved +# Copyright (C) 2015, Sören Brinkmann All Rights Reserved +# Released under the MIT license (see packages/COPYING) +SUMMARY = "DOS FAT Filesystem Utilities" +HOMEPAGE = "https://github.com/dosfstools/dosfstools" +SECTION = "base" +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +SRC_URI = "file://dosfstools/${BP}.tar.gz" +SRC_URI[sha256sum] = "64926eebf90092dca21b14259a5301b7b98e7b1943e8a201c7d726084809b527" + +UPSTREAM_CHECK_URI = "https://github.com/dosfstools/dosfstools/releases" + +inherit autotools gettext pkgconfig + +EXTRA_OECONF = "--enable-compat-symlinks --without-iconv" + +CFLAGS += "-D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" + +BBCLASSEXTEND = "native nativesdk" + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN} = "mkfs.vfat" +ALTERNATIVE_LINK_NAME[mkfs.vfat] = "${sbindir}/mkfs.vfat" -- Gitee From 5c8fc5340e6998ede68df6469337a46ec6a0daa1 Mon Sep 17 00:00:00 2001 From: lixiaoyong Date: Wed, 12 Jan 2022 16:03:32 +0800 Subject: [PATCH 2/6] add recipe for libnl Signed-off-by: lixiaoyong --- .../recipes-core/libnl/files/run-ptest | 16 ++++ .../recipes-core/libnl/libnl_3.5.0.bb | 76 +++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100755 meta-openeuler/recipes-core/libnl/files/run-ptest create mode 100644 meta-openeuler/recipes-core/libnl/libnl_3.5.0.bb diff --git a/meta-openeuler/recipes-core/libnl/files/run-ptest b/meta-openeuler/recipes-core/libnl/files/run-ptest new file mode 100755 index 00000000000..e5c9eb0a328 --- /dev/null +++ b/meta-openeuler/recipes-core/libnl/files/run-ptest @@ -0,0 +1,16 @@ +#!/bin/sh + +num_fail=0 + +for test in check* +do + ./"$test" \ + && echo "PASS: $test" \ + || { + echo "FAIL: $test" + num_fail=$(( ${num_fail} + 1)) + } + +done + +exit $num_fail diff --git a/meta-openeuler/recipes-core/libnl/libnl_3.5.0.bb b/meta-openeuler/recipes-core/libnl/libnl_3.5.0.bb new file mode 100644 index 00000000000..8250c3100ec --- /dev/null +++ b/meta-openeuler/recipes-core/libnl/libnl_3.5.0.bb @@ -0,0 +1,76 @@ +SUMMARY = "A library for applications dealing with netlink sockets" +DESCRIPTION = "The libnl suite is a collection of libraries providing \ +APIs to netlink protocol based Linux kernel interfaces. libnl is the core \ +library implementing the fundamentals required to use the netlink protocol \ +such as socket handling, message construction and parsing, and sending \ +and receiving of data." +HOMEPAGE = "http://www.infradead.org/~tgr/libnl/" +SECTION = "libs/network" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +DEPENDS = "flex-native bison-native" + +SRC_URI = "file://libnl3/${BP}.tar.gz \ + file://libnl3/backport-lib-add-include-netlink-private-nl-auto-h-header.patch \ + file://libnl3/backport-lib-use-proper-int-type-for-id-attributes-in-nl_object_identical.patch \ + file://libnl3/backport-route-link-add-RTNL_LINK_REASM_OVERLAPS-stat.patch \ + file://libnl3/backport-route-link-Check-for-null-pointer-in-macvlan.patch \ + file://libnl3/backport-rtnl-link-fix-leaking-rtnl_link_af_ops-in-link_msg_parser.patch \ + file://libnl3/backport-rtnl-route-fix-NLE_NOMEM-handling-in-parse_multipath.patch \ + file://libnl3/solve-redefinition-of-struct-ipv6_mreq.patch \ + file://run-ptest \ + " + +SRC_URI[md5sum] = "74ba57b1b1d6f9f92268aa8141d8e8e4" +SRC_URI[sha256sum] = "352133ec9545da76f77e70ccb48c9d7e5324d67f6474744647a7ed382b5e05fa" + +UPSTREAM_CHECK_URI = "https://github.com/thom311/${BPN}/releases" + +inherit autotools pkgconfig ptest + +FILES_${PN} = "${libdir}/libnl-3.so.* \ + ${libdir}/libnl.so.* \ + ${sysconfdir}" +RREPLACES_${PN} = "libnl2" +RCONFLICTS_${PN} = "libnl2" + +FILES_${PN}-dev += "${libdir}/libnl/cli/*/*.la" +FILES_${PN}-staticdev += "${libdir}/libnl/cli/*/*.a" + +PACKAGES += "${PN}-cli ${PN}-genl ${PN}-idiag ${PN}-nf ${PN}-route ${PN}-xfrm" +FILES_${PN}-cli = "${libdir}/libnl-cli-3.so.* \ + ${libdir}/libnl/cli/*/*.so \ + ${bindir}/genl-ctrl-list \ + ${bindir}/idiag-socket-details \ + ${bindir}/nf-* \ + ${bindir}/nl-*" +FILES_${PN}-genl = "${libdir}/libnl-genl-3.so.* \ + ${libdir}/libnl-genl.so.*" +FILES_${PN}-idiag = "${libdir}/libnl-idiag-3.so.*" +FILES_${PN}-nf = "${libdir}/libnl-nf-3.so.*" +FILES_${PN}-route = "${libdir}/libnl-route-3.so.*" +FILES_${PN}-xfrm = "${libdir}/libnl-xfrm-3.so.*" +RREPLACES_${PN}-genl = "libnl-genl2" +RCONFLICTS_${PN}-genl = "libnl-genl2" + +RDEPENDS_${PN}-ptest += "libcheck" +DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'libcheck', '', d)}" + +# make sure the tests don't link against wrong so file +EXTRA_OECONF += "${@bb.utils.contains('PTEST_ENABLED', '1', '--disable-rpath', '', d)}" + +do_compile_ptest() { + # hack to remove the call to `make runtest-TESTS` + sed -i 's/$(MAKE) $(AM_MAKEFLAGS) runtest-TESTS//g' Makefile + oe_runmake check +} + +do_install_ptest(){ + # legacy? tests are also installed, but ptest-runner will not run them + # upstream are not running these tests in their CI pipeline + # issue opened https://github.com/thom311/libnl/issues/270 + install -m 0755 tests/.libs/* ${D}${PTEST_PATH}/ +} + +BBCLASSEXTEND = "native nativesdk" -- Gitee From 1c13762e726ee437e426bd0e6b714315542868ba Mon Sep 17 00:00:00 2001 From: lixiaoyong Date: Thu, 13 Jan 2022 10:13:29 +0800 Subject: [PATCH 3/6] add recipe for libpcap Signed-off-by: lixiaoyong --- .../recipes-core/libpcap/libpcap_1.10.1.bb | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 meta-openeuler/recipes-core/libpcap/libpcap_1.10.1.bb diff --git a/meta-openeuler/recipes-core/libpcap/libpcap_1.10.1.bb b/meta-openeuler/recipes-core/libpcap/libpcap_1.10.1.bb new file mode 100644 index 00000000000..6cd9ad0b8a9 --- /dev/null +++ b/meta-openeuler/recipes-core/libpcap/libpcap_1.10.1.bb @@ -0,0 +1,45 @@ +SUMMARY = "Interface for user-level network packet capture" +DESCRIPTION = "Libpcap provides a portable framework for low-level network \ +monitoring. Libpcap can provide network statistics collection, \ +security monitoring and network debugging." +HOMEPAGE = "http://www.tcpdump.org/" +BUGTRACKER = "http://sourceforge.net/tracker/?group_id=53067&atid=469577" +SECTION = "libs/network" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=5eb289217c160e2920d2e35bddc36453 \ + file://pcap.h;beginline=1;endline=32;md5=39af3510e011f34b8872f120b1dc31d2" +DEPENDS = "flex-native bison-native" + +SRC_URI = "file://libpcap/${BP}.tar.gz \ + file://libpcap/backport-0003-pcap-linux-apparently-ctc-interfaces-on-s390-has-eth.patch \ + file://libpcap/backport-pcap-config-mitigate-multilib-conflict.patch \ + " +SRC_URI[sha256sum] = "ed285f4accaf05344f90975757b3dbfe772ba41d1c401c2648b7fa45b711bdd4" + +inherit autotools binconfig-disabled pkgconfig + +BINCONFIG = "${bindir}/pcap-config" + +# Explicitly disable dag support. We don't have recipe for it and if enabled here, +# configure script poisons the include dirs with /usr/local/include even when the +# support hasn't been detected. +EXTRA_OECONF = " \ + --with-pcap=linux \ + --without-dag \ + " + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ +" +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," +PACKAGECONFIG[libnl] = "--with-libnl,--without-libnl,libnl" + +do_configure_prepend () { + #remove hardcoded references to /usr/include + sed 's|\([ "^'\''I]\+\)/usr/include/|\1${STAGING_INCDIR}/|g' -i ${S}/configure.ac + if [ ! -e ${S}/acinclude.m4 ]; then + cat ${S}/aclocal.m4 > ${S}/acinclude.m4 + fi + sed -i -e's,^V_RPATH_OPT=.*$,V_RPATH_OPT=,' ${S}/pcap-config.in +} + +BBCLASSEXTEND = "native" -- Gitee From 447785b8b8d72cbe1debc5c958f1e75eb3e6878f Mon Sep 17 00:00:00 2001 From: lixiaoyong Date: Thu, 13 Jan 2022 10:14:32 +0800 Subject: [PATCH 4/6] add recipe for libhugetlbfs Signed-off-by: lixiaoyong --- .../libhugetlbfs/libhugetlbfs_2.23.bb | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 meta-openeuler/recipes-core/libhugetlbfs/libhugetlbfs_2.23.bb diff --git a/meta-openeuler/recipes-core/libhugetlbfs/libhugetlbfs_2.23.bb b/meta-openeuler/recipes-core/libhugetlbfs/libhugetlbfs_2.23.bb new file mode 100644 index 00000000000..4b6f150d62a --- /dev/null +++ b/meta-openeuler/recipes-core/libhugetlbfs/libhugetlbfs_2.23.bb @@ -0,0 +1,59 @@ +SUMMARY = "A library which provides easy access to huge pages of memory" +HOMEPAGE = "https://github.com/libhugetlbfs/libhugetlbfs" +LICENSE = "LGPL-2.1" +LIC_FILES_CHKSUM = "file://LGPL-2.1;md5=2d5025d4aa3495befef8f17206a5b0a1" + +SRC_URI = "file://libhugetlbfs/${BP}.tar.gz \ + file://libhugetlbfs/0000-build_flags.patch \ + file://libhugetlbfs/Disable-hugepage-backed-malloc-if-__morecore-is-not-.patch \ + file://libhugetlbfs/libhugetlbfs-make-cflags.patch \ +" +SRC_URI[sha256sum] = "b70672f1e807c61b7eb3adf41c1903b42917951f2e7f8aef6821841700c04479" + +COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*" + +LIBARGS = "LIB32=${baselib} LIB64=${baselib}" +LIBHUGETLBFS_ARCH = "${TARGET_ARCH}" +LIBHUGETLBFS_ARCH_powerpc = "ppc" +LIBHUGETLBFS_ARCH_powerpc64 = "ppc64" +LIBHUGETLBFS_ARCH_powerpc64le = "ppc64" +EXTRA_OEMAKE = "'ARCH=${LIBHUGETLBFS_ARCH}' 'OPT=${CFLAGS}' 'CC=${CC}' ${LIBARGS} BUILDTYPE=NATIVEONLY V=2" +PARALLEL_MAKE = "" +CFLAGS += "-fexpensive-optimizations -frename-registers -fomit-frame-pointer -g0" + +export HUGETLB_LDSCRIPT_PATH="${S}/ldscripts" + +TARGET_CC_ARCH += "${LDFLAGS}" + +#The CUSTOM_LDSCRIPTS doesn't work with the gold linker +#inherit cpan-base +do_configure() { + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then + sed -i 's/CUSTOM_LDSCRIPTS = yes/CUSTOM_LDSCRIPTS = no/' Makefile + fi +} + +do_install() { + oe_runmake PREFIX=${prefix} DESTDIR=${D} \ + install + rm ${D}/${libdir}/libhugetlbfs.a + rm ${D}/${libdir}/../bin/hugeadm + rm ${D}/${libdir}/../bin/hugectl + rm ${D}/${libdir}/../bin/hugeedit + rm ${D}/${libdir}/../bin/pagesize + rm -rf ${D}/${libdir}/../share/libhugetlbfs + rm -rf ${D}/usr/bin + rm -rf ${D}/${libdir}/libhugetlbfs + rm -rf ${D}/usr/share + rm -rf ${D}/usr/include +} + + +FILES_${PN} += "${libdir}/*.so" +FILES_${PN}-dev = "${includedir}" +FILES_${PN}-dbg += "${libdir}/libhugetlbfs/tests/obj32/.debug ${libdir}/libhugetlbfs/tests/obj64/.debug" + +INSANE_SKIP_${PN} = "dev-so" + +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" -- Gitee From f7647bbae215c4e65dd63f261fdf56930b598e6e Mon Sep 17 00:00:00 2001 From: lixiaoyong Date: Thu, 13 Jan 2022 10:33:28 +0800 Subject: [PATCH 5/6] add msgmerge for e2fsprogs Signed-off-by: lixiaoyong --- meta-openeuler/conf/local.conf.sample | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta-openeuler/conf/local.conf.sample b/meta-openeuler/conf/local.conf.sample index 0c3f35558ad..c14c5a18641 100644 --- a/meta-openeuler/conf/local.conf.sample +++ b/meta-openeuler/conf/local.conf.sample @@ -273,7 +273,8 @@ BB_DISKMON_DIRS ??= "\ CONF_VERSION = "2" HOSTTOOLS += "python chrpath rpmbuild pkg-config flex bison bc automake autoreconf libtool \ ninja xz autopoint autoreconf aclocal libtoolize autoscan autom4te autoconf autoheader \ - autoupdate libtool libtoolize pkg-config cmake fmt gperf m4 createrepo_c dnf ldconfig msgfmt" + autoupdate libtool libtoolize pkg-config cmake fmt gperf m4 createrepo_c dnf ldconfig \ + msgfmt msgmerge" HOSTTOOLS_remove += "diffstat lz4c pzstd rpcgen" SANITY_REQUIRED_UTILITIES_remove += "diffstat chrpath" CONNECTIVITY_CHECK_URIS = "" -- Gitee From d59a8a819234b2a7367db194000a208f7877daa5 Mon Sep 17 00:00:00 2001 From: lixiaoyong Date: Thu, 13 Jan 2022 10:34:56 +0800 Subject: [PATCH 6/6] add reciper for e2fsprogs Signed-off-by: lixiaoyong --- .../recipes-core/e2fsprogs/e2fsprogs.inc | 26 ++++ .../e2fsprogs/e2fsprogs/run-ptest | 10 ++ .../e2fsprogs/e2fsprogs_1.46.4.bb | 137 ++++++++++++++++++ 3 files changed, 173 insertions(+) create mode 100644 meta-openeuler/recipes-core/e2fsprogs/e2fsprogs.inc create mode 100644 meta-openeuler/recipes-core/e2fsprogs/e2fsprogs/run-ptest create mode 100644 meta-openeuler/recipes-core/e2fsprogs/e2fsprogs_1.46.4.bb diff --git a/meta-openeuler/recipes-core/e2fsprogs/e2fsprogs.inc b/meta-openeuler/recipes-core/e2fsprogs/e2fsprogs.inc new file mode 100644 index 00000000000..aed06a00f08 --- /dev/null +++ b/meta-openeuler/recipes-core/e2fsprogs/e2fsprogs.inc @@ -0,0 +1,26 @@ +SUMMARY = "Ext2 Filesystem Utilities" +DESCRIPTION = "The Ext2 Filesystem Utilities (e2fsprogs) contain all of the standard utilities for creating, \ +fixing, configuring , and debugging ext2 filesystems." +HOMEPAGE = "http://e2fsprogs.sourceforge.net/" + +LICENSE = "GPLv2 & LGPLv2 & BSD & MIT" +LICENSE_e2fsprogs-dumpe2fs = "GPLv2" +LICENSE_e2fsprogs-e2fsck = "GPLv2" +LICENSE_e2fsprogs-mke2fs = "GPLv2" +LICENSE_e2fsprogs-tune2fs = "GPLv2" +LICENSE_e2fsprogs-badblocks = "GPLv2" +LIC_FILES_CHKSUM = "file://NOTICE;md5=d50be0580c0b0a7fbc7a4830bbe6c12b \ + file://lib/ext2fs/ext2fs.h;beginline=1;endline=9;md5=596a8dedcb4e731c6b21c7a46fba6bef \ + file://lib/e2p/e2p.h;beginline=1;endline=7;md5=8a74ade8f9d65095d70ef2d4bf48e36a \ + file://lib/uuid/uuid.h.in;beginline=1;endline=32;md5=dbb8079e114a5f841934b99e59c8820a \ + file://lib/uuid/COPYING;md5=58dcd8452651fc8b07d1f65ce07ca8af \ + file://lib/et/et_name.c;beginline=1;endline=11;md5=ead236447dac7b980dbc5b4804d8c836 \ + file://lib/ss/ss.h;beginline=1;endline=20;md5=6e89ad47da6e75fecd2b5e0e81e1d4a6" +SECTION = "base" +DEPENDS = "util-linux attr" + +SRC_URI = "file://e2fsprogs/${BP}.tar.xz" + +inherit autotools gettext texinfo pkgconfig multilib_header ptest + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-core/e2fsprogs/e2fsprogs/run-ptest b/meta-openeuler/recipes-core/e2fsprogs/e2fsprogs/run-ptest new file mode 100644 index 00000000000..c97c0377e9c --- /dev/null +++ b/meta-openeuler/recipes-core/e2fsprogs/e2fsprogs/run-ptest @@ -0,0 +1,10 @@ +#!/bin/sh + +cd ./test +SKIP_SLOW_TESTS=yes ./test_script | sed -u -e '/:[[:space:]]ok/s/^/PASS: /' -e '/:[[:space:]]failed/s/^/FAIL: /' -e '/:[[:space:]]skipped/s/^/SKIP: /' +rm -rf /var/volatile/tmp/*e2fsprogs* +rm -f tmp-* +rm -f *.tmp +rm -f *.ok +rm -f *.failed +rm -f *.log diff --git a/meta-openeuler/recipes-core/e2fsprogs/e2fsprogs_1.46.4.bb b/meta-openeuler/recipes-core/e2fsprogs/e2fsprogs_1.46.4.bb new file mode 100644 index 00000000000..29b317af440 --- /dev/null +++ b/meta-openeuler/recipes-core/e2fsprogs/e2fsprogs_1.46.4.bb @@ -0,0 +1,137 @@ +require e2fsprogs.inc + +SRC_URI += "file://e2fsprogs/0001-e2fsprogs-set-hugefile-from-4T-to-1T-in-hugefile-tes.patch \ + file://e2fsprogs/0002-libss-add-newer-libreadline.so.8-to-dlopen-path.patch \ + file://e2fsprogs/0003-tests-update-expect-files-for-f_mmp_garbage.patch \ + file://e2fsprogs/0004-tests-update-expect-files-for-f_large_dir-and-f_larg.patch \ + file://run-ptest \ +" + +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_e2fsprogs-e2scrub_remove += "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/ +} -- Gitee