diff --git a/bsp/meta-openeuler-bsp/raspberrypi/recipes-core/images/openeuler-image-tiny.bbappend b/bsp/meta-openeuler-bsp/raspberrypi/recipes-core/images/openeuler-image-tiny.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..80594cb9ba6da3a688adb1991002210422273135 --- /dev/null +++ b/bsp/meta-openeuler-bsp/raspberrypi/recipes-core/images/openeuler-image-tiny.bbappend @@ -0,0 +1,4 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +#fix mkfs.ext4 running error, add -E no_copy_xattrs to mkfs.ext4 +WKS_FILE = "sdimage-rpi.wks" +WKS_FILE_DEPENDS = "" diff --git a/bsp/meta-openeuler-bsp/raspberrypi/recipes-core/images/rpi.inc b/bsp/meta-openeuler-bsp/raspberrypi/recipes-core/images/rpi.inc index 0c6383dc9295483ae05967c53ffc309d1b1a17ac..36541a1b1b6c43c622529c6be99b4ec8a0093631 100644 --- a/bsp/meta-openeuler-bsp/raspberrypi/recipes-core/images/rpi.inc +++ b/bsp/meta-openeuler-bsp/raspberrypi/recipes-core/images/rpi.inc @@ -23,24 +23,3 @@ IMAGE_POSTPROCESS_COMMAND += "copy_openeuler_distro;" IMAGE_FSTYPES = "rpi-sdimg" SDIMG_ROOTFS_TYPE = "ext4" EXTRA_IMAGECMD_ext4 += "-E no_copy_xattrs" - - -#not depends to native parted/mtools and so on, use host command -export OPENEULER_WIC_IMAGE_REMOVE = "parted dosfstools mtools" -python() { - all_depends = d.getVarFlag("do_image_rpi_sdimg", "depends") - bb.note("all depends of do_image_rpi_sdimg: %s" % all_depends) - for dep in ('parted', 'gptfdisk', 'dosfstools', 'mtools'): - all_depends = all_depends.replace('%s-native:do_populate_sysroot' % dep, "") - new_depends = all_depends - d.setVarFlag("do_image_rpi_sdimg", "depends", new_depends) - bb.note("new depends of do_image_rpi_sdimg: %s" % new_depends) - - all_depends = d.getVarFlag("do_image_ext4", "depends") - bb.note("all depends of do_image_ext4: %s" % all_depends) - for dep in ['e2fsprogs']: - all_depends = all_depends.replace('%s-native:do_populate_sysroot' % dep, "") - new_depends = all_depends - d.setVarFlag("do_image_ext4", "depends", new_depends) - bb.note("new depends of do_image_ext4: %s" % new_depends) -} diff --git a/bsp/meta-raspberrypi/conf/machine/raspberrypi4-64.conf b/bsp/meta-raspberrypi/conf/machine/raspberrypi4-64.conf index 12c8954d946ae15572a0af5f9a288065d7989420..46375da89196a3041295741128e4c8fdb3d52141 100644 --- a/bsp/meta-raspberrypi/conf/machine/raspberrypi4-64.conf +++ b/bsp/meta-raspberrypi/conf/machine/raspberrypi4-64.conf @@ -34,3 +34,12 @@ KERNEL_IMAGETYPE_DIRECT ?= "Image" KERNEL_BOOTCMD ?= "booti" ARMSTUB ?= "armstub8-gic.bin" + +# add kernel-module for support wifi +INSTALLMODULES += "\ +kernel-module-rfkill \ +kernel-module-cfg80211 \ +kernel-module-brcmutil \ +kernel-module-brcmfmac \ +" +KERNEL_MODULE_AUTOLOAD = "${INSTALLMODULES}" diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro_%.bbappend b/bsp/meta-raspberrypi/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..d24a1e91b2fecc66e056fc63762492a8ef09c286 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro_%.bbappend @@ -0,0 +1,32 @@ +# apply openeuler source package +SRC_URI = "file://raspberrypi-firmware/raspberrypi-firmware-20220316.tar.gz \ +" + +S = "${WORKDIR}/raspberrypi-firmware-20220316" + +LICENSE = "\ + Firmware-broadcom_bcm43xx-rpidistro \ +" + +# openeuler source package directory tree is difference +LIC_FILES_CHKSUM = "\ + file://License/LICENCE.broadcom_bcm43xx;md5=3160c14df7228891b868060e1951dfbc \ +" + +NO_GENERIC_LICENSE[Firmware-broadcom_bcm43xx-rpidistro] = "License/LICENCE.broadcom_bcm43xx" + +# in do_install function, it will exec: +# cp ./LICENCE.broadcom_bcm43xx ${D}${nonarch_base_libdir}/firmware/LICENCE.broadcom_bcm43xx-rpidistro +# but this license file is at ${S}/License in openeuler source package +# so copy it to ${S} in do_compile function +do_compile_append() { + cp ./License/LICENCE.broadcom_bcm43xx ./LICENCE.broadcom_bcm43xx +} + +# regulatory.db is needed when firmware load +# this files is packed together in raspberrypi-firmware, just copy it. +do_install_append() { + cp ./regulatory* ${D}${nonarch_base_libdir}/firmware +} + +FILES_${PN}-bcm43455 += "${nonarch_base_libdir}/firmware/regulatory*" diff --git a/meta-openeuler/classes/autotools.bbclass b/meta-openeuler/classes/autotools.bbclass index 8a0fcb38689cd418149df401745c5f7bc1c768c8..ee6b5d226022af6e9e9af0ab61e806f8a6f6f5f3 100644 --- a/meta-openeuler/classes/autotools.bbclass +++ b/meta-openeuler/classes/autotools.bbclass @@ -1,4 +1,7 @@ -def autotools_xxxx(d): +# openeuler's autotools.bbclass is almost the same as poky's autotools.bbclass except STAGING_DATADIR_NATIVE +# is replaced with NATIVESDK_DATADIR. In the future, if the problem of NATIVE and NATIVESDK is fixed, +# openeuler's autotools.bbclass can be removed +def autotools_dep_prepend(d): if d.getVar('INHIBIT_AUTOTOOLS_DEPS'): return '' @@ -10,19 +13,18 @@ def autotools_xxxx(d): deps += 'autoconf-native automake-native ' if not pn in ['libtool', 'libtool-native'] and not pn.endswith("libtool-cross"): + deps += 'libtool-native ' if not bb.data.inherits_class('native', d) \ and not bb.data.inherits_class('nativesdk', d) \ and not bb.data.inherits_class('cross', d) \ and not d.getVar('INHIBIT_DEFAULT_DEPS'): - image_name = "%s%s" % (d.getVar('MACHINE_ARCH'), d.getVar('OPENEULER_KERNEL_TAG')) - #if image_name in ['arm32a15eb-4.4', 'arm32a9eb-4.4', 'arm32a9eb-tiny-4.4', 'arm64eb-4.4']: - #deps += ' ' - #else: - #deps += 'libtool-cross ' + deps += 'libtool-cross ' - return deps + 'gnu-config-native ' + return deps -DEPENDS_prepend = "${@autotools_xxxx(d)} " +DEPENDS_prepend = "${@autotools_dep_prepend(d)} " + +NATIVESDK_DATADIR = "${OPENEULER_NATIVESDK_SYSROOT}/usr/share" inherit siteinfo @@ -30,9 +32,10 @@ inherit siteinfo # results for autoconf tests we cannot run at build time. # The value of this variable is filled in in a prefunc because it depends on # the contents of the sysroot. -export CONFIG_SITE = "${@siteinfo_get_files(d)}" +export CONFIG_SITE + acpaths ?= "default" -EXTRA_AUTORECONF_DEFINE = " AUTOPOINT=echo GTKDOCIZE=echo " +EXTRA_AUTORECONF = "--exclude=autopoint --exclude=gtkdocize" export lt_cv_sys_lib_dlsearch_path_spec = "${libdir} ${base_libdir}" @@ -53,6 +56,8 @@ export LDFLAGS_FOR_BUILD = "${BUILD_LDFLAGS}" def append_libtool_sysroot(d): # Only supply libtool sysroot option for non-native packages + if not bb.data.inherits_class('native', d): + return '--with-libtool-sysroot=${STAGING_DIR_HOST}' return "" CONFIGUREOPTS = " --build=${BUILD_SYS} \ @@ -90,7 +95,7 @@ oe_runconf () { cfgscript=`python3 -c "import os; print(os.path.relpath(os.path.dirname('${CONFIGURE_SCRIPT}'), '.'))"`/$cfgscript_name if [ -x "$cfgscript" ] ; then bbnote "Running $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} $@" - if ! CONFIG_SHELL=/bin/bash ${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@"; then + if ! CONFIG_SHELL=${CONFIG_SHELL-/bin/bash} ${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@"; then bbnote "The following config.log files may provide further information." bbnote `find ${B} -ignore_readdir_race -type f -name config.log` bbfatal_log "configure failed" @@ -134,14 +139,14 @@ EXTRACONFFUNCS ??= "" EXTRA_OECONF_append = " ${PACKAGECONFIG_CONFARGS}" do_configure[prefuncs] += "autotools_preconfigure autotools_aclocals ${EXTRACONFFUNCS}" -#do_compile[prefuncs] += "autotools_aclocals" -#do_install[prefuncs] += "autotools_aclocals" +do_compile[prefuncs] += "autotools_aclocals" +do_install[prefuncs] += "autotools_aclocals" do_configure[postfuncs] += "autotools_postconfigure" ACLOCALDIR = "${STAGING_DATADIR}/aclocal" -ACLOCALEXTRAPATH = "" -ACLOCALEXTRAPATH_class-target = " -I ${STAGING_DATADIR_NATIVE}/aclocal/" -ACLOCALEXTRAPATH_class-nativesdk = " -I ${STAGING_DATADIR_NATIVE}/aclocal/" +ACLOCALEXTRAPATH = "-I ${NATIVESDK_DATADIR}/aclocal/" +ACLOCALEXTRAPATH_class-target = " -I ${NATIVESDK_DATADIR}/aclocal/" +ACLOCALEXTRAPATH_class-nativesdk = " -I ${NATIVESDK_DATADIR}/aclocal/" python autotools_aclocals () { d.setVar("CONFIG_SITE", siteinfo_get_files(d, sysrootcache=True)) @@ -168,6 +173,7 @@ autotools_do_configure() { olddir=`pwd` cd ${AUTOTOOLS_SCRIPT_PATH} mkdir -p ${ACLOCALDIR} + ACLOCAL="aclocal --system-acdir=${ACLOCALDIR}/" if [ x"${acpaths}" = xdefault ]; then acpaths= for i in `find ${AUTOTOOLS_SCRIPT_PATH} -ignore_readdir_race -maxdepth 2 -name \*.m4|grep -v 'aclocal.m4'| \ @@ -177,20 +183,17 @@ autotools_do_configure() { else acpaths="${acpaths}" fi - acpaths="$acpaths -I ${ACLOCALDIR}" - if [ -d ${STAGING_DATADIR_NATIVE}/aclocal ]; then - acpaths="$acpaths ${ACLOCALEXTRAPATH}" - fi + acpaths="$acpaths ${ACLOCALEXTRAPATH}" AUTOV=`automake --version | sed -e '1{s/.* //;s/\.[0-9]\+$//};q'` automake --version echo "AUTOV is $AUTOV" - if [ -d ${STAGING_DATADIR_NATIVE}/aclocal-$AUTOV ]; then - ACLOCAL="$ACLOCAL --automake-acdir=${STAGING_DATADIR_NATIVE}/aclocal-$AUTOV" + if [ -d ${NATIVESDK_DATADIR}/aclocal-$AUTOV ]; then + ACLOCAL="$ACLOCAL --automake-acdir=${NATIVESDK_DATADIR}/aclocal-$AUTOV" fi # autoreconf is too shy to overwrite aclocal.m4 if it doesn't look # like it was auto-generated. Work around this by blowing it away # by hand, unless the package specifically asked not to run aclocal. - if ! echo ${EXTRA_AUTORECONF_DEFINE} | grep -q "ACLOCAL"; then + if ! echo ${EXTRA_AUTORECONF} | grep -q "aclocal"; then rm -f aclocal.m4 fi if [ -e configure.in ]; then @@ -198,56 +201,34 @@ autotools_do_configure() { else CONFIGURE_AC=configure.ac fi - sed -i '/AC_CANONICAL_TARGET/atest -n $target_alias && test "$target_alias" = "$host_alias" && test "$program_prefix$program_suffix$program_transform_name" = "${target_alias}-NONEs,x,x," && program_prefix=NONE' ${CONFIGURE_AC} if grep -q "^[[:space:]]*AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC; then if grep -q "sed.*POTFILES" $CONFIGURE_AC; then : do nothing -- we still have an old unmodified configure.ac - else + else bbnote Executing glib-gettextize --force --copy echo "no" | glib-gettextize --force --copy fi elif [ "${BPN}" != "gettext" ] && grep -q "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC; then # We'd call gettextize here if it wasn't so broken... - cp /usr/share/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/ + cp ${NATIVESDK_DATADIR}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/ if [ -d ${S}/po/ ]; then - cp -f /usr/share/gettext/po/Makefile.in.in ${S}/po/ + cp -f ${NATIVESDK_DATADIR}/gettext/po/Makefile.in.in ${S}/po/ if [ ! -e ${S}/po/remove-potcdate.sin ]; then - cp /usr/share/gettext/po/remove-potcdate.sin ${S}/po/ + cp ${NATIVESDK_DATADIR}/gettext/po/remove-potcdate.sin ${S}/po/ fi fi PRUNE_M4="$PRUNE_M4 gettext.m4 iconv.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4" fi mkdir -p m4 - if grep -q "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC; then - if ! echo "${DEPENDS}" | grep -q intltool-native; then - bbwarn "Missing DEPENDS on intltool-native" - fi - PRUNE_M4="$PRUNE_M4 intltool.m4" - bbnote Executing intltoolize --copy --force --automake - intltoolize --copy --force --automake - fi for i in $PRUNE_M4; do find ${S} -ignore_readdir_race -name $i -delete done - tmp_site=`pwd`/tmp.site - rm -f ${tmp_site} - for f in $CONFIG_SITE - do - bbnote Adding script ${f} to site file - cat $f >> ${tmp_site} - done - export CONFIG_SITE=${tmp_site} - - bbnote Executing ACLOCAL=\"$ACLOCAL\" ${EXTRA_AUTORECONF_DEFINE} autoreconf --verbose --install --force ${EXTRA_AUTORECONF} $acpaths - ACLOCAL="$ACLOCAL" ${EXTRA_AUTORECONF_DEFINE} autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || die "autoreconf execution failed." - cp -f ${RECIPE_SYSROOT_NATIVE}/usr/share/gnu-config/config.guess . - cp -f ${RECIPE_SYSROOT_NATIVE}/usr/share/gnu-config/config.sub . + bbnote Executing ACLOCAL=\"$ACLOCAL\" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths + ACLOCAL="$ACLOCAL" autoreconf -Wcross -Wno-obsolete --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || die "autoreconf execution failed." cd $olddir fi - test ! -f ${S}/aclocal.m4 || sed -i "/MSGMERGE_FOR_MSGFMT_OPTION/{s|--for-msgfmt||g}" ${S}/aclocal.m4 - test ! -f ${S}/configure || sed -i "/MSGMERGE_FOR_MSGFMT_OPTION/{s|--for-msgfmt||g}" ${S}/configure if [ -e ${CONFIGURE_SCRIPT} ]; then oe_runconf else @@ -256,19 +237,7 @@ autotools_do_configure() { } autotools_do_compile() { - for libtool_file in `find ${B} -ignore_readdir_race -name libtool`; do - sed -i 's/macro_version=2.4.2/macro_version=2.4.6/g' $libtool_file - sed -i 's/macro_revision=1.3337/macro_revision=2.4.6/g' $libtool_file - sed -i 's/VERSION=2.4.2/VERSION=2.4.6/g' $libtool_file - sed -i 's/package_revision=2.4.2/package_revision=2.4.6/g' $libtool_file - sed -i 's/package_revision=1.3337/package_revision=2.4.6/g' $libtool_file - if [ ${BUILD_SYS} != ${TARGET_SYS} ]; then - sed -i 's|lt_sysroot=|lt_sysroot=${RECIPE_SYSROOT}|' $libtool_file - fi - sed -i '/fake/{ n; s/add_dir=-L$libdir/add_dir="-L$lt_sysroot$libdir"/; }' $libtool_file - sed -i '/fake/{ n; s/add_dir="-L$libdir"/add_dir="-L$lt_sysroot$libdir"/; }' $libtool_file - done - oe_runmake + oe_runmake } autotools_do_install() { diff --git a/meta-openeuler/classes/external-toolchain-cross-canadian.bbclass b/meta-openeuler/classes/external-toolchain-cross-canadian.bbclass index 82a4e0e81cd9df0e9a569495d12830e0bb31ff4e..66a64ffa1c6f9e8e40afbd8d3ccaf06b9136bdc8 100644 --- a/meta-openeuler/classes/external-toolchain-cross-canadian.bbclass +++ b/meta-openeuler/classes/external-toolchain-cross-canadian.bbclass @@ -6,12 +6,13 @@ inherit external-toolchain cross-canadian STRIP_task-package = "strip" STRIP_task-populate-sysroot = "strip" OBJCOPY_task-package = "objcopy" +PACKAGE_DEPENDS_remove = "virtual/${TARGET_PREFIX}binutils" # Scan just toolchains root directory, but include some additional mirrors EXTERNAL_INSTALL_SOURCE_PATHS = "${EXTERNAL_TOOLCHAIN}" FILES_MIRRORS += "\ ${bindir}/|/bin/\n \ - ${libdir}/|/lib/\n \ + ${libdir}/|/lib64/\n \ ${libexecdir}/|/libexec/\n \ ${prefix}/|${target_prefix}/\n \ ${prefix}/|${target_base_prefix}/\n \ @@ -23,8 +24,7 @@ FILES_MIRRORS += "\ # Align with more typical toolchain layout. Everything is already isolated by # EXTERNAL_TARGET_SYS, we don't need cross-canadian.bbclass to do it for us. bindir = "${exec_prefix}/bin" -libdir = "${exec_prefix}/lib" -libdir_aarch64 = "${exec_prefix}/lib64" +libdir = "${exec_prefix}/lib64" libexecdir = "${exec_prefix}/libexec" # We're relying on a compatible host libc, not one from a nativesdk build diff --git a/meta-openeuler/classes/image-live.bbclass b/meta-openeuler/classes/image-live.bbclass new file mode 100644 index 0000000000000000000000000000000000000000..38b3c7f1c181d63d5fd84d6bdfadb5f442cb4b68 --- /dev/null +++ b/meta-openeuler/classes/image-live.bbclass @@ -0,0 +1,280 @@ +# Copyright (C) 2004, Advanced Micro Devices, Inc. All Rights Reserved +# Released under the MIT license (see packages/COPYING) + +# Creates a bootable image using syslinux, your kernel and an optional +# initrd + +# +# End result is two things: +# +# 1. A .hddimg file which is an msdos filesystem containing syslinux, a kernel, +# an initrd and a rootfs image. These can be written to harddisks directly and +# also booted on USB flash disks (write them there with dd). +# +# 2. A CD .iso image + +# Boot process is that the initrd will boot and process which label was selected +# in syslinux. Actions based on the label are then performed (e.g. installing to +# an hdd) + +# External variables (also used by syslinux.bbclass) +# ${INITRD} - indicates a list of filesystem images to concatenate and use as an initrd (optional) +# ${HDDIMG_ID} - FAT image volume-id +# ${ROOTFS} - indicates a filesystem image to include as the root filesystem (optional) + +inherit live-vm-common image-artifact-names + +do_bootimg[depends] += "dosfstools-native:do_populate_sysroot \ + mtools-native:do_populate_sysroot \ + cdrkit-native:do_populate_sysroot \ + virtual/kernel:do_deploy \ + ${@bb.utils.contains("MACHINE_FEATURES", "isohybrid", "syslinux-native:do_populate_sysroot", "", d)} \ + ${@'%s:do_image_%s' % (d.getVar('PN'), d.getVar('LIVE_ROOTFS_TYPE').replace('-', '_')) if d.getVar('ROOTFS') else ''} \ + " + +LABELS_LIVE ?= "boot install" +ROOT_LIVE ?= "root=/dev/ram0" +INITRD_IMAGE_LIVE ?= "${MLPREFIX}core-image-minimal-initramfs" +INITRD_LIVE ?= "${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE_LIVE}-${MACHINE}.${INITRAMFS_FSTYPES}" + +LIVE_ROOTFS_TYPE ?= "ext4" +ROOTFS ?= "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${LIVE_ROOTFS_TYPE}" + +IMAGE_TYPEDEP_live = "${LIVE_ROOTFS_TYPE}" +IMAGE_TYPEDEP_iso = "${LIVE_ROOTFS_TYPE}" +IMAGE_TYPEDEP_hddimg = "${LIVE_ROOTFS_TYPE}" +IMAGE_TYPES_MASKED += "live hddimg iso" + +python() { + image_b = d.getVar('IMAGE_BASENAME') + initrd_i = d.getVar('INITRD_IMAGE_LIVE') + if image_b == initrd_i: + bb.error('INITRD_IMAGE_LIVE %s cannot use image live, hddimg or iso.' % initrd_i) + bb.fatal('Check IMAGE_FSTYPES and INITRAMFS_FSTYPES settings.') + elif initrd_i: + d.appendVarFlag('do_bootimg', 'depends', ' %s:do_image_complete' % initrd_i) +} + +HDDDIR = "${S}/hddimg" +ISODIR = "${S}/iso" +EFIIMGDIR = "${S}/efi_img" +COMPACT_ISODIR = "${S}/iso.z" + +ISOLINUXDIR ?= "/isolinux" +ISO_BOOTIMG = "isolinux/isolinux.bin" +ISO_BOOTCAT = "isolinux/boot.cat" +MKISOFS_OPTIONS = "-no-emul-boot -boot-load-size 4 -boot-info-table" + +# this options make iso support uppercase character. it is important to install process. +OPENEULER_MKISOFS_OPTIONS = "-R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -input-charset utf-8 " + +BOOTIMG_VOLUME_ID ?= "boot" +BOOTIMG_EXTRA_SPACE ?= "512" + +populate_live() { + populate_kernel $1 + # zImage is not support, when recive a zImage, replace with Image + # it should compact with DEPLOY_DIR_IMAGE/image in meta-openeuler/recipes-core/images/qemu.inc + if [ "${KERNEL_IMAGETYPE}" == "zImage" ];then + if [ -e ${DEPLOY_DIR_IMAGE}/Image* ]; then + install -m 0644 ${DEPLOY_DIR_IMAGE}/Image* $1/${KERNEL_IMAGETYPE} + else + bbfatal "unsupport zImage in grub cfg, should replace with ${DEPLOY_DIR_IMAGE}/Image* but not exists." + fi + fi + + if [ -s "${ROOTFS}" ]; then + install -m 0644 ${ROOTFS} $1/rootfs.img + fi +} + +build_iso() { + # Only create an ISO if we have an INITRD and the live or iso image type was selected + if [ -z "${INITRD}" ] || [ "${@bb.utils.contains_any('IMAGE_FSTYPES', 'live iso', '1', '0', d)}" != "1" ]; then + bbnote "ISO image will not be created." + return + fi + # ${INITRD} is a list of multiple filesystem images + for fs in ${INITRD} + do + if [ ! -s "$fs" ]; then + bbwarn "ISO image will not be created. $fs is invalid." + return + fi + done + + populate_live ${ISODIR} + + if [ "${PCBIOS}" = "1" ]; then + syslinux_iso_populate ${ISODIR} + fi + if [ "${EFI}" = "1" ]; then + efi_iso_populate ${ISODIR} + build_fat_img ${EFIIMGDIR} ${ISODIR}/efi.img + fi + + # EFI only + if [ "${PCBIOS}" != "1" ] && [ "${EFI}" = "1" ] && [ "${@bb.utils.contains('MACHINE_FEATURES', 'isohybrid', '1', '0', d)}" = "1" ]; then + # Work around bug in isohybrid where it requires isolinux.bin + # In the boot catalog, even though it is not used + mkdir -p ${ISODIR}/${ISOLINUXDIR} + install -m 0644 ${STAGING_DATADIR_NATIVE}/syslinux/isolinux.bin ${ISODIR}${ISOLINUXDIR} + install -m 0644 ${STAGING_DATADIR_NATIVE}/syslinux/ldlinux.c32 ${ISODIR}${ISOLINUXDIR} + fi + + # We used to have support for zisofs; this is a relic of that + mkisofs_compress_opts="-r" + + # Check the size of ${ISODIR}/rootfs.img, use mkisofs -iso-level 3 + # when it exceeds 3.8GB, the specification is 4G - 1 bytes, we need + # leave a few space for other files. + mkisofs_iso_level="" + + if [ -n "${ROOTFS}" ] && [ -s "${ROOTFS}" ]; then + rootfs_img_size=`stat -c '%s' ${ISODIR}/rootfs.img` + # 4080218931 = 3.8 * 1024 * 1024 * 1024 + if [ $rootfs_img_size -gt 4080218931 ]; then + bbnote "${ISODIR}/rootfs.img execeeds 3.8GB, using '-iso-level 3' for mkisofs" + mkisofs_iso_level="-iso-level 3" + fi + fi + + if [ "${PCBIOS}" = "1" ] && [ "${EFI}" != "1" ] ; then + # PCBIOS only media + mkisofs -V ${BOOTIMG_VOLUME_ID} \ + -o ${IMGDEPLOYDIR}/${IMAGE_NAME}.iso \ + ${OPENEULER_MKISOFS_OPTIONS} \ + -b ${ISO_BOOTIMG} -c ${ISO_BOOTCAT} \ + $mkisofs_compress_opts \ + ${MKISOFS_OPTIONS} $mkisofs_iso_level ${ISODIR} + else + # EFI only OR EFI+PCBIOS + mkisofs -A ${BOOTIMG_VOLUME_ID} -V ${BOOTIMG_VOLUME_ID} \ + -o ${IMGDEPLOYDIR}/${IMAGE_NAME}.iso \ + ${OPENEULER_MKISOFS_OPTIONS} \ + ${@bb.utils.contains("MACHINE_FEATURES", "isohybrid", "-b ${ISO_BOOTIMG} -c ${ISO_BOOTCAT}", "", d)} \ + ${@bb.utils.contains("MACHINE_FEATURES", "isohybrid", "$mkisofs_compress_opts ${MKISOFS_OPTIONS} $mkisofs_iso_level", "", d)} \ + ${@bb.utils.contains("MACHINE_FEATURES", "isohybrid", "-eltorito-alt-boot", "", d)} \ + ${@bb.utils.contains("MACHINE_FEATURES", "isohybrid", "-e efi.img", "-b efi.img", d)} -no-emul-boot \ + ${ISODIR} + isohybrid_args="-u" + fi + + if [ "${@bb.utils.contains('MACHINE_FEATURES', 'isohybrid', '1', '0', d)}" = "1" ]; then + isohybrid $isohybrid_args ${IMGDEPLOYDIR}/${IMAGE_NAME}.iso + fi +} + +build_fat_img() { + FATSOURCEDIR=$1 + FATIMG=$2 + + # Calculate the size required for the final image including the + # data and filesystem overhead. + # Sectors: 512 bytes + # Blocks: 1024 bytes + + # Determine the sector count just for the data + SECTORS=$(expr $(du --apparent-size -ks ${FATSOURCEDIR} | cut -f 1) \* 2) + + # Account for the filesystem overhead. This includes directory + # entries in the clusters as well as the FAT itself. + # Assumptions: + # FAT32 (12 or 16 may be selected by mkdosfs, but the extra + # padding will be minimal on those smaller images and not + # worth the logic here to caclulate the smaller FAT sizes) + # < 16 entries per directory + # 8.3 filenames only + + # 32 bytes per dir entry + DIR_BYTES=$(expr $(find ${FATSOURCEDIR} | tail -n +2 | wc -l) \* 32) + # 32 bytes for every end-of-directory dir entry + DIR_BYTES=$(expr $DIR_BYTES + $(expr $(find ${FATSOURCEDIR} -type d | tail -n +2 | wc -l) \* 32)) + # 4 bytes per FAT entry per sector of data + FAT_BYTES=$(expr $SECTORS \* 4) + # 4 bytes per FAT entry per end-of-cluster list + FAT_BYTES=$(expr $FAT_BYTES + $(expr $(find ${FATSOURCEDIR} -type d | tail -n +2 | wc -l) \* 4)) + + # Use a ceiling function to determine FS overhead in sectors + DIR_SECTORS=$(expr $(expr $DIR_BYTES + 511) / 512) + # There are two FATs on the image + FAT_SECTORS=$(expr $(expr $(expr $FAT_BYTES + 511) / 512) \* 2) + SECTORS=$(expr $SECTORS + $(expr $DIR_SECTORS + $FAT_SECTORS)) + + # Determine the final size in blocks accounting for some padding + BLOCKS=$(expr $(expr $SECTORS / 2) + ${BOOTIMG_EXTRA_SPACE}) + + # mkdosfs will sometimes use FAT16 when it is not appropriate, + # resulting in a boot failure from SYSLINUX. Use FAT32 for + # images larger than 512MB, otherwise let mkdosfs decide. + if [ $(expr $BLOCKS / 1024) -gt 512 ]; then + FATSIZE="-F 32" + fi + + # mkdosfs will fail if ${FATIMG} exists. Since we are creating an + # new image, it is safe to delete any previous image. + if [ -e ${FATIMG} ]; then + rm ${FATIMG} + fi + + if [ -z "${HDDIMG_ID}" ]; then + mkdosfs ${FATSIZE} -n ${BOOTIMG_VOLUME_ID} ${MKDOSFS_EXTRAOPTS} -C ${FATIMG} \ + ${BLOCKS} + else + mkdosfs ${FATSIZE} -n ${BOOTIMG_VOLUME_ID} ${MKDOSFS_EXTRAOPTS} -C ${FATIMG} \ + ${BLOCKS} -i ${HDDIMG_ID} + fi + + # Copy FATSOURCEDIR recursively into the image file directly + mcopy -i ${FATIMG} -s ${FATSOURCEDIR}/* ::/ +} + +build_hddimg() { + # Create an HDD image + if [ "${@bb.utils.contains_any('IMAGE_FSTYPES', 'live hddimg', '1', '0', d)}" = "1" ] ; then + populate_live ${HDDDIR} + + if [ "${PCBIOS}" = "1" ]; then + syslinux_hddimg_populate ${HDDDIR} + fi + if [ "${EFI}" = "1" ]; then + efi_hddimg_populate ${HDDDIR} + fi + + # Check the size of ${HDDDIR}/rootfs.img, error out if it + # exceeds 4GB, it is the single file's max size of FAT fs. + if [ -f ${HDDDIR}/rootfs.img ]; then + rootfs_img_size=`stat -c '%s' ${HDDDIR}/rootfs.img` + max_size=`expr 4 \* 1024 \* 1024 \* 1024` + if [ $rootfs_img_size -ge $max_size ]; then + bberror "${HDDDIR}/rootfs.img rootfs size is greather than or equal to 4GB," + bberror "and this doesn't work on a FAT filesystem. You can either:" + bberror "1) Reduce the size of rootfs.img, or," + bbfatal "2) Use wic, vmdk,vhd, vhdx or vdi instead of hddimg\n" + fi + fi + + build_fat_img ${HDDDIR} ${IMGDEPLOYDIR}/${IMAGE_NAME}.hddimg + + if [ "${PCBIOS}" = "1" ]; then + syslinux_hddimg_install + fi + + chmod 644 ${IMGDEPLOYDIR}/${IMAGE_NAME}.hddimg + fi +} + +python do_bootimg() { + set_live_vm_vars(d, 'LIVE') + if d.getVar("PCBIOS") == "1": + bb.build.exec_func('build_syslinux_cfg', d) + if d.getVar("EFI") == "1": + bb.build.exec_func('build_efi_cfg', d) + bb.build.exec_func('build_hddimg', d) + bb.build.exec_func('build_iso', d) + bb.build.exec_func('create_symlinks', d) +} +do_bootimg[subimages] = "hddimg iso" +do_bootimg[imgsuffix] = "." + +addtask bootimg before do_image_complete after do_rootfs diff --git a/meta-openeuler/classes/get_rpmdeps.bbclass b/meta-openeuler/classes/openeuler.bbclass similarity index 67% rename from meta-openeuler/classes/get_rpmdeps.bbclass rename to meta-openeuler/classes/openeuler.bbclass index cd0328156424d419f12fc0d6f4d6ad1d78f861a2..06d5c5f51113dc2efa9115a02071bbf4c85d0afa 100644 --- a/meta-openeuler/classes/get_rpmdeps.bbclass +++ b/meta-openeuler/classes/openeuler.bbclass @@ -1,11 +1,13 @@ +# this class contains global method and variables for openeuler embedded + +# set_rpmdpes is used to set RPMDEPS which comes from nativesdk/host python set_rpmdeps() { import subprocess rpmdeps = d.getVar('RPMDEPS', True) if not rpmdeps or rpmdeps == "default": rpmdeps = subprocess.Popen('rpm --eval="%{_rpmconfigdir}"', shell=True, stdout=subprocess.PIPE) stdout, stderr = rpmdeps.communicate() - d.setVar('RPMDEPS', os.path.join(str(stdout, "utf-8").strip(), "rpmdeps")) - #bb.warn("xxxxxxxxxxxxxxxxxx xxxxRPMDEPS=%s"%d.getVar('RPMDEPS', True)) + d.setVar('RPMDEPS', os.path.join(str(stdout, "utf-8").strip(), "rpmdeps --alldeps --define '__font_provides %{nil}'")) } addhandler set_rpmdeps diff --git a/meta-openeuler/conf/distro/include/openeuler_hosttools.inc b/meta-openeuler/conf/distro/include/openeuler_hosttools.inc new file mode 100644 index 0000000000000000000000000000000000000000..74f10fa723570804464a079b6404f64a5aeff2a2 --- /dev/null +++ b/meta-openeuler/conf/distro/include/openeuler_hosttools.inc @@ -0,0 +1,101 @@ +# to save initial build time, unnecessary software dependecy, openeuler embedded will +# use as many as possible prebuild nativesdk/host tools to replace native tools. +# this file has related HOSTTOOLS and ASSUME_PROVIDED settings. + +HOSTTOOLS_remove += "chrpath cpp rpcgen" +HOSTTOOLS_NONFATAL += "chrpath cpp rpcgen" +# basic tools +HOSTTOOLS += "python3 python pod2man pkg-config" +HOSTTOOLS_NONFATAL += "gnu-configize" +# used by perl-native +HOSTTOOLS_NONFATAL += "cc" +ASSUME_PROVIDED += "util-linux-native python3-setuptools-native pkgconfig-native chrpath-replacement-native" + +# package management tools +HOSTTOOLS_NONFATAL += "rpm rpmbuild createrepo_c dnf" +ASSUME_PROVIDED += "rpm-native createrepo-c-native" + +# commands used by kernel build +HOSTTOOLS_NONFATAL += "flex bison bc" +ASSUME_PROVIDED += "bc-native bison-native flex-native kmod-native" + +# autotools related tools +HOSTTOOLS_NONFATAL += "automake autoreconf aclocal libtoolize m4 autoconf autoheader automake-1.16 aclocal-1.16 \ + libtool autopoint autoscan autom4te autoupdate" +ASSUME_PROVIDED += "automake-native autoconf-native libtool-native m4-native" + +# source file build tools +HOSTTOOLS_NONFATAL += "cmake ninja meson" +ASSUME_PROVIDED += "cmake-native ninja-native meson-native make-native" + +# used by cracklib, built from cracklib-native +HOSTTOOLS_NONFATAL += "create-cracklib-dict cracklib-format cracklib-packer cracklib-unpacker" + +# commands for create image +HOSTTOOLS_NONFATAL += "ldconfig" +ASSUME_PROVIDED +="ldconfig-native " + +# compress and uncompress tools +HOSTTOOLS_NONFATAL += "xz" +ASSUME_PROVIDED += " pigz-native gzip-native" + + +# gettext amd documentation related tools +HOSTTOOLS_NONFATAL += "msgfmt msgmerge makeinfo" +ASSUME_PROVIDED += "gettext-native texinfo-dummy-native" + +# openssl tools +HOSTTOOLS_NONFATAL += "openssl" + +# commands used by iso and wic +HOSTTOOLS_NONFATAL += "cpio mkdosfs mcopy mkfs.ext4 debugfs fsck.ext4 dumpe2fs parted mkfs.vfat mmd" +ASSUME_PROVIDED += "cpio-native parted-native dosfstools-native mtools-native bmap-tools-native gptfdisk-native" + +# graphics related +ASSUME_PROVIDED += "pixman-native mesa-native virglrenderer-native libsdl2-native" + +# audio related +ASSUME_PROVIDED += "alsa-lib-native" + +#some commands added in poky by default do not used now, make it optional +HOSTTOOLS_remove += "diffstat lz4c pzstd" +HOSTTOOLS_NONFATAL += "diffstat lz4c pzstd" + +SANITY_REQUIRED_UTILITIES_remove += "diffstat chrpath" +CONNECTIVITY_CHECK_URIS = "" + +# Misc. assume provided software package +# tic used by ncurses-native +# zic used by tzdata(tzcode-native) +HOSTTOOLS_NONFATAL += "fmt gperf tic zic" + +# the following are used to remove dependency +## tools required possibly required by linux-libc-hearders +ASSUME_PROVIDED += "unifdef-native rsync-native" +## prebuilt qemu is used, so no qemu-native and nativesdk-qemuwrapper-cross +ASSUME_PROVIDED += "qemu-native rsync-native nativesdk-qemuwrapper-cross" +## dwarfsrcfiles-native is used in package.bbclass, it needs elfutil +## \todo remove dwarfsrcfiles-native after elfutil is added into nativesdk +ASSUME_PROVIDED += "dwarfsrcfiles-native" + +# used by libpam +#ASSUME_PROVIDED += "libxml2-native attr-native" +ASSUME_PROVIDED += "attr-native" +# used by make-mod-scripts +ASSUME_PROVIDED += "gmp-native" +# used by cracklib +ASSUME_PROVIDED += "cracklib-native" +# used by glib-2.0 +ASSUME_PROVIDED += "glib-2.0-native" +# used by libarchive +ASSUME_PROVIDED += "e2fsprogs-native" +ASSUME_PROVIDED += "file-native" +# used by binutils +ASSUME_PROVIDED += "gnu-config-native" + +ASSUME_PROVIDED += "gperf-native perl-native \ + init-system-helpers \ + cross-localedef-native nativesdk-glibc-locale \ + \ + gtk-doc-native \ + " diff --git a/meta-openeuler/conf/distro/include/tcmode-external-openeuler.inc b/meta-openeuler/conf/distro/include/tcmode-external-openeuler.inc index 059e2243fb1211ed2d29aecc739967001ae97375..bd96b5fc8ceecb88ce19bde31578e10be70ba4a0 100644 --- a/meta-openeuler/conf/distro/include/tcmode-external-openeuler.inc +++ b/meta-openeuler/conf/distro/include/tcmode-external-openeuler.inc @@ -28,7 +28,8 @@ def openeuler_version(d): version = 'UNKNOWN' if version != 'UNKNOWN': - main_version = version.split()[-1].rstrip(')') + # gcc version xx.yy.zz nnnnnnn, here we get xx.yy.zz + main_version = version.split()[2] if main_version == 'Preview': main_version = version.split()[-3] elif '(GCC' in main_version or '(gcc' in main_version: diff --git a/meta-openeuler/conf/distro/include/tcmode-external.inc b/meta-openeuler/conf/distro/include/tcmode-external.inc index b9ecaa40bf94ece68c678217b585a30a3b1b328e..c40e8eaa6c1568ca228a17e0853438c38f60a74c 100644 --- a/meta-openeuler/conf/distro/include/tcmode-external.inc +++ b/meta-openeuler/conf/distro/include/tcmode-external.inc @@ -23,7 +23,6 @@ PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs ?= "gcc-runtime-external PREFERRED_PROVIDER_gcc-runtime = "gcc-runtime-external" PREFERRED_PROVIDER_gcc-sanitizers ?= "gcc-sanitizers-external" PREFERRED_PROVIDER_libgcc-initial = "libgcc-external" -PREFERRED_PROVIDER_libnsl2 = "libnsl2-external" PREFERRED_PROVIDER_libtirpc = "libtirpc-external" PREFERRED_PROVIDER_libgfortran = "libgfortran-external" PREFERRED_PROVIDER_glibc ?= "glibc-external" diff --git a/meta-openeuler/conf/distro/openeuler.conf b/meta-openeuler/conf/distro/openeuler.conf index 513c8e6c44d34f08b88cf43f96e8123c17ff8036..2f0c4f4431d7daf9ac56f62f5ca52786a47010e8 100644 --- a/meta-openeuler/conf/distro/openeuler.conf +++ b/meta-openeuler/conf/distro/openeuler.conf @@ -1,6 +1,6 @@ DISTRO = "openeuler" -DISTRO_NAME = "openEuler embedded(openEuler Embedded Reference Distro)" -DISTRO_VERSION = "22.03" +DISTRO_NAME = "openEuler Embedded(openEuler Embedded Reference Distro)" +DISTRO_VERSION = "22.03-LTS" DISTRO_CODENAME = "openEuler${@d.getVar('DISTRO_VERSION').replace('.', '_')}" SDK_VENDOR = "-openeulersdk" SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}" @@ -12,6 +12,14 @@ TARGET_VENDOR = "-openeuler" LOCALCONF_VERSION = "2" +# use OPENEULER_INIT_MANAGER as default init manager and device manager +INIT_MANAGER ?= "${@d.getVar('OPENEULER_INIT_MANAGER')}" +# VIRTUAL-RUNTIME_dev_manager in packagegroup-core-boot.bb has higher +# priority than the one in init-manager-${INIT_MANAGER}.inc, so here +# use LOCAL_DEV_MANAGER as a workaround +LOCAL_DEV_MANAGER ?= "${@d.getVar('OPENEULER_DEV_MANAGER')}" +VIRTUAL-RUNTIME_dev_manager = "${LOCAL_DEV_MANAGER}" + # Override these in openeuler embedded based distros # pam package is used for authentication @@ -19,6 +27,13 @@ OPENEULER_DEFAULT_DISTRO_FEATURES = "pam" DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} ${OPENEULER_DEFAULT_DISTRO_FEATURES}" +# Even we uses other init manager (busyboy or systemd), +# we need sysvinit DISTRO_FEATURES for rc.d rules compatible. +DISTRO_FEATURES += "sysvinit" + +# remove currently unsupported features +DISTRO_FEATURES_DEFAULT_remove += "bluetooth x11" + PREFERRED_VERSION_linux-openeuler ?= "5.10%" #SDK related configurations @@ -33,25 +48,12 @@ TCLIBCAPPEND = "" TCLIBC = "glibc" # do not use default download dir, use openeuler's configuration -DL_DIR ?= "${OPENEULER_SP_DIR}/${BPN}" +OPENEULER_REPO_NAME ?= "${BPN}" +DL_DIR ?= "${OPENEULER_SP_DIR}/${OPENEULER_REPO_NAME}" # the following be configured in local.conf or global bbclass -OPENEULER_SP_BRANCH ?= "openEuler-${DISTRO_VERSION}-LTS" -OPENEULER_SP_REPO = "git://gitee.com/src-openeuler/${BPN};branch=${OPENEULER_SP_BRANCH};protocol=https" - -# use openeuler software package repo as pre mirror, yocto will fetch *.tar.gz from pre mirror first, then -# go to SRC_URI -PREMIRRORS ??= "\ -http://.*/.* ${OPENEULER_SP_REPO} \n \ -https://.*/.* ${OPENEULER_SP_REPO} \n \ -bzr://.*/.* ${OPENEULER_SP_REPO} \n \ -cvs://.*/.* ${OPENEULER_SP_REPO} \n \ -git://.*/.* ${OPENEULER_SP_REPO} \n \ -gitsm://.*/.* ${OPENEULER_SP_REPO} \n \ -hg://.*/.* ${OPENEULER_SP_REPO} \n \ -osc://.*/.* ${OPENEULER_SP_REPO} \n \ -p4://.*/.* ${OPENEULER_SP_REPO} \n \ -svn://.*/.* ${OPENEULER_SP_REPO} \n \" +OPENEULER_SP_BRANCH ?= "openEuler-${DISTRO_VERSION}" +OPENEULER_SP_REPO = "git://gitee.com/src-openeuler/${OPENEULER_REPO_NAME}.git;branch=${OPENEULER_SP_BRANCH};protocol=https" # QA check settings - a little stricter than the OE-Core defaults # (none currently necessary as we now match OE-Core) @@ -86,6 +88,9 @@ INHIBIT_PACKAGE_DEBUG_SPLIT = "1" # in file path FILESEXTRAPATHS_prepend = "${OPENEULER_SP_DIR}:" +# the sysroot of openeuler native sdk +OPENEULER_NATIVESDK_SYSROOT ?= "" + # PACKAGE_NO_LOCALE is variable in package.bbclass to control # whether do_split_locales() for pacakges. @@ -97,7 +102,7 @@ PACKAGE_NO_LOCALE ?= "1" # as host rpm is used, so need to get the correct host rpmdeps by get_rpmdeps export RPMDEPS = "default" -INHERIT += "get_rpmdeps" +INHERIT += "openeuler" #disable the file checksum of fetch do_fetch[file-checksums] = "" diff --git a/meta-openeuler/conf/local.conf.sample b/meta-openeuler/conf/local.conf.sample index 46461410362966a044d88721783334825d05d1a0..1b57be666456674499fc67cda99f3efdf846f17a 100644 --- a/meta-openeuler/conf/local.conf.sample +++ b/meta-openeuler/conf/local.conf.sample @@ -272,79 +272,12 @@ BB_DISKMON_DIRS ??= "\ # this doesn't mean anything to you. CONF_VERSION = "2" -HOSTTOOLS += "python rpmbuild" +require conf/distro/include/openeuler_hosttools.inc -#commands for packages built by autotools -HOSTTOOLS += "automake autoreconf aclocal libtoolize m4 autoconf autoheader" - -#commands for create image -HOSTTOOLS_NONFATAL += "createrepo_c dnf ldconfig" - -#commands for openeuler packages -##unpack packages packed by xz -HOSTTOOLS_NONFATAL += "xz" - -##build packages built by cmake/ninja/meson -HOSTTOOLS_NONFATAL += "cmake ninja meson" - -## used by cracklib, built from cracklib-native -HOSTTOOLS_NONFATAL += "create-cracklib-dict cracklib-format cracklib-packer" - -# used by ncurses, built from ncurses-native -HOSTTOOLS_NONFATAL += "tic" - -# used by tzdata, build from tzcode-native -HOSTTOOLS_NONFATAL += "zic" - -##commands used by kernel -HOSTTOOLS_NONFATAL += "flex bison bc" - -HOSTTOOLS_NONFATAL += "chrpath pkg-config libtool \ - autopoint autoscan autom4te \ - autoupdate libtool pkg-config fmt \ - msgfmt msgmerge rpcgen makeinfo gperf \ - " - -##commands used by opkg-utils only -HOSTTOOLS_NONFATAL += "pod2man" - -##commands used by raspberrrypi4 specially -HOSTTOOLS_NONFATAL_append_raspberrypi4 += "mkdosfs mcopy mkfs.ext4 debugfs fsck.ext4 dumpe2fs \ - parted mkfs.vfat mmd" - -#some commands added in poky by default do not used now, make it optional -HOSTTOOLS_remove += "diffstat lz4c pzstd" -HOSTTOOLS_NONFATAL += "diffstat lz4c pzstd" - -SANITY_REQUIRED_UTILITIES_remove += "diffstat chrpath" -CONNECTIVITY_CHECK_URIS = "" -ASSUME_PROVIDED += "rpm-native dwarfsrcfiles-native depmodwrapper-cross kmod-native bc-native \ - bison-native make-native gperf-native pigz-native pbzip2-native ldconfig-native \ - xz-native makedevs-native alsa-lib-native perl-native qemu-native chrpath-native chrpath-replacement-native \ - kern-tools-native gmp-native libsdl2-native mesa-native virglrenderer-native \ - pixman-native texinfo-dummy-native python3-native python3-setuptools-native gettext-native \ - m4-native flex-native unifdef-native rsync-native init-system-helpers automake-native \ - autoconf-native libtool-native opkg-utils-native patch-native pkgconfig-native \ - init-system-helpers update-rc.d-native run-postinsts cmake-native ninja-native \ - cross-localedef-native nativesdk-glibc-locale nativesdk-qemuwrapper-cross gzip-native \ - parted-native gptfdisk-native dosfstools-native mtools-native meson-native ninja-native \ - bmap-tools-native openssl-native \ - " PATCHTOOL = "patch" TCMODE = "external-openeuler" INHERIT_remove += "uninative" PATCHDEPENDENCY_remove += "patch-replacement-native:do_populate_sysroot" -PREMIRRORS = "\ -bzr://.*/.* file:///${LOCAL_FILES} \n \ -cvs://.*/.* file:///${LOCAL_FILES} \n \ -git://.*/.* file:///${LOCAL_FILES} \n \ -hg://.*/.* file:///${LOCAL_FILES} \n \ -osc://.*/.* file:///${LOCAL_FILES} \n \ -p4://.*/.* file:///${LOCAL_FILES} \n \ -svn://.*/.* file:///${LOCAL_FILES} \n \ -ftp://.*/.* file:///${LOCAL_FILES} \n \ -http://.*/.* file:///${LOCAL_FILES} \n \ -https://.*/.* file:///${LOCAL_FILES} \n" # openEuler software package dir # all openeEuler software packages will be downloaded by specific tool @@ -355,6 +288,12 @@ https://.*/.* file:///${LOCAL_FILES} \n" # ..... OPENEULER_SP_DIR = "/usr1/openeuler/src/" +# the sysroot of native sdk of openeuler which contains all the native tools +# used for building openeuler +# +# OPENEULER_NATIVESDK_SYSROOT用于指向nativesdk工具目录 +OPENEULER_NATIVESDK_SYSROOT = "/opt/buildtools/nativesdk/sysroots/x86_64-pokysdk-linux" + # openEuler cross toolchain dir # prebuilt toolchain with c library is used to build openEuler embedded # distribution. The prebuilt toolchain should be downloaded and placed in @@ -364,8 +303,10 @@ OPENEULER_SP_DIR = "/usr1/openeuler/src/" # openeuler_gcc_arm32le" EXTERNAL_TOOLCHAIN_arm = "/usr1/openeuler/gcc/openeuler_gcc_arm32le" EXTERNAL_TOOLCHAIN_aarch64 = "/usr1/openeuler/gcc/openeuler_gcc_arm64le" +EXTERNAL_TOOLCHAIN_x86-64 = "/usr1/openeuler/gcc/openeuler_gcc_x86_64" EXTERNAL_TARGET_SYS_arm = "arm-openeuler-linux-gnueabi" EXTERNAL_TARGET_SYS_aarch64 = "aarch64-openeuler-linux-gnu" +EXTERNAL_TARGET_SYS_x86-64 = "x86_64-openeuler-linux-gnu" # default openeuler platform OPENEULER_PLATFORM = "aarch64-std" @@ -377,3 +318,10 @@ require conf/distro/include/security_flags_openeuler.inc # OE-built toolchains assume en_US is utf8 EXTERNAL_TOOLCHAIN_FEATURES_DEFAULT = "locale-utf8-is-default" + +# define root home, default /home/root +ROOT_HOME ?= "/root" + +# define default init and device manager +OPENEULER_INIT_MANAGER = "mdev-busybox" +OPENEULER_DEV_MANAGER = "busybox-mdev" diff --git a/meta-openeuler/conf/machine/kernel-modules-conf/common.inc b/meta-openeuler/conf/machine/kernel-modules-conf/common.inc new file mode 100644 index 0000000000000000000000000000000000000000..c46165e17cd0c27f0d2c105076f64319d995236d --- /dev/null +++ b/meta-openeuler/conf/machine/kernel-modules-conf/common.inc @@ -0,0 +1,40 @@ +INSTALLMODULES = " \ +kernel-module-overlay \ +kernel-module-8021q \ +kernel-module-ext2 \ +kernel-module-inet-diag \ +kernel-module-ip-tables \ +kernel-module-ip-tunnel \ +kernel-module-ip6-tables \ +kernel-module-ip6-udp-tunnel \ +kernel-module-ip6table-filter \ +kernel-module-ipip \ +kernel-module-ipt-reject \ +kernel-module-iptable-filter \ +kernel-module-ipv6 \ +kernel-module-nf-conntrack \ +kernel-module-nf-defrag-ipv4 \ +kernel-module-nf-defrag-ipv6 \ +kernel-module-nf-nat \ +kernel-module-nf-reject-ipv4 \ +kernel-module-nf-reject-ipv6 \ +kernel-module-x-tables \ +kernel-module-xt-tcpudp \ +kernel-module-tunnel4 \ +kernel-module-af-packet \ +kernel-module-nfs-ssc \ +kernel-module-fscache \ +kernel-module-grace \ +kernel-module-sunrpc \ +kernel-module-auth-rpcgss \ +kernel-module-lockd \ +kernel-module-nfs-acl \ +kernel-module-nfs \ +kernel-module-nfsv3 \ +kernel-module-nfsd \ +kernel-module-crc-ccitt \ +kernel-module-iptable-nat \ +kernel-module-ip6table-nat \ +kernel-module-ip6t-reject \ +kernel-module-xt-nat \ +" diff --git a/meta-openeuler/conf/machine/kernel-modules-conf/iso-install.inc b/meta-openeuler/conf/machine/kernel-modules-conf/iso-install.inc new file mode 100644 index 0000000000000000000000000000000000000000..73728d12dcf61abf69fc19befa2f671db78a0462 --- /dev/null +++ b/meta-openeuler/conf/machine/kernel-modules-conf/iso-install.inc @@ -0,0 +1,10 @@ +# Notice: we need CONFIG_VIRTIO_BLK=y CONFIG_EXT4_FS=y for vda ext4 filesystem to setup. +# For x86-64, also relies on CONFIG_ATA_PIIX=y CONFIG_BLK_DEV_SD=y + +INSTALLMODULES =+ " \ +kernel-module-cdrom \ +kernel-module-sr-mod \ +kernel-module-isofs \ +kernel-module-msdos \ +kernel-module-virtiofs \ +" diff --git a/meta-openeuler/conf/machine/kernel-modules-conf/x86-64-modules.inc b/meta-openeuler/conf/machine/kernel-modules-conf/x86-64-modules.inc new file mode 100644 index 0000000000000000000000000000000000000000..27dbf1fcf6adc36809f6fb6688b42c77200aa973 --- /dev/null +++ b/meta-openeuler/conf/machine/kernel-modules-conf/x86-64-modules.inc @@ -0,0 +1,30 @@ +INSTALLMODULES += " \ +kernel-module-ipv6 \ +kernel-module-ip6table-filter \ +kernel-module-ip6table-mangle \ +kernel-module-ip6table-raw \ +kernel-module-iptable-filter \ +kernel-module-iptable-mangle \ +kernel-module-iptable-raw \ +kernel-module-ipt-reject \ +kernel-module-sg \ +kernel-module-joydev \ +kernel-module-pcspkr \ +kernel-module-fuse \ +kernel-module-sr-mod \ +kernel-module-ata-generic \ +kernel-module-igb \ +kernel-module-ahci \ +kernel-module-chipreg \ +kernel-module-mtdblock \ +kernel-module-nfsd \ +kernel-module-xhci-plat-hcd \ +kernel-module-xhci-pci \ +kernel-module-usb-storage \ +kernel-module-vfat \ +kernel-module-quota-v1 \ +kernel-module-quota-v2 \ +kernel-module-virtio-net \ +kernel-module-virtio-balloon \ +kernel-module-virtio-console \ +" diff --git a/meta-openeuler/conf/machine/qemu-aarch64-common.inc b/meta-openeuler/conf/machine/qemu-aarch64-common.inc index dd032e0c6df4b6ef31bb96c1462eca286408f038..b026322977ecb8c5bd02b4f7fba7349fcdad66b6 100644 --- a/meta-openeuler/conf/machine/qemu-aarch64-common.inc +++ b/meta-openeuler/conf/machine/qemu-aarch64-common.inc @@ -1,8 +1,15 @@ # Description: Config for arm64 machine MACHINEOVERRIDES =. "march64:" +KERNEL_IMAGETYPE =. "zImage" +KERNEL_IMAGETYPE_FOR_MAKE =. "zImage Image" require conf/machine/qemu-common.inc +#kernel modules to install and autoload +require conf/machine/kernel-modules-conf/common.inc +require conf/machine/kernel-modules-conf/iso-install.inc +KERNEL_MODULE_AUTOLOAD = "${INSTALLMODULES}" + # Different from arm32, here we use armv8a.inc instead # of conf/machine/include/tune-cortexa53.inc because # we are not sure our CPU is cortex a53. @@ -21,3 +28,9 @@ MACHINEOVERRIDES_remove_virtclass-multilib-lib32 =. "march64:" MACHINEOVERRIDES_append_virtclass-multilib-lib32 =. "march32:" TUNE_FEATURES_append_virtclass-multilib-lib32 += " cortexa9" TUNE_FEATURES_remove_virtclass-multilib-lib32 += " vfp" + +# simplest serial console setting, no VT +SERIAL_CONSOLES ?= "115200;ttyAMA0" +USE_VT ?= "0" +# make a APPEND cmdline for grub.cfg while using iso with grub +APPEND += " console=ttyAMA0,115200 " diff --git a/meta-openeuler/conf/machine/qemu-aarch64.conf b/meta-openeuler/conf/machine/qemu-aarch64.conf index 9abe74de24c507c1d93a071c5fe44006e990361f..10eaf7a5718fcdf6613b481fd1ef76433d682641 100644 --- a/meta-openeuler/conf/machine/qemu-aarch64.conf +++ b/meta-openeuler/conf/machine/qemu-aarch64.conf @@ -1,5 +1,6 @@ # Description: Machine description for little-endian aarch64 +MACHINE_FEATURES += "efi" MACHINEOVERRIDES =. "march64le:" DEFAULTTUNE = "aarch64" require conf/machine/qemu-aarch64-common.inc diff --git a/meta-openeuler/conf/machine/qemu-arm-common.inc b/meta-openeuler/conf/machine/qemu-arm-common.inc index 41e617d0b25323c71bbaed064ae4b1668da784b9..8f7f3cb8ef844b729b9e7c7666bee3cf82c65844 100644 --- a/meta-openeuler/conf/machine/qemu-arm-common.inc +++ b/meta-openeuler/conf/machine/qemu-arm-common.inc @@ -4,7 +4,18 @@ MACHINEOVERRIDES =. "march32:" require conf/machine/qemu-common.inc require conf/machine/include/arm/arch-armv7a.inc +#kernel modules to install and autoload +require conf/machine/kernel-modules-conf/common.inc +INSTALLMODULES += " \ +kernel-module-unix \ +" +KERNEL_MODULE_AUTOLOAD = "${INSTALLMODULES}" + TUNE_FEATURES_append += " cortexa9" TUNE_FEATURES_remove += " vfp" TUNE_CCARGS .= " -mno-unaligned-access" + +# simplest serial console setting, no VT +SERIAL_CONSOLES ?= "115200;ttyAMA0" +USE_VT ?= "0" diff --git a/meta-openeuler/conf/machine/qemu-x86-64.conf b/meta-openeuler/conf/machine/qemu-x86-64.conf new file mode 100644 index 0000000000000000000000000000000000000000..784a4f98b89cac771a8bf18a920f014e5b31b092 --- /dev/null +++ b/meta-openeuler/conf/machine/qemu-x86-64.conf @@ -0,0 +1,28 @@ +#@TYPE: Machine +#@NAME: QEMU x86-64 machine +#@DESCRIPTION: Machine configuration for running an x86-64 system on QEMU + +DEFAULTTUNE ?= "x86-64" +require conf/machine/include/x86/arch-x86.inc + +UBOOT_MACHINE ?= "qemu-x86_64_defconfig" + +KERNEL_IMAGETYPE =. "bzImage" +KERNEL_IMAGETYPE_FOR_MAKE =. "bzImage" + +MACHINE_FEATURES += "x86 efi" + +# kernel modules to install and autoload +require conf/machine/kernel-modules-conf/iso-install.inc +require conf/machine/kernel-modules-conf/x86-64-modules.inc +KERNEL_MODULE_AUTOLOAD = "${INSTALLMODULES}" + +# specify the suffix of packages for installation of rootfs +export ROOTFS_PACKAGE_ARCH = "x86_64" + +# simplest serial console setting, no VT +SERIAL_CONSOLES ?= "115200;ttyS0" +USE_VT="0" + +# cmdline +APPEND += "console=ttyS0,115200" diff --git a/meta-openeuler/lib/oe/external.py b/meta-openeuler/lib/oe/external.py index 5e99eae9d6b781d8c096d42a83f17c9c5cac7e64..9fd78d60faa80a89c33d152f9e2b51324ef5f024 100644 --- a/meta-openeuler/lib/oe/external.py +++ b/meta-openeuler/lib/oe/external.py @@ -20,11 +20,14 @@ def run(d, cmd, *args): bb.debug(1, 'oe.external.run({})'.format(repr(args))) try: - output, _ = bb.process.run(args, cwd=topdir) + stdout, stderr = bb.process.run(args, cwd=topdir) except bb.process.CmdError as exc: bb.debug(1, 'oe.external.run: {} failed: {}'.format(subprocess.list2cmdline(args), exc)) else: - return output +# cmd like gcc -v will output to stderr not stdout, so do special handling for it + if (stdout == ''): + stdout = stderr + return stdout return 'UNKNOWN' diff --git a/meta-openeuler/recipes-bsp/gnu-efi/gnu-efi_%.bbappend b/meta-openeuler/recipes-bsp/gnu-efi/gnu-efi_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..47f634b3638fbb91b8075fd36a97e4d96078dc06 --- /dev/null +++ b/meta-openeuler/recipes-bsp/gnu-efi/gnu-efi_%.bbappend @@ -0,0 +1,10 @@ +# main bbfile: yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.12.bb + +PV = "3.0.8" + +# remove tar.gz files and code patches from poky +SRC_URI_remove = " \ + ${SOURCEFORGE_MIRROR}/${BPN}/files/${BP}.tar.bz2 \ +" + +SRC_URI =+ "file://gnu-efi-${PV}.tar.bz2 " diff --git a/meta-openeuler/recipes-bsp/grub/files/cfg b/meta-openeuler/recipes-bsp/grub/files/cfg new file mode 100644 index 0000000000000000000000000000000000000000..8ca53d24d7bb2ed98da351566153068bc07b04c3 --- /dev/null +++ b/meta-openeuler/recipes-bsp/grub/files/cfg @@ -0,0 +1,2 @@ +search.file ($cmdpath)/EFI/BOOT/grub.cfg root +set prefix=($root)/EFI/BOOT diff --git a/meta-openeuler/recipes-bsp/grub/grub-efi_%.bbappend b/meta-openeuler/recipes-bsp/grub/grub-efi_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..6dea8cb45e74d1f5c660cce5b348b9beec941732 --- /dev/null +++ b/meta-openeuler/recipes-bsp/grub/grub-efi_%.bbappend @@ -0,0 +1,2 @@ +# main bbfile: yocto-poky/meta/recipes-bsp/grub/grub-efi_git.bb +require grub-source-openeuler.inc diff --git a/meta-openeuler/recipes-bsp/grub/grub-source-openeuler.inc b/meta-openeuler/recipes-bsp/grub/grub-source-openeuler.inc new file mode 100644 index 0000000000000000000000000000000000000000..142ee9c1a1f464ef82d8cd484756e77106074970 --- /dev/null +++ b/meta-openeuler/recipes-bsp/grub/grub-source-openeuler.inc @@ -0,0 +1,19 @@ +PV = "2.06" +S = "${WORKDIR}/grub-${PV}" + +#these patch can't apply for + +SRC_URI_remove = " \ + https://alpha.gnu.org/gnu/grub/grub-${REALPV}.tar.xz \ +" + +SRC_URI_prepend = " \ + file://grub-${PV}.tar.xz \ +" + +# Notice: openeuler's patches have much confict to patch, drop it. + +OPENEULER_REPO_NAME = "grub2" +SRC_URI[sha256sum] = "b79ea44af91b93d17cd3fe80bdae6ed43770678a9a5ae192ccea803ebb657ee1" + +CVE_CHECK_WHITELIST = "" diff --git a/meta-openeuler/recipes-bsp/grub/grub_%.bbappend b/meta-openeuler/recipes-bsp/grub/grub_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..1dcd06095b1c50a38b2eb3b8f67fdc5028fd2106 --- /dev/null +++ b/meta-openeuler/recipes-bsp/grub/grub_%.bbappend @@ -0,0 +1,2 @@ +# main bbfile: yocto-poky/meta/recipes-bsp/grub/grub_git.bb +require grub-source-openeuler.inc diff --git a/meta-openeuler/recipes-bsp/pciutils/pciutils_%.bbappend b/meta-openeuler/recipes-bsp/pciutils/pciutils_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..af0ec6e1df44515d3c71e57958e1749ccf6e02a6 --- /dev/null +++ b/meta-openeuler/recipes-bsp/pciutils/pciutils_%.bbappend @@ -0,0 +1,16 @@ +SRC_URI[sha256sum] = "2432e7a2e12000502d36cf769ab6e5a0cf4931e5050ccaf8b02984b2d3cb0948" + +SRC_URI = " \ + file://pciutils-${PV}.tar.gz \ + file://0000-pciutils-2.2.1-idpath.patch \ + file://0001-pciutils-dir-d.patch \ +" + +# apply patches from poky, to fix configure error +SRC_URI += " \ + file://configure.patch \ +" + +# file of ids package is /usr/share/hwdata/pci.ids.gz, but datadir is /usr/share/ +# update it from FILES_${PN}-ids = "${datadir}/pci.ids*" in poky bb. +FILES_${PN}-ids = "${datadir}/*/pci.ids*" diff --git a/meta-openeuler/recipes-connectivity/bind/bind-dhclient/0001-avoid-start-failure-with-bind-user.patch b/meta-openeuler/recipes-connectivity/bind/bind-dhclient/0001-avoid-start-failure-with-bind-user.patch new file mode 100644 index 0000000000000000000000000000000000000000..8db96ec049c7a3483936c48037acc91b9870b16e --- /dev/null +++ b/meta-openeuler/recipes-connectivity/bind/bind-dhclient/0001-avoid-start-failure-with-bind-user.patch @@ -0,0 +1,27 @@ +From 31dde3562f287429eea94b77250d184818b49063 Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Mon, 15 Oct 2018 16:55:09 +0800 +Subject: [PATCH] avoid start failure with bind user + +Upstream-Status: Pending + +Signed-off-by: Chen Qi +--- + init.d | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/init.d b/init.d +index b2eec60..6e03936 100644 +--- a/init.d ++++ b/init.d +@@ -57,6 +57,7 @@ case "$1" in + modprobe capability >/dev/null 2>&1 || true + if [ ! -f /etc/bind/rndc.key ]; then + /usr/sbin/rndc-confgen -a -b 512 -r /dev/urandom ++ chown root:bind /etc/bind/rndc.key >/dev/null 2>&1 || true + chmod 0640 /etc/bind/rndc.key + fi + if [ -f /var/run/named/named.pid ]; then +-- +2.7.4 + diff --git a/meta-openeuler/recipes-connectivity/bind/bind-dhclient/0001-configure.in-remove-useless-L-use_openssl-lib.patch b/meta-openeuler/recipes-connectivity/bind/bind-dhclient/0001-configure.in-remove-useless-L-use_openssl-lib.patch new file mode 100644 index 0000000000000000000000000000000000000000..9d31b9808073a468798a068a82ec9f848000e633 --- /dev/null +++ b/meta-openeuler/recipes-connectivity/bind/bind-dhclient/0001-configure.in-remove-useless-L-use_openssl-lib.patch @@ -0,0 +1,30 @@ +From 2325a92f1896a2a7f586611686801b41fbc91b50 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Mon, 27 Aug 2018 15:00:51 +0800 +Subject: [PATCH] configure.in: remove useless `-L$use_openssl/lib' + +Since `--with-openssl=${STAGING_DIR_HOST}${prefix}' is used in bind recipe, +the `-L$use_openssl/lib' has a hardcoded suffix, removing it is harmless +and helpful for clean up host build path in isc-config.sh + +Upstream-Status: Inappropriate [oe-core specific] + +Signed-off-by: Hongxu Jia + +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index e85a5c6..2bbfc58 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1631,7 +1631,7 @@ If you don't want OpenSSL, use --without-openssl]) + fi + ;; + *) +- DST_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto" ++ DST_OPENSSL_LIBS="-lcrypto" + ;; + esac + fi diff --git a/meta-openeuler/recipes-connectivity/bind/bind-dhclient/0001-named-lwresd-V-and-start-log-hide-build-options.patch b/meta-openeuler/recipes-connectivity/bind/bind-dhclient/0001-named-lwresd-V-and-start-log-hide-build-options.patch new file mode 100644 index 0000000000000000000000000000000000000000..75908aa638f5aad3f06a00ec83ed7776125eab28 --- /dev/null +++ b/meta-openeuler/recipes-connectivity/bind/bind-dhclient/0001-named-lwresd-V-and-start-log-hide-build-options.patch @@ -0,0 +1,34 @@ +From a3af4a405baf5ff582e82aaba392dd9667d94bdc Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Mon, 27 Aug 2018 21:24:20 +0800 +Subject: [PATCH] `named/lwresd -V' and start log hide build options + +The build options expose build path directories, so hide them. +[snip] +$ named -V +|built by make with *** (options are hidden) +[snip] + +Upstream-Status: Inappropriate [oe-core specific] + +Signed-off-by: Hongxu Jia +--- + bin/named/include/named/globals.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/bin/named/include/named/globals.h b/bin/named/include/named/globals.h +index ba3457e..7741da7 100644 +--- a/bin/named/include/named/globals.h ++++ b/bin/named/include/named/globals.h +@@ -68,7 +68,7 @@ EXTERN const char * ns_g_version INIT(VERSION); + EXTERN const char * ns_g_product INIT(PRODUCT); + EXTERN const char * ns_g_description INIT(DESCRIPTION); + EXTERN const char * ns_g_srcid INIT(SRCID); +-EXTERN const char * ns_g_configargs INIT(CONFIGARGS); ++EXTERN const char * ns_g_configargs INIT("*** (options are hidden)"); + EXTERN const char * ns_g_builder INIT(BUILDER); + EXTERN in_port_t ns_g_port INIT(0); + EXTERN isc_dscp_t ns_g_dscp INIT(-1); +-- +2.7.4 + diff --git a/meta-openeuler/recipes-core/bind/bind/0001-revert-d10fbdec-for-lib-dns-gen.c-as-it-is-a-build-p.patch b/meta-openeuler/recipes-connectivity/bind/bind-dhclient/0001-revert-d10fbdec-for-lib-dns-gen.c-as-it-is-a-build-p.patch similarity index 100% rename from meta-openeuler/recipes-core/bind/bind/0001-revert-d10fbdec-for-lib-dns-gen.c-as-it-is-a-build-p.patch rename to meta-openeuler/recipes-connectivity/bind/bind-dhclient/0001-revert-d10fbdec-for-lib-dns-gen.c-as-it-is-a-build-p.patch diff --git a/meta-openeuler/recipes-connectivity/bind/bind-dhclient/backport-0025-bind-Detect-system-time-changes.patch b/meta-openeuler/recipes-connectivity/bind/bind-dhclient/backport-0025-bind-Detect-system-time-changes.patch new file mode 100644 index 0000000000000000000000000000000000000000..40e61d2fc232d4dfef021c2569ea24c9cc77c061 --- /dev/null +++ b/meta-openeuler/recipes-connectivity/bind/bind-dhclient/backport-0025-bind-Detect-system-time-changes.patch @@ -0,0 +1,198 @@ +Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0025-bind-Detect-system-time-changes.patch +From ef4f5e80d8a1ea1507829ea6f5214f276478f475 Mon Sep 17 00:00:00 2001 +From: Pavel Zhukov +Date: Tue, 22 Oct 2019 16:23:24 +0200 +Subject: [PATCH 25/27] bind: Detect system time changes +Cc: pzhukov@redhat.com + +--- + lib/isc/include/isc/result.h | 4 ++- + lib/isc/include/isc/util.h | 4 +++ + lib/isc/result.c | 2 ++ + lib/isc/unix/app.c | 41 ++++++++++++++++++++++++++++--- + lib/isc/unix/include/isc/time.h | 20 +++++++++++++++ + lib/isc/unix/time.c | 22 +++++++++++++++++ + 6 files changed, 89 insertions(+), 4 deletions(-) + +diff --git a/lib/isc/include/isc/result.h b/lib/isc/include/isc/result.h +index 0389efa..0e35f98 100644 +--- a/lib/isc/include/isc/result.h ++++ b/lib/isc/include/isc/result.h +@@ -89,7 +89,9 @@ + #define ISC_R_DISCFULL 67 /*%< disc full */ + #define ISC_R_DEFAULT 68 /*%< default */ + #define ISC_R_IPV4PREFIX 69 /*%< IPv4 prefix */ +-#define ISC_R_NRESULTS 70 ++#define ISC_R_TIMESHIFTED 70 /*%< system time changed */ ++/*% Not a result code: the number of results. */ ++#define ISC_R_NRESULTS 71 + + ISC_LANG_BEGINDECLS + +diff --git a/lib/isc/include/isc/util.h b/lib/isc/include/isc/util.h +index 973c348..cceeb5e 100644 +--- a/lib/isc/include/isc/util.h ++++ b/lib/isc/include/isc/util.h +@@ -289,6 +289,10 @@ extern void mock_assert(const int result, const char* const expression, + * Time + */ + #define TIME_NOW(tp) RUNTIME_CHECK(isc_time_now((tp)) == ISC_R_SUCCESS) ++#ifdef CLOCK_BOOTTIME ++#define TIME_MONOTONIC(tp) RUNTIME_CHECK(isc_time_boottime((tp)) == ISC_R_SUCCESS) ++#endif ++ + + /*% + * Alignment +diff --git a/lib/isc/result.c b/lib/isc/result.c +index a9db132..7c04831 100644 +--- a/lib/isc/result.c ++++ b/lib/isc/result.c +@@ -105,6 +105,7 @@ static const char *description[ISC_R_NRESULTS] = { + "disc full", /*%< 67 */ + "default", /*%< 68 */ + "IPv4 prefix", /*%< 69 */ ++ "time changed", /*%< 70 */ + }; + + static const char *identifier[ISC_R_NRESULTS] = { +@@ -178,6 +179,7 @@ static const char *identifier[ISC_R_NRESULTS] = { + "ISC_R_DISCFULL", + "ISC_R_DEFAULT", + "ISC_R_IPV4PREFIX", ++ "ISC_R_TIMESHIFTED", + }; + + #define ISC_RESULT_RESULTSET 2 +diff --git a/lib/isc/unix/app.c b/lib/isc/unix/app.c +index a6e9882..dbd23f7 100644 +--- a/lib/isc/unix/app.c ++++ b/lib/isc/unix/app.c +@@ -442,15 +442,51 @@ isc__app_ctxonrun(isc_appctx_t *ctx0, isc_mem_t *mctx, isc_task_t *task, + static isc_result_t + evloop(isc__appctx_t *ctx) { + isc_result_t result; ++ isc_time_t now; ++#ifdef CLOCK_BOOTTIME ++ isc_time_t monotonic; ++ uint64_t diff = 0; ++#else ++ isc_time_t prev; ++ TIME_NOW(&prev); ++#endif ++ ++ ++ + + while (!ctx->want_shutdown) { + int n; +- isc_time_t when, now; ++ isc_time_t when; ++ + struct timeval tv, *tvp; + isc_socketwait_t *swait; + bool readytasks; + bool call_timer_dispatch = false; + ++ uint64_t us; ++ ++#ifdef CLOCK_BOOTTIME ++ // TBD macros for following three lines ++ TIME_NOW(&now); ++ TIME_MONOTONIC(&monotonic); ++ INSIST(now.seconds > monotonic.seconds) ++ us = isc_time_microdiff (&now, &monotonic); ++ if (us < diff){ ++ us = diff - us; ++ if (us > 1000000){ // ignoring shifts less than one second ++ return ISC_R_TIMESHIFTED; ++ }; ++ diff = isc_time_microdiff (&now, &monotonic); ++ } else { ++ diff = isc_time_microdiff (&now, &monotonic); ++ // not implemented ++ } ++#else ++ TIME_NOW(&now); ++ if (isc_time_compare (&now, &prev) < 0) ++ return ISC_R_TIMESHIFTED; ++ TIME_NOW(&prev); ++#endif + /* + * Check the reload (or suspend) case first for exiting the + * loop as fast as possible in case: +@@ -475,9 +511,8 @@ evloop(isc__appctx_t *ctx) { + if (result != ISC_R_SUCCESS) + tvp = NULL; + else { +- uint64_t us; +- + TIME_NOW(&now); ++ + us = isc_time_microdiff(&when, &now); + if (us == 0) + call_timer_dispatch = true; +diff --git a/lib/isc/unix/include/isc/time.h b/lib/isc/unix/include/isc/time.h +index b864c29..5dd43c9 100644 +--- a/lib/isc/unix/include/isc/time.h ++++ b/lib/isc/unix/include/isc/time.h +@@ -132,6 +132,26 @@ isc_time_isepoch(const isc_time_t *t); + *\li 't' is a valid pointer. + */ + ++#ifdef CLOCK_BOOTTIME ++isc_result_t ++isc_time_boottime(isc_time_t *t); ++/*%< ++ * Set 't' to monotonic time from previous boot ++ * it's not affected by system time change. It also ++ * includes the time system was suspended ++ * ++ * Requires: ++ *\li 't' is a valid pointer. ++ * ++ * Returns: ++ * ++ *\li Success ++ *\li Unexpected error ++ * Getting the time from the system failed. ++ */ ++#endif /* CLOCK_BOOTTIME */ ++ ++ + isc_result_t + isc_time_now(isc_time_t *t); + /*%< +diff --git a/lib/isc/unix/time.c b/lib/isc/unix/time.c +index 8edc9df..fe0bb91 100644 +--- a/lib/isc/unix/time.c ++++ b/lib/isc/unix/time.c +@@ -498,3 +498,25 @@ isc_time_formatISO8601ms(const isc_time_t *t, char *buf, unsigned int len) { + t->nanoseconds / NS_PER_MS); + } + } ++ ++ ++#ifdef CLOCK_BOOTTIME ++isc_result_t ++isc_time_boottime(isc_time_t *t) { ++ struct timespec ts; ++ ++ char strbuf[ISC_STRERRORSIZE]; ++ ++ if (clock_gettime (CLOCK_BOOTTIME, &ts) != 0){ ++ isc__strerror(errno, strbuf, sizeof(strbuf)); ++ UNEXPECTED_ERROR(__FILE__, __LINE__, "%s", strbuf); ++ return (ISC_R_UNEXPECTED); ++ } ++ ++ t->seconds = ts.tv_sec; ++ t->nanoseconds = ts.tv_nsec; ++ ++ return (ISC_R_SUCCESS); ++ ++}; ++#endif +-- +2.14.5 + diff --git a/meta-openeuler/recipes-connectivity/bind/bind-dhclient/bind-ensure-searching-for-json-headers-searches-sysr.patch b/meta-openeuler/recipes-connectivity/bind/bind-dhclient/bind-ensure-searching-for-json-headers-searches-sysr.patch new file mode 100644 index 0000000000000000000000000000000000000000..84559e5f3786c9f5e597061528130b1332960606 --- /dev/null +++ b/meta-openeuler/recipes-connectivity/bind/bind-dhclient/bind-ensure-searching-for-json-headers-searches-sysr.patch @@ -0,0 +1,47 @@ +From edda20fb5a6e88548f85e39d34d6c074306e15bc Mon Sep 17 00:00:00 2001 +From: Paul Gortmaker +Date: Tue, 9 Jun 2015 11:22:00 -0400 +Subject: [PATCH] bind: ensure searching for json headers searches sysroot + +Bind can fail configure by detecting headers w/o libs[1], or +it can fail the host contamination check as per below: + +ERROR: This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities. +Rerun configure task after fixing this. The path was 'build/tmp/work/core2-64-poky-linux/bind/9.10.2-r1/build' +ERROR: Function failed: do_qa_configure +ERROR: Logfile of failure stored in: build/tmp/work/core2-64-poky-linux/bind/9.10.2-r1/temp/log.do_configure.5242 +ERROR: Task 5 (meta/recipes-connectivity/bind/bind_9.10.2.bb, do_configure) failed with exit code '1' +NOTE: Tasks Summary: Attempted 773 tasks of which 768 didn't need to be rerun and 1 failed. +No currently running tasks (773 of 781) + +Summary: 1 task failed: + /meta/recipes-connectivity/bind/bind_9.10.2.bb, do_configure + +One way to fix it would be to unconditionally disable json in bind +configure[2] but here we fix it by using the path to where we would +put the header if we had json in the sysroot, in case someone wants +to make use of the combination some day. + +[1] https://trac.macports.org/ticket/45305 +[2] https://trac.macports.org/changeset/126406 + +Upstream-Status: Inappropriate [OE Specific] +Signed-off-by: Paul Gortmaker + +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 17392fd..e85a5c6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2449,7 +2449,7 @@ case "$use_libjson" in + libjson_libs="" + ;; + auto|yes) +- for d in /usr /usr/local /opt/local ++ for d in "${STAGING_INCDIR}" + do + if test -f "${d}/include/json/json.h" + then diff --git a/meta-openeuler/recipes-core/bind/bind/bind9 b/meta-openeuler/recipes-connectivity/bind/bind-dhclient/bind9 similarity index 100% rename from meta-openeuler/recipes-core/bind/bind/bind9 rename to meta-openeuler/recipes-connectivity/bind/bind-dhclient/bind9 diff --git a/meta-openeuler/recipes-core/bind/bind/conf.patch b/meta-openeuler/recipes-connectivity/bind/bind-dhclient/conf.patch similarity index 100% rename from meta-openeuler/recipes-core/bind/bind/conf.patch rename to meta-openeuler/recipes-connectivity/bind/bind-dhclient/conf.patch diff --git a/meta-openeuler/recipes-core/bind/bind/generate-rndc-key.sh b/meta-openeuler/recipes-connectivity/bind/bind-dhclient/generate-rndc-key.sh similarity index 76% rename from meta-openeuler/recipes-core/bind/bind/generate-rndc-key.sh rename to meta-openeuler/recipes-connectivity/bind/bind-dhclient/generate-rndc-key.sh index 633e29c0e6157f465f22b0c9577b7813ccc6b6b1..ef915c0ae5a4611d72389100fc851df39afc182f 100644 --- a/meta-openeuler/recipes-core/bind/bind/generate-rndc-key.sh +++ b/meta-openeuler/recipes-connectivity/bind/bind-dhclient/generate-rndc-key.sh @@ -2,7 +2,7 @@ if [ ! -s /etc/bind/rndc.key ]; then echo -n "Generating /etc/bind/rndc.key:" - /usr/sbin/rndc-confgen -a -b 512 + /usr/sbin/rndc-confgen -a -b 512 -r /dev/urandom chown root:bind /etc/bind/rndc.key chmod 0640 /etc/bind/rndc.key fi diff --git a/meta-openeuler/recipes-connectivity/bind/bind-dhclient/init.d-add-support-for-read-only-rootfs.patch b/meta-openeuler/recipes-connectivity/bind/bind-dhclient/init.d-add-support-for-read-only-rootfs.patch new file mode 100644 index 0000000000000000000000000000000000000000..11db95ede12a8155abac436c8d836e76f8663570 --- /dev/null +++ b/meta-openeuler/recipes-connectivity/bind/bind-dhclient/init.d-add-support-for-read-only-rootfs.patch @@ -0,0 +1,65 @@ +Subject: init.d: add support for read-only rootfs + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Chen Qi +--- + init.d | 40 ++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 40 insertions(+) + +diff --git a/init.d b/init.d +index 0111ed4..24677c8 100644 +--- a/init.d ++++ b/init.d +@@ -6,8 +6,48 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin + # Don't modify this line, change or create /etc/default/bind9. + OPTIONS="" + ++test -f /etc/default/rcS && . /etc/default/rcS + test -f /etc/default/bind9 && . /etc/default/bind9 + ++# This function is here because it's possible that /var and / are on different partitions. ++is_on_read_only_partition () { ++ DIRECTORY=$1 ++ dir=`readlink -f $DIRECTORY` ++ while true; do ++ if [ ! -d "$dir" ]; then ++ echo "ERROR: $dir is not a directory" ++ exit 1 ++ else ++ for flag in `awk -v dir=$dir '{ if ($2 == dir) { print "FOUND"; split($4,FLAGS,",") } }; \ ++ END { for (f in FLAGS) print FLAGS[f] }' < /proc/mounts`; do ++ [ "$flag" = "FOUND" ] && partition="read-write" ++ [ "$flag" = "ro" ] && { partition="read-only"; break; } ++ done ++ if [ "$dir" = "/" -o -n "$partition" ]; then ++ break ++ else ++ dir=`dirname $dir` ++ fi ++ fi ++ done ++ [ "$partition" = "read-only" ] && echo "yes" || echo "no" ++} ++ ++bind_mount () { ++ olddir=$1 ++ newdir=$2 ++ mkdir -p $olddir ++ cp -a $newdir/* $olddir ++ mount --bind $olddir $newdir ++} ++ ++# Deal with read-only rootfs ++if [ "$ROOTFS_READ_ONLY" = "yes" ]; then ++ [ "$VERBOSE" != "no" ] && echo "WARN: start bind service in read-only rootfs" ++ [ `is_on_read_only_partition /etc/bind` = "yes" ] && bind_mount /var/volatile/bind/etc /etc/bind ++ [ `is_on_read_only_partition /var/named` = "yes" ] && bind_mount /var/volatile/bind/named /var/named ++fi ++ + test -x /usr/sbin/rndc || exit 0 + + case "$1" in +-- +1.7.9.5 + diff --git a/meta-openeuler/recipes-connectivity/bind/bind-dhclient/make-etc-initd-bind-stop-work.patch b/meta-openeuler/recipes-connectivity/bind/bind-dhclient/make-etc-initd-bind-stop-work.patch new file mode 100644 index 0000000000000000000000000000000000000000..146f3e35db6d57c00a31071ccec39529763e3219 --- /dev/null +++ b/meta-openeuler/recipes-connectivity/bind/bind-dhclient/make-etc-initd-bind-stop-work.patch @@ -0,0 +1,42 @@ +bind: make "/etc/init.d/bind stop" work + +Upstream-Status: Inappropriate [configuration] + +Add some configurations, make rndc command be able to controls +the named daemon. + +Signed-off-by: Roy Li +--- + conf/named.conf | 5 +++++ + conf/rndc.conf | 5 +++++ + 2 files changed, 10 insertions(+), 0 deletions(-) + create mode 100644 conf/rndc.conf + +diff --git a/conf/named.conf b/conf/named.conf +index 95829cf..c8899e7 100644 +--- a/conf/named.conf ++++ b/conf/named.conf +@@ -47,3 +47,8 @@ zone "255.in-addr.arpa" { + // root-delegation-only exclude { "DE"; "MUSEUM"; }; + + include "/etc/bind/named.conf.local"; ++include "/etc/bind/rndc.key" ; ++controls { ++ inet 127.0.0.1 allow { localhost; } ++ keys { rndc-key; }; ++}; +diff --git a/conf/rndc.conf b/conf/rndc.conf +new file mode 100644 +index 0000000..a0b481d +--- /dev/null ++++ b/conf/rndc.conf +@@ -0,0 +1,5 @@ ++include "/etc/bind/rndc.key"; ++options { ++ default-server localhost; ++ default-key rndc-key; ++}; + +-- +1.7.5.4 + diff --git a/meta-openeuler/recipes-core/bind/bind/named.service b/meta-openeuler/recipes-connectivity/bind/bind-dhclient/named.service similarity index 100% rename from meta-openeuler/recipes-core/bind/bind/named.service rename to meta-openeuler/recipes-connectivity/bind/bind-dhclient/named.service diff --git a/meta-openeuler/recipes-connectivity/bind/bind-dhclient_%.bbappend b/meta-openeuler/recipes-connectivity/bind/bind-dhclient_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..0a87d6dd1f2c01d036288b63150d7758df952663 --- /dev/null +++ b/meta-openeuler/recipes-connectivity/bind/bind-dhclient_%.bbappend @@ -0,0 +1,26 @@ +# source bb: meta-overc/recipes-connectivity/bind/bind-dhclient_9.11.22.bb + +# version in openeuler/dhcp +PV = "9.11.14" + +# fix LIC_FILES_CHKSUM error +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=8f17f64e47e83b60cd920a1e4b54419e" + +SRC_URI_remove = "https://ftp.isc.org/isc/bind9/${PV}/${PACKAGE_FETCH_NAME}-${PV}.tar.gz \ +" + +# intergrate the patch of a later version, apply openEuler/dhcp patch adapt +SRC_URI_prepend = "file://dhcp/dhcp-4.4.2.tar.gz;name=dhcp.tarball \ + file://backport-0025-bind-Detect-system-time-changes.patch \ + file://0001-revert-d10fbdec-for-lib-dns-gen.c-as-it-is-a-build-p.patch \ +" + +SRC_URI[dhcp.tarball.sha256sum] = "1a7ccd64a16e5e68f7b5e0f527fd07240a2892ea53fe245620f4f5f607004521" + +# decompress the source code from dhcp-4.4.2.tar.gz +do_unpack_bind () { + cd ${WORKDIR} + tar -xf dhcp-4.4.2/bind/bind.tar.gz +} + +addtask unpack_bind after do_unpack before do_patch diff --git a/meta-openeuler/recipes-core/bind/bind_9.11.14.bb b/meta-openeuler/recipes-connectivity/bind/bind-dhclient_9.11.22.bb similarity index 42% rename from meta-openeuler/recipes-core/bind/bind_9.11.14.bb rename to meta-openeuler/recipes-connectivity/bind/bind-dhclient_9.11.22.bb index 027035d6137c8cab6bf0ce369bc3c22474de6f52..3ac860af953af6916e6725cb871c1cca5d843ac3 100644 --- a/meta-openeuler/recipes-core/bind/bind_9.11.14.bb +++ b/meta-openeuler/recipes-connectivity/bind/bind-dhclient_9.11.22.bb @@ -1,28 +1,43 @@ SUMMARY = "ISC Internet Domain Name Server" -HOMEPAGE = "https://www.isc.org/bind/" -DESCRIPTION = "BIND 9 provides a full-featured Domain Name Server system" +HOMEPAGE = "http://www.isc.org/sw/bind/" SECTION = "console/network" -LICENSE = "MPL-2.0" -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=8f17f64e47e83b60cd920a1e4b54419e" +LICENSE = "ISC & MPL-2.0" +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=bf39058a7f64b2a934ce14dc9ec1dd45" DEPENDS = "openssl libcap zlib" -SRC_URI = "file://dhcp/dhcp-4.4.2.tar.gz \ - file://0001-revert-d10fbdec-for-lib-dns-gen.c-as-it-is-a-build-p.patch \ +PACKAGE_FETCH_NAME = "bind" +S = "${WORKDIR}/${PACKAGE_FETCH_NAME}-${PV}" + +SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${PACKAGE_FETCH_NAME}-${PV}.tar.gz \ file://conf.patch \ file://named.service \ file://bind9 \ file://generate-rndc-key.sh \ + file://make-etc-initd-bind-stop-work.patch \ + file://init.d-add-support-for-read-only-rootfs.patch \ + file://bind-ensure-searching-for-json-headers-searches-sysr.patch \ + file://0001-configure.in-remove-useless-L-use_openssl-lib.patch \ + file://0001-named-lwresd-V-and-start-log-hide-build-options.patch \ + file://0001-avoid-start-failure-with-bind-user.patch \ " -SRC_URI[sha256sum] = "1a7ccd64a16e5e68f7b5e0f527fd07240a2892ea53fe245620f4f5f607004521" +SRC_URI[sha256sum] = "afc6d8015006f1cabf699ff19f517bb8fd9c1811e5231f26baf51c3550262ac9" UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/" -# stay at 9.16 follow the ESV versions divisible by 4 -UPSTREAM_CHECK_REGEX = "(?P9.(16|20|24|28)(\.\d+)+(-P\d+)*)/" +# stay at 9.11 until 9.16, from 9.16 follow the ESV versions divisible by 4 +UPSTREAM_CHECK_REGEX = "(?P9.(11|16|20|24|28)(\.\d+)+(-P\d+)*)/" + +# BIND >= 9.11.2 need dhcpd >= 4.4.0, +# don't report it here since dhcpd is already recent enough. +CVE_CHECK_IGNORE += "CVE-2019-6470" + +inherit autotools +#inherit update-rc.d systemd +inherit useradd pkgconfig multilib_script multilib_header -inherit autotools systemd pkgconfig multilib_header +MULTILIB_SCRIPTS = "${PN}:${bindir}/bind9-config ${PN}:${bindir}/isc-config.sh" # PACKAGECONFIGs readline and libedit should NOT be set at same time PACKAGECONFIG ?= "readline" @@ -32,15 +47,16 @@ PACKAGECONFIG[libedit] = "--with-readline=-ledit,,libedit" PACKAGECONFIG[urandom] = "--with-randomdev=/dev/urandom,--with-randomdev=/dev/random,," PACKAGECONFIG[python3] = "--with-python=yes --with-python-install-dir=${PYTHON_SITEPACKAGES_DIR} , --without-python, python3-ply-native," -EXTRA_OECONF = " --with-libtool --disable-devpoll --enable-epoll \ - --with-gssapi=no --with-lmdb=no --with-zlib \ - --with-ecdsa=yes --with-eddsa=no --with-gost=no \ +ENABLE_IPV6 = "--enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)}" +EXTRA_OECONF = " ${ENABLE_IPV6} --with-libtool --enable-threads \ + --disable-devpoll --enable-epoll --with-gost=no \ + --with-gssapi=no --with-ecdsa=yes --with-eddsa=no \ + --with-lmdb=no \ --sysconfdir=${sysconfdir}/bind \ --with-openssl=${STAGING_DIR_HOST}${prefix} \ " -LDFLAGS_append = " -lz" -inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native distutils3-base', '', d)} +inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native setuptools3-base', '', d)} # dhcp needs .la so keep them REMOVE_LIBTOOL_LA = "0" @@ -49,52 +65,55 @@ USERADD_PACKAGES = "${PN}" USERADD_PARAM_${PN} = "--system --home ${localstatedir}/cache/bind --no-create-home \ --user-group bind" -INITSCRIPT_NAME = "bind" -INITSCRIPT_PARAMS = "defaults" +# INITSCRIPT_NAME = "bind" +# INITSCRIPT_PARAMS = "defaults" -SYSTEMD_SERVICE_${PN} = "named.service" +# SYSTEMD_SERVICE:${PN} = "named.service" -do_unpak () { - cd ${WORKDIR} - tar -xf dhcp-4.4.2/bind/bind.tar.gz +do_install_prepend() { + # clean host path in isc-config.sh before the hardlink created + # by "make install": + # bind9-config -> isc-config.sh + sed -i -e "s,${STAGING_LIBDIR},${libdir}," ${B}/isc-config.sh } -addtask unpak after do_unpack before do_patch - do_install_append() { rmdir "${D}${localstatedir}/run" rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" - install -d bind "${D}${localstatedir}/cache/bind" - install -d "${D}${sysconfdir}/bind" - install -d "${D}${sysconfdir}/init.d" - install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/" - install -m 750 "${S}/init.d" "${D}${sysconfdir}/init.d/bind" - if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then - sed -i -e '1s,#!.*python3,#! /usr/bin/python3,' \ - ${D}${sbindir}/dnssec-coverage \ - ${D}${sbindir}/dnssec-checkds \ - ${D}${sbindir}/dnssec-keymgr - fi - - # Install systemd related files - install -d ${D}${sbindir} - install -m 755 ${WORKDIR}/generate-rndc-key.sh ${D}${sbindir} - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/named.service ${D}${systemd_unitdir}/system - sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ - -e 's,@SBINDIR@,${sbindir},g' \ - ${D}${systemd_unitdir}/system/named.service - - install -d ${D}${sysconfdir}/default - install -m 0644 ${WORKDIR}/bind9 ${D}${sysconfdir}/default - - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}${sysconfdir}/tmpfiles.d - echo "d /run/named 0755 bind bind - -" > ${D}${sysconfdir}/tmpfiles.d/bind.conf - fi - - oe_multilib_header isc/platform.h + + # install -d -o bind "${D}${localstatedir}/cache/bind" + # install -d "${D}${sysconfdir}/bind" + # install -d "${D}${sysconfdir}/init.d" + # install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/" + # install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind" + # if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then + # sed -i -e '1s,#!.*python3,#! /usr/bin/python3,' \ + # ${D}${sbindir}/dnssec-coverage \ + # ${D}${sbindir}/dnssec-checkds \ + # ${D}${sbindir}/dnssec-keymgr + # fi + + # # Install systemd related files + # install -d ${D}${sbindir} + # install -m 755 ${WORKDIR}/generate-rndc-key.sh ${D}${sbindir} + # install -d ${D}${systemd_unitdir}/system + # install -m 0644 ${WORKDIR}/named.service ${D}${systemd_unitdir}/system + # sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ + # -e 's,@SBINDIR@,${sbindir},g' \ + # ${D}${systemd_unitdir}/system/named.service + + # install -d ${D}${sysconfdir}/default + # install -m 0644 ${WORKDIR}/bind9 ${D}${sysconfdir}/default + + # if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + # install -d ${D}${sysconfdir}/tmpfiles.d + # echo "d /run/named 0755 bind bind - -" > ${D}${sysconfdir}/tmpfiles.d/bind.conf + # fi + + rm -rf "${D}${datadir}" + + oe_multilib_header isc/platform.h } CONFFILES_${PN} = " \ @@ -118,10 +137,7 @@ FILES_${PN}-dev += "${bindir}/isc-config.h" FILES_${PN} += "${sbindir}/generate-rndc-key.sh" PACKAGE_BEFORE_PN += "${PN}-libs" -# special arrangement below due to -# https://github.com/isc-projects/bind9/commit/0e25af628cd776f98c04fc4cc59048f5448f6c88 -FILES_SOLIBSDEV = "${libdir}/*[!0-9].so ${libdir}/libbind9.so" -FILES_${PN}-libs = "${libdir}/named/*.so* ${libdir}/*-${PV}.so" +FILES_${PN}-libs = "${libdir}/*.so*" FILES_${PN}-staticdev += "${libdir}/*.la" PACKAGE_BEFORE_PN += "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-bind', '', d)}" diff --git a/meta-openeuler/recipes-core/dhcp/dhcp.inc b/meta-openeuler/recipes-connectivity/dhcp/dhcp.inc similarity index 35% rename from meta-openeuler/recipes-core/dhcp/dhcp.inc rename to meta-openeuler/recipes-connectivity/dhcp/dhcp.inc index 9bc2442a81668e4ade12d4cfd7054f53205e9cc4..78778005be05693506cec7fd661adbb6433084be 100644 --- a/meta-openeuler/recipes-core/dhcp/dhcp.inc +++ b/meta-openeuler/recipes-connectivity/dhcp/dhcp.inc @@ -8,138 +8,99 @@ easier to administer devices." HOMEPAGE = "http://www.isc.org/" LICENSE = "ISC" -LIC_FILES_CHKSUM = "file://LICENSE;md5=b9c6e660b3d9260de9a342d2fb77540a" - -SRC_URI = "file://dhcp/${BP}.tar.gz \ - file://dhcp/backport-0001-change-bug-url.patch \ - file://dhcp/backport-0002-additional-dhclient-options.patch \ - file://dhcp/backport-0003-Handle-releasing-interfaces-requested-by-sbin-ifup.patch \ - file://dhcp/backport-0004-Support-unicast-BOOTP-for-IBM-pSeries-systems-and-ma.patch \ - file://dhcp/backport-0005-Change-default-requested-options.patch \ - file://dhcp/backport-0006-Various-man-page-only-fixes.patch \ - file://dhcp/backport-0007-Change-paths-to-conform-to-our-standards.patch \ - file://dhcp/backport-0008-Make-sure-all-open-file-descriptors-are-closed-on-ex.patch \ - file://dhcp/backport-0009-Fix-garbage-in-format-string-error.patch \ - file://dhcp/backport-0010-Handle-null-timeout.patch \ - file://dhcp/backport-0011-Drop-unnecessary-capabilities.patch \ - file://dhcp/backport-0012-RFC-3442-Classless-Static-Route-Option-for-DHCPv4-51.patch \ - file://dhcp/backport-0013-DHCPv6-over-PPP-support-626514.patch \ - file://dhcp/backport-0014-IPoIB-support-660681.patch \ - file://dhcp/backport-0015-Add-GUID-DUID-to-dhcpd-logs-1064416.patch \ - file://dhcp/backport-0016-Turn-on-creating-sending-of-DUID.patch \ - file://dhcp/backport-0017-Send-unicast-request-release-via-correct-interface.patch \ - file://dhcp/backport-0018-No-subnet-declaration-for-iface-should-be-info-not-e.patch \ - file://dhcp/backport-0019-dhclient-write-DUID_LLT-even-in-stateless-mode-11563.patch \ - file://dhcp/backport-0020-Discover-all-hwaddress-for-xid-uniqueness.patch \ - file://dhcp/backport-0021-Load-leases-DB-in-non-replay-mode-only.patch \ - file://dhcp/backport-0022-dhclient-make-sure-link-local-address-is-ready-in-st.patch \ - file://dhcp/backport-0023-option-97-pxe-client-id.patch \ - file://dhcp/backport-0025-bind-Detect-system-time-changes.patch \ - file://dhcp/backport-0026-Add-dhclient-5-B-option-description.patch \ - file://dhcp/backport-0027-Add-missed-sd-notify-patch-to-manage-dhcpd-with-syst.patch \ - file://dhcp/bugfix-dhcp-4.2.5-check-dhclient-pid.patch \ - file://dhcp/bugfix-reduce-getifaddr-calls.patch \ - file://dhcp/bugfix-dhcpd-2038-problem.patch \ - file://dhcp/dhcpd-coredump-infiniband.patch \ - file://dhcp/bugfix-dhclient-check-if-pid-was-held.patch \ - file://dhcp/bugfix-dhcp-64-bit-lease-parse.patch \ - file://dhcp/backport-CVE-2021-25217.patch \ - file://dhcp/fix-multiple-definition-with-gcc-10-1.patch \ - file://dhcp/fix-multiple-definition-with-gcc-10-2.patch \ - file://dhcp/fix-coredump-when-client-active-is-NULL.patch \ - file://dhcp/bugfix-error-message-display.patch \ - file://dhcp/feature-lease-time-config-ipv6.patch \ - file://dhcp/add-a-test-case-to-parse-code93-in-option_unittest.patch \ - file://0007-Add-configure-argument-to-make-the-libxml2-dependenc.patch \ - file://0013-fixup_use_libbind.patch \ - file://init-server file://default-server \ - file://dhclient.conf file://dhcpd.conf \ - " - -SRC_URI[sha256sum] = "1a7ccd64a16e5e68f7b5e0f527fd07240a2892ea53fe245620f4f5f607004521" -DEPENDS = "openssl bind" - +LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;md5=004a4db50a1e20972e924a8618747c01" + +DEPENDS = "openssl bind-dhclient" + +SRC_URI = "http://ftp.isc.org/isc/dhcp/${PV}/dhcp-${PV}.tar.gz \ + file://init-relay file://default-relay \ + file://init-server file://default-server \ + file://dhclient.conf file://dhcpd.conf \ + file://dhclient-systemd-wrapper \ + file://dhclient.service \ + file://dhcpd.service file://dhcrelay.service \ + file://dhcpd6.service \ + " UPSTREAM_CHECK_URI = "http://ftp.isc.org/isc/dhcp/" UPSTREAM_CHECK_REGEX = "(?P\d+\.\d+\.(\d+?))/" -inherit autotools-brokensep systemd +inherit autotools-brokensep systemd useradd update-rc.d USERADD_PACKAGES = "${PN}-server" USERADD_PARAM_${PN}-server = "--system --no-create-home --home-dir /var/run/${BPN} --shell /bin/false --user-group ${BPN}" SYSTEMD_PACKAGES = "${PN}-server ${PN}-relay ${PN}-client" -#SYSTEMD_SERVICE_${PN}-server = "dhcpd.service dhcpd6.service" -#SYSTEMD_AUTO_ENABLE_${PN}-server = "disable" +SYSTEMD_SERVICE_${PN}-server = "dhcpd.service dhcpd6.service" +SYSTEMD_AUTO_ENABLE_${PN}-server = "disable" -#SYSTEMD_SERVICE_${PN}-relay = "dhcrelay.service" -#SYSTEMD_AUTO_ENABLE_${PN}-relay = "disable" +SYSTEMD_SERVICE_${PN}-relay = "dhcrelay.service" +SYSTEMD_AUTO_ENABLE_${PN}-relay = "disable" -#SYSTEMD_SERVICE_${PN}-client = "dhclient.service" -#SYSTEMD_AUTO_ENABLE_${PN}-client = "disable" +SYSTEMD_SERVICE_${PN}-client = "dhclient.service" +SYSTEMD_AUTO_ENABLE_${PN}-client = "disable" INITSCRIPT_PACKAGES = "dhcp-server" INITSCRIPT_NAME_dhcp-server = "dhcp-server" INITSCRIPT_PARAMS_dhcp-server = "defaults" -TARGET_CFLAGS += "-D_GNU_SOURCE" -TARGET_CFLAGS += "-fcommon" +CFLAGS += "-D_GNU_SOURCE" EXTRA_OECONF = "--with-srv-lease-file=${localstatedir}/lib/dhcp/dhcpd.leases \ --with-srv6-lease-file=${localstatedir}/lib/dhcp/dhcpd6.leases \ --with-cli-lease-file=${localstatedir}/lib/dhcp/dhclient.leases \ --with-cli6-lease-file=${localstatedir}/lib/dhcp/dhclient6.leases \ - --enable-paranoia --enable-static=yes --enable-shared=yes \ + --enable-paranoia --disable-static \ --with-randomdev=/dev/random \ --with-libbind=${STAGING_DIR_HOST} \ - --enable-libtool \ + --enable-libtool \ " -do_unpak() { - cd ${WORKDIR}/${BP}/bind - tar -xf bind.tar.gz - mv bind-9.11.14/ bind -} - -addtask unpak after do_unpack before do_patch - #Enable shared libs per dhcp README do_configure_prepend () { - cp configure.ac+lt configure.ac + cp configure.ac+lt configure.ac } do_install_append () { - install -d ${D}${sysconfdir}/init.d - install -d ${D}${sysconfdir}/default - install -d ${D}${sysconfdir}/dhcp - install -m 0750 ${WORKDIR}/init-server ${D}${sysconfdir}/init.d/dhcp-server - install -m 0644 ${WORKDIR}/default-server ${D}${sysconfdir}/default/dhcp-server - - rm -f ${D}${sysconfdir}/dhclient.conf* - rm -f ${D}${sysconfdir}/dhcpd.conf* - install -m 0644 ${WORKDIR}/dhclient.conf ${D}${sysconfdir}/dhcp/dhclient.conf - install -m 0644 ${WORKDIR}/dhcpd.conf ${D}${sysconfdir}/dhcp/dhcpd.conf - - install -d ${D}${base_sbindir}/ - if [ "${sbindir}" != "${base_sbindir}" ]; then - mv ${D}${sbindir}/dhclient ${D}${base_sbindir}/ - fi - install -m 0755 ${S}/client/scripts/linux ${D}${base_sbindir}/dhclient-script - #delete extra rpath - for dhcpFile in $(find ${D} -type f) - do - file ${dhcpFile} | grep ELF || continue - readelf -a ${dhcpFile} | grep rpath || continue - ${RPATH_DELETE} ${dhcpFile} - done + install -d ${D}${sysconfdir}/init.d + install -d ${D}${sysconfdir}/default + install -d ${D}${sysconfdir}/dhcp + install -m 0755 ${WORKDIR}/init-relay ${D}${sysconfdir}/init.d/dhcp-relay + install -m 0644 ${WORKDIR}/default-relay ${D}${sysconfdir}/default/dhcp-relay + install -m 0755 ${WORKDIR}/init-server ${D}${sysconfdir}/init.d/dhcp-server + install -m 0644 ${WORKDIR}/default-server ${D}${sysconfdir}/default/dhcp-server + + rm -f ${D}${sysconfdir}/dhclient.conf* + rm -f ${D}${sysconfdir}/dhcpd.conf* + install -m 0644 ${WORKDIR}/dhclient.conf ${D}${sysconfdir}/dhcp/dhclient.conf + install -m 0644 ${WORKDIR}/dhcpd.conf ${D}${sysconfdir}/dhcp/dhcpd.conf + + install -d ${D}${base_sbindir}/ + if [ "${sbindir}" != "${base_sbindir}" ]; then + mv ${D}${sbindir}/dhclient ${D}${base_sbindir}/ + fi + install -m 0755 ${S}/client/scripts/linux ${D}${base_sbindir}/dhclient-script + + # Install systemd unit files + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/dhcpd.service ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/dhcpd6.service ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/dhcrelay.service ${D}${systemd_unitdir}/system + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/dhcpd*.service ${D}${systemd_unitdir}/system/dhcrelay.service + sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/dhcpd*.service + sed -i -e 's,@base_bindir@,${base_bindir},g' ${D}${systemd_unitdir}/system/dhcpd*.service + sed -i -e 's,@localstatedir@,${localstatedir},g' ${D}${systemd_unitdir}/system/dhcpd*.service + sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/dhcrelay.service + + install -d ${D}${base_sbindir} + install -m 0755 ${WORKDIR}/dhclient-systemd-wrapper ${D}${base_sbindir}/dhclient-systemd-wrapper + install -m 0644 ${WORKDIR}/dhclient.service ${D}${systemd_unitdir}/system + sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/dhclient.service + sed -i -e 's,@BASE_SBINDIR@,${base_sbindir},g' ${D}${systemd_unitdir}/system/dhclient.service } PACKAGES += "dhcp-libs dhcp-server dhcp-server-config dhcp-client dhcp-relay dhcp-omshell" -FILES_${PN} = "${base_sbindir}/dhclient \ - ${base_sbindir}/dhclient-script \ - ${sysconfdir}/dhcp/dhclient.conf \ - ${bindir}/omshell \ - ${sbindir}/dhcrelay \ - " +PACKAGES_remove = "${PN}" +RDEPENDS_${PN}-client += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'iproute2', '', d)}" RDEPENDS_${PN}-dev = "" RDEPENDS_${PN}-staticdev = "" FILES_${PN}-libs = "${libdir}/libdhcpctl.so.0* ${libdir}/libomapi.so.0* ${libdir}/libdhcp.so.0*" @@ -159,6 +120,12 @@ FILES_${PN}-client = "${base_sbindir}/dhclient \ FILES_${PN}-omshell = "${bindir}/omshell" +pkg_postinst_dhcp-server() { + mkdir -p $D/${localstatedir}/lib/dhcp + touch $D/${localstatedir}/lib/dhcp/dhcpd.leases + touch $D/${localstatedir}/lib/dhcp/dhcpd6.leases +} + pkg_postinst_dhcp-client() { mkdir -p $D/${localstatedir}/lib/dhcp } diff --git a/meta-openeuler/recipes-connectivity/dhcp/dhcp/0001-define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch b/meta-openeuler/recipes-connectivity/dhcp/dhcp/0001-define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch new file mode 100644 index 0000000000000000000000000000000000000000..d1b57f0bb410afafd72a6924ddae5157ef03e90b --- /dev/null +++ b/meta-openeuler/recipes-connectivity/dhcp/dhcp/0001-define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch @@ -0,0 +1,27 @@ +From 7cc29144535a622fc671dc86eb1da65b0473a7c4 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Tue, 15 Aug 2017 16:14:22 +0800 +Subject: [PATCH 01/11] define macro _PATH_DHCPD_CONF and _PATH_DHCLIENT_CONF + +Upstream-Status: Inappropriate [OE specific] + +Rebase to 4.3.6 +Signed-off-by: Hongxu Jia +--- + includes/site.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +Index: dhcp-4.4.1/includes/site.h +=================================================================== +--- dhcp-4.4.1.orig/includes/site.h ++++ dhcp-4.4.1/includes/site.h +@@ -148,7 +148,8 @@ + /* Define this if you want the dhcpd.conf file to go somewhere other than + the default location. By default, it goes in /etc/dhcpd.conf. */ + +-/* #define _PATH_DHCPD_CONF "/etc/dhcpd.conf" */ ++#define _PATH_DHCPD_CONF "/etc/dhcp/dhcpd.conf" ++#define _PATH_DHCLIENT_CONF "/etc/dhcp/dhclient.conf" + + /* Network API definitions. You do not need to choose one of these - if + you don't choose, one will be chosen for you in your system's config diff --git a/meta-openeuler/recipes-connectivity/dhcp/dhcp/0001-workaround-busybox-limitation-in-linux-dhclient-script.patch b/meta-openeuler/recipes-connectivity/dhcp/dhcp/0001-workaround-busybox-limitation-in-linux-dhclient-script.patch new file mode 100644 index 0000000000000000000000000000000000000000..2359381b93802b30f2db73f84210ba0e2e5443d6 --- /dev/null +++ b/meta-openeuler/recipes-connectivity/dhcp/dhcp/0001-workaround-busybox-limitation-in-linux-dhclient-script.patch @@ -0,0 +1,65 @@ +From eec0503cfc36f63d777f5cb3f2719cecedcb8468 Mon Sep 17 00:00:00 2001 +From: Haris Okanovic +Date: Mon, 7 Jan 2019 13:22:09 -0600 +Subject: [PATCH] Workaround busybox limitation in Linux dhclient-script + +Busybox is a lightweight implementation of coreutils commonly used on +space-constrained embedded Linux distributions. It's implementation of +chown and chmod doesn't provide a "--reference" option added to +client/scripts/linux as of commit 9261cb14. This change works around +that limitation by using stat to read ownership and permissions flags +and simple chown/chmod calls supported in both coreutils and busybox. + + modified: client/scripts/linux + +Signed-off-by: Haris Okanovic +Upstream-Status: Pending [ISC-Bugs #48771] +--- + client/scripts/linux | 17 +++++++++++++---- + 1 file changed, 13 insertions(+), 4 deletions(-) + +diff --git a/client/scripts/linux b/client/scripts/linux +index 0c429697..2435a44b 100755 +--- a/client/scripts/linux ++++ b/client/scripts/linux +@@ -32,6 +32,17 @@ + # if your system holds ip tool in a non-standard location. + ip=/sbin/ip + ++chown_chmod_by_reference() { ++ local reference_file="$1" ++ local target_file="$2" ++ ++ local owner=$(stat -c "%u:%g" "$reference_file") ++ local perm=$(stat -c "%a" "$reference_file") ++ ++ chown "$owner" "$target_file" ++ chmod "$perm" "$target_file" ++} ++ + # update /etc/resolv.conf based on received values + # This updated version mostly follows Debian script by Andrew Pollock et al. + make_resolv_conf() { +@@ -74,8 +85,7 @@ make_resolv_conf() { + fi + + if [ -f /etc/resolv.conf ]; then +- chown --reference=/etc/resolv.conf $new_resolv_conf +- chmod --reference=/etc/resolv.conf $new_resolv_conf ++ chown_chmod_by_reference /etc/resolv.conf $new_resolv_conf + fi + mv -f $new_resolv_conf /etc/resolv.conf + # DHCPv6 +@@ -101,8 +111,7 @@ make_resolv_conf() { + fi + + if [ -f /etc/resolv.conf ]; then +- chown --reference=/etc/resolv.conf $new_resolv_conf +- chmod --reference=/etc/resolv.conf $new_resolv_conf ++ chown_chmod_by_reference /etc/resolv.conf $new_resolv_conf + fi + mv -f $new_resolv_conf /etc/resolv.conf + fi +-- +2.20.0 + diff --git a/meta-openeuler/recipes-connectivity/dhcp/dhcp/0002-dhclient-dbus.patch b/meta-openeuler/recipes-connectivity/dhcp/dhcp/0002-dhclient-dbus.patch new file mode 100644 index 0000000000000000000000000000000000000000..101c33f677a87010186c7ec2dcad7b6c06cb7bc5 --- /dev/null +++ b/meta-openeuler/recipes-connectivity/dhcp/dhcp/0002-dhclient-dbus.patch @@ -0,0 +1,117 @@ +From be7540d31c356e80ee02e90e8bf162b7ac6e5ba5 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Tue, 15 Aug 2017 14:56:56 +0800 +Subject: [PATCH 02/11] dhclient dbus + +Upstream-Status: Inappropriate [distribution] + +Rebase to 4.3.6 +Signed-off-by: Hongxu Jia +--- + client/scripts/bsdos | 5 +++++ + client/scripts/freebsd | 5 +++++ + client/scripts/linux | 5 +++++ + client/scripts/netbsd | 5 +++++ + client/scripts/openbsd | 5 +++++ + client/scripts/solaris | 5 +++++ + 6 files changed, 30 insertions(+) + +diff --git a/client/scripts/bsdos b/client/scripts/bsdos +index d69d0d8..095b143 100755 +--- a/client/scripts/bsdos ++++ b/client/scripts/bsdos +@@ -45,6 +45,11 @@ exit_with_hooks() { + . /etc/dhclient-exit-hooks + fi + # probably should do something with exit status of the local script ++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then ++ dbus-send --system --dest=com.redhat.dhcp \ ++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \ ++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`" ++ fi + exit $exit_status + } + +diff --git a/client/scripts/freebsd b/client/scripts/freebsd +index 8f3e2a2..ad7fb44 100755 +--- a/client/scripts/freebsd ++++ b/client/scripts/freebsd +@@ -89,6 +89,11 @@ exit_with_hooks() { + . /etc/dhclient-exit-hooks + fi + # probably should do something with exit status of the local script ++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then ++ dbus-send --system --dest=com.redhat.dhcp \ ++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \ ++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`" ++ fi + exit $exit_status + } + +diff --git a/client/scripts/linux b/client/scripts/linux +index 5fb1612..3d447b6 100755 +--- a/client/scripts/linux ++++ b/client/scripts/linux +@@ -174,6 +174,11 @@ exit_with_hooks() { + exit_status=$? + fi + ++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then ++ dbus-send --system --dest=com.redhat.dhcp \ ++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \ ++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`" ++ fi + exit $exit_status + } + +diff --git a/client/scripts/netbsd b/client/scripts/netbsd +index 07383b7..aaba8e8 100755 +--- a/client/scripts/netbsd ++++ b/client/scripts/netbsd +@@ -45,6 +45,11 @@ exit_with_hooks() { + . /etc/dhclient-exit-hooks + fi + # probably should do something with exit status of the local script ++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then ++ dbus-send --system --dest=com.redhat.dhcp \ ++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \ ++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`" ++ fi + exit $exit_status + } + +diff --git a/client/scripts/openbsd b/client/scripts/openbsd +index e7f4746..56b980c 100644 +--- a/client/scripts/openbsd ++++ b/client/scripts/openbsd +@@ -45,6 +45,11 @@ exit_with_hooks() { + . /etc/dhclient-exit-hooks + fi + # probably should do something with exit status of the local script ++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then ++ dbus-send --system --dest=com.redhat.dhcp \ ++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \ ++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`" ++ fi + exit $exit_status + } + +diff --git a/client/scripts/solaris b/client/scripts/solaris +index af553b9..4a2aa69 100755 +--- a/client/scripts/solaris ++++ b/client/scripts/solaris +@@ -26,6 +26,11 @@ exit_with_hooks() { + . /etc/dhclient-exit-hooks + fi + # probably should do something with exit status of the local script ++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then ++ dbus-send --system --dest=com.redhat.dhcp \ ++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \ ++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`" ++ fi + exit $exit_status + } + +-- +1.8.3.1 + diff --git a/meta-openeuler/recipes-connectivity/dhcp/dhcp/0003-link-with-lcrypto.patch b/meta-openeuler/recipes-connectivity/dhcp/dhcp/0003-link-with-lcrypto.patch new file mode 100644 index 0000000000000000000000000000000000000000..5b35933a54a48c648ab0d80d23ddc29c6f8a620a --- /dev/null +++ b/meta-openeuler/recipes-connectivity/dhcp/dhcp/0003-link-with-lcrypto.patch @@ -0,0 +1,35 @@ +From d80bd792323dbd56269309f85b4506eb6b1b60e9 Mon Sep 17 00:00:00 2001 +From: Andrei Gherzan +Date: Tue, 15 Aug 2017 15:05:47 +0800 +Subject: [PATCH 03/11] link with lcrypto + +From 4.2.0 final release, -lcrypto check was removed and we compile +static libraries +from bind that are linked to libcrypto. This is why i added a patch in +order to add +-lcrypto to LIBS. + +Upstream-Status: Pending +Signed-off-by: Andrei Gherzan + +Rebase to 4.3.6 +Signed-off-by: Hongxu Jia +--- + configure.ac | 4 ++++ + 1 file changed, 4 insertions(+) + +Index: dhcp-4.4.1/configure.ac +=================================================================== +--- dhcp-4.4.1.orig/configure.ac ++++ dhcp-4.4.1/configure.ac +@@ -612,6 +612,10 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], + # Look for optional headers. + AC_CHECK_HEADERS(sys/socket.h net/if_dl.h net/if6.h regex.h) + ++# find an MD5 library ++AC_SEARCH_LIBS(MD5_Init, [crypto]) ++AC_SEARCH_LIBS(MD5Init, [crypto]) ++ + # Solaris needs some libraries for functions + AC_SEARCH_LIBS(socket, [socket]) + AC_SEARCH_LIBS(inet_ntoa, [nsl]) diff --git a/meta-openeuler/recipes-connectivity/dhcp/dhcp/0004-Fix-out-of-tree-builds.patch b/meta-openeuler/recipes-connectivity/dhcp/dhcp/0004-Fix-out-of-tree-builds.patch new file mode 100644 index 0000000000000000000000000000000000000000..7b57730ffb7b8d6b4395643fe1124cb0d059b6a9 --- /dev/null +++ b/meta-openeuler/recipes-connectivity/dhcp/dhcp/0004-Fix-out-of-tree-builds.patch @@ -0,0 +1,95 @@ +From cccec0344d68dac4100b6f260ee24e7c2da9dfda Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Tue, 15 Aug 2017 15:08:22 +0800 +Subject: [PATCH 04/11] Fix out of tree builds + +Upstream-Status: Pending + +RP 2013/03/21 + +Rebase to 4.3.6 + +Signed-off-by: Hongxu Jia +--- + client/Makefile.am | 4 ++-- + common/Makefile.am | 3 ++- + dhcpctl/Makefile.am | 2 ++ + omapip/Makefile.am | 1 + + relay/Makefile.am | 2 +- + server/Makefile.am | 2 +- + 6 files changed, 9 insertions(+), 5 deletions(-) + +Index: dhcp-4.4.1/common/Makefile.am +=================================================================== +--- dhcp-4.4.1.orig/common/Makefile.am ++++ dhcp-4.4.1/common/Makefile.am +@@ -1,4 +1,5 @@ +-AM_CPPFLAGS = -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"' ++AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"' ++ + AM_CFLAGS = $(LDAP_CFLAGS) + + lib_LIBRARIES = libdhcp.a +Index: dhcp-4.4.1/dhcpctl/Makefile.am +=================================================================== +--- dhcp-4.4.1.orig/dhcpctl/Makefile.am ++++ dhcp-4.4.1/dhcpctl/Makefile.am +@@ -3,6 +3,8 @@ BINDLIBDNSDIR=@BINDLIBDNSDIR@ + BINDLIBISCCFGDIR=@BINDLIBISCCFGDIR@ + BINDLIBISCDIR=@BINDLIBISCDIR@ + ++AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_srcdir) ++ + bin_PROGRAMS = omshell + lib_LIBRARIES = libdhcpctl.a + noinst_PROGRAMS = cltest +Index: dhcp-4.4.1/server/Makefile.am +=================================================================== +--- dhcp-4.4.1.orig/server/Makefile.am ++++ dhcp-4.4.1/server/Makefile.am +@@ -4,7 +4,7 @@ + # production code. Sadly, we are not there yet. + SUBDIRS = . tests + +-AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"' ++AM_CPPFLAGS = -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"' -I$(top_srcdir)/includes + + dist_sysconf_DATA = dhcpd.conf.example + sbin_PROGRAMS = dhcpd +Index: dhcp-4.4.1/client/Makefile.am +=================================================================== +--- dhcp-4.4.1.orig/client/Makefile.am ++++ dhcp-4.4.1/client/Makefile.am +@@ -5,7 +5,7 @@ + SUBDIRS = . tests + + AM_CPPFLAGS = -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' +-AM_CPPFLAGS += -DLOCALSTATEDIR='"$(localstatedir)"' ++AM_CPPFLAGS += -DLOCALSTATEDIR='"$(localstatedir)"' -I$(top_srcdir)/includes + + dist_sysconf_DATA = dhclient.conf.example + sbin_PROGRAMS = dhclient +Index: dhcp-4.4.1/omapip/Makefile.am +=================================================================== +--- dhcp-4.4.1.orig/omapip/Makefile.am ++++ dhcp-4.4.1/omapip/Makefile.am +@@ -2,6 +2,7 @@ BINDLIBIRSDIR=@BINDLIBIRSDIR@ + BINDLIBDNSDIR=@BINDLIBDNSDIR@ + BINDLIBISCCFGDIR=@BINDLIBISCCFGDIR@ + BINDLIBISCDIR=@BINDLIBISCDIR@ ++AM_CPPFLAGS = -I$(top_srcdir)/includes + + lib_LIBRARIES = libomapi.a + noinst_PROGRAMS = svtest +Index: dhcp-4.4.1/relay/Makefile.am +=================================================================== +--- dhcp-4.4.1.orig/relay/Makefile.am ++++ dhcp-4.4.1/relay/Makefile.am +@@ -1,6 +1,6 @@ + SUBDIRS = . tests + +-AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"' ++AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"' -I$(top_srcdir)/includes + + sbin_PROGRAMS = dhcrelay + dhcrelay_SOURCES = dhcrelay.c diff --git a/meta-openeuler/recipes-connectivity/dhcp/dhcp/0005-dhcp-client-fix-invoke-dhclient-script-failed-on-Rea.patch b/meta-openeuler/recipes-connectivity/dhcp/dhcp/0005-dhcp-client-fix-invoke-dhclient-script-failed-on-Rea.patch new file mode 100644 index 0000000000000000000000000000000000000000..dd56381b1dc3b0688ec2cba5fcc0ea9c127d9771 --- /dev/null +++ b/meta-openeuler/recipes-connectivity/dhcp/dhcp/0005-dhcp-client-fix-invoke-dhclient-script-failed-on-Rea.patch @@ -0,0 +1,36 @@ +From 2e8ff0e4f6d39e346ea86b8c514ab4ccc78fa359 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Tue, 15 Aug 2017 15:24:14 +0800 +Subject: [PATCH 05/11] dhcp-client: fix invoke dhclient-script failed on + Read-only file system + +In read-only file system, '/etc' is on the readonly partition, +and '/etc/resolv.conf' is symlinked to a separate writable +partition. + +In this situation, we create temp files 'resolv.conf.dhclient-new' +in /tmp dir. + +Upstream-Status: Pending + +Signed-off-by: Hongxu Jia +--- + client/scripts/linux | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/client/scripts/linux b/client/scripts/linux +index 3d447b6..3122a75 100755 +--- a/client/scripts/linux ++++ b/client/scripts/linux +@@ -40,7 +40,7 @@ make_resolv_conf() { + # DHCPv4 + if [ -n "$new_domain_search" ] || [ -n "$new_domain_name" ] || + [ -n "$new_domain_name_servers" ]; then +- new_resolv_conf=/etc/resolv.conf.dhclient-new ++ new_resolv_conf=/tmp/resolv.conf.dhclient-new + rm -f $new_resolv_conf + + if [ -n "$new_domain_name" ]; then +-- +1.8.3.1 + diff --git a/meta-openeuler/recipes-core/dhcp/dhcp/0007-Add-configure-argument-to-make-the-libxml2-dependenc.patch b/meta-openeuler/recipes-connectivity/dhcp/dhcp/0007-Add-configure-argument-to-make-the-libxml2-dependenc.patch similarity index 100% rename from meta-openeuler/recipes-core/dhcp/dhcp/0007-Add-configure-argument-to-make-the-libxml2-dependenc.patch rename to meta-openeuler/recipes-connectivity/dhcp/dhcp/0007-Add-configure-argument-to-make-the-libxml2-dependenc.patch diff --git a/meta-openeuler/recipes-connectivity/dhcp/dhcp/0009-remove-dhclient-script-bash-dependency.patch b/meta-openeuler/recipes-connectivity/dhcp/dhcp/0009-remove-dhclient-script-bash-dependency.patch new file mode 100644 index 0000000000000000000000000000000000000000..912b6d6312c4f9a32cba8ecc07a76d0b687e8f9b --- /dev/null +++ b/meta-openeuler/recipes-connectivity/dhcp/dhcp/0009-remove-dhclient-script-bash-dependency.patch @@ -0,0 +1,28 @@ +From f3f8b7726e50e24ef3edf5fa5a17e31d39118d7e Mon Sep 17 00:00:00 2001 +From: Andre McCurdy +Date: Tue, 15 Aug 2017 15:49:31 +0800 +Subject: [PATCH 09/11] remove dhclient-script bash dependency + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Andre McCurdy + +Rebase to 4.3.6 +Signed-off-by: Hongxu Jia +--- + client/scripts/linux | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/client/scripts/linux b/client/scripts/linux +index 3122a75..1712d7d 100755 +--- a/client/scripts/linux ++++ b/client/scripts/linux +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + # dhclient-script for Linux. Dan Halbert, March, 1997. + # Updated for Linux 2.[12] by Brian J. Murrell, January 1999. + # No guarantees about this. I'm a novice at the details of Linux +-- +1.8.3.1 + diff --git a/meta-openeuler/recipes-connectivity/dhcp/dhcp/0012-dhcp-correct-the-intention-for-xml2-lib-search.patch b/meta-openeuler/recipes-connectivity/dhcp/dhcp/0012-dhcp-correct-the-intention-for-xml2-lib-search.patch new file mode 100644 index 0000000000000000000000000000000000000000..39ba65fbc4625ea2ccc6f123f65783798e2bebc1 --- /dev/null +++ b/meta-openeuler/recipes-connectivity/dhcp/dhcp/0012-dhcp-correct-the-intention-for-xml2-lib-search.patch @@ -0,0 +1,34 @@ +From 501543b3ef715488a142e3d301ff2733aa33eec7 Mon Sep 17 00:00:00 2001 +From: Awais Belal +Date: Wed, 25 Oct 2017 21:00:05 +0500 +Subject: [PATCH] dhcp: correct the intention for xml2 lib search + +A missing case breaks the build when libxml2 is +required and found appropriately. The third argument +to the function AC_SEARCH_LIB is action-if-found which +was mistakenly been used for the case where the library +is not found and hence breaks the configure phase +where it shoud actually pass. +We now pass on silently when action-if-found is +executed. + +Upstream-Status: Pending + +Signed-off-by: Awais Belal +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: dhcp-4.4.1/configure.ac +=================================================================== +--- dhcp-4.4.1.orig/configure.ac ++++ dhcp-4.4.1/configure.ac +@@ -647,7 +647,7 @@ AC_ARG_WITH(libxml2, + with_libxml2="$withval", with_libxml2="no") + + if test x$with_libxml2 != xno; then +- AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2], ++ AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2],, + [if test x$with_libxml2 != xauto; then + AC_MSG_FAILURE([*** Cannot find xmlTextWriterStartElement with -lxml2 and libxml2 was requested]) + fi]) diff --git a/meta-openeuler/recipes-core/dhcp/dhcp/0013-fixup_use_libbind.patch b/meta-openeuler/recipes-connectivity/dhcp/dhcp/0013-fixup_use_libbind.patch similarity index 100% rename from meta-openeuler/recipes-core/dhcp/dhcp/0013-fixup_use_libbind.patch rename to meta-openeuler/recipes-connectivity/dhcp/dhcp/0013-fixup_use_libbind.patch diff --git a/meta-openeuler/recipes-connectivity/dhcp/dhcp_%.bbappend b/meta-openeuler/recipes-connectivity/dhcp/dhcp_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..a7fa15ffa28e439d216552b7d04d637ec8859bee --- /dev/null +++ b/meta-openeuler/recipes-connectivity/dhcp/dhcp_%.bbappend @@ -0,0 +1,49 @@ +# source bb: meta-overc/recipes-connectivity/dhcp/dhcp_4.4.2-P1.bb + +# version in openEuler +PV = "4.4.2" + +# apply patches in openEuler +SRC_URI_prepend = "file://backport-0001-change-bug-url.patch \ + file://backport-0002-additional-dhclient-options.patch \ + file://backport-0003-Handle-releasing-interfaces-requested-by-sbin-ifup.patch \ + file://backport-0004-Support-unicast-BOOTP-for-IBM-pSeries-systems-and-ma.patch \ + file://backport-0005-Change-default-requested-options.patch \ + file://backport-0006-Various-man-page-only-fixes.patch \ + file://backport-0007-Change-paths-to-conform-to-our-standards.patch \ + file://backport-0008-Make-sure-all-open-file-descriptors-are-closed-on-ex.patch \ + file://backport-0009-Fix-garbage-in-format-string-error.patch \ + file://backport-0010-Handle-null-timeout.patch \ + file://backport-0011-Drop-unnecessary-capabilities.patch \ + file://backport-0012-RFC-3442-Classless-Static-Route-Option-for-DHCPv4-51.patch \ + file://backport-0013-DHCPv6-over-PPP-support-626514.patch \ + file://backport-0014-IPoIB-support-660681.patch \ + file://backport-0015-Add-GUID-DUID-to-dhcpd-logs-1064416.patch \ + file://backport-0016-Turn-on-creating-sending-of-DUID.patch \ + file://backport-0017-Send-unicast-request-release-via-correct-interface.patch \ + file://backport-0018-No-subnet-declaration-for-iface-should-be-info-not-e.patch \ + file://backport-0019-dhclient-write-DUID_LLT-even-in-stateless-mode-11563.patch \ + file://backport-0020-Discover-all-hwaddress-for-xid-uniqueness.patch \ + file://backport-0021-Load-leases-DB-in-non-replay-mode-only.patch \ + file://backport-0022-dhclient-make-sure-link-local-address-is-ready-in-st.patch \ + file://backport-0023-option-97-pxe-client-id.patch \ + file://backport-0024-Detect-system-time-changes.patch \ + file://backport-0026-Add-dhclient-5-B-option-description.patch \ + file://backport-0027-Add-missed-sd-notify-patch-to-manage-dhcpd-with-syst.patch \ + file://bugfix-dhcp-4.2.5-check-dhclient-pid.patch \ + file://bugfix-reduce-getifaddr-calls.patch \ + file://bugfix-dhcpd-2038-problem.patch \ + file://dhcpd-coredump-infiniband.patch \ + file://bugfix-dhclient-check-if-pid-was-held.patch \ + file://bugfix-dhcp-64-bit-lease-parse.patch \ + file://backport-CVE-2021-25217.patch \ + file://fix-multiple-definition-with-gcc-10-1.patch \ + file://fix-multiple-definition-with-gcc-10-2.patch \ + file://fix-coredump-when-client-active-is-NULL.patch \ + file://bugfix-error-message-display.patch \ + file://feature-lease-time-config-ipv6.patch \ + file://add-a-test-case-to-parse-code93-in-option_unittest.patch \ +" + +SRC_URI[sha256sum] = "1a7ccd64a16e5e68f7b5e0f527fd07240a2892ea53fe245620f4f5f607004521" +SRC_URI[md5sum] = "2afdaf8498dc1edaf3012efdd589b3e1" \ No newline at end of file diff --git a/meta-openeuler/recipes-connectivity/dhcp/dhcp_4.4.2-P1.bb b/meta-openeuler/recipes-connectivity/dhcp/dhcp_4.4.2-P1.bb new file mode 100644 index 0000000000000000000000000000000000000000..9b9e73e7f5ed1e3071b2608243ab820897a9ff46 --- /dev/null +++ b/meta-openeuler/recipes-connectivity/dhcp/dhcp_4.4.2-P1.bb @@ -0,0 +1,23 @@ +require dhcp.inc + +SRC_URI += "file://0001-define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch \ + file://0002-dhclient-dbus.patch \ + file://0003-link-with-lcrypto.patch \ + file://0004-Fix-out-of-tree-builds.patch \ + file://0005-dhcp-client-fix-invoke-dhclient-script-failed-on-Rea.patch \ + file://0007-Add-configure-argument-to-make-the-libxml2-dependenc.patch \ + file://0009-remove-dhclient-script-bash-dependency.patch \ + file://0012-dhcp-correct-the-intention-for-xml2-lib-search.patch \ + file://0013-fixup_use_libbind.patch \ + file://0001-workaround-busybox-limitation-in-linux-dhclient-script.patch \ +" + +SRC_URI[md5sum] = "3089a1ebd20a802ec0870ae337d43907" +SRC_URI[sha256sum] = "b05e04337539545a8faa0d6ac518defc61a07e5aec66a857f455e7f218c85a1a" + +LDFLAGS_append = " -pthread" + +PACKAGECONFIG ?= "" +PACKAGECONFIG[bind-httpstats] = "--with-libxml2,--without-libxml2,libxml2" + +CFLAGS += "-fcommon" diff --git a/meta-openeuler/recipes-connectivity/dhcp/files/default-relay b/meta-openeuler/recipes-connectivity/dhcp/files/default-relay new file mode 100644 index 0000000000000000000000000000000000000000..7961f014bef330d8e30709a50185b6057982fe68 --- /dev/null +++ b/meta-openeuler/recipes-connectivity/dhcp/files/default-relay @@ -0,0 +1,12 @@ +# Defaults for dhcp-relay initscript +# sourced by /etc/init.d/dhcp-relay + +# What servers should the DHCP relay forward requests to? +# e.g: SERVERS="192.168.0.1" +SERVERS="" + +# On what interfaces should the DHCP relay (dhrelay) serve DHCP requests? +INTERFACES="" + +# Additional options that are passed to the DHCP relay daemon? +OPTIONS="" diff --git a/meta-openeuler/recipes-core/dhcp/dhcp/default-server b/meta-openeuler/recipes-connectivity/dhcp/files/default-server similarity index 100% rename from meta-openeuler/recipes-core/dhcp/dhcp/default-server rename to meta-openeuler/recipes-connectivity/dhcp/files/default-server diff --git a/meta-openeuler/recipes-connectivity/dhcp/files/dhclient-systemd-wrapper b/meta-openeuler/recipes-connectivity/dhcp/files/dhclient-systemd-wrapper new file mode 100644 index 0000000000000000000000000000000000000000..7d0e224a1dff6c6d112eb8299bc6dcd74f6bcb1d --- /dev/null +++ b/meta-openeuler/recipes-connectivity/dhcp/files/dhclient-systemd-wrapper @@ -0,0 +1,39 @@ +#!/bin/sh + +# In case the interface is used for nfs, skip it. +nfsroot=0 +interfaces="" +exec 9<&0 < /proc/mounts +while read dev mtpt fstype rest; do + if test $mtpt = "/" ; then + case $fstype in + nfs | nfs4) + nfsroot=1 + nfs_addr=`echo $rest | sed -e 's/^.*addr=\([0-9.]*\).*$/\1/'` + break + ;; + *) + ;; + esac + fi +done +exec 0<&9 9<&- + +if [ $nfsroot -eq 0 ]; then + interfaces="$INTERFACES" +else + if [ -x /bin/ip -o -x /sbin/ip ] ; then + nfs_iface=`ip route get $nfs_addr | grep dev | sed -e 's/^.*dev \([-a-z0-9.]*\).*$/\1/'` + fi + for i in $INTERFACES; do + if test "x$i" = "x$nfs_iface"; then + echo "dhclient skipping nfsroot interface $i" + else + interfaces="$interfaces $i" + fi + done +fi + +if test "x$interfaces" != "x"; then + /sbin/dhclient -d -cf /etc/dhcp/dhclient.conf -q -lf /var/lib/dhcp/dhclient.leases $interfaces +fi diff --git a/meta-openeuler/recipes-core/dhcp/dhcp/dhclient.conf b/meta-openeuler/recipes-connectivity/dhcp/files/dhclient.conf similarity index 100% rename from meta-openeuler/recipes-core/dhcp/dhcp/dhclient.conf rename to meta-openeuler/recipes-connectivity/dhcp/files/dhclient.conf diff --git a/meta-openeuler/recipes-connectivity/dhcp/files/dhclient.service b/meta-openeuler/recipes-connectivity/dhcp/files/dhclient.service new file mode 100644 index 0000000000000000000000000000000000000000..9ddb4d1dfe92cce1373fe80b9ab8bd4b784839e6 --- /dev/null +++ b/meta-openeuler/recipes-connectivity/dhcp/files/dhclient.service @@ -0,0 +1,13 @@ +[Unit] +Description=Dynamic Host Configuration Protocol (DHCP) +Wants=network.target +Before=network.target +After=systemd-udevd.service + +[Service] +EnvironmentFile=-@SYSCONFDIR@/default/dhcp-client +ExecStart=@BASE_SBINDIR@/dhclient-systemd-wrapper +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/meta-openeuler/recipes-core/dhcp/dhcp/dhcpd.conf b/meta-openeuler/recipes-connectivity/dhcp/files/dhcpd.conf similarity index 100% rename from meta-openeuler/recipes-core/dhcp/dhcp/dhcpd.conf rename to meta-openeuler/recipes-connectivity/dhcp/files/dhcpd.conf diff --git a/meta-openeuler/recipes-connectivity/dhcp/files/dhcpd.service b/meta-openeuler/recipes-connectivity/dhcp/files/dhcpd.service new file mode 100644 index 0000000000000000000000000000000000000000..ae4f93eca5baac10d404cd0bb39429f835c4ac41 --- /dev/null +++ b/meta-openeuler/recipes-connectivity/dhcp/files/dhcpd.service @@ -0,0 +1,15 @@ +[Unit] +Description=DHCPv4 Server Daemon +Documentation=man:dhcpd(8) man:dhcpd.conf(5) +After=network.target +After=time-sync.target + +[Service] +PIDFile=@localstatedir@/run/dhcpd.pid +EnvironmentFile=@SYSCONFDIR@/default/dhcp-server +EnvironmentFile=-@SYSCONFDIR@/sysconfig/dhcp-server +ExecStartPre=@base_bindir@/touch @localstatedir@/lib/dhcp/dhcpd.leases +ExecStart=@SBINDIR@/dhcpd -f -cf @SYSCONFDIR@/dhcp/dhcpd.conf -pf @localstatedir@/run/dhcpd.pid $DHCPDARGS -q $INTERFACES + +[Install] +WantedBy=multi-user.target diff --git a/meta-openeuler/recipes-connectivity/dhcp/files/dhcpd6.service b/meta-openeuler/recipes-connectivity/dhcp/files/dhcpd6.service new file mode 100644 index 0000000000000000000000000000000000000000..52a6224dc2c9990ee49971277054fbf64ba62868 --- /dev/null +++ b/meta-openeuler/recipes-connectivity/dhcp/files/dhcpd6.service @@ -0,0 +1,15 @@ +[Unit] +Description=DHCPv6 Server Daemon +Documentation=man:dhcpd(8) man:dhcpd.conf(5) +After=network.target +After=time-sync.target + +[Service] +PIDFile=@localstatedir@/run/dhcpd6.pid +EnvironmentFile=@SYSCONFDIR@/default/dhcp-server +EnvironmentFile=-@SYSCONFDIR@/sysconfig/dhcpd6 +ExecStartPre=@base_bindir@/touch @localstatedir@/lib/dhcp/dhcpd6.leases +ExecStart=@SBINDIR@/dhcpd -f -6 -cf @SYSCONFDIR@/dhcp/dhcpd6.conf -pf @localstatedir@/run/dhcpd6.pid $DHCPDARGS -q $INTERFACES + +[Install] +WantedBy=multi-user.target diff --git a/meta-openeuler/recipes-connectivity/dhcp/files/dhcrelay.service b/meta-openeuler/recipes-connectivity/dhcp/files/dhcrelay.service new file mode 100644 index 0000000000000000000000000000000000000000..15ff927d34642dda69a9dfe9d156aecc04f37d78 --- /dev/null +++ b/meta-openeuler/recipes-connectivity/dhcp/files/dhcrelay.service @@ -0,0 +1,10 @@ +[Unit] +Description=DHCP Relay Agent Daemon +After=network.target + +[Service] +EnvironmentFile=@SYSCONFDIR@/default/dhcp-relay +ExecStart=@SBINDIR@/dhcrelay -d --no-pid -q $SERVERS + +[Install] +WantedBy=multi-user.target diff --git a/meta-openeuler/recipes-connectivity/dhcp/files/init-relay b/meta-openeuler/recipes-connectivity/dhcp/files/init-relay new file mode 100644 index 0000000000000000000000000000000000000000..019a7e84cf477aa878f93b878583960207781078 --- /dev/null +++ b/meta-openeuler/recipes-connectivity/dhcp/files/init-relay @@ -0,0 +1,44 @@ +#!/bin/sh +# +# $Id: dhcp3-relay,v 1.1 2004/04/16 15:41:08 ml Exp $ +# + +# It is not safe to start if we don't have a default configuration... +if [ ! -f /etc/default/dhcp-relay ]; then + echo "/etc/default/dhcp-relay does not exist! - Aborting..." + echo "create this file to fix the problem." + exit 1 +fi + +# Read init script configuration (interfaces the daemon should listen on +# and the DHCP server we should forward requests to.) +. /etc/default/dhcp-relay + +# Build command line for interfaces (will be passed to dhrelay below.) +IFCMD="" +if test "$INTERFACES" != ""; then + for I in $INTERFACES; do + IFCMD=${IFCMD}"-i "${I}" " + done +fi + +DHCRELAYPID=/var/run/dhcrelay.pid + +case "$1" in + start) + start-stop-daemon -S -x /usr/sbin/dhcrelay -- -q $OPTIONS $IFCMD $SERVERS + ;; + stop) + start-stop-daemon -K -x /usr/sbin/dhcrelay + ;; + restart | force-reload) + $0 stop + sleep 2 + $0 start + ;; + *) + echo "Usage: /etc/init.d/dhcp-relay {start|stop|restart|force-reload}" + exit 1 +esac + +exit 0 diff --git a/meta-openeuler/recipes-core/dhcp/dhcp/init-server b/meta-openeuler/recipes-connectivity/dhcp/files/init-server similarity index 100% rename from meta-openeuler/recipes-core/dhcp/dhcp/init-server rename to meta-openeuler/recipes-connectivity/dhcp/files/init-server diff --git a/meta-openeuler/recipes-connectivity/iproute2/iproute2_%.bbappend b/meta-openeuler/recipes-connectivity/iproute2/iproute2_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..00cfa20548910318752636bb03982dbbc3a96baa --- /dev/null +++ b/meta-openeuler/recipes-connectivity/iproute2/iproute2_%.bbappend @@ -0,0 +1,9 @@ +PV = "5.15.0" +OPENEULER_REPO_NAME = "iproute" + +SRC_URI += " \ + file://bugfix-iproute2-3.10.0-fix-maddr-show.patch \ + file://bugfix-iproute2-change-proc-to-ipnetnsproc-which-is-private.patch \ +" + +SRC_URI[sha256sum] = "56d7dcb05b564c94cf6e4549cec2f93f2dc58085355c08dcb2a8f8249c946080" diff --git a/meta-openeuler/recipes-connectivity/libpcap/libpcap_%.bbappend b/meta-openeuler/recipes-connectivity/libpcap/libpcap_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..66113a14a4a7f9fa225501048829d616de2edae2 --- /dev/null +++ b/meta-openeuler/recipes-connectivity/libpcap/libpcap_%.bbappend @@ -0,0 +1,7 @@ +# main bb file: yocto-poky/meta/recipes-connectivity/libpcap/libpcap_1.10.0.bb + +# version in openEuler +PV = "1.10.1" + +SRC_URI[md5sum] = "28e17495004036567c2cc884b51eba45" +SRC_URI[sha256sum] = "ed285f4accaf05344f90975757b3dbfe772ba41d1c401c2648b7fa45b711bdd4" \ No newline at end of file diff --git a/meta-openeuler/recipes-connectivity/libuv/libuv_%.bbappend b/meta-openeuler/recipes-connectivity/libuv/libuv_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..b10566b9112e9ef1ecf182325f0876d8d32aae6f --- /dev/null +++ b/meta-openeuler/recipes-connectivity/libuv/libuv_%.bbappend @@ -0,0 +1,12 @@ +# main bb file: yocto-poky/meta/recipes-connectivity/libuv/libuv_1.41.0.bb + +# version in openEuler +PV = "1.42.0" + +SRC_URI_remove = "git://github.com/libuv/libuv;branch=v1.x" + +# apply openEuler source package +SRC_URI_prepend = "file://${BPN}-v${PV}.tar.gz \ +" + +S = "${WORKDIR}/${BPN}-v${PV}" diff --git a/meta-openeuler/recipes-connectivity/libwebsockets/libwebsockets_%.bbappend b/meta-openeuler/recipes-connectivity/libwebsockets/libwebsockets_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..f98e8c26347ac371c5b7ff798d9b495c669bfc2c --- /dev/null +++ b/meta-openeuler/recipes-connectivity/libwebsockets/libwebsockets_%.bbappend @@ -0,0 +1,23 @@ +# source bb: meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.1.6.bb;branch=hardknott + +PV = "4.3.0" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=382bfdf329e774859fd401eaf850d29b" + +SRC_URI_remove = "git://github.com/warmcat/libwebsockets.git;protocol=https;branch=v4.1-stable" + +# apply openeuler source and patch +SRC_URI_prepend = "file://${BP}.tar.gz \ + file://0001-add-secure-compile-option-in-Makefile.patch \ + file://0002-solve-the-BEP-problem.patch \ + file://0003-route-extend-lws_route_uidx_t-from-1-byte-to-2-bytes.patch \ +" + +S = "${WORKDIR}/${BP}" + +SRC_URI[md5sum] = "0f82cf061d50d4a2492c32aa149cd930" +SRC_URI[sha256sum] = "e6693ab5aa925930b2c6471129b42a79b8f3cbbc493e5f8b89311cecc0c99bc0" + +# no libwebsockets-test-server +EXTRA_OECMAKE_append = " \ + -DLWS_WITHOUT_TEST_SERVER=ON" diff --git a/meta-openeuler/recipes-connectivity/libwebsockets/libwebsockets_4.1.6.bb b/meta-openeuler/recipes-connectivity/libwebsockets/libwebsockets_4.1.6.bb new file mode 100644 index 0000000000000000000000000000000000000000..87f24fd969416a6d69fb99f57bf8894126ebb7fc --- /dev/null +++ b/meta-openeuler/recipes-connectivity/libwebsockets/libwebsockets_4.1.6.bb @@ -0,0 +1,43 @@ +SUMMARY = "Canonical libwebsockets.org websocket library" +HOMEPAGE = "https://libwebsockets.org/" +LICENSE = "MIT & Zlib & BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=8c47b078124308a4e1354e8d59f606b7" + +DEPENDS = "zlib" + +S = "${WORKDIR}/git" +SRCREV = "736f0739ed8c75db0e29c7678b5a9194e957c347" +SRC_URI = "git://github.com/warmcat/libwebsockets.git;protocol=https;branch=v4.1-stable" + +UPSTREAM_CHECK_URI = "https://github.com/warmcat/${BPN}/releases" +UPSTREAM_CHECK_GITTAGREGEX = "v(?P\d+(\.\d+)+)" + +inherit cmake pkgconfig + +PACKAGECONFIG ?= "libuv client server http2 ssl" +PACKAGECONFIG[client] = "-DLWS_WITHOUT_CLIENT=OFF,-DLWS_WITHOUT_CLIENT=ON," +PACKAGECONFIG[http2] = "-DLWS_WITH_HTTP2=ON,-DLWS_WITH_HTTP2=OFF," +PACKAGECONFIG[ipv6] = "-DLWS_IPV6=ON,-DLWS_IPV6=OFF," +PACKAGECONFIG[libevent] = "-DLWS_WITH_LIBEVENT=ON,-DLWS_WITH_LIBEVENT=OFF,libevent" +PACKAGECONFIG[libev] = "-DLWS_WITH_LIBEV=ON,-DLWS_WITH_LIBEV=OFF,libev" +PACKAGECONFIG[libuv] = "-DLWS_WITH_LIBUV=ON,-DLWS_WITH_LIBUV=OFF,libuv" +PACKAGECONFIG[server] = "-DLWS_WITHOUT_SERVER=OFF,-DLWS_WITHOUT_SERVER=ON," +PACKAGECONFIG[ssl] = "-DLWS_WITH_SSL=ON,-DLWS_WITH_SSL=OFF,openssl" +PACKAGECONFIG[static] = "-DLWS_WITH_STATIC=ON,-DLWS_WITH_STATIC=OFF -DLWS_LINK_TESTAPPS_DYNAMIC=ON," + +EXTRA_OECMAKE += " \ + -DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \ +" + +PACKAGES =+ "${PN}-testapps ${PN}-evlib-event ${PN}-evlib-uv ${PN}-evlib-ev" + +FILES_${PN}-testapps += "${datadir}/libwebsockets-test-server/* ${bindir}/libwebsockets-test-*" +FILES_${PN}-evlib-event += "${libdir}/libwebsockets-evlib_event.so" +FILES_${PN}-evlib-uv += "${libdir}/libwebsockets-evlib_uv.so" +FILES_${PN}-evlib-ev += "${libdir}/libwebsockets-evlib_ev.so" + +RDEPENDS_${PN} += " ${@bb.utils.contains('PACKAGECONFIG', 'libevent', '${PN}-evlib-event', '', d)}" +RDEPENDS_${PN} += " ${@bb.utils.contains('PACKAGECONFIG', 'libuv', '${PN}-evlib-uv', '', d)}" +RDEPENDS_${PN} += " ${@bb.utils.contains('PACKAGECONFIG', 'libev', '${PN}-evlib-ev', '', d)}" + +RDEPENDS_${PN}-dev += " ${@bb.utils.contains('PACKAGECONFIG', 'static', '${PN}-staticdev', '', d)}" \ No newline at end of file diff --git a/meta-openeuler/recipes-connectivity/nfs-utils/nfs-utils_%.bbappend b/meta-openeuler/recipes-connectivity/nfs-utils/nfs-utils_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..583339f17ac8b74c140f1477e5effc8b296e5dd8 --- /dev/null +++ b/meta-openeuler/recipes-connectivity/nfs-utils/nfs-utils_%.bbappend @@ -0,0 +1,19 @@ +PV = "2.5.4" + +# apply patches in openeuler +SRC_URI_prepend = "file://0000-systemd-idmapd-require-rpc-pipefs.patch \ + file://0001-correct-the-statd-path-in-man.patch \ + file://0002-nfs-utils-set-use-gss-proxy-1-to-enable-gss-proxy-by.patch \ + file://0003-idmapd-Fix-error-status-when-nfs-idmapd-exits.patch \ + file://0004-fix-coredump-in-bl_add_disk.patch \ +" + +# not support tcp-wrappers currently +PACKAGECONFIG_remove = "tcp-wrappers" + +SRC_URI[sha256sum] = "51997d94e4c8bcef5456dd36a9ccc38e231207c4e9b6a9a2c108841e6aebe3dd" + +# nfs-utils-stats has a collection of python scripts +# remove the dependcy of python3-core to simplify the build +# when python3 support becomes mature, remove the following code +RDEPENDS_${PN}-stats = "" diff --git a/meta-openeuler/recipes-connectivity/openssh/openssh_%.bbappend b/meta-openeuler/recipes-connectivity/openssh/openssh_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..db32c9293bb939215d5980520713550dcf7fc86b --- /dev/null +++ b/meta-openeuler/recipes-connectivity/openssh/openssh_%.bbappend @@ -0,0 +1,52 @@ +# version in openEuler +PV = "8.8p1" + +# apply openEuler source package +SRC_URI_remove = "http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz \ +" + +SRC_URI_prepend = "file://openssh/openssh-${PV}.tar.gz \ +" + +# patches in openEuler +SRC_URI += "\ +file://openssh/feature-openssh-7.4-hima-sftpserver-oom-and-fix.patch \ +file://openssh/backport-openssh-8.2p1-visibility.patch \ +file://openssh/backport-openssh-8.0p1-keygen-strip-doseol.patch \ +file://openssh/backport-openssh-7.7p1.patch \ +file://openssh/backport-openssh-5.1p1-askpass-progress.patch \ +file://openssh/bugfix-openssh-fix-sftpserver.patch \ +file://openssh/backport-openssh-7.8p1-scp-ipv6.patch \ +file://openssh/backport-openssh-6.6p1-force_krb.patch \ +file://openssh/backport-openssh-8.0p1-pkcs11-uri.patch \ +file://openssh/backport-fix-possible-NULL-deref-when-built-without-FIDO.patch \ +file://openssh/backport-openssh-7.6p1-audit.patch \ +file://openssh/backport-openssh-8.7p1-scp-kill-switch.patch \ +file://openssh/backport-openssh-7.5p1-sandbox.patch \ +file://openssh/backport-openssh-8.2p1-x11-without-ipv6.patch \ +file://openssh/backport-openssh-7.8p1-role-mls.patch \ +file://openssh/backport-openssh-4.3p2-askpass-grab-info.patch \ +file://openssh/backport-openssh-7.4p1-systemd.patch \ +file://openssh/backport-openssh-6.7p1-sftp-force-permission.patch \ +file://openssh/backport-openssh-6.8p1-sshdT-output.patch \ +file://openssh/backport-openssh-8.0p1-openssl-evp.patch \ +file://openssh/backport-openssh-5.8p2-sigpipe.patch \ +file://openssh/backport-openssh-8.0p1-preserve-pam-errors.patch \ +file://openssh/backport-openssh-7.8p1-UsePAM-warning.patch \ +file://openssh/backport-openssh-6.3p1-ctr-evp-fast.patch \ +file://openssh/backport-openssh-6.4p1-fromto-remote.patch \ +file://openssh/backport-openssh-7.1p2-audit-race-condition.patch \ +file://openssh/bugfix-openssh-6.6p1-log-usepam-no.patch \ +file://openssh/backport-openssh-6.6p1-keyperm.patch \ +file://openssh/backport-openssh-7.2p2-s390-closefrom.patch \ +file://openssh/backport-openssh-6.6.1p1-scp-non-existing-directory.patch \ +file://openssh/backport-openssh-7.3p1-x11-max-displays.patch \ +file://openssh/backport-openssh-8.0p1-openssl-kdf.patch \ +file://openssh/backport-openssh-6.6p1-allow-ip-opts.patch \ +file://openssh/bugfix-sftp-when-parse_user_host_path-empty-path-should-be-allowed.patch \ +file://openssh/backport-openssh-5.9p1-ipv6man.patch \ +" + +# checksum changed +SRC_URI[sha256sum] = "4590890ea9bb9ace4f71ae331785a3a5823232435161960ed5fc86588f331fe9" + diff --git a/meta-openeuler/recipes-connectivity/openssl/openssl_%.bbappend b/meta-openeuler/recipes-connectivity/openssl/openssl_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..b07a94c392812a8b1f98fa721a281456558806f1 --- /dev/null +++ b/meta-openeuler/recipes-connectivity/openssl/openssl_%.bbappend @@ -0,0 +1,23 @@ +# main bb file: yocto-poky/meta/recipes-connectivity/openssl/openssl_1.1.1k.bb + +# openEuler version +PV = "1.1.1m" + +# patches in openEuler +SRC_URI += "\ + file://openssl/openssl-1.1.1-build.patch \ + file://openssl/openssl-1.1.1-fips.patch \ + file://0003-Add-support-for-io_pgetevents_time64-syscall.patch \ + file://0004-Fixup-support-for-io_pgetevents_time64-syscall.patch \ + file://backport-Fix-NULL-pointer-dereference-for-BN_mod_exp2_mont.patch \ + file://CVE-2022-0778-Add-a-negative-testcase-for-BN_mod_sqrt.patch \ + file://CVE-2022-0778-Fix-possible-infinite-loop-in-BN_mod_sqrt.patch \ + file://CVE-2022-1292.patch \ + file://CVE-2022-2068-Fix-file-operations-in-c_rehash.patch \ + file://CVE-2022-2097-Fix-AES-OCB-encrypt-decrypt-for-x86-AES-NI.patch \ +" + +SRC_URI[sha256sum] = "f89199be8b23ca45fc7cb9f1d8d3ee67312318286ad030f5316aca6462db6c96" + +# if PACKAGECONFIG variant has perl, add perl RDEPENS +RDEPENDS_${PN}-misc = "${@bb.utils.contains('PACKAGECONFIG', 'perl', 'perl', '', d)}" diff --git a/meta-openeuler/recipes-connectivity/wpa-supplicant/wpa-supplicant_%.bbappend b/meta-openeuler/recipes-connectivity/wpa-supplicant/wpa-supplicant_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..637613011b347d85c5ecc87ad3f42ad2b3fad1cd --- /dev/null +++ b/meta-openeuler/recipes-connectivity/wpa-supplicant/wpa-supplicant_%.bbappend @@ -0,0 +1,22 @@ +# version in openEuler +PV = "2.10" + +# apply source package in openeuler +SRC_URI_remove = "http://w1.fi/releases/wpa_supplicant-${PV}.tar.gz \ +file://0001-replace-systemd-install-Alias-with-WantedBy.patch \ +file://0001-AP-Silently-ignore-management-frame-from-unexpected-.patch \ +file://0001-WPS-UPnP-Do-not-allow-event-subscriptions-with-URLs-.patch \ +file://0002-WPS-UPnP-Fix-event-message-generation-using-a-long-U.patch \ +file://0003-WPS-UPnP-Handle-HTTP-initiation-failures-for-events-.patch \ +file://CVE-2021-0326.patch \ +file://CVE-2021-27803.patch \ +file://CVE-2021-30004.patch \ +" + +SRC_URI_prepend = "file://wpa_supplicant/wpa_supplicant-${PV}.tar.gz \ +" + +# checksum changed +LIC_FILES_CHKSUM = "file://COPYING;md5=5ebcb90236d1ad640558c3d3cd3035df \ + file://README;beginline=1;endline=56;md5=e3d2f6c2948991e37c1ca4960de84747 \ + file://wpa_supplicant/wpa_supplicant.c;beginline=1;endline=12;md5=76306a95306fee9a976b0ac1be70f705" diff --git a/meta-openeuler/recipes-core/attr/attr.inc b/meta-openeuler/recipes-core/attr/attr.inc deleted file mode 100644 index 134710da259b0f6a6bd0f809ac8036f25ac40bc1..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/attr/attr.inc +++ /dev/null @@ -1,68 +0,0 @@ -SUMMARY = "Utilities for manipulating filesystem extended attributes" -DESCRIPTION = "Implement the ability for a user to attach name:value pairs to objects within the XFS filesystem." - -HOMEPAGE = "http://savannah.nongnu.org/projects/attr/" -SECTION = "libs" - -DEPENDS = "virtual/libintl" - -LICENSE = "LGPLv2.1+ & GPLv2+" -LICENSE_${PN} = "GPLv2+" -LICENSE_lib${BPN} = "LGPLv2.1+" -LIC_FILES_CHKSUM = "file://doc/COPYING;md5=2d0aa14b3fce4694e4f615e30186335f \ - file://doc/COPYING.LGPL;md5=b8d31f339300bc239d73461d68e77b9c \ - file://tools/attr.c;endline=17;md5=be0403261f0847e5f43ed5b08d19593c \ - file://libattr/libattr.c;endline=17;md5=7970f77049f8fa1199fff62a7ab724fb" - -SRC_URI = "file://attr/attr-${PV}.tar.gz \ - file://attr/0001-bypass-wrong-output-when-enabled-selinux.patch \ - file://attr/0002-dont-skip-security.evm-when-copy-xattr.patch \ - file://run-ptest \ -" - -#inherit ptest update-alternatives autotools gettext -inherit autotools gettext ptest - -PACKAGES =+ "lib${BPN}" - -FILES_lib${BPN} = "${libdir}/lib*${SOLIBS}" - -ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE_${PN} = "setfattr" -ALTERNATIVE_TARGET[setfattr] = "${bindir}/setfattr" - -PTEST_BUILD_HOST_FILES = "builddefs" -PTEST_BUILD_HOST_PATTERN = "^RPM" - -do_install_ptest() { - cp ${B}/Makefile ${D}${PTEST_PATH} - sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ - -e 's|${DEBUG_PREFIX_MAP}||g' \ - -e 's:${HOSTTOOLS_DIR}/::g' \ - -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ - -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ - -i ${D}${PTEST_PATH}/Makefile - - sed -i "s|^srcdir =.*|srcdir = \.|g" ${D}${PTEST_PATH}/Makefile - sed -i "s|^abs_srcdir =.*|abs_srcdir = \.|g" ${D}${PTEST_PATH}/Makefile - sed -i "s|^abs_top_srcdir =.*|abs_top_srcdir = \.\.|g" ${D}${PTEST_PATH}/Makefile - sed -i "s|^Makefile:.*|Makefile:|g" ${D}${PTEST_PATH}/Makefile - cp -rf ${S}/build-aux/ ${D}${PTEST_PATH} - cp -rf ${S}/test/ ${D}${PTEST_PATH} -} - -RDEPENDS_${PN}-ptest = "attr \ - coreutils \ - perl-module-filehandle \ - perl-module-getopt-std \ - perl-module-posix \ - make \ - perl \ - gawk \ - perl-module-cwd \ - perl-module-file-basename \ - perl-module-file-path \ - perl-module-file-spec \ - " - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-core/attr/attr/run-ptest b/meta-openeuler/recipes-core/attr/attr/run-ptest deleted file mode 100644 index f64244f239390dd9a3c3e257ca1523c1a2efbf80..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/attr/attr/run-ptest +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -make test-suite.log diff --git a/meta-openeuler/recipes-core/attr/attr_2.5.1.bb b/meta-openeuler/recipes-core/attr/attr_2.5.1.bb deleted file mode 100644 index 5c5f7bcffb4e40af3fde0f84e7eecb68647fb539..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/attr/attr_2.5.1.bb +++ /dev/null @@ -1,5 +0,0 @@ -require attr.inc - -SRC_URI[sha256sum] = "bae1c6949b258a0d68001367ce0c741cebdacdd3b62965d17e5eb23cd78adaf8" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-core/audit/audit_3.0.1.bb b/meta-openeuler/recipes-core/audit/audit_3.0.1.bb index 5bcc11f4e1a4655daf2c94fe406de377b2973863..4a1029d7f8c4c5819eeb708f0059977e827245b7 100644 --- a/meta-openeuler/recipes-core/audit/audit_3.0.1.bb +++ b/meta-openeuler/recipes-core/audit/audit_3.0.1.bb @@ -7,7 +7,7 @@ SECTION = "base" LICENSE = "GPLv2+ & LGPLv2+" #inherit autotools python3native update-rc.d systemd -inherit autotools +inherit autotools update-rc.d systemd LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" SRC_URI = "file://audit/${BP}.tar.gz \ diff --git a/meta-openeuler/recipes-core/base-passwd/base-passwd_%.bbappend b/meta-openeuler/recipes-core/base-passwd/base-passwd_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..bed4e426791136b77f6e759510061da5d28d4fdb --- /dev/null +++ b/meta-openeuler/recipes-core/base-passwd/base-passwd_%.bbappend @@ -0,0 +1,28 @@ +# get extra config files from openeuler +FILESEXTRAPATHS_append := "${THISDIR}/files/:" + +# as it's small, base-passwd's tar.gz is integrated in openEuler Embedded +# to avoid network download +SRC_URI = "file://${BPN}_${PV}.tar.gz \ + file://add_shutdown.patch \ + file://nobash.patch \ + file://noshadow.patch \ + file://input.patch \ + file://disable-docs.patch \ + file://kvm.patch \ + " + +# a workaround to fix the error ”useradd: /var/run/passwd: No such file or directory“ +# it's casued by shadow-native where the patch "0002-Allow-for-setting-password-in-clear-text" +# cannot be applie, because openeuler's shadow version is 4.9, and the patch is suitable for +# 4.8.1. In future, this issue can be fixed through upgrade of poky(3.3.2) + +do_install_append() { + install -d -m 755 ${D}${localstatedir}/run +} + +SYSROOT_DIRS += "${localstatedir}" + +PACKAGES =+ "${PN}-var" + +FILES_${PN}-var = "/run ${localstatedir}/run" diff --git a/meta-openeuler/recipes-core/base-passwd/files/base-passwd_3.5.29.tar.gz b/meta-openeuler/recipes-core/base-passwd/files/base-passwd_3.5.29.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..0113f479bc938c50710befaaf961d268431aef3d Binary files /dev/null and b/meta-openeuler/recipes-core/base-passwd/files/base-passwd_3.5.29.tar.gz differ diff --git a/meta-openeuler/recipes-core/busybox/busybox_%.bbappend b/meta-openeuler/recipes-core/busybox/busybox_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..48785d0c0112e82a91b7af2363b0e64c6ab0db27 --- /dev/null +++ b/meta-openeuler/recipes-core/busybox/busybox_%.bbappend @@ -0,0 +1,32 @@ +PV = "1.34.1" + +DL_DIR = "${OPENEULER_SP_DIR}/${BPN}" + +# files, patches can't be applied in openeuler or conflict with openeuler +SRC_URI_remove = " \ + file://busybox-udhcpc-no_deconfig.patch \ + file://0001-testsuite-check-uudecode-before-using-it.patch \ + file://0001-gen_build_files-Use-C-locale-when-calling-sed-on-glo.patch \ + file://0001-awk-fix-CVEs.patch \ + file://0002-man-fix-segfault-in-man-1.patch \ + " + +#we always want busybox with mdev\init packages to support multi init manager +SRC_URI_append = " \ + file://init.cfg \ + file://rcS.default \ + file://mdev.cfg \ + " +do_install_append () { + if grep -q "CONFIG_INIT=y" ${B}/.config ; then + install -D -m 0755 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d/rcS + install -D -m 0755 ${WORKDIR}/rcK ${D}${sysconfdir}/init.d/rcK + install -D -m 0755 ${WORKDIR}/rcS.default ${D}${sysconfdir}/default/rcS + fi +} + +# files, patches that come from openeuler +SRC_URI += "" + +SRC_URI[tarball.sha256sum] = "415fbd89e5344c96acf449d94a6f956dbed62e18e835fc83e064db33a34bd549" + diff --git a/meta-openeuler/recipes-core/busybox/busybox_1.34.1.bb b/meta-openeuler/recipes-core/busybox/busybox_1.34.1.bb deleted file mode 100644 index 363f74320a814a74bc6e30c6724eedf4bf39091a..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/busybox/busybox_1.34.1.bb +++ /dev/null @@ -1,113 +0,0 @@ -SUMMARY = "Tiny versions of many common UNIX utilities in a single small executable" -DESCRIPTION = "BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides minimalist replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc. The utilities in BusyBox generally have fewer options than their full-featured GNU cousins; however, the options that are included provide the expected functionality and behave very much like their GNU counterparts. BusyBox provides a fairly complete POSIX environment for any small or embedded system." -HOMEPAGE = "https://www.busybox.net" -BUGTRACKER = "https://bugs.busybox.net/" -SECTION = "base" - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" - -INHIBIT_DEFAULT_DEPS = "1" -PR = "r1" - -DEPENDS += "virtual/libc virtual/${TARGET_PREFIX}gcc virtual/crypt" -DEPENDS += "libtirpc" -CFLAGS += "-I${STAGING_INCDIR}/tirpc" -#get arch info -inherit kernel-arch - -SRC_URI = "file://busybox/${BP}.tar.bz2 \ - file://yocto-embedded-tools/config/arm64/defconfig-busybox \ -" - -S = "${WORKDIR}/${BP}" - -#not split debug files with dwarfsrcfiles,no dwarfsrcfiles -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" - - -export EXTRA_CFLAGS = "${CFLAGS}" -export EXTRA_LDFLAGS = "${LDFLAGS}" - -EXTRA_OEMAKE = "CC='${CC}' V=1 ARCH=${ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y HOSTCC='${BUILD_CC}' HOSTCPP='${BUILD_CPP}'" -#use host pkg-config add by openeuler -EXTRA_OECONF += "PKG_CONFIG=pkg-config" -EXTRA_OEMAKE += "PKG_CONFIG=pkg-config" - -PACKAGES =+ "${PN}-linuxrc ${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock \ - ${PN}-less ${PN}-sed ${PN}-pciutils ${PN}-grep ${PN}-cronie ${PN}-gzip ${PN}-kmod ${PN}-procps \ -" -FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www" -FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${sysconfdir}/syslog.conf* ${systemd_unitdir}/system/syslog.service ${sysconfdir}/default/busybox-syslog" -FILES_${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf ${sysconfdir}/mdev/*" -FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd" -FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc" -FILES_${PN}-hwclock = "${sysconfdir}/init.d/hwclock.sh" -FILES_${PN}-linuxrc = "/linuxrc /init" -PACKAGES =+ "${PN}-bash ${PN}-login ${PN}-groups" -FILES_${PN}-bash = "${base_bindir}/bash" -FILES_${PN}-login = "${base_bindir}/login" -FILES_${PN}-groups = "${bindir}/groups" -FILES_${PN}-less = "${bindir}/less" -FILES_${PN}-sed="${base_bindir}/sed" -FILES_${PN}-pciutils="${bindir}/lspci" -FILES_${PN}-grep="${base_bindir}/*grep" -FILES_${PN}-cronie="${bindir}/crontab ${sbindir}/crond" -FILES_${PN}-gzip="${base_bindir}/gunzip ${base_bindir}/gzip ${base_bindir}/zcat" -FILES_${PN}-kmod="${base_sbindir}/mod* ${base_sbindir}/depmod ${base_sbindir}/insmod ${base_sbindir}/rmmod" -FILES_${PN}-procps = "${base_bindir}/kill ${base_bindir}/ps ${base_bindir}/pidof ${base_sbindir}/sysctl \ - ${bindir}/free ${bindir}/pkill ${bindir}/top ${bindir}/uptime \ -" - -RDEPENDS_${PN}-syslog = "busybox" -CONFFILES_${PN}-syslog = "${sysconfdir}/syslog-startup.conf" -RCONFLICTS_${PN}-syslog = "rsyslog sysklogd syslog-ng" - -CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf" - -RRECOMMENDS_${PN} = "${PN}-udhcpc" - - -do_configure() { - cp ../yocto-embedded-tools/config/arm64/defconfig-busybox .config - set +e - grep -E '^CONFIG_FEATURE_MOUNT_NFS=y|^CONFIG_FEATURE_INETD_RPC=y' .config - ret=$? - if [ $ret -eq 0 ]; then - grep -E '^CONFIG_EXTRA_CFLAGS=".*-I/usr/include/tirpc|^CONFIG_EXTRA_LDLIBS=".*tirpc' .config - ret=$? - if [ $ret -ne 0 ]; then - sed -i 's/^CONFIG_EXTRA_CFLAGS="/CONFIG_EXTRA_CFLAGS="-I\/usr\/include\/tirpc /g' .config - sed -i 's/^CONFIG_EXTRA_LDLIBS="/CONFIG_EXTRA_LDLIBS="tirpc /g' .config - fi - fi - set -e - yes '' | oe_runmake oldconfig -} - -do_compile () { - export KCONFIG_NOTIMESTAMP=1 - if [ -e .config.orig ]; then - # Need to guard again an interrupted do_compile - restore any backup - cp .config.orig .config - fi - cp .config .config.orig - - for s in suid nosuid; do - oe_runmake busybox_unstripped - mv busybox_unstripped busybox.$s - oe_runmake busybox.links - sort busybox.links > busybox.links.$s - rm busybox.links - done - cp .config.orig .config -} - -do_install () { - oe_runmake CONFIG_PREFIX="${D}" install - pushd "${D}" - ln -s bin/busybox init - popd -} - -INSANE_SKIP += "already-stripped" diff --git a/meta-openeuler/recipes-core/bzip2/bzip2/Makefile.am b/meta-openeuler/recipes-core/bzip2/bzip2/Makefile.am deleted file mode 100644 index 7338df03ebe74d5cf47dc67b627fe8bbcf3021cc..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/bzip2/bzip2/Makefile.am +++ /dev/null @@ -1,74 +0,0 @@ - -lib_LTLIBRARIES = libbz2.la -libbz2_la_LDFLAGS = -version-info 1:6:0 - -libbz2_la_SOURCES = blocksort.c \ - huffman.c \ - crctable.c \ - randtable.c \ - compress.c \ - decompress.c \ - bzlib.c - -bin_PROGRAMS = bzip2 bzip2recover - -bzip2_SOURCES = bzip2.c -bzip2_LDADD = libbz2.la -bzip2_DEPENDENCIES = libbz2.la - -include_HEADERS = bzlib.h - -bzip2recover_SOURCES = bzip2recover.c -bzip2recover_LDADD = libbz2.la -bzip2recover_DEPENDENCIES = libbz2.la - -bin_SCRIPTS = bzgrep bzmore bzdiff - -man_MANS = bzip2.1 bzgrep.1 bzmore.1 bzdiff.1 -EXTRA_DIST = $(man_MANS) - -runtest: - ./bzip2 -1 < sample1.ref > sample1.rb2 - ./bzip2 -2 < sample2.ref > sample2.rb2 - ./bzip2 -3 < sample3.ref > sample3.rb2 - ./bzip2 -d < sample1.bz2 > sample1.tst - ./bzip2 -d < sample2.bz2 > sample2.tst - ./bzip2 -ds < sample3.bz2 > sample3.tst - @if cmp sample1.bz2 sample1.rb2; then echo "PASS: sample1 compress";\ - else echo "FAIL: sample1 compress"; fi - @if cmp sample2.bz2 sample2.rb2; then echo "PASS: sample2 compress";\ - else echo "FAIL: sample2 compress"; fi - @if cmp sample3.bz2 sample3.rb2; then echo "PASS: sample3 compress";\ - else echo "FAIL: sample3 compress"; fi - @if cmp sample1.tst sample1.ref; then echo "PASS: sample1 decompress";\ - else echo "FAIL: sample1 decompress"; fi - @if cmp sample2.tst sample2.ref; then echo "PASS: sample2 decompress";\ - else echo "FAIL: sample2 decompress"; fi - @if cmp sample3.tst sample3.ref; then echo "PASS: sample3 decompress";\ - else echo "FAIL: sample3 decompress"; fi - ./bzip2-tests/run-tests.sh --without-valgrind --tests-dir="$(PWD)/bzip2-tests" - -install-ptest: - sed -n '/^runtest:/,/^install-ptest:/{/^install-ptest:/!p}' \ - $(srcdir)/Makefile.am > $(DESTDIR)/Makefile - cp $(srcdir)/sample1.ref $(DESTDIR)/ - cp $(srcdir)/sample2.ref $(DESTDIR)/ - cp $(srcdir)/sample3.ref $(DESTDIR)/ - cp $(srcdir)/sample1.bz2 $(DESTDIR)/ - cp $(srcdir)/sample2.bz2 $(DESTDIR)/ - cp $(srcdir)/sample3.bz2 $(DESTDIR)/ - ln -s $(bindir)/bzip2 $(DESTDIR)/bzip2 - -install-exec-hook: - ln -s $(bindir)/bzip2$(EXEEXT) $(DESTDIR)$(bindir)/bunzip2$(EXEEXT) - ln -s $(bindir)/bzip2$(EXEEXT) $(DESTDIR)$(bindir)/bzcat$(EXEEXT) - ln -s $(bindir)/bzgrep$(EXEEXT) $(DESTDIR)$(bindir)/bzegrep$(EXEEXT) - ln -s $(bindir)/bzgrep$(EXEEXT) $(DESTDIR)$(bindir)/bzfgrep$(EXEEXT) - ln -s $(bindir)/bzmore$(EXEEXT) $(DESTDIR)$(bindir)/bzless$(EXEEXT) - ln -s $(bindir)/bzdiff$(EXEEXT) $(DESTDIR)$(bindir)/bzcmp$(EXEEXT) - -install-data-hook: - echo ".so man1/bzgrep.1" > $(DESTDIR)$(mandir)/man1/bzegrep.1 - echo ".so man1/bzgrep.1" > $(DESTDIR)$(mandir)/man1/bzfgrep.1 - echo ".so man1/bzmore.1" > $(DESTDIR)$(mandir)/man1/bzless.1 - echo ".so man1/bzdiff.1" > $(DESTDIR)$(mandir)/man1/bzcmp.1 diff --git a/meta-openeuler/recipes-core/bzip2/bzip2/configure.ac b/meta-openeuler/recipes-core/bzip2/bzip2/configure.ac deleted file mode 100644 index b8abade2d960fc920bc292b2d4f862a3c74b7c0e..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/bzip2/bzip2/configure.ac +++ /dev/null @@ -1,11 +0,0 @@ -AC_PREREQ([2.57]) - -AC_INIT(bzip2, %BZIP2_VERSION%) -AM_INIT_AUTOMAKE(foreign) -AM_MAINTAINER_MODE - -AC_PROG_CC -AC_PROG_LIBTOOL - -AC_OUTPUT([Makefile]) - diff --git a/meta-openeuler/recipes-core/bzip2/bzip2/run-ptest b/meta-openeuler/recipes-core/bzip2/bzip2/run-ptest deleted file mode 100644 index 3b20fce1ee92d537cd123d33228c3e73c1f38ad7..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/bzip2/bzip2/run-ptest +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -make -k runtest diff --git a/meta-openeuler/recipes-core/bzip2/bzip2_1.0.8.bb b/meta-openeuler/recipes-core/bzip2/bzip2_1.0.8.bb deleted file mode 100644 index 94a75631b157274369ba7d7ed439af08e11413a4..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/bzip2/bzip2_1.0.8.bb +++ /dev/null @@ -1,60 +0,0 @@ -SUMMARY = "Very high-quality data compression program" -DESCRIPTION = "bzip2 compresses files using the Burrows-Wheeler block-sorting text compression algorithm, and \ -Huffman coding. Compression is generally considerably better than that achieved by more conventional \ -LZ77/LZ78-based compressors, and approaches the performance of the PPM family of statistical compressors." -HOMEPAGE = "https://sourceware.org/bzip2/" -SECTION = "console/utils" -LICENSE = "bzip2-1.0.6 & GPLv3+ & Apache-2.0 & MS-PL & BSD-3-Clause & Zlib" -LICENSE_${PN} = "bzip2-1.0.6" -LICENSE_${PN}-dev = "bzip2-1.0.6" -LICENSE_${PN}-dbg = "bzip2-1.0.6" -LICENSE_${PN}-doc = "bzip2-1.0.6" -LICENSE_${PN}-src = "bzip2-1.0.6" -LICENSE_libbz2 = "bzip2-1.0.6" -LICENSE_${PN}-ptest = "bzip2-1.0.6 & GPLv3+ & Apache-2.0 & MS-PL & BSD-3-Clause & Zlib" - -LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;endline=37;md5=600af43c50f1fcb82e32f19b32df4664 \ -" -#git://sourceware.org/git/bzip2-tests.git;name=bzip2-tests - -SRC_URI = "file://bzip2/bzip2-${PV}.tar.gz \ - file://bzip2/0001-add-compile-option.patch \ - file://bzip2/0002-CVE-2019-12900.patch \ - file://configure.ac;subdir=${BP} \ - file://Makefile.am;subdir=${BP} \ - file://run-ptest \ - " -SRC_URI[md5sum] = "67e051268d0c475ea773822f7500d0e5" -SRC_URI[sha256sum] = "ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269" - -SRCREV_bzip2-tests = "f9061c030a25de5b6829e1abf373057309c734c0" - -UPSTREAM_CHECK_URI = "https://www.sourceware.org/pub/bzip2/" - -PACKAGES =+ "libbz2" - -CFLAGS_append = " -fPIC -fpic -Winline -fno-strength-reduce -D_FILE_OFFSET_BITS=64" - -#inherit autotools update-alternatives ptest relative_symlinks -inherit autotools ptest relative_symlinks - -ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE_${PN} = "bunzip2 bzcat bzip2" - -#install binaries to bzip2-native under sysroot for replacement-native -EXTRA_OECONF_append_class-native = " --bindir=${STAGING_BINDIR_NATIVE}/${PN}" - -do_configure_prepend () { - sed -i -e "s|%BZIP2_VERSION%|${PV}|" ${S}/configure.ac -} - -do_install_ptest () { - install -d ${D}${PTEST_PATH}/bzip2-tests - sed -i -e "s|^Makefile:|_Makefile:|" ${D}${PTEST_PATH}/Makefile -} -FILES_libbz2 = "${libdir}/lib*${SOLIBS}" - -RDEPENDS_${PN}-ptest += "make bash" - -PROVIDES_append_class-native = " bzip2-replacement-native" -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-core/clibcni/clibcni_2.0.4.bb b/meta-openeuler/recipes-core/clibcni/clibcni_2.0.4.bb deleted file mode 100644 index 751f711a9d9b399e9bc13af0c9f384608f1ee5aa..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/clibcni/clibcni_2.0.4.bb +++ /dev/null @@ -1,40 +0,0 @@ -DESCRIPTION = "Yet Another JSON Library - A Portable JSON parsing and serialization library in ANSI C" -LICENSE = "MIT" - -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" - -SRC_URI = "file://clibcni/v2.0.4.tar.gz \ - file://clibcni/0001-fix-CNI_ARGS-value-when-there-is-no-args.patch \ - file://clibcni/0002-add-error-info-for-failed-run-cni-plugin.patch \ - " - -S = "${WORKDIR}/${BPN}" - -inherit cmake -OECMAKE_GENERATOR = "Unix Makefiles" - -DEPENDS = "lcr" -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" - - -FILES_${PN} += "${libdir}/libclibcni.so* " - -do_configure_prepend() { - grep -q CMAKE_SYSROOT ${WORKDIR}/toolchain.cmake || cat >> ${WORKDIR}/toolchain.cmake < -diff --git a/pam/crond b/pam/crond -index 560529d..95a6457 100644 ---- a/pam/crond -+++ b/pam/crond -@@ -4,8 +4,8 @@ - # - # Although no PAM authentication is called, auth modules - # are used for credential setting --auth include system-auth -+auth include common-auth - account required pam_access.so --account include system-auth -+account include common-auth - session required pam_loginuid.so --session include system-auth -+session include common-session-noninteractive diff --git a/meta-openeuler/recipes-core/cronie/cronie/crontab b/meta-openeuler/recipes-core/cronie/cronie/crontab deleted file mode 100644 index 22c4feb2dc17951b17ae9ebc3304a5c156bc7e7b..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/cronie/cronie/crontab +++ /dev/null @@ -1,14 +0,0 @@ -# /etc/crontab: system-wide crontab -# Unlike any other crontab you don't have to run the `crontab' -# command to install the new version when you edit this file -# and files in /etc/cron.d. These files also have username fields, -# that none of the other crontabs do. - -SHELL=/bin/sh -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin - -# m h dom mon dow user command -# 1 * * * * root cd / && run-parts /etc/cron.hourly -# 30 7 * * * root cd / && run-parts /etc/cron.daily -# 42 7 * * 7 root cd / && run-parts /etc/cron.weekly -# 55 7 1 * * root cd / && run-parts /etc/cron.monthly diff --git a/meta-openeuler/recipes-core/cronie/cronie_1.5.7.bb b/meta-openeuler/recipes-core/cronie/cronie_1.5.7.bb deleted file mode 100644 index d67dc8b09c49048590f47210c8b666882376a34b..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/cronie/cronie_1.5.7.bb +++ /dev/null @@ -1,83 +0,0 @@ -SUMMARY = "Cron daemon for executing programs at set times" -DESCRIPTION = "Cronie contains the standard UNIX daemon crond that runs \ -specified programs at scheduled times and related tools. It is based on the \ -original cron and has security and configuration enhancements like the \ -ability to use pam and SELinux." -HOMEPAGE = "https://github.com/cronie-crond/cronie/" -BUGTRACKER = "https://bugzilla.redhat.com" - -# Internet Systems Consortium License -LICENSE = "ISC & BSD-3-Clause & BSD-2-Clause & GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=dd2a592170760e1386c769e1043b3722 \ - file://src/cron.c;endline=20;md5=b425c334265026177128353a142633b4 \ - file://src/popen.c;beginline=3;endline=31;md5=edd50742d8def712e9472dba353668a9" - -SECTION = "utils" - -UPSTREAM_CHECK_URI = "https://github.com/cronie-crond/${BPN}/releases/" - -SRC_URI = "file://cronie/${BP}.tar.gz \ - file://cronie/bugfix-cronie-systemd-alias.patch \ - file://crond.init \ - file://crontab \ - file://crond.service \ - ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ -" - -PAM_SRC_URI = "file://crond_pam_config.patch" -PAM_DEPS = "libpam libpam-runtime pam-plugin-access pam-plugin-loginuid" - -SRC_URI[sha256sum] = "538bcfaf2e986e5ae1edf6d1472a77ea8271d6a9005aee2497a9ed6e13320eb3" - -inherit autotools systemd - -PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" - -PACKAGECONFIG[audit] = "--with-audit,--without-audit,audit," -PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,${PAM_DEPS}" -PACKAGECONFIG[anacron] = "--enable-anacron,--disable-anacron,anacron" - -INITSCRIPT_NAME = "crond" -INITSCRIPT_PARAMS = "start 90 2 3 4 5 . stop 60 0 1 6 ." - -USERADD_PACKAGES = "${PN}" -GROUPADD_PARAM_${PN} = "--system crontab" - -SYSTEMD_SERVICE_${PN} = "crond.service" - -do_install_append () { - install -d ${D}${sysconfdir}/sysconfig/ - install -d ${D}${sysconfdir}/init.d/ - install -m 0644 ${S}/crond.sysconfig ${D}${sysconfdir}/sysconfig/crond - install -m 0750 ${WORKDIR}/crond.init ${D}${sysconfdir}/init.d/crond - - # install systemd unit files - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/crond.service ${D}${systemd_unitdir}/system - sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ - -e 's,@SBINDIR@,${sbindir},g' \ - ${D}${systemd_unitdir}/system/crond.service - - # below are necessary for a complete cron environment - install -d ${D}${localstatedir}/spool/cron - install -m 0755 ${WORKDIR}/crontab ${D}${sysconfdir}/ - mkdir -p ${D}${sysconfdir}/cron.d - mkdir -p ${D}${sysconfdir}/cron.hourly - mkdir -p ${D}${sysconfdir}/cron.daily - mkdir -p ${D}${sysconfdir}/cron.weekly - mkdir -p ${D}${sysconfdir}/cron.monthly - touch ${D}${sysconfdir}/cron.deny - - # below setting is necessary to allow normal user using crontab - - # setgid for crontab binary - chmod 2755 ${D}${bindir}/crontab - - # allow 'crontab' group write to /var/spool/cron - chmod 770 ${D}${localstatedir}/spool/cron - - chmod 600 ${D}${sysconfdir}/crontab -} - -FILES_${PN} += "${sysconfdir}/cron*" -CONFFILES_${PN} += "${sysconfdir}/crontab" diff --git a/meta-openeuler/recipes-core/curl/curl_7.79.1.bb b/meta-openeuler/recipes-core/curl/curl_7.79.1.bb deleted file mode 100644 index 5303c9be11ff766bc35cd0cb94d2f1adf60713cb..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/curl/curl_7.79.1.bb +++ /dev/null @@ -1,83 +0,0 @@ -SUMMARY = "Command line tool and library for client-side URL transfers" -HOMEPAGE = "http://curl.haxx.se/" -BUGTRACKER = "http://curl.haxx.se/mail/list.cgi?list=curl-tracker" -SECTION = "console/network" -LICENSE = "MIT" - - -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" - -SRC_URI = "file://curl/${BP}.tar.xz \ - file://curl/backport-0101-curl-7.32.0-multilib.patch \ -" - -S = "${WORKDIR}/${BP}" - -CVE_PRODUCT = "curl libcurl" -inherit autotools - -# Because UI console is removed from vpp's libopenssl, arm64le-preempt-pro does not support OPENSSL UI. - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} proxy ssl threaded-resolver verbose zlib" -PACKAGECONFIG_class-native = "ipv6 proxy ssl threaded-resolver verbose zlib" -PACKAGECONFIG_class-nativesdk = "ipv6 proxy ssl threaded-resolver verbose zlib" - -# 'ares' and 'threaded-resolver' are mutually exclusive -PACKAGECONFIG[ares] = "--enable-ares,--disable-ares,c-ares" -PACKAGECONFIG[brotli] = "--with-brotli,--without-brotli,brotli" -PACKAGECONFIG[builtinmanual] = "--enable-manual,--disable-manual" -PACKAGECONFIG[dict] = "--enable-dict,--disable-dict," -PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls" -PACKAGECONFIG[gopher] = "--enable-gopher,--disable-gopher," -PACKAGECONFIG[imap] = "--enable-imap,--disable-imap," -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," -PACKAGECONFIG[krb5] = "--with-gssapi,--without-gssapi,krb5" -PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap," -PACKAGECONFIG[ldaps] = "--enable-ldaps,--disable-ldaps," -PACKAGECONFIG[libidn] = "--with-libidn2,--without-libidn2,libidn2" -PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2" -PACKAGECONFIG[mbedtls] = "--with-mbedtls=${STAGING_DIR_TARGET},--without-mbedtls,mbedtls" -PACKAGECONFIG[nghttp2] = "--with-nghttp2,--without-nghttp2,nghttp2" -PACKAGECONFIG[pop3] = "--enable-pop3,--disable-pop3," -PACKAGECONFIG[proxy] = "--enable-proxy,--disable-proxy," -PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump" -PACKAGECONFIG[rtsp] = "--enable-rtsp,--disable-rtsp," -PACKAGECONFIG[smb] = "--enable-smb,--disable-smb," -PACKAGECONFIG[smtp] = "--enable-smtp,--disable-smtp," -PACKAGECONFIG[ssl] = "--with-ssl --with-random=/dev/urandom,--without-ssl,openssl" -PACKAGECONFIG[nss] = "--with-nss,--without-nss,nss" -PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet," -PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp," -PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,--disable-threaded-resolver" -PACKAGECONFIG[verbose] = "--enable-verbose,--disable-verbose" -PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib" - -EXTRA_OECONF = " \ - --disable-libcurl-option \ - --disable-ntlm-wb \ - --enable-crypto-auth \ - --without-libpsl \ -" - -do_install_append_class-target() { - # cleanup buildpaths from curl-config - sed -i \ - -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ - -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \ - -e 's|${DEBUG_PREFIX_MAP}||g' \ - ${D}${bindir}/curl-config -} - -PACKAGES =+ "lib${BPN}" - -FILES_lib${BPN} = "${libdir}/lib*.so.*" - -FILES_${PN} += "${datadir}/zsh" - -#inherit multilib_script -#MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/curl-config" - -BBCLASSEXTEND = "native nativesdk" - -#fixme -INSANE_SKIP += "pkgconfig" diff --git a/meta-openeuler/recipes-core/dbus/dbus_%.bbappend b/meta-openeuler/recipes-core/dbus/dbus_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..4af2e5fd3bc00688729da492e4f5c18eeba78647 --- /dev/null +++ b/meta-openeuler/recipes-core/dbus/dbus_%.bbappend @@ -0,0 +1,23 @@ +# version in openEuler +PV = "1.14.0" + +# apply openEuler source package +SRC_URI_remove = "https://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \ +file://clear-guid_from_server-if-send_negotiate_unix_f.patch \ +" + +SRC_URI_prepend = "file://dbus/dbus-${PV}.tar.xz " + +# apply patches from openEuler +SRC_URI += "\ +file://bugfix-let-systemd-restart-dbus-when-the-it-enters-failed.patch \ +file://backport-tools-Use-Python3-for-GetAllMatchRules.patch \ +file://print-load-average-when-activate-service-timeout.patch \ +" + +# checksum changed +SRC_URI[md5sum] = "ddd5570aff05191dbee8e42d751f1b7d" +SRC_URI[sha256sum] = "ccd7cce37596e0a19558fd6648d1272ab43f011d80c8635aea8fd0bad58aebd4" +LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \ + file://dbus/dbus.h;beginline=6;endline=20;md5=866739837ccd835350af94dccd6457d8" + diff --git a/meta-openeuler/recipes-core/dhcp/dhcp_4.4.2.bb b/meta-openeuler/recipes-core/dhcp/dhcp_4.4.2.bb deleted file mode 100644 index 3ae90b51127c95f3ff134c38e74b58db17721846..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/dhcp/dhcp_4.4.2.bb +++ /dev/null @@ -1,8 +0,0 @@ -require dhcp.inc - -COMPONENT = "isc dhcp" - -LDFLAGS_append = " -pthread" - -PACKAGECONFIG ?= "" -PACKAGECONFIG[bind-httpstats] = "--with-libxml2,--without-libxml2,libxml2" diff --git a/meta-openeuler/recipes-core/dosfstools/dosfstools_4.2.bb b/meta-openeuler/recipes-core/dosfstools/dosfstools_4.2.bb deleted file mode 100644 index 3c26fb9e5ed747261b0d0271bf5d80e684570f1f..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/dosfstools/dosfstools_4.2.bb +++ /dev/null @@ -1,26 +0,0 @@ -# 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" diff --git a/meta-openeuler/recipes-core/e2fsprogs/e2fsprogs.inc b/meta-openeuler/recipes-core/e2fsprogs/e2fsprogs.inc deleted file mode 100644 index b1a15e3a89d9ef4828518156c128b103887525fe..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/e2fsprogs/e2fsprogs.inc +++ /dev/null @@ -1,37 +0,0 @@ -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 \ - 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://e2fsprogs/0005-resize2fs-resize2fs-disk-hardlinks-will-be-error.patch \ - file://e2fsprogs/0006-e2fsck-exit-journal-recovery-when-find-EIO-ENOMEM-er.patch \ - file://e2fsprogs/0007-e2fsck-exit-journal-recovery-when-jounral-superblock.patch \ - file://e2fsprogs/0008-e2fsck-add-env-param-E2FS_UNRELIABLE_IO-to-fi.patch \ - file://e2fsprogs/0009-e2mmpstatus.8.in-detele-filesystem-can-be-UUID-or-LA.patch \ - file://run-ptest \ -" - -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 deleted file mode 100644 index c97c0377e9c0f08346a5ca83bd819b909333ec2b..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/e2fsprogs/e2fsprogs/run-ptest +++ /dev/null @@ -1,10 +0,0 @@ -#!/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 deleted file mode 100644 index 41ee07771ba12dccb365d98478b347291c67e638..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/e2fsprogs/e2fsprogs_1.46.4.bb +++ /dev/null @@ -1,124 +0,0 @@ -require e2fsprogs.inc - -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 -} - -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 ${base_sbindir}/mkfs.ext* ${sysconfdir}/mke2fs.conf" -FILES_e2fsprogs-tune2fs = "${base_sbindir}/tune2fs ${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/ -} diff --git a/meta-openeuler/recipes-core/ethtool/ethtool/avoid_parallel_tests.patch b/meta-openeuler/recipes-core/ethtool/ethtool/avoid_parallel_tests.patch deleted file mode 100644 index c7f907f64875bc31505ba4b7941ab47a4976f78e..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/ethtool/ethtool/avoid_parallel_tests.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 1f9215b845a144e531536709b23cd5fb15e4f206 Mon Sep 17 00:00:00 2001 -From: Tudor Florea -Date: Wed, 28 May 2014 18:59:54 +0200 -Subject: [PATCH] ethtool: use serial-tests config needed by ptest. - -ptest needs buildtest-TESTS and runtest-TESTS targets. -serial-tests is required to generate those targets. - -Signed-off-by: Tudor Florea -Upstream-Status: Inappropriate -(default automake behavior incompatible with ptest) - ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index d49eda6..c7fa195 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script. - AC_INIT(ethtool, 5.15, netdev@vger.kernel.org) - AC_PREREQ(2.52) - AC_CONFIG_SRCDIR([ethtool.c]) --AM_INIT_AUTOMAKE([gnu subdir-objects]) -+AM_INIT_AUTOMAKE([gnu subdir-objects serial-tests]) - AC_CONFIG_HEADERS([ethtool-config.h]) - - AM_MAINTAINER_MODE diff --git a/meta-openeuler/recipes-core/ethtool/ethtool/run-ptest b/meta-openeuler/recipes-core/ethtool/ethtool/run-ptest deleted file mode 100644 index 1e245da112d3930e662869c5f34d0cde05ad0305..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/ethtool/ethtool/run-ptest +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -make -k runtest-TESTS diff --git a/meta-openeuler/recipes-core/ethtool/ethtool_5.15.bb b/meta-openeuler/recipes-core/ethtool/ethtool_5.15.bb deleted file mode 100644 index dc359e95c1dbc18c3fbc2c0a8e725e5408694faf..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/ethtool/ethtool_5.15.bb +++ /dev/null @@ -1,37 +0,0 @@ -SUMMARY = "Display or change ethernet card settings" -DESCRIPTION = "A small utility for examining and tuning the settings of your ethernet-based network interfaces." -HOMEPAGE = "http://www.kernel.org/pub/software/network/ethtool/" -SECTION = "console/network" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://ethtool.c;beginline=4;endline=17;md5=c19b30548c582577fc6b443626fc1216" - -SRC_URI = "file://ethtool/ethtool-${PV}.tar.xz \ - file://run-ptest \ - file://avoid_parallel_tests.patch \ - " - -SRC_URI[sha256sum] = "686fd6110389d49c2a120f00c3cd5dfe43debada8e021e4270d74bbe452a116d" - -UPSTREAM_CHECK_URI = "https://gitee/src-openeuler/ethtool" - -#inherit autotools ptest bash-completion pkgconfig -inherit autotools ptest - -RDEPENDS_${PN}-ptest += "make" - -#PACKAGECONFIG ?= "netlink" -PACKAGECONFIG[netlink] = "--disable-netlink,--disable-netlink,libmnl" -FILES_${PN}-bash-completion += "/usr/share/bash-completion/completions/*" -PACKAGES += "ethtool-bash-completion" - -do_compile_ptest() { - oe_runmake buildtest-TESTS -} - -do_install_ptest () { - cp ${B}/Makefile ${D}${PTEST_PATH} - install ${B}/test-cmdline ${D}${PTEST_PATH} - install ${B}/ethtool ${D}${PTEST_PATH}/ethtool - sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/Makefile -} diff --git a/meta-openeuler/recipes-core/expat/expat/libtool-tag.patch b/meta-openeuler/recipes-core/expat/expat/libtool-tag.patch deleted file mode 100644 index 0a0aed23e5dbe6745fedefe88f3712d8fc3c71d3..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/expat/expat/libtool-tag.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 10342e6b600858b091bc7771e454d9e06af06410 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 2 Nov 2017 18:20:57 +0800 -Subject: [PATCH] Add CC tag to build - -Add CC tag to build - -Upstream-Status: Pending -Signed-off-by: Khem Raj -Signed-off-by: Dengke Du ---- - Makefile.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile.in b/Makefile.in -index 9560a95..d444bd6 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -319,7 +319,7 @@ LIBCURRENT = @LIBCURRENT@ - LIBOBJS = @LIBOBJS@ - LIBREVISION = @LIBREVISION@ - LIBS = @LIBS@ --LIBTOOL = @LIBTOOL@ -+LIBTOOL = @LIBTOOL@ --tag CC - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ --- -2.7.4 - diff --git a/meta-openeuler/recipes-core/expat/expat/run-ptest b/meta-openeuler/recipes-core/expat/expat/run-ptest deleted file mode 100644 index 1b39cec8e5eea7a2a6e4f16713ee5c9157cd1f4b..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/expat/expat/run-ptest +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -output=${1:-"expat_tests.log"} # default log file - -# logging function -function testCheck() { - testExec="$1" - shift - echo && echo ${testExec} && ./${testExec} "$@" - error=$? - result=$([[ ${error} -eq 0 ]] && echo "PASS" || echo "FAIL") - echo "${result}: ${testExec}" && echo "============================" -} - -export output -export -f testCheck -TIME=$(which time) - -echo "Architecture: $(uname -m)" > ${output} -echo "Image: $(uname -sr)" >> ${output} -${TIME} -f 'Execution time: %e s' bash -c "testCheck runtests -vv" |& tee -a ${output} -${TIME} -f 'Execution time: %e s' bash -c "testCheck runtestspp -vv" |& tee -a ${output} -echo diff --git a/meta-openeuler/recipes-core/expat/expat_%.bbappend b/meta-openeuler/recipes-core/expat/expat_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..689a5666b9e3279c268ad0fef01e2a2c2723820b --- /dev/null +++ b/meta-openeuler/recipes-core/expat/expat_%.bbappend @@ -0,0 +1,32 @@ +PV = "2.4.1" + +SRC_URI[sha256sum] = "a00ae8a6b96b63a3910ddc1100b1a7ef50dc26dceb65ced18ded31ab392f132b" + +# patches from openeuler +SRC_URI = " \ + ${SOURCEFORGE_MIRROR}/expat/expat-${PV}.tar.gz \ + file://backport-CVE-2021-45960.patch \ + file://backport-CVE-2021-46143.patch \ + file://backport-CVE-2022-22822-CVE-2022-22823-CVE-2022-22824-CVE-2022-22825-CVE-2022-22826-CVE-2022-22827.patch \ + file://backport-CVE-2022-23852-lib-Detect-and-prevent-integer-overflow-in-XML_GetBu.patch \ + file://backport-CVE-2022-23852-tests-Cover-integer-overflow-in-XML_GetBuffer-CVE-20.patch \ + file://backport-CVE-2022-23990-lib-Prevent-integer-overflow-in-doProlog-CVE-2022-23.patch \ + file://backport-CVE-2022-25235-lib-Add-missing-validation-of-encoding.patch \ + file://backport-tests-Cover-missing-validation-of-encoding.patch \ + file://backport-CVE-2022-25236-lib-Protect-against-malicious-namespace-declarations.patch \ + file://backport-tests-Cover-CVE-2022-25236.patch \ + file://backport-CVE-2022-25313-Prevent-stack-exhaustion-in-build_model.patch \ + file://backport-CVE-2022-25314-Prevent-integer-overflow-in-copyString.patch \ + file://backport-CVE-2022-25315-Prevent-integer-overflow-in-storeRawNames.patch \ + file://backport-Fix-build_model-regression.patch \ + file://backport-tests-Protect-against-nested-element-declaration-mod.patch \ + file://backport-lib-Fix-harmless-use-of-uninitialized-memory.patch \ + file://backport-lib-Drop-unused-macro-UTF8_GET_NAMING.patch \ + file://backport-lib-Relax-fix-to-CVE-2022-25236-with-regard-to-RFC-3.patch \ + file://backport-tests-Cover-relaxed-fix-to-CVE-2022-25236.patch \ +" + +# patch from poky +SRC_URI += " \ + file://libtool-tag.patch \ +" diff --git a/meta-openeuler/recipes-core/expat/expat_2.4.1.bb b/meta-openeuler/recipes-core/expat/expat_2.4.1.bb deleted file mode 100644 index bed0d95b0f2c285d6861368a1fe4bc4aabe03708..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/expat/expat_2.4.1.bb +++ /dev/null @@ -1,47 +0,0 @@ -SUMMARY = "A stream-oriented XML parser library" -DESCRIPTION = "Expat is an XML parser library written in C. It is a stream-oriented parser in which an application registers handlers for things the parser might find in the XML document (like start tags)" -HOMEPAGE = "http://expat.sourceforge.net/" -SECTION = "libs" -LICENSE = "MIT" - -LIC_FILES_CHKSUM = "file://COPYING;md5=9e2ce3b3c4c0f2670883a23bbd7c37a9" - -SRC_URI = "file://expat/expat-${PV}.tar.gz \ - file://expat/backport-CVE-2021-45960.patch \ - file://expat/backport-CVE-2021-46143.patch \ - file://expat/backport-CVE-2022-22822-CVE-2022-22823-CVE-2022-22824-CVE-2022-22825-CVE-2022-22826-CVE-2022-22827.patch \ - file://expat/backport-CVE-2022-23852-lib-Detect-and-prevent-integer-overflow-in-XML_GetBu.patch \ - file://expat/backport-CVE-2022-23852-tests-Cover-integer-overflow-in-XML_GetBuffer-CVE-20.patch \ - file://expat/backport-CVE-2022-23990-lib-Prevent-integer-overflow-in-doProlog-CVE-2022-23.patch \ - file://expat/backport-CVE-2022-25235-lib-Add-missing-validation-of-encoding.patch \ - file://expat/backport-tests-Cover-missing-validation-of-encoding.patch \ - file://expat/backport-CVE-2022-25236-lib-Protect-against-malicious-namespace-declarations.patch \ - file://expat/backport-tests-Cover-CVE-2022-25236.patch \ - file://expat/backport-CVE-2022-25313-Prevent-stack-exhaustion-in-build_model.patch \ - file://expat/backport-CVE-2022-25314-Prevent-integer-overflow-in-copyString.patch \ - file://expat/backport-CVE-2022-25315-Prevent-integer-overflow-in-storeRawNames.patch \ - file://expat/backport-Fix-build_model-regression.patch \ - file://expat/backport-tests-Protect-against-nested-element-declaration-mod.patch \ - file://expat/backport-lib-Fix-harmless-use-of-uninitialized-memory.patch \ - file://expat/backport-lib-Drop-unused-macro-UTF8_GET_NAMING.patch \ - file://expat/backport-lib-Relax-fix-to-CVE-2022-25236-with-regard-to-RFC-3.patch \ - file://expat/backport-tests-Cover-relaxed-fix-to-CVE-2022-25236.patch \ - file://libtool-tag.patch \ - file://run-ptest \ - " - -SRC_URI[sha256sum] = "2f9b6a580b94577b150a7d5617ad4643a4301a6616ff459307df3e225bcfbf40" - -EXTRA_OECMAKE_class-native += "-DEXPAT_BUILD_DOCS=OFF" - -RDEPENDS_${PN}-ptest += "bash" - -inherit cmake lib_package ptest - -do_install_ptest_class-target() { - install -m 755 ${B}/tests/* ${D}${PTEST_PATH} -} - -BBCLASSEXTEND += "native nativesdk" - -CVE_PRODUCT = "expat libexpat" diff --git a/meta-openeuler/recipes-core/gdb/gdb-common.inc b/meta-openeuler/recipes-core/gdb/gdb-common.inc deleted file mode 100644 index 15702903267240013bcb517bbc0c0fc8c9b60032..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/gdb/gdb-common.inc +++ /dev/null @@ -1,66 +0,0 @@ -SUMMARY = "GNU debugger" -HOMEPAGE = "http://www.gnu.org/software/gdb/" -DESCRIPTION = "GDB, the GNU Project debugger, allows you to see what is going on inside another program while it executes -- or what another program was doing at the moment it crashed." -SECTION = "devel" -DEPENDS = "expat gmp zlib ncurses virtual/libiconv bison-native" - -LTTNGUST = "lttng-ust" -LTTNGUST_arc = "" -LTTNGUST_aarch64 = "" -LTTNGUST_mipsarch = "" -LTTNGUST_sh4 = "" - -inherit autotools texinfo - -UPSTREAM_CHECK_GITTAGREGEX = "gdb\-(?P.+)\-release" - -B = "${WORKDIR}/build-${TARGET_SYS}" - -EXPAT = "--with-expat --with-libexpat-prefix=${STAGING_DIR_HOST}" - -EXTRA_OECONF = "--disable-gdbtk --disable-x --disable-werror \ - --with-curses --disable-multilib --disable-sim \ - --without-guile \ - ${GDBPROPREFIX} ${EXPAT} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)} \ - --disable-rpath \ - --disable-gas --disable-binutils \ - --disable-ld --disable-gold \ - --disable-gprof \ - --with-libgmp-prefix=${STAGING_EXECPREFIXDIR} \ -" - -PACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)}" -# Use --without-system-readline to compile with readline 5. -PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,readline" -PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python3,python3 python3-codecs" -PACKAGECONFIG[babeltrace] = "--with-babeltrace,--without-babeltrace,babeltrace" -# ncurses is already a hard DEPENDS, but would be added here if it weren't -PACKAGECONFIG[tui] = "--enable-tui,--disable-tui" -PACKAGECONFIG[xz] = "--with-lzma --with-liblzma-prefix=${STAGING_DIR_HOST},--without-lzma,xz" -PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod, elfutils" - -GDBPROPREFIX = "--program-prefix=''" - -DISABLE_STATIC = "" - -do_configure () { - # override this function to avoid the autoconf/automake/aclocal/autoheader - # calls for now - (cd ${S} && gnu-configize) || die "failure in running gnu-configize" - oe_runconf -} - -# we don't want gdb to provide bfd/iberty/opcodes, which instead will override the -# right bits installed by binutils. Same for bfd.info -- also from binutils. -do_install_append() { - rm -rf ${D}${libdir} - rm -rf ${D}${includedir} - rm -rf ${D}${datadir}/locale - rm -f ${D}${infodir}/bfd.info -} - -#RRECOMMENDS_gdb_append_linux = " glibc-thread-db " -#RRECOMMENDS_gdb_append_linux-gnueabi = " glibc-thread-db " -#RRECOMMENDS_gdbserver_append_linux = " glibc-thread-db " -#RRECOMMENDS_gdbserver_append_linux-gnueabi = " glibc-thread-db " diff --git a/meta-openeuler/recipes-core/gdb/gdb.inc b/meta-openeuler/recipes-core/gdb/gdb.inc deleted file mode 100644 index cee884ff193173ae6f53b51959bcd61aa58b0f29..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/gdb/gdb.inc +++ /dev/null @@ -1,9 +0,0 @@ -LICENSE = "GPL-2.0-only & GPL-3.0-only & LGPL-2.0-only & LGPL-3.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ - file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ - file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ - file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674" - -SRC_URI = "file://gdb/${BP}.tar.xz \ -" -SRC_URI[sha256sum] = "cccfcc407b20d343fb320d4a9a2110776dd3165118ffd41f4b1b162340333f94" diff --git a/meta-openeuler/recipes-core/gdb/gdb_11.1.bb b/meta-openeuler/recipes-core/gdb/gdb_11.1.bb deleted file mode 100644 index d5f57abe00d4b3979c280e310dc2aa42a538dfec..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/gdb/gdb_11.1.bb +++ /dev/null @@ -1,39 +0,0 @@ -require gdb-common.inc - -inherit gettext pkgconfig - -#LDFLAGS:append = " -s" -#export CFLAGS:append=" -L${STAGING_LIBDIR}" - -# cross-canadian must not see this -PACKAGES =+ "gdbserver" -FILES_gdbserver = "${bindir}/gdbserver" - -require gdb.inc - -inherit python3-dir - -EXTRA_OEMAKE_append_libc-musl = "\ - gt_cv_func_gnugettext1_libc=yes \ - gt_cv_func_gnugettext2_libc=yes \ - gl_cv_func_working_strerror=yes \ - gl_cv_func_strerror_0_works=yes \ - gl_cv_func_gettimeofday_clobber=no \ - " - -do_configure_prepend() { - if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then - cat > ${WORKDIR}/python << EOF -#!/bin/sh -case "\$2" in - --includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}/" ;; - --ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}${PYTHON_ABI}" ;; - --exec-prefix) echo "${exec_prefix}" ;; - *) exit 1 ;; -esac -exit 0 -EOF - chmod +x ${WORKDIR}/python - fi -} - diff --git a/meta-openeuler/recipes-core/glib-2.0/files/glib-2-glibc-2.34-close_range.patch b/meta-openeuler/recipes-core/glib-2.0/files/glib-2-glibc-2.34-close_range.patch new file mode 100644 index 0000000000000000000000000000000000000000..a84ccaaccbb9ff2d6bca708a2d5e17f5e0152996 --- /dev/null +++ b/meta-openeuler/recipes-core/glib-2.0/files/glib-2-glibc-2.34-close_range.patch @@ -0,0 +1,32 @@ +https://bugs.gentoo.org/803632 +https://gitlab.gnome.org/GNOME/glib/-/commit/63e7864d1a0ddbead3c18872e95116e3843e81be.patch + +From 6e59d21b273f026e82adc56fecbec67d1ffa72a4 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 8 Jul 2021 17:26:43 -0700 +Subject: [PATCH] correctly use 3 parameters for close_range + +libc implementation has 3 parameter e.g. +https://www.freebsd.org/cgi/man.cgi?query=close_range&sektion=2&format=html + +Signed-off-by: Khem Raj +--- + glib/gspawn.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/glib/gspawn.c b/glib/gspawn.c +index 95f5b868e..a15fb1ca1 100644 +--- a/glib/gspawn.c ++++ b/glib/gspawn.c +@@ -1494,7 +1494,7 @@ safe_closefrom (int lowfd) + * + * Handle ENOSYS in case it’s supported in libc but not the kernel; if so, + * fall back to safe_fdwalk(). */ +- if (close_range (lowfd, G_MAXUINT) != 0 && errno == ENOSYS) ++ if (close_range (lowfd, G_MAXUINT, 0) != 0 && errno == ENOSYS) + #endif /* HAVE_CLOSE_RANGE */ + (void) safe_fdwalk (close_func, GINT_TO_POINTER (lowfd)); + #endif +-- +GitLab + diff --git a/meta-openeuler/recipes-core/glib-2.0/files/relocate-modules.patch b/meta-openeuler/recipes-core/glib-2.0/files/relocate-modules.patch new file mode 100644 index 0000000000000000000000000000000000000000..41e1c9989586f7f99dce107c0833ccabcf72a32e --- /dev/null +++ b/meta-openeuler/recipes-core/glib-2.0/files/relocate-modules.patch @@ -0,0 +1,51 @@ +From 011c9f024b6475d31e7d5432a38d00fb67eaea40 Mon Sep 17 00:00:00 2001 +From: Ross Burton +Date: Fri, 11 Mar 2016 15:35:55 +0000 +Subject: [PATCH] glib-2.0: relocate the GIO module directory for native builds + +Instead of hard-coding GIO_MODULE_PATH when glib is built, use dladdr() to +determine where libglib.so is and use that path to calculate GIO_MODULES_DIR. + +This solves relocation problems with GIOModule for native builds of glib. + +Upstream-Status: Inappropriate +Signed-off-by: Ross Burton + +Port patch to 2.48 +Signed-off-by: Jussi Kukkonen + +--- + gio/giomodule.c | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/gio/giomodule.c b/gio/giomodule.c +index dc4d6d3..da46906 100644 +--- a/gio/giomodule.c ++++ b/gio/giomodule.c +@@ -50,7 +50,9 @@ + #include "gmemorymonitordbus.h" + #ifdef G_OS_WIN32 + #include "gregistrysettingsbackend.h" + #include "giowin32-priv.h" ++#else ++#include + #endif + #include + +@@ -1163,7 +1165,15 @@ get_gio_module_dir (void) + NULL); + g_free (install_dir); + #else +- module_dir = g_strdup (GIO_MODULE_DIR); ++ Dl_info info; ++ ++ if (dladdr (g_io_module_new, &info)) { ++ char *libdir = g_path_get_dirname (info.dli_fname); ++ module_dir = g_build_filename (libdir, "gio", "modules", NULL); ++ g_free (libdir); ++ } else { ++ module_dir = g_strdup (GIO_MODULE_DIR); ++ } + #endif + } + diff --git a/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common b/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common deleted file mode 100644 index 0d7c5fa3f8cec69e67d217775b04fe56d2da20e8..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common +++ /dev/null @@ -1,3 +0,0 @@ -[properties] -# On all known supported architectures the stack grows down -growing_stack = false diff --git a/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc b/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc deleted file mode 100644 index c4648f58c78d5400e0052b2047d0f8e7fdb852b6..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc +++ /dev/null @@ -1,5 +0,0 @@ -[properties] -have_c99_vsnprintf = true -have_c99_snprintf = true -have_unix98_printf = true -va_val_copy = true diff --git a/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-linux b/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-linux deleted file mode 100644 index adad7e62eeb9e8d0f245ba319a9136cb28a3157c..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-linux +++ /dev/null @@ -1,5 +0,0 @@ -[properties] -have_proc_self_cmdline = true - -[binaries] -env = '/usr/bin/env' diff --git a/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-mingw b/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-mingw deleted file mode 100644 index 75f911ba1edcd498e2ce531bd3c5a9e93f1e91aa..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-mingw +++ /dev/null @@ -1,6 +0,0 @@ -[properties] -have_c99_vsnprintf = false -have_c99_snprintf = false -have_unix98_printf = false -va_val_copy = true -have_proc_self_cmdline = false diff --git a/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-musl b/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-musl deleted file mode 100644 index 3049e5116ece7292fa550c29746aba88810b5ea9..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-musl +++ /dev/null @@ -1,6 +0,0 @@ -[properties] -have_c99_vsnprintf = true -have_c99_snprintf = true -have_unix98_printf = true -va_val_copy = true -have_strlcpy = true diff --git a/meta-openeuler/recipes-core/glib-2.0/glib-2.0/run-ptest b/meta-openeuler/recipes-core/glib-2.0/glib-2.0/run-ptest deleted file mode 100644 index 7a231b514b423467f7684772a8f83e2de2b085f9..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/glib-2.0/glib-2.0/run-ptest +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh - -set -eux -if id -u glib2-test; then - userdel glib2-test -fi -useradd glib2-test -su glib2-test -c 'gnome-desktop-testing-runner glib' -userdel glib2-test diff --git a/meta-openeuler/recipes-core/glib-2.0/glib-2.0_%.bbappend b/meta-openeuler/recipes-core/glib-2.0/glib-2.0_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..f823eb14f26d9e1fcdefd3508945bf3b1315478e --- /dev/null +++ b/meta-openeuler/recipes-core/glib-2.0/glib-2.0_%.bbappend @@ -0,0 +1,53 @@ +PV = "2.68.1" +OPENEULER_REPO_NAME = "glib2" + +# use new relocate-modules.patch to fix build error of glib-2.0-native +FILESEXTRAPATHS_prepend := "${THISDIR}/files/:" + +SRC_URI[sha256sum] = "241654b96bd36b88aaa12814efc4843b578e55d47440103727959ac346944333" + +SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ + file://glib-2-glibc-2.34-close_range.patch \ +" +# apply patches from poky +SRC_URI += " \ + file://run-ptest \ + file://0001-Fix-DATADIRNAME-on-uclibc-Linux.patch \ + file://Enable-more-tests-while-cross-compiling.patch \ + file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \ + file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \ + file://0001-Do-not-ignore-return-value-of-write.patch \ + file://0010-Do-not-hardcode-python-path-into-various-tools.patch \ + file://0001-Set-host_machine-correctly-when-building-with-mingw3.patch \ + file://0001-Do-not-write-bindir-into-pkg-config-files.patch \ + file://0001-meson-Run-atomics-test-on-clang-as-well.patch \ + file://0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch \ + file://0001-gio-tests-codegen.py-bump-timeout-to-100-seconds.patch \ +" + +# delete depends to shared-mime-info +SHAREDMIMEDEP_remove += "shared-mime-info" + +# glib2-codegn is a collection of python scripts. +# here, remove the runtime depends of python3, to simplify build +# when python3 support becomes mature, remove the following codes +RDEPENDS_${PN}-codegen = "" +# glib needs meson, meson needs python3-natve +# here use nativesdk's meson-native and python3-native +DEPENDS_remove += "python3-native" + +#delete depends to util-linux-native +PACKAGECONFIG_remove_class-target += "libmount" + +# glib-2.0 will inherit gio-module-cache.bbclass to update +# gio module after glib-2.0 is installed. +# to update the cache, gio-querymodules of glib-2.0 will be called. +# gio-querymodules is a target binary which can't be directly executed in host +# to do this, yocto use qemu user mode to simulate the execution of gio-querymodules. +# The call of qemu user mode will make things more complex, so better not to use +# A workaround is to delay the call of gio-querymodules in target. +# Here, we set GIO_MODULLE_PACKAGES to empty to bypass the gio_module_cache_common in +# gio-module-cache.bbclass +# In future, if we figure out the related stuff of gio-querymodules, we can remove the +# following codes +GIO_MODULE_PACKAGES = "" diff --git a/meta-openeuler/recipes-core/glib-2.0/glib-2.0_2.68.1.bb b/meta-openeuler/recipes-core/glib-2.0/glib-2.0_2.68.1.bb deleted file mode 100644 index 49ac75de97e85f5fa099f579f05227b9c5ff8fd8..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/glib-2.0/glib-2.0_2.68.1.bb +++ /dev/null @@ -1,40 +0,0 @@ -require glib.inc - -SRC_URI = "file://glib2/glib-${PV}.tar.xz \ - file://glib2/backport-correctly-use-3-parameters-for-clise-range.patch \ - file://glib2/backport-fix-a-memory-leak.patch \ - file://run-ptest \ -" - -SRC_URI[sha256sum] = "241654b96bd36b88aaa12814efc4843b578e55d47440103727959ac346944333" - -# Find any meson cross files in FILESPATH that are relevant for the current -# build (using siteinfo) and add them to EXTRA_OEMESON. -inherit siteinfo -def find_meson_cross_files(d): - if bb.data.inherits_class('native', d): - return "" - - thisdir = os.path.normpath(d.getVar("THISDIR")) - import collections - sitedata = siteinfo_data(d) - # filename -> found - files = collections.OrderedDict() - for path in d.getVar("FILESPATH").split(":"): - for element in sitedata: - filename = os.path.normpath(os.path.join(path, "meson.cross.d", element)) - sanitized_path = filename.replace(thisdir, "${THISDIR}") - if sanitized_path == filename: - if os.path.exists(filename): - bb.error("Cannot add '%s' to --cross-file, because it's not relative to THISDIR '%s' and sstate signature would contain this full path" % (filename, thisdir)) - continue - files[filename.replace(thisdir, "${THISDIR}")] = os.path.exists(filename) - - items = ["--cross-file=" + k for k,v in files.items() if v] - d.appendVar("EXTRA_OEMESON", " " + " ".join(items)) - items = ["%s:%s" % (k, "True" if v else "False") for k,v in files.items()] - d.appendVarFlag("do_configure", "file-checksums", " " + " ".join(items)) - -python () { - find_meson_cross_files(d) -} diff --git a/meta-openeuler/recipes-core/glib-2.0/glib.inc b/meta-openeuler/recipes-core/glib-2.0/glib.inc deleted file mode 100644 index 8617001c216e6a5ed049f8cf7a73a39080ed3b5a..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/glib-2.0/glib.inc +++ /dev/null @@ -1,203 +0,0 @@ -SUMMARY = "A general-purpose utility library" -DESCRIPTION = "GLib is a general-purpose utility library, which provides many useful data types, macros, type conversions, string utilities, file utilities, a main loop abstraction, and so on." -HOMEPAGE = "https://developer.gnome.org/glib/" - -# pcre is under BSD; -# docs/reference/COPYING is with a 'public domain'-like license! -LICENSE = "LGPLv2.1+ & BSD & PD" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ - file://glib/glib.h;beginline=4;endline=17;md5=b88abb7f3ad09607e71cb9d530155906 \ - file://gmodule/COPYING;md5=4fbd65380cdd255951079008b364516c \ - file://gmodule/gmodule.h;beginline=4;endline=17;md5=b88abb7f3ad09607e71cb9d530155906 \ - file://glib/pcre/pcre.h;beginline=8;endline=36;md5=3e2977dae4ad05217f58c446237298fc \ - file://docs/reference/COPYING;md5=f51a5100c17af6bae00735cd791e1fcc" -BUGTRACKER = "http://bugzilla.gnome.org" -SECTION = "libs" - -CVE_PRODUCT = "glib" - -BBCLASSEXTEND = "native nativesdk" - -DEPENDS = "glib-2.0-native \ - virtual/libintl \ - virtual/libiconv \ - libffi \ - zlib" - -PACKAGES += "${PN}-codegen ${PN}-utils ${PN}-bash-completion" - -LEAD_SONAME = "libglib-2.0.*" - -#inherit meson gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages -#inherit meson gettext pkgconfig ptest-gnome upstream-version-is-even gio-module-cache manpages -inherit meson gettext pkgconfig - -DEPENDS_append_class-target = "${@' gtk-doc' if d.getVar('GTKDOC_ENABLED') == 'True' else ''}" - -GTKDOC_MESON_OPTION = "gtk_doc" - -S = "${WORKDIR}/glib-${PV}" - -PACKAGECONFIG ??= "system-pcre libmount \ - ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" -# To use the system pcre it must be configured with --enable-unicode-properties -PACKAGECONFIG[system-pcre] = "-Dinternal_pcre=false,-Dinternal_pcre=true,libpcre" -PACKAGECONFIG[libmount] = "-Dlibmount=enabled,-Dlibmount=disabled,util-linux" -PACKAGECONFIG[manpages] = "-Dman=true, -Dman=false, libxslt-native xmlto-native" -# libelf is auto-detected without a configuration option -PACKAGECONFIG[libelf] = ",,elfutils" -PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false,dbus" - -EXTRA_OEMESON = "-Ddtrace=false -Dfam=false -Dsystemtap=false -Dselinux=disabled" - -do_configure_prepend() { - sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in -} - -FILES_${PN} = "${libdir}/lib*${SOLIBS} \ - ${libdir}/gio \ - ${libexecdir}/*gio-querymodules \ - ${datadir}/glib-2.0/schemas" - -FILES_${PN}-utils += "${bindir}/glib-genmarshal \ - ${bindir}/glib-gettextize \ - ${bindir}/glib-mkenums \ - ${bindir}/glib-compile-resources" - -FILES_${PN}-dev += "${libdir}/glib-2.0/include \ - ${libdir}/gio/modules/lib*${SOLIBSDEV} \ - ${libdir}/gio/modules/*.la \ - ${datadir}/glib-2.0/gettext/po/Makefile.in.in \ - ${datadir}/glib-2.0/schemas/gschema.dtd \ - ${datadir}/glib-2.0/valgrind/glib.supp \ - ${datadir}/gettext/its" -FILES_${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb" -FILES_${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py \ - ${bindir}/gdbus-codegen" -FILES_${PN}-utils = "${bindir}/*" -FILES_${PN}-bash-completion += "${datadir}/bash-completion/completions" - -SHAREDMIMEDEP = "shared-mime-info" -SHAREDMIMEDEP_class-native = "" -# When cross compiling for Windows we don't want to include this -SHAREDMIMEDEP_mingw32 = "" - -#RRECOMMENDS_${PN} += "${SHAREDMIMEDEP}" - -ARM_INSTRUCTION_SET_armv4 = "arm" -ARM_INSTRUCTION_SET_armv5 = "arm" -# Valgrind runtime detection works using hand-written assembly, which -# doesn't support mips16e -CPPFLAGS_append_class-target_mips16e = " -DNVALGRIND=1" - -# GLib generally requires gettext to be present so for USE_NLS to yes. For -# native builds as i18n is disabled globally we have to add a gettext-native dependency. -USE_NLS_class-target = "yes" -USE_NLS_class-nativesdk = "yes" -DEPENDS_append_class-native = " gettext-native" - -EXEEXT = "" -EXEEXT_mingw32 = ".exe" - -do_install_append () { - if [ -f ${D}${bindir}/gtester-report ]; then - sed ${D}${bindir}/gtester-report -i -e '1s|^#!.*|#!/usr/bin/env python3|' - fi - - # Remove some unpackaged files - rm -rf ${D}${datadir}/glib-2.0/codegen/__pycache__ - rm -f ${D}${datadir}/glib-2.0/codegen/*.pyc - rm -f ${D}${datadir}/glib-2.0/codegen/*.pyo - - if [ -e ${D}${libdir}/charset.alias ]; then - rm -f ${D}${libdir}/charset.alias - fi - - # Make sure gio-querymodules is unique among multilibs - if test "x${MLPREFIX}" != "x"; then - mv ${D}${libexecdir}/gio-querymodules${EXEEXT} ${D}${libexecdir}/${MLPREFIX}gio-querymodules${EXEEXT} - fi - # Autotools does this, meson does not - mkdir -p ${D}${libdir}/gio/modules -} - -do_install_append_class-target () { - # Tests are only installed on targets, not native builds. Separating this out - # keeps glib-2.0-native from depending on DISTRO_FEATURES - if [ -f ${D}${datadir}/installed-tests/glib/gdbus-serialization.test ]; then - if ${@bb.utils.contains("DISTRO_FEATURES", "x11", "false", "true", d)}; then - rm ${D}${datadir}/installed-tests/glib/gdbus-serialization.test - fi - fi - if [ -f ${D}${datadir}/installed-tests/glib/static-link.test ]; then - if test "x${MLPREFIX}" != "x"; then - mv ${D}${datadir}/installed-tests/glib/static-link.test ${D}${datadir}/installed-tests/glib/${MLPREFIX}static-link.test - fi - fi -} - -# As we do not build python3 for windows, makes no sense to ship the script that's using it -do_install_append_mingw32() { - rm -f ${D}${bindir}/gtester-report -} - -CODEGEN_PYTHON_RDEPENDS = "python3 python3-distutils python3-xml" -CODEGEN_PYTHON_RDEPENDS_mingw32 = "" - -#RDEPENDS_${PN}-codegen += "${CODEGEN_PYTHON_RDEPENDS}" - -RDEPENDS_${PN}-ptest += "${PN}-utils" - -RDEPENDS_${PN}-ptest += "\ - coreutils \ - libgcc \ - dbus \ - gnome-desktop-testing \ - tzdata \ - tzdata-americas \ - tzdata-asia \ - tzdata-europe \ - tzdata-posix \ - shared-mime-info \ - ${PN}-locale-ja \ - ${PN}-locale-fr \ - ${PN}-locale-el \ - ${PN}-locale-hr \ - ${PN}-locale-lt \ - ${PN}-locale-pl \ - ${PN}-locale-ru \ - ${PN}-locale-th \ - python3-core \ - python3-modules \ - ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'python3-dbusmock', '', d)} \ - ${PN}-codegen \ - " - -RDEPENDS_${PN}-ptest_append_libc-glibc = "\ - glibc-gconv-utf-16 \ - glibc-charmap-utf-8 \ - glibc-gconv-cp1255 \ - glibc-charmap-cp1255 \ - glibc-gconv-utf-32 \ - glibc-gconv-utf-7 \ - glibc-gconv-euc-jp \ - glibc-gconv-iso8859-1 \ - glibc-gconv-iso8859-15 \ - glibc-charmap-invariant \ - glibc-localedata-translit-cjk-variants \ - locale-base-tr-tr \ - locale-base-lt-lt \ - locale-base-ja-jp.euc-jp \ - locale-base-fa-ir \ - locale-base-ru-ru \ - locale-base-de-de \ - locale-base-hr-hr \ - locale-base-el-gr \ - locale-base-fr-fr \ - locale-base-es-es \ - locale-base-en-gb \ - locale-base-en-us \ - locale-base-pl-pl \ - locale-base-pl-pl.iso-8859-2 \ - " -DEPENDS_remove += "meson-native glib-2.0-native" diff --git a/meta-openeuler/recipes-core/gmp/gmp.inc b/meta-openeuler/recipes-core/gmp/gmp.inc deleted file mode 100644 index 948b89288e05638b039080a47dfa0a948544a53e..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/gmp/gmp.inc +++ /dev/null @@ -1,12 +0,0 @@ -SUMMARY = "GNU multiprecision arithmetic library" -DESCRIPTION = "GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers" -HOMEPAGE = "http://gmplib.org/" -SECTION = "devel" - -inherit autotools texinfo multilib_header - -PACKAGECONFIG ??= "" -PACKAGECONFIG[readline] = "--with-readline=yes,--with-readline=no,readline" - -ARM_INSTRUCTION_SET_armv4 = "arm" -ARM_INSTRUCTION_SET_armv5 = "arm" diff --git a/meta-openeuler/recipes-core/gmp/gmp_6.2.1.bb b/meta-openeuler/recipes-core/gmp/gmp_6.2.1.bb deleted file mode 100644 index 37245b732ecf2103d9326e851fe73fd2786e2193..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/gmp/gmp_6.2.1.bb +++ /dev/null @@ -1,41 +0,0 @@ -require gmp.inc - -LICENSE = "GPLv2+ | LGPLv3+" - -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ - file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \ - file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ -" - -REVISION = "" -SRC_URI = "file://gmp/${BP}.tar.bz2 \ - " -SRC_URI[md5sum] = "28971fc21cf028042d4897f02fd355ea" -SRC_URI[sha256sum] = "eae9326beb4158c386e39a356818031bd28f3124cf915f8c5b1dc4c7a36b4d7c" - -acpaths = "" - -EXTRA_OECONF += " --enable-cxx=detect" -EXTRA_OECONF_mipsarchr6_append = " --disable-assembly" - -PACKAGES =+ "libgmpxx" -FILES_libgmpxx = "${libdir}/libgmpxx${SOLIBS}" - -do_install_append() { - oe_multilib_header gmp.h -} - -do_install_prepend_class-target() { - sed -i \ - -e "s|--sysroot=${STAGING_DIR_HOST}||g" \ - -e "s|${DEBUG_PREFIX_MAP}||g" \ - ${B}/gmp.h -} - -SSTATE_SCAN_FILES += "gmp.h" - -# Doesn't compile in MIPS16e mode due to use of hand-written -# assembly -MIPS_INSTRUCTION_SET = "mips" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-core/grep/grep_3.7.bb b/meta-openeuler/recipes-core/grep/grep_3.7.bb deleted file mode 100644 index ed3dcb511e15b62d22ad30d8671e71fc7464456a..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/grep/grep_3.7.bb +++ /dev/null @@ -1,45 +0,0 @@ -SUMMARY = "GNU grep utility" -HOMEPAGE = "http://savannah.gnu.org/projects/grep/" -DESCRIPTION = "Grep searches one or more input files for lines containing a match to a specified pattern. By default, grep prints the matching lines." -BUGTRACKER = "http://savannah.gnu.org/bugs/?group=grep" -SECTION = "console/utils" -LICENSE = "GPLv3" -LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464" - -SRC_URI = "file://grep/grep-${PV}.tar.xz \ - file://grep/backport-grep-avoid-sticky-problem-with-f-f.patch \ -" -SRC_URI[sha256sum] = "5c10da312460aec721984d5d83246d24520ec438dd48d7ab5a05dbc0d6d6823c" - -inherit autotools gettext texinfo pkgconfig - -# Fix "Argument list too long" error when len(TMPDIR) = 410 -acpaths = "-I ./m4" - -do_configure_prepend () { - sed -i -e '1s,#!@SHELL@,#!/bin/sh,' ${S}/src/egrep.sh - rm -f ${S}/m4/init.m4 -} - -do_install () { - autotools_do_install - if [ "${base_bindir}" != "${bindir}" ]; then - install -d ${D}${base_bindir} - mv ${D}${bindir}/grep ${D}${base_bindir}/grep - mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep - mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep - rmdir ${D}${bindir}/ - fi -} - -PACKAGECONFIG ??= "pcre" -PACKAGECONFIG[pcre] = "--enable-perl-regexp,--disable-perl-regexp,libpcre" - -ALTERNATIVE_PRIORITY = "100" - -ALTERNATIVE_${PN} = "grep egrep fgrep" -ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep" -ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep" -ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep" - -BBCLASSEXTEND = "nativesdk" diff --git a/meta-openeuler/recipes-core/gzip/files/run-ptest b/meta-openeuler/recipes-core/gzip/files/run-ptest deleted file mode 100644 index cf7c64949abd31148f71b2f260b7f5f6d7c7b969..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/gzip/files/run-ptest +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -cd src/tests - -make check - diff --git a/meta-openeuler/recipes-core/gzip/gzip.inc b/meta-openeuler/recipes-core/gzip/gzip.inc deleted file mode 100644 index 1a0747dff837e8ab538e9689c891e4f5d603fc19..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/gzip/gzip.inc +++ /dev/null @@ -1,33 +0,0 @@ -SUMMARY = "Standard GNU compressor" -DESCRIPTION = "GNU Gzip is a popular data compression program originally written by Jean-loup Gailly for the GNU \ -project. Mark Adler wrote the decompression part" -HOMEPAGE = "http://www.gnu.org/software/gzip/" -SECTION = "console/utils" -# change to GPLv3+ in 2007/07. Previous GPLv2 version is 1.3.12 - -inherit autotools texinfo -export DEFS="NO_ASM" - -EXTRA_OEMAKE_class-target = "GREP=${base_bindir}/grep" -EXTRA_OECONF_append_libc-musl = " gl_cv_func_fflush_stdin=yes " - -do_install_append () { - if [ "${base_bindir}" != "${bindir}" ]; then - # Rename and move files into /bin (FHS), which is typical place for gzip - install -d ${D}${base_bindir} - mv ${D}${bindir}/gunzip ${D}${base_bindir}/gunzip - mv ${D}${bindir}/gzip ${D}${base_bindir}/gzip - mv ${D}${bindir}/zcat ${D}${base_bindir}/zcat - mv ${D}${bindir}/uncompress ${D}${base_bindir}/uncompress - fi -} - -#inherit update-alternatives - -ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE_${PN} = "gunzip gzip zcat" -ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip" -ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip" -ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat" - -export CONFIG_SHELL="/bin/sh" diff --git a/meta-openeuler/recipes-core/gzip/gzip/wrong-path-fix.patch b/meta-openeuler/recipes-core/gzip/gzip/wrong-path-fix.patch deleted file mode 100644 index 7c37bc8d2d9269aaf86c70164aa0ad86c65cae12..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/gzip/gzip/wrong-path-fix.patch +++ /dev/null @@ -1,36 +0,0 @@ -fix MakeMaker issues with using wrong SHELL/GREP - -A set of substitution is being processed to all target scripts with sed by -replacing some key words with the detected values at configure time, this -is exactly not compliant with cross compling, and will cause missing path -errors at run time like: -"/usr/bin/zgrep: line 230: /usr/bin/grep: No such file or directory" - -Fixed by removing unneeded substitution and using real runtime paths -instead. - -Signed-off-by: Ming Liu - -Upstream-Status: Pending - ---- - Makefile.am | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index d4ecc3f..e4657d2 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -82,8 +82,7 @@ SUFFIXES = .in - .in: - $(AM_V_GEN)rm -f $@-t $@ \ - && sed \ -- -e 's|/bin/sh|$(SHELL)|g' \ -- -e 's|[@]GREP@|$(GREP)|g' \ -+ -e 's|[@]GREP@|$(base_bindir)/grep|g' \ - -e 's|[@]VERSION@|$(VERSION)|g' \ - $(srcdir)/$@.in >$@-t \ - && chmod a=rx $@-t \ --- -2.7.4 - diff --git a/meta-openeuler/recipes-core/gzip/gzip_1.11.bb b/meta-openeuler/recipes-core/gzip/gzip_1.11.bb deleted file mode 100644 index bbb09e67770fb838c5d2608c13231c62e74d0058..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/gzip/gzip_1.11.bb +++ /dev/null @@ -1,45 +0,0 @@ -require gzip.inc - -LICENSE = "GPLv3+" - -SRC_URI = "file://gzip/${BP}.tar.xz \ - file://gzip/gzip-l-now-outputs-accurate-size.patch \ - file://gzip/doc-document-gzip-l-change.patch \ - file://gzip/zdiff-fix-arg-handling-bug.patch \ - file://gzip/zdiff-fix-another-arg-handling-bug.patch \ - file://gzip/fix-verbose-disable.patch \ - file://run-ptest \ - " -SRC_URI_append_class-target = " file://wrong-path-fix.patch" - -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ - file://gzip.h;beginline=8;endline=20;md5=6e47caaa630e0c8bf9f1bc8d94a8ed0e" - -PROVIDES_append_class-native = " gzip-replacement-native" - -RDEPENDS_${PN}-ptest += "make perl grep diffutils" - -BBCLASSEXTEND = "native nativesdk" - -inherit ptest - -do_install_ptest() { - mkdir -p ${D}${PTEST_PATH}/src/build-aux - cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/src/build-aux/ - mkdir -p ${D}${PTEST_PATH}/src/tests - cp -r ${S}/tests/* ${D}${PTEST_PATH}/src/tests - sed -e 's/^abs_srcdir = ..*/abs_srcdir = \.\./' \ - -e 's/^top_srcdir = ..*/top_srcdir = \.\./' \ - -e 's/^GREP = ..*/GREP = grep/' \ - -e 's/^AWK = ..*/AWK = awk/' \ - -e 's/^srcdir = ..*/srcdir = \./' \ - -e 's/^Makefile: ..*/Makefile: /' \ - -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ - -e 's|${DEBUG_PREFIX_MAP}||g' \ - -e 's:${HOSTTOOLS_DIR}/::g' \ - -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ - ${B}/tests/Makefile > ${D}${PTEST_PATH}/src/tests/Makefile -} - -SRC_URI[md5sum] = "d1e93996dba00cab0caa7903cd01d454" -SRC_URI[sha256sum] = "9b9a95d68fdcb936849a4d6fada8bf8686cddf58b9b26c9c4289ed0c92a77907" diff --git a/meta-openeuler/recipes-core/http-parser/http-parser_2.9.4.bb b/meta-openeuler/recipes-core/http-parser/http-parser_2.9.4.bb deleted file mode 100644 index 76857503b4fd1c88f243b5312929ab6e914a7848..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/http-parser/http-parser_2.9.4.bb +++ /dev/null @@ -1,51 +0,0 @@ -SUMMARY = "Protocol Buffers - structured data serialisation mechanism" -DESCRIPTION = "Yet Another JSON Library - A Portable JSON parsing and serialization library in ANSI C" -SECTION = "console/tools" -LICENSE = "BSD-2-Clause" - -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" - -SRC_URI = "file://http-parser/http-parser-2.9.4.tar.gz" - -S = "${WORKDIR}/${BPN}-${PV}" - -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" - -DEPENDS = "" -#CFLAGS_remove = "-D_FORTIFY_SOURCE=2" -#CPPFLAGS_remove = "-D_FORTIFY_SOURCE=2" -#CXXPFLAGS_remove = "-D_FORTIFY_SOURCE=2" - - -inherit autotools pkgconfig - -PACKAGES = "${PN}-dev ${PN}" -FILES_${PN}-dev = "${includedir}/*" -FILES_${PN} += "${libdir}/*" - -do_package_qa() { - : -} - -do_compile() { - make library -} - -do_install_append () { - [[ "${libdir}" != "/usr/local/lib" ]] || return 0 - if test -d ${D}/usr/local/lib ; then - cd ${D}/usr/local/lib - ln -sf libhttp_parser.so.${PV} libhttp_parser.so - cd - - mv ${D}/usr/local/lib ${D}/${libdir} - fi - if test -d ${D}/usr/local/include ; then - mv ${D}/usr/local/include ${D}/${includedir} - fi - rm -rf ${D}/usr/local -} - -BBCLASSEXTEND = "native nativesdk" -B = "${S}" - - diff --git a/meta-openeuler/recipes-core/images/openeuler-image-common.inc b/meta-openeuler/recipes-core/images/openeuler-image-common.inc index 17ab2e81843d06b4b39f8fc23fe7e751f591d22a..40d8e6f1255413163d2c8df6daff9a92a74eda6c 100644 --- a/meta-openeuler/recipes-core/images/openeuler-image-common.inc +++ b/meta-openeuler/recipes-core/images/openeuler-image-common.inc @@ -1,83 +1,45 @@ -SUMMARY = "A small image just capable of allowing a device to boot." - IMAGE_INSTALL = "" -IMAGE_LINGUAS = " " +# no extra language settings +IMAGE_LINGUAS = "" LICENSE = "MIT" +IMAGE_FSTYPES ?= "cpio.gz" +IMAGE_FSTYPES_DEBUGFS ?= "cpio.gz" +INITRAMFS_MAXSIZE ?= "262144" +do_image_cpio[depends] ?= "" + inherit core-image -IMAGE_FSTYPES = "cpio.gz" -IMAGE_FSTYPES_DEBUGFS = "cpio.gz" -INITRAMFS_MAXSIZE = "262144" -#delete depends to cpio-native -do_image_cpio[depends] = "" #delete useless sdk depends FEATURE_PACKAGES_tools-sdk_remove = " packagegroup-core-sdk packagegroup-core-standalone-sdk-target" TOOLCHAIN_TARGET_TASK_remove += "${@multilib_pkg_extend(d, 'packagegroup-core-standalone-sdk-target')}" -#not add run-postinsts to PACKAGE_INSTALL, so that not fail when do_rootfs?? -ROOTFS_BOOTSTRAP_INSTALL = "" - -#not depends to update-alternatives +#not depends to native tools like, update-alternatives, update-rc.d as they are provided by nativesdk do_rootfs[depends] = "" -#not depends to ldconfig-native -#LDCONFIGDEPEND = "" -#not depends to lib32-qemuwrapper-cross when no other lib32 pkgs -DEPENDS_remove += "${@' '.join(["%s-qemuwrapper-cross" % m for m in d.getVar("MULTILIB_VARIANTS").split()])} cross-localedef-native" + +#no depends on some native tools: qemu-wrapper, etc +DEPENDS_remove += "${@' '.join(["%s-qemuwrapper-cross" % m for m in d.getVar("MULTILIB_VARIANTS").split()])} qemuwrapper-cross depmodwrapper-cross cross-localedef-native" SDK_DEPENDS_remove += "${@' '.join(["%s-qemuwrapper-cross" % m for m in d.getVar("MULTILIB_VARIANTS").split()])}" RPMROOTFSDEPENDS = "" -#IMAGE_ROOTFS_SIZE ?= "8192" -#IMAGE_ROOTFS_EXTRA_SPACE_append = "${@bb.utils.contains("DISTRO_FEATURES", "systemd", " + 4096", "", d)}" OUTPUTTIME = "${DATETIME}" # Ignore how DATETIME is computed OUTPUTTIME[vardepsexclude] = "DATETIME" OUTPUT_DIR = "${TOPDIR}/output/${OUTPUTTIME}" -#No kernel-abiversion file found, cannot run depmod, aborting +# do not use depmod USE_DEPMOD = "0" -# openEuler embedded uses pre-built dnf tool which is different with Yocto's patched dnf. -# Yocto's dnf is patched with special handlings for yocto's build flow -# (see poky/meta/recipes-devtools/dnf). -# In prebuilt dnf, the log dir will be in the install dir of target rootfs, this will -# pollute the target rootfs. That's why 0005-Do-not-prepend-installroot-to-logdir.path is -# needed. -# in openEuler, we do some modifications (meta/lib/oe/package_manager/rpm/__init__.py), -# add a DNF_LOG_DIR to handle the case of prebuilt dnf. -# Through DNF_LOG_DIR, the dnf logs will be written in DNF_LOG_DIR of target rootfs. -# After the install of rootfs, these logs should be deleted to avoid pollution of target rootfs - -# What's tricky, the logs of DNF can de divided into two parts, dnf*.log and hawky.log. -# dnf*.log's rootfs dir is the target rootfs dir, hawky.log's rootfs dir is the host rootfs dir., -# i.e, hawky.log will be written into ${WORKDIR}/temp, dnf*.log will be written into ${WORKDIR}/rootfs -# ${WORKDIR}/temp. So a workaround here is set DNF_LOG_DIR = "/tmp", that both dnf*.log and hawky.log -# can be written successfully - -DNF_LOG_DIR ?= "/tmp" - -IMAGE_PREPROCESS_COMMAND += "delete_dnf_logs_from_rootfs; set_permissions_from_rootfs;" +IMAGE_PREPROCESS_COMMAND += "set_permissions_from_rootfs;" set_permissions_from_rootfs() { pushd "${IMAGE_ROOTFS}" # set file permissions for secure - chmod 750 ./var/volatile/log chmod 750 ./etc/init.d - # delete /etc/ld.so.cache - rm -f ./etc/ld.so.cache -} - -delete_dnf_logs_from_rootfs() { - pushd "${IMAGE_ROOTFS}" - # move dnf logs into ${T} - if [ -e .${DNF_LOG_DIR}/dnf.log ];then - mv .${DNF_LOG_DIR}/dnf*.log ${T} - fi - popd } DISTRO_FEATURES += "glibc" diff --git a/meta-openeuler/recipes-core/images/openeuler-image-live.bb b/meta-openeuler/recipes-core/images/openeuler-image-live.bb new file mode 100644 index 0000000000000000000000000000000000000000..fe724507cc04145efaa71d69c3906c9b961299c8 --- /dev/null +++ b/meta-openeuler/recipes-core/images/openeuler-image-live.bb @@ -0,0 +1,37 @@ +# Simple initramfs image. Mostly used for live images. +# reference: yoto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb + +# no host package +TOOLCHAIN_HOST_TASK = "" + +SUMMARY = "Simple initramfs image. Mostly used for live images" + +INITRAMFS_SCRIPTS ?= "\ + initramfs-module-install-efi \ + " + +# we want a non systemd init manager, packagegroup-core-boot-live is for it. +VIRTUAL-RUNTIME_base-utils = "packagegroup-core-boot-live" +PACKAGE_INSTALL = "${INITRAMFS_SCRIPTS} \ + ${VIRTUAL-RUNTIME_base-utils} \ + base-passwd \ + ${ROOTFS_BOOTSTRAP_INSTALL} \ + packagegroup-kernel-modules \ +" + +export IMAGE_BASENAME = "openeuler-image-live" + +IMAGE_FSTYPES = "cpio.gz" +IMAGE_FSTYPES_DEBUGFS = "cpio.gz" +INITRAMFS_MAXSIZE = "262144" +do_image_cpio[depends] ?= "" + +# make install or nologin when using busybox-inittab +set_permissions_from_rootfs_append() { + if [ -e ./etc/inittab ];then + sed -i "s#respawn:/sbin/getty.*#respawn:-/bin/sh /init.d/install-efi.sh#g" ./etc/inittab + fi +} + +require recipes-core/images/${MACHINE}.inc +require openeuler-image-common.inc diff --git a/meta-openeuler/recipes-core/images/openeuler-image-sdk.inc b/meta-openeuler/recipes-core/images/openeuler-image-sdk.inc index b95507eb57d1e6862397b0b5738c4b369b8b9ede..c7d958ae3f20676831597a7c44da509da30e3a91 100644 --- a/meta-openeuler/recipes-core/images/openeuler-image-sdk.inc +++ b/meta-openeuler/recipes-core/images/openeuler-image-sdk.inc @@ -36,6 +36,8 @@ gcc-external-cross-canadian-${TRANSLATED_TARGET_ARCH} \ # extra target packages added to sdk +# libgcc(libgcc_s.so) is required for user space application TOOLCHAIN_TARGET_TASK += " \ +libgcc \ kernel-devsrc \ " diff --git a/meta-openeuler/recipes-core/images/openeuler-image-tiny.bb b/meta-openeuler/recipes-core/images/openeuler-image-tiny.bb index 40599a7f97dfd4f32b691444ebb07f33eaa45e57..146b9ddd32a5924bc9e8e050a726d526c8698771 100644 --- a/meta-openeuler/recipes-core/images/openeuler-image-tiny.bb +++ b/meta-openeuler/recipes-core/images/openeuler-image-tiny.bb @@ -1,11 +1,23 @@ # no host package for image-tiny TOOLCHAIN_HOST_TASK = "" +SUMMARY = "A small image just capable of allowing a device to boot." + +# Note IMAGE_FSTYPES defination should before openeuler-image-common.inc(before inherit core-iamge/image.bbclass) +IMAGE_FSTYPES = "cpio.gz" +IMAGE_FSTYPES_DEBUGFS = "cpio.gz" +INITRAMFS_MAXSIZE = "262144" +#delete depends to cpio-native, use nativesdk's cpio +do_image_cpio[depends] = "" + +require recipes-core/images/${MACHINE}.inc require openeuler-image-common.inc IMAGE_INSTALL += " \ packagegroup-core-boot \ -packagegroup-core-boot-tiny \ " -require recipes-core/images/${MACHINE}.inc +# make no login +set_permissions_from_rootfs_append() { + sed -i "s#respawn:/sbin/getty.*#respawn:-/bin/sh#g" ./etc/inittab +} diff --git a/meta-openeuler/recipes-core/images/openeuler-image.bb b/meta-openeuler/recipes-core/images/openeuler-image.bb index d6b22ee4213f4b953c160a3c55dc05f64d6f17ff..3112783a110a8bcabad02414055956441aeceb0b 100644 --- a/meta-openeuler/recipes-core/images/openeuler-image.bb +++ b/meta-openeuler/recipes-core/images/openeuler-image.bb @@ -1,3 +1,19 @@ +# Note IMAGE_FSTYPES defination should before openeuler-image-common.inc(before inherit core-iamge/image.bbclass) +IMAGE_FSTYPES = "cpio.gz" +IMAGE_FSTYPES_DEBUGFS = "cpio.gz" +INITRAMFS_MAXSIZE = "262144" +#delete depends to cpio-native, use nativesdk's cpio +do_image_cpio[depends] = "" + +# build an iso image, the live-os use openeuler-image-live, it musn't the same as itself(openeuler-image) +# when defined LIVE_ROOTFS_TYPE, bug may occered in poky, so just use default value ext4 in image-live.bbclass. +# notice we need MACHINE_FEATURES += "efi" in machine conf +IMAGE_FSTYPES_append_aarch64 += " iso " +IMAGE_FSTYPES_append_x86-64 += " iso " +INITRD_IMAGE_LIVE = "openeuler-image-live" + +# notice: IMAGE_FEATURE configs such as IMAGE_FSTYPES shuold defined befor openeuler-image-common.inc(before core-image and image.bbclass) +require recipes-core/images/${MACHINE}.inc require openeuler-image-common.inc #package sdk require openeuler-image-sdk.inc @@ -8,16 +24,21 @@ require openeuler-image-sdk.inc # put extra base packages to "packagegroup-base" # put extended packages to "packagegroup-base-extended" # put other class of packages to "packagegroup-xxx" +# Notice: IMAGE_INSTALL should define after openeuler-image-common.inc(after core-image\image.bbclass) IMAGE_INSTALL += " \ packagegroup-core-boot \ packagegroup-core-base-utils \ +packagegroup-core-tools-debug \ packagegroup-base \ packagegroup-base-extended \ packagegroup-openssh \ -packagegroup-debugtools \ -packagegroup-isulad \ packagegroup-kernel-modules \ +packagegroup-isulad \ " +#thie packagegroup should add after refactor +inherit extrausers +EXTRA_USERS_PARAMS = "\ + useradd -p '' openeuler; \ + " -require recipes-core/images/${MACHINE}.inc diff --git a/meta-openeuler/recipes-core/images/qemu-x86-64.inc b/meta-openeuler/recipes-core/images/qemu-x86-64.inc new file mode 100644 index 0000000000000000000000000000000000000000..f7506f707ef5b22d2ef0e333a694e7f2b8a59dbe --- /dev/null +++ b/meta-openeuler/recipes-core/images/qemu-x86-64.inc @@ -0,0 +1,2 @@ +#image configuration for x86-64 +require qemu.inc diff --git a/meta-openeuler/recipes-core/images/qemu.inc b/meta-openeuler/recipes-core/images/qemu.inc index 77a6a7f0d99799e411648fa395f3e494865c46d9..1f5b3d8181f0b104437acb4a4b876e4d0ab0c1b2 100644 --- a/meta-openeuler/recipes-core/images/qemu.inc +++ b/meta-openeuler/recipes-core/images/qemu.inc @@ -1,20 +1,26 @@ -delete_boot_from_rootfs() { +delete_unneeded_from_rootfs() { test -d "${OUTPUT_DIR}" || mkdir -p "${OUTPUT_DIR}" pushd "${IMAGE_ROOTFS}" - if [ -d ./boot ];then - rm -f "${OUTPUT_DIR}"/*Image* "${OUTPUT_DIR}"/vmlinux* - mv boot/${KERNEL_IMAGETYPE}-* "${OUTPUT_DIR}"/${KERNEL_IMAGETYPE} - mv boot/vmlinux* "${OUTPUT_DIR}"/ - [[ "${KERNEL_IMAGETYPE}" =~ ^Image.* ]] || mv boot/Image* "${OUTPUT_DIR}"/ - rm -r ./boot + rm -f "${OUTPUT_DIR}"/*Image* "${OUTPUT_DIR}"/vmlinux* + cp boot/${KERNEL_IMAGETYPE}-* "${OUTPUT_DIR}"/${KERNEL_IMAGETYPE} + mv boot/vmlinux* "${OUTPUT_DIR}"/ + if [[ ! "${KERNEL_IMAGETYPE}" =~ ^Image.* ]] && [[ $(ls boot/ | grep ^Image.*) ]]; then + cp boot/Image* "${OUTPUT_DIR}"/ + # Notice: zImage is not support for grub, so make a Image in DEPLOY_DIR_IMAGE for image-live here. + cp boot/Image* "${DEPLOY_DIR_IMAGE}"/ fi + # just neet dir of boot, other in boot is no need. + rm -rf ./boot/* popd } copy_openeuler_distro() { - rm -f "${OUTPUT_DIR}"/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${IMAGE_FSTYPES} - cp -fp ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${IMAGE_FSTYPES} "${OUTPUT_DIR}"/ + for IMAGETYPE in ${IMAGE_FSTYPES} + do + rm -f "${OUTPUT_DIR}"/${IMAGE_NAME}${IMAGE_NAME_SUFFIX%.rootfs}.*${IMAGETYPE} + cp -fp ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX%.rootfs}.*${IMAGETYPE} "${OUTPUT_DIR}"/ + done } -IMAGE_PREPROCESS_COMMAND += "delete_boot_from_rootfs;" +IMAGE_PREPROCESS_COMMAND += "delete_unneeded_from_rootfs;" IMAGE_POSTPROCESS_COMMAND += "copy_openeuler_distro;" diff --git a/meta-openeuler/recipes-core/init-ifupdown/init-ifupdown_%.bbappend b/meta-openeuler/recipes-core/init-ifupdown/init-ifupdown_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..b229f30f1f13e08d8d420667ff9dd5999feb4b55 --- /dev/null +++ b/meta-openeuler/recipes-core/init-ifupdown/init-ifupdown_%.bbappend @@ -0,0 +1,2 @@ +RDEPENDS_${PN} = "os-base" +RCONFLICTS_${PN} = "" diff --git a/meta-openeuler/recipes-core/initrdscripts/files/init-install-efi-openeuler.sh b/meta-openeuler/recipes-core/initrdscripts/files/init-install-efi-openeuler.sh new file mode 100644 index 0000000000000000000000000000000000000000..f5eea5f769b0bbd66149b67b4627a51b7e969c04 --- /dev/null +++ b/meta-openeuler/recipes-core/initrdscripts/files/init-install-efi-openeuler.sh @@ -0,0 +1,385 @@ +#!/bin/sh -e +# +# Copyright (c) 2012, Intel Corporation. +# All rights reserved. +# +# install.sh +# + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +#just when LABEL=install-efi, we start this install, see grub.cfg +cmdstr=`cat /proc/cmdline | awk -F 'LABEL=' '{print $2}' | awk '{print $1}'` +if [ "$cmdstr" != "install-efi" ]; then + export HOME=/home/root + source /etc/profile + /bin/sh + exit 1 +fi + +rootfs_name="rootfs.img" + +echo "Check ISO/ext4 and CD-ROM..." +iso_support=`cat /proc/filesystems | grep iso9660 | awk '{print $1}'` +if [ "$iso_support" != "iso9660" ]; then + echo "Kernel not support iso9660 filesystem. Please check." + exit 1 +fi + +ext4_support=`cat /proc/filesystems | grep ext4 | awk '{print $1}'` +if [ "$ext4_support" != "ext4" ]; then + echo "Kernel not support ext4 filesystem. Please check." + exit 1 +fi + +cdromlists=`ls /sys/block/ | grep -Ev "ram|loop"` || true +if [ -z "${cdromlists}" ]; then + echo "Can't find any CDROM. Please check CDROM to install ISO image." + exit 1 +fi + +for cdname in $cdromlists; do + echo "-------------------------------" + echo /dev/$cdname + if [ -r /sys/block/$cdname/device/vendor ]; then + echo -n "VENDOR=" + cat /sys/block/$cdname/device/vendor + fi + if [ -r /sys/block/$cdname/device/model ]; then + echo -n "MODEL=" + cat /sys/block/$cdname/device/model + fi + if [ -r /sys/block/$cdname/device/uevent ]; then + echo -n "UEVENT=" + cat /sys/block/$cdname/device/uevent + fi + echo +done + +# Get user choice +TARGET_CDROM_NAME="" +while true; do + echo "Please type the target where iso image is, or press n to exit ($cdromlists ): " + read answer + if [ "$answer" = "n" ]; then + echo "Installation manually aborted." + exit 1 + fi + for cdname in $cdromlists; do + if [ "$answer" = "$cdname" ]; then + TARGET_CDROM_NAME=$answer + break + fi + done + if [ -n "$TARGET_CDROM_NAME" ]; then + break + fi +done + +mkdir -p /run/media/${TARGET_CDROM_NAME}/ +mount -t iso9660 /dev/${TARGET_CDROM_NAME} /run/media/${TARGET_CDROM_NAME}/ +if [ ! -e /run/media/${TARGET_CDROM_NAME}/${rootfs_name} ]; then + echo "Can't find ${rootfs_name} in root of ${TARGET_CDROM_NAME}, mountpoints: /run/media/${TARGET_CDROM_NAME}/" + echo "Mounted info:" + mount + exit 1 +fi + +# figure out how big of a boot partition we need +boot_size=$(du -ms /run/media/${TARGET_CDROM_NAME}/ | awk '{print $1}') +# remove rootfs.img ($2) from the size if it exists, as its not installed to /boot +if [ -e /run/media/${TARGET_CDROM_NAME}/${rootfs_name} ]; then + boot_size=$(( boot_size - $( du -ms /run/media/${TARGET_CDROM_NAME}/${rootfs_name} | awk '{print $1}') )) +fi +# remove initrd from size since its not currently installed +if [ -e /run/media/${TARGET_CDROM_NAME}/initrd ]; then + boot_size=$(( boot_size - $( du -ms /run/media/${TARGET_CDROM_NAME}/initrd | awk '{print $1}') )) +fi +# add 10M to provide some extra space for users and account +# for rounding in the above subtractions +boot_size=$(( boot_size + 10 )) + +# 5% for swap +swap_ratio=5 + +# Get a list of hard drives +hdnamelist="" +live_dev_name=`cat /proc/mounts | grep ${TARGET_CDROM_NAME%/} | awk '{print $1}'` +live_dev_name=${live_dev_name#\/dev/} +# Only strip the digit identifier if the device is not an mmc +case $live_dev_name in + mmcblk*) + ;; + nvme*) + ;; + *) + live_dev_name=${live_dev_name%%[0-9]*} + ;; +esac + +echo "Searching for hard drives ..." + +# Some eMMC devices have special sub devices such as mmcblk0boot0 etc +# we're currently only interested in the root device so pick them wisely +devices=`ls /sys/block/ | grep -v mmcblk` || true +mmc_devices=`ls /sys/block/ | grep "mmcblk[0-9]\{1,\}$"` || true +devices="$devices $mmc_devices" + +for device in $devices; do + case $device in + loop*) + # skip loop device + ;; + sr*) + # skip CDROM device + ;; + ram*) + # skip ram device + ;; + *) + # skip the device LiveOS is on + # Add valid hard drive name to the list + case $device in + $live_dev_name*) + # skip the device we are running from + ;; + *) + hdnamelist="$hdnamelist $device" + ;; + esac + ;; + esac +done + +if [ -z "${hdnamelist}" ]; then + echo "You need another device (besides the live device /dev/${live_dev_name}) to install the image. Installation aborted." + exit 1 +fi + +TARGET_DEVICE_NAME="" +for hdname in $hdnamelist; do + # Display found hard drives and their basic info + echo "-------------------------------" + echo /dev/$hdname + if [ -r /sys/block/$hdname/device/vendor ]; then + echo -n "VENDOR=" + cat /sys/block/$hdname/device/vendor + fi + if [ -r /sys/block/$hdname/device/model ]; then + echo -n "MODEL=" + cat /sys/block/$hdname/device/model + fi + if [ -r /sys/block/$hdname/device/uevent ]; then + echo -n "UEVENT=" + cat /sys/block/$hdname/device/uevent + fi + echo +done + +# Get user choice +while true; do + echo "Please select an install target or press n to exit ($hdnamelist ): " + read answer + if [ "$answer" = "n" ]; then + echo "Installation manually aborted." + exit 1 + fi + for hdname in $hdnamelist; do + if [ "$answer" = "$hdname" ]; then + TARGET_DEVICE_NAME=$answer + break + fi + done + if [ -n "$TARGET_DEVICE_NAME" ]; then + break + fi +done + +if [ -n "$TARGET_DEVICE_NAME" ]; then + echo "Installing image on /dev/$TARGET_DEVICE_NAME ..." +else + echo "No hard drive selected. Installation aborted." + exit 1 +fi + +device=/dev/$TARGET_DEVICE_NAME + +# +# The udev automounter can cause pain here, kill it +# +rm -f /etc/udev/rules.d/automount.rules +rm -f /etc/udev/scripts/mount* + +# +# Unmount anything the automounter had mounted +# +umount ${device}* 2> /dev/null || /bin/true + +mkdir -p /tmp + +# Create /etc/mtab if not present +if [ ! -e /etc/mtab ] && [ -e /proc/mounts ]; then + ln -sf /proc/mounts /etc/mtab +fi + +disk_size=$(parted ${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " -f 3 | sed -e "s/MB//") + +swap_size=$((disk_size*swap_ratio/100)) +rootfs_size=$((disk_size-boot_size-swap_size)) + +rootfs_start=$((boot_size)) +rootfs_end=$((rootfs_start+rootfs_size)) +swap_start=$((rootfs_end)) + +# MMC devices are special in a couple of ways +# 1) they use a partition prefix character 'p' +# 2) they are detected asynchronously (need rootwait) +rootwait="" +part_prefix="" +if [ ! "${device#/dev/mmcblk}" = "${device}" ] || \ + [ ! "${device#/dev/nvme}" = "${device}" ]; then + part_prefix="p" + rootwait="rootwait" +fi + +# USB devices also require rootwait +if [ -n `readlink /dev/disk/by-id/usb* | grep $TARGET_DEVICE_NAME` ]; then + rootwait="rootwait" +fi + +bootfs=${device}${part_prefix}1 +rootfs=${device}${part_prefix}2 +swap=${device}${part_prefix}3 + +echo "*****************" +echo "Boot partition size: $boot_size MB ($bootfs)" +echo "Rootfs partition size: $rootfs_size MB ($rootfs)" +echo "Swap partition size: $swap_size MB ($swap)" +echo "*****************" +echo "Deleting partition table on ${device} ..." +dd if=/dev/zero of=${device} bs=512 count=35 + +echo "Creating new partition table on ${device} ..." +parted ${device} mklabel gpt + +echo "Creating boot partition on $bootfs" +parted ${device} mkpart boot fat32 0% $boot_size +parted ${device} set 1 boot on + +echo "Creating rootfs partition on $rootfs" +parted ${device} mkpart root ext4 $rootfs_start $rootfs_end + +echo "Creating swap partition on $swap" +parted ${device} mkpart swap linux-swap $swap_start 100% + +parted ${device} print + +echo "Waiting for device nodes..." +C=0 +while [ $C -ne 3 ] && [ ! -e $bootfs -o ! -e $rootfs -o ! -e $swap ]; do + C=$(( C + 1 )) + sleep 1 +done + +echo "Formatting $bootfs to vfat..." +mkfs.vfat $bootfs + +echo "Formatting $rootfs to ext4..." +mkfs.ext4 $rootfs + +echo "Formatting swap partition...($swap)" +mkswap $swap + +mkdir /tgt_root +mkdir /src_root +mkdir -p /boot + +# Handling of the target root partition +mount $rootfs /tgt_root +mount -o rw,loop,noatime,nodiratime /run/media/${TARGET_CDROM_NAME}/${rootfs_name} /src_root +echo "Copying rootfs files..." +cp -a /src_root/* /tgt_root +# you may should manually add it to fstab or if you already has a udev rules. +if [ -d /tgt_root/etc/ ]; then + boot_uuid=$(blkid -o value -s UUID ${bootfs}) + swap_part_uuid=$(blkid -o value -s PARTUUID ${swap}) + echo "#/dev/disk/by-partuuid/$swap_part_uuid swap swap defaults 0 0" >> /tgt_root/etc/fstab + echo "#UUID=$boot_uuid /boot vfat defaults 1 2" >> /tgt_root/etc/fstab + # We dont want udev to mount our root device while we're booting... + if [ -d /tgt_root/etc/udev/ ] ; then + echo "${device}" >> /tgt_root/etc/udev/mount.blacklist + fi +fi + +umount /src_root + +# Handling of the target boot partition +mount $bootfs /boot +echo "Preparing boot partition..." + +EFIDIR="/boot/EFI/BOOT" +mkdir -p $EFIDIR +# Copy the efi loader +cp /run/media/${TARGET_CDROM_NAME}/EFI/BOOT/*.efi $EFIDIR + +if [ -f /run/media/${TARGET_CDROM_NAME}/EFI/BOOT/grub.cfg ]; then + GRUBCFG_TMP=/tmp/grub.cfg.local + cp /run/media/${TARGET_CDROM_NAME}/EFI/BOOT/grub.cfg $GRUBCFG_TMP + + root_part_uuid=$(blkid -o value -s PARTUUID ${rootfs}) + GRUBCFG="$EFIDIR/grub.cfg" + # Update grub config for the installed image + # Delete the install entry + sed -i "/menuentry 'install'/,/^}/d" $GRUBCFG_TMP + # Delete the initrd lines + sed -i "/initrd /d" $GRUBCFG_TMP + # Delete any LABEL= strings + sed -i "s/ LABEL=[^ ]*/ /" $GRUBCFG_TMP + # Replace root= and add additional standard boot options + # We use root as a sentinel value, as vmlinuz is no longer guaranteed + sed -i "s/ root=[^ ]*/ root=PARTUUID=$root_part_uuid rw $rootwait quiet /g" $GRUBCFG_TMP + mv $GRUBCFG_TMP $GRUBCFG +fi + +if [ -d /run/media/${TARGET_CDROM_NAME}/loader ]; then + rootuuid=$(blkid -o value -s PARTUUID ${rootfs}) + SYSTEMDBOOT_CFGS="/boot/loader/entries/*.conf" + # copy config files for systemd-boot + cp -dr /run/media/${TARGET_CDROM_NAME}/loader /boot + # delete the install entry + rm -f /boot/loader/entries/install.conf + # delete the initrd lines + sed -i "/initrd /d" $SYSTEMDBOOT_CFGS + # delete any LABEL= strings + sed -i "s/ LABEL=[^ ]*/ /" $SYSTEMDBOOT_CFGS + # delete any root= strings + sed -i "s/ root=[^ ]*/ /" $SYSTEMDBOOT_CFGS + # add the root= and other standard boot options + sed -i "s@options *@options root=PARTUUID=$rootuuid rw $rootwait quiet @" $SYSTEMDBOOT_CFGS +fi + +umount /tgt_root + +# copy any extra files needed for ESP +if [ -d /run/media/${TARGET_CDROM_NAME}/esp ]; then + cp -r /run/media/${TARGET_CDROM_NAME}/esp/* /boot +fi + +# Copy kernel artifacts. To add more artifacts just add to types +# For now just support kernel types already being used by something in OE-core +for types in bzImage zImage vmlinux vmlinuz fitImage; do + for kernel in `find /run/media/${TARGET_CDROM_NAME}/ -name $types*`; do + cp $kernel /boot + done +done + +umount /boot + +sync + +echo "Installation successful. Remove your installation media and press ENTER to reboot." + +read enter + +echo "Rebooting..." +reboot -f diff --git a/meta-openeuler/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bbappend b/meta-openeuler/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..e95a109e8068dfc699437190d14b18fedf2eb01c --- /dev/null +++ b/meta-openeuler/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bbappend @@ -0,0 +1,12 @@ +# main bbfile: yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bb + +FILESEXTRAPATHS_prepend := "${THISDIR}/files/:" + +SRC_URI += "file://init-install-efi-openeuler.sh" + +RDEPENDS_${PN}_remove = "initramfs-framework-base" + +do_install_append() { + install -m 0755 ${WORKDIR}/init-install-efi-openeuler.sh ${D}/init.d/install-efi.sh +} + diff --git a/meta-openeuler/recipes-core/initscripts/files/init-system-helpers_debian-1.64.tar.gz b/meta-openeuler/recipes-core/initscripts/files/init-system-helpers_debian-1.64.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..e5baf92a4371835891a2081951b3b9a2678e0d69 Binary files /dev/null and b/meta-openeuler/recipes-core/initscripts/files/init-system-helpers_debian-1.64.tar.gz differ diff --git a/meta-openeuler/recipes-core/initscripts/init-system-helpers_%.bbappend b/meta-openeuler/recipes-core/initscripts/init-system-helpers_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..fb852f99ca592ab4a003c60347cc50772963111b --- /dev/null +++ b/meta-openeuler/recipes-core/initscripts/init-system-helpers_%.bbappend @@ -0,0 +1,15 @@ +# main bbfile: yocto-poky/meta/recipes-core/initscripts/init-system-helpers_1.60.bb + +# As it's small, the tarball of init-system-helpers is integrated in openEuler Embedded +# to avoid network download. +PV = "debian-1.64" + +FILESEXTRAPATHS_append := "${THISDIR}/files/:" + +LIC_FILES_CHKSUM = "file://debian/copyright;md5=c4ec20aa158fa9de26ee1accf78dcaae" + +SRC_URI = "file://${BPN}_${PV}.tar.gz" +SRC_URI[md5sum] = "69ce302fe1ee5616f17281b0708e9922" +SRC_URI[sha256sum] = "abebfcc4bbed3ba291bf84840451125e7f1d5be37fcae81e171b673cb820d1d1" + +S = "${WORKDIR}/${BP}" diff --git a/meta-openeuler/recipes-core/initscripts/initscripts_10.12.bb b/meta-openeuler/recipes-core/initscripts/initscripts_10.12.bb deleted file mode 100644 index a244999bda9083de535654fb518351f676a4e73b..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/initscripts/initscripts_10.12.bb +++ /dev/null @@ -1,75 +0,0 @@ -SUMMARY = "SysV init scripts" -HOMEPAGE = "https://github.com/fedora-sysv/initscripts" -DESCRIPTION = "Initscripts provide the basic system startup initialization scripts for the system. These scripts include actions such as filesystem mounting, fsck, RTC manipulation and other actions routinely performed at system startup. In addition, the scripts are also used during system shutdown to reverse the actions performed at startup." -SECTION = "base" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -PR = "1" - -SRC_URI = "file://initscripts/initscripts-10.12.tar.gz \ - file://initscripts/backport-run-ifdown-on-all-interfaces.patch \ - file://initscripts/bugfix-initscripts-add-udev-wait-dependency-for-network.patch \ - file://initscripts/bugfix-mod-network-function-when-NM-unmanage-devices.patch \ - file://initscripts/bugfix-initscripts-set-PERSISTENT_DHCLIENT-default-to-yes.patch \ - file://initscripts/bugfix-network-need-chkconfig-on.patch \ - file://initscripts/bugfix-restart-network-warning.patch \ - file://initscripts/new-network-fork-to-start-dhcp.patch \ - file://initscripts/exec-udevadm-settle-when-network-start.patch \ - file://initscripts/remove-rename_device_lock-when-process-does-not-exis.patch \ -" -INHIBIT_DEFAULT_DEPS = "1" - -KERNEL_VERSION = "" - -DEPENDS_append = " update-rc.d-native" -PACKAGE_WRITE_DEPS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}" - -PACKAGES =+ "${PN}-functions ${PN}-sushell" -RDEPENDS_${PN} = "initd-functions \ - ${@bb.utils.contains('DISTRO_FEATURES','selinux','${PN}-sushell','',d)} \ - " -#Recommend pn-functions so that it will be a preferred default provider for initd-functions -RRECOMMENDS_${PN} = "${PN}-functions" -RPROVIDES_${PN}-functions = "initd-functions" -RCONFLICTS_${PN}-functions = "lsbinitscripts" -FILES_${PN}-functions = "${sysconfdir}/init.d/functions*" -FILES_${PN}-sushell = "{base_sbindir}/sushell" - -HALTARGS ?= "-d -f" - -do_configure() { -} - -do_install () { -# -# Create directories and install device independent scripts -# - mkdir -p ${D}/etc/sysconfig/network-scripts - install ${S}/network-scripts/* ${D}/etc/sysconfig/network-scripts/ - - mkdir -p ${D}/etc/init.d - install -m 0750 ${S}/etc/rc.d/init.d/* ${D}/etc/init.d/ -} - -MASKED_SCRIPTS = "" - -pkg_postinst_${PN} () { - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - if [ -n "$D" ]; then - OPTS="--root=$D" - fi - for SERVICE in ${MASKED_SCRIPTS}; do - systemctl $OPTS mask $SERVICE.service - done - fi - - # Delete any old volatile cache script, as directories may have moved - if [ -z "$D" ]; then - rm -f "/etc/volatile.cache" - fi -} - -do_configure[noexec] = "1" -do_compile[noexec] = "1" - -CONFFILES_${PN} += "${sysconfdir}/init.d/checkroot.sh" diff --git a/meta-openeuler/recipes-core/iproute2/iproute2.inc b/meta-openeuler/recipes-core/iproute2/iproute2.inc deleted file mode 100644 index ba83686c2bd07ed1314a42734066bf349fba0abc..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/iproute2/iproute2.inc +++ /dev/null @@ -1,91 +0,0 @@ -SUMMARY = "TCP / IP networking and traffic control utilities" -DESCRIPTION = "Iproute2 is a collection of utilities for controlling \ -TCP / IP networking and traffic control in Linux. Of the utilities ip \ -and tc are the most important. ip controls IPv4 and IPv6 \ -configuration and tc stands for traffic control." -HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2" -SECTION = "base" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ - file://ip/ip.c;beginline=3;endline=8;md5=689d691d0410a4b64d3899f8d6e31817" - -DEPENDS = "flex-native bison-native iptables libcap" - -inherit pkgconfig - -CLEANBROKEN = "1" - -PACKAGECONFIG ??= "elf" -PACKAGECONFIG[elf] = ",,elfutils," - -IPROUTE2_MAKE_SUBDIRS = "lib tc ip bridge misc genl ${@bb.utils.filter('PACKAGECONFIG', 'devlink tipc rdma', d)}" - -EXTRA_OEMAKE = "\ - CC='${CC}' \ - KERNEL_INCLUDE=${STAGING_INCDIR} \ - DOCDIR=${docdir}/iproute2 \ - SUBDIRS='${IPROUTE2_MAKE_SUBDIRS}' \ - SBINDIR='${base_sbindir}' \ - LIBDIR='${libdir}' \ -" - -do_configure_append () { - sh configure ${STAGING_INCDIR} - # Explicitly disable ATM support - sed -i -e '/TC_CONFIG_ATM/d' config.mk -} - -do_install () { - oe_runmake DESTDIR=${D} install - mv ${D}${base_sbindir}/ip ${D}${base_sbindir}/ip.iproute2 - install -d ${D}${datadir} - mv ${D}/share/* ${D}${datadir}/ || true - rm ${D}/share -rf || true -} - -# The .so files in iproute2-tc are modules, not traditional libraries -INSANE_SKIP_${PN}-tc = "dev-so" - -IPROUTE2_PACKAGES =+ "\ - ${PN}-devlink \ - ${PN}-genl \ - ${PN}-ifstat \ - ${PN}-ip \ - ${PN}-lnstat \ - ${PN}-nstat \ - ${PN}-rtacct \ - ${PN}-ss \ - ${PN}-tc \ - ${PN}-tipc \ - ${PN}-rdma \ - ${PN}-bash-completion \ -" - -PACKAGE_BEFORE_PN = "${IPROUTE2_PACKAGES}" -RDEPENDS_${PN} += "${PN}-ip" - -FILES_${PN}-bash-completion = "${datadir}/bash-completion/completions" - -FILES_${PN}-tc = "${base_sbindir}/tc* \ - ${libdir}/tc/*.so" -FILES_${PN}-lnstat = "${base_sbindir}/lnstat \ - ${base_sbindir}/ctstat \ - ${base_sbindir}/rtstat" -FILES_${PN}-ifstat = "${base_sbindir}/ifstat" -FILES_${PN}-ip = "${base_sbindir}/ip.${PN} ${sysconfdir}/iproute2" -FILES_${PN}-genl = "${base_sbindir}/genl" -FILES_${PN}-rtacct = "${base_sbindir}/rtacct" -FILES_${PN}-nstat = "${base_sbindir}/nstat" -FILES_${PN}-ss = "${base_sbindir}/ss" -FILES_${PN}-tipc = "${base_sbindir}/tipc" -FILES_${PN}-devlink = "${base_sbindir}/devlink" -FILES_${PN}-rdma = "${base_sbindir}/rdma" - -ALTERNATIVE_${PN}-ip = "ip" -ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}" -ALTERNATIVE_LINK_NAME[ip] = "${base_sbindir}/ip" -ALTERNATIVE_PRIORITY = "100" - -ALTERNATIVE_${PN}-tc = "tc" -ALTERNATIVE_LINK_NAME[tc] = "${base_sbindir}/tc" -ALTERNATIVE_PRIORITY_${PN}-tc = "100" diff --git a/meta-openeuler/recipes-core/iproute2/iproute2_5.15.0.bb b/meta-openeuler/recipes-core/iproute2/iproute2_5.15.0.bb deleted file mode 100644 index 6eb766732371981e797fe24745d66ec75b2f6039..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/iproute2/iproute2_5.15.0.bb +++ /dev/null @@ -1,11 +0,0 @@ -require iproute2.inc - -SRC_URI = "file://iproute/${BP}.tar.xz \ - file://iproute/bugfix-iproute2-3.10.0-fix-maddr-show.patch \ - file://iproute/bugfix-iproute2-change-proc-to-ipnetnsproc-which-is-private.patch \ - " - -SRC_URI[sha256sum] = "56d7dcb05b564c94cf6e4549cec2f93f2dc58085355c08dcb2a8f8249c946080" - -# CFLAGS are computed in Makefile and reference CCOPTS -EXTRA_OEMAKE_append = " CCOPTS='${CFLAGS}'" diff --git a/meta-openeuler/recipes-core/iptables/iptables/ip6tables.rules b/meta-openeuler/recipes-core/iptables/iptables/ip6tables.rules deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/meta-openeuler/recipes-core/iptables/iptables/ip6tables.service b/meta-openeuler/recipes-core/iptables/iptables/ip6tables.service deleted file mode 100644 index 6c059fca49b9d146138a1936fe81ea638e980708..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/iptables/iptables/ip6tables.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=IPv6 Packet Filtering Framework -Before=network-pre.target -Wants=network-pre.target - -[Service] -Type=oneshot -ExecStart=@SBINDIR@/ip6tables-restore -w -- @RULESDIR@/ip6tables.rules -ExecReload=@SBINDIR@/ip6tables-restore -w -- @RULESDIR@/ip6tables.rules -RemainAfterExit=yes - -[Install] -WantedBy=multi-user.target diff --git a/meta-openeuler/recipes-core/iptables/iptables/iptables.rules b/meta-openeuler/recipes-core/iptables/iptables/iptables.rules deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/meta-openeuler/recipes-core/iptables/iptables/iptables.service b/meta-openeuler/recipes-core/iptables/iptables/iptables.service deleted file mode 100644 index 0eb3c343de71535c67f47152526ec9e645565eca..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/iptables/iptables/iptables.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=IPv4 Packet Filtering Framework -Before=network-pre.target -Wants=network-pre.target - -[Service] -Type=oneshot -ExecStart=@SBINDIR@/iptables-restore -w -- @RULESDIR@/iptables.rules -ExecReload=@SBINDIR@/iptables-restore -w -- @RULESDIR@/iptables.rules -RemainAfterExit=yes - -[Install] -WantedBy=multi-user.target diff --git a/meta-openeuler/recipes-core/iptables/iptables_1.8.7.bb b/meta-openeuler/recipes-core/iptables/iptables_1.8.7.bb deleted file mode 100644 index a2fe0666ddc490941870208b96be8482c2d2794d..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/iptables/iptables_1.8.7.bb +++ /dev/null @@ -1,105 +0,0 @@ -SUMMARY = "Tools for managing kernel packet filtering capabilities" -DESCRIPTION = "iptables is the userspace command line program used to configure and control network packet \ -filtering code in Linux." -HOMEPAGE = "http://www.netfilter.org/" -BUGTRACKER = "http://bugzilla.netfilter.org/" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://iptables/iptables.c;beginline=13;endline=25;md5=c5cffd09974558cf27d0f763df2a12dc \ -" -SRC_URI = "file://iptables/iptables-${PV}.tar.bz2 \ - file://iptables/bugfix-add-check-fw-in-entry.patch \ - file://iptables.service \ - file://iptables.rules \ - file://ip6tables.service \ - file://ip6tables.rules \ - " -SRC_URI[sha256sum] = "c109c96bb04998cd44156622d36f8e04b140701ec60531a10668cfdff5e8d8f0" - -SYSTEMD_SERVICE_${PN} = "\ - iptables.service \ - ${@bb.utils.contains('PACKAGECONFIG', 'ipv6', 'ip6tables.service', '', d)} \ -" - -inherit autotools pkgconfig systemd - -EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR}" - -PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," - -# libnftnl recipe is in meta-networking layer(previously known as libnftables) -PACKAGECONFIG[libnftnl] = "--enable-nftables,--disable-nftables,libnftnl" - -do_configure_prepend() { - # Remove some libtool m4 files - # Keep ax_check_linker_flags.m4 which belongs to autoconf-archive. - rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 -} - -IPTABLES_RULES_DIR ?= "${sysconfdir}/${BPN}" - -do_install_append() { - install -d ${D}${IPTABLES_RULES_DIR} - install -m 0644 ${WORKDIR}/iptables.rules ${D}${IPTABLES_RULES_DIR} - - install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/iptables.service ${D}${systemd_system_unitdir} - - sed -i \ - -e 's,@SBINDIR@,${sbindir},g' \ - -e 's,@RULESDIR@,${IPTABLES_RULES_DIR},g' \ - ${D}${systemd_system_unitdir}/iptables.service - - if ${@bb.utils.contains('PACKAGECONFIG', 'ipv6', 'true', 'false', d)} ; then - install -m 0644 ${WORKDIR}/ip6tables.rules ${D}${IPTABLES_RULES_DIR} - install -m 0644 ${WORKDIR}/ip6tables.service ${D}${systemd_system_unitdir} - - sed -i \ - -e 's,@SBINDIR@,${sbindir},g' \ - -e 's,@RULESDIR@,${IPTABLES_RULES_DIR},g' \ - ${D}${systemd_system_unitdir}/ip6tables.service - fi -} - -PACKAGES =+ "${PN}-modules ${PN}-apply" -PACKAGES_DYNAMIC += "^${PN}-module-.*" - -python populate_packages_prepend() { - modules = do_split_packages(d, '${libdir}/xtables', r'lib(.*)\.so$', '${PN}-module-%s', '${PN} module %s', extra_depends='') - if modules: - metapkg = d.getVar('PN') + '-modules' - d.appendVar('RDEPENDS_' + metapkg, ' ' + ' '.join(modules)) -} - -RDEPENDS_${PN} = "${PN}-module-xt-standard" -RRECOMMENDS_${PN} = " \ - ${PN}-modules \ - kernel-module-x-tables \ - kernel-module-ip-tables \ - kernel-module-iptable-filter \ - kernel-module-iptable-nat \ - kernel-module-nf-defrag-ipv4 \ - kernel-module-nf-conntrack \ - kernel-module-nf-conntrack-ipv4 \ - kernel-module-nf-nat \ - kernel-module-ipt-masquerade \ - ${@bb.utils.contains('PACKAGECONFIG', 'ipv6', '\ - kernel-module-ip6table-filter \ - kernel-module-ip6-tables \ - ', '', d)} \ -" - -FILES_${PN} += "${datadir}/xtables" - -FILES_${PN}-apply = "${sbindir}/ip*-apply" -RDEPENDS_${PN}-apply = "${PN}" - -# Include the symlinks as well in respective packages -FILES_${PN}-module-xt-conntrack += "${libdir}/xtables/libxt_state.so" -FILES_${PN}-module-xt-ct += "${libdir}/xtables/libxt_NOTRACK.so" - -ALLOW_EMPTY_${PN}-modules = "1" - -INSANE_SKIP_${PN}-module-xt-conntrack = "dev-so" -INSANE_SKIP_${PN}-module-xt-ct = "dev-so" diff --git a/meta-openeuler/recipes-core/iSulad/iSulad_2.0.15.bb b/meta-openeuler/recipes-core/isulad/isulad_2.0.15.bb similarity index 46% rename from meta-openeuler/recipes-core/iSulad/iSulad_2.0.15.bb rename to meta-openeuler/recipes-core/isulad/isulad_2.0.15.bb index 5ac15ad3013b072d37239413a5f1c32686f9e149..86a16212a872a77ec93a6355c44d5a83d6bea182 100644 --- a/meta-openeuler/recipes-core/iSulad/iSulad_2.0.15.bb +++ b/meta-openeuler/recipes-core/isulad/isulad_2.0.15.bb @@ -1,12 +1,24 @@ -DESCRIPTION = "Yet Another JSON Library - A Portable JSON parsing and serialization library in ANSI C" -LICENSE = "MIT" - -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" - -SRC_URI = "file://iSulad/v${PV}.tar.gz" - -S = "${WORKDIR}/${BPN}-v${PV}" -WARN_QA_remove += "uppercase-pn" +SUMMARY = "A lightweight C++/C based container runtime daemon" +DESCRIPTION = "iSulad is a lightweight container runtime daemon which is designed for IOT and \ + Cloud infrastructure.iSulad has the characteristics of light, fast and not limited \ + by hardware specifications and architecture, and can be applied more widely" +HOMEPAGE = "https://gitee.com/openeuler/iSulad" +LICENSE = "MulanPSLv2" + +LIC_FILES_CHKSUM = "file://LICENSES/LICENSE;md5=1acb172ffd3d252285dd1b8b8459941e" + +OPENEULER_REPO_NAME = "iSulad" + +SRC_URI = "file://v${PV}.tar.gz \ + file://0001-do-not-use-tmpfile.patch \ + file://0002-use-only-TLS-v1.2-or-later.patch \ + file://0003-don-t-mount-shareable-dirs-if-user-set-mount-for-dev.patch \ + file://0004-tolerate-arch-unspecified-seccomp-profiles.patch \ + file://0005-add-a-CI-test-case-checking-seccomp-option.patch \ + file://0006-fix-cri-attach-when-stdout-and-stderr-are-false.patch \ + " + +S = "${WORKDIR}/iSulad-v${PV}" inherit cmake OECMAKE_GENERATOR = "Unix Makefiles" diff --git a/meta-openeuler/recipes-core/json-c/json-c_0.15.bb b/meta-openeuler/recipes-core/json-c/json-c_0.15.bb deleted file mode 100644 index 4c4e1af275f3b1fd342d58477b29621ec0d7efaf..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/json-c/json-c_0.15.bb +++ /dev/null @@ -1,16 +0,0 @@ -SUMMARY = "C bindings for apps which will manipulate JSON data" -DESCRIPTION = "JSON-C implements a reference counting object model that allows you to easily construct JSON objects in C." -HOMEPAGE = "https://github.com/json-c/json-c/wiki" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2" - -SRC_URI = "file://json-c/json-c-0.15-20200726.tar.gz" - -SRC_URI[sha256sum] = "4ba9a090a42cf1e12b84c64e4464bb6fb893666841d5843cc5bef90774028882" -UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" -UPSTREAM_CHECK_REGEX = "json-c-(?P\d+(\.\d+)+)-\d+" -S = "${WORKDIR}/json-c-json-c-0.15-20200726" -RPROVIDES_${PN} = "libjson" - -inherit cmake -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-core/kmod/kmod.inc b/meta-openeuler/recipes-core/kmod/kmod.inc deleted file mode 100644 index 8efb473332a8d152abd4648764a5fac524ea5b39..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/kmod/kmod.inc +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) 2012 Khem Raj -# Released under the MIT license (see COPYING.MIT for the terms) - -SUMMARY = "Tools for managing Linux kernel modules" -DESCRIPTION = "kmod is a set of tools to handle common tasks with Linux kernel modules like \ - insert, remove, list, check properties, resolve dependencies and aliases." -HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kmod/" -LICENSE = "GPL-2.0+ & LGPL-2.1+" -LICENSE_libkmod = "LGPL-2.1+" -SECTION = "base" - -LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ - file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ - file://tools/COPYING;md5=751419260aa954499f7abaabaa882bbe \ - " -inherit autotools pkgconfig manpages - -SRC_URI = "file://kmod/${BP}.tar.xz \ - file://kmod/0001-libkmod-module-check-new_from_name-return-value-in-g.patch \ - file://kmod/0002-Module-replace-the-module-with-new-module.patch \ - file://kmod/0003-Module-suspend-the-module-by-rmmod-r-option.patch \ - file://kmod/0004-don-t-check-module-s-refcnt-when-rmmod-with-r.patch \ - file://depmod-search.conf \ - " -SRC_URI[sha256sum] = "0b80eea7aa184ac6fd20cafa2a1fdf290ffecc70869a797079e2cc5c6225a52a" - -EXTRA_OECONF +=" --enable-tools --with-zlib" - -PACKAGECONFIG[debug] = "--enable-debug,--disable-debug" -PACKAGECONFIG[logging] = " --enable-logging,--disable-logging" -PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native" -PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz" -PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl" - -GTKDOC_DOCDIR = "${S}/libkmod/docs" diff --git a/meta-openeuler/recipes-core/kmod/kmod/depmod-search.conf b/meta-openeuler/recipes-core/kmod/kmod/depmod-search.conf deleted file mode 100644 index 527c0bb6eeb535bc8ed160b83e2b6f8487ec2c1c..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/kmod/kmod/depmod-search.conf +++ /dev/null @@ -1,6 +0,0 @@ -# -# /etc/depmod.d/depmod.conf -# - -search updates extramodules built-in - diff --git a/meta-openeuler/recipes-core/kmod/kmod/run-ptest b/meta-openeuler/recipes-core/kmod/kmod/run-ptest deleted file mode 100755 index 598dd2cb5fbad194a135e5d06601847e00df1586..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/kmod/kmod/run-ptest +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -touch testsuite/stamp-rootfs -tar xf testmodule.tar -make -k runtest-TESTS 2>/dev/null| grep -e ^PASS -e ^FAIL -find testsuite -name *.ko -exec rm -f {} \; diff --git a/meta-openeuler/recipes-core/kmod/kmod_29.bb b/meta-openeuler/recipes-core/kmod/kmod_29.bb deleted file mode 100644 index 5ab65d6e8be576b539c5500d1fee93ef23aae53e..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/kmod/kmod_29.bb +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright (C) 2012 Khem Raj -# Released under the MIT license (see COPYING.MIT for the terms) - -require kmod.inc - -DEPENDS += "zlib" -PROVIDES += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" -RPROVIDES_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" -RCONFLICTS_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" -RREPLACES_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" - -# to force user to remove old module-init-tools and replace them with kmod variants -RCONFLICTS_libkmod2 += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" - -# autotools set prefix to /usr, however we want them in /bin and /sbin -EXTRA_OECONF += " --bindir=${base_bindir} --sbindir=${base_sbindir}" - -do_install_append () { - install -dm755 ${D}${base_bindir} - install -dm755 ${D}${base_sbindir} - # add symlinks to kmod - lnr ${D}${base_bindir}/kmod ${D}${base_bindir}/lsmod - for tool in insmod rmmod depmod modinfo modprobe; do - lnr ${D}${base_bindir}/kmod ${D}${base_sbindir}/${tool} - done - # configuration directories - install -dm755 ${D}${base_libdir}/depmod.d - install -dm755 ${D}${base_libdir}/modprobe.d - install -dm755 ${D}${sysconfdir}/depmod.d - install -dm755 ${D}${sysconfdir}/modprobe.d - - # install depmod.d file for search/ dir - install -Dm644 "${WORKDIR}/depmod-search.conf" "${D}${base_libdir}/depmod.d/search.conf" -} - -do_compile_prepend() { - sed -i 's/ac_pwd=/#ac_pwd=/' config.status ; sed -i "/#ac_pwd=/a\ac_pwd='.'" config.status -} - -ALTERNATIVE_PRIORITY = "70" - -ALTERNATIVE_kmod = "insmod modprobe rmmod modinfo bin-lsmod lsmod depmod" - -ALTERNATIVE_LINK_NAME[insmod] = "${base_sbindir}/insmod" -ALTERNATIVE_LINK_NAME[modprobe] = "${base_sbindir}/modprobe" -ALTERNATIVE_LINK_NAME[rmmod] = "${base_sbindir}/rmmod" -ALTERNATIVE_LINK_NAME[modinfo] = "${base_sbindir}/modinfo" -ALTERNATIVE_LINK_NAME[bin-lsmod] = "${base_bindir}/lsmod" - -ALTERNATIVE_LINK_NAME[lsmod] = "${base_sbindir}/lsmod" -ALTERNATIVE_TARGET[lsmod] = "${base_bindir}/lsmod.${BPN}" - -ALTERNATIVE_LINK_NAME[depmod] = "${base_sbindir}/depmod" - -PACKAGES =+ "${PN}-bash-completion libkmod" - -FILES_${PN}-bash-completion = "${datadir}/bash-completion/completions" -FILES_libkmod = "${base_libdir}/libkmod*${SOLIBS} ${libdir}/libkmod*${SOLIBS}" -FILES_${PN} += "${base_libdir}/depmod.d ${base_libdir}/modprobe.d" - -BBCLASSEXTEND = "nativesdk" diff --git a/meta-openeuler/recipes-core/lcr/lcr_2.0.8.bb b/meta-openeuler/recipes-core/lcr/lcr_2.0.8.bb index 003b2684e9ffc33e7ee043242816894acc756262..6ffd8dcdedabc224ef30be054d3e93212cc63af4 100644 --- a/meta-openeuler/recipes-core/lcr/lcr_2.0.8.bb +++ b/meta-openeuler/recipes-core/lcr/lcr_2.0.8.bb @@ -14,8 +14,10 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;m inherit cmake ### Build metadata -SRC_URI = "file://lcr/v${PV}.tar.gz \ - file://lcr/0001-feat-Add-json-spec-for-rest-resize-api.patch \ +SRC_URI = "file://v${PV}.tar.gz \ + file://0001-feat-Add-json-spec-for-rest-resize-api.patch \ + file://0002-add-HAVE_ISULAD-definition-for-lxc-header.patch \ + file://0003-fix-cpu-quota-out-of-range-when-update-to-1.patch \ " S = "${WORKDIR}/${BPN}-v${PV}" diff --git a/meta-openeuler/recipes-core/less/less_590.bb b/meta-openeuler/recipes-core/less/less_590.bb deleted file mode 100644 index 2f65a251b26fdcbc8e83782ab806d8b813f999aa..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/less/less_590.bb +++ /dev/null @@ -1,42 +0,0 @@ -SUMMARY = "Text file viewer similar to more" -DESCRIPTION = "Less is a program similar to more, i.e. a terminal \ -based program for viewing text files and the output from other \ -programs. Less offers many features beyond those that more does." -HOMEPAGE = "http://www.greenwoodsoftware.com/" -SECTION = "console/utils" - -# (GPLv2+ (<< 418), GPLv3+ (>= 418)) | less -# Including email author giving permissing to use BSD -# -# From: Mark Nudelman -# To: Elizabeth Flanagan ${S}/acinclude.m4 - fi - sed -i -e's,^V_RPATH_OPT=.*$,V_RPATH_OPT=,' ${S}/pcap-config.in -} - -BBCLASSEXTEND = "native" diff --git a/meta-openeuler/recipes-core/libpcre/libpcre/Makefile b/meta-openeuler/recipes-core/libpcre/libpcre/Makefile deleted file mode 100644 index 708d807d0850e4e8b0294ee027a63710e8eb6955..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/libpcre/libpcre/Makefile +++ /dev/null @@ -1,183 +0,0 @@ -TESTS = pcre_stringpiece_unittest RunTest RunGrepTest -subdir = . -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__tty_colors_dummy = \ - mgn= red= grn= lgn= blu= brg= std=; \ - am__color_tests=no -am__tty_colors = { \ - $(am__tty_colors_dummy); \ - if test "X$(AM_COLOR_TESTS)" = Xno; then \ - am__color_tests=no; \ - elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ - am__color_tests=yes; \ - elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ - am__color_tests=yes; \ - fi; \ - if test $$am__color_tests = yes; then \ - red=''; \ - grn=''; \ - lgn=''; \ - blu=''; \ - mgn=''; \ - brg=''; \ - std=''; \ - fi; \ -} -am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } -am__sh_e_setup = case $$- in *e*) set +e;; esac -am__common_driver_flags = \ - --color-tests "$$am__color_tests" \ - --enable-hard-errors "$$am__enable_hard_errors" \ - --expect-failure "$$am__expect_failure" -am__check_pre = \ -$(am__sh_e_setup); \ -$(am__vpath_adj_setup) $(am__vpath_adj) \ -$(am__tty_colors); \ -srcdir=$(srcdir); export srcdir; \ -case "$@" in \ - */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ - *) am__odir=.;; \ -esac; \ -test "x$$am__odir" = x"." || test -d "$$am__odir" \ - || $(MKDIR_P) "$$am__odir" || exit $$?; \ -if test -f "./$$f"; then dir=./; \ -elif test -f "$$f"; then dir=; \ -else dir="$(srcdir)/"; fi; \ -tst=$$dir$$f; log='$@'; \ -if test -n '$(DISABLE_HARD_ERRORS)'; then \ - am__enable_hard_errors=no; \ -else \ - am__enable_hard_errors=yes; \ -fi; -am__set_TESTS_bases = \ - bases='$(TEST_LOGS)'; \ - bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ - bases=`echo $$bases` -RECHECK_LOGS = $(TEST_LOGS) -TEST_SUITE_LOG = test-suite.log -TEST_EXTENSIONS = .test -LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver -am__test_logs1 = $(TESTS:=.log) -am__test_logs2 = $(am__test_logs1:.log=.log) -TEST_LOGS = $(am__test_logs2:.test.log=.log) -MKDIR_P = /bin/mkdir -p -PACKAGE_STRING = PCRE 8.36 -SHELL = /bin/sh -srcdir = . -top_srcdir = . -$(TEST_SUITE_LOG): $(TEST_LOGS) - @$(am__set_TESTS_bases); \ - am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ - redo_bases=`for i in $$bases; do \ - am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ - done`; \ - st=0; \ - errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ - for i in $$redo_bases; do \ - test -f $$i.trs && test -r $$i.trs \ - || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ - test -f $$i.log && test -r $$i.log \ - || { echo "$$errmsg $$i.log" >&2; st=1; }; \ - done; \ - test $$st -eq 0 || exit 1; - @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ - ws='[ ]'; \ - results=`for b in $$bases; do echo $$b.trs; done`; \ - test -n "$$results" || results=/dev/null; \ - all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ - pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ - fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ - skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ - xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ - xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ - error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ - if test `expr $$fail + $$xpass + $$error` -eq 0; then \ - success=true; \ - else \ - success=false; \ - fi; \ - br='==================='; br=$$br$$br$$br$$br; \ - result_count () \ - { \ - if test x"$$1" = x"--maybe-color"; then \ - maybe_colorize=yes; \ - elif test x"$$1" = x"--no-color"; then \ - maybe_colorize=no; \ - else \ - echo "$@: invalid 'result_count' usage" >&2; exit 4; \ - fi; \ - shift; \ - desc=$$1 count=$$2; \ - if test $$maybe_colorize = yes && test $$count -gt 0; then \ - color_start=$$3 color_end=$$std; \ - else \ - color_start= color_end=; \ - fi; \ - echo "$${color_start}# $$desc $$count$${color_end}"; \ - }; \ - create_testsuite_report () \ - { \ - result_count $$1 "TOTAL:" $$all "$$brg"; \ - result_count $$1 "PASS: " $$pass "$$grn"; \ - result_count $$1 "SKIP: " $$skip "$$blu"; \ - result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ - result_count $$1 "FAIL: " $$fail "$$red"; \ - result_count $$1 "XPASS:" $$xpass "$$red"; \ - result_count $$1 "ERROR:" $$error "$$mgn"; \ - }; \ - { \ - echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ - $(am__rst_title); \ - create_testsuite_report --no-color; \ - echo; \ - echo ".. contents:: :depth: 2"; \ - echo; \ - for b in $$bases; do echo $$b; done; \ - } >$(TEST_SUITE_LOG).tmp || exit 1; \ - mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ - if $$success; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ - fi; \ - echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ - echo "$${col}$$br$${std}"; \ - create_testsuite_report --maybe-color; \ - echo "$$col$$br$$std"; \ - if $$success; then :; else \ - echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ - echo "$$col$$br$$std"; \ - fi; \ - $$success || exit 1 -check-TESTS: - @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - log_list=`echo $$log_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ - exit $$?; -pcre_stringpiece_unittest.log: pcre_stringpiece_unittest$(EXEEXT) - @p='pcre_stringpiece_unittest$(EXEEXT)'; \ - b='pcre_stringpiece_unittest'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) -- "$$tst" -RunTest.log: RunTest - @p='RunTest'; \ - b='RunTest'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) -- "$$tst" -RunGrepTest.log: RunGrepTest - @p='RunGrepTest'; \ - b='RunGrepTest'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) -- "$$tst" diff --git a/meta-openeuler/recipes-core/libpcre/libpcre/run-ptest b/meta-openeuler/recipes-core/libpcre/libpcre/run-ptest deleted file mode 100644 index 990d4a12ad67df8b1492914e80fd0281393469da..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/libpcre/libpcre/run-ptest +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -make check-TESTS diff --git a/meta-openeuler/recipes-core/libpcre/libpcre_8.45.bb b/meta-openeuler/recipes-core/libpcre/libpcre_8.45.bb deleted file mode 100644 index a83d9c6c63fee19525819ce39064b22d9502b02f..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/libpcre/libpcre_8.45.bb +++ /dev/null @@ -1,74 +0,0 @@ -DESCRIPTION = "The PCRE library is a set of functions that implement regular \ -expression pattern matching using the same syntax and semantics as Perl 5. PCRE \ -has its own native API, as well as a set of wrapper functions that correspond \ -to the POSIX regular expression API." -SUMMARY = "Perl Compatible Regular Expressions" -HOMEPAGE = "http://www.pcre.org" -SECTION = "devel" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENCE;md5=b5d5d1a69a24ea2718263f1ff85a1c58" -SRC_URI = "file://pcre/pcre-${PV}.tar.bz2 \ - file://run-ptest \ - file://Makefile \ - " - -SRC_URI[md5sum] = "4452288e6a0eefb2ab11d36010a1eebb" -SRC_URI[sha256sum] = "4dae6fdcd2bb0bb6c37b5f97c33c2be954da743985369cddac3546e3218bffb8" - -CVE_PRODUCT = "pcre" - -S = "${WORKDIR}/pcre-${PV}" - -PROVIDES += "pcre" -DEPENDS += "bzip2 zlib" - -PACKAGECONFIG ??= "pcre8 unicode-properties jit" - -PACKAGECONFIG[pcre8] = "--enable-pcre8,--disable-pcre8" -PACKAGECONFIG[pcre16] = "--enable-pcre16,--disable-pcre16" -PACKAGECONFIG[pcre32] = "--enable-pcre32,--disable-pcre32" -PACKAGECONFIG[pcretest-readline] = "--enable-pcretest-libreadline,--disable-pcretest-libreadline,readline," -PACKAGECONFIG[unicode-properties] = "--enable-unicode-properties,--disable-unicode-properties" -PACKAGECONFIG[jit] = "--enable-jit=auto,--disable-jit" - -BINCONFIG = "${bindir}/pcre-config" - -inherit autotools binconfig-disabled ptest - -EXTRA_OECONF = "--enable-utf" - -PACKAGES =+ "libpcrecpp libpcreposix pcregrep pcregrep-doc pcretest pcretest-doc" - -SUMMARY_libpcrecpp = "${SUMMARY} - C++ wrapper functions" -SUMMARY_libpcreposix = "${SUMMARY} - C wrapper functions based on the POSIX regex API" -SUMMARY_pcregrep = "grep utility that uses perl 5 compatible regexes" -SUMMARY_pcregrep-doc = "grep utility that uses perl 5 compatible regexes - docs" -SUMMARY_pcretest = "program for testing Perl-comatible regular expressions" -SUMMARY_pcretest-doc = "program for testing Perl-comatible regular expressions - docs" - -FILES_libpcrecpp = "${libdir}/libpcrecpp.so.*" -FILES_libpcreposix = "${libdir}/libpcreposix.so.*" -FILES_pcregrep = "${bindir}/pcregrep" -FILES_pcregrep-doc = "${mandir}/man1/pcregrep.1" -FILES_pcretest = "${bindir}/pcretest" -FILES_pcretest-doc = "${mandir}/man1/pcretest.1" - -BBCLASSEXTEND = "native nativesdk" - -do_install_ptest() { - t=${D}${PTEST_PATH} - cp ${WORKDIR}/Makefile $t - cp -r ${S}/testdata $t - for i in pcre_stringpiece_unittest pcregrep pcretest; \ - do cp ${B}/.libs/$i $t; \ - done - for i in RunTest RunGrepTest test-driver; \ - do cp ${S}/$i $t; \ - done - # Skip the fr_FR locale test. If the locale fr_FR is found, it is tested. - # If not found, the test is skipped. The test program assumes fr_FR is non-UTF-8 - # locale so the test fails if fr_FR is UTF-8 locale. - sed -i -e 's:do3=yes:do3=no:g' ${D}${PTEST_PATH}/RunTest -} - -RDEPENDS_${PN}-ptest += "make" diff --git a/meta-openeuler/recipes-core/libtirpc/libtirpc_1.3.2.bb b/meta-openeuler/recipes-core/libtirpc/libtirpc_1.3.2.bb deleted file mode 100644 index c4d06b5055c2c888cca24803a2743013fd4e5dd7..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/libtirpc/libtirpc_1.3.2.bb +++ /dev/null @@ -1,27 +0,0 @@ -SUMMARY = "Transport-Independent RPC library" -DESCRIPTION = "Libtirpc is a port of Suns Transport-Independent RPC library to Linux" -SECTION = "libs/network" -HOMEPAGE = "http://sourceforge.net/projects/libtirpc/" -BUGTRACKER = "http://sourceforge.net/tracker/?group_id=183075&atid=903784" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://COPYING;md5=f835cce8852481e4b2bbbdd23b5e47f3 \ - file://src/netname.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24" - -PROVIDES = "virtual/librpc" - -SRC_URI = "file://libtirpc/libtirpc-${PV}.tar.bz2 \ - file://libtirpc/0001-update-libtirpc-to-enable-tcp-port-listening.patch \ -" -UPSTREAM_CHECK_URI = "https://gitee.com/src-openeuler/libtirpc" -UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)/" -SRC_URI[sha256sum] = "245895caf066bec5e3d4375942c8cb4366adad184c29c618d97f724ea309ee17" - -inherit autotools pkgconfig - -EXTRA_OECONF = "--disable-gssapi" - -do_install_append() { - chown root:root ${D}${sysconfdir}/netconfig -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-core/libusb/libusb1/run-ptest b/meta-openeuler/recipes-core/libusb/libusb1/run-ptest deleted file mode 100755 index eaa47a2bc4f074dc3e68b680b64045e992ff935c..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/libusb/libusb1/run-ptest +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -echo -echo "---------------------------- libusb1 tests ---------------------------" -echo - -./stress | { \ -while read -r str -do - echo "$str" - if [ "${str#*Starting test run:}" != "$str" ] - then - name="${str#Starting test run: }" - name="${name%...}" - else - case "$str" in - "Success (0)") - echo "PASS: $name" - ;; - "Failure (1)" | "Error (2)") - echo "FAIL: $name" - ;; - "Skip (3)") - echo "SKIP: $name" - ;; - esac - fi -done -} diff --git a/meta-openeuler/recipes-core/libusb/libusb1_1.0.24.bb b/meta-openeuler/recipes-core/libusb/libusb1_1.0.24.bb deleted file mode 100644 index 3353b0c7024f7f5897b0c43226d39450b9ff0d11..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/libusb/libusb1_1.0.24.bb +++ /dev/null @@ -1,45 +0,0 @@ -SUMMARY = "Userspace library to access USB (version 1.0)" -DESCRIPTION = "A cross-platform library to access USB devices from Linux, \ -macOS, Windows, OpenBSD/NetBSD, Haiku and Solaris userspace." -HOMEPAGE = "http://libusb.sf.net" -BUGTRACKER = "http://www.libusb.org/report" -SECTION = "libs" - -LICENSE = "LGPLv2.1+" -LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" - -BBCLASSEXTEND = "native nativesdk" - -SRC_URI = "file://libusbx/libusb-${PV}.tar.bz2 \ - file://run-ptest \ - " - -SRC_URI[sha256sum] = "7efd2685f7b327326dcfb85cee426d9b871fd70e22caa15bb68d595ce2a2b12a" - -S = "${WORKDIR}/libusb-${PV}" - -inherit autotools pkgconfig ptest - -PACKAGECONFIG-class-target ??= "" -PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,udev" - -EXTRA_OECONF = "--libdir=${base_libdir} --disable-udev" - -do_install_append() { - install -d ${D}${libdir} - if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then - mv ${D}${base_libdir}/pkgconfig ${D}${libdir} - fi -} - -do_compile_ptest() { - oe_runmake -C tests stress -} - -do_install_ptest() { - install -m 755 ${B}/tests/.libs/stress ${D}${PTEST_PATH} -} - -FILES_${PN} += "${base_libdir}/*.so.*" - -FILES_${PN}-dev += "${base_libdir}/*.so ${base_libdir}/*.la" diff --git a/meta-openeuler/recipes-core/libwebsockets/libwebsockets_4.3.0.bb b/meta-openeuler/recipes-core/libwebsockets/libwebsockets_4.3.0.bb deleted file mode 100644 index d8f4e62675d595c2cb9439ef370ab9d17a55f8e0..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/libwebsockets/libwebsockets_4.3.0.bb +++ /dev/null @@ -1,41 +0,0 @@ -DESCRIPTION = "Yet Another JSON Library - A Portable JSON parsing and serialization library in ANSI C" -LICENSE = "MIT" - -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" - -SRC_URI = "file://libwebsockets/${BP}.tar.gz \ - file://libwebsockets/0001-add-secure-compile-option-in-Makefile.patch \ - file://libwebsockets/0002-solve-the-BEP-problem.patch \ -" - -S = "${WORKDIR}/${BP}" - -inherit cmake - -DEPENDS = "zlib openssl" - -EXTRA_OECMAKE = "-DLWS_WITH_HTTP2=ON -DLWS_IPV6=ON -DLWS_WITH_ZIP_FOPS=ON -DLWS_WITH_SOCKS5=ON -DLWS_WITH_RANGES=ON -DLWS_WITH_ACME=ON \ - -DLWS_WITH_LIBUV=OFF -DLWS_WITH_LIBEV=OFF -DLWS_WITH_LIBEVENT=OFF -DLWS_WITH_FTS=ON -DLWS_WITH_THREADPOOL=ON -DLWS_UNIX_SOCK=ON \ - -DLWS_WITH_HTTP_PROXY=ON -DLWS_WITH_DISKCACHE=ON -DLWS_WITH_LWSAC=ON -DLWS_LINK_TESTAPPS_DYNAMIC=ON -DLWS_WITHOUT_BUILTIN_GETIFADDRS=ON -DLWS_USE_BUNDLED_ZLIB=OFF \ - -DLWS_WITHOUT_BUILTIN_SHA1=ON \ - -DLWS_WITH_STATIC=OFF \ - -DLWS_WITHOUT_CLIENT=OFF \ - -DLWS_WITHOUT_SERVER=OFF \ - -DLWS_WITHOUT_TESTAPPS=OFF \ - -DLWS_WITHOUT_TEST_SERVER=ON \ - -DLWS_WITHOUT_TEST_SERVER_EXTPOLL=ON \ - -DLWS_WITHOUT_TEST_PING=ON \ - -DLWS_WITHOUT_TEST_CLIENT=ON \ - " - -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" - -FILES_${PN} += "${libdir}/*" -INSANE_SKIP_${PN} += "already-stripped" -INSANE_SKIP_${PN} += "dev-so" -FILES_SOLIBSDEV = "" - -do_install_append() { - rm -rf ${D}/usr/share - ${STRIP} ${D}/${libdir}/*.so* -} diff --git a/meta-openeuler/recipes-core/libxml/libxml2/run-ptest b/meta-openeuler/recipes-core/libxml/libxml2/run-ptest deleted file mode 100644 index c313d83263a825640803559dfe97041c1492328b..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/libxml/libxml2/run-ptest +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -export LC_ALL=en_US.UTF-8 -make -k runtests diff --git a/meta-openeuler/recipes-core/libxml/libxml2_%.bbappend b/meta-openeuler/recipes-core/libxml/libxml2_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..4c33442675acd311dfa8d10dd1c73a0d263da525 --- /dev/null +++ b/meta-openeuler/recipes-core/libxml/libxml2_%.bbappend @@ -0,0 +1,56 @@ +# version in openEuler +PV = "2.9.12" + +# remove patches can't apply +SRC_URI_remove = "http://www.xmlsoft.org/sources/libxml2-${PV}.tar.gz;name=libtar \ + http://www.w3.org/XML/Test/xmlts20080827.tar.gz;subdir=${BP};name=testtar \ + file://libxml-m4-use-pkgconfig.patch \ + file://0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch \ + file://CVE-2020-7595.patch \ + file://CVE-2019-20388.patch \ + file://CVE-2020-24977.patch \ + file://fix-python39.patch \ + file://CVE-2021-3517.patch \ + file://CVE-2021-3516.patch \ + file://CVE-2021-3518-0001.patch \ + file://CVE-2021-3518-0002.patch \ + file://CVE-2021-3537.patch \ + file://CVE-2021-3541.patch \ +" + +# apply openEuler source package +SRC_URI_prepend = "file://libxml2/${BP}.tar.gz \ +" + +# add patches in openEuler +SRC_URI += "file://libxml2/libxml2-multilib.patch \ + file://libxml2/Fix-XPath-recursion-limit.patch \ + file://libxml2/Fix-Null-deref-in-xmlSchemaGetComponentTargetNs.patch \ + file://libxml2/Fix-memleaks-in-xmlXIncludeProcessFlags.patch \ + file://libxml2/xmlAddChild-and-xmlAddNextSibling-may-not-attach-the.patch \ + file://libxml2/Work-around-lxml-API-abuse.patch \ + file://libxml2/Fix-regression-in-xmlNodeDumpOutputInternal.patch \ + file://libxml2/Fix-whitespace-when-serializing-empty-HTML-documents.patch \ + file://libxml2/Patch-to-forbid-epsilon-reduction-of-final-states.patch \ + file://libxml2/Fix-buffering-in-xmlOutputBufferWrite.patch \ + file://libxml2/backport-CVE-2022-23308-Use-after-free-of-ID-and-IDREF-attrib.patch \ +" + +# checksum changed +SRC_URI[sha256sum] = "c8d6681e38c56f172892c85ddc0852e1fd4b53b4209e7f4ebf17f7e2eae71d92" + +LIC_FILES_CHKSUM = "file://Copyright;md5=2044417e2e5006b65a8b9067b683fcf1 \ + file://hash.c;beginline=6;endline=15;md5=e77f77b12cb69e203d8b4090a0eee879 \ + file://list.c;beginline=4;endline=13;md5=b9c25b021ccaf287e50060602d20f3a7 \ + file://trio.c;beginline=5;endline=14;md5=cd4f61e27f88c1d43df112966b1cd28f \ +" + +# remove python config, because openEuler not support python yet. +PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'python', 'python3', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ +" + +# remove test configuration, because test package not in openEuler +do_configure_remove() { + find ${S}/xmlconf/ -type f -exec chmod -x {} \+ +} diff --git a/meta-openeuler/recipes-core/libxml/libxml2_2.9.12.bb b/meta-openeuler/recipes-core/libxml/libxml2_2.9.12.bb deleted file mode 100644 index 1664216ec8f0a60399ee4bf0aa4c48f6ad4f7aef..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/libxml/libxml2_2.9.12.bb +++ /dev/null @@ -1,104 +0,0 @@ -SUMMARY = "XML C Parser Library and Toolkit" -DESCRIPTION = "The XML Parser Library allows for manipulation of XML files. Libxml2 exports Push and Pull type parser interfaces for both XML and HTML. It can do DTD validation at parse time, on a parsed document instance or with an arbitrary DTD. Libxml2 includes complete XPath, XPointer and Xinclude implementations. It also has a SAX like interface, which is designed to be compatible with Expat." -HOMEPAGE = "http://www.xmlsoft.org/" -BUGTRACKER = "http://bugzilla.gnome.org/buglist.cgi?product=libxml2" -SECTION = "libs" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://Copyright;md5=2044417e2e5006b65a8b9067b683fcf1 \ - file://hash.c;beginline=6;endline=15;md5=e77f77b12cb69e203d8b4090a0eee879 \ - file://list.c;beginline=4;endline=13;md5=b9c25b021ccaf287e50060602d20f3a7 \ - file://trio.c;beginline=5;endline=14;md5=cd4f61e27f88c1d43df112966b1cd28f \ -" - -DEPENDS = "zlib virtual/libiconv" - -SRC_URI = "file://libxml2/${BP}.tar.gz \ - file://libxml2/libxml2-multilib.patch \ - file://libxml2/Fix-XPath-recursion-limit.patch \ - file://libxml2/Fix-Null-deref-in-xmlSchemaGetComponentTargetNs.patch \ - file://libxml2/Fix-memleaks-in-xmlXIncludeProcessFlags.patch \ - file://libxml2/xmlAddChild-and-xmlAddNextSibling-may-not-attach-the.patch \ - file://libxml2/Work-around-lxml-API-abuse.patch \ - file://libxml2/Fix-regression-in-xmlNodeDumpOutputInternal.patch \ - file://libxml2/Fix-whitespace-when-serializing-empty-HTML-documents.patch \ - file://libxml2/Patch-to-forbid-epsilon-reduction-of-final-states.patch \ - file://libxml2/Fix-buffering-in-xmlOutputBufferWrite.patch \ - file://libxml2/backport-CVE-2022-23308-Use-after-free-of-ID-and-IDREF-attrib.patch \ - file://run-ptest \ -" - -SRC_URI[sha256sum] = "c8d6681e38c56f172892c85ddc0852e1fd4b53b4209e7f4ebf17f7e2eae71d92" - -BINCONFIG = "${bindir}/xml2-config" - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" - -PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python3" -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," - -inherit autotools pkgconfig binconfig-disabled ptest python3native - -RDEPENDS_${PN}-ptest += "make ${@bb.utils.contains('PACKAGECONFIG', 'python', 'libgcc python3-core python3-logging python3-shell python3-stringold python3-threading python3-unittest ${PN}-python', '', d)}" - -RDEPENDS_${PN}-python += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-core', '', d)}" - -RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-ebcdic-us \ - glibc-gconv-ibm1141 \ - glibc-gconv-iso8859-5 \ - glibc-gconv-euc-jp \ - locale-base-en-us \ - " - -export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}" - -# WARNING: zlib is required for RPM use -EXTRA_OECONF = "--without-debug --without-legacy --without-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions" -EXTRA_OECONF_class-native = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib" -EXTRA_OECONF_class-nativesdk = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib" -EXTRA_OECONF_linuxstdbase = "--with-debug --with-legacy --with-docbook --with-c14n --without-lzma --with-zlib" - -python populate_packages_prepend () { - # autonamer would call this libxml2-2, but we don't want that - if d.getVar('DEBIAN_NAMES'): - d.setVar('PKG_libxml2', '${MLPREFIX}libxml2') -} - -PACKAGE_BEFORE_PN += "${PN}-utils" -PACKAGES += "${PN}-python" - -FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" -FILES_${PN}-dev += "${libdir}/xml2Conf.sh ${libdir}/cmake/*" -FILES_${PN}-utils = "${bindir}/*" -FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}" - -do_compile_ptest() { - oe_runmake check-am -} - -do_install_ptest () { - cp -r ${S}/xmlconf ${D}${PTEST_PATH} - if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then - sed -i -e 's|^\(PYTHON = \).*|\1${USRBINPATH}/${PYTHON_PN}|' \ - ${D}${PTEST_PATH}/python/tests/Makefile - grep -lrZ '#!/usr/bin/python' ${D}${PTEST_PATH}/python | - xargs -0 sed -i -e 's|/usr/bin/python|${USRBINPATH}/${PYTHON_PN}|' - fi - #Remove build host references from various Makefiles - find "${D}${PTEST_PATH}" -name Makefile -type f -exec \ - sed -i \ - -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ - -e 's|${DEBUG_PREFIX_MAP}||g' \ - -e 's:${HOSTTOOLS_DIR}/::g' \ - -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ - -e 's:${RECIPE_SYSROOT}::g' \ - -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ - -e '/^RELDATE/d' \ - {} + -} - -do_install_append_class-native () { - # Docs are not needed in the native case - rm ${D}${datadir}/gtk-doc -rf -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-core/logrotate/logrotate_3.20.1.bb b/meta-openeuler/recipes-core/logrotate/logrotate_3.20.1.bb deleted file mode 100644 index 1baa75aaf5257aa6ddf295a9360837ef78b009df..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/logrotate/logrotate_3.20.1.bb +++ /dev/null @@ -1,86 +0,0 @@ -SUMMARY = "Rotates, compresses, removes and mails system log files" -SECTION = "console/utils" -HOMEPAGE = "https://github.com/logrotate/logrotate/" -DESCRIPTION = "The logrotate utility is designed to simplify the administration of log files on a system which generates a lot of log files." -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -DEPENDS = "popt" - -SRC_URI = "file://${BPN}/${BP}.tar.xz\ - file://${BPN}/0001-logrotate-3.20.1-lock-state-msg.patch" -UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" -UPSTREAM_CHECK_REGEX = "logrotate-(?P\d+(\.\d+)+).tar" - -# These CVEs are debian, gentoo or SUSE specific on the way logrotate was installed/used -CVE_CHECK_WHITELIST += "CVE-2011-1548 CVE-2011-1549 CVE-2011-1550" - -PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)}" - -PACKAGECONFIG[acl] = ",,acl" -PACKAGECONFIG[selinux] = ",,libselinux" - -CONFFILES_${PN} += "${localstatedir}/lib/logrotate.status \ - ${sysconfdir}/logrotate.conf \ - ${sysconfdir}/logrotate.d/btmp \ - ${sysconfdir}/logrotate.d/wtmp" - -# If RPM_OPT_FLAGS is unset, it adds -g itself rather than obeying our -# optimization variables, so use it rather than EXTRA_CFLAGS. -EXTRA_OEMAKE = "\ - LFS= \ - OS_NAME='${OS_NAME}' \ - 'CC=${CC}' \ - 'RPM_OPT_FLAGS=${CFLAGS}' \ - 'EXTRA_LDFLAGS=${LDFLAGS}' \ - ${@bb.utils.contains('PACKAGECONFIG', 'acl', 'WITH_ACL=yes', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'selinux', 'WITH_SELINUX=yes', '', d)} \ -" - -# OS_NAME in the makefile defaults to `uname -s`. The behavior for -# freebsd/netbsd is questionable, so leave it as Linux, which only sets -# INSTALL=install and BASEDIR=/usr. -OS_NAME = "Linux" - -inherit autotools systemd - -SYSTEMD_SERVICE_${PN} = "\ - ${BPN}.service \ - ${BPN}.timer \ -" - -LOGROTATE_OPTIONS ?= "" - -LOGROTATE_SYSTEMD_TIMER_BASIS ?= "daily" -LOGROTATE_SYSTEMD_TIMER_ACCURACY ?= "12h" -LOGROTATE_SYSTEMD_TIMER_PERSISTENT ?= "true" - -do_install(){ - oe_runmake install DESTDIR=${D} PREFIX=${D} MANDIR=${mandir} - mkdir -p ${D}${sysconfdir}/logrotate.d - mkdir -p ${D}${localstatedir}/lib - install -p -m 644 ${S}/examples/logrotate.conf ${D}${sysconfdir}/logrotate.conf - install -p -m 644 ${S}/examples/btmp ${D}${sysconfdir}/logrotate.d/btmp - install -p -m 644 ${S}/examples/wtmp ${D}${sysconfdir}/logrotate.d/wtmp - touch ${D}${localstatedir}/lib/logrotate.status - - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}${systemd_system_unitdir} - install -m 0644 ${S}/examples/logrotate.service ${D}${systemd_system_unitdir}/logrotate.service - install -m 0644 ${S}/examples/logrotate.timer ${D}${systemd_system_unitdir}/logrotate.timer - [ -z "${LOGROTATE_OPTIONS}" ] || - sed -ri \ - -e 's|(ExecStart=.*/logrotate.*)$|\1 ${LOGROTATE_OPTIONS}|g' \ - ${D}${systemd_system_unitdir}/logrotate.service - sed -ri \ - -e 's|(OnCalendar=).*$|\1${LOGROTATE_SYSTEMD_TIMER_BASIS}|g' \ - -e 's|(AccuracySec=).*$|\1${LOGROTATE_SYSTEMD_TIMER_ACCURACY}|g' \ - -e 's|(Persistent=).*$|\1${LOGROTATE_SYSTEMD_TIMER_PERSISTENT}|g' \ - ${D}${systemd_system_unitdir}/logrotate.timer - fi - - if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then - mkdir -p ${D}${sysconfdir}/cron.daily - install -p -m 0755 ${S}/examples/logrotate.cron ${D}${sysconfdir}/cron.daily/logrotate - fi -} diff --git a/meta-openeuler/recipes-core/lxc/lxc/support_arm32.patch b/meta-openeuler/recipes-core/lxc/lxc/support_arm32.patch index 6b4a9eace2416044a941be3c093096cace5da397..9ee71b315eda4fccdce84220a1334082eca5de9f 100644 --- a/meta-openeuler/recipes-core/lxc/lxc/support_arm32.patch +++ b/meta-openeuler/recipes-core/lxc/lxc/support_arm32.patch @@ -18,35 +18,6 @@ index 9eb6dcb..929d670 100644 else AC_MSG_RESULT([no]) fi -diff --git a/src/lxc/confile.c b/src/lxc/confile.c -index e898e23..522fefa 100644 ---- a/src/lxc/confile.c -+++ b/src/lxc/confile.c -@@ -6233,21 +6233,21 @@ static int set_config_init_args(const char *key, const char *value, - struct lxc_conf *lxc_conf, void *data) - { - int ret = 0; -- char *tmp = NULL; -+ char **tmp = NULL; - char *new_value = NULL; - - ret = set_config_string_item(&new_value, value); - if (ret || !new_value) - return ret; - -- tmp = realloc(lxc_conf->init_argv, (lxc_conf->init_argc + 1) * sizeof(char *)); -+ tmp = (char **)realloc(lxc_conf->init_argv, (lxc_conf->init_argc + 1) * sizeof(char *)); - if (!tmp) { - ERROR("Out of memory"); - free(new_value); - return -1; - } - -- lxc_conf->init_argv = (char **)tmp; -+ lxc_conf->init_argv = tmp; - - lxc_conf->init_argv[lxc_conf->init_argc] = new_value; - lxc_conf->init_argc++; diff --git a/src/lxc/json/json_common.c b/src/lxc/json/json_common.c index ec20c59..87895b0 100755 --- a/src/lxc/json/json_common.c diff --git a/meta-openeuler/recipes-core/lxc/lxc_4.0.3.bb b/meta-openeuler/recipes-core/lxc/lxc_4.0.3.bb index a40aa5006153c1979d419b1f308d18b4230f6975..084e0568fac8221e70a35688a5948faa701219ed 100644 --- a/meta-openeuler/recipes-core/lxc/lxc_4.0.3.bb +++ b/meta-openeuler/recipes-core/lxc/lxc_4.0.3.bb @@ -5,45 +5,56 @@ LICENSE = "BSD-2-Clause" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" -SRC_URI = "file://lxc/lxc-4.0.3.tar.gz \ - file://lxc/0001-huawei-adapt-to-huawei-4.0.3.patch \ - file://lxc/0002-add-mount-label-for-rootfs.patch \ - file://lxc/0003-format-code-and-verify-mount-mode.patch \ - file://lxc/0004-Removes-the-definition-of-the-thread-attributes-obje.patch \ - file://lxc/0005-solve-coredump-bug-caused-by-fstype-being-NULL-durin.patch \ - file://lxc/0006-SIGTERM-do-not-catch-signal-SIGTERM-in-lxc-monitor.patch \ - file://lxc/0007-Using-string-type-instead-of-security_context_t-beca.patch \ - file://lxc/0008-hook-pass-correct-mount-dir-as-root-to-hook.patch \ - file://lxc/0009-cgroup-refact-cgroup-manager-to-single-file.patch \ - file://lxc/0010-cgfsng-adjust-log-level-from-error-to-warn.patch \ - file://lxc/0011-rootfs-add-make-private-for-root.path-parent.patch \ - file://lxc/0012-mount-make-possible-to-bind-mount-proc-and-sys-fs.patch \ - file://lxc/0013-use-path-based-unix-domain-sockets-instead-of-abstra.patch \ - file://lxc/0014-api-add-get-container-metrics-api.patch \ - file://lxc/0015-Streaming-IO-solution-optimization-and-enhancement.patch \ - file://lxc/0016-avoid-using-void-pointers-in-caclulation.patch \ - file://lxc/0017-fix-compilation-errors-without-libcap.patch \ - file://lxc/0018-IO-fix-io-data-miss-when-exec-with-pipes.patch \ - file://lxc/0019-metrics-add-total_inactive_file-metric-for-memory.patch \ - file://lxc/0020-support-cgroup-v2.patch \ - file://lxc/0021-support-isula-exec-workdir.patch \ - file://lxc/0022-print-error-message-if-process-workdir-failed.patch \ - file://lxc/0023-log-support-long-syslog-tag.patch \ - file://lxc/0024-log-adjust-log-level-from-error-to-warn.patch \ - file://lxc/0025-get-cgroup-data-len-first-and-malloc-read-buff-by-le.patch \ - file://lxc/0026-coredump-fix-coredump-when-cgroup-get-return-error.patch \ - file://lxc/0027-add-help-for-new-arguments.patch \ - file://lxc/0028-seccomp-init-and-destroy-notifier.cookie.patch \ - file://lxc/0029-just-use-origin-loop-if-do-not-have-io.patch \ - file://lxc/0030-conf-fix-a-memory-leak.patch \ - file://lxc/0031-fix-lsm_se_mount_context-memory-leak.patch \ - file://lxc/0032-disable-lxc_keep-with-oci-image.patch \ - file://lxc/0033-conf-ensure-that-the-idmap-pointer-itself-is-freed.patch \ - file://lxc/0034-cgfsng-fix-cgroup-attach-cgroup-creation.patch \ - file://support_arm32.patch \ - file://check_only_rootfs_as_filesystem_type.patch \ - " +SRC_URI = "file://lxc-4.0.3.tar.gz \ + file://0001-huawei-adapt-to-huawei-4.0.3.patch \ + file://0002-add-mount-label-for-rootfs.patch \ + file://0003-format-code-and-verify-mount-mode.patch \ + file://0004-Removes-the-definition-of-the-thread-attributes-obje.patch \ + file://0005-solve-coredump-bug-caused-by-fstype-being-NULL-durin.patch \ + file://0006-SIGTERM-do-not-catch-signal-SIGTERM-in-lxc-monitor.patch \ + file://0007-Using-string-type-instead-of-security_context_t-beca.patch \ + file://0008-hook-pass-correct-mount-dir-as-root-to-hook.patch \ + file://0009-cgroup-refact-cgroup-manager-to-single-file.patch \ + file://0010-cgfsng-adjust-log-level-from-error-to-warn.patch \ + file://0011-rootfs-add-make-private-for-root.path-parent.patch \ + file://0012-mount-make-possible-to-bind-mount-proc-and-sys-fs.patch \ + file://0013-use-path-based-unix-domain-sockets-instead-of-abstra.patch \ + file://0014-api-add-get-container-metrics-api.patch \ + file://0015-Streaming-IO-solution-optimization-and-enhancement.patch \ + file://0016-avoid-using-void-pointers-in-caclulation.patch \ + file://0017-fix-compilation-errors-without-libcap.patch \ + file://0018-IO-fix-io-data-miss-when-exec-with-pipes.patch \ + file://0019-metrics-add-total_inactive_file-metric-for-memory.patch \ + file://0020-support-cgroup-v2.patch \ + file://0021-support-isula-exec-workdir.patch \ + file://0022-print-error-message-if-process-workdir-failed.patch \ + file://0023-log-support-long-syslog-tag.patch \ + file://0024-log-adjust-log-level-from-error-to-warn.patch \ + file://0025-get-cgroup-data-len-first-and-malloc-read-buff-by-le.patch \ + file://0026-coredump-fix-coredump-when-cgroup-get-return-error.patch \ + file://0027-add-help-for-new-arguments.patch \ + file://0028-seccomp-init-and-destroy-notifier.cookie.patch \ + file://0029-just-use-origin-loop-if-do-not-have-io.patch \ + file://0030-conf-fix-a-memory-leak.patch \ + file://0031-fix-lsm_se_mount_context-memory-leak.patch \ + file://0032-disable-lxc_keep-with-oci-image.patch \ + file://0033-conf-ensure-that-the-idmap-pointer-itself-is-freed.patch \ + file://0034-cgfsng-fix-cgroup-attach-cgroup-creation.patch \ + file://0035-adapt-upstream-compiler-settings.patch \ + file://0036-compile-in-android-env.patch \ + file://0037-fix-always-print-and-temp-len.patch \ + file://0038-just-print-error-when-new-lock-failed.patch \ + file://0039-fix-bug-of-memory-free.patch \ + file://0041-do-not-free-the-pointer-returned-by-dirname.patch \ + file://0042-add-x-permission-when-create-directory.patch \ + file://0043-do-not-operate-playload-and-attach-cgroup-if-no-cont.patch \ + file://0044-fix-HOME-env-unset-error.patch \ +" +SRC_URI_append = " \ + file://check_only_rootfs_as_filesystem_type.patch \ + file://support_arm32.patch \ +" DEPENDS = "yajl libseccomp libcap" diff --git a/meta-openeuler/recipes-core/ncurses/ncurses_%.bbappend b/meta-openeuler/recipes-core/ncurses/ncurses_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..e257ed7e59933affa237f68901821bed882bf79a --- /dev/null +++ b/meta-openeuler/recipes-core/ncurses/ncurses_%.bbappend @@ -0,0 +1,20 @@ +PV = "6.3" + +# files, patches can't be applied in openeuler or conflict with openeuler +SRC_URI_remove += " \ + git://salsa.debian.org/debian/ncurses.git;protocol=https \ + file://0002-configure-reproducible.patch \ + file://0003-gen-pkgconfig.in-Do-not-include-LDFLAGS-in-generated.patch \ +" + +S = "${WORKDIR}/${BPN}-${PV}" +# files, patches that come from openeuler +SRC_URI += "file://ncurses/${BP}.tar.gz \ + file://ncurses/ncurses-config.patch \ + file://ncurses/ncurses-libs.patch \ + file://ncurses/ncurses-urxvt.patch \ + file://ncurses/ncurses-kbs.patch \ + file://backport-CVE-2022-29458.patch \ +" + +SRC_URI[md5sum] = "a2736befde5fee7d2b7eb45eb281cdbe" diff --git a/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfs-mountd.service b/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfs-mountd.service deleted file mode 100644 index c01415de842f6a020f2cbcdf77e9d42f8638d032..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfs-mountd.service +++ /dev/null @@ -1,17 +0,0 @@ -[Unit] -Description=NFS Mount Daemon -DefaultDependencies=no -After=rpcbind.socket -Requires=proc-fs-nfsd.mount -After=proc-fs-nfsd.mount -After=network.target local-fs.target -BindsTo=nfs-server.service -ConditionPathExists=@SYSCONFDIR@/exports - -[Service] -EnvironmentFile=-@SYSCONFDIR@/nfs-utils.conf -ExecStart=@SBINDIR@/rpc.mountd -F $MOUNTD_OPTS -LimitNOFILE=@HIGH_RLIMIT_NOFILE@ - -[Install] -WantedBy=multi-user.target diff --git a/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfs-server.service b/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfs-server.service deleted file mode 100644 index 5c845b7e82f017660827bd3406687c37fe3269c5..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfs-server.service +++ /dev/null @@ -1,23 +0,0 @@ -[Unit] -Description=NFS server and services -DefaultDependencies=no -Requires=network.target proc-fs-nfsd.mount -Requires=nfs-mountd.service -Wants=rpcbind.service -After=local-fs.target -After=network.target proc-fs-nfsd.mount rpcbind.service nfs-mountd.service -ConditionPathExists=@SYSCONFDIR@/exports - -[Service] -Type=oneshot -EnvironmentFile=-@SYSCONFDIR@/nfs-utils.conf -ExecStartPre=@SBINDIR@/exportfs -r -ExecStart=@SBINDIR@/rpc.nfsd $NFSD_OPTS $NFSD_COUNT -ExecStop=@SBINDIR@/rpc.nfsd 0 -ExecStopPost=@SBINDIR@/exportfs -au -ExecStopPost=@SBINDIR@/exportfs -f -ExecReload=@SBINDIR@/exportfs -r -RemainAfterExit=yes - -[Install] -WantedBy=multi-user.target diff --git a/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfs-statd.service b/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfs-statd.service deleted file mode 100644 index 4fa64e19980850bbdd17b357e527271817b1f05d..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfs-statd.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=NFS status monitor for NFSv2/3 locking. -DefaultDependencies=no -Conflicts=umount.target -Requires=nss-lookup.target rpcbind.service -After=network.target nss-lookup.target rpcbind.service - -[Service] -EnvironmentFile=-@SYSCONFDIR@/nfs-utils.conf -ExecStart=@SBINDIR@/rpc.statd -F $STATD_OPTS -LimitNOFILE=@HIGH_RLIMIT_NOFILE@ - -[Install] -WantedBy=multi-user.target diff --git a/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfs-utils.conf b/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfs-utils.conf deleted file mode 100644 index a1007a7fbf4a37701fa132591b75b5e357594c03..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfs-utils.conf +++ /dev/null @@ -1,35 +0,0 @@ -# Parameters to be passed to nfs-utils (clients & server) service files. -# - -# Options to pass to rpc.nfsd. -NFSD_OPTS="" - -# Number of servers to start up; the default is 8 servers. -NFSD_COUNT="" - -# Where to mount nfsd filesystem; the default is "/proc/fs/nfsd". -PROCNFSD_MOUNTPOINT="" - -# Options used to mount nfsd filesystem; the default is "rw,nodev,noexec,nosuid". -PROCNFSD_MOUNTOPTS="" - -# Options for rpc.mountd. -# If you have a port-based firewall, you might want to set up -# a fixed port here using the --port option. -MOUNTD_OPTS="" - -# Parameters to be passed to nfs-common (nfs clients & server) init script. -# - -# If you do not set values for the NEED_ options, they will be attempted -# autodetected; this should be sufficient for most people. Valid alternatives -# for the NEED_ options are "yes" and "no". - -# Do you want to start the statd daemon? It is not needed for NFSv4. -NEED_STATD="" - -# Options to pass to rpc.statd. -# N.B. statd normally runs on both client and server, and run-time -# options should be specified accordingly. -# STATD_OPTS="-p 32765 -o 32766" -STATD_OPTS="" diff --git a/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfscommon b/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfscommon deleted file mode 100644 index 992267d5a1610214c1aacfb223ed090d89f09438..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfscommon +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/sh -### BEGIN INIT INFO -# Provides: nfs-common -# Required-Start: $portmap hwclock -# Required-Stop: $portmap hwclock -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: NFS support for both client and server -# Description: NFS is a popular protocol for file sharing across -# TCP/IP networks. This service provides various -# support functions for NFS mounts. -### END INIT INFO -# -# Startup script for nfs-utils -# -# -# Location of executables: - -# Source function library. -. /etc/init.d/functions - -test -x "$NFS_STATD" || NFS_STATD=/usr/sbin/rpc.statd -test -z "$STATD_PID" && STATD_PID=/var/run/rpc.statd.pid -# -# The default state directory is /var/lib/nfs -test -n "$NFS_STATEDIR" || NFS_STATEDIR=/var/lib/nfs -# -#---------------------------------------------------------------------- -# Startup and shutdown functions. -# Actual startup/shutdown is at the end of this file. - -start_statd(){ - echo -n "starting statd: " - start-stop-daemon --start --exec "$NFS_STATD" --pidfile "$STATD_PID" - echo done -} -stop_statd(){ - echo -n 'stopping statd: ' - start-stop-daemon --stop --quiet --signal 1 --pidfile "$STATD_PID" - echo done -} -#---------------------------------------------------------------------- -# -# supported options: -# start -# stop -# restart: stops and starts mountd -#FIXME: need to create the /var/lib/nfs/... directories -case "$1" in - start) - start_statd;; - stop) - stop_statd;; - status) - status $NFS_STATD - exit $?;; - restart) - $0 stop - $0 start;; - *) - echo "Usage: $0 {start|stop|status|restart}" - exit 1;; -esac diff --git a/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfsserver b/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfsserver deleted file mode 100644 index 0f5747cc6db97d8c14100c170e2fa53f30b6e2b4..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/nfs-utils/nfs-utils/nfsserver +++ /dev/null @@ -1,130 +0,0 @@ -#!/bin/sh -### BEGIN INIT INFO -# Provides: nfs-kernel-server -# Required-Start: $remote_fs nfs-common $portmap hwclock -# Required-Stop: $remote_fs nfs-common $portmap hwclock -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Kernel NFS server support -# Description: NFS is a popular protocol for file sharing across -# TCP/IP networks. This service provides NFS server -# functionality, which is configured via the -# /etc/exports file. -### END INIT INFO -# -# Startup script for nfs-utils -# -# Source function library. -. /etc/init.d/functions -# -# The environment variable NFS_SERVERS may be set in /etc/default/nfsd -# Other control variables may be overridden here too -test -r /etc/default/nfsd && . /etc/default/nfsd -# -# Location of executables: -test -x "$NFS_MOUNTD" || NFS_MOUNTD=/usr/sbin/rpc.mountd -test -x "$NFS_NFSD" || NFS_NFSD=/usr/sbin/rpc.nfsd -# -# The user mode program must also exist (it just starts the kernel -# threads using the kernel module code). -test -x "$NFS_MOUNTD" || exit 0 -test -x "$NFS_NFSD" || exit 0 -# -# Default is 8 threads, value is settable between 1 and the truely -# ridiculous 99 -test "$NFS_SERVERS" != "" && test "$NFS_SERVERS" -gt 0 && test "$NFS_SERVERS" -lt 100 || NFS_SERVERS=8 -# -#---------------------------------------------------------------------- -# Startup and shutdown functions. -# Actual startup/shutdown is at the end of this file. -#mountd -start_mountd(){ - echo -n 'starting mountd: ' - start-stop-daemon --start --exec "$NFS_MOUNTD" -- "$@" - echo done -} -stop_mountd(){ - echo -n 'stopping mountd: ' - start-stop-daemon --stop --quiet --exec "$NFS_MOUNTD" - echo done -} -# -#nfsd -start_nfsd(){ - modprobe -q nfsd - grep -q nfsd /proc/filesystems || { - echo NFS daemon support not enabled in kernel - exit 1 - } - grep -q nfsd /proc/mounts || mount -t nfsd nfsd /proc/fs/nfsd - grep -q nfsd /proc/mounts || { - echo nfsd filesystem could not be mounted at /proc/fs/nfsd - exit 1 - } - - echo -n "starting $1 nfsd kernel threads: " - start-stop-daemon --start --exec "$NFS_NFSD" -- "$@" - echo done -} -delay_nfsd(){ - for delay in 0 1 2 3 4 5 6 7 8 9 - do - if pidof nfsd >/dev/null - then - echo -n . - sleep 1 - else - return 0 - fi - done - return 1 -} -stop_nfsd(){ - # WARNING: this kills any process with the executable - # name 'nfsd'. - echo -n 'stopping nfsd: ' - start-stop-daemon --stop --quiet --signal 1 --name nfsd - if delay_nfsd || { - echo failed - echo ' using signal 9: ' - start-stop-daemon --stop --quiet --signal 9 --name nfsd - delay_nfsd - } - then - echo done - else - echo failed - fi -} - -#---------------------------------------------------------------------- -# -# supported options: -# start -# stop -# reload: reloads the exports file -# restart: stops and starts mountd -#FIXME: need to create the /var/lib/nfs/... directories -case "$1" in - start) - test -r /etc/exports && exportfs -r - start_nfsd "$NFS_SERVERS" - start_mountd - test -r /etc/exports && exportfs -a;; - stop) exportfs -ua - stop_mountd - stop_nfsd;; - status) - status /usr/sbin/rpc.mountd - RETVAL=$? - status nfsd - rval=$? - [ $RETVAL -eq 0 ] && exit $rval - exit $RETVAL;; - reload) test -r /etc/exports && exportfs -r;; - restart) - $0 stop - $0 start;; - *) echo "Usage: $0 {start|stop|status|reload|restart}" - exit 1;; -esac diff --git a/meta-openeuler/recipes-core/nfs-utils/nfs-utils/proc-fs-nfsd.mount b/meta-openeuler/recipes-core/nfs-utils/nfs-utils/proc-fs-nfsd.mount deleted file mode 100644 index 630801b3751be2a9a6077522380eb7f35d82e96e..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/nfs-utils/nfs-utils/proc-fs-nfsd.mount +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=NFSD configuration filesystem -After=systemd-modules-load.service - -[Mount] -What=nfsd -Where=/proc/fs/nfsd -Type=nfsd diff --git a/meta-openeuler/recipes-core/nfs-utils/nfs-utils_2.5.4.bb b/meta-openeuler/recipes-core/nfs-utils/nfs-utils_2.5.4.bb deleted file mode 100644 index 7b4799e7a1b45bb7694a05977730a2775405a1f7..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/nfs-utils/nfs-utils_2.5.4.bb +++ /dev/null @@ -1,139 +0,0 @@ -SUMMARY = "userspace utilities for kernel nfs" -DESCRIPTION = "The nfs-utils package provides a daemon for the kernel \ -NFS server and related tools." -HOMEPAGE = "http://nfs.sourceforge.net/" -SECTION = "console/network" - -LICENSE = "MIT & GPLv2+ & BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=95f3a93a5c3c7888de623b46ea085a84" - -# util-linux for libblkid -DEPENDS = "libcap libevent util-linux libtirpc" -RDEPENDS_${PN} = "${PN}-client" -RRECOMMENDS_${PN} = "kernel-module-nfsd" - -USERADD_PACKAGES = "${PN}-client" -USERADD_PARAM_${PN}-client = "--system --home-dir /var/lib/nfs \ - --shell /bin/false --user-group rpcuser" - -SRC_URI = "file://nfs-utils/${BP}.tar.xz \ - file://nfs-utils/0000-systemd-idmapd-require-rpc-pipefs.patch \ - file://nfs-utils/0001-correct-the-statd-path-in-man.patch \ - file://nfs-utils/0002-nfs-utils-set-use-gss-proxy-1-to-enable-gss-proxy-by.patch \ - file://nfs-utils/0003-idmapd-Fix-error-status-when-nfs-idmapd-exits.patch \ - file://nfs-utils/0004-fix-coredump-in-bl_add_disk.patch \ - file://nfsserver \ - file://nfscommon \ - file://nfs-utils.conf \ - file://nfs-server.service \ - file://nfs-mountd.service \ - file://nfs-statd.service \ - file://proc-fs-nfsd.mount \ - " -SRC_URI[sha256sum] = "51997d94e4c8bcef5456dd36a9ccc38e231207c4e9b6a9a2c108841e6aebe3dd" - -# Only kernel-module-nfsd is required here (but can be built-in) - the nfsd module will -# pull in the remainder of the dependencies. - -INITSCRIPT_PACKAGES = "${PN} ${PN}-client" -INITSCRIPT_NAME = "nfsserver" -INITSCRIPT_PARAMS = "defaults" -INITSCRIPT_NAME_${PN}-client = "nfscommon" -INITSCRIPT_PARAMS_${PN}-client = "defaults 19 21" - -inherit autotools-brokensep pkgconfig systemd - -SYSTEMD_PACKAGES = "${PN} ${PN}-client" -SYSTEMD_SERVICE_${PN} = "nfs-server.service nfs-mountd.service" -SYSTEMD_SERVICE_${PN}-client = "nfs-statd.service" - -# --enable-uuid is need for cross-compiling -EXTRA_OECONF = "--with-statduser=rpcuser \ - --enable-mountconfig \ - --enable-libmount-mount \ - --enable-uuid \ - --disable-gss \ - --disable-nfsdcltrack \ - --with-statdpath=/var/lib/nfs/statd \ - --with-rpcgen=${HOSTTOOLS_DIR}/rpcgen \ - " - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ -" -PACKAGECONFIG_remove_libc-musl = "tcp-wrappers" -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," -# libdevmapper is available in meta-oe -PACKAGECONFIG[nfsv41] = "--enable-nfsv41,--disable-nfsv41,libdevmapper,libdevmapper" -# keyutils is available in meta-oe -PACKAGECONFIG[nfsv4] = "--enable-nfsv4,--disable-nfsv4,keyutils,python3-core" - -PACKAGES =+ "${PN}-client ${PN}-mount ${PN}-stats" - -CONFFILES_${PN}-client += "${localstatedir}/lib/nfs/etab \ - ${localstatedir}/lib/nfs/rmtab \ - ${localstatedir}/lib/nfs/xtab \ - ${localstatedir}/lib/nfs/statd/state \ - ${sysconfdir}/nfsmount.conf" - -FILES_${PN}-client = "${sbindir}/*statd \ - ${sbindir}/rpc.idmapd ${sbindir}/sm-notify \ - ${sbindir}/showmount ${sbindir}/nfsstat \ - ${localstatedir}/lib/nfs \ - ${sysconfdir}/nfs-utils.conf \ - ${sysconfdir}/nfsmount.conf \ - ${sysconfdir}/init.d/nfscommon \ - ${systemd_unitdir}/system/nfs-statd.service" -RDEPENDS_${PN}-client = "${PN}-mount" - -FILES_${PN}-mount = "${base_sbindir}/*mount.nfs*" - -FILES_${PN}-stats = "${sbindir}/mountstats ${sbindir}/nfsiostat ${sbindir}/nfsdclnts" - -FILES_${PN}-staticdev += "${libdir}/libnfsidmap/*.a" - -FILES_${PN} += "${systemd_unitdir} ${libdir}/libnfsidmap/" - -do_configure_prepend() { - sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g' \ - ${S}/utils/mount/Makefile.am -} - -# Make clean needed because the package comes with -# precompiled 64-bit objects that break the build -do_compile_prepend() { - make clean -} - -# Works on systemd only -HIGH_RLIMIT_NOFILE ??= "4096" - -do_install_append () { - install -d ${D}${sysconfdir}/init.d - install -m 0750 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver - install -m 0750 ${WORKDIR}/nfscommon ${D}${sysconfdir}/init.d/nfscommon - - install -m 0755 ${WORKDIR}/nfs-utils.conf ${D}${sysconfdir} - install -m 0755 ${S}/utils/mount/nfsmount.conf ${D}${sysconfdir} - - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/nfs-server.service ${D}${systemd_unitdir}/system/ - install -m 0644 ${WORKDIR}/nfs-mountd.service ${D}${systemd_unitdir}/system/ - install -m 0644 ${WORKDIR}/nfs-statd.service ${D}${systemd_unitdir}/system/ - sed -i -e 's,@SBINDIR@,${sbindir},g' \ - -e 's,@SYSCONFDIR@,${sysconfdir},g' \ - -e 's,@HIGH_RLIMIT_NOFILE@,${HIGH_RLIMIT_NOFILE},g' \ - ${D}${systemd_unitdir}/system/*.service - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - install -m 0644 ${WORKDIR}/proc-fs-nfsd.mount ${D}${systemd_unitdir}/system/ - install -d ${D}${systemd_unitdir}/system/sysinit.target.wants/ - ln -sf ../proc-fs-nfsd.mount ${D}${systemd_unitdir}/system/sysinit.target.wants/proc-fs-nfsd.mount - fi - - # kernel code as of 3.8 hard-codes this path as a default - install -d ${D}/var/lib/nfs/v4recovery - - chmod 0644 ${D}${localstatedir}/lib/nfs/statd/state - - # Make python tools use python 3 - sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${sbindir}/mountstats ${D}${sbindir}/nfsiostat -} diff --git a/meta-openeuler/recipes-core/openssh/openssh/config/common/sshd_check_keys b/meta-openeuler/recipes-core/openssh/openssh/config/common/sshd_check_keys deleted file mode 100644 index dbd5074386321f3d83cf437feb588cff709f877c..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/openssh/openssh/config/common/sshd_check_keys +++ /dev/null @@ -1,79 +0,0 @@ -#! /bin/sh - -generate_key() { - local FILE=$1 - local TYPE=$2 - local DIR="$(dirname "$FILE")" - - mkdir -p "$DIR" - ssh-keygen -q -f "${FILE}.tmp" -N '' -t $TYPE - - # Atomically rename file public key - mv -f "${FILE}.tmp.pub" "${FILE}.pub" - - # This sync does double duty: Ensuring that the data in the temporary - # private key file is on disk before the rename, and ensuring that the - # public key rename is completed before the private key rename, since we - # switch on the existence of the private key to trigger key generation. - # This does mean it is possible for the public key to exist, but be garbage - # but this is OK because in that case the private key won't exist and the - # keys will be regenerated. - # - # In the event that sync understands arguments that limit what it tries to - # fsync(), we provided them. If it does not, it will simply call sync() - # which is just as well - sync "${FILE}.pub" "$DIR" "${FILE}.tmp" - - mv "${FILE}.tmp" "$FILE" - chmod 400 "$FILE" - - # sync to ensure the atomic rename is committed - sync "$DIR" -} - -# /etc/default/ssh may set SYSCONFDIR and SSHD_OPTS -if test -f /etc/default/ssh; then - . /etc/default/ssh -fi - -[ -z "$SYSCONFDIR" ] && SYSCONFDIR=/etc/ssh -mkdir -p $SYSCONFDIR - -# parse sshd options -set -- ${SSHD_OPTS} -- -sshd_config=/etc/ssh/sshd_config -while true ; do - case "$1" in - -f*) if [ "$1" = "-f" ] ; then - sshd_config="$2" - shift - else - sshd_config="${1#-f}" - fi - shift - ;; - --) shift; break;; - *) shift;; - esac -done - -HOST_KEYS=$(sed -n 's/^[ \t]*HostKey[ \t]\+\(.*\)/\1/p' "${sshd_config}") -[ -z "${HOST_KEYS}" ] && HOST_KEYS="$SYSCONFDIR/ssh_host_rsa_key $SYSCONFDIR/ssh_host_ecdsa_key $SYSCONFDIR/ssh_host_ed25519_key" - -for key in ${HOST_KEYS} ; do - [ -f $key ] && continue - case $key in - *_rsa_key) - echo " generating ssh RSA host key..." - generate_key $key rsa - ;; - *_ecdsa_key) - echo " generating ssh ECDSA host key..." - generate_key $key ecdsa - ;; - *_ed25519_key) - echo " generating ssh ED25519 host key..." - generate_key $key ed25519 - ;; - esac -done diff --git a/meta-openeuler/recipes-core/openssh/openssh/init b/meta-openeuler/recipes-core/openssh/openssh/init deleted file mode 100644 index 837340d84ad5195602ed639990acead64f221eae..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/openssh/openssh/init +++ /dev/null @@ -1,90 +0,0 @@ -#! /bin/sh -set -e - -PIDFILE=/var/run/sshd.pid - -# source function library -#. /etc/init.d/functions - -# /etc/init.d/ssh: start and stop the OpenBSD "secure shell" daemon - -test -x /usr/sbin/sshd || exit 0 -( /usr/sbin/sshd -\? 2>&1 | grep -q OpenSSH ) 2>/dev/null || exit 0 - -# /etc/default/ssh may set SYSCONFDIR and SSHD_OPTS -if test -f /etc/default/ssh; then - . /etc/default/ssh -fi - -[ -z "$SYSCONFDIR" ] && SYSCONFDIR=/etc/ssh -mkdir -p $SYSCONFDIR - -check_for_no_start() { - # forget it if we're trying to start, and /etc/ssh/sshd_not_to_be_run exists - if [ -e $SYSCONFDIR/sshd_not_to_be_run ]; then - echo "OpenBSD Secure Shell server not in use ($SYSCONFDIR/sshd_not_to_be_run)" - exit 0 - fi -} - -check_privsep_dir() { - # Create the PrivSep empty dir if necessary - if [ ! -d /var/run/sshd ]; then - mkdir /var/run/sshd - chmod 0755 /var/run/sshd - fi -} - -check_config() { - /usr/sbin/sshd $SSHD_OPTS -t || exit 1 -} - -export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" - -case "$1" in - start) - check_for_no_start - echo "Starting OpenBSD Secure Shell server: sshd" - @LIBEXECDIR@/sshd_check_keys - check_privsep_dir - start-stop-daemon -S -p $PIDFILE -x /usr/sbin/sshd -- $SSHD_OPTS - echo "done." - ;; - stop) - echo -n "Stopping OpenBSD Secure Shell server: sshd" - start-stop-daemon -K -p $PIDFILE -x /usr/sbin/sshd - echo "." - ;; - - reload|force-reload) - check_for_no_start - @LIBEXECDIR@/sshd_check_keys - check_config - echo -n "Reloading OpenBSD Secure Shell server's configuration" - start-stop-daemon -K -p $PIDFILE -s 1 -x /usr/sbin/sshd - echo "." - ;; - - restart) - @LIBEXECDIR@/sshd_check_keys - check_config - echo -n "Restarting OpenBSD Secure Shell server: sshd" - start-stop-daemon -K -p $PIDFILE --oknodo -x /usr/sbin/sshd - check_for_no_start - check_privsep_dir - sleep 2 - start-stop-daemon -S -p $PIDFILE -x /usr/sbin/sshd -- $SSHD_OPTS - echo "." - ;; - - status) - status /usr/sbin/sshd - exit $? - ;; - - *) - echo "Usage: /etc/init.d/ssh {start|stop|status|reload|force-reload|restart}" - exit 1 -esac - -exit 0 diff --git a/meta-openeuler/recipes-core/openssh/openssh/ssh_config b/meta-openeuler/recipes-core/openssh/openssh/ssh_config deleted file mode 100644 index b9c6242a7e5f656ddf2051656d0160ea489a7e75..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/openssh/openssh/ssh_config +++ /dev/null @@ -1,50 +0,0 @@ -# $OpenBSD: ssh_config,v 1.33 2017/05/07 23:12:57 djm Exp $ - -# This is the ssh client system-wide configuration file. See -# ssh_config(5) for more information. This file provides defaults for -# users, and the values can be changed in per-user configuration files -# or on the command line. - -# Configuration data is parsed as follows: -# 1. command line options -# 2. user-specific file -# 3. system-wide file -# Any configuration value is only changed the first time it is set. -# Thus, host-specific definitions should be at the beginning of the -# configuration file, and defaults at the end. - -# Site-wide defaults for some commonly used options. For a comprehensive -# list of available options, their meanings and defaults, please see the -# ssh_config(5) man page. - -Host * -ForwardAgent no -ForwardX11 no -# RhostsRSAAuthentication no -# RSAAuthentication yes -# PasswordAuthentication yes -# HostbasedAuthentication no -# GSSAPIAuthentication no -# GSSAPIDelegateCredentials no -# BatchMode no -# CheckHostIP yes -# AddressFamily any -# ConnectTimeout 0 -# StrictHostKeyChecking ask -# IdentityFile ~/.ssh/id_rsa -# IdentityFile ~/.ssh/id_dsa -# IdentityFile ~/.ssh/id_ecdsa -# IdentityFile ~/.ssh/id_ed25519 -# Port 22 -Protocol 2 -# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc -# MACs hmac-md5,hmac-sha1,umac-64@openssh.com -# EscapeChar ~ -# Tunnel no -# TunnelDevice any:any -# PermitLocalCommand no -# VisualHostKey no -# ProxyCommand ssh -q -W %h:%p gateway.example.com -# RekeyLimit 1G 1h -StrictHostKeyChecking ask -VerifyHostKeyDNS ask diff --git a/meta-openeuler/recipes-core/openssh/openssh/sshd b/meta-openeuler/recipes-core/openssh/openssh/sshd deleted file mode 100644 index 98750729022417b44a26235a15c7a0c7126faf37..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/openssh/openssh/sshd +++ /dev/null @@ -1,24 +0,0 @@ -#%PAM-1.0 - -auth include common-auth -account required pam_nologin.so - -# SELinux needs to be the first session rule. This ensures that any -# lingering context has been cleared. Without out this it is possible -# that a module could execute code in the wrong domain. -# When the module is present, "required" would be sufficient (When SELinux -# is disabled, this returns success.) -#session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so close - -account include common-account -password include common-password -session optional pam_keyinit.so force revoke -session include common-session -session required pam_loginuid.so - -# SELinux needs to intervene at login time to ensure that the process -# starts in the proper default security context. Only sessions which are -# intended to run in the user's context should be run after this. -# When the module is present, "required" would be sufficient (When SELinux -# is disabled, this returns success.) -#session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so open diff --git a/meta-openeuler/recipes-core/openssh/openssh/sshd.socket b/meta-openeuler/recipes-core/openssh/openssh/sshd.socket deleted file mode 100644 index 12c39b26b59b2ed4be08e7fbbfd054a2aa811f3a..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/openssh/openssh/sshd.socket +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Conflicts=sshd.service - -[Socket] -ExecStartPre=@BASE_BINDIR@/mkdir -p /var/run/sshd -ListenStream=22 -Accept=yes - -[Install] -WantedBy=sockets.target diff --git a/meta-openeuler/recipes-core/openssh/openssh/sshd@.service b/meta-openeuler/recipes-core/openssh/openssh/sshd@.service deleted file mode 100644 index 9d83dfb2bb1cc9b3875eca38b9923fc980c16df5..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/openssh/openssh/sshd@.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=OpenSSH Per-Connection Daemon -Wants=sshdgenkeys.service -After=sshdgenkeys.service - -[Service] -Environment="SSHD_OPTS=" -EnvironmentFile=-/etc/default/ssh -ExecStart=-@SBINDIR@/sshd -i $SSHD_OPTS -ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID -StandardInput=socket -StandardError=syslog -KillMode=process diff --git a/meta-openeuler/recipes-core/openssh/openssh/sshd_config b/meta-openeuler/recipes-core/openssh/openssh/sshd_config deleted file mode 100644 index f0a3d2073a4b930c6f716c12a9628d9d3acf4a1d..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/openssh/openssh/sshd_config +++ /dev/null @@ -1,134 +0,0 @@ -# $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $ - -# This is the sshd server system-wide configuration file. See -# sshd_config(5) for more information. - -# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin - -# The strategy used for options in the default sshd_config shipped with -# OpenSSH is to specify options with their default value where -# possible, but leave them commented. Uncommented options override the -# default value. - -#Port 22 -#AddressFamily any -#ListenAddress 0.0.0.0 -#ListenAddress :: - -#HostKey /etc/ssh/ssh_host_rsa_key -#HostKey /etc/ssh/ssh_host_ecdsa_key -#HostKey /etc/ssh/ssh_host_ed25519_key - -# Ciphers and keying -#RekeyLimit default none - -# Logging -#SyslogFacility AUTH -#LogLevel INFO - -# Authentication: - -LoginGraceTime 120 -#PermitRootLogin prohibit-password -#StrictModes yes -MaxAuthTries 3 -#MaxSessions 10 - -#PubkeyAuthentication yes - -# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2 -# but this is overridden so installations will only check .ssh/authorized_keys -AuthorizedKeysFile .ssh/authorized_keys - -#AuthorizedPrincipalsFile none - -#AuthorizedKeysCommand none -#AuthorizedKeysCommandUser nobody - -# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts -#HostbasedAuthentication no -# Change to yes if you don't trust ~/.ssh/known_hosts for -# HostbasedAuthentication -#IgnoreUserKnownHosts no -# Don't read the user's ~/.rhosts and ~/.shosts files -#IgnoreRhosts yes - -# To disable tunneled clear text passwords, change to no here! -#PasswordAuthentication yes -#PermitEmptyPasswords no - -# Change to no to disable s/key passwords -#ChallengeResponseAuthentication yes - -# Kerberos options -#KerberosAuthentication no -#KerberosOrLocalPasswd yes -#KerberosTicketCleanup yes -#KerberosGetAFSToken no - -# GSSAPI options -#GSSAPIAuthentication no -#GSSAPICleanupCredentials yes - -# Set this to 'yes' to enable PAM authentication, account processing, -# and session processing. If this is enabled, PAM authentication will -# be allowed through the ChallengeResponseAuthentication and -# PasswordAuthentication. Depending on your PAM configuration, -# PAM authentication via ChallengeResponseAuthentication may bypass -# the setting of "PermitRootLogin without-password". -# If you just want the PAM account and session checks to run without -# PAM authentication, then enable this but set PasswordAuthentication -# and ChallengeResponseAuthentication to 'no'. -UsePAM yes - -#AllowAgentForwarding yes -#AllowTcpForwarding yes -#GatewayPorts no -#X11Forwarding no -#X11DisplayOffset 10 -#X11UseLocalhost yes -#PermitTTY yes -#PrintMotd yes -#PrintLastLog yes -#TCPKeepAlive yes -PermitUserEnvironment no -#Compression delayed -ClientAliveInterval 300 -ClientAliveCountMax 0 -#UseDNS no -#PidFile /var/run/sshd.pid -#MaxStartups 10:30:100 -#PermitTunnel no -#ChrootDirectory none -#VersionAddendum none - -# no default banner path -#Banner none - -# override default of no subsystems -Subsystem sftp internal-sftp -l INFO - -# Example of overriding settings on a per-user basis -#Match User anoncvs -# X11Forwarding no -# AllowTcpForwarding no -# PermitTTY no -# ForceCommand cvs server -Protocol 2 -PubkeyAuthentication yes -IgnoreRhosts yes -StrictModes yes -Banner /etc/issue.net -SyslogFacility AUTH -LogLevel VERBOSE -PermitEmptyPasswords no -X11Forwarding no -PrintLastLog yes -HostbasedAuthentication no -MaxStartups 10:30:100 -PasswordAuthentication no -AllowTcpForwarding no -AllowAgentForwarding no -IgnoreUserKnownHosts yes -PermitRootLogin no -MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com diff --git a/meta-openeuler/recipes-core/openssh/openssh/sshd_config_readonly b/meta-openeuler/recipes-core/openssh/openssh/sshd_config_readonly deleted file mode 100644 index 5368a2ff5b9f2d5d2b40ef080c71985c2d21d42c..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/openssh/openssh/sshd_config_readonly +++ /dev/null @@ -1,116 +0,0 @@ -# $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $ - -# This is the sshd server system-wide configuration file. See -# sshd_config(5) for more information. - -# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin - -# The strategy used for options in the default sshd_config shipped with -# OpenSSH is to specify options with their default value where -# possible, but leave them commented. Uncommented options override the -# default value. - -#Port 22 -#AddressFamily any -#ListenAddress 0.0.0.0 -#ListenAddress :: - - -# Ciphers and keying -#RekeyLimit default none - -# Logging -#SyslogFacility AUTH -#LogLevel INFO - -# Authentication: - -#LoginGraceTime 2m -#PermitRootLogin prohibit-password -#StrictModes yes -#MaxAuthTries 6 -#MaxSessions 10 - -#PubkeyAuthentication yes - -# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2 -# but this is overridden so installations will only check .ssh/authorized_keys -AuthorizedKeysFile .ssh/authorized_keys - -#AuthorizedPrincipalsFile none - -#AuthorizedKeysCommand none -#AuthorizedKeysCommandUser nobody - -# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts -#HostbasedAuthentication no -# Change to yes if you don't trust ~/.ssh/known_hosts for -# HostbasedAuthentication -#IgnoreUserKnownHosts no -# Don't read the user's ~/.rhosts and ~/.shosts files -#IgnoreRhosts yes - -# To disable tunneled clear text passwords, change to no here! -#PasswordAuthentication yes -#PermitEmptyPasswords no - -# Change to no to disable s/key passwords -#ChallengeResponseAuthentication yes - -# Kerberos options -#KerberosAuthentication no -#KerberosOrLocalPasswd yes -#KerberosTicketCleanup yes -#KerberosGetAFSToken no - -# GSSAPI options -#GSSAPIAuthentication no -#GSSAPICleanupCredentials yes - -# Set this to 'yes' to enable PAM authentication, account processing, -# and session processing. If this is enabled, PAM authentication will -# be allowed through the ChallengeResponseAuthentication and -# PasswordAuthentication. Depending on your PAM configuration, -# PAM authentication via ChallengeResponseAuthentication may bypass -# the setting of "PermitRootLogin without-password". -# If you just want the PAM account and session checks to run without -# PAM authentication, then enable this but set PasswordAuthentication -# and ChallengeResponseAuthentication to 'no'. -UsePAM yes - -#AllowAgentForwarding yes -#AllowTcpForwarding yes -#GatewayPorts no -#X11Forwarding no -#X11DisplayOffset 10 -#X11UseLocalhost yes -#PermitTTY yes -#PrintMotd yes -#PrintLastLog yes -#TCPKeepAlive yes -#PermitUserEnvironment no -#Compression delayed -#ClientAliveInterval 0 -#ClientAliveCountMax 3 -#UseDNS no -#PidFile /var/run/sshd.pid -#MaxStartups 10:30:100 -#PermitTunnel no -#ChrootDirectory none -#VersionAddendum none - -# no default banner path -#Banner none - -# override default of no subsystems -Subsystem sftp /usr/libexec/sftp-server - -# Example of overriding settings on a per-user basis -#Match User anoncvs -# X11Forwarding no -# AllowTcpForwarding no -# PermitTTY no -# ForceCommand cvs server -HostKey /var/run/ssh/ssh_host_rsa_key -HostKey /var/run/ssh/ssh_host_ecdsa_key -HostKey /var/run/ssh/ssh_host_ed25519_key diff --git a/meta-openeuler/recipes-core/openssh/openssh/sshdgenkeys.service b/meta-openeuler/recipes-core/openssh/openssh/sshdgenkeys.service deleted file mode 100644 index 603c33787f1ac5d4a6d9cf4f62d42b53e8530a17..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/openssh/openssh/sshdgenkeys.service +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=OpenSSH Key Generation -RequiresMountsFor=/var /run - -[Service] -ExecStart=@LIBEXECDIR@/sshd_check_keys -Type=oneshot -RemainAfterExit=yes diff --git a/meta-openeuler/recipes-core/openssh/openssh/volatiles.99_sshd b/meta-openeuler/recipes-core/openssh/openssh/volatiles.99_sshd deleted file mode 100644 index a0d2af3c652f5cac737c8c4bfa75b5179235ec23..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/openssh/openssh/volatiles.99_sshd +++ /dev/null @@ -1,2 +0,0 @@ -d root root 0755 /var/run/sshd none -f root root 0644 /var/log/lastlog none diff --git a/meta-openeuler/recipes-core/openssh/openssh_8.8p1.bb b/meta-openeuler/recipes-core/openssh/openssh_8.8p1.bb deleted file mode 100644 index 39e97332c9732533575d2198b8225a5f0b123a25..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/openssh/openssh_8.8p1.bb +++ /dev/null @@ -1,170 +0,0 @@ -SUMMARY = "A suite of security-related network utilities based on \ -the SSH protocol including the ssh client and sshd server" -DESCRIPTION = "Secure rlogin/rsh/rcp/telnet replacement (OpenSSH) \ -Ssh (Secure Shell) is a program for logging into a remote machine \ -and for executing commands on a remote machine." -HOMEPAGE = "http://www.openssh.com/" -SECTION = "console/network" -LICENSE = "BSD & ISC & MIT" - -DEPENDS = "zlib openssl" -#DEPENDS = "zlib openssl virtual/crypt" -DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" - -#inherit manpages useradd update-rc.d update-alternatives systemd - -# remove base-passwd from all image -DEPENDS_remove_class-target += "base-passwd" -USERADDSETSCENEDEPS_remove_class-target += "${MLPREFIX}base-passwd:do_populate_sysroot_setscene" - -USERADD_PACKAGES = "${PN}-sshd" -USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd" -INITSCRIPT_PACKAGES = "${PN}-sshd" -INITSCRIPT_NAME_${PN}-sshd = "sshd" -INITSCRIPT_PARAMS_${PN}-sshd = "defaults 9" - -SYSTEMD_PACKAGES = "${PN}-sshd" -SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket" - -inherit autotools-brokensep - -LIC_FILES_CHKSUM="file://LICENCE;md5=d9d2753bdef9f19466dc7bc959114b11" -EXTRA_AUTORECONF_DEFINE = " ACLOCAL=echo " - -PACKAGECONFIG ??= "" -PACKAGECONFIG[kerberos] = "--with-kerberos5,--without-kerberos5,krb5" -PACKAGECONFIG[ldns] = "--with-ldns,--without-ldns,ldns" -PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit" -PACKAGECONFIG[manpages] = "--with-mantype=man,--with-mantype=cat" - -# login path is hardcoded in sshd -EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \ - ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \ - --without-zlib-version-check \ - --with-privsep-path=${localstatedir}/run/sshd \ - --sysconfdir=${sysconfdir}/ssh \ - --with-xauth=${bindir}/xauth \ - --disable-strip \ - " - -# musl doesn't implement wtmp/utmp -EXTRA_OECONF_append_libc-musl = " --disable-wtmp" - -# Since we do not depend on libbsd, we do not want configure to use it -# just because it finds libutil.h. But, specifying --disable-libutil -# causes compile errors, so... -CACHED_CONFIGUREVARS += "ac_cv_header_bsd_libutil_h=no ac_cv_header_libutil_h=no" - -# passwd path is hardcoded in sshd -CACHED_CONFIGUREVARS += "ac_cv_path_PATH_PASSWD_PROG=${bindir}/passwd" - -# We don't want to depend on libblockfile -CACHED_CONFIGUREVARS += "ac_cv_header_maillock_h=no" - -# copy SRC_URI files -SRC_URI = "file://openssh/${BP}.tar.gz \ -file://ssh_config \ -file://init \ -file://sshd.socket \ -file://sshd@.service \ -file://sshdgenkeys.service \ -file://volatiles.99_sshd \ -file://config/common/sshd_check_keys \ -file://sshd_config \ -file://sshd_config_readonly \ -file://sshd \ -" - -PAM_SRC_URI = "file://sshd" -SRC_URI_EXTRA = "file://ssh_config \ - file://init \ - ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ - file://sshd.socket \ - file://sshd@.service \ - file://sshdgenkeys.service \ - file://volatiles.99_sshd \ - file://config/common/sshd_check_keys \ - " - -do_configure_prepend () { - export LD="${CC}" - install -m 0644 ${WORKDIR}/ssh_config ${B}/ -} - -do_install_append () { - if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then -# install -D -m 0644 ${WORKDIR}/openssh-8.2p1/sshd ${D}${sysconfdir}/pam.d/sshd - sed -i -e 's:#UsePAM no:UsePAM yes:' ${D}${sysconfdir}/ssh/sshd_config - fi - - if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then - sed -i -e 's:#X11Forwarding no:X11Forwarding yes:' ${D}${sysconfdir}/ssh/sshd_config - fi - - install -d ${D}${sysconfdir}/init.d - install -m 0750 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd - rm -f ${D}${bindir}/slogin ${D}${datadir}/Ssh.bin - rmdir ${D}${localstatedir}/run/sshd ${D}${localstatedir}/run ${D}${localstatedir} - install -d ${D}/${sysconfdir}/default/volatiles - install -m 644 ${WORKDIR}/volatiles.99_sshd ${D}/${sysconfdir}/default/volatiles/99_sshd - install -m 0755 ${S}/contrib/ssh-copy-id ${D}${bindir} - - # Create config files for read-only rootfs - install -d ${D}${sysconfdir}/ssh - install -m 644 ${D}${sysconfdir}/ssh/sshd_config ${D}${sysconfdir}/ssh/sshd_config_readonly - sed -i '/HostKey/d' ${D}${sysconfdir}/ssh/sshd_config_readonly - echo "HostKey /var/run/ssh/ssh_host_rsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly - echo "HostKey /var/run/ssh/ssh_host_ecdsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly - echo "HostKey /var/run/ssh/ssh_host_ed25519_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly - - install -d ${D}${systemd_unitdir}/system - install -c -m 0644 ${WORKDIR}/sshd.socket ${D}${systemd_unitdir}/system - install -c -m 0644 ${WORKDIR}/sshd@.service ${D}${systemd_unitdir}/system - install -c -m 0644 ${WORKDIR}/sshdgenkeys.service ${D}${systemd_unitdir}/system - sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ - -e 's,@SBINDIR@,${sbindir},g' \ - -e 's,@BINDIR@,${bindir},g' \ - -e 's,@LIBEXECDIR@,${libexecdir}/${BPN},g' \ - ${D}${systemd_unitdir}/system/sshd.socket ${D}${systemd_unitdir}/system/*.service - - sed -i -e 's,@LIBEXECDIR@,${libexecdir}/${BPN},g' \ - ${D}${sysconfdir}/init.d/sshd - cp ${WORKDIR}/ssh_config ${D}${sysconfdir}/ssh/ssh_config - cp ${WORKDIR}/sshd_config ${D}${sysconfdir}/ssh/sshd_config - cp ${WORKDIR}/sshd_config_readonly ${D}${sysconfdir}/ssh/sshd_config_readonly - install -d ${D}${sysconfdir}/pam.d - cp ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd - - install -D -m 0755 ${WORKDIR}/config/common/sshd_check_keys ${D}${libexecdir}/${BPN}/sshd_check_keys - chmod -s ${D}/usr/libexec/ssh-keysign - chmod 0600 ${D}${sysconfdir}/ssh/sshd_config - rm -rf ${D}/lib/ -} - -ALLOW_EMPTY_${PN} = "0" - -PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server" -FILES_${PN}-scp = "${bindir}/scp.${BPN} ${bindir}/scp" -FILES_${PN}-ssh = "${bindir}/ssh.${BPN} ${sysconfdir}/ssh/ssh_config" -FILES_${PN}-sshd = "${sbindir}/sshd ${sysconfdir}/init.d/sshd ${systemd_unitdir}/system" -FILES_${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config ${sysconfdir}/ssh/sshd_config_readonly ${sysconfdir}/default/volatiles/99_sshd ${sysconfdir}/pam.d/sshd" -FILES_${PN}-sshd += "${libexecdir}/${BPN}/sshd_check_keys" -FILES_${PN}-sftp = "${bindir}/sftp" -FILES_${PN}-sftp-server = "${libexecdir}/sftp-server" -FILES_${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*" -FILES_${PN}-keygen = "${bindir}/ssh-keygen" - -RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen" -RDEPENDS_${PN}-sshd += "${PN}-keygen ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-keyinit pam-plugin-loginuid', '', d)}" -#RRECOMMENDS_${PN}-sshd_append_class-target = " rng-tools" - -RPROVIDES_${PN}-ssh = "ssh" -RPROVIDES_${PN}-sshd = "sshd" - -RCONFLICTS_${PN} = "dropbear" -RCONFLICTS_${PN}-sshd = "dropbear" - -CONFFILES_${PN}-sshd = "${sysconfdir}/ssh/sshd_config" -CONFFILES_${PN}-ssh = "${sysconfdir}/ssh/ssh_config" - -BBCLASSEXTEND += "nativesdk" diff --git a/meta-openeuler/recipes-core/openssl/files/environment.d-openssl.sh b/meta-openeuler/recipes-core/openssl/files/environment.d-openssl.sh deleted file mode 100644 index d05a93b0f0d9b6ce3a6df333eb22fbebb8208288..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/openssl/files/environment.d-openssl.sh +++ /dev/null @@ -1 +0,0 @@ -export OPENSSL_CONF="$OECORE_NATIVE_SYSROOT/usr/lib/ssl/openssl.cnf" diff --git a/meta-openeuler/recipes-core/openssl/openssl.inc b/meta-openeuler/recipes-core/openssl/openssl.inc deleted file mode 100644 index 3ad0b70c5ad60cd5989f9b5144fb2a44dbbbdaff..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/openssl/openssl.inc +++ /dev/null @@ -1,76 +0,0 @@ -DEPENDS = "perl-native-runtime nettle" - -SRC_URI = "file://openssl/${BP}.tar.gz \ - file://openssl/openssl-1.1.1-build.patch \ - file://openssl/openssl-1.1.1-fips.patch \ - file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \ - file://0001-skip-test_symbol_presence.patch \ - file://0003-Add-support-for-io_pgetevents_time64-syscall.patch \ - file://0004-Fixup-support-for-io_pgetevents_time64-syscall.patch \ - file://afalg.patch \ - file://reproducible.patch \ -" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=d343e62fc9c833710bbbed25f27364c8" - -S = "${WORKDIR}/${BP}" - -#AR_append = " r" -# Avoid binaries being marked as requiring an executable stack since it -# doesn't(which causes and this causes issues with SELinux -inherit utils -CFLAG = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \ - -DTERMIO ${CFLAGS} -Wall -Wa,--noexecstack" - -# -02 does not work on mipsel: ssh hangs when it tries to read /dev/urandom -CFLAG_mtx-1 := "${@'${CFLAG}'.replace('-O2', '')}" -CFLAG_mtx-2 := "${@'${CFLAG}'.replace('-O2', '')}" - -export DIRS = "crypto ssl apps" -export EX_LIBS = "-lgcc -ldl" -export AS = "${CC} -c" - -inherit pkgconfig siteinfo ptest - -# Remove this to enable SSLv3. SSLv3 is defaulted to disabled due to the POODLE -# vulnerability -EXTRA_OECONF = " -no-ssl3" - -do_configure_prepend_darwin () { - sed -i -e '/version-script=openssl\.ld/d' Configure -} - -do_compile_prepend_class-target () { - sed -i 's/\((OPENSSL=\)".*"/\1"openssl"/' Makefile -} - -do_compile () { - oe_runmake -} - -do_compile_ptest () { - oe_runmake buildtest -} - -do_install_ptest () { - cp -r Makefile test ${D}${PTEST_PATH} - cp -r certs ${D}${PTEST_PATH} - mkdir -p ${D}${PTEST_PATH}/apps - ln -sf /usr/lib/ssl/misc/CA.sh ${D}${PTEST_PATH}/apps - ln -sf /usr/lib/ssl/openssl.cnf ${D}${PTEST_PATH}/apps - ln -sf /usr/bin/openssl ${D}${PTEST_PATH}/apps - cp apps/server2.pem ${D}${PTEST_PATH}/apps - mkdir -p ${D}${PTEST_PATH}/util - install util/opensslwrap.sh ${D}${PTEST_PATH}/util - install util/shlib_wrap.sh ${D}${PTEST_PATH}/util -} - -do_install_append_virtclass-native() { - create_wrapper ${D}${bindir}/openssl \ - OPENSSL_CONF=${libdir}/ssl/openssl.cnf \ - SSL_CERT_DIR=${libdir}/ssl/certs \ - SSL_CERT_FILE=${libdir}/ssl/cert.pem \ - OPENSSL_ENGINES=${libdir}/ssl/engines -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-core/openssl/openssl/0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch b/meta-openeuler/recipes-core/openssl/openssl/0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch deleted file mode 100644 index 1d8821578a3bb11b830555ba69e5e9e3e92a777a..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/openssl/openssl/0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 3e1d00481093e10775eaf69d619c45b32a4aa7dc Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= -Date: Tue, 6 Nov 2018 14:50:47 +0100 -Subject: [PATCH] buildinfo: strip sysroot and debug-prefix-map from compiler - info -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The openssl build system generates buildinf.h containing the full -compiler command line used to compile objects. This breaks -reproducibility, as the compile command is baked into libcrypto, where -it is used when running `openssl version -f`. - -Add stripped build variables for the compiler and cflags lines, and use -those when generating buildinfo.h. - -This is based on a similar patch for older openssl versions: -https://patchwork.openembedded.org/patch/147229/ - -Upstream-Status: Inappropriate [OE specific] -Signed-off-by: Martin Hundeb酶ll - - -Update to fix buildpaths qa issue for '-fmacro-prefix-map'. - -Signed-off-by: Kai Kang ---- - Configurations/unix-Makefile.tmpl | 10 +++++++++- - crypto/build.info | 2 +- - 2 files changed, 10 insertions(+), 2 deletions(-) - -diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl -index 16af4d2087..54c162784c 100644 ---- a/Configurations/unix-Makefile.tmpl -+++ b/Configurations/unix-Makefile.tmpl -@@ -317,13 +317,22 @@ BIN_LDFLAGS={- join(' ', $target{bin_lflags} || (), - '$(CNF_LDFLAGS)', '$(LDFLAGS)') -} - BIN_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS) - --# CPPFLAGS_Q is used for one thing only: to build up buildinf.h -+# *_Q variables are used for one thing only: to build up buildinf.h - CPPFLAGS_Q={- $cppflags1 =~ s|([\\"])|\\$1|g; - $cppflags2 =~ s|([\\"])|\\$1|g; - $lib_cppflags =~ s|([\\"])|\\$1|g; - join(' ', $lib_cppflags || (), $cppflags2 || (), - $cppflags1 || ()) -} - -+CFLAGS_Q={- for (@{$config{CFLAGS}}) { -+ s|-fdebug-prefix-map=[^ ]+|-fdebug-prefix-map=|g; -+ s|-fmacro-prefix-map=[^ ]+|-fmacro-prefix-map=|g; -+ } -+ join(' ', @{$config{CFLAGS}}) -} -+ -+CC_Q={- $config{CC} =~ s|--sysroot=[^ ]+|--sysroot=recipe-sysroot|g; -+ join(' ', $config{CC}) -} -+ - PERLASM_SCHEME= {- $target{perlasm_scheme} -} - - # For x86 assembler: Set PROCESSOR to 386 if you want to support -diff --git a/crypto/build.info b/crypto/build.info -index b515b7318e..8c9cee2a09 100644 ---- a/crypto/build.info -+++ b/crypto/build.info -@@ -10,7 +10,7 @@ EXTRA= ../ms/uplink-x86.pl ../ms/uplink.c ../ms/applink.c \ - ppccpuid.pl pariscid.pl alphacpuid.pl arm64cpuid.pl armv4cpuid.pl - - DEPEND[cversion.o]=buildinf.h --GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC) $(LIB_CFLAGS) $(CPPFLAGS_Q)" "$(PLATFORM)" -+GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC_Q) $(CFLAGS_Q) $(CPPFLAGS_Q)" "$(PLATFORM)" - DEPEND[buildinf.h]=../configdata.pm - - GENERATE[uplink-x86.s]=../ms/uplink-x86.pl $(PERLASM_SCHEME) --- -2.19.1 - diff --git a/meta-openeuler/recipes-core/openssl/openssl/0001-skip-test_symbol_presence.patch b/meta-openeuler/recipes-core/openssl/openssl/0001-skip-test_symbol_presence.patch deleted file mode 100644 index f6032dca144b168751648d77905d9a3a3d06b310..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/openssl/openssl/0001-skip-test_symbol_presence.patch +++ /dev/null @@ -1,46 +0,0 @@ -From a9401b2289656c5a36dd1b0ecebf0d23e291ce70 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia -Date: Tue, 2 Oct 2018 23:58:24 +0800 -Subject: [PATCH] skip test_symbol_presence - -We cannot skip `01-test_symbol_presence.t' by configuring option `no-shared' -as INSTALL told us the shared libraries will not be built. - -[INSTALL snip] - Notes on shared libraries - ------------------------- - - For most systems the OpenSSL Configure script knows what is needed to - build shared libraries for libcrypto and libssl. On these systems - the shared libraries will be created by default. This can be suppressed and - only static libraries created by using the "no-shared" option. On systems - where OpenSSL does not know how to build shared libraries the "no-shared" - option will be forced and only static libraries will be created. -[INSTALL snip] - -Hence directly modification the case to skip it. - -Upstream-Status: Inappropriate [OE Specific] - -Signed-off-by: Hongxu Jia ---- - test/recipes/01-test_symbol_presence.t | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/test/recipes/01-test_symbol_presence.t b/test/recipes/01-test_symbol_presence.t -index 7f2a2d7..0b93745 100644 ---- a/test/recipes/01-test_symbol_presence.t -+++ b/test/recipes/01-test_symbol_presence.t -@@ -14,8 +14,7 @@ use OpenSSL::Test::Utils; - - setup("test_symbol_presence"); - --plan skip_all => "Only useful when building shared libraries" -- if disabled("shared"); -+plan skip_all => "The case needs debug symbols then we just disable it"; - - my @libnames = ("crypto", "ssl"); - my $testcount = scalar @libnames; --- -2.7.4 - diff --git a/meta-openeuler/recipes-core/openssl/openssl/0003-Add-support-for-io_pgetevents_time64-syscall.patch b/meta-openeuler/recipes-core/openssl/openssl/0003-Add-support-for-io_pgetevents_time64-syscall.patch deleted file mode 100644 index bfd878a0e23038a30c74cae3598c118e0e86fa30..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/openssl/openssl/0003-Add-support-for-io_pgetevents_time64-syscall.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 5b5e2985f355c8e99c196d9ce5d02c15bebadfbc Mon Sep 17 00:00:00 2001 -From: Alistair Francis -Date: Thu, 29 Aug 2019 13:56:21 -0700 -Subject: [PATCH] Add support for io_pgetevents_time64 syscall - -32-bit architectures that are y2038 safe don't include syscalls that use -32-bit time_t. Instead these architectures have suffixed syscalls that -always use a 64-bit time_t. In the case of the io_getevents syscall the -syscall has been replaced with the io_pgetevents_time64 syscall instead. - -This patch changes the io_getevents() function to use the correct -syscall based on the avaliable syscalls and the time_t size. We will -only use the new 64-bit time_t syscall if the architecture is using a -64-bit time_t. This is to avoid having to deal with 32/64-bit -conversions and relying on a 64-bit timespec struct on 32-bit time_t -platforms. As of Linux 5.3 there are no 32-bit time_t architectures -without __NR_io_getevents. In the future if a 32-bit time_t architecture -wants to use the 64-bit syscalls we can handle the conversion. - -This fixes build failures on 32-bit RISC-V. - -Signed-off-by: Alistair Francis - -Reviewed-by: Richard Levitte -Reviewed-by: Paul Dale -(Merged from https://github.com/openssl/openssl/pull/9819) -Upstream-Status: Accepted ---- - engines/e_afalg.c | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) - -diff --git a/engines/e_afalg.c b/engines/e_afalg.c -index dacbe358cb..99516cb1bb 100644 ---- a/engines/e_afalg.c -+++ b/engines/e_afalg.c -@@ -125,7 +125,23 @@ static ossl_inline int io_getevents(aio_context_t ctx, long min, long max, - struct io_event *events, - struct timespec *timeout) - { -+#if defined(__NR_io_getevents) - return syscall(__NR_io_getevents, ctx, min, max, events, timeout); -+#elif defined(__NR_io_pgetevents_time64) -+ /* Let's only support the 64 suffix syscalls for 64-bit time_t. -+ * This simplifies the code for us as we don't need to use a 64-bit -+ * version of timespec with a 32-bit time_t and handle converting -+ * between 64-bit and 32-bit times and check for overflows. -+ */ -+ if (sizeof(timeout->tv_sec) == 8) -+ return syscall(__NR_io_pgetevents_time64, ctx, min, max, events, timeout, NULL); -+ else { -+ errno = ENOSYS; -+ return -1; -+ } -+#else -+# error "We require either the io_getevents syscall or __NR_io_pgetevents_time64." -+#endif - } - - static void afalg_waitfd_cleanup(ASYNC_WAIT_CTX *ctx, const void *key, --- -2.30.1 - diff --git a/meta-openeuler/recipes-core/openssl/openssl/0004-Fixup-support-for-io_pgetevents_time64-syscall.patch b/meta-openeuler/recipes-core/openssl/openssl/0004-Fixup-support-for-io_pgetevents_time64-syscall.patch deleted file mode 100644 index c16d490aec09578ad807246a042e5880641853a7..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/openssl/openssl/0004-Fixup-support-for-io_pgetevents_time64-syscall.patch +++ /dev/null @@ -1,99 +0,0 @@ -From e5499a3cac1e823c3e0697e8667e952317b70cc8 Mon Sep 17 00:00:00 2001 -From: Alistair Francis -Date: Thu, 4 Mar 2021 12:10:11 -0500 -Subject: [PATCH] Fixup support for io_pgetevents_time64 syscall - -This is a fixup for the original commit 5b5e2985f355c8e99c196d9ce5d02c15bebadfbc -"Add support for io_pgetevents_time64 syscall" that didn't correctly -work for 32-bit architecutres with a 64-bit time_t that aren't RISC-V. - -For a full discussion of the issue see: -https://github.com/openssl/openssl/commit/5b5e2985f355c8e99c196d9ce5d02c15bebadfbc - -Signed-off-by: Alistair Francis - -Reviewed-by: Tomas Mraz -Reviewed-by: Paul Dale -(Merged from https://github.com/openssl/openssl/pull/14432) -Upstream-Status: Accepted ---- - engines/e_afalg.c | 55 ++++++++++++++++++++++++++++++++++++----------- - 1 file changed, 42 insertions(+), 13 deletions(-) - -diff --git a/engines/e_afalg.c b/engines/e_afalg.c -index 9480d7c24b..4e9d67db2d 100644 ---- a/engines/e_afalg.c -+++ b/engines/e_afalg.c -@@ -124,27 +124,56 @@ static ossl_inline int io_read(aio_context_t ctx, long n, struct iocb **iocb) - return syscall(__NR_io_submit, ctx, n, iocb); - } - -+/* A version of 'struct timespec' with 32-bit time_t and nanoseconds. */ -+struct __timespec32 -+{ -+ __kernel_long_t tv_sec; -+ __kernel_long_t tv_nsec; -+}; -+ - static ossl_inline int io_getevents(aio_context_t ctx, long min, long max, - struct io_event *events, - struct timespec *timeout) - { -+#if defined(__NR_io_pgetevents_time64) -+ /* Check if we are a 32-bit architecture with a 64-bit time_t */ -+ if (sizeof(*timeout) != sizeof(struct __timespec32)) { -+ int ret = syscall(__NR_io_pgetevents_time64, ctx, min, max, events, -+ timeout, NULL); -+ if (ret == 0 || errno != ENOSYS) -+ return ret; -+ } -+#endif -+ - #if defined(__NR_io_getevents) -- return syscall(__NR_io_getevents, ctx, min, max, events, timeout); --#elif defined(__NR_io_pgetevents_time64) -- /* Let's only support the 64 suffix syscalls for 64-bit time_t. -- * This simplifies the code for us as we don't need to use a 64-bit -- * version of timespec with a 32-bit time_t and handle converting -- * between 64-bit and 32-bit times and check for overflows. -- */ -- if (sizeof(timeout->tv_sec) == 8) -- return syscall(__NR_io_pgetevents_time64, ctx, min, max, events, timeout, NULL); -+ if (sizeof(*timeout) == sizeof(struct __timespec32)) -+ /* -+ * time_t matches our architecture length, we can just use -+ * __NR_io_getevents -+ */ -+ return syscall(__NR_io_getevents, ctx, min, max, events, timeout); - else { -- errno = ENOSYS; -- return -1; -+ /* -+ * We don't have __NR_io_pgetevents_time64, but we are using a -+ * 64-bit time_t on a 32-bit architecture. If we can fit the -+ * timeout value in a 32-bit time_t, then let's do that -+ * and then use the __NR_io_getevents syscall. -+ */ -+ if (timeout && timeout->tv_sec == (long)timeout->tv_sec) { -+ struct __timespec32 ts32; -+ -+ ts32.tv_sec = (__kernel_long_t) timeout->tv_sec; -+ ts32.tv_nsec = (__kernel_long_t) timeout->tv_nsec; -+ -+ return syscall(__NR_io_getevents, ctx, min, max, events, ts32); -+ } else { -+ return syscall(__NR_io_getevents, ctx, min, max, events, NULL); -+ } - } --#else --# error "We require either the io_getevents syscall or __NR_io_pgetevents_time64." - #endif -+ -+ errno = ENOSYS; -+ return -1; - } - - static void afalg_waitfd_cleanup(ASYNC_WAIT_CTX *ctx, const void *key, --- -2.30.1 - diff --git a/meta-openeuler/recipes-core/openssl/openssl/afalg.patch b/meta-openeuler/recipes-core/openssl/openssl/afalg.patch deleted file mode 100644 index ce816086a4630c1c3a710ec49b475a131cc840ac..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/openssl/openssl/afalg.patch +++ /dev/null @@ -1,31 +0,0 @@ -Don't refuse to build afalgeng if cross-compiling or the host kernel is too old. - -Upstream-Status: Submitted [hhttps://github.com/openssl/openssl/pull/7688] -Signed-off-by: Ross Burton - -diff --git a/Configure b/Configure -index 3baa8ce..9ef52ed 100755 ---- a/Configure -+++ b/Configure -@@ -1550,20 +1550,7 @@ unless ($disabled{"crypto-mdebug-backtrace"}) - unless ($disabled{afalgeng}) { - $config{afalgeng}=""; - if (grep { $_ eq 'afalgeng' } @{$target{enable}}) { -- my $minver = 4*10000 + 1*100 + 0; -- if ($config{CROSS_COMPILE} eq "") { -- my $verstr = `uname -r`; -- my ($ma, $mi1, $mi2) = split("\\.", $verstr); -- ($mi2) = $mi2 =~ /(\d+)/; -- my $ver = $ma*10000 + $mi1*100 + $mi2; -- if ($ver < $minver) { -- disable('too-old-kernel', 'afalgeng'); -- } else { -- push @{$config{engdirs}}, "afalg"; -- } -- } else { -- disable('cross-compiling', 'afalgeng'); -- } -+ push @{$config{engdirs}}, "afalg"; - } else { - disable('not-linux', 'afalgeng'); - } diff --git a/meta-openeuler/recipes-core/openssl/openssl/find.pl b/meta-openeuler/recipes-core/openssl/openssl/find.pl deleted file mode 100644 index 257d6276c821f0a38e8b9a39a583f5be6154e1c0..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/openssl/openssl/find.pl +++ /dev/null @@ -1,54 +0,0 @@ -warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n"; - -# This library is deprecated and unmaintained. It is included for -# compatibility with Perl 4 scripts which may use it, but it will be -# removed in a future version of Perl. Please use the File::Find module -# instead. - -# Usage: -# require "find.pl"; -# -# &find('/foo','/bar'); -# -# sub wanted { ... } -# where wanted does whatever you want. $dir contains the -# current directory name, and $_ the current filename within -# that directory. $name contains "$dir/$_". You are cd'ed -# to $dir when the function is called. The function may -# set $prune to prune the tree. -# -# For example, -# -# find / -name .nfs\* -mtime +7 -exec rm -f {} \; -o -fstype nfs -prune -# -# corresponds to this -# -# sub wanted { -# /^\.nfs.*$/ && -# (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -# int(-M _) > 7 && -# unlink($_) -# || -# ($nlink || (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_))) && -# $dev < 0 && -# ($prune = 1); -# } -# -# Set the variable $dont_use_nlink if you're using AFS, since AFS cheats. - -use File::Find (); - -*name = *File::Find::name; -*prune = *File::Find::prune; -*dir = *File::Find::dir; -*topdir = *File::Find::topdir; -*topdev = *File::Find::topdev; -*topino = *File::Find::topino; -*topmode = *File::Find::topmode; -*topnlink = *File::Find::topnlink; - -sub find { - &File::Find::find(\&wanted, @_); -} - -1; diff --git a/meta-openeuler/recipes-core/openssl/openssl/reproducible.patch b/meta-openeuler/recipes-core/openssl/openssl/reproducible.patch deleted file mode 100644 index 35441f304d4dbe70822200443370ad92907c23d9..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/openssl/openssl/reproducible.patch +++ /dev/null @@ -1,32 +0,0 @@ -The value for perl_archname can vary depending on the host, e.g. -x86_64-linux-gnu-thread-multi or x86_64-linux-thread-multi which -makes the ptest package non-reproducible. Its unused other than -these references so drop it. - -RP 2020/2/6 - -Upstream-Status: Pending -Signed-off-by: Richard Purdie - -Index: openssl-1.1.1d/Configure -=================================================================== ---- openssl-1.1.1d.orig/Configure -+++ openssl-1.1.1d/Configure -@@ -286,7 +286,7 @@ if (defined env($local_config_envname)) - # Save away perl command information - $config{perl_cmd} = $^X; - $config{perl_version} = $Config{version}; --$config{perl_archname} = $Config{archname}; -+#$config{perl_archname} = $Config{archname}; - - $config{prefix}=""; - $config{openssldir}=""; -@@ -2517,7 +2517,7 @@ _____ - @{$config{perlargv}}), "\n"; - print "\nPerl information:\n\n"; - print ' ',$config{perl_cmd},"\n"; -- print ' ',$config{perl_version},' for ',$config{perl_archname},"\n"; -+ print ' ',$config{perl_version},"\n"; - } - if ($dump || $options) { - my $longest = 0; diff --git a/meta-openeuler/recipes-core/openssl/openssl/run-ptest b/meta-openeuler/recipes-core/openssl/openssl/run-ptest deleted file mode 100644 index d62d309ee14a9b3d0e5fcce743131d4c5d6ceb2f..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/openssl/openssl/run-ptest +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -set -e - -# Optional arguments are 'list' to lists all tests, or the test name (base name -# ie test_evp, not 03_test_evp.t). - -export TOP=. -# OPENSSL_ENGINES is relative from the test binaries -export OPENSSL_ENGINES=../engines - -perl ./test/run_tests.pl $* | perl -0pe 's#(.*) \.*.ok#PASS: \1#g; s#(.*) \.*.skipped: (.*)#SKIP: \1 (\2)#g; s#(.*) \.*.\nDubious#FAIL: \1#;' diff --git a/meta-openeuler/recipes-core/openssl/openssl_1.1.1m.bb b/meta-openeuler/recipes-core/openssl/openssl_1.1.1m.bb deleted file mode 100644 index cd3fb7e97c758908eca76a20a9e76292ef3187d6..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/openssl/openssl_1.1.1m.bb +++ /dev/null @@ -1,175 +0,0 @@ -require openssl.inc -SUMMARY = "Secure Socket Layer" -DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools." -HOMEPAGE = "http://www.openssl.org/" -BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html" -SECTION = "libs/network" - -# "openssl" here actually means both OpenSSL and SSLeay licenses apply -# (see meta/files/common-licenses/OpenSSL to which "openssl" is SPDXLICENSEMAPped) -LICENSE = "openssl" - -DEPENDS = "hostperl-runtime-native" - -inherit lib_package multilib_header -MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash" - -PACKAGECONFIG ?= "" -PACKAGECONFIG_class-native = "" -PACKAGECONFIG_class-nativesdk = "" -PACKAGECONFIG[perl] = ",,," -PACKAGECONFIG[cryptodev-linux] = "enable-devcryptoeng,disable-devcryptoeng,cryptodev-linux" - -#| ./libcrypto.so: undefined reference to `getcontext' -#| ./libcrypto.so: undefined reference to `setcontext' -#| ./libcrypto.so: undefined reference to `makecontext' -EXTRA_OECONF_append_libc-musl = " no-async" -EXTRA_OECONF_append_libc-musl_powerpc64 = " no-asm" - -# This prevents openssl from using getrandom() which is not available on older glibc versions -# (native versions can be built with newer glibc, but then relocated onto a system with older glibc) -EXTRA_OECONF_class-native = "--with-rand-seed=devrandom" -EXTRA_OECONF_class-nativesdk = "--with-rand-seed=devrandom" - -# Relying on hardcoded built-in paths causes openssl-native to not be relocateable from sstate. -CFLAGS_append_class-native = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin" -CFLAGS_append_class-nativesdk = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin" -CFLAGS_append += "${LDFLAGS}" - -EXTRA_OECONF_arm32a15eb += " -no-asm" - -do_configure () { - os=${HOST_OS} - case $os in - linux-gnueabi |\ - linux-gnuspe |\ - linux-musleabi |\ - linux-muslspe |\ - linux-musl ) - os=linux - ;; - *) - ;; - esac - target="$os-${HOST_ARCH}" - case $target in - linux-arm*) - target=linux-armv4 - ;; - linux-aarch64*) - target=linux-aarch64 - ;; - linux-i?86 | linux-viac3) - target=linux-x86 - ;; - linux-gnux32-x86_64 | linux-muslx32-x86_64 ) - target=linux-x32 - ;; - linux-gnu64-x86_64) - target=linux-x86_64 - ;; - linux-mips | linux-mipsel) - # specifying TARGET_CC_ARCH prevents openssl from (incorrectly) adding target architecture flags - target="linux-mips32 ${TARGET_CC_ARCH}" - ;; - linux-gnun32-mips*) - target=linux-mips64 - ;; - linux-*-mips64 | linux-mips64 | linux-*-mips64el | linux-mips64el) - target=linux64-mips64 - ;; - linux-microblaze* | linux-nios2* | linux-sh3 | linux-sh4 | linux-arc*) - target=linux-generic32 - ;; - linux-powerpc) - target=linux-ppc - ;; - linux-powerpc64) - target=linux-ppc64 - ;; - linux-riscv32) - target=linux-generic32 - ;; - linux-riscv64) - target=linux-generic64 - ;; - linux-sparc | linux-supersparc) - target=linux-sparcv9 - ;; - linux-gnu_ilp32*) - target=linux-arm64ilp32 - ;; - esac - - useprefix=${prefix} - if [ "x$useprefix" = "x" ]; then - useprefix=/ - fi - # WARNING: do not set compiler/linker flags (-I/-D etc.) in EXTRA_OECONF, as they will fully replace the - # environment variables set by bitbake. Adjust the environment variables instead. - if [ target = "linux-arm64ilp32" ]; then - perl ./Configure --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdir} $target - else - perl ./Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdir} $target - fi - -} - -do_install () { - oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install - - oe_multilib_header openssl/opensslconf.h - - # Create SSL structure for packages such as ca-certificates which - # contain hard-coded paths to /etc/ssl. Debian does the same. - install -d ${D}${sysconfdir}/ssl - mv ${D}${libdir}/ssl-1.1/certs \ - ${D}${libdir}/ssl-1.1/private \ - ${D}${libdir}/ssl-1.1/openssl.cnf \ - ${D}${sysconfdir}/ssl/ - - # Although absolute symlinks would be OK for the target, they become - # invalid if native or nativesdk are relocated from sstate. - ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/certs')} ${D}${libdir}/ssl-1.1/certs - ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/private')} ${D}${libdir}/ssl-1.1/private - ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/openssl.cnf')} ${D}${libdir}/ssl-1.1/openssl.cnf -} - -do_install_append_class-native () { - create_wrapper ${D}${bindir}/openssl \ - OPENSSL_CONF=${libdir}/ssl-1.1/openssl.cnf \ - SSL_CERT_DIR=${libdir}/ssl-1.1/certs \ - SSL_CERT_FILE=${libdir}/ssl-1.1/cert.pem \ - OPENSSL_ENGINES=${libdir}/ssl-1.1/engines -} - -do_install_append_class-nativesdk () { - mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d - install -m 644 ${WORKDIR}/environment.d-openssl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh - sed 's|/usr/lib/ssl/|/usr/lib/ssl-1.1/|g' -i ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh -} - -PACKAGES =+ "libcrypto libssl ${PN}-conf ${PN}-misc" - -# Add the openssl.cnf file to the openssl-conf package. Make the libcrypto -# package RRECOMMENDS on this package. This will enable the configuration -# file to be installed for both the openssl-bin package and the libcrypto -# package since the openssl-bin package depends on the libcrypto package. - -FILES_libcrypto = "${libdir}/libcrypto${SOLIBS}" -FILES_libssl = "${libdir}/libssl${SOLIBS}" -FILES_${PN}-conf = "${sysconfdir}/ssl/openssl.cnf" -FILES_${PN}-misc = "${libdir}/ssl-1.1/misc" -FILES_${PN} += "${libdir}/ssl-1.1/* ${sysconfdir}/ssl/* ${libdir}/engines-1.1/*" -FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/openssl.sh" - -CONFFILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf" - -RRECOMMENDS_libcrypto += "openssl-conf" -RDEPENDS_${PN}-misc = "${@bb.utils.contains('PACKAGECONFIG', 'perl', 'perl', '', d)}" -RDEPENDS_${PN}-ptest += "openssl-bin perl perl-modules" - -BBCLASSEXTEND = "native nativesdk" - -CVE_PRODUCT = "openssl:openssl" - diff --git a/meta-openeuler/recipes-core/os-base/os-base/LICENSE b/meta-openeuler/recipes-core/os-base/os-base/LICENSE deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/os-base/os-base/LICENSE +++ /dev/null @@ -1 +0,0 @@ - diff --git a/meta-openeuler/recipes-core/os-base/os-base/bashrc b/meta-openeuler/recipes-core/os-base/os-base/bashrc deleted file mode 100644 index 619ea72ba08d9f0c2cfd4bfeb3e06ab52e568ae1..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/os-base/os-base/bashrc +++ /dev/null @@ -1,3 +0,0 @@ -TMOUT=300 -umask 077 -export TMOUT diff --git a/meta-openeuler/recipes-core/os-base/os-base/ethertypes b/meta-openeuler/recipes-core/os-base/os-base/ethertypes new file mode 100644 index 0000000000000000000000000000000000000000..caa9f56b1365d4f9c384c48477c516c03976255b --- /dev/null +++ b/meta-openeuler/recipes-core/os-base/os-base/ethertypes @@ -0,0 +1,45 @@ +# Ethernet frame types +# +# The EtherType is a two-octet field of Ethernet frames used to indicate +# which protocol is contained in their payload. +# +# More entries, mostly historical, can be found on: +# https://www.iana.org/assignments/ieee-802-numbers/ +# http://standards-oui.ieee.org/ethertype/eth.txt +# +# ... # Comment +# +IPv4 0800 ip ip4 # IP (IPv4) +X25 0805 +ARP 0806 ether-arp # Address Resolution Protocol +FR_ARP 0808 # Frame Relay ARP [RFC1701] +BPQ 08FF # G8BPQ AX.25 over Ethernet +TRILL 22F3 # TRILL [RFC6325] +L2-IS-IS 22F4 # TRILL IS-IS [RFC6325] +TEB 6558 # Transparent Ethernet Bridging [RFC1701] +RAW_FR 6559 # Raw Frame Relay [RFC1701] +RARP 8035 # Reverse ARP [RFC903] +ATALK 809B # Appletalk +AARP 80F3 # Appletalk Address Resolution Protocol +802_1Q 8100 8021q 1q 802.1q dot1q # VLAN tagged frame [802.1q] +IPX 8137 # Novell IPX +NetBEUI 8191 # NetBEUI +IPv6 86DD ip6 # IP version 6 +PPP 880B # Point-to-Point Protocol +MPLS 8847 # MPLS [RFC5332] +MPLS_MULTI 8848 # MPLS with upstream-assigned label [RFC5332] +ATMMPOA 884C # MultiProtocol over ATM +PPP_DISC 8863 # PPP over Ethernet discovery stage +PPP_SES 8864 # PPP over Ethernet session stage +ATMFATE 8884 # Frame-based ATM Transport over Ethernet +EAPOL 888E # EAP over LAN [802.1x] +S-TAG 88A8 # QinQ Service VLAN tag identifier [802.1q] +EAP_PREAUTH 88C7 # EAPOL Pre-Authentication [802.11i] +LLDP 88CC # Link Layer Discovery Protocol [802.1ab] +MACSEC 88E5 # Media Access Control Security [802.1ae] +PBB 88E7 macinmac # Provider Backbone Bridging [802.1ah] +MVRP 88F5 # Multiple VLAN Registration Protocol [802.1q] +PTP 88F7 # Precision Time Protocol +FCOE 8906 # Fibre Channel over Ethernet +FIP 8914 # FCoE Initialization Protocol +ROCE 8915 # RDMA over Converged Ethernet diff --git a/meta-openeuler/recipes-core/os-base/os-base/fstab b/meta-openeuler/recipes-core/os-base/os-base/fstab deleted file mode 100644 index bf3c16e8aa93aa68005d0ad2c71dd59fac1d6ae0..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/os-base/os-base/fstab +++ /dev/null @@ -1,8 +0,0 @@ -proc /proc proc defaults 0 0 -sysfs /sys sysfs defaults 0 0 -none /var tmpfs nodev,nosuid,mode=755,noexec 0 0 -none /var/log/audit tmpfs nodev,nosuid,mode=755 0 0 -devtmpfs /dev devtmpfs defaults 0 0 -tmpfs /dev/shm tmpfs nodev,nosuid,mode=1777,noexec 0 0 -devpts /dev/pts devpts mode=620 0 0 -tmpfs /tmp tmpfs nodev,nosuid,noexec 0 0 diff --git a/meta-openeuler/recipes-core/os-base/os-base/group b/meta-openeuler/recipes-core/os-base/os-base/group deleted file mode 100644 index 007e06d70f44be10167203888e004324588a76a6..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/os-base/os-base/group +++ /dev/null @@ -1,2 +0,0 @@ -root:x:0: -sshd:x:502: diff --git a/meta-openeuler/recipes-core/os-base/os-base/inittab b/meta-openeuler/recipes-core/os-base/os-base/inittab deleted file mode 100644 index cdc0f97b5c537b70da148165db6eefc297cc6e61..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/os-base/os-base/inittab +++ /dev/null @@ -1,3 +0,0 @@ -::sysinit:/etc/rc.d/rc.sysinit -::respawn:/sbin/getty -L 115200 ttyAMA0 vt102 -::ctrlaltdel:/bin/false diff --git a/meta-openeuler/recipes-core/os-base/os-base/issue b/meta-openeuler/recipes-core/os-base/os-base/issue deleted file mode 100644 index eb110ba757c91351a720a6fbd1d79fd4694250cc..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/os-base/os-base/issue +++ /dev/null @@ -1 +0,0 @@ -Authorized uses only. All activity may be monitored and reported. diff --git a/meta-openeuler/recipes-core/os-base/os-base/issue.net b/meta-openeuler/recipes-core/os-base/os-base/issue.net deleted file mode 100644 index eb110ba757c91351a720a6fbd1d79fd4694250cc..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/os-base/os-base/issue.net +++ /dev/null @@ -1 +0,0 @@ -Authorized uses only. All activity may be monitored and reported. diff --git a/meta-openeuler/recipes-core/os-base/os-base/modules b/meta-openeuler/recipes-core/os-base/os-base/modules deleted file mode 100644 index 4072fc4e90af0a5a4784674dec19b203c7947891..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/os-base/os-base/modules +++ /dev/null @@ -1,30 +0,0 @@ -llc -stp -garp -8021q -af_packet -libcrc32c -tunnel4 -x_tables -inet_diag -nf_defrag_ipv4 -nf_defrag_ipv6 -nf_conntrack -nf_nat -xt_tcpudp -crc-ccitt -ipv6 -ip6_udp_tunnel -ip6_tables -ip6table_filter -nf_reject_ipv6 -ip_tunnel -ipip -ip_tables -nf_reject_ipv4 -ipt_REJECT -iptable_filter -ip6t_REJECT -xt_nat -iptable_nat -ip6table_nat diff --git a/meta-openeuler/recipes-core/os-base/os-base/motd b/meta-openeuler/recipes-core/os-base/os-base/motd deleted file mode 100644 index eb110ba757c91351a720a6fbd1d79fd4694250cc..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/os-base/os-base/motd +++ /dev/null @@ -1 +0,0 @@ -Authorized uses only. All activity may be monitored and reported. diff --git a/meta-openeuler/recipes-core/os-base/os-base/passwd b/meta-openeuler/recipes-core/os-base/os-base/passwd deleted file mode 100644 index 6b34777a4248d8593c1e7e4f409a940427ed76da..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/os-base/os-base/passwd +++ /dev/null @@ -1,2 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -sshd:x:502:502:sshd privsep::/bin/false diff --git a/meta-openeuler/recipes-core/os-base/os-base/profile b/meta-openeuler/recipes-core/os-base/os-base/profile deleted file mode 100644 index bc66fd1e73e2a547dc20ce53667ebc55ae21f3fc..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/os-base/os-base/profile +++ /dev/null @@ -1,58 +0,0 @@ -# /etc/profile -# init bash prompt and enviroment. -# -# - -PS1="\[\033[32m\]\h \w\[\033[m\] \\$ " - -#init PATH -PATH=/usr/local/bin:/usr/bin:/bin -if [ `id -u` -eq 0 ]; then - PATH=/sbin:/usr/sbin:/usr/local/sbin:/root/bin:$PATH -fi - -ulimit -c 0 - -if [ `id -u` -eq 0 ]; then - umask 077 -else - umask 077 -fi - -USER=`id -un` -LOGNAME=$USER - -HOSTNAME=`/bin/hostname` -HISTSIZE=1000 - -TMOUT=300 - -EDITOR=vi -VISUAL=vi - -PAGER=more - -INPUTRC="/etc/inputrc" - -export PATH PS1 USER LOGNAME HOSTNAME HISTSIZE EDITOR VISUAL PAGER INPUTRC TMOUT - - -# Running the local scripts from the user -for i in /etc/profile.d/*.sh ; do - if [ -x $i ]; then - . $i - fi -done -unset i - -alias ls="ls --color=auto" -alias ll="ls -l" -PS1="\[\033[32m\]\h \w\[\033[m\] \\$ " -export PS1 -export TERM=vt200 -PS1="\[\033[32m\]\H \w\[\033[m\] \\$ " -export PS1 -export VERSION=1.0 -export PRODUCT_NAME=openeuler -export HISTSIZE TMOUT -alias su='su -l' diff --git a/meta-openeuler/recipes-core/os-base/os-base/protocols b/meta-openeuler/recipes-core/os-base/os-base/protocols new file mode 100644 index 0000000000000000000000000000000000000000..1f112b166876723aec07b34146154464b25a4ff1 --- /dev/null +++ b/meta-openeuler/recipes-core/os-base/os-base/protocols @@ -0,0 +1,64 @@ +# Internet (IP) protocols +# +# Updated from http://www.iana.org/assignments/protocol-numbers and other +# sources. +# New protocols will be added on request if they have been officially +# assigned by IANA and are not historical. +# If you need a huge list of used numbers please install the nmap package. + +ip 0 IP # internet protocol, pseudo protocol number +hopopt 0 HOPOPT # IPv6 Hop-by-Hop Option [RFC1883] +icmp 1 ICMP # internet control message protocol +igmp 2 IGMP # Internet Group Management +ggp 3 GGP # gateway-gateway protocol +ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'') +st 5 ST # ST datagram mode +tcp 6 TCP # transmission control protocol +egp 8 EGP # exterior gateway protocol +igp 9 IGP # any private interior gateway (Cisco) +pup 12 PUP # PARC universal packet protocol +udp 17 UDP # user datagram protocol +hmp 20 HMP # host monitoring protocol +xns-idp 22 XNS-IDP # Xerox NS IDP +rdp 27 RDP # "reliable datagram" protocol +iso-tp4 29 ISO-TP4 # ISO Transport Protocol class 4 [RFC905] +dccp 33 DCCP # Datagram Congestion Control Prot. [RFC4340] +xtp 36 XTP # Xpress Transfer Protocol +ddp 37 DDP # Datagram Delivery Protocol +idpr-cmtp 38 IDPR-CMTP # IDPR Control Message Transport +ipv6 41 IPv6 # Internet Protocol, version 6 +ipv6-route 43 IPv6-Route # Routing Header for IPv6 +ipv6-frag 44 IPv6-Frag # Fragment Header for IPv6 +idrp 45 IDRP # Inter-Domain Routing Protocol +rsvp 46 RSVP # Reservation Protocol +gre 47 GRE # General Routing Encapsulation +esp 50 IPSEC-ESP # Encap Security Payload [RFC2406] +ah 51 IPSEC-AH # Authentication Header [RFC2402] +skip 57 SKIP # SKIP +ipv6-icmp 58 IPv6-ICMP # ICMP for IPv6 +ipv6-nonxt 59 IPv6-NoNxt # No Next Header for IPv6 +ipv6-opts 60 IPv6-Opts # Destination Options for IPv6 +rspf 73 RSPF CPHB # Radio Shortest Path First (officially CPHB) +vmtp 81 VMTP # Versatile Message Transport +eigrp 88 EIGRP # Enhanced Interior Routing Protocol (Cisco) +ospf 89 OSPFIGP # Open Shortest Path First IGP +ax.25 93 AX.25 # AX.25 frames +ipip 94 IPIP # IP-within-IP Encapsulation Protocol +etherip 97 ETHERIP # Ethernet-within-IP Encapsulation [RFC3378] +encap 98 ENCAP # Yet Another IP encapsulation [RFC1241] +# 99 # any private encryption scheme +pim 103 PIM # Protocol Independent Multicast +ipcomp 108 IPCOMP # IP Payload Compression Protocol +vrrp 112 VRRP # Virtual Router Redundancy Protocol [RFC5798] +l2tp 115 L2TP # Layer Two Tunneling Protocol [RFC2661] +isis 124 ISIS # IS-IS over IPv4 +sctp 132 SCTP # Stream Control Transmission Protocol +fc 133 FC # Fibre Channel +mobility-header 135 Mobility-Header # Mobility Support for IPv6 [RFC3775] +udplite 136 UDPLite # UDP-Lite [RFC3828] +mpls-in-ip 137 MPLS-in-IP # MPLS-in-IP [RFC4023] +manet 138 # MANET Protocols [RFC5498] +hip 139 HIP # Host Identity Protocol +shim6 140 Shim6 # Shim6 Protocol [RFC5533] +wesp 141 WESP # Wrapped Encapsulating Security Payload +rohc 142 ROHC # Robust Header Compression diff --git a/meta-openeuler/recipes-core/os-base/os-base/rc.local b/meta-openeuler/recipes-core/os-base/os-base/rc.local deleted file mode 100644 index 401d32680ef215b0e38d970554ad22d3f3fbbda5..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/os-base/os-base/rc.local +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -. /etc/init.d/auditd start -/usr/sbin/rsyslogd - -chmod 640 /var/log/* -chmod 640 /dev/mem -chmod 600 /var/log/audit/audit.log - -. /etc/init.d/sshd start 1>/dev/null 2>&1 & diff --git a/meta-openeuler/recipes-core/os-base/os-base/rc.sysinit b/meta-openeuler/recipes-core/os-base/os-base/rc.sysinit index a8c226d1e822ed2436ccff07a50fd1a9d57c43a4..fe197f620d53439d5254ceb1ddac745ce7ce9f04 100644 --- a/meta-openeuler/recipes-core/os-base/os-base/rc.sysinit +++ b/meta-openeuler/recipes-core/os-base/os-base/rc.sysinit @@ -1,45 +1,13 @@ #! /bin/sh - PATH=/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin -function fs_mount() -{ - echo "mount file system" - mount_a -} - -function loading_module() -{ - echo "Loading the kernel modules: " - depmod - cat /etc/modules | sed -e '/^[ \t]*$/d' | - while read module - do - echo "Loading module: $module" - modprobe $module - done -} - -. /etc/rc.d/rc.functions - -# mount file system - fs_mount - -# load kernel modules - loading_module - -#creating a soft link for /dev/fd to /proc/self/fd - ln -s /proc/self/fd /dev/fd - +# include rc.functions + . /etc/init.d/rc.functions # creating device driver instances echo "Making device instances:" echo /sbin/mdev > /proc/sys/kernel/hotplug mdev -s -# setting up initial hostname - echo "Setting hostname: " - hostname -F /etc/hostname - # Cleaning up the Directory tmp echo "Cleaning up tmp :" rm -rf /tmp/* >/dev/null @@ -47,31 +15,13 @@ function loading_module() #touch /var/log/wtmp to record user login history touch /var/log/wtmp -# setting up the sysctl confgiruaton options - echo "Setting up the sysctl configurations:" - sysctl -p /etc/sysctl.conf > /dev/null - # setting up localhost loopback interface echo "Setting up interface lo: " ifconfig lo up 127.0.0.1 -# running local startup scripts - echo "Running local startup scripts." - for i in `ls /etc/rc.d/rc.start/* 2>/dev/null` ; do - if [ -x $i ]; then - $i start - fi - done - #print uptime after finish running rc.start if [ -r /proc/uptime ] then echo -n "System booting cost:" cat /proc/uptime fi - -# calling user defined scripts if any - if [ -x /etc/rc.d/rc.local ]; then - /etc/rc.d/rc.local - fi - diff --git a/meta-openeuler/recipes-core/os-base/os-base/rcS b/meta-openeuler/recipes-core/os-base/os-base/rcS deleted file mode 100644 index fc699e4723cd15a0ec0dd14b12555d1bd85c5dee..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/os-base/os-base/rcS +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -/bin/mount -a diff --git a/meta-openeuler/recipes-core/os-base/os-base/rpc b/meta-openeuler/recipes-core/os-base/os-base/rpc new file mode 100644 index 0000000000000000000000000000000000000000..1b306254330d0395c8a5cc9dbe2cf293a825032e --- /dev/null +++ b/meta-openeuler/recipes-core/os-base/os-base/rpc @@ -0,0 +1,40 @@ +# This file contains user readable names that can be used in place of rpc +# program numbers. + +portmapper 100000 portmap sunrpc +rstatd 100001 rstat rstat_svc rup perfmeter +rusersd 100002 rusers +nfs 100003 nfsprog +ypserv 100004 ypprog +mountd 100005 mount showmount +ypbind 100007 +walld 100008 rwall shutdown +yppasswdd 100009 yppasswd +etherstatd 100010 etherstat +rquotad 100011 rquotaprog quota rquota +sprayd 100012 spray +3270_mapper 100013 +rje_mapper 100014 +selection_svc 100015 selnsvc +database_svc 100016 +rexd 100017 rex +alis 100018 +sched 100019 +llockmgr 100020 +nlockmgr 100021 +x25.inr 100022 +statmon 100023 +status 100024 +bootparam 100026 +ypupdated 100028 ypupdate +keyserv 100029 keyserver +tfsd 100037 +nsed 100038 +nsemntd 100039 +ypxfrd 100069 +pcnfsd 150001 +amd 300019 amq +sgi_fam 391002 +ugidd 545580417 +fypxfrd 600100069 freebsd-ypxfrd +bwnfsd 788585389 diff --git a/meta-openeuler/recipes-core/os-base/os-base/securetty b/meta-openeuler/recipes-core/os-base/os-base/securetty deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/meta-openeuler/recipes-core/os-base/os-base/services b/meta-openeuler/recipes-core/os-base/os-base/services new file mode 100644 index 0000000000000000000000000000000000000000..2120524c9a15964fbeb2796f2eedcd813b0b386c --- /dev/null +++ b/meta-openeuler/recipes-core/os-base/os-base/services @@ -0,0 +1,364 @@ +# Network services, Internet style +# +# Note that it is presently the policy of IANA to assign a single well-known +# port number for both TCP and UDP; hence, officially ports have two entries +# even if the protocol doesn't support UDP operations. +# +# Updated from https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml . +# +# New ports will be added on request if they have been officially assigned +# by IANA and used in the real-world or are needed by a debian package. +# If you need a huge list of used numbers please install the nmap package. + +tcpmux 1/tcp # TCP port service multiplexer +echo 7/tcp +echo 7/udp +discard 9/tcp sink null +discard 9/udp sink null +systat 11/tcp users +daytime 13/tcp +daytime 13/udp +netstat 15/tcp +qotd 17/tcp quote +chargen 19/tcp ttytst source +chargen 19/udp ttytst source +ftp-data 20/tcp +ftp 21/tcp +fsp 21/udp fspd +ssh 22/tcp # SSH Remote Login Protocol +telnet 23/tcp +smtp 25/tcp mail +time 37/tcp timserver +time 37/udp timserver +whois 43/tcp nicname +tacacs 49/tcp # Login Host Protocol (TACACS) +tacacs 49/udp +domain 53/tcp # Domain Name Server +domain 53/udp +bootps 67/udp +bootpc 68/udp +tftp 69/udp +gopher 70/tcp # Internet Gopher +finger 79/tcp +http 80/tcp www # WorldWideWeb HTTP +kerberos 88/tcp kerberos5 krb5 kerberos-sec # Kerberos v5 +kerberos 88/udp kerberos5 krb5 kerberos-sec # Kerberos v5 +iso-tsap 102/tcp tsap # part of ISODE +acr-nema 104/tcp dicom # Digital Imag. & Comm. 300 +pop3 110/tcp pop-3 # POP version 3 +sunrpc 111/tcp portmapper # RPC 4.0 portmapper +sunrpc 111/udp portmapper +auth 113/tcp authentication tap ident +nntp 119/tcp readnews untp # USENET News Transfer Protocol +ntp 123/udp # Network Time Protocol +epmap 135/tcp loc-srv # DCE endpoint resolution +netbios-ns 137/udp # NETBIOS Name Service +netbios-dgm 138/udp # NETBIOS Datagram Service +netbios-ssn 139/tcp # NETBIOS session service +imap2 143/tcp imap # Interim Mail Access P 2 and 4 +snmp 161/tcp # Simple Net Mgmt Protocol +snmp 161/udp +snmp-trap 162/tcp snmptrap # Traps for SNMP +snmp-trap 162/udp snmptrap +cmip-man 163/tcp # ISO mgmt over IP (CMOT) +cmip-man 163/udp +cmip-agent 164/tcp +cmip-agent 164/udp +mailq 174/tcp # Mailer transport queue for Zmailer +xdmcp 177/udp # X Display Manager Control Protocol +bgp 179/tcp # Border Gateway Protocol +smux 199/tcp # SNMP Unix Multiplexer +qmtp 209/tcp # Quick Mail Transfer Protocol +z3950 210/tcp wais # NISO Z39.50 database +ipx 213/udp # IPX [RFC1234] +ptp-event 319/udp +ptp-general 320/udp +pawserv 345/tcp # Perf Analysis Workbench +zserv 346/tcp # Zebra server +rpc2portmap 369/tcp +rpc2portmap 369/udp # Coda portmapper +codaauth2 370/tcp +codaauth2 370/udp # Coda authentication server +clearcase 371/udp Clearcase +ldap 389/tcp # Lightweight Directory Access Protocol +ldap 389/udp +svrloc 427/tcp # Server Location +svrloc 427/udp +https 443/tcp # http protocol over TLS/SSL +https 443/udp # HTTP/3 +snpp 444/tcp # Simple Network Paging Protocol +microsoft-ds 445/tcp # Microsoft Naked CIFS +kpasswd 464/tcp +kpasswd 464/udp +submissions 465/tcp ssmtp smtps urd # Submission over TLS [RFC8314] +saft 487/tcp # Simple Asynchronous File Transfer +isakmp 500/udp # IPSEC key management +rtsp 554/tcp # Real Time Stream Control Protocol +rtsp 554/udp +nqs 607/tcp # Network Queuing system +asf-rmcp 623/udp # ASF Remote Management and Control Protocol +qmqp 628/tcp +ipp 631/tcp # Internet Printing Protocol +ldp 646/tcp # Label Distribution Protocol +ldp 646/udp +# +# UNIX specific services +# +exec 512/tcp +biff 512/udp comsat +login 513/tcp +who 513/udp whod +shell 514/tcp cmd syslog # no passwords used +syslog 514/udp +printer 515/tcp spooler # line printer spooler +talk 517/udp +ntalk 518/udp +route 520/udp router routed # RIP +gdomap 538/tcp # GNUstep distributed objects +gdomap 538/udp +uucp 540/tcp uucpd # uucp daemon +klogin 543/tcp # Kerberized `rlogin' (v5) +kshell 544/tcp krcmd # Kerberized `rsh' (v5) +dhcpv6-client 546/udp +dhcpv6-server 547/udp +afpovertcp 548/tcp # AFP over TCP +nntps 563/tcp snntp # NNTP over SSL +submission 587/tcp # Submission [RFC4409] +ldaps 636/tcp # LDAP over SSL +ldaps 636/udp +tinc 655/tcp # tinc control port +tinc 655/udp +silc 706/tcp +kerberos-adm 749/tcp # Kerberos `kadmin' (v5) +# +domain-s 853/tcp # DNS over TLS [RFC7858] +domain-s 853/udp # DNS over DTLS [RFC8094] +rsync 873/tcp +ftps-data 989/tcp # FTP over SSL (data) +ftps 990/tcp +telnets 992/tcp # Telnet over SSL +imaps 993/tcp # IMAP over SSL +pop3s 995/tcp # POP-3 over SSL +# +# From ``Assigned Numbers'': +# +#> The Registered Ports are not controlled by the IANA and on most systems +#> can be used by ordinary user processes or programs executed by ordinary +#> users. +# +#> Ports are used in the TCP [45,106] to name the ends of logical +#> connections which carry long term conversations. For the purpose of +#> providing services to unknown callers, a service contact port is +#> defined. This list specifies the port used by the server process as its +#> contact port. While the IANA can not control uses of these ports it +#> does register or list uses of these ports as a convienence to the +#> community. +# +socks 1080/tcp # socks proxy server +proofd 1093/tcp +rootd 1094/tcp +openvpn 1194/tcp +openvpn 1194/udp +rmiregistry 1099/tcp # Java RMI Registry +lotusnote 1352/tcp lotusnotes # Lotus Note +ms-sql-s 1433/tcp # Microsoft SQL Server +ms-sql-m 1434/udp # Microsoft SQL Monitor +ingreslock 1524/tcp +datametrics 1645/tcp old-radius +datametrics 1645/udp old-radius +sa-msg-port 1646/tcp old-radacct +sa-msg-port 1646/udp old-radacct +kermit 1649/tcp +groupwise 1677/tcp +l2f 1701/udp l2tp +radius 1812/tcp +radius 1812/udp +radius-acct 1813/tcp radacct # Radius Accounting +radius-acct 1813/udp radacct +cisco-sccp 2000/tcp # Cisco SCCP +nfs 2049/tcp # Network File System +nfs 2049/udp # Network File System +gnunet 2086/tcp +gnunet 2086/udp +rtcm-sc104 2101/tcp # RTCM SC-104 IANA 1/29/99 +rtcm-sc104 2101/udp +gsigatekeeper 2119/tcp +gris 2135/tcp # Grid Resource Information Server +cvspserver 2401/tcp # CVS client/server operations +venus 2430/tcp # codacon port +venus 2430/udp # Venus callback/wbc interface +venus-se 2431/tcp # tcp side effects +venus-se 2431/udp # udp sftp side effect +codasrv 2432/tcp # not used +codasrv 2432/udp # server port +codasrv-se 2433/tcp # tcp side effects +codasrv-se 2433/udp # udp sftp side effect +mon 2583/tcp # MON traps +mon 2583/udp +dict 2628/tcp # Dictionary server +f5-globalsite 2792/tcp +gsiftp 2811/tcp +gpsd 2947/tcp +gds-db 3050/tcp gds_db # InterBase server +icpv2 3130/udp icp # Internet Cache Protocol +isns 3205/tcp # iSNS Server Port +isns 3205/udp # iSNS Server Port +iscsi-target 3260/tcp +mysql 3306/tcp +ms-wbt-server 3389/tcp +nut 3493/tcp # Network UPS Tools +nut 3493/udp +distcc 3632/tcp # distributed compiler +daap 3689/tcp # Digital Audio Access Protocol +svn 3690/tcp subversion # Subversion protocol +suucp 4031/tcp # UUCP over SSL +sysrqd 4094/tcp # sysrq daemon +sieve 4190/tcp # ManageSieve Protocol +epmd 4369/tcp # Erlang Port Mapper Daemon +remctl 4373/tcp # Remote Authenticated Command Service +f5-iquery 4353/tcp # F5 iQuery +ipsec-nat-t 4500/udp # IPsec NAT-Traversal [RFC3947] +iax 4569/udp # Inter-Asterisk eXchange +mtn 4691/tcp # monotone Netsync Protocol +radmin-port 4899/tcp # RAdmin Port +sip 5060/tcp # Session Initiation Protocol +sip 5060/udp +sip-tls 5061/tcp +sip-tls 5061/udp +xmpp-client 5222/tcp jabber-client # Jabber Client Connection +xmpp-server 5269/tcp jabber-server # Jabber Server Connection +cfengine 5308/tcp +mdns 5353/udp # Multicast DNS +postgresql 5432/tcp postgres # PostgreSQL Database +freeciv 5556/tcp rptp # Freeciv gameplay +amqps 5671/tcp # AMQP protocol over TLS/SSL +amqp 5672/tcp +amqp 5672/sctp +x11 6000/tcp x11-0 # X Window System +x11-1 6001/tcp +x11-2 6002/tcp +x11-3 6003/tcp +x11-4 6004/tcp +x11-5 6005/tcp +x11-6 6006/tcp +x11-7 6007/tcp +gnutella-svc 6346/tcp # gnutella +gnutella-svc 6346/udp +gnutella-rtr 6347/tcp # gnutella +gnutella-rtr 6347/udp +redis 6379/tcp +sge-qmaster 6444/tcp sge_qmaster # Grid Engine Qmaster Service +sge-execd 6445/tcp sge_execd # Grid Engine Execution Service +mysql-proxy 6446/tcp # MySQL Proxy +babel 6696/udp # Babel Routing Protocol +ircs-u 6697/tcp # Internet Relay Chat via TLS/SSL +bbs 7000/tcp +afs3-fileserver 7000/udp +afs3-callback 7001/udp # callbacks to cache managers +afs3-prserver 7002/udp # users & groups database +afs3-vlserver 7003/udp # volume location database +afs3-kaserver 7004/udp # AFS/Kerberos authentication +afs3-volser 7005/udp # volume managment server +afs3-bos 7007/udp # basic overseer process +afs3-update 7008/udp # server-to-server updater +afs3-rmtsys 7009/udp # remote cache manager service +font-service 7100/tcp xfs # X Font Service +http-alt 8080/tcp webcache # WWW caching service +puppet 8140/tcp # The Puppet master service +bacula-dir 9101/tcp # Bacula Director +bacula-fd 9102/tcp # Bacula File Daemon +bacula-sd 9103/tcp # Bacula Storage Daemon +xmms2 9667/tcp # Cross-platform Music Multiplexing System +nbd 10809/tcp # Linux Network Block Device +zabbix-agent 10050/tcp # Zabbix Agent +zabbix-trapper 10051/tcp # Zabbix Trapper +amanda 10080/tcp # amanda backup services +dicom 11112/tcp +hkp 11371/tcp # OpenPGP HTTP Keyserver +db-lsp 17500/tcp # Dropbox LanSync Protocol +dcap 22125/tcp # dCache Access Protocol +gsidcap 22128/tcp # GSI dCache Access Protocol +wnn6 22273/tcp # wnn6 + +# +# Datagram Delivery Protocol services +# +rtmp 1/ddp # Routing Table Maintenance Protocol +nbp 2/ddp # Name Binding Protocol +echo 4/ddp # AppleTalk Echo Protocol +zip 6/ddp # Zone Information Protocol + +#========================================================================= +# The remaining port numbers are not as allocated by IANA. +#========================================================================= + +# Kerberos (Project Athena/MIT) services +kerberos4 750/udp kerberos-iv kdc # Kerberos (server) +kerberos4 750/tcp kerberos-iv kdc +kerberos-master 751/udp kerberos_master # Kerberos authentication +kerberos-master 751/tcp +passwd-server 752/udp passwd_server # Kerberos passwd server +krb-prop 754/tcp krb_prop krb5_prop hprop # Kerberos slave propagation +zephyr-srv 2102/udp # Zephyr server +zephyr-clt 2103/udp # Zephyr serv-hm connection +zephyr-hm 2104/udp # Zephyr hostmanager +iprop 2121/tcp # incremental propagation +supfilesrv 871/tcp # Software Upgrade Protocol server +supfiledbg 1127/tcp # Software Upgrade Protocol debugging + +# +# Services added for the Debian GNU/Linux distribution +# +poppassd 106/tcp # Eudora +moira-db 775/tcp moira_db # Moira database +moira-update 777/tcp moira_update # Moira update protocol +moira-ureg 779/udp moira_ureg # Moira user registration +spamd 783/tcp # spamassassin daemon +skkserv 1178/tcp # skk jisho server port +predict 1210/udp # predict -- satellite tracking +rmtcfg 1236/tcp # Gracilis Packeten remote config server +xtel 1313/tcp # french minitel +xtelw 1314/tcp # french minitel +zebrasrv 2600/tcp # zebra service +zebra 2601/tcp # zebra vty +ripd 2602/tcp # ripd vty (zebra) +ripngd 2603/tcp # ripngd vty (zebra) +ospfd 2604/tcp # ospfd vty (zebra) +bgpd 2605/tcp # bgpd vty (zebra) +ospf6d 2606/tcp # ospf6d vty (zebra) +ospfapi 2607/tcp # OSPF-API +isisd 2608/tcp # ISISd vty (zebra) +fax 4557/tcp # FAX transmission service (old) +hylafax 4559/tcp # HylaFAX client-server protocol (new) +munin 4949/tcp lrrd # Munin +rplay 5555/udp # RPlay audio service +nrpe 5666/tcp # Nagios Remote Plugin Executor +nsca 5667/tcp # Nagios Agent - NSCA +canna 5680/tcp # cannaserver +syslog-tls 6514/tcp # Syslog over TLS [RFC5425] +sane-port 6566/tcp sane saned # SANE network scanner daemon +ircd 6667/tcp # Internet Relay Chat +zope-ftp 8021/tcp # zope management by ftp +tproxy 8081/tcp # Transparent Proxy +omniorb 8088/tcp # OmniORB +clc-build-daemon 8990/tcp # Common lisp build daemon +xinetd 9098/tcp +git 9418/tcp # Git Version Control System +zope 9673/tcp # zope server +webmin 10000/tcp +kamanda 10081/tcp # amanda backup services (Kerberos) +amandaidx 10082/tcp # amanda backup services +amidxtape 10083/tcp # amanda backup services +sgi-cmsd 17001/udp # Cluster membership services daemon +sgi-crsd 17002/udp +sgi-gcd 17003/udp # SGI Group membership daemon +sgi-cad 17004/tcp # Cluster Admin daemon +binkp 24554/tcp # binkp fidonet protocol +asp 27374/tcp # Address Search Protocol +asp 27374/udp +csync2 30865/tcp # cluster synchronization tool +dircproxy 57000/tcp # Detachable IRC Proxy +tfido 60177/tcp # fidonet EMSI over telnet +fido 60179/tcp # fidonet EMSI over TCP + +# Local services diff --git a/meta-openeuler/recipes-core/os-base/os-base/shadow b/meta-openeuler/recipes-core/os-base/os-base/shadow deleted file mode 100644 index c2935329305663f1bc6792c6c102d97b2d55f843..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/os-base/os-base/shadow +++ /dev/null @@ -1,2 +0,0 @@ -root::0:0:99999:7::: -sshd:!:11880:0:90:7:-1:-1:0 diff --git a/meta-openeuler/recipes-core/os-base/os-base_1.0.bb b/meta-openeuler/recipes-core/os-base/os-base_1.0.bb index e1a7427a11cf58c773471b66306b86b4870c5887..e5b99d27aeb6c521e6a41ccd34702f6b025e912a 100644 --- a/meta-openeuler/recipes-core/os-base/os-base_1.0.bb +++ b/meta-openeuler/recipes-core/os-base/os-base_1.0.bb @@ -1,81 +1,48 @@ -SUMMARY = "OS basic configuration files" -DESCRIPTION = "base files" +SUMMARY = "extra basic configuration files of openEuler Embedded" +DESCRIPTION = "extra basic configuration files as a supplement of poky's base-files bb" SECTION = "base" PR = "r1" -LICENSE = "CLOSED" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" -FILESPATH = "${THISDIR}/${BPN}/" -DL_DIR = "${THISDIR}/${BPN}/" -LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=1acb172ffd3d252285dd1b8b8459941e" +INHIBIT_DEFAULT_DEPS = "1" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +# we need updat-rc.d to set up links between init.d and rcX.d +DEPENDS_append = " update-rc.d-native" -SRC_URI = "file://bashrc \ - file://fstab \ - file://rcS \ - file://group \ - file://inittab \ - file://issue \ - file://issue.net \ - file://LICENSE \ - file://motd \ - file://passwd \ - file://profile \ - file://shadow \ - file://sysctl.conf \ +SRC_URI = " \ file://rc.functions \ file://rc.sysinit \ - file://rc.local \ - file://modules \ + file://ethertypes \ + file://services \ + file://protocols \ + file://rpc \ " -hostname = "openeuler" - do_install() { - install -d ${D}/etc - cp ${WORKDIR}/bashrc ${D}/etc/ - install -m 0600 ${WORKDIR}/fstab ${D}/etc/ - cp ${WORKDIR}/group ${D}/etc/ - cp ${WORKDIR}/inittab ${D}/etc/ - cp ${WORKDIR}/issue ${D}/etc/ - cp ${WORKDIR}/issue.net ${D}/etc/ - cp ${WORKDIR}/motd ${D}/etc/ - cp ${WORKDIR}/passwd ${D}/etc/ - cp ${WORKDIR}/profile ${D}/etc/ - install -m 0600 ${WORKDIR}/shadow ${D}/etc/ - install -m 0600 ${WORKDIR}/sysctl.conf ${D}/etc/ - install -d ${D}/etc/rc.d - install -m 0744 ${WORKDIR}/rc.functions ${D}/etc/rc.d - install -m 0744 ${WORKDIR}/rc.sysinit ${D}/etc/rc.d - install -m 0744 ${WORKDIR}/rc.local ${D}/etc/rc.d - install -m 0755 -d ${D}/etc/init.d/ - install -m 0750 ${WORKDIR}/rcS ${D}/etc/init.d/ - install -m 0750 ${WORKDIR}/modules ${D}/etc/ - mkdir -p ${D}/var/log/ - touch ${D}/var/log/messages ${D}/var/log/lastlog - mkdir -p ${D}/var/run/faillock ${D}/tmp - mkdir -p ${D}/proc ${D}/sys ${D}/root ${D}/dev ${D}/sys/fs/cgroup - mkdir -p ${D}/var/log/audit ${D}/var/run/sshd ${D}$/lib/modules - if [ "${hostname}" ]; then - echo ${hostname} > ${D}${sysconfdir}/hostname - echo "127.0.1.1 ${hostname}" >> ${D}${sysconfdir}/hosts - fi - mkdir -p ${D}${sysconfdir}/security/ - touch ${D}${sysconfdir}/security/opasswd - chmod 600 ${D}${sysconfdir}/security/opasswd - chmod 750 ${D}$/lib/modules - chmod 700 ${D}/root - +## the contents of configuration should be changed according features, user configuration etc. + +## add config files in /etc folder + install -d ${D}${sysconfdir} + +# all init scripts should be in /etc/init.d, currently openeuler embedded specific init functions are mainly +# located in rc.functions and rc.sysinit + install -d ${D}${sysconfdir}/init.d + install -m 0744 ${WORKDIR}/rc.functions ${D}${sysconfdir}/init.d + install -m 0744 ${WORKDIR}/rc.sysinit ${D}${sysconfdir}/init.d +# to match busybox's rcS script and buysbox-inittab, set a link in rc5.d to let rc.sysinit run + if [ x"${INIT_MANAGER}" = x"mdev-busybox" ]; then + install -d ${D}${sysconfdir}/rc5.d + update-rc.d -r ${D} rc.sysinit start 50 5 . + fi + +# necessary infrastructure for basic TCP/IP based networking from netbase_6.2.bb + install -m 0644 ${WORKDIR}/rpc ${D}${sysconfdir}/rpc + install -m 0644 ${WORKDIR}/protocols ${D}${sysconfdir}/protocols + install -m 0644 ${WORKDIR}/services ${D}${sysconfdir}/services + install -m 0644 ${WORKDIR}/ethertypes ${D}${sysconfdir}/ethertypes } -do_install_append_arm() { - echo "unix" >> ${D}/etc/modules -} - -do_install_append_raspberrypi4() { - sed -i 's/ttyAMA0/tty1/g' ${D}/etc/inittab - sed -i '/\# load kernel modules/imount -o remount,rw \/' ${D}/etc/rc.d/rc.sysinit -} - -PACKAGES =+ "${PN}-sysctl" FILES_${PN} = "/" -FILES_${PN}-sysctl = "${sysconfdir}/sysctl.conf" -INHIBIT_DEFAULT_DEPS = "1" diff --git a/meta-openeuler/recipes-core/packagegroups/packagegroup-base.bb b/meta-openeuler/recipes-core/packagegroups/packagegroup-base.bb index 70c795eebe4ff3eab32fb021af4709bad4460e73..bf6249cdccf22d5b0a9fde35929d6181129ff5e1 100644 --- a/meta-openeuler/recipes-core/packagegroups/packagegroup-base.bb +++ b/meta-openeuler/recipes-core/packagegroups/packagegroup-base.bb @@ -13,10 +13,15 @@ inherit packagegroup PACKAGES = "${PN} ${PN}-extended" RDEPENDS_packagegroup-base = " \ -packagegroup-core-base-utils \ acl \ attr \ -bind-utils \ +bind-dhclient \ +bind-dhclient-utils \ +dhcp-client \ +dhcp-server \ +dhcp-server-config \ +dhcp-omshell \ +dhcp-relay \ cifs-utils \ cronie \ curl \ @@ -25,9 +30,6 @@ e2fsprogs \ e2fsprogs-tune2fs \ ethtool \ expat \ -gdb \ -gdbserver \ -glib-2.0 \ grep \ gzip \ initscripts \ @@ -38,7 +40,6 @@ kmod \ less \ libaio \ libasm \ -libbfd \ libcap \ libcap-bin \ libcap-ng \ @@ -53,7 +54,6 @@ libpcap \ libpwquality \ libselinux-bin \ libsepol-bin \ -libusb1 \ libxml2 \ libxml2-utils \ logrotate \ @@ -64,8 +64,6 @@ ncurses-libmenu \ ncurses-libpanel \ ncurses-terminfo \ ncurses-terminfo-base \ -nfs-utils \ -nfs-utils-client \ pciutils \ policycoreutils \ policycoreutils-fixfiles \ @@ -85,13 +83,14 @@ tzdata-core \ util-linux-su \ util-linux-libfdisk \ xz \ +nfs-utils \ +nfs-utils-client \ +libusb1 \ +glib-2.0 \ +libbfd \ " RDEPENDS_packagegroup-base-extended = " \ -dhcp \ -dhcp-libs \ -dhcp-server \ -dhcp-server-config \ sysfsutils \ libmetal \ openamp \ @@ -99,6 +98,8 @@ openamp \ RDEPENDS_packagegroup-base_append_raspberrypi4 += " \ e2fsprogs-resize2fs \ +linux-firmware-rpidistro-bcm43455 \ +wpa-supplicant \ " RDEPENDS_packagegroup-base_append_aarch64-std = " \ dsoftbus \ diff --git a/meta-openeuler/recipes-core/packagegroups/packagegroup-core-base-utils.bb b/meta-openeuler/recipes-core/packagegroups/packagegroup-core-base-utils.bb index 00ed86c1ff8253da661ec1221cbbaf3100fd582e..e54cca10d578c742f2668db2d27237803acfee31 100644 --- a/meta-openeuler/recipes-core/packagegroups/packagegroup-core-base-utils.bb +++ b/meta-openeuler/recipes-core/packagegroups/packagegroup-core-base-utils.bb @@ -22,4 +22,3 @@ shadow-securetty \ bash \ " -RDEPENDS_${PN}_append_arm += "kernel-module-unix" diff --git a/meta-openeuler/recipes-core/packagegroups/packagegroup-core-boot-live.bb b/meta-openeuler/recipes-core/packagegroups/packagegroup-core-boot-live.bb new file mode 100644 index 0000000000000000000000000000000000000000..1649befcacc1a221b4e4678788128fc667313a08 --- /dev/null +++ b/meta-openeuler/recipes-core/packagegroups/packagegroup-core-boot-live.bb @@ -0,0 +1,46 @@ +SUMMARY = "live boot requirements" +DESCRIPTION = "The live set of packages required to boot the system" +PR = "r1" +PACKAGE_ARCH = "${MACHINE_ARCH}" +inherit packagegroup + +# live should use this VIRTUAL-RUNTIME as we don't want systemd: +# Notice: we need busybox-inittab to setup in RDEPENDS +DISTRO_FEATURES_BACKFILL_CONSIDERED_append := " systemd" +VIRTUAL-RUNTIME_dev_manager := "busybox-mdev" +VIRTUAL-RUNTIME_init_manager := "busybox" +VIRTUAL-RUNTIME_initscripts := "initscripts" +VIRTUAL-RUNTIME_keymaps := "keymaps" +VIRTUAL-RUNTIME_login_manager := "busybox" + +EFI_PROVIDER ??= "grub-efi" + +SYSVINIT_SCRIPTS = "${@bb.utils.contains('MACHINE_FEATURES', 'rtc', '${VIRTUAL-RUNTIME_base-utils-hwclock}', '', d)} \ + modutils-initscripts \ + init-ifupdown \ + ${VIRTUAL-RUNTIME_initscripts} \ + " + +RDEPENDS_${PN} = "\ + base-files \ + base-passwd \ + ${VIRTUAL-RUNTIME_base-utils} \ + ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "${SYSVINIT_SCRIPTS}", "", d)} \ + ${@bb.utils.contains("MACHINE_FEATURES", "keyboard", "${VIRTUAL-RUNTIME_keymaps}", "", d)} \ + ${@bb.utils.contains("MACHINE_FEATURES", "efi", "${EFI_PROVIDER} kernel", "", d)} \ + ${VIRTUAL-RUNTIME_login_manager} \ + ${VIRTUAL-RUNTIME_init_manager} \ + ${VIRTUAL-RUNTIME_dev_manager} \ + ${VIRTUAL-RUNTIME_update-alternatives} \ + ${MACHINE_ESSENTIAL_EXTRA_RDEPENDS} \ + kernel \ + kernel-img \ + kernel-image \ + kernel-vmlinux \ + os-base \ + busybox-inittab \ + " + +RRECOMMENDS_${PN} = "\ + ${VIRTUAL-RUNTIME_base-utils-syslog} \ + ${MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS}" diff --git a/meta-openeuler/recipes-core/packagegroups/packagegroup-core-boot.bb b/meta-openeuler/recipes-core/packagegroups/packagegroup-core-boot.bb deleted file mode 100644 index 4e990840dd2050a8745c33268491383e247f86dd..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/packagegroups/packagegroup-core-boot.bb +++ /dev/null @@ -1,26 +0,0 @@ -SUMMARY = "A small image just capable of allowing a device to boot." -LICENSE = "MIT" -PR = "r1" - -inherit packagegroup - -PACKAGES = "${PN} ${PN}-tiny" - -RDEPENDS_${PN} = " \ -busybox-linuxrc \ -kernel \ -kernel-img \ -kernel-vmlinux \ -busybox \ -os-base \ -glibc \ -os-release \ -" - -RDEPENDS_${PN}-tiny = " \ -busybox-login \ -busybox-groups \ -busybox-bash \ -busybox-grep \ -busybox-sed \ -" diff --git a/meta-openeuler/recipes-core/packagegroups/packagegroup-core-boot.bbappend b/meta-openeuler/recipes-core/packagegroups/packagegroup-core-boot.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..46eb8875f3f6341563286972f122b58fff0b4c20 --- /dev/null +++ b/meta-openeuler/recipes-core/packagegroups/packagegroup-core-boot.bbappend @@ -0,0 +1,18 @@ +#main bbfile: yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb + +# we add kernel-img and kernel-vmlinux +RDEPENDS_${PN} += " \ + kernel \ + kernel-img \ + kernel-image \ + kernel-vmlinux \ + os-base \ +" +# No rule to make target "Image" for x86-64, remove it +RDEPENDS_${PN}_remove_x86-64 += "kernel-img" + +# * netbase's configuration files are included in os-base +# to avoid extra download +RDEPENDS_${PN}_remove = " \ + netbase \ +" diff --git a/meta-openeuler/recipes-core/packagegroups/packagegroup-core-tools-debug.bbappend b/meta-openeuler/recipes-core/packagegroups/packagegroup-core-tools-debug.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..5d5b25d322afce1512bf7356f5c61665b58a53fb --- /dev/null +++ b/meta-openeuler/recipes-core/packagegroups/packagegroup-core-tools-debug.bbappend @@ -0,0 +1,6 @@ +#main bbfile: yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb + +# remove mtrace which openeuler not support current. +RDEPENDS_${PN}_remove = " \ + ${MTRACE} \ +" diff --git a/meta-openeuler/recipes-core/packagegroups/packagegroup-debugtools.bb b/meta-openeuler/recipes-core/packagegroups/packagegroup-debugtools.bb deleted file mode 100644 index 708d0c6b8627dc5778b3b82f46031b76b825e36e..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/packagegroups/packagegroup-debugtools.bb +++ /dev/null @@ -1,10 +0,0 @@ -SUMMARY = "Debugging tools" -inherit packagegroup - -PR = "r1" - -PACKAGES = "${PN}" - -RDEPENDS_${PN} = "\ - strace \ - " diff --git a/meta-openeuler/recipes-core/packagegroups/packagegroup-isulad.bb b/meta-openeuler/recipes-core/packagegroups/packagegroup-isulad.bb index 6d3b21b81a21147219aabad9b8cc954dc0d888a7..f8a3f430d8fc462368feafd817e982b43e81eb2a 100644 --- a/meta-openeuler/recipes-core/packagegroups/packagegroup-isulad.bb +++ b/meta-openeuler/recipes-core/packagegroups/packagegroup-isulad.bb @@ -14,5 +14,5 @@ lxc \ libevhtp \ libarchive \ libevent \ -iSulad \ +isulad \ " diff --git a/meta-openeuler/recipes-core/packagegroups/packagegroup-kernel-modules.bb b/meta-openeuler/recipes-core/packagegroups/packagegroup-kernel-modules.bb index 0f1477b195817f17be1a12f0d32d0b555a2046e5..11dc5f1d52451298bdf3d26b952aba7e2729c039 100644 --- a/meta-openeuler/recipes-core/packagegroups/packagegroup-kernel-modules.bb +++ b/meta-openeuler/recipes-core/packagegroups/packagegroup-kernel-modules.bb @@ -7,51 +7,13 @@ inherit packagegroup PACKAGES = "${PN}" -RDEPENDS_${PN} = " \ -kernel-module-overlay \ -kernel-module-8021q \ -kernel-module-jbd2 \ -kernel-module-mbcache \ -kernel-module-ext2 \ -kernel-module-ext4 \ -kernel-module-inet-diag \ -kernel-module-ip-tables \ -kernel-module-ip-tunnel \ -kernel-module-ip6-tables \ -kernel-module-ip6-udp-tunnel \ -kernel-module-ip6table-filter \ -kernel-module-ipip \ -kernel-module-ipt-reject \ -kernel-module-iptable-filter \ -kernel-module-ipv6 \ -kernel-module-nf-conntrack \ -kernel-module-nf-defrag-ipv4 \ -kernel-module-nf-defrag-ipv6 \ -kernel-module-nf-nat \ -kernel-module-nf-reject-ipv4 \ -kernel-module-nf-reject-ipv6 \ -kernel-module-x-tables \ -kernel-module-xt-tcpudp \ -kernel-module-tunnel4 \ -kernel-module-af-packet \ -kernel-module-nfs-ssc \ -kernel-module-fscache \ -kernel-module-grace \ -kernel-module-sunrpc \ -kernel-module-auth-rpcgss \ -kernel-module-lockd \ -kernel-module-nfs-acl \ -kernel-module-nfs \ -kernel-module-nfsv3 \ -kernel-module-nfsd \ -kernel-module-crc-ccitt \ -kernel-module-ipv6 \ -kernel-module-iptable-nat \ -kernel-module-ip6table-nat \ -kernel-module-ip6t-reject \ -kernel-module-xt-nat \ -" -RDEPENDS_${PN}_raspberrypi4 = " \ -" -RDEPENDS_${PN}_aarch64-pro = " \ +RDEPENDS_${PN} += " \ +modutils-initscripts \ " + +# please do not add any MACHINE related modules here +# You can use INSTALLMODULES which is defined in machine conf layer +# like: meta-openeuler/conf/machine/kernel-modules-conf/common.inc +INSTALLMODULES ?= "" +RDEPENDS_${PN} += "${INSTALLMODULES}" + diff --git a/meta-openeuler/recipes-core/pam/packagegroup-pam-plugins.bb b/meta-openeuler/recipes-core/packagegroups/packagegroup-pam-plugins.bb similarity index 100% rename from meta-openeuler/recipes-core/pam/packagegroup-pam-plugins.bb rename to meta-openeuler/recipes-core/packagegroups/packagegroup-pam-plugins.bb diff --git a/meta-openeuler/recipes-core/pam/libpam/99_pam b/meta-openeuler/recipes-core/pam/libpam/99_pam deleted file mode 100644 index 47eda03f2c3cebeb8ac3bcaee1c15e9c49085cb5..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/pam/libpam/99_pam +++ /dev/null @@ -1 +0,0 @@ -d root root 0755 /var/run/sepermit none diff --git a/meta-openeuler/recipes-core/pam/libpam/libpam-xtests.patch b/meta-openeuler/recipes-core/pam/libpam/libpam-xtests.patch deleted file mode 100644 index 3d3a5f57f9adcfca0022e0d9c0f6c2b61e0b6dc6..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/pam/libpam/libpam-xtests.patch +++ /dev/null @@ -1,37 +0,0 @@ -This patch is used to create a new sub package libpam-xtests to do more checks. - -Upstream-Status: Pending - -Signed-off-by: Kang Kai -Index: Linux-PAM-1.3.0/xtests/Makefile.am -=================================================================== ---- Linux-PAM-1.3.0.orig/xtests/Makefile.am -+++ Linux-PAM-1.3.0/xtests/Makefile.am -@@ -7,7 +7,7 @@ AM_CFLAGS = -DLIBPAM_COMPILE -I$(top_src - LDADD = $(top_builddir)/libpam/libpam.la \ - $(top_builddir)/libpam_misc/libpam_misc.la - --CLEANFILES = *~ $(XTESTS) -+CLEANFILES = *~ - - EXTRA_DIST = run-xtests.sh tst-pam_dispatch1.pamd tst-pam_dispatch2.pamd \ - tst-pam_dispatch3.pamd tst-pam_dispatch4.pamd \ -@@ -51,3 +51,18 @@ EXTRA_PROGRAMS = $(XTESTS) - - xtests: $(XTESTS) run-xtests.sh - "$(srcdir)"/run-xtests.sh "$(srcdir)" ${XTESTS} ${NOSRCTESTS} -+ -+all: $(XTESTS) -+ -+install: install_xtests -+ -+install_xtests: -+ $(INSTALL) -d $(DESTDIR)$(pkgdatadir)/xtests -+ for file in $(EXTRA_DIST) ; do \ -+ $(INSTALL) $(srcdir)/$$file $(DESTDIR)$(pkgdatadir)/xtests ; \ -+ done -+ for file in $(XTESTS); do \ -+ $(INSTALL) .libs/$$file $(DESTDIR)$(pkgdatadir)/xtests ; \ -+ done -+ -+.PHONY: all install_xtests diff --git a/meta-openeuler/recipes-core/pam/libpam/pam-volatiles.conf b/meta-openeuler/recipes-core/pam/libpam/pam-volatiles.conf deleted file mode 100644 index 1f892b7970b6622549e2f99ce1532037d2b1c4a8..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/pam/libpam/pam-volatiles.conf +++ /dev/null @@ -1 +0,0 @@ -d /var/run/sepermit 0755 root root - - diff --git a/meta-openeuler/recipes-core/pam/libpam/pam.d/common-account b/meta-openeuler/recipes-core/pam/libpam/pam.d/common-account deleted file mode 100644 index 0a9d30a5d315b2d983a4e469f21e9a412077bce1..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/pam/libpam/pam.d/common-account +++ /dev/null @@ -1,4 +0,0 @@ -account required pam_faillock.so -account [success=1 new_authtok_reqd=done default=ignore] pam_unix.so -account requisite pam_deny.so -account required pam_permit.so diff --git a/meta-openeuler/recipes-core/pam/libpam/pam.d/common-auth b/meta-openeuler/recipes-core/pam/libpam/pam.d/common-auth deleted file mode 100644 index d77adbe5af2e398d86a37db5f82a16165b9b06e0..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/pam/libpam/pam.d/common-auth +++ /dev/null @@ -1,7 +0,0 @@ -auth required pam_faillock.so preauth audit deny=3 even_deny_root unlock_time=300 -auth sufficient pam_unix.so nullok try_first_pass -auth [default=die] pam_faillock.so authfail audit deny=3 even_deny_root unlock_time=300 -auth requisite pam_listfile.so item=user onerr=succeed sense=deny file=/etc/login.user.deny -auth [success=1 default=ignore] pam_unix.so -auth required pam_deny.so -auth required pam_permit.so diff --git a/meta-openeuler/recipes-core/pam/libpam/pam.d/common-password b/meta-openeuler/recipes-core/pam/libpam/pam.d/common-password deleted file mode 100644 index 06335bf722ef8b71cd88ca6d1821a5e7a5345d1a..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/pam/libpam/pam.d/common-password +++ /dev/null @@ -1,5 +0,0 @@ -password requisite pam_pwquality.so try_first_pass minclass=3 minlen=8 lcredit=0 ucredit=0 dcredit=0 ocredit=0 reject_username gecoscheck retry=3 enforce_for_root -password required pam_pwhistory.so remember=5 use_authtok enforce_for_root -password [success=1 default=ignore] pam_unix.so use_authtok nullok sha512 -password requisite pam_deny.so -password required pam_permit.so diff --git a/meta-openeuler/recipes-core/pam/libpam/pam.d/common-session b/meta-openeuler/recipes-core/pam/libpam/pam.d/common-session deleted file mode 100644 index 94765c85d4d6be0ef9bd083f59cff79fd980b752..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/pam/libpam/pam.d/common-session +++ /dev/null @@ -1,19 +0,0 @@ -# -# /etc/pam.d/common-session - session-related modules common to all services -# -# This file is included from other service-specific PAM config files, -# and should contain a list of modules that define tasks to be performed -# at the start and end of sessions of *any* kind (both interactive and -# non-interactive). -# - -# here are the per-package modules (the "Primary" block) -session [default=1] pam_permit.so -# here's the fallback if no module succeeds -session requisite pam_deny.so -# prime the stack with a positive return value if there isn't one already; -# this avoids us returning an error just because nothing sets a success code -# since the modules above will each just jump around -session required pam_permit.so -# and here are more per-package modules (the "Additional" block) -session required pam_unix.so diff --git a/meta-openeuler/recipes-core/pam/libpam/pam.d/common-session-noninteractive b/meta-openeuler/recipes-core/pam/libpam/pam.d/common-session-noninteractive deleted file mode 100644 index a9c830d4c9b131f5142477f3d24552d76000d3cc..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/pam/libpam/pam.d/common-session-noninteractive +++ /dev/null @@ -1,19 +0,0 @@ -# -# /etc/pam.d/common-session-noninteractive - session-related modules -# common to all non-interactive services -# -# This file is included from other service-specific PAM config files, -# and should contain a list of modules that define tasks to be performed -# at the start and end of all non-interactive sessions. -# - -# here are the per-package modules (the "Primary" block) -session [default=1] pam_permit.so -# here's the fallback if no module succeeds -session requisite pam_deny.so -# prime the stack with a positive return value if there isn't one already; -# this avoids us returning an error just because nothing sets a success code -# since the modules above will each just jump around -session required pam_permit.so -# and here are more per-package modules (the "Additional" block) -session required pam_unix.so diff --git a/meta-openeuler/recipes-core/pam/libpam/pam.d/other b/meta-openeuler/recipes-core/pam/libpam/pam.d/other deleted file mode 100644 index 010d5d11d82279fcfb2112dd45bd25a705ecf87d..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/pam/libpam/pam.d/other +++ /dev/null @@ -1,24 +0,0 @@ -# -# /etc/pam.d/other - specify the PAM fallback behaviour -# -# Note that this file is used for any unspecified service; for example -#if /etc/pam.d/cron specifies no session modules but cron calls -#pam_open_session, the session module out of /etc/pam.d/other is -#used. - -# We use pam_warn.so to generate syslog notes that the 'other' -#fallback rules are being used (as a hint to suggest you should setup -#specific PAM rules for the service and aid to debugging). Then to be -#secure, deny access to all services by default. - -auth required pam_warn.so -auth required pam_deny.so - -account required pam_warn.so -account required pam_deny.so - -password required pam_warn.so -password required pam_deny.so - -session required pam_warn.so -session required pam_deny.so diff --git a/meta-openeuler/recipes-core/pam/libpam/run-ptest b/meta-openeuler/recipes-core/pam/libpam/run-ptest deleted file mode 100644 index 2fb69ba7b19821a78e4d72767d10daa5e71f1b95..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/pam/libpam/run-ptest +++ /dev/null @@ -1,32 +0,0 @@ -#! /bin/sh - -cd tests - -export srcdir=. - -failed=0 -all=0 -for f in tst-*; do - "./$f" > /dev/null 2>&1 - case "$?" in - 0) - echo "PASS: $f" - all=$((all + 1)) - ;; - 77) - echo "SKIP: $f" - ;; - *) - echo "FAIL: $f" - failed=$((failed + 1)) - all=$((all + 1)) - ;; - esac -done - -if [ "$failed" -eq 0 ] ; then - echo "All $all tests passed" -else - echo "$failed of $all tests failed" -fi -unset srcdir diff --git a/meta-openeuler/recipes-core/pam/libpam_1.5.2.bb b/meta-openeuler/recipes-core/pam/libpam_1.5.2.bb deleted file mode 100644 index 7b800247a947e45ee6b6cc63b47740584a159185..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/pam/libpam_1.5.2.bb +++ /dev/null @@ -1,188 +0,0 @@ -DISABLE_STATIC = "" -SUMMARY = "Linux-PAM (Pluggable Authentication Modules)" -DESCRIPTION = "Linux-PAM (Pluggable Authentication Modules for Linux), a flexible mechanism for authenticating users" -HOMEPAGE = "https://fedorahosted.org/linux-pam/" -BUGTRACKER = "https://fedorahosted.org/linux-pam/newticket" -SECTION = "base" -# PAM is dual licensed under GPL and BSD. -# /etc/pam.d comes from Debian libpam-runtime in 2009-11 (at that time -# libpam-runtime-1.0.1 is GPLv2+), by openembedded -LICENSE = "GPLv2+ | BSD-3-Clause" -LIC_FILES_CHKSUM = "file://COPYING;md5=7eb5c1bf854e8881005d673599ee74d3 \ - file://libpamc/License;md5=a4da476a14c093fdc73be3c3c9ba8fb3 \ - " - -SRC_URI = "file://pam/Linux-PAM-${PV}.tar.xz \ - file://pam/bugfix-pam-1.1.8-faillock-systemtime.patch \ - file://pam/openEuler-change-ndbm-to-gdbm.patch \ - file://pam/0001-bugfix-cannot-open-database-file.patch \ - file://pam/add-sm3-crypt-support.patch \ - file://99_pam \ - file://pam.d/common-account \ - file://pam.d/common-auth \ - file://pam.d/common-password \ - file://pam.d/common-session \ - file://pam.d/common-session-noninteractive \ - file://pam.d/other \ - file://libpam-xtests.patch \ - file://run-ptest \ - file://pam-volatiles.conf \ -" - -SRC_URI[sha256sum] = "e4ec7131a91da44512574268f493c6d8ca105c87091691b8e9b56ca685d4f94d" - -#DEPENDS = "bison-native flex flex-native cracklib libxml2-native virtual/crypt" -DEPENDS = "cracklib virtual/crypt" - -EXTRA_OECONF = "--includedir=${includedir}/security \ - --libdir=${base_libdir} \ - --disable-nis \ - --disable-regenerate-docu \ - --disable-doc \ - --disable-prelude" - -CFLAGS_append = " -fPIC " - -S = "${WORKDIR}/Linux-PAM-${PV}" - - -#inherit autotools gettext pkgconfig systemd ptest -inherit autotools gettext - -PACKAGECONFIG ??= "" -PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit," -PACKAGECONFIG[userdb] = "--enable-db=db,--enable-db=no,db," - -PACKAGES += "${PN}-runtime ${PN}-xtests ${PN}-pkgconfig ${PN}-service" -FILES_${PN} = "${base_libdir}/lib*${SOLIBS}" -FILES_${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libdir}/lib*${SOLIBSDEV}" -FILES_${PN}-runtime = "${sysconfdir} ${sbindir} ${systemd_system_unitdir}" -FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests" -FILES_${PN}-pkgconfig = "${base_libdir}/pkgconfig" -FILES_${PN}-service = "/usr/lib/systemd/system" - -PACKAGES_DYNAMIC += "^${MLPREFIX}pam-plugin-.*" - -def get_multilib_bit(d): - baselib = d.getVar('baselib') or '' - return baselib.replace('lib', '') - -libpam_suffix = "suffix${@get_multilib_bit(d)}" - -RPROVIDES_${PN} += "${PN}-${libpam_suffix}" -RPROVIDES_${PN}-runtime += "${PN}-runtime-${libpam_suffix}" - -RDEPENDS_${PN}-runtime = "${PN}-${libpam_suffix} \ - ${MLPREFIX}pam-plugin-deny-${libpam_suffix} \ - ${MLPREFIX}pam-plugin-permit-${libpam_suffix} \ - ${MLPREFIX}pam-plugin-warn-${libpam_suffix} \ - ${MLPREFIX}pam-plugin-unix-${libpam_suffix} \ - " -#RDEPENDS_${PN}-xtests = "${PN}-${libpam_suffix} \ -# ${MLPREFIX}pam-plugin-access-${libpam_suffix} \ -# ${MLPREFIX}pam-plugin-debug-${libpam_suffix} \ -# ${MLPREFIX}pam-plugin-pwhistory-${libpam_suffix} \ -# ${MLPREFIX}pam-plugin-succeed-if-${libpam_suffix} \ -# ${MLPREFIX}pam-plugin-time-${libpam_suffix} \ -# bash coreutils" - -# FIXME: Native suffix breaks here, disable it for now -RRECOMMENDS_${PN} = "${PN}-runtime-${libpam_suffix}" -RRECOMMENDS_${PN}_class-native = "" - -python populate_packages_prepend () { - def pam_plugin_hook(file, pkg, pattern, format, basename): - pn = d.getVar('PN') - libpam_suffix = d.getVar('libpam_suffix') - - rdeps = d.getVar('RDEPENDS_' + pkg) - if rdeps: - rdeps = rdeps + " " + pn + "-" + libpam_suffix - else: - rdeps = pn + "-" + libpam_suffix - d.setVar('RDEPENDS_' + pkg, rdeps) - - provides = d.getVar('RPROVIDES_' + pkg) - if provides: - provides = provides + " " + pkg + "-" + libpam_suffix - else: - provides = pkg + "-" + libpam_suffix - d.setVar('RPROVIDES_' + pkg, provides) - - mlprefix = d.getVar('MLPREFIX') or '' - dvar = d.expand('${WORKDIR}/package') - pam_libdir = d.expand('${base_libdir}/security') - pam_sbindir = d.expand('${sbindir}') - pam_filterdir = d.expand('${base_libdir}/security/pam_filter') - pam_pkgname = mlprefix + 'pam-plugin%s' - - do_split_packages(d, pam_libdir, r'^pam(.*)\.so$', pam_pkgname, - 'PAM plugin for %s', hook=pam_plugin_hook, extra_depends='') - do_split_packages(d, pam_filterdir, r'^(.*)$', 'pam-filter-%s', 'PAM filter for %s', extra_depends='') -} - -do_compile_ptest() { - cd tests - sed -i -e 's/$(MAKE) $(AM_MAKEFLAGS) check-TESTS//' Makefile - oe_runmake check-am - cd - -} - -do_install() { - autotools_do_install - - # don't install /var/run when populating rootfs. Do it through volatile - rm -rf ${D}${localstatedir} - - if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)}; then - rm -rf ${D}${sysconfdir}/init.d/ - rm -rf ${D}${sysconfdir}/rc* - install -d ${D}${sysconfdir}/tmpfiles.d - install -m 0644 ${WORKDIR}/pam-volatiles.conf \ - ${D}${sysconfdir}/tmpfiles.d/pam.conf - else - install -d ${D}${sysconfdir}/default/volatiles - install -m 0644 ${WORKDIR}/99_pam \ - ${D}${sysconfdir}/default/volatiles/ - fi - - install -d ${D}${sysconfdir}/pam.d/ - install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/ - - # The lsb requires unix_chkpwd has setuid permission - chmod 4755 ${D}${sbindir}/unix_chkpwd - - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - echo "session optional pam_systemd.so" >> ${D}${sysconfdir}/pam.d/common-session - fi -} - -do_install_ptest() { - if [ ${PTEST_ENABLED} = "1" ]; then - mkdir -p ${D}${PTEST_PATH}/tests - install -m 0755 ${B}/tests/.libs/* ${D}${PTEST_PATH}/tests - install -m 0644 ${S}/tests/confdir ${D}${PTEST_PATH}/tests - fi -} - -pkg_postinst_${PN}() { - if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then - /etc/init.d/populate-volatile.sh update - fi -} - -inherit features_check -REQUIRED_DISTRO_FEATURES = "pam" - -BBCLASSEXTEND = "nativesdk native" - -CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session" -CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-auth" -CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-password" -CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session-noninteractive" -CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-account" -CONFFILES_${PN}-runtime += "${sysconfdir}/security/limits.conf" - -UPSTREAM_CHECK_URI = "https://github.com/linux-pam/linux-pam/releases" - -CVE_PRODUCT = "linux-pam" diff --git a/meta-openeuler/recipes-core/pciutils/pciutils/configure.patch b/meta-openeuler/recipes-core/pciutils/pciutils/configure.patch deleted file mode 100644 index e444c139756d75edd97a4bae679df62d53f7a9f6..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/pciutils/pciutils/configure.patch +++ /dev/null @@ -1,81 +0,0 @@ -This patch: -* ensures we link correctly -* allows us to optionally pass target information to configure rather than using uname -* select linux as the platform in most cases we care about - -This is a merge of various tweaks to allow us to build pciutils including -work from: - -7/30/2010 - Qing He -1/22/2012 - Shane Wang -Ionut Radu -2017/6/15 - RP - Cleanups and merging patches - -Upstream-Status: Inappropriate [embedded specific] - -Index: pciutils-3.5.6/Makefile -=================================================================== ---- pciutils-3.5.6.orig/Makefile -+++ pciutils-3.5.6/Makefile -@@ -96,7 +96,7 @@ example: example.o lib/$(PCILIB) - example.o: example.c $(PCIINC) - - %: %.o -- $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) -o $@ -+ $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LIB_LDLIBS) $(LDLIBS) -o $@ - - %.8 %.7 %.5: %.man - M=`echo $(DATE) | sed 's/-01-/-January-/;s/-02-/-February-/;s/-03-/-March-/;s/-04-/-April-/;s/-05-/-May-/;s/-06-/-June-/;s/-07-/-July-/;s/-08-/-August-/;s/-09-/-September-/;s/-10-/-October-/;s/-11-/-November-/;s/-12-/-December-/;s/\(.*\)-\(.*\)-\(.*\)/\3 \2 \1/'` ; sed <$< >$@ "s/@TODAY@/$$M/;s/@VERSION@/pciutils-$(VERSION)/;s#@IDSDIR@#$(IDSDIR)#" -Index: pciutils-3.5.6/lib/configure -=================================================================== ---- pciutils-3.5.6.orig/lib/configure -+++ pciutils-3.5.6/lib/configure -@@ -9,6 +9,10 @@ echo_n() { - printf '%s' "$*" - } - -+VERSION=$1 -+IDSDIR=$2 -+DNS=yes -+ - if [ -z "$VERSION" -o -z "$IDSDIR" ] ; then - echo >&2 "Please run the configure script from the top-level Makefile" - exit 1 -@@ -16,8 +20,8 @@ fi - - echo_n "Configuring libpci for your system..." - if [ -z "$HOST" ] ; then -- sys=`uname -s` -- rel=`uname -r` -+ sys=${3:-`uname -s`} -+ rel= - realsys="$sys" - if [ "$sys" = "AIX" -a -x /usr/bin/oslevel -a -x /usr/sbin/lsattr ] - then -@@ -25,7 +29,7 @@ if [ -z "$HOST" ] ; then - proc=`/usr/sbin/lsdev -C -c processor -S available -F name | head -1` - cpu=`/usr/sbin/lsattr -F value -l $proc -a type | sed 's/_.*//'` - else -- cpu=`uname -m | sed 's/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/;s/^BePC$/i386/;s/^BeMac$/powerpc/;s/^BeBox$/powerpc/'` -+ cpu=${4:-`uname -m | sed 's/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/;s/^BePC$/i386/;s/^BeMac$/powerpc/;s/^BeBox$/powerpc/'`} - fi - if [ "$sys" = "GNU/kFreeBSD" -o "$sys" = "DragonFly" ] - then -@@ -35,7 +39,7 @@ if [ -z "$HOST" ] ; then - then - sys=cygwin - fi -- HOST=${3:-$cpu-$sys} -+ HOST=$cpu-$sys - fi - [ -n "$RELEASE" ] && rel="${RELEASE}" - # CAVEAT: tr on Solaris is a bit weird and the extra [] is otherwise harmless. -@@ -44,6 +48,8 @@ cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` - sys=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - echo " $host $rel $cpu $sys" - -+{ echo "$host" | grep linux; } && sys=linux -+ - c=config.h - m=config.mk - echo >$c '#define PCI_CONFIG_H' diff --git a/meta-openeuler/recipes-core/pciutils/pciutils_3.7.0.bb b/meta-openeuler/recipes-core/pciutils/pciutils_3.7.0.bb deleted file mode 100644 index 96c0a91d7a392c263e75db38362d75deb797d26f..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/pciutils/pciutils_3.7.0.bb +++ /dev/null @@ -1,62 +0,0 @@ -SUMMARY = "PCI utilities" -DESCRIPTION = 'The PCI Utilities package contains a library for portable access \ -to PCI bus configuration space and several utilities based on this library.' -HOMEPAGE = "http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml" -SECTION = "console/utils" - -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" -DEPENDS = "zlib" - -SRC_URI = "file://pciutils/${BP}.tar.gz \ - file://pciutils/0000-pciutils-2.2.1-idpath.patch \ - file://pciutils/0001-pciutils-dir-d.patch \ - file://configure.patch \ -" - -SRC_URI[sha256sum] = "2432e7a2e12000502d36cf769ab6e5a0cf4931e5050ccaf8b02984b2d3cb0948" - -inherit multilib_header pkgconfig - -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'hwdb', '', d)}" -PACKAGECONFIG[hwdb] = "HWDB=yes,HWDB=no,udev" - -PCI_CONF_FLAG = "ZLIB=yes DNS=yes SHARED=yes STRIP= LIBDIR=${libdir}" - -# see configure.patch -do_configure () { - ( - cd lib && \ - # PACKAGECONFIG_CONFARGS for this recipe could only possibly contain 'HWDB=yes/no', - # so we put it before ./configure - ${PCI_CONF_FLAG} ${PACKAGECONFIG_CONFARGS} ./configure ${PV} ${datadir} ${TARGET_OS} ${TARGET_ARCH} - ) -} - -export PREFIX = "${prefix}" -export SBINDIR = "${sbindir}" -export SHAREDIR = "${datadir}" -export MANDIR = "${mandir}" - -EXTRA_OEMAKE = "-e MAKEFLAGS= ${PCI_CONF_FLAG}" - -ASNEEDED = "" - -# The configure script breaks if the HOST variable is set -HOST[unexport] = "1" - -do_install () { - oe_runmake DESTDIR=${D} install install-lib - - install -d ${D}${bindir} - ln -s ../sbin/lspci ${D}${bindir}/lspci - - oe_multilib_header pci/config.h -} - -PACKAGES =+ "${PN}-ids libpci" -FILES_${PN}-ids = "${datadir}/hwdata/pci.ids*" -FILES_libpci = "${libdir}/libpci.so.*" -SUMMARY_${PN}-ids = "PCI utilities - device ID database" -DESCRIPTION_${PN}-ids = "Package providing the PCI device ID database for pciutils." -RDEPENDS_${PN} += "${PN}-ids" diff --git a/meta-openeuler/recipes-core/procps/procps/sysctl.conf b/meta-openeuler/recipes-core/procps/procps/sysctl.conf deleted file mode 100644 index 253f3701bd39d282dc802b581fae9841520111d0..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/procps/procps/sysctl.conf +++ /dev/null @@ -1,67 +0,0 @@ -# This configuration taken from procps v3.3.15 -# Commented out kernel/pid_max=10000 line -# -# /etc/sysctl.conf - Configuration file for setting system variables -# See sysctl.conf (5) for information. - -# you can have the CD-ROM close when you use it, and open -# when you are done. -#dev.cdrom.autoeject = 1 -#dev.cdrom.autoclose = 1 - -# protection from the SYN flood attack -net/ipv4/tcp_syncookies=1 - -# see the evil packets in your log files -net/ipv4/conf/all/log_martians=1 - -# makes you vulnerable or not :-) -net/ipv4/conf/all/accept_redirects=0 -net/ipv4/conf/all/accept_source_route=0 -net/ipv4/icmp_echo_ignore_broadcasts =1 - -# needed for routing, including masquerading or NAT -#net/ipv4/ip_forward=1 - -# sets the port range used for outgoing connections -#net.ipv4.ip_local_port_range = 32768 61000 - -# Broken routers and obsolete firewalls will corrupt the window scaling -# and ECN. Set these values to 0 to disable window scaling and ECN. -# This may, rarely, cause some performance loss when running high-speed -# TCP/IP over huge distances or running TCP/IP over connections with high -# packet loss and modern routers. This sure beats dropped connections. -#net.ipv4.tcp_ecn = 0 - -# Swapping too much or not enough? Disks spinning up when you'd -# rather they didn't? Tweak these. -#vm.vfs_cache_pressure = 100 -#vm.laptop_mode = 0 -#vm.swappiness = 60 - -#kernel.printk_ratelimit_burst = 10 -#kernel.printk_ratelimit = 5 -#kernel.panic_on_oops = 0 - -# Reboot 600 seconds after a panic -#kernel.panic = 600 - -# enable SysRq key (note: console security issues) -#kernel.sysrq = 1 - -# Change name of core file to start with the command name -# so you get things like: emacs.core mozilla-bin.core X.core -#kernel.core_pattern = %e.core - -# NIS/YP domain (not always equal to DNS domain) -#kernel.domainname = example.com -#kernel.hostname = darkstar - -# This limits PID values to 4 digits, which allows tools like ps -# to save screen space. -#kernel/pid_max=10000 - -# Protects against creating or following links under certain conditions -# See https://www.kernel.org/doc/Documentation/sysctl/fs.txt -#fs.protected_hardlinks = 1 -#fs.protected_symlinks = 1 diff --git a/meta-openeuler/recipes-core/procps/procps_3.3.17.bb b/meta-openeuler/recipes-core/procps/procps_3.3.17.bb deleted file mode 100644 index bdd1a910d618d1a237a6f7e9d9ab7ce75828cdd9..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/procps/procps_3.3.17.bb +++ /dev/null @@ -1,96 +0,0 @@ -SUMMARY = "System and process monitoring utilities" -DESCRIPTION = "Procps contains a set of system utilities that provide system information about processes using \ -the /proc filesystem. The package includes the programs ps, top, vmstat, w, kill, and skill." -HOMEPAGE = "https://gitlab.com/procps-ng/procps" -SECTION = "base" -LICENSE = "GPLv2+ & LGPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://COPYING.LIB;md5=4cf66a4984120007c9881cc871cf49db \ - " - -DEPENDS = "ncurses" - -inherit autotools gettext pkgconfig - -SRC_URI = "file://procps-ng/procps-ng-${PV}.tar.xz \ - file://procps-ng/0001-top-fix-two-potential-alternate-display-mode-abends.patch \ - file://procps-ng/0002-top-In-the-bye_bye-function-replace-fputs-with-the-w.patch \ - file://procps-ng/0003-add-options-M-and-N-for-top.patch \ - file://procps-ng/0004-top-exit-with-error-when-pid-overflow.patch \ - file://procps-ng/0005-fix-a-fix-for-the-bye_bye-function.patch \ - file://sysctl.conf \ - " -SRC_URI[sha256sum] = "4518b3e7aafd34ec07d0063d250fd474999b20b200218c3ae56f5d2113f141b4" - -EXTRA_OECONF = "--enable-skill --disable-modern-top" - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" -PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd" - -do_install_append () { - install -d ${D}${base_bindir} - [ "${bindir}" != "${base_bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i; done - install -d ${D}${base_sbindir} - [ "${sbindir}" != "${base_sbindir}" ] && for i in ${base_sbindir_progs}; do mv ${D}${sbindir}/$i ${D}${base_sbindir}/$i; done - if [ "${base_sbindir}" != "${sbindir}" ]; then - rmdir ${D}${sbindir} - fi - - install -d ${D}${sysconfdir} - install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - install -d ${D}${sysconfdir}/sysctl.d - ln -sf ../sysctl.conf ${D}${sysconfdir}/sysctl.d/99-sysctl.conf - fi -} - -CONFFILES_${PN} = "${sysconfdir}/sysctl.conf" - -bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime w" -base_bindir_progs += "kill pidof ps watch" -base_sbindir_progs += "sysctl" - -ALTERNATIVE_PRIORITY = "200" -ALTERNATIVE_PRIORITY[pidof] = "150" - -ALTERNATIVE_${PN} = "${bindir_progs} ${base_bindir_progs} ${base_sbindir_progs}" - -ALTERNATIVE_${PN}-doc = "kill.1 uptime.1" -ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1" -ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1" - -python __anonymous() { - for prog in d.getVar('base_bindir_progs').split(): - d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog)) - - for prog in d.getVar('base_sbindir_progs').split(): - d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir'), prog)) -} - -# 'ps' isn't suitable for use as a security tool so whitelist this CVE. -# https://bugzilla.redhat.com/show_bug.cgi?id=1575473#c3 -CVE_CHECK_WHITELIST += "CVE-2018-1121" - -PROCPS_PACKAGES = "${PN}-lib \ - ${PN}-sysctl" - -PACKAGE_BEFORE_PN = "${PROCPS_PACKAGES}" -RDEPENDS_${PN} += "${PROCPS_PACKAGES}" - -RDEPENDS_${PN}-ps += "${PN}-lib" -RDEPENDS_${PN}-sysctl += "${PN}-lib" - -FILES_${PN}-lib = "${libdir}" -FILES_${PN}-ps = "${base_bindir}/ps.${BPN}" -FILES_${PN}-sysctl = "${base_sbindir}/sysctl.${BPN} ${sysconfdir}/sysctl.conf ${sysconfdir}/sysctl.d" - -ALTERNATIVE_${PN}_remove = "ps" -ALTERNATIVE_${PN}_remove = "sysctl" - -ALTERNATIVE_${PN}-ps = "ps" -ALTERNATIVE_TARGET[ps] = "${base_bindir}/ps" -ALTERNATIVE_LINK_NAME[ps] = "${base_bindir}/ps" - -ALTERNATIVE_${PN}-sysctl = "sysctl" -ALTERNATIVE_TARGET[sysctl] = "${base_sbindir}/sysctl" -ALTERNATIVE_LINK_NAME[sysctl] = "${base_sbindir}/sysctl" diff --git a/meta-openeuler/recipes-core/psmisc/psmisc.inc b/meta-openeuler/recipes-core/psmisc/psmisc.inc deleted file mode 100644 index 3b167d56158fa4663045f4638b9659398c624fa5..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/psmisc/psmisc.inc +++ /dev/null @@ -1,36 +0,0 @@ -SUMMARY = "Utilities for managing processes on your system" -HOMEPAGE = "http://psmisc.sf.net/" -DESCRIPTION = "The psmisc package contains utilities for managing processes on your \ -system: pstree, killall and fuser. The pstree command displays a tree \ -structure of all of the running processes on your system. The killall \ -command sends a specified signal (SIGTERM if nothing is specified) to \ -processes identified by name. The fuser command identifies the PIDs \ -of processes that are using specified files or filesystems." -SECTION = "base" -DEPENDS = "ncurses virtual/libintl" -LICENSE = "GPLv2" - -inherit autotools gettext - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," - -ALLOW_EMPTY_${PN} = "1" - -PACKAGES =+ "fuser fuser-doc killall killall-doc pstree pstree-doc" -PACKAGES += "psmisc-extras" - -FILES_${PN} = "" -RDEPENDS_${PN} = "fuser killall pstree" - -FILES_fuser = "${bindir}/fuser.${BPN}" -FILES_fuser-doc = "${mandir}/man1/fuser*" - -FILES_killall = "${bindir}/killall.${BPN}" -FILES_killall-doc = "${mandir}/man1/killall*" - -FILES_pstree = "${bindir}/pstree" -FILES_pstree-doc = "${mandir}/man1/pstree*" - -FILES_psmisc-extras = "${bindir}" -FILES_psmisc-extras-doc = "${mandir}" diff --git a/meta-openeuler/recipes-core/psmisc/psmisc_23.4.bb b/meta-openeuler/recipes-core/psmisc/psmisc_23.4.bb deleted file mode 100644 index 77389ea510b848616ef658051e0e0d087d159801..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/psmisc/psmisc_23.4.bb +++ /dev/null @@ -1,6 +0,0 @@ -require psmisc.inc -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" - -SRC_URI = "file://psmisc/${BP}.tar.xz" -S = "${WORKDIR}/${BP}" diff --git a/meta-openeuler/recipes-core/quota/quota_4.06.bb b/meta-openeuler/recipes-core/quota/quota_4.06.bb deleted file mode 100644 index 735a33b4b814fc2eb7f607ffee9d50a44840cb7a..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/quota/quota_4.06.bb +++ /dev/null @@ -1,35 +0,0 @@ -SUMMARY = "Tools for monitoring & limiting user disk usage per filesystem" -SECTION = "base" -HOMEPAGE = "http://sourceforge.net/projects/linuxquota/" -DESCRIPTION = "Tools and patches for the Linux Diskquota system as part of the Linux kernel" -BUGTRACKER = "http://sourceforge.net/tracker/?group_id=18136&atid=118136" -LICENSE = "BSD & GPLv2+ & LGPLv2.1+" -LIC_FILES_CHKSUM = "file://rquota_server.c;beginline=1;endline=20;md5=fe7e0d7e11c6f820f8fa62a5af71230f \ - file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb" - -SRC_URI = "file://quota/${BP}.tar.gz \ - file://quota/0000-Limit-number-of-comparison-characters-to-4.patch \ - file://quota/0001-Limit-maximum-of-RPC-port.patch \ - file://quota/0002-quotaio_xfs-Warn-when-large-kernel-timestamps-cannot.patch \ -" -SRC_URI[sha256sum] = "2f3e03039f378d4f0d97acdb49daf581dcaad64d2e1ddf129495fd579fbd268d" - -CVE_PRODUCT = "linux_diskquota" - -UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/linuxquota/files/quota-tools/" -UPSTREAM_CHECK_REGEX = "/quota-tools/(?P(\d+[\.\-_]*)+)/" - -DEPENDS = "gettext-native e2fsprogs libnl" - -inherit autotools-brokensep gettext pkgconfig - -CFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'rpc', '-I${STAGING_INCDIR}/tirpc', '', d)}" -LDFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'rpc', '-ltirpc', '', d)}" -ASNEEDED = "" - -PACKAGECONFIG ??= "rpc bsd" -PACKAGECONFIG_libc-musl = "tcp-wrappers rpc" - -PACKAGECONFIG[rpc] = "--enable-rpc,--disable-rpc,libtirpc" -PACKAGECONFIG[bsd] = "--enable-bsd_behaviour=yes,--enable-bsd_behaviour=no," -PACKAGECONFIG[ldapmail] = "--enable-ldapmail,--disable-ldapmail,openldap" diff --git a/meta-openeuler/recipes-core/readline/files/inputrc b/meta-openeuler/recipes-core/readline/files/inputrc deleted file mode 100644 index b5c4c8af24b001b0596e5080ceed11dd0a0dc602..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/readline/files/inputrc +++ /dev/null @@ -1,61 +0,0 @@ -# /etc/inputrc - global inputrc for libreadline -# See readline(3readline) and `info rluserman' for more information. - -# Be 8 bit clean. -set input-meta on -set output-meta on - -# To allow the use of 8bit-characters like the german umlauts, comment out -# the line below. However this makes the meta key not work as a meta key, -# which is annoying to those which don't need to type in 8-bit characters. - -# set convert-meta off - -# try to enable the application keypad when it is called. Some systems -# need this to enable the arrow keys. -# set enable-keypad on - -# see /usr/share/doc/bash/inputrc.arrows for other codes of arrow keys - -# do not bell on tab-completion -# set bell-style none - -# some defaults / modifications for the emacs mode -$if mode=emacs - -# allow the use of the Home/End keys -# "\e[1~": beginning-of-line -# "\e[4~": end-of-line - -# allow the use of the Delete/Insert keys -# "\e[3~": delete-char -# "\e[2~": quoted-insert - -# mappings for "page up" and "page down" to step to the beginning/end -# of the history -# "\e[5~": beginning-of-history -# "\e[6~": end-of-history - -# alternate mappings for "page up" and "page down" to search the history -# "\e[5~": history-search-backward -# "\e[6~": history-search-forward - -# # mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving -# "\e[5C": forward-word -# "\e[5D": backward-word -# "\e\e[C": forward-word -# "\e\e[D": backward-word - -# $if term=rxvt -# "\e[8~": end-of-line -# $endif - -# for non RH/Debian xterm, can't hurt for RH/DEbian xterm -# "\eOH": beginning-of-line -# "\eOF": end-of-line - -# for freebsd console -# "\e[H": beginning-of-line -# "\e[F": end-of-line - -$endif diff --git a/meta-openeuler/recipes-core/readline/readline-8.1/configure-fix.patch b/meta-openeuler/recipes-core/readline/readline-8.1/configure-fix.patch deleted file mode 100644 index ef3104f8a6de965f77193f039aeb373a615633bf..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/readline/readline-8.1/configure-fix.patch +++ /dev/null @@ -1,35 +0,0 @@ -Upstream-Status: Pending - -Without this it fails to link against libtermcap causing various missing -symbols issues. - -RP - 8/10/08 - -Support 6.3 which uses configure.ac rather than configure.in. -Signed-off-by: Hongxu Jia ---- - configure.ac | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/configure.ac b/configure.ac -index cea8f91..9075b8f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -218,10 +218,10 @@ if test -f ${srcdir}/support/shobj-conf; then - AC_MSG_CHECKING(configuration for building shared libraries) - eval `TERMCAP_LIB=$TERMCAP_LIB ${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}` - --# case "$SHLIB_LIBS" in --# *curses*|*termcap*|*termlib*) ;; --# *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;; --# esac -+ case "$SHLIB_LIBS" in -+ *curses*|*termcap*|*termlib*) ;; -+ *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;; -+ esac - - AC_SUBST(SHOBJ_CC) - AC_SUBST(SHOBJ_CFLAGS) --- -1.8.1.2 - diff --git a/meta-openeuler/recipes-core/readline/readline-8.1/rl-native.map b/meta-openeuler/recipes-core/readline/readline-8.1/rl-native.map deleted file mode 100644 index 5e7d49cdd222154ebe093590cfd9d9c9a0df9459..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/readline/readline-8.1/rl-native.map +++ /dev/null @@ -1,12 +0,0 @@ -READLINE_6.3 { - rl_change_environment; - rl_clear_history; - rl_executing_key; - rl_executing_keyseq; - rl_filename_stat_hook; - rl_history_substr_search_backward; - rl_history_substr_search_forward; - rl_input_available_hook; - rl_print_last_kbd_macro; - rl_signal_event_hook; -}; diff --git a/meta-openeuler/recipes-core/readline/readline.inc b/meta-openeuler/recipes-core/readline/readline.inc deleted file mode 100644 index fa17afed0786831df0398ca5e2d09ba796b74430..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/readline/readline.inc +++ /dev/null @@ -1,54 +0,0 @@ -SUMMARY = "Library for editing typed command lines" -DESCRIPTION = "The GNU Readline library provides a set of functions for use by applications that allow users to edit \ -command lines as they are typed in. Both Emacs and vi editing modes are available. The Readline library includes \ -additional functions to maintain a list of previously-entered command lines, to recall and perhaps reedit those \ -lines, and perform csh-like history expansion on previous commands." -SECTION = "libs" -HOMEPAGE = "https://tiswww.case.edu/php/chet/readline/rltop.html" - -# GPLv2+ (< 6.0), GPLv3+ (>= 6.0) -LICENSE = "GPLv3+" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -DEPENDS += "ncurses" - -inherit autotools texinfo - -#EXTRA_AUTORECONF += "--exclude=autoheader" -EXTRA_AUTORECONF_DEFINE += " AUTOHEADER=echo " - -LEAD_SONAME = "libreadline.so" - -do_configure_prepend () { - if [ ! -e ${S}/acinclude.m4 ]; then - cat ${S}/aclocal.m4 > ${S}/acinclude.m4 - fi -} - -do_install_append () { - # Make install doesn't properly install these - oe_libinstall -so -C shlib libhistory ${D}${libdir} - oe_libinstall -so -C shlib libreadline ${D}${libdir} - - rmdir ${D}${bindir} - rm -rf ${D}${datadir}/${BPN}/*.c - rmdir ${D}${datadir}/${BPN} || true - - install -m 0755 -d ${D}${sysconfdir} - install -m 0644 ${WORKDIR}/inputrc ${D}${sysconfdir}/inputrc -} - -BBCLASSEXTEND = "native nativesdk" - -CONFFILES_${PN} += "${sysconfdir}/inputrc" - -#inherit update-alternatives - -ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE_${PN}-doc = "history.3" -ALTERNATIVE_LINK_NAME[history.3] = "${mandir}/man3/history.3" - -# OpenSuse injects versions into libreadline leading to conficits between our native one and theirs -# see their spec file for where this is injected. Extra versioning is harmless so we just do the same. -SRC_URI_append_class-native = " file://rl-native.map" -LDFLAGS_append_class-native = " -Wl,--version-script=${WORKDIR}/rl-native.map" diff --git a/meta-openeuler/recipes-core/readline/readline_%.bbappend b/meta-openeuler/recipes-core/readline/readline_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..66a5f57c462448598d3d23c6927be50f895d11eb --- /dev/null +++ b/meta-openeuler/recipes-core/readline/readline_%.bbappend @@ -0,0 +1,10 @@ +# main bb file: yocto-poky/meta/recipes-core/readline/readline_8.1.bb + +# the patch is out of date, use openeuler patch +SRC_URI_remove = "file://norpath.patch" + +SRC_URI_prepend = "file://readline-8.0-shlib.patch \ +" + +SRC_URI[archive.md5sum] = "07fc9d33d6ab7e64778b0f27a3ed65ea" +SRC_URI[archive.sha256sum] = "ab9972cf45cdef5c7d5f9d773d6046013266389bb436bce8ab3b52fe02331f60" diff --git a/meta-openeuler/recipes-core/readline/readline_8.1.bb b/meta-openeuler/recipes-core/readline/readline_8.1.bb deleted file mode 100644 index b03e75ef48960ae17ba3fbac1e0f7738ae934f76..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/readline/readline_8.1.bb +++ /dev/null @@ -1,10 +0,0 @@ -require readline.inc - -SRC_URI = "file://readline/${BPN}-${PV}.tar.gz \ - file://readline/readline-8.0-shlib.patch \ - file://inputrc \ - file://configure-fix.patch \ -" - -SRC_URI[archive.md5sum] = "e9557dd5b1409f5d7b37ef717c64518e" -SRC_URI[archive.sha256sum] = "f8ceb4ee131e3232226a17f51b164afc46cd0b9e6cef344be87c65962cb82b02" diff --git a/meta-openeuler/recipes-core/rpcbind/rpcbind/init.d b/meta-openeuler/recipes-core/rpcbind/rpcbind/init.d deleted file mode 100644 index 67499aa828b9626f1ec1b27fd336c6533b186795..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/rpcbind/rpcbind/init.d +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/sh -# -# start/stop rpcbind daemon. - -### BEGIN INIT INFO -# Provides: rpcbind -# Required-Start: $network -# Required-Stop: $network -# Default-Start: S 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: RPC portmapper replacement -# Description: rpcbind is a server that converts RPC (Remote -# Procedure Call) program numbers into DARPA -# protocol port numbers. It must be running in -# order to make RPC calls. Services that use -# RPC include NFS and NIS. -### END INIT INFO - -# Source function library. -. /etc/init.d/functions - -test -f /sbin/rpcbind || exit 0 - -OPTIONS="" -if [ -f /etc/default/rpcbind ] -then - . /etc/default/rpcbind -elif [ -f /etc/rpcbind.conf ] -then - . /etc/rpcbind.conf -fi - -start () -{ - echo -n "Starting rpcbind daemon..." - if pidof /sbin/rpcbind >/dev/null; then - echo "already running." - exit 0 - fi - start-stop-daemon --start --quiet --exec /sbin/rpcbind -- "$@" - if [ $? -eq 0 ]; then - echo "done." - else - echo "failed." - fi -} - -stop () -{ - echo "Stopping rpcbind daemon..." - if ! pidof /sbin/rpcbind >/dev/null; then - echo "not running." - return 0 - fi - start-stop-daemon --stop --quiet --exec /sbin/rpcbind - if [ $? -eq 0 ]; then - echo "done." - else - echo "failed." - fi -} - -case "$1" in - start) - start $OPTIONS - ;; - stop) - stop - ;; - force-reload) - stop - start $OPTIONS - ;; - restart) - stop - start $OPTIONS - ;; - status) - status /sbin/rpcbind - ;; - *) - echo "Usage: /etc/init.d/rpcbind {start|stop|force-reload|restart|status}" - exit 1 - ;; -esac - -exit $? diff --git a/meta-openeuler/recipes-core/rpcbind/rpcbind/rpcbind.conf b/meta-openeuler/recipes-core/rpcbind/rpcbind/rpcbind.conf deleted file mode 100644 index f423ac178894a32ec7f2b8c330034c49865d20b0..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/rpcbind/rpcbind/rpcbind.conf +++ /dev/null @@ -1,3 +0,0 @@ -# Optional arguments passed to rpcbind. -# -RPCBIND_OPTIONS="" diff --git a/meta-openeuler/recipes-core/rpcbind/rpcbind_1.2.6.bb b/meta-openeuler/recipes-core/rpcbind/rpcbind_1.2.6.bb deleted file mode 100644 index 347851b9266fefaad6576778abbe9e53b7de0a4e..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/rpcbind/rpcbind_1.2.6.bb +++ /dev/null @@ -1,56 +0,0 @@ -SUMMARY = "Universal Addresses to RPC Program Number Mapper" -DESCRIPTION = "The rpcbind utility is a server that converts RPC \ - program numbers into universal addresses." -SECTION = "console/network" -HOMEPAGE = "http://sourceforge.net/projects/rpcbind/" -BUGTRACKER = "http://sourceforge.net/tracker/?group_id=201237&atid=976751" -DEPENDS = "libtirpc quota" - -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://COPYING;md5=b46486e4c4a416602693a711bb5bfa39 \ - file://src/rpcinfo.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24" - -SRC_URI = "file://rpcbind/${BP}.tar.bz2 \ - file://rpcbind/rpcbind-0.2.4-runstatdir.patch \ - file://rpcbind/bugfix-rpcbind-GETADDR-return-client-ip.patch \ - file://rpcbind/CVE-2017-8779.patch \ - file://rpcbind/backport-fix-double-free-in-init_transport.patch \ - file://rpcbind/bugfix-listen-tcp-port-111.patch \ - file://init.d \ - file://rpcbind.conf \ -" -SRC_URI[md5sum] = "2d84ebbb7d6fb1fc3566d2d4b37f214b" -SRC_URI[sha256sum] = "5613746489cae5ae23a443bb85c05a11741a5f12c8f55d2bb5e83b9defeee8de" - -inherit autotools systemd pkgconfig - -PACKAGECONFIG ??= "tcp-wrappers" -PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" - -INITSCRIPT_NAME = "rpcbind" -INITSCRIPT_PARAMS = "start 12 2 3 4 5 . stop 60 0 1 6 ." - -SYSTEMD_SERVICE_${PN} = "rpcbind.service rpcbind.socket" - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM_${PN} = "--system --no-create-home --home-dir / \ - --shell /bin/false --user-group rpc" - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" -PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/, \ - --without-systemdsystemunitdir, \ - systemd \ -" - -EXTRA_OECONF += " --enable-warmstarts --with-rpcuser=rpc --without-systemdsystemunitdir" - -do_install_append () { - install -d ${D}${sysconfdir}/init.d - sed -e 's,/etc/,${sysconfdir}/,g' \ - -e 's,/sbin/,${sbindir}/,g' \ - ${WORKDIR}/init.d > ${D}${sysconfdir}/init.d/rpcbind - chmod 0750 ${D}${sysconfdir}/init.d/rpcbind -} - -ALTERNATIVE_${PN} = "rpcinfo" -ALTERNATIVE_LINK_NAME[rpcinfo] = "${bindir}/rpcinfo" diff --git a/meta-openeuler/recipes-core/rsyslog/rsyslog/0001-Include-sys-time-h.patch b/meta-openeuler/recipes-core/rsyslog/rsyslog/0001-Include-sys-time-h.patch new file mode 100644 index 0000000000000000000000000000000000000000..6ce8b7a9c80f40b689e75474bd1996a2a4646b72 --- /dev/null +++ b/meta-openeuler/recipes-core/rsyslog/rsyslog/0001-Include-sys-time-h.patch @@ -0,0 +1,32 @@ +From 7baf35b88d742032a2dc456c396843e17e866f8e Mon Sep 17 00:00:00 2001 +From: Ming Liu +Date: Wed, 27 Jun 2018 14:04:57 +0800 +Subject: [PATCH] Include sys/time.h + +struct timeval is defined in sys/time.h with a musl libc. + +Upstream-Status: Inappropriate [musl libc specific] + +Signed-off-by: Ming Liu +Signed-off-by: Changqing Li +--- + tests/msleep.c | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/tests/msleep.c b/tests/msleep.c +index 98dbece..96f6950 100644 +--- a/tests/msleep.c ++++ b/tests/msleep.c +@@ -26,11 +26,7 @@ + #include "config.h" + #include + #include +-#if defined(__FreeBSD__) + #include +-#else +-#include +-#endif + #if defined(HAVE_SYS_SELECT_H) + #include + #endif +2.7.4 diff --git a/meta-openeuler/recipes-core/rsyslog/rsyslog/0001-tests-disable-the-check-for-inotify.patch b/meta-openeuler/recipes-core/rsyslog/rsyslog/0001-tests-disable-the-check-for-inotify.patch new file mode 100644 index 0000000000000000000000000000000000000000..552172d3974f74130812f4b07cf7c791b0389fa3 --- /dev/null +++ b/meta-openeuler/recipes-core/rsyslog/rsyslog/0001-tests-disable-the-check-for-inotify.patch @@ -0,0 +1,46 @@ +From 194e199ce08acc2192f6a63420ff24d9064666e5 Mon Sep 17 00:00:00 2001 +From: Yi Fan Yu +Date: Sat, 27 Mar 2021 19:18:25 -0400 +Subject: [PATCH] tests: disable the check for inotify + +We don't need to check inotify.h. +Assume it is present since it is part of the linux kernel +since 2.6.13 [1]. + +[1](https://kernelnewbies.org/Linux_2_6_13) + +(it would require installing the libc headers otherwise, + for the test to detect /usr/include/sys/inotify.h.) + +Upstream-Status: Inappropriate[OE-specific] + +Signed-off-by: Yi Fan Yu +--- + tests/diag.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/diag.sh b/tests/diag.sh +index 6cd60ea88..7424f48c5 100755 +--- a/tests/diag.sh ++++ b/tests/diag.sh +@@ -2672,7 +2672,7 @@ case $1 in + fi + ;; + 'check-inotify') # Check for inotify/fen support +- if [ -n "$(find /usr/include -name 'inotify.h' -print -quit)" ]; then ++ if true; then + echo [inotify mode] + elif [ -n "$(find /usr/include/sys/ -name 'port.h' -print -quit)" ]; then + grep -qF "PORT_SOURCE_FILE" < /usr/include/sys/port.h +@@ -2687,7 +2687,7 @@ case $1 in + fi + ;; + 'check-inotify-only') # Check for ONLY inotify support +- if [ -n "$(find /usr/include -name 'inotify.h' -print -quit)" ]; then ++ if true; then + echo [inotify mode] + else + echo [inotify not supported, skipping...] +-- +2.29.2 + diff --git a/meta-openeuler/recipes-core/rsyslog/rsyslog/initscript b/meta-openeuler/recipes-core/rsyslog/rsyslog/initscript index 96e9d74ca4e25856f8781475788cbbfe1b01eefb..7a8f8f991845edb835f81bade18ef49197f7ff0e 100644 --- a/meta-openeuler/recipes-core/rsyslog/rsyslog/initscript +++ b/meta-openeuler/recipes-core/rsyslog/rsyslog/initscript @@ -44,7 +44,7 @@ do_stop() # 1 if daemon was already stopped # 2 if daemon could not be stopped # other if a failure occurred - # QUIT/TERM/INT should work here, but they don't ????? + # QUIT/TERM/INT should work here, but they don't ????? start-stop-daemon -K --quiet --signal KILL --pidfile $PIDFILE --name $NAME RETVAL="$?" rm -f $PIDFILE @@ -104,10 +104,10 @@ case "$1" in do_status "$RSYSLOGD" "$RSYSLOGD_PIDFILE" if [ "$?" = "0" ]; then echo "running" - exit 0 + exit 0 else echo "stopped" - exit 1 + exit 1 fi ;; *) @@ -116,4 +116,3 @@ case "$1" in ;; esac exit 0 - diff --git a/meta-openeuler/recipes-core/rsyslog/rsyslog/rsyslog.conf b/meta-openeuler/recipes-core/rsyslog/rsyslog/rsyslog.conf index 3db32f0c1cf1a14a9f5ba0a91998360ff47840fc..dbfefb759764b265c81fb5047c313f71abbfca2d 100644 --- a/meta-openeuler/recipes-core/rsyslog/rsyslog/rsyslog.conf +++ b/meta-openeuler/recipes-core/rsyslog/rsyslog/rsyslog.conf @@ -1,85 +1,91 @@ -# rsyslog configuration file +# if you experience problems, check +# http://www.rsyslog.com/troubleshoot for assistance -# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html -# If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html - -#### MODULES #### +# rsyslog v3: load input modules +# If you do not load inputs, nothing happens! +# You may need to set the module load path if modules are not found. +# +# Ported from debian's sysklogd.conf +$ModLoad immark # provides --MARK-- message capability $ModLoad imuxsock # provides support for local system logging (e.g. via logger command) -$ModLoad imklog # reads kernel messages (the same are read from journald) -$ModLoad immark # provides --MARK-- message capability - -# Provides UDP syslog reception -#$ModLoad imudp -#$UDPServerRun 514 - -# Provides TCP syslog reception -#$ModLoad imtcp -#$InputTCPServerRun 514 - +$ModLoad imklog # kernel logging (formerly provided by rklogd) -#### GLOBAL DIRECTIVES #### -$FileGroup root +# +# Set the default permissions +# $FileOwner root +$FileGroup adm $FileCreateMode 0640 +$DirCreateMode 0755 +$Umask 0022 + +auth,authpriv.* /var/log/auth.log +*.*;auth,authpriv.none -/var/log/syslog +cron.* /var/log/cron.log +daemon.* -/var/log/daemon.log +kern.* -/var/log/kern.log +lpr.* -/var/log/lpr.log +mail.* -/var/log/mail.log +user.* -/var/log/user.log -# Where to place auxiliary files -$WorkDirectory /var/lib/rsyslog - -# Use default timestamp format -$ActionFileDefaultTemplate RSYSLOG_FileFormat - -# File syncing capability is disabled by default. This feature is usually not required, -# not useful and an extreme performance hit -#$ActionFileEnableSync on - -# Include all config files in /etc/rsyslog.d/ -$IncludeConfig /etc/rsyslog.d/*.conf - - -#### RULES #### - -# Log all kernel messages to the console. -# Logging much else clutters up the screen. -#kern.* /dev/console - -# Log anything (except mail) of level info or higher. -# Don't log private authentication messages! -*.info;mail.none /var/log/messages - -# The authpriv file has restricted access. -authpriv.* /var/log/secure - -# Log all the mail messages in one place. -mail.* -/var/log/maillog - +# +# Logging for the mail system. Split it up so that +# it is easy to write scripts to parse these files. +# +mail.info -/var/log/mail.info +mail.warn -/var/log/mail.warn +mail.err /var/log/mail.err -# Log cron stuff -cron.* /var/log/cron +# Logging for INN news system +# +news.crit /var/log/news.crit +news.err /var/log/news.err +news.notice -/var/log/news.notice -# Everybody gets emergency messages -*.emerg :omusrmsg:* +# +# Some `catch-all' logfiles. +# +*.=debug;\ + auth,authpriv.none;\ + news.none;mail.none -/var/log/debug +*.=info;*.=notice;*.=warn;\ + auth,authpriv.none;\ + cron,daemon.none;\ + mail,news.none -/var/log/messages -# Save news errors of level crit and higher in a special file. -uucp,news.crit /var/log/spooler +# +# Emergencies are sent to everybody logged in. +# +*.emerg :omusrmsg:* # Save boot messages also to boot.log local7.* /var/log/boot.log - -# ### begin forwarding rule ### -# The statement between the begin ... end define a SINGLE forwarding -# rule. They belong together, do NOT split them. If you create multiple -# forwarding rules, duplicate the whole block! # Remote Logging (we use TCP for reliable delivery) -# # An on-disk queue is created for this action. If the remote host is # down, messages are spooled to disk and sent when it is up again. -#$ActionQueueFileName fwdRule1 # unique name prefix for spool files -#$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible) +#$WorkDirectory /var/spool/rsyslog # where to place spool files +#$ActionQueueFileName uniqName # unique name prefix for spool files +$ActionQueueMaxDiskSpace 10m # 1gb space limit (use as much as possible) #$ActionQueueSaveOnShutdown on # save messages to disk on shutdown #$ActionQueueType LinkedList # run asynchronously #$ActionResumeRetryCount -1 # infinite retries if host is down # remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional #*.* @@remote-host:514 -# ### end of the forwarding rule ### + + +# ######### Receiving Messages from Remote Hosts ########## +# TCP Syslog Server: +# provides TCP syslog reception and GSS-API (if compiled to support it) +#$ModLoad imtcp.so # load module +#$InputTCPServerRun 514 # start up TCP listener at port 514 + +# UDP Syslog Server: +#$ModLoad imudp.so # provides UDP syslog reception +#$UDPServerRun 514 # start a UDP syslog server at standard port 514 + +# +# Include all config files in /etc/rsyslog.d/ +# +$IncludeConfig /etc/rsyslog.d/*.conf diff --git a/meta-openeuler/recipes-core/rsyslog/rsyslog/rsyslog.logrotate b/meta-openeuler/recipes-core/rsyslog/rsyslog/rsyslog.logrotate index 962794577d75516f553240012520b0a0d3d2ea10..5f8568fce639fe088967540c815115d9f4d65963 100644 --- a/meta-openeuler/recipes-core/rsyslog/rsyslog/rsyslog.logrotate +++ b/meta-openeuler/recipes-core/rsyslog/rsyslog/rsyslog.logrotate @@ -37,4 +37,3 @@ @BINDIR@/pkill -HUP rsyslogd 2> /dev/null || true endscript } - diff --git a/meta-openeuler/recipes-core/rsyslog/rsyslog/rsyslog.service b/meta-openeuler/recipes-core/rsyslog/rsyslog/rsyslog.service new file mode 100644 index 0000000000000000000000000000000000000000..0aacff32d516dee9c125b16393deb4d7e5db4f25 --- /dev/null +++ b/meta-openeuler/recipes-core/rsyslog/rsyslog/rsyslog.service @@ -0,0 +1,21 @@ +[Unit] +Description=System Logging Service +Requires=syslog.socket +Wants=network.target network-online.target +After=network.target network-online.target +Documentation=man:rsyslogd(8) +Documentation=http://www.rsyslog.com/doc/ + +[Service] +Type=notify +ExecStart=@sbindir@/rsyslogd -n -iNONE +StandardOutput=null +Restart=on-failure + +# Increase the default a bit in order to allow many simultaneous +# files to be monitored, we might need a lot of fds. +LimitNOFILE=16384 + +[Install] +WantedBy=multi-user.target +Alias=syslog.service diff --git a/meta-openeuler/recipes-core/rsyslog/rsyslog/run-ptest b/meta-openeuler/recipes-core/rsyslog/rsyslog/run-ptest new file mode 100644 index 0000000000000000000000000000000000000000..efa9ba3ed018becba947633198340b51a96ba447 --- /dev/null +++ b/meta-openeuler/recipes-core/rsyslog/rsyslog/run-ptest @@ -0,0 +1,12 @@ +#!/bin/sh +# +set -e +set -o pipefail + +SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" +cd ${SCRIPTPATH} +useradd tester || echo "user already exists" +ln -sf /usr/sbin/logrotate /usr/bin/logrotate +su tester -c "make -C tests -k check-TESTS" +userdel tester +rm -f /usr/bin/logrotate diff --git a/meta-openeuler/recipes-core/rsyslog/rsyslog/use-pkgconfig-to-check-libgcrypt.patch b/meta-openeuler/recipes-core/rsyslog/rsyslog/use-pkgconfig-to-check-libgcrypt.patch new file mode 100644 index 0000000000000000000000000000000000000000..03525872681549f4b5815cab5d9a5a871c85f47f --- /dev/null +++ b/meta-openeuler/recipes-core/rsyslog/rsyslog/use-pkgconfig-to-check-libgcrypt.patch @@ -0,0 +1,43 @@ +From d0852006bf3d305e8984b85b41997d43d4476937 Mon Sep 17 00:00:00 2001 +From: Roy Li +Date: Wed, 18 Jun 2014 13:46:52 +0800 +Subject: [PATCH] use pkgconfig to check libgcrypt + +Upstream-Status: Inappropriate [configuration] + +libgcrypt does no longer provide libgcrypt-config, and provide +*.pc, so we should use pkgconfig to check + +Signed-off-by: Roy Li +Signed-off-by: Wenzong Fan + +--- + configure.ac | 15 +-------------- + 1 file changed, 1 insertion(+), 14 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 62178c3..b56c9c7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -889,20 +889,7 @@ AC_ARG_ENABLE(libgcrypt, + [enable_libgcrypt=yes] + ) + if test "x$enable_libgcrypt" = "xyes"; then +- AC_PATH_PROG([LIBGCRYPT_CONFIG],[libgcrypt-config],[no]) +- if test "x${LIBGCRYPT_CONFIG}" = "xno"; then +- AC_MSG_FAILURE([libgcrypt-config not found in PATH]) +- fi +- AC_CHECK_LIB( +- [gcrypt], +- [gcry_cipher_open], +- [LIBGCRYPT_CFLAGS="`${LIBGCRYPT_CONFIG} --cflags`" +- LIBGCRYPT_LIBS="`${LIBGCRYPT_CONFIG} --libs`" +- ], +- [AC_MSG_FAILURE([libgcrypt is missing])], +- [`${LIBGCRYPT_CONFIG} --libs --cflags`] +- ) +- AC_DEFINE([ENABLE_LIBGCRYPT], [1], [Indicator that LIBGCRYPT is present]) ++ PKG_CHECK_MODULES(LIBGCRYPT, libgcrypt) + fi + AM_CONDITIONAL(ENABLE_LIBGCRYPT, test x$enable_libgcrypt = xyes) + AC_SUBST(LIBGCRYPT_CFLAGS) diff --git a/meta-openeuler/recipes-core/rsyslog/rsyslog_%.bbappend b/meta-openeuler/recipes-core/rsyslog/rsyslog_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..10b61cf04cc01a7df55abbad79a2422fb77e5312 --- /dev/null +++ b/meta-openeuler/recipes-core/rsyslog/rsyslog_%.bbappend @@ -0,0 +1,26 @@ +# no bbfile in poky, refer to meta-oe bbfile: https://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-extended/rsyslog/rsyslog_8.2102.0.bb?h=hardknott + +# version in openEuler +PV = "8.2110.0" + +# files, patches can't be applied in openeuler or conflict with openeuler +SRC_URI_remove = " \ + http://www.rsyslog.com/download/files/download/rsyslog/${BPN}-${PV}.tar.gz \ +" + +# files, patches that come from openeuler +SRC_URI += " \ + file://${BP}.tar.gz;name=tarball \ + file://rsyslog-8.24.0-ensure-parent-dir-exists-when-writting-log-file.patch \ + file://bugfix-rsyslog-7.4.7-imjournal-add-monotonic-timestamp.patch \ + file://bugfix-rsyslog-7.4.7-add-configuration-to-avoid-memory-leak.patch \ + file://rsyslog-8.37.0-initialize-variables-and-check-return-value.patch \ +" + +SRC_URI[tarball.md5sum] = "2d2b9d4a70a6e2fd4a7e806a5782c56b" +SRC_URI[tarball.sha256sum] = "3f904ec137ca6412e8273f7896d962ecb589f7d0c589bdf16b1709ec27e24f31" + +# according to openEuler, no need to use flex-native liblogging libgcrypt +DEPENDS_remove = "flex-native liblogging" +PACKAGECONFIG_remove = "libgcrypt" + diff --git a/meta-openeuler/recipes-core/rsyslog/rsyslog_8.2110.0.bb b/meta-openeuler/recipes-core/rsyslog/rsyslog_8.2102.0.bb similarity index 44% rename from meta-openeuler/recipes-core/rsyslog/rsyslog_8.2110.0.bb rename to meta-openeuler/recipes-core/rsyslog/rsyslog_8.2102.0.bb index 446bc332cf4de40b62cac6e1f374300deea297da..921124024cb8d3bc4a86a3c8aa4e6c73c947960f 100644 --- a/meta-openeuler/recipes-core/rsyslog/rsyslog_8.2110.0.bb +++ b/meta-openeuler/recipes-core/rsyslog/rsyslog_8.2102.0.bb @@ -1,6 +1,6 @@ SUMMARY = "Rsyslog is an enhanced multi-threaded syslogd" DESCRIPTION = "\ - Rsyslog is an enhanced syslogd supporting, among others, MySQL,\ +Rsyslog is an enhanced syslogd supporting, among others, MySQL,\ PostgreSQL, failover log destinations, syslog/tcp, fine grain\ output format control, high precision timestamps, queued operations\ and the ability to filter on any message part. It is quite\ @@ -9,47 +9,49 @@ DESCRIPTION = "\ encryption protected syslog relay chains while at the same time being\ very easy to setup for the novice user." -DEPENDS = "zlib libestr libfastjson bison-native" +DEPENDS = "zlib libestr libfastjson bison-native flex-native liblogging" HOMEPAGE = "http://www.rsyslog.com/" LICENSE = "GPLv3 & LGPLv3 & Apache-2.0" -LIC_FILES_CHKSUM = "file://COPYING;md5=51d9635e646fb75e1b74c074f788e973" +LIC_FILES_CHKSUM = "file://COPYING;md5=51d9635e646fb75e1b74c074f788e973 \ + file://COPYING.LESSER;md5=cb7903f1e5c39ae838209e130dca270a \ + file://COPYING.ASL20;md5=052f8a09206615ab07326ff8ce2d9d32\ +" -SRC_URI = "file://${BPN}/${BP}.tar.gz \ - file://${BPN}/rsyslog-8.24.0-ensure-parent-dir-exists-when-writting-log-file.patch \ - file://${BPN}/bugfix-rsyslog-7.4.7-imjournal-add-monotonic-timestamp.patch \ - file://${BPN}/bugfix-rsyslog-7.4.7-add-configuration-to-avoid-memory-leak.patch \ - file://${BPN}/rsyslog-8.37.0-initialize-variables-and-check-return-value.patch \ +SRC_URI = "http://www.rsyslog.com/download/files/download/rsyslog/${BPN}-${PV}.tar.gz \ file://initscript \ file://rsyslog.conf \ file://rsyslog.logrotate \ + file://rsyslog.service \ + file://use-pkgconfig-to-check-libgcrypt.patch \ + file://run-ptest \ + file://0001-tests-disable-the-check-for-inotify.patch \ +" + +SRC_URI_append_libc-musl = " \ + file://0001-Include-sys-time-h.patch \ " + +SRC_URI[md5sum] = "1f6150dfd2ef38db37c2165e98d2f2b1" +SRC_URI[sha256sum] = "94ee0d0312c2edea737665594cbe4a9475e4e3b593e12b5b8ae3a743ac9c72a7" + UPSTREAM_CHECK_URI = "https://github.com/rsyslog/rsyslog/releases" UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" -inherit autotools pkgconfig +inherit autotools pkgconfig systemd update-rc.d ptest -#not enable --enable-libsystemd configuration options -EXTRA_OECONF += "--disable-generate-man-pages ap_cv_atomic_builtins=yes --enable-libsystemd=no" +EXTRA_OECONF += "--disable-generate-man-pages ap_cv_atomic_builtins=yes" +EXTRA_OECONF += "--enable-imfile-tests" EXTRA_OECONF_remove_mipsarch = "ap_cv_atomic_builtins=yes" EXTRA_OECONF_remove_powerpc = "ap_cv_atomic_builtins=yes" EXTRA_OECONF_remove_riscv32 = "ap_cv_atomic_builtins=yes" -CFLAGS += " -I${RECIPE_SYSROOT}/usr/include/libfastjson/ " + # first line is default yes in configure PACKAGECONFIG ??= " \ - rsyslogd rsyslogrt klog inet regexp uuid \ - fmhttp imdiag imfile \ - ${@bb.utils.filter('DISTRO_FEATURES', 'snmp', d)} \ + rsyslogd rsyslogrt klog inet regexp uuid libgcrypt \ + fmhttp imdiag gnutls imfile \ + ${@bb.utils.filter('DISTRO_FEATURES', 'snmp systemd', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'testbench relp ${VALGRIND}', '', d)} \ " -RSYSLOG_IMAGE_NAME = "${MACHINE_ARCH}${RTOS_KERNEL_TAG}" -PACKAGECONFIG_remove += "${@bb.utils.contains('RSYSLOG_IMAGE_NAME', 'arm32a15eb-5.10', 'fmhttp', '', d)}" -PACKAGECONFIG_remove += "${@bb.utils.contains('RSYSLOG_IMAGE_NAME', 'arm32a9eb-5.10', 'fmhttp', '', d)}" -PACKAGECONFIG_remove += "${@bb.utils.contains('RSYSLOG_IMAGE_NAME', 'arm32a9eb-tiny-5.10', 'fmhttp', '', d)}" -PACKAGECONFIG_remove += "${@bb.utils.contains('RSYSLOG_IMAGE_NAME', 'arm64eb-5.10', 'fmhttp', '', d)}" -PACKAGECONFIG_remove += "${@bb.utils.contains('RSYSLOG_IMAGE_NAME', 'arm64el-5.10', 'fmhttp', '', d)}" -PACKAGECONFIG_remove += "${@bb.utils.contains('RSYSLOG_IMAGE_NAME', 'arm32a7el-preempt-5.10', 'fmhttp', '', d)}" - -# add imfile module to support file monitor function -PACKAGECONFIG_append_arm64el = "${@bb.utils.contains('RTOS_TAG', '-preempt', 'imfile', '', d)}" # default yes in configure PACKAGECONFIG[relp] = "--enable-relp,--disable-relp,librelp," @@ -69,18 +71,71 @@ PACKAGECONFIG[imdiag] = "--enable-imdiag,--disable-imdiag,," PACKAGECONFIG[imfile] = "--enable-imfile,--disable-imfile,," PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp," PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls," +PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir,systemd," PACKAGECONFIG[imjournal] = "--enable-imjournal,--disable-imjournal," PACKAGECONFIG[mmjsonparse] = "--enable-mmjsonparse,--disable-mmjsonparse," PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5," PACKAGECONFIG[postgresql] = "--enable-pgsql,--disable-pgsql,postgresql," PACKAGECONFIG[libdbi] = "--enable-libdbi,--disable-libdbi,libdbi," PACKAGECONFIG[mail] = "--enable-mail,--disable-mail,," -PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind," +PACKAGECONFIG[valgrind] = ",--without-valgrind-testbench,valgrind," +PACKAGECONFIG[imhttp] = "--enable-imhttp,--disable-imhttp,civetweb," + + +TESTDIR = "tests" +do_compile_ptest() { + echo 'buildtest-TESTS: $(check_PROGRAMS)' >> ${TESTDIR}/Makefile + oe_runmake -C ${TESTDIR} buildtest-TESTS +} + +do_install_ptest() { + # install the tests + cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH} + cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH} + + # give permissions to all users + # some tests need to write to this directory as user 'daemon' + chmod 777 -R ${D}${PTEST_PATH}/tests + + # do NOT need to rebuild Makefile itself + sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile + # do NOT need to rebuild $(check_PROGRAMS) + sed -i 's/^check-TESTS:.*$/check-TESTS:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile + + # fix the srcdir, top_srcdir + sed -i 's,^\(srcdir = \).*,\1${PTEST_PATH}/tests,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile + sed -i 's,^\(top_srcdir = \).*,\1${PTEST_PATH}/tests,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile + # fix the abs_top_builddir + sed -i 's,^\(abs_top_builddir = \).*,\1${PTEST_PATH}/,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile + + # install test-driver + install -m 644 ${S}/test-driver ${D}${PTEST_PATH} + + # install necessary links + install -d ${D}${PTEST_PATH}/tools + ln -sf ${sbindir}/rsyslogd ${D}${PTEST_PATH}/tools/rsyslogd + + install -d ${D}${PTEST_PATH}/runtime + install -d ${D}${PTEST_PATH}/runtime/.libs + ( + cd ${D}/${libdir}/rsyslog + allso="*.so" + for i in $allso; do + ln -sf ${libdir}/rsyslog/$i ${D}${PTEST_PATH}/runtime/.libs/$i + done + ) + + # fix the module load path with runtime/.libs + find ${D}${PTEST_PATH}/${TESTDIR} -name "*.conf" -o -name "*.sh" -o -name "*.c" | xargs \ + sed -i -e 's:../plugins/.*/.libs/:../runtime/.libs/:g' + # fix the python3 path for tests/set-envar + sed -i -e s:${HOSTTOOLS_DIR}:${bindir}:g ${D}${PTEST_PATH}/tests/set-envvars +} + do_install_append() { install -d "${D}${sysconfdir}/init.d" install -d "${D}${sysconfdir}/logrotate.d" - install -d "${D}/var/lib/rsyslog" - install -m 750 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/syslog + install -m 755 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/syslog install -m 644 ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf install -m 644 ${WORKDIR}/rsyslog.logrotate ${D}${sysconfdir}/logrotate.d/logrotate.rsyslog sed -i -e "s#@BINDIR@#${bindir}#g" ${D}${sysconfdir}/logrotate.d/logrotate.rsyslog @@ -93,6 +148,11 @@ do_install_append() { install -d 0755 ${D}${sysconfdir}/rsyslog.d echo '$ModLoad mmjsonparse' >> ${D}${sysconfdir}/rsyslog.d/mmjsonparse.conf fi + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${systemd_system_unitdir} + install -m 644 ${WORKDIR}/rsyslog.service ${D}${systemd_system_unitdir} + sed -i -e "s,@sbindir@,${sbindir},g" ${D}${systemd_system_unitdir}/rsyslog.service + fi } FILES_${PN} += "${bindir}" @@ -104,4 +164,42 @@ CONFFILES_${PN} = "${sysconfdir}/rsyslog.conf" RCONFLICTS_${PN} = "busybox-syslog sysklogd syslog-ng" +RPROVIDES_${PN} += "${PN}-systemd" +RREPLACES_${PN} += "${PN}-systemd" +RCONFLICTS_${PN} += "${PN}-systemd" +SYSTEMD_SERVICE_${PN} = "${BPN}.service" + RDEPENDS_${PN} += "logrotate" + +# for rsyslog-ptest +VALGRIND = "valgrind" + +# valgrind supports armv7 and above +VALGRIND_armv4 = '' +VALGRIND_armv5 = '' +VALGRIND_armv6 = '' + +# X32 isn't supported by valgrind at this time +VALGRIND_linux-gnux32 = '' +VALGRIND_linux-muslx32 = '' + +# Disable for some MIPS variants +VALGRIND_mipsarchr6 = '' +VALGRIND_linux-gnun32 = '' + +# Disable for powerpc64 with musl +VALGRIND_libc-musl_powerpc64 = '' +VALGRIND_libc-musl_powerpc64le = '' + +# RISC-V support for valgrind is not there yet +VALGRIND_riscv64 = "" +VALGRIND_riscv32 = "" + +# util-linux: logger needs the -d option +RDEPENDS_${PN}-ptest += "\ + make diffutils gzip bash gawk coreutils procps \ + libgcc python3-core python3-io python3-json \ + curl util-linux shadow \ + " + +RRECOMMENDS_${PN}-ptest += "${TCLIBC}-dbg ${VALGRIND}" diff --git a/meta-openeuler/recipes-core/sed/sed/run-ptest b/meta-openeuler/recipes-core/sed/sed/run-ptest deleted file mode 100644 index 993d7d5d75e723aee40b544f7df18ab482d32d18..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/sed/sed/run-ptest +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -chown nobody testsuite -chown nobody ../ptest -su nobody -c "make test-suite.log" diff --git a/meta-openeuler/recipes-core/sed/sed_4.8.bb b/meta-openeuler/recipes-core/sed/sed_4.8.bb deleted file mode 100644 index 7afff2217312e6a9685c68acceb186f4d1e8a2da..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/sed/sed_4.8.bb +++ /dev/null @@ -1,72 +0,0 @@ -SUMMARY = "Stream EDitor (text filtering utility)" -HOMEPAGE = "http://www.gnu.org/software/sed/" -DESCRIPTION = "sed (stream editor) is a non-interactive command-line text editor." -LICENSE = "GPLv3+" -LIC_FILES_CHKSUM = "file://COPYING;md5=c678957b0c8e964aa6c70fd77641a71e \ - file://sed/sed.h;beginline=1;endline=15;md5=fb3c7e6fbca6f66943859153d4be8efe \ - " -SECTION = "console/utils" - -SRC_URI = "file://sed/sed-${PV}.tar.xz \ - file://sed/backport-sed-c-flag.patch \ - file://sed/backport-sed-handle-very-long-execution-lines-tiny-change.patch \ - file://sed/backport-sed-handle-very-long-input-lines-with-R-tiny-change.patch \ - file://run-ptest \ -" - -SRC_URI[md5sum] = "6d906edfdb3202304059233f51f9a71d" -SRC_URI[sha256sum] = "f79b0cfea71b37a8eeec8490db6c5f7ae7719c35587f21edb0617f370eeff633" - -#inherit autotools texinfo update-alternatives gettext ptest -inherit autotools texinfo gettext - -PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" - -RDEPENDS_${PN}-ptest += "make gawk perl perl-module-filehandle perl-module-file-compare perl-module-file-find perl-module-file-temp perl-module-file-stat" -RRECOMMENDS_${PN}-ptest_append_libc-glibc = " locale-base-ru-ru locale-base-en-us locale-base-el-gr.iso-8859-7" - -EXTRA_OECONF = "--disable-acl \ - " - -do_install () { - autotools_do_install - install -d ${D}${base_bindir} - if [ ! ${D}${bindir} -ef ${D}${base_bindir} ]; then - mv ${D}${bindir}/sed ${D}${base_bindir}/sed - rmdir ${D}${bindir}/ - fi -} - -ALTERNATIVE_${PN} = "sed" -ALTERNATIVE_LINK_NAME[sed] = "${base_bindir}/sed" -ALTERNATIVE_PRIORITY = "100" - -do_compile_ptest() { - oe_runmake testsuite/get-mb-cur-max testsuite/test-mbrtowc -} - -do_install_ptest() { - cp -rf ${S}/testsuite/ ${D}${PTEST_PATH} - cp -rf ${B}/testsuite/* ${D}${PTEST_PATH}/testsuite/ - cp -rf ${S}/build-aux/ ${D}${PTEST_PATH}/ - cp ${B}/Makefile ${D}${PTEST_PATH} - cp ${S}/init.cfg ${D}${PTEST_PATH} - - sed -e 's/^Makefile:/_Makefile:/' -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/bash/sh/' -i ${D}${PTEST_PATH}/Makefile - for i in `grep -rl "sed/sed" ${D}${PTEST_PATH}`; do sed -e 's/..\/sed\/sed/sed/' -i $i; done - - sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ - -e 's|${DEBUG_PREFIX_MAP}||g' \ - -e 's:${HOSTTOOLS_DIR}/::g' \ - -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ - -e 's:abs_top_builddir =.*:abs_top_builddir = ..:g' \ - -e 's:abs_top_srcdir =.*:abs_top_srcdir = ..:g' \ - -e 's:abs_srcdir =.*:abs_srcdir = ..:g' \ - -e 's:top_srcdir =.*:top_srcdir = ..:g' \ - -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ - -i ${D}${PTEST_PATH}/Makefile -} - -RPROVIDES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sed', '', d)}" - -BBCLASSEXTEND = "nativesdk" diff --git a/meta-openeuler/recipes-core/selinux/policycoreutils.inc b/meta-openeuler/recipes-core/selinux/policycoreutils.inc index 29e91b5ea788fee4246577a96fa4a854f9cf8aa4..ebf87113cf521570514e42f7d2210c1ecc4e060d 100644 --- a/meta-openeuler/recipes-core/selinux/policycoreutils.inc +++ b/meta-openeuler/recipes-core/selinux/policycoreutils.inc @@ -11,6 +11,8 @@ DEPENDS += "libsepol libselinux libsemanage libcap gettext-native" EXTRA_DEPENDS = "libcap-ng" DEPENDS += "${@['', '${EXTRA_DEPENDS}']['${PN}' != '${BPN}-native']}" +S = "${WORKDIR}/selinux-${BP}/${BPN}" + inherit selinux DEPENDS += "${@target_selinux(d, 'audit')}" diff --git a/meta-openeuler/recipes-core/selinux/policycoreutils_3.3.bb b/meta-openeuler/recipes-core/selinux/policycoreutils_3.3.bb index 33dfc76ec69689f2239f80e124d57a00ff2908d3..d29390c52e28bbd7481ba04e835fded36f6280cc 100644 --- a/meta-openeuler/recipes-core/selinux/policycoreutils_3.3.bb +++ b/meta-openeuler/recipes-core/selinux/policycoreutils_3.3.bb @@ -7,6 +7,3 @@ SRC_URI = "file://policycoreutils/${BP}.tar.gz \ file://policycoreutils/fix-fixfiles-N-date-function.patch;patchdir=.. \ file://policycoreutils/fix-fixfiles-N-date-function-two.patch;patchdir=.. \ " - -S = "${WORKDIR}/selinux-${BPN}-${PV}/${BPN}" -B = "${WORKDIR}/selinux-${BPN}-${PV}/${BPN}" \ No newline at end of file diff --git a/meta-openeuler/recipes-core/shadow/shadow-securetty_4.8.1.bb b/meta-openeuler/recipes-core/shadow/shadow-securetty_4.8.1.bb deleted file mode 100644 index 2f06942e8bb1d1207d9c91a4575fa38215f6aa65..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/shadow/shadow-securetty_4.8.1.bb +++ /dev/null @@ -1,38 +0,0 @@ -SUMMARY = "Provider of the machine specific securetty file" -SECTION = "base utils" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" - -INHIBIT_DEFAULT_DEPS = "1" - -PR = "r1" - -SRC_URI = "file://securetty" - -S = "${WORKDIR}" - -# Since SERIAL_CONSOLES is likely to be set from the machine configuration -PACKAGE_ARCH = "${MACHINE_ARCH}" - -do_install () { - # Ensure we add a suitable securetty file to the package that has - # most common embedded TTYs defined. - install -d ${D}${sysconfdir} - install -m 0400 ${WORKDIR}/securetty ${D}${sysconfdir}/securetty - if [ ! -z "${SERIAL_CONSOLES}" ]; then - # Our SERIAL_CONSOLES contains a baud rate and sometimes extra - # options as well. The following pearl :) takes that and converts - # it into newline-separated tty's and appends them into - # securetty. So if a machine has a weird looking console device - # node (e.g. ttyAMA0) that securetty does not know, it will get - # appended to securetty and root logins will be allowed on that - # console. - tmp="${SERIAL_CONSOLES}" - for entry in $tmp ; do - ttydev=`echo "$entry" | sed -e 's/^[0-9]*\;//' -e 's/\;.*//'` - if ! grep -q $ttydev ${D}${sysconfdir}/securetty; then - echo $ttydev >> ${D}${sysconfdir}/securetty - fi - done - fi -} diff --git a/meta-openeuler/recipes-core/shadow/shadow-sysroot_4.8.1.bb b/meta-openeuler/recipes-core/shadow/shadow-sysroot_4.8.1.bb deleted file mode 100644 index 03fba804f3f704675a9aae73b96173995fdd7a6a..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/shadow/shadow-sysroot_4.8.1.bb +++ /dev/null @@ -1,35 +0,0 @@ -SUMMARY = "Shadow utils requirements for useradd.bbclass" -HOMEPAGE = "http://pkg-shadow.alioth.debian.org" -BUGTRACKER = "https://alioth.debian.org/tracker/?group_id=30580" -SECTION = "base utils" -LICENSE = "BSD | Artistic-1.0" -LIC_FILES_CHKSUM = "file://login.defs_shadow-sysroot;md5=25e2f2de4dfc8f966ac5cdfce45cd7d5" - -DEPENDS = "base-passwd" - -# Remove base-passwd for all image -DEPENDS_remove += "base-passwd" - -PR = "r1" - -# The sole purpose of this recipe is to provide the /etc/login.defs -# file for the target sysroot - needed so the shadow-native utilities -# can add custom users/groups for recipes that use inherit useradd. -SRC_URI = "file://login.defs_shadow-sysroot" - -SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79" -SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778" - -S = "${WORKDIR}" - -do_install() { - install -d ${D}${sysconfdir} - install -p -m 644 ${S}/login.defs_shadow-sysroot ${D}${sysconfdir}/login.defs -} - -SYSROOT_DIRS += "${sysconfdir}" - -# don't create any packages -# otherwise: dbus-dev depends on shadow-sysroot-dev which depends on shadow-sysroot -# and this has another copy of /etc/login.defs already provided by shadow -PACKAGES = "" diff --git a/meta-openeuler/recipes-core/shadow/shadow.inc b/meta-openeuler/recipes-core/shadow/shadow.inc deleted file mode 100644 index 246201dab12c30101ded0da3173fa599c770a0e7..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/shadow/shadow.inc +++ /dev/null @@ -1,212 +0,0 @@ -SUMMARY = "Tools to change and administer password and group data" -HOMEPAGE = "file://pkg-shadow.alioth.debian.org" -BUGTRACKER = "files://alioth.debian.org/tracker/?group_id=30580" -SECTION = "base/utils" -LICENSE = "BSD | Artistic-1.0" - -#DEPENDS = "virtual/crypt" - -UPSTREAM_CHECK_URI = "https://github.com/shadow-maint/shadow/releases" - -FILESEXTRAPATHS_prepend .= "${OPEN_SRC_DIR}/shadow-utils:" - -inherit autotools gettext - -export CONFIG_SHELL="/bin/sh" - -EXTRA_OECONF += "--without-audit \ - --without-libcrack \ - --without-selinux \ - --with-group-name-max-length=24 \ - --enable-subordinate-ids=yes \ - ${NSCDOPT}" - -do_configure_prepend() { - #pushd ${S} - #sh autogen.sh - #sed -i 's/faillog/faillog2/g' configure - #sed -i 's/faillog"/faillog2"/g' configure.ac - #popd -} - -NSCDOPT = "" -NSCDOPT_class-native = "--without-nscd" -NSCDOPT_class-nativesdk = "--without-nscd" -NSCDOPT_libc-glibc = "--with-nscd" - -PAM_PLUGINS = "libpam-runtime \ - pam-plugin-faildelay \ - pam-plugin-securetty \ - pam-plugin-nologin \ - pam-plugin-env \ - pam-plugin-group \ - pam-plugin-limits \ - pam-plugin-lastlog \ - pam-plugin-motd \ - pam-plugin-mail \ - pam-plugin-shells \ - pam-plugin-rootok" - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)}" -PACKAGECONFIG_class-native ??= "${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)}" -PACKAGECONFIG_class-nativesdk = "" -PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam,${PAM_PLUGINS}" -PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr" -PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl" - -RDEPENDS_${PN} = "shadow-securetty \ - base-passwd " - -# util-linux-sulogin" - -# Remove base-passwd for all image -RDEPENDS_${PN}_remove += "base-passwd" -RDEPENDS_${PN}_class-native = "" -RDEPENDS_${PN}_class-nativesdk = "" - -SRC_URI = "file://shadow/${BP}.tar.xz \ - file://shadow/shadow-4.8-goodname.patch \ - file://shadow/shadow-4.9-null-tm.patch \ - file://shadow/shadow-4.8-long-entry.patch \ - file://shadow/usermod-unlock.patch \ - file://shadow/useradd-create-directories-after-the-SELinux-user.patch \ - file://shadow/shadow-4.1.5.1-var-lock.patch \ - file://shadow/shadow-utils-fix-lock-file-residue.patch \ - file://shadow/Makefile-include-libeconf-dependency-in-new-idmap.patch \ - file://shadow/usermod-allow-all-group-types-with-G-option.patch \ - file://shadow/useradd-avoid-generating-an-empty-subid-range.patch \ - file://shadow/libmisc-fix-default-value-in-SHA_get_salt_rounds.patch \ - file://shadow/semanage-close-the-selabel-handle.patch \ - file://shadow/Revert-useradd.c-fix-memleaks-of-grp.patch \ - file://shadow/useradd-change-SELinux-labels-for-home-files.patch \ - file://shadow/libsubid-link-to-PAM-libraries.patch \ - file://shadow/Fix-out-of-tree-builds-with-respect-to-libsubid-incl.patch \ - file://shadow/Respect-enable-static-no-in-libsubid.patch \ - file://shadow/Fixes-the-linking-issues-when-libsubid-is-static-and.patch \ - file://shadow/pwck-fix-segfault-when-calling-fprintf.patch \ - file://shadow/newgrp-fix-segmentation-fault.patch \ - file://shadow/groupdel-fix-SIGSEGV-when-passwd-does-not-exist.patch \ - file://shadow/shadow-add-sm3-crypt-support.patch \ - file://shadow/backport-useradd-modify-check-ID-range-for-system-users.patch \ -" - -LIC_FILES_CHKSUM="file://COPYING;md5=ed80ff1c2b40843cf5768e5229cf16e5" - -#PAM_SRC_URI = "file://pam.d" -SRC_URI += "file://pam.d/chfn \ - file://login_defs_pam.sed \ - file://pam.d/chpasswd \ - file://pam.d/chsh \ - file://pam.d/login \ - file://pam.d/newusers \ - file://pam.d/passwd \ - file://pam.d/su \ - file://pam.d/groupmems \ - file://login.defs \ - " - -do_install() { - oe_runmake DESTDIR="${D}" sbindir="${base_sbindir}" usbindir="${sbindir}" install - - # Info dir listing isn't interesting at this point so remove it if it exists. - if [ -e "${D}${infodir}/dir" ]; then - rm -f ${D}${infodir}/dir - fi - - # Enable CREATE_HOME by default. - sed -i 's/#CREATE_HOME/CREATE_HOME/g' ${D}${sysconfdir}/login.defs - - # As we are on an embedded system, ensure the users mailbox is in - # ~/ not /var/spool/mail by default, as who knows where or how big - # /var is. The system MDA will set this later anyway. - sed -i 's/MAIL_DIR/#MAIL_DIR/g' ${D}${sysconfdir}/login.defs - sed -i 's/#MAIL_FILE/MAIL_FILE/g' ${D}${sysconfdir}/login.defs - - # Disable checking emails. - sed -i 's/MAIL_CHECK_ENAB/#MAIL_CHECK_ENAB/g' ${D}${sysconfdir}/login.defs - - # Comment out SU_NAME to work correctly with busybox - # See Bug#5359 and Bug#7173 - sed -i 's:^SU_NAME:#SU_NAME:g' ${D}${sysconfdir}/login.defs - - # Use proper encryption for passwords - sed -i 's/^#ENCRYPT_METHOD.*$/ENCRYPT_METHOD SHA512/' ${D}${sysconfdir}/login.defs - - # keep login.defs the same fileds & values as one in the previous init-script rpm - sed -i 's/^CHFN_RESTRICT/#CHFN_RESTRICT/g' ${D}${sysconfdir}/login.defs - sed -i 's/^CONSOLE/#CONSOLE/g' ${D}${sysconfdir}/login.defs - sed -i 's/^ERASECHAR/#ERASECHAR/g' ${D}${sysconfdir}/login.defs - sed -i 's/^FAIL_DELAY/#FAIL_DELAY/g' ${D}${sysconfdir}/login.defs - sed -i 's/^HUSHLOGIN_FILE/#HUSHLOGIN_FILE/g' ${D}${sysconfdir}/login.defs - sed -i 's/^KILLCHAR/#KILLCHAR/g' ${D}${sysconfdir}/login.defs - sed -i 's/^LOGIN_RETRIES/#LOGIN_RETRIES/g' ${D}${sysconfdir}/login.defs - sed -i 's/^MAIL_FILE/#MAIL_FILE/g' ${D}${sysconfdir}/login.defs - sed -i 's/^SYSLOG_SG_ENAB/#SYSLOG_SG_ENAB/g' ${D}${sysconfdir}/login.defs - sed -i 's/^SYSLOG_SU_ENAB/#SYSLOG_SU_ENAB/g' ${D}${sysconfdir}/login.defs - sed -i 's/^SYS_GID_MAX/#SYS_GID_MAX/g' ${D}${sysconfdir}/login.defs - sed -i 's/^SYS_UID_MAX/#SYS_UID_MAX/g' ${D}${sysconfdir}/login.defs - sed -i 's/^TTYGROUP/#TTYGROUP/g' ${D}${sysconfdir}/login.defs - sed -i 's/^UMASK/#UMASK/g' ${D}${sysconfdir}/login.defs - sed -i 's#^ENV_PATH.*$#ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin#' ${D}${sysconfdir}/login.defs - sed -i 's#^ENV_SUPATH.*$#ENV_SUPATH PATH=/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin#' ${D}${sysconfdir}/login.defs - sed -i 's#^GID_MIN.*$#GID_MIN 500#' ${D}${sysconfdir}/login.defs - sed -i 's#^UID_MIN.*$#UID_MIN 500#' ${D}${sysconfdir}/login.defs - sed -i 's/^#MAIL_DIR/MAIL_DIR/g' ${D}${sysconfdir}/login.defs - - # Now we don't have a mail system. Disable mail creation for now. - #sed -i 's:/bin/bash:/bin/sh:g' ${D}${sysconfdir}/default/useradd - #sed -i '/^CREATE_MAIL_SPOOL/ s:^:#:' ${D}${sysconfdir}/default/useradd - - # Use users group by default - #sed -i 's,^GROUP=1000,GROUP=100,g' ${D}${sysconfdir}/default/useradd -} - -do_install_append() { - # Ensure that the image has as a /var/spool/mail dir so shadow can - # put mailboxes there if the user reconfigures shadow to its - # defaults (see sed below). - install -m 0775 -d ${D}${localstatedir}/spool/mail - chown root:mail ${D}${localstatedir}/spool/mail - - if [ -e ${WORKDIR}/pam.d ]; then - install -d ${D}${sysconfdir}/pam.d/ - install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/ - # Remove defaults that are not used when supporting PAM. - sed -i -f ${WORKDIR}/login_defs_pam.sed ${D}${sysconfdir}/login.defs - fi - - install -d ${D}${sbindir} ${D}${base_sbindir} ${D}${base_bindir} - cp ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/ - - # Move binaries to the locations we want - rm ${D}${sbindir}/vigr - # ln -sf vipw.${BPN} ${D}${base_sbindir}/vigr - if [ "${sbindir}" != "${base_sbindir}" ]; then - mv ${D}${sbindir}/vipw ${D}${base_sbindir}/vipw - rm -f ${D}${base_sbindir}/nologin - fi - if [ "${bindir}" != "${base_bindir}" ]; then - mv ${D}${bindir}/login ${D}${base_bindir}/login - rm -f ${D}${bindir}/su - fi - - # Handle link properly after rename, otherwise missing files would - # lead rpm failed dependencies. - ln -sf newgrp.${BPN} ${D}${bindir}/sg - cp ${WORKDIR}/login.defs ${D}${sysconfdir}/ -} - -PACKAGES =+ "${PN}-base" -FILES_${PN}-base = "\ - ${bindir}/sg \ - ${bindir}/newgrp.shadow \ - ${bindir}/groups.shadow \ - ${sysconfdir}/pam.d/login \ - ${sysconfdir}/pam.d/su \ - ${sysconfdir}/login.defs \ -" -RDEPENDS_${PN} += "${PN}-base" - -PACKAGE_WRITE_DEPS += "shadow-native" -PACKAGE_WRITE_DEPS_remove += "shadow-native" diff --git a/meta-openeuler/recipes-core/shadow/shadow_4.9.bb b/meta-openeuler/recipes-core/shadow/shadow_4.9.bb deleted file mode 100644 index d5d644ad814c08ce11c1cb5ef79a0ce43705956c..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/shadow/shadow_4.9.bb +++ /dev/null @@ -1,7 +0,0 @@ -require shadow.inc - -# Build falsely assumes that if --enable-libpam is set, we don't need to link against -# libcrypt. This breaks chsh. -#BUILD_LDFLAGS_append_class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '-lcrypt', '', d)}" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-core/sysfsutils/sysfsutils_%.bbappend b/meta-openeuler/recipes-core/sysfsutils/sysfsutils_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..d040666a1bc516c4af54c078dd498acf934ff7ad --- /dev/null +++ b/meta-openeuler/recipes-core/sysfsutils/sysfsutils_%.bbappend @@ -0,0 +1,20 @@ +# version in openEuler +PV = "2.1.1" + +# remove patches that can't apply in poky +SRC_URI_remove = "${SOURCEFORGE_MIRROR}/linux-diag/sysfsutils-${PV}.tar.gz \ + file://sysfsutils-2.0.0-class-dup.patch \ + file://obsolete_automake_macros.patch \ + file://separatebuild.patch \ +" + +SRC_URI_prepend += "file://sysfsutils/v${PV}.tar.gz \ +" + +# checksum changed in this version +LIC_FILES_CHKSUM = "file://COPYING;md5=dcc19fa9307a50017fca61423a7d9754 \ + file://cmd/GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://lib/LGPL;md5=4fbd65380cdd255951079008b364516c" + +SRC_URI[md5sum] = "537c110be7244905997262854505c30f" +SRC_URI[sha256sum] = "f7f669d27c997d3eb3f3e014b4c0aa1aa4d07ce4d6f9e41fa835240f2bf38810" diff --git a/meta-openeuler/recipes-core/sysfsutils/sysfsutils_2.1.1.bb b/meta-openeuler/recipes-core/sysfsutils/sysfsutils_2.1.1.bb deleted file mode 100644 index 6716b6904638dae8b1c9d9a90535dfd118d453d5..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/sysfsutils/sysfsutils_2.1.1.bb +++ /dev/null @@ -1,36 +0,0 @@ -### Descriptive metadata: SUMMARY,DESCRITPION, HOMEPAGE, AUTHOR, BUGTRACKER -SUMMARY = "Tools for working with sysfs" -DESCRIPTION = "Tools for working with the sysfs virtual filesystem. The tool 'systool' \ - can query devices by bus, class and topology." -AUTHOR = "" -HOMEPAGE = "http://linux-diag.sourceforge.net/Sysfsutils.html" -BUGTRACKER = "https://gitee.com/openeuler/yocto-meta-openeuler" - -### Package manager metadata: SECTION, PRIOIRTY(only for deb, opkg) -SECTION = "libs" - -### License metadata -LICENSE = "GPLv2 & LGPLv2.1" -LICENSE_${PN} = "GPLv2" -LICENSE_libsysfs = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING;md5=dcc19fa9307a50017fca61423a7d9754 \ - file://cmd/GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://lib/LGPL;md5=4fbd65380cdd255951079008b364516c" - -### Inheritance and includes if needed -inherit autotools - -### Build metadata: SRC_URI, SRCDATA, S, B, FILESEXTRAPATHS.... -SRC_URI = "file://sysfsutils/v${PV}.tar.gz " - -S = "${WORKDIR}/${BPN}-${PV}" - -### Runtime metadata - -### Package metadata -PACKAGES =+ "libsysfs" -FILES_libsysfs = "${libdir}/lib*${SOLIBS}" - -export libdir = "${base_libdir}" - -### Tasks for package diff --git a/meta-openeuler/recipes-core/systemd/files/systemd-depmod.service b/meta-openeuler/recipes-core/systemd/files/systemd-depmod.service new file mode 100644 index 0000000000000000000000000000000000000000..8addd0692bbac4eeedd428997818eb650e2214be --- /dev/null +++ b/meta-openeuler/recipes-core/systemd/files/systemd-depmod.service @@ -0,0 +1,22 @@ +[Unit] +Description=Do depmod Before Load Kernel Modules +DefaultDependencies=no +Conflicts=shutdown.target +Before=systemd-modules-load.service sysinit.target shutdown.target +ConditionCapability=CAP_SYS_MODULE +ConditionDirectoryNotEmpty=|/lib/modules-load.d +ConditionDirectoryNotEmpty=|/usr/lib/modules-load.d +ConditionDirectoryNotEmpty=|/usr/local/lib/modules-load.d +ConditionDirectoryNotEmpty=|/etc/modules-load.d +ConditionDirectoryNotEmpty=|/run/modules-load.d +ConditionKernelCommandLine=|modules-load +ConditionKernelCommandLine=|rd.modules-load +ConditionFileIsExecutable=/sbin/depmod +ConditionFileNotEmpty=!/lib/modules/%v/modules.dep + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/sbin/depmod -a +TimeoutSec=90s + diff --git a/meta-openeuler/recipes-core/systemd/systemd-boot_%.bbappend b/meta-openeuler/recipes-core/systemd/systemd-boot_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..8fc086036e85782a046135a8f6b1c545a20cf75a --- /dev/null +++ b/meta-openeuler/recipes-core/systemd/systemd-boot_%.bbappend @@ -0,0 +1,24 @@ +#main bbfile: yocto-poky/meta/recipes-core/systemd/systemd-boot_247.6.bb + +#version in openEuler +PV = "249" +S = "${WORKDIR}/systemd-${PV}" + +OPENEULER_REPO_NAME = "systemd" +require systemd-openeuler.inc + +# sync from poky honister +# see: https://git.yoctoproject.org/poky/tree/meta/recipes-core/systemd/systemd-boot_249.7.bb?h=honister +EFI_LD = "${HOST_PREFIX}ld.bfd" +EXTRA_OEMESON_remove += "-Defi-ld=${@ d.getVar('LD').split()[0]} " +EXTRA_OEMESON += "-Defi-ld=${EFI_LD} " + +SRC_URI[tarball.md5sum] = "8e8adf909c255914dfc10709bd372e69" +SRC_URI[tarball.sha256sum] = "174091ce5f2c02123f76d546622b14078097af105870086d18d55c1c2667d855" + +# glib needs meson, meson needs python3-natve +# here use nativesdk's meson-native and python3-native +DEPENDS_remove += "python3-native" + +#delete depends to util-linux-native +PACKAGECONFIG_remove_class-target += "libmount" diff --git a/meta-openeuler/recipes-core/systemd/systemd-openeuler.inc b/meta-openeuler/recipes-core/systemd/systemd-openeuler.inc new file mode 100644 index 0000000000000000000000000000000000000000..828b93161a5e3dce96cbd80da49967b35baa0186 --- /dev/null +++ b/meta-openeuler/recipes-core/systemd/systemd-openeuler.inc @@ -0,0 +1,77 @@ +LIC_FILES_CHKSUM = "file://${WORKDIR}/systemd-${PV}/LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ + file://${WORKDIR}/systemd-${PV}/LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" + + +# files, patches can't be applied in openeuler or conflict with openeuler +SRC_URI_remove = " \ + git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH} \ + file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ + file://0003-implment-systemd-sysv-install-for-OE.patch \ + file://0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch \ + file://0001-logind-Restore-chvt-as-non-root-user-without-polkit.patch \ + file://0027-proc-dont-trigger-mount-error-with-invalid-options-o.patch \ + file://0001-analyze-resolve-executable-path-if-it-is-relative.patch \ + " +# files, patches that come from openeuler +SRC_URI =+ " \ + file://systemd-${PV}.tar.gz \ + file://update-rtc-with-system-clock-when-shutdown.patch \ + file://udev-add-actions-while-rename-netif-failed.patch \ + file://fix-two-VF-virtual-machines-have-same-mac-address.patch \ + file://logind-set-RemoveIPC-to-false-by-default.patch \ + file://rules-add-rule-for-naming-Dell-iDRAC-USB-Virtual-NIC.patch \ + file://unit-don-t-add-Requires-for-tmp.mount.patch \ + file://rules-add-elevator-kernel-command-line-parameter.patch \ + file://rules-add-the-rule-that-adds-elevator-kernel-command.patch \ + file://units-add-Install-section-to-tmp.mount.patch \ + file://Make-systemd-udevd.service-start-after-systemd-remou.patch \ + file://udev-virsh-shutdown-vm.patch \ + file://sd-bus-properly-initialize-containers.patch \ + file://Revert-core-one-step-back-again-for-nspawn-we-actual.patch \ + file://journal-don-t-enable-systemd-journald-audit.socket-b.patch \ + file://systemd-change-time-log-level.patch \ + file://fix-capsh-drop-but-ping-success.patch \ + file://resolved-create-etc-resolv.conf-symlink-at-runtime.patch \ + file://pid1-bump-DefaultTasksMax-to-80-of-the-kernel-pid.ma.patch \ + file://fix-journal-file-descriptors-leak-problems.patch \ + file://activation-service-must-be-restarted-when-reactivated.patch \ + file://systemd-core-fix-problem-of-dbus-service-can-not-be-started.patch \ + file://delay-to-restart-when-a-service-can-not-be-auto-restarted.patch \ + file://disable-initialize_clock.patch \ + file://systemd-solve-that-rsyslog-reads-journal-s-object-of.patch \ + file://check-whether-command_prev-is-null-before-assigning-.patch \ + file://print-the-real-reason-for-link-update.patch \ + file://core-skip-change-device-to-dead-in-manager_catchup-d.patch \ + file://revert-rpm-restart-services-in-posttrans.patch \ + file://backport-core-fix-free-undefined-pointer-when-strdup-failed-i.patch \ + file://backport-fix-ConditionDirectoryNotEmpty-when-it-comes-to-a-No.patch \ + file://backport-fix-ConditionPathIsReadWrite-when-path-does-not-exis.patch \ + file://backport-fix-DirectoryNotEmpty-when-it-comes-to-a-Non-directo.patch \ + file://backport-CVE-2021-3997-rm-rf-refactor-rm_rf_children-split-out-body-of-dire.patch \ + file://backport-CVE-2021-3997-rm-rf-optionally-fsync-after-removing-directory-tree.patch \ + file://backport-CVE-2021-3997-tmpfiles-st-may-have-been-used-uninitialized.patch \ + file://backport-CVE-2021-3997-shared-rm_rf-refactor-rm_rf_children_inner-to-shorte.patch \ + file://backport-CVE-2021-3997-shared-rm_rf-refactor-rm_rf-to-shorten-code-a-bit.patch \ + file://backport-CVE-2021-3997-shared-rm-rf-loop-over-nested-directories-instead-of.patch \ + file://backport-fix-CVE-2021-33910.patch \ + file://backport-temporarily-disable-test-seccomp.patch \ + file://backport-revert-core-map-io.bfq.weight-to-1.1000.patch \ + file://backport-core-cgroup-fix-error-handling-of-cg_remove_xattr.patch \ + file://backport-core-wrap-cgroup-path-with-empty_to_root-in-log-mess.patch \ + file://backport-Bump-the-max-number-of-inodes-for-dev-to-a-million.patch \ + file://backport-Bump-the-max-number-of-inodes-for-tmp-to-a-million-t.patch \ + file://backport-unit-escape.patch \ + file://backport-udev-rename-type-name-e.g.-struct-worker-Worker.patch \ + file://backport-udev-run-the-main-process-workers-and-spawned-comman.patch \ + file://backport-timesync-fix-wrong-type-for-receiving-timestamp-in-n.patch \ + file://backport-udev-fix-potential-memleak.patch \ + file://backport-journalctl-never-fail-at-flushing-when-the-flushed-f.patch \ + file://backport-core-fix-SIGABRT-on-empty-exec-command-argv.patch \ + file://backport-core-service-also-check-path-in-exec-commands.patch \ + file://backport-Add-meson-option-to-disable-urlify.patch \ + file://backport-logind.conf-Fix-name-of-option-RuntimeDirectoryInode.patch \ + file://backport-unit-coldplug-both-job-and-nop_job-if-possible.patch \ + file://backport-meson.build-change-operator-combining-bools-from-to-.patch \ + file://backport-Avoid-tmp-being-mounted-as-tmpfs-without-the-user-s-.patch \ + file://backport-core-replace-slice-dependencies-as-they-get-added.patch \ +" diff --git a/meta-openeuler/recipes-core/systemd/systemd_%.bbappend b/meta-openeuler/recipes-core/systemd/systemd_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..c986d301ca8de787ff3f7216f14ff95220380975 --- /dev/null +++ b/meta-openeuler/recipes-core/systemd/systemd_%.bbappend @@ -0,0 +1,71 @@ +#main bbfile: yocto-poky/meta/recipes-core/systemd/systemd_247.6.bb + +#version in openEuler +PV = "249" +S = "${WORKDIR}/${BP}" + +require systemd-openeuler.inc + +OPENEULER_REPO_NAME = "systemd" +FILESEXTRAPATHS_prepend := "${THISDIR}/files/:" + +# feture sync with systemd_249.7.bb from poky honister +# see https://git.yoctoproject.org/poky/tree/meta/recipes-core/systemd/systemd_249.7.bb?h=honister +PACKAGECONFIG_append += "wheel-group" +# we don't wan zstd PACKAGECONFIG += "zstd" +PACKAGECONFIG_remove += "xz" +PACKAGECONFIG[tpm2] = "-Dtpm2=true,-Dtpm2=false,tpm2-tss,tpm2-tss libtss2 libtss2-tcti-device" +PACKAGECONFIG[repart] = "-Drepart=true,-Drepart=false" +PACKAGECONFIG[homed] = "-Dhomed=true,-Dhomed=false" +PACKAGECONFIG[wheel-group] = "-Dwheel-group=true, -Dwheel-group=false" +PACKAGECONFIG[zstd] = "-Dzstd=true,-Dzstd=false,zstd" +FILES_${PN}-container += "${exec_prefix}/lib/tmpfiles.d/README " +FILES_${PN}-extra-utils += "${bindir}/systemd-sysext " +FILES_${PN} += "${rootlibexecdir}/modprobe.d/README ${datadir}/dbus-1/system.d/org.freedesktop.home1.conf " +FILES_udev += "${rootlibexecdir}/udev/dmi_memory_id \ + ${rootlibexecdir}/udev/rules.d/40-elevator.rules \ + ${rootlibexecdir}/udev/rules.d/70-memory.rules \ + ${rootlibexecdir}/udev/rules.d/73-idrac.rules \ + ${rootlibexecdir}/udev/rules.d/81-net-dhcp.rules \ + ${rootlibexecdir}/udev/rules.d/README \ + " +python __anonymous() { + if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): + d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") + + if bb.utils.contains('PACKAGECONFIG', 'repart', True, False, d) and not bb.utils.contains('PACKAGECONFIG', 'openssl', True, False, d): + bb.error("PACKAGECONFIG[repart] requires PACKAGECONFIG[openssl]") + + if bb.utils.contains('PACKAGECONFIG', 'homed', True, False, d) and not bb.utils.contains('PACKAGECONFIG', 'userdb openssl cryptsetup', True, False, d): + bb.error("PACKAGECONFIG[homed] requires PACKAGECONFIG[userdb], PACKAGECONFIG[openssl] and PACKAGECONFIG[cryptsetup]") +} +# rules.d come from openeuler patches: /lib/udev/rules.d/73-idrac.rules /lib/udev/rules.d/40-elevator.rules +FILES_udev += " \ + ${rootlibexecdir}/udev/rules.d/40-elevator.rules \ + ${rootlibexecdir}/udev/rules.d/73-idrac.rules \ + " + +# depmodwrapper is not valid to do depmod in buildtime, add a service to do it in runtime as a wrokaround. +# as modutils.sh is not run under systed +PACKAGE_BEFORE_PN_append = "${PN}-depmod " +SRC_URI_append += "file://systemd-depmod.service" +FILES_${PN}-depmod = "${systemd_unitdir}/system/systemd-depmod.service" +SYSTEMD_SERVICE_${PN}-depmod = "systemd-depmod.service" +do_install_append () { + install -m 0644 ${WORKDIR}/systemd-depmod.service ${D}${systemd_unitdir}/system/systemd-depmod.service + ln -sf ../systemd-depmod.service ${D}${systemd_unitdir}/system/sysinit.target.wants/systemd-depmod.service +} + +SRC_URI[tarball.md5sum] = "8e8adf909c255914dfc10709bd372e69" +SRC_URI[tarball.sha256sum] = "174091ce5f2c02123f76d546622b14078097af105870086d18d55c1c2667d855" + +# glib needs meson, meson needs python3-natve +# here use nativesdk's meson-native and python3-native +DEPENDS_remove += "python3-native" + +pkg_postinst_udev-hwdb () { + # current we don't support qemuwrapper to pre build the config for rootfs + # so if you wan't to update hwdb, do 'udevadm hwdb --update' in your own script on service or copy the configs into rootfs directly. + : +} + diff --git a/meta-openeuler/recipes-core/tzdata/timezone-append.inc b/meta-openeuler/recipes-core/tzdata/timezone-append.inc new file mode 100644 index 0000000000000000000000000000000000000000..e0aa2c4a3722e9232bab84c6d058289c0b2e9103 --- /dev/null +++ b/meta-openeuler/recipes-core/tzdata/timezone-append.inc @@ -0,0 +1,20 @@ +PV = "2022a" + +DL_DIR = "${OPENEULER_SP_DIR}/tzdata" + +# files, patches that come from openeuler +SRC_URI = " \ + file://tzcode${PV}.tar.gz;name=tzcode \ + file://tzdata${PV}.tar.gz;name=tzdata \ + file://backport-Iran-will-stop-DST-in-2023.patch \ + file://bugfix-0001-add-Beijing-timezone.patch \ + file://remove-country-selection-from-tzselect-steps.patch \ + file://remove-ROC-timezone.patch \ + file://rename-Macau-to-Macao.patch \ + file://remove-El_Aaiun-timezone.patch \ + file://remove-Israel-timezone.patch \ + file://skip-check_web-testcase.patch \ + " + +SRC_URI[tzcode.sha256sum] = "f8575e7e33be9ee265df2081092526b81c80abac3f4a04399ae9d4d91cdadac7" +SRC_URI[tzdata.sha256sum] = "ef7fffd9f4f50f4f58328b35022a32a5a056b245c5cb3d6791dddb342f871664" diff --git a/meta-openeuler/recipes-core/tzdata/timezone.inc b/meta-openeuler/recipes-core/tzdata/timezone.inc deleted file mode 100644 index 44a6e7abe10212a7fbe202fa078bb8ba39388685..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/tzdata/timezone.inc +++ /dev/null @@ -1,23 +0,0 @@ -SUMMARY = "Timezone data" -DESCRIPTION = "The Time Zone Database contains code and data that represent \ -the history of local time for many representative locations around the globe." -HOMEPAGE = "http://www.iana.org/time-zones" -SECTION = "base" -LICENSE = "PD & BSD & BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=c679c9d6b02bc2757b3eaf8f53c43fba" - -SRC_URI = "file://tzdata/tzcode${PV}.tar.gz;name=tzcode \ - file://tzdata/tzdata${PV}.tar.gz;name=tzdata \ - file://tzdata/bugfix-0001-add-Beijing-timezone.patch \ - file://tzdata/remove-country-selection-from-tzselect-steps.patch \ - file://tzdata/remove-ROC-timezone.patch \ - file://tzdata/rename-Macau-to-Macao.patch \ - file://tzdata/remove-El_Aaiun-timezone.patch \ - file://tzdata/remove-Israel-timezone.patch \ - file://tzdata/skip-check_web-testcase.patch \ - " - -UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones" - -SRC_URI[tzcode.sha256sum] = "584666393a5424d13d27ec01183da17703273664742e049d4f62f62dab631775" -SRC_URI[tzdata.sha256sum] = "07ec42b737d0d3c6be9c337f8abb5f00554a0f9cc4fcf01a703d69403b6bb2b1" diff --git a/meta-openeuler/recipes-core/tzdata/tzcode-native.bbappend b/meta-openeuler/recipes-core/tzdata/tzcode-native.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..e21b04435dd6bfdbdcbc116cc85a1842eef04b9a --- /dev/null +++ b/meta-openeuler/recipes-core/tzdata/tzcode-native.bbappend @@ -0,0 +1 @@ +include timezone-append.inc diff --git a/meta-openeuler/recipes-core/tzdata/tzcode-native_2022a.bb b/meta-openeuler/recipes-core/tzdata/tzcode-native_2022a.bb deleted file mode 100644 index 8a96af199bdc4244d9be4cb1eb5664a8d1334aaf..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/tzdata/tzcode-native_2022a.bb +++ /dev/null @@ -1,16 +0,0 @@ -require timezone.inc - -SUMMARY = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect" - -S = "${WORKDIR}" - -inherit native - -EXTRA_OEMAKE += "cc='${CC}'" - -do_install () { - install -d ${D}${bindir}/ - install -m 755 zic ${D}${bindir}/ - install -m 755 zdump ${D}${bindir}/ - install -m 755 tzselect ${D}${bindir}/ -} diff --git a/meta-openeuler/recipes-core/tzdata/tzdata.bbappend b/meta-openeuler/recipes-core/tzdata/tzdata.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..e21b04435dd6bfdbdcbc116cc85a1842eef04b9a --- /dev/null +++ b/meta-openeuler/recipes-core/tzdata/tzdata.bbappend @@ -0,0 +1 @@ +include timezone-append.inc diff --git a/meta-openeuler/recipes-core/tzdata/tzdata_2022a.bb b/meta-openeuler/recipes-core/tzdata/tzdata_2022a.bb deleted file mode 100644 index ec52e9abaabe7bcde9131c5baf8226d66116f9db..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/tzdata/tzdata_2022a.bb +++ /dev/null @@ -1,212 +0,0 @@ -require timezone.inc - -DEPENDS = "tzcode-native" -#use zic on host -DEPENDS_remove += "tzcode-native" - -#inherit allarch - -RCONFLICTS_${PN} = "timezones timezone-africa timezone-america timezone-antarctica \ - timezone-arctic timezone-asia timezone-atlantic \ - timezone-australia timezone-europe timezone-indian \ - timezone-iso3166.tab timezone-pacific timezone-zone.tab" - -S = "${WORKDIR}" - -DEFAULT_TIMEZONE ?= "Universal" -INSTALL_TIMEZONE_FILE ?= "1" - -TZONES= "africa antarctica asia australasia europe northamerica southamerica \ - factory etcetera backward \ - " -# pacificnew - -do_compile () { - for zone in ${TZONES}; do \ - zic -d ${WORKDIR}${datadir}/zoneinfo -L /dev/null \ - ${S}/${zone} ; \ - zic -d ${WORKDIR}${datadir}/zoneinfo/posix -L /dev/null \ - ${S}/${zone} ; \ - zic -d ${WORKDIR}${datadir}/zoneinfo/right -L ${S}/leapseconds \ - ${S}/${zone} ; \ - done -} - -do_install () { - install -d ${D}/$exec_prefix ${D}${datadir}/zoneinfo - cp -pPR ${S}/$exec_prefix ${D}/ - # libc is removing zoneinfo files from package - cp -pP "${S}/zone.tab" ${D}${datadir}/zoneinfo - cp -pP "${S}/zone1970.tab" ${D}${datadir}/zoneinfo - cp -pP "${S}/iso3166.tab" ${D}${datadir}/zoneinfo - cp -pP "${S}/leapseconds" ${D}${datadir}/zoneinfo - cp -pP "${S}/leap-seconds.list" ${D}${datadir}/zoneinfo - - # Install default timezone - if [ -e ${D}${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ]; then - install -d ${D}${sysconfdir} - if [ "${INSTALL_TIMEZONE_FILE}" = "1" ]; then - echo ${DEFAULT_TIMEZONE} > ${D}${sysconfdir}/timezone - fi - ln -s ${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ${D}${sysconfdir}/localtime - else - bberror "DEFAULT_TIMEZONE is set to an invalid value." - exit 1 - fi - - chown -R root:root ${D} -} - -pkg_postinst_${PN} () { - etc_lt="$D${sysconfdir}/localtime" - src="$D${sysconfdir}/timezone" - - if [ -e ${src} ] ; then - tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}") - fi - - if [ ! -z "${tz}" -a ! -e "$D${datadir}/zoneinfo/${tz}" ] ; then - echo "You have an invalid TIMEZONE setting in ${src}" - echo "Your ${etc_lt} has been reset to Universal; enjoy!" - tz="Universal" - echo "Updating ${etc_lt} with $D${datadir}/zoneinfo/${tz}" - if [ -L ${etc_lt} ] ; then - rm -f "${etc_lt}" - fi - ln -s "${datadir}/zoneinfo/${tz}" "${etc_lt}" - fi -} - -# Packages primarily organized by directory with a major city -# in most time zones in the base package - -TZ_PACKAGES = " \ - tzdata-core tzdata-misc tzdata-posix tzdata-right tzdata-africa \ - tzdata-americas tzdata-antarctica tzdata-arctic tzdata-asia \ - tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific" -PACKAGES = "${TZ_PACKAGES} ${PN}" - -FILES_tzdata-africa += "${datadir}/zoneinfo/Africa/*" -RPROVIDES_tzdata-africa = "tzdata-africa" - -FILES_tzdata-americas += "${datadir}/zoneinfo/America/* \ - ${datadir}/zoneinfo/US/* \ - ${datadir}/zoneinfo/Brazil/* \ - ${datadir}/zoneinfo/Canada/* \ - ${datadir}/zoneinfo/Mexico/* \ - ${datadir}/zoneinfo/Chile/*" -RPROVIDES_tzdata-americas = "tzdata-americas" - -FILES_tzdata-antarctica += "${datadir}/zoneinfo/Antarctica/*" -RPROVIDES_tzdata-antarctica = "tzdata-antarctica" - -FILES_tzdata-arctic += "${datadir}/zoneinfo/Arctic/*" -RPROVIDES_tzdata-arctic = "tzdata-arctic" - -FILES_tzdata-asia += "${datadir}/zoneinfo/Asia/* \ - ${datadir}/zoneinfo/Indian/* \ - ${datadir}/zoneinfo/Mideast/*" -RPROVIDES_tzdata-asia = "tzdata-asia" - -FILES_tzdata-atlantic += "${datadir}/zoneinfo/Atlantic/*" -RPROVIDES_tzdata-atlantic = "tzdata-atlantic" - -FILES_tzdata-australia += "${datadir}/zoneinfo/Australia/*" -RPROVIDES_tzdata-australia = "tzdata-australia" - -FILES_tzdata-europe += "${datadir}/zoneinfo/Europe/*" -RPROVIDES_tzdata-europe = "tzdata-europe" - -FILES_tzdata-pacific += "${datadir}/zoneinfo/Pacific/*" -RPROVIDES_tzdata-pacific = "tzdata-pacific" - -FILES_tzdata-posix += "${datadir}/zoneinfo/posix/*" -RPROVIDES_tzdata-posix = "tzdata-posix" - -FILES_tzdata-right += "${datadir}/zoneinfo/right/*" -RPROVIDES_tzdata-right = "tzdata-right" - -FILES_tzdata-misc += "${datadir}/zoneinfo/Cuba \ - ${datadir}/zoneinfo/Egypt \ - ${datadir}/zoneinfo/Eire \ - ${datadir}/zoneinfo/Factory \ - ${datadir}/zoneinfo/GB-Eire \ - ${datadir}/zoneinfo/Hongkong \ - ${datadir}/zoneinfo/Iceland \ - ${datadir}/zoneinfo/Iran \ - ${datadir}/zoneinfo/Israel \ - ${datadir}/zoneinfo/Jamaica \ - ${datadir}/zoneinfo/Japan \ - ${datadir}/zoneinfo/Kwajalein \ - ${datadir}/zoneinfo/Libya \ - ${datadir}/zoneinfo/Navajo \ - ${datadir}/zoneinfo/Poland \ - ${datadir}/zoneinfo/Portugal \ - ${datadir}/zoneinfo/Singapore \ - ${datadir}/zoneinfo/Turkey" -RPROVIDES_tzdata-misc = "tzdata-misc" - -FILES_tzdata-core += " \ - ${sysconfdir}/localtime \ - ${sysconfdir}/timezone \ - ${datadir}/zoneinfo/leapseconds \ - ${datadir}/zoneinfo/leap-seconds.list \ - ${datadir}/zoneinfo/Pacific/Honolulu \ - ${datadir}/zoneinfo/America/Anchorage \ - ${datadir}/zoneinfo/America/Los_Angeles \ - ${datadir}/zoneinfo/America/Denver \ - ${datadir}/zoneinfo/America/Chicago \ - ${datadir}/zoneinfo/America/New_York \ - ${datadir}/zoneinfo/America/Caracas \ - ${datadir}/zoneinfo/America/Sao_Paulo \ - ${datadir}/zoneinfo/Europe/London \ - ${datadir}/zoneinfo/Europe/Paris \ - ${datadir}/zoneinfo/Africa/Cairo \ - ${datadir}/zoneinfo/Europe/Moscow \ - ${datadir}/zoneinfo/Asia/Dubai \ - ${datadir}/zoneinfo/Asia/Karachi \ - ${datadir}/zoneinfo/Asia/Dhaka \ - ${datadir}/zoneinfo/Asia/Bangkok \ - ${datadir}/zoneinfo/Asia/Hong_Kong \ - ${datadir}/zoneinfo/Asia/Tokyo \ - ${datadir}/zoneinfo/Australia/Darwin \ - ${datadir}/zoneinfo/Australia/Adelaide \ - ${datadir}/zoneinfo/Australia/Brisbane \ - ${datadir}/zoneinfo/Australia/Sydney \ - ${datadir}/zoneinfo/Pacific/Noumea \ - ${datadir}/zoneinfo/CET \ - ${datadir}/zoneinfo/CST6CDT \ - ${datadir}/zoneinfo/EET \ - ${datadir}/zoneinfo/EST \ - ${datadir}/zoneinfo/EST5EDT \ - ${datadir}/zoneinfo/GB \ - ${datadir}/zoneinfo/GMT \ - ${datadir}/zoneinfo/GMT+0 \ - ${datadir}/zoneinfo/GMT-0 \ - ${datadir}/zoneinfo/GMT0 \ - ${datadir}/zoneinfo/Greenwich \ - ${datadir}/zoneinfo/HST \ - ${datadir}/zoneinfo/MET \ - ${datadir}/zoneinfo/MST \ - ${datadir}/zoneinfo/MST7MDT \ - ${datadir}/zoneinfo/NZ \ - ${datadir}/zoneinfo/NZ-CHAT \ - ${datadir}/zoneinfo/PRC \ - ${datadir}/zoneinfo/PST8PDT \ - ${datadir}/zoneinfo/ROC \ - ${datadir}/zoneinfo/ROK \ - ${datadir}/zoneinfo/UCT \ - ${datadir}/zoneinfo/UTC \ - ${datadir}/zoneinfo/Universal \ - ${datadir}/zoneinfo/W-SU \ - ${datadir}/zoneinfo/WET \ - ${datadir}/zoneinfo/Zulu \ - ${datadir}/zoneinfo/zone.tab \ - ${datadir}/zoneinfo/zone1970.tab \ - ${datadir}/zoneinfo/iso3166.tab \ - ${datadir}/zoneinfo/Etc/*" - -CONFFILES_tzdata-core = "${sysconfdir}/localtime ${sysconfdir}/timezone" - -ALLOW_EMPTY_${PN} = "1" -RDEPENDS_${PN} = "${TZ_PACKAGES}" diff --git a/meta-openeuler/recipes-core/update-rc.d/update-rc.d_%.bbappend b/meta-openeuler/recipes-core/update-rc.d/update-rc.d_%.bbappend index cec0817aa49054641c6a9a4749e32bf38c0cae8f..2cf9aaeb2ff3633e50523a17793354f1cbd9390d 100644 --- a/meta-openeuler/recipes-core/update-rc.d/update-rc.d_%.bbappend +++ b/meta-openeuler/recipes-core/update-rc.d/update-rc.d_%.bbappend @@ -1,2 +1,6 @@ +# main bbfile: yocto-poky/meta/recipes-core/update-rc.d/update-rc.d_0.8.bb + +# source from from yocto-embedded-tools SRC_URI = "file://yocto-embedded-tools/build_tools/update-rc.d" -S = "${WORKDIR}/yocto-embedded-tools/build_tools" + +S = "${WORKDIR}/yocto-embedded-tools/build_tools/update-rc.d" diff --git a/meta-openeuler/recipes-core/util-linux/util-linux-libuuid_%.bbappend b/meta-openeuler/recipes-core/util-linux/util-linux-libuuid_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..7a029337dd3616003137eb57f5676cab45ee289e --- /dev/null +++ b/meta-openeuler/recipes-core/util-linux/util-linux-libuuid_%.bbappend @@ -0,0 +1,4 @@ +require util-linux_src.inc + +# code is the same with util-linux +OPENEULER_REPO_NAME = "util-linux" diff --git a/meta-openeuler/recipes-core/util-linux/util-linux.inc b/meta-openeuler/recipes-core/util-linux/util-linux.inc deleted file mode 100644 index 09fe0d8a61d88cc3cb96d8b16d47afe0e80f5a36..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/util-linux/util-linux.inc +++ /dev/null @@ -1,44 +0,0 @@ -SUMMARY = "A suite of basic system administration utilities" -HOMEPAGE = "https://en.wikipedia.org/wiki/Util-linux" -DESCRIPTION = "Util-linux includes a suite of basic system administration utilities \ -commonly found on most Linux systems. Some of the more important utilities include \ -disk partitioning, kernel message management, filesystem creation, and system login." - -SECTION = "base" - -LICENSE = "GPLv2+ & LGPLv2.1+ & BSD-3-Clause & BSD-4-Clause" -LICENSE_${PN}-libblkid = "LGPLv2.1+" -LICENSE_${PN}-libfdisk = "LGPLv2.1+" -LICENSE_${PN}-libmount = "LGPLv2.1+" -LICENSE_${PN}-libsmartcols = "LGPLv2.1+" - -LIC_FILES_CHKSUM = "file://README.licensing;md5=0fd5c050c6187d2bf0a4492b7f4e33da \ - file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://Documentation/licenses/COPYING.GPL-2.0-or-later;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://Documentation/licenses/COPYING.LGPL-2.1-or-later;md5=4fbd65380cdd255951079008b364516c \ - file://Documentation/licenses/COPYING.BSD-3-Clause;md5=58dcd8452651fc8b07d1f65ce07ca8af \ - file://Documentation/licenses/COPYING.BSD-4-Clause-UC;md5=263860f8968d8bafa5392cab74285262 \ - file://libuuid/COPYING;md5=6d2cafc999feb2c2de84d4d24b23290c \ - file://libmount/COPYING;md5=7c7e39fb7d70ffe5d693a643e29987c2 \ - file://libblkid/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \ - file://libfdisk/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \ - file://libsmartcols/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \ -" - -FILESEXTRAPATHS_prepend := "${THISDIR}/util-linux:" -MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}" -SRC_URI = "file://util-linux/util-linux-${PV}.tar.xz \ - file://util-linux/2.36-login-lastlog-create.patch \ - file://util-linux/backport-CVE-2021-3995.patch \ - file://util-linux/backport-CVE-2021-3996.patch \ - file://util-linux/realloc-buffer-when-header-size-changed.patch \ - file://util-linux/fix-size-use-for-stdin.patch \ - file://util-linux/segmentation-fault-on-invalid-unicode-input-passed-to-s-option.patch \ - file://util-linux/backport-fix-by-ignoring-EINVAL-on-remount-of-proc.patch \ - file://util-linux/Add-check-to-resolve-uname26-version-test-failed.patch \ - file://util-linux/SKIPPED-no-root-permissions-test.patch \ - file://runuser.pamd \ - file://runuser-l.pamd \ - " - -SRC_URI[sha256sum] = "6a0764c1aae7fb607ef8a6dd2c0f6c47d5e5fd27aa08820abaad9ec14e28e9d9 " diff --git a/meta-openeuler/recipes-core/util-linux/util-linux/run-ptest b/meta-openeuler/recipes-core/util-linux/util-linux/run-ptest deleted file mode 100644 index e135ee583bd31de92d4ff413fbf7293e674298b3..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/util-linux/util-linux/run-ptest +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh - - -# When udevd (from eudev) is running most eject/mount tests will fail because -# of automount. We need to stop udevd before executing util-linux's tests. -# The systemd-udevd daemon doesn't change the outcome of util-linux's tests. -UDEV_PID="`pidof "@base_sbindir@/udevd"`" -if [ "x$UDEV_PID" != "x" ]; then - /etc/init.d/udev stop -fi - -current_path=$(readlink -f $0) -export bindir=$(dirname $current_path) -export PATH=$bindir/bin:$PATH - -cd tests || exit 1 - -comps=$(find ts/ -type f -perm -111 -regex ".*/[^\.~]*" | sort) - - -echo -echo "-------------------- util-linux regression tests --------------------" -echo -echo " For development purpose only. " -echo " Don't execute on production system! " -echo - -res=0 -count=0 -for ts in $comps; -do - $ts | sed -u '{ - s/^\(.*\):\(.*\) \.\.\. OK$/PASS: \1:\2/ - s/^\(.*\):\(.*\) \.\.\. FAILED \(.*\)$/FAIL: \1:\2 \3/ - s/^\(.*\):\(.*\) \.\.\. SKIPPED \(.*\)$/SKIP: \1:\2 \3/ - }' -done - - -if [ "x$UDEV_PID" != "x" ]; then - /etc/init.d/udev start -fi - diff --git a/meta-openeuler/recipes-core/util-linux/util-linux/runuser-l.pamd b/meta-openeuler/recipes-core/util-linux/util-linux/runuser-l.pamd deleted file mode 100644 index 4b368ccf5de8f74b42e8177911fed5f03135c8d1..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/util-linux/util-linux/runuser-l.pamd +++ /dev/null @@ -1,3 +0,0 @@ -auth include runuser -session optional pam_keyinit.so force revoke -session include runuser diff --git a/meta-openeuler/recipes-core/util-linux/util-linux/runuser.pamd b/meta-openeuler/recipes-core/util-linux/util-linux/runuser.pamd deleted file mode 100644 index 48d133b9e7e46cea183afe5591f653773176c80c..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/util-linux/util-linux/runuser.pamd +++ /dev/null @@ -1,4 +0,0 @@ -auth sufficient pam_rootok.so -session optional pam_keyinit.so revoke -session required pam_limits.so -session required pam_unix.so diff --git a/meta-openeuler/recipes-core/util-linux/util-linux_%.bbappend b/meta-openeuler/recipes-core/util-linux/util-linux_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..3667ab9a2b3a35159407b48355f088f3b2f064b5 --- /dev/null +++ b/meta-openeuler/recipes-core/util-linux/util-linux_%.bbappend @@ -0,0 +1 @@ +require util-linux_src.inc diff --git a/meta-openeuler/recipes-core/util-linux/util-linux_2.37.2.bb b/meta-openeuler/recipes-core/util-linux/util-linux_2.37.2.bb deleted file mode 100644 index b2acdf008b36ac7d9c2cdb89e18ceda62b60699f..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/util-linux/util-linux_2.37.2.bb +++ /dev/null @@ -1,323 +0,0 @@ -require util-linux.inc - -#gtk-doc is not enabled as it requires xmlto which requires util-linux -inherit autotools gettext pkgconfig systemd -DEPENDS = "libcap-ng ncurses zlib" - -PACKAGES =+ "${PN}-swaponoff" -PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', '${PN}-pylibmount', '', d)}" - -python util_linux_binpackages () { - def pkg_hook(f, pkg, file_regex, output_pattern, modulename): - pn = d.getVar('PN') - d.appendVar('RRECOMMENDS_%s' % pn, ' %s' % pkg) - - if d.getVar('ALTERNATIVE_' + pkg): - return - if d.getVarFlag('ALTERNATIVE_LINK_NAME', modulename): - d.setVar('ALTERNATIVE_' + pkg, modulename) - - bindirs = sorted(list(set(d.expand("${base_sbindir} ${base_bindir} ${sbindir} ${bindir}").split()))) - for dir in bindirs: - do_split_packages(d, root=dir, - file_regex=r'(.*)', output_pattern='${PN}-%s', - description='${PN} %s', - hook=pkg_hook, extra_depends='') - - # There are some symlinks for some binaries which we have ignored - # above. Add them to the package owning the binary they are - # pointing to - extras = {} - dvar = d.getVar('PKGD') - for root in bindirs: - for walkroot, dirs, files in os.walk(dvar + root): - for f in files: - file = os.path.join(walkroot, f) - if not os.path.islink(file): - continue - - pkg = os.path.basename(os.readlink(file)) - extras[pkg] = extras.get(pkg, '') + ' ' + file.replace(dvar, '', 1) - - pn = d.getVar('PN') - for pkg, links in extras.items(): - of = d.getVar('FILES_' + pn + '-' + pkg) - links = of + links - d.setVar('FILES_' + pn + '-' + pkg, links) -} - -# we must execute before update-alternatives PACKAGE_PREPROCESS_FUNCS -PACKAGE_PREPROCESS_FUNCS =+ "util_linux_binpackages " - -python util_linux_libpackages() { - do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(.*)\.so\..*$', - output_pattern='${PN}-lib%s', - description='${PN} lib%s', - extra_depends='', prepend=True, allow_links=True) -} - -PACKAGESPLITFUNCS =+ "util_linux_libpackages" - -PACKAGES_DYNAMIC = "^${PN}-.*" - -CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms" -UTIL_LINUX_LIBDIR = "${libdir}" -UTIL_LINUX_LIBDIR_class-target = "${base_libdir}" -EXTRA_OECONF = "\ - --enable-libuuid --enable-libblkid \ - \ - --enable-fsck --enable-kill --enable-last --enable-mesg \ - --enable-mount --enable-partx --enable-raw --enable-rfkill \ - --enable-unshare --enable-write \ - \ - --disable-bfs --disable-chfn-chsh --disable-login \ - --disable-makeinstall-chown --disable-minix --disable-newgrp \ - --disable-use-tty-group --disable-vipw \ - \ - --without-udev \ - \ - usrsbin_execdir='${sbindir}' \ - --libdir='${UTIL_LINUX_LIBDIR}' \ -" - -EXTRA_OECONF_append_class-target = " --enable-setpriv" -EXTRA_OECONF_append_class-native = " --without-cap-ng --disable-setpriv" -EXTRA_OECONF_append_class-nativesdk = " --without-cap-ng --disable-setpriv" -EXTRA_OECONF_append = " --disable-hwclock-gplv3" - -# enable pcre2 for native/nativesdk to match host distros -# this helps to keep same expectations when using the SDK or -# build host versions during development -# -PACKAGECONFIG ?= "pcre2" -PACKAGECONFIG_class-target ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" -# inherit manpages requires this to be present, however util-linux does not have -# configuration options, and installs manpages always -PACKAGECONFIG[manpages] = "" -PACKAGECONFIG[pam] = "--enable-su --enable-runuser,--disable-su --disable-runuser, libpam," -# Respect the systemd feature for uuidd -PACKAGECONFIG[systemd] = "--with-systemd --with-systemdsystemunitdir=${systemd_system_unitdir}, --without-systemd --without-systemdsystemunitdir,systemd" -# Build python bindings for libmount -PACKAGECONFIG[pylibmount] = "--with-python=3 --enable-pylibmount,--without-python --disable-pylibmount,python3" -# Readline support -PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" -# PCRE support in hardlink -PACKAGECONFIG[pcre2] = ",,libpcre2" -PACKAGECONFIG[cryptsetup] = "--with-cryptsetup,--without-cryptsetup,cryptsetup" - -EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} CPU= CPUOPT= 'OPT=${CFLAGS}'" - -ALLOW_EMPTY_${PN} = "1" -FILES_${PN} = "" -FILES_${PN}-doc += "${datadir}/getopt/getopt-*.*" -FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.la" -FILES_${PN}-mount = "${sysconfdir}/default/mountall" -FILES_${PN}-runuser = "${sysconfdir}/pam.d/runuser*" -FILES_${PN}-su = "${sysconfdir}/pam.d/su-l" -CONFFILES_${PN}-su = "${sysconfdir}/pam.d/su-l" -FILES_${PN}-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \ - ${PYTHON_SITEPACKAGES_DIR}/libmount/__init__.* \ - ${PYTHON_SITEPACKAGES_DIR}/libmount/__pycache__/*" -PACKAGES += "${PN}-bash-completion ${PN}-procps" -FILES_${PN}-bash-completion += "${datadir}/bash-completion/*" -FILES_${PN}-procps = "${base_bindir}/kill" -# Util-linux' blkid replaces the e2fsprogs one -RCONFLICTS_${PN}-blkid = "${MLPREFIX}e2fsprogs-blkid" -RREPLACES_${PN}-blkid = "${MLPREFIX}e2fsprogs-blkid" - -RRECOMMENDS_${PN}_class-native = "" -RRECOMMENDS_${PN}_class-nativesdk = "" -RDEPENDS_${PN}_class-native = "" -RDEPENDS_${PN}_class-nativesdk = "" - -RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev" - -RDEPENDS_${PN}-bash-completion += "${PN}-lsblk" -RDEPENDS_${PN}-ptest += "bash bc btrfs-tools coreutils e2fsprogs grep iproute2 kmod mdadm procps sed socat which xz" -RRECOMMENDS_${PN}-ptest += "kernel-module-scsi-debug" -RDEPENDS_${PN}-swaponoff = "${PN}-swapon ${PN}-swapoff" -ALLOW_EMPTY_${PN}-swaponoff = "1" - -SYSTEMD_SERVICE_${PN}-uuidd = "uuidd.socket uuidd.service" -SYSTEMD_AUTO_ENABLE_${PN}-uuidd = "disable" -SYSTEMD_SERVICE_${PN}-fstrim = "fstrim.timer fstrim.service" -SYSTEMD_AUTO_ENABLE_${PN}-fstrim = "disable" - -do_install () { - # with ccache the timestamps on compiled files may - # end up earlier than on their inputs, this allows - # for the resultant compilation in the install step. - oe_runmake 'CC=${CC}' 'LD=${LD}' \ - 'LDFLAGS=${LDFLAGS}' 'DESTDIR=${D}' install - - mkdir -p ${D}${base_bindir} - - sbinprogs="agetty ctrlaltdel cfdisk vipw vigr" - sbinprogs_a="pivot_root hwclock mkswap losetup swapon swapoff fdisk fsck blkid blockdev fstrim sulogin switch_root nologin" - binprogs_a="dmesg getopt kill more umount mount login su mountpoint" - - if [ "${base_sbindir}" != "${sbindir}" ]; then - mkdir -p ${D}${base_sbindir} - for p in $sbinprogs $sbinprogs_a; do - if [ -f "${D}${sbindir}/$p" ]; then - mv "${D}${sbindir}/$p" "${D}${base_sbindir}/$p" - fi - done - fi - - if [ "${base_bindir}" != "${bindir}" ]; then - mkdir -p ${D}${base_bindir} - for p in $binprogs_a; do - if [ -f "${D}${bindir}/$p" ]; then - mv "${D}${bindir}/$p" "${D}${base_bindir}/$p" - fi - done - fi - - install -d ${D}${sysconfdir}/default/ - echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall - - rm -f ${D}${bindir}/chkdupexe -} - -do_install_append_class-target () { - if [ "${@bb.utils.filter('PACKAGECONFIG', 'pam', d)}" ]; then - install -d ${D}${sysconfdir}/pam.d - install -m 0644 ${WORKDIR}/runuser.pamd ${D}${sysconfdir}/pam.d/runuser - install -m 0644 ${WORKDIR}/runuser-l.pamd ${D}${sysconfdir}/pam.d/runuser-l - # Required for "su -" aka "su --login" because - # otherwise it uses "other", which has "auth pam_deny.so" - # and thus prevents the operation. - ln -s su ${D}${sysconfdir}/pam.d/su-l - fi -} -# nologin causes a conflict with shadow-native -# kill causes a conflict with coreutils-native (if ${bindir}==${base_bindir}) -do_install_append_class-native () { - rm -f ${D}${base_sbindir}/nologin - rm -f ${D}${base_bindir}/kill -} - -ALTERNATIVE_PRIORITY = "80" - -ALTERNATIVE_LINK_NAME[blkid] = "${base_sbindir}/blkid" -ALTERNATIVE_LINK_NAME[blockdev] = "${base_sbindir}/blockdev" -ALTERNATIVE_LINK_NAME[cal] = "${bindir}/cal" -ALTERNATIVE_LINK_NAME[chrt] = "${bindir}/chrt" -ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg" -ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject" -ALTERNATIVE_LINK_NAME[fallocate] = "${bindir}/fallocate" -ALTERNATIVE_LINK_NAME[fdisk] = "${base_sbindir}/fdisk" -ALTERNATIVE_LINK_NAME[flock] = "${bindir}/flock" -ALTERNATIVE_LINK_NAME[fsck] = "${base_sbindir}/fsck" -ALTERNATIVE_LINK_NAME[fsfreeze] = "${sbindir}/fsfreeze" -ALTERNATIVE_LINK_NAME[fstrim] = "${base_sbindir}/fstrim" -ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt" -ALTERNATIVE_${PN}-agetty = "getty" -ALTERNATIVE_LINK_NAME[getty] = "${base_sbindir}/getty" -ALTERNATIVE_TARGET[getty] = "${base_sbindir}/agetty" -ALTERNATIVE_LINK_NAME[hexdump] = "${bindir}/hexdump" -ALTERNATIVE_LINK_NAME[hwclock] = "${base_sbindir}/hwclock" -ALTERNATIVE_LINK_NAME[ionice] = "${bindir}/ionice" -ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill" -ALTERNATIVE_${PN}-last = "last lastb" -ALTERNATIVE_LINK_NAME[last] = "${bindir}/last" -ALTERNATIVE_LINK_NAME[lastb] = "${bindir}/lastb" -ALTERNATIVE_LINK_NAME[logger] = "${bindir}/logger" -ALTERNATIVE_LINK_NAME[losetup] = "${base_sbindir}/losetup" -ALTERNATIVE_LINK_NAME[mesg] = "${bindir}/mesg" -ALTERNATIVE_LINK_NAME[mkswap] = "${base_sbindir}/mkswap" -ALTERNATIVE_LINK_NAME[mcookie] = "${bindir}/mcookie" -ALTERNATIVE_LINK_NAME[more] = "${base_bindir}/more" -ALTERNATIVE_LINK_NAME[mount] = "${base_bindir}/mount" -ALTERNATIVE_LINK_NAME[mountpoint] = "${base_bindir}/mountpoint" -ALTERNATIVE_LINK_NAME[nologin] = "${base_sbindir}/nologin" -ALTERNATIVE_LINK_NAME[nsenter] = "${bindir}/nsenter" -ALTERNATIVE_LINK_NAME[pivot_root] = "${base_sbindir}/pivot_root" -ALTERNATIVE_LINK_NAME[prlimit] = "${bindir}/prlimit" -ALTERNATIVE_LINK_NAME[readprofile] = "${sbindir}/readprofile" -ALTERNATIVE_LINK_NAME[renice] = "${bindir}/renice" -ALTERNATIVE_LINK_NAME[rev] = "${bindir}/rev" -ALTERNATIVE_LINK_NAME[rfkill] = "${sbindir}/rfkill" -ALTERNATIVE_LINK_NAME[rtcwake] = "${sbindir}/rtcwake" -ALTERNATIVE_LINK_NAME[setpriv] = "${bindir}/setpriv" -ALTERNATIVE_LINK_NAME[setsid] = "${bindir}/setsid" -ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su" -ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin" -ALTERNATIVE_LINK_NAME[swapoff] = "${base_sbindir}/swapoff" -ALTERNATIVE_LINK_NAME[swapon] = "${base_sbindir}/swapon" -ALTERNATIVE_LINK_NAME[switch_root] = "${base_sbindir}/switch_root" -ALTERNATIVE_LINK_NAME[taskset] = "${bindir}/taskset" -ALTERNATIVE_LINK_NAME[umount] = "${base_bindir}/umount" -ALTERNATIVE_LINK_NAME[unshare] = "${bindir}/unshare" -ALTERNATIVE_LINK_NAME[utmpdump] = "${bindir}/utmpdump" -ALTERNATIVE_LINK_NAME[uuidgen] = "${bindir}/uuidgen" -ALTERNATIVE_LINK_NAME[wall] = "${bindir}/wall" - -ALTERNATIVE_${PN}-doc = "\ -blkid.8 eject.1 findfs.8 fsck.8 kill.1 last.1 lastb.1 libblkid.3 logger.1 mesg.1 \ -mountpoint.1 nologin.8 rfkill.8 sulogin.8 utmpdump.1 uuid.3 wall.1\ -" -ALTERNATIVE_${PN}-doc += "${@bb.utils.contains('PACKAGECONFIG', 'pam', 'su.1', '', d)}" - -ALTERNATIVE_LINK_NAME[blkid.8] = "${mandir}/man8/blkid.8" -ALTERNATIVE_LINK_NAME[eject.1] = "${mandir}/man1/eject.1" -ALTERNATIVE_LINK_NAME[findfs.8] = "${mandir}/man8/findfs.8" -ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8" -ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1" -ALTERNATIVE_LINK_NAME[last.1] = "${mandir}/man1/last.1" -ALTERNATIVE_LINK_NAME[lastb.1] = "${mandir}/man1/lastb.1" -ALTERNATIVE_LINK_NAME[libblkid.3] = "${mandir}/man3/libblkid.3" -ALTERNATIVE_LINK_NAME[logger.1] = "${mandir}/man1/logger.1" -ALTERNATIVE_LINK_NAME[mesg.1] = "${mandir}/man1/mesg.1" -ALTERNATIVE_LINK_NAME[mountpoint.1] = "${mandir}/man1/mountpoint.1" -ALTERNATIVE_LINK_NAME[nologin.8] = "${mandir}/man8/nologin.8" -ALTERNATIVE_LINK_NAME[rfkill.8] = "${mandir}/man8/rfkill.8" -ALTERNATIVE_LINK_NAME[setpriv.1] = "${mandir}/man1/setpriv.1" -ALTERNATIVE_LINK_NAME[su.1] = "${mandir}/man1/su.1" -ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8" -ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1" -ALTERNATIVE_LINK_NAME[uuid.3] = "${mandir}/man3/uuid.3" -ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1" - - -BBCLASSEXTEND = "native nativesdk" - -PTEST_BINDIR = "1" -do_compile_ptest() { - oe_runmake buildtest-TESTS -} - -do_install_ptest() { - mkdir -p ${D}${PTEST_PATH}/tests/ts - find . -name 'test*' -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \; - find ./.libs -name 'sample*' -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \; - find ./.libs -name 'test*' -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \; - - cp ${S}/tests/*.sh ${D}${PTEST_PATH}/tests/ - cp -pR ${S}/tests/expected ${D}${PTEST_PATH}/tests/expected - cp -pR ${S}/tests/ts ${D}${PTEST_PATH}/tests/ - cp ${WORKDIR}/build/config.h ${D}${PTEST_PATH} - - # The original paths of executables to be tested point to a local folder containing - # the executables. We want to test the installed executables, not the local copies. - # So strip the paths, the executables will be located via "which" - sed -i \ - -e '/^TS_CMD/ s|$top_builddir/||g' \ - -e '/^TS_HELPER/ s|$top_builddir|${PTEST_PATH}|g' \ - ${D}${PTEST_PATH}/tests/commands.sh - - # Change 'if [ ! -x "$1" ]' to 'if [ ! -x "`which $1 2>/dev/null`"]' - sed -i -e \ - '/^\tif[[:space:]]\[[[:space:]]![[:space:]]-x[[:space:]]"$1"/s|$1|`which $1 2>/dev/null`|g' \ - ${D}${PTEST_PATH}/tests/functions.sh - - # Running "kill" without the the complete path would use the shell's built-in kill - sed -i -e \ - '/^TS_CMD_KILL/ s|kill|${PTEST_PATH}/bin/kill|g' \ - ${D}${PTEST_PATH}/tests/commands.sh - - - sed -i 's|@base_sbindir@|${base_sbindir}|g' ${D}${PTEST_PATH}/run-ptest - -} diff --git a/meta-openeuler/recipes-core/util-linux/util-linux_src.inc b/meta-openeuler/recipes-core/util-linux/util-linux_src.inc new file mode 100644 index 0000000000000000000000000000000000000000..25f78325cc0b204a13b664f51e49db2dcf201daa --- /dev/null +++ b/meta-openeuler/recipes-core/util-linux/util-linux_src.inc @@ -0,0 +1,22 @@ +PV = "2.37.2" + +# files, patches can't be applied in openeuler or conflict with openeuler +SRC_URI_remove += " \ + file://avoid_parallel_tests.patch \ + file://Automake-use-EXTRA_LTLIBRARIES-instead-of-noinst_LTL.patch \ +" + +# files, patches that come from openeuler +SRC_URI += " \ + file://util-linux/2.36-login-lastlog-create.patch \ + file://util-linux/backport-CVE-2021-3995.patch \ + file://util-linux/backport-CVE-2021-3996.patch \ + file://util-linux/realloc-buffer-when-header-size-changed.patch \ + file://util-linux/fix-size-use-for-stdin.patch \ + file://util-linux/segmentation-fault-on-invalid-unicode-input-passed-to-s-option.patch \ + file://util-linux/backport-fix-by-ignoring-EINVAL-on-remount-of-proc.patch \ + file://util-linux/Add-check-to-resolve-uname26-version-test-failed.patch \ + file://util-linux/SKIPPED-no-root-permissions-test.patch \ +" + +SRC_URI[sha256sum] = "6a0764c1aae7fb607ef8a6dd2c0f6c47d5e5fd27aa08820abaad9ec14e28e9d9" diff --git a/meta-openeuler/recipes-core/xz/xz_5.2.5.bb b/meta-openeuler/recipes-core/xz/xz_5.2.5.bb deleted file mode 100644 index bdcc1020e1a3c816c488cb6ebd607ab002ef37e8..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/xz/xz_5.2.5.bb +++ /dev/null @@ -1,45 +0,0 @@ -SUMMARY = "Utilities for managing LZMA compressed files" -HOMEPAGE = "https://tukaani.org/xz/" -DESCRIPTION = "XZ Utils is free general-purpose data compression software with a high compression ratio. XZ Utils were written for POSIX-like systems, but also work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils." -SECTION = "base" - -# The source includes bits of PD, GPLv2, GPLv3, LGPLv2.1+, but the only file -# which is GPLv3 is an m4 macro which isn't shipped in any of our packages, -# and the LGPL bits are under lib/, which appears to be used for libgnu, which -# appears to be used for DOS builds. So we're left with GPLv2+ and PD. -LICENSE = "GPLv2+ & GPL-3.0-with-autoconf-exception & LGPLv2.1+ & PD" -LICENSE_${PN} = "GPLv2+" -LICENSE_${PN}-dev = "GPLv2+" -LICENSE_${PN}-staticdev = "GPLv2+" -LICENSE_${PN}-doc = "GPLv2+" -LICENSE_${PN}-dbg = "GPLv2+" -LICENSE_${PN}-locale = "GPLv2+" -LICENSE_liblzma = "PD" - -LIC_FILES_CHKSUM = "file://COPYING;md5=97d554a32881fee0aa283d96e47cb24a \ - file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ - file://COPYING.LGPLv2.1;md5=4fbd65380cdd255951079008b364516c \ - file://lib/getopt.c;endline=23;md5=2069b0ee710572c03bb3114e4532cd84 \ - " - -SRC_URI = "file://xz/xz-${PV}.tar.xz" -SRC_URI[md5sum] = "0d270c997aff29708c74d53f599ef717" -SRC_URI[sha256sum] = "f6f4910fd033078738bd82bfba4f49219d03b17eb0794eb91efbae419f4aba10" -UPSTREAM_CHECK_REGEX = "xz-(?P\d+(\.\d+)+)\.tar" - -CACHED_CONFIGUREVARS += "gl_cv_posix_shell=/bin/sh" - -inherit autotools gettext - -PACKAGES =+ "liblzma" - -FILES_liblzma = "${libdir}/liblzma*${SOLIBS}" - -#inherit update-alternatives - -ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE_${PN} = "xz xzcat unxz \ - lzma lzcat unlzma" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-core/yajl/yajl_2.1.0.bb b/meta-openeuler/recipes-core/yajl/yajl_2.1.0.bb index 555830a5fbdc7402d74ddd2ca300ae457c9a9310..025514af373aeed90bce783a1fd2532f6ca31698 100644 --- a/meta-openeuler/recipes-core/yajl/yajl_2.1.0.bb +++ b/meta-openeuler/recipes-core/yajl/yajl_2.1.0.bb @@ -3,14 +3,15 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" -SRC_URI = "file://yajl/${PV}.tar.gz \ - file://yajl/0001-yajl-2.1.0-pkgconfig-location.patch \ - file://yajl/0002-yajl-2.1.0-pkgconfig-includedir.patch \ - file://yajl/0003-yajl-2.1.0-test-location.patch \ - file://yajl/0004-yajl-2.1.0-dynlink-binaries.patch \ - file://yajl/0005-yajl-2.1.0-fix-memory-leak.patch \ - file://yajl/0006-fix-memory-leak-of-ctx-root.patch \ - file://yajl/0007-add-cmake-option-for-test-and-binary.patch \ +SRC_URI = " \ + file://${PV}.tar.gz \ + file://0001-yajl-2.1.0-pkgconfig-location.patch \ + file://0002-yajl-2.1.0-pkgconfig-includedir.patch \ + file://0003-yajl-2.1.0-test-location.patch \ + file://0004-yajl-2.1.0-dynlink-binaries.patch \ + file://0005-yajl-2.1.0-fix-memory-leak.patch \ + file://0006-fix-memory-leak-of-ctx-root.patch \ + file://0007-add-cmake-option-for-test-and-binary.patch \ " S = "${WORKDIR}/${BPN}-${PV}" diff --git a/meta-openeuler/recipes-core/zlib/site_config/headers b/meta-openeuler/recipes-core/zlib/site_config/headers deleted file mode 100644 index 50268918aa9dc01897a12421c3ca3b5d3bc24fe9..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/zlib/site_config/headers +++ /dev/null @@ -1 +0,0 @@ -zlib.h diff --git a/meta-openeuler/recipes-core/zlib/zlib/ldflags-tests.patch b/meta-openeuler/recipes-core/zlib/zlib/ldflags-tests.patch deleted file mode 100644 index 286390665f0229c95653ae9aad7dd24f5fc7e0c1..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/zlib/zlib/ldflags-tests.patch +++ /dev/null @@ -1,45 +0,0 @@ -Obey LDFLAGS for tests - -Upstream-Status: Submitted [https://github.com/madler/zlib/pull/409] -Signed-off-by: Ross Burton - ---- zlib-1.2.8.orig/Makefile.in -+++ zlib-1.2.8/Makefile.in -@@ -26,7 +26,7 @@ CFLAGS=-O - - SFLAGS=-O - LDFLAGS= --TEST_LDFLAGS=-L. libz.a -+TEST_LDFLAGS=-L. $(LDFLAGS) - LDSHARED=$(CC) - CPP=$(CC) -E - -@@ -176,22 +176,22 @@ placebo $(SHAREDLIBV): $(PIC_OBJS) libz. - -@rmdir objs - - example$(EXE): example.o $(STATICLIB) -- $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS) -+ $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS) $(STATICLIB) - - minigzip$(EXE): minigzip.o $(STATICLIB) -- $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS) -+ $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS) $(STATICLIB) - - examplesh$(EXE): example.o $(SHAREDLIBV) -- $(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV) -+ $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS) $(SHAREDLIBV) - - minigzipsh$(EXE): minigzip.o $(SHAREDLIBV) -- $(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV) -+ $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS) $(SHAREDLIBV) - - example64$(EXE): example64.o $(STATICLIB) -- $(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS) -+ $(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS) $(STATICLIB) - - minigzip64$(EXE): minigzip64.o $(STATICLIB) -- $(CC) $(CFLAGS) -o $@ minigzip64.o $(TEST_LDFLAGS) -+ $(CC) $(CFLAGS) -o $@ minigzip64.o $(TEST_LDFLAGS) $(STATICLIB) - - install-libs: $(LIBS) - -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi diff --git a/meta-openeuler/recipes-core/zlib/zlib/run-ptest b/meta-openeuler/recipes-core/zlib/zlib/run-ptest deleted file mode 100644 index 065863ef754f0af6f8494135e487c2ed024488b7..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/zlib/zlib/run-ptest +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -if ./examplesh ; then - echo "PASS: zlib" -else - echo "FAIL: zlib" -fi diff --git a/meta-openeuler/recipes-core/zlib/zlib_%.bbappend b/meta-openeuler/recipes-core/zlib/zlib_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..ae9dae52cf43292075372a1106aad2dd0f726b0a --- /dev/null +++ b/meta-openeuler/recipes-core/zlib/zlib_%.bbappend @@ -0,0 +1,27 @@ +#main bbfile: yocto-poky/meta/recipes-core/zlib/zlib_1.2.11.bb + +#version in openEuler +PV = "1.2.11" + +# files, patches can't be applied in openeuler or conflict with openeuler +SRC_URI_remove = " \ + " +# files, patches that come from openeuler +SRC_URI += " \ + file://zlib-1.2.5-minizip-fixuncrypt.patch \ + file://fix-undefined-buffer-detected-by-oss-fuzz.patch \ + file://backport-0001-CVE-2018-25032.patch \ + file://backport-0002-CVE-2018-25032.patch \ + " + +# files, patches that come from openeuler for aarch64, there are compile err in 0004-zlib-Optimize-CRC32.patch, not apply +SRC_URI_append_aarch64 += " \ + file://0001-Neon-Optimized-hash-chain-rebase.patch \ + file://0002-Porting-optimized-longest_match.patch \ + file://0003-arm64-specific-build-patch.patch \ + file://zlib-1.2.11-SIMD.patch \ + " + +SRC_URI[tarball.md5sum] = "85adef240c5f370b308da8c938951a68" +SRC_URI[tarball.sha256sum] = "4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066" + diff --git a/meta-openeuler/recipes-core/zlib/zlib_1.2.11.bb b/meta-openeuler/recipes-core/zlib/zlib_1.2.11.bb deleted file mode 100644 index 11e045e70cb3857901417f5f2a498d5f8d2c2153..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-core/zlib/zlib_1.2.11.bb +++ /dev/null @@ -1,51 +0,0 @@ -SUMMARY = "Zlib Compression Library" -DESCRIPTION = "Zlib is a general-purpose, patent-free, lossless data compression \ -library which is used by many different programs." -HOMEPAGE = "http://zlib.net/" -SECTION = "libs" -LICENSE = "Zlib" -LIC_FILES_CHKSUM = "file://zlib.h;beginline=6;endline=23;md5=5377232268e952e9ef63bc555f7aa6c0" - -S = "${WORKDIR}/${BPN}-${PV}" -SRC_URI = "file://${BPN}/${BPN}-${PV}.tar.xz \ - " -UPSTREAM_CHECK_URI = "http://zlib.net/" - -SRC_URI[md5sum] = "85adef240c5f370b308da8c938951a68" -SRC_URI[sha256sum] = "4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066" - -CFLAGS += "-D_REENTRANT" - -RDEPENDS_${PN}-ptest += "make" - -inherit ptest - -do_configure() { - LDCONFIG=true ./configure --prefix=${prefix} --shared --libdir=${libdir} --uname=GNU -} - -do_compile() { - oe_runmake shared -} - -do_install() { - oe_runmake DESTDIR=${D} install -} - -do_install_ptest() { - install ${B}/examplesh ${D}${PTEST_PATH} -} - -# Move zlib shared libraries for target builds to $base_libdir so the library -# can be used in early boot before $prefix is mounted. -do_install_append_class-target() { - if [ ${base_libdir} != ${libdir} ] - then - mkdir -p ${D}/${base_libdir} - mv ${D}/${libdir}/libz.so.* ${D}/${base_libdir} - libname=`readlink ${D}/${libdir}/libz.so` - ln -sf ${@oe.path.relative("${libdir}", "${base_libdir}")}/$libname ${D}${libdir}/libz.so - fi -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-devtools/autoconf-archive/autoconf-archive_%.bbappend b/meta-openeuler/recipes-devtools/autoconf-archive/autoconf-archive_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..27a5de0f9dbf7f8907da78c88a37cdcd28b5810c --- /dev/null +++ b/meta-openeuler/recipes-devtools/autoconf-archive/autoconf-archive_%.bbappend @@ -0,0 +1,4 @@ +PV = "2022.02.11" + +SRC_URI[md5sum] = "d140e95be64f0aa7369f82e3caae4730" +SRC_URI[sha256sum] = "78a61b611e2eeb55a89e0398e0ce387bcaf57fe2dd53c6fe427130f777ad1e8c" diff --git a/meta-openeuler/recipes-devtools/binutils/binutils-2.37.inc b/meta-openeuler/recipes-devtools/binutils/binutils-2.37.inc deleted file mode 100644 index bc67ef9a0169a513a431dd50e13f0c49299d8a01..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-devtools/binutils/binutils-2.37.inc +++ /dev/null @@ -1,37 +0,0 @@ -LIC_FILES_CHKSUM="\ - file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\ - file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\ - file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\ - file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\ - file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\ - file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\ - file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\ - file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\ - file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\ - " - -def binutils_branch_version(d): - pvsplit = d.getVar('PV').split('.') - return pvsplit[0] + "_" + pvsplit[1] - -# When upgrading to 2.37, please make sure there is no trailing .0, so -# that upstream version check can work correctly. -PV = "2.37" -CVE_VERSION = "2.37" - -SRC_URI = "file://binutils/${BP}.tar.xz \ - file://binutils/binutils-2.20.51.0.2-libtool-lib64.patch \ - file://binutils/export-demangle.h-in-devel-package.patch \ - file://binutils/binutils-2.22.52.0.4-no-config-h-check.patch \ - file://binutils/binutils-2.27-aarch64-ifunc.patch \ - file://binutils/CVE-2019-1010204.patch \ - file://binutils/Fix-a-potential-use-of-an-uninitialised-value-in-the.patch \ - file://binutils/backport-CVE-2021-45078.patch \ - file://binutils/backport-0001-CVE-2021-42574.patch \ - file://binutils/backport-0002-CVE-2021-42574.patch \ - file://binutils/backport-0003-CVE-2021-42574.patch \ - file://binutils/bfd-Close-the-file-descriptor-if-there-is-no-archive.patch \ - file://0005-Point-scripts-location-to-libdir.patch \ -" - -S = "${WORKDIR}/${BP}" diff --git a/meta-openeuler/recipes-devtools/binutils/binutils.inc b/meta-openeuler/recipes-devtools/binutils/binutils.inc deleted file mode 100644 index 5bd1650c5b2cca6763ba9ae8e46fa410fa9d0723..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-devtools/binutils/binutils.inc +++ /dev/null @@ -1,186 +0,0 @@ -SUMMARY = "GNU binary utilities" -DESCRIPTION = "The GNU Binutils are a collection of binary tools. \ -The main ones are ld (GNU Linker), and as (GNU Assembler). This \ -package also includes addition tools such as addr2line (Converts \ -addresses into filenames and line numbers), ar (utility for creating, \ -modifying and extracting archives), nm (list symbols in object \ -files), objcopy (copy and translate object files), objdump (Display \ -object information), and other tools and related libraries." -HOMEPAGE = "http://www.gnu.org/software/binutils/" -BUGTRACKER = "http://sourceware.org/bugzilla/" -SECTION = "devel" -LICENSE = "GPLv3" - -DEPENDS = "gnu-config-native autoconf-native" - -inherit autotools gettext multilib_header texinfo - -FILES_${PN} = " \ - ${bindir}/${TARGET_PREFIX}* \ - ${libdir}/lib*.so.* \ - ${libdir}/bfd-plugins/lib*.so \ - ${libdir}/lib*-${PV}*.so \ - ${prefix}/${TARGET_SYS}/bin/* \ - ${bindir}/embedspu" - -RPROVIDES_${PN} += "${PN}-symlinks" - -FILES_${PN}-dev = " \ - ${includedir} \ - ${libdir}/*.la \ - ${libdir}/libbfd.so \ - ${libdir}/libctf.so \ - ${libdir}/libctf-nobfd.so \ - ${libdir}/libopcodes.so" - -# Rather than duplicating multiple entries for these, make one -# list and reuse it. - -LDGOLD_ALTS ?= "ld.gold dwp" -LDGOLD_ALTS_riscv64 = "" -LDGOLD_ALTS_riscv32 = "" -LDGOLD_ALTS_libc-glibc_mipsarch = "" - -USE_ALTERNATIVES_FOR = " \ - addr2line \ - ar \ - as \ - c++filt \ - elfedit \ - gprof \ - ld \ - ld.bfd \ - ${LDGOLD_ALTS} \ - nm \ - objcopy \ - objdump \ - ranlib \ - readelf \ - size \ - strings \ - strip \ -" - -python do_package_prepend() { - make_alts = d.getVar("USE_ALTERNATIVES_FOR") or "" - prefix = d.getVar("TARGET_PREFIX") - bindir = d.getVar("bindir") - for alt in make_alts.split(): - d.setVarFlag('ALTERNATIVE_TARGET', alt, bindir + "/" + prefix + alt) - d.setVarFlag('ALTERNATIVE_LINK_NAME', alt, bindir + "/" + alt) -} - -B = "${S}/build.${HOST_SYS}.${TARGET_SYS}" - -EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \ - --disable-werror \ - --enable-deterministic-archives \ - --enable-plugins \ - --disable-gdb \ - --disable-gdbserver \ - --disable-libdecnumber \ - --disable-readline \ - --disable-sim \ - ${LDGOLD} \ - ${EXTRA_TARGETS} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}" - -EXTRA_TARGETS = "" -EXTRA_TARGETS_x86-64 = " --enable-targets=x86_64-pe,x86_64-pep " -EXTRA_TARGETS_class-native = "" - -LDGOLD_class-native = "" -LDGOLD_class-crosssdk = "" -LDGOLD_libc-glibc_mipsarch = "" -LDGOLD ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '--enable-gold --enable-ld=default --enable-threads', d)}" - - -# This is necessary due to a bug in the binutils Makefiles -# EXTRA_OEMAKE = "configure-build-libiberty all" - -export AR = "${HOST_PREFIX}ar" -export AS = "${HOST_PREFIX}as" -export LD = "${HOST_PREFIX}ld" -export NM = "${HOST_PREFIX}nm" -export RANLIB = "${HOST_PREFIX}ranlib" -export OBJCOPY = "${HOST_PREFIX}objcopy" -export OBJDUMP = "${HOST_PREFIX}objdump" - -export AR_FOR_TARGET = "${TARGET_PREFIX}ar" -export AS_FOR_TARGET = "${TARGET_PREFIX}as" -export LD_FOR_TARGET = "${TARGET_PREFIX}ld" -export NM_FOR_TARGET = "${TARGET_PREFIX}nm" -export RANLIB_FOR_TARGET = "${TARGET_PREFIX}ranlib" - -export CC_FOR_HOST = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}" -export CXX_FOR_HOST = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}" - -# autotools.bbclass sets the _FOR_BUILD variables, but for some reason we need -# to unset LD_LIBRARY_PATH. -export CC_FOR_BUILD = "LD_LIBRARY_PATH= ${BUILD_CC}" - -MULTIARCH := "${@bb.utils.contains("DISTRO_FEATURES", "multiarch", "yes", "no", d)}" -do_configure[vardeps] += "MULTIARCH" -do_configure () { - (cd ${S} && gnu-configize) - - oe_runconf -# -# must prime config.cache to ensure the build of libiberty -# - mkdir -p ${B}/build-${BUILD_SYS} - for i in ${CONFIG_SITE}; do - cat $i >> ${B}/build-${BUILD_SYS}/config.cache || true - done -} - -do_install () { - autotools_do_install - - # We don't really need these, so we'll remove them... - rm -rf ${D}${libdir}/ldscripts - - bindir_rel=${@os.path.relpath('${bindir}', '${prefix}/${TARGET_SYS}/bin')} - - # Fix the /usr/${TARGET_SYS}/bin/* links - for l in ${D}${prefix}/${TARGET_SYS}/bin/*; do - rm -f $l - ln -sf $bindir_rel/${TARGET_PREFIX}`basename $l` $l - done - - # Install the libiberty header - install -d ${D}${includedir} - install -m 644 ${S}/include/ansidecl.h ${D}${includedir} - install -m 644 ${S}/include/libiberty.h ${D}${includedir} - - # insall pic version of libiberty if available - if [ -e ${B}/libiberty/pic/libiberty.a ]; then - install -Dm 0644 ${B}/libiberty/pic/libiberty.a ${D}${libdir}/libiberty.a - fi - - cd ${D}${bindir} - - # Symlinks for ease of running these on the native target - for p in ${TARGET_PREFIX}* ; do - ln -sf $p `echo $p | sed -e s,${TARGET_PREFIX},,` - done - - for alt in ${USE_ALTERNATIVES_FOR}; do - rm -f ${D}${bindir}/$alt - done - - oe_multilib_header bfd.h - # bfd_stdint.h encodes the compiler name in the header - # sed -i ${D}${includedir}/bfd_stdint.h -e "s,${TARGET_PREFIX},," -} - -#inherit update-alternatives - -ALTERNATIVE_PRIORITY = "100" - -ALTERNATIVE_${PN}_class-target = "${USE_ALTERNATIVES_FOR}" - -python () { - if bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', True, False, d) and bb.utils.contains_any('TARGET_ARCH', 'riscv32 riscv64', True, False, d): - bb.fatal("Gold linker does not _yet_ support RISC-V architecture please remove ld-is-gold from DISTRO_FEATURES") -} diff --git a/meta-openeuler/recipes-devtools/binutils/binutils/0005-Point-scripts-location-to-libdir.patch b/meta-openeuler/recipes-devtools/binutils/binutils/0005-Point-scripts-location-to-libdir.patch deleted file mode 100644 index dde0cb5d6d0c683269ba5c267a8fdcee4f2294ff..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-devtools/binutils/binutils/0005-Point-scripts-location-to-libdir.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 6a67d277941228d997b527990960413f8444fb81 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 2 Mar 2015 01:09:58 +0000 -Subject: [PATCH] Point scripts location to libdir - -Upstream-Status: Inappropriate [debian patch] - -Signed-off-by: Khem Raj ---- - ld/Makefile.am | 2 +- - ld/Makefile.in | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/ld/Makefile.am b/ld/Makefile.am -index 3b01357b651..b7a1f7491b0 100644 ---- a/ld/Makefile.am -+++ b/ld/Makefile.am -@@ -51,7 +51,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - - EMUL = @EMUL@ - EMULATION_OFILES = @EMULATION_OFILES@ -diff --git a/ld/Makefile.in b/ld/Makefile.in -index a6382bf2a45..5ee3a4971be 100644 ---- a/ld/Makefile.in -+++ b/ld/Makefile.in -@@ -562,7 +562,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - BASEDIR = $(srcdir)/.. - BFDDIR = $(BASEDIR)/bfd - INCDIR = $(BASEDIR)/include diff --git a/meta-openeuler/recipes-devtools/binutils/binutils_%.bbappend b/meta-openeuler/recipes-devtools/binutils/binutils_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..42dd3e6f17be40c54dee66b4630da1207d8da8ee --- /dev/null +++ b/meta-openeuler/recipes-devtools/binutils/binutils_%.bbappend @@ -0,0 +1 @@ +require binutils_src.inc diff --git a/meta-openeuler/recipes-devtools/binutils/binutils_2.37.bb b/meta-openeuler/recipes-devtools/binutils/binutils_2.37.bb deleted file mode 100644 index e01dd4254417ae627365c1c23a1cbe85af514fcc..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-devtools/binutils/binutils_2.37.bb +++ /dev/null @@ -1,65 +0,0 @@ -require binutils.inc -require binutils-${PV}.inc - -DEPENDS += "zlib" -EXTRA_OECONF += "--with-sysroot=/ \ - --enable-install-libbfd \ - --enable-install-libiberty \ - --enable-shared \ - --with-system-zlib \ - " - -EXTRA_OEMAKE_append_libc-musl = "\ - gt_cv_func_gnugettext1_libc=yes \ - gt_cv_func_gnugettext2_libc=yes \ - " -EXTRA_OECONF_class-native = "--enable-targets=all \ - --enable-64-bit-bfd \ - --enable-install-libiberty \ - --enable-install-libbfd \ - --disable-gdb \ - --disable-gdbserver \ - --disable-libdecnumber \ - --disable-readline \ - --disable-sim \ - --disable-werror" - -PACKAGECONFIG ??= "" -PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod, elfutils" -# gcc9.0 end up mis-compiling libbfd.so with O2 which then crashes on target -# So remove -O2 and use -Os as workaround -SELECTED_OPTIMIZATION_remove_mipsarch = "-O2" -SELECTED_OPTIMIZATION_append_mipsarch = " -Os" - -do_install_class-native () { - autotools_do_install - - # Install the libiberty header - install -d ${D}${includedir} - install -m 644 ${S}/include/ansidecl.h ${D}${includedir} - install -m 644 ${S}/include/libiberty.h ${D}${includedir} - - # We only want libiberty, libbfd and libopcodes - rm -rf ${D}${bindir} - rm -rf ${D}${prefix}/${TARGET_SYS} - rm -rf ${D}${prefix}/lib/ldscripts - rm -rf ${D}${prefix}/share/info - rm -rf ${D}${prefix}/share/locale - rm -rf ${D}${prefix}/share/man - rmdir ${D}${prefix}/share || : - rmdir ${D}/${libdir}/gcc-lib || : - rmdir ${D}/${libdir}64/gcc-lib || : - rmdir ${D}/${libdir} || : - rmdir ${D}/${libdir}64 || : -} - -# libctf races with libbfd -PARALLEL_MAKEINST_class-target = "" - -# Split out libbfd-*.so and libopcodes-*.so so including perf doesn't include -# extra stuff -PACKAGE_BEFORE_PN += "libbfd libopcodes" -FILES_libbfd = "${libdir}/libbfd-*.so.* ${libdir}/libbfd-*.so" -FILES_libopcodes = "${libdir}/libopcodes-*.so.* ${libdir}/libopcodes-*.so" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-devtools/binutils/binutils_src.inc b/meta-openeuler/recipes-devtools/binutils/binutils_src.inc new file mode 100644 index 0000000000000000000000000000000000000000..cce1f30040b6ed77a3ceb3d81109acde5883c984 --- /dev/null +++ b/meta-openeuler/recipes-devtools/binutils/binutils_src.inc @@ -0,0 +1,43 @@ +PV = "2.37" +S = "${WORKDIR}/${BPN}-${PV}" + +# apply package source and patches from openeuler +SRC_URI = " \ + file://binutils-2.37.tar.xz \ + file://binutils-2.20.51.0.2-libtool-lib64.patch \ + file://export-demangle.h-in-devel-package.patch \ + file://binutils-2.22.52.0.4-no-config-h-check.patch \ + file://binutils-2.27-aarch64-ifunc.patch \ + file://CVE-2019-1010204.patch \ + file://Fix-a-potential-use-of-an-uninitialised-value-in-the.patch \ + file://backport-CVE-2021-45078.patch \ + file://backport-0001-CVE-2021-42574.patch \ + file://backport-0002-CVE-2021-42574.patch \ + file://backport-0003-CVE-2021-42574.patch \ + file://bfd-Close-the-file-descriptor-if-there-is-no-archive.patch \ +" + +# apply used patches from poky +SRC_URI += " \ + file://0005-Point-scripts-location-to-libdir.patch \ +" + +SRC_URI[sha256sum] = "820d9724f020a3e69cb337893a0b63c2db161dadcb0e06fc11dc29eb1e84a32c" + +do_configure_prepend_class-target () { + # fix Can't locate Autom4te/ChannelDefs.pm in @INC (you may need to install the Autom4te::ChannelDefs module) (@INC contains: /build/tmp/work/*/binutils/2.37-r0/recipe-sysroot-native/usr/share/autoconf ... + # autoconf is installed at buildtool-bar, not build autoconf-native, so need to set autom4te_perllibdir or modify default value in gnu-config + if [ ! -z "${OPENEULER_NATIVESDK_SYSROOT}" ];then + export autom4te_perllibdir="${OPENEULER_NATIVESDK_SYSROOT}/usr/share/autoconf" + fi +} + +# bfd_stdint.h has been removed in favor of using stdint.h in new version +# delete the two function below after upgrade to new poky +do_install_prepend () { + mkdir -p ${D}${includedir} + touch ${D}${includedir}/bfd_stdint.h +} +do_install_append () { + rm -f ${D}${includedir}/bfd_stdint.h +} diff --git a/meta-openeuler/recipes-devtools/bison/bison_%.bbappend b/meta-openeuler/recipes-devtools/bison/bison_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..3be8f4c7104f4b3659e26bcd91f746e525d64a4a --- /dev/null +++ b/meta-openeuler/recipes-devtools/bison/bison_%.bbappend @@ -0,0 +1,9 @@ +PV = "3.8.2" + +LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464" + +SRC_URI[sha256sum] = "9bba0214ccf7f1079c5d59210045227bcf619519840ebfa80cd3849cff5a5bf2" + +SRC_URI = "${GNU_MIRROR}/bison/bison-${PV}.tar.xz \ + file://add-with-bisonlocaledir.patch \ + " diff --git a/meta-openeuler/recipes-devtools/cdrkit/cdrkit_%.bbappend b/meta-openeuler/recipes-devtools/cdrkit/cdrkit_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..75c3610b4014e751334b1a14893c1313213f449c --- /dev/null +++ b/meta-openeuler/recipes-devtools/cdrkit/cdrkit_%.bbappend @@ -0,0 +1,44 @@ +# no bbfile in poky, refer to meta-oe bbfile: http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-multimedia/cdrkit/cdrkit_1.1.11.bb?h=hardknott + +# files, patches can't be applied in openeuler or conflict with openeuler +# patches apply fail: 0001-genisoimage-Add-missing-extern-definition.patch +SRC_URI_remove = " \ + ${DEBIAN_MIRROR}/main/c/${BPN}/${BPN}_${PV}.orig.tar.gz \ + file://0001-genisoimage-Add-missing-extern-definition.patch \ +" + +# files, patches that come from openeuler +# patches apply fail: cdrkit-1.1.10-build-fix.patch +# CDDA cdparanoia is an audio CDs tool, thus don't apply cdrkit-1.1.11-paranoiacdda.patch +SRC_URI_prepend = " \ + file://${BP}.tar.gz;name=tarball \ + file://cdrkit-1.1.11-cmakewarn.patch \ + file://cdrkit-1.1.11-devname.patch \ + file://cdrkit-1.1.11-dvdman.patch \ + file://cdrkit-1.1.11-format.patch \ + file://cdrkit-1.1.11-gcc10.patch \ + file://cdrkit-1.1.11-handler.patch \ + file://cdrkit-1.1.11-manpagefix.patch \ + file://cdrkit-1.1.11-memset.patch \ + file://cdrkit-1.1.11-ppc64le_elfheader.patch \ + file://cdrkit-1.1.11-readsegfault.patch \ + file://cdrkit-1.1.11-rootstat.patch \ + file://cdrkit-1.1.11-sysmacros.patch \ + file://cdrkit-1.1.11-usalinst.patch \ + file://cdrkit-1.1.11-utf8.patch \ + file://cdrkit-1.1.11-werror_gcc5.patch \ + file://cdrkit-1.1.8-werror.patch \ + file://cdrkit-1.1.9-buffer_overflow.patch \ + file://cdrkit-1.1.9-efi-boot.patch \ + file://cdrkit-1.1.9-no_mp3.patch \ +" + +SRC_URI[tarball.md5sum] = "efe08e2f3ca478486037b053acd512e9" +SRC_URI[tarball.sha256sum] = "d1c030756ecc182defee9fe885638c1785d35a2c2a297b4604c0e0dcc78e47da" + +# fix problem "do_populate_sysroot: sstate found an absolute path symlink" +# refer to http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-multimedia/cdrkit/cdrkit_1.1.11.bb?h=honister +do_install_append() { + rm -f ${D}${bindir}/mkisofs + ln -sf --relative ${D}${bindir}/genisoimage ${D}${bindir}/mkisofs +} diff --git a/meta-openeuler/recipes-devtools/cdrkit/cdrkit_1.1.11.bb b/meta-openeuler/recipes-devtools/cdrkit/cdrkit_1.1.11.bb new file mode 100644 index 0000000000000000000000000000000000000000..b9ee03425e70c6d2c2b67bcc0a41915f276ffb50 --- /dev/null +++ b/meta-openeuler/recipes-devtools/cdrkit/cdrkit_1.1.11.bb @@ -0,0 +1,59 @@ +SUMMARY = "CD/DVD command line tools" +HOMEPAGE = "http://cdrkit.org/" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b30d3b2750b668133fc17b401e1b98f8" + +# While writing download from cdrkit.org was broken so get sources from debian +SRC_URI = "${DEBIAN_MIRROR}/main/c/${BPN}/${BPN}_${PV}.orig.tar.gz \ + file://0001-do-not-create-a-run-test-to-determine-order-of-bitfi.patch \ + file://0001-genisoimage-Fix-fprintf-format-errors.patch \ + file://0001-define-__THROW-to-avoid-build-issue-with-musl.patch \ + file://0002-Do-not-use-rcmd-on-build-with-musl.patch \ + file://0001-genisoimage-Add-missing-extern-definition.patch \ + " +SRC_URI[md5sum] = "efe08e2f3ca478486037b053acd512e9" +SRC_URI[sha256sum] = "d1c030756ecc182defee9fe885638c1785d35a2c2a297b4604c0e0dcc78e47da" + +inherit cmake + +DEPENDS = "libcap file bzip2" +RDEPENDS_dirsplit = "perl" + +RDEPENDS_${PN}-dev = "" + +PACKAGES =+ "dirsplit genisoimage icedax wodim" + +FILES_dirsplit = " \ + ${bindir}/dirsplit \ +" + +FILES_genisoimage = " \ + ${bindir}/devdump \ + ${bindir}/genisoimage \ + ${bindir}/isodebug \ + ${bindir}/isodump \ + ${bindir}/isoinfo \ + ${bindir}/isovfy \ + ${bindir}/mkisofs \ +" + +FILES_icedax = " \ + ${bindir}/cdda2mp3 \ + ${bindir}/cdda2ogg \ + ${bindir}/icedax \ + ${bindir}/pitchplay \ + ${bindir}/readmult \ +" + +FILES_wodim = " \ + ${bindir}/readom \ + ${bindir}/wodim \ + ${sbindir}/netscsid \ +" + +do_install_append() { + ln -sf ${bindir}/genisoimage ${D}${bindir}/mkisofs +} + +BBCLASSEXTEND = "native" diff --git a/meta-openeuler/recipes-devtools/cdrkit/files/0001-define-__THROW-to-avoid-build-issue-with-musl.patch b/meta-openeuler/recipes-devtools/cdrkit/files/0001-define-__THROW-to-avoid-build-issue-with-musl.patch new file mode 100644 index 0000000000000000000000000000000000000000..b3beb069eb393db8dad5d5b95c2c353ff872ade4 --- /dev/null +++ b/meta-openeuler/recipes-devtools/cdrkit/files/0001-define-__THROW-to-avoid-build-issue-with-musl.patch @@ -0,0 +1,47 @@ +From 7c3036609494296f7c29413bf3acba829c81f62c Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sat, 8 Aug 2015 22:58:57 +0200 +Subject: [PATCH 1/2] define __THROW to avoid build issue with musl + +Fixes: +http://autobuild.buildroot.net/results/d27/d2781e70b04a207e2e9397d888032294c7285034/build-end.log + +Signed-off-by: Romain Naour +--- + genisoimage/sha256.h | 4 ++++ + genisoimage/sha512.h | 4 ++++ + 2 files changed, 8 insertions(+) + +diff --git a/genisoimage/sha256.h b/genisoimage/sha256.h +index e7f4cb9..bcae7ef 100644 +--- a/genisoimage/sha256.h ++++ b/genisoimage/sha256.h +@@ -29,6 +29,10 @@ + #include + #include + ++/* define __THROW to avoid build issue when it's not available from the libc */ ++#ifndef __THROW ++# define __THROW ++#endif + + /* Structure to save state of computation between the single steps. */ + struct sha256_ctx +diff --git a/genisoimage/sha512.h b/genisoimage/sha512.h +index 7298355..8cee8b0 100644 +--- a/genisoimage/sha512.h ++++ b/genisoimage/sha512.h +@@ -29,6 +29,10 @@ + #include + #include + ++/* define __THROW to avoid build issue when it's not available from the libc */ ++#ifndef __THROW ++# define __THROW ++#endif + + /* Structure to save state of computation between the single steps. */ + struct sha512_ctx +-- +2.14.1 + diff --git a/meta-openeuler/recipes-devtools/cdrkit/files/0001-do-not-create-a-run-test-to-determine-order-of-bitfi.patch b/meta-openeuler/recipes-devtools/cdrkit/files/0001-do-not-create-a-run-test-to-determine-order-of-bitfi.patch new file mode 100644 index 0000000000000000000000000000000000000000..c9725cb064af4f4c103d0e4fdcff5d3f2cd4736c --- /dev/null +++ b/meta-openeuler/recipes-devtools/cdrkit/files/0001-do-not-create-a-run-test-to-determine-order-of-bitfi.patch @@ -0,0 +1,53 @@ +From a702cd1bb5eba5a05d1098862b5b863a3f6dd558 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Thu, 10 Sep 2015 09:39:13 +0200 +Subject: [PATCH] do not create a run test to determine order of bitfields +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +taken from [1] + +Upstream-Status: Inappropriate [cross compile specific] + +[1] http://cgit.openembedded.org/openembedded/tree/recipes/cdrkit/cdrkit/xconfig.patch + +Signed-off-by: Andreas Müller +--- + include/CMakeLists.txt | 2 -- + include/xconfig.h.in | 6 +++++- + 2 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt +index 99a69fd..e5ba8a7 100644 +--- a/include/CMakeLists.txt ++++ b/include/CMakeLists.txt +@@ -35,8 +35,6 @@ endif(VA_LIST_IS_ARRAY) + INCLUDE(TestBigEndian) + TEST_BIG_ENDIAN(WORDS_BIGENDIAN) + +-TRY_RUN(BITFIELDS_HTOL TEST_DUMMY ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/test_BITFIELDS_HTOL.c) +- + INCLUDE(CheckIncludeFiles) + + #SET(CMAKE_REQUIRED_INCLUDES "/usr/include;/usr/local/include") +diff --git a/include/xconfig.h.in b/include/xconfig.h.in +index c130600..476c00b 100644 +--- a/include/xconfig.h.in ++++ b/include/xconfig.h.in +@@ -233,7 +233,11 @@ + /* If using network byte order */ + #cmakedefine WORDS_BIGENDIAN + /* If high bits come first in structures */ +-#cmakedefine BITFIELDS_HTOL ++#ifdef WORDS_BIGENDIAN ++#define BITFIELDS_HTOL ++#else ++#define BITFIELDS_LTOH ++#endif + #define HAVE_C_BIGENDIAN /* Flag that WORDS_BIGENDIAN test was done */ + #define HAVE_C_BITFIELDS /* Flag that BITFIELDS_HTOL test was done */ + +-- +2.1.0 + diff --git a/meta-openeuler/recipes-devtools/cdrkit/files/0001-genisoimage-Add-missing-extern-definition.patch b/meta-openeuler/recipes-devtools/cdrkit/files/0001-genisoimage-Add-missing-extern-definition.patch new file mode 100644 index 0000000000000000000000000000000000000000..809d3afd7696b775b3968c481674d837b2a13410 --- /dev/null +++ b/meta-openeuler/recipes-devtools/cdrkit/files/0001-genisoimage-Add-missing-extern-definition.patch @@ -0,0 +1,29 @@ +From fd5251cc8b82ce7a5f907c5129969097d75609fe Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 13 Aug 2020 17:38:59 -0700 +Subject: [PATCH] genisoimage: Add missing extern definition + +Fixed build with gcc10 + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + genisoimage/genisoimage.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/genisoimage/genisoimage.h b/genisoimage/genisoimage.h +index bbedfb0..82c859b 100644 +--- a/genisoimage/genisoimage.h ++++ b/genisoimage/genisoimage.h +@@ -376,7 +376,7 @@ extern int use_fileversion; + extern int split_SL_component; + extern int split_SL_field; + extern char *trans_tbl; +-char *outfile; ++extern char *outfile; + + #define JMAX 64 /* maximum Joliet file name length (spec) */ + #define JLONGMAX 103 /* out of spec Joliet file name length */ +-- +2.28.0 + diff --git a/meta-openeuler/recipes-devtools/cdrkit/files/0001-genisoimage-Fix-fprintf-format-errors.patch b/meta-openeuler/recipes-devtools/cdrkit/files/0001-genisoimage-Fix-fprintf-format-errors.patch new file mode 100644 index 0000000000000000000000000000000000000000..f52f71b632d9e5907c4d7093a08e90688e0fc98e --- /dev/null +++ b/meta-openeuler/recipes-devtools/cdrkit/files/0001-genisoimage-Fix-fprintf-format-errors.patch @@ -0,0 +1,49 @@ +From 8547f23c4416ed98f585c53c62e7d8afd8edab36 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 27 Jun 2017 21:05:31 -0700 +Subject: [PATCH] genisoimage: Fix fprintf format errors + +Signed-off-by: Khem Raj +--- + genisoimage/genisoimage.c | 4 ++-- + genisoimage/tree.c | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/genisoimage/genisoimage.c b/genisoimage/genisoimage.c +index 46f0cb7..9089081 100644 +--- a/genisoimage/genisoimage.c ++++ b/genisoimage/genisoimage.c +@@ -3406,7 +3406,7 @@ if (check_session == 0) + if (goof) { + fprintf(stderr, "ISO9660/Rock Ridge tree sort failed.\n"); + if(merge_warn_msg) +- fprintf(stderr, merge_warn_msg); ++ fprintf(stderr, "%s", merge_warn_msg); + exit(1); + } + #ifdef UDF +@@ -3419,7 +3419,7 @@ if (check_session == 0) + if (goof) { + fprintf(stderr, "Joliet tree sort failed. The -joliet-long switch may help you.\n"); + if(merge_warn_msg) +- fprintf(stderr, merge_warn_msg); ++ fprintf(stderr, "%s", merge_warn_msg); + exit(1); + } + /* +diff --git a/genisoimage/tree.c b/genisoimage/tree.c +index 7805888..8412cc3 100644 +--- a/genisoimage/tree.c ++++ b/genisoimage/tree.c +@@ -647,7 +647,7 @@ got_valid_name: + fprintf(stderr, "Unable to sort directory %s\n", + this_dir->whole_name); + if(merge_warn_msg) +- fprintf(stderr, merge_warn_msg); ++ fprintf(stderr, "%s", merge_warn_msg); + exit(1); + } + /* +-- +2.13.2 + diff --git a/meta-openeuler/recipes-devtools/cdrkit/files/0002-Do-not-use-rcmd-on-build-with-musl.patch b/meta-openeuler/recipes-devtools/cdrkit/files/0002-Do-not-use-rcmd-on-build-with-musl.patch new file mode 100644 index 0000000000000000000000000000000000000000..547a21c67f623995785c26116cf0ae9f53bc8bc5 --- /dev/null +++ b/meta-openeuler/recipes-devtools/cdrkit/files/0002-Do-not-use-rcmd-on-build-with-musl.patch @@ -0,0 +1,31 @@ +From 510838b2c96a9b097b3ee2694cba1c3623b0bac7 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 21 Sep 2017 22:38:05 -0700 +Subject: [PATCH 2/2] Do not use rcmd on build with musl + +cdrkit unconditionally enables code using rcmd(3), which isn't available +on musl. + +Signed-off-by: Khem Raj +--- + include/xconfig.h.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/include/xconfig.h.in b/include/xconfig.h.in +index 476c00b..6b4b298 100644 +--- a/include/xconfig.h.in ++++ b/include/xconfig.h.in +@@ -186,8 +186,9 @@ + * Instead use the tests AC_SMALL_FSEEKO/AC_SMALL/STELLO and make sure + * they are placed before the large file tests. + */ +- ++#ifdef __GLIBC__ + #define HAVE_RCMD 1 /* rcmd() is present in libc/libsocket */ ++#endif + #define HAVE_SOCKET 1 /* socket() is present in libc/libsocket */ + #define HAVE_SOCKETPAIR 1 /* socketpair() is present in libc/libsocket */ + #define HAVE_GETSERVBYNAME 1 /* getservbyname() is present in libc/libsocket */ +-- +2.14.1 + diff --git a/meta-openeuler/recipes-devtools/e2fsprogs/e2fsprogs_%.bbappend b/meta-openeuler/recipes-devtools/e2fsprogs/e2fsprogs_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..d7a71f9235e6a806ab64660b6d424f72a59f9349 --- /dev/null +++ b/meta-openeuler/recipes-devtools/e2fsprogs/e2fsprogs_%.bbappend @@ -0,0 +1,25 @@ +PV = "1.46.4" +S = "${WORKDIR}/${BPN}-${PV}" +# delete package from poky +SRC_URI_remove += "git://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git" + +SRC_URI[sha256sum] = "b11042533c1b1dcf17512f0da48e05b0c573dada1dd8b762864d10f4dc399713" + +# add openeuler patches +SRC_URI += " \ + file://e2fsprogs-${PV}.tar.xz \ + file://0001-e2fsprogs-set-hugefile-from-4T-to-1T-in-hugefile-tes.patch \ + file://0002-libss-add-newer-libreadline.so.8-to-dlopen-path.patch \ + file://0003-tests-update-expect-files-for-f_mmp_garbage.patch \ + file://0004-tests-update-expect-files-for-f_large_dir-and-f_larg.patch \ + file://0005-resize2fs-resize2fs-disk-hardlinks-will-be-error.patch \ + file://0006-e2fsck-exit-journal-recovery-when-find-EIO-ENOMEM-er.patch \ + file://0007-e2fsck-exit-journal-recovery-when-jounral-superblock.patch \ + file://0008-e2fsck-add-env-param-E2FS_UNRELIABLE_IO-to-fi.patch \ + file://0009-e2mmpstatus.8.in-detele-filesystem-can-be-UUID-or-LA.patch \ + file://0010-tests-update-expect-file-for-u_direct_io.patch \ + file://0011-libext2fs-don-t-old-the-CACHE_MTX-while-doing-I-O.patch \ + file://0012-tests-skip-m_rootdir_acl-if-selinux-is-not-disabled.patch \ + file://0013-e2fsck-do-not-clean-up-file-acl-if-the-inode-is-trun.patch \ + file://0014-e2fsck-handle-level-is-overflow-in-ext2fs_extent_get.patch \ +" diff --git a/meta-openeuler/recipes-devtools/elfutils/elfutils_%.bbappend b/meta-openeuler/recipes-devtools/elfutils/elfutils_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..25e01a9d409f682adb9d69cd724ce2ff7a6bd5d7 --- /dev/null +++ b/meta-openeuler/recipes-devtools/elfutils/elfutils_%.bbappend @@ -0,0 +1,13 @@ +PV = "0.185" + +# add patches from openeuler +SRC_URI += " \ + file://eu-elfclassify-no-stdin-should-use-classify_flag_no_stdin.patch \ +" + +SRC_URI[sha256sum] = "dc8d3e74ab209465e7f568e1b3bb9a5a142f8656e2b57d10049a73da2ae6b5a6" + +# delete conflict patches from poky +SRC_URI_remove += " \ + file://0001-add-support-for-ipkg-to-debuginfod.cxx.patch \ +" diff --git a/meta-openeuler/recipes-devtools/elfutils/elfutils_0.185.bb b/meta-openeuler/recipes-devtools/elfutils/elfutils_0.185.bb deleted file mode 100644 index 9a4ab39a415609195f0720da5c46093690a3894f..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-devtools/elfutils/elfutils_0.185.bb +++ /dev/null @@ -1,148 +0,0 @@ -SUMMARY = "Utilities and libraries for handling compiled object files" -HOMEPAGE = "https://sourceware.org/elfutils" -DESCRIPTION = "elfutils is a collection of utilities and libraries to read, create and modify ELF binary files, find and handle DWARF debug data, symbols, thread state and stacktraces for processes and core files on GNU/Linux." -SECTION = "base" -LICENSE = "GPLv2 & GPLv2+ & LGPLv3+ & GPLv3+" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ - file://debuginfod/debuginfod-client.c;endline=27;md5=f8e9d171c401c493ec45a0b2992ea2ed \ - " -DEPENDS = "zlib virtual/libintl" -DEPENDS_append_libc-musl = " argp-standalone fts musl-obstack " -# The Debian patches below are from: -# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.176-1.debian.tar.xz -SRC_URI = "file://elfutils/${BP}.tar.bz2 \ - file://elfutils/eu-elfclassify-no-stdin-should-use-classify_flag_no_stdin.patch \ - file://run-ptest \ -" - -SRC_URI[sha256sum] = "dc8d3e74ab209465e7f568e1b3bb9a5a142f8656e2b57d10049a73da2ae6b5a6" - -inherit autotools gettext ptest pkgconfig - -EXTRA_OECONF = "--program-prefix=eu-" - -DEPENDS_BZIP2 = "bzip2-replacement-native" -DEPENDS_BZIP2_class-target = "bzip2" - -PACKAGECONFIG ??= "" -PACKAGECONFIG[bzip2] = "--with-bzlib,--without-bzlib,${DEPENDS_BZIP2}" -PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz" -PACKAGECONFIG[libdebuginfod] = "--enable-libdebuginfod,--disable-libdebuginfod,curl" -PACKAGECONFIG[debuginfod] = "--enable-debuginfod,--disable-debuginfod,libarchive sqlite3 libmicrohttpd" - -RDEPENDS_${PN}-ptest += "libasm libelf bash make coreutils ${PN}-binutils" - -EXTRA_OECONF_append_class-target = " --disable-tests-rpath" - -RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils" - -do_compile_ptest() { - cd ${B}/tests - oe_runmake buildtest-TESTS oecheck -} - -do_install_ptest() { - if [ ${PTEST_ENABLED} = "1" ]; then - # copy the files which needed by the cases - TEST_FILES="strip strip.o addr2line elfcmp objdump readelf size.o nm.o nm elflint elfcompress elfclassify stack unstrip" - install -d -m 755 ${D}${PTEST_PATH}/src - install -d -m 755 ${D}${PTEST_PATH}/libelf - install -d -m 755 ${D}${PTEST_PATH}/libdw - install -d -m 755 ${D}${PTEST_PATH}/libdwfl - install -d -m 755 ${D}${PTEST_PATH}/libdwelf - install -d -m 755 ${D}${PTEST_PATH}/libasm - install -d -m 755 ${D}${PTEST_PATH}/libcpu - install -d -m 755 ${D}${PTEST_PATH}/libebl - for test_file in ${TEST_FILES}; do - if [ -f ${B}/src/${test_file} ]; then - cp -r ${B}/src/${test_file} ${D}${PTEST_PATH}/src - fi - done - cp ${D}${libdir}/libelf-${PV}.so ${D}${PTEST_PATH}/libelf/libelf.so - cp ${D}${libdir}/libdw-${PV}.so ${D}${PTEST_PATH}/libdw/libdw.so - cp ${D}${libdir}/libasm-${PV}.so ${D}${PTEST_PATH}/libasm/libasm.so - cp ${B}/libcpu/libcpu.a ${D}${PTEST_PATH}/libcpu/ - cp ${B}/libebl/libebl.a ${D}${PTEST_PATH}/libebl/ - cp ${S}/libelf/*.h ${D}${PTEST_PATH}/libelf/ - cp ${S}/libdw/*.h ${D}${PTEST_PATH}/libdw/ - cp ${S}/libdwfl/*.h ${D}${PTEST_PATH}/libdwfl/ - cp ${S}/libdwelf/*.h ${D}${PTEST_PATH}/libdwelf/ - cp ${S}/libasm/*.h ${D}${PTEST_PATH}/libasm/ - cp -r ${S}/tests/ ${D}${PTEST_PATH} - cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests - cp -r ${B}/config.h ${D}${PTEST_PATH} - cp -r ${B}/backends ${D}${PTEST_PATH} - sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile - find ${D}${PTEST_PATH} -type f -name *.[hoc] | xargs -i rm {} - fi -} - -EXTRA_OEMAKE_class-native = "" -EXTRA_OEMAKE_class-nativesdk = "" - -BBCLASSEXTEND = "native nativesdk" - -# Package utilities separately -PACKAGES =+ "${PN}-binutils libelf libasm libdw libdebuginfod" - -# shared libraries are licensed GPLv2 or GPLv3+, binaries GPLv3+ -# according to NEWS file: -# "The license is now GPLv2/LGPLv3+ for the libraries and GPLv3+ for stand-alone -# programs. There is now also a formal CONTRIBUTING document describing how to -# submit patches." -LICENSE_${PN}-binutils = "GPLv3+" -LICENSE_${PN} = "GPLv3+" -LICENSE_libelf = "GPLv2 | LGPLv3+" -LICENSE_libasm = "GPLv2 | LGPLv3+" -LICENSE_libdw = "GPLv2 | LGPLv3+" -LICENSE_libdebuginfod = "GPLv2+ | LGPLv3+" - -FILES_${PN}-binutils = "\ - ${bindir}/eu-addr2line \ - ${bindir}/eu-ld \ - ${bindir}/eu-nm \ - ${bindir}/eu-readelf \ - ${bindir}/eu-size \ - ${bindir}/eu-strip" - -FILES_libelf = "${libdir}/libelf-${PV}.so ${libdir}/libelf.so.*" -FILES_libasm = "${libdir}/libasm-${PV}.so ${libdir}/libasm.so.*" -FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils/lib*" -FILES_libdebuginfod = "${libdir}/libdebuginfod-${PV}.so ${libdir}/libdebuginfod.so.*" -# Some packages have the version preceeding the .so instead properly -# versioned .so., so we need to reorder and repackage. -#FILES_${PN} += "${libdir}/*-${PV}.so ${base_libdir}/*-${PV}.so" -#FILES_SOLIBSDEV = "${libdir}/libasm.so ${libdir}/libdw.so ${libdir}/libelf.so" - -# The package contains symlinks that trip up insane -INSANE_SKIP_${MLPREFIX}libdw = "dev-so" -# The nlist binary in the tests uses explicitly minimal compiler flags -INSANE_SKIP_${PN}-ptest += "ldflags" - -# avoid stripping some generated binaries otherwise some of the tests such as test-nlist, -# run-strip-reloc.sh, run-strip-strmerge.sh and so on will fail -INHIBIT_PACKAGE_STRIP_FILES = "\ - ${PKGD}${PTEST_PATH}/tests/test-nlist \ - ${PKGD}${PTEST_PATH}/tests/elfstrmerge \ - ${PKGD}${PTEST_PATH}/tests/backtrace-child \ - ${PKGD}${PTEST_PATH}/tests/backtrace-data \ - ${PKGD}${PTEST_PATH}/tests/backtrace-dwarf \ - ${PKGD}${PTEST_PATH}/tests/deleted \ - ${PKGD}${PTEST_PATH}/src/strip \ - ${PKGD}${PTEST_PATH}/src/addr2line \ - ${PKGD}${PTEST_PATH}/src/elfcmp \ - ${PKGD}${PTEST_PATH}/src/objdump \ - ${PKGD}${PTEST_PATH}/src/readelf \ - ${PKGD}${PTEST_PATH}/src/nm \ - ${PKGD}${PTEST_PATH}/src/elflint \ - ${PKGD}${PTEST_PATH}/src/elfclassify \ - ${PKGD}${PTEST_PATH}/src/stack \ - ${PKGD}${PTEST_PATH}/src/unstrip \ - ${PKGD}${PTEST_PATH}/libelf/libelf.so \ - ${PKGD}${PTEST_PATH}/libdw/libdw.so \ - ${PKGD}${PTEST_PATH}/libasm/libasm.so \ - ${PKGD}${PTEST_PATH}/backends/libebl_i386.so \ - ${PKGD}${PTEST_PATH}/backends/libebl_x86_64.so \ -" - -PRIVATE_LIBS_${PN}-ptest = "libdw.so.1 libelf.so.1 libasm.so.1" diff --git a/meta-openeuler/recipes-devtools/elfutils/files/run-ptest b/meta-openeuler/recipes-devtools/elfutils/files/run-ptest deleted file mode 100644 index d5776fdb5386698990c2a143dda8ed63334109d5..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-devtools/elfutils/files/run-ptest +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# -#This script is used to run elfutils test suites -cd tests - -make -k installcheck-local CC=gcc abs_srcdir=$PWD abs_builddir=$PWD srcdir=$PWD top_srcdir=$PWD/../ abs_top_builddir=$PWD/../ elfutils_testrun=installed elfutils_tests_rpath=no program_transform_name=s,^,eu-, diff --git a/meta-openeuler/recipes-devtools/flex/flex_%.bbappend b/meta-openeuler/recipes-devtools/flex/flex_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..174be7370663de5620ca84f3e7e7dc27672c92a0 --- /dev/null +++ b/meta-openeuler/recipes-devtools/flex/flex_%.bbappend @@ -0,0 +1,16 @@ +# main bb file: yocto-poky/meta/recipes-devtools/flex/flex_2.6.4.bb + +# apply patches in openEuler +SRC_URI_prepend = "file://build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch \ + file://filter-memory-leak-free-scanner-postprocessing.patch \ + file://scanner-c-i-j-should-preserve-case.patch \ + file://filter-Output-correct-line-value-for-current-file.patch \ + file://scanner-memory-leak-free-scanner-generator.patch \ + file://scanner-Ignore-comment-lines-in-skeleton-files.patch \ + file://scanner-temporarily-protect-against-ccl-overflow-ove.patch \ + file://scanner-prevent-overflow-in-add_action.patch \ +" + +# remove this patch as it already exists in openEuler +SRC_URI_remove = "file://0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch \ +" \ No newline at end of file diff --git a/meta-openeuler/recipes-devtools/gdb/gdb_%.bbappend b/meta-openeuler/recipes-devtools/gdb/gdb_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..fdb9787a29789d7b497048222300e50656ea03a1 --- /dev/null +++ b/meta-openeuler/recipes-devtools/gdb/gdb_%.bbappend @@ -0,0 +1,115 @@ +# main bbfile: yocto-poky/meta/recipes-devtools/gdb/gdb_10.1.bb + +#version in openEuler +PV = "11.1" + +DEPENDS_append += "gmp" + +# files, patches can't be applied in openeuler or conflict with openeuler +SRC_URI_remove = " \ + ${GNU_MIRROR}/gdb/gdb-${PV}.tar.xz \ + file://0001-make-man-install-relative-to-DESTDIR.patch \ + file://0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \ + file://0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch \ + file://0004-Add-support-for-Renesas-SH-sh4-architecture.patch \ + file://0005-Dont-disable-libreadline.a-when-using-disable-static.patch \ + file://0006-use-asm-sgidefs.h.patch \ + file://0008-Change-order-of-CFLAGS.patch \ + file://0009-resolve-restrict-keyword-conflict.patch \ + file://0010-Fix-invalid-sigprocmask-call.patch \ + file://0011-gdbserver-ctrl-c-handling.patch \ + " + +# files, patches that come from openeuler +SRC_URI += " \ + file://gdb-${PV}.tar.xz \ + file://gdb-6.3-rh-testversion-20041202.patch \ + file://gdb-6.3-gstack-20050411.patch \ + file://gdb-6.3-test-dtorfix-20050121.patch \ + file://gdb-6.3-test-movedir-20050125.patch \ + file://gdb-6.3-threaded-watchpoints2-20050225.patch \ + file://gdb-6.3-inferior-notification-20050721.patch \ + file://gdb-6.3-inheritancetest-20050726.patch \ + file://gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch \ + file://gdb-6.5-sharedlibrary-path.patch \ + file://gdb-6.5-BEA-testsuite.patch \ + file://gdb-6.5-last-address-space-byte-test.patch \ + file://gdb-6.5-readline-long-line-crash-test.patch \ + file://gdb-6.5-bz218379-ppc-solib-trampoline-test.patch \ + file://gdb-6.5-bz109921-DW_AT_decl_file-test.patch \ + file://gdb-6.3-bz140532-ppc-unwinding-test.patch \ + file://gdb-6.3-bz202689-exec-from-pthread-test.patch \ + file://gdb-6.6-bz230000-power6-disassembly-test.patch \ + file://gdb-6.6-bz229517-gcore-without-terminal.patch \ + file://gdb-6.6-testsuite-timeouts.patch \ + file://gdb-6.6-bz237572-ppc-atomic-sequence-test.patch \ + file://gdb-6.3-attach-see-vdso-test.patch \ + file://gdb-6.5-bz243845-stale-testing-zombie-test.patch \ + file://gdb-6.7-charsign-test.patch \ + file://gdb-6.7-ppc-clobbered-registers-O2-test.patch \ + file://gdb-6.7-testsuite-stable-results.patch \ + file://gdb-6.5-ia64-libunwind-leak-test.patch \ + file://gdb-6.5-missed-trap-on-step-test.patch \ + file://gdb-6.5-gcore-buffer-limit-test.patch \ + file://gdb-6.3-mapping-zero-inode-test.patch \ + file://gdb-6.3-focus-cmd-prev-test.patch \ + file://gdb-6.8-bz442765-threaded-exec-test.patch \ + file://gdb-6.5-section-num-fixup-test.patch \ + file://gdb-6.8-bz466901-backtrace-full-prelinked.patch \ + file://gdb-simultaneous-step-resume-breakpoint-test.patch \ + file://gdb-core-open-vdso-warning.patch \ + file://gdb-ccache-workaround.patch \ + file://gdb-lineno-makeup-test.patch \ + file://gdb-ppc-power7-test.patch \ + file://gdb-archer-next-over-throw-cxx-exec.patch \ + file://gdb-bz601887-dwarf4-rh-test.patch \ + file://gdb-test-bt-cfi-without-die.patch \ + file://gdb-bz634108-solib_address.patch \ + file://gdb-test-pid0-core.patch \ + file://gdb-test-dw2-aranges.patch \ + file://gdb-test-expr-cumulative-archer.patch \ + file://gdb-physname-pr11734-test.patch \ + file://gdb-physname-pr12273-test.patch \ + file://gdb-test-ivy-bridge.patch \ + file://gdb-runtest-pie-override.patch \ + file://gdb-glibc-strstr-workaround.patch \ + file://gdb-rhel5.9-testcase-xlf-var-inside-mod.patch \ + file://gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch \ + file://gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch \ + file://gdb-rhbz1007614-memleak-infpy_read_memory-test.patch \ + file://gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch \ + file://gdb-fortran-frame-string.patch \ + file://gdb-rhbz1156192-recursive-dlopen-test.patch \ + file://gdb-rhbz1149205-catch-syscall-after-fork-test.patch \ + file://gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch \ + file://gdb-rhbz1350436-type-printers-error.patch \ + file://gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch \ + file://gdb-fedora-libncursesw.patch \ + file://gdb-opcodes-clflushopt-test.patch \ + file://gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch \ + file://gdb-container-rh-pkg.patch \ + file://gdb-rhbz1325795-framefilters-test.patch \ + file://gdb-linux_perf-bundle.patch \ + file://gdb-libexec-add-index.patch \ + file://gdb-rhbz1398387-tab-crash-test.patch \ + file://gdb-rhbz1553104-s390x-arch12-test.patch \ + file://gdb-rhbz1976887-field-location-kind.patch \ + file://gdb-test-for-rhbz1976887.patch \ + file://gdb-rhbz2012976-paper-over-fortran-lex-problems.patch \ + file://gdb-rhbz2022177-dprintf-1.patch \ + file://gdb-rhbz2022177-dprintf-2.patch \ + file://0001-Make-c-exp.y-work-with-Bison-3.8.patch \ + " +# These patches can't apply from openEuler +# It may depend on the feature poky not enable, such as --with-rpm, texinfo, etc. +#gdb-6.6-buildid-locate.patch +#gdb-6.6-buildid-locate-solib-missing-ids.patch +#gdb-6.6-buildid-locate-rpm.patch +#gdb-6.6-buildid-locate-rpm-librpm-workaround.patch +#gdb-6.6-buildid-locate-rpm-scl.patch +#gdb-rhbz-853071-update-manpages.patch + +EXTRA_OECONF_append += " \ + --with-libgmp-prefix=${STAGING_EXECPREFIXDIR} \ + " + diff --git a/meta-openeuler/recipes-devtools/gnu-config/gnu-config/config.guess b/meta-openeuler/recipes-devtools/gnu-config/gnu-config/config.guess deleted file mode 100644 index 18f8edc0ff54405d81247b07a34a647675a29b2e..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-devtools/gnu-config/gnu-config/config.guess +++ /dev/null @@ -1,1486 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright 1992-2018 Free Software Foundation, Inc. - -timestamp='2018-08-29' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that -# program. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). -# -# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. -# -# You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess -# -# Please send patches to . - - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Options: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright 1992-2018 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -tmp= -# shellcheck disable=SC2172 -trap 'test -z "$tmp" || rm -fr "$tmp"' 1 2 13 15 -trap 'exitcode=$?; test -z "$tmp" || rm -fr "$tmp"; exit $exitcode' 0 - -set_cc_for_build() { - : "${TMPDIR=/tmp}" - # shellcheck disable=SC2039 - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } - dummy=$tmp/dummy - case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in - ,,) echo "int x;" > "$dummy.c" - for driver in cc gcc c89 c99 ; do - if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$driver" - break - fi - done - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; - esac -} - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if test -f /.attbin/uname ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -case "$UNAME_SYSTEM" in -Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu - - set_cc_for_build - cat <<-EOF > "$dummy.c" - #include - #if defined(__UCLIBC__) - LIBC=uclibc - #elif defined(__dietlibc__) - LIBC=dietlibc - #else - LIBC=gnu - #endif - EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" - - # If ldd exists, use it to detect musl libc. - if command -v ldd >/dev/null && \ - ldd --version 2>&1 | grep -q ^musl - then - LIBC=musl - fi - ;; -esac - -# Note: order is significant - the case branches are not exclusive. - -case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - "/sbin/$sysctl" 2>/dev/null || \ - "/usr/sbin/$sysctl" 2>/dev/null || \ - echo unknown)` - case "$UNAME_MACHINE_ARCH" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - earmv*) - arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` - endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` - machine="${arch}${endian}"-unknown - ;; - *) machine="$UNAME_MACHINE_ARCH"-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently (or will in the future) and ABI. - case "$UNAME_MACHINE_ARCH" in - earm*) - os=netbsdelf - ;; - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # Determine ABI tags. - case "$UNAME_MACHINE_ARCH" in - earm*) - expr='s/^earmv[0-9]/-eabi/;s/eb$//' - abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "$UNAME_VERSION" in - Debian*) - release='-gnu' - ;; - *) - release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi-}" - exit ;; - *:Bitrig:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" - exit ;; - *:LibertyBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" - exit ;; - *:MidnightBSD:*:*) - echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" - exit ;; - *:ekkoBSD:*:*) - echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" - exit ;; - *:SolidBSD:*:*) - echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd"$UNAME_RELEASE" - exit ;; - *:MirBSD:*:*) - echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" - exit ;; - *:Sortix:*:*) - echo "$UNAME_MACHINE"-unknown-sortix - exit ;; - *:Redox:*:*) - echo "$UNAME_MACHINE"-unknown-redox - exit ;; - mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE=alpha ;; - "EV4.5 (21064)") - UNAME_MACHINE=alpha ;; - "LCA4 (21066/21068)") - UNAME_MACHINE=alpha ;; - "EV5 (21164)") - UNAME_MACHINE=alphaev5 ;; - "EV5.6 (21164A)") - UNAME_MACHINE=alphaev56 ;; - "EV5.6 (21164PC)") - UNAME_MACHINE=alphapca56 ;; - "EV5.7 (21164PC)") - UNAME_MACHINE=alphapca57 ;; - "EV6 (21264)") - UNAME_MACHINE=alphaev6 ;; - "EV6.7 (21264A)") - UNAME_MACHINE=alphaev67 ;; - "EV6.8CB (21264C)") - UNAME_MACHINE=alphaev68 ;; - "EV6.8AL (21264B)") - UNAME_MACHINE=alphaev68 ;; - "EV6.8CX (21264D)") - UNAME_MACHINE=alphaev68 ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE=alphaev69 ;; - "EV7 (21364)") - UNAME_MACHINE=alphaev7 ;; - "EV7.9 (21364A)") - UNAME_MACHINE=alphaev79 ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix"$UNAME_RELEASE" - exit ;; - arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux"$UNAME_RELEASE" - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - case `isainfo -b` in - 32) - echo i386-pc-solaris2"$UNAME_REL" - ;; - 64) - echo x86_64-pc-solaris2"$UNAME_REL" - ;; - esac - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos"$UNAME_RELEASE" - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos"$UNAME_RELEASE" - ;; - sun4) - echo sparc-sun-sunos"$UNAME_RELEASE" - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos"$UNAME_RELEASE" - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint"$UNAME_RELEASE" - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint"$UNAME_RELEASE" - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint"$UNAME_RELEASE" - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten"$UNAME_RELEASE" - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten"$UNAME_RELEASE" - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix"$UNAME_RELEASE" - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix"$UNAME_RELEASE" - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix"$UNAME_RELEASE" - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - set_cc_for_build - sed 's/^ //' << EOF > "$dummy.c" -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o "$dummy" "$dummy.c" && - dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`"$dummy" "$dummyarg"` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos"$UNAME_RELEASE" - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] - then - if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ - [ "$TARGET_BINARY_INTERFACE"x = x ] - then - echo m88k-dg-dgux"$UNAME_RELEASE" - else - echo m88k-dg-dguxbcs"$UNAME_RELEASE" - fi - else - echo i586-dg-dgux"$UNAME_RELEASE" - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" - fi - echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - set_cc_for_build - sed 's/^ //' << EOF > "$dummy.c" - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[4567]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/lslpp ] ; then - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | - awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` - else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" - fi - echo "$IBM_ARCH"-ibm-aix"$IBM_REV" - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - case "$UNAME_MACHINE" in - 9000/31?) HP_ARCH=m68000 ;; - 9000/[34]??) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "$sc_cpu_version" in - 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 - 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "$sc_kernel_bits" in - 32) HP_ARCH=hppa2.0n ;; - 64) HP_ARCH=hppa2.0w ;; - '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "$HP_ARCH" = "" ]; then - set_cc_for_build - sed 's/^ //' << EOF > "$dummy.c" - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ "$HP_ARCH" = hppa2.0w ] - then - set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH=hppa2.0w - else - HP_ARCH=hppa64 - fi - fi - echo "$HP_ARCH"-hp-hpux"$HPUX_REV" - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux"$HPUX_REV" - exit ;; - 3050*:HI-UX:*:*) - set_cc_for_build - sed 's/^ //' << EOF > "$dummy.c" - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo "$UNAME_MACHINE"-unknown-osf1mk - else - echo "$UNAME_MACHINE"-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` - FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi"$UNAME_RELEASE" - exit ;; - *:BSD/OS:*:*) - echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" - exit ;; - arm:FreeBSD:*:*) - UNAME_PROCESSOR=`uname -p` - set_cc_for_build - if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_PCS_VFP - then - echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi - else - echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf - fi - exit ;; - *:FreeBSD:*:*) - UNAME_PROCESSOR=`/usr/bin/uname -p` - case "$UNAME_PROCESSOR" in - amd64) - UNAME_PROCESSOR=x86_64 ;; - i386) - UNAME_PROCESSOR=i586 ;; - esac - echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" - exit ;; - i*:CYGWIN*:*) - echo "$UNAME_MACHINE"-pc-cygwin - exit ;; - *:MINGW64*:*) - echo "$UNAME_MACHINE"-pc-mingw64 - exit ;; - *:MINGW*:*) - echo "$UNAME_MACHINE"-pc-mingw32 - exit ;; - *:MSYS*:*) - echo "$UNAME_MACHINE"-pc-msys - exit ;; - i*:PW*:*) - echo "$UNAME_MACHINE"-pc-pw32 - exit ;; - *:Interix*:*) - case "$UNAME_MACHINE" in - x86) - echo i586-pc-interix"$UNAME_RELEASE" - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix"$UNAME_RELEASE" - exit ;; - IA64) - echo ia64-unknown-interix"$UNAME_RELEASE" - exit ;; - esac ;; - i*:UWIN*:*) - echo "$UNAME_MACHINE"-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-pc-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; - *:GNU:*:*) - # the GNU system - echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" - exit ;; - *:Minix:*:*) - echo "$UNAME_MACHINE"-unknown-minix - exit ;; - aarch64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - aarch64_be:Linux:*:*) - UNAME_MACHINE=aarch64_be - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - arc:Linux:*:* | arceb:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - arm*:Linux:*:*) - set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - else - if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_PCS_VFP - then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi - else - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf - fi - fi - exit ;; - avr32*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - cris:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; - crisv32:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; - e2k:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - frv:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - hexagon:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - i*86:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; - ia64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - k1om:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - m32r*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - m68*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - set_cc_for_build - sed 's/^ //' << EOF > "$dummy.c" - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" - test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } - ;; - mips64el:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - openrisc*:Linux:*:*) - echo or1k-unknown-linux-"$LIBC" - exit ;; - or32:Linux:*:* | or1k*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-"$LIBC" - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-"$LIBC" - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; - PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; - *) echo hppa-unknown-linux-"$LIBC" ;; - esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-"$LIBC" - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-"$LIBC" - exit ;; - ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-"$LIBC" - exit ;; - ppcle:Linux:*:*) - echo powerpcle-unknown-linux-"$LIBC" - exit ;; - riscv32:Linux:*:* | riscv64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" - exit ;; - sh64*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - sh*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - tile*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - vax:Linux:*:*) - echo "$UNAME_MACHINE"-dec-linux-"$LIBC" - exit ;; - x86_64:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; - xtensa*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo "$UNAME_MACHINE"-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo "$UNAME_MACHINE"-unknown-stop - exit ;; - i*86:atheos:*:*) - echo "$UNAME_MACHINE"-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo "$UNAME_MACHINE"-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos"$UNAME_RELEASE" - exit ;; - i*86:*DOS:*:*) - echo "$UNAME_MACHINE"-pc-msdosdjgpp - exit ;; - i*86:*:4.*:*) - UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" - else - echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" - else - echo "$UNAME_MACHINE"-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configure will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos"$UNAME_RELEASE" - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos"$UNAME_RELEASE" - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos"$UNAME_RELEASE" - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos"$UNAME_RELEASE" - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv"$UNAME_RELEASE" - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo "$UNAME_MACHINE"-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo "$UNAME_MACHINE"-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux"$UNAME_RELEASE" - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv"$UNAME_RELEASE" - else - echo mips-unknown-sysv"$UNAME_RELEASE" - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - x86_64:Haiku:*:*) - echo x86_64-unknown-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux"$UNAME_RELEASE" - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux"$UNAME_RELEASE" - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux"$UNAME_RELEASE" - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux"$UNAME_RELEASE" - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux"$UNAME_RELEASE" - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux"$UNAME_RELEASE" - exit ;; - SX-ACE:SUPER-UX:*:*) - echo sxace-nec-superux"$UNAME_RELEASE" - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody"$UNAME_RELEASE" - exit ;; - *:Rhapsody:*:*) - echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - set_cc_for_build - if test "$UNAME_PROCESSOR" = unknown ; then - UNAME_PROCESSOR=powerpc - fi - if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc - if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_PPC >/dev/null - then - UNAME_PROCESSOR=powerpc - fi - fi - elif test "$UNAME_PROCESSOR" = i386 ; then - # Avoid executing cc on OS X 10.9, as it ships with a stub - # that puts up a graphical alert prompting to install - # developer tools. Any system running Mac OS X 10.7 or - # later (Darwin 11 and later) is required to have a 64-bit - # processor. This is not true of the ARM version of Darwin - # that Apple uses in portable devices. - UNAME_PROCESSOR=x86_64 - fi - echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = x86; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NEO-*:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk"$UNAME_RELEASE" - exit ;; - NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk"$UNAME_RELEASE" - exit ;; - NSR-*:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk"$UNAME_RELEASE" - exit ;; - NSV-*:NONSTOP_KERNEL:*:*) - echo nsv-tandem-nsk"$UNAME_RELEASE" - exit ;; - NSX-*:NONSTOP_KERNEL:*:*) - echo nsx-tandem-nsk"$UNAME_RELEASE" - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - # shellcheck disable=SC2154 - if test "$cputype" = 386; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo "$UNAME_MACHINE"-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux"$UNAME_RELEASE" - exit ;; - *:DragonFly:*:*) - echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "$UNAME_MACHINE" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" - exit ;; - i*86:rdos:*:*) - echo "$UNAME_MACHINE"-pc-rdos - exit ;; - i*86:AROS:*:*) - echo "$UNAME_MACHINE"-pc-aros - exit ;; - x86_64:VMkernel:*:*) - echo "$UNAME_MACHINE"-unknown-esx - exit ;; - amd64:Isilon\ OneFS:*:*) - echo x86_64-unknown-onefs - exit ;; -esac - -echo "$0: unable to guess system type" >&2 - -case "$UNAME_MACHINE:$UNAME_SYSTEM" in - mips:Linux | mips64:Linux) - # If we got here on MIPS GNU/Linux, output extra information. - cat >&2 <&2 </dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = "$UNAME_MACHINE" -UNAME_RELEASE = "$UNAME_RELEASE" -UNAME_SYSTEM = "$UNAME_SYSTEM" -UNAME_VERSION = "$UNAME_VERSION" -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/meta-openeuler/recipes-devtools/gnu-config/gnu-config/config.sub b/meta-openeuler/recipes-devtools/gnu-config/gnu-config/config.sub deleted file mode 100644 index 69eb4bc1e2fefb829ed2bbad8859a8b066a40412..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-devtools/gnu-config/gnu-config/config.sub +++ /dev/null @@ -1,1788 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright 1992-2018 Free Software Foundation, Inc. - -timestamp='2018-08-29' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that -# program. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). - - -# Please send patches to . -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS - -Canonicalize a configuration name. - -Options: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright 1992-2018 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo "$1" - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Split fields of configuration type -IFS="-" read -r field1 field2 field3 field4 <&2 - exit 1 - ;; - *-*-*-*) - basic_machine=$field1-$field2 - os=$field3-$field4 - ;; - *-*-*) - # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two - # parts - maybe_os=$field2-$field3 - case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \ - | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \ - | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ - | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ - | storm-chaos* | os2-emx* | rtmk-nova*) - basic_machine=$field1 - os=$maybe_os - ;; - android-linux) - basic_machine=$field1-unknown - os=linux-android - ;; - *) - basic_machine=$field1-$field2 - os=$field3 - ;; - esac - ;; - *-*) - # A lone config we happen to match not fitting any pattern - case $field1-$field2 in - decstation-3100) - basic_machine=mips-dec - os= - ;; - *-*) - # Second component is usually, but not always the OS - case $field2 in - # Prevent following clause from handling this valid os - sun*os*) - basic_machine=$field1 - os=$field2 - ;; - # Manufacturers - dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ - | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ - | unicom* | ibm* | next | hp | isi* | apollo | altos* \ - | convergent* | ncr* | news | 32* | 3600* | 3100* \ - | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ - | ultra | tti* | harris | dolphin | highlevel | gould \ - | cbm | ns | masscomp | apple | axis | knuth | cray \ - | microblaze* | sim | cisco \ - | oki | wec | wrs | winbond) - basic_machine=$field1-$field2 - os= - ;; - *) - basic_machine=$field1 - os=$field2 - ;; - esac - ;; - esac - ;; - *) - # Convert single-component short-hands not valid as part of - # multi-component configurations. - case $field1 in - 386bsd) - basic_machine=i386-pc - os=bsd - ;; - a29khif) - basic_machine=a29k-amd - os=udi - ;; - adobe68k) - basic_machine=m68010-adobe - os=scout - ;; - alliant) - basic_machine=fx80-alliant - os= - ;; - altos | altos3068) - basic_machine=m68k-altos - os= - ;; - am29k) - basic_machine=a29k-none - os=bsd - ;; - amdahl) - basic_machine=580-amdahl - os=sysv - ;; - amiga) - basic_machine=m68k-unknown - os= - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=bsd - ;; - aros) - basic_machine=i386-pc - os=aros - ;; - aux) - basic_machine=m68k-apple - os=aux - ;; - balance) - basic_machine=ns32k-sequent - os=dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=linux - ;; - cegcc) - basic_machine=arm-unknown - os=cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=bsd - ;; - convex-c2) - basic_machine=c2-convex - os=bsd - ;; - convex-c32) - basic_machine=c32-convex - os=bsd - ;; - convex-c34) - basic_machine=c34-convex - os=bsd - ;; - convex-c38) - basic_machine=c38-convex - os=bsd - ;; - cray) - basic_machine=j90-cray - os=unicos - ;; - crds | unos) - basic_machine=m68k-crds - os= - ;; - da30) - basic_machine=m68k-da30 - os= - ;; - decstation | pmax | pmin | dec3100 | decstatn) - basic_machine=mips-dec - os= - ;; - delta88) - basic_machine=m88k-motorola - os=sysv3 - ;; - dicos) - basic_machine=i686-pc - os=dicos - ;; - djgpp) - basic_machine=i586-pc - os=msdosdjgpp - ;; - ebmon29k) - basic_machine=a29k-amd - os=ebmon - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=ose - ;; - gmicro) - basic_machine=tron-gmicro - os=sysv - ;; - go32) - basic_machine=i386-pc - os=go32 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=hms - ;; - harris) - basic_machine=m88k-harris - os=sysv3 - ;; - hp300) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=hpux - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=proelf - ;; - i386mach) - basic_machine=i386-mach - os=mach - ;; - vsta) - basic_machine=i386-pc - os=vsta - ;; - isi68 | isi) - basic_machine=m68k-isi - os=sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=linux - ;; - magnum | m3230) - basic_machine=mips-mips - os=sysv - ;; - merlin) - basic_machine=ns32k-utek - os=sysv - ;; - mingw64) - basic_machine=x86_64-pc - os=mingw64 - ;; - mingw32) - basic_machine=i686-pc - os=mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=mingw32ce - ;; - monitor) - basic_machine=m68k-rom68k - os=coff - ;; - morphos) - basic_machine=powerpc-unknown - os=morphos - ;; - moxiebox) - basic_machine=moxie-unknown - os=moxiebox - ;; - msdos) - basic_machine=i386-pc - os=msdos - ;; - msys) - basic_machine=i686-pc - os=msys - ;; - mvs) - basic_machine=i370-ibm - os=mvs - ;; - nacl) - basic_machine=le32-unknown - os=nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=sysv4 - ;; - netbsd386) - basic_machine=i386-pc - os=netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=newsos - ;; - news1000) - basic_machine=m68030-sony - os=newsos - ;; - necv70) - basic_machine=v70-nec - os=sysv - ;; - nh3000) - basic_machine=m68k-harris - os=cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=cxux - ;; - nindy960) - basic_machine=i960-intel - os=nindy - ;; - mon960) - basic_machine=i960-intel - os=mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=nonstopux - ;; - os400) - basic_machine=powerpc-ibm - os=os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=ose - ;; - os68k) - basic_machine=m68k-none - os=os68k - ;; - paragon) - basic_machine=i860-intel - os=osf - ;; - parisc) - basic_machine=hppa-unknown - os=linux - ;; - pw32) - basic_machine=i586-unknown - os=pw32 - ;; - rdos | rdos64) - basic_machine=x86_64-pc - os=rdos - ;; - rdos32) - basic_machine=i386-pc - os=rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=coff - ;; - sa29200) - basic_machine=a29k-amd - os=udi - ;; - sei) - basic_machine=mips-sei - os=seiux - ;; - sequent) - basic_machine=i386-sequent - os= - ;; - sps7) - basic_machine=m68k-bull - os=sysv2 - ;; - st2000) - basic_machine=m68k-tandem - os= - ;; - stratus) - basic_machine=i860-stratus - os=sysv4 - ;; - sun2) - basic_machine=m68000-sun - os= - ;; - sun2os3) - basic_machine=m68000-sun - os=sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=sunos4 - ;; - sun3) - basic_machine=m68k-sun - os= - ;; - sun3os3) - basic_machine=m68k-sun - os=sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=sunos4 - ;; - sun4) - basic_machine=sparc-sun - os= - ;; - sun4os3) - basic_machine=sparc-sun - os=sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=solaris2 - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - os= - ;; - sv1) - basic_machine=sv1-cray - os=unicos - ;; - symmetry) - basic_machine=i386-sequent - os=dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=unicos - ;; - t90) - basic_machine=t90-cray - os=unicos - ;; - toad1) - basic_machine=pdp10-xkl - os=tops20 - ;; - tpf) - basic_machine=s390x-ibm - os=tpf - ;; - udi29k) - basic_machine=a29k-amd - os=udi - ;; - ultra3) - basic_machine=a29k-nyu - os=sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=none - ;; - vaxv) - basic_machine=vax-dec - os=sysv - ;; - vms) - basic_machine=vax-dec - os=vms - ;; - vxworks960) - basic_machine=i960-wrs - os=vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=vxworks - ;; - xbox) - basic_machine=i686-pc - os=mingw32 - ;; - ymp) - basic_machine=ymp-cray - os=unicos - ;; - *) - basic_machine=$1 - os= - ;; - esac - ;; -esac - -# Decode 1-component or ad-hoc basic machines -case $basic_machine in - # Here we handle the default manufacturer of certain CPU types. It is in - # some cases the only manufacturer, in others, it is the most popular. - w89k) - cpu=hppa1.1 - vendor=winbond - ;; - op50n) - cpu=hppa1.1 - vendor=oki - ;; - op60c) - cpu=hppa1.1 - vendor=oki - ;; - ibm*) - cpu=i370 - vendor=ibm - ;; - orion105) - cpu=clipper - vendor=highlevel - ;; - mac | mpw | mac-mpw) - cpu=m68k - vendor=apple - ;; - pmac | pmac-mpw) - cpu=powerpc - vendor=apple - ;; - - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - cpu=m68000 - vendor=att - ;; - 3b*) - cpu=we32k - vendor=att - ;; - bluegene*) - cpu=powerpc - vendor=ibm - os=cnk - ;; - decsystem10* | dec10*) - cpu=pdp10 - vendor=dec - os=tops10 - ;; - decsystem20* | dec20*) - cpu=pdp10 - vendor=dec - os=tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - cpu=m68k - vendor=motorola - ;; - dpx2*) - cpu=m68k - vendor=bull - os=sysv3 - ;; - encore | umax | mmax) - cpu=ns32k - vendor=encore - ;; - elxsi) - cpu=elxsi - vendor=elxsi - os=${os:-bsd} - ;; - fx2800) - cpu=i860 - vendor=alliant - ;; - genix) - cpu=ns32k - vendor=ns - ;; - h3050r* | hiux*) - cpu=hppa1.1 - vendor=hitachi - os=hiuxwe2 - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - cpu=hppa1.0 - vendor=hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - cpu=m68000 - vendor=hp - ;; - hp9k3[2-9][0-9]) - cpu=m68k - vendor=hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - cpu=hppa1.0 - vendor=hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - cpu=hppa1.1 - vendor=hp - ;; - hp9k78[0-9] | hp78[0-9]) - cpu=hppa1.1 - vendor=hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - cpu=hppa1.1 - vendor=hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - cpu=hppa1.1 - vendor=hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - cpu=hppa1.0 - vendor=hp - ;; - i*86v32) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - os=sysv32 - ;; - i*86v4*) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - os=sysv4 - ;; - i*86v) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - os=sysv - ;; - i*86sol2) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - os=solaris2 - ;; - j90 | j90-cray) - cpu=j90 - vendor=cray - os=${os:-unicos} - ;; - iris | iris4d) - cpu=mips - vendor=sgi - case $os in - irix*) - ;; - *) - os=irix4 - ;; - esac - ;; - miniframe) - cpu=m68000 - vendor=convergent - ;; - *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) - cpu=m68k - vendor=atari - os=mint - ;; - news-3600 | risc-news) - cpu=mips - vendor=sony - os=newsos - ;; - next | m*-next) - cpu=m68k - vendor=next - case $os in - nextstep* ) - ;; - ns2*) - os=nextstep2 - ;; - *) - os=nextstep3 - ;; - esac - ;; - np1) - cpu=np1 - vendor=gould - ;; - op50n-* | op60c-*) - cpu=hppa1.1 - vendor=oki - os=proelf - ;; - pa-hitachi) - cpu=hppa1.1 - vendor=hitachi - os=hiuxwe2 - ;; - pbd) - cpu=sparc - vendor=tti - ;; - pbb) - cpu=m68k - vendor=tti - ;; - pc532) - cpu=ns32k - vendor=pc532 - ;; - pn) - cpu=pn - vendor=gould - ;; - power) - cpu=power - vendor=ibm - ;; - ps2) - cpu=i386 - vendor=ibm - ;; - rm[46]00) - cpu=mips - vendor=siemens - ;; - rtpc | rtpc-*) - cpu=romp - vendor=ibm - ;; - sde) - cpu=mipsisa32 - vendor=sde - os=${os:-elf} - ;; - simso-wrs) - cpu=sparclite - vendor=wrs - os=vxworks - ;; - tower | tower-32) - cpu=m68k - vendor=ncr - ;; - vpp*|vx|vx-*) - cpu=f301 - vendor=fujitsu - ;; - w65) - cpu=w65 - vendor=wdc - ;; - w89k-*) - cpu=hppa1.1 - vendor=winbond - os=proelf - ;; - none) - cpu=none - vendor=none - ;; - leon|leon[3-9]) - cpu=sparc - vendor=$basic_machine - ;; - leon-*|leon[3-9]-*) - cpu=sparc - vendor=`echo "$basic_machine" | sed 's/-.*//'` - ;; - - *-*) - IFS="-" read -r cpu vendor <&2 - exit 1 - ;; - esac - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $vendor in - digital*) - vendor=dec - ;; - commodore*) - vendor=cbm - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x$os != x ] -then -case $os in - # First match some system type aliases that might get confused - # with valid system types. - # solaris* is a basic system type, with this one exception. - auroraux) - os=auroraux - ;; - bluegene*) - os=cnk - ;; - solaris1 | solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - solaris) - os=solaris2 - ;; - unixware*) - os=sysv4.2uw - ;; - gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # es1800 is here to avoid being matched by es* (a different OS) - es1800*) - os=ose - ;; - # Some version numbers need modification - chorusos*) - os=chorusos - ;; - isc) - os=isc2.2 - ;; - sco6) - os=sco5v6 - ;; - sco5) - os=sco3.2v5 - ;; - sco4) - os=sco3.2v4 - ;; - sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - ;; - sco3.2v[4-9]* | sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - ;; - scout) - # Don't match below - ;; - sco*) - os=sco3.2v2 - ;; - psos*) - os=psos - ;; - # Now accept the basic system types. - # The portable systems comes first. - # Each alternative MUST end in a * to match a version number. - # sysv* is not here because it comes later, after sysvr4. - gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ - | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\ - | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ - | sym* | kopensolaris* | plan9* \ - | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ - | aos* | aros* | cloudabi* | sortix* \ - | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ - | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ - | knetbsd* | mirbsd* | netbsd* \ - | bitrig* | openbsd* | solidbsd* | libertybsd* \ - | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ - | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ - | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ - | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \ - | chorusrdb* | cegcc* | glidix* \ - | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ - | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \ - | linux-newlib* | linux-musl* | linux-uclibc* \ - | uxpv* | beos* | mpeix* | udk* | moxiebox* \ - | interix* | uwin* | mks* | rhapsody* | darwin* \ - | openstep* | oskit* | conix* | pw32* | nonstopux* \ - | storm-chaos* | tops10* | tenex* | tops20* | its* \ - | os2* | vos* | palmos* | uclinux* | nucleus* \ - | morphos* | superux* | rtmk* | windiss* \ - | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ - | skyos* | haiku* | rdos* | toppers* | drops* | es* \ - | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ - | midnightbsd*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - qnx*) - case $cpu in - x86 | i*86) - ;; - *) - os=nto-$os - ;; - esac - ;; - hiux*) - os=hiuxwe2 - ;; - nto-qnx*) - ;; - nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - sim | xray | os68k* | v88r* \ - | windows* | osx | abug | netware* | os9* \ - | macos* | mpw* | magic* | mmixware* | mon960* | lnews*) - ;; - linux-dietlibc) - os=linux-dietlibc - ;; - linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - lynx*178) - os=lynxos178 - ;; - lynx*5) - os=lynxos5 - ;; - lynx*) - os=lynxos - ;; - mac*) - os=`echo "$os" | sed -e 's|mac|macos|'` - ;; - opened*) - os=openedition - ;; - os400*) - os=os400 - ;; - sunos5*) - os=`echo "$os" | sed -e 's|sunos5|solaris2|'` - ;; - sunos6*) - os=`echo "$os" | sed -e 's|sunos6|solaris3|'` - ;; - wince*) - os=wince - ;; - utek*) - os=bsd - ;; - dynix*) - os=bsd - ;; - acis*) - os=aos - ;; - atheos*) - os=atheos - ;; - syllable*) - os=syllable - ;; - 386bsd) - os=bsd - ;; - ctix* | uts*) - os=sysv - ;; - nova*) - os=rtmk-nova - ;; - ns2) - os=nextstep2 - ;; - nsk*) - os=nsk - ;; - # Preserve the version number of sinix5. - sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - sinix*) - os=sysv4 - ;; - tpf*) - os=tpf - ;; - triton*) - os=sysv3 - ;; - oss*) - os=sysv3 - ;; - svr4*) - os=sysv4 - ;; - svr3) - os=sysv3 - ;; - sysvr4) - os=sysv4 - ;; - # This must come after sysvr4. - sysv*) - ;; - ose*) - os=ose - ;; - *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) - os=mint - ;; - zvmoe) - os=zvmoe - ;; - dicos*) - os=dicos - ;; - pikeos*) - # Until real need of OS specific support for - # particular features comes up, bare metal - # configurations are quite functional. - case $cpu in - arm*) - os=eabi - ;; - *) - os=elf - ;; - esac - ;; - nacl*) - ;; - ios) - ;; - none) - ;; - *-eabi) - ;; - *) - echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $cpu-$vendor in - score-*) - os=elf - ;; - spu-*) - os=elf - ;; - *-acorn) - os=riscix1.2 - ;; - arm*-rebel) - os=linux - ;; - arm*-semi) - os=aout - ;; - c4x-* | tic4x-*) - os=coff - ;; - c8051-*) - os=elf - ;; - clipper-intergraph) - os=clix - ;; - hexagon-*) - os=elf - ;; - tic54x-*) - os=coff - ;; - tic55x-*) - os=coff - ;; - tic6x-*) - os=coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=tops20 - ;; - pdp11-*) - os=none - ;; - *-dec | vax-*) - os=ultrix4.2 - ;; - m68*-apollo) - os=domain - ;; - i386-sun) - os=sunos4.0.2 - ;; - m68000-sun) - os=sunos3 - ;; - m68*-cisco) - os=aout - ;; - mep-*) - os=elf - ;; - mips*-cisco) - os=elf - ;; - mips*-*) - os=elf - ;; - or32-*) - os=coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=sysv3 - ;; - sparc-* | *-sun) - os=sunos4.1.1 - ;; - pru-*) - os=elf - ;; - *-be) - os=beos - ;; - *-ibm) - os=aix - ;; - *-knuth) - os=mmixware - ;; - *-wec) - os=proelf - ;; - *-winbond) - os=proelf - ;; - *-oki) - os=proelf - ;; - *-hp) - os=hpux - ;; - *-hitachi) - os=hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=sysv - ;; - *-cbm) - os=amigaos - ;; - *-dg) - os=dgux - ;; - *-dolphin) - os=sysv3 - ;; - m68k-ccur) - os=rtu - ;; - m88k-omron*) - os=luna - ;; - *-next) - os=nextstep - ;; - *-sequent) - os=ptx - ;; - *-crds) - os=unos - ;; - *-ns) - os=genix - ;; - i370-*) - os=mvs - ;; - *-gould) - os=sysv - ;; - *-highlevel) - os=bsd - ;; - *-encore) - os=bsd - ;; - *-sgi) - os=irix - ;; - *-siemens) - os=sysv4 - ;; - *-masscomp) - os=rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=uxpv - ;; - *-rom68k) - os=coff - ;; - *-*bug) - os=coff - ;; - *-apple) - os=macos - ;; - *-atari*) - os=mint - ;; - *-wrs) - os=vxworks - ;; - *) - os=none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -case $vendor in - unknown) - case $os in - riscix*) - vendor=acorn - ;; - sunos*) - vendor=sun - ;; - cnk*|-aix*) - vendor=ibm - ;; - beos*) - vendor=be - ;; - hpux*) - vendor=hp - ;; - mpeix*) - vendor=hp - ;; - hiux*) - vendor=hitachi - ;; - unos*) - vendor=crds - ;; - dgux*) - vendor=dg - ;; - luna*) - vendor=omron - ;; - genix*) - vendor=ns - ;; - clix*) - vendor=intergraph - ;; - mvs* | opened*) - vendor=ibm - ;; - os400*) - vendor=ibm - ;; - ptx*) - vendor=sequent - ;; - tpf*) - vendor=ibm - ;; - vxsim* | vxworks* | windiss*) - vendor=wrs - ;; - aux*) - vendor=apple - ;; - hms*) - vendor=hitachi - ;; - mpw* | macos*) - vendor=apple - ;; - *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) - vendor=atari - ;; - vos*) - vendor=stratus - ;; - esac - ;; -esac - -echo "$cpu-$vendor-$os" -exit - -# Local variables: -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/meta-openeuler/recipes-devtools/gnu-config/gnu-config/gnu-configize.in b/meta-openeuler/recipes-devtools/gnu-config/gnu-config/gnu-configize.in deleted file mode 100644 index d4908fc4f9d7f08d4aa116e1d0ef400f1f52ad2d..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-devtools/gnu-config/gnu-config/gnu-configize.in +++ /dev/null @@ -1,267 +0,0 @@ -#! /usr/bin/env perl -# -*- perl -*- - -eval 'case $# in 0) exec /usr/bin/perl -S "$0";; *) exec /usr/bin/perl -S "$0" "$@";; esac' - if 0; - -# gnu-configize - install the GNU config.guess / config.sub in a directory tree -# Based on autoreconf: -# Copyright (C) 1994, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -BEGIN -{ - my $datadir = $ENV{'autom4te_perllibdir'} || '@autom4te_perllibdir@'; -# '/home/kergoth/code/build-arm/tmp/staging/share/autoconf'; - unshift @INC, $datadir; - - # Override SHELL. On DJGPP SHELL may not be set to a shell - # that can handle redirection and quote arguments correctly, - # e.g.: COMMAND.COM. For DJGPP always use the shell that configure - # has detected. - $ENV{'SHELL'} = '/bin/sh' if ($^O eq 'dos'); -} - -use Autom4te::ChannelDefs; -use Autom4te::Channels; -use Autom4te::Configure_ac; -use Autom4te::FileUtils; -use Autom4te::General; -use Autom4te::XFile; -# Do not use Cwd::chdir, since it might hang. -use Cwd 'cwd'; -use strict; - -## ----------- ## -## Variables. ## -## ----------- ## - -# $HELP -# ----- -$help = "Usage: $0 [OPTION] ... [CONFIGURE-AC or DIRECTORY] ... - -Install the GNU config.sub and config.guess scripts in the -DIRECTORIES or the directory trees driven by CONFIGURE-AC -(defaulting to `.'). - -Operation modes: - -h, --help print this help, then exit - -V, --version print version number, then exit - -v, --verbose verbosely report processing - -f, --force consider all files obsolete - -s, --symlink install symbolic links instead of copies - -W, --warnings=CATEGORY report the warnings falling in CATEGORY [syntax] - -" . Autom4te::ChannelDefs::usage . " - -The environment variable \`WARNINGS\' is honored. Some subtools might -support other warning types, using \`all' is encouraged. -"; - -# $VERSION -# -------- -$version = "gnu-configize 1.0 - -Copyright (C) 2004 Chris Larson -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -"; - -my $configdir = '@gnu-configdir@'; -#'/home/kergoth/code/build-arm/tmp/staging/i686-linux/share/gnu-config'; -my $autoconf = $ENV{'AUTOCONF'} || 'autoconf'; - -# use symlinks instead. -my $symlink = 0; - -my $configure_ac; - -my $rm = "rm -f"; -my $ln_s = "ln -sf"; -my $cp = "cp -f"; -my $mkdir = "mkdir"; -my $chmod = "chmod"; - -## ---------- ## -## Routines. ## -## ---------- ## - - -# parse_args () -# ------------- -# Process any command line arguments. -sub parse_args () -{ - my $srcdir; - - getopt ('s|symlink' => \$symlink); - - # Even if the user specified a configure.ac, trim to get the - # directory, and look for configure.ac again. Because (i) the code - # is simpler, and (ii) we are still able to diagnose simultaneous - # presence of configure.ac and configure.in. - @ARGV = map { /configure\.(ac|in)$/ ? dirname ($_) : $_ } @ARGV; - push @ARGV, '.' unless @ARGV; -} - - -# &gnu_configize_current_directory -# ----------------------------- -sub gnu_configize_current_directory () -{ - my $configure_ac = require_configure_ac; - - # ---------------------- # - # Is it using Autoconf? # - # ---------------------- # - - my $uses_autoconf; - my $uses_gettext; - my $configure_ac_file = new Autom4te::XFile $configure_ac; - while ($_ = $configure_ac_file->getline) - { - s/#.*//; - s/dnl.*//; - $uses_autoconf = 1 if /AC_INIT/; - } - - if (!$uses_autoconf) - { - verb "$configure_ac: not using Autoconf"; - return; - } - - my $aux_dir; - my @subdir; - my $cmd; - my $dest; - - verb "$configure_ac: tracing"; - my $traces = new Autom4te::XFile - ("$autoconf" - . join (' --trace=', '', - # If you change this list, update the - # `Autoreconf-preselections' section of autom4te.in. - 'AC_CONFIG_AUX_DIR:AC_CONFIG_AUX_DIR:\$1', - 'AC_CONFIG_SUBDIRS:AC_CONFIG_SUBDIRS:\$1', - 'AC_INIT', - ) - . ' |'); - while ($_ = $traces->getline) - { - $aux_dir = $1 if /AC_CONFIG_AUX_DIR:(.*)/; - $uses_autoconf = 1 if /AC_INIT/; - push @subdir, split (' ', $1) if /AC_CONFIG_SUBDIRS:(.*)/; - } - - # The subdirs are *optional*, they may not exist. - foreach (@subdir) - { - if (-d) - { - verb "$configure_ac: subdirectory $_ to gnu-configize"; - gnu_configize ($_); - } - else - { - verb "$configure_ac: subdirectory $_ not present"; - } - } - - $dest = "."; - - if (defined $aux_dir) - { - $dest = $aux_dir; - if (! -d $aux_dir) - { - verb "$configure_ac: creating directory $aux_dir"; - mkdir $aux_dir - or error "cannot create $aux_dir: $!"; - } - } - - if (!$symlink) - { - $cmd = $cp; - } - else - { - $cmd = $ln_s; - } - - xsystem ("$cmd $configdir/config.guess $dest/"); - xsystem ("$chmod u+x $dest/config.guess"); - xsystem ("$cmd $configdir/config.sub $dest/"); - xsystem ("$chmod u+x $dest/config.sub"); -} - - -# &gnu_configize ($DIRECTORY) -# ------------------------ -# Reconf the $DIRECTORY. -sub gnu_configize ($) -{ - my ($directory) = @_; - my $cwd = cwd; - - # The format for this message is not free: taken from Emacs, itself - # using GNU Make's format. - verb "Entering directory `$directory'"; - chdir $directory - or error "cannot chdir to $directory: $!"; - - gnu_configize_current_directory; - - # The format is not free: taken from Emacs, itself using GNU Make's - # format. - verb "Leaving directory `$directory'"; - chdir $cwd - or error "cannot chdir to $cwd: $!"; -} - - -## ------ ## -## Main. ## -## ------ ## - -parse_args; - -# Autoreconf all the given configure.ac. A while loop, not a for, -# since the list can change at runtime because of AC_CONFIG_SUBDIRS. -for my $directory (@ARGV) - { - gnu_configize ($directory); - } - -### Setup "GNU" style for perl-mode and cperl-mode. -## Local Variables: -## perl-indent-level: 2 -## perl-continued-statement-offset: 2 -## perl-continued-brace-offset: 0 -## perl-brace-offset: 0 -## perl-brace-imaginary-offset: 0 -## perl-label-offset: -2 -## cperl-indent-level: 2 -## cperl-brace-offset: 0 -## cperl-continued-brace-offset: 0 -## cperl-label-offset: -2 -## cperl-extra-newline-before-brace: t -## cperl-merge-trailing-else: nil -## cperl-continued-statement-offset: 2 -## End: diff --git a/meta-openeuler/recipes-devtools/gnu-config/gnu-config_20120814.bb b/meta-openeuler/recipes-devtools/gnu-config/gnu-config_20120814.bb deleted file mode 100644 index c046c114ea720c1f43121e3a16008bbd136ecdd1..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-devtools/gnu-config/gnu-config_20120814.bb +++ /dev/null @@ -1,48 +0,0 @@ -SUMMARY = "gnu-configize" -DESCRIPTION = "Tool that installs the GNU config.guess / config.sub into a directory tree" -SECTION = "devel" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" - -DEPENDS_class-native = "hostperl-runtime-native" - -INHIBIT_DEFAULT_DEPS = "1" - -PR = "r0" - -SRC_URI = " \ - file://gnu-configize.in \ - file://config.guess \ - file://config.sub \ - " - -SRC_URI[md5sum] = "cdb56e9968c9a3674fe4ad8880665f78" -SRC_URI[sha256sum] = "b48543f72d717a8c07cf3b995175b3293c24dac9c9efad01b312321c0c809f07" - -do_compile() { - : -} - -do_configure[noexec] = "1" -do_compile[noexec] = "1" - -do_install () { - install -d ${D}${datadir}/gnu-config \ - ${D}${bindir} - cat ${WORKDIR}/gnu-configize.in | \ - sed -e 's,@gnu-configdir@,${datadir}/gnu-config,g' \ - -e 's,@autom4te_perllibdir@,/usr/share/autoconf,g' > ${D}${bindir}/gnu-configize - # In the native case we want the system perl as perl-native can't have built yet - if [ "${PN}" != "gnu-config-native" -a "${PN}" != "nativesdk-gnu-config" ]; then - sed -i -e 's,/usr/bin/env,${bindir}/env,g' ${D}${bindir}/gnu-configize - fi - chmod 500 ${D}${bindir}/gnu-configize - install -m 0644 "${WORKDIR}/config.guess" ${D}${datadir}/gnu-config/ - install -m 0644 "${WORKDIR}/config.sub" ${D}${datadir}/gnu-config/ - -} - -PACKAGES = "${PN}" -FILES_${PN} = "${bindir} ${datadir}/gnu-config" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-devtools/gnu-config/gnu-config_git.bb b/meta-openeuler/recipes-devtools/gnu-config/gnu-config_git.bb deleted file mode 100644 index 394a34a80f7946ee8ad12d7ef74498903ea66c13..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-devtools/gnu-config/gnu-config_git.bb +++ /dev/null @@ -1,41 +0,0 @@ -SUMMARY = "gnu-configize" -DESCRIPTION = "Tool that installs the GNU config.guess / config.sub into a directory tree" -SECTION = "devel" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://config.guess;endline=39;md5=0e6ca0501b27177f3bc640f7225e3ead" - -DEPENDS_class-native = "perl-native-runtime" - -INHIBIT_DEFAULT_DEPS = "1" - -SRCREV = "a47f842264fc19837f8a00eb1d2d254a4c527334" -PV = "1.0+git${SRCPV}" -PR = "r0" - -SRC_URI = "git://git.sv.gnu.org/config.git \ - file://gnu-configize.in" - -S = "${WORKDIR}/git" - -do_compile() { - : -} - -do_install () { - install -d ${D}${datadir}/gnu-config \ - ${D}${bindir} - cat ${WORKDIR}/gnu-configize.in | \ - sed -e 's,@gnu-configdir@,${datadir}/gnu-config,g' \ - -e 's,@autom4te_perllibdir@,${datadir}/autoconf,g' > ${D}${bindir}/gnu-configize - # In the native case we want the system perl as perl-native can't have built yet - if [ "${PN}" != "gnu-config-native" -a "${PN}" != "nativesdk-gnu-config" ]; then - sed -i -e 's,/usr/bin/env,${bindir}/env,g' ${D}${bindir}/gnu-configize - fi - chmod 500 ${D}${bindir}/gnu-configize - install -m 0644 config.guess config.sub ${D}${datadir}/gnu-config/ -} - -PACKAGES = "${PN}" -FILES_${PN} = "${bindir} ${datadir}/gnu-config" - -BBCLASSEXTEND = "native" diff --git a/meta-openeuler/recipes-devtools/intltool/intltool_%.bbappend b/meta-openeuler/recipes-devtools/intltool/intltool_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..bff66d236fd73301a40a31ecd5dd6ae7170bc042 --- /dev/null +++ b/meta-openeuler/recipes-devtools/intltool/intltool_%.bbappend @@ -0,0 +1,16 @@ +# main bbfile: yocto-poky/meta/recipes-devtools/intltool/intltool_0.51.0.bb + +PV = "0.51.0" + +# remove tar.gz files and code patches from poky +SRC_URI_remove = " \ + http://launchpad.net/${BPN}/trunk/${PV}/+download/${BP}.tar.gz \ +" + +# append files and patches from openeuler +# failed patches of openeuler: intltool-perl5.26-regex-fixes.patch +SRC_URI_append = " \ + file://intltool-${PV}.tar.gz \ + file://intltool-merge-Create-cache-file-atomically.patch \ + file://intltool_distcheck-fix.patch \ +" diff --git a/meta-openeuler/recipes-devtools/json-c/json-c_%.bbappend b/meta-openeuler/recipes-devtools/json-c/json-c_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..f933d6b6e03615bb57402a70230626e19218a1f0 --- /dev/null +++ b/meta-openeuler/recipes-devtools/json-c/json-c_%.bbappend @@ -0,0 +1,12 @@ +# main bbfile: yocto-poky/meta/recipes-devtools/json-c/json-c_0.15.bb + +# json-c version in openEuler +PV = "0.15-20200726" + +# apply patch +SRC_URI += "file://${BPN}/backport-json-escape-str-avoid-harmless-unsigned-integer-overflow.patch" + +SRC_URI[md5sum] = "b3841c9abdca837ea00ce6a5ada4bb2c" +SRC_URI[sha256sum] = "4ba9a090a42cf1e12b84c64e4464bb6fb893666841d5843cc5bef90774028882" + +S = "${WORKDIR}/json-c-json-c-0.15-20200726" diff --git a/meta-openeuler/recipes-devtools/libtool/libtool-cross_%.bbappend b/meta-openeuler/recipes-devtools/libtool/libtool-cross_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..11704bad8763261b30817abdd8b13c1a16e22f25 --- /dev/null +++ b/meta-openeuler/recipes-devtools/libtool/libtool-cross_%.bbappend @@ -0,0 +1,13 @@ +# main bbfile: yocto-poky/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb + +SRC_URI_remove = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \ +" + +# apply openeuler source package and patches +SRC_URI_prepend = " \ + file://libtool/libtool-${PV}.tar.xz \ + file://libtool/libtool-2.4.5-rpath.patch \ + file://libtool/libtool-2.4.6-am-1.16-test.patch \ + file://libtool/libtool-exit-verbosely-for-fatal-configure-problems.patch \ + file://libtool/libtool-fix-GCC-linking-with-specs.patch \ +" diff --git a/meta-openeuler/recipes-devtools/m4/m4_%.bbappend b/meta-openeuler/recipes-devtools/m4/m4_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..171484599e62850fc6c8438b56a7caeff2386b88 --- /dev/null +++ b/meta-openeuler/recipes-devtools/m4/m4_%.bbappend @@ -0,0 +1,27 @@ +PV = "1.4.19" + +# AN_GNU_GETTEXT is used, need to inherit gettext +inherit gettext + +SRC_URI[md5sum] = "0d90823e1426f1da2fd872df0311298d" +SRC_URI[sha256sum] = "63aede5c6d33b6d9b13511cd0be2cac046f2e70fd0a07aa9573a04a82783af96" + +LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464\ + file://examples/COPYING;md5=4031593b2166d6c47cae282d944a7ede" + + +# remove tar.gz files and code patches from poky +SRC_URI_remove = " \ + ${GNU_MIRROR}/m4/m4-${PV}.tar.gz \ + file://ac_config_links.patch \ + file://m4-1.4.18-glibc-change-work-around.patch \ + file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ + file://serial-tests-config.patch \ + file://0001-test-getopt-posix-fix.patch \ +" + +# append files and patches from openeuler +SRC_URI_append = " \ + file://m4/m4-${PV}.tar.xz \ + file://0001-Delete-test-execute_sh.patch \ +" diff --git a/meta-openeuler/recipes-devtools/nasm/nasm_%.bbappend b/meta-openeuler/recipes-devtools/nasm/nasm_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..1252ffa7063e4a7283bfdf0795f69fd4695ab26b --- /dev/null +++ b/meta-openeuler/recipes-devtools/nasm/nasm_%.bbappend @@ -0,0 +1,6 @@ +# main bbfile: yocto-poky/meta/recipes-devtools/nasm/nasm_2.15.05.bb + +# files, patches that come from openeuler +SRC_URI_prepend = " \ + file://enable-make-check.patch \ +" diff --git a/meta-openeuler/recipes-devtools/opkg-utils/opkg-utils_%.bbappend b/meta-openeuler/recipes-devtools/opkg-utils/opkg-utils_%.bbappend index b4fe01219cc27ffd5dc72296c69095c12ec927e5..3ccc35d57dc39f021c4caddec6eb6f4da2cf1589 100644 --- a/meta-openeuler/recipes-devtools/opkg-utils/opkg-utils_%.bbappend +++ b/meta-openeuler/recipes-devtools/opkg-utils/opkg-utils_%.bbappend @@ -1,6 +1,8 @@ # acl version in openEuler PV = "0.5.0" +OPENEULER_REPO_NAME = "yocto-opkg-utils" + # currently, openeuler_embedded only supports update-alternatives, no python PACKAGECONFIG = "update-alternatives" diff --git a/meta-openeuler/recipes-devtools/perl-cross/files/0001-Makefile-check-the-file-if-patched-or-not.patch b/meta-openeuler/recipes-devtools/perl-cross/files/0001-Makefile-check-the-file-if-patched-or-not.patch new file mode 100644 index 0000000000000000000000000000000000000000..8c8f3b717c87add9acc01bbbdc83847721a56a24 --- /dev/null +++ b/meta-openeuler/recipes-devtools/perl-cross/files/0001-Makefile-check-the-file-if-patched-or-not.patch @@ -0,0 +1,31 @@ +From 24a3e0c48f9ebe473b5f1078663e275c27d0537f Mon Sep 17 00:00:00 2001 +From: Mingli Yu +Date: Fri, 2 Jul 2021 09:08:21 +0000 +Subject: [PATCH] Makefile: check the file if patched or not + +Check the file if patched or not to avoid patched more than +one time. + +Upstream-Status: Inappropriate (OE-specific) + +Signed-off-by: Mingli Yu +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index f4a26f5..7bc748e 100644 +--- a/Makefile ++++ b/Makefile +@@ -61,7 +61,7 @@ miniperlmain$O: $(CROSSPATCHED) + # Original versions are not saved anymore; patch generally takes care of this, + # and if that fails, reaching for the source tarball is the safest option. + $(CROSSPATCHED): %.applied: %.patch +- patch -p1 -i $< && touch $@ ++ test ! -f $@ && (patch -p1 -i $< && touch $@) || echo "$@ exist" + + # ---[ common ]----------------------------------------------------------------- + +-- +2.29.2 + diff --git a/meta-openeuler/recipes-devtools/perl-cross/files/0001-Makefile-correctly-list-modules-when-cleaning-them.patch b/meta-openeuler/recipes-devtools/perl-cross/files/0001-Makefile-correctly-list-modules-when-cleaning-them.patch new file mode 100644 index 0000000000000000000000000000000000000000..80388fa9b0f4dd7a585a9b23cdbe8655e9fc81ff --- /dev/null +++ b/meta-openeuler/recipes-devtools/perl-cross/files/0001-Makefile-correctly-list-modules-when-cleaning-them.patch @@ -0,0 +1,24 @@ +From 7b8d819e012c24df228a313beb86e1942611c904 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Sat, 4 Jun 2022 13:00:12 +0200 +Subject: [PATCH] Makefile: correctly list modules when cleaning them + +Upstream-Status: Submitted [https://github.com/arsv/perl-cross/pull/133] +Signed-off-by: Alexander Kanavin +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 6b35fb0..9ef9324 100644 +--- a/Makefile ++++ b/Makefile +@@ -462,7 +462,7 @@ clean-subdirs: + + # assuming modules w/o Makefiles were never built and need no cleaning + clean-modules: config.h +- @for i in $(modules disabled); do \ ++ @for i in $(modules) $(disabled); do \ + test -f $$i/Makefile && \ + touch $$i/Makefile && \ + $(MAKE) -C $$i clean \ diff --git a/meta-openeuler/recipes-devtools/perl-cross/files/0001-Makefile-do-not-clean-config.h-xconfig.h.patch b/meta-openeuler/recipes-devtools/perl-cross/files/0001-Makefile-do-not-clean-config.h-xconfig.h.patch new file mode 100644 index 0000000000000000000000000000000000000000..cbb935c71b786ef4567af5ecf4c2fe74e433e39f --- /dev/null +++ b/meta-openeuler/recipes-devtools/perl-cross/files/0001-Makefile-do-not-clean-config.h-xconfig.h.patch @@ -0,0 +1,28 @@ +From ade4a70308d3b9d79cc3db841c0f60385780fe1a Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Sat, 4 Jun 2022 13:45:20 +0200 +Subject: [PATCH] Makefile: do not clean config.h/xconfig.h + +These are generated by ./configure and not by make. + +Upstream-Status: Submitted [https://github.com/arsv/perl-cross/pull/134] +Signed-off-by: Alexander Kanavin +--- + Makefile | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 9ef9324..3de2c2e 100644 +--- a/Makefile ++++ b/Makefile +@@ -473,7 +473,6 @@ clean-generated-files: + -rm -f uudmap.h opmini.c generate_uudmap$X bitcount.h $(CONFIGPM) + -rm -f git_version.h lib/re.pm lib/Config_git.pl + -rm -f perlmini.c perlmain.c +- -rm -f config.h xconfig.h + -rm -f pod/perlmodlib.pod + -rm -f ext.libs static.list + -rm -f $(patsubst %,%/ppport.h,$(mkppport_lst)) +-- +2.30.2 + diff --git a/meta-openeuler/recipes-devtools/perl-cross/files/0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch b/meta-openeuler/recipes-devtools/perl-cross/files/0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch new file mode 100644 index 0000000000000000000000000000000000000000..6c3f08c4324ab6accb98ed14336727b5d8fa07f6 --- /dev/null +++ b/meta-openeuler/recipes-devtools/perl-cross/files/0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch @@ -0,0 +1,27 @@ +From f824cbec9ac8f113a4ae35d57bd18625d415a71b Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Tue, 27 Nov 2018 15:37:40 +0100 +Subject: [PATCH] perl-cross: add LDFLAGS when linking libperl + +Upstream-Status: Submitted [https://github.com/arsv/perl-cross/pull/122] +Signed-off-by: Alexander Kanavin +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 01644cd..be811a7 100644 +--- a/Makefile ++++ b/Makefile +@@ -180,7 +180,7 @@ endif + + ifeq ($(useshrplib),true) + $(LIBPERL): +- $(CC) $(LDDLFLAGS) -o $@ $(filter %$o,$^) $(LIBS) ++ $(CC) $(LDFLAGS) $(LDDLFLAGS) -o $@ $(filter %$o,$^) $(LIBS) + else + $(LIBPERL): + $(AR) cru $@ $(filter %$o,$^) +-- +2.17.1 + diff --git a/meta-openeuler/recipes-devtools/perl-cross/files/README.md b/meta-openeuler/recipes-devtools/perl-cross/files/README.md new file mode 100644 index 0000000000000000000000000000000000000000..93217245c88ae9e8c027c2b0f1a3b54ddc139e0f --- /dev/null +++ b/meta-openeuler/recipes-devtools/perl-cross/files/README.md @@ -0,0 +1,29 @@ +**perl-cross** provides configure script, top-level Makefile +and some auxiliary files for [perl](http://www.perl.org), +with the primary emphasis on cross-compiling the source. + + # Get perl and perl-cross sources + curl -L -O http://www.cpan.org/src/5.0/perl-5.24.1.tar.gz + curl -L -O https://github.com/arsv/perl-cross/releases/download/1.1.3/perl-cross-1.1.3.tar.gz + + # Unpack perl-cross over perl, overwriting Makefile + tar -zxf perl-5.24.1.tar.gz + cd perl-5.24.1 + tar --strip-components=1 -zxf ../perl-cross-1.1.3.tar.gz + + # Proceed as usual with most autoconfed packages + ./configure --target=arm-linux-gnueabi --prefix=/usr -Duseshrplib + make -j4 + make DESTDIR=/path/to/staging/dir install + +Unlike mainline Perl, this configure never runs any target executables, +relying solely on compile/link tests and pre-defined hints. +On the flip side, it is only meant to run on resonably sane modern unix systems. + +Check [project pages](http://arsv.github.io/perl-cross/) for more info. +In particular, [configure usage](http://arsv.github.io/perl-cross/usage.html) +lists available configure options. + +Perl-cross is a free software licensed under the same terms +as the original perl source. +See LICENSE, Copying and Artistic files. diff --git a/meta-openeuler/recipes-devtools/perl-cross/files/determinism.patch b/meta-openeuler/recipes-devtools/perl-cross/files/determinism.patch new file mode 100644 index 0000000000000000000000000000000000000000..e9bf752bcb64477c9efe9b8e7074569138940893 --- /dev/null +++ b/meta-openeuler/recipes-devtools/perl-cross/files/determinism.patch @@ -0,0 +1,46 @@ +Fixes to make the perl build reproducible: + +a) Remove the \n from configure_attr.sh since it gets quoted differently depending on + whether the shell is bash or dash which can cause the test result to be incorrect. + Reported upstream: https://github.com/arsv/perl-cross/issues/87 + +b) Sort the order of the module lists from configure_mods.sh since otherwise + the result isn't the same leading to makefile differences. + Reported upstream: https://github.com/arsv/perl-cross/issues/88 + +c) Sort the Encode::Byte byte_t.fnm file output (and the makefile depends whilst + there for good measure) + This needs to go to upstream perl (not done) + +d) Use bash for perl-cross configure since otherwise trnl gets set to "\n" with bash + and "" with dash + Reported upstream: https://github.com/arsv/perl-cross/issues/87 + +RP 2020/2/7 + +Upstream-Status: Pending [75% submitted] +Signed-off-by: Richard Purdie -Date: Mon, 26 Jul 2021 11:38:43 -0700 -Subject: [PATCH] Avoid use of INSTALL_DIR for symlink targets - -In case INSTALL_DIR is overridden with a staged install location, using -INSTALL_DIR for the symlink target path prefix will yield an incorrect location -for the final installation. - -Because the symlink itself is already installed to INSTALL_DIR, simply removing -the INSTALL_DIR prefix suffices as a fix. - -Note that using $DESTDIR/$INSTALL_DIR where appropriate can avoid this type of -issue, but that can be considered a future enhancement. - -Signed-off-by: Patrick McCarty ---- - squashfs-tools/Makefile | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/squashfs-tools/Makefile b/squashfs-tools/Makefile -index f5a55f1..7262a2e 100755 ---- a/squashfs-tools/Makefile -+++ b/squashfs-tools/Makefile -@@ -406,5 +406,5 @@ install: mksquashfs unsquashfs - mkdir -p $(INSTALL_DIR) - cp mksquashfs $(INSTALL_DIR) - cp unsquashfs $(INSTALL_DIR) -- ln -fs $(INSTALL_DIR)/unsquashfs $(INSTALL_DIR)/sqfscat -- ln -fs $(INSTALL_DIR)/mksquashfs $(INSTALL_DIR)/sqfstar -+ ln -fs unsquashfs $(INSTALL_DIR)/sqfscat -+ ln -fs mksquashfs $(INSTALL_DIR)/sqfstar --- -2.30.0 - diff --git a/meta-openeuler/recipes-devtools/squashfs-tools/squashfs-tools_%.bbappend b/meta-openeuler/recipes-devtools/squashfs-tools/squashfs-tools_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..181ec2c9e8360cb1764734dd626fec2daafc0850 --- /dev/null +++ b/meta-openeuler/recipes-devtools/squashfs-tools/squashfs-tools_%.bbappend @@ -0,0 +1,26 @@ +# main bbfile: yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb + +#version in openEuler +PV = "4.5" + +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +# files, patches can't be applied in openeuler or conflict with openeuler +SRC_URI_remove = " \ + git://github.com/plougher/squashfs-tools.git;protocol=https \ + file://0001-squashfs-tools-fix-build-failure-against-gcc-10.patch;striplevel=2 \ + " + +S = "${WORKDIR}/${BP}" +B = "${S}/${PN}" + +# files, patches that come from openeuler +SRC_URI += " \ + file://squashfs4.5.tar.gz \ + file://0001-CVE-2021-41072.patch \ + file://0002-CVE-2021-41072.patch \ + file://0003-CVE-2021-41072.patch \ + file://0004-CVE-2021-41072.patch \ + file://0005-CVE-2021-41072.patch \ + " + diff --git a/meta-openeuler/recipes-devtools/squashfs-tools/squashfs-tools_4.5.bb b/meta-openeuler/recipes-devtools/squashfs-tools/squashfs-tools_4.5.bb deleted file mode 100644 index 2b6a1cd25a5f9726a813e971f87fdd4e168c0d42..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-devtools/squashfs-tools/squashfs-tools_4.5.bb +++ /dev/null @@ -1,43 +0,0 @@ -# Note, we can probably remove the lzma option as it has be replaced with xz, -# and I don't think the kernel supports it any more. -SUMMARY = "Tools for manipulating SquashFS filesystems" -HOMEPAGE = "https://github.com/plougher/squashfs-tools" -DESCRIPTION = "Tools to create and extract Squashfs filesystems." -SECTION = "base" -LICENSE = "GPL-2" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -SRC_URI = "file://squashfs-tools/squashfs4.5.tar.gz \ - file://squashfs-tools/0001-CVE-2021-41072.patch \ - file://squashfs-tools/0002-CVE-2021-41072.patch \ - file://squashfs-tools/0003-CVE-2021-41072.patch \ - file://squashfs-tools/0004-CVE-2021-41072.patch \ - file://squashfs-tools/0005-CVE-2021-41072.patch \ - file://0001-Avoid-use-of-INSTALL_DIR-for-symlink-targets.patch \ -" - -S = "${WORKDIR}/${BP}" -B = "${S}/${PN}" - -EXTRA_OEMAKE = "${PACKAGECONFIG_CONFARGS}" - -PACKAGECONFIG ??= "gzip xz xattr" -PACKAGECONFIG[gzip] = "GZIP_SUPPORT=1,GZIP_SUPPORT=0,zlib" -PACKAGECONFIG[xz] = "XZ_SUPPORT=1,XZ_SUPPORT=0,xz" -PACKAGECONFIG[xattr] = "XATTR_SUPPORT=1,XATTR_SUPPORT=0,attr" - -do_compile() { - oe_runmake all -} - -do_install() { - oe_runmake install INSTALL_DIR=${D}${sbindir} -} - -ARM_INSTRUCTION_SET_armv4 = "arm" -ARM_INSTRUCTION_SET_armv5 = "arm" -ARM_INSTRUCTION_SET_armv6 = "arm" - -BBCLASSEXTEND = "native nativesdk" - -CVE_PRODUCT = "squashfs" diff --git a/meta-openeuler/recipes-devtools/strace/strace/run-ptest b/meta-openeuler/recipes-devtools/strace/strace/run-ptest deleted file mode 100755 index 3a51fb0be9d8b844cd4b285d8da4ac0da4aa53a4..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-devtools/strace/strace/run-ptest +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -export TIMEOUT_DURATION=240 -chown nobody tests -chown nobody tests/* -chown nobody ../ptest -su nobody -c "make -B -C tests -k test-suite.log" diff --git a/meta-openeuler/recipes-devtools/strace/strace_%.bbappend b/meta-openeuler/recipes-devtools/strace/strace_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..a599e0ff3762614f01ea52f13389928fdcee5955 --- /dev/null +++ b/meta-openeuler/recipes-devtools/strace/strace_%.bbappend @@ -0,0 +1,10 @@ +# main bbfile: yocto-poky/meta/recipes-devtools/strace/strace_5.11.bb + +# strace version in openEuler +PV = "5.14" + +# remove conflicting patch +SRC_URI_remove += "file://Makefile-ptest.patch" + +SRC_URI[md5sum] = "36c1c17f31855617b7898d2fd5abb9e2" +SRC_URI[sha256sum] = "901bee6db5e17debad4530dd9ffb4dc9a96c4a656edbe1c3141b7cb307b11e73" diff --git a/meta-openeuler/recipes-devtools/strace/strace_5.14.bb b/meta-openeuler/recipes-devtools/strace/strace_5.14.bb deleted file mode 100644 index 7125c0ef9e100afe1523cf7663fdb08e0b813c73..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-devtools/strace/strace_5.14.bb +++ /dev/null @@ -1,49 +0,0 @@ -SUMMARY = "System call tracing tool" -HOMEPAGE = "http://strace.io" -DESCRIPTION = "strace is a diagnostic, debugging and instructional userspace utility for Linux. It is used to monitor and tamper with interactions between processes and the Linux kernel, which include system calls, signal deliveries, and changes of process state." -SECTION = "console/utils" -LICENSE = "LGPL-2.1+ & GPL-2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=318cfc887fc8723f4e9d4709b55e065b" - -SRC_URI = "file://strace/strace-${PV}.tar.xz \ - file://run-ptest \ - " -SRC_URI[sha256sum] = "901bee6db5e17debad4530dd9ffb4dc9a96c4a656edbe1c3141b7cb307b11e73" - -inherit autotools ptest - -#PACKAGECONFIG_class-target ??= "\ -# ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ -#" - -#PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,bluez5" -PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind" - -EXTRA_OECONF += "--enable-mpers=no --disable-gcc-Werror" - -CFLAGS_append_libc-musl = " -Dsigcontext_struct=sigcontext" - -TESTDIR = "tests" -PTEST_BUILD_HOST_PATTERN = "^(DEB_CHANGELOGTIME|RPM_CHANGELOGTIME|WARN_CFLAGS_FOR_BUILD|LDFLAGS_FOR_BUILD)" - -do_compile_ptest() { - oe_runmake ${PARALLEL_MAKE} -C ${TESTDIR} buildtest-TESTS -} - -do_install_ptest() { - oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR} - mkdir -p ${D}${PTEST_PATH}/build-aux - mkdir -p ${D}${PTEST_PATH}/src - install -m 755 ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/ - install -m 644 ${B}/src/config.h ${D}${PTEST_PATH}/src/ - sed -i -e '/^src/s/strace.*[0-9]/ptest/' ${D}/${PTEST_PATH}/${TESTDIR}/Makefile -} - -RDEPENDS_${PN}-ptest += "make coreutils grep gawk sed" - -RDEPENDS_${PN}-ptest_append_libc-glibc = "\ - locale-base-en-us.iso-8859-1 \ -" - -BBCLASSEXTEND = "native" -TOOLCHAIN = "gcc" diff --git a/meta-openeuler/recipes-devtools/syslinux/syslinux_%.bbappend b/meta-openeuler/recipes-devtools/syslinux/syslinux_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..4b109491f8bffb836deb88ed02e6a3c4963ea264 --- /dev/null +++ b/meta-openeuler/recipes-devtools/syslinux/syslinux_%.bbappend @@ -0,0 +1,31 @@ +# main bb file: yocto-poky/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb +# isolinux.bin is used to support PCBIOS startup ISO, which is also the bootloader like grub + +# version in openEuler +PV = "6.04-pre1" + +# files, patches can't be applied in openeuler or conflict with openeuler +SRC_URI_remove = " \ + https://www.zytor.com/pub/syslinux/Testing/6.04/syslinux-${PV}.tar.xz \ + file://determinism.patch \ +" + +# files, patches that come from openeuler +SRC_URI_prepend = " \ + file://${BP}.tar.xz;name=tarball \ + file://0001-Add-install-all-target-to-top-side-of-HAVE_FIRMWARE.patch \ + file://0002-ext4-64bit-feature.patch \ + file://0003-include-sysmacros-h.patch \ + file://backport-add-RPMOPTFLAGS-to-CFLAGS-for-some-stuff.patch \ + file://backport-replace-builtin-strlen-that-appears-to-get-optimized.patch \ + file://backport-tweak-for-gcc-10.patch \ +" + +SRC_URI[tarball.md5sum] = "f9c956fde0de29be297402ecbc8ff4d0" +SRC_URI[tarball.sha256sum] = "3f6d50a57f3ed47d8234fd0ab4492634eb7c9aaf7dd902f33d3ac33564fd631d" + +do_install_append() { + install -d ${D}${datadir}/syslinux/ + install -m 644 ${S}/bios/core/isolinux.bin ${D}${datadir}/syslinux/ + install -m 644 ${S}/bios/com32/elflink/ldlinux/ldlinux.c32 ${D}${datadir}/syslinux/ +} diff --git a/meta-openeuler/recipes-labtools/bash/bash_5.1.8.bb b/meta-openeuler/recipes-extended/bash/bash_%.bbappend similarity index 37% rename from meta-openeuler/recipes-labtools/bash/bash_5.1.8.bb rename to meta-openeuler/recipes-extended/bash/bash_%.bbappend index 23a69ac5f9190f923f0b9f91d03b02417155f933..9e621703e731b5fcdbe365e94e2b3966cc40b31b 100644 --- a/meta-openeuler/recipes-labtools/bash/bash_5.1.8.bb +++ b/meta-openeuler/recipes-extended/bash/bash_%.bbappend @@ -1,8 +1,18 @@ -require bash.inc +# main bbfile: yocto-poky/meta/recipes-extended/bash/bash_5.1.bb -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" +# bash version in openeuler +PV = "5.1.8" -SRC_URI = "file://bash/${BP}.tar.gz \ +# These patches have been merged in this version +SRC_URI_remove += " \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash51-001;apply=yes;striplevel=0;name=patch001 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash51-002;apply=yes;striplevel=0;name=patch002 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash51-003;apply=yes;striplevel=0;name=patch003 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash51-004;apply=yes;striplevel=0;name=patch004 \ + " + +# patches in openeuler +SRC_URI_append += " \ file://bash/bash-2.05a-interpreter.patch \ file://bash/bash-2.05b-pgrp_sync.patch \ file://bash/bash-4.0-nobits.patch \ @@ -11,10 +21,7 @@ SRC_URI = "file://bash/${BP}.tar.gz \ file://bash/bash-4.3-memleak-lc_all.patch \ file://bash/bugfix-Forbidden-non-root-user-to-clear-history.patch \ file://bash/enable-dot-logout-and-source-bashrc-through-ssh.patch \ + file://bash/cd-alias.patch \ " -# GPLv2+ (< 4.0), GPLv3+ (>= 4.0) -LICENSE = "GPLv3+" - - -BBCLASSEXTEND = "nativesdk" +SRC_URI[tarball.sha256sum] = "0cfb5c9bb1a29f800a97bd242d19511c997a1013815b805e0fdd32214113d6be" diff --git a/meta-openeuler/recipes-extended/bzip2/bzip2_%.bbappend b/meta-openeuler/recipes-extended/bzip2/bzip2_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..f2ab2557d1805364a3f28bf11186dc151b1f2869 --- /dev/null +++ b/meta-openeuler/recipes-extended/bzip2/bzip2_%.bbappend @@ -0,0 +1,15 @@ +# main bbfile: yocto-poky/meta/recipes-extended/bzip2/bzip2_1.0.8.bb + +# remove conflict files from poky +SRC_URI_remove = "git://sourceware.org/git/bzip2-tests.git;name=bzip2-tests \ +" + +LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;endline=37;md5=600af43c50f1fcb82e32f19b32df4664 \ + file://${S}/LICENSE;md5=1e5cffe65fc786f83a11a4b225495c0b \ +" + +# patches in openeuler +SRC_URI_append = " \ + file://0001-add-compile-option.patch \ + file://0002-CVE-2019-12900.patch \ +" diff --git a/meta-openeuler/recipes-extended/cracklib/cracklib_%.bbappend b/meta-openeuler/recipes-extended/cracklib/cracklib_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..6e6691c80cc6b582f70dae0c4629815875c4d966 --- /dev/null +++ b/meta-openeuler/recipes-extended/cracklib/cracklib_%.bbappend @@ -0,0 +1,16 @@ +PV = "2.9.7" + +# delete lower version patch from poky +SRC_URI_remove += " \ + file://0001-Apply-patch-to-fix-CVE-2016-6318.patch \ +" + +# add openeuler patches +SRC_URI += " \ + file://fix-problem-of-error-message-about-simplistic-passwo.patch \ + file://backport-cracklib-2.9.6-lookup.patch \ +" + +SRC_URI[md5sum] = "48a0c8810ec4780b99c0a4f9931c21c6" +SRC_URI[sha256sum] = "8b6fd202f3f1d8fa395d3b7a5d821227cfd8bb4a9a584a7ae30cf62cea6287dd" + diff --git a/meta-openeuler/recipes-extended/cronie/cronie_%.bbappend b/meta-openeuler/recipes-extended/cronie/cronie_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..a89c49b5ed002b0b3d9b4fad358cd460e2e49c97 --- /dev/null +++ b/meta-openeuler/recipes-extended/cronie/cronie_%.bbappend @@ -0,0 +1,9 @@ +PV = "1.5.7" + +SRC_URI += " \ + file://bugfix-cronie-systemd-alias.patch \ +" + +SRC_URI[md5sum] = "544f141aa4e34e0a176529be08441756" +SRC_URI[sha256sum] = "538bcfaf2e986e5ae1edf6d1472a77ea8271d6a9005aee2497a9ed6e13320eb3" + diff --git a/meta-openeuler/recipes-extended/ethtool/ethtool_%.bbappend b/meta-openeuler/recipes-extended/ethtool/ethtool_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..bee785a8b955d338fa290683cd58fb9ba4a10579 --- /dev/null +++ b/meta-openeuler/recipes-extended/ethtool/ethtool_%.bbappend @@ -0,0 +1,8 @@ +PV = "5.15" + +SRC_URI = " \ + file://ethtool-5.15.tar.xz \ + file://avoid_parallel_tests.patch \ +" + +SRC_URI[sha256sum] = "686fd6110389d49c2a120f00c3cd5dfe43debada8e021e4270d74bbe452a116d" diff --git a/meta-openeuler/recipes-extended/findutils/findutils_%.bbappend b/meta-openeuler/recipes-extended/findutils/findutils_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..f3de2d6aff525e53a229d29ff57bbe0b9fd18001 --- /dev/null +++ b/meta-openeuler/recipes-extended/findutils/findutils_%.bbappend @@ -0,0 +1,7 @@ +# main bbfile: yocto-poky/meta/recipes-extended/findutils/findutils_4.8.0.bb + +# files, patches that come from openeuler +SRC_URI += " \ + file://0001-findutils-leaf-opt.patch \ + file://0001-findutils-xautofs.patch \ +" diff --git a/meta-openeuler/recipes-extended/gawk/gawk_%.bbappend b/meta-openeuler/recipes-extended/gawk/gawk_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..58718d76c39e01ffc17c52fa281dd9d113595a2d --- /dev/null +++ b/meta-openeuler/recipes-extended/gawk/gawk_%.bbappend @@ -0,0 +1,20 @@ +# main bbfile: yocto-poky/meta/recipes-extended/gawk/gawk_5.1.0.bb + +# version in openEuler +PV = "5.1.1" + +# files, patches can't be applied in openeuler or conflict with openeuler +SRC_URI_remove = " \ + ${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \ +" + +# files, patches that come from openeuler +# Reorder-statements-in-iolint-to-try-to-eliminate-a-r.patch fails to apply +SRC_URI += " \ + file://${BP}.tar.xz;name=tarball \ + file://Disable-racy-test-in-test-iolint.awk.patch \ + file://Restore-removed-test-in-test-iolint.awk.patch \ +" + +SRC_URI[tarball.md5sum] = "83650aa943ff2fd519b2abedf8506ace" +SRC_URI[tarball.sha256sum] = "d87629386e894bbea11a5e00515fc909dc9b7249529dad9e6a3a2c77085f7ea2" diff --git a/meta-openeuler/recipes-extended/grep/grep_%.bbappend b/meta-openeuler/recipes-extended/grep/grep_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..35d33993042a0d3022645b00ee8b0263ab864ef9 --- /dev/null +++ b/meta-openeuler/recipes-extended/grep/grep_%.bbappend @@ -0,0 +1,8 @@ +PV = "3.7" + +SRC_URI += " \ + file://backport-grep-avoid-sticky-problem-with-f-f.patch \ + file://backport-grep-s-does-not-suppress-binary-file-matches.patch \ +" + +SRC_URI[sha256sum] = "5c10da312460aec721984d5d83246d24520ec438dd48d7ab5a05dbc0d6d6823c" diff --git a/meta-openeuler/recipes-extended/gzip/gzip_%.bbappend b/meta-openeuler/recipes-extended/gzip/gzip_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..9dfa417fd672c2f6282ec0b1c3f824b522038008 --- /dev/null +++ b/meta-openeuler/recipes-extended/gzip/gzip_%.bbappend @@ -0,0 +1,21 @@ +# main bbfile: yocto-poky/meta/recipes-extended/gzip/gzip_1.10.bb + +# gzip version in openEuler +PV = "1.11" + +# Use the source packages from openEuler +SRC_URI_remove = "${GNU_MIRROR}/gzip/${BP}.tar.gz" +SRC_URI_prepend += "file://gzip/${BP}.tar.xz \ + file://gzip/gzip-l-now-outputs-accurate-size.patch \ + file://gzip/doc-document-gzip-l-change.patch \ + file://gzip/zdiff-fix-arg-handling-bug.patch \ + file://gzip/zdiff-fix-another-arg-handling-bug.patch \ + file://gzip/fix-verbose-disable.patch \ + " + +# apply poky's patch +SRC_URI_remove_class-target = " file://wrong-path-fix.patch" +SRC_URI_append_class-target = " file://../gzip-1.10/wrong-path-fix.patch" + +SRC_URI[md5sum] = "d1e93996dba00cab0caa7903cd01d454" +SRC_URI[sha256sum] = "9b9a95d68fdcb936849a4d6fada8bf8686cddf58b9b26c9c4289ed0c92a77907" diff --git a/meta-openeuler/recipes-extended/iptables/iptables_%.bbappend b/meta-openeuler/recipes-extended/iptables/iptables_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..a0d1a25b6ce2d42899ae9e38c5d06605b1d2ca5a --- /dev/null +++ b/meta-openeuler/recipes-extended/iptables/iptables_%.bbappend @@ -0,0 +1,4 @@ +SRC_URI += " \ + file://bugfix-add-check-fw-in-entry.patch \ + file://tests-extensions-add-some-testcases.patch \ +" diff --git a/meta-openeuler/recipes-extended/less/less_%.bbappend b/meta-openeuler/recipes-extended/less/less_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..a825d94336a82e5becd74211f333a333afc7f518 --- /dev/null +++ b/meta-openeuler/recipes-extended/less/less_%.bbappend @@ -0,0 +1,15 @@ +# main bbfile: yocto-poky/meta/recipes-extended/less/less_563.bb + +# less version in openEuler +PV = "590" + +# Use the source packages from openEuler +SRC_URI_remove = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz" +SRC_URI += "file://${BPN}/${BPN}-${PV}.tar.gz \ + file://${BPN}/less-394-time.patch \ + " + +SRC_URI[md5sum] = "f029087448357812fba450091a1172ab" +SRC_URI[sha256sum] = "6aadf54be8bf57d0e2999a3c5d67b1de63808bb90deb8f77b028eafae3a08e10" + +S = "${WORKDIR}/${BP}" diff --git a/meta-openeuler/recipes-extended/libaio/libaio_%.bbappend b/meta-openeuler/recipes-extended/libaio/libaio_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..67b74a745f53c03cb709efb00bc3e2df020f8706 --- /dev/null +++ b/meta-openeuler/recipes-extended/libaio/libaio_%.bbappend @@ -0,0 +1,16 @@ +#apply package and patches from openeuler +SRC_URI = " \ + file://libaio-0.3.112.tar.gz \ + file://0000-libaio-install-to-destdir-slash-usr.patch \ + file://0001-libaio-arm64-ilp32.patch \ + file://0002-libaio-makefile-cflags.patch \ + file://0003-libaio-fix-for-x32.patch \ + file://0004-libaio-makefile-add-D_FORTIFY_SOURCE-flag.patch \ +" + +SRC_URI[sha256sum] = "ab0462f2c9d546683e5147b1ce9c195fe95d07fac5bf362f6c01637955c3b492" + +S = "${WORKDIR}/${BPN}-${PV}" + +# fix libaio.a install fail, need to set install prefix dir +EXTRA_OEMAKE =+ "usrlibdir=${D}${libdir}" diff --git a/meta-openeuler/recipes-extended/libarchive/libarchive_%.bbappend b/meta-openeuler/recipes-extended/libarchive/libarchive_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..fdf801db55b07b583144d8d4503fdc58a579a769 --- /dev/null +++ b/meta-openeuler/recipes-extended/libarchive/libarchive_%.bbappend @@ -0,0 +1,19 @@ +PV = "3.5.2" + +SRC_URI[sha256sum] = "5f245bd5176bc5f67428eb0aa497e09979264a153a074d35416521a5b8e86189" + +# add patches from openeuler +SRC_URI += " \ + file://backport-libarchive-3.5.2-symlink-fix.patch \ + file://backport-CVE-2021-36976.patch \ + file://backport-CVE-2021-31566.patch \ + file://backport-CVE-2022-26280.patch \ + file://libarchive-uninitialized-value.patch \ +" + +#${STAGING_INCDIR_NATIVE}/ext2fs not exist when not building e2fsprogs-native +python() { + openeuler_sysroot = d.getVar('OPENEULER_NATIVESDK_SYSROOT') + if openeuler_sysroot: + d.setVar('STAGING_INCDIR_NATIVE', "%s/usr/include" % openeuler_sysroot) +} diff --git a/meta-openeuler/recipes-core/libfastjson/libfastjson_0.99.9.bb b/meta-openeuler/recipes-extended/libfastjson/libfastjson_0.99.9.bb similarity index 42% rename from meta-openeuler/recipes-core/libfastjson/libfastjson_0.99.9.bb rename to meta-openeuler/recipes-extended/libfastjson/libfastjson_0.99.9.bb index 849eaf5107db2be44ca99f2c6d88712073dfcaaa..9e9f563b3ead4c1ea0e925a1d8b82ee551f9d7f6 100644 --- a/meta-openeuler/recipes-core/libfastjson/libfastjson_0.99.9.bb +++ b/meta-openeuler/recipes-extended/libfastjson/libfastjson_0.99.9.bb @@ -1,9 +1,17 @@ +# main bbfile: https://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-extended/rsyslog/libfastjson_0.99.9.bb + SUMMARY = "A fork of json-c library" HOMEPAGE = "https://github.com/rsyslog/libfastjson" + LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=a958bb07122368f3e1d9b2efe07d231f" +DEPENDS = "" + +# obatin source from local tarball SRC_URI = "file://${BPN}/${BP}.tar.gz" -CFLAGS="-lm" + +SRC_URI[md5sum] = "b4668f067145d4eb2a44433d5256f277" +SRC_URI[sha256sum] = "a330e1bdef3096b7ead53b4bad1a6158f19ba9c9ec7c36eda57de7729d84aaee" inherit autotools diff --git a/meta-openeuler/recipes-extended/libidn2/libidn2_%.bbappend b/meta-openeuler/recipes-extended/libidn2/libidn2_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..905f7cb5286a8a39e24e58fe8752a374c84cf039 --- /dev/null +++ b/meta-openeuler/recipes-extended/libidn2/libidn2_%.bbappend @@ -0,0 +1,28 @@ +# main bbfile: yocto-poky/meta/recipes-extended/libidn/libidn2_2.3.0.bb + +# version in openEuler +PV = "2.3.2" + +# solve lic check failed +LIC_FILES_CHKSUM_remove = " \ + file://src/idn2.c;endline=16;md5=426b74d6deb620ab6d39c8a6efd4c13a \ + file://lib/idn2.h.in;endline=27;md5=c2cd28d3f87260f157f022eabb83714f \ +" +LIC_FILES_CHKSUM += " \ + file://src/idn2.c;endline=16;md5=e4b6d628a84a55f1fd8ae4c76c5f6509 \ + file://lib/idn2.h.in;endline=27;md5=d0fc8ec628be130a1d5b889107e92477 \ +" + +# files, patches can't be applied in openeuler or conflict with openeuler +SRC_URI_remove = " \ + ${GNU_MIRROR}/libidn/${BPN}-${PV}.tar.gz \ +" + +# files, patches that come from openeuler +SRC_URI += " \ + file://${BP}.tar.gz;name=tarball \ + file://bugfix-libidn2-change-rpath.patch \ +" + +SRC_URI[tarball.md5sum] = "fb54962eb68cf22d47a4ae61f0aba993" +SRC_URI[tarball.sha256sum] = "76940cd4e778e8093579a9d195b25fff5e936e9dc6242068528b437a76764f91" diff --git a/meta-openeuler/recipes-extended/libnsl/libnsl2_%.bbappend b/meta-openeuler/recipes-extended/libnsl/libnsl2_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..7542c14a8a404a3f824b0d30ff3f95ddd526dcf8 --- /dev/null +++ b/meta-openeuler/recipes-extended/libnsl/libnsl2_%.bbappend @@ -0,0 +1,19 @@ +#main bbfile: yocto-poky/meta/recipes-extended/libnsl/libnsl2_git.bb + +#version in openEuler +PV = "2.0.0" + +S = "${WORKDIR}/libnsl-${PV}" + +# files, patches can't be applied in openeuler or conflict with openeuler +SRC_URI_remove = " \ + git://github.com/thkukuk/libnsl \ + " +# files, patches that come from openeuler +SRC_URI += " \ + file://libnsl2/libnsl-2.0.0.tar.gz \ + " + +SRC_URI[tarball.md5sum] = "e1ee6772c2ee5ddc25ea465a33af3004" +SRC_URI[tarball.sha256sum] = "eb37be57c1cf650b3a8a4fc7cd66c8b3dfc06215b41956a16325a9388171bc40" + diff --git a/meta-openeuler/recipes-extended/libtirpc/libtirpc_%.bbappend b/meta-openeuler/recipes-extended/libtirpc/libtirpc_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..2291e820c11c0e0f94503fb855e63e7bc67123c9 --- /dev/null +++ b/meta-openeuler/recipes-extended/libtirpc/libtirpc_%.bbappend @@ -0,0 +1,7 @@ +PV = "1.3.2" + +SRC_URI[sha256sum] = "e24eb88b8ce7db3b7ca6eb80115dd1284abc5ec32a8deccfed2224fc2532b9fd" + +SRC_URI += " \ + file://0001-update-libtirpc-to-enable-tcp-port-listening.patch \ +" diff --git a/meta-openeuler/recipes-extended/logrotate/logrotate_%.bbappend b/meta-openeuler/recipes-extended/logrotate/logrotate_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..a849fb69ac41b55d3a1634acef3260b8b7ba1d38 --- /dev/null +++ b/meta-openeuler/recipes-extended/logrotate/logrotate_%.bbappend @@ -0,0 +1,20 @@ +# main bbfile: yocto-poky/meta/recipes-extended/logrotate/logrotate_3.18.0.bb + +# version in openEuler +PV = "3.20.1" + +# files, patches can't be applied in openeuler or conflict with openeuler +# disable-check-different-filesystems.patch apply to 3.20.1 version fail +SRC_URI_remove = " \ + https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz \ + file://disable-check-different-filesystems.patch \ +" + +# files, patches that come from openeuler +SRC_URI_prepend = " \ + file://${BPN}/${BP}.tar.xz;name=tarball \ + file://${BPN}/0001-logrotate-3.20.1-lock-state-msg.patch \ +" + +SRC_URI[tarball.md5sum] = "24704642e1e6c7889edbe2b639636caf" +SRC_URI[tarball.sha256sum] = "742f6d6e18eceffa49a4bacd933686d3e42931cfccfb694d7f6369b704e5d094" diff --git a/meta-openeuler/recipes-extended/pam/libpam_%.bbappend b/meta-openeuler/recipes-extended/pam/libpam_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..2a3d1726a78e2560a044522890b614fe4a888c01 --- /dev/null +++ b/meta-openeuler/recipes-extended/pam/libpam_%.bbappend @@ -0,0 +1,30 @@ +PV = "1.5.2" + +# get files from pam, not libpam +OPENEULER_REPO_NAME = "pam" + +# delete useless patch from old version in poky bb +SRC_URI_remove += " \ + file://0001-modules-pam_namespace-Makefile.am-correctly-install-.patch \ + file://0001-Makefile.am-support-usrmage.patch \ +" + +# patch from openeuler +SRC_URI += " \ + file://pam/bugfix-pam-1.1.8-faillock-systemtime.patch \ + file://pam/openEuler-change-ndbm-to-gdbm.patch \ + file://pam/0001-bugfix-cannot-open-database-file.patch \ + file://pam/add-sm3-crypt-support.patch \ +" +SRC_URI[sha256sum] = "e4ec7131a91da44512574268f493c6d8ca105c87091691b8e9b56ca685d4f94d" + +DEPENDS_remove += "flex" + +# no coreutils in openeuler +RDEPENDS_${PN}-xtests_remove += " \ + coreutils \ +" + +PACKAGES += "${PN}-pkgconfig ${PN}-service" +FILES_${PN}-pkgconfig = "${base_libdir}/pkgconfig" +FILES_${PN}-service = "/usr/lib/systemd/system" diff --git a/meta-openeuler/recipes-extended/parted/parted_%.bbappend b/meta-openeuler/recipes-extended/parted/parted_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..794ecfc0c9a7cd471c04364dc64ae5a7de15a2d7 --- /dev/null +++ b/meta-openeuler/recipes-extended/parted/parted_%.bbappend @@ -0,0 +1,25 @@ +# main bbfile: yocto-poky/meta/recipes-extended/parted/parted_3.4.bb + +# version in openEuler +PV = "3.4" + +# Use the source packages from openEuler +SRC_URI_remove = " \ + ${GNU_MIRROR}/parted/parted-${PV}.tar.xz \ + " +SRC_URI += "file://parted-${PV}.tar.xz \ + file://0001-add-support-of-gpt_sync_mbr.patch \ + file://0002-Add-extra-judgment-for-a-partition-created-success.patch \ + file://0003-bugfix-parted-fix-failure-of-mklabel-gpt_sync_mbr.patch \ + file://0004-hfsplus_btree_search-free-node-when-hfsplus_file_rea.patch \ + file://0005-amiga_read-need-free-part-and-partition-when-constra.patch \ + file://0006-scsi_get_product_info-fix-memleak-and-avoid-to-use-N.patch \ + file://0007-fat_op_context_new-free-ctx-remap-and-goto-correct-l.patch \ + file://0008-hfsplus_cache_from_extent-fix-memleak.patch \ + file://0009-fat_clobber-set-boot_sector-NULL-and-free-boot_secto.patch \ + " + +SRC_URI[md5sum] = "357d19387c6e7bc4a8a90fe2d015fe80" +SRC_URI[sha256sum] = "e1298022472da5589b7f2be1d5ee3c1b66ec3d96dfbad03dc642afd009da5342" + +S = "${WORKDIR}/${BP}" diff --git a/meta-openeuler/recipes-extended/procps/procps_%.bbappend b/meta-openeuler/recipes-extended/procps/procps_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..6cdd4ce6a30fee93f8d0d5275a99af6f0b71e822 --- /dev/null +++ b/meta-openeuler/recipes-extended/procps/procps_%.bbappend @@ -0,0 +1,32 @@ +#main bbfile: yocto-poky/meta/recipes-extended/procps/procps_3.3.17.bb + +#version in openEuler +PV = "3.3.17" + +S = "${WORKDIR}/${BPN}-${PV}" + +# files, patches can't be applied in openeuler or conflict with openeuler +SRC_URI_remove = " \ + git://gitlab.com/procps-ng/procps.git;protocol=https \ + " +# files, patches that come from openeuler +SRC_URI += " \ + file://procps-ng/procps-ng-${PV}.tar.xz \ + file://procps-ng/0001-top-fix-two-potential-alternate-display-mode-abends.patch \ + file://procps-ng/0002-top-In-the-bye_bye-function-replace-fputs-with-the-w.patch \ + file://procps-ng/0003-add-options-M-and-N-for-top.patch \ + file://procps-ng/0004-top-exit-with-error-when-pid-overflow.patch \ + file://procps-ng/0005-fix-a-fix-for-the-bye_bye-function.patch \ + " + +do_configure_prepend() { + # cannot run po/update-potfiles in new version + if [ ! -f ${S}/po/update-potfiles ]; then + touch ${S}/po/update-potfiles + chmod +x ${S}/po/update-potfiles + fi +} + +SRC_URI[tarball.md5sum] = "d60613e88c2f442ebd462b5a75313d56" +SRC_URI[tarball.sha256sum] = "4518b3e7aafd34ec07d0063d250fd474999b20b200218c3ae56f5d2113f141b4" + diff --git a/meta-openeuler/recipes-extended/psmisc/psmisc_%.bbappend b/meta-openeuler/recipes-extended/psmisc/psmisc_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..5a4017ddb08799e3c96f6faa7de27b7e9aa35be9 --- /dev/null +++ b/meta-openeuler/recipes-extended/psmisc/psmisc_%.bbappend @@ -0,0 +1,19 @@ +# package and patches from openeuler +SRC_URI = " \ + file://psmisc-${PV}.tar.xz \ +" + +# patches from poky +SRC_URI += " \ + file://0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch \ +" + +S = "${WORKDIR}/${BPN}-${PV}" + +do_configure_prepend() { + # cannot run po/update-potfiles in new version + if [ ! -f ${S}/po/update-potfiles ]; then + touch ${S}/po/update-potfiles + chmod +x ${S}/po/update-potfiles + fi +} diff --git a/meta-openeuler/recipes-extended/quota/quota_%.bbappend b/meta-openeuler/recipes-extended/quota/quota_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..84133507ee00337118d5f38d8672bba4a7071be5 --- /dev/null +++ b/meta-openeuler/recipes-extended/quota/quota_%.bbappend @@ -0,0 +1,25 @@ +#main bbfile: yocto-poky/meta/recipes-extended/quota/quota_4.06.bb + +#version in openEuler +PV = "4.06" + +S = "${WORKDIR}/${BPN}-${PV}" + +DEPENDS_remove += "dbus" +PACKAGECONFIG_remove += "tcp-wrappers" + +# files, atches can't be applied in openeuler or conflict with openeuler +SRC_URI_remove = " \ + ${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz \ + " +# files, patches that come from openeuler +SRC_URI += " \ + file://quota-${PV}.tar.gz \ + file://0000-Limit-number-of-comparison-characters-to-4.patch \ + file://0001-Limit-maximum-of-RPC-port.patch \ + file://0002-quotaio_xfs-Warn-when-large-kernel-timestamps-cannot.patch \ + " + +SRC_URI[tarball.md5sum] = "aef94648438832b684978d46fdf75110" +SRC_URI[tarball.sha256sum] = "2f3e03039f378d4f0d97acdb49daf581dcaad64d2e1ddf129495fd579fbd268d" + diff --git a/meta-openeuler/recipes-extended/rpcbind/files/fix-CVE-2017-8779.patch b/meta-openeuler/recipes-extended/rpcbind/files/fix-CVE-2017-8779.patch new file mode 100644 index 0000000000000000000000000000000000000000..0cb218d6fd609b02dafc03354db9f0f20c81409a --- /dev/null +++ b/meta-openeuler/recipes-extended/rpcbind/files/fix-CVE-2017-8779.patch @@ -0,0 +1,13 @@ +diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c +index 9c1c3af..fb14bb9 100644 +--- a/src/rpcb_svc_com.c ++++ b/src/rpcb_svc_com.c +@@ -432,7 +433,7 @@ rpcbproc_taddr2uaddr_com(void *arg, struct svc_req *rqstp /*__unused*/, + static bool_t + xdr_encap_parms(XDR *xdrs, struct encap_parms *epp) + { +- return (xdr_bytes(xdrs, &(epp->args), (u_int *) &(epp->arglen), ~0)); ++ return (xdr_bytes(xdrs, &(epp->args), (u_int *) &(epp->arglen), RPC_MAXDATASIZE)); + } + + /* diff --git a/meta-openeuler/recipes-extended/rpcbind/files/rpcbind_add_option_to_fix_port_number.patch b/meta-openeuler/recipes-extended/rpcbind/files/rpcbind_add_option_to_fix_port_number.patch new file mode 100644 index 0000000000000000000000000000000000000000..535f9ce20ddc06422e317f1b4c4dbe5fd56fb275 --- /dev/null +++ b/meta-openeuler/recipes-extended/rpcbind/files/rpcbind_add_option_to_fix_port_number.patch @@ -0,0 +1,130 @@ +From 76f8598fd20727908e760cbb497dd6a17eda4af5 Mon Sep 17 00:00:00 2001 +From: Roy Li +Date: Wed, 17 Sep 2014 13:22:14 +0800 +Subject: [PATCH] add option to make users able to use fixed port number + +Upstream-Status: Submitted [https://sourceforge.net/p/rpcbind/discussion/716839/thread/32af721d/] + +Signed-off-by: Li Wang +Signed-off-by: Roy Li +Signed-off-by: Yi Zhao +--- + man/rpcbind.8 | 4 +++- + src/rpcb_svc_com.c | 17 +++++++++++++++++ + src/rpcbind.c | 8 ++++++-- + 3 files changed, 26 insertions(+), 3 deletions(-) + +diff --git a/man/rpcbind.8 b/man/rpcbind.8 +index fbf0ace..66f7c08 100644 +--- a/man/rpcbind.8 ++++ b/man/rpcbind.8 +@@ -11,7 +11,7 @@ + .Nd universal addresses to RPC program number mapper + .Sh SYNOPSIS + .Nm +-.Op Fl adhiLls ++.Op Fl adhpiLls + .Sh DESCRIPTION + The + .Nm +@@ -96,6 +96,8 @@ will automatically add + and if IPv6 is enabled, + .Li ::1 + to the list. ++.It Fl p ++Bind for fixed UDP port number + If no + .Fl h + option is specified, +diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c +index 1743dad..07a1c75 100644 +--- a/src/rpcb_svc_com.c ++++ b/src/rpcb_svc_com.c +@@ -48,6 +48,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -497,6 +498,7 @@ xdr_opaque_parms(XDR *xdrs, struct r_rmtcall_args *cap) + + static struct rmtcallfd_list *rmthead; + static struct rmtcallfd_list *rmttail; ++extern unsigned short fixed_port; + + int + create_rmtcall_fd(struct netconfig *nconf) +@@ -504,6 +506,8 @@ create_rmtcall_fd(struct netconfig *nconf) + int fd; + struct rmtcallfd_list *rmt; + SVCXPRT *xprt; ++ struct __rpc_sockinfo si; ++ struct t_bind taddr; + + if ((fd = __rpc_nconf2fd(nconf)) == -1) { + if (debugging) +@@ -512,6 +516,19 @@ create_rmtcall_fd(struct netconfig *nconf) + nconf->nc_device, errno); + return (-1); + } ++ ++ if (fixed_port) { ++ __rpc_fd2sockinfo(fd, &si); ++ memset(&taddr, 0, sizeof(taddr)); ++ taddr.addr.maxlen = taddr.addr.len = si.si_alen; ++ taddr.addr.buf = malloc(si.si_alen); ++ if (taddr.addr.buf == NULL) { ++ return -1; ++ } ++ *(unsigned short *)(&(taddr.addr.buf[0])) = si.si_af; ++ *(unsigned short *)(&(taddr.addr.buf[2])) = htons(fixed_port); ++ xprt = svc_tli_create(fd, nconf, &taddr, RPC_MAXDATASIZE, RPC_MAXDATASIZE); ++ } else + xprt = svc_tli_create(fd, 0, (struct t_bind *) 0, 0, 0); + if (xprt == NULL) { + if (debugging) +diff --git a/src/rpcbind.c b/src/rpcbind.c +index 25d8a90..36a95b9 100644 +--- a/src/rpcbind.c ++++ b/src/rpcbind.c +@@ -111,6 +111,7 @@ int runasdaemon = 0; + int insecure = 0; + int oldstyle_local = 0; + int verboselog = 0; ++unsigned short fixed_port = 0; + + char **hosts = NULL; + int nhosts = 0; +@@ -884,7 +885,7 @@ parseargs(int argc, char *argv[]) + { + int c; + oldstyle_local = 1; +- while ((c = getopt(argc, argv, "adh:ilswf")) != -1) { ++ while ((c = getopt(argc, argv, "adh:p:ilswf")) != -1) { + switch (c) { + case 'a': + doabort = 1; /* when debugging, do an abort on */ +@@ -902,6 +903,9 @@ parseargs(int argc, char *argv[]) + if (hosts[nhosts - 1] == NULL) + errx(1, "Out of memory"); + break; ++ case 'p': ++ fixed_port = atoi(optarg); ++ break; + case 'i': + insecure = 1; + break; +@@ -920,7 +924,7 @@ parseargs(int argc, char *argv[]) + break; + #endif + default: /* error */ +- fprintf(stderr, "usage: rpcbind [-adhilswf]\n"); ++ fprintf(stderr, "usage: rpcbind [-adhpilswf]\n"); + exit (1); + } + } +-- +2.25.1 + diff --git a/meta-openeuler/recipes-extended/rpcbind/rpcbind_%.bbappend b/meta-openeuler/recipes-extended/rpcbind/rpcbind_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..b7f870f696d656e3472216c59ffe2f1e82a5b067 --- /dev/null +++ b/meta-openeuler/recipes-extended/rpcbind/rpcbind_%.bbappend @@ -0,0 +1,31 @@ +#main bbfile: yocto-poky/meta/recipes-extended/rpcbind/rpcbind_1.2.5.bb + +#version in openEuler +PV = "1.2.6" + +S = "${WORKDIR}/${BPN}-${PV}" + +FILESEXTRAPATHS_prepend := "${THISDIR}/files/:" + +# files, patches can't be applied in openeuler or conflict with openeuler +SRC_URI_remove = " \ + ${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \ + " +# files, patches that come from openeuler +# all openeuler systemd patches can't apply, include rpcbind-0.2.4-runstatdir.patch +# backport-debian-enable-rmt-calls-with-r.patch is conflict +SRC_URI_append += " \ + file://${BPN}-${PV}.tar.bz2 \ + file://bugfix-rpcbind-GETADDR-return-client-ip.patch \ + file://fix-CVE-2017-8779.patch \ + file://backport-fix-double-free-in-init_transport.patch \ + file://bugfix-listen-tcp-port-111.patch \ + " +# safety: set init.d/rpcbind no permission for other users +do_install_append() { + chmod 0750 ${D}${sysconfdir}/init.d/rpcbind +} + +SRC_URI[tarball.md5sum] = "2d84ebbb7d6fb1fc3566d2d4b37f214b" +SRC_URI[tarball.sha256sum] = "5613746489cae5ae23a443bb85c05a11741a5f12c8f55d2bb5e83b9defeee8de" + diff --git a/meta-openeuler/recipes-extended/screen/screen_%.bbappend b/meta-openeuler/recipes-extended/screen/screen_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..e58b2f811f677eeab4360fbf3c2bf4aa07e99be6 --- /dev/null +++ b/meta-openeuler/recipes-extended/screen/screen_%.bbappend @@ -0,0 +1,9 @@ +# main bbfile: yocto-poky/meta/recipes-extended/screen/screen_4.8.0.bb + +# files, patches that come from openeuler +SRC_URI_prepend = " \ + file://screen-4.3.1-crypt.patch \ + file://screen-4.3.1-screenrc.patch \ + file://screen-4.3.1-suppress_remap.patch \ + file://screen-E3.patch \ +" diff --git a/meta-openeuler/recipes-extended/sed/sed_%.bbappend b/meta-openeuler/recipes-extended/sed/sed_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..7a4c8bb3975565d22e33e1655306dc2243a0fe6c --- /dev/null +++ b/meta-openeuler/recipes-extended/sed/sed_%.bbappend @@ -0,0 +1,8 @@ +# main bbfile: yocto-poky/meta/recipes-extended/sed/sed_4.8.bb + +# patches in openeuler +SRC_URI += " \ + file://sed/backport-sed-c-flag.patch \ + file://sed/backport-sed-handle-very-long-execution-lines-tiny-change.patch \ + file://sed/backport-sed-handle-very-long-input-lines-with-R-tiny-change.patch \ +" diff --git a/meta-openeuler/recipes-extended/shadow/files/49-0001-Disable-use-of-syslog-for-sysroot.patch b/meta-openeuler/recipes-extended/shadow/files/49-0001-Disable-use-of-syslog-for-sysroot.patch new file mode 100644 index 0000000000000000000000000000000000000000..628db42136f8f8e832e6c3d88ce89f22cf41a9dc --- /dev/null +++ b/meta-openeuler/recipes-extended/shadow/files/49-0001-Disable-use-of-syslog-for-sysroot.patch @@ -0,0 +1,52 @@ +From 8b845fff891798a03bdf21354b52e4487c2c0200 Mon Sep 17 00:00:00 2001 +From: Richard Purdie +Date: Thu, 14 Apr 2022 23:11:53 +0000 +Subject: [PATCH] Disable use of syslog for shadow-native tools + +Disable use of syslog to prevent sysroot user and group additions from +writing entries to the host's syslog. This patch should only be used +with the shadow-native recipe. + +Upstream-Status: Inappropriate [OE specific configuration] +Signed-off-by: Richard Purdie +Signed-off-by: Peter Kjellerstedt + +--- + configure.ac | 2 +- + src/login_nopam.c | 3 ++- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 5dcae19..b2c58f5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -204,7 +204,7 @@ AC_DEFINE_UNQUOTED(PASSWD_PROGRAM, "$shadow_cv_passwd_dir/passwd", + [Path to passwd program.]) + + dnl XXX - quick hack, should disappear before anyone notices :). +-AC_DEFINE(USE_SYSLOG, 1, [Define to use syslog().]) ++#AC_DEFINE(USE_SYSLOG, 1, [Define to use syslog().]) + if test "$ac_cv_func_ruserok" = "yes"; then + AC_DEFINE(RLOGIN, 1, [Define if login should support the -r flag for rlogind.]) + AC_DEFINE(RUSEROK, 0, [Define to the ruserok() "success" return value (0 or 1).]) +diff --git a/src/login_nopam.c b/src/login_nopam.c +index df6ba88..fc24e13 100644 +--- a/src/login_nopam.c ++++ b/src/login_nopam.c +@@ -29,7 +29,6 @@ + #ifndef USE_PAM + #ident "$Id$" + +-#include "prototypes.h" + /* + * This module implements a simple but effective form of login access + * control based on login names and on host (or domain) names, internet +@@ -57,6 +56,8 @@ + #include + #include /* for inet_ntoa() */ + ++#include "prototypes.h" ++ + #if !defined(MAXHOSTNAMELEN) || (MAXHOSTNAMELEN < 64) + #undef MAXHOSTNAMELEN + #define MAXHOSTNAMELEN 256 diff --git a/meta-openeuler/recipes-extended/shadow/files/49-commonio.c-fix-unexpected-open-failure-in-chroot-env.patch b/meta-openeuler/recipes-extended/shadow/files/49-commonio.c-fix-unexpected-open-failure-in-chroot-env.patch new file mode 100644 index 0000000000000000000000000000000000000000..bd24626a2646f153219f6001a2530e3a5a8d8b8b --- /dev/null +++ b/meta-openeuler/recipes-extended/shadow/files/49-commonio.c-fix-unexpected-open-failure-in-chroot-env.patch @@ -0,0 +1,49 @@ +From 1422c24f7266b553c82100e3d18a10c55cd91063 Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Thu, 17 Jul 2014 15:53:34 +0800 +Subject: [PATCH] commonio.c-fix-unexpected-open-failure-in-chroot-env + +Upstream-Status: Inappropriate [OE specific] + +commonio.c: fix unexpected open failure in chroot environment + +When using commands with '-R ' option in our pseudo environment, +we would usually get the 'Pemission Denied' error. This patch serves as +a workaround to this problem. + +Note that this patch doesn't change the logic in the code, it just expands +the codes. + +Signed-off-by: Chen Qi + +--- + lib/commonio.c | 16 ++++++++++++---- + 1 file changed, 12 insertions(+), 4 deletions(-) + +diff --git a/lib/commonio.c b/lib/commonio.c +index cef404b..66908fb 100644 +--- a/lib/commonio.c ++++ b/lib/commonio.c +@@ -646,10 +646,18 @@ int commonio_open (struct commonio_db *db, int mode) + db->cursor = NULL; + db->changed = false; + +- fd = open (db->filename, +- (db->readonly ? O_RDONLY : O_RDWR) +- | O_NOCTTY | O_NONBLOCK | O_NOFOLLOW); +- saved_errno = errno; ++ if (db->readonly) { ++ fd = open (db->filename, ++ (true ? O_RDONLY : O_RDWR) ++ | O_NOCTTY | O_NONBLOCK | O_NOFOLLOW); ++ saved_errno = errno; ++ } else { ++ fd = open (db->filename, ++ (false ? O_RDONLY : O_RDWR) ++ | O_NOCTTY | O_NONBLOCK | O_NOFOLLOW); ++ saved_errno = errno; ++ } ++ + db->fp = NULL; + if (fd >= 0) { + #ifdef WITH_TCB diff --git a/meta-openeuler/recipes-extended/shadow/files/diff_login_defs.txt b/meta-openeuler/recipes-extended/shadow/files/diff_login_defs.txt new file mode 100644 index 0000000000000000000000000000000000000000..476a1f749f45d2c3167c11fbc9a536b34727a26d --- /dev/null +++ b/meta-openeuler/recipes-extended/shadow/files/diff_login_defs.txt @@ -0,0 +1,262 @@ +--- etc/login.defs 2018-03-09 12:34:56.000000000 +0000 ++++ /usr1/openeuler/src/yocto-meta-openeuler/meta-openeuler/recipes-extended/shadow/files/login.defs 2022-07-29 13:27:19.063850481 +0000 +@@ -9,10 +9,10 @@ + # Note: When PAM is used, some modules may enforce a minimum delay (e.g. + # pam_unix(8) enforces a 2s delay) + # +-FAIL_DELAY 3 ++#FAIL_DELAY 3 + + # +-# Enable logging and display of /var/log/faillog login(1) failure info. ++# Enable logging and display of /var/log/faillog2 login(1) failure info. + # + #FAILLOG_ENAB yes + +@@ -29,7 +29,7 @@ LOG_OK_LOGINS no + # + # Enable logging and display of /var/log/lastlog login(1) time info. + # +-#LASTLOG_ENAB yes ++LASTLOG_ENAB yes + + # + # Limit the highest user ID number for which the lastlog entries should +@@ -67,15 +67,15 @@ LOG_OK_LOGINS no + # Enable "syslog" logging of su(1) activity - in addition to sulog file logging. + # SYSLOG_SG_ENAB does the same for newgrp(1) and sg(1). + # +-SYSLOG_SU_ENAB yes +-SYSLOG_SG_ENAB yes ++#SYSLOG_SU_ENAB yes ++#SYSLOG_SG_ENAB yes + + # + # If defined, either full pathname of a file containing device names or + # a ":" delimited list of device names. Root logins will be allowed only + # from these devices. + # +-CONSOLE /etc/securetty ++#CONSOLE /etc/securetty + #CONSOLE console:tty01:tty02:tty03:tty04 + + # +@@ -136,7 +136,7 @@ MAIL_FILE .mail + # user's name or shell are found in the file. If not a full pathname, then + # hushed mode will be enabled if the file exists in the user's home directory. + # +-HUSHLOGIN_FILE .hushlogin ++#HUSHLOGIN_FILE .hushlogin + #HUSHLOGIN_FILE /etc/hushlogins + + # +@@ -158,8 +158,8 @@ HUSHLOGIN_FILE .hushlogin + # *REQUIRED* The default PATH settings, for superuser and normal users. + # + # (they are minimal, add the rest in the shell startup files) +-ENV_SUPATH PATH=/sbin:/bin:/usr/sbin:/usr/bin +-ENV_PATH PATH=/bin:/usr/bin ++ENV_SUPATH PATH=/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin ++ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin + + # + # Terminal permissions +@@ -172,7 +172,7 @@ ENV_PATH PATH=/bin:/usr/bin + # and TTYPERM as 0620. Otherwise leave TTYGROUP commented out and + # set TTYPERM to either 622 or 600. + # +-TTYGROUP tty ++#TTYGROUP tty + TTYPERM 0600 + + # +@@ -188,8 +188,8 @@ TTYPERM 0600 + # + # Prefix these values with "0" to get octal, "0x" to get hexadecimal. + # +-ERASECHAR 0177 +-KILLCHAR 025 ++#ERASECHAR 0177 ++#KILLCHAR 025 + #ULIMIT 2097152 + + # Default initial "umask" value used by login(1) on non-PAM enabled systems. +@@ -199,7 +199,7 @@ KILLCHAR 025 + # 022 is the default value, but 027, or even 077, could be considered + # for increased privacy. There is no One True Answer here: each sysadmin + # must make up their mind. +-UMASK 022 ++UMASK 077 + + # HOME_MODE is used by useradd(8) and newusers(8) to set the mode for new + # home directories. +@@ -214,10 +214,10 @@ UMASK 022 + # PASS_MIN_LEN Minimum acceptable password length. + # PASS_WARN_AGE Number of days warning given before a password expires. + # +-PASS_MAX_DAYS 99999 +-PASS_MIN_DAYS 0 ++PASS_MAX_DAYS 90 ++PASS_MIN_DAYS 7 + #PASS_MIN_LEN 5 +-PASS_WARN_AGE 7 ++PASS_WARN_AGE 7 + + # + # If "yes", the user must be listed as a member of the first gid 0 group +@@ -235,11 +235,11 @@ PASS_WARN_AGE 7 + # + # Min/max values for automatic uid selection in useradd(8) + # +-UID_MIN 1000 ++UID_MIN 500 + UID_MAX 60000 + # System accounts + SYS_UID_MIN 101 +-SYS_UID_MAX 999 ++#SYS_UID_MAX 999 + # Extra per user uids + SUB_UID_MIN 100000 + SUB_UID_MAX 600100000 +@@ -248,11 +248,11 @@ SUB_UID_COUNT 65536 + # + # Min/max values for automatic gid selection in groupadd(8) + # +-GID_MIN 1000 ++GID_MIN 500 + GID_MAX 60000 + # System accounts + SYS_GID_MIN 101 +-SYS_GID_MAX 999 ++#SYS_GID_MAX 999 + # Extra per user group ids + SUB_GID_MIN 100000 + SUB_GID_MAX 600100000 +@@ -261,7 +261,7 @@ SUB_GID_COUNT 65536 + # + # Max number of login(1) retries if password is bad + # +-LOGIN_RETRIES 5 ++#LOGIN_RETRIES 5 + + # + # Max time in seconds for login(1) +@@ -295,8 +295,8 @@ LOGIN_TIMEOUT 60 + # any combination of letters "frwh" (full name, room number, work + # phone, home phone). If not defined, no changes are allowed. + # For backward compatibility, "yes" = "rwh" and "no" = "frwh". +-# +-CHFN_RESTRICT rwh ++# ++#CHFN_RESTRICT rwh + + # + # Password prompt (%s will be replaced by user name). +@@ -326,9 +326,7 @@ CHFN_RESTRICT rwh + # If set to SHA256, SHA256-based algorithm will be used for encrypting password + # If set to SHA512, SHA512-based algorithm will be used for encrypting password + # If set to BCRYPT, BCRYPT-based algorithm will be used for encrypting password +-# If set to YESCRYPT, YESCRYPT-based algorithm will be used for encrypting password + # If set to DES, DES-based algorithm will be used for encrypting password (default) +-# MD5 and DES should not be used for new hashes, see crypt(5) for recommendations. + # Overrides the MD5_CRYPT_ENAB option + # + # Note: If you use PAM, it is recommended to use a value consistent with +@@ -344,8 +342,7 @@ ENCRYPT_METHOD SHA512 + # However, more CPU resources will be needed to authenticate users if + # this value is increased. + # +-# If not specified, the libc will choose the default number of rounds (5000), +-# which is orders of magnitude too low for modern hardware. ++# If not specified, the libc will choose the default number of rounds (5000). + # The values must be within the 1000-999999999 range. + # If only one of the MIN or MAX values is set, then this value will be used. + # If MIN > MAX, the highest value will be used. +@@ -354,23 +351,6 @@ ENCRYPT_METHOD SHA512 + #SHA_CRYPT_MAX_ROUNDS 5000 + + # +-# Only works if ENCRYPT_METHOD is set to SM3. +-# +-# Define the number of SM3 rounds. +-# With a lot of rounds, it is more difficult to brute-force the password. +-# However, more CPU resources will be needed to authenticate users if +-# this value is increased. +-# +-# If not specified, the libc will choose the default number of rounds (5000), +-# which is orders of magnitude too low for modern hardware. +-# The values must be within the 1000-999999999 range. +-# If only one of the MIN or MAX values is set, then this value will be used. +-# If MIN > MAX, the highest value will be used. +-# +-#SM3_CRYPT_MAX_ROUNDS 5000 +-#SM3_CRYPT_MIN_ROUNDS 5000 +- +-# + # Only works if ENCRYPT_METHOD is set to BCRYPT. + # + # Define the number of BCRYPT rounds. +@@ -386,19 +366,6 @@ ENCRYPT_METHOD SHA512 + #BCRYPT_MAX_ROUNDS 13 + + # +-# Only works if ENCRYPT_METHOD is set to YESCRYPT. +-# +-# Define the YESCRYPT cost factor. +-# With a higher cost factor, it is more difficult to brute-force the password. +-# However, more CPU time and more memory will be needed to authenticate users +-# if this value is increased. +-# +-# If not specified, a cost factor of 5 will be used. +-# The value must be within the 1-11 range. +-# +-#YESCRYPT_COST_FACTOR 5 +- +-# + # List of groups to add to the user's supplementary group set + # when logging in from the console (as determined by the CONSOLE + # setting). Default is none. +@@ -416,14 +383,6 @@ ENCRYPT_METHOD SHA512 + DEFAULT_HOME yes + + # +-# The pwck(8) utility emits a warning for any system account with a home +-# directory that does not exist. Some system accounts intentionally do +-# not have a home directory. Such accounts may have this string as +-# their home directory in /etc/passwd to avoid a spurious warning. +-# +-NONEXISTENT /nonexistent +- +-# + # If this file exists and is readable, login environment will be + # read from it. Every line should be in the form name=value. + # +@@ -469,28 +428,3 @@ CREATE_HOME yes + # missing. + # + #FORCE_SHADOW yes +- +-# +-# Allow newuidmap and newgidmap when running under an alternative +-# primary group. +-# +-#GRANT_AUX_GROUP_SUBIDS yes +- +-# +-# Prevents an empty password field to be interpreted as "no authentication +-# required". +-# Set to "yes" to prevent for all accounts +-# Set to "superuser" to prevent for UID 0 / root (default) +-# Set to "no" to not prevent for any account (dangerous, historical default) +- +-PREVENT_NO_AUTH superuser +- +-# +-# Select the HMAC cryptography algorithm. +-# Used in pam_timestamp module to calculate the keyed-hash message +-# authentication code. +-# +-# Note: It is recommended to check hmac(3) to see the possible algorithms +-# that are available in your system. +-# +-#HMAC_CRYPTO_ALGO SHA512 diff --git a/meta-openeuler/recipes-core/shadow/files/login.defs b/meta-openeuler/recipes-extended/shadow/files/login.defs similarity index 99% rename from meta-openeuler/recipes-core/shadow/files/login.defs rename to meta-openeuler/recipes-extended/shadow/files/login.defs index b69058a56729b30e07ec60e0005344b81bdfceb2..dfedf1d273145a47ad8ae7b32379958fdb43637f 100644 --- a/meta-openeuler/recipes-core/shadow/files/login.defs +++ b/meta-openeuler/recipes-extended/shadow/files/login.defs @@ -29,7 +29,7 @@ LOG_OK_LOGINS no # # Enable logging and display of /var/log/lastlog login(1) time info. # -#LASTLOG_ENAB yes +LASTLOG_ENAB yes # # Limit the highest user ID number for which the lastlog entries should @@ -127,8 +127,8 @@ LOG_OK_LOGINS no # Directory where mailboxes reside, _or_ name of file, relative to the # home directory. If you _do_ define both, #MAIL_DIR takes precedence. # -MAIL_DIR /var/spool/mail -#MAIL_FILE .mail +#MAIL_DIR /var/spool/mail +MAIL_FILE .mail # # If defined, file which inhibits all the usual chatter during the login @@ -199,7 +199,7 @@ TTYPERM 0600 # 022 is the default value, but 027, or even 077, could be considered # for increased privacy. There is no One True Answer here: each sysadmin # must make up their mind. -#UMASK 022 +UMASK 077 # HOME_MODE is used by useradd(8) and newusers(8) to set the mode for new # home directories. @@ -428,5 +428,3 @@ CREATE_HOME yes # missing. # #FORCE_SHADOW yes -UMASK 077 -LASTLOG_ENAB yes diff --git a/meta-openeuler/recipes-core/shadow/files/login.defs_shadow-sysroot b/meta-openeuler/recipes-extended/shadow/files/login.defs_shadow-sysroot similarity index 100% rename from meta-openeuler/recipes-core/shadow/files/login.defs_shadow-sysroot rename to meta-openeuler/recipes-extended/shadow/files/login.defs_shadow-sysroot diff --git a/meta-openeuler/recipes-core/shadow/files/login_defs_pam.sed b/meta-openeuler/recipes-extended/shadow/files/login_defs_pam.sed similarity index 100% rename from meta-openeuler/recipes-core/shadow/files/login_defs_pam.sed rename to meta-openeuler/recipes-extended/shadow/files/login_defs_pam.sed diff --git a/meta-openeuler/recipes-core/shadow/files/pam.d/chfn b/meta-openeuler/recipes-extended/shadow/files/pam.d/chfn similarity index 100% rename from meta-openeuler/recipes-core/shadow/files/pam.d/chfn rename to meta-openeuler/recipes-extended/shadow/files/pam.d/chfn diff --git a/meta-openeuler/recipes-core/shadow/files/pam.d/chpasswd b/meta-openeuler/recipes-extended/shadow/files/pam.d/chpasswd similarity index 100% rename from meta-openeuler/recipes-core/shadow/files/pam.d/chpasswd rename to meta-openeuler/recipes-extended/shadow/files/pam.d/chpasswd diff --git a/meta-openeuler/recipes-core/shadow/files/pam.d/chsh b/meta-openeuler/recipes-extended/shadow/files/pam.d/chsh similarity index 100% rename from meta-openeuler/recipes-core/shadow/files/pam.d/chsh rename to meta-openeuler/recipes-extended/shadow/files/pam.d/chsh diff --git a/meta-openeuler/recipes-core/shadow/files/pam.d/groupmems b/meta-openeuler/recipes-extended/shadow/files/pam.d/groupmems similarity index 100% rename from meta-openeuler/recipes-core/shadow/files/pam.d/groupmems rename to meta-openeuler/recipes-extended/shadow/files/pam.d/groupmems diff --git a/meta-openeuler/recipes-core/shadow/files/pam.d/login b/meta-openeuler/recipes-extended/shadow/files/pam.d/login similarity index 100% rename from meta-openeuler/recipes-core/shadow/files/pam.d/login rename to meta-openeuler/recipes-extended/shadow/files/pam.d/login diff --git a/meta-openeuler/recipes-core/shadow/files/pam.d/newusers b/meta-openeuler/recipes-extended/shadow/files/pam.d/newusers similarity index 100% rename from meta-openeuler/recipes-core/shadow/files/pam.d/newusers rename to meta-openeuler/recipes-extended/shadow/files/pam.d/newusers diff --git a/meta-openeuler/recipes-core/shadow/files/pam.d/passwd b/meta-openeuler/recipes-extended/shadow/files/pam.d/passwd similarity index 100% rename from meta-openeuler/recipes-core/shadow/files/pam.d/passwd rename to meta-openeuler/recipes-extended/shadow/files/pam.d/passwd diff --git a/meta-openeuler/recipes-core/shadow/files/pam.d/su b/meta-openeuler/recipes-extended/shadow/files/pam.d/su similarity index 100% rename from meta-openeuler/recipes-core/shadow/files/pam.d/su rename to meta-openeuler/recipes-extended/shadow/files/pam.d/su diff --git a/meta-openeuler/recipes-core/shadow/files/securetty b/meta-openeuler/recipes-extended/shadow/files/securetty similarity index 100% rename from meta-openeuler/recipes-core/shadow/files/securetty rename to meta-openeuler/recipes-extended/shadow/files/securetty diff --git a/meta-openeuler/recipes-extended/shadow/files/useradd b/meta-openeuler/recipes-extended/shadow/files/useradd new file mode 100644 index 0000000000000000000000000000000000000000..782aeef41879e677ca8409fed499eaee17682916 --- /dev/null +++ b/meta-openeuler/recipes-extended/shadow/files/useradd @@ -0,0 +1,8 @@ +# useradd defaults file +GROUP=100 +HOME=/home +INACTIVE=-1 +EXPIRE= +SHELL=/bin/sh +SKEL=/etc/skel +CREATE_MAIL_SPOOL=no diff --git a/meta-openeuler/recipes-extended/shadow/shadow-securetty_%.bbappend b/meta-openeuler/recipes-extended/shadow/shadow-securetty_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..61355946fc61688328aa186501c671c535d89057 --- /dev/null +++ b/meta-openeuler/recipes-extended/shadow/shadow-securetty_%.bbappend @@ -0,0 +1,2 @@ +PV = "4.8.1" +PR = "r1" diff --git a/meta-openeuler/recipes-extended/shadow/shadow-sysroot_%.bbappend b/meta-openeuler/recipes-extended/shadow/shadow-sysroot_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..61355946fc61688328aa186501c671c535d89057 --- /dev/null +++ b/meta-openeuler/recipes-extended/shadow/shadow-sysroot_%.bbappend @@ -0,0 +1,2 @@ +PV = "4.8.1" +PR = "r1" diff --git a/meta-openeuler/recipes-extended/shadow/shadow_%.bbappend b/meta-openeuler/recipes-extended/shadow/shadow_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..4930f5ea2f537d402ae522077047a20ecc08ff26 --- /dev/null +++ b/meta-openeuler/recipes-extended/shadow/shadow_%.bbappend @@ -0,0 +1,108 @@ +#main bbfile: yocto-poky/meta/recipes-extended/shadow/shadow_4.8.1.bb + +PV = "4.9" + +# get extra config files from openeuler +FILESEXTRAPATHS_append := "${THISDIR}/files/:" + +SRC_URI = "file://${BP}.tar.xz \ + ${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \ + file://shadow-4.8-goodname.patch \ + file://shadow-4.9-null-tm.patch \ + file://shadow-4.8-long-entry.patch \ + file://usermod-unlock.patch \ + file://useradd-create-directories-after-the-SELinux-user.patch \ + file://shadow-4.1.5.1-var-lock.patch \ + file://shadow-utils-fix-lock-file-residue.patch \ + file://Makefile-include-libeconf-dependency-in-new-idmap.patch \ + file://usermod-allow-all-group-types-with-G-option.patch \ + file://useradd-avoid-generating-an-empty-subid-range.patch \ + file://libmisc-fix-default-value-in-SHA_get_salt_rounds.patch \ + file://semanage-close-the-selabel-handle.patch \ + file://Revert-useradd.c-fix-memleaks-of-grp.patch \ + file://useradd-change-SELinux-labels-for-home-files.patch \ + file://libsubid-link-to-PAM-libraries.patch \ + file://Fix-out-of-tree-builds-with-respect-to-libsubid-incl.patch \ + file://Respect-enable-static-no-in-libsubid.patch \ + file://Fixes-the-linking-issues-when-libsubid-is-static-and.patch \ + file://pwck-fix-segfault-when-calling-fprintf.patch \ + file://newgrp-fix-segmentation-fault.patch \ + file://groupdel-fix-SIGSEGV-when-passwd-does-not-exist.patch \ + file://shadow-add-sm3-crypt-support.patch \ + file://backport-useradd-modify-check-ID-range-for-system-users.patch \ + file://useradd \ +" + +# add extra pam files for openeuler +# poky shadow.inc have added: chfn chpasswd chsh login newusers passwd su +PAM_SRC_URI += " \ + file://pam.d/groupmems \ + file://login.defs \ +" + +# delete native patches from poky, patch failed, as it's for 4.8.1 +SRC_URI_remove_class-native = " \ + file://0001-Disable-use-of-syslog-for-sysroot.patch \ + file://0002-Allow-for-setting-password-in-clear-text.patch \ + file://commonio.c-fix-unexpected-open-failure-in-chroot-env.patch \ +" + +# apply 4.9 specific patches, remove these when poky's shadow upgrade to 4.9 +SRC_URI_append_class-native = " \ + file://49-0001-Disable-use-of-syslog-for-sysroot.patch \ + file://49-commonio.c-fix-unexpected-open-failure-in-chroot-env.patch \ + file://login.defs \ +" + +SRC_URI[md5sum] = "3d97f11e66bfb0b14702b115fa8be480" +SRC_URI[sha256sum] = "3ee3081fbbcbcfea5c8916419e46bc724807bab271072104f23e7a29e9668f3a" + +# no ${mandir} installed in openeuler +ALTERNATIVE_${PN}-doc = "" + +do_install_prepend () { + # we use a higher version useradd config from poky honister, these functions have applied: + # * Disable mail creation: "CREATE_MAIL_SPOOL=no" + # * Use users group by default: "GROUP=100" + # see: https://git.yoctoproject.org/poky/tree/meta/recipes-extended/shadow?h=honister + mkdir -p ${D}${sysconfdir}/default/ + install -m 0644 ${WORKDIR}/useradd ${D}${sysconfdir}/default +} + +do_install_append () { + # use login.defs from openeuler, we have applied these functions as poky: + # * Enable CREATE_HOME by default: "CREATE_HOME yes" + # * Make the users mailbox in ~/ not /var/spool/mail by default on an embedded system: "MAIL_FILE .mail" and "#MAIL_DIR /var/spool/mail" + # * Disable checking emails: "#MAIL_CHECK_ENAB yes" + # * Comment out SU_NAME to work correctly with busybox (See Bug#5359 and Bug#7173): "#SU_NAME su" + # * Use proper encryption for passwords: "ENCRYPT_METHOD SHA512" + # * other list of function that compare with poky's shadow (yocto-poky/meta/recipes-extended/shadow/files/login_defs_pam.sed) : + # Function login_defs_pam.sed openeuler + # FAILLOG_ENAB comment comment + # LASTLOG_ENAB comment "LASTLOG_ENAB yes" + # MAIL_CHECK_ENAB comment comment + # OBSCURE_CHECKS_ENAB comment comment + # PORTTIME_CHECKS_ENAB comment comment + # QUOTAS_ENAB comment comment + # MOTD_FILE comment comment + # FTMP_FILE comment comment + # NOLOGINS_FILE comment comment + # ENV_HZ comment comment + # ENV_TZ comment comment + # PASS_MIN_LEN comment comment + # SU_WHEEL_ONLY comment comment + # CRACKLIB_DICTPATH comment comment + # PASS_CHANGE_TRIES comment comment + # PASS_ALWAYS_WARN comment comment + # PASS_MAX_LEN comment comment + # PASS_MIN_LEN comment comment + # CHFN_AUTH comment comment + # CHSH_AUTH comment noexist + # ISSUE_FILE comment comment + # LOGIN_STRING comment comment + # ULIMIT comment comment + # ENVIRON_FILE comment comment + # * for other difference between poky's shadow login.defs, see diff_login_defs.txt + + install -m 0644 ${WORKDIR}/login.defs ${D}${sysconfdir}/login.defs +} diff --git a/meta-openeuler/recipes-extended/tar/tar_%.bbappend b/meta-openeuler/recipes-extended/tar/tar_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..027900f6cdfe8530c86d0ec5b116f1a9982ee70a --- /dev/null +++ b/meta-openeuler/recipes-extended/tar/tar_%.bbappend @@ -0,0 +1,17 @@ +# main bbfile: yocto-poky/meta/recipes-extended/tar/tar_1.34.bb + +PV="1.34" + +# Use the source packages from openEuler +SRC_URI_remove = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2" +SRC_URI += "file://tar-${PV}.tar.xz \ + file://tar-1.28-loneZeroWarning.patch \ + file://tar-1.28-vfatTruncate.patch \ + file://tar-1.29-wildcards.patch \ + file://tar-1.28-atime-rofs.patch \ + file://tar-1.28-document-exclude-mistakes.patch \ +" + +SRC_URI[md5sum] = "aa1621ec7013a19abab52a8aff04fe5b" +SRC_URI[sha256sum] = "3e1e518ffc912f86608a8cb35e4bd41ad1aec210df2a47aaa1f95e7f5576ef56" + diff --git a/meta-openeuler/recipes-extended/xz/xz_%.bbappend b/meta-openeuler/recipes-extended/xz/xz_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..e3a53b93ecdb822116970fd3a0e42563e5ea94fe --- /dev/null +++ b/meta-openeuler/recipes-extended/xz/xz_%.bbappend @@ -0,0 +1,20 @@ +# main bbfile: yocto-poky/meta/recipes-extended/xz/xz_5.2.5.bb + +# Use the source packages from openEuler +SRC_URI_remove = "https://tukaani.org/xz/xz-${PV}.tar.gz" +SRC_URI += "file://xz/xz-${PV}.tar.xz \ + file://xz/backport-CVE-2022-1271.patch \ + " + +SRC_URI[md5sum] = "aa1621ec7013a19abab52a8aff04fe5b" +SRC_URI[sha256sum] = "3e1e518ffc912f86608a8cb35e4bd41ad1aec210df2a47aaa1f95e7f5576ef56" + +#xz-native cannot dependes to xz-native +python() { + all_depends = d.getVarFlag("do_unpack", "depends") + for dep in ['xz']: + all_depends = all_depends.replace('%s-native:do_populate_sysroot' % dep, "") + new_depends = all_depends + if d.getVar("PN") == "xz-native": + d.setVarFlag("do_unpack", "depends", new_depends) +} diff --git a/meta-openeuler/recipes-external/gcc/gcc-external-cross-canadian.bb b/meta-openeuler/recipes-external/gcc/gcc-external-cross-canadian.bb index 46955d1c1ec3155aa287781c66bd0a7780da6f9b..14aef7a0f1e55101f0d4c1937a154d9b8112924d 100644 --- a/meta-openeuler/recipes-external/gcc/gcc-external-cross-canadian.bb +++ b/meta-openeuler/recipes-external/gcc/gcc-external-cross-canadian.bb @@ -13,6 +13,13 @@ FILES_${PN} = "\ ${@' '.join('${base_bindir}/${EXTERNAL_TARGET_SYS}-' + i for i in '${gcc_binaries}'.split())} \ " +# no debug package +FILES_${PN}-dbg = "" +# no need do autolibname(handle the dependency of .so libs) +# auto_libname in debian.bbclass will call ${TARGET_PREFIX}objdump to get shlibs2 related info +# for gcc-external-cross-canadian, can't find ${TARGET_PREFIX}objdump +AUTO_LIBNAME_PKGS = "" + external_libroot = "${@os.path.realpath('${EXTERNAL_TOOLCHAIN_LIBROOT}').replace(os.path.realpath('${EXTERNAL_TOOLCHAIN}') + '/', '/')}" FILES_MIRRORS =. "${libdir}/gcc/${EXTERNAL_TARGET_SYS}/${BINV}/|${external_libroot}/\n" diff --git a/meta-openeuler/recipes-external/glibc/glibc-external-version.inc b/meta-openeuler/recipes-external/glibc/glibc-external-version.inc index c8b4c57aac3aaada778fd3c4814c1f07eb047151..b31d4cdd9767f8ba8e6f73ca6bf89c882948995a 100644 --- a/meta-openeuler/recipes-external/glibc/glibc-external-version.inc +++ b/meta-openeuler/recipes-external/glibc/glibc-external-version.inc @@ -1,8 +1,10 @@ def get_external_libc_version(d): if (d.getVar('TCMODE', True).startswith('external') and d.getVar('EXTERNAL_TOOLCHAIN', True)): - cc = os.path.join(d.getVar('EXTERNAL_TOOLCHAIN_BIN', True), d.getVar('EXTERNAL_CC', True)) - cmd = "strings %s | grep '^GLIBC_' | awk -F_ '{print $2}' | sort -V | tail -n1" % cc + cc = os.path.join(d.getVar('EXTERNAL_TOOLCHAIN_SYSROOT', True), "usr/bin/ldd --version") + # ldd is a script, ldd --version will output "ldd (xxx yyy) zzz", zzz is version + # for aws use ')'as delimiter, use '{$1=$1;print}' to strip space, then get zzz + cmd = "%s | head -n1 | awk -F\) '{print $2}' | awk '{$1=$1;print}' " % cc import subprocess p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE) stdout, stderr = p.communicate() diff --git a/meta-openeuler/recipes-external/glibc/glibc-external.bb b/meta-openeuler/recipes-external/glibc/glibc-external.bb index 329812e5806922932e8ff95f3d1edf7240805089..fce00ed72b5a94215b79c4ff4f52f4e812652e4c 100644 --- a/meta-openeuler/recipes-external/glibc/glibc-external.bb +++ b/meta-openeuler/recipes-external/glibc/glibc-external.bb @@ -200,8 +200,15 @@ FILES_${PN} += "\ FILES_${PN}-dev_remove := "${datadir}/aclocal" -FILES_${PN}-dev_remove = "/lib/*.o" +# use base_libdir to replace /lib +FILES_${PN}-dev_remove = "${base_libdir}/*.o" FILES_${PN}-dev += "${libdir}/*crt*.o" +# currently no dbg fils for glibc-external +FILES_${PN}-dbg = "" +# no strip .o files used for startup, as user space app may need symbol information +# here INHIBIT_PACKAGE_STRIP to avoid all strip, future we can use +# INHIBIT_PACKAGE_STRIP_FILES for fine-grained control +INHIBIT_PACKAGE_STRIP = "1" linux_include_subdirs = "asm asm-generic bits drm linux mtd rdma sound sys video" FILES_${PN}-dev += "${@' '.join('${includedir}/%s' % d for d in '${linux_include_subdirs}'.split())}" diff --git a/meta-openeuler/recipes-kernel/kern-tools/kern-tools-native_%.bbappend b/meta-openeuler/recipes-kernel/kern-tools/kern-tools-native_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..0c6dee19982102a5918e88366984c269309d2b51 --- /dev/null +++ b/meta-openeuler/recipes-kernel/kern-tools/kern-tools-native_%.bbappend @@ -0,0 +1,7 @@ +# main bbfile: yocto-poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb + +# source from from yocto-embedded-tools +SRC_URI = "file://yocto-embedded-tools/build_tools/yocto-kernel-tools" +PV = "0.2" + +S = "${WORKDIR}/yocto-embedded-tools/build_tools/yocto-kernel-tools" diff --git a/meta-openeuler/recipes-kernel/kexec/kexec-tools/kdump b/meta-openeuler/recipes-kernel/kexec/kexec-tools/kdump deleted file mode 100755 index 69e3cafe5cfa7a37b5964d9dcdf67b9525fbf65d..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-kernel/kexec/kexec-tools/kdump +++ /dev/null @@ -1,145 +0,0 @@ -#! /bin/sh -# -# kdump -# -# Description: The kdump script provides the support: -# 1. Load a kdump kernel image into memory; -# 2. Copy away vmcore when system panic. -# - -#default -KEXEC=/usr/sbin/kexec -KEXEC_ARGS="-p" - -MAKEDUMPFILE=/usr/bin/makedumpfile -MAKEDUMPFILE_ARGS="-E -d 1" - -LOGGER="logger -p info -t kdump" - -if [ -f /etc/sysconfig/kdump.conf ]; then - . /etc/sysconfig/kdump.conf -else - echo "no /etc/sysconfig/kdump.conf" - exit 1; -fi - -do_check() -{ - #check makedumpfile - if [ ! -e ${MAKEDUMPFILE} -o ! -x ${MAKEDUMPFILE} ] ;then - echo "No makedumpfile found." - exit 0 - fi - - #check kexec - if [ ! -e ${KEXEC} -o ! -x ${KEXEC} ] ;then - echo "No kexec found." - exit 0 - fi - - #check whether kdump kernel image exists on the system - if [ -z "${KDUMP_KIMAGE}" -o ! -f "${KDUMP_KIMAGE}" ]; then - echo "No kdump kernel image found." - exit 0 - fi - - if [ "${KDUMP_CMDLINE}"x = "x" ] ; then - echo "KDUMP_CMDLINE is not configured" - exit 0 - fi -} - -do_save_vmcore() -{ - if [ ${KDUMP_VMCORE_PATH}x = x ]; then - KDUMP_VMCORE_PATH="/var/crash/`date +"%Y-%m-%d"`" - fi - - mkdir -p ${KDUMP_VMCORE_PATH} - echo "Saving a vmcore to ${KDUMP_VMCORE_PATH}." - - ${MAKEDUMPFILE} ${MAKEDUMPFILE_ARGS} /proc/vmcore ${KDUMP_VMCORE_PATH}/vmcore-"`date +"%H:%M:%S"`" -# cp --sparse=always /proc/vmcore ${KDUMP_VMCORE_PATH}/vmcore-"`date +"%H:%M:%S"`" - rc=$? - if [ ${rc} == 0 ]; then - ${LOGGER} "Saved a vmcore to ${KDUMP_VMCORE_PATH}." - else - ${LOGGER} "Failed to save vmcore!" - fi - return ${rc} -} - -do_start() -{ - #check file - do_check - - #check whether the running kernel supports kdump. - if [ ! -e /sys/kernel/kexec_crash_loaded ]; then - echo "Kdump isn't supported on the running kernel!!!" - ${LOGGER} "Kdump isn't supported on the running kernel!!!" - return 1 - fi - - #check whether kdump kernel image has been loaded - rc=`cat /sys/kernel/kexec_crash_loaded` - if [ ${rc} != 0 ]; then - echo "Kdump is already running."; - ${LOGGER} "Kdump is already running." - return 0 - fi - - #check the running kernel cmdline option,insure "crashkernel=" always set. - grep -q crashkernel= /proc/cmdline - if [ $? != 0 ]; then - echo "Kdump isn't supported on the running kernel,please check boot option!!!" - ${LOGGER} "Kdump isn't supported on the running kernel,please check boot option!!!" - return 1 - fi - - #Load the kdump kernel image - ${KEXEC} ${KEXEC_ARGS} "${KDUMP_KIMAGE}" --append="${KDUMP_CMDLINE}" - if [ $? != 0 ]; then - echo "Failed to load kdump kernel!" - ${LOGGER} "Failed to load kdump kernel!" - return 1 - fi - - echo "Kdump started up." - ${LOGGER} "Kdump started up." -} - -do_stop() -{ - ${KEXEC} -p -u 2>/dev/null - if [ $? == 0 ]; then - echo "Kdump has been stopped." - ${LOGGER} "Kdump has been stopped." - else - echo "Failed to stop kdump!" - ${LOGGER} "Failed to stop kdump!" - fi -} - -case "$1" in - start) - if [ -s /proc/vmcore ]; then - do_save_vmcore - reboot - else - do_start - fi - ;; - restart) - do_stop - do_start - ;; - stop) - do_stop - ;; - *) - echo $"Usage: $0 {start|stop|restart}" - exit 1 -esac - -exit $? diff --git a/meta-openeuler/recipes-kernel/kexec/kexec-tools/kdump.conf b/meta-openeuler/recipes-kernel/kexec/kexec-tools/kdump.conf deleted file mode 100644 index 38190d207a1b4b478c6b37e2fedaed395af72ce7..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-kernel/kexec/kexec-tools/kdump.conf +++ /dev/null @@ -1,14 +0,0 @@ -#the kdump kernel version string. -#KDUMP_KVER="`uname -r`" - -#this will be passed to the kdump kernel as kdump kernel command line -#KDUMP_CMDLINE="`cat /proc/cmdline`" - -#the kernel image for kdump -#KDUMP_KIMAGE="/boot/bzImage-${KDUMP_KVER}" - -#Where to save the vmcore -#KDUMP_VMCORE_PATH="/var/crash/`date +"%Y-%m-%d"`" - -#the arguments to makedumpfile -MAKEDUMPFILE_ARGS="--dump-dmesg -x /boot/vmlinux-`uname -r`" diff --git a/meta-openeuler/recipes-kernel/kexec/kexec-tools/kdump.service b/meta-openeuler/recipes-kernel/kexec/kexec-tools/kdump.service deleted file mode 100644 index b4a2c0611d30173c593ae277c0b63fda793022c3..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-kernel/kexec/kexec-tools/kdump.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Reboot and dump vmcore via kexec -DefaultDependencies=no -Requires=sysinit.target -After=sysinit.target - -[Service] -Type=oneshot -RemainAfterExit=yes -ExecStart=@LIBEXECDIR@/kdump-helper start -ExecStop=@LIBEXECDIR@/kdump-helper stop - -[Install] -WantedBy=multi-user.target diff --git a/meta-openeuler/recipes-kernel/kexec/kexec-tools_%.bbappend b/meta-openeuler/recipes-kernel/kexec/kexec-tools_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..43db0c7a7231df039eaa69ae5ab9293130ed2798 --- /dev/null +++ b/meta-openeuler/recipes-kernel/kexec/kexec-tools_%.bbappend @@ -0,0 +1,19 @@ +# main bbfile: yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.21.bb + +# kexec-tools version in openEuler +PV = "2.0.23" + +# Use the source packages from openEuler and remove conflicting patches +SRC_URI_remove = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz \ + file://0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch \ + " +SRC_URI_prepend = "file://kexec-tools/kexec-tools-${PV}.tar.xz " + +SRC_URI += "file://kexec-tools/arm64-support-more-than-one-crash-kernel-regions.patch \ + file://kexec-tools/kexec-Add-quick-kexec-support.patch \ + file://kexec-tools/kexec-Quick-kexec-implementation-for-arm64.patch \ + file://kexec-tools/arm64-crashdump-deduce-paddr-of-_text-based-on-kerne.patch \ + " + +SRC_URI[md5sum] = "483f3d35de59b3fffeab10d386cb7364" +SRC_URI[sha256sum] = "aa63cd6c7dd95b06ceba6240a7fdc6792789cada75a655e6714987175224241b" diff --git a/meta-openeuler/recipes-kernel/kexec/kexec-tools_2.0.23.bb b/meta-openeuler/recipes-kernel/kexec/kexec-tools_2.0.23.bb deleted file mode 100644 index 922514a497c7931e89d4c80cdec0796e61d0cec1..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-kernel/kexec/kexec-tools_2.0.23.bb +++ /dev/null @@ -1,83 +0,0 @@ -SUMMARY = "Kexec fast reboot tools" -DESCRIPTION = "Kexec is a fast reboot feature that lets you reboot to a new Linux kernel" -AUTHOR = "Eric Biederman" -HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kexec/" -SECTION = "kernel/userland" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a \ - file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09" -DEPENDS = "zlib" - -SRC_URI = "file://kexec-tools/kexec-tools-${PV}.tar.xz \ - file://kexec-tools/arm64-support-more-than-one-crash-kernel-regions.patch \ - file://kexec-tools/kexec-Add-quick-kexec-support.patch \ - file://kexec-tools/kexec-Quick-kexec-implementation-for-arm64.patch \ - file://kexec-tools/arm64-crashdump-deduce-paddr-of-_text-based-on-kerne.patch \ - file://kdump \ - file://kdump.conf \ - file://kdump.service \ -" -SRC_URI[sha256sum] = "aa63cd6c7dd95b06ceba6240a7fdc6792789cada75a655e6714987175224241b" - -inherit autotools - -export LDFLAGS = "-L${STAGING_LIBDIR}" -EXTRA_OECONF = " --with-zlib=yes" - -do_compile_prepend() { - # Remove the prepackaged config.h from the source tree as it overrides - # the same file generated by configure and placed in the build tree - rm -f ${S}/include/config.h - - # Remove the '*.d' file to make sure the recompile is OK - for dep in `find ${B} -type f -name '*.d'`; do - dep_no_d="`echo $dep | sed 's#.d$##'`" - # Remove file.d when there is a file.o - if [ -f "$dep_no_d.o" ]; then - rm -f $dep - fi - done -} - -do_install_append () { - install -d ${D}${sysconfdir}/sysconfig - install -m 0644 ${WORKDIR}/kdump.conf ${D}${sysconfdir}/sysconfig - - if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then - install -D -m 0755 ${WORKDIR}/kdump ${D}${sysconfdir}/init.d/kdump - fi - - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -D -m 0755 ${WORKDIR}/kdump ${D}${libexecdir}/kdump-helper - install -D -m 0644 ${WORKDIR}/kdump.service ${D}${systemd_unitdir}/system/kdump.service - sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' ${D}${systemd_unitdir}/system/kdump.service - fi -} - -PACKAGES =+ "kexec kdump vmcore-dmesg" - -ALLOW_EMPTY_${PN} = "1" -RRECOMMENDS_${PN} = "kexec kdump vmcore-dmesg" - -FILES_kexec = "${sbindir}/kexec" -FILES_kdump = "${sbindir}/kdump \ - ${sysconfdir}/sysconfig/kdump.conf \ - ${sysconfdir}/init.d/kdump \ - ${libexecdir}/kdump-helper \ - ${systemd_unitdir}/system/kdump.service \ -" - -FILES_vmcore-dmesg = "${sbindir}/vmcore-dmesg" - -INITSCRIPT_PACKAGES = "kdump" -INITSCRIPT_NAME_kdump = "kdump" -INITSCRIPT_PARAMS_kdump = "start 56 2 3 4 5 . stop 56 0 1 6 ." - -SYSTEMD_PACKAGES = "kdump" -SYSTEMD_SERVICE_kdump = "kdump.service" - -SECURITY_PIE_CFLAGS_remove = "-fPIE -pie" - -COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)' - -INSANE_SKIP_${PN} = "arch" diff --git a/meta-openeuler/recipes-kernel/kmod/kmod_%.bbappend b/meta-openeuler/recipes-kernel/kmod/kmod_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..34e84d322bf3aa1c634f5540878c80606951b98a --- /dev/null +++ b/meta-openeuler/recipes-kernel/kmod/kmod_%.bbappend @@ -0,0 +1,18 @@ +# main bbfile: yocto-poky/meta/recipes-kernel/kmod/kmod_git.bb + +# kmod version in openEuler +PV = "29" + +# Use the source packages from openEuler +SRC_URI_remove = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git" +SRC_URI_prepend = "file://kmod/${BP}.tar.xz " +SRC_URI += "file://kmod/0001-libkmod-module-check-new_from_name-return-value-in-g.patch \ + file://kmod/0002-Module-replace-the-module-with-new-module.patch \ + file://kmod/0003-Module-suspend-the-module-by-rmmod-r-option.patch \ + file://kmod/0004-don-t-check-module-s-refcnt-when-rmmod-with-r.patch \ + " + +SRC_URI[md5sum] = "e81e63acd80697d001c8d85c1acb38a0" +SRC_URI[sha256sum] = "0b80eea7aa184ac6fd20cafa2a1fdf290ffecc70869a797079e2cc5c6225a52a" + +S = "${WORKDIR}/${BP}" diff --git a/meta-openeuler/recipes-kernel/linux/linux-openeuler.bb b/meta-openeuler/recipes-kernel/linux/linux-openeuler.bb index 77d8717c811e6cea449dfd574205cb39a911fd83..e1fcd05031c6d8dc064b9d1d184c5e5fe7bc169b 100644 --- a/meta-openeuler/recipes-kernel/linux/linux-openeuler.bb +++ b/meta-openeuler/recipes-kernel/linux/linux-openeuler.bb @@ -29,11 +29,7 @@ KERNEL_MODULE_PACKAGE_SUFFIX = "" PV = "${LINUX_VERSION}" -COMPATIBLE_MACHINE = "qemuarm|qemuarmv5|qemuarm64|qemux86|qemuppc|qemuppc64|qemumips|qemumips64|qemux86-64|qemuriscv64|qemuriscv32|qemu-aarch64|qemu-arm|raspberrypi4-64" - -PACKAGES += "${KERNEL_PACKAGE_NAME}-img" -FILES_${KERNEL_PACKAGE_NAME}-img = "/boot/Image-${KERNEL_VERSION}" - +COMPATIBLE_MACHINE = "qemuarm|qemuarmv5|qemuarm64|qemux86|qemuppc|qemuppc64|qemumips|qemumips64|qemux86-64|qemuriscv64|qemuriscv32|qemu-aarch64|qemu-arm|raspberrypi4-64|qemu-x86-64" # Skip processing of this recipe if it is not explicitly specified as the # PREFERRED_PROVIDER for virtual/kernel. This avoids network access required @@ -56,11 +52,53 @@ do_configure_prepend() { cp -f "${OPENEULER_KERNEL_CONFIG}" .config } +# Even if the KERNEL_IMAGETYPE is zImage, we will install Image, so add it into PACKAGES +PACKAGES += "${KERNEL_PACKAGE_NAME}-img" +FILES_${KERNEL_PACKAGE_NAME}-img = "/boot/Image-${KERNEL_VERSION}" do_install_append(){ - install -m 0644 ${KERNEL_OUTPUT_DIR}/Image ${D}/${KERNEL_IMAGEDEST}/Image-${KERNEL_VERSION} + if [ -e ${KERNEL_OUTPUT_DIR}/Image ]; then + install -m 0644 ${KERNEL_OUTPUT_DIR}/Image ${D}/${KERNEL_IMAGEDEST}/Image-${KERNEL_VERSION} + fi } #not found depmodwrapper, not run postinst now pkg_postinst_${KERNEL_PACKAGE_NAME}-base () { : } + +# KERNEL_MODULE_AUTOLOAD need ko_basename to work, +# we make automatic conversion from pkgname to ko_basename +# then we can use pkgname in KERNEL_MODULE_AUTOLOAD +# reference 1: split_kernel_module_packages: yocto-poky/meta/classes/kernel-module-split.bbclass +# reference 2: do_split_packages: yocto-poky/meta/classes/package.bbclass +split_kernel_module_packages_prepend () { + def update_module_loadlist (): + module_regex = r'^(.*)\.k?o(?:\.[xg]z)?$' + kernel_package_name = d.getVar("KERNEL_PACKAGE_NAME") or "kernel" + module_pattern_prefix = d.getVar('KERNEL_MODULE_PACKAGE_PREFIX') + module_pattern_suffix = d.getVar('KERNEL_MODULE_PACKAGE_SUFFIX') + module_pattern = module_pattern_prefix + kernel_package_name + '-module-%s' + module_pattern_suffix + root = '${nonarch_base_libdir}/modules' + dvar = d.getVar('PKGD') + root = d.expand(root) + objs = [] + for walkroot, dirs, files in os.walk(dvar + root): + for file in files: + relpath = os.path.join(walkroot, file).replace(dvar + root + '/', '', 1) + if relpath: + objs.append(relpath) + for o in sorted(objs): + import re, stat + m = re.match(module_regex, os.path.basename(o)) + if not m: + continue + basename = m.group(1) + on = legitimize_package_name(basename) + pkg = module_pattern % on + if pkg in (d.getVar("KERNEL_MODULE_AUTOLOAD") or "").split(): + old_list = d.getVar("KERNEL_MODULE_AUTOLOAD") + d.setVar("KERNEL_MODULE_AUTOLOAD", "%s %s" % (old_list, basename)) + + update_module_loadlist() +} + diff --git a/meta-openeuler/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch b/meta-openeuler/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch new file mode 100644 index 0000000000000000000000000000000000000000..bff852799d086701fd5d89f949eb3c7e816c592f --- /dev/null +++ b/meta-openeuler/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch @@ -0,0 +1,17 @@ +Upstream-Status: Inappropriate [embedded specific] + +Don't build the doc examples - we don't need them and in fact they +never successfully built in previous iterations of the lttng-ust +recipe anyway. + +Signed-off-by: Tom Zanussi + +Index: lttng-ust-2.9.1/doc/Makefile.am +=================================================================== +--- lttng-ust-2.9.1.orig/doc/Makefile.am ++++ lttng-ust-2.9.1/doc/Makefile.am +@@ -1,3 +1,3 @@ +-SUBDIRS = . man examples ++SUBDIRS = . man + + dist_doc_DATA = java-agent.txt diff --git a/meta-openeuler/recipes-kernel/lttng/lttng-ust_%.bbappend b/meta-openeuler/recipes-kernel/lttng/lttng-ust_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..53121e34874371aaba88b8f6351631bc09f6df06 --- /dev/null +++ b/meta-openeuler/recipes-kernel/lttng/lttng-ust_%.bbappend @@ -0,0 +1,25 @@ +# main bbfile: yocto-poky/meta/recipes-kernel/lttng/lttng-ust_2.12.1.bb + +FILESEXTRAPATHS_append := "${THISDIR}/${BPN}/:" + +# version in openEuler +PV = "2.10.1" + +# apply openEuler patches +SRC_URI_prepend = "file://Fix-namespace-our-gettid-wrapper.patch \ + file://lttng-gen-tp-shebang.patch \ + file://fix-build-with-fno-common.patch \ + file://0001-Adapt-lttng-ust-to-use-multiflavor-symbols-form-liburcu-0.11.patch \ +" + +# apply openembedded-core patch;branch=warrior +SRC_URI_append = "file://lttng-ust-doc-examples-disable.patch \ +" + +# this version does not have this option +EXTRA_OECONF_remove = "--disable-numa" + +PACKAGECONFIG[examples] = ",,," + +SRC_URI[md5sum] = "4863cc2f9f0a070b42438bb646bbba06" +SRC_URI[sha256sum] = "07cc3c0b71e7b77f1913d5b7f340a78a9af414440e4662712aef2d635b88ee9d" \ No newline at end of file diff --git a/meta-openeuler/recipes-kernel/modutils-initscripts/modutils-initscripts.bbappend b/meta-openeuler/recipes-kernel/modutils-initscripts/modutils-initscripts.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..578666c4cfc69315e7289064a66bd5d69faf161b --- /dev/null +++ b/meta-openeuler/recipes-kernel/modutils-initscripts/modutils-initscripts.bbappend @@ -0,0 +1,2 @@ +# main bbfile: yocto-poky/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb + diff --git a/meta-openeuler/recipes-labtools/bash/bash.inc b/meta-openeuler/recipes-labtools/bash/bash.inc deleted file mode 100644 index 10ce3b25d7c104e84efa62e4e4647b9e6a20e7a1..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-labtools/bash/bash.inc +++ /dev/null @@ -1,57 +0,0 @@ -DESCRIPTION = "An sh-compatible command language interpreter." -HOMEPAGE = "http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html" -SECTION = "base/shell" - -DEPENDS = "ncurses bison-native" - -inherit autotools gettext - -EXTRA_OECONF = "--enable-job-control" - -ALTERNATIVE_${PN} = "sh" -ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh" -ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash" -ALTERNATIVE_PRIORITY = "100" - -export AUTOHEADER = "true" - -RDEPENDS_${PN}-ptest += "make" - -PARALLEL_MAKE = "" - -do_configure () { - oe_runconf -} - -do_configure_prepend () { - rm -f ${S}/y.tab.c - if [ ! -e ${S}/acinclude.m4 ]; then - cat ${S}/aclocal.m4 > ${S}/acinclude.m4 - fi -} - -do_compile_ptest () { - oe_runmake buildtest -} - -do_install_append () { - # Move /usr/bin/bash to /bin/bash, if need - if [ "${base_bindir}" != "${bindir}" ]; then - mkdir -p ${D}${base_bindir} - mv ${D}${bindir}/bash ${D}${base_bindir} - fi -} - -do_install_ptest () { - make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test - cp ${B}/Makefile ${D}${PTEST_PATH} - sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/Makefile -} - -pkg_postinst_${PN} () { - mkdir -p ${sysconfdir}/ || echo "" - touch ${sysconfdir}/shells - grep -q "bin/bash" ${sysconfdir}/shells || echo /bin/bash >> ${sysconfdir}/shells - grep -q "bin/sh" ${sysconfdir}/shells || echo /bin/sh >> ${sysconfdir}/shells -} -FILES_${PN}-dev += "${libdir}/bash/*" diff --git a/meta-openeuler/recipes-labtools/ncurses/ncurses.inc b/meta-openeuler/recipes-labtools/ncurses/ncurses.inc deleted file mode 100644 index 00a332b52f1b66bd51e7154e35f45824e3135cd6..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-labtools/ncurses/ncurses.inc +++ /dev/null @@ -1,324 +0,0 @@ -SUMMARY = "The New Curses library" -DESCRIPTION = "SVr4 and XSI-Curses compatible curses library and terminfo tools including tic, infocmp, captoinfo. Supports color, multiple highlights, forms-drawing characters, and automatic recognition of keypad and function-key sequences. Extensions include resizable windows and mouse support on both xterm and Linux console using the gpm library." -HOMEPAGE = "http://www.gnu.org/software/ncurses/ncurses.html" -LICENSE = "MIT" -SECTION = "libs" -DEPENDS = "ncurses-native" -DEPENDS_class-native = "" -#use tic on the host, not from ncurses-native -DEPENDS_remove += "ncurses-native" - -BINCONFIG = "${bindir}/ncurses5-config ${bindir}/ncursesw5-config \ - ${bindir}/ncurses6-config ${bindir}/ncursesw6-config" - -inherit autotools binconfig-disabled multilib_header pkgconfig - -#SRC_URI = "" - -EXTRA_AUTORECONF = "-I m4" -CONFIG_SITE =+ "${WORKDIR}/config.cache" - -EXTRASITECONFIG = "CFLAGS='${CFLAGS} -I${SYSROOT_DESTDIR}${includedir}'" - -# Whether to enable separate widec libraries; must be 'true' or 'false' -# -# TODO: remove this variable when widec is supported in every setup? -ENABLE_WIDEC ?= "true" - -# _GNU_SOURCE is required for widec stuff and is detected automatically -# for target objects. But it must be set manually for native and sdk -# builds. -BUILD_CPPFLAGS += "-D_GNU_SOURCE" - -# natives don't generally look in base_libdir -base_libdir_class-native = "${libdir}" - -# Display corruption occurs on 64 bit hosts without these settings -# This was derrived from the upstream debian ncurses which uses -# these settings for 32 and 64 bit hosts. -EXCONFIG_ARGS = "" -EXCONFIG_ARGS_class-native = " \ - --disable-lp64 \ - --with-chtype='long' \ - --with-mmask-t='long'" -EXCONFIG_ARGS_class-nativesdk = " \ - --disable-lp64 \ - --with-chtype='long' \ - --with-mmask-t='long'" - -PACKAGES_DYNAMIC = "^${PN}-lib.*" - - -# Fall back to the host termcap / terminfo for -nativesdk and -native -# The reality is a work around for strange problems with things like -# "bitbake -c menuconfig busybox" where it cannot find the terminfo -# because the sstate had a hard coded search path. Until this is fixed -# another way this is deemed good enough. -EX_TERMCAP = "" -EX_TERMCAP_class-native = ":/etc/termcap:/usr/share/misc/termcap" -EX_TERMCAP_class-nativesdk = ":/etc/termcap:/usr/share/misc/termcap" -EX_TERMINFO = "" -EX_TERMINFO_class-native = ":/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo" -EX_TERMINFO_class-nativesdk = ":/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo" -EX_TERMLIB ?= "tinfo" - -# Helper function for do_configure to allow multiple configurations -# $1 the directory to run configure in -# $@ the arguments to pass to configure -ncurses_configure() { - mkdir -p $1 - cd $1 - shift - oe_runconf \ - --without-debug \ - --without-ada \ - --without-gpm \ - --enable-hard-tabs \ - --enable-xmc-glitch \ - --enable-colorfgbg \ - --with-termpath='${sysconfdir}/termcap:${datadir}/misc/termcap${EX_TERMCAP}' \ - --with-terminfo-dirs='${sysconfdir}/terminfo:${datadir}/terminfo${EX_TERMINFO}' \ - --with-shared \ - --disable-big-core \ - --program-prefix= \ - --with-ticlib \ - --with-termlib=${EX_TERMLIB} \ - --enable-sigwinch \ - --enable-pc-files \ - --disable-rpath-hack \ - ${EXCONFIG_ARGS} \ - --with-manpage-format=normal \ - --disable-stripping \ - "$@" || return 1 - cd .. -} - -# Override the function from the autotools class; ncurses requires a -# patched autoconf213 to generate the configure script. This autoconf -# is not available so that the shipped script will be used. -do_configure() { - -# rm -rf ${S}/../ncurses-6.2 -# mv ${S}/../ncurses-6.2-20200411 ${S}/../ncurses-6.2 - - # check does not work with cross-compiling and is generally - # broken because it requires stdin to be pollable (which is - # not the case for /dev/null redirections) - export cf_cv_working_poll=yes - #Remove ${includedir} from CPPFLAGS, need for cross compile - sed -i 's#-I${cf_includedir}##g' ${S}/configure || die "sed CPPFLAGS" - - # The --enable-pc-files requires PKG_CONFIG_LIBDIR existed - mkdir -p ${PKG_CONFIG_LIBDIR} - ( cd ${S}; gnu-configize --force ) - ncurses_configure "narrowc" || \ - return 1 - ! ${ENABLE_WIDEC} || \ - ncurses_configure "widec" "--enable-widec" "--without-progs" - -} - -do_compile() { - oe_runmake -C narrowc libs - oe_runmake -C narrowc/progs - - ! ${ENABLE_WIDEC} || \ - oe_runmake -C widec libs -} - -# set of expected differences between narrowc and widec header -# -# TODO: the NCURSES_CH_T difference can cause real problems :( -_unifdef_cleanup = " \ - -e '\!/\* \$Id: curses.wide,v!,\!/\* \$Id: curses.tail,v!d' \ - -e '/^#define NCURSES_CH_T /d' \ - -e '/^#include /d' \ - -e '\!^/\* .* \*/!d' \ -" - -do_test[depends] = "unifdef-native:do_populate_sysroot" -do_test[dirs] = "${S}" -do_test() { - ${ENABLE_WIDEC} || return 0 - - # make sure that the narrow and widec header are compatible - # and differ only in minor details. - unifdef -k narrowc/include/curses.h | \ - sed ${_unifdef_cleanup} > curses-narrowc.h - unifdef -k widec/include/curses.h | \ - sed ${_unifdef_cleanup} > curses-widec.h - - diff curses-narrowc.h curses-widec.h -} - -# Split original _install_opts to two parts. -# One is the options to install contents, the other is the parameters \ -# when running command "make install" -# Note that install.libs will also implicitly install header files, -# so we do not need to explicitly specify install.includes. -# Doing so could in fact result in a race condition, as both targets -# (install.libs and install.includes) would install the same headers -# at the same time - -_install_opts = " install.libs install.man " - -_install_cfgs = "\ - DESTDIR='${D}' \ - PKG_CONFIG_LIBDIR='${libdir}/pkgconfig' \ -" - -do_install() { - # Order of installation is important; widec installs a 'curses.h' - # header with more definitions and must be installed last hence. - # Compatibility of these headers will be checked in 'do_test()'. - oe_runmake -C narrowc ${_install_cfgs} ${_install_opts} \ - install.progs - - # The install.data should run after install.libs, otherwise - # there would be a race issue in a very critical conditon, since - # tic will be run by install.data, and tic needs libtinfo.so - # which would be regenerated by install.libs. - oe_runmake -C narrowc ${_install_cfgs} \ - install.data - - - ! ${ENABLE_WIDEC} || \ - oe_runmake -C widec ${_install_cfgs} ${_install_opts} - - cd narrowc - - # include some basic terminfo files - # stolen ;) from gentoo and modified a bit - for x in ansi console dumb linux rxvt screen screen-256color sun vt52 vt100 vt102 vt200 vt220 xterm-color xterm-xfree86 xterm-256color - do - local termfile="$(find "${D}${datadir}/terminfo/" -name "${x}" 2>/dev/null)" - local basedir="$(basename $(dirname "${termfile}"))" - - if [ -n "${termfile}" ] - then - install -d ${D}${sysconfdir}/terminfo/${basedir} - mv ${termfile} ${D}${sysconfdir}/terminfo/${basedir}/ - ln -s /etc/terminfo/${basedir}/${x} \ - ${D}${datadir}/terminfo/${basedir}/${x} - fi - done - # i think we can use xterm-color as default xterm - if [ -e ${D}${sysconfdir}/terminfo/x/xterm-color ] - then - ln -sf xterm-color ${D}${sysconfdir}/terminfo/x/xterm - fi - - # When changing ${libdir} to e.g. /usr/lib/myawesomelib/ ncurses - # still installs '/usr/lib/terminfo', so try to rm both - # the proper path and a slightly hardcoded one - rm -f ${D}${libdir}/terminfo ${D}${prefix}/lib/terminfo - - # create linker scripts for libcurses.so and libncurses to - # link against -ltinfo when needed. Some builds might break - # else when '-Wl,--no-copy-dt-needed-entries' has been set in - # linker flags. - for i in libncurses libncursesw; do - f=${D}${libdir}/$i.so - test -h $f || continue - rm -f $f - echo '/* GNU ld script */' >$f - echo "INPUT($i.so.5 AS_NEEDED(-ltinfo))" >>$f - done - - # Make sure that libcurses is linked so that it get -ltinfo - # also, this should be addressed upstream really. - ln -sf libncurses.so ${D}${libdir}/libcurses.so - - # create libtermcap.so linker script for backward compatibility - f=${D}${libdir}/libtermcap.so - echo '/* GNU ld script */' >$f - echo 'INPUT(AS_NEEDED(-ltinfo))' >>$f - - if [ ! -d "${D}${base_libdir}" ]; then - # Setting base_libdir to libdir as is done in the -native - # case will skip this code - mkdir -p ${D}${base_libdir} - mv ${D}${libdir}/libncurses.so.* ${D}${base_libdir} - ! ${ENABLE_WIDEC} || \ - mv ${D}${libdir}/libncursesw.so.* ${D}${base_libdir} - - mv ${D}${libdir}/libtinfo.so.* ${D}${base_libdir} - rm ${D}${libdir}/libtinfo.so - - # Use lnr to ensure this is a relative link despite absolute paths - # (as we can't know the relationship between base_libdir and libdir). - # At some point we can rely on coreutils 8.16 which has ln -r. - lnr ${D}${base_libdir}/libtinfo.so.5 ${D}${libdir}/libtinfo.so - fi - if [ -d "${D}${includedir}/ncurses" ]; then - for f in `find ${D}${includedir}/ncurses -name "*.h"` - do - f=`basename $f` - test -e ${D}${includedir}/$f && continue - ln -sf ncurses/$f ${D}${includedir}/$f - done - fi - oe_multilib_header curses.h -} - -python populate_packages_prepend () { - libdir = d.expand("${libdir}") - base_libdir = d.expand("${base_libdir}") - pnbase = d.expand("${PN}-lib%s") - do_split_packages(d, libdir, r'^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True) - if libdir is not base_libdir: - do_split_packages(d, base_libdir, r'^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True) -} - - -#inherit update-alternatives - -ALTERNATIVE_PRIORITY = "100" - -ALTERNATIVE_ncurses-tools_class-target = "clear reset" - -BBCLASSEXTEND = "native nativesdk" - -PACKAGES += " \ - ${PN}-tools \ - ${PN}-terminfo-base \ - ${PN}-terminfo \ -" - -FILES_${PN} = "\ - ${bindir}/tput \ - ${bindir}/tset \ - ${bindir}/ncurses5-config \ - ${bindir}/ncursesw5-config \ - ${bindir}/ncurses6-config \ - ${bindir}/ncursesw6-config \ - ${datadir}/tabset \ -" - -# This keeps only tput/tset in ncurses -# clear/reset are in already busybox -FILES_${PN}-tools = "\ - ${bindir}/tic \ - ${bindir}/toe \ - ${bindir}/infotocap \ - ${bindir}/captoinfo \ - ${bindir}/infocmp \ - ${bindir}/clear \ - ${bindir}/reset \ - ${bindir}/tack \ - ${bindir}/tabs \ -" - -# 'reset' is a symlink to 'tset' which is in the 'ncurses' package -RDEPENDS_${PN}-tools = "${PN}" - -FILES_${PN}-terminfo = "\ - ${datadir}/terminfo \ -" - -FILES_${PN}-terminfo-base = "\ - ${sysconfdir}/terminfo \ -" - -RSUGGESTS_${PN}-libtinfo = "${PN}-terminfo" -RRECOMMENDS_${PN}-libtinfo = "${PN}-terminfo-base" diff --git a/meta-openeuler/recipes-labtools/ncurses/ncurses_6.3.bb b/meta-openeuler/recipes-labtools/ncurses/ncurses_6.3.bb deleted file mode 100644 index 873557a4c8eb578cd3dccd614f12884a22c92fdd..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-labtools/ncurses/ncurses_6.3.bb +++ /dev/null @@ -1,18 +0,0 @@ -require ncurses.inc -FILESEXTRAPATHS_append := "${THISDIR}/../../../../meta/recipes-core/ncurses/files/:" -LIC_FILES_CHKSUM="file://COPYING;md5=f852913c5d988a5f5a2f1df7ba7ee893" -SRC_URI = "file://ncurses/${BP}.tar.gz \ - file://ncurses/ncurses-config.patch \ - file://ncurses/ncurses-libs.patch \ - file://ncurses/ncurses-urxvt.patch \ - file://ncurses/ncurses-kbs.patch \ -" - -CFLAGS_remove_arm64eb += "-O2" -CXXFLAGS_remove_arm64eb += "-O2" -CPPFLAGS_remove_arm64eb += "-O2" -CPPFLAGS_append_arm64eb += "-Os" - -EXTRA_OECONF += "--with-abi-version=5 --cache-file=${B}/config.cache" -UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+(\.\d+)+(\+\d+)*)" - diff --git a/meta-openeuler/recipes-openamp/libmetal/libmetal_2021.10.0.bb b/meta-openeuler/recipes-openamp/libmetal/libmetal_2022.04.0.bb similarity index 100% rename from meta-openeuler/recipes-openamp/libmetal/libmetal_2021.10.0.bb rename to meta-openeuler/recipes-openamp/libmetal/libmetal_2022.04.0.bb diff --git a/meta-openeuler/recipes-openamp/openamp/openamp_2021.10.0.bb b/meta-openeuler/recipes-openamp/openamp/openamp_2021.10.0.bb deleted file mode 100644 index b531d8fd77e9fb9e2dec499f1bf1ed62640764ac..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-openamp/openamp/openamp_2021.10.0.bb +++ /dev/null @@ -1 +0,0 @@ -require openamp.inc \ No newline at end of file diff --git a/meta-openeuler/recipes-openamp/openamp/openamp_2022.04.0.bb b/meta-openeuler/recipes-openamp/openamp/openamp_2022.04.0.bb new file mode 100644 index 0000000000000000000000000000000000000000..e4468d9632064e1c7fde0637db0d2a707f174bf8 --- /dev/null +++ b/meta-openeuler/recipes-openamp/openamp/openamp_2022.04.0.bb @@ -0,0 +1,4 @@ +require openamp.inc + +# In opneamp demo, we use screen to open pty shell +RDEPENDS_${PN} += "screen" diff --git a/meta-openeuler/recipes-support/attr/attr_%.bbappend b/meta-openeuler/recipes-support/attr/attr_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..ef1c8a277fe1bc98355b38e24c57878109aad17d --- /dev/null +++ b/meta-openeuler/recipes-support/attr/attr_%.bbappend @@ -0,0 +1,16 @@ +# main bbfile: yocto-poky/meta/recipes-support/attr/attr_2.5.1.bb + +# attr version in openEuler +PV = "2.5.1" + +# files, patches can't be applied in openeuler or conflict with openeuler +SRC_URI_remove = " \ + ${SAVANNAH_GNU_MIRROR}/attr/${BP}.tar.gz \ + " + +SRC_URI += " \ + file://attr/attr-${PV}.tar.gz \ + file://attr/0001-bypass-wrong-output-when-enabled-selinux.patch \ + file://attr/0002-dont-skip-security.evm-when-copy-xattr.patch \ + " + diff --git a/meta-openeuler/recipes-support/bash-completion/bash-completion_%.bbappend b/meta-openeuler/recipes-support/bash-completion/bash-completion_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..f3a51dd84db512663008ca164b8f2c876e01c759 --- /dev/null +++ b/meta-openeuler/recipes-support/bash-completion/bash-completion_%.bbappend @@ -0,0 +1,6 @@ +# version in openEuler +PV = "2.11" + +# add patches in openEuler +SRC_URI += "file://bash-completion/bash-completion-remove-python2.patch \ +" diff --git a/meta-openeuler/recipes-support/ca-certificates/ca-certificates_%.bbappend b/meta-openeuler/recipes-support/ca-certificates/ca-certificates_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..529465c0f4f8ff3fa7a31d4da686b5ace3afa857 --- /dev/null +++ b/meta-openeuler/recipes-support/ca-certificates/ca-certificates_%.bbappend @@ -0,0 +1,17 @@ +# main bbfile: yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20210119.bb + +# don't donwload ca-certificates by network +SRC_URI_remove = " \ + git://salsa.debian.org/debian/ca-certificates.git;protocol=https \ +" + +# get extra tarball locally, because ca-certificates src repository dosen't have ca-certificates.crt or tarball +FILESEXTRAPATHS_append := "${THISDIR}/files/:" +SRC_URI += " \ + file://${BP}.tar.gz;name=tarball \ +" + +SRC_URI[tarball.md5sum] = "8c582657fde36a021e6387019526b545" +SRC_URI[tarball.sha256sum] = "a639f1d0598fa8f7a864c7c93860bde2eb00c5a51e66c0f7b0e716f092852eaf" + +S = "${WORKDIR}/${BP}" diff --git a/meta-openeuler/recipes-support/ca-certificates/files/ca-certificates-20210119.tar.gz b/meta-openeuler/recipes-support/ca-certificates/files/ca-certificates-20210119.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..0a7259bcc0f408b2767620477e46e12e3c6dcfbe Binary files /dev/null and b/meta-openeuler/recipes-support/ca-certificates/files/ca-certificates-20210119.tar.gz differ diff --git a/meta-openeuler/recipes-support/curl/curl_%.bbappend b/meta-openeuler/recipes-support/curl/curl_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..f94f1c4c635654e5e585c5ab945aa239eb263020 --- /dev/null +++ b/meta-openeuler/recipes-support/curl/curl_%.bbappend @@ -0,0 +1,29 @@ +# main bbfile: yocto-poky/meta/recipes-support/curl/curl_7.75.0.bb + +# version in openEuler +PV = "7.79.1" + +# files, patches can't be applied in openeuler or conflict with openeuler +SRC_URI_remove = " \ + https://curl.haxx.se/download/curl-${PV}.tar.bz2 \ + file://0001-vtls-add-isproxy-argument-to-Curl_ssl_get-addsession.patch \ + file://0002-transfer-strip-credentials-from-the-auto-referer-hea.patch \ + file://vtls-fix-addsessionid.patch \ + file://vtls-fix-warning.patch \ + file://CVE-2021-22898.patch \ + file://CVE-2021-22897.patch \ +" + +# files, patches that come from openeuler +# do not apply backport-0101-curl-7.32.0-multilib.patch due to failure "libcurl.pc failed sanity test" when doing QA staging "pkg-config libcurl" in this patch +SRC_URI += " \ + file://curl/${BP}.tar.xz;name=tarball \ +" + +SRC_URI[tarball.md5sum] = "74d3c4ca8aaa6c0619806d6e246e65fb" +SRC_URI[tarball.sha256sum] = "0606f74b1182ab732a17c11613cbbaf7084f2e6cca432642d0e3ad7c224c3689" + +# configure.ac in openEuler can't handle --without-libmetalink variable +EXTRA_OECONF_remove = " \ + --without-libmetalink \ +" diff --git a/meta-openeuler/recipes-support/db/db_%.bbappend b/meta-openeuler/recipes-support/db/db_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..1c31643c1bf06c061d6496df972cf5aead075523 --- /dev/null +++ b/meta-openeuler/recipes-support/db/db_%.bbappend @@ -0,0 +1,38 @@ +# main bbfile: yocto-poky/meta/recipes-support/db/db_5.3.28.bb + +# files, patches can't be applied in openeuler or conflict with openeuler +# patches that apply fail: +# 0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch +SRC_URI_remove = " \ + https://download.oracle.com/berkeley-db/db-${PV}.tar.gz \ + file://0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch \ +" + +# files, patches that come from openeuler +# patches that apply fail: +# add-check-for-device-number-in-__check_lock_fn.patch +# bugfix-fix-deadlock-on-mempool-file-locks.patch +# db-1.85-errno.patch +# db-5.3.28-condition-variable-ppc.patch +# db-5.3.28-rpm-lock-check.patch +# patches that compile fail: "undefined reference to `__os_pthreads_timestamp'" +# db-5.3.28-condition_variable.patch +SRC_URI_prepend = " \ + file://libdb/${BP}.tar.gz \ + file://libdb/007-mt19937db.c_license.patch \ + file://libdb/backport-CVE-2019-2708-Resolved-data-store-execution-which-led-to-partial-DoS.patch \ + file://libdb/checkpoint-opd-deadlock.patch \ + file://libdb/db-4.5.20-jni-include-dir.patch \ + file://libdb/db-4.6.21-1.85-compat.patch \ + file://libdb/db-5.3.21-memp_stat-upstream-fix.patch \ + file://libdb/db-5.3.21-mutex_leak.patch \ + file://libdb/db-5.3.28-atomic_compare_exchange.patch \ + file://libdb/db-5.3.28-cwd-db_config.patch \ + file://libdb/db-5.3.28-lemon_hash.patch \ + file://libdb/fix-a-potential-infinite-loop.patch \ + file://libdb/java8-fix.patch \ + file://libdb/libdb-5.3.21-region-size-check.patch \ + file://libdb/libdb-cbd-race.patch \ + file://libdb/libdb-limit-cpu.patch \ + file://libdb/libdb-multiarch.patch \ +" diff --git a/meta-openeuler/recipes-support/debianutils/debianutils_%.bbappend b/meta-openeuler/recipes-support/debianutils/debianutils_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..59254320e93c8dcfe8c5ef5a2f93427bcedccd3c --- /dev/null +++ b/meta-openeuler/recipes-support/debianutils/debianutils_%.bbappend @@ -0,0 +1,12 @@ +# main bbfile: yocto-poky/meta/recipes-support/debianutils/debianutils_4.11.2.bb + +# files, patches can't be applied in openeuler or conflict with openeuler +SRC_URI_remove = " \ + http://snapshot.debian.org/archive/debian/20200929T025235Z/pool/main/d/${BPN}/${BPN}_${PV}.tar.xz \ +" + +# get extra tarball locally, because there is no debianutils src repository +FILESEXTRAPATHS_append := "${THISDIR}/files/:" +SRC_URI += " \ + file://${BPN}_${PV}.tar.xz \ +" diff --git a/meta-openeuler/recipes-support/debianutils/files/debianutils_4.11.2.tar.xz b/meta-openeuler/recipes-support/debianutils/files/debianutils_4.11.2.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..f2df2a04858dba7a21e454ce1173d75020ef40cf Binary files /dev/null and b/meta-openeuler/recipes-support/debianutils/files/debianutils_4.11.2.tar.xz differ diff --git a/meta-openeuler/recipes-support/gdbm/gdbm_%.bbappend b/meta-openeuler/recipes-support/gdbm/gdbm_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..da11bc06ab6744c0f1806e4f401b74358cb0668b --- /dev/null +++ b/meta-openeuler/recipes-support/gdbm/gdbm_%.bbappend @@ -0,0 +1,17 @@ +# main bbfile: yocto-poky/meta/recipes-support/gdbm/gdbm_1.19.bb + +# version in openEuler +PV = "1.22" + +# files, patches can't be applied in openeuler or conflict with openeuler +SRC_URI_remove = " \ + ${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz \ + " + +SRC_URI += " \ + file://${BPN}-${PV}.tar.gz \ + " + +SRC_URI[tarball.md5sum] = "0bbd38f12656e4728e2f7c4708aec014" +SRC_URI[tarball.sha256sum] = "f366c823a6724af313b6bbe975b2809f9a157e5f6a43612a72949138d161d762" + diff --git a/meta-openeuler/recipes-support/gnutls/gnutls_%.bbappend b/meta-openeuler/recipes-support/gnutls/gnutls_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..4f8f94d5e5b850897d63b9e2af36d496b7e5d274 --- /dev/null +++ b/meta-openeuler/recipes-support/gnutls/gnutls_%.bbappend @@ -0,0 +1,18 @@ +# main bbfile: yocto-poky/meta/recipes-support/gnutls/gnutls_3.7.1.bb + +# version in openEuler +PV = "3.7.2" + +# files, patches can't be applied in openeuler or conflict with openeuler +SRC_URI_remove = " \ + https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz \ +" + +# files, patches that come from openeuler +SRC_URI += " \ + file://${BP}.tar.xz;name=tarball \ + file://fix-ipv6-handshake-failed.patch \ +" + +SRC_URI[tarball.md5sum] = "95c32a1af583ecfcb280648874c0fbd9" +SRC_URI[tarball.sha256sum] = "646e6c5a9a185faa4cea796d378a1ba8e1148dbb197ca6605f95986a25af2752" diff --git a/meta-openeuler/recipes-support/http-parser/http-parser_%.bbappend b/meta-openeuler/recipes-support/http-parser/http-parser_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..94897a4cbaf78f8532c7b2cfd248945bfec917fc --- /dev/null +++ b/meta-openeuler/recipes-support/http-parser/http-parser_%.bbappend @@ -0,0 +1,13 @@ +# source bb: meta-networking/recipes-support/http-parser/http-parser_2.9.4.bb;branch=master + +SRC_URI_remove = "git://github.com/nodejs/http-parser.git;branch=master;protocol=https" + +# apply openeuler source and patch +SRC_URI_prepend = "file://${BP}.tar.gz \ + file://backport-url-treat-empty-port-as-default.patch \ +" + +S = "${WORKDIR}/${BP}" + +SRC_URI[md5sum] = "1b0f2371aabacbadaa03cc532cedcf92" +SRC_URI[sha256sum] = "467b9e30fd0979ee301065e70f637d525c28193449e1b13fbcb1b1fab3ad224f" diff --git a/meta-openeuler/recipes-support/http-parser/http-parser_2.9.4.bb b/meta-openeuler/recipes-support/http-parser/http-parser_2.9.4.bb new file mode 100644 index 0000000000000000000000000000000000000000..724581999d7dba50e43f57dd88e0936d022f8cc5 --- /dev/null +++ b/meta-openeuler/recipes-support/http-parser/http-parser_2.9.4.bb @@ -0,0 +1,32 @@ +SUMMARY = "HTTP request/response parser for C" +DESCRIPTION = "This is a parser for HTTP messages written in C. It parses \ + both requests and responses. The parser is designed to be used \ + in performance HTTP applications. It does not make any \ + syscalls nor allocations, it does not buffer data, it can be \ + interrupted at anytime. Depending on your architecture, it \ + only requires about 40 bytes of data per message stream (in a \ + web server that is per connection)." +AUTHOR = "Stefan Wiehler " +HOMEPAGE = "https://github.com/nodejs/http-parser" +SECTION = "libs" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE-MIT;md5=9bfa835d048c194ab30487af8d7b3778" + +SRC_URI = "git://github.com/nodejs/http-parser.git;branch=master;protocol=https" +SRCREV = "2343fd6b5214b2ded2cdcf76de2bf60903bb90cd" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = "PLATFORM=linux" + +do_configure[noexec] = "1" + +do_compile() { + oe_runmake library package +} + +do_install() { + oe_runmake install DESTDIR=${D} PREFIX=${prefix} LIBDIR=${libdir} +} + +BBCLASSEXTEND = "native nativesdk" \ No newline at end of file diff --git a/meta-openeuler/recipes-support/libcap/libcap_%.bbappend b/meta-openeuler/recipes-support/libcap/libcap_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..306bcf338a847a62e953ef8448f411a151441205 --- /dev/null +++ b/meta-openeuler/recipes-support/libcap/libcap_%.bbappend @@ -0,0 +1,21 @@ +PV = "2.61" + +LIC_FILES_CHKSUM = "file://License;md5=e2370ba375efe9e1a095c26d37e483b8" +SRC_URI[sha256sum] = "4897da3617ab7a0364a82da7c8c5aa49be8129d84018df92f0982d1363a53758" + +# openeuler package and patches +SRC_URI = " \ + file://${BPN}-${PV}.tar.gz \ + file://libcap-buildflags.patch \ +" +# patches from poky +SRC_URI += " \ + file://0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch \ +" + +# use cross compile objcopy +# set lib dir, not use ldd to find, maybe fail +EXTRA_OEMAKE_class-target = " \ + OBJCOPY="${OBJCOPY}" \ + lib="${base_libdir}" \ +" diff --git a/meta-openeuler/recipes-core/libestr/libestr_0.1.11.bb b/meta-openeuler/recipes-support/libestr/libestr_0.1.11.bb similarity index 51% rename from meta-openeuler/recipes-core/libestr/libestr_0.1.11.bb rename to meta-openeuler/recipes-support/libestr/libestr_0.1.11.bb index d8c7d363c43ea6b8a769fe2217ca7184c6bf4971..5181cb72ced27950175a6a727e36da4cb6dfd69f 100644 --- a/meta-openeuler/recipes-core/libestr/libestr_0.1.11.bb +++ b/meta-openeuler/recipes-support/libestr/libestr_0.1.11.bb @@ -1,8 +1,16 @@ +# main bbfile: https://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-support/libestr/libestr_0.1.11.bb + SUMMARY = "some essentials for string handling (and a bit more)" HOMEPAGE = "http://libestr.adiscon.com/" LICENSE = "LGPLv2.1" LIC_FILES_CHKSUM = "file://COPYING;md5=9d6c993486c18262afba4ca5bcb894d0" -UPSTREAM_CHECK_URI = "http://libestr.adiscon.com/download/" +# obatin source from local tarball SRC_URI = "file://${BPN}/${BP}.tar.gz" + +SRC_URI[md5sum] = "1f25a2332750d4bfacfb314235fedff0" +SRC_URI[sha256sum] = "46632b2785ff4a231dcf241eeb0dcb5fc0c7d4da8ee49cf5687722cdbe8b2024" + +UPSTREAM_CHECK_URI = "http://libestr.adiscon.com/download/" + inherit autotools diff --git a/meta-openeuler/recipes-support/libevent/libevent_%.bbappend b/meta-openeuler/recipes-support/libevent/libevent_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..3cc6e58f5e38b08238448a24405aa40adcc70e22 --- /dev/null +++ b/meta-openeuler/recipes-support/libevent/libevent_%.bbappend @@ -0,0 +1,4 @@ +SRC_URI += " \ + file://libevent-nonettests.patch \ + file://http-add-callback-to-allow-server-to-decline-and-the.patch \ +" diff --git a/meta-openeuler/recipes-support/libffi/libffi_%.bbappend b/meta-openeuler/recipes-support/libffi/libffi_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..22bb5f22e3c7c74fcdb466ce540720832a9d50aa --- /dev/null +++ b/meta-openeuler/recipes-support/libffi/libffi_%.bbappend @@ -0,0 +1,12 @@ +PV = "3.4.2" + +SRC_URI[md5sum] = "294b921e6cf9ab0fbaea4b639f8fdbe8" +SRC_URI[sha256sum] = "540fb721619a6aba3bdeef7d940d8e9e0e6d2c193595bc243241b77ff9e93620" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=679b5c9bdc79a2b93ee574e193e7a7bc" + +# add not-win32.patch to fix libdir error +SRC_URI = " \ + file://${BPN}-${PV}.tar.gz \ + file://not-win32.patch \ +" diff --git a/meta-openeuler/recipes-support/libffi/libffi_3.4.2.bb b/meta-openeuler/recipes-support/libffi/libffi_3.4.2.bb deleted file mode 100644 index b360720068d767d5d6a71b666c442e88436051a4..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-support/libffi/libffi_3.4.2.bb +++ /dev/null @@ -1,33 +0,0 @@ -SUMMARY = "A portable foreign function interface library" -HOMEPAGE = "http://sourceware.org/libffi/" -DESCRIPTION = "The `libffi' library provides a portable, high level programming interface to various calling \ -conventions. This allows a programmer to call any function specified by a call interface description at run \ -time. FFI stands for Foreign Function Interface. A foreign function interface is the popular name for the \ -interface that allows code written in one language to call code written in another language. The `libffi' \ -library really only provides the lowest, machine dependent layer of a fully featured foreign function interface. \ -A layer must exist above `libffi' that handles type conversions for values passed between the two languages." - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=679b5c9bdc79a2b93ee574e193e7a7bc" - -SRC_URI = "file://libffi/${BPN}-${PV}.tar.gz" - -SRC_URI[md5sum] = "294b921e6cf9ab0fbaea4b639f8fdbe8" -SRC_URI[sha256sum] = "540fb721619a6aba3bdeef7d940d8e9e0e6d2c193595bc243241b77ff9e93620" - -EXTRA_OECONF += "--disable-builddir" -EXTRA_OEMAKE_class-target = "LIBTOOLFLAGS='--tag=CC'" -inherit autotools texinfo multilib_header - -do_install_append() { - oe_multilib_header ffi.h ffitarget.h -} - -FILES_${PN}-dev += "${libdir}/libffi-${PV}" - -# Doesn't compile in MIPS16e mode due to use of hand-written -# assembly -MIPS_INSTRUCTION_SET = "mips" - -BBCLASSEXTEND = "native nativesdk" - diff --git a/meta-openeuler/recipes-support/libgcrypt/libgcrypt_%.bbappend b/meta-openeuler/recipes-support/libgcrypt/libgcrypt_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..faeaa577597354dee7e5838f786c1249cec47548 --- /dev/null +++ b/meta-openeuler/recipes-support/libgcrypt/libgcrypt_%.bbappend @@ -0,0 +1,29 @@ +# version in openEuler +PV = "1.9.4" + +# apply source package in openEuler +SRC_URI_remove = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.bz2 \ +" + +SRC_URI_prepend = "file://libgcrypt/libgcrypt-${PV}.tar.bz2 \ +" + +# patches in openEuler +SRC_URI += "\ +file://backport-libgcrypt-1.7.3-ecc-test-fix.patch \ +file://backport-libgcrypt-1.8.4-fips-keygen.patch \ +file://backport-libgcrypt-1.8.4-use-poll.patch \ +file://backport-libgcrypt-1.6.1-mpicoder-gccopt.patch \ +file://backport-libgcrypt-1.8.5-intel-cet.patch \ +file://backport-libgcrypt-1.8.3-fips-ctor.patch \ +file://backport-libgcrypt-1.8.5-use-fipscheck.patch \ +file://backport-libgcrypt-1.8.3-fips-enttest.patch \ +file://backport-libgcrypt-1.7.3-fips-cavs.patch \ +file://backport-libgcrypt-1.8.3-md-fips-enforce.patch \ +file://backport-libgcrypt-1.8.4-tests-fipsmode.patch \ +file://backport-libgcrypt-1.8.5-fips-module.patch \ +file://backport-libgcrypt-1.8.5-getrandom.patch \ +" + +# checksum changed +SRC_URI[sha256sum] = "ea849c83a72454e3ed4267697e8ca03390aee972ab421e7df69dfe42b65caaf7" diff --git a/meta-openeuler/recipes-support/libgpg-error/files/pkgconfig-fix.patch b/meta-openeuler/recipes-support/libgpg-error/files/pkgconfig-fix.patch new file mode 100644 index 0000000000000000000000000000000000000000..ff15759309ff5614c4df738d662f9ec9286acdb6 --- /dev/null +++ b/meta-openeuler/recipes-support/libgpg-error/files/pkgconfig-fix.patch @@ -0,0 +1,200 @@ +From 52aae746760ce5b88e61ce994f5055e4ce809821 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Thu, 29 Mar 2018 15:12:17 +0800 +Subject: [PATCH] support pkgconfig + +Upstream-Status: Pending + +Rebase to 1.28 + +Signed-off-by: Hongxu Jia + +Refactored for 1.33 +Signed-off-by: Armin Kuster +Signed-off-by: Zheng Ruoqin + +--- + src/gpg-error.m4 | 160 +---------------------------------------------- + 1 file changed, 3 insertions(+), 157 deletions(-) + +diff --git a/src/gpg-error.m4 b/src/gpg-error.m4 +index 56a5d07..28920ae 100644 +--- a/src/gpg-error.m4 ++++ b/src/gpg-error.m4 +@@ -27,157 +27,12 @@ dnl is added to the gpg_config_script_warn variable. + dnl + AC_DEFUN([AM_PATH_GPG_ERROR], + [ AC_REQUIRE([AC_CANONICAL_HOST]) +- gpg_error_config_prefix="" +- dnl --with-libgpg-error-prefix=PFX is the preferred name for this option, +- dnl since that is consistent with how our three siblings use the directory/ +- dnl package name in --with-$dir_name-prefix=PFX. +- AC_ARG_WITH(libgpg-error-prefix, +- AS_HELP_STRING([--with-libgpg-error-prefix=PFX], +- [prefix where GPG Error is installed (optional)]), +- [gpg_error_config_prefix="$withval"]) +- +- dnl Accept --with-gpg-error-prefix and make it work the same as +- dnl --with-libgpg-error-prefix above, for backwards compatibility, +- dnl but do not document this old, inconsistently-named option. +- AC_ARG_WITH(gpg-error-prefix,, +- [gpg_error_config_prefix="$withval"]) +- +- if test x"${GPG_ERROR_CONFIG}" = x ; then +- if test x"${gpg_error_config_prefix}" != x ; then +- GPG_ERROR_CONFIG="${gpg_error_config_prefix}/bin/gpg-error-config" +- else +- case "${SYSROOT}" in +- /*) +- if test -x "${SYSROOT}/bin/gpg-error-config" ; then +- GPG_ERROR_CONFIG="${SYSROOT}/bin/gpg-error-config" +- fi +- ;; +- '') +- ;; +- *) +- AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.]) +- ;; +- esac +- fi +- fi +- +- AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) +- min_gpg_error_version=ifelse([$1], ,1.33,$1) +- ok=no +- +- AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no, [$prefix/bin:$PATH]) +- if test "$GPGRT_CONFIG" != "no"; then +- # Determine gpgrt_libdir +- # +- # Get the prefix of gpgrt-config assuming it's something like: +- # /bin/gpgrt-config +- gpgrt_prefix=${GPGRT_CONFIG%/*/*} +- possible_libdir1=${gpgrt_prefix}/lib +- # Determine by using system libdir-format with CC, it's like: +- # Normal style: /usr/lib +- # GNU cross style: /usr//lib +- # Debian style: /usr/lib/ +- # Fedora/openSUSE style: /usr/lib, /usr/lib32 or /usr/lib64 +- # It is assumed that CC is specified to the one of host on cross build. +- if libdir_candidates=$(${CC:-cc} -print-search-dirs | \ +- sed -n -e "/^libraries/{s/libraries: =//;s/:/\\ +-/g;p;}"); then +- # From the output of -print-search-dirs, select valid pkgconfig dirs. +- libdir_candidates=$(for dir in $libdir_candidates; do +- if p=$(cd $dir 2>/dev/null && pwd); then +- test -d "$p/pkgconfig" && echo $p; +- fi +- done) +- +- for possible_libdir0 in $libdir_candidates; do +- # possible_libdir0: +- # Fallback candidate, the one of system-installed (by $CC) +- # (/usr//lib, /usr/lib/ or /usr/lib32) +- # possible_libdir1: +- # Another candidate, user-locally-installed +- # (/lib) +- # possible_libdir2 +- # Most preferred +- # (//lib, +- # /lib/ or /lib32) +- if test "${possible_libdir0##*/}" = "lib"; then +- possible_prefix0=${possible_libdir0%/lib} +- possible_prefix0_triplet=${possible_prefix0##*/} +- if test -z "$possible_prefix0_triplet"; then +- continue +- fi +- possible_libdir2=${gpgrt_prefix}/$possible_prefix0_triplet/lib +- else +- possible_prefix0=${possible_libdir0%%/lib*} +- possible_libdir2=${gpgrt_prefix}${possible_libdir0#$possible_prefix0} +- fi +- if test -f ${possible_libdir2}/pkgconfig/gpg-error.pc; then +- gpgrt_libdir=${possible_libdir2} +- elif test -f ${possible_libdir1}/pkgconfig/gpg-error.pc; then +- gpgrt_libdir=${possible_libdir1} +- elif test -f ${possible_libdir0}/pkgconfig/gpg-error.pc; then +- gpgrt_libdir=${possible_libdir0} +- fi +- if test -n "$gpgrt_libdir"; then break; fi +- done +- else +- # When we cannot determine system libdir-format, use this: +- gpgrt_libdir=${possible_libdir1} +- fi +- else +- unset GPGRT_CONFIG +- fi +- +- if test -n "$gpgrt_libdir"; then +- GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir" +- if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then +- GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" +- AC_MSG_NOTICE([Use gpgrt-config with $gpgrt_libdir as gpg-error-config]) +- gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion` +- else +- unset GPGRT_CONFIG +- fi +- elif test "$GPG_ERROR_CONFIG" != "no"; then +- gpg_error_config_version=`$GPG_ERROR_CONFIG --version` +- fi +- if test "$GPG_ERROR_CONFIG" != "no"; then +- req_major=`echo $min_gpg_error_version | \ +- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` +- req_minor=`echo $min_gpg_error_version | \ +- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` +- major=`echo $gpg_error_config_version | \ +- sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` +- minor=`echo $gpg_error_config_version | \ +- sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` +- if test "$major" -gt "$req_major"; then +- ok=yes +- else +- if test "$major" -eq "$req_major"; then +- if test "$minor" -ge "$req_minor"; then +- ok=yes +- fi +- fi +- fi +- fi +- AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) ++ min_gpg_error_version=ifelse([$1], ,0.0,$1) ++ PKG_CHECK_MODULES(GPG_ERROR, [gpg-error >= $min_gpg_error_version], [ok=yes], [ok=no]) + if test $ok = yes; then +- GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG --cflags` +- GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG --libs` +- if test -z "$GPGRT_CONFIG"; then +- GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --mt --cflags 2>/dev/null` +- GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --mt --libs 2>/dev/null` +- else +- GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` +- GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" +- GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` +- GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" +- fi +- AC_MSG_RESULT([yes ($gpg_error_config_version)]) + ifelse([$2], , :, [$2]) + if test -z "$GPGRT_CONFIG"; then +- gpg_error_config_host=`$GPG_ERROR_CONFIG --host 2>/dev/null || echo none` +- else +- gpg_error_config_host=`$GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` ++ gpg_error_config_host=`$PKG_CONFIG --variable=host gpg-error` + fi + if test x"$gpg_error_config_host" != xnone ; then + if test x"$gpg_error_config_host" != x"$host" ; then +@@ -193,15 +48,6 @@ AC_DEFUN([AM_PATH_GPG_ERROR], + fi + fi + else +- GPG_ERROR_CFLAGS="" +- GPG_ERROR_LIBS="" +- GPG_ERROR_MT_CFLAGS="" +- GPG_ERROR_MT_LIBS="" +- AC_MSG_RESULT(no) + ifelse([$3], , :, [$3]) + fi +- AC_SUBST(GPG_ERROR_CFLAGS) +- AC_SUBST(GPG_ERROR_LIBS) +- AC_SUBST(GPG_ERROR_MT_CFLAGS) +- AC_SUBST(GPG_ERROR_MT_LIBS) + ]) diff --git a/meta-openeuler/recipes-support/libgpg-error/libgpg-error_%.bbappend b/meta-openeuler/recipes-support/libgpg-error/libgpg-error_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..e033eca08e0271ce41b1d6956a0402ba398796d0 --- /dev/null +++ b/meta-openeuler/recipes-support/libgpg-error/libgpg-error_%.bbappend @@ -0,0 +1,20 @@ +# version in openEuler +PV = "1.43" + +# apply source package in openEuler +SRC_URI_remove = "${GNUPG_MIRROR}/libgpg-error/libgpg-error-${PV}.tar.bz2 \ +file://pkgconfig.patch \ +" + +SRC_URI_prepend = "file://libgpg-error/libgpg-error-${PV}.tar.gz \ +" + +# pkgconfig.patch must be applied, otherwise it makes libgcrypy package +# configure failed. This patch is from open embedded to support version 1.43 +SRC_URI += "file://pkgconfig-fix.patch " + +# patch directary +FILESEXTRAPATHS_append := "${THISDIR}/files/:" + +# checksum changed +SRC_URI[sha256sum] = "a260706dbab849b85f6eabe418f6dc58e22bddf4b9d7fccb681907e43408d0c9" diff --git a/meta-openeuler/recipes-support/libjitterentropy/libjitterentropy_%.bbappend b/meta-openeuler/recipes-support/libjitterentropy/libjitterentropy_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..94db4e52c8815f05904204b9b43e947d7a634775 --- /dev/null +++ b/meta-openeuler/recipes-support/libjitterentropy/libjitterentropy_%.bbappend @@ -0,0 +1,15 @@ +# main bbfile: yocto-poky/meta/recipes-support/libjitterentropy_3.0.1.bb + +# version in openEuler +PV = "3.3.1" + +# poky's recipe use git protocol and no patchs in SRC_URI, so overwrite directly. +SRC_URI = "file://jitterentropy-library/jitterentropy-library-${PV}.tar.gz" + +# license file checksum changed. +LIC_FILES_CHKSUM = "file://LICENSE;md5=1c94a9d191202a5552f381a023551396 \ + file://LICENSE.gplv2;md5=eb723b61539feef013de476e68b5c50a \ + file://LICENSE.bsd;md5=66a5cedaf62c4b2637025f049f9b826f \ + " + +S = "${WORKDIR}/jitterentropy-library-${PV}" diff --git a/meta-openeuler/recipes-support/libnl/libnl_%.bbappend b/meta-openeuler/recipes-support/libnl/libnl_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..6943d0466f5a38953943fd34c8e0e0853fc2e483 --- /dev/null +++ b/meta-openeuler/recipes-support/libnl/libnl_%.bbappend @@ -0,0 +1,10 @@ +OPENEULER_REPO_NAME = "libnl3" +SRC_URI += " \ + file://backport-lib-add-include-netlink-private-nl-auto-h-header.patch \ + file://backport-lib-use-proper-int-type-for-id-attributes-in-nl_object_identical.patch \ + file://backport-route-link-add-RTNL_LINK_REASM_OVERLAPS-stat.patch \ + file://backport-route-link-Check-for-null-pointer-in-macvlan.patch \ + file://backport-rtnl-link-fix-leaking-rtnl_link_af_ops-in-link_msg_parser.patch \ + file://backport-rtnl-route-fix-NLE_NOMEM-handling-in-parse_multipath.patch \ + file://solve-redefinition-of-struct-ipv6_mreq.patch \ +" diff --git a/meta-openeuler/recipes-support/libpcre/libpcre_%.bbappend b/meta-openeuler/recipes-support/libpcre/libpcre_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..882c58553327618fd71ab71773ff69b4f4e59b67 --- /dev/null +++ b/meta-openeuler/recipes-support/libpcre/libpcre_%.bbappend @@ -0,0 +1,22 @@ +# main bbfile: yocto-poky/meta/recipes-support/libpcre/libpcre_8.44.bb + +# libpcre version in openeuler +PV = "8.45" + +# The MD5 valude of LICENCE file has been changed in this version +LIC_FILES_CHKSUM = "file://LICENCE;md5=b5d5d1a69a24ea2718263f1ff85a1c58" + +# remove conflict files from poky +SRC_URI_remove = " \ + https://ftp.pcre.org/pub/pcre/pcre-${PV}.tar.bz2 \ +" + +# bb name is libpcre, but we want pcre in openeuler +SRC_URI_prepend += " \ + file://pcre/pcre-${PV}.tar.bz2 \ + " + +SRC_URI[md5sum] = "4452288e6a0eefb2ab11d36010a1eebb" +SRC_URI[sha256sum] = "4dae6fdcd2bb0bb6c37b5f97c33c2be954da743985369cddac3546e3218bffb8" + +# no patch in openeuler diff --git a/meta-openeuler/recipes-support/libunistring/libunistring_%.bbappend b/meta-openeuler/recipes-support/libunistring/libunistring_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..8638b35abdb265db1f012a59b8fe22bc747f7794 --- /dev/null +++ b/meta-openeuler/recipes-support/libunistring/libunistring_%.bbappend @@ -0,0 +1,14 @@ +# main bbfile: yocto-poky/meta/recipes-support/libunistring/libunistring_0.9.10.bb + +# files, patches can't be applied in openeuler or conflict with openeuler +SRC_URI_remove = " \ + ${GNU_MIRROR}/libunistring/libunistring-${PV}.tar.gz \ +" + +# files, patches that come from openeuler +SRC_URI += " \ + file://${BP}.tar.xz;name=tarball \ +" + +SRC_URI[tarball.md5sum] = "db08bb384e81968957f997ec9808926e" +SRC_URI[tarball.sha256sum] = "eb8fb2c3e4b6e2d336608377050892b54c3c983b646c561836550863003c05d7" diff --git a/meta-openeuler/recipes-support/liburcu/liburcu_%.bbappend b/meta-openeuler/recipes-support/liburcu/liburcu_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..982aa095fb9c5d587b19a96832104fc2264baeb8 --- /dev/null +++ b/meta-openeuler/recipes-support/liburcu/liburcu_%.bbappend @@ -0,0 +1,9 @@ +# main bbfile: yocto-poky/meta/recipes-support/liburcu_0.12.2.bb + +# version in openEuler +PV = "0.13.0" + +OPENEULER_REPO_NAME = "userspace-rcu" + +SRC_URI[md5sum] = "8cb75dbb05774c03e66c63cb3186dd59" +SRC_URI[sha256sum] = "cbb20dbe1a892c2a4d8898bac4316176e585392693d498766ccbbc68cf20ba20" \ No newline at end of file diff --git a/meta-openeuler/recipes-support/libusb/libusb1_%.bbappend b/meta-openeuler/recipes-support/libusb/libusb1_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..b3df772c9b3a668627b6a17e1ee8b3fd540fa152 --- /dev/null +++ b/meta-openeuler/recipes-support/libusb/libusb1_%.bbappend @@ -0,0 +1,6 @@ +PV = "1.0.24" +OPENEULER_REPO_NAME = "libusbx" + +# no uedev in openeuler +PACKAGECONFIG_class-target_remove += "udev" + diff --git a/meta-openeuler/recipes-support/libxslt/libxslt_%.bbappend b/meta-openeuler/recipes-support/libxslt/libxslt_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..3a91f56852270b0abe4bc19ad3f903c1277a50da --- /dev/null +++ b/meta-openeuler/recipes-support/libxslt/libxslt_%.bbappend @@ -0,0 +1,13 @@ +SRC_URI += " \ + file://CVE-2015-9019.patch \ + file://Fix-variable-syntax-in-Python-configuration.patch \ + file://Fix-clang-Wconditional-uninitialized-warning-in-libx.patch \ + file://Fix-clang-Wimplicit-int-conversion-warning.patch \ + file://Fix-implicit-int-conversion-warning-in-exslt-crypto..patch \ + file://Fix-quadratic-runtime-with-text-and-xsl-message.patch \ + file://Fix-double-free-with-stylesheets-containing-entity-n.patch \ + file://Fix-use-after-free-in-xsltApplyTemplates.patch \ +" + +SRC_URI[md5sum] = "a96b227436c0f394a59509fc7bfefcb4" +SRC_URI[sha256sum] = "9a1af553b0bed564f0fb48c0902c4ef298cb21afc719f45ec52dbbcdd6fbe974" diff --git a/meta-openeuler/recipes-support/lz4/lz4_%.bbappend b/meta-openeuler/recipes-support/lz4/lz4_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..3ae2eeb37e8a68a1f228ff991700e4aabbb5c32c --- /dev/null +++ b/meta-openeuler/recipes-support/lz4/lz4_%.bbappend @@ -0,0 +1,21 @@ +# main bbfile: yocto-poky/meta/recipes-support/lz4/lz4_1.9.3.bb + +# attr version in openEuler +PV = "1.9.3" + +S = "${WORKDIR}/${BPN}-${PV}" + +# files, patches can't be applied in openeuler or conflict with openeuler +SRC_URI_remove = " \ + git://github.com/lz4/lz4.git;branch=release \ + " + +SRC_URI += " \ + file://${BPN}-${PV}.tar.gz \ + file://Fix-Data-Corruption-Bug-when-Streaming-with-an-Attac.patch \ + file://backport-CVE-2021-3520.patch \ + " + +SRC_URI[tarball.md5sum] = "3a1ab1684e14fc1afc66228ce61b2db3" +SRC_URI[tarball.sha256sum] = "030644df4611007ff7dc962d981f390361e6c97a34e5cbc393ddfbe019ffe2c1" + diff --git a/meta-openeuler/recipes-support/lzo/lzo_%.bbappend b/meta-openeuler/recipes-support/lzo/lzo_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..7bcb592f40f6d8af1e5ff38c9b47d23870231042 --- /dev/null +++ b/meta-openeuler/recipes-support/lzo/lzo_%.bbappend @@ -0,0 +1,17 @@ +# main bbfile: yocto-poky/meta/recipes-support/lzo/lzo_2.10.bb + +# attr version in openEuler +PV = "2.10" + +# files, patches can't be applied in openeuler or conflict with openeuler +SRC_URI_remove = " \ + http://www.oberhumer.com/opensource/lzo/download/lzo-2.10.tar.gz \ + " + +SRC_URI += " \ + file://${BPN}-${PV}.tar.gz \ + " + +SRC_URI[tarball.md5sum] = "39d3f3f9c55c87b1e5d6888e1420f4b5" +SRC_URI[tarball.sha256sum] = "c0f892943208266f9b6543b3ae308fab6284c5c90e627931446fb49b4221a072" + diff --git a/meta-openeuler/recipes-support/nettle/nettle_%.bbappend b/meta-openeuler/recipes-support/nettle/nettle_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..69218c40db388712d6cefbf70dd263f3b38cb6a4 --- /dev/null +++ b/meta-openeuler/recipes-support/nettle/nettle_%.bbappend @@ -0,0 +1,18 @@ +# main bbfile: yocto-poky/meta/recipes-support/nettle/nettle_3.7.2.bb + +# version in openEuler +PV = "3.8.1" + +# files, patches can't be applied in openeuler or conflict with openeuler +SRC_URI_remove = " \ + ${GNU_MIRROR}/${BPN}/${BP}.tar.gz \ +" + +# files, patches that come from openeuler +# don't apply 0000-nettle-3.3-remove-ecc-testsuite.patch due to failure: "No known curve with name secp192r1" +SRC_URI += " \ + file://${BP}.tar.gz;name=tarball \ +" + +SRC_URI[tarball.md5sum] = "e15c5fd5cc901f5dde6a271d7f2320d1" +SRC_URI[tarball.sha256sum] = "364f3e2b77cd7dcde83fd7c45219c834e54b0c75e428b6f894a23d12dd41cbfe" diff --git a/meta-openeuler/recipes-support/popt/popt_%.bbappend b/meta-openeuler/recipes-support/popt/popt_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..5257ca8d7decb83d2702384ec5035eacabff380d --- /dev/null +++ b/meta-openeuler/recipes-support/popt/popt_%.bbappend @@ -0,0 +1,9 @@ +# main bbfile: yocto-poky/meta/recipes-support/popt/popt_1.18.bb + +# files, patches that come from openeuler +SRC_URI += " \ + file://popt/fix-coverity-CID-1057440-Unused-pointer-value-UNUSED.patch \ + file://popt/fix-handle-newly-added-asset-.-call-like-elsewhere.patch \ + file://popt/fix-obscure-iconv-mis-call-error-path-could-lead-to-.patch \ + file://popt/fix-permit-reading-aliases-remove-left-over-goto-exi.patch \ +" diff --git a/meta-openeuler/recipes-support/popt/popt_1.18.bb b/meta-openeuler/recipes-support/popt/popt_1.18.bb deleted file mode 100644 index f88c821e95c161f1f776dd8a90549f02973f6092..0000000000000000000000000000000000000000 --- a/meta-openeuler/recipes-support/popt/popt_1.18.bb +++ /dev/null @@ -1,21 +0,0 @@ -SUMMARY = "Library for parsing command line options" -DESCRIPTION = "Popt is a C library for parsing command line parameters. Popt was heavily influenced by the getopt() and getopt_long() functions, but it improves on them by allowing more powerful argument expansion. Popt can parse arbitrary argv[] style arrays and automatically set variables based on command line arguments." -HOMEPAGE = "https://www.rpm.org/" -SECTION = "libs" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=cb0613c30af2a8249b8dcc67d3edb06d" - -DEPENDS = "virtual/libiconv" - -SRC_URI = "file://popt/${BP}.tar.gz \ - file://popt/fix-coverity-CID-1057440-Unused-pointer-value-UNUSED.patch \ - file://popt/fix-handle-newly-added-asset-.-call-like-elsewhere.patch \ - file://popt/fix-obscure-iconv-mis-call-error-path-could-lead-to-.patch \ - file://popt/fix-permit-reading-aliases-remove-left-over-goto-exi.patch \ -" -SRC_URI[sha256sum] = "5159bc03a20b28ce363aa96765f37df99ea4d8850b1ece17d1e6ad5c24fdc5d1" - -inherit autotools gettext - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-support/rng-tools/rng-tools_%.bbappend b/meta-openeuler/recipes-support/rng-tools/rng-tools_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..946fd587e82e8eee319eb5bd4287d137fa32605d --- /dev/null +++ b/meta-openeuler/recipes-support/rng-tools/rng-tools_%.bbappend @@ -0,0 +1,14 @@ +# version in openEuler +PV = "6.14" + +# remove git protocol +SRC_URI_remove = "\ + git://github.com/nhorman/rng-tools.git \ +" + +SRC_URI_prepend = "\ + file://rng-tools/v${PV}.tar.gz \ +" + +# change source directory +S = "${WORKDIR}/${BP}" diff --git a/meta-openeuler/recipes-support/sqlite/sqlite3_%.bbappend b/meta-openeuler/recipes-support/sqlite/sqlite3_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..f44fa6971bad4ac3cbc2bd724caf2f61963e7478 --- /dev/null +++ b/meta-openeuler/recipes-support/sqlite/sqlite3_%.bbappend @@ -0,0 +1,9 @@ +# main bb file: yocto-poky/meta/recipes-support/sqlite/sqlite3_3.35.0.bb + +# version in openEuler +PV = "3.36.0" + +# openEuler repo name +OPENEULER_REPO_NAME = "sqlite" + +SRC_URI[sha256sum] = "bd90c3eb96bee996206b83be7065c9ce19aef38c3f4fb53073ada0d0b69bbce3" \ No newline at end of file diff --git a/scripts/compile.sh b/scripts/compile.sh index cc58a20869b43b8b2d0093d97394ad370fbdcfda..19a009af7b73c1720729f3cdfa3410040c368306 100644 --- a/scripts/compile.sh +++ b/scripts/compile.sh @@ -12,6 +12,7 @@ usage() echo " aarch64-std (default)" echo " aarch64-pro" echo " arm-std" + echo " x86-64-std" echo " raspberrypi4-64" echo " Build dir: /build (defaut)" echo " External toolchain dir(absoulte path):" @@ -70,7 +71,11 @@ get_build_info() "arm-std") MACHINE="qemu-arm" ;; - *) + "x86-64-std") + MACHINE="qemu-x86-64" + BITBAKE_OPT="openeuler-image openeuler-image-tiny" + ;; + *) echo "unknown platform, use aarch64-std as default" PLATFORM="aarch64-std" MACHINE="qemu-aarch64" @@ -82,6 +87,8 @@ get_build_info() OPENEULER_TOOLCHAIN_DIR="OPENEULER_TOOLCHAIN_DIR_aarch64";; "qemu-arm") OPENEULER_TOOLCHAIN_DIR="OPENEULER_TOOLCHAIN_DIR_arm";; + "qemu-x86-64") + OPENEULER_TOOLCHAIN_DIR="OPENEULER_TOOLCHAIN_DIR_x86-64";; *) echo "unknown machine" usage || return 1 @@ -91,9 +98,6 @@ get_build_info() # this function sets up the yocto build environment set_env() { - # as tools like ldconfig will be used, add /usr/sbin in $PATH - export PATH="/usr/sbin/:$PATH" - # set the TEMPLATECONF of yocto, make build dir and init the yocto build # environment TEMPLATECONF="${SRC_DIR}/yocto-meta-openeuler/meta-openeuler/conf" @@ -118,10 +122,6 @@ set_env() if echo "$MACHINE" | grep -q "^raspberrypi";then grep "meta-raspberrypi" conf/bblayers.conf |grep -qv "^[[:space:]]*#" || sed -i "/\/meta-openeuler /a \ "${SRC_DIR}"/yocto-meta-openeuler/bsp/meta-raspberrypi \\\\" conf/bblayers.conf fi - # set the correct automake command and add it into HOSTTOOLS - # if automake-1.* is not in HOSTOOLS, append it - local automake_v=$(ls /usr/bin/automake-1.* |awk -F "/" '{print $4}') - grep -q "HOSTTOOLS .*$automake_v" conf/local.conf || echo "HOSTTOOLS += \"$automake_v\"" >> conf/local.conf # set DATETIME in conf/local.conf # you can set DATETIME from environment variable or get time by date diff --git a/scripts/download_code.sh b/scripts/download_code.sh index 01c5f7d2deacc2ec75cd64bc916a04c99f8d79dc..564c303a2bea00141e1b34e340e9fbb08a514543 100644 --- a/scripts/download_code.sh +++ b/scripts/download_code.sh @@ -115,7 +115,8 @@ download_code() update_code_repo openeuler/kernel ${KERNEL_BRANCH} kernel-5.10 update_code_repo src-openeuler/kernel ${SRC_BRANCH} src-kernel-5.10 update_code_repo src-openeuler/busybox ${SRC_BRANCH} - update_code_repo openeuler/yocto-embedded-tools ${SRC_BRANCH} + # update_code_repo openeuler/yocto-embedded-tools ${SRC_BRANCH} + update_code_repo openeuler/yocto-embedded-tools yoctor_refactor update_code_repo openeuler/yocto-poky ${SRC_BRANCH} update_code_repo src-openeuler/yocto-pseudo ${SRC_BRANCH} update_code_repo src-openeuler/audit ${SRC_BRANCH} @@ -123,6 +124,7 @@ download_code() update_code_repo src-openeuler/libcap-ng ${SRC_BRANCH} update_code_repo src-openeuler/libpwquality ${SRC_BRANCH} update_code_repo src-openeuler/openssh ${SRC_BRANCH} + update_code_repo src-openeuler/libnsl2 ${SRC_BRANCH} update_code_repo src-openeuler/openssl ${SRC_BRANCH} update_code_repo src-openeuler/pam ${SRC_BRANCH} update_code_repo src-openeuler/shadow ${SRC_BRANCH} @@ -134,6 +136,8 @@ download_code() update_code_repo src-openeuler/less ${SRC_BRANCH} update_code_repo src-openeuler/gzip ${SRC_BRANCH} update_code_repo src-openeuler/xz ${SRC_BRANCH} + update_code_repo src-openeuler/lzo ${SRC_BRANCH} + update_code_repo src-openeuler/lz4 ${SRC_BRANCH} update_code_repo src-openeuler/bzip2 ${SRC_BRANCH} update_code_repo src-openeuler/sed ${SRC_BRANCH} update_code_repo src-openeuler/json-c ${SRC_BRANCH} @@ -187,11 +191,55 @@ download_code() update_code_repo src-openeuler/raspberrypi-firmware ${SRC_BRANCH} update_code_repo src-openeuler/gmp ${SRC_BRANCH} update_code_repo src-openeuler/gdb ${SRC_BRANCH} - update_code_repo src-openeuler/libmetal ${SRC_BRANCH} - update_code_repo src-openeuler/OpenAMP ${SRC_BRANCH} + update_code_repo src-openeuler/libmetal master + update_code_repo src-openeuler/OpenAMP master update_code_repo src-openeuler/sysfsutils ${SRC_BRANCH} update_code_repo src-openeuler/tcl ${SRC_BRANCH} update_code_repo src-openeuler/expect ${SRC_BRANCH} + update_code_repo src-openeuler/jitterentropy-library ${SRC_BRANCH} + update_code_repo src-openeuler/m4 ${SRC_BRANCH} + update_code_repo src-openeuler/gdbm ${SRC_BRANCH} + update_code_repo src-openeuler/libtool ${SRC_BRANCH} + update_code_repo src-openeuler/libidn2 ${SRC_BRANCH} + update_code_repo src-openeuler/libunistring ${SRC_BRANCH} + update_code_repo src-openeuler/gnutls ${SRC_BRANCH} + update_code_repo src-openeuler/nettle ${SRC_BRANCH} + update_code_repo src-openeuler/rng-tools ${SRC_BRANCH} + update_code_repo src-openeuler/bash-completion ${SRC_BRANCH} + update_code_repo src-openeuler/coreutils ${SRC_BRANCH} + update_code_repo src-openeuler/findutils ${SRC_BRANCH} + update_code_repo src-openeuler/gawk ${SRC_BRANCH} + update_code_repo src-openeuler/libmnl ${SRC_BRANCH} + update_code_repo src-openeuler/libuv ${SRC_BRANCH} + update_code_repo src-openeuler/flex ${SRC_BRANCH} + update_code_repo src-openeuler/sqlite ${SRC_BRANCH} + update_code_repo src-openeuler/bison ${SRC_BRANCH} + update_code_repo src-openeuler/perl ${SRC_BRANCH} + update_code_repo src-openeuler/userspace-rcu ${SRC_BRANCH} + update_code_repo src-openeuler/lttng-ust ${SRC_BRANCH} + update_code_repo src-openeuler/libdb ${SRC_BRANCH} + update_code_repo src-openeuler/groff ${SRC_BRANCH} + update_code_repo src-openeuler/nasm ${SRC_BRANCH} + update_code_repo src-openeuler/syslinux ${SRC_BRANCH} + update_code_repo src-openeuler/cdrkit ${SRC_BRANCH} + update_code_repo src-openeuler/yocto-opkg-utils ${SRC_BRANCH} + update_code_repo src-openeuler/python3 ${SRC_BRANCH} + update_code_repo src-openeuler/libgpg-error ${SRC_BRANCH} + update_code_repo src-openeuler/libgcrypt ${SRC_BRANCH} + update_code_repo src-openeuler/kbd ${SRC_BRANCH} + update_code_repo src-openeuler/autoconf-archive ${SRC_BRANCH} + update_code_repo src-openeuler/libxslt ${SRC_BRANCH} + # using higher version, otherwise there are too many cve patches to apply. + update_code_repo src-openeuler/dbus openEuler-22.09 + update_code_repo src-openeuler/wpa_supplicant openEuler-22.09 + update_code_repo src-openeuler/grub2 openEuler-22.09 + update_code_repo src-openeuler/parted openEuler-22.09 + update_code_repo src-openeuler/intltool openEuler-22.09 + update_code_repo src-openeuler/tar openEuler-22.09 + update_code_repo src-openeuler/perl-XML-Parser openEuler-22.09 + update_code_repo src-openeuler/systemd openEuler-22.09 + update_code_repo src-openeuler/gnu-efi openEuler-22.09 + update_code_repo src-openeuler/screen openEuler-22.09 } # download iSulad related packages @@ -215,9 +263,7 @@ download_iSulad_code() clone_dsoftbus_code() { update_code_repo openeuler/dsoftbus_standard ${SRC_BRANCH} - # 暂时固定yocto-embedded-tools分支为openEuler-22.03-LTS - # update_code_repo openeuler/yocto-embedded-tools ${SRC_BRANCH} - update_code_repo openeuler/yocto-embedded-tools "openEuler-22.03-LTS" + update_code_repo openeuler/yocto-embedded-tools ${SRC_BRANCH} update_code_repo src-openeuler/libboundscheck ${SRC_BRANCH} } @@ -366,9 +412,9 @@ main() SRC_DIR="$(cd $(dirname $0)/../../;pwd)" download_dsoftbus_code else - download_code download_iSulad_code download_dsoftbus_code + download_code create_manifest fi } diff --git a/scripts/oe_helper.sh b/scripts/oe_helper.sh new file mode 100755 index 0000000000000000000000000000000000000000..c23fdd4bfeedbc35983093b7ecac4cf2a2bca2e3 --- /dev/null +++ b/scripts/oe_helper.sh @@ -0,0 +1,125 @@ +#!/bin/bash +# this script is used to setup the yocto build envrionment of openEuler Embedded + +script=`basename $0` +script_dir=$(realpath $(dirname $0)) + +usage () { +cat << EOF +Usage: +download mode: $script [-D] [-d DOWNLOAD_DIR] <-b BRANCH> <-m MANIFEST_FILE> +compile mode: $script [-C] [-p PLATFORM] [-o BUILD_DIR] <-t TOOLCHAIN_DIR> <-i INIT_MANAGER> +compile mode (just dsoftbus): $script [-S] + [] -- need <> -- Optional +------------------------------------------------------- + -h show this help and exit. + -D download mode: + -d DOWNLOAD_DIR [top/directory/to/put/your/code] + -b BRANCH [branch] + -m MANIFEST_FILE + -C compile mode: + -p PLATFORM Supportted PLATFORM + aarch64-std + aarch64-pro + arm-std + x86-64-std + raspberrypi4-64 + -o BUILD_DIR Build dir: + /build (defaut) + -t TOOLCHAIN_DIR External toolchain dir(absoulte path): + /usr1/openeuler/gcc/openeuler_gcc_arm64le (arm64 default) + /usr1/openeuler/gcc/openeuler_gcc_arm32le (arm32 default) + /usr1/openeuler/gcc/openeuler_gcc_x86_64 (x86_64 default) + -i INIT_MANAGER INIT_MANAGER suooprt: + busybox (defaut) + systemd + -S build dsoftbus +EOF +} + +compile_mode=0 +download_mode=0 +dsoftbus_compile_mode=0 +INIT_MANAGER="busybox" +OPTIND=1 + +while getopts "hDCSd:b:m:p:o:t:i:" opt; do + case $opt in + h) usage + return 0 + ;; + D) download_mode=1 + echo download_mode + ;; + C) compile_mode=1 + echo compile_mode + ;; + S) dsoftbus_compile_mode=1 + echo dsoftbus_compile_mode + ;; + d) DOWNLOAD_DIR=$OPTARG + ;; + b) BRANCH=$OPTARG + ;; + m) MANIFEST_FILE=$OPTARG + ;; + p) PLATFORM=$OPTARG + ;; + o) BUILD_DIR=$OPTARG + ;; + t) TOOLCHAIN_DIR=$OPTARG + ;; + i) INIT_MANAGER=$OPTARG + ;; + *) usage + return 1 + ;; + esac +done + +if [ $download_mode == 0 ] && [ $compile_mode == 0 ] && [ $dsoftbus_compile_mode == 0 ]; then + echo "Invalid input." + usage + return 1 +fi + +if [ $download_mode == 1 ]; then + if [ -z ${DOWNLOAD_DIR} ]; then + echo "Invalid input of DOWNLOAD_DIR." + usage + return 1 + fi + sh ${script_dir}/download_code.sh ${DOWNLOAD_DIR} ${BRANCH} ${MANIFEST_FILE} + return 0 +fi + +if [ $compile_mode == 1 ]; then + if [ -z ${PLATFORM} ] || [ -z ${BUILD_DIR} ]; then + echo "Invalid input of PLATFORM or BUILD_DIR." + usage + return 1 + fi + if [ "$INIT_MANAGER" != "busybox" ] && [ "$INIT_MANAGER" != "systemd" ]; then + echo Invalid INIT_MANAGER input. + usage + return 1 + fi + source ${script_dir}/compile.sh ${PLATFORM} ${BUILD_DIR} ${TOOLCHAIN_DIR} + case $INIT_MANAGER in + "busybox") + sed -i "s|^OPENEULER_INIT_MANAGER .*|OPENEULER_INIT_MANAGER = \"mdev-busybox\"|g" conf/local.conf + sed -i "s|^OPENEULER_DEV_MANAGER .*|OPENEULER_DEV_MANAGER = \"busybox-mdev\"|g" conf/local.conf + ;; + "systemd") + sed -i "s|^OPENEULER_INIT_MANAGER .*|OPENEULER_INIT_MANAGER = \"systemd\"|g" conf/local.conf + sed -i "s|^OPENEULER_DEV_MANAGER .*|OPENEULER_DEV_MANAGER = \"systemd\"|g" conf/local.conf + ;; + *) + esac + return 0 +fi + +if [ $dsoftbus_compile_mode == 1 ]; then + source ${script_dir}/compile.sh dsoftbus + return 0 +fi