diff options
Diffstat (limited to 'meta/recipes-extended')
602 files changed, 11804 insertions, 18941 deletions
diff --git a/meta/recipes-extended/acpica/acpica_20200717.bb b/meta/recipes-extended/acpica/acpica_20200717.bb new file mode 100644 index 0000000000..d1d06c0c24 --- /dev/null +++ b/meta/recipes-extended/acpica/acpica_20200717.bb @@ -0,0 +1,49 @@ +SUMMARY = "ACPICA tools for the development and debug of ACPI tables" +DESCRIPTION = "The ACPI Component Architecture (ACPICA) project provides an \ +OS-independent reference implementation of the Advanced Configuration and \ +Power Interface Specification (ACPI). ACPICA code contains those portions of \ +ACPI meant to be directly integrated into the host OS as a kernel-resident \ +subsystem, and a small set of tools to assist in developing and debugging \ +ACPI tables." + +HOMEPAGE = "http://www.acpica.org/" +SECTION = "console/tools" + +LICENSE = "Intel | BSD | GPLv2" +LIC_FILES_CHKSUM = "file://source/compiler/aslcompile.c;beginline=7;endline=150;md5=6adbcb81e9ee6ae50c569b94fe12f7c5" + +COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" + +DEPENDS = "m4-native flex-native bison-native" + +SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix-${PV}.tar.gz" +SRC_URI[sha256sum] = "cb99903ef240732f395af40c23b9b19c7899033f48840743544eebb6da72a828" + +UPSTREAM_CHECK_URI = "https://acpica.org/downloads" + +S = "${WORKDIR}/acpica-unix-${PV}" + +inherit update-alternatives + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN} = "acpixtract acpidump" + +EXTRA_OEMAKE = "CC='${CC}' \ + OPT_CFLAGS=-Wall \ + DESTDIR=${D} \ + PREFIX=${prefix} \ + INSTALLDIR=${bindir} \ + INSTALLFLAGS= \ + " + +do_install() { + oe_runmake install +} + +# iasl*.bb is a subset of this recipe, so RREPLACE it +PROVIDES = "iasl" +RPROVIDES_${PN} += "iasl" +RREPLACES_${PN} += "iasl" +RCONFLICTS_${PN} += "iasl" + +BBCLASSEXTEND = "native" diff --git a/meta/recipes-extended/asciidoc/asciidoc/auto-catalogs.patch b/meta/recipes-extended/asciidoc/asciidoc/auto-catalogs.patch new file mode 100644 index 0000000000..ca170db00f --- /dev/null +++ b/meta/recipes-extended/asciidoc/asciidoc/auto-catalogs.patch @@ -0,0 +1,53 @@ +If SGML_CATALOG_FILES is in the environment, pass --catalogs to xmllint and +xsltproc. Also pass --nonet to xsltproc to detect future missing stylesheet +problems. + +An earlier version of this patch was filed upstream at +https://github.com/asciidoc/asciidoc-py3/issues/61 so depending on how that goes +this could get merged. + +Upstream-Status: Inappropriate +Signed-off-by: Ross Burton <ross.burton@intel.com> + +diff --git a/a2x.py b/a2x.py +index 2d7699a..582d809 100755 +--- a/a2x.py ++++ b/a2x.py +@@ -57,6 +57,10 @@ LYNX_OPTS = '-dump' + W3M_OPTS = '-dump -cols 70 -T text/html -no-graph' + XSLTPROC_OPTS = '' + ++if "SGML_CATALOG_FILES" in os.environ: ++ XMLLINT += " --catalogs" ++ XSLTPROC += " --catalogs" ++ + ###################################################################### + # End of configuration file parameters. + ###################################################################### +@@ -298,7 +302,7 @@ def exec_xsltproc(xsl_file, xml_file, dst_dir, opts = ''): + cwd = os.getcwd() + shell_cd(dst_dir) + try: +- shell('"%s" %s "%s" "%s"' % (XSLTPROC, opts, xsl_file, xml_file)) ++ shell('%s %s "%s" "%s"' % (XSLTPROC, opts, xsl_file, xml_file)) + finally: + shell_cd(cwd) + +@@ -483,7 +487,7 @@ class A2X(AttrDict): + self.asciidoc_opts += ' --doctype %s' % self.doctype + for attr in self.attributes: + self.asciidoc_opts += ' --attribute "%s"' % attr +-# self.xsltproc_opts += ' --nonet' ++ self.xsltproc_opts += ' --nonet' + if self.verbose: + self.asciidoc_opts += ' --verbose' + self.dblatex_opts += ' -V' +@@ -634,7 +638,7 @@ class A2X(AttrDict): + shell('"%s" --backend docbook -a "a2x-format=%s" %s --out-file "%s" "%s"' % + (self.asciidoc, self.format, self.asciidoc_opts, docbook_file, self.asciidoc_file)) + if not self.no_xmllint and XMLLINT: +- shell('"%s" --nonet --noout --valid "%s"' % (XMLLINT, docbook_file)) ++ shell('%s --nonet --noout --valid "%s"' % (XMLLINT, docbook_file)) + + def to_xhtml(self): + self.to_docbook() diff --git a/meta/recipes-extended/asciidoc/asciidoc_9.0.2.bb b/meta/recipes-extended/asciidoc/asciidoc_9.0.2.bb new file mode 100644 index 0000000000..711bfbfb9b --- /dev/null +++ b/meta/recipes-extended/asciidoc/asciidoc_9.0.2.bb @@ -0,0 +1,31 @@ +SUMMARY = "Tool for creating HTML, PDF, EPUB, man pages" +DESCRIPTION = "AsciiDoc is a text document format for writing short documents, \ +articles, books and UNIX man pages." + +HOMEPAGE = "http://asciidoc.org/" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=4e5d1baf6f20559e3bec172226a47e4e \ + file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263 " + +SRC_URI = "git://github.com/asciidoc/asciidoc-py3;protocol=https \ + file://auto-catalogs.patch" +SRCREV = "9a407dc9a497364c91421fd961954eddb565baf1" + +DEPENDS = "libxml2-native libxslt-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" + +S = "${WORKDIR}/git" + +# Tell xmllint where to find the DocBook XML catalogue, because right now it +# opens /etc/xml/catalog on the host. Depends on auto-catalogs.patch +export SGML_CATALOG_FILES="file://${STAGING_ETCDIR_NATIVE}/xml/catalog" + +# Not using automake +inherit autotools-brokensep +CLEANBROKEN = "1" + +# target and nativesdk needs python3, but for native we can use the host. +RDEPENDS_${PN} += "python3" +RDEPENDS_remove_class-native = "python3" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-extended/at/at/0001-remove-glibc-assumption.patch b/meta/recipes-extended/at/at/0001-remove-glibc-assumption.patch index 53ae28b5ed..7fdecc7fd1 100644 --- a/meta/recipes-extended/at/at/0001-remove-glibc-assumption.patch +++ b/meta/recipes-extended/at/at/0001-remove-glibc-assumption.patch @@ -1,6 +1,6 @@ -From 7f811d9c4ebc9444e613e251c31d6bf537a24dc1 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 13 Apr 2015 16:35:30 -0700 +From f446686916e503dfb9fb928252d1b72a07573b29 Mon Sep 17 00:00:00 2001 +From: Dengke Du <dengke.du@windriver.com> +Date: Tue, 18 Jul 2017 03:42:56 -0400 Subject: [PATCH] remove glibc assumption glibc time.h header has an undocumented __isleap macro @@ -9,9 +9,11 @@ Since it is undocumented & does not appear on any other libc, stop using it and just define the macro in locally instead. -Upstream-Status: Pending +Upstream-Status: Submitted [ https://lists.debian.org/debian-accessibility/2017/07/msg00044.html ] Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Signed-off-by: Dengke Du <dengke.du@windriver.com> --- parsetime.y | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) @@ -53,5 +55,5 @@ index 7005e88..324e6d3 100644 { yyerror("Error in day of month"); -- -2.1.4 +2.8.1 diff --git a/meta/recipes-extended/at/at/fix_parallel_build_error.patch b/meta/recipes-extended/at/at/fix_parallel_build_error.patch index 66ff3e1c11..30d2324126 100644 --- a/meta/recipes-extended/at/at/fix_parallel_build_error.patch +++ b/meta/recipes-extended/at/at/fix_parallel_build_error.patch @@ -1,3 +1,8 @@ +From 24ef2a6544f9c7ec01bc7ae73dffa2974a1e251d Mon Sep 17 00:00:00 2001 +From: Chen Qi <Qi.Chen@windriver.com> +Date: Wed, 5 Dec 2018 09:46:22 +0800 +Subject: [PATCH] fix parallel build error + make -j was failing sometimesa like this | ccache i586-poky-linux-gcc -march=i586 --sysroot=/home/nitin/build/build0/tmp/sysroots/i586-poky-linux -I. -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb -feliminate-unused-debug-types -o atd atd.o daemon.o -lfl -lpam -Wl,-O1 -Wl,--as-needed | parsetime.l:5:19: fatal error: y.tab.h: No such file or directory @@ -12,17 +17,24 @@ Nitin <nitin.a.kamble@intel.com> Upstream-Status: Pending Signed-off-by: Scott Garman <scott.a.garman@intel.com> +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +--- + Makefile.in | 2 ++ + 1 file changed, 2 insertions(+) -Index: at-3.1.12/Makefile.in -=================================================================== ---- at-3.1.12.orig/Makefile.in -+++ at-3.1.12/Makefile.in +diff --git a/Makefile.in b/Makefile.in +index 4c11913..18ecc23 100644 +--- a/Makefile.in ++++ b/Makefile.in @@ -83,6 +83,8 @@ y.tab.c y.tab.h: parsetime.y lex.yy.c: parsetime.l $(LEX) -i parsetime.l +parsetime.l: y.tab.h + - atrun: atrun.in - configure + atd.service: atd.service.in + cat $< | sed -e 's![@]sbindir[@]!$(sbindir)!g' | sed -e 's![@]atjobdir[@]!$(atjobdir)!g' > $@ +-- +2.7.4 + diff --git a/meta/recipes-extended/at/at/makefile-fix-parallel.patch b/meta/recipes-extended/at/at/makefile-fix-parallel.patch index 932a4c0bfe..d6056dceff 100644 --- a/meta/recipes-extended/at/at/makefile-fix-parallel.patch +++ b/meta/recipes-extended/at/at/makefile-fix-parallel.patch @@ -15,13 +15,13 @@ Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -diff --git a/Makefile.in b/Makefile.in -index 2a9b918..aa7c04a 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -75,7 +75,9 @@ at: $(ATOBJECTS) +Index: at-3.1.20/Makefile.in +=================================================================== +--- at-3.1.20.orig/Makefile.in ++++ at-3.1.20/Makefile.in +@@ -76,7 +76,9 @@ at: $(ATOBJECTS) atd: $(RUNOBJECTS) - $(CC) $(LDFLAGS) -o atd $(RUNOBJECTS) $(LIBS) $(PAMLIB) + $(CC) $(LDFLAGS) -o atd $(RUNOBJECTS) $(LIBS) $(PAMLIB) $(SELINUXLIB) -y.tab.c y.tab.h: parsetime.y +y.tab.h: y.tab.c @@ -30,6 +30,3 @@ index 2a9b918..aa7c04a 100644 $(YACC) -d parsetime.y lex.yy.c: parsetime.l --- -1.7.9.5 - diff --git a/meta/recipes-extended/at/at/pam.conf.patch b/meta/recipes-extended/at/at/pam.conf.patch index b5ceb9ae82..38e7fc1b7d 100644 --- a/meta/recipes-extended/at/at/pam.conf.patch +++ b/meta/recipes-extended/at/at/pam.conf.patch @@ -1,27 +1,35 @@ +From 8c8a0b6ba199327d2eafefd6611353e1c483a854 Mon Sep 17 00:00:00 2001 +From: Chen Qi <Qi.Chen@windriver.com> +Date: Wed, 5 Dec 2018 10:00:36 +0800 +Subject: [PATCH] fix pam.conf + oe doesn't support "@include", use the concrete directive instead. Upstream-Status: Pending Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> -Index: at-3.1.15/pam.conf -=================================================================== ---- at-3.1.15.orig/pam.conf -+++ at-3.1.15/pam.conf -@@ -1,10 +1,11 @@ - # +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +--- + pam.conf | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/pam.conf b/pam.conf +index 3674c0a..2f8d586 100644 +--- a/pam.conf ++++ b/pam.conf +@@ -2,9 +2,9 @@ # The PAM configuration file for the at daemon # -+ -+auth required pam_env.so -+auth include common-auth -+account include common-account -+session include common-session-noninteractive -+session required pam_limits.so -+session required pam_loginuid.so --auth required pam_env.so -@include common-auth -@include common-account --session required pam_loginuid.so ++auth include common-auth ++account include common-account + session required pam_loginuid.so -@include common-session-noninteractive --session required pam_limits.so ++session include common-session-noninteractive + session required pam_limits.so + auth required pam_env.so user_readenv=1 +-- +2.7.4 + diff --git a/meta/recipes-extended/at/at_3.1.16.bb b/meta/recipes-extended/at/at_3.1.23.bb index 0512bcb836..b74882d342 100644 --- a/meta/recipes-extended/at/at_3.1.16.bb +++ b/meta/recipes-extended/at/at_3.1.23.bb @@ -1,12 +1,19 @@ SUMMARY = "Delayed job execution and batch processing" +HOMEPAGE = "http://blog.calhariz.com/" DESCRIPTION = "At allows for commands to be run at a particular time. Batch will execute commands when \ the system load levels drop to a particular level." SECTION = "base" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4" -DEPENDS = "flex flex-native \ +DEPENDS = "flex flex-native bison-native \ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" +PACKAGECONFIG ?= "\ + ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \ +" + +PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux," + RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)} \ " @@ -15,7 +22,7 @@ PAM_DEPS = "libpam libpam-runtime pam-plugin-env pam-plugin-limits" RCONFLICTS_${PN} = "atd" RREPLACES_${PN} = "atd" -SRC_URI = "${DEBIAN_MIRROR}/main/a/at/at_${PV}.orig.tar.gz \ +SRC_URI = "http://snapshot.debian.org/archive/debian/20180825T090248Z/pool/main/a/${BPN}/${BPN}_${PV}.orig.tar.gz \ file://fix_parallel_build_error.patch \ file://posixtm.c \ file://posixtm.h \ @@ -30,8 +37,10 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/at/at_${PV}.orig.tar.gz \ PAM_SRC_URI = "file://pam.conf.patch \ file://configure-add-enable-pam.patch" -SRC_URI[md5sum] = "d05da75d9b75d93917ffb16ab48b1e19" -SRC_URI[sha256sum] = "cb9af59c6a54edce9536ba629841055409d1f89d8ae26494727a97141fb4d5c1" +SRC_URI[md5sum] = "1cec945506b5ddf1d776c92c315fc581" +SRC_URI[sha256sum] = "97450aa954aaa8a70218cc8e61a33df9fee9f86527e9f861de302fb7a3c81710" + +UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/a/at/" EXTRA_OECONF += "ac_cv_path_SENDMAIL=/bin/true \ --with-daemon_username=root \ @@ -47,10 +56,10 @@ INITSCRIPT_PARAMS = "defaults" SYSTEMD_SERVICE_${PN} = "atd.service" - -do_compile_prepend () { +copy_sources() { cp -f ${WORKDIR}/posixtm.[ch] ${S} } +do_patch[postfuncs] += "copy_sources" do_install () { oe_runmake -e "IROOT=${D}" install @@ -63,7 +72,7 @@ do_install () { install -m 0644 ${WORKDIR}/atd.service ${D}${systemd_unitdir}/system sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/atd.service - if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then install -D -m 0644 ${WORKDIR}/${BP}/pam.conf ${D}${sysconfdir}/pam.d/atd fi } diff --git a/meta/recipes-extended/augeas/augeas.inc b/meta/recipes-extended/augeas/augeas.inc deleted file mode 100644 index 23d12cadfe..0000000000 --- a/meta/recipes-extended/augeas/augeas.inc +++ /dev/null @@ -1,30 +0,0 @@ -SUMMARY = "Augeas configuration API" -HOMEPAGE = "http://augeas.net/" -BUGTRACKER = "https://fedorahosted.org/augeas/report/1" - -LICENSE = "LGPLv2.1+" -LIC_FILES_CHKSUM = "file://COPYING;md5=bbb461211a33b134d42ed5ee802b37ff" - -SRC_URI = "http://download.augeas.net/${BP}.tar.gz \ - file://add-missing-argz-conditional.patch \ - file://sepbuildfix.patch \ - file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ - " - -DEPENDS = "readline libxml2" - -inherit autotools pkgconfig - -PACKAGES =+ "${PN}-lenses lib${BPN}" - -FILES_${PN}-lenses = "${datadir}/augeas/lenses" -FILES_lib${BPN} = "${libdir}/lib*${SOLIBS}" - -RDEPENDS_lib${BPN} += "${PN}-lenses" -RRECOMMENDS_lib${BPN} += "${PN}" - -LEAD_SONAME = "libaugeas.so" - -do_install_append() { - rm -fr ${D}${datadir}/vim -} diff --git a/meta/recipes-extended/augeas/augeas/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/augeas/augeas/0001-Unset-need_charset_alias-when-building-for-musl.patch deleted file mode 100644 index b85a6a6da4..0000000000 --- a/meta/recipes-extended/augeas/augeas/0001-Unset-need_charset_alias-when-building-for-musl.patch +++ /dev/null @@ -1,30 +0,0 @@ -From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 13 Apr 2015 17:02:13 -0700 -Subject: [PATCH] Unset need_charset_alias when building for musl - -localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 -which actually shoudl be fixed in gnulib and then all downstream -projects will get it eventually. For now we apply the fix to -coreutils - -Upstream-Status: Not Required - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - lib/gnulib.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: augeas-1.2.0/gnulib/lib/Makefile.am -=================================================================== ---- augeas-1.2.0.orig/gnulib/lib/Makefile.am -+++ augeas-1.2.0/gnulib/lib/Makefile.am -@@ -463,7 +463,7 @@ install-exec-localcharset: all-local - case '$(host_os)' in \ - darwin[56]*) \ - need_charset_alias=true ;; \ -- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ -+ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ - need_charset_alias=false ;; \ - *) \ - need_charset_alias=true ;; \ diff --git a/meta/recipes-extended/augeas/augeas/add-missing-argz-conditional.patch b/meta/recipes-extended/augeas/augeas/add-missing-argz-conditional.patch deleted file mode 100644 index abbdbaa63b..0000000000 --- a/meta/recipes-extended/augeas/augeas/add-missing-argz-conditional.patch +++ /dev/null @@ -1,20 +0,0 @@ -Add missing GL_GENERATE_ARGZ_H conditional - -- GL_GENERATE_ARGZ_H is used in gnulib/lib/Makefile.am - -Upstream-Status: Pending -Signed-off-by: Constantin Musca <constantinx.musca@intel.com> - -Index: augeas-1.0.0/configure.ac -=================================================================== ---- augeas-1.0.0.orig/configure.ac -+++ augeas-1.0.0/configure.ac -@@ -55,6 +55,8 @@ AC_ARG_WITH([failmalloc], - - AM_CONDITIONAL([WITH_FAILMALLOC], [test x$with_failmalloc != xno]) - -+AM_CONDITIONAL([GL_GENERATE_ARGZ_H], [test -n "$ARGZ_H"]) -+ - dnl --enable-debug=(yes|no) - AC_ARG_ENABLE([debug], - [AC_HELP_STRING([--enable-debug=no/yes], diff --git a/meta/recipes-extended/augeas/augeas/sepbuildfix.patch b/meta/recipes-extended/augeas/augeas/sepbuildfix.patch deleted file mode 100644 index b82a3ee2cb..0000000000 --- a/meta/recipes-extended/augeas/augeas/sepbuildfix.patch +++ /dev/null @@ -1,22 +0,0 @@ -Ensure that builds in separate builddirs (${B} != ${S}) correctly install the -lenses files. - -Upstream-Status: Pending - -RP 2013/4/17 - -Index: augeas-1.0.0/Makefile.am -=================================================================== ---- augeas-1.0.0.orig/Makefile.am 2012-11-02 15:20:11.000000000 +0000 -+++ augeas-1.0.0/Makefile.am 2013-04-17 10:36:24.033400125 +0000 -@@ -5,8 +5,8 @@ - lensdir=$(datadir)/augeas/lenses/dist - lenstestdir=$(datadir)/augeas/lenses/dist/tests - --dist_lens_DATA=$(wildcard lenses/*.aug) --dist_lenstest_DATA=$(wildcard lenses/tests/*.aug) -+dist_lens_DATA=$(wildcard $(top_srcdir)/lenses/*.aug) -+dist_lenstest_DATA=$(wildcard $(top_srcdir)lenses/tests/*.aug) - - EXTRA_DIST=augeas.spec build/aux/move-if-change Makefile.am HACKING - diff --git a/meta/recipes-extended/augeas/augeas_1.4.0.bb b/meta/recipes-extended/augeas/augeas_1.4.0.bb deleted file mode 100644 index 1064ad4f48..0000000000 --- a/meta/recipes-extended/augeas/augeas_1.4.0.bb +++ /dev/null @@ -1,4 +0,0 @@ -require augeas.inc - -SRC_URI[md5sum] = "a2536a9c3d744dc09d234228fe4b0c93" -SRC_URI[sha256sum] = "659fae7ac229029e60a869a3b88c616cfd51cf2fba286cdfe3af3a052cb35b30" diff --git a/meta/recipes-extended/bash/bash-3.2.48/build-tests.patch b/meta/recipes-extended/bash/bash-3.2.48/build-tests.patch deleted file mode 100644 index 91341ee696..0000000000 --- a/meta/recipes-extended/bash/bash-3.2.48/build-tests.patch +++ /dev/null @@ -1,44 +0,0 @@ -Add 'ptest' target to Makefile, to run tests without checking dependencies. - -Signed-off-by: Anders Roxell <anders.roxell@enea.com> -Upstream-Status: Pending ---- -diff -dNaur bash-3.2.48/Makefile.in.orig bash-3.2.48/Makefile.in ---- bash-3.2.48/Makefile.in.orig 2006-08-17 23:03:35.000000000 +0500 -+++ bash-3.2.48/Makefile.in 2013-07-02 20:20:07.512709327 +0500 -@@ -803,17 +803,31 @@ - fi - - recho$(EXEEXT): $(SUPPORT_SRC)recho.c -- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)recho.c ${LIBS_FOR_BUILD} -+ @$(CC) $(CCFLAGS) -o $@ $< - - zecho$(EXEEXT): $(SUPPORT_SRC)zecho.c -- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)zecho.c ${LIBS_FOR_BUILD} -+ @$(CC) $(CCFLAGS) -o $@ $< - - printenv$(EXEEXT): $(SUPPORT_SRC)printenv.c -- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)printenv.c ${LIBS_FOR_BUILD} -+ @$(CC) $(CCFLAGS) -o $@ $< - --test tests check: force $(Program) $(TESTS_SUPPORT) -+test tests check: -+ @$(MAKE) install-test -+ @$(MAKE) runtest -+ -+install-test: buildtest -+ifeq ($(origin INSTALL_TEST_DIR), undefined) - @-test -d tests || mkdir tests - @cp $(TESTS_SUPPORT) tests -+else -+ @-test -d $(INSTALL_TEST_DIR) || mkdir -p $(INSTALL_TEST_DIR) -+ @cp -r $(srcdir)/tests/* $(INSTALL_TEST_DIR)/ -+ @cp $(TESTS_SUPPORT) $(INSTALL_TEST_DIR) -+endif -+ -+buildtest: force $(Program) $(TESTS_SUPPORT) -+ -+runtest: - @( cd $(srcdir)/tests && \ - PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} ) - diff --git a/meta/recipes-extended/bash/bash-3.2.48/dont-include-target-CFLAGS-in-host-LDFLAGS.patch b/meta/recipes-extended/bash/bash-3.2.48/dont-include-target-CFLAGS-in-host-LDFLAGS.patch deleted file mode 100644 index ee756dc9e3..0000000000 --- a/meta/recipes-extended/bash/bash-3.2.48/dont-include-target-CFLAGS-in-host-LDFLAGS.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 933bd886af49667e88e2385409449ab598813dab Mon Sep 17 00:00:00 2001 -From: Andre McCurdy <armccurdy@gmail.com> -Date: Wed, 15 Jul 2015 00:54:33 -0700 -Subject: [PATCH] dont include target CFLAGS in host LDFLAGS - -Building the host tool 'mkbuiltins' will fail if the target CFLAGS -contains an option which isn't supported by the host's gcc. To prevent -the issue, define LDFLAGS_FOR_BUILD based on CFLAGS_FOR_BUILD instead -of CFLAGS. - -Upstream-Status: Inappropriate [required for bash 3.2.57 (GPLv2) recipe only] - -Signed-off-by: Andre McCurdy <armccurdy@gmail.com> ---- - builtins/Makefile.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/builtins/Makefile.in b/builtins/Makefile.in -index e027f7a..ebfddf3 100644 ---- a/builtins/Makefile.in -+++ b/builtins/Makefile.in -@@ -63,7 +63,7 @@ LOCAL_DEFS = @LOCAL_DEFS@ - - LIBS = @LIBS@ - LDFLAGS = @LDFLAGS@ $(LOCAL_LDFLAGS) $(CFLAGS) --LDFLAGS_FOR_BUILD = $(LDFLAGS) -+LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ $(LOCAL_LDFLAGS) $(CFLAGS_FOR_BUILD) - LOCAL_LDFLAGS = @LOCAL_LDFLAGS@ - #LIBS_FOR_BUILD = @LIBS_FOR_BUILD@ - LIBS_FOR_BUILD = $(LIBS) --- -1.9.1 - diff --git a/meta/recipes-extended/bash/bash-3.2.48/mkbuiltins_have_stringize.patch b/meta/recipes-extended/bash/bash-3.2.48/mkbuiltins_have_stringize.patch deleted file mode 100644 index c4229a7ed9..0000000000 --- a/meta/recipes-extended/bash/bash-3.2.48/mkbuiltins_have_stringize.patch +++ /dev/null @@ -1,29 +0,0 @@ -On hosts with FORTIFY_SOURCES, stringize support is required, as it's used by -the macros to wrap functions (e.g. read and open in unistd.h). Those wrappers -use the STRING() macro from unistd.h. A header in the bash sources overrides -the unistd.h macro to 'x' when HAVE_STRINGIZE is not defined, causing the -wrappers to generate calls to 'xread' and 'xopen', which do not exist, -resulting in a failure to link. - -Assume we have stringize support when cross-compiling, which works around the -issue. - -It may be best for upstream to either give up on supporting compilers without -stringize support, or to not define STRING() at all when FORTIFY_SOURCES is -defined, letting the unistd.h one be used, instead. - -Upstream-Status: Pending - -Signed-off-by: Christopher Larson <chris_larson@mentor.com> -Signed-off-by: Saul Wold <sgw@linux.intel.com> - ---- bash-4.2.orig/builtins/mkbuiltins.c -+++ bash-4.2/builtins/mkbuiltins.c -@@ -28,6 +28,7 @@ - # define HAVE_STDLIB_H - - # define HAVE_RENAME -+# define HAVE_STRINGIZE - #endif /* CROSS_COMPILING */ - - #if defined (HAVE_UNISTD_H) diff --git a/meta/recipes-extended/bash/bash-3.2.48/run-ptest b/meta/recipes-extended/bash/bash-3.2.48/run-ptest deleted file mode 100644 index 8dd3b9981d..0000000000 --- a/meta/recipes-extended/bash/bash-3.2.48/run-ptest +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -make -k THIS_SH=/bin/bash BUILD_DIR=. runtest diff --git a/meta/recipes-extended/bash/bash-3.2.48/test-output.patch b/meta/recipes-extended/bash/bash-3.2.48/test-output.patch deleted file mode 100644 index 2b09b7d977..0000000000 --- a/meta/recipes-extended/bash/bash-3.2.48/test-output.patch +++ /dev/null @@ -1,25 +0,0 @@ -Add FAIL/PASS output to test output. - -Signed-off-by: Björn Stenberg <bjst@enea.com> -Upstream-Status: Pending ---- -diff -uNr a/tests/run-all b/tests/run-all ---- a/tests/run-all 1999-10-08 17:07:46.000000000 +0200 -+++ b/tests/run-all 2012-10-27 21:04:18.663331887 +0200 -@@ -22,7 +22,15 @@ - case $x in - $0|run-minimal|run-gprof) ;; - *.orig|*~) ;; -- *) echo $x ; sh $x ;; -+ *) echo $x -+ output=`sh $x` -+ if [ -n "$output" ]; then -+ echo "$output" -+ echo "FAIL: $x" -+ else -+ echo "PASS: $x" -+ fi -+ ;; - esac - done - diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc index c06f157b8a..1ebb33bdcd 100644 --- a/meta/recipes-extended/bash/bash.inc +++ b/meta/recipes-extended/bash/bash.inc @@ -2,31 +2,46 @@ SUMMARY = "An sh-compatible command language interpreter" HOMEPAGE = "http://tiswww.case.edu/php/chet/bash/bashtop.html" SECTION = "base/shell" -DEPENDS = "ncurses bison-native" +DEPENDS = "ncurses bison-native virtual/libiconv" inherit autotools gettext texinfo update-alternatives ptest -EXTRA_AUTORECONF += "--exclude=autoheader" -EXTRA_OECONF = "--enable-job-control" +EXTRA_AUTORECONF += "--exclude=autoheader --exclude=aclocal" +EXTRA_OECONF = "--enable-job-control --without-bash-malloc bash_cv_wexitstatus_offset=8" # If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read the # startup files, even if they are not interactive. # This is what other major distros do. And this is what we wanted. See bug#5359 and bug#7137. CFLAGS += "-DNON_INTERACTIVE_LOGIN_SHELLS" -ALTERNATIVE_${PN} = "sh" +ALTERNATIVE_${PN} = "bash sh" +ALTERNATIVE_LINK_NAME[bash] = "${base_bindir}/bash" +ALTERNATIVE_TARGET[bash] = "${base_bindir}/bash" ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh" -ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash" +ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash.${BPN}" ALTERNATIVE_PRIORITY = "100" RDEPENDS_${PN} += "base-files" RDEPENDS_${PN}_class-nativesdk = "" -RDEPENDS_${PN}-ptest += "make" +RDEPENDS_${PN}-ptest += "make coreutils perl sed shadow util-linux-setpriv" -do_configure_prepend () { - if [ ! -e ${S}/acinclude.m4 ]; then - cat ${S}/aclocal.m4 > ${S}/acinclude.m4 - fi +RDEPENDS_${PN}-ptest_append_libc-glibc = " \ + glibc-gconv-big5hkscs \ + glibc-gconv-iso8859-1 \ + glibc-utils \ + locale-base-de-de \ + locale-base-en-us \ + locale-base-fr-fr \ + locale-base-fr-fr.iso-8859-1 \ + locale-base-zh-hk.big5-hkscs \ + " + +CACHED_CONFIGUREVARS += "headersdir=${includedir}/${PN}" + +do_compile_prepend() { + # Remove any leftover .build files. This ensures that bash always has the + # same version number and keeps builds reproducible + rm -f ${B}/.build } do_compile_ptest () { @@ -41,15 +56,39 @@ do_install_append () { fi } do_install_append_class-target () { - # Clean host path in bashbug - sed -i -e "s,${STAGING_DIR_TARGET},,g" ${D}${bindir}/bashbug + # Clean buildhost references in bashbug + sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \ + -e "s,-I${WORKDIR}/\S* ,,g" \ + -e 's|${DEBUG_PREFIX_MAP}||g' \ + ${D}${bindir}/bashbug + + # Clean buildhost references in bash.pc + sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \ + ${D}${libdir}/pkgconfig/bash.pc + + # Clean buildhost references in Makefile.inc + sed -i -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' \ + ${D}${libdir}/bash/Makefile.inc } 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 + install -D ${WORKDIR}/run-bash-ptests ${D}${PTEST_PATH}/run-bash-ptests + sed -i -e 's/^Makefile/_Makefile/' -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \ + -e 's|${DEBUG_PREFIX_MAP}||g' \ + -e "s,${S},,g" -e "s,${B},,g" -e "s,${STAGING_DIR_NATIVE},,g" \ + -e 's:${HOSTTOOLS_DIR}/::g' \ + -e 's:${UNINATIVE_LOADER}:${base_bindir}/false:g' \ + ${D}${PTEST_PATH}/Makefile } +# The uninative loader is different on i386 & x86_64 hosts. Since it is only +# being replaced with /bin/false anyway, it doesn't need to be part of the task +# hash +do_install_ptest[vardepsexclude] += "UNINATIVE_LOADER" pkg_postinst_${PN} () { grep -q "^${base_bindir}/bash$" $D${sysconfdir}/shells || echo ${base_bindir}/bash >> $D${sysconfdir}/shells @@ -58,3 +97,13 @@ pkg_postinst_${PN} () { pkg_postrm_${PN} () { printf "$(grep -v "^${base_bindir}/bash$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells } + +PACKAGES += "${PN}-bashbug" +FILES_${PN} = "${bindir}/bash ${base_bindir}/bash.bash" +FILES_${PN}-bashbug = "${bindir}/bashbug" + +PACKAGE_BEFORE_PN += "${PN}-loadable" +RDEPENDS_${PN}-loadable += "${PN}" +FILES_${PN}-loadable += "${libdir}/bash/*" + +RPROVIDES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sh /bin/bash', '', d)}" diff --git a/meta/recipes-extended/bash/bash/bash-CVE-2019-18276.patch b/meta/recipes-extended/bash/bash/bash-CVE-2019-18276.patch new file mode 100644 index 0000000000..7b2073201e --- /dev/null +++ b/meta/recipes-extended/bash/bash/bash-CVE-2019-18276.patch @@ -0,0 +1,386 @@ +From 951bdaad7a18cc0dc1036bba86b18b90874d39ff Mon Sep 17 00:00:00 2001 +From: Chet Ramey <chet.ramey@case.edu> +Date: Mon, 1 Jul 2019 09:03:53 -0400 +Subject: [PATCH] commit bash-20190628 snapshot + +An issue was discovered in disable_priv_mode in shell.c in GNU Bash through 5.0 patch 11. +By default, if Bash is run with its effective UID not equal to its real UID, +it will drop privileges by setting its effective UID to its real UID. +However, it does so incorrectly. On Linux and other systems that support "saved UID" functionality, +the saved UID is not dropped. An attacker with command execution in the shell can use "enable -f" for +runtime loading of a new builtin, which can be a shared object that calls setuid() and therefore +regains privileges. However, binaries running with an effective UID of 0 are unaffected. + +Get the patch from [1] to fix the issue. + +Upstream-Status: Inappropriate [the upstream thinks it doesn't increase the credibility of CVEs in general] +CVE: CVE-2019-18276 + +[1] https://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel&id=951bdaa + +Signed-off-by: De Huo <De.Huo@windriver.com> +Signed-off-by: Kai Kang <kai.kang@windriver.com> +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +--- + MANIFEST | 2 ++ + bashline.c | 50 +------------------------------------------------- + builtins/help.def | 2 +- + config.h.in | 10 +++++++++- + configure.ac | 1 + + doc/bash.1 | 3 ++- + doc/bashref.texi | 3 ++- + lib/glob/glob.c | 5 ++++- + pathexp.c | 16 ++++++++++++++-- + shell.c | 8 ++++++++ + tests/glob.tests | 2 ++ + tests/glob6.sub | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + tests/glob7.sub | 11 +++++++++++ + 14 files changed, 122 insertions(+), 56 deletions(-) + create mode 100644 tests/glob6.sub + create mode 100644 tests/glob7.sub + +diff --git a/MANIFEST b/MANIFEST +index 03de221..f9ccad7 100644 +--- a/MANIFEST ++++ b/MANIFEST +@@ -1037,6 +1037,8 @@ tests/extglob3.tests f + tests/extglob3.right f + tests/extglob4.sub f + tests/extglob5.sub f ++tests/glob6.sub f ++tests/glob7.sub f + tests/func.tests f + tests/func.right f + tests/func1.sub f +diff --git a/bashline.c b/bashline.c +index 824ea9d..d86b47d 100644 +--- a/bashline.c ++++ b/bashline.c +@@ -3718,55 +3718,7 @@ static int + completion_glob_pattern (string) + char *string; + { +- register int c; +- char *send; +- int open; +- +- DECLARE_MBSTATE; +- +- open = 0; +- send = string + strlen (string); +- +- while (c = *string++) +- { +- switch (c) +- { +- case '?': +- case '*': +- return (1); +- +- case '[': +- open++; +- continue; +- +- case ']': +- if (open) +- return (1); +- continue; +- +- case '+': +- case '@': +- case '!': +- if (*string == '(') /*)*/ +- return (1); +- continue; +- +- case '\\': +- if (*string++ == 0) +- return (0); +- } +- +- /* Advance one fewer byte than an entire multibyte character to +- account for the auto-increment in the loop above. */ +-#ifdef HANDLE_MULTIBYTE +- string--; +- ADVANCE_CHAR_P (string, send - string); +- string++; +-#else +- ADVANCE_CHAR_P (string, send - string); +-#endif +- } +- return (0); ++ return (glob_pattern_p (string) == 1); + } + + static char *globtext; +diff --git a/builtins/help.def b/builtins/help.def +index 006c4b5..92f9b38 100644 +--- a/builtins/help.def ++++ b/builtins/help.def +@@ -128,7 +128,7 @@ help_builtin (list) + + /* We should consider making `help bash' do something. */ + +- if (glob_pattern_p (list->word->word)) ++ if (glob_pattern_p (list->word->word) == 1) + { + printf ("%s", ngettext ("Shell commands matching keyword `", "Shell commands matching keywords `", (list->next ? 2 : 1))); + print_word_list (list, ", "); +diff --git a/config.h.in b/config.h.in +index 8554aec..ad4b1e8 100644 +--- a/config.h.in ++++ b/config.h.in +@@ -1,6 +1,6 @@ + /* config.h -- Configuration file for bash. */ + +-/* Copyright (C) 1987-2009,2011-2012 Free Software Foundation, Inc. ++/* Copyright (C) 1987-2009,2011-2012,2013-2019 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + +@@ -807,6 +807,14 @@ + #undef HAVE_SETREGID + #undef HAVE_DECL_SETREGID + ++/* Define if you have the setregid function. */ ++#undef HAVE_SETRESGID ++#undef HAVE_DECL_SETRESGID ++ ++/* Define if you have the setresuid function. */ ++#undef HAVE_SETRESUID ++#undef HAVE_DECL_SETRESUID ++ + /* Define if you have the setvbuf function. */ + #undef HAVE_SETVBUF + +diff --git a/configure.ac b/configure.ac +index 52b4cdb..549adef 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -810,6 +810,7 @@ AC_CHECK_DECLS([confstr]) + AC_CHECK_DECLS([printf]) + AC_CHECK_DECLS([sbrk]) + AC_CHECK_DECLS([setregid]) ++AC_CHECK_DECLS[(setresuid, setresgid]) + AC_CHECK_DECLS([strcpy]) + AC_CHECK_DECLS([strsignal]) + +diff --git a/doc/bash.1 b/doc/bash.1 +index e6cd08d..9e58a0b 100644 +--- a/doc/bash.1 ++++ b/doc/bash.1 +@@ -4681,7 +4681,8 @@ above). + .PD + .SH "SIMPLE COMMAND EXPANSION" + When a simple command is executed, the shell performs the following +-expansions, assignments, and redirections, from left to right. ++expansions, assignments, and redirections, from left to right, in ++the following order. + .IP 1. + The words that the parser has marked as variable assignments (those + preceding the command name) and redirections are saved for later +diff --git a/doc/bashref.texi b/doc/bashref.texi +index d33cd57..3065126 100644 +--- a/doc/bashref.texi ++++ b/doc/bashref.texi +@@ -2964,7 +2964,8 @@ is not specified. If the file does not exist, it is created. + @cindex command expansion + + When a simple command is executed, the shell performs the following +-expansions, assignments, and redirections, from left to right. ++expansions, assignments, and redirections, from left to right, in ++the following order. + + @enumerate + @item +diff --git a/lib/glob/glob.c b/lib/glob/glob.c +index 398253b..2eaa33e 100644 +--- a/lib/glob/glob.c ++++ b/lib/glob/glob.c +@@ -607,6 +607,7 @@ glob_vector (pat, dir, flags) + register unsigned int i; + int mflags; /* Flags passed to strmatch (). */ + int pflags; /* flags passed to sh_makepath () */ ++ int hasglob; /* return value from glob_pattern_p */ + int nalloca; + struct globval *firstmalloc, *tmplink; + char *convfn; +@@ -648,10 +649,12 @@ glob_vector (pat, dir, flags) + patlen = (pat && *pat) ? strlen (pat) : 0; + + /* If the filename pattern (PAT) does not contain any globbing characters, ++ or contains a pattern with only backslash escapes (hasglob == 2), + we can dispense with reading the directory, and just see if there is + a filename `DIR/PAT'. If there is, and we can access it, just make the + vector to return and bail immediately. */ +- if (skip == 0 && glob_pattern_p (pat) == 0) ++ hasglob = 0; ++ if (skip == 0 && (hasglob = glob_pattern_p (pat)) == 0 || hasglob == 2) + { + int dirlen; + struct stat finfo; +diff --git a/pathexp.c b/pathexp.c +index c1bf2d8..e6c5392 100644 +--- a/pathexp.c ++++ b/pathexp.c +@@ -58,7 +58,10 @@ int extended_glob = EXTGLOB_DEFAULT; + /* Control enabling special handling of `**' */ + int glob_star = 0; + +-/* Return nonzero if STRING has any unquoted special globbing chars in it. */ ++/* Return nonzero if STRING has any unquoted special globbing chars in it. ++ This is supposed to be called when pathname expansion is performed, so ++ it implements the rules in Posix 2.13.3, specifically that an unquoted ++ slash cannot appear in a bracket expression. */ + int + unquoted_glob_pattern_p (string) + register char *string; +@@ -85,10 +88,14 @@ unquoted_glob_pattern_p (string) + continue; + + case ']': +- if (open) ++ if (open) /* XXX - if --open == 0? */ + return (1); + continue; + ++ case '/': ++ if (open) ++ open = 0; ++ + case '+': + case '@': + case '!': +@@ -106,6 +113,11 @@ unquoted_glob_pattern_p (string) + string++; + continue; + } ++ else if (open && *string == '/') ++ { ++ string++; /* quoted slashes in bracket expressions are ok */ ++ continue; ++ } + else if (*string == 0) + return (0); + +diff --git a/shell.c b/shell.c +index a2b2a55..6adabc8 100644 +--- a/shell.c ++++ b/shell.c +@@ -1293,7 +1293,11 @@ disable_priv_mode () + { + int e; + ++#if HAVE_DECL_SETRESUID ++ if (setresuid (current_user.uid, current_user.uid, current_user.uid) < 0) ++#else + if (setuid (current_user.uid) < 0) ++#endif + { + e = errno; + sys_error (_("cannot set uid to %d: effective uid %d"), current_user.uid, current_user.euid); +@@ -1302,7 +1306,11 @@ disable_priv_mode () + exit (e); + #endif + } ++#if HAVE_DECL_SETRESGID ++ if (setresgid (current_user.gid, current_user.gid, current_user.gid) < 0) ++#else + if (setgid (current_user.gid) < 0) ++#endif + sys_error (_("cannot set gid to %d: effective gid %d"), current_user.gid, current_user.egid); + + current_user.euid = current_user.uid; +diff --git a/tests/glob.tests b/tests/glob.tests +index 01913bb..fb012f7 100644 +--- a/tests/glob.tests ++++ b/tests/glob.tests +@@ -12,6 +12,8 @@ ${THIS_SH} ./glob1.sub + ${THIS_SH} ./glob2.sub + ${THIS_SH} ./glob3.sub + ${THIS_SH} ./glob4.sub ++${THIS_SH} ./glob6.sub ++${THIS_SH} ./glob7.sub + + MYDIR=$PWD # save where we are + +diff --git a/tests/glob6.sub b/tests/glob6.sub +new file mode 100644 +index 0000000..b099811 +--- /dev/null ++++ b/tests/glob6.sub +@@ -0,0 +1,54 @@ ++# tests of the backslash-in-glob-patterns discussion on the austin-group ML ++ ++: ${TMPDIR:=/var/tmp} ++ ++ORIG=$PWD ++GLOBDIR=$TMPDIR/bash-glob-$$ ++mkdir $GLOBDIR && cd $GLOBDIR ++ ++# does the pattern matcher allow backslashes as escape characters and remove ++# them as part of matching? ++touch abcdefg ++pat='ab\cd*' ++printf '<%s>\n' $pat ++pat='\.' ++printf '<%s>\n' $pat ++rm abcdefg ++ ++# how about when escaping pattern characters? ++touch '*abc.c' ++a='\**.c' ++printf '%s\n' $a ++rm -f '*abc.c' ++ ++# how about when making the distinction between readable and searchable path ++# components? ++mkdir -m a=x searchable ++mkdir -m a=r readable ++ ++p='searchable/\.' ++printf "%s\n" $p ++ ++p='searchable/\./.' ++printf "%s\n" $p ++ ++p='readable/\.' ++printf "%s\n" $p ++ ++p='readable/\./.' ++printf "%s\n" $p ++ ++printf "%s\n" 'searchable/\.' ++printf "%s\n" 'readable/\.' ++ ++echo */. ++ ++p='*/\.' ++echo $p ++ ++echo */'.' ++ ++rmdir searchable readable ++ ++cd $ORIG ++rmdir $GLOBDIR +diff --git a/tests/glob7.sub b/tests/glob7.sub +new file mode 100644 +index 0000000..0212b8e +--- /dev/null ++++ b/tests/glob7.sub +@@ -0,0 +1,11 @@ ++# according to Posix 2.13.3, a slash in a bracket expression renders that ++# bracket expression invalid ++shopt -s nullglob ++ ++echo 1: [qwe/qwe] ++echo 2: [qwe/ ++echo 3: [qwe/] ++ ++echo 4: [qwe\/qwe] ++echo 5: [qwe\/ ++echo 6: [qwe\/] +-- +1.9.1 + diff --git a/meta/recipes-extended/bash/bash/build-tests.patch b/meta/recipes-extended/bash/bash/build-tests.patch index 73a81b60da..5f2dae94a1 100644 --- a/meta/recipes-extended/bash/bash/build-tests.patch +++ b/meta/recipes-extended/bash/bash/build-tests.patch @@ -2,15 +2,18 @@ Add 'ptest' target to Makefile, to run tests without checking dependencies. Upstream-Status: Pending Signed-off-by: Anders Roxell <anders.roxell@enea.com> + +Rebase to 5.0 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- Makefile.in | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/Makefile.in b/Makefile.in +index 5fcb44b..de1c255 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -848,20 +848,34 @@ maybe-clean: +@@ -932,20 +932,34 @@ maybe-clean: fi recho$(EXEEXT): $(SUPPORT_SRC)recho.c @@ -51,5 +54,5 @@ diff --git a/Makefile.in b/Makefile.in PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} ) -- -1.8.1.2 +2.7.4 diff --git a/meta/recipes-extended/bash/bash/execute_cmd.patch b/meta/recipes-extended/bash/bash/execute_cmd.patch index 81f8f0a9cd..7a9e9a902f 100644 --- a/meta/recipes-extended/bash/bash/execute_cmd.patch +++ b/meta/recipes-extended/bash/bash/execute_cmd.patch @@ -1,8 +1,16 @@ Upstream-Status: Inappropriate [embedded specific] ---- execute_cmd.c.orig Fri Jun 3 13:34:42 2011 -+++ execute_cmd.c Fri Jun 3 13:36:41 2011 -@@ -2202,7 +2202,11 @@ +Rebase to 5.0 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + execute_cmd.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/execute_cmd.c b/execute_cmd.c +index f1d74bf..31674b4 100644 +--- a/execute_cmd.c ++++ b/execute_cmd.c +@@ -2567,7 +2567,11 @@ execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close) /* If the `lastpipe' option is set with shopt, and job control is not enabled, execute the last element of non-async pipelines in the current shell environment. */ @@ -13,5 +21,8 @@ Upstream-Status: Inappropriate [embedded specific] +#endif + asynchronous == 0 && pipe_out == NO_PIPE && prev > 0) { - lstdin = move_to_high_fd (0, 0, 255); + lstdin = move_to_high_fd (0, 1, -1); if (lstdin > 0) +-- +2.7.4 + diff --git a/meta/recipes-extended/bash/bash/fix-run-builtins.patch b/meta/recipes-extended/bash/bash/fix-run-builtins.patch new file mode 100644 index 0000000000..2fa388302e --- /dev/null +++ b/meta/recipes-extended/bash/bash/fix-run-builtins.patch @@ -0,0 +1,33 @@ +From 0c4cab9594c96c2dc435a8d9724605824bcbf917 Mon Sep 17 00:00:00 2001 +From: Dengke Du <dengke.du@windriver.com> +Date: Tue, 19 Apr 2016 02:57:45 -0400 +Subject: [PATCH] fix run-builtins failed + +FAIL: run-builtins +1. redirect the stderr output of command exec with -l option in + builtins.tests to /dev/null +2. ensure the system contain the locales "en_US.UTF-8" + +Upstream-Status: Pending + +Signed-off-by: Dengke Du <dengke.du@windriver.com> +--- + tests/builtins.tests | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/builtins.tests b/tests/builtins.tests +index 9d77520..63f3af8 100644 +--- a/tests/builtins.tests ++++ b/tests/builtins.tests +@@ -109,7 +109,7 @@ esac + + # test options to exec + (exec -a specialname ${THIS_SH} -c 'echo $0' ) +-(exec -l -a specialname ${THIS_SH} -c 'echo $0' ) ++(exec -l -a specialname ${THIS_SH} -c 'echo $0' ) 2> /dev/null + # test `clean' environment. if /bin/sh is bash, and the script version of + # printenv is run, there will be variables in the environment that bash + # sets on startup. Also test code that prefixes argv[0] with a dash. +-- +2.8.1 + diff --git a/meta/recipes-extended/bash/bash/run-bash-ptests b/meta/recipes-extended/bash/bash/run-bash-ptests new file mode 100644 index 0000000000..d73a27224d --- /dev/null +++ b/meta/recipes-extended/bash/bash/run-bash-ptests @@ -0,0 +1,4 @@ +#!/bin/sh +cd "$(dirname "$0")" +make -k THIS_SH=/bin/bash BUILD_DIR=`pwd` srcdir=`pwd` runtest + diff --git a/meta/recipes-extended/bash/bash/run-ptest b/meta/recipes-extended/bash/bash/run-ptest index e3f813381b..738ad3c42c 100644 --- a/meta/recipes-extended/bash/bash/run-ptest +++ b/meta/recipes-extended/bash/bash/run-ptest @@ -1,2 +1,26 @@ #!/bin/sh -make -k THIS_SH=/bin/bash BUILD_DIR=. srcdir=. runtest + +en_US=`locale -a | grep en_US*` +fr_FR=`locale -a | grep fr_FR*` +de_DE=`locale -a | grep de_DE*` + +if [ -z "$en_US" ] +then + echo "Warning: The en_US* locales is needed to run the intl.tests, please add it." +fi + +if [ -z "$fr_FR" ] +then + echo "Warning: The fr_FR* locales is needed to run the intl.tests, please add it." +fi + +if [ -z "$de_DE" ] +then + echo "Warning: The de_DE* locales is needed to run the intl.tests, please add it." +fi + +useradd bashtest +chown -R bashtest:bashtest tests +setpriv --reuid bashtest --rgid bashtest --clear-groups --reset-env $(dirname "$0")/run-bash-ptests +chown -R root:root tests +userdel -r bashtest diff --git a/meta/recipes-extended/bash/bash/test-output.patch b/meta/recipes-extended/bash/bash/test-output.patch index 2b09b7d977..0ffcc24587 100644 --- a/meta/recipes-extended/bash/bash/test-output.patch +++ b/meta/recipes-extended/bash/bash/test-output.patch @@ -1,25 +1,42 @@ -Add FAIL/PASS output to test output. +From 28eb06047ebd2deaa8c7cd2bf6655ef6a469dc14 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Tue, 15 Aug 2017 10:01:56 +0800 +Subject: [PATCH 1/2] Add FAIL/PASS output to test output. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit Signed-off-by: Björn Stenberg <bjst@enea.com> Upstream-Status: Pending + +Rebase to 4.4 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- -diff -uNr a/tests/run-all b/tests/run-all ---- a/tests/run-all 1999-10-08 17:07:46.000000000 +0200 -+++ b/tests/run-all 2012-10-27 21:04:18.663331887 +0200 -@@ -22,7 +22,15 @@ + tests/run-all | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/tests/run-all b/tests/run-all +index 2882fe0..e21d026 100644 +--- a/tests/run-all ++++ b/tests/run-all +@@ -33,7 +33,16 @@ do case $x in $0|run-minimal|run-gprof) ;; *.orig|*~) ;; -- *) echo $x ; sh $x ;; -+ *) echo $x -+ output=`sh $x` -+ if [ -n "$output" ]; then -+ echo "$output" -+ echo "FAIL: $x" -+ else -+ echo "PASS: $x" -+ fi -+ ;; +- *) echo $x ; sh $x ; rm -f ${BASH_TSTOUT} ;; ++ *) echo $x ++ output=`sh $x` ++ if [ -n "$output" ]; then ++ echo "$output" ++ echo "FAIL: $x" ++ else ++ echo "PASS: $x" ++ fi ++ rm -f ${BASH_TSTOUT} ++ ;; esac done +-- +1.8.3.1 + diff --git a/meta/recipes-extended/bash/bash_3.2.48.bb b/meta/recipes-extended/bash/bash_3.2.48.bb deleted file mode 100644 index d42b292b0a..0000000000 --- a/meta/recipes-extended/bash/bash_3.2.48.bb +++ /dev/null @@ -1,46 +0,0 @@ -require bash.inc - -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=fd5d9bcabd8ed5a54a01ce8d183d592a" - -PR = "r11" - -SRC_URI = "${GNU_MIRROR}/bash/bash-${PV}.tar.gz;name=tarball \ - ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-049;apply=yes;striplevel=0;name=patch049 \ - ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-050;apply=yes;striplevel=0;name=patch050 \ - ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-051;apply=yes;striplevel=0;name=patch051 \ - ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-052;apply=yes;striplevel=0;name=patch052 \ - ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-053;apply=yes;striplevel=0;name=patch053 \ - ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-054;apply=yes;striplevel=0;name=patch054 \ - ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-055;apply=yes;striplevel=0;name=patch055 \ - ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-056;apply=yes;striplevel=0;name=patch056 \ - ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-057;apply=yes;striplevel=0;name=patch057 \ - file://mkbuiltins_have_stringize.patch \ - file://build-tests.patch \ - file://test-output.patch \ - file://run-ptest \ - file://dont-include-target-CFLAGS-in-host-LDFLAGS.patch \ - " - -SRC_URI[tarball.md5sum] = "338dcf975a93640bb3eaa843ca42e3f8" -SRC_URI[tarball.sha256sum] = "128d281bd5682ba5f6953122915da71976357d7a76490d266c9173b1d0426348" -SRC_URI[patch049.md5sum] = "af571a2d164d5abdcae4499e94e8892c" -SRC_URI[patch049.sha256sum] = "b1217ed94bdb95dc878fa5cabbf8a164435eb0d9da23a392198f48566ee34a2f" -SRC_URI[patch050.md5sum] = "8443d4385d73ec835abe401d90591377" -SRC_URI[patch050.sha256sum] = "081bb03c580ecee63ba03b40beb3caf509eca29515b2e8dd3c078503609a1642" -SRC_URI[patch051.md5sum] = "15c6653042e9814aa87120098fc7a849" -SRC_URI[patch051.sha256sum] = "354886097cd95b4def77028f32ee01e2e088d58a98184fede9d3ce9320e218ef" -SRC_URI[patch052.md5sum] = "691023a944bbb9003cc92ad462d91fa1" -SRC_URI[patch052.sha256sum] = "a0eccf9ceda50871db10d21efdd74b99e35efbd55c970c400eeade012816bb61" -SRC_URI[patch053.md5sum] = "eb97d1c9230a55283d9dac69d3de2e46" -SRC_URI[patch053.sha256sum] = "fe6f0e96e0b966eaed9fb5e930ca12891f4380f30f9e0a773d200ff2063a864e" -SRC_URI[patch054.md5sum] = "1107744058c43b247f597584b88ba0a6" -SRC_URI[patch054.sha256sum] = "c6dab911e85688c542ce75afc175dbb4e5011de5102758e19a4a80dac1e79359" -SRC_URI[patch055.md5sum] = "05d201176d3499e2dfa4a73d09d42f05" -SRC_URI[patch055.sha256sum] = "c0e816700837942ed548da74e5917f74b70cbbbb10c9f2caf73e8e06a0713d0a" -SRC_URI[patch056.md5sum] = "222eaa3a2c26f54a15aa5e08817a534a" -SRC_URI[patch056.sha256sum] = "063a8d8d74e4407bf07a32b965b8ef6d213a66abdb6af26cc3584a437a56bbb4" -SRC_URI[patch057.md5sum] = "47d98e3e042892495c5efe54ec6e5913" -SRC_URI[patch057.sha256sum] = "5fc689394d515990f5ea74e2df765fc6e5e42ca44b4591b2c6f9be4b0cadf0f0" - -PARALLEL_MAKE = "" diff --git a/meta/recipes-extended/bash/bash_4.3.30.bb b/meta/recipes-extended/bash/bash_4.3.30.bb deleted file mode 100644 index 811e61c798..0000000000 --- a/meta/recipes-extended/bash/bash_4.3.30.bb +++ /dev/null @@ -1,46 +0,0 @@ -require bash.inc - -# GPLv2+ (< 4.0), GPLv3+ (>= 4.0) -LICENSE = "GPLv3+" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \ - ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-031;apply=yes;striplevel=0;name=patch031 \ - ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-032;apply=yes;striplevel=0;name=patch032 \ - ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-033;apply=yes;striplevel=0;name=patch033 \ - ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-034;apply=yes;striplevel=0;name=patch034 \ - ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-035;apply=yes;striplevel=0;name=patch035 \ - ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-036;apply=yes;striplevel=0;name=patch036 \ - ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-037;apply=yes;striplevel=0;name=patch037 \ - ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-038;apply=yes;striplevel=0;name=patch038 \ - ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-039;apply=yes;striplevel=0;name=patch039 \ - file://execute_cmd.patch;striplevel=0 \ - file://mkbuiltins_have_stringize.patch \ - file://build-tests.patch \ - file://test-output.patch \ - file://run-ptest \ - " - -SRC_URI[tarball.md5sum] = "a27b3ee9be83bd3ba448c0ff52b28447" -SRC_URI[tarball.sha256sum] = "317881019bbf2262fb814b7dd8e40632d13c3608d2f237800a8828fbb8a640dd" - -SRC_URI[patch031.md5sum] = "236df1ac1130a033ed0dbe2d2115f28f" -SRC_URI[patch031.sha256sum] = "cd529f59dd0f2fdd49d619fe34691da6f0affedf87cc37cd460a9f3fe812a61d" -SRC_URI[patch032.md5sum] = "2360f7e79cfb28526f80021025ea5909" -SRC_URI[patch032.sha256sum] = "889357d29a6005b2c3308ca5b6286cb223b5e9c083219e5db3156282dd554f4a" -SRC_URI[patch033.md5sum] = "b551c4ee7b8713759e4143499d0bbd48" -SRC_URI[patch033.sha256sum] = "fb2a7787a13fbe027a7335aca6eb3c21cdbd813e9edc221274b6a9d8692eaa16" -SRC_URI[patch034.md5sum] = "c9a56fbe0348e05a886dff97f2872b74" -SRC_URI[patch034.sha256sum] = "f1694f04f110defe1330a851cc2768e7e57ddd2dfdb0e3e350ca0e3c214ff889" -SRC_URI[patch035.md5sum] = "e564e8ab44ed1ca3a4e315a9f6cabdc9" -SRC_URI[patch035.sha256sum] = "370d85e51780036f2386dc18c5efe996eba8e652fc1973f0f4f2ab55a993c1e3" -SRC_URI[patch036.md5sum] = "b00ff66c41a7c0f06e191200981980b0" -SRC_URI[patch036.sha256sum] = "ac5f82445b36efdb543dbfae64afed63f586d7574b833e9aa9cd5170bc5fd27c" -SRC_URI[patch037.md5sum] = "be2a7b05f6ae560313f3c9d5f7127bda" -SRC_URI[patch037.sha256sum] = "33f170dd7400ab3418d749c55c6391b1d161ef2de7aced1873451b3a3fca5813" -SRC_URI[patch038.md5sum] = "61e0522830b24fbe8c0d1b010f132470" -SRC_URI[patch038.sha256sum] = "adbeaa500ca7a82535f0e88d673661963f8a5fcdc7ad63445e68bf5b49786367" -SRC_URI[patch039.md5sum] = "a4775487abe958536751c8ce53cdf6f9" -SRC_URI[patch039.sha256sum] = "ab94dced2215541097691f60c3eb323cc28ef2549463e6a5334bbcc1e61e74ec" - -BBCLASSEXTEND = "nativesdk" diff --git a/meta/recipes-extended/bash/bash_5.0.bb b/meta/recipes-extended/bash/bash_5.0.bb new file mode 100644 index 0000000000..257a03bd8b --- /dev/null +++ b/meta/recipes-extended/bash/bash_5.0.bb @@ -0,0 +1,80 @@ +require bash.inc + +# GPLv2+ (< 4.0), GPLv3+ (>= 4.0) +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-001;apply=yes;striplevel=0;name=patch001 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-002;apply=yes;striplevel=0;name=patch002 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-003;apply=yes;striplevel=0;name=patch003 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-004;apply=yes;striplevel=0;name=patch004 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-005;apply=yes;striplevel=0;name=patch005 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-006;apply=yes;striplevel=0;name=patch006 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-007;apply=yes;striplevel=0;name=patch007 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-008;apply=yes;striplevel=0;name=patch008 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-009;apply=yes;striplevel=0;name=patch009 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-010;apply=yes;striplevel=0;name=patch010 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-011;apply=yes;striplevel=0;name=patch011 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-012;apply=yes;striplevel=0;name=patch012 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-013;apply=yes;striplevel=0;name=patch013 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-014;apply=yes;striplevel=0;name=patch014 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-015;apply=yes;striplevel=0;name=patch015 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-016;apply=yes;striplevel=0;name=patch016 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-017;apply=yes;striplevel=0;name=patch017 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-018;apply=yes;striplevel=0;name=patch018 \ + file://execute_cmd.patch \ + file://mkbuiltins_have_stringize.patch \ + file://build-tests.patch \ + file://test-output.patch \ + file://run-ptest \ + file://run-bash-ptests \ + file://fix-run-builtins.patch \ + file://bash-CVE-2019-18276.patch \ + " + +SRC_URI[tarball.md5sum] = "2b44b47b905be16f45709648f671820b" +SRC_URI[tarball.sha256sum] = "b4a80f2ac66170b2913efbfb9f2594f1f76c7b1afd11f799e22035d63077fb4d" + +SRC_URI[patch001.md5sum] = "b026862ab596a5883bb4f0d1077a3819" +SRC_URI[patch001.sha256sum] = "f2fe9e1f0faddf14ab9bfa88d450a75e5d028fedafad23b88716bd657c737289" +SRC_URI[patch002.md5sum] = "2f4a7787365790ae57f36b311701ea7e" +SRC_URI[patch002.sha256sum] = "87e87d3542e598799adb3e7e01c8165bc743e136a400ed0de015845f7ff68707" +SRC_URI[patch003.md5sum] = "af7f2dd93fd5429fb5e9a642ff74f87d" +SRC_URI[patch003.sha256sum] = "4eebcdc37b13793a232c5f2f498a5fcbf7da0ecb3da2059391c096db620ec85b" +SRC_URI[patch004.md5sum] = "b60545b273bfa4e00a760f2c648bed9c" +SRC_URI[patch004.sha256sum] = "14447ad832add8ecfafdce5384badd933697b559c4688d6b9e3d36ff36c62f08" +SRC_URI[patch005.md5sum] = "875a0bedf48b74e453e3997c84b5d8a4" +SRC_URI[patch005.sha256sum] = "5bf54dd9bd2c211d2bfb34a49e2c741f2ed5e338767e9ce9f4d41254bf9f8276" +SRC_URI[patch006.md5sum] = "4a8ee95adb72c3aba03d9e8c9f96ece6" +SRC_URI[patch006.sha256sum] = "d68529a6ff201b6ff5915318ab12fc16b8a0ebb77fda3308303fcc1e13398420" +SRC_URI[patch007.md5sum] = "411560d81fde2dc5b17b83c3f3b58c6f" +SRC_URI[patch007.sha256sum] = "17b41e7ee3673d8887dd25992417a398677533ab8827938aa41fad70df19af9b" +SRC_URI[patch008.md5sum] = "dd7cf7a784d1838822cad8d419315991" +SRC_URI[patch008.sha256sum] = "eec64588622a82a5029b2776e218a75a3640bef4953f09d6ee1f4199670ad7e3" +SRC_URI[patch009.md5sum] = "c1b3e937cd6dccbb7fd772f32812a0da" +SRC_URI[patch009.sha256sum] = "ed3ca21767303fc3de93934aa524c2e920787c506b601cc40a4897d4b094d903" +SRC_URI[patch010.md5sum] = "19b41e73b03602d0e261c471b53e670c" +SRC_URI[patch010.sha256sum] = "d6fbc325f0b5dc54ddbe8ee43020bced8bd589ddffea59d128db14b2e52a8a11" +SRC_URI[patch011.md5sum] = "414339330a3634137081a97f2c8615a8" +SRC_URI[patch011.sha256sum] = "2c4de332b91eaf797abbbd6c79709690b5cbd48b12e8dfe748096dbd7bf474ea" +SRC_URI[patch012.md5sum] = "1870268f62b907221b078ad109e1fa94" +SRC_URI[patch012.sha256sum] = "2943ee19688018296f2a04dbfe30b7138b889700efa8ff1c0524af271e0ee233" +SRC_URI[patch013.md5sum] = "40d923af4b952b01983ed4c889ae2653" +SRC_URI[patch013.sha256sum] = "f5d7178d8da30799e01b83a0802018d913d6aa972dd2ddad3b927f3f3eb7099a" +SRC_URI[patch014.md5sum] = "57857b22053c8167677e5e5ac5c6669b" +SRC_URI[patch014.sha256sum] = "5d6eee6514ee6e22a87bba8d22be0a8621a0ae119246f1c5a9a35db1f72af589" +SRC_URI[patch015.md5sum] = "c4c6ea23d09a74eaa9385438e48fdf02" +SRC_URI[patch015.sha256sum] = "a517df2dda93b26d5cbf00effefea93e3a4ccd6652f152f4109170544ebfa05e" +SRC_URI[patch016.md5sum] = "a682ed6fa2c2e7a7c3ba6bdeada07fb5" +SRC_URI[patch016.sha256sum] = "ffd1d7a54a99fa7f5b1825e4f7e95d8c8876bc2ca151f150e751d429c650b06d" +SRC_URI[patch017.md5sum] = "d9dcaa1d8e7a24850449a1aac43a12a9" +SRC_URI[patch017.sha256sum] = "4cf3b9fafb8a66d411dd5fc9120032533a4012df1dc6ee024c7833373e2ddc31" +SRC_URI[patch018.md5sum] = "a64d950d5de72ae590455b13e6afefcb" +SRC_URI[patch018.sha256sum] = "7c314e375a105a6642e8ed44f3808b9def89d15f7492fe2029a21ba9c0de81d3" + + +DEBUG_OPTIMIZATION_append_armv4 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}" +DEBUG_OPTIMIZATION_append_armv5 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}" + +BBCLASSEXTEND = "nativesdk" diff --git a/meta/recipes-extended/bc/bc/0001-dc-fix-exit-code-of-q-command.patch b/meta/recipes-extended/bc/bc/0001-dc-fix-exit-code-of-q-command.patch new file mode 100644 index 0000000000..1ef797dd66 --- /dev/null +++ b/meta/recipes-extended/bc/bc/0001-dc-fix-exit-code-of-q-command.patch @@ -0,0 +1,44 @@ +From e174b6e7d195d5a7465575641b7f68581f162574 Mon Sep 17 00:00:00 2001 +From: Li Zhou <li.zhou@windriver.com> +Date: Thu, 27 Jun 2019 13:10:47 +0800 +Subject: [PATCH] dc: fix exit code of q command + +The exit code for "echo q | dc" is 1 for dc-1.4.1; +while the exit code for "echo q | dc" is 0 for dc-1.4. + +Here is the answer from ken@gnu.org: +dc-1.4 was right. There was a rewrite of a chunk of code for 1.4.1 to +fix a corner case in the Q command, and somehow the placement of the +clean-up label for the 'q' command got misplaced on the error-handling +branch instead of the clean-exit branch. The patch below fixes this +(it is committed for whenever the next bc/dc release gets made). + +Thanks for the report, + --Ken Pizzini + +Upstream-Status: Backport [Got the solution from maintainer] + +Signed-off-by: Li Zhou <li.zhou@windriver.com> +--- + dc/eval.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dc/eval.c b/dc/eval.c +index 05a3d9e..bcab8db 100644 +--- a/dc/eval.c ++++ b/dc/eval.c +@@ -814,10 +814,10 @@ error_fail: + fprintf(stderr, "%s: ", progname); + perror("error reading input"); + return DC_FAIL; +-reset_and_exit_quit: + reset_and_exit_fail: + signal(SIGINT, sigint_default); + return DC_FAIL; ++reset_and_exit_quit: + reset_and_exit_success: + signal(SIGINT, sigint_default); + return DC_SUCCESS; +-- +1.9.1 + diff --git a/meta/recipes-extended/bc/bc/libmath.h b/meta/recipes-extended/bc/bc/libmath.h new file mode 100644 index 0000000000..63e1acb9ef --- /dev/null +++ b/meta/recipes-extended/bc/bc/libmath.h @@ -0,0 +1,46 @@ +{"@iK20:s2:p@r", +"@iF1,5.6,7,8,9,10,11,12,13,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C1,0:", +"s14:pl7:s0:pl14:RN1:l5:0<Z2:1s12:pl5:ns5:pN2:l2:s15:pK6:l15:+", +"K.44:l5:*+s13:pl5:cS1+s2:pN3:l5:1>Z4:l10:1+s10:pl5:K2:/s5:pl2:", +"1+s2:pJ3:N4:l13:s2:p1l5:+s14:pl5:s6:p1s8:pK2:s11:pN6:1B7:J5:N8:", +"l11:i11:pJ6:N7:l6:l5:*s6:l8:l11:*s8:/s9:pl9:0=Z9:l10:0>Z10:N11:", +"l10:d10:Z12:l14:l14:*s14:pJ11:N12:N10:l15:s2:pl12:Z13:1l14:/R", +"N13:l14:1/RN9:l14:l9:+s14:pJ8:N5:0R]@r", +"@iF2,5.7,9,10,11,12,13,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C2,0:", +"s14:pl7:s0:pl14:RN1:l5:0{Z2:1K10:l2:^-1/RN2:l2:s15:pK6:l2:+s2:", +"pK2:s10:p0s11:pN3:l5:K2:}Z4:l10:K2:*s10:pl5:cRs5:pJ3:N4:N5:l5:", +"K.5:{Z6:l10:K2:*s10:pl5:cRs5:pJ5:N6:l5:1-l5:1+/s13:s14:pl13:l13:", +"*s12:pK3:s11:pN8:1B9:J7:N10:l11:K2:+s11:pJ8:N9:l13:l12:*s13:l11:", +"/s9:pl9:0=Z11:l10:l14:*s14:pl15:s2:pl14:1/RN11:l14:l9:+s14:pJ10:N7:", +"0R]@r", +"@iF3,5.7,9,11,12,13,16,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C3,0:", +"s14:pl7:s0:pl14:RN1:l2:s15:pK1.1:l15:*K2:+s2:p1C4,0:s14:pl5:0", +"<Z2:1s12:pl5:ns5:pN2:0s2:pl5:l14:/K2:+K4:/s13:pl5:K4:l13:*l14:", +"*-s5:pl13:K2:%Z3:l5:ns5:pN3:l15:K2:+s2:pl5:s9:s14:pl5:nl5:*s16:", +"pK3:s11:pN5:1B6:J4:N7:l11:K2:+s11:pJ5:N6:l9:l16:l11:l11:1-*/*", +"s9:pl9:0=Z8:l15:s2:pl12:Z9:l14:n1/RN9:l14:1/RN8:l14:l9:+s14:p", +"J7:N4:0R]@r", +"@iF5,5.7,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C5,0:s14:pl7:s0:pl14:", +"RN1:l2:s15:pl2:K1.2:*s2:pl5:1C4,0:K2:*+C3,0:s14:pl15:s2:pl14:", +"1/R0R]@r", +"@iF4,5.6,7,9,10,11,12,13,16,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:", +"C4,0:s14:pl7:s0:pl14:RN1:1s12:pl5:0<Z2:1ns12:pl5:ns5:pN2:l5:1", +"=Z3:l2:K25:{Z4:K.7853981633974483096156608:l12:/RN4:l2:K40:{Z5:", +"K.7853981633974483096156608458198757210492:l12:/RN5:l2:K60:{Z6:", +"K.785398163397448309615660845819875721049292349843776455243736", +":l12:/RN6:N3:l5:K.2:=Z7:l2:K25:{Z8:K.1973955598498807583700497", +":l12:/RN8:l2:K40:{Z9:K.1973955598498807583700497651947902934475", +":l12:/RN9:l2:K60:{Z10:K.197395559849880758370049765194790293447585103787852101517688", +":l12:/RN10:N7:l2:s15:pl5:K.2:>Z11:l15:K5:+s2:pK.2:C4,0:s6:pN11:", +"l15:K3:+s2:pN12:l5:K.2:>Z13:l10:1+s10:pl5:K.2:-1l5:K.2:*+/s5:", +"pJ12:N13:l5:s13:s14:pl5:nl5:*s16:pK3:s11:pN15:1B16:J14:N17:l11:", +"K2:+s11:pJ15:N16:l13:l16:*s13:l11:/s9:pl9:0=Z18:l15:s2:pl10:l6:", +"*l14:+l12:/RN18:l14:l9:+s14:pJ17:N14:0R]@r", +"@iF6,13,5.6,7,8,9,10,11,12,16,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl13:", +"l5:C6,00:s14:pl7:s0:pl14:RN1:l2:s15:p0s2:pl13:1/s13:pl13:0<Z2:", +"l13:ns13:pl13:K2:%1=Z3:1s12:pN3:N2:1s10:pK2:s11:pN5:l11:l13:{", +"B6:J4:N7:l11:i11:pJ5:N6:l10:l11:*s10:pJ7:N4:K1.5:l15:*s2:pl5:", +"l13:^K2:l13:^/l10:/s10:p1s9:s14:pl5:nl5:*K4:/s16:pK1.5:l15:*l10:", +"cL+l10:cS-s2:p1s11:pN9:1B10:J8:N11:l11:i11:pJ9:N10:l9:l16:*l11:", +"/l13:l11:+/s9:pl9:0=Z12:l15:s2:pl12:Z13:l10:nl14:*1/RN13:l10:", +"l14:*1/RN12:l14:l9:+s14:pJ11:N8:0R]@r",0} diff --git a/meta/recipes-extended/bc/bc/no-gen-libmath.patch b/meta/recipes-extended/bc/bc/no-gen-libmath.patch new file mode 100644 index 0000000000..c4cce58759 --- /dev/null +++ b/meta/recipes-extended/bc/bc/no-gen-libmath.patch @@ -0,0 +1,24 @@ +These rules are not cross-friendly so delete them and we'll generate the file offline. + +Upstream-Status: Inappropriate +Signed-off-by: Ross Burton <ross.burton@intel.com> + +diff --git a/bc/Makefile.am b/bc/Makefile.am +index d9d412e..f244241 100644 +--- a/bc/Makefile.am ++++ b/bc/Makefile.am +@@ -31,14 +31,6 @@ global.o: libmath.h + + fbcOBJ = main.o bc.o scan.o execute.o load.o storage.o util.o warranty.o + +-libmath.h: libmath.b $(fbcOBJ) $(LIBBC) +- echo '{0}' > libmath.h +- $(MAKE) global.o +- $(LINK) -o fbc $(fbcOBJ) global.o $(LIBBC) $(LIBL) $(READLINELIB) $(LIBS) +- ./fbc -c $(srcdir)/libmath.b </dev/null >libmath.h +- $(srcdir)/fix-libmath_h +- rm -f ./fbc ./global.o +- + sbcOBJ = main.o sbc.o scan.o execute.o global.o load.o storage.o util.o \ + warranty.o + sbc.o: sbc.c diff --git a/meta/recipes-extended/bc/bc_1.06.bb b/meta/recipes-extended/bc/bc_1.06.bb deleted file mode 100644 index d8c8a860f8..0000000000 --- a/meta/recipes-extended/bc/bc_1.06.bb +++ /dev/null @@ -1,26 +0,0 @@ -SUMMARY = "Arbitrary precision calculator language" -HOMEPAGE = "http://www.gnu.org/software/bc/bc.html" - -LICENSE = "GPLv2+ & LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ - file://COPYING.LIB;md5=d8045f3b8f929c1cb29a1e3fd737b499 \ - file://bc/bcdefs.h;endline=31;md5=46dffdaf10a99728dd8ce358e45d46d8 \ - file://dc/dc.h;endline=25;md5=2f9c558cdd80e31b4d904e48c2374328 \ - file://lib/number.c;endline=31;md5=99434a0898abca7784acfd36b8191199" - -SECTION = "base" -DEPENDS = "flex" -PR = "r3" - -SRC_URI = "${GNU_MIRROR}/bc/bc-${PV}.tar.gz \ - file://fix-segment-fault.patch " - -SRC_URI[md5sum] = "d44b5dddebd8a7a7309aea6c36fda117" -SRC_URI[sha256sum] = "4ef6d9f17c3c0d92d8798e35666175ecd3d8efac4009d6457b5c99cea72c0e33" - -inherit autotools texinfo update-alternatives - -ALTERNATIVE_${PN} = "dc" -ALTERNATIVE_PRIORITY = "100" - -BBCLASSEXTEND = "native" diff --git a/meta/recipes-extended/bc/bc_1.07.1.bb b/meta/recipes-extended/bc/bc_1.07.1.bb new file mode 100644 index 0000000000..4a51302492 --- /dev/null +++ b/meta/recipes-extended/bc/bc_1.07.1.bb @@ -0,0 +1,34 @@ +SUMMARY = "Arbitrary precision calculator language" +HOMEPAGE = "http://www.gnu.org/software/bc/bc.html" + +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ + file://bc/bcdefs.h;endline=17;md5=4295c06df9e833519a342f7b5d43db06 \ + file://dc/dc.h;endline=18;md5=36b8c600b63ee8c3aeade2764f6b2a4b \ + file://lib/number.c;endline=20;md5=cf43068cc88f837731dc53240456cfaf" + +SECTION = "base" +DEPENDS = "flex-native" + +SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \ + file://no-gen-libmath.patch \ + file://libmath.h \ + file://0001-dc-fix-exit-code-of-q-command.patch" +SRC_URI[md5sum] = "cda93857418655ea43590736fc3ca9fc" +SRC_URI[sha256sum] = "62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664cb02a" + +inherit autotools texinfo update-alternatives + +PACKAGECONFIG ??= "readline" +PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" +PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit" + +do_compile_prepend() { + cp -f ${WORKDIR}/libmath.h ${B}/bc/libmath.h +} + +ALTERNATIVE_${PN} = "bc dc" +ALTERNATIVE_PRIORITY = "100" + +BBCLASSEXTEND = "native" diff --git a/meta/recipes-extended/bc/files/fix-segment-fault.patch b/meta/recipes-extended/bc/files/fix-segment-fault.patch deleted file mode 100644 index 20c0da2ebe..0000000000 --- a/meta/recipes-extended/bc/files/fix-segment-fault.patch +++ /dev/null @@ -1,28 +0,0 @@ -Upstream-Status: Pending - -when run command such as 'echo "a = 13" | bc -l', it segmentation faults. -This patch is from http://www.mail-archive.com/blfs-support@linuxfromscratch.org/msg04602.html. - -Signed-off-by: Kai Kang <kai.kang@windriver.com> - ---- bc-1.06/lib/number.c.orig 2003-09-26 21:14:02.000000000 +0000 -+++ bc-1.06/lib/number.c 2003-09-26 21:14:26.000000000 +0000 -@@ -34,6 +34,7 @@ - #include <number.h> - #include <assert.h> - #include <stdlib.h> -+#include <string.h> - #include <ctype.h>/* Prototypes needed for external utility routines. */ - - #define bc_rt_warn rt_warn ---- bc-1.06/bc/load.c.orig 2003-09-26 21:14:14.000000000 +0000 -+++ bc-1.06/bc/load.c 2003-09-26 21:14:26.000000000 +0000 -@@ -156,7 +156,7 @@ - long label_no; - long vaf_name; /* variable, array or function number. */ - long func; -- program_counter save_adr; -+ static program_counter save_adr; - - /* Initialize. */ - str = code; diff --git a/meta/recipes-extended/blktool/blktool/0001-fix-typos-in-manpage.patch b/meta/recipes-extended/blktool/blktool/0001-fix-typos-in-manpage.patch index fee368dac2..25a2fabe15 100644 --- a/meta/recipes-extended/blktool/blktool/0001-fix-typos-in-manpage.patch +++ b/meta/recipes-extended/blktool/blktool/0001-fix-typos-in-manpage.patch @@ -7,7 +7,7 @@ This patch is taken from ftp://ftp.debian.org/debian/pool/main/b/blktool/blktool_4-7.debian.tar.xz Upstream-Status: Inappropriate [upstream is dead] -Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> --- blktool.8 | 4 ++-- diff --git a/meta/recipes-extended/blktool/blktool/0002-fix-string-error.patch b/meta/recipes-extended/blktool/blktool/0002-fix-string-error.patch index d08aba5f05..401e41e3ed 100644 --- a/meta/recipes-extended/blktool/blktool/0002-fix-string-error.patch +++ b/meta/recipes-extended/blktool/blktool/0002-fix-string-error.patch @@ -7,7 +7,7 @@ This patch is taken from ftp://ftp.debian.org/debian/pool/main/b/blktool/blktool_4-7.debian.tar.xz Upstream-Status: Inappropriate [upstream is dead] -Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> --- util.c | 2 +- diff --git a/meta/recipes-extended/blktool/blktool/0003-Fix-3-d-argument-for-BLKROSET-it-must-be-const-int.patch b/meta/recipes-extended/blktool/blktool/0003-Fix-3-d-argument-for-BLKROSET-it-must-be-const-int.patch index d7ed0b9f4d..d1f1e797fe 100644 --- a/meta/recipes-extended/blktool/blktool/0003-Fix-3-d-argument-for-BLKROSET-it-must-be-const-int.patch +++ b/meta/recipes-extended/blktool/blktool/0003-Fix-3-d-argument-for-BLKROSET-it-must-be-const-int.patch @@ -14,7 +14,7 @@ This patch is taken from ftp://ftp.debian.org/debian/pool/main/b/blktool/blktool_4-7.debian.tar.xz Upstream-Status: Inappropriate [upstream is dead] -Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> --- blktool.c | 11 +++++++++-- diff --git a/meta/recipes-extended/blktool/blktool/0004-fix-ftbfs-glibc-2.28.patch b/meta/recipes-extended/blktool/blktool/0004-fix-ftbfs-glibc-2.28.patch new file mode 100644 index 0000000000..65bca65100 --- /dev/null +++ b/meta/recipes-extended/blktool/blktool/0004-fix-ftbfs-glibc-2.28.patch @@ -0,0 +1,19 @@ +Description: Fix FTBFS with glibc 2.28 +Author: Adrian Bunk <bunk@debian.org> +Bug-Debian: https://bugs.debian.org/917055 + +This patch is taken from +http://ftp.debian.org/debian/pool/main/b/blktool/blktool_4-7.1.debian.tar.xz + +Upstream-Status: Inappropriate [upstream is dead] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- blktool-4.orig/blktool.c ++++ blktool-4/blktool.c +@@ -18,6 +18,7 @@ + #include <unistd.h> + #include <sys/stat.h> + #include <sys/ioctl.h> ++#include <sys/sysmacros.h> + #include <fcntl.h> + #include <errno.h> + #include <getopt.h> diff --git a/meta/recipes-extended/blktool/blktool_4-7.bb b/meta/recipes-extended/blktool/blktool_4-7.1.bb index 679196be1f..ff2eaa5352 100644 --- a/meta/recipes-extended/blktool/blktool_4-7.bb +++ b/meta/recipes-extended/blktool/blktool_4-7.1.bb @@ -9,15 +9,21 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ DEPENDS = "glib-2.0" -SRC_URI = "${DEBIAN_MIRROR}/main/b/blktool/blktool_4.orig.tar.gz;name=tarball \ +SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/b/${BPN}/${BPN}_4.orig.tar.gz;name=tarball \ file://0001-fix-typos-in-manpage.patch \ file://0002-fix-string-error.patch \ file://0003-Fix-3-d-argument-for-BLKROSET-it-must-be-const-int.patch \ + file://0004-fix-ftbfs-glibc-2.28.patch \ " SRC_URI[tarball.md5sum] = "62edc09c9908107e69391c87f4f3fd40" SRC_URI[tarball.sha256sum] = "b1e6d5912546d2a4b704ec65c2b9664aa3b4663e7d800e06803330335a2cb764" +# for this package we're mostly interested in tracking debian patches, +# and not in the upstream version where all development has effectively stopped +UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/b/blktool/" +UPSTREAM_CHECK_REGEX = "(?P<pver>((\d+\.*)+)-((\d+\.*)+))\.(diff|debian\.tar)\.(gz|xz)" + S = "${WORKDIR}/${BPN}-4.orig" inherit autotools pkgconfig diff --git a/meta/recipes-extended/byacc/byacc.inc b/meta/recipes-extended/byacc/byacc.inc deleted file mode 100644 index fae9e2504a..0000000000 --- a/meta/recipes-extended/byacc/byacc.inc +++ /dev/null @@ -1,19 +0,0 @@ -SUMMARY = "Berkeley LALR Yacc parser generator" -DESCRIPTION = "A parser generator utility that reads a grammar specification from a file and generates an LR(1) \ -parser for it. The parsers consist of a set of LALR(1) parsing tables and a driver routine written in the C \ -programming language." -SECTION = "devel" -LICENSE = "PD" - -SRC_URI = "ftp://invisible-island.net/byacc/byacc-${PV}.tgz" -EXTRA_OECONF += "--program-transform-name='s,^,b,'" - -BBCLASSEXTEND = "native" - -inherit autotools - -do_configure() { - install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S} - install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S} - oe_runconf -} diff --git a/meta/recipes-extended/byacc/byacc_20150711.bb b/meta/recipes-extended/byacc/byacc_20150711.bb deleted file mode 100644 index e5b5451f26..0000000000 --- a/meta/recipes-extended/byacc/byacc_20150711.bb +++ /dev/null @@ -1,11 +0,0 @@ -# Sigh. This is one of those places where everyone licenses it differently. Someone -# even apply UCB to it (Free/Net/OpenBSD). The maintainer states that: -# "I've found no reliable source which states that byacc must bear a UCB copyright." -# Setting to PD as this is what the upstream has it as. - -LICENSE = "PD" -LIC_FILES_CHKSUM = "file://package/debian/copyright;md5=c52fb2d1b3f75b3b7534927807a1b714" -require byacc.inc - -SRC_URI[md5sum] = "2700401030583c4e9169ac7ea7d08de8" -SRC_URI[sha256sum] = "c354e4ee14c4a1bf11e55dde9275011d14887ef066406a088b6fa56caf039248" diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am b/meta/recipes-extended/bzip2/bzip2/Makefile.am index 1d163b6c98..d4498947e8 100644 --- a/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am +++ b/meta/recipes-extended/bzip2/bzip2/Makefile.am @@ -1,5 +1,6 @@ lib_LTLIBRARIES = libbz2.la +libbz2_la_LDFLAGS = -version-info 1:6:0 libbz2_la_SOURCES = blocksort.c \ huffman.c \ @@ -45,9 +46,11 @@ runtest: 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 --tests-dir="$(PWD)/bzip2-tests" install-ptest: - cp $(srcdir)/Makefile $(DESTDIR)/ + 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)/ diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac b/meta/recipes-extended/bzip2/bzip2/configure.ac index 47ee576a8e..b8abade2d9 100644 --- a/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac +++ b/meta/recipes-extended/bzip2/bzip2/configure.ac @@ -1,12 +1,9 @@ AC_PREREQ([2.57]) -AC_INIT(bzip2, 2.0.5, , libXrender) +AC_INIT(bzip2, %BZIP2_VERSION%) AM_INIT_AUTOMAKE(foreign) AM_MAINTAINER_MODE -#AM_CONFIG_HEADER(config.h) - -# Check for progs AC_PROG_CC AC_PROG_LIBTOOL diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest b/meta/recipes-extended/bzip2/bzip2/run-ptest index 3b20fce1ee..3b20fce1ee 100644 --- a/meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest +++ b/meta/recipes-extended/bzip2/bzip2/run-ptest diff --git a/meta/recipes-extended/bzip2/bzip2_1.0.6.bb b/meta/recipes-extended/bzip2/bzip2_1.0.6.bb deleted file mode 100644 index 233fe4c33b..0000000000 --- a/meta/recipes-extended/bzip2/bzip2_1.0.6.bb +++ /dev/null @@ -1,40 +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 = "http://www.bzip.org/" -SECTION = "console/utils" -LICENSE = "bzip2" -LIC_FILES_CHKSUM = "file://LICENSE;beginline=8;endline=37;md5=40d9d1eb05736d1bfc86cfdd9106e6b2" -PR = "r5" - -SRC_URI = "http://www.bzip.org/${PV}/${BP}.tar.gz \ - file://configure.ac;subdir=${BP} \ - file://Makefile.am;subdir=${BP} \ - file://run-ptest" - -SRC_URI[md5sum] = "00b516f4704d4a7cb50a1d97e6e8e15b" -SRC_URI[sha256sum] = "a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd" - -PACKAGES =+ "libbz2" - -CFLAGS_append = " -fPIC -fpic -Winline -fno-strength-reduce -D_FILE_OFFSET_BITS=64" - -inherit autotools update-alternatives ptest - -ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE_${PN} = "bunzip2 bzcat" - -#install binaries to bzip2-native under sysroot for replacement-native -EXTRA_OECONF_append_class-native = " --bindir=${STAGING_BINDIR_NATIVE}/${PN}" - -do_install_ptest () { - cp -f ${B}/Makefile ${D}${PTEST_PATH}/Makefile - sed -i -e "s|^Makefile:|_Makefile:|" ${D}${PTEST_PATH}/Makefile -} - -FILES_libbz2 = "${libdir}/lib*${SOLIBS}" - -PROVIDES_append_class-native = " bzip2-replacement-native" -BBCLASSEXTEND = "native nativesdk" - diff --git a/meta/recipes-extended/bzip2/bzip2_1.0.8.bb b/meta/recipes-extended/bzip2/bzip2_1.0.8.bb new file mode 100644 index 0000000000..70eb67f1f2 --- /dev/null +++ b/meta/recipes-extended/bzip2/bzip2_1.0.8.bb @@ -0,0 +1,70 @@ +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 \ + file://${WORKDIR}/git/commons-compress/LICENSE.txt;md5=86d3f3a95c324c9479bd8986968f4327 \ + file://${WORKDIR}/git/dotnetzip/License.txt;md5=9cb56871eed4e748c3bc7e8ff352a54f \ + file://${WORKDIR}/git/dotnetzip/License.zlib.txt;md5=cc421ccd22eeb2e5db6b79e6de0a029f \ + file://${WORKDIR}/git/go/LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707 \ + file://${WORKDIR}/git/lbzip2/COPYING;md5=d32239bcb673463ab874e80d47fae504 \ +" + +SRC_URI = "https://sourceware.org/pub/${BPN}/${BPN}-${PV}.tar.gz \ + git://sourceware.org/git/bzip2-tests.git;name=bzip2-tests \ + 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 + +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 + cp -r ${WORKDIR}/git/commons-compress ${D}${PTEST_PATH}/bzip2-tests/commons-compress + cp -r ${WORKDIR}/git/dotnetzip ${D}${PTEST_PATH}/bzip2-tests/dotnetzip + cp -r ${WORKDIR}/git/go ${D}${PTEST_PATH}/bzip2-tests/go + cp -r ${WORKDIR}/git/lbzip2 ${D}${PTEST_PATH}/bzip2-tests/lbzip2 + cp -r ${WORKDIR}/git/pyflate ${D}${PTEST_PATH}/bzip2-tests/pyflate + cp ${WORKDIR}/git/README ${D}${PTEST_PATH}/bzip2-tests/ + cp ${WORKDIR}/git/run-tests.sh ${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/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb b/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb deleted file mode 100644 index 7fd34aa05f..0000000000 --- a/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb +++ /dev/null @@ -1,43 +0,0 @@ -require recipes-extended/chkconfig/chkconfig_1.3.58.bb - -SUMMARY = "${SUMMARY_chkconfig-alternatives}" -DESCRIPTION = "${DESCRIPTION_chkconfig-alternatives}" -DEPENDS = "" -PROVIDES += "virtual/update-alternatives-native" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -# The sysroot branch is 1.3.59 + some git commits from master + --sysroot -# support for alternatives. -SRC_URI = "git://github.com/kergoth/chkconfig;branch=sysroot" -S = "${WORKDIR}/git" - -SRCREV = "cd437ecbd8986c894442f8fce1e0061e20f04dee" -PV = "1.3.59+${SRCPV}" - -inherit native - -# We want our native recipes to build using the target paths rather than paths -# into the sysroot, as we may use them to construct the rootfs. As such, we -# only adjust the paths to match the metadata for the target, not native. -obey_variables () { - sed -i 's,ALTERNATIVES_ROOT,OPKG_OFFLINE_ROOT,' alternatives.c -} - -do_compile () { - oe_runmake alternatives -} - -do_install () { - install -d ${D}${sysconfdir}/alternatives \ - ${D}${localstatedir}/lib/alternatives - - install -D -m 0755 alternatives ${D}${bindir}/alternatives - install -D -m 0644 alternatives.8 ${D}${mandir}/man8/alternatives.8 - - ln -s alternatives ${D}${bindir}/update-alternatives - ln -s alternatives.8 ${D}${mandir}/man8/update-alternatives.8 -} - -do_install_append_linuxstdbase() { - rm -rf ${D}${libdir}/lsb -} diff --git a/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb b/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb deleted file mode 100644 index 8df87f88fb..0000000000 --- a/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb +++ /dev/null @@ -1,63 +0,0 @@ -SUMMARY = "A system tool for maintaining the /etc/rc*.d hierarchy" -DESCRIPTION = "Chkconfig is a basic system utility. It updates and queries runlevel \ -information for system services. Chkconfig manipulates the numerous \ -symbolic links in /etc/rc.d, to relieve system administrators of some \ -of the drudgery of manually editing the symbolic links." - -HOMEPAGE = "http://fedorahosted.org/releases/c/h/chkconfig" - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018" - -DEPENDS = "libnewt popt" -PROVIDES += "virtual/update-alternatives" - -PR = "r7" - -SRC_URI = "http://fedorahosted.org/releases/c/h/chkconfig/${BPN}-${PV}.tar.bz2" - -SRC_URI[md5sum] = "c2039ca67f2749fe0c06ef7c6f8ee246" -SRC_URI[sha256sum] = "18b497d25b2cada955c72810e45fcad8280d105f17cf45e2970f18271211de68" - -inherit gettext - -# Makefile uses RPM_OPT_FLAGS to construct CFLAGS -# -EXTRA_OEMAKE = "\ - 'RPM_OPT_FLAGS=${CFLAGS}' \ - 'LDFLAGS=${LDFLAGS}' \ - 'BINDIR=${base_sbindir}' \ - 'SBINDIR=${sbindir}' \ - 'MANDIR=${mandir}' \ - 'ALTDIR=${localstatedir}/lib/alternatives' \ - 'ALTDATADIR=${sysconfdir}/alternatives' \ -" - -do_unpack[postfuncs] += "obey_variables" -do_unpack[vardeps] += "obey_variables" -obey_variables () { - sed -i -e 's,/etc,${sysconfdir},; s,/lib/systemd,${base_libdir}/systemd,' ${S}/leveldb.h - sed -i -e 's,/etc/alternatives,${sysconfdir}/alternatives,' \ - -e 's,/var/lib/alternatives,${localstatedir}/lib/alternatives,' \ - -e 's,/usr/share/locale,${datadir}/locale,' ${S}/alternatives.c -} - -do_install() { - oe_runmake 'DESTDIR=${D}' 'INSTALLNLSDIR=${D}${datadir}/locale' \ - 'BINDIR=${sbindir}' install - install -d ${D}${sysconfdir}/chkconfig.d -} - -PACKAGES =+ "${PN}-alternatives ${PN}-alternatives-doc" -SUMMARY_${PN}-alternatives = "Maintain symbolic links determining default commands" -DESCRIPTION_${PN}-alternatives = "alternatives creates, removes, maintains and displays \ -information about the symbolic links comprising the alternatives system." -SUMMARY_${PN}-alternatives-doc = "${SUMMARY_${PN}-alternatives} - Documentation files" -DESCRIPTION_${PN}-alternatives-doc = "${DESCRIPTION_${PN}-alternatives} \ -This package contains documentation." -RPROVIDES_${PN}-alternatives += "update-alternatives" -RCONFLICTS_${PN}-alternatives = "update-alternatives-opkg update-alternatives-dpkg" -FILES_${PN}-alternatives = "${sbindir}/alternatives ${sbindir}/update-alternatives \ - ${sysconfdir}/alternatives ${localstatedir}/lib/alternatives" -FILES_${PN}-alternatives-doc = "${mandir}/man8/alternatives.8 \ - ${mandir}/man8/update-alternatives.8" diff --git a/meta/recipes-extended/cpio/cpio-2.11/cpio-CVE-2015-1197.patch b/meta/recipes-extended/cpio/cpio-2.11/cpio-CVE-2015-1197.patch deleted file mode 100644 index b54afb867f..0000000000 --- a/meta/recipes-extended/cpio/cpio-2.11/cpio-CVE-2015-1197.patch +++ /dev/null @@ -1,154 +0,0 @@ -Description: CVE-2015-1197 - Apply patch by Vitezslav Cizek of SuSE to fix CVE-2015-1197. - Upstream is dormant or no longer existing. To restore the old - behaviour use --extract-over-symlinks (Closes: #774669) - This issue has been discovered by Alexander Cherepanov. -Author: Vitezslav Cizek <vcizek@suse.cz> -Bug-Debian: https://bugs.debian.org/774669 - -Upstream-Status: Backport - -Signed-off-by: Robert Yang <liezhi.yang@windriver.com> - ---- cpio-2.11+dfsg.orig/doc/cpio.1 -+++ cpio-2.11+dfsg/doc/cpio.1 -@@ -22,6 +22,7 @@ cpio \- copy files to and from archives - [\-\-owner=[user][:.][group]] [\-\-no-preserve-owner] [\-\-message=message] - [\-\-force\-local] [\-\-no\-absolute\-filenames] [\-\-sparse] - [\-\-only\-verify\-crc] [\-\-to\-stdout] [\-\-quiet] [\-\-rsh-command=command] -+[\-\-extract\-over\-symlinks] - [\-\-help] [\-\-version] [pattern...] [< archive] - - .B cpio ---- cpio-2.11+dfsg.orig/src/copyin.c -+++ cpio-2.11+dfsg/src/copyin.c -@@ -700,6 +700,51 @@ copyin_link (struct cpio_file_stat *file - free (link_name); - } - -+ -+static int -+path_contains_symlink(char *path) -+{ -+ struct stat st; -+ char *slash; -+ char *nextslash; -+ -+ /* we got NULL pointer or empty string */ -+ if (!path || !*path) { -+ return false; -+ } -+ -+ slash = path; -+ -+ while ((nextslash = strchr(slash + 1, '/')) != NULL) { -+ slash = nextslash; -+ *slash = '\0'; -+ -+ if (lstat(path, &st) != 0) { -+ if (errno == ELOOP) { -+ /* ELOOP - too many symlinks */ -+ *slash = '/'; -+ return true; -+ } else if (errno == ENOMEM) { -+ /* No memory for lstat - terminate */ -+ xalloc_die(); -+ } else { -+ /* cannot lstat path - give up */ -+ *slash = '/'; -+ return false; -+ } -+ } -+ -+ if (S_ISLNK(st.st_mode)) { -+ *slash = '/'; -+ return true; -+ } -+ -+ *slash = '/'; -+ } -+ -+ return false; -+} -+ - static void - copyin_file (struct cpio_file_stat *file_hdr, int in_file_des) - { -@@ -1471,6 +1516,23 @@ process_copy_in () - { - /* Copy the input file into the directory structure. */ - -+ /* Can we write files over symlinks? */ -+ if (!extract_over_symlinks) -+ { -+ if (path_contains_symlink(file_hdr.c_name)) -+ { -+ /* skip the file */ -+ /* -+ fprintf(stderr, "Can't write over symlinks. Skipping %s\n", file_hdr.c_name); -+ tape_toss_input (in_file_des, file_hdr.c_filesize); -+ tape_skip_padding (in_file_des, file_hdr.c_filesize); -+ continue; -+ */ -+ /* terminate */ -+ error (1, 0, _("Can't write over symlinks: %s\n"), file_hdr.c_name); -+ } -+ } -+ - /* Do we need to rename the file? */ - if (rename_flag || rename_batch_file) - { ---- cpio-2.11+dfsg.orig/src/extern.h -+++ cpio-2.11+dfsg/src/extern.h -@@ -95,6 +95,7 @@ extern char input_is_special; - extern char output_is_special; - extern char input_is_seekable; - extern char output_is_seekable; -+extern bool extract_over_symlinks; - extern int (*xstat) (); - extern void (*copy_function) (); - ---- cpio-2.11+dfsg.orig/src/global.c -+++ cpio-2.11+dfsg/src/global.c -@@ -187,6 +187,9 @@ bool to_stdout_option = false; - /* The name this program was run with. */ - char *program_name; - -+/* Extract files over symbolic links */ -+bool extract_over_symlinks; -+ - /* A pointer to either lstat or stat, depending on whether - dereferencing of symlinks is done for input files. */ - int (*xstat) (); ---- cpio-2.11+dfsg.orig/src/main.c -+++ cpio-2.11+dfsg/src/main.c -@@ -57,7 +57,8 @@ enum cpio_options { - FORCE_LOCAL_OPTION, - DEBUG_OPTION, - BLOCK_SIZE_OPTION, -- TO_STDOUT_OPTION -+ TO_STDOUT_OPTION, -+ EXTRACT_OVER_SYMLINKS - }; - - const char *program_authors[] = -@@ -222,6 +223,8 @@ static struct argp_option options[] = { - N_("Create leading directories where needed"), GRID+1 }, - {"no-preserve-owner", NO_PRESERVE_OWNER_OPTION, 0, 0, - N_("Do not change the ownership of the files"), GRID+1 }, -+ {"extract-over-symlinks", EXTRACT_OVER_SYMLINKS, 0, 0, -+ N_("Force writing over symbolic links"), GRID+1 }, - {"unconditional", 'u', NULL, 0, - N_("Replace all files unconditionally"), GRID+1 }, - {"sparse", SPARSE_OPTION, NULL, 0, -@@ -412,6 +415,10 @@ crc newc odc bin ustar tar (all-caps als - no_chown_flag = true; - break; - -+ case EXTRACT_OVER_SYMLINKS: /* --extract-over-symlinks */ -+ extract_over_symlinks = true; -+ break; -+ - case 'o': /* Copy-out mode. */ - if (copy_function != 0) - error (PAXEXIT_FAILURE, 0, _("Mode already defined")); diff --git a/meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch b/meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch deleted file mode 100644 index 89cd3cfa50..0000000000 --- a/meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch +++ /dev/null @@ -1,220 +0,0 @@ -cpio: Fix memory overrun on reading improperly created link records - -Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> - -http://git.savannah.gnu.org/cgit/cpio.git/commit/?id=746f3ff670dcfcdd28fcc990e79cd6fccc7ae48d - - * src/copyin.c (get_link_name): New function. - (list_file, copyin_link): use get_link_name - - * tests/symlink-bad-length.at: New file. - * tests/symlink-long.at: New file. - * tests/Makefile.am: Add new files. - * tests/testsuite.at: Likewise. - - See http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html - -Upstream-Status: Backport - -Signed-off-by: Sergey Poznyakoff <gray@gnu.org.ua> - -diff -Nurp cpio-2.11.orig/src/copyin.c cpio-2.11/src/copyin.c ---- cpio-2.11.orig/src/copyin.c 2010-02-15 18:02:23.000000000 +0800 -+++ cpio-2.11/src/copyin.c 2014-12-08 13:14:04.355547508 +0800 -@@ -126,6 +126,28 @@ tape_skip_padding (int in_file_des, off_ - } - - -+static char * -+get_link_name (struct cpio_file_stat *file_hdr, int in_file_des) -+{ -+ off_t n = file_hdr->c_filesize + 1; -+ char *link_name; -+ -+ if (n == 0 || n > SIZE_MAX) -+ { -+ error (0, 0, _("%s: stored filename length too big"), file_hdr->c_name); -+ link_name = NULL; -+ } -+ else -+ { -+ link_name = xmalloc (n); -+ tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize); -+ link_name[file_hdr->c_filesize] = '\0'; -+ tape_skip_padding (in_file_des, file_hdr->c_filesize); -+ } -+ return link_name; -+} -+ -+ - static void - list_file(struct cpio_file_stat* file_hdr, int in_file_des) - { -@@ -136,21 +158,16 @@ list_file(struct cpio_file_stat* file_hd - { - if (archive_format != arf_tar && archive_format != arf_ustar) - { -- char *link_name = NULL; /* Name of hard and symbolic links. */ -- -- link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1); -- link_name[file_hdr->c_filesize] = '\0'; -- tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize); -- long_format (file_hdr, link_name); -- free (link_name); -- tape_skip_padding (in_file_des, file_hdr->c_filesize); -- return; -+ char *link_name = get_link_name (file_hdr, in_file_des); -+ if (link_name) -+ { -+ long_format (file_hdr, link_name); -+ free (link_name); -+ } - } - else -- { - long_format (file_hdr, file_hdr->c_tar_linkname); -- return; -- } -+ return; - } - else - #endif -@@ -650,10 +667,7 @@ copyin_link(struct cpio_file_stat *file_ - - if (archive_format != arf_tar && archive_format != arf_ustar) - { -- link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1); -- link_name[file_hdr->c_filesize] = '\0'; -- tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize); -- tape_skip_padding (in_file_des, file_hdr->c_filesize); -+ link_name = get_link_name (file_hdr, in_file_des); - } - else - { -diff -Nurp cpio-2.11.orig/tests/Makefile.am cpio-2.11/tests/Makefile.am ---- cpio-2.11.orig/tests/Makefile.am 2010-02-15 18:02:23.000000000 +0800 -+++ cpio-2.11/tests/Makefile.am 2014-12-08 13:14:49.931545727 +0800 -@@ -52,6 +52,8 @@ TESTSUITE_AT = \ - setstat04.at\ - setstat05.at\ - symlink.at\ -+ symlink-bad-length.at\ -+ symlink-long.at\ - version.at - - TESTSUITE = $(srcdir)/testsuite -diff -Nurp cpio-2.11.orig/tests/symlink-bad-length.at cpio-2.11/tests/symlink-bad-length.at ---- cpio-2.11.orig/tests/symlink-bad-length.at 1970-01-01 08:00:00.000000000 +0800 -+++ cpio-2.11/tests/symlink-bad-length.at 2014-12-08 13:17:45.979538847 +0800 -@@ -0,0 +1,49 @@ -+# Process this file with autom4te to create testsuite. -*- Autotest -*- -+# Copyright (C) 2014 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA -+# 02110-1301 USA. -+ -+# Cpio v2.11 did segfault with badly set symlink length. -+# References: -+# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html -+ -+AT_SETUP([symlink-bad-length]) -+AT_KEYWORDS([symlink-long copyout]) -+ -+AT_DATA([ARCHIVE.base64], -+[x3EjAIBAtIEtJy8nAQAAAHRUYW0FAAAADQBGSUxFAABzb21lIGNvbnRlbnQKAMdxIwBgQ/+hLScv -+JwEAAAB0VEhuBQD/////TElOSwAARklMRcdxAAAAAAAAAAAAAAEAAAAAAAAACwAAAAAAVFJBSUxF -+UiEhIQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= -+]) -+ -+AT_CHECK([ -+base64 -d ARCHIVE.base64 > ARCHIVE || AT_SKIP_TEST -+cpio -ntv < ARCHIVE -+test $? -eq 2 -+], -+[0], -+[-rw-rw-r-- 1 10029 10031 13 Nov 25 13:52 FILE -+],[cpio: LINK: stored filename length too big -+cpio: premature end of file -+]) -+ -+AT_CLEANUP -diff -Nurp cpio-2.11.orig/tests/symlink-long.at cpio-2.11/tests/symlink-long.at ---- cpio-2.11.orig/tests/symlink-long.at 1970-01-01 08:00:00.000000000 +0800 -+++ cpio-2.11/tests/symlink-long.at 2014-12-08 13:17:57.219538408 +0800 -@@ -0,0 +1,46 @@ -+# Process this file with autom4te to create testsuite. -*- Autotest -*- -+# Copyright (C) 2014 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA -+# 02110-1301 USA. -+ -+# Cpio v2.11.90 changed the way symlink name is read from archive. -+# References: -+# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html -+ -+AT_SETUP([symlink-long]) -+AT_KEYWORDS([symlink-long copyout]) -+ -+AT_CHECK([ -+ -+# len(dirname) > READBUFSIZE -+dirname= -+for i in {1..52}; do -+ dirname="xxxxxxxxx/$dirname" -+ mkdir "$dirname" -+done -+ln -s "$dirname" x || AT_SKIP_TEST -+ -+echo x | cpio -o > ar -+list=`cpio -tv < ar | sed 's|.*-> ||'` -+test "$list" = "$dirname" && echo success || echo fail -+], -+[0], -+[success -+],[2 blocks -+2 blocks -+]) -+ -+AT_CLEANUP -diff -Nurp cpio-2.11.orig/tests/testsuite.at cpio-2.11/tests/testsuite.at ---- cpio-2.11.orig/tests/testsuite.at 2010-02-15 18:02:23.000000000 +0800 -+++ cpio-2.11/tests/testsuite.at 2014-12-08 13:15:13.515544805 +0800 -@@ -31,6 +31,8 @@ m4_include([version.at]) - - m4_include([inout.at]) - m4_include([symlink.at]) -+m4_include([symlink-bad-length.at]) -+m4_include([symlink-long.at]) - m4_include([interdir.at]) - - m4_include([setstat01.at]) diff --git a/meta/recipes-extended/cpio/cpio-2.11/remove-gets.patch b/meta/recipes-extended/cpio/cpio-2.11/remove-gets.patch deleted file mode 100644 index b4d113d3a5..0000000000 --- a/meta/recipes-extended/cpio/cpio-2.11/remove-gets.patch +++ /dev/null @@ -1,20 +0,0 @@ -ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ removed it - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - -Upstream-Status: Pending -Index: cpio-2.11/gnu/stdio.in.h -=================================================================== ---- cpio-2.11.orig/gnu/stdio.in.h 2012-07-04 12:13:43.133066247 -0700 -+++ cpio-2.11/gnu/stdio.in.h 2012-07-04 12:14:10.189067564 -0700 -@@ -138,8 +138,10 @@ - /* It is very rare that the developer ever has full control of stdin, - so any use of gets warrants an unconditional warning. Assume it is - always declared, since it is required by C89. */ -+#if defined gets - #undef gets - _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -+#endif - - #if @GNULIB_FOPEN@ - # if @REPLACE_FOPEN@ diff --git a/meta/recipes-extended/cpio/cpio-2.11/statdef.patch b/meta/recipes-extended/cpio/cpio-2.11/statdef.patch deleted file mode 100644 index a6b8e82a0b..0000000000 --- a/meta/recipes-extended/cpio/cpio-2.11/statdef.patch +++ /dev/null @@ -1,17 +0,0 @@ -Avoid multiple stat definitions -Patch taken from cpio mailing list posting 2010-03-19 - -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - -diff -urN cpio-2.11.orig/src/filetypes.h cpio-2.11/src/filetypes.h ---- cpio-2.11.orig/src/filetypes.h 2010-02-12 02:19:23.000000000 -0800 -+++ cpio-2.11/src/filetypes.h 2010-07-23 13:17:25.000000000 -0700 -@@ -82,4 +82,6 @@ - #define lstat stat - #endif - int lstat (); -+#ifndef stat - int stat (); -+#endif diff --git a/meta/recipes-extended/cpio/cpio-2.11/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/cpio/cpio-2.13/0001-Unset-need_charset_alias-when-building-for-musl.patch index 497941573f..6ae213942c 100644 --- a/meta/recipes-extended/cpio/cpio-2.11/0001-Unset-need_charset_alias-when-building-for-musl.patch +++ b/meta/recipes-extended/cpio/cpio-2.13/0001-Unset-need_charset_alias-when-building-for-musl.patch @@ -8,7 +8,7 @@ which actually shoudl be fixed in gnulib and then all downstream projects will get it eventually. For now we apply the fix to coreutils -Upstream-Status: Not Required +Upstream-Status: Pending Signed-off-by: Khem Raj <raj.khem@gmail.com> --- diff --git a/meta/recipes-extended/cpio/cpio-2.13/0002-src-global.c-Remove-superfluous-declaration-of-progr.patch b/meta/recipes-extended/cpio/cpio-2.13/0002-src-global.c-Remove-superfluous-declaration-of-progr.patch new file mode 100644 index 0000000000..478324c1c4 --- /dev/null +++ b/meta/recipes-extended/cpio/cpio-2.13/0002-src-global.c-Remove-superfluous-declaration-of-progr.patch @@ -0,0 +1,28 @@ +From 33e6cb5a28fab3d99bd6818f8c01e6f33805390f Mon Sep 17 00:00:00 2001 +From: Sergey Poznyakoff <gray@gnu.org> +Date: Mon, 20 Jan 2020 07:45:39 +0200 +Subject: [PATCH] src/global.c: Remove superfluous declaration of program_name + +Upstream-Status: Backport (commit 641d3f4) +Signed-off-by: Richard Leitner <richard.leitner@skidata.com> +--- + src/global.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/src/global.c b/src/global.c +index fb3abe9..acf92bc 100644 +--- a/src/global.c ++++ b/src/global.c +@@ -184,9 +184,6 @@ unsigned int warn_option = 0; + /* Extract to standard output? */ + bool to_stdout_option = false; + +-/* The name this program was run with. */ +-char *program_name; +- + /* A pointer to either lstat or stat, depending on whether + dereferencing of symlinks is done for input files. */ + int (*xstat) (); +-- +2.26.2 + diff --git a/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch b/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch deleted file mode 100644 index 49a7cf52a6..0000000000 --- a/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch +++ /dev/null @@ -1,25 +0,0 @@ -Upstream-Status: Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624] - -This patch avoids heap overflow reported by : -http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624 - -This is a clean patch for the GPLv2 tar recipe. - -the GPLv2 tar recipe patch is also applicable to this GPLv2 cpio -recipe, as they share code. - -Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/25 - -Index: tar-1.17/lib/rtapelib.c -=================================================================== ---- tar-1.17.orig/lib/rtapelib.c -+++ tar-1.17/lib/rtapelib.c -@@ -570,7 +570,7 @@ rmt_read__ (int handle, char *buffer, si - - sprintf (command_buffer, "R%lu\n", (unsigned long) length); - if (do_command (handle, command_buffer) == -1 -- || (status = get_status (handle)) == SAFE_READ_ERROR) -+ || ((status = get_status (handle)) == SAFE_READ_ERROR) || (status > length)) - return SAFE_READ_ERROR; - - for (counter = 0; counter < status; counter += rlen, buffer += rlen) diff --git a/meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch b/meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch deleted file mode 100644 index 0148e70797..0000000000 --- a/meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch +++ /dev/null @@ -1,217 +0,0 @@ -cpio: Fix memory overrun on reading improperly created link records - -Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> - -http://git.savannah.gnu.org/cgit/cpio.git/commit/?id=746f3ff670dcfcdd28fcc990e79cd6fccc7ae48d - - * src/copyin.c (get_link_name): New function. - (list_file, copyin_link): use get_link_name - - * tests/symlink-bad-length.at: New file. - * tests/symlink-long.at: New file. - * tests/Makefile.am: Add new files. - * tests/testsuite.at: Likewise. - - See http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html - -Upstream-Status: Backport - -Signed-off-by: Sergey Poznyakoff <gray@gnu.org.ua> - -diff -Nurp cpio-2.8.orig/src/copyin.c cpio-2.8/src/copyin.c ---- cpio-2.8.orig/src/copyin.c 2007-06-07 19:58:03.000000000 +0800 -+++ cpio-2.8/src/copyin.c 2014-12-08 11:30:01.159791484 +0800 -@@ -126,6 +126,28 @@ tape_skip_padding (int in_file_des, int - } - - -+static char * -+get_link_name (struct cpio_file_stat *file_hdr, int in_file_des) -+{ -+ off_t n = file_hdr->c_filesize + 1; -+ char *link_name; -+ -+ if (n == 0 || n > SIZE_MAX) -+ { -+ error (0, 0, _("%s: stored filename length too big"), file_hdr->c_name); -+ link_name = NULL; -+ } -+ else -+ { -+ link_name = xmalloc (n); -+ tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize); -+ link_name[file_hdr->c_filesize] = '\0'; -+ tape_skip_padding (in_file_des, file_hdr->c_filesize); -+ } -+ return link_name; -+} -+ -+ - static void - list_file(struct cpio_file_stat* file_hdr, int in_file_des) - { -@@ -136,21 +158,16 @@ list_file(struct cpio_file_stat* file_hd - { - if (archive_format != arf_tar && archive_format != arf_ustar) - { -- char *link_name = NULL; /* Name of hard and symbolic links. */ -- -- link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1); -- link_name[file_hdr->c_filesize] = '\0'; -- tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize); -- long_format (file_hdr, link_name); -- free (link_name); -- tape_skip_padding (in_file_des, file_hdr->c_filesize); -- return; -+ char *link_name = get_link_name (file_hdr, in_file_des); -+ if (link_name) -+ { -+ long_format (file_hdr, link_name); -+ free (link_name); -+ } - } - else -- { - long_format (file_hdr, file_hdr->c_tar_linkname); -- return; -- } -+ return; - } - else - #endif -@@ -732,10 +749,7 @@ copyin_link(struct cpio_file_stat *file_ - - if (archive_format != arf_tar && archive_format != arf_ustar) - { -- link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1); -- link_name[file_hdr->c_filesize] = '\0'; -- tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize); -- tape_skip_padding (in_file_des, file_hdr->c_filesize); -+ link_name = get_link_name (file_hdr, in_file_des); - } - else - { -diff -Nurp cpio-2.8.orig/tests/Makefile.am cpio-2.8/tests/Makefile.am ---- cpio-2.8.orig/tests/Makefile.am 2006-10-24 18:32:13.000000000 +0800 -+++ cpio-2.8/tests/Makefile.am 2014-12-08 11:30:52.387789482 +0800 -@@ -45,6 +45,8 @@ TESTSUITE_AT = \ - testsuite.at\ - inout.at\ - symlink.at\ -+ symlink-bad-length.at\ -+ symlink-long.at\ - version.at - - TESTSUITE = $(srcdir)/testsuite -diff -Nurp cpio-2.8.orig/tests/symlink-bad-length.at cpio-2.8/tests/symlink-bad-length.at ---- cpio-2.8.orig/tests/symlink-bad-length.at 1970-01-01 08:00:00.000000000 +0800 -+++ cpio-2.8/tests/symlink-bad-length.at 2014-12-08 11:33:25.283783507 +0800 -@@ -0,0 +1,49 @@ -+# Process this file with autom4te to create testsuite. -*- Autotest -*- -+# Copyright (C) 2014 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA -+# 02110-1301 USA. -+ -+# Cpio v2.11 did segfault with badly set symlink length. -+# References: -+# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html -+ -+AT_SETUP([symlink-bad-length]) -+AT_KEYWORDS([symlink-long copyout]) -+ -+AT_DATA([ARCHIVE.base64], -+[x3EjAIBAtIEtJy8nAQAAAHRUYW0FAAAADQBGSUxFAABzb21lIGNvbnRlbnQKAMdxIwBgQ/+hLScv -+JwEAAAB0VEhuBQD/////TElOSwAARklMRcdxAAAAAAAAAAAAAAEAAAAAAAAACwAAAAAAVFJBSUxF -+UiEhIQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= -+]) -+ -+AT_CHECK([ -+base64 -d ARCHIVE.base64 > ARCHIVE || AT_SKIP_TEST -+cpio -ntv < ARCHIVE -+test $? -eq 2 -+], -+[0], -+[-rw-rw-r-- 1 10029 10031 13 Nov 25 13:52 FILE -+],[cpio: LINK: stored filename length too big -+cpio: premature end of file -+]) -+ -+AT_CLEANUP -diff -Nurp cpio-2.8.orig/tests/symlink-long.at cpio-2.8/tests/symlink-long.at ---- cpio-2.8.orig/tests/symlink-long.at 1970-01-01 08:00:00.000000000 +0800 -+++ cpio-2.8/tests/symlink-long.at 2014-12-08 11:34:28.807781024 +0800 -@@ -0,0 +1,46 @@ -+# Process this file with autom4te to create testsuite. -*- Autotest -*- -+# Copyright (C) 2014 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA -+# 02110-1301 USA. -+ -+# Cpio v2.11.90 changed the way symlink name is read from archive. -+# References: -+# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html -+ -+AT_SETUP([symlink-long]) -+AT_KEYWORDS([symlink-long copyout]) -+ -+AT_CHECK([ -+ -+# len(dirname) > READBUFSIZE -+dirname= -+for i in {1..52}; do -+ dirname="xxxxxxxxx/$dirname" -+ mkdir "$dirname" -+done -+ln -s "$dirname" x || AT_SKIP_TEST -+ -+echo x | cpio -o > ar -+list=`cpio -tv < ar | sed 's|.*-> ||'` -+test "$list" = "$dirname" && echo success || echo fail -+], -+[0], -+[success -+],[2 blocks -+2 blocks -+]) -+ -+AT_CLEANUP -diff -Nurp cpio-2.8.orig/tests/testsuite.at cpio-2.8/tests/testsuite.at ---- cpio-2.8.orig/tests/testsuite.at 2006-10-24 18:32:13.000000000 +0800 -+++ cpio-2.8/tests/testsuite.at 2014-12-08 11:34:56.515779942 +0800 -@@ -31,3 +31,5 @@ m4_include([version.at]) - - m4_include([inout.at]) - m4_include([symlink.at]) -+m4_include([symlink-bad-length.at]) -+m4_include([symlink-long.at]) diff --git a/meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch b/meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch deleted file mode 100644 index e16585dd3f..0000000000 --- a/meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch +++ /dev/null @@ -1,31 +0,0 @@ -Upstream-Status: Inappropriate [licensing] - -# Define AC_USE_SYSTEM_EXTENSIONS only if it was previously undefined. -# This is needed to configure correctly with newer versions of autoconf. - -diff -urN cpio-2.8.orig/m4/extensions.m4 cpio-2.8/m4/extensions.m4 ---- cpio-2.8.orig/m4/extensions.m4 2006-10-12 04:34:45.000000000 -0700 -+++ cpio-2.8/m4/extensions.m4 2010-07-23 14:37:36.000000000 -0700 -@@ -1,4 +1,4 @@ --# serial 4 -*- Autoconf -*- -+# serial 5 -*- Autoconf -*- - # Enable extensions on systems that normally disable them. - - # Copyright (C) 2003, 2006 Free Software Foundation, Inc. -@@ -16,6 +16,7 @@ - # ------------------------ - # Enable extensions on systems that normally disable them, - # typically due to standards-conformance issues. -+m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [], [ - AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], - [ - AC_BEFORE([$0], [AC_COMPILE_IFELSE]) -@@ -48,7 +49,7 @@ - AC_DEFINE([__EXTENSIONS__]) - AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) - AC_DEFINE([_TANDEM_SOURCE]) --]) -+])]) - - # gl_USE_SYSTEM_EXTENSIONS - # ------------------------ diff --git a/meta/recipes-extended/cpio/cpio-2.8/statdef.patch b/meta/recipes-extended/cpio/cpio-2.8/statdef.patch deleted file mode 100644 index a00799fea9..0000000000 --- a/meta/recipes-extended/cpio/cpio-2.8/statdef.patch +++ /dev/null @@ -1,15 +0,0 @@ -Upstream-Status: Inappropriate [licensing] - -# Avoid multiple stat definitions -# Patch taken from cpio mailing list posting 2010-03-19 - -diff -urN cpio-2.11.orig/src/filetypes.h cpio-2.11/src/filetypes.h ---- cpio-2.11.orig/src/filetypes.h 2010-02-12 02:19:23.000000000 -0800 -+++ cpio-2.11/src/filetypes.h 2010-07-23 13:17:25.000000000 -0700 -@@ -82,4 +82,6 @@ - #define lstat stat - #endif - int lstat (); -+#ifndef stat - int stat (); -+#endif diff --git a/meta/recipes-extended/cpio/cpio_2.11.bb b/meta/recipes-extended/cpio/cpio_2.11.bb deleted file mode 100644 index c5d92bfaa3..0000000000 --- a/meta/recipes-extended/cpio/cpio_2.11.bb +++ /dev/null @@ -1,15 +0,0 @@ -include cpio_v2.inc - -LICENSE = "GPLv3" -LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949" - -PR = "r5" - -SRC_URI += "file://remove-gets.patch \ - file://fix-memory-overrun.patch \ - file://cpio-CVE-2015-1197.patch \ - file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ - " - -SRC_URI[md5sum] = "1112bb6c45863468b5496ba128792f6c" -SRC_URI[sha256sum] = "601b1d774cd6e4cd39416203c91ec59dbd65dd27d79d75e1a9b89497ea643978" diff --git a/meta/recipes-extended/cpio/cpio_2.13.bb b/meta/recipes-extended/cpio/cpio_2.13.bb new file mode 100644 index 0000000000..94d86100c7 --- /dev/null +++ b/meta/recipes-extended/cpio/cpio_2.13.bb @@ -0,0 +1,51 @@ +SUMMARY = "GNU cpio is a program to manage archives of files" +DESCRIPTION = "GNU cpio is a tool for creating and extracting archives, or copying files from one place to \ +another. It handles a number of cpio formats as well as reading and writing tar files." +HOMEPAGE = "http://www.gnu.org/software/cpio/" +SECTION = "base" +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949" + +SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \ + file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ + file://0002-src-global.c-Remove-superfluous-declaration-of-progr.patch \ + " + +SRC_URI[md5sum] = "389c5452d667c23b5eceb206f5000810" +SRC_URI[sha256sum] = "e87470d9c984317f658567c03bfefb6b0c829ff17dbf6b0de48d71a4c8f3db88" + +inherit autotools gettext texinfo + +EXTRA_OECONF += "DEFAULT_RMT_DIR=${sbindir}" + +do_install () { + autotools_do_install + if [ "${base_bindir}" != "${bindir}" ]; then + install -d ${D}${base_bindir}/ + mv "${D}${bindir}/cpio" "${D}${base_bindir}/cpio" + if [ "${sbindir}" != "${bindir}" ]; then + rmdir ${D}${bindir}/ + fi + fi + + # Avoid conflicts with the version from tar + mv "${D}${mandir}/man8/rmt.8" "${D}${mandir}/man8/rmt-cpio.8" +} + +PACKAGES =+ "${PN}-rmt" + +FILES_${PN}-rmt = "${sbindir}/rmt*" + +inherit update-alternatives + +ALTERNATIVE_PRIORITY = "100" + +ALTERNATIVE_${PN} = "cpio" +ALTERNATIVE_${PN}-rmt = "rmt" + +ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio" + +ALTERNATIVE_PRIORITY[rmt] = "50" +ALTERNATIVE_LINK_NAME[rmt] = "${sbindir}/rmt" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-extended/cpio/cpio_2.8.bb b/meta/recipes-extended/cpio/cpio_2.8.bb deleted file mode 100644 index 3f97dbe2ce..0000000000 --- a/meta/recipes-extended/cpio/cpio_2.8.bb +++ /dev/null @@ -1,17 +0,0 @@ -require cpio_v2.inc - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=b7f772ea3a2489231cb4872656cac34b" - -PR = "r4" - -SRC_URI += "file://m4extensions.patch \ - file://avoid_heap_overflow.patch \ - file://fix-memory-overrun.patch \ - " - -SRC_URI[md5sum] = "0caa356e69e149fb49b76bacc64615a1" -SRC_URI[sha256sum] = "1b203248874c3b5a728b351f06513e5282f73e0170b7f207fbf8c39f28f6b4ad" - -# Required to build with gcc 4.3 and later: -CFLAGS += "-fgnu89-inline" diff --git a/meta/recipes-extended/cpio/cpio_v2.inc b/meta/recipes-extended/cpio/cpio_v2.inc deleted file mode 100644 index 93de4bb92b..0000000000 --- a/meta/recipes-extended/cpio/cpio_v2.inc +++ /dev/null @@ -1,40 +0,0 @@ -SUMMARY = "GNU cpio is a program to manage archives of files" -DESCRIPTION = "GNU cpio is a tool for creating and extracting archives, or copying files from one place to \ -another. It handles a number of cpio formats as well as reading and writing tar files." -HOMEPAGE = "http://www.gnu.org/software/cpio/" -SECTION = "base" - -DEPENDS = "texinfo-native" - -SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \ - file://statdef.patch \ - " - -inherit autotools gettext texinfo - -S = "${WORKDIR}/cpio-${PV}" - -EXTRA_OECONF += "DEFAULT_RMT_DIR=${base_sbindir}" - -do_install () { - autotools_do_install - install -d ${D}${base_bindir}/ - mv "${D}${bindir}/cpio" "${D}${base_bindir}/cpio" - rmdir ${D}${bindir}/ -} - -PACKAGES =+ "${PN}-rmt" - -FILES_${PN}-rmt = "${base_sbindir}/rmt*" - -inherit update-alternatives - -ALTERNATIVE_PRIORITY = "100" - -ALTERNATIVE_${PN} = "cpio" -ALTERNATIVE_${PN}-rmt = "rmt" - -ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio" - -ALTERNATIVE_PRIORITY[rmt] = "50" -ALTERNATIVE_LINK_NAME[rmt] = "${base_sbindir}/rmt" diff --git a/meta/recipes-extended/cracklib/cracklib/0001-Apply-patch-to-fix-CVE-2016-6318.patch b/meta/recipes-extended/cracklib/cracklib/0001-Apply-patch-to-fix-CVE-2016-6318.patch new file mode 100644 index 0000000000..b251ac9056 --- /dev/null +++ b/meta/recipes-extended/cracklib/cracklib/0001-Apply-patch-to-fix-CVE-2016-6318.patch @@ -0,0 +1,105 @@ +From 47e5dec521ab6243c9b249dd65b93d232d90d6b1 Mon Sep 17 00:00:00 2001 +From: Jan Dittberner <jan@dittberner.info> +Date: Thu, 25 Aug 2016 17:13:49 +0200 +Subject: [PATCH] Apply patch to fix CVE-2016-6318 + +This patch fixes an issue with a stack-based buffer overflow when +parsing large GECOS field. See +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-6318 and +https://security-tracker.debian.org/tracker/CVE-2016-6318 for more +information. + +Upstream-Status: Backport [https://github.com/cracklib/cracklib/commit/47e5dec521ab6243c9b249dd65b93d232d90d6b1] +CVE: CVE-2016-6318 +Signed-off-by: Dengke Du <dengke.du@windriver.com> +--- + lib/fascist.c | 57 ++++++++++++++++++++++++++++++++----------------------- + 1 file changed, 33 insertions(+), 24 deletions(-) + +diff --git a/lib/fascist.c b/lib/fascist.c +index a996509..d4deb15 100644 +--- a/lib/fascist.c ++++ b/lib/fascist.c +@@ -502,7 +502,7 @@ FascistGecosUser(char *password, const char *user, const char *gecos) + char gbuffer[STRINGSIZE]; + char tbuffer[STRINGSIZE]; + char *uwords[STRINGSIZE]; +- char longbuffer[STRINGSIZE * 2]; ++ char longbuffer[STRINGSIZE]; + + if (gecos == NULL) + gecos = ""; +@@ -583,38 +583,47 @@ FascistGecosUser(char *password, const char *user, const char *gecos) + { + for (i = 0; i < j; i++) + { +- strcpy(longbuffer, uwords[i]); +- strcat(longbuffer, uwords[j]); +- +- if (GTry(longbuffer, password)) ++ if (strlen(uwords[i]) + strlen(uwords[j]) < STRINGSIZE) + { +- return _("it is derived from your password entry"); +- } ++ strcpy(longbuffer, uwords[i]); ++ strcat(longbuffer, uwords[j]); + +- strcpy(longbuffer, uwords[j]); +- strcat(longbuffer, uwords[i]); ++ if (GTry(longbuffer, password)) ++ { ++ return _("it is derived from your password entry"); ++ } + +- if (GTry(longbuffer, password)) +- { +- return _("it's derived from your password entry"); +- } ++ strcpy(longbuffer, uwords[j]); ++ strcat(longbuffer, uwords[i]); + +- longbuffer[0] = uwords[i][0]; +- longbuffer[1] = '\0'; +- strcat(longbuffer, uwords[j]); ++ if (GTry(longbuffer, password)) ++ { ++ return _("it's derived from your password entry"); ++ } ++ } + +- if (GTry(longbuffer, password)) ++ if (strlen(uwords[j]) < STRINGSIZE - 1) + { +- return _("it is derivable from your password entry"); ++ longbuffer[0] = uwords[i][0]; ++ longbuffer[1] = '\0'; ++ strcat(longbuffer, uwords[j]); ++ ++ if (GTry(longbuffer, password)) ++ { ++ return _("it is derivable from your password entry"); ++ } + } + +- longbuffer[0] = uwords[j][0]; +- longbuffer[1] = '\0'; +- strcat(longbuffer, uwords[i]); +- +- if (GTry(longbuffer, password)) ++ if (strlen(uwords[i]) < STRINGSIZE - 1) + { +- return _("it's derivable from your password entry"); ++ longbuffer[0] = uwords[j][0]; ++ longbuffer[1] = '\0'; ++ strcat(longbuffer, uwords[i]); ++ ++ if (GTry(longbuffer, password)) ++ { ++ return _("it's derivable from your password entry"); ++ } + } + } + } +-- +2.8.1 + diff --git a/meta/recipes-extended/cracklib/cracklib_2.9.5.bb b/meta/recipes-extended/cracklib/cracklib_2.9.5.bb index c0ffe33160..82995219dc 100644 --- a/meta/recipes-extended/cracklib/cracklib_2.9.5.bb +++ b/meta/recipes-extended/cracklib/cracklib_2.9.5.bb @@ -4,42 +4,26 @@ HOMEPAGE = "http://sourceforge.net/projects/cracklib" LICENSE = "LGPLv2.1+" LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06" -DEPENDS = "cracklib-native zlib python" -RDEPEND_${PN}-python += "python" +DEPENDS = "cracklib-native zlib" -PACKAGES += "${PN}-python" - -EXTRA_OECONF = "--with-python --libdir=${base_libdir}" +EXTRA_OECONF = "--without-python --libdir=${base_libdir}" SRC_URI = "${SOURCEFORGE_MIRROR}/cracklib/cracklib-${PV}.tar.gz \ file://0001-packlib.c-support-dictionary-byte-order-dependent.patch \ + file://0001-Apply-patch-to-fix-CVE-2016-6318.patch \ file://0002-craklib-fix-testnum-and-teststr-failed.patch" SRC_URI[md5sum] = "376790a95c1fb645e59e6e9803c78582" SRC_URI[sha256sum] = "59ab0138bc8cf90cccb8509b6969a024d5e58d2d02bcbdccbb9ba9b88be3fa33" -inherit autotools gettext pythonnative python-dir +UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/cracklib/files/cracklib/" +UPSTREAM_CHECK_REGEX = "/cracklib/(?P<pver>(\d+[\.\-_]*)+)/" + +inherit autotools gettext do_install_append_class-target() { create-cracklib-dict -o ${D}${datadir}/cracklib/pw_dict ${D}${datadir}/cracklib/cracklib-small } -do_install_append() { - src_dir="${D}${base_libdir}/${PYTHON_DIR}/site-packages" - rm -f $src_dir/*.pyo - rm -f $src_dir/test_cracklib.py - # Move python files from ${base_libdir} to ${libdir} since used --libdir=${base_libdir} - install -d -m 0755 ${D}${PYTHON_SITEPACKAGES_DIR}/ - mv $src_dir/* ${D}${PYTHON_SITEPACKAGES_DIR} - rm -fr ${D}${base_libdir}/${PYTHON_DIR} -} - BBCLASSEXTEND = "native nativesdk" -FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/cracklib.py \ - ${PYTHON_SITEPACKAGES_DIR}/_cracklib.so \ - " -FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/_cracklib.so" -FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/_cracklib.a \ - ${PYTHON_SITEPACKAGES_DIR}/_cracklib.la \ - " diff --git a/meta/recipes-extended/cronie/cronie/crond_pam_config.patch b/meta/recipes-extended/cronie/cronie/crond_pam_config.patch index 675872c3cf..c374790d1d 100644 --- a/meta/recipes-extended/cronie/cronie/crond_pam_config.patch +++ b/meta/recipes-extended/cronie/cronie/crond_pam_config.patch @@ -4,16 +4,19 @@ configure files instead. Upstream-Status: Pending Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> ---- cronie-1.4.7/pam/crond.orig 2010-12-16 16:59:02.000000000 +0800 -+++ cronie-1.4.7/pam/crond 2011-07-20 09:47:16.080819203 +0800 -@@ -4,7 +4,7 @@ +diff --git a/pam/crond b/pam/crond +index 560529d..95a6457 100644 +--- a/pam/crond ++++ b/pam/crond +@@ -4,8 +4,8 @@ # - # No PAM authentication called, auth modules not needed + # 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 password-auth -+account include common-account +-account include system-auth ++account include common-auth session required pam_loginuid.so --session include password-auth --auth include password-auth +-session include system-auth +session include common-session-noninteractive -+auth include common-auth diff --git a/meta/recipes-extended/cronie/cronie_1.5.0.bb b/meta/recipes-extended/cronie/cronie_1.5.5.bb index 38bd5935cc..0def4a187d 100644 --- a/meta/recipes-extended/cronie/cronie_1.5.0.bb +++ b/meta/recipes-extended/cronie/cronie_1.5.5.bb @@ -3,8 +3,8 @@ 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://fedorahosted.org/cronie/" -BUGTRACKER = "mmaslano@redhat.com" +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+" @@ -14,7 +14,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=dd2a592170760e1386c769e1043b3722 \ SECTION = "utils" -SRC_URI = "https://fedorahosted.org/releases/c/r/cronie/cronie-${PV}.tar.gz \ +UPSTREAM_CHECK_URI = "https://github.com/cronie-crond/${BPN}/releases/" + +SRC_URI = "https://github.com/cronie-crond/cronie/releases/download/cronie-${PV}/cronie-${PV}.tar.gz \ file://crond.init \ file://crontab \ file://crond.service \ @@ -23,15 +25,16 @@ SRC_URI = "https://fedorahosted.org/releases/c/r/cronie/cronie-${PV}.tar.gz \ PAM_SRC_URI = "file://crond_pam_config.patch" PAM_DEPS = "libpam libpam-runtime pam-plugin-access pam-plugin-loginuid" -SRC_URI[md5sum] = "9db75e1884d83a45e002d145c6c54d45" -SRC_URI[sha256sum] = "9cf0e3f4f5042a9c09413d62c8e0c055e12401f70b112465f0f81f2c84ebfb3f" +SRC_URI[md5sum] = "351a37d0b5bd0144816724b4482747ad" +SRC_URI[sha256sum] = "be34c79505e5544323281854744b9955ff16b160ee569f9df7c0dddae5720eac" inherit autotools update-rc.d useradd systemd -PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" +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 ." diff --git a/meta/recipes-extended/cups/cups.inc b/meta/recipes-extended/cups/cups.inc index 57cdf2650e..87870e4aba 100644 --- a/meta/recipes-extended/cups/cups.inc +++ b/meta/recipes-extended/cups/cups.inc @@ -1,33 +1,43 @@ SUMMARY = "An Internet printing system for Unix" +DESCRIPTION = "The Common UNIX Printing System is a printing system and \ +general replacement for lpd and the like. It supports the Internet Printing \ +Protocol (IPP), and has its own filtering driver model for handling various \ +document types." +HOMEPAGE = "https://www.cups.org/" SECTION = "console/utils" -LICENSE = "GPLv2 & LGPLv2" -DEPENDS = "gnutls libpng jpeg dbus dbus-glib zlib libusb" - -SRC_URI = "http://www.cups.org/software/${PV}/${BP}-source.tar.bz2 \ - file://use_echo_only_in_init.patch \ - file://0001-don-t-try-to-run-generated-binaries.patch \ - file://cups_serverbin.patch \ - file://cups.socket \ - file://cups.path \ - file://cups.service \ - " +LICENSE = "Apache-2.0" +DEPENDS = "gnutls libpng jpeg dbus zlib libusb1" + +SRC_URI = "https://github.com/apple/cups/releases/download/v${PV}/${BP}-source.tar.gz \ + file://0001-use-echo-only-in-init.patch \ + file://0002-don-t-try-to-run-generated-binaries.patch \ + file://0003-cups_1.4.6.bb-Fix-build-on-ppc64.patch \ + file://0004-cups-fix-multilib-install-file-conflicts.patch \ + file://volatiles.99_cups \ + file://cups-volatiles.conf \ + " + +UPSTREAM_CHECK_URI = "https://github.com/apple/cups/releases" +UPSTREAM_CHECK_REGEX = "cups-(?P<pver>\d+\.\d+(\.\d+)?)-source.tar" LEAD_SONAME = "libcupsdriver.so" CLEANBROKEN = "1" -inherit autotools-brokensep binconfig useradd systemd +inherit autotools-brokensep binconfig useradd systemd pkgconfig multilib_script USERADD_PACKAGES = "${PN}" GROUPADD_PARAM_${PN} = "--system lpadmin" -SYSTEMD_SERVICE_${PN} = "cups.socket cups.path cups.service" +SYSTEMD_SERVICE_${PN} = "org.cups.cupsd.socket org.cups.cupsd.path org.cups.cupsd.service org.cups.cups-lpd.socket" PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" + ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd', d)}" PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi" PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl" -PACKAGECONFIG[pam] = "--enable-pam, --disable-pam, libpam" +PACKAGECONFIG[pam] = "--enable-pam --with-pam-module=unix, --disable-pam, libpam" +PACKAGECONFIG[systemd] = "--with-systemd=${systemd_system_unitdir},--without-systemd,systemd" +PACKAGECONFIG[xinetd] = "--with-xinetd=${sysconfdir}/xinetd.d,--without-xinetd,xinetd" EXTRA_OECONF = " \ --enable-gnutls \ @@ -37,10 +47,8 @@ EXTRA_OECONF = " \ --enable-debug \ --disable-relro \ --enable-libusb \ - --without-php \ - --without-perl \ - --without-python \ - --without-java \ + --with-domainsocket=/run/cups/cups.sock \ + DSOFLAGS='${LDFLAGS}' \ " EXTRA_AUTORECONF += "--exclude=autoheader" @@ -62,52 +70,38 @@ do_install () { # Remove /var/run from package as cupsd will populate it on startup rm -fr ${D}/${localstatedir}/run - rmdir ${D}/${libdir}/${BPN}/driver + rm -fr ${D}/${localstatedir}/log + rmdir ${D}/${libexecdir}/${BPN}/driver + + # Fix the pam configuration file permissions + if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then + chmod 0644 ${D}${sysconfdir}/pam.d/cups + fi # Remove sysinit script and symlinks if sysvinit is not in DISTRO_FEATURES 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}/cups-volatiles.conf \ + ${D}${sysconfdir}/tmpfiles.d/cups.conf + else + install -d ${D}${sysconfdir}/default/volatiles + install -m 0644 ${WORKDIR}/volatiles.99_cups \ + ${D}${sysconfdir}/default/volatiles/99_cups fi - - # Install systemd unit files - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/cups.socket ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/cups.path ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/cups.service ${D}${systemd_unitdir}/system - sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/cups.service -} - -python do_package_append() { - import subprocess - # Change permissions back the way they were, they probably had a reason... - workdir = d.getVar('WORKDIR', True) - subprocess.call('chmod 0511 %s/install/cups/var/run/cups/certs' % workdir, shell=True) } PACKAGES =+ "${PN}-lib ${PN}-libimage" RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps', '', d)}" -FILES_${PN} += "${libdir}/cups/backend \ - ${libdir}/cups/cgi-bin \ - ${libdir}/cups/filter \ - ${libdir}/cups/monitor \ - ${libdir}/cups/notifier \ - ${libdir}/cups/daemon \ +FILES_${PN} += "${libexecdir}/cups/ \ " FILES_${PN}-lib = "${libdir}/libcups.so.*" FILES_${PN}-libimage = "${libdir}/libcupsimage.so.*" -FILES_${PN}-dbg += "${libdir}/cups/backend/.debug \ - ${libdir}/cups/cgi-bin/.debug \ - ${libdir}/cups/filter/.debug \ - ${libdir}/cups/monitor/.debug \ - ${libdir}/cups/notifier/.debug \ - ${libdir}/cups/daemon/.debug \ - " - #package the html for the webgui inside the main packages (~1MB uncompressed) FILES_${PN} += "${datadir}/doc/cups/images \ @@ -117,7 +111,9 @@ FILES_${PN} += "${datadir}/doc/cups/images \ " CONFFILES_${PN} += "${sysconfdir}/cups/cupsd.conf" +MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/cups-config" + SYSROOT_PREPROCESS_FUNCS += "cups_sysroot_preprocess" cups_sysroot_preprocess () { - sed -i ${SYSROOT_DESTDIR}${bindir_crossscripts}/cups-config -e 's:cups_datadir=.*:cups_datadir=${datadir}/cups:' -e 's:cups_serverbin=.*:cups_serverbin=${libdir}/cups:' + sed -i ${SYSROOT_DESTDIR}${bindir_crossscripts}/cups-config -e 's:cups_datadir=.*:cups_datadir=${datadir}/cups:' -e 's:cups_serverbin=.*:cups_serverbin=${libexecdir}/cups:' } diff --git a/meta/recipes-extended/cups/cups/0001-use-echo-only-in-init.patch b/meta/recipes-extended/cups/cups/0001-use-echo-only-in-init.patch new file mode 100644 index 0000000000..80bbad0a44 --- /dev/null +++ b/meta/recipes-extended/cups/cups/0001-use-echo-only-in-init.patch @@ -0,0 +1,27 @@ +From a3f4d8ba97f4669a95943a7e65eb61aa44ce7999 Mon Sep 17 00:00:00 2001 +From: Saul Wold <sgw@linux.intel.com> +Date: Thu, 13 Dec 2012 19:03:52 -0800 +Subject: [PATCH 1/4] use echo only in init + +Upstream-Status: Inappropriate [embedded specific] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + scheduler/cups.sh.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scheduler/cups.sh.in b/scheduler/cups.sh.in +index 89ac36d..6618a0f 100644 +--- a/scheduler/cups.sh.in ++++ b/scheduler/cups.sh.in +@@ -50,7 +50,7 @@ case "`uname`" in + ECHO_ERROR=: + ;; + +- Linux*) ++ DisableLinux*) + IS_ON=/bin/true + if test -f /etc/init.d/functions; then + . /etc/init.d/functions +-- +2.17.1 + diff --git a/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch b/meta/recipes-extended/cups/cups/0002-don-t-try-to-run-generated-binaries.patch index 5379eb6aa2..ea248e4710 100644 --- a/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch +++ b/meta/recipes-extended/cups/cups/0002-don-t-try-to-run-generated-binaries.patch @@ -1,23 +1,24 @@ -Upstream-Status: Inappropriate [embedded specific] - -From 90069586167b930befce7303aea57078f04b4ed8 Mon Sep 17 00:00:00 2001 +From 3e9a965dcd65ab2d40b753b6f792a1a4559182aa Mon Sep 17 00:00:00 2001 From: Koen Kooi <koen@dominion.thruhere.net> Date: Sun, 30 Jan 2011 16:37:27 +0100 -Subject: [PATCH] don't try to run generated binaries +Subject: [PATCH 2/4] don't try to run generated binaries + +Upstream-Status: Inappropriate [embedded specific] Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> + --- - ppdc/Makefile | 30 +++++++++++++++--------------- - 1 files changed, 15 insertions(+), 15 deletions(-) + ppdc/Makefile | 32 ++++++++++++++++---------------- + 1 file changed, 16 insertions(+), 16 deletions(-) -Index: cups-2.0.0/ppdc/Makefile -=================================================================== ---- cups-2.0.0.orig/ppdc/Makefile -+++ cups-2.0.0/ppdc/Makefile -@@ -242,8 +242,8 @@ genstrings: genstrings.o libcupsppdc.a - $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o genstrings genstrings.o \ - libcupsppdc.a ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) \ - $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) +diff --git a/ppdc/Makefile b/ppdc/Makefile +index 32e2e0b..f1478d4 100644 +--- a/ppdc/Makefile ++++ b/ppdc/Makefile +@@ -186,8 +186,8 @@ genstrings: genstrings.o libcupsppdc.a ../cups/$(LIBCUPSSTATIC) \ + $(LD_CXX) $(ARCHFLAGS) $(ALL_LDFLAGS) -o genstrings genstrings.o \ + libcupsppdc.a $(LINKCUPSSTATIC) + $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ - echo Generating localization strings... - ./genstrings >sample.c +# echo Generating localization strings... @@ -25,10 +26,10 @@ Index: cups-2.0.0/ppdc/Makefile # -@@ -260,9 +260,9 @@ ppdc-static: ppdc.o libcupsppdc.a ../cu - $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a \ - ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \ - $(COMMONLIBS) $(LIBZ) +@@ -205,9 +205,9 @@ ppdc-static: ppdc.o libcupsppdc.a ../cups/$(LIBCUPSSTATIC) foo.drv foo-fr.po + $(LD_CXX) $(ARCHFLAGS) $(ALL_LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a \ + $(LINKCUPSSTATIC) + $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ - echo Testing PPD compiler... - ./ppdc-static -l en,fr -I ../data foo.drv - ./ppdc-static -l en,fr -z -I ../data foo.drv @@ -38,10 +39,10 @@ Index: cups-2.0.0/ppdc/Makefile # -@@ -288,17 +288,17 @@ ppdi-static: ppdc-static ppdi.o libcups - $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdi-static ppdi.o libcupsppdc.a \ - ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \ - $(COMMONLIBS) $(LIBZ) +@@ -235,17 +235,17 @@ ppdi-static: ppdc-static ppdi.o libcupsppdc.a ../cups/$(LIBCUPSSTATIC) + $(LD_CXX) $(ARCHFLAGS) $(ALL_LDFLAGS) -o ppdi-static ppdi.o libcupsppdc.a \ + $(LINKCUPSSTATIC) + $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ - echo Testing PPD importer... - $(RM) -r ppd ppd2 sample-import.drv - ./ppdc-static -l en -I ../data sample.drv @@ -67,3 +68,6 @@ Index: cups-2.0.0/ppdc/Makefile # +-- +2.17.1 + diff --git a/meta/recipes-extended/cups/cups/0003-cups_1.4.6.bb-Fix-build-on-ppc64.patch b/meta/recipes-extended/cups/cups/0003-cups_1.4.6.bb-Fix-build-on-ppc64.patch new file mode 100644 index 0000000000..b48c7a9ad2 --- /dev/null +++ b/meta/recipes-extended/cups/cups/0003-cups_1.4.6.bb-Fix-build-on-ppc64.patch @@ -0,0 +1,51 @@ +From 66c2079ae91389ee0f9d704bf0d2cccd53b2c603 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 22 Jul 2012 16:54:17 -0700 +Subject: [PATCH 3/4] cups_1.4.6.bb: Fix build on ppc64 + +Make CUPS_SERVERBIN relative to libdir otherwise on 64bit arches +e.g. ppc64 where base libdir is lib64 this does not go well + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Inappropriate [OE config specific] + +Update on 20190904: +Redefine CUPS_SERVERBIN to "$libexecdir/cups" which solves file confliction +when multilib is enabled. + +Signed-off-by: Kai Kang <kai.kang@windriver.com> + +--- + config-scripts/cups-directories.m4 | 2 +- + configure | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/config-scripts/cups-directories.m4 b/config-scripts/cups-directories.m4 +index b74083a..9a5abb2 100644 +--- a/config-scripts/cups-directories.m4 ++++ b/config-scripts/cups-directories.m4 +@@ -270,7 +270,7 @@ case "$host_os_name" in + *) + # All others + INSTALL_SYSV="install-sysv" +- CUPS_SERVERBIN="$exec_prefix/lib/cups" ++ CUPS_SERVERBIN="$libexecdir/cups" + ;; + esac + +diff --git a/configure b/configure +index d3df145..bc68a6c 100755 +--- a/configure ++++ b/configure +@@ -6420,7 +6420,7 @@ case "$host_os_name" in + *) + # All others + INSTALL_SYSV="install-sysv" +- CUPS_SERVERBIN="$exec_prefix/lib/cups" ++ CUPS_SERVERBIN="$libexecdir/cups" + ;; + esac + +-- +2.17.1 + diff --git a/meta/recipes-extended/cups/cups/0004-cups-fix-multilib-install-file-conflicts.patch b/meta/recipes-extended/cups/cups/0004-cups-fix-multilib-install-file-conflicts.patch new file mode 100644 index 0000000000..bc9260307c --- /dev/null +++ b/meta/recipes-extended/cups/cups/0004-cups-fix-multilib-install-file-conflicts.patch @@ -0,0 +1,33 @@ +From 7dbda1887aa19ab720aff22312f4caff2d575f62 Mon Sep 17 00:00:00 2001 +From: Kai Kang <kai.kang@windriver.com> +Date: Wed, 3 Oct 2018 00:27:11 +0800 +Subject: [PATCH 4/4] cups: fix multilib install file conflicts + +@CUPS_SERVERBIN@ is ${libdir} related that causes multilib install file +conflict. Remove @CUPS_SERVERBIN@ from the comment line of cups-files.conf to +avoid the conflict. + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Kai Kang <kai.kang@windriver.com> + +--- + conf/cups-files.conf.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/conf/cups-files.conf.in b/conf/cups-files.conf.in +index 4a78ba6..03c6582 100644 +--- a/conf/cups-files.conf.in ++++ b/conf/cups-files.conf.in +@@ -73,7 +73,7 @@ PageLog @CUPS_LOGDIR@/page_log + #RequestRoot @CUPS_REQUESTS@ + + # Location of helper programs... +-#ServerBin @CUPS_SERVERBIN@ ++#ServerBin + + # SSL/TLS keychain for the scheduler... + #ServerKeychain @CUPS_SERVERKEYCHAIN@ +-- +2.17.1 + diff --git a/meta/recipes-extended/cups/cups/cups-volatiles.conf b/meta/recipes-extended/cups/cups/cups-volatiles.conf new file mode 100644 index 0000000000..0ede78e1c8 --- /dev/null +++ b/meta/recipes-extended/cups/cups/cups-volatiles.conf @@ -0,0 +1 @@ +d /var/log/cups 0755 root root - diff --git a/meta/recipes-extended/cups/cups/cups.path b/meta/recipes-extended/cups/cups/cups.path deleted file mode 100644 index de8cc57c27..0000000000 --- a/meta/recipes-extended/cups/cups/cups.path +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=CUPS Printer Service Spool - -[Path] -PathExistsGlob=/var/spool/cups/d* - -[Install] -WantedBy=multi-user.target diff --git a/meta/recipes-extended/cups/cups/cups.service b/meta/recipes-extended/cups/cups/cups.service deleted file mode 100644 index 7d3e839867..0000000000 --- a/meta/recipes-extended/cups/cups/cups.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=CUPS Printing Service - -[Service] -ExecStart=@SBINDIR@/cupsd -f -PrivateTmp=true - -[Install] -Also=cups.socket cups.path -WantedBy=printer.target diff --git a/meta/recipes-extended/cups/cups/cups.socket b/meta/recipes-extended/cups/cups/cups.socket deleted file mode 100644 index 33148705d6..0000000000 --- a/meta/recipes-extended/cups/cups/cups.socket +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=CUPS Printing Service Sockets - -[Socket] -ListenStream=/var/run/cups/cups.sock - -[Install] -WantedBy=sockets.target diff --git a/meta/recipes-extended/cups/cups/cups_serverbin.patch b/meta/recipes-extended/cups/cups/cups_serverbin.patch deleted file mode 100644 index f7b44a7bc1..0000000000 --- a/meta/recipes-extended/cups/cups/cups_serverbin.patch +++ /dev/null @@ -1,32 +0,0 @@ -Make CUPS_SERVERBIN relative to libdir otherwise on 64bit arches -e.g. ppc64 where base libdir is lib64 this does not go well - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Upstream-Status: Inappropriate [OE config specific] - -Index: cups-1.4.6/config-scripts/cups-directories.m4 -=================================================================== ---- cups-1.4.6.orig/config-scripts/cups-directories.m4 2009-04-12 16:04:51.000000000 -0700 -+++ cups-1.4.6/config-scripts/cups-directories.m4 2012-07-21 12:12:05.896405923 -0700 -@@ -397,7 +397,7 @@ - *) - # All others - INSTALL_SYSV="install-sysv" -- CUPS_SERVERBIN="$exec_prefix/lib/cups" -+ CUPS_SERVERBIN="$libdir/cups" - ;; - esac - -Index: cups-1.4.6/configure -=================================================================== ---- cups-1.4.6.orig/configure 2012-07-21 12:13:34.512405950 -0700 -+++ cups-1.4.6/configure 2012-07-21 12:14:05.724406017 -0700 -@@ -11181,7 +11181,7 @@ - *) - # All others - INSTALL_SYSV="install-sysv" -- CUPS_SERVERBIN="$exec_prefix/lib/cups" -+ CUPS_SERVERBIN="$libdir/cups" - ;; - esac - diff --git a/meta/recipes-extended/cups/cups/use_echo_only_in_init.patch b/meta/recipes-extended/cups/cups/use_echo_only_in_init.patch deleted file mode 100644 index 696f1374d9..0000000000 --- a/meta/recipes-extended/cups/cups/use_echo_only_in_init.patch +++ /dev/null @@ -1,15 +0,0 @@ -Upstream-Status: Inappropriate [embedded specific] - -Index: cups-1.6.1/scheduler/cups.sh.in -=================================================================== ---- cups-1.6.1.orig/scheduler/cups.sh.in -+++ cups-1.6.1/scheduler/cups.sh.in -@@ -67,7 +67,7 @@ case "`uname`" in - ECHO_ERROR=: - ;; - -- Linux*) -+ DisableLinux*) - IS_ON=/bin/true - if test -f /etc/init.d/functions; then - . /etc/init.d/functions diff --git a/meta/recipes-extended/cups/cups/volatiles.99_cups b/meta/recipes-extended/cups/cups/volatiles.99_cups new file mode 100644 index 0000000000..cc0e19e4c8 --- /dev/null +++ b/meta/recipes-extended/cups/cups/volatiles.99_cups @@ -0,0 +1,2 @@ +# <type> <owner> <group> <mode> <path> <linksource> +d root root 0755 /var/log/cups none diff --git a/meta/recipes-extended/cups/cups_2.0.4.bb b/meta/recipes-extended/cups/cups_2.0.4.bb deleted file mode 100644 index bad73b34f0..0000000000 --- a/meta/recipes-extended/cups/cups_2.0.4.bb +++ /dev/null @@ -1,6 +0,0 @@ -require cups.inc - -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=6c5a350596fba02754bd96eb6df3afd0" - -SRC_URI[md5sum] = "f5c847d9a4fac6c4c66fb0526a7afaae" -SRC_URI[sha256sum] = "e1d5e68d9f24faca317aeaebc164c34102813bc0f1d69c00b3a59b49c49f4abd" diff --git a/meta/recipes-extended/cups/cups_2.3.3.bb b/meta/recipes-extended/cups/cups_2.3.3.bb new file mode 100644 index 0000000000..5caeb6f58b --- /dev/null +++ b/meta/recipes-extended/cups/cups_2.3.3.bb @@ -0,0 +1,6 @@ +require cups.inc + +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRC_URI[md5sum] = "412434ceefbdf3ec71bc9188a035f589" +SRC_URI[sha256sum] = "261fd948bce8647b6d5cb2a1784f0c24cc52b5c4e827b71d726020bcc502f3ee" diff --git a/meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb b/meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb index 43ea3ce382..65a99fc28d 100644 --- a/meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb +++ b/meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb @@ -14,6 +14,9 @@ do_configure() { do_install() { oe_runmake CWAUTOMACROSPREFIX=${D}${prefix} install + + # cleanup buildpaths in autogen.sh + sed -i -e 's,${D},,g' ${D}${prefix}/share/cwautomacros/scripts/autogen.sh } BBCLASSEXTEND = "native" diff --git a/meta/recipes-extended/diffutils/diffutils-2.8.1/diffutils_fix_for_automake-1.12.patch b/meta/recipes-extended/diffutils/diffutils-2.8.1/diffutils_fix_for_automake-1.12.patch deleted file mode 100644 index cc05d1dc06..0000000000 --- a/meta/recipes-extended/diffutils/diffutils-2.8.1/diffutils_fix_for_automake-1.12.patch +++ /dev/null @@ -1,27 +0,0 @@ -Upstream-Status: Pending - -automake 1.12 has depricated automatic de-ANSI-fication support - -this patch avoids these kinds of errors: - -| configure.ac:90: error: automatic de-ANSI-fication support has been removed -| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12/protos.m4:12: AM_C_PROTOTYPES is expanded from... -| /srv/home/nitin/builds/build-gcc47/tmp/work/i586-poky-linux/diffutils-2.8.1-r4/diffutils-2.8.1/m4/prereq.m4:110: jm_PREREQ_QUOTEARG is expanded from... -| configure.ac:90: the top level -| autom4te: m4 failed with exit status: 1 - -Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> -2012/05/04 - -Index: diffutils-2.8.1/m4/prereq.m4 -=================================================================== ---- diffutils-2.8.1.orig/m4/prereq.m4 -+++ diffutils-2.8.1/m4/prereq.m4 -@@ -115,7 +115,6 @@ AC_DEFUN([jm_PREREQ_QUOTEARG], - AC_HEADER_STDC - AC_C_BACKSLASH_A - AC_MBSTATE_T -- AM_C_PROTOTYPES - ]) - - AC_DEFUN([jm_PREREQ_REGEX], diff --git a/meta/recipes-extended/diffutils/diffutils-3.3/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/diffutils/diffutils-3.3/0001-Unset-need_charset_alias-when-building-for-musl.patch deleted file mode 100644 index abdfa2a50b..0000000000 --- a/meta/recipes-extended/diffutils/diffutils-3.3/0001-Unset-need_charset_alias-when-building-for-musl.patch +++ /dev/null @@ -1,33 +0,0 @@ -From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 13 Apr 2015 17:02:13 -0700 -Subject: [PATCH] Unset need_charset_alias when building for musl - -localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 -which actually shoudl be fixed in gnulib and then all downstream -projects will get it eventually. For now we apply the fix to -coreutils - -Upstream-Status: Not Required - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - lib/gnulib.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/gnulib.mk b/lib/gnulib.mk -index e1d74db..c0e92dd 100644 ---- a/lib/gnulib.mk -+++ b/lib/gnulib.mk -@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local - case '$(host_os)' in \ - darwin[56]*) \ - need_charset_alias=true ;; \ -- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ -+ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ - need_charset_alias=false ;; \ - *) \ - need_charset_alias=true ;; \ --- -2.1.4 - diff --git a/meta/recipes-extended/diffutils/diffutils-3.3/run-ptest b/meta/recipes-extended/diffutils/diffutils-3.3/run-ptest deleted file mode 100644 index 695c5e8a7b..0000000000 --- a/meta/recipes-extended/diffutils/diffutils-3.3/run-ptest +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -make -C tests check-TESTS diff --git a/meta/recipes-extended/diffutils/diffutils.inc b/meta/recipes-extended/diffutils/diffutils.inc index 243341aa9c..c9e3130587 100644 --- a/meta/recipes-extended/diffutils/diffutils.inc +++ b/meta/recipes-extended/diffutils/diffutils.inc @@ -1,4 +1,5 @@ SUMMARY = "Diffutils contains tools used for finding differences between files" +HOMEPAGE = "https://www.gnu.org/software/diffutils/diffutils.html" DESCRIPTION = "Diffutils contains the GNU diff, diff3, \ sdiff, and cmp utilities. These programs are usually \ used for creating patch files." @@ -6,13 +7,7 @@ SECTION = "base" inherit autotools texinfo update-alternatives gettext -# diffutils assumes non-glibc compilation with uclibc and -# this causes it to generate its own implementations of -# standard functionality. regex.c actually breaks compilation -# because it uses __mempcpy, there are other things (TBD: -# see diffutils.mk in buildroot) -EXTRA_OECONF_libc-uclibc = "--without-included-regex" - ALTERNATIVE_${PN} = "diff cmp" ALTERNATIVE_PRIORITY = "100" +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-extended/diffutils/diffutils/0001-Skip-strip-trailing-cr-test-case.patch b/meta/recipes-extended/diffutils/diffutils/0001-Skip-strip-trailing-cr-test-case.patch new file mode 100644 index 0000000000..aac1c43465 --- /dev/null +++ b/meta/recipes-extended/diffutils/diffutils/0001-Skip-strip-trailing-cr-test-case.patch @@ -0,0 +1,35 @@ +From bd7fb8be2ae2d75347cf7733302d5093046ffa85 Mon Sep 17 00:00:00 2001 +From: Peiran Hong <peiran.hong@windriver.com> +Date: Thu, 5 Sep 2019 15:42:22 -0400 +Subject: [PATCH] Skip strip-trailing-cr test case + +Skip the test "strip-trailing-cr" since it requires valgrind to +work, but valgrind is considered too heavy-weight for diffutils +package. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Peiran Hong <peiran.hong@windriver.com> +--- + tests/Makefile.am | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 83a7c9d..04d51b5 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -21,8 +21,10 @@ TESTS = \ + stdin \ + strcoll-0-names \ + filename-quoting \ +- strip-trailing-cr \ + colors ++# Skipping this test since it requires valgrind ++# and thus is too heavy for diffutils package ++# strip-trailing-cr + + XFAIL_TESTS = large-subopt + +-- +2.21.0 + diff --git a/meta/recipes-extended/diffutils/diffutils/run-ptest b/meta/recipes-extended/diffutils/diffutils/run-ptest new file mode 100644 index 0000000000..ad467d9bd0 --- /dev/null +++ b/meta/recipes-extended/diffutils/diffutils/run-ptest @@ -0,0 +1,4 @@ +#!/bin/sh + +abs_ptestdir=`echo "$(cd "$(dirname "$0")"; pwd)"` +make -C $abs_ptestdir/tests check-TESTS abs_top_srcdir="$abs_ptestdir" diff --git a/meta/recipes-extended/diffutils/diffutils_2.8.1.bb b/meta/recipes-extended/diffutils/diffutils_2.8.1.bb deleted file mode 100644 index bf425bbb35..0000000000 --- a/meta/recipes-extended/diffutils/diffutils_2.8.1.bb +++ /dev/null @@ -1,16 +0,0 @@ -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" - -require diffutils.inc - -PR = "r7.0" - -SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.gz \ - file://diffutils_fix_for_automake-1.12.patch" - -SRC_URI[md5sum] = "71f9c5ae19b60608f6c7f162da86a428" -SRC_URI[sha256sum] = "c5001748b069224dd98bf1bb9ee877321c7de8b332c8aad5af3e2a7372d23f5a" - -do_configure_prepend () { - chmod u+w ${S}/po/Makefile.in.in -} diff --git a/meta/recipes-extended/diffutils/diffutils_3.3.bb b/meta/recipes-extended/diffutils/diffutils_3.3.bb deleted file mode 100644 index 5008690ea4..0000000000 --- a/meta/recipes-extended/diffutils/diffutils_3.3.bb +++ /dev/null @@ -1,37 +0,0 @@ -LICENSE = "GPLv3+" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -require diffutils.inc - -SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.xz \ - file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ - file://run-ptest \ -" - -EXTRA_OECONF += "--without-libsigsegv-prefix" - -do_configure_prepend () { - # Need to remove gettext macros with weird mix of versions - for i in codeset.m4 gettext_gl.m4 intlmacosx.m4 inttypes-pri.m4 lib-ld_gl.m4 lib-prefix_gl.m4 po_gl.m4 ssize_t.m4 wchar_t.m4 wint_t.m4; do - rm -f ${S}/m4/$i - done -} - -SRC_URI[md5sum] = "99180208ec2a82ce71f55b0d7389f1b3" -SRC_URI[sha256sum] = "a25e89a8ab65fded1731e4186be1bb25cda967834b6df973599cdcd5abdfc19c" - -inherit ptest - -do_install_ptest() { - t=${D}${PTEST_PATH} - install -D ${S}/build-aux/test-driver $t/build-aux/test-driver - cp -r ${S}/tests $t/ - install ${B}/tests/Makefile $t/tests/ - sed -e 's|^Makefile:|_Makefile:|' \ - -e 's|bash|sh|' \ - -e 's|^top_srcdir = \(.*\)|top_srcdir = ..\/|' \ - -e 's|^srcdir = \(.*\)|srcdir = .|' \ - -e 's|"`$(built_programs)`"|diff|' \ - -e 's|gawk|awk|g' \ - -i $t/tests/Makefile -} diff --git a/meta/recipes-extended/diffutils/diffutils_3.7.bb b/meta/recipes-extended/diffutils/diffutils_3.7.bb new file mode 100644 index 0000000000..8111ae6065 --- /dev/null +++ b/meta/recipes-extended/diffutils/diffutils_3.7.bb @@ -0,0 +1,40 @@ +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +require diffutils.inc + +SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.xz \ + file://run-ptest \ + file://0001-Skip-strip-trailing-cr-test-case.patch \ +" + +SRC_URI[md5sum] = "4824adc0e95dbbf11dfbdfaad6a1e461" +SRC_URI[sha256sum] = "b3a7a6221c3dc916085f0d205abf6b8e1ba443d4dd965118da364a1dc1cb3a26" + +EXTRA_OECONF += "ac_cv_path_PR_PROGRAM=${bindir}/pr --without-libsigsegv-prefix" + +# Fix "Argument list too long" error when len(TMPDIR) = 410 +acpaths = "-I ./m4" + +inherit ptest + +RDEPENDS_${PN}-ptest += "make perl" + +do_install_ptest() { + t=${D}${PTEST_PATH} + install -D ${S}/build-aux/test-driver $t/build-aux/test-driver + cp -r ${S}/tests $t/ + install ${B}/tests/Makefile $t/tests/ + 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' \ + -e 's|^Makefile:|_Makefile:|' \ + -e 's|bash|sh|' \ + -e 's|^top_srcdir = \(.*\)|top_srcdir = ..\/|' \ + -e 's|^srcdir = \(.*\)|srcdir = .|' \ + -e 's|"`$(built_programs)`"|diff|' \ + -e 's|gawk|awk|g' \ + -i $t/tests/Makefile +} diff --git a/meta/recipes-extended/ed/ed_0.5.bb b/meta/recipes-extended/ed/ed_0.5.bb deleted file mode 100644 index 143e636546..0000000000 --- a/meta/recipes-extended/ed/ed_0.5.bb +++ /dev/null @@ -1,21 +0,0 @@ -SUMMARY = "Line-oriented text editor" -HOMEPAGE = "http://www.gnu.org/software/ed/" -SECTION = "base" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=6ddd5335ef96fb858a138230af773710 \ - file://main.c;beginline=1;endline=17;md5=36d4b85e5ae9028e918d1cc775c2475e" - -PR = "r2" -SRC_URI = "${SAVANNAH_GNU_MIRROR}/ed/ed-${PV}.tar.bz2" - -SRC_URI[md5sum] = "4ee21e9dcc9b5b6012c23038734e1632" -SRC_URI[sha256sum] = "edef2bbde0fbf0d88232782a0eded323f483a0519d6fde9a3b1809056fd35f3e" - -inherit autotools texinfo - -EXTRA_OECONF = "'CC=${CC}' 'CXX=${CXX}' 'CFLAGS=${CFLAGS}' 'CXXFLAGS=${CXXFLAGS}' 'CPPFLAGS=${CPPFLAGS}' 'LDFLAGS=${LDFLAGS}'" - -CONFIGUREOPTS := "${@d.getVar('CONFIGUREOPTS', True).replace('--disable-dependency-tracking', ' ')}" -CONFIGUREOPTS := "${@d.getVar('CONFIGUREOPTS', True).replace('--disable-silent-rules', ' ')}" - - diff --git a/meta/recipes-extended/ed/ed_1.16.bb b/meta/recipes-extended/ed/ed_1.16.bb new file mode 100644 index 0000000000..f383007b59 --- /dev/null +++ b/meta/recipes-extended/ed/ed_1.16.bb @@ -0,0 +1,38 @@ +SUMMARY = "Line-oriented text editor" +HOMEPAGE = "http://www.gnu.org/software/ed/" + +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7 \ + file://ed.h;endline=20;md5=0226a8dd88c76afba773f2f0f7c83f5e \ + file://main.c;endline=17;md5=ebd4aff86dc9fa5027d55bc5191746b9 \ + " + +SECTION = "base" + +CVE_PRODUCT = "gnu:ed" + +# LSB states that ed should be in /bin/ +bindir = "${base_bindir}" + +# Upstream regularly removes previous releases from https://ftp.gnu.org/gnu/ed/ +SRC_URI = "${GNU_MIRROR}/ed/${BP}.tar.lz" +UPSTREAM_CHECK_URI = "${GNU_MIRROR}/ed/" + +SRC_URI[md5sum] = "ab480d982289064ca040bc5c75fceffd" +SRC_URI[sha256sum] = "cfc07a14ab048a758473ce222e784fbf031485bcd54a76f74acfee1f390d8b2c" + +EXTRA_OEMAKE = "-e MAKEFLAGS=" + +inherit texinfo + +do_configure() { + ${S}/configure +} + +do_install() { + oe_runmake 'DESTDIR=${D}' 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 +} diff --git a/meta/recipes-extended/ed/ed_1.9.bb b/meta/recipes-extended/ed/ed_1.9.bb deleted file mode 100644 index 8e94eedea6..0000000000 --- a/meta/recipes-extended/ed/ed_1.9.bb +++ /dev/null @@ -1,31 +0,0 @@ -SUMMARY = "Line-oriented text editor" -HOMEPAGE = "http://www.gnu.org/software/ed/" - -LICENSE = "GPLv3+" -LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \ - file://ed.h;endline=20;md5=375a20cc2545ac1115eeb7b323c60ae3 \ - file://main.c;endline=17;md5=14dbb325c1f2d4daf50e0aa5c5038e96" - -SECTION = "base" - -# LSB states that ed should be in /bin/ -bindir = "${base_bindir}" - -SRC_URI = "${GNU_MIRROR}/ed/ed-${PV}.tar.gz" - -SRC_URI[md5sum] = "565b6d1d5a9a8816b9b304fc4ed9405d" -SRC_URI[sha256sum] = "d5b372cfadf073001823772272fceac2cfa87552c5cd5a8efc1c8aae61f45a88" - -inherit texinfo - -do_configure() { - ${S}/configure -} - -do_install() { - oe_runmake 'DESTDIR=${D}' 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 -} diff --git a/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch b/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch index bf66267e81..75a3841f2d 100644 --- a/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch +++ b/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch @@ -1,3 +1,8 @@ +From afecc8791f904dc1893858d68a642b491356c74b Mon Sep 17 00:00:00 2001 +From: Tudor Florea <tudor.florea@enea.com> +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. @@ -5,15 +10,20 @@ Signed-off-by: Tudor Florea <tudor.florea@enea.com> Upstream-Status: Inappropriate (default automake behavior incompatible with ptest) -diff -ruN a/configure.ac b/configure.ac ---- a/configure.ac 2014-05-28 18:19:13.513980977 +0200 -+++ b/configure.ac 2014-05-28 18:19:21.129660215 +0200 -@@ -2,7 +2,7 @@ - AC_INIT(ethtool, 3.14, netdev@vger.kernel.org) +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 19223f7..8a58d15 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.8, netdev@vger.kernel.org) AC_PREREQ(2.52) AC_CONFIG_SRCDIR([ethtool.c]) --AM_INIT_AUTOMAKE([gnu]) -+AM_INIT_AUTOMAKE([gnu serial-tests]) +-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/recipes-extended/ethtool/ethtool_4.0.bb b/meta/recipes-extended/ethtool/ethtool_5.8.bb index 13f2b1cf56..0403f0e3a9 100644 --- a/meta/recipes-extended/ethtool/ethtool_4.0.bb +++ b/meta/recipes-extended/ethtool/ethtool_5.8.bb @@ -11,12 +11,17 @@ SRC_URI = "${KERNELORG_MIRROR}/software/network/ethtool/ethtool-${PV}.tar.gz \ file://avoid_parallel_tests.patch \ " -SRC_URI[md5sum] = "0a1c78787c7dcf077016ed86372a472f" -SRC_URI[sha256sum] = "e200516727cc9583e8b63fd6e72f667f9ed41bb4f0577ff4803b60c64cfd1dbc" +SRC_URI[sha256sum] = "91e8bbda48a7fd5d374efacca542364ceb3a6c1f286f024b64ec40ccc799e125" + +UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/software/network/ethtool/" + +inherit autotools ptest bash-completion pkgconfig -inherit autotools ptest RDEPENDS_${PN}-ptest += "make" +PACKAGECONFIG ?= "netlink" +PACKAGECONFIG[netlink] = "--enable-netlink,--disable-netlink,libmnl," + do_compile_ptest() { oe_runmake buildtest-TESTS } @@ -24,7 +29,9 @@ do_compile_ptest() { do_install_ptest () { cp ${B}/Makefile ${D}${PTEST_PATH} install ${B}/test-cmdline ${D}${PTEST_PATH} - install ${B}/test-features ${D}${PTEST_PATH} + if ${@bb.utils.contains('PACKAGECONFIG', 'netlink', 'false', 'true', d)}; then + install ${B}/test-features ${D}${PTEST_PATH} + fi install ${B}/ethtool ${D}${PTEST_PATH}/ethtool sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/Makefile } diff --git a/meta/recipes-extended/findutils/findutils-4.2.31/findutils-fix-doc-build-error.patch b/meta/recipes-extended/findutils/findutils-4.2.31/findutils-fix-doc-build-error.patch deleted file mode 100644 index 2076e44097..0000000000 --- a/meta/recipes-extended/findutils/findutils-4.2.31/findutils-fix-doc-build-error.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 33cba24cba7b0973a702e9627bd5b93962948ae4 Mon Sep 17 00:00:00 2001 -From: Jackie Huang <jackie.huang@windriver.com> -Date: Tue, 17 Sep 2013 16:11:16 +0800 -Subject: [PATCH] findutils: fix doc build error - -Upstream-Status: Backport - -Signed-off-by: Jackie Huang <jackie.huang@windriver.com> ---- - doc/find.texi | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/doc/find.texi b/doc/find.texi -index 5b5f0cf..b3d9c6b 100644 ---- a/doc/find.texi -+++ b/doc/find.texi -@@ -63,7 +63,7 @@ translation approved by the Foundation. - - @page - @vskip 0pt plus 1filll --@insertcopying{} -+@insertcopying - @end titlepage - - @contents -@@ -1466,6 +1466,7 @@ no output is ever sent to it. - * Escapes:: - * Format Directives:: - * Time Formats:: -+* Formatting Flags:: - @end menu - - @node Escapes -@@ -1534,7 +1535,6 @@ from the novel you are reading. - * Size Directives:: - * Location Directives:: - * Time Directives:: --* Formatting Flags:: - @end menu - - @node Name Directives -@@ -1780,7 +1780,7 @@ setting the TZ environment variable). This is a GNU extension. - @end table - - @node Formatting Flags --@subsubsection Formatting Flags -+@subsection Formatting Flags - - The @samp{%m} and @samp{%d} directives support the @samp{#}, @samp{0} - and @samp{+} flags, but the other directives do not, even if they --- -1.7.4.1 - diff --git a/meta/recipes-extended/findutils/findutils-4.2.31/findutils_fix_for_automake-1.12.patch b/meta/recipes-extended/findutils/findutils-4.2.31/findutils_fix_for_automake-1.12.patch deleted file mode 100644 index 2d0ddb43f5..0000000000 --- a/meta/recipes-extended/findutils/findutils-4.2.31/findutils_fix_for_automake-1.12.patch +++ /dev/null @@ -1,23 +0,0 @@ -Upstream-Status: Pending - -automake 1.12 has depricated automatic de-ANSI-fication support - -this patch avoids these kinds of errors: - -| configure.in:75: error: automatic de-ANSI-fication support has been removed - -Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> -2012/05/04 - -Index: findutils-4.2.31/configure.in -=================================================================== ---- findutils-4.2.31.orig/configure.in -+++ findutils-4.2.31/configure.in -@@ -72,7 +72,6 @@ dnl gl_EARLY calls AC_GNU_SOURCE anyway. - - - AC_ISC_POSIX --AM_C_PROTOTYPES - - AC_PROG_INSTALL - AC_PROG_RANLIB diff --git a/meta/recipes-extended/findutils/findutils-4.2.31/gnulib-extension.patch b/meta/recipes-extended/findutils/findutils-4.2.31/gnulib-extension.patch deleted file mode 100644 index 65bd64277c..0000000000 --- a/meta/recipes-extended/findutils/findutils-4.2.31/gnulib-extension.patch +++ /dev/null @@ -1,56 +0,0 @@ -Upstream-Status: Inappropriate [legacy version] - -the old AC_USE_SYSTEM_EXTENSIONS won't work with AC_GNU_SOURCE - -against 4.2.31 -07/08/2010 - qhe - -diff --git a/gnulib/m4/extensions.m4 b/gnulib/m4/extensions.m4 -index 143a9e5..0f27ceb 100644 ---- a/gnulib/m4/extensions.m4 -+++ b/gnulib/m4/extensions.m4 -@@ -12,44 +12,6 @@ - # enough in this area it's likely we'll need to redefine - # AC_USE_SYSTEM_EXTENSIONS for quite some time. - --# AC_USE_SYSTEM_EXTENSIONS --# ------------------------ --# Enable extensions on systems that normally disable them, --# typically due to standards-conformance issues. --AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], --[ -- AC_BEFORE([$0], [AC_COMPILE_IFELSE]) -- AC_BEFORE([$0], [AC_RUN_IFELSE]) -- -- AC_REQUIRE([AC_GNU_SOURCE]) -- AC_REQUIRE([AC_AIX]) -- AC_REQUIRE([AC_MINIX]) -- -- AH_VERBATIM([__EXTENSIONS__], --[/* Enable extensions on Solaris. */ --#ifndef __EXTENSIONS__ --# undef __EXTENSIONS__ --#endif --#ifndef _POSIX_PTHREAD_SEMANTICS --# undef _POSIX_PTHREAD_SEMANTICS --#endif --#ifndef _TANDEM_SOURCE --# undef _TANDEM_SOURCE --#endif]) -- AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], -- [ac_cv_safe_to_define___extensions__], -- [AC_COMPILE_IFELSE( -- [AC_LANG_PROGRAM([ --# define __EXTENSIONS__ 1 -- AC_INCLUDES_DEFAULT])], -- [ac_cv_safe_to_define___extensions__=yes], -- [ac_cv_safe_to_define___extensions__=no])]) -- test $ac_cv_safe_to_define___extensions__ = yes && -- AC_DEFINE([__EXTENSIONS__]) -- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) -- AC_DEFINE([_TANDEM_SOURCE]) --]) -- - # gl_USE_SYSTEM_EXTENSIONS - # ------------------------ - # Enable extensions on systems that normally disable them, diff --git a/meta/recipes-extended/findutils/findutils.inc b/meta/recipes-extended/findutils/findutils.inc index 37c84cc59b..9aa7239825 100644 --- a/meta/recipes-extended/findutils/findutils.inc +++ b/meta/recipes-extended/findutils/findutils.inc @@ -6,19 +6,11 @@ HOMEPAGE = "http://www.gnu.org/software/findutils/" BUGTRACKER = "http://savannah.gnu.org/bugs/?group=findutils" SECTION = "console/utils" - -SRC_URI = "ftp://alpha.gnu.org/gnu/${BPN}/${BP}.tar.gz" +SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.xz" inherit autotools gettext texinfo update-alternatives ALTERNATIVE_${PN} = "find xargs" ALTERNATIVE_PRIORITY = "100" -# diffutils assumes non-glibc compilation with uclibc and -# this causes it to generate its own implementations of -# standard functionality. regex.c actually breaks compilation -# because it uses __mempcpy, there are other things (TBD: -# see diffutils.mk in buildroot) -EXTRA_OECONF_libc-uclibc = "--without-included-regex" - BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-extended/findutils/findutils/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/findutils/findutils/0001-Unset-need_charset_alias-when-building-for-musl.patch deleted file mode 100644 index 85d243baf3..0000000000 --- a/meta/recipes-extended/findutils/findutils/0001-Unset-need_charset_alias-when-building-for-musl.patch +++ /dev/null @@ -1,30 +0,0 @@ -From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 13 Apr 2015 17:02:13 -0700 -Subject: [PATCH] Unset need_charset_alias when building for musl - -localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 -which actually shoudl be fixed in gnulib and then all downstream -projects will get it eventually. For now we apply the fix to -coreutils - -Upstream-Status: Not Required - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - lib/gnulib.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: findutils-4.5.14/gl/lib/Makefile.am -=================================================================== ---- findutils-4.5.14.orig/gl/lib/Makefile.am -+++ findutils-4.5.14/gl/lib/Makefile.am -@@ -1220,7 +1220,7 @@ install-exec-localcharset: all-local - case '$(host_os)' in \ - darwin[56]*) \ - need_charset_alias=true ;; \ -- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ -+ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ - need_charset_alias=false ;; \ - *) \ - need_charset_alias=true ;; \ diff --git a/meta/recipes-extended/findutils/findutils_4.2.31.bb b/meta/recipes-extended/findutils/findutils_4.2.31.bb deleted file mode 100644 index 7dee018834..0000000000 --- a/meta/recipes-extended/findutils/findutils_4.2.31.bb +++ /dev/null @@ -1,14 +0,0 @@ -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" -PR = "r4" - -require findutils.inc - -SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \ - file://gnulib-extension.patch \ - file://findutils_fix_for_automake-1.12.patch \ - file://findutils-fix-doc-build-error.patch \ - " - -SRC_URI[md5sum] = "a0e31a0f18a49709bf5a449867c8049a" -SRC_URI[sha256sum] = "e0d34b8faca0b3cca0703f6c6b498afbe72f0ba16c35980c10ec9ef7724d6204" diff --git a/meta/recipes-extended/findutils/findutils_4.5.14.bb b/meta/recipes-extended/findutils/findutils_4.5.14.bb deleted file mode 100644 index a58a82f0e5..0000000000 --- a/meta/recipes-extended/findutils/findutils_4.5.14.bb +++ /dev/null @@ -1,17 +0,0 @@ -require findutils.inc - -# GPLv2+ (<< 4.2.32), GPLv3+ (>= 4.2.32) -LICENSE = "GPLv3+" -LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949" - -DEPENDS = "bison-native" - -SRC_URI += "file://0001-Unset-need_charset_alias-when-building-for-musl.patch" - -SRC_URI[md5sum] = "a8a8176282fd28e8d1234c84d847fa66" -SRC_URI[sha256sum] = "0de3cf625a5c9f154eee3171e072515ffdde405244dd00502af617ac57b73ae2" - -# http://savannah.gnu.org/bugs/?27299 -CACHED_CONFIGUREVARS += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-posix-clang-wchar', 'gl_cv_func_wcwidth_works=yes', '', d)}" - -EXTRA_OECONF += "ac_cv_path_SORT=${bindir}/sort" diff --git a/meta/recipes-extended/findutils/findutils_4.7.0.bb b/meta/recipes-extended/findutils/findutils_4.7.0.bb new file mode 100644 index 0000000000..59688e528a --- /dev/null +++ b/meta/recipes-extended/findutils/findutils_4.7.0.bb @@ -0,0 +1,15 @@ +require findutils.inc + +# GPLv2+ (<< 4.2.32), GPLv3+ (>= 4.2.32) +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464" + +DEPENDS = "bison-native" + +SRC_URI[md5sum] = "731356dec4b1109b812fecfddfead6b2" +SRC_URI[sha256sum] = "c5fefbdf9858f7e4feb86f036e1247a54c79fc2d8e4b7064d5aaa1f47dfa789a" + +# http://savannah.gnu.org/bugs/?27299 +CACHED_CONFIGUREVARS += "gl_cv_func_wcwidth_works=yes" + +EXTRA_OECONF += "ac_cv_path_SORT=${bindir}/sort" diff --git a/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb b/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb deleted file mode 100644 index 790c98138b..0000000000 --- a/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb +++ /dev/null @@ -1,37 +0,0 @@ -SUMMARY = "OpenPrinting printer support - filters" -DESCRIPTION = "Foomatic is a printer database designed to make it easier to set up \ -common printers for use with UNIX-like operating systems.\ -It provides the "glue" between a print spooler (like CUPS or lpr) and \ -the printer, by processing files sent to the printer. \ - \ -This package consists of filters used by the printer spoolers \ -to convert the incoming PostScript data into the printer's native \ -format using a printer-specific, but spooler-independent PPD file. \ -" - -DEPENDS += "cups perl libxml2" -PR = "r1" - -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://${WORKDIR}/foomatic-filters-${PV}/COPYING;md5=393a5ca445f6965873eca0259a17f833" - -SRC_URI = "http://www.openprinting.org/download/foomatic/foomatic-filters-${PV}.tar.gz" - -SRC_URI[md5sum] = "b05f5dcbfe359f198eef3df5b283d896" -SRC_URI[sha256sum] = "a2e2e53e502571e88eeb9010c45a0d54671f15707ee104f5c9c22b59ea7a33e3" - -inherit autotools pkgconfig - -EXTRA_OECONF += "--disable-file-converter-check --with-file-converter=texttops" - -do_configure_prepend() { - export PERL="${bindir}/env perl" - export CUPS_SERVERBIN=${exec_prefix}/lib/cups # /usr/lib NOT libdir -} - -do_install_append_linuxstdbase() { - install -d ${D}${exec_prefix}/lib/cups/filter - ln -sf ${bindir}/foomatic-rip ${D}${exec_prefix}/lib/cups/filter -} - -FILES_${PN} += "${exec_prefix}/lib/cups/ ${exec_prefix}/lib/ppr/" diff --git a/meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch b/meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch deleted file mode 100644 index b3e7987cef..0000000000 --- a/meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch +++ /dev/null @@ -1,41 +0,0 @@ -Upstream-Status: Pending - -automake 1.12 has depricated automatic de-ANSI-fication support - -this patch avoids these kinds of errors: - -| configure.ac:127: error: automatic de-ANSI-fication support has been removed -| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12/protos.m4:12: AM_C_PROTOTYPES is expanded from... -| configure.ac:127: the top level -| autom4te: m4 failed with exit status: 1 -... -| Makefile.am:27: error: automatic de-ANSI-fication support has been removed - -Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> -2012/05/04 - -Index: gawk-3.1.5/configure.ac -=================================================================== ---- gawk-3.1.5.orig/configure.ac -+++ gawk-3.1.5/configure.ac -@@ -124,7 +124,6 @@ fi - - dnl check for C compiler for automake - AM_PROG_CC_STDC --AM_C_PROTOTYPES - - dnl Cygwin doesn't like to get libs with full paths - dnl since that overrides linking against DLLs. -Index: gawk-3.1.5/Makefile.am -=================================================================== ---- gawk-3.1.5.orig/Makefile.am -+++ gawk-3.1.5/Makefile.am -@@ -24,7 +24,7 @@ - ## process this file with automake to produce Makefile.in - - # Automatic de-ANSI-fication if needed, make .bz2 files also. --AUTOMAKE_OPTIONS = ansi2knr dist-bzip2 -+AUTOMAKE_OPTIONS = dist-bzip2 - - # This undocumented variable insures that aclocal runs - # correctly after changing configure.ac diff --git a/meta/recipes-extended/gawk/gawk-4.1.3/run-ptest b/meta/recipes-extended/gawk/gawk-4.1.3/run-ptest deleted file mode 100644 index d23f0bf6d7..0000000000 --- a/meta/recipes-extended/gawk/gawk-4.1.3/run-ptest +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -cd test -for i in `grep -vE "@|^$|#|Gt-dummy" Maketests |awk -F: '{print $1}'`; \ - do LC_ALL=${GAWKLOCALE:-C} LANG=${GAWKLOCALE:-C} srcdir=`pwd` AWK=gawk CMP=cmp \ - make -f Maketests $i >$i.tmp 2>&1; \ - grep -q "Error" $i.tmp; \ - if [ $? -eq 0 ]; then echo "FAIL: $i"; \ - else echo "PASS: $i"; rm -f $i.tmp; fi; \ -done diff --git a/meta/recipes-extended/gawk/gawk/run-ptest b/meta/recipes-extended/gawk/gawk/run-ptest new file mode 100644 index 0000000000..f67a95874f --- /dev/null +++ b/meta/recipes-extended/gawk/gawk/run-ptest @@ -0,0 +1,22 @@ +#!/bin/sh + +cd test +for i in `grep -E "^[a-z0-9_-]*:$" Maketests |awk -F: '{print $1}'`; do + #LC_ALL=${GAWKLOCALE:-C} LANG=${GAWKLOCALE:-C} + srcdir=`pwd` AWKPROG=gawk AWK=gawk CMP=cmp make -f Maketests $i >$i.tmp 2>&1 + if [ -e _$i ]; then + cat _$i + grep -q "support not compiled in" _$i + if [ $? -eq 0 ]; then + echo "SKIP: $i" + continue + fi + fi + grep -q "Error" $i.tmp + if [ $? -eq 0 ]; then + echo "FAIL: $i" + else + echo "PASS: $i" + rm -f $i.tmp + fi +done diff --git a/meta/recipes-extended/gawk/gawk_3.1.5.bb b/meta/recipes-extended/gawk/gawk_3.1.5.bb deleted file mode 100644 index c7af4a9b72..0000000000 --- a/meta/recipes-extended/gawk/gawk_3.1.5.bb +++ /dev/null @@ -1,42 +0,0 @@ -SUMMARY = "GNU awk text processing utility" -DESCRIPTION = "The GNU version of awk, a text processing utility. \ -Awk interprets a special-purpose programming language to do \ -quick and easy text pattern matching and reformatting jobs." -HOMEPAGE = "www.gnu.org/software/gawk" -BUGTRACKER = "bug-gawk@gnu.org" -SECTION = "console/utils" - -# gawk <= 3.1.5: GPLv2 -# gawk >= 3.1.6: GPLv3 -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" - -RDEPENDS_gawk += "gawk-common" -RDEPENDS_pgawk += "gawk-common" -PR = "r2" - -SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \ - file://gawk-3.1.5_fix_for_automake-1.12.patch" - -SRC_URI[md5sum] = "4760325489479cac17fe0114b8f62f30" -SRC_URI[sha256sum] = "463dcb9d0ca398b1d4f5a332f6cd9cec56441265fca616f2ea1b44d459e9f0f8" - -inherit autotools gettext texinfo update-alternatives - -PACKAGES += "gawk-common pgawk" - -FILES_${PN} = "${bindir}/gawk* ${bindir}/igawk" -FILES_gawk-common += "${datadir}/awk/* ${libdir}/gawk/awk/*" -FILES_pgawk = "${bindir}/pgawk*" -FILES_${PN}-dbg += "${libdir}/gawk/awk/.debug" - -ALTERNATIVE_${PN} = "awk" -ALTERNATIVE_TARGET[awk] = "${bindir}/gawk" -ALTERNATIVE_PRIORITY = "100" - -CFLAGS += "-D PROTOTYPES" - -do_install_append() { - # remove the link since we don't package it - rm ${D}${bindir}/awk -} diff --git a/meta/recipes-extended/gawk/gawk_4.1.3.bb b/meta/recipes-extended/gawk/gawk_5.1.0.bb index d1a88e45a9..0d005cd43b 100644 --- a/meta/recipes-extended/gawk/gawk_4.1.3.bb +++ b/meta/recipes-extended/gawk/gawk_5.1.0.bb @@ -11,22 +11,21 @@ SECTION = "console/utils" LICENSE = "GPLv3" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" -DEPENDS += "readline" - +PACKAGECONFIG ??= "readline" +PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr" SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \ file://run-ptest \ " -SRC_URI[md5sum] = "55d37f4069502677f25d1340df8eec97" -SRC_URI[sha256sum] = "524effa5b9ecd4ed940f2581c5d3c1df4e4bd7e6f768aa033c1916f47dfc6e29" +SRC_URI[md5sum] = "f719bc9966df28e67fc6ebc405e7ea03" +SRC_URI[sha256sum] = "03a0360edcd84bec156fe211bbc4fc8c78790973ce4e8b990a11d778d40b1a26" inherit autotools gettext texinfo update-alternatives FILES_${PN} += "${datadir}/awk" FILES_${PN}-dev += "${libdir}/${BPN}/*.la" -FILES_${PN}-dbg += "${libexecdir}/awk/.debug" ALTERNATIVE_${PN} = "awk" ALTERNATIVE_TARGET[awk] = "${bindir}/gawk" @@ -41,7 +40,16 @@ inherit ptest do_install_ptest() { mkdir ${D}${PTEST_PATH}/test - for i in `grep -vE "@|^$|#|Gt-dummy" ${S}/test/Maketests |awk -F: '{print $1}'` Maketests; \ + ln -s ${bindir}/gawk ${D}${PTEST_PATH}/gawk + for i in `grep -vE "@|^$|#|Gt-dummy" ${S}/test/Maketests |awk -F: '{print $1}'` Maketests inclib.awk; \ do cp ${S}/test/$i* ${D}${PTEST_PATH}/test; \ done + sed -i -e 's|/usr/local/bin|${bindir}|g' \ + -e 's|#!${base_bindir}/awk|#!${bindir}/awk|g' ${D}${PTEST_PATH}/test/*.awk + + sed -i -e "s|GAWKLOCALE|LANG|g" ${D}${PTEST_PATH}/test/Maketests } + +RDEPENDS_${PN}-ptest += "make" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch b/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch new file mode 100644 index 0000000000..a9afb9948c --- /dev/null +++ b/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch @@ -0,0 +1,31 @@ +From 2adaa7366064a8f18af864eda74e52877a89620c Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Mon, 18 Jan 2016 01:00:30 -0500 +Subject: [PATCH] configure.ac: do not check local png source + +In oe-core, it did not need to compile local libpng +source in ghostscript, so do not check local png +source, and directly check the existance of shared +libpng library. + +Upstream-Status: Inappropriate [OE-Core specific] + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> + +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 698abd3..e65ac8b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1241,7 +1241,7 @@ else + PNGDEVS='' + PNGDEVS_ALL='png48 png16m pnggray pngmono pngmonod png256 png16 pngalpha' + AC_MSG_CHECKING([for local png library source]) +- if test -f $srcdir/libpng/pngread.c; then ++ if false; then + AC_MSG_RESULT([yes]) + SHARE_LIBPNG=0 + LIBPNGDIR=$srcdir/libpng diff --git a/meta/recipes-extended/ghostscript/ghostscript/CVE-2020-15900.patch b/meta/recipes-extended/ghostscript/ghostscript/CVE-2020-15900.patch new file mode 100644 index 0000000000..d7c5f034e5 --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/CVE-2020-15900.patch @@ -0,0 +1,54 @@ +From 5d499272b95a6b890a1397e11d20937de000d31b Mon Sep 17 00:00:00 2001 +From: Ray Johnston <ray.johnston@artifex.com> +Date: Wed, 22 Jul 2020 09:57:54 -0700 +Subject: [PATCH] Bug 702582, CVE 2020-15900 Memory Corruption in Ghostscript + 9.52 + +Fix the 'rsearch' calculation for the 'post' size to give the correct +size. Previous calculation would result in a size that was too large, +and could underflow to max uint32_t. Also fix 'rsearch' to return the +correct 'pre' string with empty string match. + +A future change may 'undefine' this undocumented, non-standard operator +during initialization as we do with the many other non-standard internal +PostScript operators and procedures. + +Upstream-Status: Backport [https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=5d499272b95a6b890a1397e11d20937de000d31b] +CVE: CVE-2020-15900 +Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> +--- + psi/zstring.c | 17 +++++++++++------ + 1 file changed, 11 insertions(+), 6 deletions(-) + +diff --git a/psi/zstring.c b/psi/zstring.c +index 33662dafa..58e1af2b3 100644 +--- a/psi/zstring.c ++++ b/psi/zstring.c +@@ -142,13 +142,18 @@ search_impl(i_ctx_t *i_ctx_p, bool forward) + return 0; + found: + op->tas.type_attrs = op1->tas.type_attrs; +- op->value.bytes = ptr; +- r_set_size(op, size); ++ op->value.bytes = ptr; /* match */ ++ op->tas.rsize = size; /* match */ + push(2); +- op[-1] = *op1; +- r_set_size(op - 1, ptr - op[-1].value.bytes); +- op1->value.bytes = ptr + size; +- r_set_size(op1, count + (!forward ? (size - 1) : 0)); ++ op[-1] = *op1; /* pre */ ++ op[-3].value.bytes = ptr + size; /* post */ ++ if (forward) { ++ op[-1].tas.rsize = ptr - op[-1].value.bytes; /* pre */ ++ op[-3].tas.rsize = count; /* post */ ++ } else { ++ op[-1].tas.rsize = count; /* pre */ ++ op[-3].tas.rsize -= count + size; /* post */ ++ } + make_true(op); + return 0; + } +-- +2.17.1 + diff --git a/meta/recipes-extended/ghostscript/ghostscript/aarch64/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/aarch64/objarch.h deleted file mode 100644 index a05de29def..0000000000 --- a/meta/recipes-extended/ghostscript/ghostscript/aarch64/objarch.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Parameters derived from machine and compiler architecture. */ -/* This file is generated mechanically by genarch.c. */ - - /* ---------------- Scalar alignments ---------------- */ - -#define ARCH_ALIGN_SHORT_MOD 2 -#define ARCH_ALIGN_INT_MOD 4 -#define ARCH_ALIGN_LONG_MOD 8 -#define ARCH_ALIGN_PTR_MOD 8 -#define ARCH_ALIGN_FLOAT_MOD 4 -#define ARCH_ALIGN_DOUBLE_MOD 8 - - /* ---------------- Scalar sizes ---------------- */ - -#define ARCH_LOG2_SIZEOF_CHAR 0 -#define ARCH_LOG2_SIZEOF_SHORT 1 -#define ARCH_LOG2_SIZEOF_INT 2 -#define ARCH_LOG2_SIZEOF_LONG 3 -#define ARCH_LOG2_SIZEOF_LONG_LONG 3 -#define ARCH_SIZEOF_GX_COLOR_INDEX 8 -#define ARCH_SIZEOF_PTR 8 -#define ARCH_SIZEOF_FLOAT 4 -#define ARCH_SIZEOF_DOUBLE 8 -#define ARCH_FLOAT_MANTISSA_BITS 24 -#define ARCH_DOUBLE_MANTISSA_BITS 53 - - /* ---------------- Unsigned max values ---------------- */ - -#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) -#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) -#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) -#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) - - /* ---------------- Miscellaneous ---------------- */ - -#define ARCH_IS_BIG_ENDIAN 0 -#define ARCH_PTRS_ARE_SIGNED 0 -#define ARCH_FLOATS_ARE_IEEE 1 -#define ARCH_ARITH_RSHIFT 2 -#define ARCH_DIV_NEG_POS_TRUNCATES 1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/arm/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/arm/objarch.h deleted file mode 100644 index e8772cd958..0000000000 --- a/meta/recipes-extended/ghostscript/ghostscript/arm/objarch.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Parameters derived from machine and compiler architecture. */ -/* This file is generated mechanically by genarch.c. */ - - /* ---------------- Scalar alignments ---------------- */ - -#define ARCH_ALIGN_SHORT_MOD 2 -#define ARCH_ALIGN_INT_MOD 4 -#define ARCH_ALIGN_LONG_MOD 4 -#define ARCH_ALIGN_PTR_MOD 4 -#define ARCH_ALIGN_FLOAT_MOD 4 -#define ARCH_ALIGN_DOUBLE_MOD 8 - - /* ---------------- Scalar sizes ---------------- */ - -#define ARCH_LOG2_SIZEOF_CHAR 0 -#define ARCH_LOG2_SIZEOF_SHORT 1 -#define ARCH_LOG2_SIZEOF_INT 2 -#define ARCH_LOG2_SIZEOF_LONG 2 -#define ARCH_LOG2_SIZEOF_LONG_LONG 3 -#define ARCH_SIZEOF_GX_COLOR_INDEX 8 -#define ARCH_SIZEOF_PTR 4 -#define ARCH_SIZEOF_FLOAT 4 -#define ARCH_SIZEOF_DOUBLE 8 -#define ARCH_FLOAT_MANTISSA_BITS 24 -#define ARCH_DOUBLE_MANTISSA_BITS 53 - - /* ---------------- Unsigned max values ---------------- */ - -#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) -#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) -#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) -#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) - - /* ---------------- Miscellaneous ---------------- */ - -#define ARCH_IS_BIG_ENDIAN 0 -#define ARCH_PTRS_ARE_SIGNED 0 -#define ARCH_FLOATS_ARE_IEEE 1 -#define ARCH_ARITH_RSHIFT 2 -#define ARCH_DIV_NEG_POS_TRUNCATES 1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/armeb/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/armeb/objarch.h deleted file mode 100644 index 359097f356..0000000000 --- a/meta/recipes-extended/ghostscript/ghostscript/armeb/objarch.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Parameters derived from machine and compiler architecture. */ -/* This file is generated mechanically by genarch.c. */ - - /* ---------------- Scalar alignments ---------------- */ - -#define ARCH_ALIGN_SHORT_MOD 2 -#define ARCH_ALIGN_INT_MOD 4 -#define ARCH_ALIGN_LONG_MOD 4 -#define ARCH_ALIGN_PTR_MOD 4 -#define ARCH_ALIGN_FLOAT_MOD 4 -#define ARCH_ALIGN_DOUBLE_MOD 8 - - /* ---------------- Scalar sizes ---------------- */ - -#define ARCH_LOG2_SIZEOF_CHAR 0 -#define ARCH_LOG2_SIZEOF_SHORT 1 -#define ARCH_LOG2_SIZEOF_INT 2 -#define ARCH_LOG2_SIZEOF_LONG 2 -#define ARCH_LOG2_SIZEOF_LONG_LONG 3 -#define ARCH_SIZEOF_GX_COLOR_INDEX 8 -#define ARCH_SIZEOF_PTR 4 -#define ARCH_SIZEOF_FLOAT 4 -#define ARCH_SIZEOF_DOUBLE 8 -#define ARCH_FLOAT_MANTISSA_BITS 24 -#define ARCH_DOUBLE_MANTISSA_BITS 53 - - /* ---------------- Unsigned max values ---------------- */ - -#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) -#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) -#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) -#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) - - /* ---------------- Miscellaneous ---------------- */ - -#define ARCH_IS_BIG_ENDIAN 1 -#define ARCH_PTRS_ARE_SIGNED 0 -#define ARCH_FLOATS_ARE_IEEE 1 -#define ARCH_ARITH_RSHIFT 2 -#define ARCH_DIV_NEG_POS_TRUNCATES 1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch b/meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch new file mode 100644 index 0000000000..e8cb16c36b --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch @@ -0,0 +1,33 @@ +From 0ccbaa134093bf6afc79f2d20d061bca5a8754ed Mon Sep 17 00:00:00 2001 +From: Kai Kang <kai.kang@windriver.com> +Date: Thu, 29 Mar 2018 16:02:05 +0800 +Subject: [PATCH 04/10] avoid host contamination + +Remove hardcode path refer to host to avoid host contamination. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Kai Kang <kai.kang@windriver.com> + +Rebase to 9.23 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + devices/devs.mak | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/devices/devs.mak b/devices/devs.mak +index 846aa50..9570182 100644 +--- a/devices/devs.mak ++++ b/devices/devs.mak +@@ -393,7 +393,7 @@ $(DEVOBJ)gdevxalt.$(OBJ) : $(DEVSRC)gdevxalt.c $(GDEVX) $(math__h) $(memory__h)\ + ### NON PORTABLE, ONLY UNIX WITH GCC SUPPORT + + $(DEVOBJ)X11.so : $(x11alt_) $(x11_) $(DEVS_MAK) $(MAKEDIRS) +- $(CCLD) $(LDFLAGS) -shared -o $(DEVOBJ)X11.so $(x11alt_) $(x11_) -L/usr/X11R6/lib -lXt -lSM -lICE -lXext -lX11 $(XLIBDIRS) ++ $(CCLD) $(LDFLAGS) -shared -o $(DEVOBJ)X11.so $(x11alt_) $(x11_) -lXt -lSM -lICE -lXext -lX11 $(XLIBDIRS) + + ###### --------------- Memory-buffered printer devices --------------- ###### + +-- +1.8.3.1 + diff --git a/meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch b/meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch index d97d4ecd7d..7d80066a80 100644 --- a/meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch +++ b/meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch @@ -1,4 +1,8 @@ -base/genht.c: add a preprocessor define to allow fopen calling +From 9ca6f795409b988d38dd98bc2a6ecb68a9392312 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Thu, 29 Mar 2018 16:37:40 +0800 +Subject: [PATCH 10/10] base/genht.c: add a preprocessor define to allow fopen + calling The commit in upstream: http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=773c69e46e70bdd5482676437dafd2ca83397643 @@ -7,17 +11,19 @@ Replace all fopen calls with gp_fopen and add a preprocessor define so that any unintential calls directly to fopen will cause an error. Only exceptions are those in the platform specific code, and mkromfs.c. -This patch add a preprocessor define to allow fopen calling in base/genht.c. +This patch add a preprocessor define to allow fopen calling in +base/genht.c. Upstream-Status: Pending +Rebase to 9.23 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- base/genht.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/base/genht.c b/base/genht.c -index 4b04085..cc82fff 100644 +index e597e72..e96bfb5 100644 --- a/base/genht.c +++ b/base/genht.c @@ -16,6 +16,10 @@ @@ -32,5 +38,5 @@ index 4b04085..cc82fff 100644 #include "string_.h" #include "gscdefs.h" -- -1.8.1.2 +1.8.3.1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch b/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch index a1c9368cc9..4c9bb22fa2 100644 --- a/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch +++ b/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch @@ -1,6 +1,12 @@ -Subject: [PATCH] Don't build-depend on libgcrypt, as nothing is used from it +From 9129eb7fa9dc160d64a7d9df9279a3b1dae4d793 Mon Sep 17 00:00:00 2001 +From: Jackie Huang <jackie.huang@windriver.com> +Date: Thu, 29 Mar 2018 16:16:18 +0800 +Subject: [PATCH 08/10] cups no gcrypt -Backported from http://www.cups.org/strfiles.php/3308/cups-no-gcrypt.patch +Don't build-depend on libgcrypt, as nothing is used from it + +Backported from +http://www.cups.org/strfiles.php/3308/cups-no-gcrypt.patch This addresses the cryto dependency seen during build. @@ -8,7 +14,7 @@ Upstream-Status: Backport Signed-off-by: Jackie Huang <jackie.huang@windriver.com> -Rebase the patch to ghostscript-9.15 +Rebase to 9.23 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- cups/libs/cups/http-private.h | 1 - @@ -27,5 +33,5 @@ index 99a85c3..a674852 100644 # include <CoreFoundation/CoreFoundation.h> # include <Security/Security.h> -- -1.9.1 +1.8.3.1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch deleted file mode 100644 index e28a949bf7..0000000000 --- a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch +++ /dev/null @@ -1,28 +0,0 @@ -Import patch from windriver linux for cross compilation, and split patches -into oe way under different directories such as i586, powerpc etc according -to Richard's opinion. - -Upstream-Status: Pending - -Signed-off-by: Kang Kai <kai.kang@windriver.com> -Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> - -# Author: Chi Xu <chi.xu@windriver.com> -# Date: Feb 26 2010 -# Summary: Generate arch.h for ppc32 -# - -diff -Nru ghostscript-8.64.orig/base/lib.mak ghostscript-8.64/base/lib.mak ---- ghostscript-8.64.orig/base/lib.mak 2010-02-10 10:30:02.000000000 +0800 -+++ ghostscript-8.64/base/lib.mak 2010-02-10 10:56:21.000000000 +0800 -@@ -67,8 +67,8 @@ - stdpre_h=$(GLSRC)stdpre.h $(stdpn_h) - stdint__h=$(GLSRC)stdint_.h $(std_h) - --$(GLGEN)arch.h : $(GENARCH_XE) -- $(EXP)$(GENARCH_XE) $(GLGEN)arch.h $(TARGET_ARCH_FILE) -+##$(GLGEN)arch.h : $(GENARCH_XE) -+## $(EXP)$(GENARCH_XE) $(GLGEN)arch.h $(TARGET_ARCH_FILE) - - # Platform interfaces - diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-prevent_recompiling.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-prevent_recompiling.patch deleted file mode 100644 index bc29be5070..0000000000 --- a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-prevent_recompiling.patch +++ /dev/null @@ -1,100 +0,0 @@ -ust use commands provided by ghostscript-native, preventing recompile them when -compile ghostscript. -Way to enable cross compile. - -Upstream-Status: Pending - -Signed-off-by: Kang Kai <kai.kang@windriver.com> -Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> - -diff --git a/base/unix-aux.mak b/base/unix-aux.mak -index a91fb26..c991d11 100644 ---- a/base/unix-aux.mak -+++ b/base/unix-aux.mak -@@ -69,46 +69,46 @@ $(GLOBJ)gp_sysv.$(OBJ): $(GLSRC)gp_sysv.c $(stdio__h) $(time__h) $(AK)\ - $(MAKEDIRS) - $(GLCC) $(GLO_)gp_sysv.$(OBJ) $(C_) $(GLSRC)gp_sysv.c - --# -------------------------- Auxiliary programs --------------------------- # -- --$(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(MAKEDIRS) -- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(ECHOGS_XE) $(GLSRC)echogs.c $(AUXEXTRALIBS) -- --# On the RS/6000 (at least), compiling genarch.c with gcc with -O --# produces a buggy executable. --$(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(MAKEDIRS) -- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENARCH_XE) $(GLSRC)genarch.c $(AUXEXTRALIBS) -- --$(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(MAKEDIRS) -- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENCONF_XE) $(GLSRC)genconf.c $(AUXEXTRALIBS) -- --$(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(MAKEDIRS) -- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENDEV_XE) $(GLSRC)gendev.c $(AUXEXTRALIBS) -- --$(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(MAKEDIRS) -- $(CCAUX_) $(GENHT_CFLAGS) $(O_)$(GENHT_XE) $(GLSRC)genht.c $(AUXEXTRALIBS) -- --# To get GS to use the system zlib, you remove/hide the gs/zlib directory --# which means that the mkromfs build can't find the zlib source it needs. --# So it's split into two targets, one using the zlib source directly..... --MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ -- $(AUX)gscdefs.$(OBJ) $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ -- $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ) -- --$(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) $(MAKEDIRS) -- $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS) -- --# .... and one using the zlib library linked via the command line --MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \ -- $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ -- $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ -- $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) -- --$(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1) $(MAKEDIRS) -- $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS) -- --$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(MAKEDIRS) -- $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE) -+## -------------------------- Auxiliary programs --------------------------- # -+# -+#$(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(MAKEDIRS) -+# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(ECHOGS_XE) $(GLSRC)echogs.c $(AUXEXTRALIBS) -+# -+## On the RS/6000 (at least), compiling genarch.c with gcc with -O -+## produces a buggy executable. -+#$(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(MAKEDIRS) -+# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENARCH_XE) $(GLSRC)genarch.c $(AUXEXTRALIBS) -+# -+#$(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(MAKEDIRS) -+# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENCONF_XE) $(GLSRC)genconf.c $(AUXEXTRALIBS) -+# -+#$(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(MAKEDIRS) -+# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENDEV_XE) $(GLSRC)gendev.c $(AUXEXTRALIBS) -+# -+#$(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(MAKEDIRS) -+# $(CCAUX_) $(GENHT_CFLAGS) $(O_)$(GENHT_XE) $(GLSRC)genht.c $(AUXEXTRALIBS) -+# -+## To get GS to use the system zlib, you remove/hide the gs/zlib directory -+## which means that the mkromfs build can't find the zlib source it needs. -+## So it's split into two targets, one using the zlib source directly..... -+#MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ -+# $(AUX)gscdefs.$(OBJ) $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ -+# $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ) -+# -+#$(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) $(MAKEDIRS) -+# $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS) -+# -+## .... and one using the zlib library linked via the command line -+#MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \ -+# $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ -+# $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ -+# $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) -+# -+#$(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1) $(MAKEDIRS) -+# $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS) -+# -+#$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(MAKEDIRS) -+# $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE) - - # Query the environment to construct gconfig_.h. - # These are all defined conditionally (except the JasPER one), so that diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.15-parallel-make.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.15-parallel-make.patch index 797b8947cf..ffa269e3b2 100644 --- a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.15-parallel-make.patch +++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.15-parallel-make.patch @@ -1,40 +1,38 @@ -From be1e1b33191afdcfe3c2ecc4ff3e361a5859e9c6 Mon Sep 17 00:00:00 2001 +From 84bb692d6b047c09266de154f404af9817fa04aa Mon Sep 17 00:00:00 2001 From: Robert Yang <liezhi.yang@windriver.com> -Date: Fri, 30 Jan 2015 00:40:22 -0800 -Subject: [PATCH] contrib.mak: fix for parallel build - -Fixed: -rm: cannot remove `/usr/share/ghostscript/9.15/lib': Is a directory - -Create lib before install to fix the race issue. +Date: Thu, 29 Mar 2018 15:59:05 +0800 +Subject: [PATCH 01/10] contrib.mak: fix for parallel build Upstream-Status: Pending Signed-off-by: Robert Yang <liezhi.yang@windriver.com> + +Rebase to 9.23 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- - contrib/contrib.mak | 2 ++ + contrib/contrib.mak | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/contrib.mak b/contrib/contrib.mak -index 08a80d1..de2e20d 100644 +index f5a2fa4..4999752 100644 --- a/contrib/contrib.mak +++ b/contrib/contrib.mak -@@ -947,6 +947,7 @@ $(DEVOBJ)dviprlib.$(OBJ) : $(JAPSRC)dviprlib.c $(JAPSRC)dviprlib.h +@@ -1067,6 +1067,7 @@ $(DEVOBJ)dviprlib.$(OBJ) : $(JAPSRC)dviprlib.c $(JAPSRC)dviprlib.h \ $(DEVCC) $(O_)$@ $(C_) $(JAPSRC)dviprlib.c - extra-dmprt-install: + extra-dmprt-install: install-libdata + mkdir -p $(DESTDIR)$(gsdatadir)$(D)lib $(INSTALL_DATA) $(JAPSRC)dmp_init.ps $(DESTDIR)$(gsdatadir)$(D)lib || exit 1 $(INSTALL_DATA) $(JAPSRC)dmp_site.ps $(DESTDIR)$(gsdatadir)$(D)lib || exit 1 $(INSTALL_DATA) $(JAPSRC)escp_24.src $(DESTDIR)$(gsdatadir)$(D)lib || exit 1 -@@ -1088,6 +1089,7 @@ $(DEVOBJ)gdevalps.$(OBJ) : $(JAPSRC)gdevalps.c $(PDEVH) +@@ -1235,6 +1236,7 @@ $(DEVOBJ)gdevalps.$(OBJ) : $(JAPSRC)gdevalps.c $(PDEVH) \ ### ----------------- Additional .upp files ---------------- ### - extra-upp-install: + extra-upp-install: install-libdata + mkdir -p $(DESTDIR)$(gsdatadir)$(D)lib for f in $(CONTRIBSRC)uniprint$(D)*.upp; do \ $(INSTALL_DATA) $$f $(DESTDIR)$(gsdatadir)$(D)lib || exit 1; \ done -- -1.7.9.5 +1.8.3.1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.16-Werror-return-type.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.16-Werror-return-type.patch index d786482007..8c4a5d44e3 100644 --- a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.16-Werror-return-type.patch +++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.16-Werror-return-type.patch @@ -1,7 +1,7 @@ -From 5d5c83c89be0cff29dde2267fa168e6f7146be8c Mon Sep 17 00:00:00 2001 +From c481b055cd464734a3c2d80719ead4c1c92a40c9 Mon Sep 17 00:00:00 2001 From: Robert Yang <liezhi.yang@windriver.com> Date: Mon, 4 May 2015 22:31:48 -0700 -Subject: [PATCH] base/gendev.c: fix for -Werror=return-type +Subject: [PATCH 02/10] base/gendev.c: fix for -Werror=return-type Fixed: base/gendev.c:80:1: error: return type defaults to 'int' [-Werror=return-type] @@ -10,11 +10,11 @@ Upstream-Status: Pending Signed-off-by: Robert Yang <liezhi.yang@windriver.com> --- - base/gendev.c | 1 + + base/gendev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/base/gendev.c b/base/gendev.c -index 68a745f..8058b5a 100644 +index 59d5999..7766b08 100644 --- a/base/gendev.c +++ b/base/gendev.c @@ -77,6 +77,7 @@ static const char *indent_item = ""; @@ -26,5 +26,5 @@ index 68a745f..8058b5a 100644 { config conf; -- -1.7.9.5 +1.8.3.1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-native-fix-disable-system-libtiff.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-native-fix-disable-system-libtiff.patch index 9158117d01..a382c7f891 100644 --- a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-native-fix-disable-system-libtiff.patch +++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-native-fix-disable-system-libtiff.patch @@ -1,28 +1,38 @@ -ghostscript-native:fix disable-system-libtiff +From 0124b1c29b9cfe46d73ae82ce023dd7c5b055744 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Thu, 29 Mar 2018 16:36:12 +0800 +Subject: [PATCH 09/10] ghostscript-native:fix disable-system-libtiff Modify configure to add the check to make sure ghostscrip could work while system-libtiff is disabled. -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Upstream-Status: Pending + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> + +Rebase to ghostscript 9.25. + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> --- configure.ac | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac +index 80a60b1..f3e9efb 100644 --- a/configure.ac +++ b/configure.ac -@@ -1055,6 +1055,7 @@ Disabling tiff output devices.]) - esac +@@ -1319,6 +1319,7 @@ AC_TRY_COMPILE([], [return 0;], + CFLAGS=$CGLAGS_STORE - if test $SHARE_LIBTIFF -eq 0; then + if test x"$SHARE_LIBTIFF" = x"0" ; then + if test -e $LIBTIFFDIR/configure; then - echo echo "Running libtiff configure script..." olddir=`pwd` -@@ -1069,6 +1070,10 @@ if test $SHARE_LIBTIFF -eq 0; then - cd "$olddir" + if ! test -d "$LIBTIFFCONFDIR" ; then +@@ -1337,6 +1338,10 @@ if test x"$SHARE_LIBTIFF" = x"0" ; then + echo echo "Continuing with Ghostscript configuration..." + else @@ -33,5 +43,5 @@ diff --git a/configure.ac b/configure.ac AC_SUBST(SHARE_LIBTIFF) -- -1.8.1.2 +1.8.3.1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-prevent_recompiling.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-prevent_recompiling.patch new file mode 100644 index 0000000000..c76915fb81 --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-prevent_recompiling.patch @@ -0,0 +1,78 @@ +From 239d681306a8d97ed10954788d32ba2f4b55f77c Mon Sep 17 00:00:00 2001 +From: Kang Kai <kai.kang@windriver.com> +Date: Thu, 29 Mar 2018 16:10:16 +0800 +Subject: [PATCH 06/10] prevent recompiling + +Just use commands provided by ghostscript-native, preventing recompile +them when compile ghostscript. Way to enable cross compile. + +Upstream-Status: Pending + +Signed-off-by: Kang Kai <kai.kang@windriver.com> +Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> + +Rebase to 9.25 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> +--- + base/unix-aux.mak | 44 -------------------------------------------- + 1 file changed, 44 deletions(-) + +diff --git a/base/unix-aux.mak b/base/unix-aux.mak +index 5bf72e9..9cb39d7 100644 +--- a/base/unix-aux.mak ++++ b/base/unix-aux.mak +@@ -54,50 +54,6 @@ $(AUX)gp_stdia.$(OBJ): $(GLSRC)gp_stdia. + $(stdio__h) $(time__h) $(unistd__h) $(gx_h) $(gp_h) $(UNIX_AUX_MAK) $(MAKEDIRS) + $(GLCCAUX) $(AUXO_)gp_stdia.$(OBJ) $(C_) $(GLSRC)gp_stdia.c + +-# -------------------------- Auxiliary programs --------------------------- # +- +-$(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(UNIX_AUX_MAK) $(MAKEDIRS) +- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(ECHOGS_XE) $(GLSRC)echogs.c $(AUXEXTRALIBS) +- +-$(PACKPS_XE): $(GLSRC)pack_ps.c $(stdpre_h) $(UNIX_AUX_MAK) $(MAKEDIRS) +- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(PACKPS_XE) $(GLSRC)pack_ps.c $(AUXEXTRALIBS) +- +-# On the RS/6000 (at least), compiling genarch.c with gcc with -O +-# produces a buggy executable. +-$(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS) +- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENARCH_XE) $(GLSRC)genarch.c $(AUXEXTRALIBS) +- +-$(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS) +- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENCONF_XE) $(GLSRC)genconf.c $(AUXEXTRALIBS) +- +-$(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS) +- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENDEV_XE) $(GLSRC)gendev.c $(AUXEXTRALIBS) +- +-$(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS) +- $(CCAUX_) $(GENHT_CFLAGS) $(O_)$(GENHT_XE) $(GLSRC)genht.c $(AUXEXTRALIBS) +- +-# To get GS to use the system zlib, you remove/hide the gs/zlib directory +-# which means that the mkromfs build can't find the zlib source it needs. +-# So it's split into two targets, one using the zlib source directly..... +-MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ +- $(AUX)gscdefs.$(OBJ) $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ +- $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ) +- +-$(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) $(UNIX_AUX_MAK) $(MAKEDIRS) +- $(CCAUX_) $(GENOPTAUX) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS) +- +-# .... and one using the zlib library linked via the command line +-MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \ +- $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ +- $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ +- $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) +- +-$(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1) $(UNIX_AUX_MAK) $(MAKEDIRS) +- $(CCAUX_) $(GENOPTAUX) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS) +- +-$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(UNIX_AUX_MAK) $(MAKEDIRS) +- $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE) +- + # Query the environment to construct gconfig_.h. + # These are all defined conditionally (except the JasPER one), so that + # they can be overridden by settings from the configure script. +-- +1.8.3.1 + diff --git a/meta/recipes-extended/ghostscript/ghostscript/i586/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/i586/objarch.h deleted file mode 100644 index 5817b7a6d7..0000000000 --- a/meta/recipes-extended/ghostscript/ghostscript/i586/objarch.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Parameters derived from machine and compiler architecture. */ -/* This file is generated mechanically by genarch.c. */ - - /* ---------------- Scalar alignments ---------------- */ - -#define ARCH_ALIGN_SHORT_MOD 2 -#define ARCH_ALIGN_INT_MOD 4 -#define ARCH_ALIGN_LONG_MOD 4 -#define ARCH_ALIGN_PTR_MOD 4 -#define ARCH_ALIGN_FLOAT_MOD 4 -#define ARCH_ALIGN_DOUBLE_MOD 4 - - /* ---------------- Scalar sizes ---------------- */ - -#define ARCH_LOG2_SIZEOF_CHAR 0 -#define ARCH_LOG2_SIZEOF_SHORT 1 -#define ARCH_LOG2_SIZEOF_INT 2 -#define ARCH_LOG2_SIZEOF_LONG 2 -#define ARCH_LOG2_SIZEOF_LONG_LONG 3 -#define ARCH_SIZEOF_GX_COLOR_INDEX 8 -#define ARCH_SIZEOF_PTR 4 -#define ARCH_SIZEOF_FLOAT 4 -#define ARCH_SIZEOF_DOUBLE 8 -#define ARCH_FLOAT_MANTISSA_BITS 24 -#define ARCH_DOUBLE_MANTISSA_BITS 53 - - /* ---------------- Unsigned max values ---------------- */ - -#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) -#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) -#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) -#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) - - /* ---------------- Miscellaneous ---------------- */ - -#define ARCH_IS_BIG_ENDIAN 0 -#define ARCH_PTRS_ARE_SIGNED 0 -#define ARCH_FLOATS_ARE_IEEE 1 -#define ARCH_ARITH_RSHIFT 2 -#define ARCH_DIV_NEG_POS_TRUNCATES 1 - diff --git a/meta/recipes-extended/ghostscript/ghostscript/i686 b/meta/recipes-extended/ghostscript/ghostscript/i686 deleted file mode 120000 index 87aaca5903..0000000000 --- a/meta/recipes-extended/ghostscript/ghostscript/i686 +++ /dev/null @@ -1 +0,0 @@ -i586
\ No newline at end of file diff --git a/meta/recipes-extended/ghostscript/ghostscript/microblazeeb/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/microblazeeb/objarch.h deleted file mode 100644 index 63232fdfa6..0000000000 --- a/meta/recipes-extended/ghostscript/ghostscript/microblazeeb/objarch.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Parameters derived from machine and compiler architecture. */ -/* This file is generated mechanically by genarch.c. */ - - /* ---------------- Scalar alignments ---------------- */ - -#define ARCH_ALIGN_SHORT_MOD 2 -#define ARCH_ALIGN_INT_MOD 4 -#define ARCH_ALIGN_LONG_MOD 4 -#define ARCH_ALIGN_PTR_MOD 4 -#define ARCH_ALIGN_FLOAT_MOD 4 -#define ARCH_ALIGN_DOUBLE_MOD 4 - - /* ---------------- Scalar sizes ---------------- */ - -#define ARCH_LOG2_SIZEOF_CHAR 0 -#define ARCH_LOG2_SIZEOF_SHORT 1 -#define ARCH_LOG2_SIZEOF_INT 2 -#define ARCH_LOG2_SIZEOF_LONG 2 -#define ARCH_LOG2_SIZEOF_LONG_LONG 3 -#define ARCH_SIZEOF_GX_COLOR_INDEX 8 -#define ARCH_SIZEOF_PTR 4 -#define ARCH_SIZEOF_FLOAT 4 -#define ARCH_SIZEOF_DOUBLE 8 -#define ARCH_FLOAT_MANTISSA_BITS 24 -#define ARCH_DOUBLE_MANTISSA_BITS 53 - - /* ---------------- Unsigned max values ---------------- */ - -#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) -#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) -#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) -#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) - - /* ---------------- Miscellaneous ---------------- */ - -#define ARCH_IS_BIG_ENDIAN 1 -#define ARCH_PTRS_ARE_SIGNED 0 -#define ARCH_FLOATS_ARE_IEEE 1 -#define ARCH_ARITH_RSHIFT 2 -#define ARCH_DIV_NEG_POS_TRUNCATES 1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/microblazeel/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/microblazeel/objarch.h deleted file mode 100644 index 3ec8101681..0000000000 --- a/meta/recipes-extended/ghostscript/ghostscript/microblazeel/objarch.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Parameters derived from machine and compiler architecture. */ -/* This file is generated mechanically by genarch.c. */ - - /* ---------------- Scalar alignments ---------------- */ - -#define ARCH_ALIGN_SHORT_MOD 2 -#define ARCH_ALIGN_INT_MOD 4 -#define ARCH_ALIGN_LONG_MOD 4 -#define ARCH_ALIGN_PTR_MOD 4 -#define ARCH_ALIGN_FLOAT_MOD 4 -#define ARCH_ALIGN_DOUBLE_MOD 4 - - /* ---------------- Scalar sizes ---------------- */ - -#define ARCH_LOG2_SIZEOF_CHAR 0 -#define ARCH_LOG2_SIZEOF_SHORT 1 -#define ARCH_LOG2_SIZEOF_INT 2 -#define ARCH_LOG2_SIZEOF_LONG 2 -#define ARCH_LOG2_SIZEOF_LONG_LONG 3 -#define ARCH_SIZEOF_GX_COLOR_INDEX 8 -#define ARCH_SIZEOF_PTR 4 -#define ARCH_SIZEOF_FLOAT 4 -#define ARCH_SIZEOF_DOUBLE 8 -#define ARCH_FLOAT_MANTISSA_BITS 24 -#define ARCH_DOUBLE_MANTISSA_BITS 53 - - /* ---------------- Unsigned max values ---------------- */ - -#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) -#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) -#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) -#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) - - /* ---------------- Miscellaneous ---------------- */ - -#define ARCH_IS_BIG_ENDIAN 0 -#define ARCH_PTRS_ARE_SIGNED 0 -#define ARCH_FLOATS_ARE_IEEE 1 -#define ARCH_ARITH_RSHIFT 2 -#define ARCH_DIV_NEG_POS_TRUNCATES 1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mips/objarch.h deleted file mode 100644 index b8b637cca2..0000000000 --- a/meta/recipes-extended/ghostscript/ghostscript/mips/objarch.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Parameters derived from machine and compiler architecture. */ -/* This file is generated mechanically by genarch.c. */ - - /* ---------------- Scalar alignments ---------------- */ - -#define ARCH_ALIGN_SHORT_MOD 2 -#define ARCH_ALIGN_INT_MOD 4 -#define ARCH_ALIGN_LONG_MOD 4 -#define ARCH_ALIGN_PTR_MOD 4 -#define ARCH_ALIGN_FLOAT_MOD 4 -#define ARCH_ALIGN_DOUBLE_MOD 8 - - /* ---------------- Scalar sizes ---------------- */ - -#define ARCH_LOG2_SIZEOF_CHAR 0 -#define ARCH_LOG2_SIZEOF_SHORT 1 -#define ARCH_LOG2_SIZEOF_INT 2 -#define ARCH_LOG2_SIZEOF_LONG 2 -#define ARCH_LOG2_SIZEOF_LONG_LONG 3 -#define ARCH_SIZEOF_GX_COLOR_INDEX 4 -#define ARCH_SIZEOF_PTR 4 -#define ARCH_SIZEOF_FLOAT 4 -#define ARCH_SIZEOF_DOUBLE 8 -#define ARCH_FLOAT_MANTISSA_BITS 24 -#define ARCH_DOUBLE_MANTISSA_BITS 53 - - /* ---------------- Unsigned max values ---------------- */ - -#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) -#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) -#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) -#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) - - /* ---------------- Miscellaneous ---------------- */ - -#define ARCH_IS_BIG_ENDIAN 1 -#define ARCH_PTRS_ARE_SIGNED 0 -#define ARCH_FLOATS_ARE_IEEE 1 -#define ARCH_ARITH_RSHIFT 2 -#define ARCH_DIV_NEG_POS_TRUNCATES 1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips64/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mips64/objarch.h deleted file mode 100644 index 0d0a16bfa3..0000000000 --- a/meta/recipes-extended/ghostscript/ghostscript/mips64/objarch.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Parameters derived from machine and compiler architecture. */ -/* This file is generated mechanically by genarch.c. */ - - /* ---------------- Scalar alignments ---------------- */ - -#define ARCH_ALIGN_SHORT_MOD 2 -#define ARCH_ALIGN_INT_MOD 4 -#define ARCH_ALIGN_LONG_MOD 8 -#define ARCH_ALIGN_PTR_MOD 8 -#define ARCH_ALIGN_FLOAT_MOD 4 -#define ARCH_ALIGN_DOUBLE_MOD 8 - - /* ---------------- Scalar sizes ---------------- */ - -#define ARCH_LOG2_SIZEOF_CHAR 0 -#define ARCH_LOG2_SIZEOF_SHORT 1 -#define ARCH_LOG2_SIZEOF_INT 2 -#define ARCH_LOG2_SIZEOF_LONG 3 -#define ARCH_LOG2_SIZEOF_LONG_LONG 3 -#define ARCH_SIZEOF_GX_COLOR_INDEX 8 -#define ARCH_SIZEOF_PTR 8 -#define ARCH_SIZEOF_FLOAT 4 -#define ARCH_SIZEOF_DOUBLE 8 -#define ARCH_FLOAT_MANTISSA_BITS 24 -#define ARCH_DOUBLE_MANTISSA_BITS 53 - - /* ---------------- Unsigned max values ---------------- */ - -#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) -#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) -#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) -#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) - - /* ---------------- Miscellaneous ---------------- */ - -#define ARCH_IS_BIG_ENDIAN 1 -#define ARCH_PTRS_ARE_SIGNED 0 -#define ARCH_FLOATS_ARE_IEEE 1 -#define ARCH_ARITH_RSHIFT 2 -#define ARCH_DIV_NEG_POS_TRUNCATES 1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips64el/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mips64el/objarch.h deleted file mode 100644 index a05de29def..0000000000 --- a/meta/recipes-extended/ghostscript/ghostscript/mips64el/objarch.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Parameters derived from machine and compiler architecture. */ -/* This file is generated mechanically by genarch.c. */ - - /* ---------------- Scalar alignments ---------------- */ - -#define ARCH_ALIGN_SHORT_MOD 2 -#define ARCH_ALIGN_INT_MOD 4 -#define ARCH_ALIGN_LONG_MOD 8 -#define ARCH_ALIGN_PTR_MOD 8 -#define ARCH_ALIGN_FLOAT_MOD 4 -#define ARCH_ALIGN_DOUBLE_MOD 8 - - /* ---------------- Scalar sizes ---------------- */ - -#define ARCH_LOG2_SIZEOF_CHAR 0 -#define ARCH_LOG2_SIZEOF_SHORT 1 -#define ARCH_LOG2_SIZEOF_INT 2 -#define ARCH_LOG2_SIZEOF_LONG 3 -#define ARCH_LOG2_SIZEOF_LONG_LONG 3 -#define ARCH_SIZEOF_GX_COLOR_INDEX 8 -#define ARCH_SIZEOF_PTR 8 -#define ARCH_SIZEOF_FLOAT 4 -#define ARCH_SIZEOF_DOUBLE 8 -#define ARCH_FLOAT_MANTISSA_BITS 24 -#define ARCH_DOUBLE_MANTISSA_BITS 53 - - /* ---------------- Unsigned max values ---------------- */ - -#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) -#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) -#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) -#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) - - /* ---------------- Miscellaneous ---------------- */ - -#define ARCH_IS_BIG_ENDIAN 0 -#define ARCH_PTRS_ARE_SIGNED 0 -#define ARCH_FLOATS_ARE_IEEE 1 -#define ARCH_ARITH_RSHIFT 2 -#define ARCH_DIV_NEG_POS_TRUNCATES 1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips64eln32/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mips64eln32/objarch.h deleted file mode 100644 index a05de29def..0000000000 --- a/meta/recipes-extended/ghostscript/ghostscript/mips64eln32/objarch.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Parameters derived from machine and compiler architecture. */ -/* This file is generated mechanically by genarch.c. */ - - /* ---------------- Scalar alignments ---------------- */ - -#define ARCH_ALIGN_SHORT_MOD 2 -#define ARCH_ALIGN_INT_MOD 4 -#define ARCH_ALIGN_LONG_MOD 8 -#define ARCH_ALIGN_PTR_MOD 8 -#define ARCH_ALIGN_FLOAT_MOD 4 -#define ARCH_ALIGN_DOUBLE_MOD 8 - - /* ---------------- Scalar sizes ---------------- */ - -#define ARCH_LOG2_SIZEOF_CHAR 0 -#define ARCH_LOG2_SIZEOF_SHORT 1 -#define ARCH_LOG2_SIZEOF_INT 2 -#define ARCH_LOG2_SIZEOF_LONG 3 -#define ARCH_LOG2_SIZEOF_LONG_LONG 3 -#define ARCH_SIZEOF_GX_COLOR_INDEX 8 -#define ARCH_SIZEOF_PTR 8 -#define ARCH_SIZEOF_FLOAT 4 -#define ARCH_SIZEOF_DOUBLE 8 -#define ARCH_FLOAT_MANTISSA_BITS 24 -#define ARCH_DOUBLE_MANTISSA_BITS 53 - - /* ---------------- Unsigned max values ---------------- */ - -#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) -#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) -#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) -#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) - - /* ---------------- Miscellaneous ---------------- */ - -#define ARCH_IS_BIG_ENDIAN 0 -#define ARCH_PTRS_ARE_SIGNED 0 -#define ARCH_FLOATS_ARE_IEEE 1 -#define ARCH_ARITH_RSHIFT 2 -#define ARCH_DIV_NEG_POS_TRUNCATES 1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips64n32/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mips64n32/objarch.h deleted file mode 100644 index 0d0a16bfa3..0000000000 --- a/meta/recipes-extended/ghostscript/ghostscript/mips64n32/objarch.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Parameters derived from machine and compiler architecture. */ -/* This file is generated mechanically by genarch.c. */ - - /* ---------------- Scalar alignments ---------------- */ - -#define ARCH_ALIGN_SHORT_MOD 2 -#define ARCH_ALIGN_INT_MOD 4 -#define ARCH_ALIGN_LONG_MOD 8 -#define ARCH_ALIGN_PTR_MOD 8 -#define ARCH_ALIGN_FLOAT_MOD 4 -#define ARCH_ALIGN_DOUBLE_MOD 8 - - /* ---------------- Scalar sizes ---------------- */ - -#define ARCH_LOG2_SIZEOF_CHAR 0 -#define ARCH_LOG2_SIZEOF_SHORT 1 -#define ARCH_LOG2_SIZEOF_INT 2 -#define ARCH_LOG2_SIZEOF_LONG 3 -#define ARCH_LOG2_SIZEOF_LONG_LONG 3 -#define ARCH_SIZEOF_GX_COLOR_INDEX 8 -#define ARCH_SIZEOF_PTR 8 -#define ARCH_SIZEOF_FLOAT 4 -#define ARCH_SIZEOF_DOUBLE 8 -#define ARCH_FLOAT_MANTISSA_BITS 24 -#define ARCH_DOUBLE_MANTISSA_BITS 53 - - /* ---------------- Unsigned max values ---------------- */ - -#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) -#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) -#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) -#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) - - /* ---------------- Miscellaneous ---------------- */ - -#define ARCH_IS_BIG_ENDIAN 1 -#define ARCH_PTRS_ARE_SIGNED 0 -#define ARCH_FLOATS_ARE_IEEE 1 -#define ARCH_ARITH_RSHIFT 2 -#define ARCH_DIV_NEG_POS_TRUNCATES 1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/mipsel/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mipsel/objarch.h deleted file mode 100644 index 29f90ddf85..0000000000 --- a/meta/recipes-extended/ghostscript/ghostscript/mipsel/objarch.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Parameters derived from machine and compiler architecture. */ -/* This file is generated mechanically by genarch.c. */ - - /* ---------------- Scalar alignments ---------------- */ - -#define ARCH_ALIGN_SHORT_MOD 2 -#define ARCH_ALIGN_INT_MOD 4 -#define ARCH_ALIGN_LONG_MOD 4 -#define ARCH_ALIGN_PTR_MOD 4 -#define ARCH_ALIGN_FLOAT_MOD 4 -#define ARCH_ALIGN_DOUBLE_MOD 8 - - /* ---------------- Scalar sizes ---------------- */ - -#define ARCH_LOG2_SIZEOF_CHAR 0 -#define ARCH_LOG2_SIZEOF_SHORT 1 -#define ARCH_LOG2_SIZEOF_INT 2 -#define ARCH_LOG2_SIZEOF_LONG 2 -#define ARCH_LOG2_SIZEOF_LONG_LONG 3 -#define ARCH_SIZEOF_GX_COLOR_INDEX 4 -#define ARCH_SIZEOF_PTR 4 -#define ARCH_SIZEOF_FLOAT 4 -#define ARCH_SIZEOF_DOUBLE 8 -#define ARCH_FLOAT_MANTISSA_BITS 24 -#define ARCH_DOUBLE_MANTISSA_BITS 53 - - /* ---------------- Unsigned max values ---------------- */ - -#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) -#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) -#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) -#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) - - /* ---------------- Miscellaneous ---------------- */ - -#define ARCH_IS_BIG_ENDIAN 0 -#define ARCH_PTRS_ARE_SIGNED 0 -#define ARCH_FLOATS_ARE_IEEE 1 -#define ARCH_ARITH_RSHIFT 2 -#define ARCH_DIV_NEG_POS_TRUNCATES 1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/mkdir-p.patch b/meta/recipes-extended/ghostscript/ghostscript/mkdir-p.patch new file mode 100644 index 0000000000..3e6d3e3c48 --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/mkdir-p.patch @@ -0,0 +1,50 @@ +From 2b23026f8e2a352417fb1c4da94bf69b19bef267 Mon Sep 17 00:00:00 2001 +From: Joe Slater <joe.slater@windriver.com> +Date: Thu, 29 Mar 2018 16:04:32 +0800 +Subject: [PATCH 05/10] ghostscript: allow directories to be created more than + once + +When doing parallel builds, we might try to create directories +more than once. This should not cause an error. + +Upstream-Status: Pending + +Signed-off-by: Joe Slater <joe.slater@windriver.com> + +Rebase to 9.23 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + base/unix-end.mak | 17 ++++++++--------- + 1 file changed, 8 insertions(+), 9 deletions(-) + +diff --git a/base/unix-end.mak b/base/unix-end.mak +index 9ce599a..feff5a6 100644 +--- a/base/unix-end.mak ++++ b/base/unix-end.mak +@@ -17,15 +17,14 @@ + UNIX_END_MAK=$(GLSRC)unix-end.mak $(TOP_MAKEFILES) + # Define the rule for building standard configurations. + directories: $(UNIX_END_MAK) +- @if test "$(BINDIR)" != "" -a ! -d $(BINDIR); then mkdir $(BINDIR); fi +- @if test "$(GLGENDIR)" != "" -a ! -d $(GLGENDIR); then mkdir $(GLGENDIR); fi +- @if test "$(GLOBJDIR)" != "" -a ! -d $(GLOBJDIR); then mkdir $(GLOBJDIR); fi +- @if test "$(DEVGENDIR)" != "" -a ! -d $(DEVGENDIR); then mkdir $(DEVGENDIR); fi +- @if test "$(DEVOBJDIR)" != "" -a ! -d $(DEVOBJDIR); then mkdir $(DEVOBJDIR); fi +- @if test "$(AUXDIR)" != "" -a ! -d $(AUXDIR); then mkdir $(AUXDIR); fi +- @if test "$(PSGENDIR)" != "" -a ! -d $(PSGENDIR); then mkdir $(PSGENDIR); fi +- @if test "$(PSGENDIR)" != "" -a ! -d $(PSGENDIR)/cups; then mkdir $(PSGENDIR)/cups; fi +- @if test "$(PSOBJDIR)" != "" -a ! -d $(PSOBJDIR); then mkdir $(PSOBJDIR); fi ++ @if test "$(BINDIR)" != "" -a ! -d $(BINDIR); then mkdir -p $(BINDIR); fi ++ @if test "$(GLGENDIR)" != "" -a ! -d $(GLGENDIR); then mkdir -p $(GLGENDIR); fi ++ @if test "$(GLOBJDIR)" != "" -a ! -d $(GLOBJDIR); then mkdir -p $(GLOBJDIR); fi ++ @if test "$(DEVGENDIR)" != "" -a ! -d $(DEVGENDIR); then mkdir -p $(DEVGENDIR); fi ++ @if test "$(DEVOBJDIR)" != "" -a ! -d $(DEVOBJDIR); then mkdir -p $(DEVOBJDIR); fi ++ @if test "$(AUXDIR)" != "" -a ! -d $(AUXDIR); then mkdir -p $(AUXDIR); fi ++ @if test "$(PSGENDIR)" != "" -a ! -d $(PSGENDIR)/cups; then mkdir -p $(PSGENDIR)/cups; fi ++ @if test "$(PSOBJDIR)" != "" -a ! -d $(PSOBJDIR); then mkdir -p $(PSOBJDIR); fi + + + gs: .gssubtarget $(UNIX_END_MAK) +-- +1.8.3.1 + diff --git a/meta/recipes-extended/ghostscript/ghostscript/powerpc/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/powerpc/objarch.h deleted file mode 100644 index 359097f356..0000000000 --- a/meta/recipes-extended/ghostscript/ghostscript/powerpc/objarch.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Parameters derived from machine and compiler architecture. */ -/* This file is generated mechanically by genarch.c. */ - - /* ---------------- Scalar alignments ---------------- */ - -#define ARCH_ALIGN_SHORT_MOD 2 -#define ARCH_ALIGN_INT_MOD 4 -#define ARCH_ALIGN_LONG_MOD 4 -#define ARCH_ALIGN_PTR_MOD 4 -#define ARCH_ALIGN_FLOAT_MOD 4 -#define ARCH_ALIGN_DOUBLE_MOD 8 - - /* ---------------- Scalar sizes ---------------- */ - -#define ARCH_LOG2_SIZEOF_CHAR 0 -#define ARCH_LOG2_SIZEOF_SHORT 1 -#define ARCH_LOG2_SIZEOF_INT 2 -#define ARCH_LOG2_SIZEOF_LONG 2 -#define ARCH_LOG2_SIZEOF_LONG_LONG 3 -#define ARCH_SIZEOF_GX_COLOR_INDEX 8 -#define ARCH_SIZEOF_PTR 4 -#define ARCH_SIZEOF_FLOAT 4 -#define ARCH_SIZEOF_DOUBLE 8 -#define ARCH_FLOAT_MANTISSA_BITS 24 -#define ARCH_DOUBLE_MANTISSA_BITS 53 - - /* ---------------- Unsigned max values ---------------- */ - -#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) -#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) -#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) -#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) - - /* ---------------- Miscellaneous ---------------- */ - -#define ARCH_IS_BIG_ENDIAN 1 -#define ARCH_PTRS_ARE_SIGNED 0 -#define ARCH_FLOATS_ARE_IEEE 1 -#define ARCH_ARITH_RSHIFT 2 -#define ARCH_DIV_NEG_POS_TRUNCATES 1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/powerpc64/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/powerpc64/objarch.h deleted file mode 100644 index 0d0a16bfa3..0000000000 --- a/meta/recipes-extended/ghostscript/ghostscript/powerpc64/objarch.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Parameters derived from machine and compiler architecture. */ -/* This file is generated mechanically by genarch.c. */ - - /* ---------------- Scalar alignments ---------------- */ - -#define ARCH_ALIGN_SHORT_MOD 2 -#define ARCH_ALIGN_INT_MOD 4 -#define ARCH_ALIGN_LONG_MOD 8 -#define ARCH_ALIGN_PTR_MOD 8 -#define ARCH_ALIGN_FLOAT_MOD 4 -#define ARCH_ALIGN_DOUBLE_MOD 8 - - /* ---------------- Scalar sizes ---------------- */ - -#define ARCH_LOG2_SIZEOF_CHAR 0 -#define ARCH_LOG2_SIZEOF_SHORT 1 -#define ARCH_LOG2_SIZEOF_INT 2 -#define ARCH_LOG2_SIZEOF_LONG 3 -#define ARCH_LOG2_SIZEOF_LONG_LONG 3 -#define ARCH_SIZEOF_GX_COLOR_INDEX 8 -#define ARCH_SIZEOF_PTR 8 -#define ARCH_SIZEOF_FLOAT 4 -#define ARCH_SIZEOF_DOUBLE 8 -#define ARCH_FLOAT_MANTISSA_BITS 24 -#define ARCH_DOUBLE_MANTISSA_BITS 53 - - /* ---------------- Unsigned max values ---------------- */ - -#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) -#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) -#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) -#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) - - /* ---------------- Miscellaneous ---------------- */ - -#define ARCH_IS_BIG_ENDIAN 1 -#define ARCH_PTRS_ARE_SIGNED 0 -#define ARCH_FLOATS_ARE_IEEE 1 -#define ARCH_ARITH_RSHIFT 2 -#define ARCH_DIV_NEG_POS_TRUNCATES 1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/x86-64/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/x86-64/objarch.h deleted file mode 100644 index a05de29def..0000000000 --- a/meta/recipes-extended/ghostscript/ghostscript/x86-64/objarch.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Parameters derived from machine and compiler architecture. */ -/* This file is generated mechanically by genarch.c. */ - - /* ---------------- Scalar alignments ---------------- */ - -#define ARCH_ALIGN_SHORT_MOD 2 -#define ARCH_ALIGN_INT_MOD 4 -#define ARCH_ALIGN_LONG_MOD 8 -#define ARCH_ALIGN_PTR_MOD 8 -#define ARCH_ALIGN_FLOAT_MOD 4 -#define ARCH_ALIGN_DOUBLE_MOD 8 - - /* ---------------- Scalar sizes ---------------- */ - -#define ARCH_LOG2_SIZEOF_CHAR 0 -#define ARCH_LOG2_SIZEOF_SHORT 1 -#define ARCH_LOG2_SIZEOF_INT 2 -#define ARCH_LOG2_SIZEOF_LONG 3 -#define ARCH_LOG2_SIZEOF_LONG_LONG 3 -#define ARCH_SIZEOF_GX_COLOR_INDEX 8 -#define ARCH_SIZEOF_PTR 8 -#define ARCH_SIZEOF_FLOAT 4 -#define ARCH_SIZEOF_DOUBLE 8 -#define ARCH_FLOAT_MANTISSA_BITS 24 -#define ARCH_DOUBLE_MANTISSA_BITS 53 - - /* ---------------- Unsigned max values ---------------- */ - -#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) -#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) -#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) -#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) - - /* ---------------- Miscellaneous ---------------- */ - -#define ARCH_IS_BIG_ENDIAN 0 -#define ARCH_PTRS_ARE_SIGNED 0 -#define ARCH_FLOATS_ARE_IEEE 1 -#define ARCH_ARITH_RSHIFT 2 -#define ARCH_DIV_NEG_POS_TRUNCATES 1 diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.16.bb b/meta/recipes-extended/ghostscript/ghostscript_9.52.bb index ec4acc6661..65135f5821 100644 --- a/meta/recipes-extended/ghostscript/ghostscript_9.16.bb +++ b/meta/recipes-extended/ghostscript/ghostscript_9.52.bb @@ -11,48 +11,70 @@ HOMEPAGE = "http://www.ghostscript.com" SECTION = "console/utils" LICENSE = "GPLv3" -LIC_FILES_CHKSUM = "file://LICENSE;md5=b17cea54743435ab2a581c237bea294a" +LIC_FILES_CHKSUM = "file://LICENSE;md5=70dc2bac4d0ce4448da873cd86b123fc" -DEPENDS = "ghostscript-native tiff jpeg fontconfig cups" -DEPENDS_class-native = "" +DEPENDS = "ghostscript-native tiff jpeg fontconfig cups libpng" +DEPENDS_class-native = "libpng-native" -SRC_URI_BASE = "http://downloads.ghostscript.com/public/ghostscript-${PV}.tar.gz \ +UPSTREAM_CHECK_URI = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases" +UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar" + +def gs_verdir(v): + return "".join(v.split(".")) + + +SRC_URI_BASE = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${@gs_verdir("${PV}")}/${BPN}-${PV}.tar.gz \ file://ghostscript-9.15-parallel-make.patch \ file://ghostscript-9.16-Werror-return-type.patch \ + file://do-not-check-local-libpng-source.patch \ + file://avoid-host-contamination.patch \ + file://mkdir-p.patch \ " SRC_URI = "${SRC_URI_BASE} \ - file://ghostscript-9.02-prevent_recompiling.patch \ - file://ghostscript-9.02-genarch.patch \ - file://objarch.h \ + file://ghostscript-9.21-prevent_recompiling.patch \ file://cups-no-gcrypt.patch \ + file://CVE-2020-15900.patch \ " SRC_URI_class-native = "${SRC_URI_BASE} \ - file://ghostscript-native-fix-disable-system-libtiff.patch \ + file://ghostscript-9.21-native-fix-disable-system-libtiff.patch \ file://base-genht.c-add-a-preprocessor-define-to-allow-fope.patch \ " -SRC_URI[md5sum] = "829319325bbdb83f5c81379a8f86f38f" -SRC_URI[sha256sum] = "746d77280cca8afdd3d4c2c1389e332ed9b0605bd107bcaae1d761b061d1a68d" +SRC_URI[md5sum] = "0f6964ab9b83a63b7e373f136243f901" +SRC_URI[sha256sum] = "c2501d8e8e0814c4a5aa7e443e230e73d7af7f70287546f7b697e5ef49e32176" + +# Put something like +# +# PACKAGECONFIG_append_pn-ghostscript = " x11" +# +# in local.conf to enable building with X11. Be careful. The order +# of the overrides matters! +# +#PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" +PACKAGECONFIG_class-native = "" + +PACKAGECONFIG[x11] = "--with-x --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR}, \ + --without-x, virtual/libx11 libxext libxt gtk+3\ + " -EXTRA_OECONF = "--without-x --with-system-libtiff --without-jbig2dec \ +EXTRA_OECONF = "--without-libpaper --with-system-libtiff --without-jbig2dec \ --with-fontpath=${datadir}/fonts \ --without-libidn --with-cups-serverbin=${exec_prefix}/lib/cups \ --with-cups-datadir=${datadir}/cups \ - ${@base_conditional('SITEINFO_ENDIANNESS', 'le', '--enable-little-endian', '--enable-big-endian', d)} \ + CUPSCONFIG="${STAGING_BINDIR_CROSS}/cups-config" \ " -EXTRA_OECONF_append_mips = " --with-large_color_index=0" -EXTRA_OECONF_append_mipsel = " --with-large_color_index=0" +EXTRA_OECONF_append_mipsarcho32 = " --with-large_color_index=0" # Explicity disable libtiff, fontconfig, # freetype, cups for ghostscript-native EXTRA_OECONF_class-native = "--without-x --with-system-libtiff=no \ - --without-jbig2dec \ + --without-jbig2dec --without-libpaper \ --with-fontpath=${datadir}/fonts \ --without-libidn --disable-fontconfig \ - --disable-freetype --disable-cups" + --enable-freetype --disable-cups " # This has been fixed upstream but for now we need to subvert the check for time.h # http://bugs.ghostscript.com/show_bug.cgi?id=692443 @@ -60,21 +82,13 @@ EXTRA_OECONF_class-native = "--without-x --with-system-libtiff=no \ CFLAGS += "-DHAVE_SYS_TIME_H=1" BUILD_CFLAGS += "-DHAVE_SYS_TIME_H=1" -inherit autotools - -do_configure_prepend () { - mkdir -p obj - mkdir -p soobj - if [ -e ${WORKDIR}/objarch.h ]; then - cp ${WORKDIR}/objarch.h obj/arch.h - fi -} +inherit autotools-brokensep do_configure_append () { # copy tools from the native ghostscript build if [ "${PN}" != "ghostscript-native" ]; then mkdir -p obj/aux soobj - for i in genarch genconf mkromfs echogs gendev genht; do + for i in genarch genconf mkromfs echogs gendev genht packps; do cp ${STAGING_BINDIR_NATIVE}/ghostscript-${PV}/$i obj/aux/$i done fi @@ -88,16 +102,22 @@ do_install_append () { do_compile_class-native () { mkdir -p obj - for i in genarch genconf mkromfs echogs gendev genht; do + for i in genarch genconf mkromfs echogs gendev genht packps; do oe_runmake obj/aux/$i done } do_install_class-native () { install -d ${D}${bindir}/ghostscript-${PV} - for i in genarch genconf mkromfs echogs gendev genht; do + for i in genarch genconf mkromfs echogs gendev genht packps; do install -m 755 obj/aux/$i ${D}${bindir}/ghostscript-${PV}/$i done } BBCLASSEXTEND = "native" + +# ghostscript does not supports "arc" +COMPATIBLE_HOST = "^(?!arc).*" + +# some entries in NVD uses gpl_ghostscript +CVE_PRODUCT = "ghostscript gpl_ghostscript" diff --git a/meta/recipes-extended/go-examples/go-helloworld_0.1.bb b/meta/recipes-extended/go-examples/go-helloworld_0.1.bb new file mode 100644 index 0000000000..ab70ea98a3 --- /dev/null +++ b/meta/recipes-extended/go-examples/go-helloworld_0.1.bb @@ -0,0 +1,20 @@ +DESCRIPTION = "This is a simple example recipe that cross-compiles a Go program." +SECTION = "examples" +HOMEPAGE = "https://golang.org/" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +SRC_URI = "git://${GO_IMPORT}" +SRCREV = "46695d81d1fae905a270fb7db8a4d11a334562fe" +UPSTREAM_CHECK_COMMITS = "1" + +GO_IMPORT = "github.com/golang/example" +GO_INSTALL = "${GO_IMPORT}/hello" + +inherit go + +# This is just to make clear where this example is +do_install_append() { + mv ${D}${bindir}/hello ${D}${bindir}/${BPN} +} diff --git a/meta/recipes-extended/gperf/gperf_3.0.3.bb b/meta/recipes-extended/gperf/gperf_3.0.3.bb deleted file mode 100644 index 772886121b..0000000000 --- a/meta/recipes-extended/gperf/gperf_3.0.3.bb +++ /dev/null @@ -1,10 +0,0 @@ -require gperf.inc - -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=a5f84abb0070adf8a0925d7d534b6e0a \ - file://src/main.cc;beginline=8;endline=19;md5=72a3034a19e72f08ee48ef8244a121fd" - -PR = "r1" - -SRC_URI[md5sum] = "cc20e58975a38075440423c8fb85fd00" -SRC_URI[sha256sum] = "63287527c8d9e27e801cf0804436f3494bd569db05d49dcdd2a942ae72fa9055" diff --git a/meta/recipes-extended/gperf/gperf_3.0.4.bb b/meta/recipes-extended/gperf/gperf_3.0.4.bb deleted file mode 100644 index 64003fc0bb..0000000000 --- a/meta/recipes-extended/gperf/gperf_3.0.4.bb +++ /dev/null @@ -1,5 +0,0 @@ -require gperf.inc - - -SRC_URI[md5sum] = "c1f1db32fb6598d6a93e6e88796a8632" -SRC_URI[sha256sum] = "767112a204407e62dbc3106647cf839ed544f3cf5d0f0523aaa2508623aad63e" diff --git a/meta/recipes-extended/gperf/gperf.inc b/meta/recipes-extended/gperf/gperf_3.1.bb index a8ce230f65..f61b2a329a 100644 --- a/meta/recipes-extended/gperf/gperf.inc +++ b/meta/recipes-extended/gperf/gperf_3.1.bb @@ -5,18 +5,14 @@ LICENSE = "GPLv3+" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ file://src/main.cc;beginline=8;endline=19;md5=dec8f611845d047387ed56b5b85fa99b" -SRC_URI = "${GNU_MIRROR}/gperf/gperf-${PV}.tar.gz" +SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz" +SRC_URI[md5sum] = "9e251c0a618ad0824b51117d5d9db87e" +SRC_URI[sha256sum] = "588546b945bba4b70b6a3a616e80b4ab466e3f33024a352fc2198112cdbb3ae2" inherit autotools -# autoreconf couldn't find acinclude.m4 when stepping into subdirectory. Instead of -# duplicating acinclude.m4 in every subdirectory, use absolute include path to aclocal -EXTRA_AUTORECONF += " -I ${S}" - -do_configure_prepend() { - if [ ! -e ${S}/acinclude.m4 ]; then - cat ${S}/aclocal.m4 > ${S}/acinclude.m4 - fi -} +# The nested configures don't find the parent aclocal.m4 out of the box, so tell +# it where to look explicitly (mirroring the behaviour of upstream's Makefile.devel). +EXTRA_AUTORECONF += " -I ${S} --exclude=aclocal" BBCLASSEXTEND = "native" diff --git a/meta/recipes-extended/grep/grep-2.5.1a/Makevars b/meta/recipes-extended/grep/grep-2.5.1a/Makevars deleted file mode 100644 index 8b09f53b0f..0000000000 --- a/meta/recipes-extended/grep/grep-2.5.1a/Makevars +++ /dev/null @@ -1,25 +0,0 @@ -# Makefile variables for PO directory in any package using GNU gettext. - -# Usually the message domain is the same as the package name. -DOMAIN = $(PACKAGE) - -# These two variables depend on the location of this directory. -subdir = po -top_builddir = .. - -# These options get passed to xgettext. -XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ - -# This is the copyright holder that gets inserted into the header of the -# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding -# package. (Note that the msgstr strings, extracted from the package's -# sources, belong to the copyright holder of the package.) Translators are -# expected to transfer the copyright for their translations to this person -# or entity, or to disclaim their copyright. The empty string stands for -# the public domain; in this case the translators are expected to disclaim -# their copyright. -COPYRIGHT_HOLDER = Free Software Foundation, Inc. - -# This is the list of locale categories, beyond LC_MESSAGES, for which the -# message catalogs shall be used. It is usually empty. -EXTRA_LOCALE_CATEGORIES = diff --git a/meta/recipes-extended/grep/grep-2.5.1a/fix-for-texinfo-5.1.patch b/meta/recipes-extended/grep/grep-2.5.1a/fix-for-texinfo-5.1.patch deleted file mode 100644 index 5a4149cfc0..0000000000 --- a/meta/recipes-extended/grep/grep-2.5.1a/fix-for-texinfo-5.1.patch +++ /dev/null @@ -1,17 +0,0 @@ -Upstream-Status: Inappropriate [Poky Specific this is gplv2 version] - -Signed-off-by Saul Wold <sgw@linux.intel.com> - -Index: grep-2.5.1a/doc/grep.texi -=================================================================== ---- grep-2.5.1a.orig/doc/grep.texi -+++ grep-2.5.1a/doc/grep.texi -@@ -288,7 +288,7 @@ This version number should be included i - Print a usage message briefly summarizing these command-line options - and the bug-reporting address, then exit. - --@itemx --binary-files=@var{type} -+@item --binary-files=@var{type} - @opindex --binary-files - @cindex binary files - If the first few bytes of a file indicate that the file contains binary diff --git a/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch b/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch deleted file mode 100644 index 3b91520fb2..0000000000 --- a/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch +++ /dev/null @@ -1,17 +0,0 @@ -Always use locale.h as HAVE_LOCALE_H is no longer handled by ./configure -Upstream-Status: Inappropriate [ old version that will not be maintained ] -Signed-off-by: Alex DAMIAN <alexandru.damian@intel.com> - -diff --recursive --unified grep-2.5.1a-orig/lib/hard-locale.c grep-2.5.1a/lib/hard-locale.c ---- grep-2.5.1a-orig/lib/hard-locale.c 2001-03-04 07:33:12.000000000 +0200 -+++ grep-2.5.1a/lib/hard-locale.c 2013-03-11 17:05:52.086444891 +0200 -@@ -38,9 +38,7 @@ - # endif - #endif - --#if HAVE_LOCALE_H - # include <locale.h> --#endif - - #if HAVE_STRING_H - # include <string.h> diff --git a/meta/recipes-extended/grep/grep-2.5.1a/gettext.patch b/meta/recipes-extended/grep/grep-2.5.1a/gettext.patch deleted file mode 100644 index 57463355a7..0000000000 --- a/meta/recipes-extended/grep/grep-2.5.1a/gettext.patch +++ /dev/null @@ -1,15 +0,0 @@ -Enable operation with later versions of gettext. - -Upstream-Status: Inappropriate -RP 2012/10/19 - -Index: grep-2.5.1a/configure.in -=================================================================== ---- grep-2.5.1a.orig/configure.in 2012-10-19 12:57:51.646970204 +0000 -+++ grep-2.5.1a/configure.in 2012-10-19 12:59:49.946968803 +0000 -@@ -140,4 +140,4 @@ - AC_CHECK_LIB(pcre, pcre_exec) - fi - --AC_OUTPUT(Makefile lib/Makefile lib/posix/Makefile src/Makefile tests/Makefile po/Makefile.in intl/Makefile doc/Makefile m4/Makefile vms/Makefile bootstrap/Makefile, [sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile; echo timestamp > stamp-h]) -+AC_OUTPUT(Makefile lib/Makefile lib/posix/Makefile src/Makefile tests/Makefile po/Makefile.in intl/Makefile doc/Makefile m4/Makefile vms/Makefile bootstrap/Makefile, [echo timestamp > stamp-h]) diff --git a/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch b/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch deleted file mode 100644 index 059d0687b3..0000000000 --- a/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch +++ /dev/null @@ -1,32 +0,0 @@ -The patch to fix CVE-2012-5667 -Reference: https://bugzilla.redhat.com/attachment.cgi?id=686605&action=diff - -Multiple integer overflows in GNU Grep before 2.11 might allow -context-dependent attackers to execute arbitrary code via vectors -involving a long input line that triggers a heap-based buffer overflow. - -http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-5667 - -Upstream-Status: Inappropriate [other] -This version of GNU Grep has been abandoned upstream and they are no longer -accepting patches. This is not a backport. - -Signed-off-by Ming Liu <ming.liu@windriver.com> ---- - grep.c | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - ---- a/src/grep.c 2013-05-15 13:39:33.359191769 +0800 -+++ a/src/grep.c 2013-05-15 13:50:22.609191882 +0800 -@@ -306,6 +306,11 @@ fillbuf (size_t save, struct stats const - int cc = 1; - char *readbuf; - size_t readsize; -+ const size_t max_save = INT_MAX / 2; -+ -+ /* Limit the amount of saved data to INT_MAX to fix CVE-2012-5667 */ -+ if (save > max_save) -+ error (2, 0, _("line too long")); - - /* Offset from start of buffer to start of old stuff - that we want to save. */ diff --git a/meta/recipes-extended/grep/grep-2.5.1a/grep-egrep-fgrep-Fix-LSB-NG-cases.patch b/meta/recipes-extended/grep/grep-2.5.1a/grep-egrep-fgrep-Fix-LSB-NG-cases.patch deleted file mode 100644 index 327ee56402..0000000000 --- a/meta/recipes-extended/grep/grep-2.5.1a/grep-egrep-fgrep-Fix-LSB-NG-cases.patch +++ /dev/null @@ -1,1342 +0,0 @@ -From c884dd12ec062569335702848fc5f29f436c28fa Mon Sep 17 00:00:00 2001 -From: Li xin <lixin.fnst@cn.fujitsu.com> -Date: Mon, 25 May 2015 10:15:57 +0900 -Subject: [PATCH] grep egrep fgrep: Fix LSB NG cases. - -The LSB core test requires grep egrep and fgrep can -perform pattern matching in searches without regard -to case if -i option is specified. - -Upstream-Status: backport. - -Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com> ---- - lib/posix/regex.h | 4 + - src/dfa.c | 22 +- - src/grep.c | 96 ++++--- - src/search.c | 833 +++++++++++++++++++++++++++++++++++++++++++++--------- - 4 files changed, 768 insertions(+), 187 deletions(-) - -diff --git a/lib/posix/regex.h b/lib/posix/regex.h -index 63c2fef..7bb2b0e 100644 ---- a/lib/posix/regex.h -+++ b/lib/posix/regex.h -@@ -109,6 +109,10 @@ typedef unsigned long int reg_syntax_t; - If not set, \{, \}, {, and } are literals. */ - #define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1) - -+/* If this bit is set, then ignore case when matching. -+ If not set, then case is significant. */ -+#define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1) -+ - /* If this bit is set, +, ? and | aren't recognized as operators. - If not set, they are. */ - #define RE_LIMITED_OPS (RE_INTERVALS << 1) -diff --git a/src/dfa.c b/src/dfa.c -index 590bfa7..27c876a 100644 ---- a/src/dfa.c -+++ b/src/dfa.c -@@ -414,7 +414,7 @@ update_mb_len_index (unsigned char const *p, int len) - - /* This function fetch a wide character, and update cur_mb_len, - used only if the current locale is a multibyte environment. */ --static wchar_t -+static wint_t - fetch_wc (char const *eoferr) - { - wchar_t wc; -@@ -423,7 +423,7 @@ fetch_wc (char const *eoferr) - if (eoferr != 0) - dfaerror (eoferr); - else -- return -1; -+ return WEOF; - } - - cur_mb_len = mbrtowc(&wc, lexptr, lexleft, &mbs); -@@ -459,7 +459,7 @@ fetch_wc (char const *eoferr) - static void - parse_bracket_exp_mb () - { -- wchar_t wc, wc1, wc2; -+ wint_t wc, wc1, wc2; - - /* Work area to build a mb_char_classes. */ - struct mb_char_classes *work_mbc; -@@ -496,7 +496,7 @@ parse_bracket_exp_mb () - work_mbc->invert = 0; - do - { -- wc1 = -1; /* mark wc1 is not initialized". */ -+ wc1 = WEOF; /* mark wc1 is not initialized". */ - - /* Note that if we're looking at some other [:...:] construct, - we just treat it as a bunch of ordinary characters. We can do -@@ -586,7 +586,7 @@ parse_bracket_exp_mb () - work_mbc->coll_elems[work_mbc->ncoll_elems++] = elem; - } - } -- wc = -1; -+ wc1 = wc = WEOF; - } - else - /* We treat '[' as a normal character here. */ -@@ -600,7 +600,7 @@ parse_bracket_exp_mb () - wc = fetch_wc(("Unbalanced [")); - } - -- if (wc1 == -1) -+ if (wc1 == WEOF) - wc1 = fetch_wc(_("Unbalanced [")); - - if (wc1 == L'-') -@@ -630,17 +630,17 @@ parse_bracket_exp_mb () - } - REALLOC_IF_NECESSARY(work_mbc->range_sts, wchar_t, - range_sts_al, work_mbc->nranges + 1); -- work_mbc->range_sts[work_mbc->nranges] = wc; -+ work_mbc->range_sts[work_mbc->nranges] = (wchar_t)wc; - REALLOC_IF_NECESSARY(work_mbc->range_ends, wchar_t, - range_ends_al, work_mbc->nranges + 1); -- work_mbc->range_ends[work_mbc->nranges++] = wc2; -+ work_mbc->range_ends[work_mbc->nranges++] = (wchar_t)wc2; - } -- else if (wc != -1) -+ else if (wc != WEOF) - /* build normal characters. */ - { - REALLOC_IF_NECESSARY(work_mbc->chars, wchar_t, chars_al, - work_mbc->nchars + 1); -- work_mbc->chars[work_mbc->nchars++] = wc; -+ work_mbc->chars[work_mbc->nchars++] = (wchar_t)wc; - } - } - while ((wc = wc1) != L']'); -@@ -2552,6 +2552,8 @@ match_mb_charset (struct dfa *d, int s, position pos, int index) - } - - /* match with a character? */ -+ if (case_fold) -+ wc = towlower (wc); - for (i = 0; i<work_mbc->nchars; i++) - { - if (wc == work_mbc->chars[i]) -diff --git a/src/grep.c b/src/grep.c -index 2fb2fac..3fd4b47 100644 ---- a/src/grep.c -+++ b/src/grep.c -@@ -30,6 +30,12 @@ - # include <sys/time.h> - # include <sys/resource.h> - #endif -+#if defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H && defined HAVE_MBRTOWC -+/* We can handle multibyte string. */ -+# define MBS_SUPPORT -+# include <wchar.h> -+# include <wctype.h> -+#endif - #include <stdio.h> - #include "system.h" - #include "getopt.h" -@@ -255,19 +261,6 @@ reset (int fd, char const *file, struct stats *stats) - bufbeg[-1] = eolbyte; - bufdesc = fd; - -- if (fstat (fd, &stats->stat) != 0) -- { -- error (0, errno, "fstat"); -- return 0; -- } -- if (directories == SKIP_DIRECTORIES && S_ISDIR (stats->stat.st_mode)) -- return 0; --#ifndef DJGPP -- if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode) || S_ISSOCK(stats->stat.st_mode))) --#else -- if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode))) --#endif -- return 0; - if (S_ISREG (stats->stat.st_mode)) - { - if (file) -@@ -558,33 +551,6 @@ prline (char const *beg, char const *lim, int sep) - { - size_t match_size; - size_t match_offset; -- if(match_icase) -- { -- /* Yuck, this is tricky */ -- char *buf = (char*) xmalloc (lim - beg); -- char *ibeg = buf; -- char *ilim = ibeg + (lim - beg); -- int i; -- for (i = 0; i < lim - beg; i++) -- ibeg[i] = tolower (beg[i]); -- while ((match_offset = (*execute) (ibeg, ilim-ibeg, &match_size, 1)) -- != (size_t) -1) -- { -- char const *b = beg + match_offset; -- if (b == lim) -- break; -- fwrite (beg, sizeof (char), match_offset, stdout); -- printf ("\33[%sm", grep_color); -- fwrite (b, sizeof (char), match_size, stdout); -- fputs ("\33[00m", stdout); -- beg = b + match_size; -- ibeg = ibeg + match_offset + match_size; -- } -- fwrite (beg, 1, lim - beg, stdout); -- free (buf); -- lastout = lim; -- return; -- } - while (lim-beg && (match_offset = (*execute) (beg, lim - beg, &match_size, 1)) - != (size_t) -1) - { -@@ -601,6 +567,7 @@ prline (char const *beg, char const *lim, int sep) - fputs ("\33[00m", stdout); - beg = b + match_size; - } -+ fputs ("\33[K", stdout); - } - fwrite (beg, 1, lim - beg, stdout); - if (ferror (stdout)) -@@ -623,7 +590,7 @@ prpending (char const *lim) - size_t match_size; - --pending; - if (outleft -- || (((*execute) (lastout, nl - lastout, &match_size, 0) == (size_t) -1) -+ || (((*execute) (lastout, nl + 1 - lastout, &match_size, 0) == (size_t) -1) - == !out_invert)) - prline (lastout, nl + 1, '-'); - else -@@ -895,6 +862,19 @@ grepfile (char const *file, struct stats *stats) - } - else - { -+ if (stat (file, &stats->stat) != 0) -+ { -+ suppressible_error (file, errno); -+ return 1; -+ } -+ if (directories == SKIP_DIRECTORIES && S_ISDIR (stats->stat.st_mode)) -+ return 1; -+#ifndef DJGPP -+ if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode) || S_ISSOCK(stats->stat.st_mode) || S_ISFIFO(stats->stat.st_mode))) -+#else -+ if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode))) -+#endif -+ return 1; - while ((desc = open (file, O_RDONLY)) < 0 && errno == EINTR) - continue; - -@@ -1681,9 +1661,6 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n")) - out_invert ^= 1; - match_lines = match_words = 0; - } -- else -- /* Strip trailing newline. */ -- --keycc; - } - else - if (optind < argc) -@@ -1697,6 +1674,37 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n")) - if (!install_matcher (matcher) && !install_matcher ("default")) - abort (); - -+#ifdef MBS_SUPPORT -+ if (MB_CUR_MAX != 1 && match_icase) -+ { -+ wchar_t wc; -+ mbstate_t cur_state, prev_state; -+ int i, len = strlen(keys); -+ -+ memset(&cur_state, 0, sizeof(mbstate_t)); -+ for (i = 0; i <= len ;) -+ { -+ size_t mbclen; -+ mbclen = mbrtowc(&wc, keys + i, len - i, &cur_state); -+ if (mbclen == (size_t) -1 || mbclen == (size_t) -2 || mbclen == 0) -+ { -+ /* An invalid sequence, or a truncated multibyte character. -+ We treat it as a singlebyte character. */ -+ mbclen = 1; -+ } -+ else -+ { -+ if (iswupper((wint_t)wc)) -+ { -+ wc = towlower((wint_t)wc); -+ wcrtomb(keys + i, wc, &cur_state); -+ } -+ } -+ i += mbclen; -+ } -+ } -+#endif /* MBS_SUPPORT */ -+ - (*compile)(keys, keycc); - - if ((argc - optind > 1 && !no_filenames) || with_filenames) -diff --git a/src/search.c b/src/search.c -index 7bd233f..3c6a485 100644 ---- a/src/search.c -+++ b/src/search.c -@@ -18,9 +18,13 @@ - - /* Written August 1992 by Mike Haertel. */ - -+#ifndef _GNU_SOURCE -+# define _GNU_SOURCE 1 -+#endif - #ifdef HAVE_CONFIG_H - # include <config.h> - #endif -+#include <assert.h> - #include <sys/types.h> - #if defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H && defined HAVE_MBRTOWC - /* We can handle multibyte string. */ -@@ -31,7 +35,7 @@ - - #include "system.h" - #include "grep.h" --#include "regex.h" -+#include <regex.h> - #include "dfa.h" - #include "kwset.h" - #include "error.h" -@@ -39,6 +43,9 @@ - #ifdef HAVE_LIBPCRE - # include <pcre.h> - #endif -+#ifdef HAVE_LANGINFO_CODESET -+# include <langinfo.h> -+#endif - - #define NCHAR (UCHAR_MAX + 1) - -@@ -70,9 +77,10 @@ static kwset_t kwset; - call the regexp matcher at all. */ - static int kwset_exact_matches; - --#if defined(MBS_SUPPORT) --static char* check_multibyte_string PARAMS ((char const *buf, size_t size)); --#endif -+/* UTF-8 encoding allows some optimizations that we can't otherwise -+ assume in a multibyte encoding. */ -+static int using_utf8; -+ - static void kwsinit PARAMS ((void)); - static void kwsmusts PARAMS ((void)); - static void Gcompile PARAMS ((char const *, size_t)); -@@ -84,6 +92,15 @@ static void Pcompile PARAMS ((char const *, size_t )); - static size_t Pexecute PARAMS ((char const *, size_t, size_t *, int)); - - void -+check_utf8 (void) -+{ -+#ifdef HAVE_LANGINFO_CODESET -+ if (strcmp (nl_langinfo (CODESET), "UTF-8") == 0) -+ using_utf8 = 1; -+#endif -+} -+ -+void - dfaerror (char const *mesg) - { - error (2, 0, mesg); -@@ -141,38 +158,6 @@ kwsmusts (void) - } - } - --#ifdef MBS_SUPPORT --/* This function allocate the array which correspond to "buf". -- Then this check multibyte string and mark on the positions which -- are not singlebyte character nor the first byte of a multibyte -- character. Caller must free the array. */ --static char* --check_multibyte_string(char const *buf, size_t size) --{ -- char *mb_properties = malloc(size); -- mbstate_t cur_state; -- int i; -- memset(&cur_state, 0, sizeof(mbstate_t)); -- memset(mb_properties, 0, sizeof(char)*size); -- for (i = 0; i < size ;) -- { -- size_t mbclen; -- mbclen = mbrlen(buf + i, size - i, &cur_state); -- -- if (mbclen == (size_t) -1 || mbclen == (size_t) -2 || mbclen == 0) -- { -- /* An invalid sequence, or a truncated multibyte character. -- We treat it as a singlebyte character. */ -- mbclen = 1; -- } -- mb_properties[i] = mbclen; -- i += mbclen; -- } -- -- return mb_properties; --} --#endif -- - static void - Gcompile (char const *pattern, size_t size) - { -@@ -181,7 +166,8 @@ Gcompile (char const *pattern, size_t size) - size_t total = size; - char const *motif = pattern; - -- re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE); -+ check_utf8 (); -+ re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE | (match_icase ? RE_ICASE : 0)); - dfasyntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE, match_icase, eolbyte); - - /* For GNU regex compiler we have to pass the patterns separately to detect -@@ -218,6 +204,10 @@ Gcompile (char const *pattern, size_t size) - motif = sep; - } while (sep && total != 0); - -+ /* Strip trailing newline. */ -+ if (size && pattern[size - 1] == '\n') -+ size--; -+ - /* In the match_words and match_lines cases, we use a different pattern - for the DFA matcher that will quickly throw out cases that won't work. - Then if DFA succeeds we do some hairy stuff using the regex matcher -@@ -233,7 +223,7 @@ Gcompile (char const *pattern, size_t size) - static char const line_end[] = "\\)$"; - static char const word_beg[] = "\\(^\\|[^[:alnum:]_]\\)\\("; - static char const word_end[] = "\\)\\([^[:alnum:]_]\\|$\\)"; -- char *n = malloc (sizeof word_beg - 1 + size + sizeof word_end); -+ char *n = xmalloc (sizeof word_beg - 1 + size + sizeof word_end); - size_t i; - strcpy (n, match_lines ? line_beg : word_beg); - i = strlen (n); -@@ -257,14 +247,15 @@ Ecompile (char const *pattern, size_t size) - size_t total = size; - char const *motif = pattern; - -+ check_utf8 (); - if (strcmp (matcher, "awk") == 0) - { -- re_set_syntax (RE_SYNTAX_AWK); -+ re_set_syntax (RE_SYNTAX_AWK | (match_icase ? RE_ICASE : 0)); - dfasyntax (RE_SYNTAX_AWK, match_icase, eolbyte); - } - else - { -- re_set_syntax (RE_SYNTAX_POSIX_EGREP); -+ re_set_syntax (RE_SYNTAX_POSIX_EGREP | (match_icase ? RE_ICASE : 0)); - dfasyntax (RE_SYNTAX_POSIX_EGREP, match_icase, eolbyte); - } - -@@ -301,6 +292,10 @@ Ecompile (char const *pattern, size_t size) - motif = sep; - } while (sep && total != 0); - -+ /* Strip trailing newline. */ -+ if (size && pattern[size - 1] == '\n') -+ size--; -+ - /* In the match_words and match_lines cases, we use a different pattern - for the DFA matcher that will quickly throw out cases that won't work. - Then if DFA succeeds we do some hairy stuff using the regex matcher -@@ -316,7 +311,7 @@ Ecompile (char const *pattern, size_t size) - static char const line_end[] = ")$"; - static char const word_beg[] = "(^|[^[:alnum:]_])("; - static char const word_end[] = ")([^[:alnum:]_]|$)"; -- char *n = malloc (sizeof word_beg - 1 + size + sizeof word_end); -+ char *n = xmalloc (sizeof word_beg - 1 + size + sizeof word_end); - size_t i; - strcpy (n, match_lines ? line_beg : word_beg); - i = strlen(n); -@@ -339,15 +334,34 @@ EGexecute (char const *buf, size_t size, size_t *match_size, int exact) - char eol = eolbyte; - int backref, start, len; - struct kwsmatch kwsm; -- size_t i; -+ size_t i, ret_val; -+ static int use_dfa; -+ static int use_dfa_checked = 0; - #ifdef MBS_SUPPORT -- char *mb_properties = NULL; -+ int mb_cur_max = MB_CUR_MAX; -+ mbstate_t mbs; -+ memset (&mbs, '\0', sizeof (mbstate_t)); - #endif /* MBS_SUPPORT */ - -+ if (!use_dfa_checked) -+ { -+ char *grep_use_dfa = getenv ("GREP_USE_DFA"); -+ if (!grep_use_dfa) -+ { - #ifdef MBS_SUPPORT -- if (MB_CUR_MAX > 1 && kwset) -- mb_properties = check_multibyte_string(buf, size); -+ /* Turn off DFA when processing multibyte input. */ -+ use_dfa = (MB_CUR_MAX == 1); -+#else -+ use_dfa = 1; - #endif /* MBS_SUPPORT */ -+ } -+ else -+ { -+ use_dfa = atoi (grep_use_dfa); -+ } -+ -+ use_dfa_checked = 1; -+ } - - buflim = buf + size; - -@@ -358,47 +372,120 @@ EGexecute (char const *buf, size_t size, size_t *match_size, int exact) - if (kwset) - { - /* Find a possible match using the KWset matcher. */ -- size_t offset = kwsexec (kwset, beg, buflim - beg, &kwsm); -+#ifdef MBS_SUPPORT -+ size_t bytes_left = 0; -+#endif /* MBS_SUPPORT */ -+ size_t offset; -+#ifdef MBS_SUPPORT -+ /* kwsexec doesn't work with match_icase and multibyte input. */ -+ if (match_icase && mb_cur_max > 1) -+ /* Avoid kwset */ -+ offset = 0; -+ else -+#endif /* MBS_SUPPORT */ -+ offset = kwsexec (kwset, beg, buflim - beg, &kwsm); - if (offset == (size_t) -1) -- { -+ goto failure; - #ifdef MBS_SUPPORT -- if (MB_CUR_MAX > 1) -- free(mb_properties); --#endif -- return (size_t)-1; -+ if (mb_cur_max > 1 && !using_utf8) -+ { -+ bytes_left = offset; -+ while (bytes_left) -+ { -+ size_t mlen = mbrlen (beg, bytes_left, &mbs); -+ if (mlen == (size_t) -1 || mlen == 0) -+ { -+ /* Incomplete character: treat as single-byte. */ -+ memset (&mbs, '\0', sizeof (mbstate_t)); -+ beg++; -+ bytes_left--; -+ continue; -+ } -+ -+ if (mlen == (size_t) -2) -+ /* Offset points inside multibyte character: -+ * no good. */ -+ break; -+ -+ beg += mlen; -+ bytes_left -= mlen; -+ } - } -+ else -+#endif /* MBS_SUPPORT */ - beg += offset; - /* Narrow down to the line containing the candidate, and - run it through DFA. */ - end = memchr(beg, eol, buflim - beg); - end++; - #ifdef MBS_SUPPORT -- if (MB_CUR_MAX > 1 && mb_properties[beg - buf] == 0) -+ if (mb_cur_max > 1 && bytes_left) - continue; --#endif -+#endif /* MBS_SUPPORT */ - while (beg > buf && beg[-1] != eol) - --beg; -- if (kwsm.index < kwset_exact_matches) -- goto success; -- if (dfaexec (&dfa, beg, end - beg, &backref) == (size_t) -1) -+ if ( -+#ifdef MBS_SUPPORT -+ !(match_icase && mb_cur_max > 1) && -+#endif /* MBS_SUPPORT */ -+ (kwsm.index < kwset_exact_matches)) -+ goto success_in_beg_and_end; -+ if (use_dfa && -+ dfaexec (&dfa, beg, end - beg, &backref) == (size_t) -1) - continue; - } - else - { - /* No good fixed strings; start with DFA. */ -- size_t offset = dfaexec (&dfa, beg, buflim - beg, &backref); -+#ifdef MBS_SUPPORT -+ size_t bytes_left = 0; -+#endif /* MBS_SUPPORT */ -+ size_t offset = 0; -+ if (use_dfa) -+ offset = dfaexec (&dfa, beg, buflim - beg, &backref); - if (offset == (size_t) -1) - break; - /* Narrow down to the line we've found. */ -+#ifdef MBS_SUPPORT -+ if (mb_cur_max > 1 && !using_utf8) -+ { -+ bytes_left = offset; -+ while (bytes_left) -+ { -+ size_t mlen = mbrlen (beg, bytes_left, &mbs); -+ if (mlen == (size_t) -1 || mlen == 0) -+ { -+ /* Incomplete character: treat as single-byte. */ -+ memset (&mbs, '\0', sizeof (mbstate_t)); -+ beg++; -+ bytes_left--; -+ continue; -+ } -+ -+ if (mlen == (size_t) -2) -+ /* Offset points inside multibyte character: -+ * no good. */ -+ break; -+ -+ beg += mlen; -+ bytes_left -= mlen; -+ } -+ } -+ else -+#endif /* MBS_SUPPORT */ - beg += offset; - end = memchr (beg, eol, buflim - beg); - end++; -+#ifdef MBS_SUPPORT -+ if (mb_cur_max > 1 && bytes_left) -+ continue; -+#endif /* MBS_SUPPORT */ - while (beg > buf && beg[-1] != eol) - --beg; - } - /* Successful, no backreferences encountered! */ -- if (!backref) -- goto success; -+ if (use_dfa && !backref) -+ goto success_in_beg_and_end; - } - else - end = beg + size; -@@ -413,14 +500,11 @@ EGexecute (char const *buf, size_t size, size_t *match_size, int exact) - end - beg - 1, &(patterns[i].regs)))) - { - len = patterns[i].regs.end[0] - start; -- if (exact) -- { -- *match_size = len; -- return start; -- } -+ if (exact && !match_words) -+ goto success_in_start_and_len; - if ((!match_lines && !match_words) - || (match_lines && len == end - beg - 1)) -- goto success; -+ goto success_in_beg_and_end; - /* If -w, check if the match aligns with word boundaries. - We do this iteratively because: - (a) the line may contain more than one occurence of the -@@ -431,10 +515,114 @@ EGexecute (char const *buf, size_t size, size_t *match_size, int exact) - if (match_words) - while (start >= 0) - { -- if ((start == 0 || !WCHAR ((unsigned char) beg[start - 1])) -- && (len == end - beg - 1 -- || !WCHAR ((unsigned char) beg[start + len]))) -- goto success; -+ int lword_match = 0; -+ if (start == 0) -+ lword_match = 1; -+ else -+ { -+ assert (start > 0); -+#ifdef MBS_SUPPORT -+ if (mb_cur_max > 1) -+ { -+ const char *s; -+ size_t mr; -+ wchar_t pwc; -+ -+ /* Locate the start of the multibyte character -+ before the match position (== beg + start). */ -+ if (using_utf8) -+ { -+ /* UTF-8 is a special case: scan backwards -+ until we find a 7-bit character or a -+ lead byte. */ -+ s = beg + start - 1; -+ while (s > buf -+ && (unsigned char) *s >= 0x80 -+ && (unsigned char) *s <= 0xbf) -+ --s; -+ } -+ else -+ { -+ /* Scan forwards to find the start of the -+ last complete character before the -+ match position. */ -+ size_t bytes_left = start - 1; -+ s = beg; -+ while (bytes_left > 0) -+ { -+ mr = mbrlen (s, bytes_left, &mbs); -+ if (mr == (size_t) -1 || mr == 0) -+ { -+ memset (&mbs, '\0', sizeof (mbs)); -+ s++; -+ bytes_left--; -+ continue; -+ } -+ if (mr == (size_t) -2) -+ { -+ memset (&mbs, '\0', sizeof (mbs)); -+ break; -+ } -+ s += mr; -+ bytes_left -= mr; -+ } -+ } -+ mr = mbrtowc (&pwc, s, beg + start - s, &mbs); -+ if (mr == (size_t) -2 || mr == (size_t) -1 || -+ mr == 0) -+ { -+ memset (&mbs, '\0', sizeof (mbstate_t)); -+ lword_match = 1; -+ } -+ else if (!(iswalnum (pwc) || pwc == L'_') -+ && mr == beg + start - s) -+ lword_match = 1; -+ } -+ else -+#endif /* MBS_SUPPORT */ -+ if (!WCHAR ((unsigned char) beg[start - 1])) -+ lword_match = 1; -+ } -+ -+ if (lword_match) -+ { -+ int rword_match = 0; -+ if (start + len == end - beg - 1) -+ rword_match = 1; -+ else -+ { -+#ifdef MBS_SUPPORT -+ if (mb_cur_max > 1) -+ { -+ wchar_t nwc; -+ int mr; -+ -+ mr = mbtowc (&nwc, beg + start + len, -+ end - beg - start - len - 1); -+ if (mr <= 0) -+ { -+ memset (&mbs, '\0', sizeof (mbstate_t)); -+ rword_match = 1; -+ } -+ else if (!iswalnum (nwc) && nwc != L'_') -+ rword_match = 1; -+ } -+ else -+#endif /* MBS_SUPPORT */ -+ if (!WCHAR ((unsigned char) beg[start + len])) -+ rword_match = 1; -+ } -+ -+ if (rword_match) -+ { -+ if (!exact) -+ /* Returns the whole line. */ -+ goto success_in_beg_and_end; -+ else -+ /* Returns just this word match. */ -+ goto success_in_start_and_len; -+ } -+ } - if (len > 0) - { - /* Try a shorter length anchored at the same place. */ -@@ -461,26 +649,154 @@ EGexecute (char const *buf, size_t size, size_t *match_size, int exact) - } - } /* for Regex patterns. */ - } /* for (beg = end ..) */ --#ifdef MBS_SUPPORT -- if (MB_CUR_MAX > 1 && mb_properties) -- free (mb_properties); --#endif /* MBS_SUPPORT */ -+ -+ failure: - return (size_t) -1; - -- success: --#ifdef MBS_SUPPORT -- if (MB_CUR_MAX > 1 && mb_properties) -- free (mb_properties); --#endif /* MBS_SUPPORT */ -- *match_size = end - beg; -- return beg - buf; -+ success_in_beg_and_end: -+ len = end - beg; -+ start = beg - buf; -+ /* FALLTHROUGH */ -+ -+ success_in_start_and_len: -+ *match_size = len; -+ return start; - } - -+#ifdef MBS_SUPPORT -+static int f_i_multibyte; /* whether we're using the new -Fi MB method */ -+static struct -+{ -+ wchar_t **patterns; -+ size_t count, maxlen; -+ unsigned char *match; -+} Fimb; -+#endif -+ - static void - Fcompile (char const *pattern, size_t size) - { -+ int mb_cur_max = MB_CUR_MAX; - char const *beg, *lim, *err; - -+ check_utf8 (); -+#ifdef MBS_SUPPORT -+ /* Support -F -i for UTF-8 input. */ -+ if (match_icase && mb_cur_max > 1) -+ { -+ mbstate_t mbs; -+ wchar_t *wcpattern = xmalloc ((size + 1) * sizeof (wchar_t)); -+ const char *patternend = pattern; -+ size_t wcsize; -+ kwset_t fimb_kwset = NULL; -+ char *starts = NULL; -+ wchar_t *wcbeg, *wclim; -+ size_t allocated = 0; -+ -+ memset (&mbs, '\0', sizeof (mbs)); -+# ifdef __GNU_LIBRARY__ -+ wcsize = mbsnrtowcs (wcpattern, &patternend, size, size, &mbs); -+ if (patternend != pattern + size) -+ wcsize = (size_t) -1; -+# else -+ { -+ char *patterncopy = xmalloc (size + 1); -+ -+ memcpy (patterncopy, pattern, size); -+ patterncopy[size] = '\0'; -+ patternend = patterncopy; -+ wcsize = mbsrtowcs (wcpattern, &patternend, size, &mbs); -+ if (patternend != patterncopy + size) -+ wcsize = (size_t) -1; -+ free (patterncopy); -+ } -+# endif -+ if (wcsize + 2 <= 2) -+ { -+fimb_fail: -+ free (wcpattern); -+ free (starts); -+ if (fimb_kwset) -+ kwsfree (fimb_kwset); -+ free (Fimb.patterns); -+ Fimb.patterns = NULL; -+ } -+ else -+ { -+ if (!(fimb_kwset = kwsalloc (NULL))) -+ error (2, 0, _("memory exhausted")); -+ -+ starts = xmalloc (mb_cur_max * 3); -+ wcbeg = wcpattern; -+ do -+ { -+ int i; -+ size_t wclen; -+ -+ if (Fimb.count >= allocated) -+ { -+ if (allocated == 0) -+ allocated = 128; -+ else -+ allocated *= 2; -+ Fimb.patterns = xrealloc (Fimb.patterns, -+ sizeof (wchar_t *) * allocated); -+ } -+ Fimb.patterns[Fimb.count++] = wcbeg; -+ for (wclim = wcbeg; -+ wclim < wcpattern + wcsize && *wclim != L'\n'; ++wclim) -+ *wclim = towlower (*wclim); -+ *wclim = L'\0'; -+ wclen = wclim - wcbeg; -+ if (wclen > Fimb.maxlen) -+ Fimb.maxlen = wclen; -+ if (wclen > 3) -+ wclen = 3; -+ if (wclen == 0) -+ { -+ if ((err = kwsincr (fimb_kwset, "", 0)) != 0) -+ error (2, 0, err); -+ } -+ else -+ for (i = 0; i < (1 << wclen); i++) -+ { -+ char *p = starts; -+ int j, k; -+ -+ for (j = 0; j < wclen; ++j) -+ { -+ wchar_t wc = wcbeg[j]; -+ if (i & (1 << j)) -+ { -+ wc = towupper (wc); -+ if (wc == wcbeg[j]) -+ continue; -+ } -+ k = wctomb (p, wc); -+ if (k <= 0) -+ goto fimb_fail; -+ p += k; -+ } -+ if ((err = kwsincr (fimb_kwset, starts, p - starts)) != 0) -+ error (2, 0, err); -+ } -+ if (wclim < wcpattern + wcsize) -+ ++wclim; -+ wcbeg = wclim; -+ } -+ while (wcbeg < wcpattern + wcsize); -+ f_i_multibyte = 1; -+ kwset = fimb_kwset; -+ free (starts); -+ Fimb.match = xmalloc (Fimb.count); -+ if ((err = kwsprep (kwset)) != 0) -+ error (2, 0, err); -+ return; -+ } -+ } -+#endif /* MBS_SUPPORT */ -+ -+ - kwsinit (); - beg = pattern; - do -@@ -499,6 +815,76 @@ Fcompile (char const *pattern, size_t size) - error (2, 0, err); - } - -+#ifdef MBS_SUPPORT -+static int -+Fimbexec (const char *buf, size_t size, size_t *plen, int exact) -+{ -+ size_t len, letter, i; -+ int ret = -1; -+ mbstate_t mbs; -+ wchar_t wc; -+ int patterns_left; -+ -+ assert (match_icase && f_i_multibyte == 1); -+ assert (MB_CUR_MAX > 1); -+ -+ memset (&mbs, '\0', sizeof (mbs)); -+ memset (Fimb.match, '\1', Fimb.count); -+ letter = len = 0; -+ patterns_left = 1; -+ while (patterns_left && len <= size) -+ { -+ size_t c; -+ -+ patterns_left = 0; -+ if (len < size) -+ { -+ c = mbrtowc (&wc, buf + len, size - len, &mbs); -+ if (c + 2 <= 2) -+ return ret; -+ -+ wc = towlower (wc); -+ } -+ else -+ { -+ c = 1; -+ wc = L'\0'; -+ } -+ -+ for (i = 0; i < Fimb.count; i++) -+ { -+ if (Fimb.match[i]) -+ { -+ if (Fimb.patterns[i][letter] == L'\0') -+ { -+ /* Found a match. */ -+ *plen = len; -+ if (!exact && !match_words) -+ return 0; -+ else -+ { -+ /* For -w or exact look for longest match. */ -+ ret = 0; -+ Fimb.match[i] = '\0'; -+ continue; -+ } -+ } -+ -+ if (Fimb.patterns[i][letter] == wc) -+ patterns_left = 1; -+ else -+ Fimb.match[i] = '\0'; -+ } -+ } -+ -+ len += c; -+ letter++; -+ } -+ -+ return ret; -+} -+#endif /* MBS_SUPPORT */ -+ - static size_t - Fexecute (char const *buf, size_t size, size_t *match_size, int exact) - { -@@ -506,88 +892,268 @@ Fexecute (char const *buf, size_t size, size_t *match_size, int exact) - register size_t len; - char eol = eolbyte; - struct kwsmatch kwsmatch; -+ size_t ret_val; - #ifdef MBS_SUPPORT -- char *mb_properties; -- if (MB_CUR_MAX > 1) -- mb_properties = check_multibyte_string (buf, size); -+ int mb_cur_max = MB_CUR_MAX; -+ mbstate_t mbs; -+ memset (&mbs, '\0', sizeof (mbstate_t)); -+ const char *last_char = NULL; - #endif /* MBS_SUPPORT */ - -- for (beg = buf; beg <= buf + size; ++beg) -+ for (beg = buf; beg < buf + size; ++beg) - { -- size_t offset = kwsexec (kwset, beg, buf + size - beg, &kwsmatch); -+ size_t offset; -+ offset = kwsexec (kwset, beg, buf + size - beg, &kwsmatch); -+ - if (offset == (size_t) -1) -- { -+ goto failure; - #ifdef MBS_SUPPORT -- if (MB_CUR_MAX > 1) -- free(mb_properties); --#endif /* MBS_SUPPORT */ -- return offset; -+ if (mb_cur_max > 1 && !using_utf8) -+ { -+ size_t bytes_left = offset; -+ while (bytes_left) -+ { -+ size_t mlen = mbrlen (beg, bytes_left, &mbs); -+ -+ last_char = beg; -+ if (mlen == (size_t) -1 || mlen == 0) -+ { -+ /* Incomplete character: treat as single-byte. */ -+ memset (&mbs, '\0', sizeof (mbstate_t)); -+ beg++; -+ bytes_left--; -+ continue; -+ } -+ -+ if (mlen == (size_t) -2) -+ /* Offset points inside multibyte character: no good. */ -+ break; -+ -+ beg += mlen; -+ bytes_left -= mlen; -+ } -+ -+ if (bytes_left) -+ continue; - } --#ifdef MBS_SUPPORT -- if (MB_CUR_MAX > 1 && mb_properties[offset+beg-buf] == 0) -- continue; /* It is a part of multibyte character. */ -+ else - #endif /* MBS_SUPPORT */ - beg += offset; -- len = kwsmatch.size[0]; -- if (exact) -- { -- *match_size = len; - #ifdef MBS_SUPPORT -- if (MB_CUR_MAX > 1) -- free (mb_properties); -+ /* For f_i_multibyte, the string at beg now matches first 3 chars of -+ one of the search strings (less if there are shorter search strings). -+ See if this is a real match. */ -+ if (f_i_multibyte -+ && Fimbexec (beg, buf + size - beg, &kwsmatch.size[0], exact)) -+ goto next_char; - #endif /* MBS_SUPPORT */ -- return beg - buf; -- } -+ len = kwsmatch.size[0]; -+ if (exact && !match_words) -+ goto success_in_beg_and_len; - if (match_lines) - { - if (beg > buf && beg[-1] != eol) -- continue; -+ goto next_char; - if (beg + len < buf + size && beg[len] != eol) -- continue; -+ goto next_char; - goto success; - } - else if (match_words) -- for (try = beg; len; ) -- { -- if (try > buf && WCHAR((unsigned char) try[-1])) -- break; -- if (try + len < buf + size && WCHAR((unsigned char) try[len])) -- { -- offset = kwsexec (kwset, beg, --len, &kwsmatch); -- if (offset == (size_t) -1) -- { -+ { -+ while (len) -+ { -+ int word_match = 0; -+ if (beg > buf) -+ { - #ifdef MBS_SUPPORT -- if (MB_CUR_MAX > 1) -- free (mb_properties); -+ if (mb_cur_max > 1) -+ { -+ const char *s; -+ int mr; -+ wchar_t pwc; -+ -+ if (using_utf8) -+ { -+ s = beg - 1; -+ while (s > buf -+ && (unsigned char) *s >= 0x80 -+ && (unsigned char) *s <= 0xbf) -+ --s; -+ } -+ else -+ s = last_char; -+ mr = mbtowc (&pwc, s, beg - s); -+ if (mr <= 0) -+ memset (&mbs, '\0', sizeof (mbstate_t)); -+ else if ((iswalnum (pwc) || pwc == L'_') -+ && mr == (int) (beg - s)) -+ goto next_char; -+ } -+ else - #endif /* MBS_SUPPORT */ -- return offset; -- } -- try = beg + offset; -- len = kwsmatch.size[0]; -- } -- else -- goto success; -- } -+ if (WCHAR ((unsigned char) beg[-1])) -+ goto next_char; -+ } -+#ifdef MBS_SUPPORT -+ if (mb_cur_max > 1) -+ { -+ wchar_t nwc; -+ int mr; -+ -+ mr = mbtowc (&nwc, beg + len, buf + size - beg - len); -+ if (mr <= 0) -+ { -+ memset (&mbs, '\0', sizeof (mbstate_t)); -+ word_match = 1; -+ } -+ else if (!iswalnum (nwc) && nwc != L'_') -+ word_match = 1; -+ } -+ else -+#endif /* MBS_SUPPORT */ -+ if (beg + len >= buf + size || !WCHAR ((unsigned char) beg[len])) -+ word_match = 1; -+ if (word_match) -+ { -+ if (!exact) -+ /* Returns the whole line now we know there's a word match. */ -+ goto success; -+ else -+ /* Returns just this word match. */ -+ goto success_in_beg_and_len; -+ } -+ if (len > 0) -+ { -+ /* Try a shorter length anchored at the same place. */ -+ --len; -+ offset = kwsexec (kwset, beg, len, &kwsmatch); -+ -+ if (offset == -1) -+ goto next_char; /* Try a different anchor. */ -+#ifdef MBS_SUPPORT -+ if (mb_cur_max > 1 && !using_utf8) -+ { -+ size_t bytes_left = offset; -+ while (bytes_left) -+ { -+ size_t mlen = mbrlen (beg, bytes_left, &mbs); -+ -+ last_char = beg; -+ if (mlen == (size_t) -1 || mlen == 0) -+ { -+ /* Incomplete character: treat as single-byte. */ -+ memset (&mbs, '\0', sizeof (mbstate_t)); -+ beg++; -+ bytes_left--; -+ continue; -+ } -+ -+ if (mlen == (size_t) -2) -+ { -+ /* Offset points inside multibyte character: -+ * no good. */ -+ break; -+ } -+ -+ beg += mlen; -+ bytes_left -= mlen; -+ } -+ -+ if (bytes_left) -+ { -+ memset (&mbs, '\0', sizeof (mbstate_t)); -+ goto next_char; /* Try a different anchor. */ -+ } -+ } -+ else -+#endif /* MBS_SUPPORT */ -+ beg += offset; -+#ifdef MBS_SUPPORT -+ /* The string at beg now matches first 3 chars of one of -+ the search strings (less if there are shorter search -+ strings). See if this is a real match. */ -+ if (f_i_multibyte -+ && Fimbexec (beg, len - offset, &kwsmatch.size[0], -+ exact)) -+ goto next_char; -+#endif /* MBS_SUPPORT */ -+ len = kwsmatch.size[0]; -+ } -+ } -+ } - else - goto success; -- } -- -+next_char:; - #ifdef MBS_SUPPORT -- if (MB_CUR_MAX > 1) -- free (mb_properties); -+ /* Advance to next character. For MB_CUR_MAX == 1 case this is handled -+ by ++beg above. */ -+ if (mb_cur_max > 1) -+ { -+ if (using_utf8) -+ { -+ unsigned char c = *beg; -+ if (c >= 0xc2) -+ { -+ if (c < 0xe0) -+ ++beg; -+ else if (c < 0xf0) -+ beg += 2; -+ else if (c < 0xf8) -+ beg += 3; -+ else if (c < 0xfc) -+ beg += 4; -+ else if (c < 0xfe) -+ beg += 5; -+ } -+ } -+ else -+ { -+ size_t l = mbrlen (beg, buf + size - beg, &mbs); -+ -+ last_char = beg; -+ if (l + 2 >= 2) -+ beg += l - 1; -+ else -+ memset (&mbs, '\0', sizeof (mbstate_t)); -+ } -+ } - #endif /* MBS_SUPPORT */ -+ } -+ -+ failure: - return -1; - - success: -+#ifdef MBS_SUPPORT -+ if (mb_cur_max > 1 && !using_utf8) -+ { -+ end = beg + len; -+ while (end < buf + size) -+ { -+ size_t mlen = mbrlen (end, buf + size - end, &mbs); -+ if (mlen == (size_t) -1 || mlen == (size_t) -2 || mlen == 0) -+ { -+ memset (&mbs, '\0', sizeof (mbstate_t)); -+ mlen = 1; -+ } -+ if (mlen == 1 && *end == eol) -+ break; -+ -+ end += mlen; -+ } -+ } -+ else -+#endif /* MBS_SUPPORT */ - end = memchr (beg + len, eol, (buf + size) - (beg + len)); -+ - end++; - while (buf < beg && beg[-1] != eol) - --beg; -- *match_size = end - beg; --#ifdef MBS_SUPPORT -- if (MB_CUR_MAX > 1) -- free (mb_properties); --#endif /* MBS_SUPPORT */ -+ len = end - beg; -+ /* FALLTHROUGH */ -+ -+ success_in_beg_and_len: -+ *match_size = len; - return beg - buf; - } - -@@ -701,8 +1267,9 @@ Pexecute (char const *buf, size_t size, size_t *match_size, int exact) - char eol = eolbyte; - if (!exact) - { -- end = memchr (end, eol, buflim - end); -- end++; -+ while (end < buflim) -+ if (*end++ == eol) -+ break; - while (buf < beg && beg[-1] != eol) - --beg; - } --- -1.8.4.2 - diff --git a/meta/recipes-extended/grep/grep-2.5.1a/grep_fix_for_automake-1.12.patch b/meta/recipes-extended/grep/grep-2.5.1a/grep_fix_for_automake-1.12.patch deleted file mode 100644 index 3ccce5fc36..0000000000 --- a/meta/recipes-extended/grep/grep-2.5.1a/grep_fix_for_automake-1.12.patch +++ /dev/null @@ -1,52 +0,0 @@ -Upstream-Status: Pending - -automake 1.12 has depricated automatic de-ANSI-fication support - -this patch avoids these kinds of errors: - -| configure.in:33: error: automatic de-ANSI-fication support has been removed -| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12/protos.m4:12: AM_C_PROTOTYPES is expanded from... -| configure.in:33: the top level -| autom4te: m4 failed with exit status: 1 -... -| lib/Makefile.am:2: error: automatic de-ANSI-fication support has been removed -| src/Makefile.am:2: error: automatic de-ANSI-fication support has been removed -| autoreconf: automake failed with exit status: 1 - -Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> -2012/05/04 - -Index: grep-2.5.1a/configure.in -=================================================================== ---- grep-2.5.1a.orig/configure.in -+++ grep-2.5.1a/configure.in -@@ -30,7 +30,6 @@ AC_PROG_RANLIB - - dnl Checks for typedefs, structures, and compiler characteristics. - AC_SYS_LARGEFILE --AM_C_PROTOTYPES - AC_TYPE_SIZE_T - AC_CHECK_TYPE(ssize_t, int) - AC_C_CONST -Index: grep-2.5.1a/lib/Makefile.am -=================================================================== ---- grep-2.5.1a.orig/lib/Makefile.am -+++ grep-2.5.1a/lib/Makefile.am -@@ -1,5 +1,5 @@ - # --AUTOMAKE_OPTIONS = ../src/ansi2knr -+AUTOMAKE_OPTIONS = - - SUBDIRS = posix - -Index: grep-2.5.1a/src/Makefile.am -=================================================================== ---- grep-2.5.1a.orig/src/Makefile.am -+++ grep-2.5.1a/src/Makefile.am -@@ -1,5 +1,5 @@ - ## Process this file with automake to create Makefile.in --AUTOMAKE_OPTIONS = ansi2knr no-dependencies -+AUTOMAKE_OPTIONS = no-dependencies - - LN = ln - diff --git a/meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch b/meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch deleted file mode 100644 index de054fc755..0000000000 --- a/meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch +++ /dev/null @@ -1,55 +0,0 @@ -Upstream-Status: Inappropriate [licensing] - -# Fix to use mempcpy instead of __mempcpy. This is needed for uclibc which -# doesn't define __mempcpy, only mempcpy. Since both uclibc and glibc have -# mempcpy, we'll just use that instead. -# Patch source: OpenEmbedded - -Index: grep-2.5.1/intl/localealias.c -=================================================================== ---- grep-2.5.1.orig/intl/localealias.c 2002-03-14 00:39:06.000000000 +1100 -+++ grep-2.5.1/intl/localealias.c 2007-05-17 13:53:58.000000000 +1000 -@@ -65,7 +65,7 @@ - # define strcasecmp __strcasecmp - - # ifndef mempcpy --# define mempcpy __mempcpy -+# error "mempcpy not detected" - # endif - # define HAVE_MEMPCPY 1 - # define HAVE___FSETLOCKING 1 -Index: grep-2.5.1/lib/getopt.c -=================================================================== ---- grep-2.5.1.orig/lib/getopt.c 2001-03-04 16:33:12.000000000 +1100 -+++ grep-2.5.1/lib/getopt.c 2007-05-17 13:51:44.000000000 +1000 -@@ -326,7 +326,7 @@ - nonoption_flags_len = nonoption_flags_max_len = 0; - else - { -- memset (__mempcpy (new_str, __getopt_nonoption_flags, -+ memset (mempcpy (new_str, __getopt_nonoption_flags, - nonoption_flags_max_len), - '\0', top + 1 - nonoption_flags_max_len); - nonoption_flags_max_len = top + 1; -@@ -437,7 +437,7 @@ - if (__getopt_nonoption_flags == NULL) - nonoption_flags_max_len = -1; - else -- memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), -+ memset (mempcpy (__getopt_nonoption_flags, orig_str, len), - '\0', nonoption_flags_max_len - len); - } - } -Index: grep-2.5.1/lib/regex.c -=================================================================== ---- grep-2.5.1.orig/lib/regex.c 2001-04-03 04:04:45.000000000 +1000 -+++ grep-2.5.1/lib/regex.c 2007-05-17 13:51:48.000000000 +1000 -@@ -7842,7 +7842,7 @@ - if (msg_size > errbuf_size) - { - #if defined HAVE_MEMPCPY || defined _LIBC -- *((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0'; -+ *((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0'; - #else - memcpy (errbuf, msg, errbuf_size - 1); - errbuf[errbuf_size - 1] = 0; diff --git a/meta/recipes-extended/grep/grep/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/grep/grep/0001-Unset-need_charset_alias-when-building-for-musl.patch deleted file mode 100644 index abdfa2a50b..0000000000 --- a/meta/recipes-extended/grep/grep/0001-Unset-need_charset_alias-when-building-for-musl.patch +++ /dev/null @@ -1,33 +0,0 @@ -From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 13 Apr 2015 17:02:13 -0700 -Subject: [PATCH] Unset need_charset_alias when building for musl - -localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 -which actually shoudl be fixed in gnulib and then all downstream -projects will get it eventually. For now we apply the fix to -coreutils - -Upstream-Status: Not Required - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - lib/gnulib.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/gnulib.mk b/lib/gnulib.mk -index e1d74db..c0e92dd 100644 ---- a/lib/gnulib.mk -+++ b/lib/gnulib.mk -@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local - case '$(host_os)' in \ - darwin[56]*) \ - need_charset_alias=true ;; \ -- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ -+ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ - need_charset_alias=false ;; \ - *) \ - need_charset_alias=true ;; \ --- -2.1.4 - diff --git a/meta/recipes-extended/grep/grep/grep-fix-CVE-2015-1345.patch b/meta/recipes-extended/grep/grep/grep-fix-CVE-2015-1345.patch deleted file mode 100644 index e88a9880f1..0000000000 --- a/meta/recipes-extended/grep/grep/grep-fix-CVE-2015-1345.patch +++ /dev/null @@ -1,154 +0,0 @@ -Upstream-Status: Backport - -Backport patch to fix CVE-2015-1345. -http://git.savannah.gnu.org/cgit/grep.git/commit/?id=83a95bd - -Signed-off-by: Kai Kang <kai.kang@windriver.com> ---- -From 83a95bd8c8561875b948cadd417c653dbe7ef2e2 Mon Sep 17 00:00:00 2001 -From: Yuliy Pisetsky <ypisetsky@fb.com> -Date: Thu, 1 Jan 2015 15:36:55 -0800 -Subject: [PATCH] grep -F: fix a heap buffer (read) overrun - -grep's read buffer is often filled to its full size, except when -reading the final buffer of a file. In that case, the number of -bytes read may be far less than the size of the buffer. However, for -certain unusual pattern/text combinations, grep -F would mistakenly -examine bytes in that uninitialized region of memory when searching -for a match. With carefully chosen inputs, one can cause grep -F to -read beyond the end of that buffer altogether. This problem arose via -commit v2.18-90-g73893ff with the introduction of a more efficient -heuristic using what is now the memchr_kwset function. The use of -that function in bmexec_trans could leave TP much larger than EP, -and the subsequent call to bm_delta2_search would mistakenly access -beyond end of the main input read buffer. - -* src/kwset.c (bmexec_trans): When TP reaches or exceeds EP, -do not call bm_delta2_search. -* tests/kwset-abuse: New file. -* tests/Makefile.am (TESTS): Add it. -* THANKS.in: Update. -* NEWS (Bug fixes): Mention it. - -Prior to this patch, this command would trigger a UMR: - - printf %0360db 0 | valgrind src/grep -F $(printf %019dXb 0) - - Use of uninitialised value of size 8 - at 0x4142BE: bmexec_trans (kwset.c:657) - by 0x4143CA: bmexec (kwset.c:678) - by 0x414973: kwsexec (kwset.c:848) - by 0x414DC4: Fexecute (kwsearch.c:128) - by 0x404E2E: grepbuf (grep.c:1238) - by 0x4054BF: grep (grep.c:1417) - by 0x405CEB: grepdesc (grep.c:1645) - by 0x405EC1: grep_command_line_arg (grep.c:1692) - by 0x4077D4: main (grep.c:2570) - -See the accompanying test for how to trigger the heap buffer overrun. - -Thanks to Nima Aghdaii for testing and finding numerous -ways to break early iterations of this patch. ---- - NEWS | 5 +++++ - THANKS.in | 1 + - src/kwset.c | 2 ++ - tests/Makefile.am | 1 + - tests/kwset-abuse | 32 ++++++++++++++++++++++++++++++++ - 5 files changed, 41 insertions(+) - create mode 100755 tests/kwset-abuse - -diff --git a/NEWS b/NEWS -index 975440d..3835d8d 100644 ---- a/NEWS -+++ b/NEWS -@@ -2,6 +2,11 @@ GNU grep NEWS -*- outline -*- - - * Noteworthy changes in release ?.? (????-??-??) [?] - -+** Bug fixes -+ -+ grep no longer reads from uninitialized memory or from beyond the end -+ of the heap-allocated input buffer. -+ - - * Noteworthy changes in release 2.21 (2014-11-23) [stable] - -diff --git a/THANKS.in b/THANKS.in -index aeaf516..624478d 100644 ---- a/THANKS.in -+++ b/THANKS.in -@@ -62,6 +62,7 @@ Michael Aichlmayr mikla@nx.com - Miles Bader miles@ccs.mt.nec.co.jp - Mirraz Mirraz mirraz1@rambler.ru - Nelson H. F. Beebe beebe@math.utah.edu -+Nima Aghdaii naghdaii@fb.com - Olaf Kirch okir@ns.lst.de - Paul Kimoto kimoto@spacenet.tn.cornell.edu - Péter Radics mitchnull@gmail.com -diff --git a/src/kwset.c b/src/kwset.c -index 4003c8d..376f7c3 100644 ---- a/src/kwset.c -+++ b/src/kwset.c -@@ -643,6 +643,8 @@ bmexec_trans (kwset_t kwset, char const *text, size_t size) - if (! tp) - return -1; - tp++; -+ if (ep <= tp) -+ break; - } - } - } -diff --git a/tests/Makefile.am b/tests/Makefile.am -index 2cba2cd..0508cd2 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -75,6 +75,7 @@ TESTS = \ - inconsistent-range \ - invalid-multibyte-infloop \ - khadafy \ -+ kwset-abuse \ - long-line-vs-2GiB-read \ - match-lines \ - max-count-overread \ -diff --git a/tests/kwset-abuse b/tests/kwset-abuse -new file mode 100755 -index 0000000..6d8ec0c ---- /dev/null -+++ b/tests/kwset-abuse -@@ -0,0 +1,32 @@ -+#! /bin/sh -+# Evoke a segfault in a hard-to-reach code path of kwset.c. -+# This bug affected grep versions 2.19 through 2.21. -+# -+# Copyright (C) 2015 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 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 <http://www.gnu.org/licenses/>. -+ -+. "${srcdir=.}/init.sh"; path_prepend_ ../src -+ -+fail=0 -+ -+# This test case chooses a haystack of size 260,000, since prodding -+# with gdb showed a reallocation slightly larger than that in fillbuf. -+# To reach the buggy code, the needle must have length < 1/11 that of -+# the haystack, and 10,000 is a nice round number that fits the bill. -+printf '%0260000dXy\n' 0 | grep -F $(printf %010000dy 0) -+ -+test $? = 1 || fail=1 -+ -+Exit $fail --- -2.4.1 - diff --git a/meta/recipes-extended/grep/grep_2.21.bb b/meta/recipes-extended/grep/grep_2.21.bb deleted file mode 100644 index 3661098c51..0000000000 --- a/meta/recipes-extended/grep/grep_2.21.bb +++ /dev/null @@ -1,42 +0,0 @@ -SUMMARY = "GNU grep utility" -HOMEPAGE = "http://savannah.gnu.org/projects/grep/" -BUGTRACKER = "http://savannah.gnu.org/bugs/?group=grep" -SECTION = "console/utils" -LICENSE = "GPLv3" -LIC_FILES_CHKSUM = "file://COPYING;md5=8006d9c814277c1bfc4ca22af94b59ee" - -SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz \ - file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ - file://grep-fix-CVE-2015-1345.patch \ - " - -SRC_URI[md5sum] = "43c48064d6409862b8a850db83c8038a" -SRC_URI[sha256sum] = "5244a11c00dee8e7e5e714b9aaa053ac6cbfa27e104abee20d3c778e4bb0e5de" - -inherit autotools gettext texinfo - -EXTRA_OECONF = "--disable-perl-regexp" - -do_configure_prepend () { - rm -f ${S}/m4/init.m4 -} - -do_install () { - autotools_do_install - 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}/ -} - -inherit update-alternatives - -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" - -export CONFIG_SHELL="/bin/sh" diff --git a/meta/recipes-extended/grep/grep_2.5.1a.bb b/meta/recipes-extended/grep/grep_2.5.1a.bb deleted file mode 100644 index 5a2da28327..0000000000 --- a/meta/recipes-extended/grep/grep_2.5.1a.bb +++ /dev/null @@ -1,56 +0,0 @@ -SUMMARY = "Pattern matching utilities" -DESCRIPTION = "The GNU versions of commonly used grep utilities. The grep command searches one or more input \ -files for lines containing a match to a specified pattern." -SECTION = "console/utils" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" - -PR = "r2" - -SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.bz2 \ - file://uclibc-fix.patch \ - file://grep_fix_for_automake-1.12.patch \ - file://gettext.patch \ - file://fix64-int-to-pointer.patch \ - file://Makevars \ - file://grep-CVE-2012-5667.patch \ - file://fix-for-texinfo-5.1.patch \ - file://grep-egrep-fgrep-Fix-LSB-NG-cases.patch \ - " - -SRC_URI[md5sum] = "52202fe462770fa6be1bb667bd6cf30c" -SRC_URI[sha256sum] = "38c8a2bb9223d1fb1b10bdd607cf44830afc92fd451ac4cd07619bf92bdd3132" - -inherit autotools gettext texinfo - -EXTRA_OECONF_INCLUDED_REGEX = "--without-included-regex" -EXTRA_OECONF_INCLUDED_REGEX_libc-musl = "--with-included-regex" - -EXTRA_OECONF = "--disable-perl-regexp \ - ${EXTRA_OECONF_INCLUDED_REGEX}" - -CFLAGS += "-D PROTOTYPES" -do_configure_prepend () { - rm -f ${S}/m4/init.m4 - cp -f ${WORKDIR}/Makevars ${S}/po/ -} - -do_install () { - autotools_do_install - 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}/ -} - -inherit update-alternatives - -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" - -export CONFIG_SHELL="/bin/sh" diff --git a/meta/recipes-extended/grep/grep_3.4.bb b/meta/recipes-extended/grep/grep_3.4.bb new file mode 100644 index 0000000000..e176dd727b --- /dev/null +++ b/meta/recipes-extended/grep/grep_3.4.bb @@ -0,0 +1,44 @@ +SUMMARY = "GNU grep utility" +HOMEPAGE = "http://savannah.gnu.org/projects/grep/" +BUGTRACKER = "http://savannah.gnu.org/bugs/?group=grep" +SECTION = "console/utils" +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464" + +SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz" + +SRC_URI[md5sum] = "111b117d22d6a7d049d6ae7505e9c4d2" +SRC_URI[sha256sum] = "58e6751c41a7c25bfc6e9363a41786cff3ba5709cf11d5ad903cf7cce31cc3fb" + +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 +} + +inherit update-alternatives + +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" diff --git a/meta/recipes-extended/groff/files/0001-Include-config.h.patch b/meta/recipes-extended/groff/files/0001-Include-config.h.patch new file mode 100644 index 0000000000..348a61d9df --- /dev/null +++ b/meta/recipes-extended/groff/files/0001-Include-config.h.patch @@ -0,0 +1,1228 @@ +From 6cfa9f8126c1d6ec26f120d273e714fb19108873 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 4 Aug 2019 16:32:41 -0700 +Subject: [PATCH] Include config.h + +This helps avoid the include conflicts where <stdlib.h> is including +<math.h> and since -I./lib is used and a local math.h wrapper is +residing in there, the build breaks since stdlib.h really wants the +standard system math.h to be included, this ensures that right macros +are predefined and included before stdlib.h is included + +fixes +In file included from src/libs/libgroff/assert.cpp:20: +In file included from TOPDIR/build/tmp/work/aarch64-yoe-linux-musl/groff/1.22.4-r0/recipe-sysroot/usr/include/c++/v1/stdlib.h:100: +./lib/math.h:38:3: error: "Please include config.h first." + #error "Please include config.h first." + ^ +./lib/math.h:40:1: error: unknown type name '_GL_INLINE_HEADER_BEGIN' + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/libs/libgroff/assert.cpp | 4 + + src/libs/libgroff/curtime.cpp | 4 + + src/libs/libgroff/device.cpp | 4 + + src/libs/libgroff/error.cpp | 4 + + src/libs/libgroff/fatal.cpp | 4 + + src/libs/libgroff/string.cpp | 4 + + src/libs/libgroff/strsave.cpp | 4 + + src/preproc/eqn/eqn.cpp | 450 ++++++++++++++++++---------------- + src/preproc/eqn/eqn.hpp | 12 +- + src/preproc/eqn/eqn.ypp | 4 + + src/preproc/eqn/other.cpp | 4 + + src/preproc/eqn/text.cpp | 4 + + src/preproc/pic/object.cpp | 4 + + 13 files changed, 285 insertions(+), 221 deletions(-) + +diff --git a/src/libs/libgroff/assert.cpp b/src/libs/libgroff/assert.cpp +index aceed05..97780d6 100644 +--- a/src/libs/libgroff/assert.cpp ++++ b/src/libs/libgroff/assert.cpp +@@ -16,6 +16,10 @@ for more details. + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + ++#if HAVE_CONFIG_H ++# include <config.h> ++#endif ++ + #include <stdio.h> + #include <stdlib.h> + #include "assert.h" +diff --git a/src/libs/libgroff/curtime.cpp b/src/libs/libgroff/curtime.cpp +index 72fe067..9ddba08 100644 +--- a/src/libs/libgroff/curtime.cpp ++++ b/src/libs/libgroff/curtime.cpp +@@ -15,6 +15,10 @@ for more details. + The GNU General Public License version 2 (GPL2) is available in the + internet at <http://www.gnu.org/licenses/gpl-2.0.txt>. */ + ++#if HAVE_CONFIG_H ++# include <config.h> ++#endif ++ + #include <errno.h> + #include <limits.h> + #include <stdlib.h> +diff --git a/src/libs/libgroff/device.cpp b/src/libs/libgroff/device.cpp +index 0d28b85..c211f85 100644 +--- a/src/libs/libgroff/device.cpp ++++ b/src/libs/libgroff/device.cpp +@@ -17,6 +17,10 @@ for more details. + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + ++#if HAVE_CONFIG_H ++# include <config.h> ++#endif ++ + #include <stdlib.h> + #include "device.h" + #include "defs.h" +diff --git a/src/libs/libgroff/error.cpp b/src/libs/libgroff/error.cpp +index 9a18803..7b63d3d 100644 +--- a/src/libs/libgroff/error.cpp ++++ b/src/libs/libgroff/error.cpp +@@ -17,6 +17,10 @@ for more details. + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + ++#if HAVE_CONFIG_H ++# include <config.h> ++#endif ++ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> +diff --git a/src/libs/libgroff/fatal.cpp b/src/libs/libgroff/fatal.cpp +index c0dcb35..fd6003e 100644 +--- a/src/libs/libgroff/fatal.cpp ++++ b/src/libs/libgroff/fatal.cpp +@@ -16,6 +16,10 @@ for more details. + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + ++#if HAVE_CONFIG_H ++# include <config.h> ++#endif ++ + #include <stdlib.h> + + #define FATAL_ERROR_EXIT_CODE 3 +diff --git a/src/libs/libgroff/string.cpp b/src/libs/libgroff/string.cpp +index 46c015c..449f3a6 100644 +--- a/src/libs/libgroff/string.cpp ++++ b/src/libs/libgroff/string.cpp +@@ -17,6 +17,10 @@ for more details. + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + ++#if HAVE_CONFIG_H ++# include <config.h> ++#endif ++ + #include <stdlib.h> + + #include "lib.h" +diff --git a/src/libs/libgroff/strsave.cpp b/src/libs/libgroff/strsave.cpp +index f95c05e..d875045 100644 +--- a/src/libs/libgroff/strsave.cpp ++++ b/src/libs/libgroff/strsave.cpp +@@ -17,6 +17,10 @@ for more details. + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + ++#if HAVE_CONFIG_H ++# include <config.h> ++#endif ++ + #include <string.h> + #include <stdlib.h> + +diff --git a/src/preproc/eqn/eqn.cpp b/src/preproc/eqn/eqn.cpp +index 4ede465..fdd9484 100644 +--- a/src/preproc/eqn/eqn.cpp ++++ b/src/preproc/eqn/eqn.cpp +@@ -1,8 +1,9 @@ +-/* A Bison parser, made by GNU Bison 3.2. */ ++/* A Bison parser, made by GNU Bison 3.4.1. */ + + /* Bison implementation for Yacc-like parsers in C + +- Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc. ++ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 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 +@@ -47,7 +48,7 @@ + #define YYBISON 1 + + /* Bison version. */ +-#define YYBISON_VERSION "3.2" ++#define YYBISON_VERSION "3.4.1" + + /* Skeleton name. */ + #define YYSKELETON_NAME "yacc.c" +@@ -65,7 +66,11 @@ + + + /* First part of user prologue. */ +-#line 18 "../src/preproc/eqn/eqn.ypp" /* yacc.c:338 */ ++#line 18 "src/preproc/eqn/eqn.ypp" ++ ++#if HAVE_CONFIG_H ++# include <config.h> ++#endif + + #include <stdio.h> + #include <string.h> +@@ -77,7 +82,8 @@ extern int non_empty_flag; + int yylex(); + void yyerror(const char *); + +-#line 81 "src/preproc/eqn/eqn.cpp" /* yacc.c:338 */ ++#line 86 "src/preproc/eqn/eqn.cpp" ++ + # ifndef YY_NULLPTR + # if defined __cplusplus + # if 201103L <= __cplusplus +@@ -98,8 +104,8 @@ void yyerror(const char *); + # define YYERROR_VERBOSE 0 + #endif + +-/* In a future release of Bison, this section will be replaced +- by #include "y.tab.h". */ ++/* Use api.header.include to #include this header ++ instead of duplicating it here. */ + #ifndef YY_YY_SRC_PREPROC_EQN_EQN_HPP_INCLUDED + # define YY_YY_SRC_PREPROC_EQN_EQN_HPP_INCLUDED + /* Debug traces. */ +@@ -237,10 +243,9 @@ extern int yydebug; + + /* Value type. */ + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +- + union YYSTYPE + { +-#line 30 "../src/preproc/eqn/eqn.ypp" /* yacc.c:353 */ ++#line 34 "src/preproc/eqn/eqn.ypp" + + char *str; + box *b; +@@ -249,9 +254,9 @@ union YYSTYPE + int n; + column *col; + +-#line 253 "src/preproc/eqn/eqn.cpp" /* yacc.c:353 */ +-}; ++#line 258 "src/preproc/eqn/eqn.cpp" + ++}; + typedef union YYSTYPE YYSTYPE; + # define YYSTYPE_IS_TRIVIAL 1 + # define YYSTYPE_IS_DECLARED 1 +@@ -366,6 +371,8 @@ typedef short yytype_int16; + #endif + + ++#define YY_ASSERT(E) ((void) (0 && (E))) ++ + #if ! defined yyoverflow || YYERROR_VERBOSE + + /* The parser invokes alloca or malloc; define the necessary symbols. */ +@@ -508,16 +515,16 @@ union yyalloc + /* YYNSTATES -- Number of states. */ + #define YYNSTATES 142 + +-/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned +- by yylex, with out-of-bounds checking. */ + #define YYUNDEFTOK 2 + #define YYMAXUTOK 315 + ++/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM ++ as returned by yylex, with out-of-bounds checking. */ + #define YYTRANSLATE(YYX) \ + ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + + /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM +- as returned by yylex, without out-of-bounds checking. */ ++ as returned by yylex. */ + static const yytype_uint8 yytranslate[] = + { + 0, 2, 2, 2, 2, 2, 2, 2, 2, 63, +@@ -558,14 +565,14 @@ static const yytype_uint8 yytranslate[] = + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ + static const yytype_uint16 yyrline[] = + { +- 0, 121, 121, 123, 128, 130, 141, 143, 145, 150, +- 152, 154, 156, 158, 163, 165, 167, 169, 174, 176, +- 181, 183, 185, 190, 192, 194, 196, 198, 200, 202, +- 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, +- 224, 226, 228, 230, 232, 234, 236, 238, 240, 242, +- 244, 246, 248, 250, 252, 254, 259, 269, 271, 276, +- 278, 283, 285, 290, 292, 297, 299, 304, 306, 308, +- 310, 314, 316, 321, 323, 325 ++ 0, 125, 125, 127, 132, 134, 145, 147, 149, 154, ++ 156, 158, 160, 162, 167, 169, 171, 173, 178, 180, ++ 185, 187, 189, 194, 196, 198, 200, 202, 204, 206, ++ 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, ++ 228, 230, 232, 234, 236, 238, 240, 242, 244, 246, ++ 248, 250, 252, 254, 256, 258, 263, 273, 275, 280, ++ 282, 287, 289, 294, 296, 301, 303, 308, 310, 312, ++ 314, 318, 320, 325, 327, 329 + }; + #endif + +@@ -818,22 +825,22 @@ static const yytype_uint8 yyr2[] = + + #define YYRECOVERING() (!!yyerrstatus) + +-#define YYBACKUP(Token, Value) \ +-do \ +- if (yychar == YYEMPTY) \ +- { \ +- yychar = (Token); \ +- yylval = (Value); \ +- YYPOPSTACK (yylen); \ +- yystate = *yyssp; \ +- goto yybackup; \ +- } \ +- else \ +- { \ +- yyerror (YY_("syntax error: cannot back up")); \ +- YYERROR; \ +- } \ +-while (0) ++#define YYBACKUP(Token, Value) \ ++ do \ ++ if (yychar == YYEMPTY) \ ++ { \ ++ yychar = (Token); \ ++ yylval = (Value); \ ++ YYPOPSTACK (yylen); \ ++ yystate = *yyssp; \ ++ goto yybackup; \ ++ } \ ++ else \ ++ { \ ++ yyerror (YY_("syntax error: cannot back up")); \ ++ YYERROR; \ ++ } \ ++ while (0) + + /* Error token number */ + #define YYTERROR 1 +@@ -948,7 +955,7 @@ yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], +- &(yyvsp[(yyi + 1) - (yynrhs)]) ++ &yyvsp[(yyi + 1) - (yynrhs)] + ); + YYFPRINTF (stderr, "\n"); + } +@@ -1052,7 +1059,10 @@ yytnamerr (char *yyres, const char *yystr) + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; +- /* Fall through. */ ++ else ++ goto append; ++ ++ append: + default: + if (yyres) + yyres[yyn] = *yyp; +@@ -1148,10 +1158,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yyarg[yycount++] = yytname[yyx]; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); +- if (! (yysize <= yysize1 +- && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) ++ if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) ++ yysize = yysize1; ++ else + return 2; +- yysize = yysize1; + } + } + } +@@ -1175,9 +1185,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); +- if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) ++ if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) ++ yysize = yysize1; ++ else + return 2; +- yysize = yysize1; + } + + if (*yymsg_alloc < yysize) +@@ -1303,23 +1314,33 @@ yyparse (void) + yychar = YYEMPTY; /* Cause a token to be read. */ + goto yysetstate; + ++ + /*------------------------------------------------------------. +-| yynewstate -- Push a new state, which is found in yystate. | ++| yynewstate -- push a new state, which is found in yystate. | + `------------------------------------------------------------*/ +- yynewstate: ++yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + +- yysetstate: ++ ++/*--------------------------------------------------------------------. ++| yynewstate -- set current state (the top of the stack) to yystate. | ++`--------------------------------------------------------------------*/ ++yysetstate: ++ YYDPRINTF ((stderr, "Entering state %d\n", yystate)); ++ YY_ASSERT (0 <= yystate && yystate < YYNSTATES); + *yyssp = (yytype_int16) yystate; + + if (yyss + yystacksize - 1 <= yyssp) ++#if !defined yyoverflow && !defined YYSTACK_RELOCATE ++ goto yyexhaustedlab; ++#else + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1); + +-#ifdef yyoverflow ++# if defined yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into +@@ -1338,10 +1359,7 @@ yyparse (void) + yyss = yyss1; + yyvs = yyvs1; + } +-#else /* no yyoverflow */ +-# ifndef YYSTACK_RELOCATE +- goto yyexhaustedlab; +-# else ++# else /* defined YYSTACK_RELOCATE */ + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; +@@ -1357,12 +1375,11 @@ yyparse (void) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); +-# undef YYSTACK_RELOCATE ++# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } + # endif +-#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; +@@ -1373,19 +1390,18 @@ yyparse (void) + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } +- +- YYDPRINTF ((stderr, "Entering state %d\n", yystate)); ++#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ + + if (yystate == YYFINAL) + YYACCEPT; + + goto yybackup; + ++ + /*-----------. + | yybackup. | + `-----------*/ + yybackup: +- + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ + +@@ -1443,7 +1459,6 @@ yybackup: + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END +- + goto yynewstate; + + +@@ -1458,7 +1473,7 @@ yydefault: + + + /*-----------------------------. +-| yyreduce -- Do a reduction. | ++| yyreduce -- do a reduction. | + `-----------------------------*/ + yyreduce: + /* yyn is the number of a rule to reduce with. */ +@@ -1478,20 +1493,20 @@ yyreduce: + YY_REDUCE_PRINT (yyn); + switch (yyn) + { +- case 3: +-#line 124 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++ case 3: ++#line 128 "src/preproc/eqn/eqn.ypp" + { (yyvsp[0].b)->top_level(); non_empty_flag = 1; } +-#line 1485 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1500 "src/preproc/eqn/eqn.cpp" + break; + + case 4: +-#line 129 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 133 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = (yyvsp[0].b); } +-#line 1491 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1506 "src/preproc/eqn/eqn.cpp" + break; + + case 5: +-#line 131 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 135 "src/preproc/eqn/eqn.ypp" + { + list_box *lb = (yyvsp[-1].b)->to_list_box(); + if (!lb) +@@ -1499,436 +1514,437 @@ yyreduce: + lb->append((yyvsp[0].b)); + (yyval.b) = lb; + } +-#line 1503 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1518 "src/preproc/eqn/eqn.cpp" + break; + + case 6: +-#line 142 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 146 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = (yyvsp[0].b); } +-#line 1509 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1524 "src/preproc/eqn/eqn.cpp" + break; + + case 7: +-#line 144 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 148 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = make_mark_box((yyvsp[0].b)); } +-#line 1515 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1530 "src/preproc/eqn/eqn.cpp" + break; + + case 8: +-#line 146 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 150 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = make_lineup_box((yyvsp[0].b)); } +-#line 1521 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1536 "src/preproc/eqn/eqn.cpp" + break; + + case 9: +-#line 151 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 155 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = (yyvsp[0].b); } +-#line 1527 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1542 "src/preproc/eqn/eqn.cpp" + break; + + case 10: +-#line 153 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 157 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = make_limit_box((yyvsp[-2].b), 0, (yyvsp[0].b)); } +-#line 1533 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1548 "src/preproc/eqn/eqn.cpp" + break; + + case 11: +-#line 155 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 159 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = make_limit_box((yyvsp[-2].b), (yyvsp[0].b), 0); } +-#line 1539 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1554 "src/preproc/eqn/eqn.cpp" + break; + + case 12: +-#line 157 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 161 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = make_limit_box((yyvsp[-4].b), (yyvsp[-2].b), (yyvsp[0].b)); } +-#line 1545 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1560 "src/preproc/eqn/eqn.cpp" + break; + + case 13: +-#line 159 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 163 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = make_limit_box((yyvsp[-4].b), make_limit_box((yyvsp[-2].b), (yyvsp[0].b), 0), 0); } +-#line 1551 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1566 "src/preproc/eqn/eqn.cpp" + break; + + case 14: +-#line 164 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 168 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = (yyvsp[0].b); } +-#line 1557 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1572 "src/preproc/eqn/eqn.cpp" + break; + + case 15: +-#line 166 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 170 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = make_sqrt_box((yyvsp[0].b)); } +-#line 1563 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1578 "src/preproc/eqn/eqn.cpp" + break; + + case 16: +-#line 168 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 172 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = make_over_box((yyvsp[-2].b), (yyvsp[0].b)); } +-#line 1569 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1584 "src/preproc/eqn/eqn.cpp" + break; + + case 17: +-#line 170 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 174 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = make_small_over_box((yyvsp[-2].b), (yyvsp[0].b)); } +-#line 1575 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1590 "src/preproc/eqn/eqn.cpp" + break; + + case 18: +-#line 175 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 179 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = (yyvsp[0].b); } +-#line 1581 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1596 "src/preproc/eqn/eqn.cpp" + break; + + case 19: +-#line 177 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 181 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = make_script_box((yyvsp[-2].b), 0, (yyvsp[0].b)); } +-#line 1587 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1602 "src/preproc/eqn/eqn.cpp" + break; + + case 20: +-#line 182 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 186 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = (yyvsp[0].b); } +-#line 1593 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1608 "src/preproc/eqn/eqn.cpp" + break; + + case 21: +-#line 184 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 188 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = make_script_box((yyvsp[-2].b), (yyvsp[0].b), 0); } +-#line 1599 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1614 "src/preproc/eqn/eqn.cpp" + break; + + case 22: +-#line 186 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 190 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = make_script_box((yyvsp[-4].b), (yyvsp[-2].b), (yyvsp[0].b)); } +-#line 1605 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1620 "src/preproc/eqn/eqn.cpp" + break; + + case 23: +-#line 191 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 195 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = split_text((yyvsp[0].str)); } +-#line 1611 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1626 "src/preproc/eqn/eqn.cpp" + break; + + case 24: +-#line 193 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 197 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = new quoted_text_box((yyvsp[0].str)); } +-#line 1617 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1632 "src/preproc/eqn/eqn.cpp" + break; + + case 25: +-#line 195 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 199 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = split_text((yyvsp[0].str)); } +-#line 1623 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1638 "src/preproc/eqn/eqn.cpp" + break; + + case 26: +-#line 197 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 201 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = new quoted_text_box((yyvsp[0].str)); } +-#line 1629 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1644 "src/preproc/eqn/eqn.cpp" + break; + + case 27: +-#line 199 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 203 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = new half_space_box; } +-#line 1635 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1650 "src/preproc/eqn/eqn.cpp" + break; + + case 28: +-#line 201 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 205 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = new space_box; } +-#line 1641 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1656 "src/preproc/eqn/eqn.cpp" + break; + + case 29: +-#line 203 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 207 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = new tab_box; } +-#line 1647 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1662 "src/preproc/eqn/eqn.cpp" + break; + + case 30: +-#line 205 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 209 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = (yyvsp[-1].b); } +-#line 1653 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1668 "src/preproc/eqn/eqn.cpp" + break; + + case 31: +-#line 207 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 211 "src/preproc/eqn/eqn.ypp" + { (yyvsp[0].pb)->set_alignment(CENTER_ALIGN); (yyval.b) = (yyvsp[0].pb); } +-#line 1659 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1674 "src/preproc/eqn/eqn.cpp" + break; + + case 32: +-#line 209 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 213 "src/preproc/eqn/eqn.ypp" + { (yyvsp[0].pb)->set_alignment(LEFT_ALIGN); (yyval.b) = (yyvsp[0].pb); } +-#line 1665 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1680 "src/preproc/eqn/eqn.cpp" + break; + + case 33: +-#line 211 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 215 "src/preproc/eqn/eqn.ypp" + { (yyvsp[0].pb)->set_alignment(RIGHT_ALIGN); (yyval.b) = (yyvsp[0].pb); } +-#line 1671 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1686 "src/preproc/eqn/eqn.cpp" + break; + + case 34: +-#line 213 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 217 "src/preproc/eqn/eqn.ypp" + { (yyvsp[0].pb)->set_alignment(CENTER_ALIGN); (yyval.b) = (yyvsp[0].pb); } +-#line 1677 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1692 "src/preproc/eqn/eqn.cpp" + break; + + case 35: +-#line 215 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 219 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = (yyvsp[-1].mb); } +-#line 1683 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1698 "src/preproc/eqn/eqn.cpp" + break; + + case 36: +-#line 217 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 221 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = make_delim_box((yyvsp[-3].str), (yyvsp[-2].b), (yyvsp[0].str)); } +-#line 1689 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1704 "src/preproc/eqn/eqn.cpp" + break; + + case 37: +-#line 219 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 223 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = make_delim_box((yyvsp[-1].str), (yyvsp[0].b), 0); } +-#line 1695 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1710 "src/preproc/eqn/eqn.cpp" + break; + + case 38: +-#line 221 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 225 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = make_overline_box((yyvsp[-1].b)); } +-#line 1701 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1716 "src/preproc/eqn/eqn.cpp" + break; + + case 39: +-#line 223 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 227 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = make_underline_box((yyvsp[-1].b)); } +-#line 1707 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1722 "src/preproc/eqn/eqn.cpp" + break; + + case 40: +-#line 225 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 229 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = make_prime_box((yyvsp[-1].b)); } +-#line 1713 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1728 "src/preproc/eqn/eqn.cpp" + break; + + case 41: +-#line 227 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 231 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = make_accent_box((yyvsp[-2].b), (yyvsp[0].b)); } +-#line 1719 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1734 "src/preproc/eqn/eqn.cpp" + break; + + case 42: +-#line 229 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 233 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = make_uaccent_box((yyvsp[-2].b), (yyvsp[0].b)); } +-#line 1725 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1740 "src/preproc/eqn/eqn.cpp" + break; + + case 43: +-#line 231 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 235 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = new font_box(strsave(get_grfont()), (yyvsp[0].b)); } +-#line 1731 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1746 "src/preproc/eqn/eqn.cpp" + break; + + case 44: +-#line 233 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 237 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = new font_box(strsave(get_gbfont()), (yyvsp[0].b)); } +-#line 1737 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1752 "src/preproc/eqn/eqn.cpp" + break; + + case 45: +-#line 235 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 239 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = new font_box(strsave(get_gfont()), (yyvsp[0].b)); } +-#line 1743 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1758 "src/preproc/eqn/eqn.cpp" + break; + + case 46: +-#line 237 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 241 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = new fat_box((yyvsp[0].b)); } +-#line 1749 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1764 "src/preproc/eqn/eqn.cpp" + break; + + case 47: +-#line 239 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 243 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = new font_box((yyvsp[-1].str), (yyvsp[0].b)); } +-#line 1755 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1770 "src/preproc/eqn/eqn.cpp" + break; + + case 48: +-#line 241 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 245 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = new size_box((yyvsp[-1].str), (yyvsp[0].b)); } +-#line 1761 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1776 "src/preproc/eqn/eqn.cpp" + break; + + case 49: +-#line 243 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 247 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = new hmotion_box((yyvsp[-1].n), (yyvsp[0].b)); } +-#line 1767 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1782 "src/preproc/eqn/eqn.cpp" + break; + + case 50: +-#line 245 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 249 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = new hmotion_box(-(yyvsp[-1].n), (yyvsp[0].b)); } +-#line 1773 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1788 "src/preproc/eqn/eqn.cpp" + break; + + case 51: +-#line 247 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 251 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = new vmotion_box((yyvsp[-1].n), (yyvsp[0].b)); } +-#line 1779 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1794 "src/preproc/eqn/eqn.cpp" + break; + + case 52: +-#line 249 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 253 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = new vmotion_box(-(yyvsp[-1].n), (yyvsp[0].b)); } +-#line 1785 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1800 "src/preproc/eqn/eqn.cpp" + break; + + case 53: +-#line 251 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 255 "src/preproc/eqn/eqn.ypp" + { (yyvsp[0].b)->set_spacing_type((yyvsp[-1].str)); (yyval.b) = (yyvsp[0].b); } +-#line 1791 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1806 "src/preproc/eqn/eqn.cpp" + break; + + case 54: +-#line 253 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 257 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = new vcenter_box((yyvsp[0].b)); } +-#line 1797 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1812 "src/preproc/eqn/eqn.cpp" + break; + + case 55: +-#line 255 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 259 "src/preproc/eqn/eqn.ypp" + { (yyval.b) = make_special_box((yyvsp[-1].str), (yyvsp[0].b)); } +-#line 1803 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1818 "src/preproc/eqn/eqn.cpp" + break; + + case 56: +-#line 260 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 264 "src/preproc/eqn/eqn.ypp" + { + int n; + if (sscanf((yyvsp[0].str), "%d", &n) == 1) + (yyval.n) = n; + a_delete (yyvsp[0].str); + } +-#line 1814 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1829 "src/preproc/eqn/eqn.cpp" + break; + + case 57: +-#line 270 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 274 "src/preproc/eqn/eqn.ypp" + { (yyval.pb) = new pile_box((yyvsp[0].b)); } +-#line 1820 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1835 "src/preproc/eqn/eqn.cpp" + break; + + case 58: +-#line 272 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 276 "src/preproc/eqn/eqn.ypp" + { (yyvsp[-2].pb)->append((yyvsp[0].b)); (yyval.pb) = (yyvsp[-2].pb); } +-#line 1826 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1841 "src/preproc/eqn/eqn.cpp" + break; + + case 59: +-#line 277 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 281 "src/preproc/eqn/eqn.ypp" + { (yyval.pb) = (yyvsp[-1].pb); } +-#line 1832 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1847 "src/preproc/eqn/eqn.cpp" + break; + + case 60: +-#line 279 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 283 "src/preproc/eqn/eqn.ypp" + { (yyvsp[-1].pb)->set_space((yyvsp[-3].n)); (yyval.pb) = (yyvsp[-1].pb); } +-#line 1838 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1853 "src/preproc/eqn/eqn.cpp" + break; + + case 61: +-#line 284 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 288 "src/preproc/eqn/eqn.ypp" + { (yyval.mb) = new matrix_box((yyvsp[0].col)); } +-#line 1844 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1859 "src/preproc/eqn/eqn.cpp" + break; + + case 62: +-#line 286 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 290 "src/preproc/eqn/eqn.ypp" + { (yyvsp[-1].mb)->append((yyvsp[0].col)); (yyval.mb) = (yyvsp[-1].mb); } +-#line 1850 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1865 "src/preproc/eqn/eqn.cpp" + break; + + case 63: +-#line 291 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 295 "src/preproc/eqn/eqn.ypp" + { (yyval.col) = new column((yyvsp[0].b)); } +-#line 1856 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1871 "src/preproc/eqn/eqn.cpp" + break; + + case 64: +-#line 293 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 297 "src/preproc/eqn/eqn.ypp" + { (yyvsp[-2].col)->append((yyvsp[0].b)); (yyval.col) = (yyvsp[-2].col); } +-#line 1862 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1877 "src/preproc/eqn/eqn.cpp" + break; + + case 65: +-#line 298 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 302 "src/preproc/eqn/eqn.ypp" + { (yyval.col) = (yyvsp[-1].col); } +-#line 1868 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1883 "src/preproc/eqn/eqn.cpp" + break; + + case 66: +-#line 300 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 304 "src/preproc/eqn/eqn.ypp" + { (yyvsp[-1].col)->set_space((yyvsp[-3].n)); (yyval.col) = (yyvsp[-1].col); } +-#line 1874 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1889 "src/preproc/eqn/eqn.cpp" + break; + + case 67: +-#line 305 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 309 "src/preproc/eqn/eqn.ypp" + { (yyvsp[0].col)->set_alignment(CENTER_ALIGN); (yyval.col) = (yyvsp[0].col); } +-#line 1880 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1895 "src/preproc/eqn/eqn.cpp" + break; + + case 68: +-#line 307 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 311 "src/preproc/eqn/eqn.ypp" + { (yyvsp[0].col)->set_alignment(LEFT_ALIGN); (yyval.col) = (yyvsp[0].col); } +-#line 1886 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1901 "src/preproc/eqn/eqn.cpp" + break; + + case 69: +-#line 309 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 313 "src/preproc/eqn/eqn.ypp" + { (yyvsp[0].col)->set_alignment(RIGHT_ALIGN); (yyval.col) = (yyvsp[0].col); } +-#line 1892 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1907 "src/preproc/eqn/eqn.cpp" + break; + + case 70: +-#line 311 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 315 "src/preproc/eqn/eqn.ypp" + { (yyvsp[0].col)->set_alignment(CENTER_ALIGN); (yyval.col) = (yyvsp[0].col); } +-#line 1898 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1913 "src/preproc/eqn/eqn.cpp" + break; + + case 71: +-#line 315 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 319 "src/preproc/eqn/eqn.ypp" + { (yyval.str) = (yyvsp[0].str); } +-#line 1904 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1919 "src/preproc/eqn/eqn.cpp" + break; + + case 72: +-#line 317 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 321 "src/preproc/eqn/eqn.ypp" + { (yyval.str) = (yyvsp[0].str); } +-#line 1910 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1925 "src/preproc/eqn/eqn.cpp" + break; + + case 73: +-#line 322 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 326 "src/preproc/eqn/eqn.ypp" + { (yyval.str) = (yyvsp[0].str); } +-#line 1916 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1931 "src/preproc/eqn/eqn.cpp" + break; + + case 74: +-#line 324 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 328 "src/preproc/eqn/eqn.ypp" + { (yyval.str) = strsave("{"); } +-#line 1922 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1937 "src/preproc/eqn/eqn.cpp" + break; + + case 75: +-#line 326 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1645 */ ++#line 330 "src/preproc/eqn/eqn.ypp" + { (yyval.str) = strsave("}"); } +-#line 1928 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1943 "src/preproc/eqn/eqn.cpp" + break; + + +-#line 1932 "src/preproc/eqn/eqn.cpp" /* yacc.c:1645 */ ++#line 1947 "src/preproc/eqn/eqn.cpp" ++ + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires +@@ -2042,12 +2058,10 @@ yyerrlab: + | yyerrorlab -- error raised explicitly by YYERROR. | + `---------------------------------------------------*/ + yyerrorlab: +- +- /* Pacify compilers like GCC when the user code never invokes +- YYERROR and the label yyerrorlab therefore never appears in user +- code. */ +- if (/*CONSTCOND*/ 0) +- goto yyerrorlab; ++ /* Pacify compilers when the user code never invokes YYERROR and the ++ label yyerrorlab therefore never appears in user code. */ ++ if (0) ++ YYERROR; + + /* Do not reclaim the symbols of the rule whose action triggered + this YYERROR. */ +@@ -2109,6 +2123,7 @@ yyacceptlab: + yyresult = 0; + goto yyreturn; + ++ + /*-----------------------------------. + | yyabortlab -- YYABORT comes here. | + `-----------------------------------*/ +@@ -2116,6 +2131,7 @@ yyabortlab: + yyresult = 1; + goto yyreturn; + ++ + #if !defined yyoverflow || YYERROR_VERBOSE + /*-------------------------------------------------. + | yyexhaustedlab -- memory exhaustion comes here. | +@@ -2126,6 +2142,10 @@ yyexhaustedlab: + /* Fall through. */ + #endif + ++ ++/*-----------------------------------------------------. ++| yyreturn -- parsing is finished, return the result. | ++`-----------------------------------------------------*/ + yyreturn: + if (yychar != YYEMPTY) + { +@@ -2155,5 +2175,5 @@ yyreturn: + #endif + return yyresult; + } +-#line 329 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1903 */ ++#line 333 "src/preproc/eqn/eqn.ypp" + +diff --git a/src/preproc/eqn/eqn.hpp b/src/preproc/eqn/eqn.hpp +index 32a32a5..9a092c1 100644 +--- a/src/preproc/eqn/eqn.hpp ++++ b/src/preproc/eqn/eqn.hpp +@@ -1,8 +1,9 @@ +-/* A Bison parser, made by GNU Bison 3.2. */ ++/* A Bison parser, made by GNU Bison 3.4.1. */ + + /* Bison interface for Yacc-like parsers in C + +- Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc. ++ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 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 +@@ -170,10 +171,9 @@ extern int yydebug; + + /* Value type. */ + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +- + union YYSTYPE + { +-#line 30 "../src/preproc/eqn/eqn.ypp" /* yacc.c:1906 */ ++#line 34 "src/preproc/eqn/eqn.ypp" + + char *str; + box *b; +@@ -182,9 +182,9 @@ union YYSTYPE + int n; + column *col; + +-#line 186 "src/preproc/eqn/eqn.hpp" /* yacc.c:1906 */ +-}; ++#line 186 "src/preproc/eqn/eqn.hpp" + ++}; + typedef union YYSTYPE YYSTYPE; + # define YYSTYPE_IS_TRIVIAL 1 + # define YYSTYPE_IS_DECLARED 1 +diff --git a/src/preproc/eqn/eqn.ypp b/src/preproc/eqn/eqn.ypp +index fb318c3..b7b647e 100644 +--- a/src/preproc/eqn/eqn.ypp ++++ b/src/preproc/eqn/eqn.ypp +@@ -16,6 +16,10 @@ for more details. + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + %{ ++#if HAVE_CONFIG_H ++# include <config.h> ++#endif ++ + #include <stdio.h> + #include <string.h> + #include <stdlib.h> +diff --git a/src/preproc/eqn/other.cpp b/src/preproc/eqn/other.cpp +index 8db993f..38db396 100644 +--- a/src/preproc/eqn/other.cpp ++++ b/src/preproc/eqn/other.cpp +@@ -17,6 +17,10 @@ for more details. + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + ++#if HAVE_CONFIG_H ++# include <config.h> ++#endif ++ + #include <stdlib.h> + + #include "eqn.h" +diff --git a/src/preproc/eqn/text.cpp b/src/preproc/eqn/text.cpp +index f3d06f9..3b244d5 100644 +--- a/src/preproc/eqn/text.cpp ++++ b/src/preproc/eqn/text.cpp +@@ -17,6 +17,10 @@ for more details. + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + ++#if HAVE_CONFIG_H ++# include <config.h> ++#endif ++ + #include <ctype.h> + #include <stdlib.h> + #include "eqn.h" +diff --git a/src/preproc/pic/object.cpp b/src/preproc/pic/object.cpp +index d8ba610..f26a831 100644 +--- a/src/preproc/pic/object.cpp ++++ b/src/preproc/pic/object.cpp +@@ -17,6 +17,10 @@ for more details. + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + ++#if HAVE_CONFIG_H ++# include <config.h> ++#endif ++ + #include <stdlib.h> + + #include "pic.h" +-- +2.22.0 + diff --git a/meta/recipes-extended/groff/files/0001-Make-manpages-mulitlib-identical.patch b/meta/recipes-extended/groff/files/0001-Make-manpages-mulitlib-identical.patch new file mode 100644 index 0000000000..9105da6457 --- /dev/null +++ b/meta/recipes-extended/groff/files/0001-Make-manpages-mulitlib-identical.patch @@ -0,0 +1,27 @@ +From e738f9185ba90f2083c846ade3551234bb5a7cbc Mon Sep 17 00:00:00 2001 +From: Jeremy Puhlman <jpuhlman@mvista.com> +Date: Sat, 7 Mar 2020 00:59:13 +0000 +Subject: [PATCH] Make manpages mulitlib identical + +Upstream-Status: Pending +Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> +--- + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index d18c49b..6175fe9 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -917,7 +917,7 @@ SUFFIXES += .man + -e "s|[@]MDATE[@]|`$(PERL) $(top_srcdir)/mdate.pl $<`|g" \ + -e "s|[@]OLDFONTDIR[@]|`echo $(oldfontdir) | sed -f $(makevarescape)`|g" \ + -e "s|[@]PDFDOCDIR[@]|`echo $(pdfdocdir) | sed -f $(makevarescape)`|g" \ +- -e "s|[@]SYSTEMMACRODIR[@]|`echo $(systemtmacdir) | sed -f $(makevarescape)`|g" \ ++ -e "s|[@]SYSTEMMACRODIR[@]|`echo $(systemtmacdir) | sed -e 's,$(libdir),$(prefix)/lib*,' | sed -f $(makevarescape)`|g" \ + -e "s|[@]TMAC_AN_PREFIX[@]|$(tmac_an_prefix)|g" \ + -e "s|[@]TMAC_M_PREFIX[@]|$(tmac_m_prefix)|g" \ + -e "s|[@]TMAC_MDIR[@]|$(tmacdir)/mm|g" \ +-- +2.23.0 + diff --git a/meta/recipes-extended/groff/files/0001-replace-perl-w-with-use-warnings.patch b/meta/recipes-extended/groff/files/0001-replace-perl-w-with-use-warnings.patch new file mode 100644 index 0000000000..eda6a40f51 --- /dev/null +++ b/meta/recipes-extended/groff/files/0001-replace-perl-w-with-use-warnings.patch @@ -0,0 +1,106 @@ +From 6821a23e6cf34df37c351b45be413a8da9115f9f Mon Sep 17 00:00:00 2001 +From: Robert Yang <liezhi.yang@windriver.com> +Date: Sat, 11 May 2019 17:03:03 +0800 +Subject: [PATCH 1/2] replace "perl -w" with "use warnings" + +The shebang's max length is usually 128 as defined in +/usr/include/linux/binfmts.h: + #define BINPRM_BUF_SIZE 128 + +There would be errors when @PERL@ is longer than 128, use +'/usr/bin/env perl' can fix the problem, but '/usr/bin/env perl -w' +doesn't work: + +/usr/bin/env: perl -w: No such file or directory + +So replace "perl -w" with "use warnings" to make it work. + +Upstream-Status: Pending + +Signed-off-by: Robert Yang <liezhi.yang@windriver.com> + +Rebase to 1.22.4. + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + font/devpdf/util/BuildFoundries.pl | 3 ++- + src/devices/gropdf/gropdf.pl | 3 ++- + src/devices/gropdf/pdfmom.pl | 3 ++- + src/utils/afmtodit/afmtodit.pl | 3 ++- + 4 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/font/devpdf/util/BuildFoundries.pl b/font/devpdf/util/BuildFoundries.pl +index f8af826..9584e28 100644 +--- a/font/devpdf/util/BuildFoundries.pl ++++ b/font/devpdf/util/BuildFoundries.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/perl -w ++#!/usr/bin/perl + # + # BuildFoundries : Given a Foundry file generate groff and download files + # Deri James : Monday 07 Feb 2011 +@@ -22,6 +22,7 @@ + # along with this program. If not, see <http://www.gnu.org/licenses/>. + + use strict; ++use warnings; + + (my $progname = $0) =~s @.*/@@; + my $where=shift||''; +diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl +index 2ec52d0..ce5a06f 100644 +--- a/src/devices/gropdf/gropdf.pl ++++ b/src/devices/gropdf/gropdf.pl +@@ -1,4 +1,4 @@ +-#!@PERL@ -w ++#!@PERL@ + # + # gropdf : PDF post processor for groff + # +@@ -21,6 +21,7 @@ + # along with this program. If not, see <http://www.gnu.org/licenses/>. + + use strict; ++use warnings; + use Getopt::Long qw(:config bundling); + + use constant +diff --git a/src/devices/gropdf/pdfmom.pl b/src/devices/gropdf/pdfmom.pl +index c9b08b2..61124f3 100644 +--- a/src/devices/gropdf/pdfmom.pl ++++ b/src/devices/gropdf/pdfmom.pl +@@ -1,4 +1,4 @@ +-#!@PERL@ -w ++#!@PERL@ + # + # pdfmom : Frontend to run groff -mom to produce PDFs + # Deri James : Friday 16 Mar 2012 +@@ -23,6 +23,7 @@ + # along with this program. If not, see <http://www.gnu.org/licenses/>. + + use strict; ++use warnings; + use File::Temp qw/tempfile/; + my @cmd; + my $dev='pdf'; +diff --git a/src/utils/afmtodit/afmtodit.pl b/src/utils/afmtodit/afmtodit.pl +index 954c58e..81a6c97 100644 +--- a/src/utils/afmtodit/afmtodit.pl ++++ b/src/utils/afmtodit/afmtodit.pl +@@ -1,4 +1,4 @@ +-#! /usr/bin/perl -w ++#! /usr/bin/perl + # -*- Perl -*- + # Copyright (C) 1989-2018 Free Software Foundation, Inc. + # Written by James Clark (jjc@jclark.com) +@@ -19,6 +19,7 @@ + # along with this program. If not, see <http://www.gnu.org/licenses/>. + + use strict; ++use warnings; + + @afmtodit.tables@ + +-- +2.7.4 + diff --git a/meta/recipes-extended/groff/files/0001-support-musl.patch b/meta/recipes-extended/groff/files/0001-support-musl.patch new file mode 100644 index 0000000000..a837b11b1b --- /dev/null +++ b/meta/recipes-extended/groff/files/0001-support-musl.patch @@ -0,0 +1,41 @@ +From 695965c27be74acb5968f19d51af86065c4b71a9 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Mon, 13 May 2019 09:48:14 +0800 +Subject: [PATCH] support musl + +... +|./lib/math.h:2877:1: error: 'int signbit(float)' conflicts with a previous declaration +| _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit) +| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +|In file included from recipe-sysroot/usr/include/c++/8.3.0/math.h:36, +| from ./lib/math.h:27, +| from ./src/include/driver.h:27, +| from src/devices/grodvi/dvi.cpp:20: +|recipe-sysroot/usr/include/c++/8.3.0/cmath:661:3: note: previous declaration 'constexpr bool std::signbit(float)' +| signbit(float __x) +| ^~~~~~~ +... + +Upstream-Status: Backport [http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=453ff940449bbbde9ec00f0bbf82a359c5598fc7] + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + gnulib_m4/signbit.m4 | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/gnulib_m4/signbit.m4 b/gnulib_m4/signbit.m4 +index 9e7884d..8b9c70c 100644 +--- a/gnulib_m4/signbit.m4 ++++ b/gnulib_m4/signbit.m4 +@@ -31,6 +31,8 @@ AC_DEFUN([gl_SIGNBIT], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_signbit="guessing yes" ;; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_signbit="guessing yes" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_signbit="guessing yes" ;; + # If we don't know, assume the worst. +-- +2.7.4 + diff --git a/meta/recipes-extended/groff/files/groff-not-search-fonts-on-build-host.patch b/meta/recipes-extended/groff/files/groff-not-search-fonts-on-build-host.patch new file mode 100644 index 0000000000..c80a2a5c38 --- /dev/null +++ b/meta/recipes-extended/groff/files/groff-not-search-fonts-on-build-host.patch @@ -0,0 +1,32 @@ +From 75761ae7adc88412de4379d1cf5484b055cd5f18 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Sat, 11 May 2019 17:06:29 +0800 +Subject: [PATCH 2/2] groff searchs fonts which are provided by ghostscript on + build host. It causes non-determinism issue. So not search font dirs on host. + +Upstream-Status: Inappropriate [cross build specific] + +Signed-off-by: Kai Kang <kai.kang@windriver.com> + +Rebase to 1.22.4 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + font/devpdf/Foundry.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/font/devpdf/Foundry.in b/font/devpdf/Foundry.in +index 93e9b66..235b23b 100644 +--- a/font/devpdf/Foundry.in ++++ b/font/devpdf/Foundry.in +@@ -65,7 +65,7 @@ ZD|Y||||Dingbats!d050000l.pfb + #====================================================================== + + #Foundry|Name|Searchpath +-foundry|U|(gs):@urwfontsdir@ :/usr/share/fonts/type1/gsfonts :/opt/local/share/fonts/urw-fonts # the URW fonts delivered with ghostscript (may be different) ++foundry|U|(gs) # the URW fonts delivered with ghostscript (may be different) + #Define Flags for afmtodit + + r=-i 0 -m +-- +2.7.4 + diff --git a/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch b/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch deleted file mode 100644 index 559ae72898..0000000000 --- a/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch +++ /dev/null @@ -1,39 +0,0 @@ -Upstream-Status: Inappropriate [embedded] - -Signed-off-by: Ming Liu <ming.liu@windriver.com> ---- - Makefile.sub | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - ---- a/contrib/groffer/Makefile.sub -+++ b/contrib/groffer/Makefile.sub -@@ -38,16 +38,16 @@ groffer: groffer.sh groffer2.sh version. - $(RM) $@; - sed \ - -e "s|@g@|$(g)|g" \ -- -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \ -+ -e "s|@BINDIR@|$(bindir)|g" \ - -e "s|@libdir@|$(DESTDIR)$(libdir)|g" \ - -e "s|@VERSION@|$(version)$(revision)|g" \ - $(srcdir)/groffer.sh >$@; - chmod +x $@ - - install_data: groffer -- -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir) -- -$(RM) $(DESTDIR)$(bindir)/groffer -- $(INSTALL_SCRIPT) groffer $(DESTDIR)$(bindir)/groffer -+ -test -d $(bindir) || $(mkinstalldirs) $(bindir) -+ -$(RM) $(bindir)/groffer -+ $(INSTALL_SCRIPT) groffer $(bindir)/groffer - -test -d $(DESTDIR)$(libdir)/groff/groffer || \ - $(mkinstalldirs) $(DESTDIR)$(libdir)/groff/groffer - -$(RM) $(DESTDIR)$(libdir)/groff/groffer/groffer2.sh -@@ -58,7 +58,7 @@ install_data: groffer - $(DESTDIR)$(libdir)/groff/groffer/version.sh - - uninstall_sub: -- -$(RM) $(DESTDIR)$(bindir)/groffer -+ -$(RM) $(bindir)/groffer - -$(RM) $(DESTDIR)$(libdir)/groff/groffer/groffer2.sh - -$(RM) $(DESTDIR)$(libdir)/groff/groffer/version.sh - -rmdir $(DESTDIR)$(libdir)/groff/groffer diff --git a/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-remove-mom.patch b/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-remove-mom.patch deleted file mode 100644 index c24eff9af5..0000000000 --- a/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-remove-mom.patch +++ /dev/null @@ -1,39 +0,0 @@ - -Upstream-Status: Inappropriate [embedded] - -Signed-off-by: Saul Wold <sgw@linux.intel.com> ---- - groff-1.18.1.4/Makefile.in | 7 +------ - 1 file changed, 1 insertion(+), 6 deletions(-) - ---- a/Makefile.in -+++ b/Makefile.in -@@ -460,27 +460,22 @@ OTHERDIRS=\ - src/roff/grog \ - src/roff/nroff \ - contrib/mm \ - contrib/pic2graph \ - contrib/eqn2graph \ -- contrib/groffer \ -- contrib/mom \ -- doc -+ contrib/groffer - ALLDIRS=$(INCDIRS) $(LIBDIRS) $(PROGDIRS) \ - $(DEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS) $(OTHERDIRS) - EXTRADIRS=\ - font/devps/generate \ - font/devdvi/generate \ - font/devlj4/generate \ -- src/xditview \ - doc - NOMAKEDIRS=\ - arch/djgpp \ - contrib/mm/examples \ - contrib/mm/mm \ -- contrib/mom/examples \ -- contrib/mom/momdoc \ - src/libs/snprintf - DISTDIRS=\ - $(INCDIRS) $(LIBDIRS) $(PROGDIRS) $(DEVDIRS) $(OTHERDEVDIRS) \ - $(ALLTTYDEVDIRS) $(OTHERDIRS) $(EXTRADIRS) $(NOMAKEDIRS) - TARGETS=all install install_bin install_data clean distclean mostlyclean \ diff --git a/meta/recipes-extended/groff/groff-1.18.1.4/man-local.patch b/meta/recipes-extended/groff/groff-1.18.1.4/man-local.patch deleted file mode 100644 index e3f1aa6a48..0000000000 --- a/meta/recipes-extended/groff/groff-1.18.1.4/man-local.patch +++ /dev/null @@ -1,36 +0,0 @@ -Upstream-Status: Inappropriate [embedded] - -Signed-off-by: Saul Wold <sgw@linux.intel.com> - -Index: groff-1.18.1.4/tmac/man.local -=================================================================== ---- groff-1.18.1.4.orig/tmac/man.local 2000-10-26 22:15:17.000000000 +0800 -+++ groff-1.18.1.4/tmac/man.local 2010-08-24 14:17:52.070006664 +0800 -@@ -1,2 +1,27 @@ - .\" This file is loaded after an-old.tmac. - .\" Put any local modifications to an-old.tmac here. -+. -+.if n \{\ -+. \" Debian: Map \(oq to ' rather than ` in nroff mode for devices other -+. \" than utf8. -+. if !'\*[.T]'utf8' \ -+. tr \[oq]' -+. -+. \" Debian: Disable the use of SGR (ANSI colour) escape sequences by -+. \" grotty. -+. if '\V[GROFF_SGR]'' \ -+. output x X tty: sgr 0 -+. -+. \" Debian: Map \- to the Unicode HYPHEN-MINUS character, to make -+. \" searching in man pages easier. -+. if '\*[.T]'utf8' \ -+. char \- \N'45' -+. -+. \" Debian: Many UTF-8 man pages use "-" instead of "\-" for dashes such -+. \" as those in command-line options. This is a bug in those pages, but -+. \" too many fonts are missing the Unicode HYPHEN character, so we render -+. \" this as the ASCII-compatible HYPHEN-MINUS instead. -+. if '\*[.T]'utf8' \ -+. char - \N'45' -+.\} -+ diff --git a/meta/recipes-extended/groff/groff-1.18.1.4/mdoc-local.patch b/meta/recipes-extended/groff/groff-1.18.1.4/mdoc-local.patch deleted file mode 100644 index 409c1a5a18..0000000000 --- a/meta/recipes-extended/groff/groff-1.18.1.4/mdoc-local.patch +++ /dev/null @@ -1,36 +0,0 @@ - -Upstream-Status: Inappropriate [embedded] - -Signed-off-by: Saul Wold <sgw@linux.intel.com> - -Index: groff-1.18.1.4/tmac/mdoc.local -=================================================================== ---- groff-1.18.1.4.orig/tmac/mdoc.local 2001-03-23 08:17:51.000000000 +0800 -+++ groff-1.18.1.4/tmac/mdoc.local 2010-08-24 14:20:22.014006846 +0800 -@@ -1,2 +1,26 @@ - .\" This file is loaded after doc.tmac. - .\" Put any local modifications to doc.tmac here. -+. -+.if n \{\ -+. \" Debian: Map \(oq to ' rather than ` in nroff mode for devices other -+. \" than utf8. -+. if !'\*[.T]'utf8' \ -+. tr \[oq]' -+. -+. \" Debian: Disable the use of SGR (ANSI colour) escape sequences by -+. \" grotty. -+. if '\V[GROFF_SGR]'' \ -+. output x X tty: sgr 0 -+. -+. \" Debian: Map \- to the Unicode HYPHEN-MINUS character, to make -+. \" searching in man pages easier. -+. if '\*[.T]'utf8' \ -+. char \- \N'45' -+. -+. \" Debian: Many UTF-8 man pages use "-" instead of "\-" for dashes such -+. \" as those in command-line options. This is a bug in those pages, but -+. \" too many fonts are missing the Unicode HYPHEN character, so we render -+. \" this as the ASCII-compatible HYPHEN-MINUS instead. -+. if '\*[.T]'utf8' \ -+. char - \N'45' -+.\} diff --git a/meta/recipes-extended/groff/groff-1.22.3/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/groff/groff-1.22.3/0001-Unset-need_charset_alias-when-building-for-musl.patch deleted file mode 100644 index 0aaf701fc1..0000000000 --- a/meta/recipes-extended/groff/groff-1.22.3/0001-Unset-need_charset_alias-when-building-for-musl.patch +++ /dev/null @@ -1,30 +0,0 @@ -From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 13 Apr 2015 17:02:13 -0700 -Subject: [PATCH] Unset need_charset_alias when building for musl - -localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 -which actually shoudl be fixed in gnulib and then all downstream -projects will get it eventually. For now we apply the fix to -coreutils - -Upstream-Status: Not Required - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - lib/gnulib.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: groff-1.22.3/src/libs/gnulib/lib/Makefile.am -=================================================================== ---- groff-1.22.3.orig/src/libs/gnulib/lib/Makefile.am -+++ groff-1.22.3/src/libs/gnulib/lib/Makefile.am -@@ -113,7 +113,7 @@ install-exec-localcharset: all-local - case '$(host_os)' in \ - darwin[56]*) \ - need_charset_alias=true ;; \ -- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ -+ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ - need_charset_alias=false ;; \ - *) \ - need_charset_alias=true ;; \ diff --git a/meta/recipes-extended/groff/groff-1.22.3/groff-1.22.2-correct-man.local-install-path.patch b/meta/recipes-extended/groff/groff-1.22.3/groff-1.22.2-correct-man.local-install-path.patch deleted file mode 100644 index c73328a186..0000000000 --- a/meta/recipes-extended/groff/groff-1.22.3/groff-1.22.2-correct-man.local-install-path.patch +++ /dev/null @@ -1,34 +0,0 @@ -Correct the install path of man.local to fix following error: - /yocto/build/tmp/sysroots/x86_64-linux/usr/share/groff/1.22.2/tmac/an-old.tmac:690: warning: can't find macro file `man.local' - -Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com> -Upstream-Status: Pending - -diff --git a/tmac/Makefile.sub b/tmac/Makefile.sub -index 1506232..f1468c5 100644 ---- a/tmac/Makefile.sub -+++ b/tmac/Makefile.sub -@@ -121,9 +121,9 @@ install_data: $(NORMALFILES) $(SPECIALFILES) man.local \ - $(RM) $(DESTDIR)$(mdocdir)/$$f; \ - $(INSTALL_DATA) $$f-s $(DESTDIR)$(mdocdir)/$$f; \ - done -- -test -f $(DESTDIR)$(localtmacdir)/man.local \ -+ -test -f $(DESTDIR)$(tmacdir)/man.local \ - || $(INSTALL_DATA) $(srcdir)/man.local \ -- $(DESTDIR)$(localtmacdir)/man.local -+ $(DESTDIR)$(tmacdir)/man.local - -test -f $(DESTDIR)$(localtmacdir)/mdoc.local \ - || $(INSTALL_DATA) mdoc.local-s $(DESTDIR)$(localtmacdir)/mdoc.local - -@@ -164,9 +164,9 @@ uninstall_sub: - $(RM) $(DESTDIR)$(tmacdir)/$(tmac_s_prefix)s.tmac - $(RM) $(DESTDIR)$(tmacdir)/$(tmac_an_prefix)an.tmac - $(RM) $(DESTDIR)$(tmacdir)/www.tmac -- -if cmp -s $(DESTDIR)$(localtmacdir)/man.local \ -+ -if cmp -s $(DESTDIR)$(tmacdir)/man.local \ - $(srcdir)/man.local; then \ -- $(RM) $(DESTDIR)$(localtmacdir)/man.local; \ -+ $(RM) $(DESTDIR)$(tmacdir)/man.local; \ - fi - -if cmp -s $(DESTDIR)$(localtmacdir)/mdoc.local \ - $(srcdir)/mdoc.local; then \ diff --git a/meta/recipes-extended/groff/groff_1.18.1.4.bb b/meta/recipes-extended/groff/groff_1.18.1.4.bb deleted file mode 100644 index bd786a30aa..0000000000 --- a/meta/recipes-extended/groff/groff_1.18.1.4.bb +++ /dev/null @@ -1,49 +0,0 @@ -SUMMARY = "GNU Troff software" -DESCRIPTION = "The groff (GNU troff) software is a typesetting package which reads plain text mixed with \ -formatting commands and produces formatted output." -SECTION = "console/utils" -HOMEPAGE = "http://www.gnu.org/software/groff/" -LICENSE = "GPLv2" -PR = "r1" - -LIC_FILES_CHKSUM = "file://COPYING;md5=e43fc16fccd8519fba405f0a0ff6e8a3" - -SRC_URI = "${GNU_MIRROR}/${BPN}/old/${BP}.tar.gz \ - file://groff-1.18.1.4-remove-mom.patch;striplevel=1 \ - file://man-local.patch \ - file://mdoc-local.patch \ - file://groff-1.18.1.4-fix-bindir.patch \ -" - -inherit autotools texinfo - -EXTRA_OECONF="--without-x --prefix=${D} --exec-prefix=${D} --bindir=${D}${bindir} --datadir=${D}${datadir} --mandir=${D}${datadir}/man --infodir=${D}${datadir}info --with-appresdir=${D}${datadir}" - -SRC_URI[md5sum] = "ceecb81533936d251ed015f40e5f7287" -SRC_URI[sha256sum] = "ff3c7c3b6cae5e8cc5062a144de5eff0022e8e970e1774529cc2d5dde46ce50d" -PARALLEL_MAKE = "" - -do_configure (){ - oe_runconf -} - -do_install_append() { - # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location - # for target as /usr/bin/perl, so fix it to /usr/bin/perl. - for i in afmtodit mmroff; do - if [ -f ${D}${bindir}/$i ]; then - sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i - fi - done - - mkdir -p ${D}${sysconfdir}/groff - cp -rf ${D}${datadir}/groff/site-tmac/* ${D}${sysconfdir}/groff/ - cp -rf ${D}${datadir}/groff/site-tmac/* ${D}${datadir}/groff/${PV}/tmac/ -} - -pkg_postinst_${PN}() { - ln -s tbl $D${bindir}/gtbl - echo "export GROFF_FONT_PATH=/usr/share/groff/${PV}/font" >> $D${sysconfdir}/profile - echo "export GROFF_TMAC_PATH=/usr/share/groff/${PV}/tmac" >> $D${sysconfdir}/profile -} - diff --git a/meta/recipes-extended/groff/groff_1.22.3.bb b/meta/recipes-extended/groff/groff_1.22.4.bb index 4bffa814ff..e398478349 100644 --- a/meta/recipes-extended/groff/groff_1.22.3.bb +++ b/meta/recipes-extended/groff/groff_1.22.4.bb @@ -8,42 +8,27 @@ LICENSE = "GPLv3" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz \ - file://groff-1.22.2-correct-man.local-install-path.patch \ - file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ + file://0001-replace-perl-w-with-use-warnings.patch \ + file://groff-not-search-fonts-on-build-host.patch \ + file://0001-support-musl.patch \ + file://0001-Include-config.h.patch \ + file://0001-Make-manpages-mulitlib-identical.patch \ " -SRC_URI[md5sum] = "cc825fa64bc7306a885f2fb2268d3ec5" -SRC_URI[sha256sum] = "3a48a9d6c97750bfbd535feeb5be0111db6406ddb7bb79fc680809cda6d828a5" +SRC_URI[md5sum] = "08fb04335e2f5e73f23ea4c3adbf0c5f" +SRC_URI[sha256sum] = "e78e7b4cb7dec310849004fa88847c44701e8d133b5d4c13057d876c1bad0293" -DEPENDS = "groff-native" -DEPENDS_class-native = "" +DEPENDS = "bison-native" RDEPENDS_${PN} += "perl sed" -inherit autotools texinfo +inherit autotools-brokensep texinfo multilib_script pkgconfig -EXTRA_OECONF = "--without-x" -PARALLEL_MAKE = "" +MULTILIB_SCRIPTS = "${PN}:${bindir}/gpinyin ${PN}:${bindir}/groffer ${PN}:${bindir}/grog" -do_configure_prepend() { - if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then - sed -i \ - -e '/^GROFFBIN=/s:=.*:=${STAGING_BINDIR_NATIVE}/groff:' \ - -e '/^TROFFBIN=/s:=.*:=${STAGING_BINDIR_NATIVE}/troff:' \ - -e '/^GROFF_BIN_PATH=/s:=.*:=${STAGING_BINDIR_NATIVE}:' \ - -e '/^GROFF_BIN_DIR=/s:=.*:=${STAGING_BINDIR_NATIVE}:' \ - ${S}/contrib/*/Makefile.sub \ - ${S}/doc/Makefile.in \ - ${S}/doc/Makefile.sub - fi -} +EXTRA_OECONF = "--without-x --without-doc" +PARALLEL_MAKE = "" -do_configure_append() { - # generate gnulib configure script - olddir=`pwd` - cd ${S}/src/libs/gnulib/ - ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || die "autoreconf execution failed." - cd ${olddir} -} +CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl' ac_cv_path_BASH_PROG='no'" do_install_append() { # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location @@ -56,6 +41,17 @@ do_install_append() { if [ -e ${D}${libdir}/charset.alias ]; then rm -rf ${D}${libdir}/charset.alias fi + + # awk is located at /usr/bin/, not /bin/ + SPECIAL_AWK=`find ${D} -name special.awk` + if [ -f ${SPECIAL_AWK} ]; then + sed -i -e 's:#!.*awk:#! ${USRBINPATH}/awk:' ${SPECIAL_AWK} + fi + + # not ship /usr/bin/glilypond and its releated files in embedded target system + rm -rf ${D}${bindir}/glilypond + rm -rf ${D}${libdir}/groff/glilypond + rm -rf ${D}${mandir}/man1/glilypond* } do_install_append_class-native() { diff --git a/meta/recipes-extended/gzip/files/run-ptest b/meta/recipes-extended/gzip/files/run-ptest new file mode 100644 index 0000000000..cf7c64949a --- /dev/null +++ b/meta/recipes-extended/gzip/files/run-ptest @@ -0,0 +1,6 @@ +#!/bin/sh + +cd src/tests + +make check + diff --git a/meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch b/meta/recipes-extended/gzip/gzip-1.10/wrong-path-fix.patch index 92863d6c4b..7c37bc8d2d 100644 --- a/meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch +++ b/meta/recipes-extended/gzip/gzip-1.10/wrong-path-fix.patch @@ -13,19 +13,24 @@ Signed-off-by: Ming Liu <ming.liu@windriver.com> Upstream-Status: Pending -Index: gzip-1.3.12/Makefile.am -=================================================================== -diff -urpN a/Makefile.am b/Makefile.am ---- a/Makefile.am 2013-11-30 10:06:09.402234871 +0800 -+++ b/Makefile.am 2013-11-30 10:13:42.952236025 +0800 -@@ -81,9 +81,8 @@ gzip.doc.gz: gzip.doc $(bin_PROGRAMS) - SUFFIXES = .in +--- + 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)sed \ + $(AM_V_GEN)rm -f $@-t $@ \ + && sed \ - -e 's|/bin/sh|$(SHELL)|g' \ - -e 's|[@]bindir@|'\''$(bindir)'\''|g' \ - -e 's|[@]GREP@|$(GREP)|g' \ + -e 's|[@]GREP@|$(base_bindir)/grep|g' \ -e 's|[@]VERSION@|$(VERSION)|g' \ $(srcdir)/$@.in >$@-t \ - && chmod a+x $@-t \ + && chmod a=rx $@-t \ +-- +2.7.4 + diff --git a/meta/recipes-extended/gzip/gzip-1.3.12/dup-def-fix.patch b/meta/recipes-extended/gzip/gzip-1.3.12/dup-def-fix.patch deleted file mode 100644 index d9e8d212bf..0000000000 --- a/meta/recipes-extended/gzip/gzip-1.3.12/dup-def-fix.patch +++ /dev/null @@ -1,48 +0,0 @@ -gzip uses gnulib, whose header conflict with glibc. This patch rename some function to avoid conflict. - -Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> - -Upstream-Status: Inappropriate [licensing] - -Index: gzip-1.3.12/gzip.c -=================================================================== ---- gzip-1.3.12.orig/gzip.c 2010-08-13 10:29:38.000000000 +0800 -+++ gzip-1.3.12/gzip.c 2010-08-13 10:29:44.000000000 +0800 -@@ -1637,7 +1637,7 @@ - } - } - -- if (futimens (ofd, ofname, timespec) != 0) -+ if (futimens_gnulib (ofd, ofname, timespec) != 0) - { - int e = errno; - WARN ((stderr, "%s: ", program_name)); -Index: gzip-1.3.12/lib/utimens.c -=================================================================== ---- gzip-1.3.12.orig/lib/utimens.c 2010-08-13 10:33:47.000000000 +0800 -+++ gzip-1.3.12/lib/utimens.c 2010-08-13 10:34:02.000000000 +0800 -@@ -75,7 +75,7 @@ - Return 0 on success, -1 (setting errno) on failure. */ - - int --futimens (int fd ATTRIBUTE_UNUSED, -+futimens_gnulib (int fd ATTRIBUTE_UNUSED, - char const *file, struct timespec const timespec[2]) - { - /* Some Linux-based NFS clients are buggy, and mishandle time stamps -@@ -185,5 +185,5 @@ - int - utimens (char const *file, struct timespec const timespec[2]) - { -- return futimens (-1, file, timespec); -+ return futimens_gnulib (-1, file, timespec); - } -Index: gzip-1.3.12/lib/utimens.h -=================================================================== ---- gzip-1.3.12.orig/lib/utimens.h 2010-08-13 10:14:57.000000000 +0800 -+++ gzip-1.3.12/lib/utimens.h 2010-08-13 10:21:45.000000000 +0800 -@@ -1,3 +1,3 @@ - #include <time.h> --int futimens (int, char const *, struct timespec const [2]); -+int futimens_gnulib (int, char const *, struct timespec const [2]); - int utimens (char const *, struct timespec const [2]); diff --git a/meta/recipes-extended/gzip/gzip-1.3.12/m4-extensions-fix.patch b/meta/recipes-extended/gzip/gzip-1.3.12/m4-extensions-fix.patch deleted file mode 100644 index 6b2f69870e..0000000000 --- a/meta/recipes-extended/gzip/gzip-1.3.12/m4-extensions-fix.patch +++ /dev/null @@ -1,56 +0,0 @@ -remove AC_USE_SYSTEM_EXTENSIONS to fix the autoconf error "AC_REQUIRE: circular -dependency of AC_GNU_SOURCE" - -Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> - -Upstream-Status: Inappropriate [licensing] - -Index: gzip-1.3.12/m4/extensions.m4 -=================================================================== ---- gzip-1.3.12.orig/m4/extensions.m4 2010-08-16 14:18:16.000000000 +0800 -+++ gzip-1.3.12/m4/extensions.m4 2010-08-16 14:21:54.000000000 +0800 -@@ -12,44 +12,6 @@ - # enough in this area it's likely we'll need to redefine - # AC_USE_SYSTEM_EXTENSIONS for quite some time. - --# AC_USE_SYSTEM_EXTENSIONS --# ------------------------ --# Enable extensions on systems that normally disable them, --# typically due to standards-conformance issues. --AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], --[ -- AC_BEFORE([$0], [AC_COMPILE_IFELSE]) -- AC_BEFORE([$0], [AC_RUN_IFELSE]) -- -- AC_REQUIRE([AC_GNU_SOURCE]) -- AC_REQUIRE([AC_AIX]) -- AC_REQUIRE([AC_MINIX]) -- -- AH_VERBATIM([__EXTENSIONS__], --[/* Enable extensions on Solaris. */ --#ifndef __EXTENSIONS__ --# undef __EXTENSIONS__ --#endif --#ifndef _POSIX_PTHREAD_SEMANTICS --# undef _POSIX_PTHREAD_SEMANTICS --#endif --#ifndef _TANDEM_SOURCE --# undef _TANDEM_SOURCE --#endif]) -- AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], -- [ac_cv_safe_to_define___extensions__], -- [AC_COMPILE_IFELSE( -- [AC_LANG_PROGRAM([ --# define __EXTENSIONS__ 1 -- AC_INCLUDES_DEFAULT])], -- [ac_cv_safe_to_define___extensions__=yes], -- [ac_cv_safe_to_define___extensions__=no])]) -- test $ac_cv_safe_to_define___extensions__ = yes && -- AC_DEFINE([__EXTENSIONS__]) -- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) -- AC_DEFINE([_TANDEM_SOURCE]) --]) -- - # gl_USE_SYSTEM_EXTENSIONS - # ------------------------ - # Enable extensions on systems that normally disable them, diff --git a/meta/recipes-extended/gzip/gzip.inc b/meta/recipes-extended/gzip/gzip.inc index 94480ec530..04f8f95dd5 100644 --- a/meta/recipes-extended/gzip/gzip.inc +++ b/meta/recipes-extended/gzip/gzip.inc @@ -6,16 +6,20 @@ 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 () { - # 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 + 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 diff --git a/meta/recipes-extended/gzip/gzip_1.10.bb b/meta/recipes-extended/gzip/gzip_1.10.bb new file mode 100644 index 0000000000..9778e687e1 --- /dev/null +++ b/meta/recipes-extended/gzip/gzip_1.10.bb @@ -0,0 +1,40 @@ +require gzip.inc + +LICENSE = "GPLv3+" + +SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz \ + 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] = "cf9ee51aff167ff69844d5d7d71c8b20" +SRC_URI[sha256sum] = "c91f74430bf7bc20402e1f657d0b252cb80aa66ba333a25704512af346633c68" diff --git a/meta/recipes-extended/gzip/gzip_1.3.12.bb b/meta/recipes-extended/gzip/gzip_1.3.12.bb deleted file mode 100644 index e4062827bd..0000000000 --- a/meta/recipes-extended/gzip/gzip_1.3.12.bb +++ /dev/null @@ -1,15 +0,0 @@ -require gzip.inc - -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ - file://gzip.h;endline=22;md5=c0934ad1900d927f86556153d4c76d23 \ - file://lzw.h;endline=19;md5=c273e09a02edd9801cc74d39683049e9 " - -SRC_URI = "${GNU_MIRROR}/gzip/gzip-${PV}.tar.gz \ - file://m4-extensions-fix.patch \ - file://dup-def-fix.patch" - -SRC_URI[md5sum] = "b5bac2d21840ae077e0217bc5e4845b1" -SRC_URI[sha256sum] = "3f565be05f7f3d1aff117c030eb7c738300510b7d098cedea796ca8e4cd587af" - -PR = "r2" diff --git a/meta/recipes-extended/gzip/gzip_1.6.bb b/meta/recipes-extended/gzip/gzip_1.6.bb deleted file mode 100644 index b347f0bb8d..0000000000 --- a/meta/recipes-extended/gzip/gzip_1.6.bb +++ /dev/null @@ -1,17 +0,0 @@ -require gzip.inc - -LICENSE = "GPLv3+" - -SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz" -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" -NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}" - -BBCLASSEXTEND = "native" - -SRC_URI[md5sum] = "38603cb2843bf5681ff41aab3bcd6a20" -SRC_URI[sha256sum] = "97eb83b763d9e5ad35f351fe5517e6b71521d7aac7acf3e3cacdb6b1496d8f7e" diff --git a/meta/recipes-extended/hdparm/hdparm/wiper.sh-fix-stat-path.patch b/meta/recipes-extended/hdparm/hdparm/wiper.sh-fix-stat-path.patch new file mode 100644 index 0000000000..4af1b617ed --- /dev/null +++ b/meta/recipes-extended/hdparm/hdparm/wiper.sh-fix-stat-path.patch @@ -0,0 +1,38 @@ +From e233006ee212109d2a1401dac37a9a851cc493d8 Mon Sep 17 00:00:00 2001 +From: Yi Zhao <yi.zhao@windriver.com> +Date: Thu, 14 Dec 2017 15:23:47 +0800 +Subject: [PATCH] wiper.sh: fix stat path + +Fix the stat path for OE. + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + wiper/wiper.sh | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/wiper/wiper.sh b/wiper/wiper.sh +index 79eddc8..9ef2840 100755 +--- a/wiper/wiper.sh ++++ b/wiper/wiper.sh +@@ -97,7 +97,6 @@ function find_prog(){ + hash -r ## Refresh bash's cached PATH entries + HDPARM=`find_prog /sbin/hdparm` || exit 1 + FIND=`find_prog /usr/bin/find` || exit 1 +-STAT=`find_prog /usr/bin/stat` || exit 1 + GAWK=`find_prog /usr/bin/gawk` || exit 1 + BLKID=`find_prog /sbin/blkid` || exit 1 + GREP=`find_prog /bin/grep` || exit 1 +@@ -105,7 +104,7 @@ ID=`find_prog /usr/bin/id` || exit 1 + LS=`find_prog /bin/ls` || exit 1 + DF=`find_prog /bin/df` || exit 1 + RM=`find_prog /bin/rm` || exit 1 +-STAT=`find_prog /usr/bin/stat` || exit 1 ++STAT=`find_prog /bin/stat` || exit 1 + + [ $verbose -gt 1 ] && HDPARM="$HDPARM --verbose" + +-- +2.7.4 + diff --git a/meta/recipes-extended/hdparm/hdparm_9.48.bb b/meta/recipes-extended/hdparm/hdparm_9.58.bb index 8267fd9025..e47dedae89 100644 --- a/meta/recipes-extended/hdparm/hdparm_9.48.bb +++ b/meta/recipes-extended/hdparm/hdparm_9.58.bb @@ -1,10 +1,15 @@ SUMMARY = "Utility for viewing/manipulating IDE disk drive/driver parameters" +HOMEPAGE = "http://sourceforge.net/projects/hdparm/" DESCRIPTION = "hdparm is a Linux shell utility for viewing \ and manipulating various IDE drive and driver parameters." SECTION = "console/utils" -LICENSE = "BSD" + +LICENSE = "BSD & GPLv2" +LICENSE_${PN} = "BSD" +LICENSE_${PN}-dbg = "BSD" LICENSE_wiper = "GPLv2" -LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=910a8a42c962d238619c75fdb78bdb24 \ + +LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=495d03e50dc6c89d6a30107ab0df5b03 \ file://debian/copyright;md5=a82d7ba3ade9e8ec902749db98c592f3 \ file://wiper/GPLv2.txt;md5=fcb02dc552a041dee27e4b85c7396067 \ file://wiper/wiper.sh;beginline=7;endline=31;md5=b7bc642addc152ea307505bf1a296f09" @@ -14,14 +19,16 @@ PACKAGES =+ "wiper" FILES_wiper = "${bindir}/wiper.sh" -RDEPENDS_wiper = "bash gawk stat" +RDEPENDS_wiper = "bash gawk coreutils" -SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/${BP}.tar.gz " +SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/${BP}.tar.gz \ + file://wiper.sh-fix-stat-path.patch \ + " -SRC_URI[md5sum] = "213efdbe7471fad3408198918e164354" -SRC_URI[sha256sum] = "ce97b4a71cb04146f54cf6f69787e7f97ddfda9836dc803b459d3b3df3a4fbee" +SRC_URI[md5sum] = "4652c49cf096a64683c05f54b4fa4679" +SRC_URI[sha256sum] = "9ae78e883f3ce071d32ee0f1b9a2845a634fc4dd94a434e653fdbef551c5e10f" -EXTRA_OEMAKE += 'STRIP="echo"' +EXTRA_OEMAKE = 'STRIP="echo" LDFLAGS="${LDFLAGS}"' inherit update-alternatives diff --git a/meta/recipes-extended/images/core-image-kernel-dev.bb b/meta/recipes-extended/images/core-image-kernel-dev.bb index 6b636ed080..4d16da1ea8 100644 --- a/meta/recipes-extended/images/core-image-kernel-dev.bb +++ b/meta/recipes-extended/images/core-image-kernel-dev.bb @@ -11,10 +11,13 @@ KERNEL_DEV_MODULE ?= "kernel-modules" CORE_IMAGE_EXTRA_INSTALL += "${KERNEL_DEV_MODULE} \ ${KERNEL_DEV_UTILS} \ ${KERNEL_DEV_TOOLS} \ + systemtap \ " # We need extra space for things like kernel builds, etc. -IMAGE_ROOTFS_EXTRA_SPACE_append += "+ 3000000" +IMAGE_ROOTFS_EXTRA_SPACE_append = " + 3000000" # Let's define our own subset to test, we can later add a on-target kernel build even! -DEFAULT_TEST_SUITES = "ping ssh df connman syslog scp date dmesg parselogs" +DEFAULT_TEST_SUITES = "ping ssh df connman syslog scp date parselogs" + +IMAGE_FEATURES += "tools-profile" diff --git a/meta/recipes-extended/images/core-image-lsb-dev.bb b/meta/recipes-extended/images/core-image-lsb-dev.bb deleted file mode 100644 index d2dc9e2b53..0000000000 --- a/meta/recipes-extended/images/core-image-lsb-dev.bb +++ /dev/null @@ -1,7 +0,0 @@ -require core-image-lsb.bb - -DESCRIPTION = "Basic image without X support suitable for development work. It \ -can be used for customization and implementations that conform to Linux \ -Standard Base (LSB)." - -IMAGE_FEATURES += "dev-pkgs" diff --git a/meta/recipes-extended/images/core-image-lsb-sdk.bb b/meta/recipes-extended/images/core-image-lsb-sdk.bb deleted file mode 100644 index c3b6e7c827..0000000000 --- a/meta/recipes-extended/images/core-image-lsb-sdk.bb +++ /dev/null @@ -1,9 +0,0 @@ -require core-image-lsb.bb - -DESCRIPTION = "Basic image without X support suitable for Linux Standard Base \ -(LSB) implementations. It includes the full meta-toolchain, plus development \ -headers and libraries to form a standalone SDK." - -IMAGE_FEATURES += "tools-sdk dev-pkgs tools-debug eclipse-debug tools-profile tools-testapps debug-tweaks" - -IMAGE_INSTALL += "kernel-devsrc" diff --git a/meta/recipes-extended/images/core-image-lsb.bb b/meta/recipes-extended/images/core-image-lsb.bb deleted file mode 100644 index ab61c6e6df..0000000000 --- a/meta/recipes-extended/images/core-image-lsb.bb +++ /dev/null @@ -1,14 +0,0 @@ -DESCRIPTION = "An image containing packages that are required to conform \ -to the Linux Standard Base (LSB) specification." - -IMAGE_FEATURES += "splash ssh-server-openssh hwcodecs package-management" - -IMAGE_INSTALL = "\ - ${CORE_IMAGE_BASE_INSTALL} \ - packagegroup-core-full-cmdline \ - packagegroup-core-lsb \ - " - -inherit core-image distro_features_check - -REQUIRED_DISTRO_FEATURES = "pam" diff --git a/meta/recipes-extended/images/core-image-testmaster-initramfs.bb b/meta/recipes-extended/images/core-image-testmaster-initramfs.bb index 563260d3b8..1a2e0af27b 100644 --- a/meta/recipes-extended/images/core-image-testmaster-initramfs.bb +++ b/meta/recipes-extended/images/core-image-testmaster-initramfs.bb @@ -8,6 +8,7 @@ PACKAGE_INSTALL = "initramfs-live-boot initramfs-live-install-testfs initramfs-l IMAGE_FEATURES = "" export IMAGE_BASENAME = "core-image-testmaster-initramfs" +IMAGE_NAME_SUFFIX ?= "" IMAGE_LINGUAS = "" LICENSE = "MIT" @@ -16,4 +17,8 @@ IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}" inherit core-image IMAGE_ROOTFS_SIZE = "8192" +IMAGE_ROOTFS_EXTRA_SPACE = "0" BAD_RECOMMENDATIONS += "busybox-syslog" + +# Use the same restriction as initramfs-live-install-testfs +COMPATIBLE_HOST = "(i.86|x86_64).*-linux" diff --git a/meta/recipes-extended/images/core-image-testmaster.bb b/meta/recipes-extended/images/core-image-testmaster.bb index 78295c5f0a..0faf18f5a4 100644 --- a/meta/recipes-extended/images/core-image-testmaster.bb +++ b/meta/recipes-extended/images/core-image-testmaster.bb @@ -8,7 +8,7 @@ inherit core-image # normal linux utilities not busybox ones IMAGE_INSTALL += "\ bash coreutils util-linux tar gzip bzip2 kmod \ - python-modules python-misc \ + python3-modules python3-misc \ e2fsprogs e2fsprogs-mke2fs parted \ " # we need a particular initramfs for live images diff --git a/meta/recipes-extended/iptables/iptables/0001-build-resolve-iptables-apply-not-getting-installed.patch b/meta/recipes-extended/iptables/iptables/0001-build-resolve-iptables-apply-not-getting-installed.patch new file mode 100644 index 0000000000..51ed66ed24 --- /dev/null +++ b/meta/recipes-extended/iptables/iptables/0001-build-resolve-iptables-apply-not-getting-installed.patch @@ -0,0 +1,45 @@ +From d4ed0c741fc789bb09d977d74d30875fdd50d08b Mon Sep 17 00:00:00 2001 +From: Jan Engelhardt <jengelh@inai.de> +Date: Wed, 3 Jun 2020 15:38:48 +0200 +Subject: [PATCH] build: resolve iptables-apply not getting installed +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +ip6tables-apply gets installed but iptables-apply does not. +That is wrong. + +» make install DESTDIR=$PWD/r +» find r -name "*app*" +r/usr/local/sbin/ip6tables-apply +r/usr/local/share/man/man8/iptables-apply.8 +r/usr/local/share/man/man8/ip6tables-apply.8 + +Fixes: v1.8.5~87 +Signed-off-by: Jan Engelhardt <jengelh@inai.de> +Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> + +Upstream-Status: Backport +[https://git.netfilter.org/iptables/commit/?id=d4ed0c741fc789bb09d977d74d30875fdd50d08b] + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + iptables/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/iptables/Makefile.am b/iptables/Makefile.am +index dc66b3cc..2024dbf5 100644 +--- a/iptables/Makefile.am ++++ b/iptables/Makefile.am +@@ -56,7 +56,7 @@ man_MANS = iptables.8 iptables-restore.8 iptables-save.8 \ + ip6tables-save.8 iptables-extensions.8 \ + iptables-apply.8 ip6tables-apply.8 + +-sbin_SCRIPT = iptables-apply ++sbin_SCRIPTS = iptables-apply + + if ENABLE_NFTABLES + man_MANS += xtables-nft.8 xtables-translate.8 xtables-legacy.8 \ +-- +2.17.1 + diff --git a/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch b/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch index ab609e27e3..03c36ccbc2 100644 --- a/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch +++ b/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch @@ -1,47 +1,47 @@ -From 5c47cf5061b852c02178f01e23690bfe38a99d93 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sun, 17 Mar 2013 11:21:35 -0700 +From c46db7c2e1f63ec525835553587e70c635565310 Mon Sep 17 00:00:00 2001 +From: "Maxin B. John" <maxin.john@intel.com> +Date: Tue, 21 Feb 2017 11:16:31 +0200 Subject: [PATCH] configure: Add option to enable/disable libnfnetlink This changes the configure behaviour from autodetecting for libnfnetlink to having an option to disable it explicitly -Signed-off-by: Khem Raj <raj.khem@gmail.com> - Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Signed-off-by: Maxin B. John <maxin.john@intel.com> --- - configure.ac | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) + configure.ac | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac -index ba616ab..ce2d315 100644 +index eda7871..03ddc50 100644 --- a/configure.ac +++ b/configure.ac -@@ -53,6 +53,9 @@ AC_ARG_ENABLE([libipq], - AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH], - [Path to the pkgconfig directory [[LIBDIR/pkgconfig]]]), - [pkgconfigdir="$withval"], [pkgconfigdir='${libdir}/pkgconfig']) +@@ -63,6 +63,9 @@ AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH], + AC_ARG_ENABLE([nftables], + AS_HELP_STRING([--disable-nftables], [Do not build nftables compat]), + [enable_nftables="$enableval"], [enable_nftables="yes"]) +AC_ARG_ENABLE([libnfnetlink], -+ AS_HELP_STRING([--disable-libnfnetlink], [Do not use netfilter netlink library]), -+ [enable_libnfnetlink="$enableval"], [enable_libnfnetlink="yes"]) - - libiptc_LDFLAGS2=""; - AX_CHECK_LINKER_FLAGS([-Wl,--no-as-needed], -@@ -89,9 +92,11 @@ AM_CONDITIONAL([ENABLE_LARGEFILE], [test "$enable_largefile" = "yes"]) - AM_CONDITIONAL([ENABLE_DEVEL], [test "$enable_devel" = "yes"]) - AM_CONDITIONAL([ENABLE_LIBIPQ], [test "$enable_libipq" = "yes"]) ++ AS_HELP_STRING([--disable-libnfnetlink], [Do not use netfilter netlink library]), ++ [enable_libnfnetlink="$enableval"], [enable_libnfnetlink="yes"]) + AC_ARG_ENABLE([connlabel], + AS_HELP_STRING([--disable-connlabel], + [Do not build libnetfilter_conntrack]), +@@ -115,9 +118,10 @@ if test "x$enable_bpfc" = "xyes" || test "x$enable_nfsynproxy" = "xyes"; then + AC_CHECK_LIB(pcap, pcap_compile,, AC_MSG_ERROR(missing libpcap library required by bpf compiler or nfsynproxy tool)) + fi -PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0], - [nfnetlink=1], [nfnetlink=0]) -AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "$nfnetlink" = 1]) +AS_IF([test "x$enable_libnfnetlink" = "xyes"], [ -+ PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0]) -+ ]) -+ ++ PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0]) ++ ]) +AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "x$enable_libnfnetlink" = "xyes"]) - regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \ - -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \ + if test "x$enable_nftables" = "xyes"; then + PKG_CHECK_MODULES([libmnl], [libmnl >= 1.0], [mnl=1], [mnl=0]) -- -1.7.9.5 +2.4.0 diff --git a/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch b/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch deleted file mode 100644 index 7a003d912f..0000000000 --- a/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 7c07b7fd4fdd7844dd032af822306f08e4422c34 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 6 Apr 2015 20:47:29 -0700 -Subject: [PATCH] fix build with musl - -Add needed headers they are just not needed for glibc6+ but also -for musl -Define additional TCOPTS if not there - -u_initX types are in sys/types.h be explicit about it - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - extensions/libxt_TCPOPTSTRIP.c | 15 +++++++++++++++ - include/libiptc/ipt_kernel_headers.h | 12 ------------ - include/linux/netfilter_ipv4/ip_tables.h | 1 + - 3 files changed, 16 insertions(+), 12 deletions(-) - -diff --git a/extensions/libxt_TCPOPTSTRIP.c b/extensions/libxt_TCPOPTSTRIP.c -index 6897857..8a170b2 100644 ---- a/extensions/libxt_TCPOPTSTRIP.c -+++ b/extensions/libxt_TCPOPTSTRIP.c -@@ -12,6 +12,21 @@ - #ifndef TCPOPT_MD5SIG - # define TCPOPT_MD5SIG 19 - #endif -+#ifndef TCPOPT_MAXSEG -+# define TCPOPT_MAXSEG 2 -+#endif -+#ifndef TCPOPT_WINDOW -+# define TCPOPT_WINDOW 3 -+#endif -+#ifndef TCPOPT_SACK_PERMITTED -+# define TCPOPT_SACK_PERMITTED 4 -+#endif -+#ifndef TCPOPT_SACK -+# define TCPOPT_SACK 5 -+#endif -+#ifndef TCPOPT_TIMESTAMP -+# define TCPOPT_TIMESTAMP 8 -+#endif - - enum { - O_STRIP_OPTION = 0, -diff --git a/include/libiptc/ipt_kernel_headers.h b/include/libiptc/ipt_kernel_headers.h -index 18861fe..a5963e9 100644 ---- a/include/libiptc/ipt_kernel_headers.h -+++ b/include/libiptc/ipt_kernel_headers.h -@@ -5,7 +5,6 @@ - - #include <limits.h> - --#if defined(__GLIBC__) && __GLIBC__ == 2 - #include <netinet/ip.h> - #include <netinet/in.h> - #include <netinet/ip_icmp.h> -@@ -13,15 +12,4 @@ - #include <netinet/udp.h> - #include <net/if.h> - #include <sys/types.h> --#else /* libc5 */ --#include <sys/socket.h> --#include <linux/ip.h> --#include <linux/in.h> --#include <linux/if.h> --#include <linux/icmp.h> --#include <linux/tcp.h> --#include <linux/udp.h> --#include <linux/types.h> --#include <linux/in6.h> --#endif - #endif -diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h -index 57fd82a..4807246 100644 ---- a/include/linux/netfilter_ipv4/ip_tables.h -+++ b/include/linux/netfilter_ipv4/ip_tables.h -@@ -15,6 +15,7 @@ - #ifndef _IPTABLES_H - #define _IPTABLES_H - -+#include <sys/types.h> - #include <linux/types.h> - - #include <linux/netfilter_ipv4.h> --- -2.1.4 - diff --git a/meta/recipes-extended/iptables/iptables/0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch b/meta/recipes-extended/iptables/iptables/0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch new file mode 100644 index 0000000000..7842c6408a --- /dev/null +++ b/meta/recipes-extended/iptables/iptables/0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch @@ -0,0 +1,51 @@ +From 26090b3dbcdf6a11e60535da949b726a6e86426d Mon Sep 17 00:00:00 2001 +From: "Maxin B. John" <maxin.john@intel.com> +Date: Tue, 21 Feb 2017 11:49:07 +0200 +Subject: [PATCH] configure.ac: + only-check-conntrack-when-libnfnetlink-enabled.patch + +Package libnetfilter-conntrack depends on package libnfnetlink. iptables +checks package libnetfilter-conntrack whatever its package config +libnfnetlink is enabled or not. When libnfnetlink is disabled but +package libnetfilter-conntrack exists, it fails randomly with: + +In file included from +.../iptables/1.4.21-r0/iptables-1.4.21/extensions/libxt_connlabel.c:8:0: + +.../tmp/sysroots/qemumips/usr/include/libnetfilter_conntrack/libnetfilter_conntrack.h:14:42: +fatal error: libnfnetlink/linux_nfnetlink.h: No such file or directory + +compilation terminated. +GNUmakefile:96: recipe for target 'libxt_connlabel.oo' failed +Only check libnetfilter-conntrack when libnfnetlink is enabled to fix it. + +Upstream-Status: Pending + +Signed-off-by: Kai Kang <kai.kang@windriver.com> +Signed-off-by: Maxin B. John <maxin.john@intel.com> +--- + configure.ac | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 03ddc50..523caea 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -172,10 +172,12 @@ if test "$nftables" != 1; then + fi + + if test "x$enable_connlabel" = "xyes"; then +- PKG_CHECK_MODULES([libnetfilter_conntrack], ++ nfconntrack=0 ++ AS_IF([test "x$enable_libnfnetlink" = "xyes"], [ ++ PKG_CHECK_MODULES([libnetfilter_conntrack], + [libnetfilter_conntrack >= 1.0.6], + [nfconntrack=1], [nfconntrack=0]) +- ++ ]) + if test "$nfconntrack" -ne 1; then + blacklist_modules="$blacklist_modules connlabel"; + echo "WARNING: libnetfilter_conntrack not found, connlabel match will not be built"; +-- +2.4.0 + diff --git a/meta/recipes-extended/iptables/iptables/ip6tables.rules b/meta/recipes-extended/iptables/iptables/ip6tables.rules new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/meta/recipes-extended/iptables/iptables/ip6tables.rules diff --git a/meta/recipes-extended/iptables/iptables/ip6tables.service b/meta/recipes-extended/iptables/iptables/ip6tables.service new file mode 100644 index 0000000000..6c059fca49 --- /dev/null +++ b/meta/recipes-extended/iptables/iptables/ip6tables.service @@ -0,0 +1,13 @@ +[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/recipes-extended/iptables/iptables/iptables.rules b/meta/recipes-extended/iptables/iptables/iptables.rules new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/meta/recipes-extended/iptables/iptables/iptables.rules diff --git a/meta/recipes-extended/iptables/iptables/iptables.service b/meta/recipes-extended/iptables/iptables/iptables.service new file mode 100644 index 0000000000..0eb3c343de --- /dev/null +++ b/meta/recipes-extended/iptables/iptables/iptables.service @@ -0,0 +1,13 @@ +[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/recipes-extended/iptables/iptables/types.h-add-defines-that-are-required-for-if_packet.patch b/meta/recipes-extended/iptables/iptables/types.h-add-defines-that-are-required-for-if_packet.patch deleted file mode 100644 index 24ee29e2d1..0000000000 --- a/meta/recipes-extended/iptables/iptables/types.h-add-defines-that-are-required-for-if_packet.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 19593491f43b70c1a71c3b9b8f4ff4fd14500014 Mon Sep 17 00:00:00 2001 -From: Bruce Ashfield <bruce.ashfield@windriver.com> -Date: Fri, 23 Mar 2012 14:27:20 -0400 -Subject: [PATCH] types.h: add defines that are required for if_packet.h - -The iptables local linux/types.h overrides the kernel/sysroot -types.h. As such, we need to provide some defines that are required -to build against 3.2+ kernel headers. - -ifndef protection is provided for the defines to ensure that -configuration that already have these defines are still buildable. - -This commit is temporary until a new version of iptables can be -used that contains the defines. - -This is similar to the commit in the iptables git repository: - - https://git.netfilter.org/cgi-bin/gitweb.cgi?p=iptables.git;a=commit;h=dbe77cc974cee656eae37e75039dd1a410a4535b - -Upstream-Status: Backport - -Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> ---- - include/linux/types.h | 10 ++++++++++ - 1 files changed, 10 insertions(+), 0 deletions(-) - -diff --git a/include/linux/types.h b/include/linux/types.h -index 8b483c8..ebf6432 100644 ---- a/include/linux/types.h -+++ b/include/linux/types.h -@@ -34,5 +34,15 @@ typedef __u64 __bitwise __be64; - typedef __u16 __bitwise __sum16; - typedef __u32 __bitwise __wsum; - -+#ifndef __aligned_u64 -+#define __aligned_u64 __u64 __attribute__((aligned(8))) -+#endif -+#ifndef __aligned_be64 -+#define __aligned_be64 __be64 __attribute__((aligned(8))) -+#endif -+#ifndef __aligned_le64 -+#define __aligned_le64 __le64 __attribute__((aligned(8))) -+#endif -+ - #endif /* __ASSEMBLY__ */ - #endif /* _LINUX_TYPES_H */ --- -1.7.0.4 - diff --git a/meta/recipes-extended/iptables/iptables_1.4.21.bb b/meta/recipes-extended/iptables/iptables_1.4.21.bb deleted file mode 100644 index 31c017b2ce..0000000000 --- a/meta/recipes-extended/iptables/iptables_1.4.21.bb +++ /dev/null @@ -1,47 +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" - -RRECOMMENDS_${PN} = "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" -FILES_${PN} =+ "${libdir}/xtables/ ${datadir}/xtables" -FILES_${PN}-dbg =+ "${libdir}/xtables/.debug" - -SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \ - file://types.h-add-defines-that-are-required-for-if_packet.patch \ - file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \ - file://0001-fix-build-with-musl.patch \ - " - -SRC_URI[md5sum] = "536d048c8e8eeebcd9757d0863ebb0c0" -SRC_URI[sha256sum] = "52004c68021da9a599feed27f65defcfb22128f7da2c0531c0f75de0f479d3e0" - -inherit autotools pkgconfig - -EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR} \ - " -PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \ - " - -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," - -# libnfnetlink recipe is in meta-networking layer -PACKAGECONFIG[libnfnetlink] = "--enable-libnfnetlink,--disable-libnfnetlink,libnfnetlink" - -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 -} diff --git a/meta/recipes-extended/iptables/iptables_1.8.5.bb b/meta/recipes-extended/iptables/iptables_1.8.5.bb new file mode 100644 index 0000000000..5976128807 --- /dev/null +++ b/meta/recipes-extended/iptables/iptables_1.8.5.bb @@ -0,0 +1,111 @@ +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 = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \ + file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \ + file://0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch \ + file://0001-build-resolve-iptables-apply-not-getting-installed.patch \ + file://iptables.service \ + file://iptables.rules \ + file://ip6tables.service \ + file://ip6tables.rules \ +" +SRC_URI[sha256sum] = "d457d74512e63aa3f50336e0597d4023c0e3c6845594d38532efb6ebcb294309" + +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," + +# libnfnetlink recipe is in meta-networking layer +PACKAGECONFIG[libnfnetlink] = "--enable-libnfnetlink,--disable-libnfnetlink,libnfnetlink libnetfilter-conntrack" + +# 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} bash" + +# 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/recipes-extended/iputils/files/debian/targets.diff b/meta/recipes-extended/iputils/files/debian/targets.diff deleted file mode 100644 index 2cb5576c62..0000000000 --- a/meta/recipes-extended/iputils/files/debian/targets.diff +++ /dev/null @@ -1,15 +0,0 @@ -Upstream-Status: Inappropriate [disable feature] - -Index: iputils-s20121221/Makefile -=================================================================== ---- iputils-s20121221.orig/Makefile -+++ iputils-s20121221/Makefile -@@ -106,7 +106,7 @@ endif - endif - - # ------------------------------------- --IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd -+IPV4_TARGETS=tracepath ping clockdiff arping - IPV6_TARGETS=tracepath6 traceroute6 ping6 - TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS) - diff --git a/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff b/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff deleted file mode 100644 index d3b18868c0..0000000000 --- a/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff +++ /dev/null @@ -1,31 +0,0 @@ -Upstream-Status: Pending [from other distro Debian] - -Index: iputils-s20121221/tracepath.c -=================================================================== ---- iputils-s20121221.orig/tracepath.c -+++ iputils-s20121221/tracepath.c -@@ -370,9 +370,9 @@ main(int argc, char **argv) - } - #endif - -- he = gethostbyname(p); -+ he = gethostbyname2(argv[0], AF_INET); - if (he == NULL) { -- herror("gethostbyname"); -+ herror("gethostbyname2"); - exit(1); - } - -Index: iputils-s20121221/ping.c -=================================================================== ---- iputils-s20121221.orig/ping.c -+++ iputils-s20121221/ping.c -@@ -279,7 +279,7 @@ main(int argc, char **argv) - #else - idn = target; - #endif -- hp = gethostbyname(idn); -+ hp = gethostbyname2(idn, AF_INET); - if (!hp) { - fprintf(stderr, "ping: unknown host %s\n", target); - exit(2); diff --git a/meta/recipes-extended/iputils/files/fix-build-command-line-argument-with-gnutls.patch b/meta/recipes-extended/iputils/files/fix-build-command-line-argument-with-gnutls.patch deleted file mode 100644 index b9cd82ee88..0000000000 --- a/meta/recipes-extended/iputils/files/fix-build-command-line-argument-with-gnutls.patch +++ /dev/null @@ -1,37 +0,0 @@ -Upstream-Status: Backport - -From 568e990d30fc7e9416e0a6f8c74ea5013921eaec Mon Sep 17 00:00:00 2001 -From: Arjan van de Ven <arjanvandeven@gmail.com> -Date: Wed, 16 Jan 2013 03:12:15 +0900 -Subject: [PATCH] ping6: Fix build command line argument with gnutls. - -The ping6 command can use either openssl or gnutls... -and the Makefile has a bunch of setup for defining which of the two to use. - -Unfortunately, the final -D define on the commandline to enable gnutls -inside the ping6.c file didn't actually make it onto the gcc -commandline. -This patch adds the $(DEF_CRYPTO) Makefile variable to fix this gap. - -Signed-off-by: Arjan van de Ven <arjanvandeven@gmail.com> -Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> ---- - Makefile | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/Makefile b/Makefile -index c62d9df..89249f5 100644 ---- a/Makefile -+++ b/Makefile -@@ -149,7 +149,7 @@ LIB_clockdiff = $(LIB_CAP) - DEF_ping_common = $(DEF_CAP) $(DEF_IDN) - DEF_ping = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) - LIB_ping = $(LIB_CAP) $(LIB_IDN) --DEF_ping6 = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_ENABLE_PING6_RTHDR) -+DEF_ping6 = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_ENABLE_PING6_RTHDR) $(DEF_CRYPTO) - LIB_ping6 = $(LIB_CAP) $(LIB_IDN) $(LIB_RESOLV) $(LIB_CRYPTO) - - ping: ping_common.o --- -1.7.2.5 - diff --git a/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch b/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch deleted file mode 100644 index 92bf946f2a..0000000000 --- a/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch +++ /dev/null @@ -1,27 +0,0 @@ -Fix nsgmls path issue - -Upstream-Status: Pending - -Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> - -Index: iputils-s20101006/doc/Makefile -=================================================================== ---- iputils-s20101006.orig/doc/Makefile 2011-09-13 20:42:27.000000000 +0800 -+++ iputils-s20101006/doc/Makefile 2011-09-13 21:01:52.000000000 +0800 -@@ -27,10 +27,15 @@ - # docbook2man produces utterly ugly output and I did not find - # any way to customize this but hacking backend perl script a little. - # Well, hence... -+# nsgmls seems append path to search directory according to the sysid path. -+# e.g. if input ../index.db, it would search $search_directory/../ rather than -+# $search_directory, which leads searching failure. Fixing nsgmls probably -+# introduce some side effects, so use this ugly hack: running nsgmls in current -+# directory, and running docbook2man in tmp directory. - - $(MANFILES): index.db - @-mkdir tmp.db2man -- @set -e; cd tmp.db2man; nsgmls ../$< | sgmlspl ../docbook2man-spec.pl ; mv $@ .. -+ @set -e; nsgmls $< >tmp.db2man/output; cd tmp.db2man; cat output | sgmlspl ../docbook2man-spec.pl ; mv $@ .. - @-rm -rf tmp.db2man - - clean: diff --git a/meta/recipes-extended/iputils/iputils/0001-rarpd-rdisc-Drop-PrivateUsers.patch b/meta/recipes-extended/iputils/iputils/0001-rarpd-rdisc-Drop-PrivateUsers.patch new file mode 100644 index 0000000000..d7367caf78 --- /dev/null +++ b/meta/recipes-extended/iputils/iputils/0001-rarpd-rdisc-Drop-PrivateUsers.patch @@ -0,0 +1,46 @@ +From 6e51d529988cfc0bb357751fd767e9f1478e2b81 Mon Sep 17 00:00:00 2001 +From: Alex Kiernan <alex.kiernan@gmail.com> +Date: Thu, 13 Feb 2020 06:08:45 +0000 +Subject: [PATCH] rarpd: rdisc: Drop PrivateUsers + +Neither rarpd nor rdisc can gain the necessary capabilities with +PrivateUsers enabled. + +Upstream-Status: Pending +Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> +--- + systemd/rarpd.service.in | 1 - + systemd/rdisc.service.in | 3 ++- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/systemd/rarpd.service.in b/systemd/rarpd.service.in +index e600c10c93e6..f5d7621a7ce8 100644 +--- a/systemd/rarpd.service.in ++++ b/systemd/rarpd.service.in +@@ -12,7 +12,6 @@ AmbientCapabilities=CAP_NET_RAW + DynamicUser=yes + PrivateTmp=yes + PrivateDevices=yes +-PrivateUsers=yes + ProtectSystem=strict + ProtectHome=yes + ProtectControlGroups=yes +diff --git a/systemd/rdisc.service.in b/systemd/rdisc.service.in +index 4e2a1ec9d0e5..a71b87d36b37 100644 +--- a/systemd/rdisc.service.in ++++ b/systemd/rdisc.service.in +@@ -8,9 +8,10 @@ After=network.target + EnvironmentFile=-/etc/sysconfig/rdisc + ExecStart=@sbindir@/rdisc -f -t $OPTIONS $SEND_ADDRESS $RECEIVE_ADDRESS + ++CapabilityBoundingSet=CAP_NET_RAW + AmbientCapabilities=CAP_NET_RAW + PrivateTmp=yes +-PrivateUsers=yes ++DynamicUser=yes + ProtectSystem=strict + ProtectHome=yes + ProtectControlGroups=yes +-- +2.17.1 + diff --git a/meta/recipes-extended/iputils/iputils_s20121221.bb b/meta/recipes-extended/iputils/iputils_s20121221.bb deleted file mode 100644 index e87a32a7de..0000000000 --- a/meta/recipes-extended/iputils/iputils_s20121221.bb +++ /dev/null @@ -1,71 +0,0 @@ -SUMMARY = "Network monitoring tools" -DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \ -tracepath, tracepath6, ping, ping6 and arping." -HOMEPAGE = "http://www.skbuff.net/iputils" -SECTION = "console/network" - -LICENSE = "BSD & GPLv2+" - -LIC_FILES_CHKSUM = "file://ping.c;beginline=1;endline=35;md5=f9ceb201733e9a6cf8f00766dd278d82 \ - file://tracepath.c;beginline=1;endline=10;md5=0ecea2bf60bff2f3d840096d87647f3d \ - file://arping.c;beginline=1;endline=11;md5=fe84301b5c2655c950f8b92a057fafa6 \ - file://tftpd.c;beginline=1;endline=32;md5=28834bf8a91a5b8a92755dbee709ef96 " - -DEPENDS = "gnutls docbook-utils-native sgmlspl-native libcap" - - -SRC_URI = "http://www.skbuff.net/iputils/${BPN}-${PV}.tar.bz2 \ - file://debian/use_gethostbyname2.diff \ - file://debian/targets.diff \ - file://nsgmls-path-fix.patch \ - file://fix-build-command-line-argument-with-gnutls.patch \ - " - -SRC_URI[md5sum] = "6072aef64205720dd1893b375e184171" -SRC_URI[sha256sum] = "450f549fc5b620c23c5929aa6d54b7ddfc7ee1cb1e8efdc5e8bb21d8d0c5319f" - -do_compile () { - oe_runmake 'CC=${CC} -D_GNU_SOURCE' VPATH="${STAGING_LIBDIR}:${STAGING_DIR_HOST}/${base_libdir}" all man -} - -do_install () { - install -m 0755 -d ${D}${base_bindir} ${D}${mandir}/man8 - # SUID root programs - install -m 4555 ping ${D}${base_bindir}/ping - install -m 4555 ping6 ${D}${base_bindir}/ping6 - install -m 4555 traceroute6 ${D}${base_bindir}/ - install -m 4555 clockdiff ${D}${base_bindir}/ - # Other programgs - for i in arping tracepath tracepath6; do - install -m 0755 $i ${D}${base_bindir}/ - done - # Manual pages for things we build packages for - for i in tracepath.8 traceroute6.8 ping.8 arping.8; do - install -m 0644 doc/$i ${D}${mandir}/man8/ || true - done -} - -inherit update-alternatives - -ALTERNATIVE_PRIORITY = "100" - -ALTERNATIVE_${PN}-ping = "ping" -ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping" - -ALTERNATIVE_${PN}-ping6 = "ping6" -ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6" - -PACKAGES += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6 ${PN}-clockdiff" - -ALLOW_EMPTY_${PN} = "1" -RDEPENDS_${PN} += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6 ${PN}-clockdiff" - -FILES_${PN} = "" -FILES_${PN}-ping = "${base_bindir}/ping.${BPN}" -FILES_${PN}-ping6 = "${base_bindir}/ping6.${BPN}" -FILES_${PN}-arping = "${base_bindir}/arping" -FILES_${PN}-tracepath = "${base_bindir}/tracepath" -FILES_${PN}-tracepath6 = "${base_bindir}/tracepath6" -FILES_${PN}-traceroute6 = "${base_bindir}/traceroute6" -FILES_${PN}-clockdiff = "${base_bindir}/clockdiff" -FILES_${PN}-doc = "${mandir}/man8" diff --git a/meta/recipes-extended/iputils/iputils_s20200821.bb b/meta/recipes-extended/iputils/iputils_s20200821.bb new file mode 100644 index 0000000000..28dd194a12 --- /dev/null +++ b/meta/recipes-extended/iputils/iputils_s20200821.bb @@ -0,0 +1,72 @@ +SUMMARY = "Network monitoring tools" +DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \ +tracepath, tracepath6, ping, ping6 and arping." +HOMEPAGE = "https://github.com/iputils/iputils" +SECTION = "console/network" + +LICENSE = "BSD & GPLv2+" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=55aa8c9fcad0691cef0ecd420361e390" + +DEPENDS = "gnutls" + +SRC_URI = "git://github.com/iputils/iputils \ + file://0001-rarpd-rdisc-Drop-PrivateUsers.patch \ + " +SRCREV = "23c3782ae0c7f9c6ae59dbed8ad9204f8758542b" + +S = "${WORKDIR}/git" + +UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>s\d+)" + +# Fixed in 2000-10-10, but the versioning of iputils +# breaks the version order. +CVE_CHECK_WHITELIST += "CVE-2000-1213 CVE-2000-1214" + +PACKAGECONFIG ??= "libcap rarpd \ + ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ninfod traceroute6', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" +PACKAGECONFIG[libcap] = "-DUSE_CAP=true, -DUSE_CAP=false, libcap" +PACKAGECONFIG[libidn] = "-DUSE_IDN=true, -DUSE_IDN=false, libidn2" +PACKAGECONFIG[gettext] = "-DUSE_GETTEXT=true, -DUSE_GETTEXT=false, gettext" +PACKAGECONFIG[ninfod] = "-DBUILD_NINFOD=true,-DBUILD_NINFOD=false," +PACKAGECONFIG[rarpd] = "-DBUILD_RARPD=true,-DBUILD_RARPD=false," +PACKAGECONFIG[systemd] = "-Dsystemdunitdir=${systemd_unitdir}/system,,systemd" +PACKAGECONFIG[tftpd] = "-DBUILD_TFTPD=true, -DBUILD_TFTPD=false," +PACKAGECONFIG[traceroute6] = "-DBUILD_TRACEROUTE6=true,-DBUILD_TRACEROUTE6=false," +PACKAGECONFIG[docs] = "-DBUILD_HTML_MANS=true -DBUILD_MANS=true,-DBUILD_HTML_MANS=false -DBUILD_MANS=false, libxslt" + +inherit meson systemd update-alternatives + +# Have to disable setcap/suid as its not deterministic +EXTRA_OEMESON += "--prefix=${root_prefix}/ -DNO_SETCAP_OR_SUID=true" + +ALTERNATIVE_PRIORITY = "100" + +ALTERNATIVE_${PN}-ping = "ping" +ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping" + +SPLITPKGS = "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-clockdiff ${PN}-rdisc \ + ${@bb.utils.contains('PACKAGECONFIG', 'rarpd', '${PN}-rarpd', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'tftpd', '${PN}-tftpd', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '${PN}-traceroute6 ${PN}-ninfod', '', d)}" +PACKAGES += "${SPLITPKGS}" + +ALLOW_EMPTY_${PN} = "1" +RDEPENDS_${PN} += "${SPLITPKGS}" + +FILES_${PN} = "" +FILES_${PN}-ping = "${base_bindir}/ping.${BPN}" +FILES_${PN}-arping = "${base_bindir}/arping" +FILES_${PN}-tracepath = "${base_bindir}/tracepath" +FILES_${PN}-traceroute6 = "${base_bindir}/traceroute6" +FILES_${PN}-clockdiff = "${base_bindir}/clockdiff" +FILES_${PN}-tftpd = "${base_bindir}/tftpd ${sysconfdir}/xinetd.d/tftp" +FILES_${PN}-rarpd = "${base_sbindir}/rarpd ${systemd_unitdir}/system/rarpd@.service" +FILES_${PN}-rdisc = "${base_sbindir}/rdisc" +FILES_${PN}-ninfod = "${base_sbindir}/ninfod ${sysconfdir}/init.d/ninfod.sh" + +SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '${PN}-ninfod', '', d)} \ + ${PN}-rdisc" +SYSTEMD_SERVICE_${PN}-ninfod = "ninfod.service" +SYSTEMD_SERVICE_${PN}-rdisc = "rdisc.service" diff --git a/meta/recipes-extended/less/less_479.bb b/meta/recipes-extended/less/less_562.bb index 618954b0f0..c900574674 100644 --- a/meta/recipes-extended/less/less_479.bb +++ b/meta/recipes-extended/less/less_562.bb @@ -21,14 +21,17 @@ SECTION = "console/utils" LICENSE = "GPLv3+ | BSD-2-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ - file://LICENSE;md5=48c26a307f91af700e1f00585f215aaf" + file://LICENSE;md5=ba01d0cab7f62f7f2204c7780ff6a87d \ + " DEPENDS = "ncurses" SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz \ " -SRC_URI[md5sum] = "049f51ccfe2686009c6ce943eeb4bbaf" -SRC_URI[sha256sum] = "5bf06cb30ee2a2bd1f79f39aa91e46444e7cb19b48c95c4992fa63cfe4527a80" +SRC_URI[md5sum] = "0371a9678cb42f37b9bf9b86e8aa7903" +SRC_URI[sha256sum] = "eab470c7c928132441541aa49b1352c0fc699c30f762dfaeb3bf88e6f0fd701b" + +UPSTREAM_CHECK_URI = "http://www.greenwoodsoftware.com/less/download.html" inherit autotools update-alternatives diff --git a/meta/recipes-extended/libaio/libaio/00_arches.patch b/meta/recipes-extended/libaio/libaio/00_arches.patch index 9d6447d98a..bec189f87c 100644 --- a/meta/recipes-extended/libaio/libaio/00_arches.patch +++ b/meta/recipes-extended/libaio/libaio/00_arches.patch @@ -1,11 +1,27 @@ +From ceba1e03e5b57cdae0b3b2d2c9afebc085c986d8 Mon Sep 17 00:00:00 2001 +From: Qing He <qing.he@intel.com> +Date: Fri, 27 Aug 2010 10:15:31 +0800 +Subject: [PATCH] libaio: add new recipe + Upstream-Status: Inappropriate [embedded specific] from openembedded, added by Qing He <qing.he@intel.com> -Index: libaio-0.3.110/src/syscall-m68k.h -=================================================================== +--- + src/syscall-m68k.h | 78 ++++++++++++++++++ + src/syscall-mips.h | 223 +++++++++++++++++++++++++++++++++++++++++++++++++++ + src/syscall-parisc.h | 146 +++++++++++++++++++++++++++++++++ + src/syscall.h | 6 ++ + 4 files changed, 453 insertions(+) + create mode 100644 src/syscall-m68k.h + create mode 100644 src/syscall-mips.h + create mode 100644 src/syscall-parisc.h + +diff --git a/src/syscall-m68k.h b/src/syscall-m68k.h +new file mode 100644 +index 0000000..f440412 --- /dev/null -+++ libaio-0.3.110/src/syscall-m68k.h ++++ b/src/syscall-m68k.h @@ -0,0 +1,78 @@ +#define __NR_io_setup 241 +#define __NR_io_destroy 242 @@ -85,27 +101,11 @@ Index: libaio-0.3.110/src/syscall-m68k.h +return (type) __res; \ +} + -Index: libaio-0.3.110/src/syscall.h -=================================================================== ---- libaio-0.3.110.orig/src/syscall.h -+++ libaio-0.3.110/src/syscall.h -@@ -28,6 +28,12 @@ - #include "syscall-sparc.h" - #elif defined(__aarch64__) - #include "syscall-arm64.h" -+#elif defined(__m68k__) -+#include "syscall-m68k.h" -+#elif defined(__hppa__) -+#include "syscall-parisc.h" -+#elif defined(__mips__) -+#include "syscall-mips.h" - #else - #warning "using generic syscall method" - #include "syscall-generic.h" -Index: libaio-0.3.110/src/syscall-mips.h -=================================================================== +diff --git a/src/syscall-mips.h b/src/syscall-mips.h +new file mode 100644 +index 0000000..4142499 --- /dev/null -+++ libaio-0.3.110/src/syscall-mips.h ++++ b/src/syscall-mips.h @@ -0,0 +1,223 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public @@ -330,10 +330,11 @@ Index: libaio-0.3.110/src/syscall-mips.h + +#endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */ + -Index: libaio-0.3.110/src/syscall-parisc.h -=================================================================== +diff --git a/src/syscall-parisc.h b/src/syscall-parisc.h +new file mode 100644 +index 0000000..ff61746 --- /dev/null -+++ libaio-0.3.110/src/syscall-parisc.h ++++ b/src/syscall-parisc.h @@ -0,0 +1,146 @@ +/* + * Linux system call numbers. @@ -481,127 +482,20 @@ Index: libaio-0.3.110/src/syscall-parisc.h + return K_INLINE_SYSCALL(sname, 5, arg1, arg2, arg3, arg4, arg5); \ +} + -Index: libaio-0.3.110/src/syscall-arm.h -=================================================================== ---- libaio-0.3.110.orig/src/syscall-arm.h -+++ libaio-0.3.110/src/syscall-arm.h -@@ -114,3 +114,119 @@ type fname(type1 arg1, type2 arg2, type3 - return (type) __res_r0; \ - } - -+/* -+ * linux/include/asm-arm/unistd.h -+ * -+ * Copyright (C) 2001-2005 Russell King -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * Please forward _all_ changes to this file to rmk@arm.linux.org.uk, -+ * no matter what the change is. Thanks! -+ */ -+ -+#define __NR_OABI_SYSCALL_BASE 0x900000 -+ -+#if defined(__thumb__) || defined(__ARM_EABI__) -+#define __NR_SYSCALL_BASE 0 -+#else -+#define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE -+#endif -+ -+#define __NR_io_setup (__NR_SYSCALL_BASE+243) -+#define __NR_io_destroy (__NR_SYSCALL_BASE+244) -+#define __NR_io_getevents (__NR_SYSCALL_BASE+245) -+#define __NR_io_submit (__NR_SYSCALL_BASE+246) -+#define __NR_io_cancel (__NR_SYSCALL_BASE+247) -+ -+#define __sys2(x) #x -+#define __sys1(x) __sys2(x) -+ -+#if defined(__thumb__) || defined(__ARM_EABI__) -+#define __SYS_REG(name) register long __sysreg __asm__("r7") = __NR_##name; -+#define __SYS_REG_LIST(regs...) "r" (__sysreg) , ##regs -+#define __syscall(name) "swi\t0" -+#else -+#define __SYS_REG(name) -+#define __SYS_REG_LIST(regs...) regs -+#define __syscall(name) "swi\t" __sys1(__NR_##name) "" -+#endif -+ -+#define io_syscall1(type,fname,sname,type1,arg1) \ -+type fname(type1 arg1) { \ -+ __SYS_REG(sname) \ -+ register long __r0 __asm__("r0") = (long)arg1; \ -+ register long __res_r0 __asm__("r0"); \ -+ __asm__ __volatile__ ( \ -+ __syscall(sname) \ -+ : "=r" (__res_r0) \ -+ : __SYS_REG_LIST( "0" (__r0) ) \ -+ : "memory" ); \ -+ return (type) __res_r0; \ -+} -+ -+#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ -+type fname(type1 arg1,type2 arg2) { \ -+ __SYS_REG(sname) \ -+ register long __r0 __asm__("r0") = (long)arg1; \ -+ register long __r1 __asm__("r1") = (long)arg2; \ -+ register long __res_r0 __asm__("r0"); \ -+ __asm__ __volatile__ ( \ -+ __syscall(sname) \ -+ : "=r" (__res_r0) \ -+ : __SYS_REG_LIST( "0" (__r0), "r" (__r1) ) \ -+ : "memory" ); \ -+ return (type) __res_r0; \ -+} -+ -+#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ -+type fname(type1 arg1,type2 arg2,type3 arg3) { \ -+ __SYS_REG(sname) \ -+ register long __r0 __asm__("r0") = (long)arg1; \ -+ register long __r1 __asm__("r1") = (long)arg2; \ -+ register long __r2 __asm__("r2") = (long)arg3; \ -+ register long __res_r0 __asm__("r0"); \ -+ __asm__ __volatile__ ( \ -+ __syscall(sname) \ -+ : "=r" (__res_r0) \ -+ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2) ) \ -+ : "memory" ); \ -+ return (type) __res_r0; \ -+} -+ -+#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4)\ -+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \ -+ __SYS_REG(sname) \ -+ register long __r0 __asm__("r0") = (long)arg1; \ -+ register long __r1 __asm__("r1") = (long)arg2; \ -+ register long __r2 __asm__("r2") = (long)arg3; \ -+ register long __r3 __asm__("r3") = (long)arg4; \ -+ register long __res_r0 __asm__("r0"); \ -+ __asm__ __volatile__ ( \ -+ __syscall(sname) \ -+ : "=r" (__res_r0) \ -+ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), "r" (__r3) ) \ -+ : "memory" ); \ -+ return (type) __res_r0; \ -+} -+ -+#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ -+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) {\ -+ __SYS_REG(sname) \ -+ register long __r0 __asm__("r0") = (long)arg1; \ -+ register long __r1 __asm__("r1") = (long)arg2; \ -+ register long __r2 __asm__("r2") = (long)arg3; \ -+ register long __r3 __asm__("r3") = (long)arg4; \ -+ register long __r4 __asm__("r4") = (long)arg5; \ -+ register long __res_r0 __asm__("r0"); \ -+ __asm__ __volatile__ ( \ -+ __syscall(sname) \ -+ : "=r" (__res_r0) \ -+ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), \ -+ "r" (__r3), "r" (__r4) ) \ -+ : "memory" ); \ -+ return (type) __res_r0; \ -+} -+ +diff --git a/src/syscall.h b/src/syscall.h +index 9b9e9c1..9ecd3b4 100644 +--- a/src/syscall.h ++++ b/src/syscall.h +@@ -29,6 +29,12 @@ + #include "syscall-sparc.h" + #elif defined(__aarch64__) || defined(__riscv) + #include "syscall-generic.h" ++#elif defined(__m68k__) ++#include "syscall-m68k.h" ++#elif defined(__hppa__) ++#include "syscall-parisc.h" ++#elif defined(__mips__) ++#include "syscall-mips.h" + #else + #warning "using system call numbers from sys/syscall.h" + #endif diff --git a/meta/recipes-extended/libaio/libaio/destdir.patch b/meta/recipes-extended/libaio/libaio/destdir.patch index dad9601c49..0f90406bee 100644 --- a/meta/recipes-extended/libaio/libaio/destdir.patch +++ b/meta/recipes-extended/libaio/libaio/destdir.patch @@ -2,16 +2,16 @@ Upstream-Status: Pending from openembedded, added by Qing He <qing.he@intel.com> -Index: libaio-0.3.106/Makefile +Index: libaio-0.3.110/Makefile =================================================================== ---- libaio-0.3.106.orig/Makefile 2004-02-26 07:25:10.000000000 -0800 -+++ libaio-0.3.106/Makefile 2006-10-14 09:19:07.000000000 -0700 -@@ -15,7 +15,7 @@ +--- libaio-0.3.110.orig/Makefile ++++ libaio-0.3.110/Makefile +@@ -15,7 +15,7 @@ all: @$(MAKE) -C src install: - @$(MAKE) -C src install prefix=$(prefix) includedir=$(includedir) libdir=$(libdir) + @$(MAKE) -C src install prefix=$(DESTDIR)$(prefix) includedir=$(DESTDIR)$(includedir) libdir=$(DESTDIR)$(libdir) - - clean: + check: + @$(MAKE) -C harness check diff --git a/meta/recipes-extended/libaio/libaio/generic-arch-dectection-for-padding-defines.patch b/meta/recipes-extended/libaio/libaio/generic-arch-dectection-for-padding-defines.patch deleted file mode 100644 index bba7e554af..0000000000 --- a/meta/recipes-extended/libaio/libaio/generic-arch-dectection-for-padding-defines.patch +++ /dev/null @@ -1,65 +0,0 @@ -From: Nathan Rossi <nathan.rossi@xilinx.com> -Date: Tue, 27 Jan 2015 14:59:35 +1000 -Subject: [PATCH] Generic arch dectection for padding defines - -When available use the GNU C defines for endian and bitwidth to -determine the padding required. This reduces the need to define the -padding selection for every architecture. - -Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> -Signed-off-by: Jeff Moyer <jmoyer@redhat.com> -Upstream-Status: Backport ---- - src/libaio.h | 16 ++++++++++++---- - 1 file changed, 12 insertions(+), 4 deletions(-) - -diff --git a/src/libaio.h b/src/libaio.h -index 1223146..4a4e0f5 100644 ---- a/src/libaio.h -+++ b/src/libaio.h -@@ -52,14 +52,18 @@ typedef enum io_iocb_cmd { - /* little endian, 32 bits */ - #if defined(__i386__) || (defined(__arm__) && !defined(__ARMEB__)) || \ - defined(__sh__) || defined(__bfin__) || defined(__MIPSEL__) || \ -- defined(__cris__) -+ defined(__cris__) || \ -+ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \ -+ __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG__ == 4) - #define PADDED(x, y) x; unsigned y - #define PADDEDptr(x, y) x; unsigned y - #define PADDEDul(x, y) unsigned long x; unsigned y - - /* little endian, 64 bits */ - #elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) || \ -- (defined(__aarch64__) && defined(__AARCH64EL__)) -+ (defined(__aarch64__) && defined(__AARCH64EL__)) || \ -+ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \ -+ __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG__ == 8) - #define PADDED(x, y) x, y - #define PADDEDptr(x, y) x - #define PADDEDul(x, y) unsigned long x -@@ -67,7 +71,9 @@ typedef enum io_iocb_cmd { - /* big endian, 64 bits */ - #elif defined(__powerpc64__) || defined(__s390x__) || \ - (defined(__sparc__) && defined(__arch64__)) || \ -- (defined(__aarch64__) && defined(__AARCH64EB__)) -+ (defined(__aarch64__) && defined(__AARCH64EB__)) || \ -+ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \ -+ __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ && __SIZEOF_LONG__ == 8) - #define PADDED(x, y) unsigned y; x - #define PADDEDptr(x,y) x - #define PADDEDul(x, y) unsigned long x -@@ -76,7 +82,9 @@ typedef enum io_iocb_cmd { - #elif defined(__PPC__) || defined(__s390__) || \ - (defined(__arm__) && defined(__ARMEB__)) || \ - defined(__sparc__) || defined(__MIPSEB__) || defined(__m68k__) || \ -- defined(__hppa__) || defined(__frv__) || defined(__avr32__) -+ defined(__hppa__) || defined(__frv__) || defined(__avr32__) || \ -+ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \ -+ __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ && __SIZEOF_LONG__ == 4) - #define PADDED(x, y) unsigned y; x - #define PADDEDptr(x, y) unsigned y; x - #define PADDEDul(x, y) unsigned y; unsigned long x --- -2.1.1 - diff --git a/meta/recipes-extended/libaio/libaio/libaio_fix_for_mips_syscalls.patch b/meta/recipes-extended/libaio/libaio/libaio_fix_for_mips_syscalls.patch index 022276af83..9c6850c08a 100644 --- a/meta/recipes-extended/libaio/libaio/libaio_fix_for_mips_syscalls.patch +++ b/meta/recipes-extended/libaio/libaio/libaio_fix_for_mips_syscalls.patch @@ -1,4 +1,4 @@ -Upstream status: Inappropriate [embedded specific] +Upstream-Status: Inappropriate [embedded specific] Signed-off-by: Phil Staub <Phil.Staub@windriver.com> diff --git a/meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch b/meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch deleted file mode 100644 index 508f5a12f1..0000000000 --- a/meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch +++ /dev/null @@ -1,61 +0,0 @@ -Upstream-Status: Pending - -Properly load arguments 5 an 6 for x86-64 syscall -Use asm ("r10") and asm ("r8") to load arguments 5 an 6 for x86-64 -syscall so that it works with both x32 and x86-64. - -Received this patch from H.J. Lu <hjl.tools@gmail.com> - -Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> -2011/12/02 - ---- libaio-0.3.109/src/syscall-x86_64.h.x32 2009-10-09 11:17:02.000000000 -0700 -+++ libaio-0.3.109/src/syscall-x86_64.h 2011-12-02 09:09:07.537603224 -0800 -@@ -1,8 +1,18 @@ -+#ifndef __NR_io_setup - #define __NR_io_setup 206 -+#endif -+#ifndef __NR_io_destroy - #define __NR_io_destroy 207 -+#endif -+#ifndef __NR_io_getevents - #define __NR_io_getevents 208 -+#endif -+#ifndef __NR_io_submit - #define __NR_io_submit 209 -+#endif -+#ifndef __NR_io_cancel - #define __NR_io_cancel 210 -+#endif - - #define __syscall_clobber "r11","rcx","memory" - #define __syscall "syscall" -@@ -42,10 +52,11 @@ return __res; \ - type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ - { \ - long __res; \ --__asm__ volatile ("movq %5,%%r10 ;" __syscall \ -+register long __a4 asm ("r10") = (long) arg4; \ -+__asm__ volatile (__syscall \ - : "=a" (__res) \ - : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)), \ -- "d" ((long)(arg3)),"g" ((long)(arg4)) : __syscall_clobber,"r10" ); \ -+ "d" ((long)(arg3)),"r" (__a4)); \ - return __res; \ - } - -@@ -54,10 +65,11 @@ return __res; \ - type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ - { \ - long __res; \ --__asm__ volatile ("movq %5,%%r10 ; movq %6,%%r8 ; " __syscall \ -+register long __a4 asm ("r10") = (long) arg4; \ -+register long __a5 asm ("r8") = (long) arg5; \ -+__asm__ volatile ( __syscall \ - : "=a" (__res) \ - : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)), \ -- "d" ((long)(arg3)),"g" ((long)(arg4)),"g" ((long)(arg5)) : \ -- __syscall_clobber,"r8","r10" ); \ -+ "d" ((long)(arg3)),"r" (__a4),"r" (__a5)); \ - return __res; \ - } diff --git a/meta/recipes-extended/libaio/libaio/system-linkage.patch b/meta/recipes-extended/libaio/libaio/system-linkage.patch new file mode 100644 index 0000000000..0b1f475697 --- /dev/null +++ b/meta/recipes-extended/libaio/libaio/system-linkage.patch @@ -0,0 +1,37 @@ +From 94bba6880b1f10c6b3bf33a17ac40935d65a81ae Mon Sep 17 00:00:00 2001 +From: Ross Burton <ross.burton@intel.com> +Date: Fri, 6 Nov 2015 15:19:46 +0000 +Subject: [PATCH] Don't remove the system libraries and startup files from + libaio, as in some build configurations these are required. For example, + including conf/include/security_flags.inc on PPC results in: + +io_queue_init.os: In function `io_queue_init': +tmp/work/ppce300c3-poky-linux/libaio/0.3.110-r0/libaio-0.3.110/src/io_queue_init.c:33: +undefined reference to `__stack_chk_fail_local' + +Upstream-Status: Pending +Signed-off-by: Ross Burton <ross.burton@intel.com> +--- + src/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/Makefile b/src/Makefile +index eadb336..56ab701 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -3,10 +3,10 @@ includedir=$(prefix)/include + libdir=$(prefix)/lib + + CFLAGS ?= -g -fomit-frame-pointer -O2 +-CFLAGS += -nostdlib -nostartfiles -Wall -I. -fPIC ++CFLAGS += -Wall -I. -fPIC + SO_CFLAGS=-shared $(CFLAGS) + L_CFLAGS=$(CFLAGS) +-LINK_FLAGS= ++LINK_FLAGS=$(LDFLAGS) + LINK_FLAGS+=$(LDFLAGS) + + soname=libaio.so.1 +-- +2.1.4 + diff --git a/meta/recipes-extended/libaio/libaio_0.3.110.bb b/meta/recipes-extended/libaio/libaio_0.3.111.bb index cbe29ce2ab..8e1cd349a0 100644 --- a/meta/recipes-extended/libaio/libaio_0.3.110.bb +++ b/meta/recipes-extended/libaio/libaio_0.3.111.bb @@ -5,25 +5,19 @@ HOMEPAGE = "http://lse.sourceforge.net/io/aio.html" LICENSE = "LGPLv2.1+" LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499" -SRC_URI = "${DEBIAN_MIRROR}/main/liba/libaio/libaio_${PV}.orig.tar.gz \ - file://generic-arch-dectection-for-padding-defines.patch \ +SRC_URI = "git://pagure.io/libaio.git;protocol=https \ file://00_arches.patch \ file://destdir.patch \ - file://libaio_fix_for_x32.patch \ file://libaio_fix_for_mips_syscalls.patch \ -" - -SRC_URI[md5sum] = "2a35602e43778383e2f4907a4ca39ab8" -SRC_URI[sha256sum] = "e019028e631725729376250e32b473012f7cb68e1f7275bfc1bbcdd0f8745f7e" + file://system-linkage.patch \ + " +SRCREV = "f66be22ab0a59a39858900ab72a8c6a6e8b0b7ec" +S = "${WORKDIR}/git" EXTRA_OEMAKE =+ "prefix=${prefix} includedir=${includedir} libdir=${libdir}" -# Need libc for stack-protector's __stack_chk_fail_local() bounce function -LDFLAGS_append_x86 = " -lc" - -do_configure () { - sed -i 's#LINK_FLAGS=.*#LINK_FLAGS=$(LDFLAGS)#' src/Makefile -} do_install () { oe_runmake install DESTDIR=${D} } + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-extended/libarchive/libarchive/0001-Add-ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS-option.patch b/meta/recipes-extended/libarchive/libarchive/0001-Add-ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS-option.patch deleted file mode 100644 index 4ca779c40f..0000000000 --- a/meta/recipes-extended/libarchive/libarchive/0001-Add-ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS-option.patch +++ /dev/null @@ -1,151 +0,0 @@ -From 59357157706d47c365b2227739e17daba3607526 Mon Sep 17 00:00:00 2001 -From: Alessandro Ghedini <alessandro@ghedini.me> -Date: Sun, 1 Mar 2015 12:07:45 +0100 -Subject: [PATCH] Add ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS option - -This fixes a directory traversal in the cpio tool. - - -Upstream-Status: backport - -Signed-off-by: Li Zhou <li.zhou@windriver.com> ---- - cpio/bsdcpio.1 | 3 ++- - cpio/cpio.c | 2 ++ - libarchive/archive.h | 2 ++ - libarchive/archive_write_disk.3 | 3 +++ - libarchive/archive_write_disk_posix.c | 14 +++++++++++--- - libarchive/test/test_write_disk_secure.c | 23 +++++++++++++++++++++++ - 6 files changed, 43 insertions(+), 4 deletions(-) - -diff --git a/cpio/bsdcpio.1 b/cpio/bsdcpio.1 -index f966aa0..e52546e 100644 ---- a/cpio/bsdcpio.1 -+++ b/cpio/bsdcpio.1 -@@ -156,7 +156,8 @@ See above for description. - .It Fl Fl insecure - (i and p mode only) - Disable security checks during extraction or copying. --This allows extraction via symbolic links and path names containing -+This allows extraction via symbolic links, absolute paths, -+and path names containing - .Sq .. - in the name. - .It Fl J , Fl Fl xz -diff --git a/cpio/cpio.c b/cpio/cpio.c -index 0acde11..b267e9b 100644 ---- a/cpio/cpio.c -+++ b/cpio/cpio.c -@@ -171,6 +171,7 @@ main(int argc, char *argv[]) - cpio->extract_flags |= ARCHIVE_EXTRACT_NO_OVERWRITE_NEWER; - cpio->extract_flags |= ARCHIVE_EXTRACT_SECURE_SYMLINKS; - cpio->extract_flags |= ARCHIVE_EXTRACT_SECURE_NODOTDOT; -+ cpio->extract_flags |= ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS; - cpio->extract_flags |= ARCHIVE_EXTRACT_PERM; - cpio->extract_flags |= ARCHIVE_EXTRACT_FFLAGS; - cpio->extract_flags |= ARCHIVE_EXTRACT_ACL; -@@ -256,6 +257,7 @@ main(int argc, char *argv[]) - case OPTION_INSECURE: - cpio->extract_flags &= ~ARCHIVE_EXTRACT_SECURE_SYMLINKS; - cpio->extract_flags &= ~ARCHIVE_EXTRACT_SECURE_NODOTDOT; -+ cpio->extract_flags &= ~ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS; - break; - case 'L': /* GNU cpio */ - cpio->option_follow_links = 1; -diff --git a/libarchive/archive.h b/libarchive/archive.h -index 1f0fc38..ef635ac 100644 ---- a/libarchive/archive.h -+++ b/libarchive/archive.h -@@ -649,6 +649,8 @@ __LA_DECL int archive_read_set_passphrase_callback(struct archive *, - /* Default: Do not use HFS+ compression if it was not compressed. */ - /* This has no effect except on Mac OS v10.6 or later. */ - #define ARCHIVE_EXTRACT_HFS_COMPRESSION_FORCED (0x8000) -+/* Default: Do not reject entries with absolute paths */ -+#define ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS (0x10000) - - __LA_DECL int archive_read_extract(struct archive *, struct archive_entry *, - int flags); -diff --git a/libarchive/archive_write_disk.3 b/libarchive/archive_write_disk.3 -index fa925cc..a2e7afa 100644 ---- a/libarchive/archive_write_disk.3 -+++ b/libarchive/archive_write_disk.3 -@@ -177,6 +177,9 @@ The default is to not refuse such paths. - Note that paths ending in - .Pa .. - always cause an error, regardless of this flag. -+.It Cm ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS -+Refuse to extract an absolute path. -+The default is to not refuse such paths. - .It Cm ARCHIVE_EXTRACT_SPARSE - Scan data for blocks of NUL bytes and try to recreate them with holes. - This results in sparse files, independent of whether the archive format -diff --git a/libarchive/archive_write_disk_posix.c b/libarchive/archive_write_disk_posix.c -index ab3bdac..c1290eb 100644 ---- a/libarchive/archive_write_disk_posix.c -+++ b/libarchive/archive_write_disk_posix.c -@@ -2509,8 +2509,9 @@ cleanup_pathname_win(struct archive_write_disk *a) - /* - * Canonicalize the pathname. In particular, this strips duplicate - * '/' characters, '.' elements, and trailing '/'. It also raises an -- * error for an empty path, a trailing '..' or (if _SECURE_NODOTDOT is -- * set) any '..' in the path. -+ * error for an empty path, a trailing '..', (if _SECURE_NODOTDOT is -+ * set) any '..' in the path or (if ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS -+ * is set) if the path is absolute. - */ - static int - cleanup_pathname(struct archive_write_disk *a) -@@ -2529,8 +2530,15 @@ cleanup_pathname(struct archive_write_disk *a) - cleanup_pathname_win(a); - #endif - /* Skip leading '/'. */ -- if (*src == '/') -+ if (*src == '/') { -+ if (a->flags & ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS) { -+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, -+ "Path is absolute"); -+ return (ARCHIVE_FAILED); -+ } -+ - separator = *src++; -+ } - - /* Scan the pathname one element at a time. */ - for (;;) { -diff --git a/libarchive/test/test_write_disk_secure.c b/libarchive/test/test_write_disk_secure.c -index 31c5bfd..2c94206 100644 ---- a/libarchive/test/test_write_disk_secure.c -+++ b/libarchive/test/test_write_disk_secure.c -@@ -178,6 +178,29 @@ DEFINE_TEST(test_write_disk_secure) - assert(S_ISDIR(st.st_mode)); - archive_entry_free(ae); - -+ /* -+ * Without security checks, we should be able to -+ * extract an absolute path. -+ */ -+ assert((ae = archive_entry_new()) != NULL); -+ archive_entry_copy_pathname(ae, "/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp"); -+ archive_entry_set_mode(ae, S_IFREG | 0777); -+ assert(0 == archive_write_header(a, ae)); -+ assert(0 == archive_write_finish_entry(a)); -+ assertFileExists("/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp"); -+ assert(0 == unlink("/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp")); -+ -+ /* But with security checks enabled, this should fail. */ -+ assert(archive_entry_clear(ae) != NULL); -+ archive_entry_copy_pathname(ae, "/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp"); -+ archive_entry_set_mode(ae, S_IFREG | 0777); -+ archive_write_disk_set_options(a, ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS); -+ failure("Extracting an absolute path should fail here."); -+ assertEqualInt(ARCHIVE_FAILED, archive_write_header(a, ae)); -+ archive_entry_free(ae); -+ assert(0 == archive_write_finish_entry(a)); -+ assertFileNotExists("/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp"); -+ - assertEqualInt(ARCHIVE_OK, archive_write_free(a)); - - /* Test the entries on disk. */ --- -1.7.9.5 - diff --git a/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2013-0211.patch b/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2013-0211.patch deleted file mode 100644 index 126f80e044..0000000000 --- a/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2013-0211.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 2f55d6bd308ea61975558c2469ae349dba297e89 Mon Sep 17 00:00:00 2001 -From: Robert Yang <liezhi.yang@windriver.com> -Date: Sat, 22 Feb 2014 14:35:59 +0800 -Subject: [PATCH] Fix CVE-2013-0211 - -This patch comes from:https://github.com/libarchive/libarchive/commit/22531545514043e04633e1c015c7540b9de9dbe4 - -Upstream-Status: Backport - -Signed-off-by: Baogen shang <baogen.shang@windriver.com> - -Update the patch because of uprev on 20140222 - -Signed-off-by: Robert Yang <liezhi.yang@windriver.com> ---- - libarchive/archive_write.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/libarchive/archive_write.c b/libarchive/archive_write.c -index a3d1a33..a323588 100644 ---- a/libarchive/archive_write.c -+++ b/libarchive/archive_write.c -@@ -671,8 +671,12 @@ static ssize_t - _archive_write_data(struct archive *_a, const void *buff, size_t s) - { - struct archive_write *a = (struct archive_write *)_a; -+ const size_t max_write = INT_MAX; - archive_check_magic(&a->archive, ARCHIVE_WRITE_MAGIC, - ARCHIVE_STATE_DATA, "archive_write_data"); -+ /* In particular, this catches attempts to pass negative values. */ -+ if (s > max_write) -+ s = max_write; - archive_clear_error(&a->archive); - return ((a->format_write_data)(a, buff, s)); - } --- -1.8.2.1 - diff --git a/meta/recipes-extended/libarchive/libarchive/mkdir.patch b/meta/recipes-extended/libarchive/libarchive/mkdir.patch deleted file mode 100644 index 509a2957a5..0000000000 --- a/meta/recipes-extended/libarchive/libarchive/mkdir.patch +++ /dev/null @@ -1,45 +0,0 @@ -Add missing mkdir calls so that out-of-tree builds work. - -Upstream-Status: Submitted (https://github.com/libarchive/libarchive/pull/534) -Signed-off-by: Ross Burton <ross.burton@intel.com> - -diff --git a/Makefile.am b/Makefile.am -index 3fa2d22..5ecca52 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -508,6 +508,7 @@ libarchive_test_LDADD= $(LTLIBICONV) - # Building it automatically provides a sanity-check on libarchive_test_SOURCES - # above. - libarchive/test/list.h: Makefile -+ $(MKDIR_P) libarchive/test - cat $(top_srcdir)/libarchive/test/test_*.c | grep DEFINE_TEST > libarchive/test/list.h - - libarchive_TESTS_ENVIRONMENT= LIBARCHIVE_TEST_FILES=`cd $(top_srcdir);/bin/pwd`/libarchive/test LRZIP=NOCONFIG -@@ -835,6 +836,7 @@ bsdtar_test_CPPFLAGS=\ - $(PLATFORMCPPFLAGS) - - tar/test/list.h: Makefile -+ $(MKDIR_P) tar/test - cat $(top_srcdir)/tar/test/test_*.c | grep DEFINE_TEST > tar/test/list.h - - if BUILD_BSDTAR -@@ -975,6 +977,7 @@ bsdcpio_test_CPPFLAGS= \ - bsdcpio_test_LDADD=libarchive_fe.la - - cpio/test/list.h: Makefile -+ $(MKDIR_P) cpio/test - cat $(top_srcdir)/cpio/test/test_*.c | grep DEFINE_TEST > cpio/test/list.h - - if BUILD_BSDCPIO -diff --git a/configure.ac b/configure.ac -index 38bd299..7bdb00c 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -102,6 +102,7 @@ AC_USE_SYSTEM_EXTENSIONS - AC_LIBTOOL_WIN32_DLL - AC_PROG_LIBTOOL - AC_CHECK_TOOL([STRIP],[strip]) -+AC_PROG_MKDIR_P - - # - # Options for building bsdtar. diff --git a/meta/recipes-extended/libarchive/libarchive/pkgconfig.patch b/meta/recipes-extended/libarchive/libarchive/pkgconfig.patch deleted file mode 100644 index 346af91351..0000000000 --- a/meta/recipes-extended/libarchive/libarchive/pkgconfig.patch +++ /dev/null @@ -1,25 +0,0 @@ -Use pkg-config for the libxml2 dependency, not the -config script. - -Upstream-Status: Pending - -RP 2014/5/22 - -Index: libarchive-3.1.2/configure.ac -=================================================================== ---- libarchive-3.1.2.orig/configure.ac 2013-02-09 17:23:03.000000000 +0000 -+++ libarchive-3.1.2/configure.ac 2014-05-13 15:26:45.446499108 +0000 -@@ -329,10 +329,10 @@ - AS_HELP_STRING([--without-expat], [Don't build support for xar through expat])) - - if test "x$with_xml2" != "xno"; then -- AC_PATH_PROG([XML2_CONFIG], [xml2-config],, [${PATH}]) -- if test "x$XML2_CONFIG" != "x"; then -- CPPFLAGS="${CPPFLAGS} `${XML2_CONFIG} --cflags`" -- LIBS="${LIBS} `${XML2_CONFIG} --libs`" -+ PKG_CHECK_MODULES(PKG_XML2, [libxml-2.0],,) -+ if test "x$PKG_XML2_CFLAGS" != "x"; then -+ CPPFLAGS="${CPPFLAGS} ${PKG_XML2_CFLAGS}" -+ LIBS="${LIBS} ${PKG_XML2_LIBS}" - AC_CHECK_LIB(xml2,xmlInitParser,[true],AC_MSG_FAILURE(Missing xml2 library)) - else - AC_CHECK_LIB(xml2,xmlInitParser) diff --git a/meta/recipes-extended/libarchive/libarchive_3.1.2.bb b/meta/recipes-extended/libarchive/libarchive_3.4.3.bb index aaa325535b..dbfc067b93 100644 --- a/meta/recipes-extended/libarchive/libarchive_3.1.2.bb +++ b/meta/recipes-extended/libarchive/libarchive_3.4.3.bb @@ -2,44 +2,41 @@ SUMMARY = "Support for reading various archive formats" DESCRIPTION = "C library and command-line tools for reading and writing tar, cpio, zip, ISO, and other archive formats" HOMEPAGE = "http://www.libarchive.org/" SECTION = "devel" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=b4e3ffd607d6686c6cb2f63394370841" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=fe01f5e02b1f0cc934d593a7b0ddceb6" DEPENDS = "e2fsprogs-native" -PACKAGECONFIG ?= "libxml2 zlib bz2" +PACKAGECONFIG ?= "zlib bz2 xz lzo" PACKAGECONFIG_append_class-target = "\ - ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'xattr', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \ + libxml2 \ + ${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', d)} \ " -PACKAGECONFIG_append_class-nativesdk = " largefile" +DEPENDS_BZIP2 = "bzip2-replacement-native" +DEPENDS_BZIP2_class-target = "bzip2" PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl," PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr," -PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,," PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib," -PACKAGECONFIG[bz2] = "--with-bz2lib,--without-bz2lib,bzip2," -PACKAGECONFIG[xz] = "--with-lzmadec --with-lzma,--without-lzmadec --without-lzma,xz," +PACKAGECONFIG[bz2] = "--with-bz2lib,--without-bz2lib,${DEPENDS_BZIP2}," +PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz," PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl," PACKAGECONFIG[libxml2] = "--with-xml2,--without-xml2,libxml2," PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat," PACKAGECONFIG[lzo] = "--with-lzo2,--without-lzo2,lzo," PACKAGECONFIG[nettle] = "--with-nettle,--without-nettle,nettle," +PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4," +PACKAGECONFIG[mbedtls] = "--with-mbedtls,--without-mbedtls,mbedtls," -SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \ - file://libarchive-CVE-2013-0211.patch \ - file://pkgconfig.patch \ - file://0001-Add-ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS-option.patch \ - file://mkdir.patch \ - " +EXTRA_OECONF += "--enable-largefile" -SRC_URI[md5sum] = "efad5a503f66329bb9d2f4308b5de98a" -SRC_URI[sha256sum] = "eb87eacd8fe49e8d90c8fdc189813023ccc319c5e752b01fb6ad0cc7b2c53d5e" +SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz" -inherit autotools lib_package pkgconfig +SRC_URI[sha256sum] = "ee1e749213c108cb60d53147f18c31a73d6717d7e3d2481c157e1b34c881ea39" + +inherit autotools update-alternatives pkgconfig CPPFLAGS += "-I${WORKDIR}/extra-includes" @@ -50,4 +47,20 @@ do_configure_prepend() { cp -R ${STAGING_INCDIR_NATIVE}/ext2fs ${WORKDIR}/extra-includes/ } +ALTERNATIVE_PRIORITY = "80" + +PACKAGES =+ "bsdtar" +FILES_bsdtar = "${bindir}/bsdtar" + +ALTERNATIVE_bsdtar = "tar" +ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar" +ALTERNATIVE_TARGET[tar] = "${bindir}/bsdtar" + +PACKAGES =+ "bsdcpio" +FILES_bsdcpio = "${bindir}/bsdcpio" + +ALTERNATIVE_bsdcpio = "cpio" +ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio" +ALTERNATIVE_TARGET[cpio] = "${bindir}/bsdcpio" + BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch b/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch deleted file mode 100644 index 3476bb9596..0000000000 --- a/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch +++ /dev/null @@ -1,25 +0,0 @@ -Upstream-Status: Inappropriate - -automake 1.12.x has deprecated AM_PROG_MKDIR_P , and throws a warning for that, -and the warnings are treated as errors because of the -Werror parameter. - -These AM_PROG_MKDIR_P are coming from gettext, and the latest gettext code has not -eliminated these deprecated macros yet. So disable the treatment of warnings -as errors until gettext is updated to remove the deprecated macros. - -Signed-Off-by: Nitin A Kamble <nitin.a.kamble@intel.com> -2012/07/10 - -Index: libidn-1.24/configure.ac -=================================================================== ---- libidn-1.24.orig/configure.ac -+++ libidn-1.24/configure.ac -@@ -23,7 +23,7 @@ AC_COPYRIGHT([Copyright (c) 2002-2011 Si - AC_CONFIG_AUX_DIR([build-aux]) - AC_CONFIG_MACRO_DIR([m4]) - AC_CONFIG_HEADERS(config.h) --AM_INIT_AUTOMAKE([1.10 -Wall -Werror -Wno-override]) -+AM_INIT_AUTOMAKE([1.10 -Wall -Wno-override]) - AM_SILENT_RULES([yes]) - - # Library code modified: REVISION++ diff --git a/meta/recipes-extended/libidn/libidn/dont-depend-on-help2man.patch b/meta/recipes-extended/libidn/libidn/dont-depend-on-help2man.patch deleted file mode 100644 index 0863530f29..0000000000 --- a/meta/recipes-extended/libidn/libidn/dont-depend-on-help2man.patch +++ /dev/null @@ -1,23 +0,0 @@ -Upstream-Status: Inappropriate [disable feature] - -Signed-off-by: Marko Lindqvist <cazfi74@gmail.com> -diff -Nurdd libidn-1.26/doc/Makefile.am libidn-1.26/doc/Makefile.am ---- libidn-1.26/doc/Makefile.am 2012-09-18 11:25:45.000000000 +0300 -+++ libidn-1.26/doc/Makefile.am 2013-02-08 07:41:24.591431462 +0200 -@@ -49,15 +49,9 @@ - - # Man pages. - --dist_man_MANS = idn.1 $(gdoc_MANS) -+dist_man_MANS = $(gdoc_MANS) - MAINTAINERCLEANFILES = $(dist_man_MANS) - --idn.1: $(top_srcdir)/src/idn.c $(top_srcdir)/src/idn.ggo \ -- $(top_srcdir)/configure.ac -- $(HELP2MAN) \ -- --name="Internationalized Domain Names command line tool" \ -- --output=$@ $(top_builddir)/src/idn$(EXEEXT) -- - # GDOC - - GDOC_BIN = $(srcdir)/gdoc diff --git a/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch b/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch deleted file mode 100644 index 20afd257be..0000000000 --- a/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch +++ /dev/null @@ -1,26 +0,0 @@ -Upstream-Status: Pending - -This patch fixes following issue with automake 1.12 - -| automake: warnings are treated as errors -| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/automake-1.12/am/ltlibrary.am: warning: 'libidn.la': linking libtool libraries using a non-POSIX -| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/automake-1.12/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac' - -Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> -2012/05/03 - -Index: libidn-1.24/configure.ac -=================================================================== ---- libidn-1.24.orig/configure.ac -+++ libidn-1.24/configure.ac -@@ -34,6 +34,10 @@ AC_SUBST(LT_CURRENT, 17) - AC_SUBST(LT_REVISION, 7) - AC_SUBST(LT_AGE, 6) - -+# automake 1.12 seems to require this, but automake 1.11 doesn't recognize it -+m4_pattern_allow([AM_PROG_AR]) -+AM_PROG_AR -+ - AC_PROG_CC - gl_EARLY - lgl_EARLY diff --git a/meta/recipes-extended/libidn/libidn2_2.3.0.bb b/meta/recipes-extended/libidn/libidn2_2.3.0.bb new file mode 100644 index 0000000000..7adf924aeb --- /dev/null +++ b/meta/recipes-extended/libidn/libidn2_2.3.0.bb @@ -0,0 +1,32 @@ +SUMMARY = "Internationalized Domain Name support library" +DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group." +HOMEPAGE = "http://www.gnu.org/software/libidn/" +SECTION = "libs" +LICENSE = "(GPLv2+ | LGPLv3) & GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=2d834ea7d480438ada04e5d846152395 \ + file://COPYING.LESSERv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \ + file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://src/idn2.c;endline=16;md5=426b74d6deb620ab6d39c8a6efd4c13a \ + file://lib/idn2.h.in;endline=27;md5=c2cd28d3f87260f157f022eabb83714f" + +SRC_URI = "${GNU_MIRROR}/libidn/${BPN}-${PV}.tar.gz" +SRC_URI[md5sum] = "01c5084995295e519f95978ae9785ee0" +SRC_URI[sha256sum] = "e1cb1db3d2e249a6a3eb6f0946777c2e892d5c5dc7bd91c74394fc3a01cab8b5" + +DEPENDS = "virtual/libiconv libunistring" + +inherit pkgconfig autotools gettext texinfo gtk-doc lib_package + +EXTRA_OECONF += "--disable-rpath \ + --with-libunistring-prefix=${STAGING_EXECPREFIXDIR} \ + " + +do_install_append() { + # Need to remove any duplicate whitespace too for reproducibility + sed -i -e 's|-L${STAGING_LIBDIR}||' -e 's/ */ /g' ${D}${libdir}/pkgconfig/libidn2.pc +} + +LICENSE_${PN} = "(GPLv2+ | LGPLv3)" +LICENSE_${PN}-bin = "GPLv3+" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-extended/libidn/libidn_0.6.14.bb b/meta/recipes-extended/libidn/libidn_0.6.14.bb deleted file mode 100644 index 4df1d08d8f..0000000000 --- a/meta/recipes-extended/libidn/libidn_0.6.14.bb +++ /dev/null @@ -1,33 +0,0 @@ -SUMMARY = "Internationalized Domain Name support library" -DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group." -HOMEPAGE = "http://www.gnu.org/software/libidn/" -SECTION = "libs" -LICENSE = "LGPLv2.1+ & GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ - file://COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 \ - file://lib/idna.h;beginline=6;endline=18;md5=1336e848ca7b8e25767c3c7e8fa38a89 \ - file://src/idn.c;beginline=6;endline=18;md5=56c89e359652a71cda128d75f0ffdac4" -PR = "r1" - -inherit pkgconfig autotools gettext texinfo - -SRC_URI = "http://alpha.gnu.org/gnu/libidn/${BPN}-${PV}.tar.gz" - -SRC_URI[md5sum] = "040f012a45feb56168853998bb87ad4d" -SRC_URI[sha256sum] = "98910c2ad664bdf4eed2c2fff88e24f8882636ec9d26669366ff03b469c05ae3" - -do_configure_prepend() { - # this version of libidn copies AC_USE_SYSTEM_EXTENSIONS from - # autoconf CVS because atm the autoconf it uses is a bit old - # now with cross autotool, that macro is already there and this - # local definition causes circular dependency. Actually AC_GNU_SOURCE - # is identical to AC_USE_SYSTEM_EXTENSIONS. So remove all local - # references to the latter here. - sed -i -e "/AC_REQUIRE(\[gl_USE_SYSTEM_EXTENSIONS/d" ${S}/lib/gl/m4/gnulib-comp.m4 - rm -f ${S}/lib/gl/m4/extensions.m4 -} - -do_install_append() { - rm -rf ${D}${libdir}/Libidn.dll - rm -rf ${D}${datadir}/emacs -} diff --git a/meta/recipes-extended/libidn/libidn_1.30.bb b/meta/recipes-extended/libidn/libidn_1.30.bb deleted file mode 100644 index 7234747151..0000000000 --- a/meta/recipes-extended/libidn/libidn_1.30.bb +++ /dev/null @@ -1,34 +0,0 @@ -SUMMARY = "Internationalized Domain Name support library" -DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group." -HOMEPAGE = "http://www.gnu.org/software/libidn/" -SECTION = "libs" -LICENSE = "(LGPLv2.1+ | LGPLv3) & GPLv3+" -LIC_FILES_CHKSUM = "file://COPYING;md5=df4be47940a91ee69556f5f71eed4aec \ - file://COPYING.LESSERv2;md5=4fbd65380cdd255951079008b364516c \ - file://COPYING.LESSERv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \ - file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://COPYINGv3;md5=d32239bcb673463ab874e80d47fae504 \ - file://lib/idna.h;endline=21;md5=7c0b3828d1b153663be9a04ad4f7975f \ - file://src/idn.c;endline=20;md5=f4235f2a2cb2b65786b2979fb3cf7fbf" - -inherit pkgconfig autotools gettext texinfo - -SRC_URI = "${GNU_MIRROR}/libidn/${BPN}-${PV}.tar.gz \ - file://libidn_fix_for_automake-1.12.patch \ - file://avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch \ - file://dont-depend-on-help2man.patch \ -" - -SRC_URI[md5sum] = "b17edc8551cd31cc5f14c82a9dabf58e" -SRC_URI[sha256sum] = "39b9fc94d74081c185757b12e0891ce5a22db55268e7d1bb24533ff4432eb053" - -# command tool is under GPLv3+, while libidn itself is under LGPLv2.1+ or LGPLv3 -# so package command into a separate package -PACKAGES =+ "idn" -FILES_idn = "${bindir}/*" - -EXTRA_OECONF = "--disable-csharp" - -do_install_append() { - rm -rf ${D}${datadir}/emacs -} diff --git a/meta/recipes-extended/libmnl/libmnl_1.0.4.bb b/meta/recipes-extended/libmnl/libmnl_1.0.4.bb new file mode 100644 index 0000000000..b55bb311f6 --- /dev/null +++ b/meta/recipes-extended/libmnl/libmnl_1.0.4.bb @@ -0,0 +1,15 @@ +SUMMARY = "Minimalistic user-space Netlink utility library" +DESCRIPTION = "Minimalistic user-space library oriented to Netlink developers, providing \ + functions for common tasks in parsing, validating, and constructing both the Netlink header and TLVs." +HOMEPAGE = "https://www.netfilter.org/projects/libmnl/index.html" +SECTION = "libs" +LICENSE = "LGPLv2.1+" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +SRC_URI = "https://netfilter.org/projects/libmnl/files/libmnl-${PV}.tar.bz2;name=tar" +SRC_URI[tar.md5sum] = "be9b4b5328c6da1bda565ac5dffadb2d" +SRC_URI[tar.sha256sum] = "171f89699f286a5854b72b91d06e8f8e3683064c5901fb09d954a9ab6f551f81" + +inherit autotools pkgconfig + +BBCLASSEXTEND = "native" diff --git a/meta/recipes-extended/libnsl/libnsl2_git.bb b/meta/recipes-extended/libnsl/libnsl2_git.bb new file mode 100644 index 0000000000..badb71d977 --- /dev/null +++ b/meta/recipes-extended/libnsl/libnsl2_git.bb @@ -0,0 +1,24 @@ +# Copyright (C) 2017 Khem Raj <raj.khem@gmail.com> +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "Library containing NIS functions using TI-RPC (IPv6 enabled)" +DESCRIPTION = "This library contains the public client interface for NIS(YP) and NIS+\ + it was part of glibc and now is standalone packages. it also supports IPv6" +HOMEPAGE = "https://github.com/thkukuk/libnsl" +LICENSE = "LGPL-2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" +SECTION = "libs" +DEPENDS = "libtirpc" + +PV = "1.3.0" + +SRCREV = "fbad7b36acaa89a54023930af70805649f962999" + +SRC_URI = "git://github.com/thkukuk/libnsl \ + " + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig gettext + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-extended/libnss-nis/libnss-nis.bb b/meta/recipes-extended/libnss-nis/libnss-nis.bb new file mode 100644 index 0000000000..a1d914e871 --- /dev/null +++ b/meta/recipes-extended/libnss-nis/libnss-nis.bb @@ -0,0 +1,31 @@ +# Copyright (C) 2018 Khem Raj <raj.khem@gmail.com> +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "NSS module for glibc, to provide NIS support for glibc" + +DESCRIPTION = "This package contains the NSS NIS plugin for glibc.\ +This code was formerly part of glibc, but is now standalone to\ +be able to link against TI-RPC for IPv6 support." + +HOMEPAGE = "https://github.com/thkukuk/libnss_nis" +LICENSE = "LGPL-2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" +SECTION = "libs" +DEPENDS += "libtirpc libnsl2" + +PV = "3.1+git${SRCPV}" + +SRCREV = "062f31999b35393abf7595cb89dfc9590d5a42ad" + +SRC_URI = "git://github.com/thkukuk/libnss_nis \ + " + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig + +BBCLASSEXTEND += "native nativesdk" +# +# We will skip parsing this packagegeoup for non-glibc systems +# +COMPATIBLE_HOST_libc-musl = 'null' diff --git a/meta/recipes-extended/libpipeline/libpipeline_1.5.3.bb b/meta/recipes-extended/libpipeline/libpipeline_1.5.3.bb new file mode 100644 index 0000000000..ee15fd0644 --- /dev/null +++ b/meta/recipes-extended/libpipeline/libpipeline_1.5.3.bb @@ -0,0 +1,14 @@ +SUMMARY = "pipeline manipulation library" +DESCRIPTION = "This is a C library for setting up and running pipelines of processes, \ +without needing to involve shell command-line parsing which is often \ +error-prone and insecure." +HOMEPAGE = "http://libpipeline.nongnu.org/" +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +SRC_URI = "${SAVANNAH_GNU_MIRROR}/libpipeline/libpipeline-${PV}.tar.gz" +SRC_URI[sha256sum] = "5dbf08faf50fad853754293e57fd4e6c69bb8e486f176596d682c67e02a0adb0" + +inherit pkgconfig autotools + +acpaths = "-I ${S}/gl/m4 -I ${S}/m4" diff --git a/meta/recipes-extended/libsolv/libsolv_0.7.14.bb b/meta/recipes-extended/libsolv/libsolv_0.7.14.bb new file mode 100644 index 0000000000..5179d4565a --- /dev/null +++ b/meta/recipes-extended/libsolv/libsolv_0.7.14.bb @@ -0,0 +1,31 @@ +SUMMARY = "Library for solving packages and reading repositories" +HOMEPAGE = "https://github.com/openSUSE/libsolv" +BUGTRACKER = "https://github.com/openSUSE/libsolv/issues" +SECTION = "devel" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8" + +DEPENDS = "expat zlib" + +SRC_URI = "git://github.com/openSUSE/libsolv.git \ +" + +SRCREV = "b264537ea43ce39d93d8d97fcca16e97825beaa0" + +UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)" + +S = "${WORKDIR}/git" + +inherit cmake + +PACKAGECONFIG ??= "${@bb.utils.contains('PACKAGE_CLASSES','package_rpm','rpm','',d)}" +PACKAGECONFIG[rpm] = "-DENABLE_RPMMD=ON -DENABLE_RPMDB=ON -DENABLE_RPMDB_BDB=ON,,rpm" + +EXTRA_OECMAKE = "-DMULTI_SEMANTICS=ON -DENABLE_COMPLEX_DEPS=ON" + +PACKAGES =+ "${PN}-tools ${PN}ext" + +FILES_${PN}-tools = "${bindir}/*" +FILES_${PN}ext = "${libdir}/${PN}ext.so.*" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-extended/libtirpc/libtirpc/libtirpc-0.2.1-fortify.patch b/meta/recipes-extended/libtirpc/libtirpc/libtirpc-0.2.1-fortify.patch deleted file mode 100644 index 4a785d344a..0000000000 --- a/meta/recipes-extended/libtirpc/libtirpc/libtirpc-0.2.1-fortify.patch +++ /dev/null @@ -1,26 +0,0 @@ -Fix a possible overflow (reported by _FORTIFY_SOURCE=2) - -Ported from Gentoo - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - -Index: libtirpc-0.2.1/src/getrpcport.c -=================================================================== ---- libtirpc-0.2.1.orig/src/getrpcport.c -+++ libtirpc-0.2.1/src/getrpcport.c -@@ -54,11 +54,11 @@ getrpcport(host, prognum, versnum, proto - - if ((hp = gethostbyname(host)) == NULL) - return (0); -+ if (hp->h_length != sizeof(addr.sin_addr.s_addr)) -+ return (0); - memset(&addr, 0, sizeof(addr)); - addr.sin_family = AF_INET; - addr.sin_port = 0; -- if (hp->h_length > sizeof(addr)) -- hp->h_length = sizeof(addr); - memcpy(&addr.sin_addr.s_addr, hp->h_addr, (size_t)hp->h_length); - /* Inconsistent interfaces need casts! :-( */ - return (pmap_getport(&addr, (u_long)prognum, (u_long)versnum, diff --git a/meta/recipes-extended/libtirpc/libtirpc/remove-des-uclibc.patch b/meta/recipes-extended/libtirpc/libtirpc/remove-des-uclibc.patch deleted file mode 100644 index d003348af9..0000000000 --- a/meta/recipes-extended/libtirpc/libtirpc/remove-des-uclibc.patch +++ /dev/null @@ -1,38 +0,0 @@ -uclibc does not provide des functionality unlike eglibc so lets disable ssl support - -Upstream-Status: Inappropriate [uclibc specific] -Signed-off-by: Khem Raj <raj.khem@gmail.com> - -Index: libtirpc-0.2.3/src/rpc_soc.c -=================================================================== ---- libtirpc-0.2.3.orig/src/rpc_soc.c 2013-03-10 16:00:51.355282153 -0700 -+++ libtirpc-0.2.3/src/rpc_soc.c 2013-03-10 16:00:51.703282148 -0700 -@@ -520,6 +520,7 @@ - (resultproc_t) rpc_wrap_bcast, "udp"); - } - -+#if 0 - /* - * Create the client des authentication object. Obsoleted by - * authdes_seccreate(). -@@ -551,6 +552,7 @@ - dummy = authdes_seccreate(servername, window, NULL, ckey); - return (dummy); - } -+#endif - - /* - * Create a client handle for a unix connection. Obsoleted by clnt_vc_create() -Index: libtirpc-0.2.3/src/Makefile.am -=================================================================== ---- libtirpc-0.2.3.orig/src/Makefile.am 2013-03-10 16:00:51.355282153 -0700 -+++ libtirpc-0.2.3/src/Makefile.am 2013-03-10 16:00:51.703282148 -0700 -@@ -50,7 +50,7 @@ - rpc_callmsg.c rpc_generic.c rpc_soc.c rpcb_clnt.c rpcb_prot.c \ - rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_auth_none.c \ - svc_generic.c svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \ -- auth_time.c auth_des.c authdes_prot.c -+ auth_time.c - - ## XDR - libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c diff --git a/meta/recipes-extended/libtirpc/libtirpc_0.2.5.bb b/meta/recipes-extended/libtirpc/libtirpc_0.2.5.bb deleted file mode 100644 index 3edf002497..0000000000 --- a/meta/recipes-extended/libtirpc/libtirpc_0.2.5.bb +++ /dev/null @@ -1,35 +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" -LIC_FILES_CHKSUM = "file://COPYING;md5=f835cce8852481e4b2bbbdd23b5e47f3 \ - file://src/netname.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24" - -DEPENDS += "xz-native" -PROVIDES = "virtual/librpc" - -SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2;name=libtirpc \ - ${GENTOO_MIRROR}/${BPN}-glibc-nfs.tar.xz;name=glibc-nfs \ - file://libtirpc-0.2.1-fortify.patch \ - " - -SRC_URI_append_libc-uclibc = " file://remove-des-uclibc.patch" - -SRC_URI[libtirpc.md5sum] = "8cd41a5ef5a9b50d0fb6abb98af15368" -SRC_URI[libtirpc.sha256sum] = "62f9de7c2c8686c568757730e1fef66502a0e00d6cacf33546d0267984e002db" -SRC_URI[glibc-nfs.md5sum] = "5ae500b9d0b6b72cb875bc04944b9445" -SRC_URI[glibc-nfs.sha256sum] = "2677cfedf626f3f5a8f6e507aed5bb8f79a7453b589d684dbbc086e755170d83" - -inherit autotools pkgconfig - -EXTRA_OECONF = "--disable-gssapi" - -do_configure_prepend () { - cp -r ${S}/../tirpc ${S} -} - -do_install_append() { - chown root:root ${D}${sysconfdir}/netconfig -} diff --git a/meta/recipes-extended/libtirpc/libtirpc_1.2.6.bb b/meta/recipes-extended/libtirpc/libtirpc_1.2.6.bb new file mode 100644 index 0000000000..10a324c3b6 --- /dev/null +++ b/meta/recipes-extended/libtirpc/libtirpc_1.2.6.bb @@ -0,0 +1,26 @@ +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 = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2" +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/libtirpc/files/libtirpc/" +UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/" +SRC_URI[md5sum] = "b25f9cc18bfad50f7c446c77f4ae00bb" +SRC_URI[sha256sum] = "4278e9a5181d5af9cd7885322fdecebc444f9a3da87c526e7d47f7a12a37d1cc" + +inherit autotools pkgconfig + +EXTRA_OECONF = "--disable-gssapi" + +do_install_append() { + chown root:root ${D}${sysconfdir}/netconfig +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-extended/libuser/libuser_0.62.bb b/meta/recipes-extended/libuser/libuser_0.62.bb deleted file mode 100644 index c4ed459598..0000000000 --- a/meta/recipes-extended/libuser/libuser_0.62.bb +++ /dev/null @@ -1,30 +0,0 @@ -SUMMARY = "user and group account administration library" -DESCRIPTION = "The libuser library implements a standardized interface for manipulating and administering user \ -and group accounts" -HOMEPAGE = "https://fedorahosted.org/libuser/" -BUGTRACKER = "https://fedorahosted.org/libuser/newticket" - -LICENSE = "LGPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ - file://lib/user.h;endline=19;md5=76b301f63c39fa992062395efbdc9558 \ - file://samples/testuser.c;endline=19;md5=3b87fa660fa3f4a6bb31d624afe30ba1" - -SECTION = "base" - -SRC_URI = "https://fedorahosted.org/releases/l/i/libuser/libuser-${PV}.tar.xz \ - " - -SRC_URI[md5sum] = "63e5e5c551e99dc5302b40b80bd6d4f2" -SRC_URI[sha256sum] = "a58ff4fabb01a25043b142185a33eeea961109dd60d4b40b6a9df4fa3cace20b" - -DEPENDS = "popt libpam glib-2.0 xz-native docbook-utils-native linuxdoc-tools-native python" - -inherit autotools gettext pythonnative python-dir pkgconfig - -EXTRA_OEMAKE = "PYTHON_CPPFLAGS=-I${STAGING_INCDIR}/${PYTHON_DIR}" - -PACKAGES += "${PN}-python " - -FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug" -FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}" - diff --git a/meta/recipes-extended/lighttpd/lighttpd/0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch b/meta/recipes-extended/lighttpd/lighttpd/0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch new file mode 100644 index 0000000000..f17bdce2c0 --- /dev/null +++ b/meta/recipes-extended/lighttpd/lighttpd/0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch @@ -0,0 +1,42 @@ +From 22afc5d9aaa215c3c87ba21c77d47da44ab3b113 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Fri, 26 Aug 2016 18:20:32 +0300 +Subject: [PATCH] Use pkg-config for pcre dependency instead of -config script. + +RP 2014/5/22 +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + configure.ac | 16 ++++++++++++---- + 1 file changed, 12 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 5383cec..c29a902 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -651,10 +651,18 @@ AC_ARG_WITH([pcre], + ) + AC_MSG_RESULT([$WITH_PCRE]) + +-if test "$WITH_PCRE" != no; then +- if test "$WITH_PCRE" != yes; then +- PCRE_LIB="-L$WITH_PCRE/lib -lpcre" +- CPPFLAGS="$CPPFLAGS -I$WITH_PCRE/include" ++if test "$WITH_PCRE" != "no"; then ++ PKG_CHECK_MODULES(PCREPKG, [libpcre], [ ++ PCRE_LIB=${PCREPKG_LIBS} ++ CPPFLAGS="$CPPFLAGS ${PCREPKG_CFLAGS}" ++ ], [ ++ AC_MSG_ERROR([pcre pkgconfig not found, install the pcre-devel package or build with --without-pcre]) ++ ]) ++ ++ if test x"$PCRE_LIB" != x; then ++ AC_DEFINE([HAVE_LIBPCRE], [1], [libpcre]) ++ AC_DEFINE([HAVE_PCRE_H], [1], [pcre.h]) ++ AC_SUBST(PCRE_LIB) + else + AC_PATH_PROG([PCRECONFIG], [pcre-config]) + if test -n "$PCRECONFIG"; then +-- +2.15.0 + diff --git a/meta/recipes-extended/lighttpd/lighttpd/0001-mod_cgi-buffers-data-without-bound.patch b/meta/recipes-extended/lighttpd/lighttpd/0001-mod_cgi-buffers-data-without-bound.patch deleted file mode 100644 index a9df1744a7..0000000000 --- a/meta/recipes-extended/lighttpd/lighttpd/0001-mod_cgi-buffers-data-without-bound.patch +++ /dev/null @@ -1,387 +0,0 @@ -From e6ccbab5d42b110ac4f6ce1f72cb1e9ccbe4400a Mon Sep 17 00:00:00 2001 -From: Li xin <lixin.fnst@cn.fujitsu.com> -Date: Tue, 16 Jun 2015 19:02:38 +0900 -Subject: [PATCH] mod_cgi buffers data without bound so fix it - -Upstream-Status: Submitted [http://redmine.lighttpd.net/issues/1264] - -Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com> - -Update context for 1.4.36. - -Signed-off-by: Kai Kang <kai.kang@windriver.com> ---- - doc/config/lighttpd.conf | 8 ++ - src/mod_cgi.c | 188 ++++++++++++++++++++++++++++++++++++++++++++--- - 2 files changed, 187 insertions(+), 9 deletions(-) - -diff --git a/doc/config/lighttpd.conf b/doc/config/lighttpd.conf -index 60b0ae1..9c101a7 100644 ---- a/doc/config/lighttpd.conf -+++ b/doc/config/lighttpd.conf -@@ -375,6 +375,14 @@ server.upload-dirs = ( "/var/tmp" ) - ## - ####################################################################### - -+####################################################################### -+## -+## -+## maximum bytes in send_raw before backing off [KByte] -+## cgi.high-waterlevel = 10240 -+## minimum bytes in send_raw to disable backoff [KByte] -+## cgi.low-waterlevel = 5120 -+####################################################################### - - ####################################################################### - ## -diff --git a/src/mod_cgi.c b/src/mod_cgi.c -index 01b1877..7c67eb5 100644 ---- a/src/mod_cgi.c -+++ b/src/mod_cgi.c -@@ -38,6 +38,10 @@ - - #include "version.h" - -+/* for output logs */ -+char msgbuf[2048]; -+ -+ - enum {EOL_UNSET, EOL_N, EOL_RN}; - - typedef struct { -@@ -53,9 +57,19 @@ typedef struct { - size_t size; - } buffer_pid_t; - -+struct handler_ctx; -+ -+typedef struct { -+ struct handler_ctx **hctx; -+ size_t used; -+ size_t size; -+} buffer_ctx_t; -+ - typedef struct { - array *cgi; - unsigned short execute_x_only; -+ unsigned int high_waterlevel; /* maximum bytes in send_raw before backing off */ -+ unsigned int low_waterlevel; /* minimum bytes in send_raw to disable backoff */ - } plugin_config; - - typedef struct { -@@ -68,9 +82,11 @@ typedef struct { - plugin_config **config_storage; - - plugin_config conf; -+ -+ buffer_ctx_t cgi_ctx; - } plugin_data; - --typedef struct { -+typedef struct handler_ctx { - pid_t pid; - int fd; - int fde_ndx; /* index into the fd-event buffer */ -@@ -78,11 +94,16 @@ typedef struct { - connection *remote_conn; /* dumb pointer */ - plugin_data *plugin_data; /* dumb pointer */ - -+ int throttling; /* 1=waiting for send_raw buffer to drain */ -+ off_t high_waterlevel; /* maximum bytes in send_raw before backing off */ -+ off_t low_waterlevel; /* minimum bytes in send_raw to disable backoff */ -+ off_t bytes_in_buffer; -+ - buffer *response; - buffer *response_header; - } handler_ctx; - --static handler_ctx * cgi_handler_ctx_init(void) { -+static handler_ctx * cgi_handler_ctx_init(plugin_data *p) { - handler_ctx *hctx = calloc(1, sizeof(*hctx)); - - force_assert(hctx); -@@ -90,13 +111,26 @@ static handler_ctx * cgi_handler_ctx_init(void) { - hctx->response = buffer_init(); - hctx->response_header = buffer_init(); - -+ hctx->throttling = 0; -+ hctx->high_waterlevel = (off_t)p->conf.high_waterlevel * 1024; -+ hctx->low_waterlevel = (off_t)p->conf.low_waterlevel * 1024; -+ if (hctx->low_waterlevel >= hctx->high_waterlevel) { -+ hctx->low_waterlevel = hctx->high_waterlevel * 3 / 4; /* 75% */ -+ } -+ hctx->bytes_in_buffer = 0; -+ - return hctx; - } - --static void cgi_handler_ctx_free(handler_ctx *hctx) { -+static void cgi_handler_ctx_free(server *srv, handler_ctx *hctx) { - buffer_free(hctx->response); - buffer_free(hctx->response_header); - -+ /* to avoid confusion */ -+ if (hctx->throttling) { -+ log_error_write(srv, __FILE__, __LINE__, "s", "unthrottled"); -+ } -+ - free(hctx); - } - -@@ -154,6 +188,8 @@ SETDEFAULTS_FUNC(mod_fastcgi_set_defaults) { - config_values_t cv[] = { - { "cgi.assign", NULL, T_CONFIG_ARRAY, T_CONFIG_SCOPE_CONNECTION }, /* 0 */ - { "cgi.execute-x-only", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION }, /* 1 */ -+ { "cgi.high-waterlevel", NULL, T_CONFIG_INT, T_CONFIG_SCOPE_CONNECTION }, /* 2 */ -+ { "cgi.low-waterlevel", NULL, T_CONFIG_INT, T_CONFIG_SCOPE_CONNECTION }, /* 3 */ - { NULL, NULL, T_CONFIG_UNSET, T_CONFIG_SCOPE_UNSET} - }; - -@@ -169,9 +205,13 @@ SETDEFAULTS_FUNC(mod_fastcgi_set_defaults) { - - s->cgi = array_init(); - s->execute_x_only = 0; -+ s->high_waterlevel = 0; /* 0 == disabled */ -+ s->low_waterlevel = 0; - - cv[0].destination = s->cgi; - cv[1].destination = &(s->execute_x_only); -+ cv[2].destination = &(s->high_waterlevel); -+ cv[3].destination = &(s->low_waterlevel); - - p->config_storage[i] = s; - -@@ -184,6 +224,51 @@ SETDEFAULTS_FUNC(mod_fastcgi_set_defaults) { - } - - -+static void cgi_recount_bytes_in_buffer(handler_ctx *hctx) -+{ -+ chunkqueue *cq = hctx->remote_conn->write_queue; -+ hctx->bytes_in_buffer = chunkqueue_length(cq) - chunkqueue_written(cq); -+} -+ -+ -+static void cgi_throttling_control(server *srv, handler_ctx *hctx) -+{ -+ cgi_recount_bytes_in_buffer(hctx); -+ -+#ifdef DEBUG -+ sprintf(msgbuf, "throttling=%d, chars=%llu, high=%llu, low=%llu", -+ hctx->throttling, hctx->bytes_in_buffer, -+ hctx->high_waterlevel, hctx->low_waterlevel); -+ log_error_write(srv, __FILE__, __LINE__, "ss", -+ "(debug) throttling control,", msgbuf); -+#endif -+ -+ if (hctx->throttling) { -+ sprintf(msgbuf, "throttling; chars in queue=%llu," -+ " low-waterlevel=%llu, high-waterlevel=%llu", -+ hctx->bytes_in_buffer, -+ hctx->low_waterlevel, hctx->high_waterlevel); -+ log_error_write(srv, __FILE__, __LINE__, "s", msgbuf); -+ if (hctx->bytes_in_buffer <= hctx->low_waterlevel) { -+ fdevent_event_set(srv->ev, &(hctx->fde_ndx), hctx->fd, FDEVENT_IN); -+ hctx->throttling = 0; -+ log_error_write(srv, __FILE__, __LINE__, "s", "unthrottled"); -+ } -+ } else { -+ if (hctx->high_waterlevel != 0 && -+ hctx->high_waterlevel <= hctx->bytes_in_buffer) { -+ fdevent_event_del(srv->ev, &(hctx->fde_ndx), hctx->fd); -+ hctx->throttling = 1; -+ sprintf(msgbuf, "throttled; chars in queue=%llu," -+ " low-waterlevel=%llu, high-waterlevel=%llu", -+ hctx->bytes_in_buffer, -+ hctx->low_waterlevel, hctx->high_waterlevel); -+ log_error_write(srv, __FILE__, __LINE__, "s", msgbuf); -+ } -+ } -+} -+ -+ - static int cgi_pid_add(server *srv, plugin_data *p, pid_t pid) { - int m = -1; - size_t i; -@@ -230,6 +315,39 @@ static int cgi_pid_del(server *srv, plugin_data *p, pid_t pid) { - return 0; - } - -+ -+static void cgi_ctx_add(plugin_data *p, handler_ctx *hctx) { -+ buffer_ctx_t *r = &(p->cgi_ctx); -+ -+ if (r->size == 0) { -+ r->size = 16; -+ r->hctx = malloc(sizeof(*r->hctx) * r->size); -+ } else if (r->used == r->size) { -+ r->size += 16; -+ r->hctx = realloc(r->hctx, sizeof(*r->hctx) * r->size); -+ } -+ -+ r->hctx[r->used++] = hctx; -+} -+ -+static void cgi_ctx_del(plugin_data *p, handler_ctx *hctx) { -+ size_t i; -+ buffer_ctx_t *r = &(p->cgi_ctx); -+ -+ for (i = 0; i < r->used; i++) { -+ if (r->hctx[i] == hctx) break; -+ } -+ -+ if (i != r->used) { -+ /* found */ -+ -+ if (i != r->used - 1) { -+ r->hctx[i] = r->hctx[r->used - 1]; -+ } -+ r->used--; -+ } -+} -+ - static int cgi_response_parse(server *srv, connection *con, plugin_data *p, buffer *in) { - char *ns; - const char *s; -@@ -380,6 +498,14 @@ static int cgi_demux_response(server *srv, handler_ctx *hctx) { - - buffer_commit(hctx->response, n); - -+#ifdef DEBUG -+ sprintf(msgbuf, "n=%d, bytes_out=%llu, bytes_in=%llu", n, -+ (unsigned long long)con->write_queue->bytes_out, -+ (unsigned long long)con->write_queue->bytes_in); -+ log_error_write(srv, __FILE__, __LINE__, "ss", -+ "(debug) read,", msgbuf); -+#endif -+ - /* split header from body */ - - if (con->file_started == 0) { -@@ -503,7 +629,20 @@ static int cgi_demux_response(server *srv, handler_ctx *hctx) { - } - } else { - http_chunk_append_buffer(srv, con, hctx->response); -+#ifdef DEBUG -+ sprintf(msgbuf, "n=%d, bytes_out=%llu, bytes_in=%llu, limit=%llu", n, -+ (unsigned long long)con->write_queue->bytes_out, -+ (unsigned long long)con->write_queue->bytes_in, -+ (unsigned long long)hctx->high_waterlevel); -+ log_error_write(srv, __FILE__, __LINE__, -+ "ss", "(debug) append,", msgbuf); -+#endif - joblist_append(srv, con); -+ -+ cgi_throttling_control(srv, hctx); -+ if (hctx->throttling) { -+ return FDEVENT_HANDLED_NOT_FINISHED; -+ } - } - - #if 0 -@@ -553,8 +692,9 @@ static handler_t cgi_connection_close(server *srv, handler_ctx *hctx) { - con->plugin_ctx[p->id] = NULL; - - /* is this a good idea ? */ -- cgi_handler_ctx_free(hctx); -- -+ cgi_ctx_del(p, hctx); -+ cgi_handler_ctx_free(srv, hctx); -+ - /* if waitpid hasn't been called by response.c yet, do it here */ - if (pid) { - /* check if the CGI-script is already gone */ -@@ -1105,7 +1245,8 @@ static int cgi_create_env(server *srv, connection *con, plugin_data *p, buffer * - con->mode = p->id; - buffer_reset(con->physical.path); - -- hctx = cgi_handler_ctx_init(); -+ hctx = cgi_handler_ctx_init(p); -+ cgi_ctx_add(p, hctx); - - hctx->remote_conn = con; - hctx->plugin_data = p; -@@ -1114,6 +1255,11 @@ static int cgi_create_env(server *srv, connection *con, plugin_data *p, buffer * - hctx->fde_ndx = -1; - - con->plugin_ctx[p->id] = hctx; -+#ifdef DEBUG -+ sprintf(msgbuf, "hctx=%p, con=%p", (void*)hctx, (void*)con); -+ log_error_write(srv, __FILE__, __LINE__, "ss", -+ "(debug) hctx generated, ", msgbuf); -+#endif - - fdevent_register(srv->ev, hctx->fd, cgi_handle_fdevent, hctx); - fdevent_event_set(srv->ev, &(hctx->fde_ndx), hctx->fd, FDEVENT_IN); -@@ -1128,7 +1274,8 @@ static int cgi_create_env(server *srv, connection *con, plugin_data *p, buffer * - - close(hctx->fd); - -- cgi_handler_ctx_free(hctx); -+ cgi_ctx_del(p, hctx); -+ cgi_handler_ctx_free(srv, hctx); - - con->plugin_ctx[p->id] = NULL; - -@@ -1153,6 +1300,8 @@ static int mod_cgi_patch_connection(server *srv, connection *con, plugin_data *p - - PATCH(cgi); - PATCH(execute_x_only); -+ PATCH(high_waterlevel); -+ PATCH(low_waterlevel); - - /* skip the first, the global context */ - for (i = 1; i < srv->config_context->used; i++) { -@@ -1170,6 +1319,10 @@ static int mod_cgi_patch_connection(server *srv, connection *con, plugin_data *p - PATCH(cgi); - } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("cgi.execute-x-only"))) { - PATCH(execute_x_only); -+ } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("cgi.high-waterlevel"))) { -+ PATCH(high_waterlevel); -+ } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("cgi.low-waterlevel"))) { -+ PATCH(low_waterlevel); - } - } - } -@@ -1222,6 +1375,21 @@ URIHANDLER_FUNC(cgi_is_handled) { - TRIGGER_FUNC(cgi_trigger) { - plugin_data *p = p_d; - size_t ndx; -+ -+ for (ndx = 0; ndx < p->cgi_ctx.used; ndx++) { -+ handler_ctx *hctx = p->cgi_ctx.hctx[ndx]; -+#ifdef DEBUG -+ connection *con = hctx->remote_conn; -+ -+ sprintf(msgbuf, "hctx=%p, con=%p, bytes_in_buffer=%llu", -+ (void*)hctx, (void*)con, -+ (unsigned long long)hctx->bytes_in_buffer); -+ log_error_write(srv, __FILE__, __LINE__, "ss", -+ "(debug) found using ctx,", msgbuf); -+#endif -+ cgi_throttling_control(srv, hctx); -+ } -+ - /* the trigger handle only cares about lonely PID which we have to wait for */ - #ifndef __WIN32 - -@@ -1330,7 +1498,8 @@ SUBREQUEST_FUNC(mod_cgi_handle_subrequest) { - log_error_write(srv, __FILE__, __LINE__, "sds", "cgi close failed ", hctx->fd, strerror(errno)); - } - -- cgi_handler_ctx_free(hctx); -+ cgi_ctx_del(p, hctx); -+ cgi_handler_ctx_free(srv, hctx); - - con->plugin_ctx[p->id] = NULL; - -@@ -1362,7 +1531,8 @@ SUBREQUEST_FUNC(mod_cgi_handle_subrequest) { - log_error_write(srv, __FILE__, __LINE__, "sds", "cgi close failed ", hctx->fd, strerror(errno)); - } - -- cgi_handler_ctx_free(hctx); -+ cgi_ctx_del(p, hctx); -+ cgi_handler_ctx_free(srv, hctx); - - con->plugin_ctx[p->id] = NULL; - return HANDLER_FINISHED; diff --git a/meta/recipes-extended/lighttpd/lighttpd/lighttpd b/meta/recipes-extended/lighttpd/lighttpd/lighttpd index bf89a60b7d..82fbaa523b 100644 --- a/meta/recipes-extended/lighttpd/lighttpd/lighttpd +++ b/meta/recipes-extended/lighttpd/lighttpd/lighttpd @@ -4,7 +4,7 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/lighttpd NAME=lighttpd DESC="Lighttpd Web Server" -OPTS="-f /etc/lighttpd.conf" +OPTS="-f /etc/lighttpd/lighttpd.conf" case "$1" in start) diff --git a/meta/recipes-extended/lighttpd/lighttpd/lighttpd.service b/meta/recipes-extended/lighttpd/lighttpd/lighttpd.service deleted file mode 100644 index 66a907aa17..0000000000 --- a/meta/recipes-extended/lighttpd/lighttpd/lighttpd.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Lightning Fast Webserver With Light System Requirements -After=network.target - -[Service] -ExecStartPre=@SBINDIR@/lighttpd -t -f @SYSCONFDIR@/lighttpd.conf -ExecStart=@SBINDIR@/lighttpd -D -f @SYSCONFDIR@/lighttpd.conf -ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID - -[Install] -WantedBy=multi-user.target - diff --git a/meta/recipes-extended/lighttpd/lighttpd/pkgconfig.patch b/meta/recipes-extended/lighttpd/lighttpd/pkgconfig.patch deleted file mode 100644 index e395f928ce..0000000000 --- a/meta/recipes-extended/lighttpd/lighttpd/pkgconfig.patch +++ /dev/null @@ -1,33 +0,0 @@ -Use pkg-config for pcre dependency instead of -config script. - -Upstream-Status: Pending - -RP 2014/5/22 - - -Index: lighttpd-1.4.35/configure.ac -=================================================================== ---- lighttpd-1.4.35.orig/configure.ac 2014-03-06 14:08:00.000000000 +0000 -+++ lighttpd-1.4.35/configure.ac 2014-05-13 16:58:30.758471169 +0000 -@@ -309,16 +309,14 @@ - AC_MSG_RESULT([$WITH_PCRE]) - - if test "$WITH_PCRE" != "no"; then -- AC_PATH_PROG(PCRECONFIG, pcre-config) -- -- if test x"$PCRECONFIG" != x; then -- PCRE_LIB=`$PCRECONFIG --libs` -- CPPFLAGS="$CPPFLAGS `$PCRECONFIG --cflags`" -+ PKG_CHECK_MODULES(PCREPKG, [libpcre], [ -+ PCRE_LIB=${PCREPKG_LIBS} -+ CPPFLAGS="$CPPFLAGS ${PCREPKG_CFLAGS}" - AC_DEFINE([HAVE_LIBPCRE], [1], [libpcre]) - AC_DEFINE([HAVE_PCRE_H], [1], [pcre.h]) -- else -+ ], [ - AC_MSG_ERROR([pcre-config not found, install the pcre-devel package or build with --without-pcre]) -- fi -+ ]) - fi - - AC_SUBST(PCRE_LIB) diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.36.bb b/meta/recipes-extended/lighttpd/lighttpd_1.4.36.bb deleted file mode 100644 index 67b6e3749b..0000000000 --- a/meta/recipes-extended/lighttpd/lighttpd_1.4.36.bb +++ /dev/null @@ -1,77 +0,0 @@ -SUMMARY = "Lightweight high-performance web server" -HOMEPAGE = "http://www.lighttpd.net/" -BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues" - -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579" - -SECTION = "net" -DEPENDS = "zlib libpcre" -RDEPENDS_${PN} += " \ - lighttpd-module-access \ - lighttpd-module-accesslog \ - lighttpd-module-indexfile \ - lighttpd-module-dirlisting \ - lighttpd-module-staticfile \ -" - -SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.xz \ - file://index.html.lighttpd \ - file://lighttpd.conf \ - file://lighttpd \ - file://lighttpd.service \ - file://pkgconfig.patch \ - file://0001-mod_cgi-buffers-data-without-bound.patch \ - " - -SRC_URI[md5sum] = "1843daffcb018aa528f6d15d43544654" -SRC_URI[sha256sum] = "897ab6b1cc7bd51671f8af759e7846245fbbca0685c30017e93a5882a9ac1a53" - -PACKAGECONFIG ??= "openssl" -PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl" - -EXTRA_OECONF = " \ - --without-bzip2 \ - --without-ldap \ - --without-lua \ - --without-memcache \ - --with-pcre \ - --without-webdav-props \ - --without-webdav-locks \ - --disable-static \ -" - -inherit autotools pkgconfig update-rc.d gettext systemd - -INITSCRIPT_NAME = "lighttpd" -INITSCRIPT_PARAMS = "defaults 70" - -SYSTEMD_SERVICE_${PN} = "lighttpd.service" - -do_install_append() { - install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav - install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d - install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir} - install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html - - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/lighttpd.service ${D}${systemd_unitdir}/system - sed -i -e 's,@SBINDIR@,${sbindir},g' \ - -e 's,@SYSCONFDIR@,${sysconfdir},g' \ - -e 's,@BASE_BINDIR@,${base_bindir},g' \ - ${D}${systemd_unitdir}/system/lighttpd.service - #For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data - ln -sf ${localstatedir}/log ${D}/www/logs - ln -sf ${localstatedir}/tmp ${D}/www/var -} - -FILES_${PN} += "${sysconfdir} /www" - -CONFFILES_${PN} = "${sysconfdir}/lighttpd.conf" - -PACKAGES_DYNAMIC += "^lighttpd-module-.*" - -python populate_packages_prepend () { - lighttpd_libdir = d.expand('${libdir}') - do_split_packages(d, lighttpd_libdir, '^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='') -} diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.55.bb b/meta/recipes-extended/lighttpd/lighttpd_1.4.55.bb new file mode 100644 index 0000000000..7a255ce2f2 --- /dev/null +++ b/meta/recipes-extended/lighttpd/lighttpd_1.4.55.bb @@ -0,0 +1,83 @@ +SUMMARY = "Lightweight high-performance web server" +HOMEPAGE = "http://www.lighttpd.net/" +BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579" + +SECTION = "net" +RDEPENDS_${PN} = "lighttpd-module-dirlisting \ + lighttpd-module-indexfile \ + lighttpd-module-staticfile" +RRECOMMENDS_${PN} = "lighttpd-module-access \ + lighttpd-module-accesslog" + +SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.xz \ + file://index.html.lighttpd \ + file://lighttpd.conf \ + file://lighttpd \ + file://0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch \ + " + +SRC_URI[md5sum] = "be4bda2c28bcbdac6eb941528f6edf03" +SRC_URI[sha256sum] = "6a0b50e9c9d5cc3d9e48592315c25a2d645858f863e1ccd120507a30ce21e927" + +PACKAGECONFIG ??= "openssl pcre zlib \ + ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \ +" + +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6" +PACKAGECONFIG[mmap] = "--enable-mmap,--disable-mmap" +PACKAGECONFIG[libev] = "--with-libev,--without-libev,libev" +PACKAGECONFIG[mysql] = "--with-mysql,--without-mysql,mariadb" +PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap" +PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr" +PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind" +PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl" +PACKAGECONFIG[krb5] = "--with-krb5,--without-krb5,krb5" +PACKAGECONFIG[pcre] = "--with-pcre,--without-pcre,libpcre" +PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib" +PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2" +PACKAGECONFIG[webdav-props] = "--with-webdav-props,--without-webdav-props,libxml2 sqlite3" +PACKAGECONFIG[webdav-locks] = "--with-webdav-locks,--without-webdav-locks,util-linux" +PACKAGECONFIG[gdbm] = "--with-gdbm,--without-gdbm,gdbm" +PACKAGECONFIG[memcache] = "--with-memcached,--without-memcached,libmemcached" +PACKAGECONFIG[lua] = "--with-lua,--without-lua,lua" + +EXTRA_OECONF += "--enable-lfs --without-fam" + +inherit autotools pkgconfig update-rc.d gettext systemd + +INITSCRIPT_NAME = "lighttpd" +INITSCRIPT_PARAMS = "defaults 70" + +SYSTEMD_SERVICE_${PN} = "lighttpd.service" + +do_install_append() { + install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav + install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d + install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}/lighttpd + install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html + + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${S}/doc/systemd/lighttpd.service ${D}${systemd_unitdir}/system + sed -i -e 's,@SBINDIR@,${sbindir},g' \ + -e 's,@SYSCONFDIR@,${sysconfdir},g' \ + -e 's,@BASE_BINDIR@,${base_bindir},g' \ + ${D}${systemd_unitdir}/system/lighttpd.service + #For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data + ln -sf ${localstatedir}/log ${D}/www/logs + ln -sf ${localstatedir}/tmp ${D}/www/var +} + +FILES_${PN} += "${sysconfdir} /www" + +CONFFILES_${PN} = "${sysconfdir}/lighttpd/lighttpd.conf" + +PACKAGES_DYNAMIC += "^lighttpd-module-.*" + +python populate_packages_prepend () { + lighttpd_libdir = d.expand('${libdir}') + do_split_packages(d, lighttpd_libdir, r'^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='') +} diff --git a/meta/recipes-extended/logrotate/logrotate/update-the-manual.patch b/meta/recipes-extended/logrotate/logrotate/0001-Update-the-manual.patch index 50d037d5a1..50a3852078 100644 --- a/meta/recipes-extended/logrotate/logrotate/update-the-manual.patch +++ b/meta/recipes-extended/logrotate/logrotate/0001-Update-the-manual.patch @@ -1,4 +1,4 @@ -From e0b0fe30e9c49234994a20a86aacfaf80e690087 Mon Sep 17 00:00:00 2001 +From 3e2cfa88b6538bb0fee3d9a6e99622055d05ac4a Mon Sep 17 00:00:00 2001 From: Robert Yang <liezhi.yang@windriver.com> Date: Tue, 17 Feb 2015 21:14:37 -0800 Subject: [PATCH] Update the manual @@ -8,23 +8,24 @@ Update the manual for rotating on different filesystems. Upstream-Status: Pending Signed-off-by: Robert Yang <liezhi.yang@windriver.com> + --- - logrotate.8 | 10 ++++------ + logrotate.8.in | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) -diff --git a/logrotate.8 b/logrotate.8 -index e4e5f48..84407d0 100644 ---- a/logrotate.8 -+++ b/logrotate.8 -@@ -405,12 +405,10 @@ Do not rotate the log if it is empty (this overrides the \fBifempty\fR option). +diff --git a/logrotate.8.in b/logrotate.8.in +index 98fea91..70b4c44 100644 +--- a/logrotate.8.in ++++ b/logrotate.8.in +@@ -202,12 +202,10 @@ at all (use with caution, may waste performance and disk space). Default is 0. .TP \fBolddir \fIdirectory\fR --Logs are moved into \fIdirectory\fR for rotation. The \fIdirectory\fR must be +-Logs are moved into \fIdirectory\fR for rotation. The \fIdirectory\fR must be -on the same physical device as the log file being rotated, unless \fBcopy\fR, --\fBcopytruncate\fR or \fBrenamecopy\fR option is used. The \fIdirectory\fR +-\fBcopytruncate\fR or \fBrenamecopy\fR option is used. The \fIdirectory\fR -is assumed to be relative to the directory holding the log file --unless an absolute path name is specified. When this option is used all +-unless an absolute path name is specified. When this option is used all -old versions of the log end up in \fIdirectory\fR. This option may be +Logs are moved into \fIdirectory\fR for rotation. The \fIdirectory\fR +is assumed to be relative to the directory holding the log file unless @@ -34,5 +35,5 @@ index e4e5f48..84407d0 100644 .TP -- -1.7.9.5 +2.24.0 diff --git a/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch b/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch index 2e931a2876..671fce4ac8 100644 --- a/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch +++ b/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch @@ -1,4 +1,4 @@ -From 68f29ab490cf987aa34b5f4caf1784b58a021308 Mon Sep 17 00:00:00 2001 +From 17d57a2a923a4af53c8910a9999aebeab3f5d83a Mon Sep 17 00:00:00 2001 From: Robert Yang <liezhi.yang@windriver.com> Date: Tue, 17 Feb 2015 21:08:07 -0800 Subject: [PATCH] Act as the "mv" command when rotate log @@ -9,15 +9,16 @@ read and write. Upstream-Status: Pending Signed-off-by: Robert Yang <liezhi.yang@windriver.com> + --- - logrotate.c | 71 +++++++++++++++++++++++++++++++++++++++++++++++++---------- + logrotate.c | 71 ++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 59 insertions(+), 12 deletions(-) diff --git a/logrotate.c b/logrotate.c -index d3deb6a..cf8bf2c 100644 +index 45b3eb6..231371a 100644 --- a/logrotate.c +++ b/logrotate.c -@@ -1157,6 +1157,53 @@ int findNeedRotating(struct logInfo *log, int logNum, int force) +@@ -1463,6 +1463,53 @@ static int findNeedRotating(const struct logInfo *log, unsigned logNum, int forc return 0; } @@ -68,80 +69,81 @@ index d3deb6a..cf8bf2c 100644 + return 1; +} + - int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state, - struct logNames *rotNames) - { -@@ -1523,15 +1570,15 @@ int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state, - } + /* find the rotated file with the highest index */ + static int findLastRotated(const struct logNames *rotNames, + const char *fileext, const char *compext) +@@ -1958,15 +2005,15 @@ static int prerotateSingleLog(const struct logInfo *log, unsigned logNum, + } - message(MESS_DEBUG, -- "renaming %s to %s (rotatecount %d, logstart %d, i %d), \n", -+ "moving %s to %s (rotatecount %d, logstart %d, i %d), \n", - oldName, newName, rotateCount, logStart, i); + message(MESS_DEBUG, +- "renaming %s to %s (rotatecount %d, logstart %d, i %d), \n", ++ "moving %s to %s (rotatecount %d, logstart %d, i %d), \n", + oldName, newName, rotateCount, logStart, i); -- if (!debug && rename(oldName, newName)) { -+ if (!debug && mvFile(oldName, newName, log, prev_acl)) { - if (errno == ENOENT) { - message(MESS_DEBUG, "old log %s does not exist\n", - oldName); - } else { -- message(MESS_ERROR, "error renaming %s to %s: %s\n", -+ message(MESS_ERROR, "error moving %s to %s: %s\n", - oldName, newName, strerror(errno)); - hasErrors = 1; - } -@@ -1669,21 +1716,21 @@ int rotateSingleLog(struct logInfo *log, int logNum, struct logState *state, - return 1; - } +- if (!debug && rename(oldName, newName)) { ++ if (!debug && mvFile(oldName, newName, log, prev_acl)) { + if (errno == ENOENT) { + message(MESS_DEBUG, "old log %s does not exist\n", + oldName); + } else { +- message(MESS_ERROR, "error renaming %s to %s: %s\n", ++ message(MESS_ERROR, "error moving %s to %s: %s\n", + oldName, newName, strerror(errno)); + hasErrors = 1; + } +@@ -2051,10 +2098,10 @@ static int rotateSingleLog(const struct logInfo *log, unsigned logNum, + return 1; + } -- message(MESS_DEBUG, "renaming %s to %s\n", log->files[logNum], -+ message(MESS_DEBUG, "moving %s to %s\n", log->files[logNum], - tmpFilename); -- if (!debug && !hasErrors && rename(log->files[logNum], tmpFilename)) { -- message(MESS_ERROR, "failed to rename %s to %s: %s\n", -+ if (!debug && !hasErrors && mvFile(log->files[logNum], rotNames->finalName, log, prev_acl)) { -+ message(MESS_ERROR, "failed to move %s to %s: %s\n", - log->files[logNum], tmpFilename, - strerror(errno)); - hasErrors = 1; - } - } - else { -- message(MESS_DEBUG, "renaming %s to %s\n", log->files[logNum], -+ message(MESS_DEBUG, "moving %s to %s\n", log->files[logNum], - rotNames->finalName); - if (!debug && !hasErrors && -- rename(log->files[logNum], rotNames->finalName)) { -- message(MESS_ERROR, "failed to rename %s to %s: %s\n", -+ mvFile(log->files[logNum], rotNames->finalName, log, prev_acl)) { -+ message(MESS_ERROR, "failed to move %s to %s: %s\n", - log->files[logNum], tmpFilename, - strerror(errno)); - hasErrors = 1; -@@ -2063,7 +2110,7 @@ int rotateLogSet(struct logInfo *log, int force) +- message(MESS_DEBUG, "renaming %s to %s\n", log->files[logNum], ++ message(MESS_DEBUG, "moving %s to %s\n", log->files[logNum], + tmpFilename); +- if (!debug && !hasErrors && rename(log->files[logNum], tmpFilename)) { +- message(MESS_ERROR, "failed to rename %s to %s: %s\n", ++ if (!debug && !hasErrors && mvFile(log->files[logNum], rotNames->finalName, log, prev_acl)) { ++ message(MESS_ERROR, "failed to move %s to %s: %s\n", + log->files[logNum], tmpFilename, + strerror(errno)); + hasErrors = 1; +@@ -2063,11 +2110,11 @@ static int rotateSingleLog(const struct logInfo *log, unsigned logNum, + free(tmpFilename); + } + else { +- message(MESS_DEBUG, "renaming %s to %s\n", log->files[logNum], ++ message(MESS_DEBUG, "moving %s to %s\n", log->files[logNum], + rotNames->finalName); + if (!debug && !hasErrors && +- rename(log->files[logNum], rotNames->finalName)) { +- message(MESS_ERROR, "failed to rename %s to %s: %s\n", ++ mvFile(log->files[logNum], rotNames->finalName, log, prev_acl)) { ++ message(MESS_ERROR, "failed to move %s to %s: %s\n", + log->files[logNum], rotNames->finalName, + strerror(errno)); + hasErrors = 1; +@@ -2480,7 +2527,7 @@ static int rotateLogSet(const struct logInfo *log, int force) return hasErrors; } --static int writeState(char *stateFilename) +-static int writeState(const char *stateFilename) +static int writeState(struct logInfo *log, char *stateFilename) { - struct logState *p; - FILE *f; -@@ -2227,7 +2274,7 @@ static int writeState(char *stateFilename) - fclose(f); + struct logState *p; + FILE *f; +@@ -2659,7 +2706,7 @@ static int writeState(const char *stateFilename) + fclose(f); - if (error == 0) { -- if (rename(tmpFilename, stateFilename)) { -+ if (mvFile(tmpFilename, stateFilename, log, prev_acl)) { - unlink(tmpFilename); - error = 1; - message(MESS_ERROR, "error renaming temp state file %s\n", -@@ -2525,7 +2572,7 @@ int main(int argc, const char **argv) - rc |= rotateLogSet(log, force); + if (error == 0) { +- if (rename(tmpFilename, stateFilename)) { ++ if (mvFile(tmpFilename, stateFilename, log, prev_acl)) { + message(MESS_ERROR, "error renaming temp state file %s to %s: %s\n", + tmpFilename, stateFilename, strerror(errno)); + unlink(tmpFilename); +@@ -3073,7 +3120,7 @@ int main(int argc, const char **argv) + rc |= rotateLogSet(log, force); - if (!debug) -- rc |= writeState(stateFile); -+ rc |= writeState(log, stateFile); + if (!debug) +- rc |= writeState(stateFile); ++ rc |= writeState(log, stateFile); - return (rc != 0); + return (rc != 0); } diff --git a/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch b/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch index 793d702598..d7f9a02cc8 100644 --- a/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch +++ b/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch @@ -1,4 +1,7 @@ -Disable the check for different filesystems +From 16c1833ade4c036b30b8761d2c4a5bd85cc65c44 Mon Sep 17 00:00:00 2001 +From: Robert Yang <liezhi.yang@windriver.com> +Date: Tue, 8 Jan 2019 06:27:06 +0000 +Subject: [PATCH] Disable the check for different filesystems The logrotate supports rotate log across different filesystems now, so disable the check for different filesystems. @@ -6,27 +9,28 @@ disable the check for different filesystems. Upstream-Status: Pending Signed-off-by: Robert Yang <liezhi.yang@windriver.com> + --- - config.c | 9 --------- + config.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/config.c b/config.c -index dbbf563..64e66f6 100644 +index d2488f1..1de3745 100644 --- a/config.c +++ b/config.c -@@ -1493,15 +1493,6 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig) - goto error; - } - } +@@ -1902,15 +1902,6 @@ duperror: + } + + free(ld); - -- if (sb.st_dev != sb2.st_dev -- && !(newlog->flags & (LOG_FLAG_COPYTRUNCATE | LOG_FLAG_COPY | LOG_FLAG_TMPFILENAME))) { -- message(MESS_ERROR, -- "%s:%d olddir %s and log file %s " -- "are on different devices\n", configFile, -- lineNum, newlog->oldDir, newlog->files[i]); -- goto error; -- } - } - } +- if (sb.st_dev != sb2.st_dev +- && !(newlog->flags & (LOG_FLAG_COPYTRUNCATE | LOG_FLAG_COPY | LOG_FLAG_TMPFILENAME))) { +- message(MESS_ERROR, +- "%s:%d olddir %s and log file %s " +- "are on different devices\n", configFile, +- lineNum, newlog->oldDir, newlog->files[j]); +- goto error; +- } + } + } diff --git a/meta/recipes-extended/logrotate/logrotate_3.17.0.bb b/meta/recipes-extended/logrotate/logrotate_3.17.0.bb new file mode 100644 index 0000000000..08001f38e5 --- /dev/null +++ b/meta/recipes-extended/logrotate/logrotate_3.17.0.bb @@ -0,0 +1,91 @@ +SUMMARY = "Rotates, compresses, removes and mails system log files" +SECTION = "console/utils" +HOMEPAGE = "https://github.com/logrotate/logrotate/issues" +LICENSE = "GPLv2" + +# TODO: Document coreutils dependency. Why not RDEPENDS? Why not busybox? + +DEPENDS="coreutils popt" + +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" +UPSTREAM_CHECK_REGEX = "logrotate-(?P<pver>\d+(\.\d+)+).tar" + +SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz \ + file://act-as-mv-when-rotate.patch \ + file://0001-Update-the-manual.patch \ + file://disable-check-different-filesystems.patch \ + " + +SRC_URI[sha256sum] = "58cc2178ff57faa3c0490181cce041345aeca6cff18dba1c5cd1398bf1c19294" + +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/recipes-extended/logrotate/logrotate_3.9.1.bb b/meta/recipes-extended/logrotate/logrotate_3.9.1.bb deleted file mode 100644 index 7d0a15961b..0000000000 --- a/meta/recipes-extended/logrotate/logrotate_3.9.1.bb +++ /dev/null @@ -1,63 +0,0 @@ -SUMMARY = "Rotates, compresses, removes and mails system log files" -SECTION = "console/utils" -HOMEPAGE = "https://fedorahosted.org/logrotate/" -LICENSE = "GPLv2" - -# TODO: logrotate 3.8.8 adds autotools/automake support, update recipe to use it. -# TODO: Document coreutils dependency. Why not RDEPENDS? Why not busybox? - -DEPENDS="coreutils popt" - -LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760" - -SRC_URI = "https://fedorahosted.org/releases/l/o/logrotate/logrotate-${PV}.tar.gz \ - file://act-as-mv-when-rotate.patch \ - file://update-the-manual.patch \ - file://disable-check-different-filesystems.patch \ - " - -SRC_URI[md5sum] = "4492b145b6d542e4a2f41e77fa199ab0" -SRC_URI[sha256sum] = "022769e3288c80981559a8421703c88e8438b447235e36dd3c8e97cd94c52545" - -PACKAGECONFIG ?= "\ - ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \ -" - -PACKAGECONFIG[acl] = ",,acl" -PACKAGECONFIG[selinux] = ",,libselinux" - -CONFFILES_${PN} += "${localstatedir}/lib/logrotate.status \ - ${sysconfdir}/logrotate.conf" - -# 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" - -do_compile_prepend() { - # Make sure the recompile is OK - rm -f ${B}/.depend -} - -do_install(){ - oe_runmake install DESTDIR=${D} PREFIX=${D} MANDIR=${mandir} BINDIR=${bindir} - mkdir -p ${D}${sysconfdir}/logrotate.d - mkdir -p ${D}${sysconfdir}/cron.daily - mkdir -p ${D}${localstatedir}/lib - install -p -m 644 examples/logrotate-default ${D}${sysconfdir}/logrotate.conf - install -p -m 755 examples/logrotate.cron ${D}${sysconfdir}/cron.daily/logrotate - touch ${D}${localstatedir}/lib/logrotate.status -} diff --git a/meta/recipes-extended/lsb/lsb-release/0001-Remove-timestamp-from-manpage.patch b/meta/recipes-extended/lsb/lsb-release/0001-Remove-timestamp-from-manpage.patch new file mode 100644 index 0000000000..af095fd322 --- /dev/null +++ b/meta/recipes-extended/lsb/lsb-release/0001-Remove-timestamp-from-manpage.patch @@ -0,0 +1,27 @@ +From fb0b58be938bab5571ac0bdec3725f6d88b07e9f Mon Sep 17 00:00:00 2001 +From: Jeremy Puhlman <jpuhlman@mvista.com> +Date: Sat, 22 Feb 2020 19:01:28 +0000 +Subject: [PATCH] Remove timestamp from manpage + +Upstream-Status: Submitted [lsb-discuss@lists.linux-foundation.org] +Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com> +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 04fdecd..5be8081 100644 +--- a/Makefile ++++ b/Makefile +@@ -17,7 +17,7 @@ man: lsb_release.1.gz + + lsb_release.1.gz: lsb_release + @./help2man -N --include ./lsb_release.examples --alt_version_key=program_version ./lsb_release >lsb_release.1 +- @gzip -9f lsb_release.1 ++ @gzip -9fn lsb_release.1 + + install: all + install -D -m 644 lsb_release.1.gz ${mandir}/man1/lsb_release.1.gz +-- +2.13.3 + diff --git a/meta/recipes-extended/lsb/lsb-release/0001-fix-lsb_release-to-work-with-busybox-head-and-find.patch b/meta/recipes-extended/lsb/lsb-release/0001-fix-lsb_release-to-work-with-busybox-head-and-find.patch new file mode 100644 index 0000000000..0175752067 --- /dev/null +++ b/meta/recipes-extended/lsb/lsb-release/0001-fix-lsb_release-to-work-with-busybox-head-and-find.patch @@ -0,0 +1,38 @@ +From cba901945c5a6da9586550498f8e3787c57c3098 Mon Sep 17 00:00:00 2001 +From: Athanasios Oikonomou <athoik@gmail.com> +Date: Fri, 17 Feb 2017 21:04:04 +0200 +Subject: [PATCH] fix lsb_release to work with busybox head and find + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Athanasios Oikonomou <athoik@gmail.com> + +diff --git a/lsb_release b/lsb_release +index e7d6024..233b8c1 100755 +--- a/lsb_release ++++ b/lsb_release +@@ -209,7 +209,7 @@ EASE ($DISTRIB_CODENAME)" + || [ -n "$(echo $DISTRIB_DESCRIPTION | \ + sed -e "s/.*$DESCSTR_DELI.*//")" ] + then +- TMP_DISTRIB_DESC=$(head -1 $FILENAME 2>/dev/null) ++ TMP_DISTRIB_DESC=$(head -n 1 $FILENAME 2>/dev/null) + [ -z "$DISTRIB_DESCRIPTION" ] \ + && DISTRIB_DESCRIPTION=$TMP_DISTRIB_DESC + else +@@ -249,10 +249,10 @@ GetDistribInfo() { + then + CHECKFIRST=$(find $INFO_ROOT/ -maxdepth 1 \ + -name \*$INFO_DISTRIB_SUFFIX \ +- -and ! -name $INFO_LSB_FILE \ +- -and -type f \ ++ -type f \ + 2>/dev/null \ +- | head -1 ) # keep one of the files found (if many) ++ | grep -v $INFO_LSB_FILE \ ++ | head -n 1 ) # keep one of the files found (if many) + fi + InitDistribInfo $CHECKFIRST + fi +-- +2.1.4 + diff --git a/meta/recipes-extended/lsb/lsb-release_1.4.bb b/meta/recipes-extended/lsb/lsb-release_1.4.bb new file mode 100644 index 0000000000..a06cbcf845 --- /dev/null +++ b/meta/recipes-extended/lsb/lsb-release_1.4.bb @@ -0,0 +1,37 @@ +SUMMARY = "lsb_release support for OpenEmbedded" +SECTION = "console/utils" +HOMEPAGE = "http://prdownloads.sourceforge.net/lsb" +LICENSE = "GPLv2+" + +# lsb_release needs getopt +RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_getopt}" + +LIC_FILES_CHKSUM = "file://README;md5=12da544b1a3a5a1795a21160b49471cf" + +SRC_URI = "${SOURCEFORGE_MIRROR}/project/lsb/lsb_release/1.4/lsb-release-1.4.tar.gz \ + file://0001-fix-lsb_release-to-work-with-busybox-head-and-find.patch \ + file://0001-Remove-timestamp-from-manpage.patch \ + " + +SRC_URI[md5sum] = "30537ef5a01e0ca94b7b8eb6a36bb1e4" +SRC_URI[sha256sum] = "99321288f8d62e7a1d485b7c6bdccf06766fb8ca603c6195806e4457fdf17172" + +UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/lsb/files/lsb_release/" +UPSTREAM_CHECK_REGEX = "/lsb_release/(?P<pver>(\d+[\.\-_]*)+)/" + +CLEANBROKEN = "1" + +do_install() { + oe_runmake install prefix=${D}${root_prefix} mandir=${D}${datadir}/man/ DESTDIR=${D} + + mkdir -p ${D}${sysconfdir}/lsb-release.d + + echo "DISTRIB_ID=${DISTRO}" >> ${D}${sysconfdir}/lsb-release + echo "DISTRIB_RELEASE=${DISTRO_VERSION}" >> ${D}${sysconfdir}/lsb-release + if [ -n "${DISTRO_CODENAME}" ]; then + echo "DISTRIB_CODENAME=${DISTRO_CODENAME}" >> ${D}${sysconfdir}/lsb-release + fi + echo "DISTRIB_DESCRIPTION=\"${DISTRO_NAME} ${DISTRO_VERSION}\"" >> ${D}${sysconfdir}/lsb-release +} + +FILES_${PN} += "${base_libdir}" diff --git a/meta/recipes-extended/lsb/lsb/init-functions b/meta/recipes-extended/lsb/lsb/init-functions deleted file mode 100755 index 7c1dce24cf..0000000000 --- a/meta/recipes-extended/lsb/lsb/init-functions +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh - -# LSB initscript functions, as defined in the LSB Spec 1.1.0 -# -# Lawrence Lim <llim@core.com> - Tue, 26 June 2007 -# Updated to the latest LSB 3.1 spec -# http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic_lines.txt - -start_daemon () { - /etc/core-lsb/lsb_start_daemon "$@" -} - -killproc () { - /etc/core-lsb/lsb_killproc "$@" -} - -pidofproc () { - /etc/core-lsb/lsb_pidofproc "$@" -} - -log_success_msg () { - /etc/core-lsb/lsb_log_message success "$@" -} - -log_failure_msg () { - /etc/core-lsb/lsb_log_message failure "$@" -} - -log_warning_msg () { - /etc/core-lsb/lsb_log_message warning "$@" -} - -# int log_begin_message (char *message) -log_begin_msg () { - if [ -z "$1" ]; then - return 1 - fi - echo " * $@" -} - - -log_end_msg () { - /etc/core-lsb/lsb_log_message end "$@" -} diff --git a/meta/recipes-extended/lsb/lsb/lsb_killproc b/meta/recipes-extended/lsb/lsb/lsb_killproc deleted file mode 100755 index 866c1a9c63..0000000000 --- a/meta/recipes-extended/lsb/lsb/lsb_killproc +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -. /etc/init.d/functions - -LSB=LSB-1.1 killproc $* -exit $? diff --git a/meta/recipes-extended/lsb/lsb/lsb_log_message b/meta/recipes-extended/lsb/lsb/lsb_log_message deleted file mode 100755 index 10343b0819..0000000000 --- a/meta/recipes-extended/lsb/lsb/lsb_log_message +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -. /etc/init.d/functions - -ACTION=$1 -shift - -case "$ACTION" in - success) - echo -n $* - success "$*" - echo - ;; - failure) - echo -n $* - failure "$*" - echo - ;; - warning) - echo -n $* - warning "$*" - echo - ;; - *) - ;; -esac -exit 0 diff --git a/meta/recipes-extended/lsb/lsb/lsb_pidofproc b/meta/recipes-extended/lsb/lsb/lsb_pidofproc deleted file mode 100755 index 6d1fd0f249..0000000000 --- a/meta/recipes-extended/lsb/lsb/lsb_pidofproc +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -. /etc/init.d/functions - -pidofproc $* -exit $? diff --git a/meta/recipes-extended/lsb/lsb/lsb_start_daemon b/meta/recipes-extended/lsb/lsb/lsb_start_daemon deleted file mode 100755 index de62c2344d..0000000000 --- a/meta/recipes-extended/lsb/lsb/lsb_start_daemon +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -. /etc/init.d/functions - -nice= -force= -pidfile= -user= -check= -RETVAL= -while [ "$1" != "${1##[-+]}" ]; do - case $1 in - -f) - force="--force" - shift - ;; - -n) - nice=$2 - shift 2 - ;; - -p) - pidfile="--pidfile $2" - shift 2 - ;; - -u) - user="--user $2" - shift 2 - ;; - -c) - check="--check $2" - shift 2 - ;; - *) - echo "Unknown Option $1" - echo "Options are:" - echo "-f" - echo "-p {pidfile}" - echo "-n [+/-nicelevel]" - echo "-u {user}" - echo "-c {base}" - exit 1;; - esac -done -LSB=LSB-1.1 daemon ${force:-} ${nice:-} ${pidfile:-} ${user:-} ${check:-} $* -exit $? diff --git a/meta/recipes-extended/lsb/lsb_4.1.bb b/meta/recipes-extended/lsb/lsb_4.1.bb deleted file mode 100644 index 6215b62d80..0000000000 --- a/meta/recipes-extended/lsb/lsb_4.1.bb +++ /dev/null @@ -1,127 +0,0 @@ -SUMMARY = "LSB support for OpenEmbedded" -SECTION = "console/utils" -HOMEPAGE = "http://prdownloads.sourceforge.net/lsb" -LICENSE = "GPLv2+" -PR = "r2" - -LSB_CORE = "lsb-core-${TARGET_ARCH}" -LSB_CORE_x86 = "lsb-core-ia32" -LSB_CORE_x86-64 = "lsb-core-amd64" -RPROVIDES_${PN} += "${LSB_CORE}" - -# lsb_release needs getopt -RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_getopt}" - -LIC_FILES_CHKSUM = "file://README;md5=12da544b1a3a5a1795a21160b49471cf" - -SRC_URI = "${SOURCEFORGE_MIRROR}/project/lsb/lsb_release/1.4/lsb-release-1.4.tar.gz \ - file://init-functions \ - file://lsb_killproc \ - file://lsb_log_message \ - file://lsb_pidofproc \ - file://lsb_start_daemon \ - " - -SRC_URI[md5sum] = "30537ef5a01e0ca94b7b8eb6a36bb1e4" -SRC_URI[sha256sum] = "99321288f8d62e7a1d485b7c6bdccf06766fb8ca603c6195806e4457fdf17172" -S = "${WORKDIR}/lsb-release-1.4" - -CLEANBROKEN = "1" - -do_install(){ - oe_runmake install prefix=${D} mandir=${D}/${datadir}/man/ DESTDIR=${D} - - # this 2 dirs are needed by package lsb-dist-checker - mkdir -p ${D}${sysconfdir}/opt - mkdir -p ${D}${localstatedir}/opt - - mkdir -p ${D}${base_bindir} - mkdir -p ${D}/${baselib} - mkdir -p ${D}${sysconfdir}/lsb-release.d - printf "LSB_VERSION=\"core-4.1-noarch:" > ${D}${sysconfdir}/lsb-release - - if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ];then - printf "core-4.1-ia32" >> ${D}${sysconfdir}/lsb-release - else - printf "core-4.1-${TARGET_ARCH}" >> ${D}${sysconfdir}/lsb-release - fi - echo "\"" >> ${D}${sysconfdir}/lsb-release - echo "DISTRIB_ID=${DISTRO}" >> ${D}${sysconfdir}/lsb-release - echo "DISTRIB_RELEASE=${DISTRO_VERSION}" >> ${D}${sysconfdir}/lsb-release - if [ -n "${DISTRO_CODENAME}" ]; then - echo "DISTRIB_CODENAME=${DISTRO_CODENAME}" >> ${D}${sysconfdir}/lsb-release - fi - echo "DISTRIB_DESCRIPTION=\"${DISTRO_NAME} ${DISTRO_VERSION}\"" >> ${D}${sysconfdir}/lsb-release - - if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ];then - mkdir -p ${D}${sysconfdir}/lsb-release.d - touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch - touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-noarch - touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ia32 - touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ia32 - elif [ "${TARGET_ARCH}" = "x86_64" ];then - touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch - touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-amd64 - touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-amd64 - fi - if [ "${TARGET_ARCH}" = "powerpc" ];then - touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch - touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ppc32 - touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ppc32 - elif [ "${TARGET_ARCH}" = "powerpc64" ];then - touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch - touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ppc64 - touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ppc64 - fi -} - -do_install_append(){ - install -d ${D}${sysconfdir}/core-lsb - for i in lsb_killproc lsb_log_message lsb_pidofproc lsb_start_daemon - do - install -m 0755 ${WORKDIR}/${i} ${D}${sysconfdir}/core-lsb - done - - install -d ${D}/lib/lsb - install -m 0755 ${WORKDIR}/init-functions ${D}/lib/lsb - - # creat links for LSB test - install -d ${D}/usr/lib/lsb - ln -sf ${sbindir}/chkconfig ${D}/usr/lib/lsb/install_initd - ln -sf ${sbindir}/chkconfig ${D}/usr/lib/lsb/remove_initd - - if [ "${TARGET_ARCH}" = "x86_64" ];then - cd ${D} - if [ "${baselib}" != "lib64" ]; then - ln -sf ${baselib} lib64 - fi - cd ${D}/${baselib} - ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.2 - ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3 - fi - if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ];then - cd ${D}/${baselib} - ln -sf ld-linux.so.2 ld-lsb.so.2 - ln -sf ld-linux.so.2 ld-lsb.so.3 - fi - - if [ "${TARGET_ARCH}" = "powerpc64" ];then - cd ${D} - if [ "${baselib}" != "lib64" ]; then - ln -sf ${baselib} lib64 - fi - cd ${D}/${baselib} - ln -sf ld64.so.1 ld-lsb-ppc64.so.2 - ln -sf ld64.so.1 ld-lsb-ppc64.so.3 - fi - if [ "${TARGET_ARCH}" = "powerpc" ];then - cd ${D}/${baselib} - ln -sf ld.so.1 ld-lsb-ppc32.so.2 - ln -sf ld.so.1 ld-lsb-ppc32.so.3 - fi -} -FILES_${PN} += "/lib64 \ - /usr/lib/lsb \ - ${base_libdir}/lsb/* \ - /lib/lsb/* \ - " diff --git a/meta/recipes-extended/lsb/lsbinitscripts/0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch b/meta/recipes-extended/lsb/lsbinitscripts/0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch deleted file mode 100644 index 0809c9be97..0000000000 --- a/meta/recipes-extended/lsb/lsbinitscripts/0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch +++ /dev/null @@ -1,23 +0,0 @@ -Upstream-Status: Pending - -Subject: functions: avoid exit 1 which causes init scripts to fail - -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - rc.d/init.d/functions | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions -index 6850046..11223f7 100644 ---- a/rc.d/init.d/functions -+++ b/rc.d/init.d/functions -@@ -597,5 +597,5 @@ if [ "$_use_systemctl" = "1" ]; then - fi - fi - --strstr "$(cat /proc/cmdline)" "rc.debug" && set -x -+strstr "$(cat /proc/cmdline)" "rc.debug" && set -x || true - --- -2.1.0 - diff --git a/meta/recipes-extended/lsb/lsbinitscripts/functions.patch b/meta/recipes-extended/lsb/lsbinitscripts/functions.patch deleted file mode 100644 index a756d047ef..0000000000 --- a/meta/recipes-extended/lsb/lsbinitscripts/functions.patch +++ /dev/null @@ -1,26 +0,0 @@ -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com> -Signed-off-by: Saul Wold <sgw@linux.intel.com> - -Index: initscripts-9.43/rc.d/init.d/functions -=================================================================== ---- initscripts-9.43.orig/rc.d/init.d/functions -+++ initscripts-9.43/rc.d/init.d/functions -@@ -13,6 +13,7 @@ umask 022 - PATH="/sbin:/usr/sbin:/bin:/usr/bin" - export PATH - -+ - if [ $PPID -ne 1 -a -z "$SYSTEMCTL_SKIP_REDIRECT" ] && \ - ( /bin/mountpoint -q /cgroup/systemd || /bin/mountpoint -q /sys/fs/cgroup/systemd ) ; then - case "$0" in -@@ -54,7 +55,7 @@ systemctl_redirect () { - [ -z "${COLUMNS:-}" ] && COLUMNS=80 - - if [ -z "${CONSOLETYPE:-}" ]; then -- if [ -c "/dev/stderr" -a -r "/dev/stderr" ]; then -+ if [ -c "/dev/stderr" -a -r "/dev/stderr" -a -e /sbin/consoletype ]; then - CONSOLETYPE="$(/sbin/consoletype < /dev/stderr 2>/dev/null)" - else - CONSOLETYPE="serial" diff --git a/meta/recipes-extended/lsb/lsbinitscripts_9.63.bb b/meta/recipes-extended/lsb/lsbinitscripts_9.63.bb deleted file mode 100644 index b937c15545..0000000000 --- a/meta/recipes-extended/lsb/lsbinitscripts_9.63.bb +++ /dev/null @@ -1,32 +0,0 @@ -SUMMARY = "SysV init scripts which are only used in an LSB image" -SECTION = "base" -LICENSE = "GPLv2" -DEPENDS = "popt glib-2.0" - -LIC_FILES_CHKSUM = "file://COPYING;md5=ebf4e8b49780ab187d51bd26aaa022c6" - -S="${WORKDIR}/initscripts-${PV}" -SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/initscripts/initscripts-9.63.tar.bz2/1ae0f15e54a904ac30185548d43daa1c/initscripts-9.63.tar.bz2 \ - file://functions.patch \ - file://0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch \ - " - -SRC_URI[md5sum] = "1ae0f15e54a904ac30185548d43daa1c" -SRC_URI[sha256sum] = "39474c3a83e2e03077e27bf9418a4296651c421cf0ba7672e67fe2e3567b36e1" - -inherit update-alternatives - -ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE_${PN} = "functions" -ALTERNATIVE_LINK_NAME[functions] = "${sysconfdir}/init.d/functions" - -# Since we are only taking the patched version of functions, no need to -# configure or compile anything so do not execute these -do_configure[noexec] = "1" -do_compile[noexec] = "1" - -do_install(){ - install -d ${D}${sysconfdir}/init.d/ - install -m 0644 ${S}/rc.d/init.d/functions ${D}${sysconfdir}/init.d/functions - sed -i 's,${base_bindir}/mountpoint,${bindir}/mountpoint,g' ${D}${sysconfdir}/init.d/functions -} diff --git a/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh b/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh deleted file mode 100644 index b9971a17d1..0000000000 --- a/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh +++ /dev/null @@ -1,526 +0,0 @@ -#!/bin/sh - -# Copyright (C) 2012 Wind River Systems, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as -# published by the Free Software Foundation. -# -# 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 - - -WORK_DIR="/opt/lsb-test" - -if [ `id -u` -ne 0 ] -then - cat << EOF - In order to install and run LSB testsuite, you need administrator privileges. - You are currently running this script as an unprivileged user. - -EOF - exit 1 -fi - -ARCH=`uname -m` -if [ ${ARCH} != "i686" ] && [ ${ARCH} != "x86_64" ] && [ ${ARCH} != "ppc" ] && [ ${ARCH} != "ppc64" ] -then - echo "Error: Unsupported architecture" - exit 1 -fi - -which rpm -if [ $? -ne 0 ] -then - echo "No rpm command found" - exit 1 -fi - -RET=0 - -cd ${WORK_DIR} || exit 1 -# Step 1: Download the LSB Packages -echo "" -echo "Download LSB packages..." -echo "" - -if [ ! -e ./packages_list ] -then - echo "Error: Could not find packages list" >&2 - exit 1 -fi - -. ./packages_list - -PACKAGES_DIR="/var/opt/lsb/test/manager/packages/ftp.linuxfoundation.org/pub/lsb" - -BASE_PACKAGES_DIR="${PACKAGES_DIR}/base/${LSB_RELEASE}/binary" -RUNTIME_BASE_PACKAGES_DIR="${PACKAGES_DIR}/test_suites/released-all/binary/runtime" -RUNTIME_PACKAGES_DIR="${PACKAGES_DIR}/test_suites/${LSB_RELEASE}/binary/runtime" -APP_PACKAGES_DIR="${PACKAGES_DIR}/app-battery/${LSB_RELEASE}/${LSB_ARCH}" -APP_TESTFILES_DIR="${PACKAGES_DIR}/app-battery/tests" -SNAPSHOTS_TESTFILES_DIR="${PACKAGES_DIR}/snapshots/appbat/tests" - -if [ ! -d ${PACKAGES_DIR} ] -then - mkdir -p ${PACKAGES_DIR} -fi - -if [ ! -d ${BASE_PACKAGES_DIR} ] -then - mkdir -p ${BASE_PACKAGES_DIR} -fi - -if [ ! -d ${RUNTIME_BASE_PACKAGES_DIR} ] -then - mkdir -p ${RUNTIME_BASE_PACKAGES_DIR} -fi - -if [ ! -d ${RUNTIME_PACKAGES_DIR} ] -then - mkdir -p ${RUNTIME_PACKAGES_DIR} -fi - -if [ ! -d ${APP_PACKAGES_DIR} ] -then - mkdir -p ${APP_PACKAGES_DIR} -fi - -if [ ! -d ${APP_TESTFILES_DIR} ] -then - mkdir -p ${APP_TESTFILES_DIR} -fi - -# Official download server list. You can replace them with your own server. -SERVER_IPADDR="140.211.169.23" -SERVER_NAME="ftp.linuxfoundation.org" - -if ! `grep -F -q "${SERVER_NAME}" /etc/hosts`; then - echo "${SERVER_IPADDR} ${SERVER_NAME} ${SERVER_NAME}" >> /etc/hosts -fi - -#ping -c 5 ${SERVER_NAME} -#if [ $? -ne 0 ] -#then -# echo "The server: ${SERVER_NAME} is unreachable" -# exit 1 -#fi - -SERVER1="\ - http://${SERVER_NAME}/pub/lsb/base/${LSB_RELEASE}/binary" -SERVER2="\ - http://${SERVER_NAME}/pub/lsb/test_suites/released-all/binary/runtime" -SERVER3="\ - http://${SERVER_NAME}/pub/lsb/test_suites/${LSB_RELEASE}/binary/runtime" -SERVER4="\ - http://${SERVER_NAME}/pub/lsb/app-battery/${LSB_RELEASE}/${LSB_ARCH}" -SERVER5="\ - http://${SERVER_NAME}/pub/lsb/app-battery/tests" - -# We using "curl" as a download tool, "wget" is an alternative. -CURL=`which curl` -WGET=`which wget` -if [ ! -z ${CURL} ] -then - DOWNLOAD_CMD="${CURL} -R -L -f --retry 3 --retry-delay 4 --connect-timeout 180 --compressed -C - -o" -elif [ ! -z ${WGET} ] -then - DOWNLOAD_CMD="${WGET} -c -t 5 -O" -else - echo "Can not find a download tool, please install curl or wget." - exit 1 -fi - -cd ${BASE_PACKAGES_DIR} -for pkg in ${BASE_PACKAGES_LIST}; do - if [ ! -f ${pkg} ] - then - #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER1}/${pkg} > /dev/null 2>&1 - ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER1}/${pkg} - if [ $? -eq 0 ] - then - mv -f ${pkg}".#part" ${pkg} - echo "Download ${pkg} successfully." - else - echo "Download ${pkg} failed." - RET=1 - fi - fi -done - -cd ${RUNTIME_BASE_PACKAGES_DIR} -for pkg in ${RUNTIME_BASE_PACKAGES_LIST}; do - if [ ! -f ${pkg} ] - then - #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER2}/${pkg} > /dev/null 2>&1 - ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER2}/${pkg} - if [ $? -eq 0 ] - then - mv -f ${pkg}".#part" ${pkg} - echo "Download ${pkg} successfully." - else - echo "Download ${pkg} failed." - RET=1 - fi - fi -done - -cd ${RUNTIME_PACKAGES_DIR} -for pkg in ${RUNTIME_PACKAGES_LIST}; do - if [ ! -f ${pkg} ] - then - #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER3}/${pkg} > /dev/null 2>&1 - ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER3}/${pkg} - if [ $? -eq 0 ] - then - mv -f ${pkg}".#part" ${pkg} - echo "Download ${pkg} successfully." - else - echo "Download ${pkg} failed." - RET=1 - fi - fi -done - -cd ${APP_PACKAGES_DIR} -for pkg in ${APP_PACKAGES_LIST}; do - if [ ! -f ${pkg} ] - then - #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER4}/${pkg} > /dev/null 2>&1 - ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER4}/${pkg} - if [ $? -eq 0 ] - then - mv -f ${pkg}".#part" ${pkg} - echo "Download ${pkg} successfully." - else - echo "Download ${pkg} failed." - RET=1 - fi - fi -done - -cd ${APP_TESTFILES_DIR} -for pkg in ${APP_TESTFILES_LIST}; do - if [ ! -f ${pkg} ] - then - #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER5}/${pkg} > /dev/null 2>&1 - ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER5}/${pkg} - if [ $? -eq 0 ] - then - mv -f ${pkg}".#part" ${pkg} - echo "Download ${pkg} successfully." - else - echo "Download ${pkg} failed." - RET=1 - fi - fi -done - -if [ ${RET} -ne 0 ] -then - echo "Download some packages failed. Please download them again." - exit 1 -fi - -# Step 2: Install the LSB Packages -echo "" -echo "Install LSB packages..." -echo "" - -# Kill lighttpd -ps aux | grep "lighttpd" | grep -v -q "grep" -if [ $? -eq 0 ] -then - killall lighttpd >/dev/null 2>&1 -fi - -# Start avahi-daemon -ps aux | grep "avahi-daemon" | grep -v -q "grep" -if [ $? -ne 0 ] -then - /etc/init.d/avahi-daemon start >/dev/null 2>&1 -fi - -LSB_START_CMD="/opt/lsb/test/manager/bin/dist-checker-start.pl" -LSB_STOP_CMD="/opt/lsb/test/manager/bin/dist-checker-stop.pl" - -PLATFORM_FILE="/etc/rpm/platform" - -RPM_INSTALL_CMD="rpm --quiet --nodeps --replacepkgs --nosignature -i" -RPM_INSTALL_CMD_NOSCRIPTS="rpm --quiet --nodeps --replacepkgs --noscripts --nosignature -i" - -# If the lsb has been started, stop it first. -if [ -x ${LSB_STOP_CMD} ] -then - ${LSB_STOP_CMD} -fi - -if [ ! -d /etc/rpm ] -then - mkdir -p /etc/rpm -fi - -if [ ! -f ${PLATFORM_FILE} ] -then - touch ${PLATFORM_FILE} -fi - -if ! `grep -F -q "noarch-suse" ${PLATFORM_FILE}`; then - if [ ${ARCH} = i686 ];then - echo "i486-suse" >> ${PLATFORM_FILE} - echo "i486-noarch" >> ${PLATFORM_FILE} - echo "i486-pc" >> ${PLATFORM_FILE} - echo "noarch-suse" >> ${PLATFORM_FILE} - elif [ ${ARCH} = x86_64 ]; then - echo "i486-suse" >> ${PLATFORM_FILE} - echo "i486-noarch" >> ${PLATFORM_FILE} - echo "i486-pc" >> ${PLATFORM_FILE} - echo "i486-.*-linux.*" >> ${PLATFORM_FILE} - echo "noarch-suse" >> ${PLATFORM_FILE} - echo "${ARCH}-suse" >> ${PLATFORM_FILE} - echo "${ARCH}-noarch" >> ${PLATFORM_FILE} - echo "${ARCH}-pc" >> ${PLATFORM_FILE} - else - echo "${ARCH}-suse" >> ${PLATFORM_FILE} - echo "${ARCH}-noarch" >> ${PLATFORM_FILE} - echo "${ARCH}-pc" >> ${PLATFORM_FILE} - echo "noarch-suse" >> ${PLATFORM_FILE} - fi -fi - -if [ -d ${BASE_PACKAGES_DIR} ] -then - cd ${BASE_PACKAGES_DIR} - for pkg in ${BASE_PACKAGES_LIST} - do - rpm --quiet -q ${pkg%\.*} - if [ $? -ne 0 ]; then - $RPM_INSTALL_CMD ${pkg} - fi - done -fi - -if [ -d ${RUNTIME_BASE_PACKAGES_DIR} ] -then - cd ${RUNTIME_BASE_PACKAGES_DIR} - for pkg in ${RUNTIME_BASE_PACKAGES_LIST} - do - rpm --quiet -q ${pkg%\.*} - if [ $? -ne 0 ]; then - $RPM_INSTALL_CMD ${pkg} - fi - done -fi - -if [ -d ${RUNTIME_PACKAGES_DIR} ] -then - cd ${RUNTIME_PACKAGES_DIR} - for pkg in ${RUNTIME_PACKAGES_LIST} - do - rpm --quiet -q ${pkg%\.*} - if [ $? -ne 0 ]; then - $RPM_INSTALL_CMD ${pkg} - fi - done -fi - -if [ -d ${APP_PACKAGES_DIR} ] -then - cd ${APP_PACKAGES_DIR} - for pkg in ${APP_PACKAGES_LIST} - do - echo "${pkg}" | grep -q "apache\|xpdf" - if [ $? -eq 0 ] - then - rpm --quiet -q ${pkg%\.*} - if [ $? -ne 0 ]; then - $RPM_INSTALL_CMD_NOSCRIPTS ${pkg} - fi - else - rpm --quiet -q ${pkg%\.*} - if [ $? -ne 0 ]; then - $RPM_INSTALL_CMD ${pkg} - fi - fi - done -fi - -if [ ! -d ${SNAPSHOTS_TESTFILES_DIR} ] -then - mkdir -p ${SNAPSHOTS_TESTFILES_DIR} -fi - -if [ -d ${APP_TESTFILES_DIR} ] -then - cd ${APP_TESTFILES_DIR} - for pkg in ${APP_TESTFILES_LIST} - do - cp -f ${pkg} ${SNAPSHOTS_TESTFILES_DIR} - done -fi - -cd ${WORK_DIR} - -# Step 3: Set environment -echo "" -echo "Set environment..." -echo "" - -check () -{ - if [ $? -eq 0 ] - then - echo "PASS" - else - echo "FAIL" - exit 1 - fi -} - -echo "" -echo "---------------------------------" -echo "Create the Dirnames on target" - -if [ ! -d /etc/rpm/sysinfo ] -then - mkdir -p /etc/rpm/sysinfo -fi - -cat > /etc/rpm/sysinfo/Dirnames << EOF -/etc/opt/lsb -/home/tet/LSB.tools -/opt/lsb-tet3-lite/lib/ksh -/opt/lsb-tet3-lite/lib/perl -/opt/lsb-tet3-lite/lib/posix_sh -/opt/lsb-tet3-lite/lib/tet3 -/opt/lsb-tet3-lite/lib/xpg3sh -/opt/lsb/appbat/lib/python2.4/site-packages/qm -/opt/lsb/appbat/lib/python2.4/site-packages/qm/external -/opt/lsb/appbat/lib/python2.4/site-packages/qm/external/DocumentTemplate -/opt/lsb/appbat/lib/python2.4/site-packages/qm/test -/opt/lsb/appbat/lib/python2.4/site-packages/qm/test/classes -/opt/lsb/appbat/lib/python2.4/site-packages/qm/test/web -/opt/lsb/test/doc -/opt/lsb/test/lib -/opt/lsb/test/qm/diagnostics -/opt/lsb/test/qm/doc -/opt/lsb/test/qm/doc/test/html -/opt/lsb/test/qm/doc/test/print -/opt/lsb/test/qm/dtml -/opt/lsb/test/qm/dtml/test -/opt/lsb/test/qm/messages/test -/opt/lsb/test/qm/tutorial/test/tdb -/opt/lsb/test/qm/tutorial/test/tdb/QMTest -/opt/lsb/test/qm/web -/opt/lsb/test/qm/web/images -/opt/lsb/test/qm/web/stylesheets -/opt/lsb/test/qm/xml -/opt/lsb/test/share -/usr/share/doc/lsb-runtime-test -/var/opt/lsb -/opt/lsb/test/desktop -/opt/lsb/test/desktop/fontconfig -/opt/lsb/test/desktop/freetype -/opt/lsb/test/desktop/gtkvts -/opt/lsb/test/desktop/libpng -/opt/lsb/test/desktop/qt3 -/opt/lsb/test/desktop/xft -/opt/lsb/test/desktop/xml -/opt/lsb/test/desktop/xrender - - -EOF - -if [ -f /etc/rpm/sysinfo/Dirnames ] -then - echo "Success to creat Dirnames file" -else - echo "Fail to creat Dirnames file" -fi - -[ -x /sbin/ldconfig ] && { -echo "" -echo "---------------------------------" -echo "Update cache" -/sbin/ldconfig -check; -} - -# Check loop device -if [ ! -b /dev/loop0 ] -then - insmod /lib/modules/`uname -r`/kernel/drivers/block/loop.ko - if [ $? != 0 ];then - echo "Insmod loop.ko failed." - fi -fi - -# Resolve localhost -LOCALHOST=`hostname` -if ! `grep -F -q "$LOCALHOST" /etc/hosts`; then - echo "127.0.0.1 $LOCALHOST" >> /etc/hosts -fi - -# Workaround to add part of locales for LSB test -localedef -i de_DE -f ISO-8859-1 de_DE -localedef -i de_DE -f ISO-8859-15 de_DE.ISO-8859-15 -localedef -i de_DE -f UTF-8 de_DE.UTF-8 -localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro -localedef -i en_HK -f ISO-8859-1 en_HK -localedef -i en_PH -f ISO-8859-1 en_PH -localedef -i en_US -f ISO-8859-15 en_US.ISO-8859-15 -localedef -i en_US -f ISO-8859-1 en_US.ISO-8859-1 -localedef -i en_US -f ISO-8859-1 en_US -localedef -i en_US -f UTF-8 en_US.UTF-8 -localedef -i en_US -f ISO-8859-1 en_US.ISO8859-1 -localedef -i es_MX -f ISO-8859-1 es_MX -localedef -i fr_FR -f ISO-8859-1 fr_FR -localedef -i it_IT -f ISO-8859-1 it_IT -localedef -i ja_JP -f EUC-JP ja_JP.eucjp -localedef -i se_NO -f UTF-8 se_NO.UTF-8 -localedef -i ta_IN -f UTF-8 ta_IN -localedef -i es_ES -f ISO-8859-1 es_ES -localedef -i fr_FR@euro -f ISO-8859-1 fr_FR@euro -localedef -i is_IS -f UTF-8 is_IS.UTF-8 -localedef -i zh_TW -f BIG5 zh_TW.BIG5 -localedef -i en_US -f ISO-8859-15 en_US.ISO-8859-15 - -echo "" -echo "Installation done!" -echo "" - -# Step 4: Start LSB test -if [ -x ${LSB_START_CMD} ] -then - ${LSB_START_CMD} -fi - -echo "---------------------------------" -echo "Run all the certification version of LSB Tests" -echo "---------------------------------" - -LSB_DIST_CHECKER="/opt/lsb/test/manager/utils/dist-checker.pl" -SESSION="${WORK_DIR}/session" -if [ ! -e ${SESSION} ] -then - echo "Error: Could not find session file." - echo "You must run LSB test from webbrower." - exit 1 -fi - -if [ -x ${LSB_DIST_CHECKER} ] -then - ${LSB_DIST_CHECKER} -v2 -f ${SESSION} - check -fi - -echo "" -echo "LSB test complete. Please check the log file in /var/opt/lsb/test/manager/results/" -echo "" - diff --git a/meta/recipes-extended/lsb/lsbtest/packages_list b/meta/recipes-extended/lsb/lsbtest/packages_list deleted file mode 100644 index 27d8352d9a..0000000000 --- a/meta/recipes-extended/lsb/lsbtest/packages_list +++ /dev/null @@ -1,50 +0,0 @@ -LSB_RELEASE="released-4.1.0" -LSB_ARCH="lsbarch" - -BASE_PACKAGES_LIST="lsb-setup-4.1.0-1.noarch.rpm" - -RUNTIME_BASE_PACKAGES_LIST="lsb-dist-checker-5.0.0.1-1.targetarch.rpm \ - lsb-tet3-lite-3.7-27.lsb5.targetarch.rpm \ - lsb-tet3-lite-devel-3.7-27.lsb5.targetarch.rpm \ - lsb-xvfb-1.2.0-22.targetarch.rpm \ - " - -RUNTIME_PACKAGES_LIST="lsb-cmdchk-4.1.4-5.targetarch.rpm \ - lsb-libchk-4.1.4-5.targetarch.rpm \ - lsb-qm-2.2-12.lsb4.targetarch.rpm \ - lsb-task-dist-testkit-4.1.9-1.noarch.rpm \ - lsb-test-core-4.1.15-1.targetarch.rpm \ - lsb-test-cpp-t2c-4.1.0-1.targetarch.rpm \ - lsb-test-desktop-4.1.9-1.targetarch.rpm \ - lsb-test-desktop-t2c-4.1.3-3.targetarch.rpm \ - lsb-test-libstdcpp-4.1.0-18.lsb4.targetarch.rpm \ - lsb-test-olver-core-4.1.4-1.targetarch.rpm \ - lsb-test-perl-4.1.8-1.noarch.rpm \ - lsb-test-printing-4.1.2-1.targetarch.rpm \ - lsb-test-python-4.1.5-1.targetarch.rpm \ - lsb-test-qt3-azov-4.1.1-3.targetarch.rpm \ - lsb-test-qt4-azov-4.1.3-1.targetarch.rpm \ - lsb-test-xts5-5.1.5-45.lsb4.targetarch.rpm \ - lsb-test-alsa-t2c-4.1.0-1.targetarch.rpm \ - lsb-test-core-t2c-4.1.2-3.targetarch.rpm \ - lsb-test-xml2-azov-4.1.0-1.targetarch.rpm \ - " - -APP_PACKAGES_LIST="lsb-python-2.4.6-7.lsb4.targetarch.rpm \ - lsb-apache-2.2.14-8.lsb4.targetarch.rpm \ - lsb-tcl-8.5.7-8.lsb4.targetarch.rpm \ - lsb-expect-5.43.0-13.lsb4.targetarch.rpm \ - lsb-groff-1.20.1-7.lsb4.targetarch.rpm \ - lsb-raptor-1.4.19-5.lsb4.targetarch.rpm \ - lsb-xpdf-1.01-14.lsb4.targetarch.rpm \ - lsb-samba-3.4.3-9.lsb4.targetarch.rpm \ - lsb-rsync-3.0.6-6.lsb4.targetarch.rpm \ - " - -APP_TESTFILES_LIST="expect-tests.tar \ - tcl-tests.tar \ - raptor-tests.tar \ - test1.pdf \ - test2.pdf \ - " - diff --git a/meta/recipes-extended/lsb/lsbtest/session b/meta/recipes-extended/lsb/lsbtest/session deleted file mode 100644 index 85ca2efe92..0000000000 --- a/meta/recipes-extended/lsb/lsbtest/session +++ /dev/null @@ -1,194 +0,0 @@ -[GENERAL] -VERBOSE_LEVEL: 1 -ARCHITECTURE: targetarch -USE_INTERNET: 1 -STD_VERSION: LSB 4.1 -STD_PROFILE: no -[cmdchk] -RUN: 1 -VERSION: local|* - -[libchk] -RUN: 1 -VERSION: local|* - -[alsa-t2c] -RUN: 1 -VERSION: local|* - -[alsa-t2c|local|*] -AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/alsa-t2c -AUTOREPLY_RESULTS_DIR: /opt/lsb/test/alsa-t2c/results - -[core] -RUN: 1 -VERSION: local|* - -[core|local|*] -AUTOREPLY_PROVIDES_BASH: n -AUTOREPLY_TESTRUN_PATH: /home/tet/test_sets -AUTOREPLY_PERSON: Automated -AUTOREPLY_KERNEL_NAME: vmlinuz -AUTOREPLY_INSTALL_LSBPAM_CONF: y -AUTOREPLY_PROVIDES_C_SHELL: n -AUTOREPLY_ORGANISATION: N/A -AUTOREPLY_SET_PASS_MIN_DAYS: y -AUTOREPLY_PROVIDES_SYSV_INIT: -AUTOREPLY_ISNTALL_DEVS: y -AUTOREPLY_SUPPORTS_FILE_CMD: y -AUTOREPLY_TEST_SYSTEM: Distribution Checker -AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/core/tet/test_sets -AUTOREPLY_SUPPORTS_NLS: n -AUTOREPLY_SUPPORTS_PROCESS_ACCOUNTING: n -AUTOREPLY_PATH_TO_RC.D: -AUTOREPLY_ALLOWS_MAKEDEV: n -AUTOREPLY_RESULTS_DIR: /opt/lsb/test/core/tet/test_sets/results - -[core-t2c] -RUN: 1 -VERSION: local|* - -[core-t2c|local|*] -AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/core-t2c -AUTOREPLY_RESULTS_DIR: /opt/lsb/test/core-t2c/results - -[cpp-t2c] -RUN: 1 -VERSION: local|* - -[cpp-t2c|local|*] -AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/cpp-t2c -AUTOREPLY_RESULTS_DIR: /opt/lsb/test/cpp-t2c/results - -[desktop] -RUN: 1 -VERSION: local|* - -[desktop|local|*] -AUTOREPLY_DESKTOP_ENVIRONMENT: [default] -AUTOREPLY_PERSON: Automated -AUTOREPLY_X_CLIENT_HOSTNAME: -AUTOREPLY_TEST_SYSTEM: Distribution Checker -AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/desktop -AUTOREPLY_X11_FONT_PATH: [default] -AUTOREPLY_SHOW_SUMMARY_REPORT: -AUTOREPLY_ORGANISATION: N/A -AUTOREPLY_XVFB_DISPLAY: [default] - -[desktop-t2c] -RUN: 1 -VERSION: local|* - -[desktop-t2c|local|*] -AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/desktop-t2c -AUTOREPLY_RESULTS_DIR: /opt/lsb/test/desktop-t2c/results - -[libstdcpp] -RUN: 1 -VERSION: local|* - -[libstdcpp|local|*] -AUTOREPLY_TEST_SYSTEM: Distribution Checker -AUTOREPLY_PERSON: Automated -AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/libstdcpp_4.1.0 -AUTOREPLY_ORGANISATION: N/A -AUTOREPLY_GNU_TRIPLET: - -[olver] -RUN: 1 -VERSION: local|* - -[olver|local|*] -AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/olver-core -AUTOREPLY_RESULTS_DIR: /var/opt/lsb/test/olver-core - -[perl] -RUN: 1 -VERSION: local|* - -[perl|local|*] -AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/perl -AUTOREPLY_RESULTS_DIR: /opt/lsb/test/perl/results - -[printing] -RUN: 1 -VERSION: local|* - -[printing|local|*] -AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/printing -AUTOREPLY_RESULTS_DIR: /opt/lsb/test/printing/results - -[python] -RUN: 1 -VERSION: local|* - -[python|local|*] -AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/python -AUTOREPLY_RESULTS_DIR: /opt/lsb/test/python/results - -[qt3-azov] -RUN: 1 -VERSION: local|* - -[qt3-azov|local|*] -AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/qt3-azov -AUTOREPLY_X11_FONT_PATH: [default] -AUTOREPLY_RESULTS_DIR: /opt/lsb/test/qt3-azov/results - -[qt4-azov] -RUN: 1 -VERSION: local|* - -[qt4-azov|local|*] -AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/qt4-azov -AUTOREPLY_X11_FONT_PATH: [default] -AUTOREPLY_RESULTS_DIR: /opt/lsb/test/qt4-azov/results - -[xml2-azov] -RUN: 1 -VERSION: local|* - -[xts5] -RUN: 1 -VERSION: local|* - -[xts5|local|*] -AUTOREPLY_XT_FONTPATH_GOOD: [default] -AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/xts5 -AUTOREPLY_XVFB_DISPLAY: [default] -AUTOREPLY_RESULTS_DIR: /opt/lsb/test/xts5/xts5/results -AUTOREPLY_XT_FONTPATH: [default] -AUTOREPLY_X_CLIENT_HOSTNAME: - -[apache] -RUN: 1 -VERSION: local|* - -[expect] -RUN: 1 -VERSION: local|* - -[groff] -RUN: 1 -VERSION: local|* - -[raptor] -RUN: 1 -VERSION: local|* - -[rsync] -RUN: 1 -VERSION: local|* - -[samba] -RUN: 1 -VERSION: local|* - -[tcl] -RUN: 1 -VERSION: local|* - -[xpdf] -RUN: 1 -VERSION: local|* - diff --git a/meta/recipes-extended/lsb/lsbtest_1.0.bb b/meta/recipes-extended/lsb/lsbtest_1.0.bb deleted file mode 100644 index ea12502dc8..0000000000 --- a/meta/recipes-extended/lsb/lsbtest_1.0.bb +++ /dev/null @@ -1,49 +0,0 @@ -SUMMARY = "Automates Linux Standard Base (LSB) tests" -SECTION = "console/utils" -LICENSE = "GPLv2" -PR = "r3" - -LIC_FILES_CHKSUM = "file://LSB_Test.sh;beginline=3;endline=16;md5=7063bb54b04719df0716b513447f4fc0" - -SRC_URI = "file://LSB_Test.sh \ - file://packages_list \ - file://session \ - " -RDEPENDS_${PN} = "rpm" - -S = "${WORKDIR}" - -do_install() { - install -d ${D}${bindir} - install -m 0755 ${S}/LSB_Test.sh ${D}${bindir} - install -d ${D}/opt/lsb-test - install -m 0644 ${S}/packages_list ${D}/opt/lsb-test/packages_list - install -m 0644 ${S}/session ${D}/opt/lsb-test/session - if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ];then - sed -i -e 's/lsbarch/ia32/g' -e 's/targetarch/i486/g' ${D}/opt/lsb-test/packages_list - sed -i -e 's/targetarch/x86/g' ${D}/opt/lsb-test/session - fi - if [ "${TARGET_ARCH}" = "x86_64" ];then - sed -i -e 's/lsbarch/amd64/g' -e 's/targetarch/x86_64/g' ${D}/opt/lsb-test/packages_list - sed -i -e 's/targetarch/x86-64/g' ${D}/opt/lsb-test/session - fi - if [ "${TARGET_ARCH}" = "powerpc" ];then - sed -i -e 's/lsbarch/ppc32/g' -e 's/targetarch/ppc/g' ${D}/opt/lsb-test/packages_list - sed -i -e 's/targetarch/PPC32/g' ${D}/opt/lsb-test/session - fi - - # For a ppc64 target. the default userspace is 32b. - # Therefore, only change the lsbarch and targetarch - # in the package_list when MLIB=lib64 is being used. - # Otherwise, by default, the ppc32 LSB packages - # will be downloaded by LSB_Test.sh - if [ "${TARGET_ARCH}" = "powerpc64" ];then - if [ "${PN}" != "${BPN}" ];then - sed -i -e 's/lsbarch/ppc64/g' -e 's/targetarch/ppc64/g' ${D}/opt/lsb-test/packages_list - sed -i -e 's/targetarch/PPC64/g' ${D}/opt/lsb-test/session - fi - fi -} - -FILES_${PN} += "/opt/lsb-test/* \ - " diff --git a/meta/recipes-extended/lsof/files/lsof-remove-host-information.patch b/meta/recipes-extended/lsof/files/lsof-remove-host-information.patch new file mode 100644 index 0000000000..b7d2323dc9 --- /dev/null +++ b/meta/recipes-extended/lsof/files/lsof-remove-host-information.patch @@ -0,0 +1,76 @@ +Remove host information from version.h + +make lsof not include host information + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Li Wang <li.wang@windriver.com> +--- + dialects/linux/Makefile | 50 +++++++++-------------------------------------- + 1 file changed, 9 insertions(+), 41 deletions(-) + +diff --git a/dialects/linux/Makefile b/dialects/linux/Makefile +index 2bea108..792142b 100644 +--- a/dialects/linux/Makefile ++++ b/dialects/linux/Makefile +@@ -76,48 +76,16 @@ version.h: FRC + @echo Constructing version.h + @rm -f version.h + @echo '#define LSOF_BLDCMT "${LSOF_BLDCMT}"' > version.h; +- @echo '#define LSOF_CC "${CC}"' >> version.h +- @echo '#define LSOF_CCV "${CCV}"' >> version.h +- @echo '#define LSOF_CCDATE "'`date`'"' >> version.h +- @echo '#define LSOF_CCFLAGS "'`echo ${CFLAGS} | sed 's/\\\\(/\\(/g' | sed 's/\\\\)/\\)/g' | sed 's/"/\\\\"/g'`'"' >> version.h ++ @echo '#define LSOF_CC ""' >> version.h ++ @echo '#define LSOF_CCV ""' >> version.h ++ @echo '#define LSOF_CCDATE ""' >> version.h ++ @echo '#define LSOF_CCFLAGS ""' >> version.h + @echo '#define LSOF_CINFO "${CINFO}"' >> version.h +- @if [ "X${LSOF_HOST}" = "X" ]; then \ +- echo '#define LSOF_HOST "'`uname -n`'"' >> version.h; \ +- else \ +- if [ "${LSOF_HOST}" = "none" ]; then \ +- echo '#define LSOF_HOST ""' >> version.h; \ +- else \ +- echo '#define LSOF_HOST "${LSOF_HOST}"' >> version.h; \ +- fi \ +- fi +- @echo '#define LSOF_LDFLAGS "${CFGL}"' >> version.h +- @if [ "X${LSOF_LOGNAME}" = "X" ]; then \ +- echo '#define LSOF_LOGNAME "${LOGNAME}"' >> version.h; \ +- else \ +- if [ "${LSOF_LOGNAME}" = "none" ]; then \ +- echo '#define LSOF_LOGNAME ""' >> version.h; \ +- else \ +- echo '#define LSOF_LOGNAME "${LSOF_LOGNAME}"' >> version.h; \ +- fi; \ +- fi +- @if [ "X${LSOF_SYSINFO}" = "X" ]; then \ +- echo '#define LSOF_SYSINFO "'`uname -a`'"' >> version.h; \ +- else \ +- if [ "${LSOF_SYSINFO}" = "none" ]; then \ +- echo '#define LSOF_SYSINFO ""' >> version.h; \ +- else \ +- echo '#define LSOF_SYSINFO "${LSOF_SYSINFO}"' >> version.h; \ +- fi \ +- fi +- @if [ "X${LSOF_USER}" = "X" ]; then \ +- echo '#define LSOF_USER "${USER}"' >> version.h; \ +- else \ +- if [ "${LSOF_USER}" = "none" ]; then \ +- echo '#define LSOF_USER ""' >> version.h; \ +- else \ +- echo '#define LSOF_USER "${LSOF_USER}"' >> version.h; \ +- fi \ +- fi ++ @echo '#define LSOF_HOST ""' >> version.h; ++ @echo '#define LSOF_LDFLAGS ""' >> version.h ++ @echo '#define LSOF_LOGNAME ""' >> version.h; ++ @echo '#define LSOF_SYSINFO ""' >> version.h; ++ @echo '#define LSOF_USER ""' >> version.h; + @sed '/VN/s/.ds VN \(.*\)/#define LSOF_VERSION "\1"/' < version >> version.h + + FRC: +-- +1.7.9.5 + diff --git a/meta/recipes-extended/lsof/lsof_4.88.bb b/meta/recipes-extended/lsof/lsof_4.88.bb deleted file mode 100644 index c0f34b6fed..0000000000 --- a/meta/recipes-extended/lsof/lsof_4.88.bb +++ /dev/null @@ -1,57 +0,0 @@ -SUMMARY = "LiSt Open Files tool" -DESCRIPTION = "Lsof is a Unix-specific diagnostic tool. \ -Its name stands for LiSt Open Files, and it does just that." -SECTION = "devel" -LICENSE = "BSD" - -SRC_URI = "ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PV}.tar.bz2" - -SRC_URI[md5sum] = "1b29c10db4aa88afcaeeaabeef6790db" -SRC_URI[sha256sum] = "fe6f9b0e26b779ccd0ea5a0b6327c2b5c38d207a6db16f61ac01bd6c44e5c99b" - -LOCALSRC = "file://${WORKDIR}/lsof_${PV}/lsof_${PV}_src.tar" -S = "${WORKDIR}/lsof_${PV}_src" - -LIC_FILES_CHKSUM = "file://${S}/00README;beginline=645;endline=679;md5=964df275d26429ba3b39dbb9f205172a" - -python do_unpack () { - # temporarily change S for unpack - # of lsof_${PV} - s = d.getVar('S', False) - d.setVar('S', '${WORKDIR}/lsof_${PV}') - bb.build.exec_func('base_do_unpack', d) - # temporarily change SRC_URI for unpack - # of lsof_${PV}_src - src_uri = d.getVar('SRC_URI', False) - d.setVar('SRC_URI', '${LOCALSRC}') - d.setVar('S', s) - bb.build.exec_func('base_do_unpack', d) - d.setVar('SRC_URI', src_uri) -} - -export LSOF_INCLUDE = "${STAGING_INCDIR}" - -do_configure () { - export LSOF_AR="${AR} cr" - export LSOF_RANLIB="${RANLIB}" - if [ "x${GLIBCVERSION}" != "x" ];then - LINUX_CLIB=`echo ${GLIBCVERSION} |sed -e 's,\.,,g'` - LINUX_CLIB="-DGLIBCV=${LINUX_CLIB}" - export LINUX_CLIB - fi - yes | ./Configure linux -} - -export I = "${STAGING_INCDIR}" -export L = "${STAGING_INCDIR}" -export EXTRA_OEMAKE = "" - -do_compile () { - oe_runmake 'CC=${CC}' 'CFGL=${LDFLAGS} -L./lib -llsof' 'DEBUG=' 'INCL=${CFLAGS}' -} - -do_install () { - install -d ${D}${sbindir} ${D}${mandir}/man8 - install -m 4755 lsof ${D}${sbindir}/lsof - install -m 0644 lsof.8 ${D}${mandir}/man8/lsof.8 -} diff --git a/meta/recipes-extended/lsof/lsof_4.91.bb b/meta/recipes-extended/lsof/lsof_4.91.bb new file mode 100644 index 0000000000..b3adfd57af --- /dev/null +++ b/meta/recipes-extended/lsof/lsof_4.91.bb @@ -0,0 +1,63 @@ +SUMMARY = "LiSt Open Files tool" +DESCRIPTION = "Lsof is a Unix-specific diagnostic tool. \ +Its name stands for LiSt Open Files, and it does just that." +HOMEPAGE = "http://people.freebsd.org/~abe/" +SECTION = "devel" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://00README;beginline=645;endline=679;md5=964df275d26429ba3b39dbb9f205172a" + +# Upstream lsof releases are hosted on an ftp server which times out download +# attempts from hosts for which it can not perform a DNS reverse-lookup (See: +# https://people.freebsd.org/~abe/ ). http://www.mirrorservice.org seems to be +# the most commonly used alternative. + +SRC_URI = "http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PV}.tar.bz2 \ + file://lsof-remove-host-information.patch \ + " + +SRC_URI[md5sum] = "148ed410cb52e08c2adc0c60f480f11f" +SRC_URI[sha256sum] = "c9da946a525fbf82ff80090b6d1879c38df090556f3fe0e6d782cb44172450a3" + +LOCALSRC = "file://${WORKDIR}/lsof_${PV}/lsof_${PV}_src.tar" + +S = "${WORKDIR}/lsof_${PV}_src" + +python do_unpack () { + if not bb.data.inherits_class('externalsrc', d) or not d.getVar('EXTERNALSRC'): + # temporarily change S for unpack of lsof_${PV} + s = d.getVar('S', False) + d.setVar('S', '${WORKDIR}/lsof_${PV}') + bb.build.exec_func('base_do_unpack', d) + # temporarily change SRC_URI for unpack of lsof_${PV}_src + src_uri = d.getVar('SRC_URI', False) + d.setVar('SRC_URI', '${LOCALSRC}') + d.setVar('S', s) + bb.build.exec_func('base_do_unpack', d) + d.setVar('SRC_URI', src_uri) +} + +export LSOF_INCLUDE = "${STAGING_INCDIR}" + +do_configure () { + export LSOF_AR="${AR} cr" + export LSOF_RANLIB="${RANLIB}" + if [ "x${GLIBCVERSION}" != "x" ]; then + LINUX_CLIB=`echo ${GLIBCVERSION} |sed -e 's,\.,,g'` + LINUX_CLIB="-DGLIBCV=${LINUX_CLIB}" + export LINUX_CLIB + fi + yes | ./Configure linux +} + +export I = "${STAGING_INCDIR}" +export L = "${STAGING_INCDIR}" + +do_compile () { + oe_runmake 'CC=${CC}' 'CFGL=${LDFLAGS} -L./lib -llsof' 'DEBUG=' 'INCL=${CFLAGS}' +} + +do_install () { + install -d ${D}${sbindir} ${D}${mandir}/man8 + install -m 0755 lsof ${D}${sbindir}/lsof + install -m 0644 lsof.8 ${D}${mandir}/man8/lsof.8 +} diff --git a/meta/recipes-extended/ltp/ltp/0001-Add-more-musl-exclusions.patch b/meta/recipes-extended/ltp/ltp/0001-Add-more-musl-exclusions.patch new file mode 100644 index 0000000000..f2fc8ee958 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0001-Add-more-musl-exclusions.patch @@ -0,0 +1,32 @@ +From ad8e73306cb8293f7d32841e1599fd9048801f1f Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Fri, 20 Dec 2019 13:06:05 +0100 +Subject: [PATCH] Add more musl exclusions + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +[ pvorel: rebase for 20200515: enable accept4_01 ] +[ pvorel: rebase for 20200120: enable fanotify13, fanotify15, setxattr03 ] +Signed-off-by: Petr Vorel <petr.vorel@gmail.com> +--- + testcases/kernel/syscalls/timer_create/Makefile | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/testcases/kernel/syscalls/timer_create/Makefile b/testcases/kernel/syscalls/timer_create/Makefile +index ada241fe1..d454b01e7 100644 +--- a/testcases/kernel/syscalls/timer_create/Makefile ++++ b/testcases/kernel/syscalls/timer_create/Makefile +@@ -5,6 +5,10 @@ top_srcdir ?= ../../../.. + + include $(top_srcdir)/include/mk/testcases.mk + ++ifeq ($(LIBC),musl) ++FILTER_OUT_MAKE_TARGETS := timer_create01 timer_create03 ++endif ++ + CPPFLAGS += -D_GNU_SOURCE -I$(abs_srcdir)/../include + + LDLIBS += -lpthread -lrt +-- +2.26.2 + diff --git a/meta/recipes-extended/ltp/ltp/0001-Remove-OOM-tests-from-runtest-mm.patch b/meta/recipes-extended/ltp/ltp/0001-Remove-OOM-tests-from-runtest-mm.patch new file mode 100644 index 0000000000..6b665030c3 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0001-Remove-OOM-tests-from-runtest-mm.patch @@ -0,0 +1,34 @@ +From 13ef88cdccfe3f58c53d57806866b91e310eb272 Mon Sep 17 00:00:00 2001 +From: "Mingde (Matthew) Zeng" <matthewzmd@gmail.com> +Date: Wed, 29 Jul 2020 08:47:09 -0400 +Subject: [PATCH] Remove OOM tests from runtest/mm + +Disable OOM tests, as they might cause oeqa ssh connection lost + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Mingde (Matthew) Zeng <matthew.zeng@windriver.com> + +--- + runtest/mm | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/runtest/mm b/runtest/mm +index a09f39c1e..76fa82754 100644 +--- a/runtest/mm ++++ b/runtest/mm +@@ -73,12 +73,6 @@ ksm06 ksm06 + ksm06_1 ksm06 -n 10 + ksm06_2 ksm06 -n 10000 + +-oom01 oom01 +-oom02 oom02 +-oom03 oom03 +-oom04 oom04 +-oom05 oom05 +- + swapping01 swapping01 -i 5 + + thp01 thp01 -I 120 +-- +2.27.0 + diff --git a/meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch b/meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch deleted file mode 100644 index 1b4d2324a5..0000000000 --- a/meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch +++ /dev/null @@ -1,202 +0,0 @@ -From 9751a6526cffcdf4e3dc2cb33641259a7be00e19 Mon Sep 17 00:00:00 2001 -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Sat, 7 Dec 2013 18:24:32 +0100 -Subject: [PATCH] Rename runtests_noltp.sh script so have unique name - -* they are installed in the same target path - /opt/ltp/testcases/bin/runtests_noltp.sh - and overwrite each other in non-deterministic way - when multiple processes are used in "make install" - - ./temp/log.do_install:install -m 00775 - "ltp/20120903-r2/ltp-20120903/testcases/kernel/containers/sysvipc/runtests_noltp.sh" - "ltp/20120903-r2/image/opt/ltp/testcases/bin/runtests_noltp.sh" - ./temp/log.do_install:install -m 00775 - "ltp/20120903-r2/ltp-20120903/testcases/kernel/containers/utsname/runtests_noltp.sh" - "ltp/20120903-r2/image/opt/ltp/testcases/bin/runtests_noltp.sh" - -Upstream-Status: Pending - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - .../kernel/containers/sysvipc/runipctests_noltp.sh | 31 ++++++++++++++++ - .../kernel/containers/sysvipc/runtests_noltp.sh | 31 ---------------- - .../kernel/containers/utsname/runtests_noltp.sh | 41 ---------------------- - .../kernel/containers/utsname/runutstests_noltp.sh | 41 ++++++++++++++++++++++ - 4 files changed, 72 insertions(+), 72 deletions(-) - create mode 100644 testcases/kernel/containers/sysvipc/runipctests_noltp.sh - delete mode 100644 testcases/kernel/containers/sysvipc/runtests_noltp.sh - delete mode 100755 testcases/kernel/containers/utsname/runtests_noltp.sh - create mode 100755 testcases/kernel/containers/utsname/runutstests_noltp.sh - -diff --git a/testcases/kernel/containers/sysvipc/runipctests_noltp.sh b/testcases/kernel/containers/sysvipc/runipctests_noltp.sh -new file mode 100644 -index 0000000..84f398f ---- /dev/null -+++ b/testcases/kernel/containers/sysvipc/runipctests_noltp.sh -@@ -0,0 +1,31 @@ -+#!/bin/sh -+################################################################################ -+## ## -+## Copyright (c) International Business Machines Corp., 2007 ## -+## ## -+## 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 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, write to the Free Software ## -+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ## -+## ## -+################################################################################ -+ -+exit_code=0 -+echo "sysvipc tests" -+for type in none clone unshare; do -+ echo "**sysvipc $type" -+ ./shmnstest_noltp $type -+ if [ $? -ne 0 ]; then -+ exit_code=$? -+ fi -+done -+exit $exit_code -diff --git a/testcases/kernel/containers/sysvipc/runtests_noltp.sh b/testcases/kernel/containers/sysvipc/runtests_noltp.sh -deleted file mode 100644 -index 84f398f..0000000 ---- a/testcases/kernel/containers/sysvipc/runtests_noltp.sh -+++ /dev/null -@@ -1,31 +0,0 @@ --#!/bin/sh --################################################################################ --## ## --## Copyright (c) International Business Machines Corp., 2007 ## --## ## --## 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 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, write to the Free Software ## --## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ## --## ## --################################################################################ -- --exit_code=0 --echo "sysvipc tests" --for type in none clone unshare; do -- echo "**sysvipc $type" -- ./shmnstest_noltp $type -- if [ $? -ne 0 ]; then -- exit_code=$? -- fi --done --exit $exit_code -diff --git a/testcases/kernel/containers/utsname/runtests_noltp.sh b/testcases/kernel/containers/utsname/runtests_noltp.sh -deleted file mode 100755 -index 43cb7e2..0000000 ---- a/testcases/kernel/containers/utsname/runtests_noltp.sh -+++ /dev/null -@@ -1,41 +0,0 @@ --#!/bin/sh --################################################################################ --## ## --## Copyright (c) International Business Machines Corp., 2007 ## --## ## --## 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 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, write to the Free Software ## --## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ## --## ## --################################################################################ -- --oldhostname=`hostname` --exit_code=0 --echo "unshare tests" --for i in `seq 1 5`; do -- echo "test $i (unshare)" -- ./utstest_noltp unshare $i -- if [ $? -ne 0 ]; then -- exit_code=$? -- fi --done --echo "clone tests" --for i in `seq 1 5`; do -- echo "test $i (clone)" -- ./utstest_noltp clone $i -- if [ $? -ne 0 ]; then -- exit_code=$? -- fi --done --hostname "$oldhostname" --exit $exit_code -diff --git a/testcases/kernel/containers/utsname/runutstests_noltp.sh b/testcases/kernel/containers/utsname/runutstests_noltp.sh -new file mode 100755 -index 0000000..43cb7e2 ---- /dev/null -+++ b/testcases/kernel/containers/utsname/runutstests_noltp.sh -@@ -0,0 +1,41 @@ -+#!/bin/sh -+################################################################################ -+## ## -+## Copyright (c) International Business Machines Corp., 2007 ## -+## ## -+## 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 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, write to the Free Software ## -+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ## -+## ## -+################################################################################ -+ -+oldhostname=`hostname` -+exit_code=0 -+echo "unshare tests" -+for i in `seq 1 5`; do -+ echo "test $i (unshare)" -+ ./utstest_noltp unshare $i -+ if [ $? -ne 0 ]; then -+ exit_code=$? -+ fi -+done -+echo "clone tests" -+for i in `seq 1 5`; do -+ echo "test $i (clone)" -+ ./utstest_noltp clone $i -+ if [ $? -ne 0 ]; then -+ exit_code=$? -+ fi -+done -+hostname "$oldhostname" -+exit $exit_code --- -1.8.4.3 - diff --git a/meta/recipes-extended/ltp/ltp/0001-build-Add-option-to-select-libc-implementation.patch b/meta/recipes-extended/ltp/ltp/0001-build-Add-option-to-select-libc-implementation.patch new file mode 100644 index 0000000000..29b2bf7e41 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0001-build-Add-option-to-select-libc-implementation.patch @@ -0,0 +1,81 @@ +From 74958c3e341de713b596c8cfd35b2391d6c7bc09 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 7 Jan 2016 18:19:03 +0000 +Subject: [PATCH] build: Add option to select libc implementation + +There are more than glibc for C library implementation available on +linux now a days, uclibc cloaked like glibc but musl e.g. is very +different and does not implement all GNU extensions. + +Disable tests specifically not building _yet_ on musl based systems + +Upstream-Status: Pending (pvorel: this is not going to be fixed, instead +each test needs to be fixed) + +rt_tgsigqueueinfo fails with: +rt_tgsigqueueinfo01.c: In function 'sigusr1_handler': +rt_tgsigqueueinfo01.c:42:22: error: 'siginfo_t' {aka 'struct <anonymous>'} has no member named '_sifields'; did you mean '__si_fields'? + 42 | sigval_rcv = uinfo->_sifields._rt.SI_SIGVAL.sival_ptr; + | ^~~~~~~~~ + | __si_fields + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +[ pvorel: rebase for 20200515: enable pty, ioctl ] +[ pvorel: rebase for 20200120: enable mallopt, profil, rpc016, +rt_sigsuspend, sbrk_mutex, setdomainname, sethostname, sigsuspend, +testpi-3, testpi-5, testpi-6, ustat; move rt_tgsigqueueinfo +from 0006-rt_tgsigqueueinfo-disable-test-on-musl.patch ] +Signed-off-by: Petr Vorel <petr.vorel@gmail.com> +--- + Makefile | 5 +++++ + testcases/kernel/sched/Makefile | 4 +++- + testcases/kernel/syscalls/Makefile | 4 ++++ + 3 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 768ca4606..e9d679a71 100644 +--- a/Makefile ++++ b/Makefile +@@ -41,6 +41,11 @@ vpath %.mk $(top_srcdir)/mk:$(top_srcdir)/mk/include + UCLINUX ?= 0 + export UCLINUX + ++# System C library implementation (glibc,uclibc,musl etc.) ++# default to glibc if not set ++LIBC ?= glibc ++export LIBC ++ + # CLEAN_TARGETS: Targets which exist solely in clean. + # COMMON_TARGETS: Targets which exist in all, clean, and install. + # INSTALL_TARGETS: Targets which exist in clean and install (contains +diff --git a/testcases/kernel/sched/Makefile b/testcases/kernel/sched/Makefile +index 6a57d79ee..74bb93370 100644 +--- a/testcases/kernel/sched/Makefile ++++ b/testcases/kernel/sched/Makefile +@@ -23,5 +23,7 @@ + top_srcdir ?= ../../.. + + include $(top_srcdir)/include/mk/env_pre.mk +- ++ifeq ($(LIBC),musl) ++ FILTER_OUT_DIRS += process_stress ++endif + include $(top_srcdir)/include/mk/generic_trunk_target.mk +diff --git a/testcases/kernel/syscalls/Makefile b/testcases/kernel/syscalls/Makefile +index c6dc8d9e7..aa50761ea 100644 +--- a/testcases/kernel/syscalls/Makefile ++++ b/testcases/kernel/syscalls/Makefile +@@ -15,6 +15,10 @@ FILTER_OUT_DIRS += capget capset chmod chown clone fork getcontext llseek \ + mincore mprotect nftw profil remap_file_pages sbrk + endif + ++ifeq ($(LIBC),musl) ++FILTER_OUT_DIRS += confstr fmtmsg getcontext rt_tgsigqueueinfo ++endif ++ + ifeq ($(UCLIBC),1) + FILTER_OUT_DIRS += profil + endif +-- +2.26.2 + diff --git a/meta/recipes-extended/ltp/ltp/0001-ltp-vma03-fix-the-alginment-of-page-size.patch b/meta/recipes-extended/ltp/ltp/0001-ltp-vma03-fix-the-alginment-of-page-size.patch deleted file mode 100644 index 905eafb991..0000000000 --- a/meta/recipes-extended/ltp/ltp/0001-ltp-vma03-fix-the-alginment-of-page-size.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 243881d71d2d49027c3dc15fe27ebe7f4ee68700 Mon Sep 17 00:00:00 2001 -From: Chuang Dong <Chuang.Dong@windriver.com> -Date: Wed, 10 Jun 2015 09:51:09 +0800 -Subject: [PATCH] ltp: vma03 fix the alginment of page size - -the offset the param of mmap2() doesn't align the page size, but, -this param allow must be a multiple of the page size as returned -by sysconf(_SC_PAGE_SIZE).meanwhile offset * 4096 must be a -multiple of the system page size, so modify the input param of offset -pgoff = (ULONG_MAX - 1)&(~((pgsz-1)>>12)); - -Upstream-Status: Submitted - -Signed-off-by: Chuang Dong <Chuang.Dong@windriver.com> ---- - testcases/kernel/mem/vma/vma03.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/testcases/kernel/mem/vma/vma03.c b/testcases/kernel/mem/vma/vma03.c -index 6af9960..b86d7ce 100644 ---- a/testcases/kernel/mem/vma/vma03.c -+++ b/testcases/kernel/mem/vma/vma03.c -@@ -89,7 +89,7 @@ int main(int argc, char *argv[]) - if (fd == -1) - tst_brkm(TBROK | TERRNO, NULL, "open %s", TESTFILE); - -- pgoff = ULONG_MAX - 1; -+ pgoff = (ULONG_MAX - 1)&(~((pgsz-1)>>12)); - map = mmap2(NULL, pgsz, PROT_READ | PROT_WRITE, MAP_PRIVATE, - fd, pgoff); - if (map == MAP_FAILED) --- -1.8.5.2.233.g932f7e4 - diff --git a/meta/recipes-extended/ltp/ltp/0001-ptrace01-Fix-missing-format-string.patch b/meta/recipes-extended/ltp/ltp/0001-ptrace01-Fix-missing-format-string.patch new file mode 100644 index 0000000000..27b890e22b --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0001-ptrace01-Fix-missing-format-string.patch @@ -0,0 +1,33 @@ +From adb9587466a493fdd9d4410f1b8b130ebca06daa Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 19 May 2020 22:21:23 -0700 +Subject: [PATCH] ptrace01: Fix missing format string + +Fixes +| ptrace01.c:89:2: error: format string is not a string literal +(potentially insecure) [-Werror,-Wformat-security] +| tst_res(TINFO, tc->message); +| ^ ~~~~~~~~~~~ + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Backport [58424835952641f4fd60c0ae3ab6c64decca3f8a] +--- + testcases/kernel/syscalls/ptrace/ptrace01.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/testcases/kernel/syscalls/ptrace/ptrace01.c b/testcases/kernel/syscalls/ptrace/ptrace01.c +index 87a99e4150..9071bbabaf 100644 +--- a/testcases/kernel/syscalls/ptrace/ptrace01.c ++++ b/testcases/kernel/syscalls/ptrace/ptrace01.c +@@ -86,7 +86,7 @@ static void run(unsigned int i) + + got_signal = 0; + +- tst_res(TINFO, tc->message); ++ tst_res(TINFO, "%s", tc->message); + + if (tc->handler == 1) { + parent_act.sa_handler = parent_handler; +-- +2.26.2 + diff --git a/meta/recipes-extended/ltp/ltp/0001-sigwaitinfo-Do-not-run-invalid-undefined-test-cases.patch b/meta/recipes-extended/ltp/ltp/0001-sigwaitinfo-Do-not-run-invalid-undefined-test-cases.patch new file mode 100644 index 0000000000..17d5af89e2 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0001-sigwaitinfo-Do-not-run-invalid-undefined-test-cases.patch @@ -0,0 +1,69 @@ +From e0a63deb1857eb90288e90d6368df70cdd0c0ec9 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 28 May 2020 13:04:33 -0700 +Subject: [PATCH] sigwaitinfo: Do not run invalid/undefined test cases + +These testcases run for eternity on musl + +test_bad_address* cases are passing invalid pointers to a function; that's always UB +empty_set and timeout rely on the implementation-defined "may fail" for EINTR in sigtimedwait [1] + +normally "may fail" is an "unspecified" but here the impl +is supposed to document it so it's "impl-defined" + +[1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/sigtimedwait.html + +Upstream-Status: Submitted [https://patchwork.ozlabs.org/project/ltp/patch/20200528204556.2444156-1-raj.khem@gmail.com/] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Cc: Rich Felker <dalias@aerifal.cx> +--- + .../kernel/syscalls/sigwaitinfo/sigwaitinfo01.c | 12 ++---------- + 1 file changed, 2 insertions(+), 10 deletions(-) + +--- a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c ++++ b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c +@@ -422,15 +422,10 @@ struct test_desc { + } tests[] = { + #ifdef TEST_RT_SIGTIMEDWAIT + { +- test_empty_set, my_rt_sigtimedwait, SIGUSR1}, { + test_unmasked_matching, my_rt_sigtimedwait, SIGUSR1}, { + test_masked_matching, my_rt_sigtimedwait, SIGUSR1}, { + test_unmasked_matching_noinfo, my_rt_sigtimedwait, SIGUSR1}, { +- test_masked_matching_noinfo, my_rt_sigtimedwait, SIGUSR1}, { +- test_bad_address, my_rt_sigtimedwait, SIGUSR1}, { +- test_bad_address2, my_rt_sigtimedwait, SIGUSR1}, { +- test_bad_address3, my_rt_sigtimedwait, SIGUSR1}, { +- test_timeout, my_rt_sigtimedwait, 0}, ++ test_masked_matching_noinfo, my_rt_sigtimedwait, SIGUSR1}, + /* Special cases */ + /* 1: sigwaitinfo does respond to ignored signal */ + { +@@ -452,25 +447,17 @@ struct test_desc { + #endif + #if defined TEST_SIGWAITINFO + { +- test_empty_set, my_sigwaitinfo, SIGUSR1}, { + test_unmasked_matching, my_sigwaitinfo, SIGUSR1}, { + test_masked_matching, my_sigwaitinfo, SIGUSR1}, { + test_unmasked_matching_noinfo, my_sigwaitinfo, SIGUSR1}, { +- test_masked_matching_noinfo, my_sigwaitinfo, SIGUSR1}, { +- test_bad_address, my_sigwaitinfo, SIGUSR1}, { +- test_bad_address2, my_sigwaitinfo, SIGUSR1}, ++ test_masked_matching_noinfo, my_sigwaitinfo, SIGUSR1}, + #endif + #if defined TEST_SIGTIMEDWAIT + { +- test_empty_set, my_sigtimedwait, SIGUSR1}, { + test_unmasked_matching, my_sigtimedwait, SIGUSR1}, { + test_masked_matching, my_sigtimedwait, SIGUSR1}, { + test_unmasked_matching_noinfo, my_sigtimedwait, SIGUSR1}, { +- test_masked_matching_noinfo, my_sigtimedwait, SIGUSR1}, { +- test_bad_address, my_sigtimedwait, SIGUSR1}, { +- test_bad_address2, my_sigtimedwait, SIGUSR1}, { +- test_bad_address3, my_sigtimedwait, SIGUSR1}, { +- test_timeout, my_sigtimedwait, 0}, ++ test_masked_matching_noinfo, my_sigtimedwait, SIGUSR1}, + #endif + }; + diff --git a/meta/recipes-extended/ltp/ltp/0001-syscalls-copy_file_range02-Expect-EFBIG-in-subcase-m.patch b/meta/recipes-extended/ltp/ltp/0001-syscalls-copy_file_range02-Expect-EFBIG-in-subcase-m.patch new file mode 100644 index 0000000000..09b6f54874 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0001-syscalls-copy_file_range02-Expect-EFBIG-in-subcase-m.patch @@ -0,0 +1,57 @@ +From 99687ab002f9f750f6f18fa1d70a91f0aa4f8ba2 Mon Sep 17 00:00:00 2001 +From: He Zhe <zhe.he@windriver.com> +Date: Thu, 18 Jun 2020 17:18:27 +0800 +Subject: [PATCH] syscalls/copy_file_range02: Expect EFBIG in subcase max + length on 32-bit architectures + +For syscall +ssize_t copy_file_range(int fd_in, loff_t *off_in, + int fd_out, loff_t *off_out, + size_t len, unsigned int flags); +off_out is loff_t* that is long long, 64 bits on 32-bit architectures, +while len is size_t that unsigned int, 32 bits on 32-bit architectures. + +In subcase "max length", simplified as below, + +dst = tst_max_lfs_filesize(); +TEST(sys_copy_file_range(fd_src, 0, *tc->copy_to_fd, &dst, tc->len, tc->flags)); + +where dst is 4K*4G and len is 4G, so (4K+1)*4G is always smaller than 4G*4G, +it can never match the following kernel condition on 32-bit architectures. + +if (pos_in + count < pos_in || pos_out + count < pos_out) + return -EOVERFLOW; + +And thus we would get error like +copy_file_range02.c:139: FAIL: copy_file_range failed unexpectedly; expected EOVERFLOW, but got: EFBIG (27) + +Also correct a typo. + +Upstream-Status: Backport [http://lists.linux.it/pipermail/ltp/2020-June/017716.html] + +Signed-off-by: He Zhe <zhe.he@windriver.com> +Acked-by: Li Wang <liwang@redhat.com> +--- + .../kernel/syscalls/copy_file_range/copy_file_range02.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/testcases/kernel/syscalls/copy_file_range/copy_file_range02.c b/testcases/kernel/syscalls/copy_file_range/copy_file_range02.c +index fa679c4d3..bc27fbe57 100644 +--- a/testcases/kernel/syscalls/copy_file_range/copy_file_range02.c ++++ b/testcases/kernel/syscalls/copy_file_range/copy_file_range02.c +@@ -78,7 +78,11 @@ static struct tcase { + {&fd_chrdev, 0, EINVAL, CONTSIZE, "char device", 0}, + {&fd_fifo, 0, EINVAL, CONTSIZE, "fifo", 0}, + {&fd_pipe[0], 0, EINVAL, CONTSIZE, "pipe", 0}, +- {&fd_copy, 0, EOVERFLOW, ULLONG_MAX, "max length lenght", 1}, ++#ifdef TST_ABI64 ++ {&fd_copy, 0, EOVERFLOW, ULLONG_MAX, "max length", 1}, ++#else ++ {&fd_copy, 0, EFBIG, ULLONG_MAX, "max length", 1}, ++#endif + {&fd_copy, 0, EFBIG, MIN_OFF, "max file size", 1}, + }; + +-- +2.17.1 + diff --git a/meta/recipes-extended/ltp/ltp/0004-guard-mallocopt-with-__GLIBC__.patch b/meta/recipes-extended/ltp/ltp/0004-guard-mallocopt-with-__GLIBC__.patch new file mode 100644 index 0000000000..a187f61f08 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0004-guard-mallocopt-with-__GLIBC__.patch @@ -0,0 +1,34 @@ +From d0fc9ca5d3366f9b8907e463222403cd2327be10 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 8 Jan 2016 06:51:20 +0000 +Subject: [PATCH] guard mallocopt() with __GLIBC__ + +mallocopt is not available on non glibc implementations + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Reviewed-by: Petr Vorel <petr.vorel@gmail.com> +Upstream-Status: Accepted [967612c454aea66770b64f69287671037fe895b3] +--- + utils/benchmark/ebizzy-0.3/ebizzy.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/utils/benchmark/ebizzy-0.3/ebizzy.c b/utils/benchmark/ebizzy-0.3/ebizzy.c +index 5bb8eff..934d951 100644 +--- a/utils/benchmark/ebizzy-0.3/ebizzy.c ++++ b/utils/benchmark/ebizzy-0.3/ebizzy.c +@@ -215,10 +215,10 @@ static void read_options(int argc, char *argv[]) + "\"never mmap\" option specified\n"); + usage(); + } +- ++#ifdef __GLIBC__ + if (never_mmap) + mallopt(M_MMAP_MAX, 0); +- ++#endif + if (chunk_size < record_size) { + fprintf(stderr, "Chunk size %u smaller than record size %u\n", + chunk_size, record_size); +-- +2.7.4 + diff --git a/meta/recipes-extended/ltp/ltp/0007-Fix-test_proc_kill-hanging.patch b/meta/recipes-extended/ltp/ltp/0007-Fix-test_proc_kill-hanging.patch new file mode 100644 index 0000000000..0e7264574f --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0007-Fix-test_proc_kill-hanging.patch @@ -0,0 +1,32 @@ +From f4fafbdffae3a63c81f65cef98c72dda26283e06 Mon Sep 17 00:00:00 2001 +From: Dengke Du <dengke.du@windriver.com> +Date: Wed, 8 Feb 2017 16:17:17 +0800 +Subject: [PATCH] Fix test_proc_kill hanging + +Sometimes the signal is delivered to memcg_process before the framework took +into consideration its pid entered in the tasks. Fixed by delaying the signal +send command. + +Upstream-Status: Pending + +Signed-off-by: George Nita <george.nita@enea.com> +Signed-off-by: Dengke Du <dengke.du@windriver.com> +--- + testcases/kernel/controllers/memcg/functional/memcg_lib.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh +index aadaae4..deea5d6 100755 +--- a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh ++++ b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh +@@ -291,6 +291,7 @@ test_proc_kill() + pid=$! + TST_CHECKPOINT_WAIT 0 + echo $pid > tasks ++ sleep 1 + + signal_memcg_process $pid $3 + +-- +2.7.4 + diff --git a/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch b/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch deleted file mode 100644 index 064f00ae3d..0000000000 --- a/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch +++ /dev/null @@ -1,39 +0,0 @@ -[PATCH] add knob to control whether numa support should be checked - -Upstream-Status: Pending - -otherwise the random dependency will be generated - -Signed-off-by: Roy.Li <rongqing.li@windriver.com> ---- - configure.ac | 10 +- -diff --git a/configure.ac b/configure.ac -index 9f397e7..1357256 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -142,6 +142,12 @@ else - AC_SUBST([WITH_REALTIME_TESTSUITE],["no"]) - fi - -+AC_ARG_WITH([numa], -+ AC_HELP_STRING([--without-numa], -+ [without the numa support]), -+ [],[with_numa=yes], -+) -+ - AC_CONFIG_SUBDIRS([utils/ffsb-6.0-rc2]) - - # END testsuites knobs -@@ -159,7 +165,9 @@ LTP_CHECK_SIGNAL - LTP_CHECK_SYSCALL_EVENTFD - LTP_CHECK_SYSCALL_KEYCTL - LTP_CHECK_SYSCALL_MODIFY_LDT -+if test "x$with_numa" = xyes; then - LTP_CHECK_SYSCALL_NUMA -+fi - LTP_CHECK_SYSCALL_QUOTACTL - LTP_CHECK_SYSCALL_SIGNALFD - LTP_CHECK_SYSCALL_UNSHARE --- -1.9.1 - diff --git a/meta/recipes-extended/ltp/ltp/add-knob-for-tirpc.patch b/meta/recipes-extended/ltp/ltp/add-knob-for-tirpc.patch deleted file mode 100644 index 36ff4c775d..0000000000 --- a/meta/recipes-extended/ltp/ltp/add-knob-for-tirpc.patch +++ /dev/null @@ -1,37 +0,0 @@ -[PATCH] add knob to control whether tirpc support should be checked - -Upstream-Status: Pending - -tirpc support is broken upstream. in the meantime, allow to disable tirpc. - -Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org> ---- - configure.ac | 9 +++++++++ - 1 file changed, 9 insertions(+) - ---- a/configure.ac -+++ b/configure.ac -@@ -98,6 +98,13 @@ if test "x$with_python" = xyes; then - else - AC_SUBST([WITH_PYTHON],["no"]) - fi -+ -+# TI RPC -+AC_ARG_WITH([tirpc], -+ AC_HELP_STRING([--without-tirpc], -+ [without libtirpc support]), -+ [],[with_tirpc=yes], -+) - # END tools knobs - - # Testsuites knobs -@@ -182,7 +189,9 @@ LTP_CHECK_RENAMEAT - LTP_CHECK_FALLOCATE - LTP_CHECK_SYSCALL_FCNTL - LTP_CHECK_SYSCALL_PERF_EVENT_OPEN -+if test "x$with_tirpc" = xyes; then - LTP_CHECK_TIRPC -+fi - LTP_CHECK_TEE - LTP_CHECK_SPLICE - LTP_CHECK_VMSPLICE diff --git a/meta/recipes-extended/ltp/ltp/ltp-Do-not-link-against-libfl.patch b/meta/recipes-extended/ltp/ltp/ltp-Do-not-link-against-libfl.patch deleted file mode 100644 index 20fd4c3691..0000000000 --- a/meta/recipes-extended/ltp/ltp/ltp-Do-not-link-against-libfl.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 5bda9c0af56869c6ff2c25d38ea087179c946bc6 Mon Sep 17 00:00:00 2001 -From: Chong Lu <Chong.Lu@windriver.com> -Date: Tue, 11 Mar 2014 14:47:22 +0800 -Subject: [PATCH] ltp: Don't link against libfl - -We have already defined yywrap function in scan.l file. After this, we no longer need to -link against libfl and so no longer get errors about undefined references to yylex. - -Upstream-Status: Pending - -Signed-off-by: Chong Lu <Chong.Lu@windriver.com> ---- - pan/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/pan/Makefile b/pan/Makefile -index 4cc6466..a4b575b 100644 ---- a/pan/Makefile -+++ b/pan/Makefile -@@ -31,7 +31,7 @@ CPPFLAGS += -Wno-error - - CPPFLAGS += -I$(abs_srcdir) - --LDLIBS += -lm $(LEXLIB) -+LDLIBS += -lm - - LFLAGS += -l - --- -1.7.9.5 - diff --git a/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch b/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch deleted file mode 100644 index 4836010bdf..0000000000 --- a/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch +++ /dev/null @@ -1,61 +0,0 @@ -[PATCH] make setregid02 work - -Upstream-Status: Inappropriate [configuration] - -there is no "nobody" group in oe-core, the user "nobody" belongs to -"nogroup" group, so replace nobody with nogroup to make the test pass - -Signed-off-by: Roy.Li <rongqing.li@windriver.com> ---- - testcases/kernel/syscalls/setregid/setregid02.c | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -diff --git a/testcases/kernel/syscalls/setregid/setregid02.c b/testcases/kernel/syscalls/setregid/setregid02.c -index 8058627..866bee4 100644 ---- a/testcases/kernel/syscalls/setregid/setregid02.c -+++ b/testcases/kernel/syscalls/setregid/setregid02.c -@@ -41,7 +41,7 @@ static gid_t neg_one = -1; - - static struct passwd *ltpuser; - --static struct group nobody, root, bin; -+static struct group nogroup, root, bin; - - /* - * The following structure contains all test data. Each structure in the array -@@ -57,17 +57,17 @@ struct test_data_t { - char *test_msg; - } test_data[] = { - { -- &neg_one, &root.gr_gid, EPERM, &nobody, &nobody, -+ &neg_one, &root.gr_gid, EPERM, &nogroup, &nogroup, - "After setregid(-1, root),"}, { -- &neg_one, &bin.gr_gid, EPERM, &nobody, &nobody, -+ &neg_one, &bin.gr_gid, EPERM, &nogroup, &nogroup, - "After setregid(-1, bin)"}, { -- &root.gr_gid, &neg_one, EPERM, &nobody, &nobody, -+ &root.gr_gid, &neg_one, EPERM, &nogroup, &nogroup, - "After setregid(root,-1),"}, { -- &bin.gr_gid, &neg_one, EPERM, &nobody, &nobody, -+ &bin.gr_gid, &neg_one, EPERM, &nogroup, &nogroup, - "After setregid(bin, -1),"}, { -- &root.gr_gid, &bin.gr_gid, EPERM, &nobody, &nobody, -+ &root.gr_gid, &bin.gr_gid, EPERM, &nogroup, &nogroup, - "After setregid(root, bin)"}, { -- &bin.gr_gid, &root.gr_gid, EPERM, &nobody, &nobody, -+ &bin.gr_gid, &root.gr_gid, EPERM, &nogroup, &nogroup, - "After setregid(bin, root),"} - }; - -@@ -165,7 +165,7 @@ static void setup(void) - } while (0) - - GET_GID(root); -- GET_GID(nobody); -+ GET_GID(nogroup); - GET_GID(bin); - - TEST_PAUSE; --- -1.9.1 - diff --git a/meta/recipes-extended/ltp/ltp_20150420.bb b/meta/recipes-extended/ltp/ltp_20150420.bb deleted file mode 100644 index 108ebf1e63..0000000000 --- a/meta/recipes-extended/ltp/ltp_20150420.bb +++ /dev/null @@ -1,86 +0,0 @@ -SUMMARY = "Linux Test Project" -DESCRIPTION = "The Linux Test Project is a joint project with SGI, IBM, OSDL, and Bull with a goal to deliver test suites to the open source community that validate the reliability, robustness, and stability of Linux. The Linux Test Project is a collection of tools for testing the Linux kernel and related features." -HOMEPAGE = "http://ltp.sourceforge.net" -SECTION = "console/utils" -LICENSE = "GPLv2 & GPLv2+ & LGPLv2+ & LGPLv2.1+ & BSD-2-Clause" -LIC_FILES_CHKSUM = "\ - file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://testcases/kernel/controllers/freezer/COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ - file://testcases/kernel/controllers/freezer/run_freezer.sh;beginline=5;endline=17;md5=86a61d2c042d59836ffb353a21456498 \ - file://testcases/kernel/hotplug/memory_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \ - file://testcases/kernel/hotplug/cpu_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \ - file://testcases/open_posix_testsuite/COPYING;md5=216e43b72efbe4ed9017cc19c4c68b01 \ - file://testcases/realtime/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ - file://tools/netpipe-2.4/COPYING;md5=9e3781bb5fe787aa80e1f51f5006b6fa \ - file://tools/netpipe-2.4-ipv6/COPYING;md5=9e3781bb5fe787aa80e1f51f5006b6fa \ - file://tools/top-LTP/proc/COPYING;md5=aefc88eb8a41672fbfcfe6b69ab8c49c \ - file://tools/pounder21/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ - file://utils/benchmark/kernbench-0.42/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ - file://utils/ffsb-6.0-rc2/COPYING;md5=c46082167a314d785d012a244748d803 \ -" - -DEPENDS = "attr libaio libcap acl openssl zip-native" -SRCREV = "77d0b7fd0148ce657c5a25060667e978c07662a0" - -SRC_URI = "git://github.com/linux-test-project/ltp.git \ - file://0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch \ - file://ltp-Do-not-link-against-libfl.patch \ - file://make-setregid02-work.patch \ - file://add-knob-for-numa.patch \ - file://add-knob-for-tirpc.patch \ - file://0001-ltp-vma03-fix-the-alginment-of-page-size.patch \ -" - -S = "${WORKDIR}/git" - -inherit autotools-brokensep - -TARGET_CC_ARCH += "${LDFLAGS}" - -export prefix = "/opt/ltp" -export exec_prefix = "/opt/ltp" - -PACKAGECONFIG[numa] = "--with-numa, --without-numa, numactl," -EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4" -EXTRA_OECONF = " --with-power-management-testsuite --with-realtime-testsuite " -# ltp network/rpc test cases ftbfs when libtirpc is found -EXTRA_OECONF += " --without-tirpc " - -# The makefiles make excessive use of make -C and several include testcases.mk -# which triggers a build of the syscall header. To reproduce, build ltp, -# then delete the header, then "make -j XX" and watch regen.sh run multiple -# times. Its easier to generate this once here instead. -do_compile_prepend () { - ( make -C ${B}/testcases/kernel include/linux_syscall_numbers.h ) -} - -do_install(){ - install -d ${D}/opt/ltp/ - oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install - - # Copy POSIX test suite into ${D}/opt/ltp/testcases by manual - cp -r testcases/open_posix_testsuite ${D}/opt/ltp/testcases -} - -RDEPENDS_${PN} = "perl e2fsprogs-mke2fs python-core libaio bash gawk expect" - -FILES_${PN}-dbg += "\ - /opt/ltp/runtest/.debug \ - /opt/ltp/testcases/*/.debug \ - /opt/ltp/testcases/*/*/.debug \ - /opt/ltp/testcases/*/*/*/.debug \ - /opt/ltp/scenario_groups/.debug \ - /opt/ltp/testscripts/.debug \ - /opt/ltp/testscripts/open_posix_testsuite/.debug \ -" - -FILES_${PN}-staticdev += "/opt/ltp/lib/libmem.a" - -FILES_${PN} += "/opt/ltp/* /opt/ltp/runtest/* /opt/ltp/scenario_groups/* /opt/ltp/testcases/bin/* /opt/ltp/testcases/bin/*/bin/* /opt/ltp/testscripts/* /opt/ltp/testcases/open_posix_testsuite/* /opt/ltp/testcases/open_posix_testsuite/conformance/* /opt/ltp/testcases/open_posix_testsuite/Documentation/* /opt/ltp/testcases/open_posix_testsuite/functional/* /opt/ltp/testcases/open_posix_testsuite/include/* /opt/ltp/testcases/open_posix_testsuite/scripts/* /opt/ltp/testcases/open_posix_testsuite/stress/* /opt/ltp/testcases/open_posix_testsuite/tools/*" - -# Avoid generated binaries stripping. Otherwise some of the ltp tests such as ldd01 & nm01 fails -INHIBIT_PACKAGE_STRIP = "1" -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" -# However, test_arch_stripped is already stripped, so... -INSANE_SKIP_${PN} += "already-stripped" - diff --git a/meta/recipes-extended/ltp/ltp_20200515.bb b/meta/recipes-extended/ltp/ltp_20200515.bb new file mode 100644 index 0000000000..0c7044d044 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp_20200515.bb @@ -0,0 +1,124 @@ +SUMMARY = "Linux Test Project" +DESCRIPTION = "The Linux Test Project is a joint project with SGI, IBM, OSDL, and Bull with a goal to deliver test suites to the open source community that validate the reliability, robustness, and stability of Linux. The Linux Test Project is a collection of tools for testing the Linux kernel and related features." +HOMEPAGE = "https://linux-test-project.github.io/" +SECTION = "console/utils" +LICENSE = "GPLv2 & GPLv2+ & LGPLv2+ & LGPLv2.1+ & BSD-2-Clause" +LIC_FILES_CHKSUM = "\ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://testcases/kernel/controllers/freezer/COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ + file://testcases/kernel/controllers/freezer/run_freezer.sh;beginline=5;endline=17;md5=86a61d2c042d59836ffb353a21456498 \ + file://testcases/kernel/hotplug/memory_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \ + file://testcases/kernel/hotplug/cpu_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \ + file://testcases/open_posix_testsuite/COPYING;md5=48b1c5ec633e3e30ec2cf884ae699947 \ + file://testcases/realtime/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ + file://utils/benchmark/kernbench-0.42/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ +" + +DEPENDS = "attr libaio libcap acl openssl zip-native" +DEPENDS_append_libc-musl = " fts " +EXTRA_OEMAKE_append_libc-musl = " LIBC=musl " +EXTRA_OECONF_append_libc-musl = " LIBS=-lfts " + +# since ltp contains x86-64 assembler which uses the frame-pointer register, +# set -fomit-frame-pointer x86-64 to handle cases where optimisation +# is set to -O0 or frame pointers have been enabled by -fno-omit-frame-pointer +# earlier in CFLAGS, etc. +CFLAGS_append_x86-64 = " -fomit-frame-pointer" + +CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__" +CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__" +SRCREV = "0d79a93e6ca44d9bc95973faea6bcd7b0c6d1f43" + +SRC_URI = "git://github.com/linux-test-project/ltp.git \ + file://0001-build-Add-option-to-select-libc-implementation.patch \ + file://0004-guard-mallocopt-with-__GLIBC__.patch \ + file://0007-Fix-test_proc_kill-hanging.patch \ + file://0001-Add-more-musl-exclusions.patch \ + file://0001-ptrace01-Fix-missing-format-string.patch \ + file://0001-sigwaitinfo-Do-not-run-invalid-undefined-test-cases.patch \ + file://0001-syscalls-copy_file_range02-Expect-EFBIG-in-subcase-m.patch \ + file://0001-Remove-OOM-tests-from-runtest-mm.patch \ + " + +S = "${WORKDIR}/git" + +inherit autotools-brokensep pkgconfig + +TARGET_CC_ARCH += "${LDFLAGS}" + +export prefix = "/opt/${PN}" +export exec_prefix = "/opt/${PN}" + +PACKAGECONFIG[numa] = "--with-numa, --without-numa, numactl," +EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4" +EXTRA_OECONF = " --with-realtime-testsuite --with-open-posix-testsuite " +# ltp network/rpc test cases ftbfs when libtirpc is found +EXTRA_OECONF += " --without-tirpc " + +do_install(){ + install -d ${D}${prefix}/ + oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install + + # fixup not deploy STPfailure_report.pl to avoid confusing about it fails to run + # as it lacks dependency on some perl moudle such as LWP::Simple + # And this script previously works as a tool for analyzing failures from LTP + # runs on the OSDL's Scaleable Test Platform (STP) and it mainly accesses + # http://khack.osdl.org to retrieve ltp test results run on + # OSDL's Scaleable Test Platform, but now http://khack.osdl.org unaccessible + rm -rf ${D}${prefix}/bin/STPfailure_report.pl + + # Copy POSIX test suite into ${D}${prefix}/testcases by manual + cp -r testcases/open_posix_testsuite ${D}${prefix}/testcases + + # Makefile were configured in the build system + find ${D}${prefix} -name Makefile | xargs -n 1 sed -i \ + -e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \ + -e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \ + -e 's@[^ ]*--sysroot=[^ "]*@@g' + + # The controllers memcg_stree test seems to cause us hangs and takes 900s + # (maybe we expect more regular output?), anyhow, skip it + sed -e '/^memcg_stress/d' -i ${D}${prefix}/runtest/controllers +} + +RDEPENDS_${PN} = "\ + attr \ + bash \ + bc \ + coreutils \ + cpio \ + cronie \ + curl \ + e2fsprogs \ + e2fsprogs-mke2fs \ + expect \ + file \ + gawk \ + gdb \ + gzip \ + iproute2 \ + ldd \ + libaio \ + logrotate \ + net-tools \ + perl \ + python3-core \ + procps \ + quota \ + unzip \ + util-linux \ + which \ + tar \ +" + +FILES_${PN} += "${prefix}/* ${prefix}/runtest/* ${prefix}/scenario_groups/* ${prefix}/testcases/bin/* ${prefix}/testcases/bin/*/bin/* ${prefix}/testscripts/* ${prefix}/testcases/open_posix_testsuite/* ${prefix}/testcases/open_posix_testsuite/conformance/* ${prefix}/testcases/open_posix_testsuite/Documentation/* ${prefix}/testcases/open_posix_testsuite/functional/* ${prefix}/testcases/open_posix_testsuite/include/* ${prefix}/testcases/open_posix_testsuite/scripts/* ${prefix}/testcases/open_posix_testsuite/stress/* ${prefix}/testcases/open_posix_testsuite/tools/* ${prefix}/testcases/data/nm01/lib.a ${prefix}/lib/libmem.a" + +# Avoid stripping some generated binaries otherwise some of the ltp tests such as ldd01 & nm01 fail +INHIBIT_PACKAGE_STRIP_FILES = "${prefix}/testcases/bin/nm01 ${prefix}/testcases/bin/ldd01" +INSANE_SKIP_${PN} += "already-stripped staticdev" + +# Avoid file dependency scans, as LTP checks for things that may or may not +# exist on the running system. For instance it has specific checks for +# csh and ksh which are not typically part of OpenEmbedded systems (but +# can be added via additional layers.) +SKIP_FILEDEPS_${PN} = '1' diff --git a/meta/recipes-extended/lzip/lzip_1.21.bb b/meta/recipes-extended/lzip/lzip_1.21.bb new file mode 100644 index 0000000000..bb3d2a6fe3 --- /dev/null +++ b/meta/recipes-extended/lzip/lzip_1.21.bb @@ -0,0 +1,41 @@ +SUMMARY = "Lossless data compressor based on the LZMA algorithm" +HOMEPAGE = "http://lzip.nongnu.org/lzip.html" +SECTION = "console/utils" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=76d6e300ffd8fb9d18bd9b136a9bba13 \ + file://decoder.cc;beginline=3;endline=16;md5=db09fe3f9573f94d0076f7f07959e6e1" + +SRC_URI = "${SAVANNAH_GNU_MIRROR}/lzip/lzip-${PV}.tar.gz" +SRC_URI[md5sum] = "c0061730d017ea593a09308edc547128" +SRC_URI[sha256sum] = "e48b5039d3164d670791f9c5dbaa832bf2df080cb1fbb4f33aa7b3300b670d8b" + +B = "${WORKDIR}/build" +do_configure[cleandirs] = "${B}" + +CONFIGUREOPTS = "\ + '--srcdir=${S}' \ + '--prefix=${prefix}' \ + '--exec-prefix=${exec_prefix}' \ + '--bindir=${bindir}' \ + '--datadir=${datadir}' \ + '--infodir=${infodir}' \ + '--sysconfdir=${sysconfdir}' \ + 'CXX=${CXX}' \ + 'CPPFLAGS=${CPPFLAGS}' \ + 'CXXFLAGS=${CXXFLAGS}' \ + 'LDFLAGS=${LDFLAGS}' \ +" + +do_configure () { + ${S}/configure ${CONFIGUREOPTS} +} + +do_install () { + oe_runmake 'DESTDIR=${D}' 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 +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-extended/mailx/mailx-12.5/explicitly.disable.krb5.support.patch b/meta/recipes-extended/mailx/mailx-12.5/explicitly.disable.krb5.support.patch deleted file mode 100644 index 8c7178bf8c..0000000000 --- a/meta/recipes-extended/mailx/mailx-12.5/explicitly.disable.krb5.support.patch +++ /dev/null @@ -1,46 +0,0 @@ -krb5 support is autodetected from sysroot making builds undeterministic -feel free to improve this to support explicitly enabling/disabling it - -Upstream-Status: Penging - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> - ---- a/makeconfig 2013-07-21 15:06:11.177792334 +0200 -+++ b/makeconfig 2013-07-21 15:07:20.028793994 +0200 -@@ -424,36 +424,6 @@ - } - ! - --<$tmp2.c link_check gssapi 'for GSSAPI in libgss' \ -- '#define USE_GSSAPI' '-lgss' || -- <$tmp2.c link_check gssapi 'for GSSAPI in libgssapi_krb5' \ -- '#define USE_GSSAPI' '-lgssapi_krb5' || -- link_check gssapi 'for GSSAPI in libgssapi_krb5, old-style' \ -- '#define USE_GSSAPI --#define GSSAPI_OLD_STYLE' '-lgssapi_krb5' <<\! || \ -- link_check gssapi 'for GSSAPI in libgssapi' \ -- '#define USE_GSSAPI --#define GSSAPI_REG_INCLUDE' '-lgssapi' <<\% --#include <gssapi/gssapi.h> --#include <gssapi/gssapi_generic.h> -- --int main(void) --{ -- gss_import_name(0, 0, gss_nt_service_name, 0); -- gss_init_sec_context(0,0,0,0,0,0,0,0,0,0,0,0,0); -- return 0; --} --! --#include <gssapi.h> -- --int main(void) --{ -- gss_import_name(0, 0, GSS_C_NT_HOSTBASED_SERVICE, 0); -- gss_init_sec_context(0,0,0,0,0,0,0,0,0,0,0,0,0); -- return 0; --} --% -- - cat >$tmp2.c <<\! - #include "config.h" - #ifdef HAVE_NL_LANGINFO diff --git a/meta/recipes-extended/mailx/mailx_12.5.bb b/meta/recipes-extended/mailx/mailx_12.5.bb deleted file mode 100644 index a53da3af5d..0000000000 --- a/meta/recipes-extended/mailx/mailx_12.5.bb +++ /dev/null @@ -1,36 +0,0 @@ -SUMMARY = "mailx is the traditional command-line-mode mail user agent" - -DESCRIPTION = "Mailx is derived from Berkeley Mail and is intended provide the \ -functionality of the POSIX mailx command with additional support \ -for MIME, IMAP, POP3, SMTP, and S/MIME." - -HOMEPAGE = "http://heirloom.sourceforge.net/mailx.html" -SECTION = "console/network" -PR = "r2" -LICENSE = "BSD & MPL-1" -LIC_FILES_CHKSUM = "file://COPYING;md5=4202a0a62910cf94f7af8a3436a2a2dd" - -DEPENDS = "openssl" - -SRC_URI = "https://launchpad.net/ubuntu/+archive/primary/+files/heirloom-mailx_12.5.orig.tar.gz;name=archive \ - https://launchpad.net/ubuntu/+archive/primary/+files/heirloom-mailx_12.5-1.diff.gz;name=patch \ - file://explicitly.disable.krb5.support.patch \ - " - -SRC_URI[archive.md5sum] = "29a6033ef1412824d02eb9d9213cb1f2" -SRC_URI[archive.sha256sum] = "015ba4209135867f37a0245d22235a392b8bbed956913286b887c2e2a9a421ad" -SRC_URI[patch.md5sum] = "f466281336183be673bf136dd7096662" -SRC_URI[patch.sha256sum] = "aaf2a4bbf145e5ca9cdeb0843091ec8cc01df6c9568c997207a5e97b4dc5ba43" - -S = "${WORKDIR}/heirloom-mailx-${PV}" - -inherit autotools-brokensep - -CFLAGS_append = " -D_BSD_SOURCE -DDEBIAN -I${S}/EXT" -EXTRA_OEMAKE = "SENDMAIL=${sbindir}/sendmail" - -# The makeconfig can't run parallelly, otherwise the checking results -# might be incorrect and lead to errors: -# fio.c:56:17: fatal error: ssl.h: No such file or directory -# #include <ssl.h> -PARALLEL_MAKE = "" diff --git a/meta/recipes-extended/man-db/files/99_mandb b/meta/recipes-extended/man-db/files/99_mandb new file mode 100644 index 0000000000..9b8a1712b7 --- /dev/null +++ b/meta/recipes-extended/man-db/files/99_mandb @@ -0,0 +1 @@ +d man man 0755 /var/cache/man none diff --git a/meta/recipes-extended/man-db/files/man_db.conf-avoid-multilib-install-file-conflict.patch b/meta/recipes-extended/man-db/files/man_db.conf-avoid-multilib-install-file-conflict.patch new file mode 100644 index 0000000000..03273d3b49 --- /dev/null +++ b/meta/recipes-extended/man-db/files/man_db.conf-avoid-multilib-install-file-conflict.patch @@ -0,0 +1,16 @@ +The first line of man_db.conf will be replaced by package name. And it causes +multilib install file conflict. Remove the line to avoid the issue. + +Upstream-Status: Pending + +Signed-off-by: Kai Kang <kai.kang@windriver.com> + +diff --git a/src/man_db.conf.in b/src/man_db.conf.in +index bc8bb7e..04cfb31 100644 +--- a/src/man_db.conf.in ++++ b/src/man_db.conf.in +@@ -1,4 +1,3 @@ +-# @config_file_basename@ + # + # This file is used by the man-db package to configure the man and cat paths. + # It is also used to provide a manpath for those without one by examining diff --git a/meta/recipes-extended/man-db/man-db_2.9.3.bb b/meta/recipes-extended/man-db/man-db_2.9.3.bb new file mode 100644 index 0000000000..0e6016a73c --- /dev/null +++ b/meta/recipes-extended/man-db/man-db_2.9.3.bb @@ -0,0 +1,58 @@ +SUMMARY = "An implementation of the standard Unix documentation system accessed using the man command" +HOMEPAGE = "http://man-db.nongnu.org/" +LICENSE = "LGPLv2.1 & GPLv2" +LIC_FILES_CHKSUM = "file://docs/COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 \ + file://docs/COPYING;md5=eb723b61539feef013de476e68b5c50a" + +SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/man-db/man-db-${PV}.tar.xz \ + file://99_mandb \ + file://man_db.conf-avoid-multilib-install-file-conflict.patch" +SRC_URI[sha256sum] = "fa5aa11ab0692daf737e76947f45669225db310b2801a5911bceb7551c5597b8" + +DEPENDS = "libpipeline gdbm groff-native base-passwd" +RDEPENDS_${PN} += "base-passwd" + +# | /usr/src/debug/man-db/2.8.0-r0/man-db-2.8.0/src/whatis.c:939: undefined reference to `_nl_msg_cat_cntr' +USE_NLS_libc-musl = "no" + +inherit gettext pkgconfig autotools systemd + +EXTRA_OECONF = "--with-pager=less --with-systemdsystemunitdir=${systemd_unitdir}/system" +EXTRA_AUTORECONF += "-I ${S}/gl/m4" + +do_install() { + autotools_do_install + + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + install -d ${D}/etc/default/volatiles + install -m 0644 ${WORKDIR}/99_mandb ${D}/etc/default/volatiles + fi +} + +do_install_append_libc-musl() { + rm -f ${D}${libdir}/charset.alias +} + +FILES_${PN} += "${prefix}/lib/tmpfiles.d" + +FILES_${PN}-dev += "${libdir}/man-db/libman.so ${libdir}/${BPN}/libmandb.so" + +RDEPENDS_${PN} += "groff" +RRECOMMENDS_${PN} += "less" +RPROVIDES_${PN} += " man" + +def compress_pkg(d): + if bb.utils.contains("INHERIT", "compress_doc", True, False, d): + compress = d.getVar("DOC_COMPRESS") + if compress == "gz": + return "gzip" + elif compress == "bz2": + return "bzip2" + elif compress == "xz": + return "xz" + return "" + +RDEPENDS_${PN} += "${@compress_pkg(d)}" + +SYSTEMD_SERVICE_${PN} = "man-db.timer man-db.service" +SYSTEMD_AUTO_ENABLE ?= "disable" diff --git a/meta/recipes-extended/man-pages/man-pages_4.01.bb b/meta/recipes-extended/man-pages/man-pages_5.08.bb index f6a5c492b7..caf9320a67 100644 --- a/meta/recipes-extended/man-pages/man-pages_4.01.bb +++ b/meta/recipes-extended/man-pages/man-pages_5.08.bb @@ -4,13 +4,17 @@ SECTION = "console/utils" HOMEPAGE = "http://www.kernel.org/pub/linux/docs/man-pages" LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://README;md5=8f2a3d43057d458e5066714980567a60" -SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/Archive/${BP}.tar.gz" +LIC_FILES_CHKSUM = "file://README;md5=207f70f56526417514ac46b6680e314f" +SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/${BP}.tar.gz" -SRC_URI[md5sum] = "575f4e8920166b1433c329bb621819d1" -SRC_URI[sha256sum] = "ba89f3453982fae6c699a877368d51ee27883b4de709e753eee3783b447a8381" +SRC_URI[sha256sum] = "6e0b8ae23ee9467cee701f23dea908257a93e5fffa9e261b19a23efbd27e84a2" -RDEPENDS_${PN} = "man" +inherit manpages + +MAN_PKG = "${PN}" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[manpages] = "" do_configure[noexec] = "1" do_compile[noexec] = "1" @@ -26,6 +30,7 @@ FILES_${PN} = "${mandir}/*" inherit update-alternatives ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE_${PN} = "passwd.5 getspnam.3" +ALTERNATIVE_${PN} = "passwd.5 getspnam.3 crypt.3" ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5" ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3" +ALTERNATIVE_LINK_NAME[crypt.3] = "${mandir}/man3/crypt.3" diff --git a/meta/recipes-extended/man/man/configure_sed.patch b/meta/recipes-extended/man/man/configure_sed.patch deleted file mode 100644 index d49e6831d9..0000000000 --- a/meta/recipes-extended/man/man/configure_sed.patch +++ /dev/null @@ -1,32 +0,0 @@ -man: replace ',' with '#' - -Sometimes, the parameters of CC/BUILD_CC contains the ',', which -cause the sed command failed, so replace the ',' with '#' - -Upstream-Status: Pending - -Signed-off-by: Yue Tao <Yue.Tao@windriver.com> -Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> ---- - configure | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/configure b/configure -index 9f62cf9..9a565ae 100755 ---- a/configure -+++ b/configure -@@ -1321,9 +1321,9 @@ do - echo "Creating $infile from $infile.in" - sed -e ' - s,@version@,$version, --s,@CC@,$CC, -+s#@CC@#$CC# - s,@EXEEXT@,$EXEEXT, --s,@BUILD_CC@,$BUILD_CC, -+s#@BUILD_CC@#$BUILD_CC# - s,@INSTALL@,$INSTALL, - s,@DEFS@,$DEFS, - s,@LIBS@,$LIBS, --- -1.9.1 - diff --git a/meta/recipes-extended/man/man/man-1.5g-nonrootbuild.patch b/meta/recipes-extended/man/man/man-1.5g-nonrootbuild.patch deleted file mode 100644 index 6f834bd01b..0000000000 --- a/meta/recipes-extended/man/man/man-1.5g-nonrootbuild.patch +++ /dev/null @@ -1,16 +0,0 @@ -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - -diff -u -r man-1.5g.old/configure man-1.5g/configure ---- man-1.5g.old/configure Wed Apr 7 04:16:05 1999 -+++ man-1.5g/configure Mon May 15 15:22:44 2000 -@@ -791,7 +791,7 @@ - read mode - if test "$mode" != ""; then man_mode=$mode; fi - fi -- man_install_flags="-m $man_mode -o $man_user -g $man_group" -+ man_install_flags="" - fi - - # What sections do we anticipate? diff --git a/meta/recipes-extended/man/man/man-1.5h1-gencat.patch b/meta/recipes-extended/man/man/man-1.5h1-gencat.patch deleted file mode 100644 index 044b14c509..0000000000 --- a/meta/recipes-extended/man/man/man-1.5h1-gencat.patch +++ /dev/null @@ -1,14 +0,0 @@ -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - ---- gencat/genlib.c 2006-08-02 20:11:44.000000000 +0200 -+++ gencat/genlib.c.oden 2008-12-21 19:18:50.000000000 +0100 -@@ -47,6 +47,7 @@ up-to-date. Many thanks. - 01/14/91 4 nazgul Off by one on number specified entries - */ - -+#undef _GNU_SOURCE - #include <stdio.h> - #include <stdlib.h> - #ifdef SYSV diff --git a/meta/recipes-extended/man/man/man-1.5h1-make.patch b/meta/recipes-extended/man/man/man-1.5h1-make.patch deleted file mode 100644 index 8631eb2c53..0000000000 --- a/meta/recipes-extended/man/man/man-1.5h1-make.patch +++ /dev/null @@ -1,17 +0,0 @@ -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - ---- man-1.5g/man/Makefile.in.mike Fri Apr 9 13:35:54 1999 -+++ man-1.5g/man/Makefile.in Fri Apr 9 13:36:45 1999 -@@ -1,8 +1,8 @@ - # only executed from a subdir - MAN1 = man whatis apropos --MAN5 = man.conf -+MAN5 = man.config - MAN8 = makewhatis --ALL = man.1 whatis.1 apropos.1 man.conf.5 -+ALL = man.1 whatis.1 apropos.1 man.config.5 - MAYBE8 = makewhatis - - .SUFFIXES: .man .1 .5 .8 diff --git a/meta/recipes-extended/man/man/man-1.5i2-initial.patch b/meta/recipes-extended/man/man/man-1.5i2-initial.patch deleted file mode 100644 index fe56c0706c..0000000000 --- a/meta/recipes-extended/man/man/man-1.5i2-initial.patch +++ /dev/null @@ -1,19 +0,0 @@ -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - ---- man-1.5i2/src/makewhatis.sh.initial Tue Jul 3 15:38:39 2001 -+++ man-1.5i2/src/makewhatis.sh Tue Jul 3 15:39:39 2001 -@@ -81,8 +81,10 @@ - continue;; - -s) setsections=1 - continue;; -- -u) findarg="-newer /var/cache/man/whatis" -- update=1 -+ -u) if [ -e /var/cache/man/whatis ]; then -+ findarg="-newer /var/cache/man/whatis" -+ update=1 -+ fi - continue;; - -v) verbose=1 - continue;; diff --git a/meta/recipes-extended/man/man/man-1.5i2-newline.patch b/meta/recipes-extended/man/man/man-1.5i2-newline.patch deleted file mode 100644 index 611df5d259..0000000000 --- a/meta/recipes-extended/man/man/man-1.5i2-newline.patch +++ /dev/null @@ -1,15 +0,0 @@ -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - ---- src/man.c 2008-12-21 19:17:31.000000000 +0100 -+++ src/man.c.oden 2008-12-21 19:17:38.000000000 +0100 -@@ -391,7 +391,7 @@ again: - beg++; - - end = beg; -- while (*end != ' ' && *end != '\t' && *end != '\n' && *end != '\0') -+ while (*end != ' ' && *end != '\t' && *end != '\n' && *end != '\0' && (end-buf)<BUFSIZE) - end++; /* note that buf is NUL-terminated */ - *end = '\0'; - diff --git a/meta/recipes-extended/man/man/man-1.5i2-overflow.patch b/meta/recipes-extended/man/man/man-1.5i2-overflow.patch deleted file mode 100644 index 52d2881a89..0000000000 --- a/meta/recipes-extended/man/man/man-1.5i2-overflow.patch +++ /dev/null @@ -1,16 +0,0 @@ -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - ---- man-1.5i2/src/man.c.overflow Mon Jun 25 00:01:45 2001 -+++ man-1.5i2/src/man.c Mon Jun 25 00:01:45 2001 -@@ -381,6 +381,9 @@ - strcat(name, "/"); - strcat(name, beg); - } -+ /* If this is too long, bad things have already happened. * -+ * we should quit IMMEDIATELY. */ -+ if(strlen(name)>sizeof(ultname)) _exit(1); - - goto again; - } diff --git a/meta/recipes-extended/man/man/man-1.5j-i18n.patch b/meta/recipes-extended/man/man/man-1.5j-i18n.patch deleted file mode 100644 index 2ae09c0ea4..0000000000 --- a/meta/recipes-extended/man/man/man-1.5j-i18n.patch +++ /dev/null @@ -1,16 +0,0 @@ -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - ---- man-1.5j/msgs/inst.sh.i18n Wed Apr 25 10:40:50 2001 -+++ man-1.5j/msgs/inst.sh Wed Apr 25 10:41:17 2001 -@@ -27,8 +27,7 @@ - for j in $M; do - if [ -f $j ]; then - i=`echo $j | sed -e 's/mess.//; s/.cat//'` -- dest=`echo $locdir | sed -e "s/%N/man/; s/%L/$i/"` -- dest=${PREFIX}$dest -+ dest=${PREFIX}/`echo $locdir | sed -e "s/%N/man/; s/%L/$i/"` - echo "mkdir -p `dirname $dest`" - mkdir -p `dirname $dest`; - echo "install -c -m 644 $j $dest" diff --git a/meta/recipes-extended/man/man/man-1.5j-nocache.patch b/meta/recipes-extended/man/man/man-1.5j-nocache.patch deleted file mode 100644 index 751dddd53b..0000000000 --- a/meta/recipes-extended/man/man/man-1.5j-nocache.patch +++ /dev/null @@ -1,16 +0,0 @@ -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - ---- man-1.5j/src/man.conf.in.nocache Thu Nov 22 15:07:12 2001 -+++ man-1.5j/src/man.conf.in Thu Nov 22 15:07:12 2001 -@@ -81,6 +81,9 @@ - # - #NOCACHE - # -+# NOCACHE keeps man from creating cache pages -+NOCACHE -+# - # Useful paths - note that COL should not be defined when - # NROFF is defined as "groff -Tascii" or "groff -Tlatin1"; - # not only is it superfluous, but it actually damages the output. diff --git a/meta/recipes-extended/man/man/man-1.5j-utf8.patch b/meta/recipes-extended/man/man/man-1.5j-utf8.patch deleted file mode 100644 index 33d3e4c974..0000000000 --- a/meta/recipes-extended/man/man/man-1.5j-utf8.patch +++ /dev/null @@ -1,61 +0,0 @@ -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - ---- man-1.5j/configure.utf8 Thu Nov 22 15:02:35 2001 -+++ man-1.5j/configure Thu Nov 22 15:03:15 2001 -@@ -408,9 +408,9 @@ - Fgawk=/bin/gawk - Fawk=/bin/gawk - Fmawk=missing -- troff="" -- nroff="" -- jnroff="" -+ troff=/usr/bin/troff -+ nroff=/usr/bin/nroff -+ jnroff=/usr/bin/nroff - eqn="" - neqn="" - jneqn="" -@@ -453,6 +453,8 @@ - done - done - Fgroff=/usr/bin/groff -+ Fnroff=/usr/bin/nroff -+ Fjnroff=/usr/bin/nroff - Fgeqn=/usr/bin/geqn - Fgtbl=/usr/bin/gtbl - Fcol=/usr/bin/col -@@ -485,25 +487,25 @@ - then - if test $Fnroff = "missing" - then -- nroff="nroff -Tlatin1 -mandoc" -+ nroff="nroff -Tutf8 -mandoc" - else -- nroff="$Fnroff -Tlatin1 -mandoc" -+ nroff="$Fnroff -Tutf8 -mandoc" - fi - troff="troff -mandoc" - echo "Warning: could not find groff" - else - if test $Fnroff = "missing" - then -- nroff="$Fgroff -Tlatin1 -mandoc" -+ nroff="$Fgroff -Tutf8 -mandoc" - else -- nroff="$Fnroff -Tlatin1 -mandoc" -+ nroff="$Fnroff -Tutf8 -mandoc" - fi - troff="$Fgroff -Tps -mandoc" -- jnroff="$Fgroff -Tnippon -mandocj" -+ jnroff="$Fjnroff -Tutf8 -mandocj" - fi - eqn="$Fgeqn -Tps" -- neqn="$Fgeqn -Tlatin1" -- jneqn="$Fgeqn -Tnippon" -+ neqn="$Fgeqn -Tutf8" -+ jneqn="$Fgeqn -Tutf8" - tbl="$Fgtbl" - col="$Fcol" - vgrind="$Fvgrind" diff --git a/meta/recipes-extended/man/man/man-1.5k-confpath.patch b/meta/recipes-extended/man/man/man-1.5k-confpath.patch deleted file mode 100644 index b5746c2df8..0000000000 --- a/meta/recipes-extended/man/man/man-1.5k-confpath.patch +++ /dev/null @@ -1,15 +0,0 @@ -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - ---- configure 2006-05-01 19:56:14.000000000 +0200 -+++ configure.oden 2008-12-21 19:16:50.000000000 +0100 -@@ -198,7 +198,7 @@ - confdir="${confprefix}/share/misc" - fi - fi --conffilename="man.conf" -+conffilename="man.config" - - if test "$RANDOM" = "$RANDOM"; then - # Plain old Bourne shell. diff --git a/meta/recipes-extended/man/man/man-1.5k-nonascii.patch b/meta/recipes-extended/man/man/man-1.5k-nonascii.patch deleted file mode 100644 index d662d9b6a7..0000000000 --- a/meta/recipes-extended/man/man/man-1.5k-nonascii.patch +++ /dev/null @@ -1,18 +0,0 @@ -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - ---- ./src/apropos.sh.nonascii 2001-11-23 00:30:42.000000000 +0100 -+++ ./src/apropos.sh 2002-08-13 15:44:53.000000000 +0200 -@@ -18,9 +18,9 @@ - - # When man pages in your favorite locale look to grep like binary files - # (and you use GNU grep) you may want to add the 'a' option to *grepopt1. --aproposgrepopt1='i' -+aproposgrepopt1='ia' - aproposgrepopt2='' --whatisgrepopt1='iw' -+whatisgrepopt1='iwa' - whatisgrepopt2='^' - grepopt1=$%apropos_or_whatis%grepopt1 - grepopt2=$%apropos_or_whatis%grepopt2 diff --git a/meta/recipes-extended/man/man/man-1.5k-sofix.patch b/meta/recipes-extended/man/man/man-1.5k-sofix.patch deleted file mode 100644 index 50b925288e..0000000000 --- a/meta/recipes-extended/man/man/man-1.5k-sofix.patch +++ /dev/null @@ -1,24 +0,0 @@ -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - ---- man-1.5j/src/man.c.sofix Thu Nov 22 14:51:44 2001 -+++ man-1.5j/src/man.c Thu Nov 22 14:52:44 2001 -@@ -300,7 +300,7 @@ - - if (strlen(name0) >= sizeof(ultname)) - return name0; -- strcpy(ultname, name0); -+ strncpy(ultname, name0, BUFSIZE-32); - name = ultname; - - again: -@@ -332,7 +332,7 @@ - * .so files - we could glob for all possible extensions, - * for now: only try .gz - */ -- else if (fp == NULL && get_expander(".gz") && -+ if (fp == NULL && get_expander(".gz") && - strlen(name)+strlen(".gz") < BUFSIZE) { - strcat(name, ".gz"); - fp = fopen (name, "r"); diff --git a/meta/recipes-extended/man/man/man-1.5m2-bug11621.patch b/meta/recipes-extended/man/man/man-1.5m2-bug11621.patch deleted file mode 100644 index 051299906b..0000000000 --- a/meta/recipes-extended/man/man/man-1.5m2-bug11621.patch +++ /dev/null @@ -1,15 +0,0 @@ -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - ---- ./configure.ad 2003-12-11 19:17:10.000000000 +0100 -+++ ./configure 2003-12-11 19:17:27.000000000 +0100 -@@ -26,7 +26,7 @@ - # (Indeed, -r may cause the terminal to get into funny states. - # Very inconvenient. For viewing pages in strange locales, set LC_*.) - # --DEFAULTLESSOPT="-is" -+DEFAULTLESSOPT="-isr" - # - # Note that not creating any cat directories (/var/cache/man or so) - # and not making man suid or sgid is recommended. diff --git a/meta/recipes-extended/man/man/man-1.5m2-buildroot.patch b/meta/recipes-extended/man/man/man-1.5m2-buildroot.patch deleted file mode 100644 index bc97f56b9a..0000000000 --- a/meta/recipes-extended/man/man/man-1.5m2-buildroot.patch +++ /dev/null @@ -1,52 +0,0 @@ -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - ---- ./configure.less 2003-12-11 19:18:15.000000000 +0100 -+++ ./configure 2003-12-11 19:20:03.000000000 +0100 -@@ -401,18 +401,13 @@ - - if test "$ans" = "false" - then -- for i in more less cmp cat awk gawk mawk -- do -- eval F$i="missing" -- for j in $DEFPATH -- do -- if test -f $j/$i -- then -- eval F$i=$j/$i -- break -- fi -- done -- done -+ Fmore=/bin/more -+ Fless=/usr/bin/less -+ Fcmp=/usr/bin/cmp -+ Fcat=/bin/cat -+ Fgawk=/bin/gawk -+ Fawk=/bin/gawk -+ Fmawk=missing - troff="" - nroff="" - jnroff="" -@@ -457,6 +452,19 @@ - fi - done - done -+ Fgroff=/usr/bin/groff -+ Fgeqn=/usr/bin/geqn -+ Fgtbl=/usr/bin/gtbl -+ Fcol=/usr/bin/col -+ Fgrefer=/usr/bin/grefer -+ Fgpic=/usr/bin/gpic -+ Fmore=/bin/more -+ Fless=/usr/bin/less -+ Fcmp=/usr/bin/cmp -+ Fcat=/bin/cat -+ Fgawk=/bin/gawk -+ -+ - for i in eqn tbl refer pic - do - if test `eval echo \\$Fg$i` = "missing" diff --git a/meta/recipes-extended/man/man/man-1.5m2-no-color-for-printing.patch b/meta/recipes-extended/man/man/man-1.5m2-no-color-for-printing.patch deleted file mode 100644 index c85ff1d8c7..0000000000 --- a/meta/recipes-extended/man/man/man-1.5m2-no-color-for-printing.patch +++ /dev/null @@ -1,15 +0,0 @@ -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - ---- man-1.5m2/configure.color 2006-09-16 18:27:37.000000000 +0200 -+++ man-1.5m2/configure 2006-09-16 18:28:44.000000000 +0200 -@@ -539,6 +539,8 @@ - troff="$troff -c" - nroff="$nroff -c" - jnroff="$jnroff -c" -+else -+ troff="$troff -c" - fi - - if [ x$default = x ]; then diff --git a/meta/recipes-extended/man/man/man-1.5m2-sigpipe.patch b/meta/recipes-extended/man/man/man-1.5m2-sigpipe.patch deleted file mode 100644 index 8af78eab7b..0000000000 --- a/meta/recipes-extended/man/man/man-1.5m2-sigpipe.patch +++ /dev/null @@ -1,30 +0,0 @@ -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - ---- man-1.5m2/src/util.c_sigpipe 2006-12-09 13:43:21.000000000 +0100 -+++ man-1.5m2/src/util.c 2006-12-09 13:53:13.000000000 +0100 -@@ -116,11 +116,14 @@ - static int - system1 (const char *command) { - void (*prev_handler)(int) = signal (SIGINT,catch_int); -+ signal (SIGPIPE,SIG_IGN); - int ret = system(command); - - /* child terminated with signal? */ - if (WIFSIGNALED(ret) && -- (WTERMSIG(ret) == SIGINT || WTERMSIG(ret) == SIGQUIT)) -+ (WTERMSIG(ret) == SIGINT || -+ WTERMSIG(ret) == SIGPIPE || -+ WTERMSIG(ret) == SIGQUIT)) - exit(1); - - /* or we caught an interrupt? */ -@@ -128,6 +131,7 @@ - exit(1); - - signal(SIGINT,prev_handler); -+ signal(SIGPIPE,SIG_DFL); - return ret; - } - diff --git a/meta/recipes-extended/man/man/man-1.5m2-tv_fhs.patch b/meta/recipes-extended/man/man/man-1.5m2-tv_fhs.patch deleted file mode 100644 index fe66d7599a..0000000000 --- a/meta/recipes-extended/man/man/man-1.5m2-tv_fhs.patch +++ /dev/null @@ -1,31 +0,0 @@ -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - ---- man/Makefile.in 2008-12-21 19:19:33.000000000 +0100 -+++ man/Makefile.in.oden 2008-12-21 19:19:39.000000000 +0100 -@@ -34,6 +34,15 @@ - for i in $(MAN8); \ - do if test -f $$i.8; then $(INSTALL) $$i.8 $(mandir)/man8/$$i.@man8ext@; fi; done - -+install-l10n: $(ALL) -+ mkdir -p $(mandir)/$(SLANG)/man1 $(mandir)/$(SLANG)/man5 $(mandir)/$(SLANG)/man8 -+ for i in $(MAN1); \ -+ do $(INSTALL) $$i.1 $(mandir)/$(SLANG)/man1/$$i.@man1ext@; done -+ for i in $(MAN5); \ -+ do $(INSTALL) $$i.5 $(mandir)/$(SLANG)/man5/$$i.@man5ext@; done -+ for i in $(MAN8); \ -+ do if test -f $$i.8; then $(INSTALL) $$i.8 $(mandir)/$(SLANG)/man8/$$i.@man8ext@; fi; done -+ - clean: - rm -f core *.in *.@man1ext@ *.@man5ext@ *.@man8ext@ *~ - -@@ -49,7 +58,7 @@ - @for i in @languages@; do if test -d $$i; then echo; \ - echo "==== Installing the `cat $$i.txt` man pages. ===="; \ - cd $$i; SLANG=/$$i; if test $$SLANG = /en; then SLANG= ; fi; \ -- export SLANG; make -f ../Makefile install; cd ..; \ -+ export SLANG; make -f ../Makefile install-l10n; cd ..; \ - else echo "==== No $$i man pages found. ===="; fi; done - - cleansubdirs: diff --git a/meta/recipes-extended/man/man/man-1.6e-i18n_whatis.patch b/meta/recipes-extended/man/man/man-1.6e-i18n_whatis.patch deleted file mode 100644 index e321325d63..0000000000 --- a/meta/recipes-extended/man/man/man-1.6e-i18n_whatis.patch +++ /dev/null @@ -1,145 +0,0 @@ -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - -diff -Naur man-1.6e.orig/src/apropos.sh man-1.6e/src/apropos.sh ---- man-1.6e.orig/src/apropos.sh 2007-05-18 13:49:31.000000000 -0300 -+++ man-1.6e/src/apropos.sh 2007-05-18 14:24:33.000000000 -0300 -@@ -60,16 +60,56 @@ - esac - done - -+# list of languages to look for -+LANG_LIST=`echo $LANGUAGE:$LC_ALL:$LC_MESSAGES:$LANG | tr ':' ' '` -+DIR_LIST="" -+for d in /var/cache/man $manpath /usr/lib -+do -+ for l in $LANG_LIST -+ do -+ if [ -d $d/$l ] -+ then -+ # check that the path is not already in the list -+ if ! echo "$DIR_LIST" | grep " $d/$l\b" > /dev/null -+ then -+ DIR_LIST="$DIR_LIST $d/$l" -+ fi -+ fi -+ done -+ DIR_LIST="$DIR_LIST $d" -+ # check that the path is not already in the list -+ if ! echo "$DIR_LIST" | grep " $d\b" > /dev/null -+ then -+ DIR_LIST="$DIR_LIST $d/$l" -+ fi -+done -+ - while [ "$1" != "" ] - do - found=0 -- for d in /var/cache/man $manpath /usr/lib -+ # in order not to display lines in more than one language for -+ # a same man page; we check that a given man page name -+ # hasn't already been displayed -+ BAZ="" -+ for d in $DIR_LIST - do - if [ -f $d/whatis ] - then -- if grep -"$grepopt1" "$grepopt2""$1" $d/whatis -+ if FOO=`grep -"$grepopt1" "$grepopt2""$1" $d/whatis` - then -- found=1 -+ # the LC_ALL=C is needed in case the text is -+ # in a different encoding than the locale -+ BAR=`echo -e "$FOO" | LC_ALL=C sed 's/ - .*$//' | tr ' []' '_' | sort -u` -+ for i in $BAR -+ do -+ if ! echo "$BAZ" | grep "$i" > /dev/null -+ then -+ BAZ="$BAZ $i" -+ i="^`echo $i | sed 's:_\+:\\\(\[_ \]\\\|\\\[\\\|\\\]\\\)\\\+:g'`" -+ echo -e "$FOO" | grep "$i" -+ found=1 -+ fi -+ done - # Some people are satisfied with a single occurrence - # But it is better to give all - # break -diff -Naur man-1.6e.orig/src/makewhatis.sh man-1.6e/src/makewhatis.sh ---- man-1.6e.orig/src/makewhatis.sh 2007-05-18 13:49:31.000000000 -0300 -+++ man-1.6e/src/makewhatis.sh 2007-05-18 13:50:07.000000000 -0300 -@@ -41,12 +41,32 @@ - - program=`basename $0` - -+# this allows to define language specific values fro NAME, DESCRIPTION -+# if not defined, using those default values -+if [ -z "$MAN_NAME" ] -+then -+ MAN_NAME="ИМЕ|NOM|JMÉNO|NAVN|ΟÎΟΜΑ|NOMBRE|NIME|IZENA|NIMI|IME|\ -+NÉV|NOME|åå‰|ì´ë¦„|NAAM|NAZWA|NUME|ИМЯ|MENO|ÐÐЗВÐ|å称|å稱" -+fi -+if [ -z "$MAN_DESCRIPTION" ] -+then -+ MAN_DESCRIPTION="ОПИСÐÐИЕ|DESCRIPCIÓ|POPIS|BESKRIVELSE|BESCHREIBUNG|\ -+ΠΕΡΙΓΡΑΦΗ|DESCRIPCIÓN|KIRJELDUS|AZALPENA|KUVAUS|OPIS|LEÃRÃS|DESCRIZIONE|\ -+説明|설명|BESCHRIJVING|DESCRIÇÃO|DESCRIERE|ОПИС|æè¿°" -+fi -+# make them into awk regexp -+MAN_NAME="^(${MAN_NAME})"; -+MAN_DESCRIPTION="^(${MAN_DESCRIPTION})"; -+ - # In case both /usr/man and /usr/share/man exist, the former is local - # and should be first. - # It is a bug to add /var/cache/man to DEFCATPATH. - dm= - for d in /usr/share/man /usr/man /usr/X11R6/man /usr/local/man - do -+ if [ -n "$LANG" -a -d "$d/$LANG" ]; then -+ if [ x$dm = x ]; then dm="$d/$LANG"; else dm=$dm:"$d/$LANG"; fi -+ fi - if [ -d $d ]; then - if [ x$dm = x ]; then dm=$d; else dm=$dm:$d; fi - fi -@@ -55,6 +75,9 @@ - dc= - for d in /var/cache/man /usr/share/man/preformat /usr/man/preformat /usr/share/man /usr/man - do -+ if [ -n "$LANG" -a -d "$d/$LANG" ]; then -+ if [ x$dc = x ]; then dm="$d/$LANG"; else dm=$dc:"$d/$LANG"; fi -+ fi - if [ -d $d ]; then - if [ x$dc = x ]; then dc=$d; else dc=$dc:$d; fi - fi -@@ -194,7 +217,7 @@ - section=$i - curdir=$mandir/${pages}$i - export section verbose curdir -- find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | $AWK ' -+ find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | LC_ALL=C $AWK -v MAN_NAME="$MAN_NAME" -v MAN_DESCRIPTION="$MAN_DESCRIPTION" ' - - function readline() { - if (use_zcat || use_bzcat) { -@@ -261,13 +284,7 @@ - gsub(/.\b/, ""); - if (($1 ~ /^\.[Ss][Hh]/ && - ($2 ~ /[Nn][Aa][Mm][Ee]/ || -- $2 ~ /^JMÉNO/ || $2 ~ /^NAVN/ || $2 ~ /^NUME/ || -- $2 ~ /^BEZEICHNUNG/ || $2 ~ /^NOMBRE/ || -- $2 ~ /^NIMI/ || $2 ~ /^NOM/ || $2 ~ /^IME/ || -- $2 ~ /^N[ÉE]V/ || $2 ~ /^NAMA/ || $2 ~ /^̾Á°/ || -- $2 ~ /^̾¾Î/ || $2 ~ /^À̸§/ || $2 ~ /^NAZWA/ || -- $2 ~ /^îáú÷áîéå/ || $2 ~ /^Ãû³Æ/ || $2 ~ /^¦WºÙ/ || -- $2 ~ /^NOME/ || $2 ~ /^NAAM/ || $2 ~ /^ÈÌÅ/)) || -+ $2 ~ MAN_NAME )) || - (pages == "cat" && $1 ~ /^NAME/)) { - if (!insh) { - insh = 1; -@@ -278,6 +295,7 @@ - if ($1 ~ /^\.[Ss][HhYS]/ || - (pages == "cat" && - ($1 ~ /^S[yYeE]/ || $1 ~ /^DESCRIPTION/ || -+ $1 ~ MAN_DESCRIPTION || - $1 ~ /^COMMAND/ || $1 ~ /^OVERVIEW/ || - $1 ~ /^STRUCTURES/ || $1 ~ /^INTRODUCTION/ || - $0 ~ /^[^ ]/))) { diff --git a/meta/recipes-extended/man/man/man-1.6e-mandirs.patch b/meta/recipes-extended/man/man/man-1.6e-mandirs.patch deleted file mode 100644 index b240064c98..0000000000 --- a/meta/recipes-extended/man/man/man-1.6e-mandirs.patch +++ /dev/null @@ -1,31 +0,0 @@ -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - ---- man-1.6e.orig/src/man.conf.in 2005-08-20 20:26:06.000000000 -0300 -+++ man-1.6e/src/man.conf.in 2007-05-18 10:30:29.000000000 -0300 -@@ -36,11 +36,12 @@ - # - # Every automatically generated MANPATH includes these fields - # --MANPATH /usr/man - MANPATH /usr/share/man -+MANPATH /usr/X11R6/man - MANPATH /usr/local/man - MANPATH /usr/local/share/man --MANPATH /usr/X11R6/man -+MANPATH /usr/kerberos/man -+MANPATH /usr/man - # - # Uncomment if you want to include one of these by default - # -@@ -67,6 +68,9 @@ - MANPATH_MAP /usr/X11R6/bin /usr/X11R6/man - MANPATH_MAP /usr/bin/X11 /usr/X11R6/man - MANPATH_MAP /usr/bin/mh /usr/share/man -+MANPATH_MAP /usr/kerberos/bin /usr/kerberos/man -+MANPATH_MAP /usr/kerberos/sbin /usr/kerberos/man -+ - # - # NOAUTOPATH keeps man from automatically adding directories that look like - # manual page directories to the path. diff --git a/meta/recipes-extended/man/man/man-1.6e-new_sections.patch b/meta/recipes-extended/man/man/man-1.6e-new_sections.patch deleted file mode 100644 index fb9773c646..0000000000 --- a/meta/recipes-extended/man/man/man-1.6e-new_sections.patch +++ /dev/null @@ -1,15 +0,0 @@ -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - ---- man-1.6e.orig/configure 2006-05-01 14:56:14.000000000 -0300 -+++ man-1.6e/configure 2007-05-18 14:35:43.000000000 -0300 -@@ -960,7 +960,7 @@ - - # What sections do we anticipate? - --tmpsections="1 1p 8 2 3 3p 4 5 6 7 9 0p tcl n l p o" -+tmpsections="1 1p 8 2 3 3p 3pm 4 5 6 7 9 0p tcl n l p o" - - if [ x$default = x ]; then - echo "" diff --git a/meta/recipes-extended/man/man/man-1.6e-ro_usr.patch b/meta/recipes-extended/man/man/man-1.6e-ro_usr.patch deleted file mode 100644 index 1d1cb0c724..0000000000 --- a/meta/recipes-extended/man/man/man-1.6e-ro_usr.patch +++ /dev/null @@ -1,33 +0,0 @@ -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - -Index: man-1.6f/src/makewhatis.sh -=================================================================== ---- man-1.6f.orig/src/makewhatis.sh 2010-12-29 13:42:34.000000000 -0800 -+++ man-1.6f/src/makewhatis.sh 2010-12-29 13:42:35.667428347 -0800 -@@ -124,7 +124,7 @@ - continue;; - -s) setsections=1 - continue;; -- -u) findarg="-ctime 0" -+ -u) findarg="-newer /var/cache/man/whatis" - update=1 - continue;; - -v) verbose=1 -@@ -165,14 +165,7 @@ - # first truncate all the whatis files that will be created new, - # then only update - we might visit the same directory twice - if [ x$update = x ]; then -- for pages in man cat -- do -- eval path="\$$pages"path -- for mandir in $path -- do -- cp /dev/null $mandir/whatis -- done -- done -+ cp /dev/null /var/cache/man/whatis - fi - - for pages in man cat diff --git a/meta/recipes-extended/man/man/man-1.6e-security.patch b/meta/recipes-extended/man/man/man-1.6e-security.patch deleted file mode 100644 index 312a882f06..0000000000 --- a/meta/recipes-extended/man/man/man-1.6e-security.patch +++ /dev/null @@ -1,62 +0,0 @@ -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - -diff -Naur man-1.6e.orig/src/makewhatis.sh man-1.6e/src/makewhatis.sh ---- man-1.6e.orig/src/makewhatis.sh 2006-07-19 01:58:08.000000000 -0300 -+++ man-1.6e/src/makewhatis.sh 2007-05-18 10:18:31.000000000 -0300 -@@ -45,7 +45,7 @@ - # and should be first. - # It is a bug to add /var/cache/man to DEFCATPATH. - dm= --for d in /usr/man /usr/share/man /usr/X11R6/man /usr/local/man -+for d in /usr/share/man /usr/man /usr/X11R6/man /usr/local/man - do - if [ -d $d ]; then - if [ x$dm = x ]; then dm=$d; else dm=$dm:$d; fi -@@ -53,7 +53,7 @@ - done - DEFMANPATH=$dm - dc= --for d in /usr/man/preformat /usr/man /usr/share/man/preformat /usr/share/man -+for d in /var/cache/man /usr/share/man/preformat /usr/man/preformat /usr/share/man /usr/man - do - if [ -d $d ]; then - if [ x$dc = x ]; then dc=$d; else dc=$dc:$d; fi -@@ -76,12 +76,12 @@ - # We try here to be careful (and avoid preconstructed symlinks) - # in case makewhatis is run as root, by creating a subdirectory of /tmp. - --TMPFILEDIR=/tmp/whatis.tmp.dir.$$ --rm -rf $TMPFILEDIR --if ! mkdir -m 0700 $TMPFILEDIR; then -- echo Could not create $TMPFILEDIR -- exit 1; -+TMPFILEDIR=`mktemp -d /tmp/makewhatisXXXXXX` -+if [ $? -ne 0 ]; then -+ echo "$0: Can't create temp file, exiting..." -+ exit 1 - fi -+chmod 0700 $TMPFILEDIR - TMPFILE=$TMPFILEDIR/w - - # make sure TMPFILEDIR is deleted if program is killed or terminates -diff -Naur man-1.6e.orig/src/man.c man-1.6e/src/man.c ---- man-1.6e.orig/src/man.c 2006-05-01 17:34:22.000000000 -0300 -+++ man-1.6e/src/man.c 2007-05-18 10:11:33.000000000 -0300 -@@ -1234,7 +1234,6 @@ - #endif - - --#if 0 - { - /* There are no known cases of buffer overflow caused by - excessively long environment variables. In case you find one, -@@ -1257,7 +1256,6 @@ - MAN_ICONV_PATH, MAN_ICONV_OPT, MAN_ICONV_INPUT_CHARSET, - MAN_ICONV_OUTPUT_CHARSET, NLSPATH, PATH */ - } --#endif - - - #ifndef __FreeBSD__ diff --git a/meta/recipes-extended/man/man/man-1.6e-use_i18n_vars_in_a_std_way.patch b/meta/recipes-extended/man/man/man-1.6e-use_i18n_vars_in_a_std_way.patch deleted file mode 100644 index 568f742100..0000000000 --- a/meta/recipes-extended/man/man/man-1.6e-use_i18n_vars_in_a_std_way.patch +++ /dev/null @@ -1,160 +0,0 @@ -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - -diff -Naur man-1.6e.orig/catopen/catopen.c man-1.6e/catopen/catopen.c ---- man-1.6e.orig/catopen/catopen.c 2005-08-20 20:26:06.000000000 -0300 -+++ man-1.6e/catopen/catopen.c 2007-05-18 11:31:05.000000000 -0300 -@@ -9,22 +9,63 @@ - extern char *index (const char *, int); /* not always in <string.h> */ - extern char *my_malloc(int); /* in util.c */ - -+/* if the program has sgid/suid privileges then getenv doesn't return -+ * NLSPATH; so we set here a good default value. -+ */ - #ifndef DEFAULT_NLSPATH - # if __GLIBC__ >= 2 --# define DEFAULT_NLSPATH "/usr/share/locale/%L/%N" -+# define DEFAULT_NLSPATH "/usr/share/locale/%L/%N:/usr/share/locale/%l_%t/%N:/usr/share/locale/%l/%N" - # else - # define DEFAULT_NLSPATH "/usr/lib/locale/%N/%L" - # endif - #endif - --static nl_catd my_catopenpath(char *name, char *path); -+static nl_catd my_catopenpath(char *name, char *path, char *lang); - - static /* this source included in gripes.c */ - nl_catd - my_catopen(char *name, int oflag) { -- nl_catd fd; -+ nl_catd fd = (nl_catd) -1; -+ -+ /* using first the my_catopenpath, which looks with LANGUAGE -+ * and only if it fails ressort to catopen, it gives better i18n -+ */ -+ { -+ char *nlspath, *lang, *s; - -- fd = catopen(name, oflag); -+ /* -+ * "If NLSPATH does not exist in the environment, or if a -+ * message catalog cannot be opened in any of the paths specified -+ * by NLSPATH, then an implementation defined default path is used" -+ */ -+ nlspath = getenv("NLSPATH"); -+ if (!nlspath) -+ nlspath = DEFAULT_NLSPATH; -+ -+ lang = getenv("LANGUAGE"); -+ if (!lang) -+ lang = getenv("LC_ALL"); -+ if (!lang) -+ lang = getenv("LC_MESSAGES"); -+ if (!lang) -+ lang = getenv("LANG"); -+ if (!lang) -+ lang = ""; -+ -+ while(*lang && (fd == (nl_catd) -1)) { -+ s = index(lang, ':'); -+ if (s) *s = 0; -+ fd = my_catopenpath(name, nlspath, lang); -+ if (s) lang=s+1; -+ else lang = ""; -+ } -+ if (fd == (nl_catd) -1) -+ fd = my_catopenpath(name, nlspath, "en"); -+ } -+ -+ /* still not found, use the system catopen */ -+ if (fd == (nl_catd) -1) -+ fd = catopen(name, oflag); - - if (fd == (nl_catd) -1 && oflag) { - oflag = 0; -@@ -32,8 +73,6 @@ - } - - if (fd == (nl_catd) -1) { -- char *nlspath; -- - /* The libc catopen fails - let us see if we can do better */ - /* The quotes below are from X/Open, XPG 1987, Vol. 3. */ - -@@ -58,17 +97,6 @@ - #endif - } - -- /* -- * "If NLSPATH does not exist in the environment, or if a -- * message catalog cannot be opened in any of the paths specified -- * by NLSPATH, then an implementation defined default path is used" -- */ -- -- nlspath = getenv("NLSPATH"); -- if (nlspath) -- fd = my_catopenpath(name, nlspath); -- if (fd == (nl_catd) -1) -- fd = my_catopenpath(name, DEFAULT_NLSPATH); - } - return fd; - } -@@ -90,15 +118,13 @@ - * - */ - static nl_catd --my_catopenpath(char *name, char *nlspath) { -- int fd; -+my_catopenpath(char *name, char *nlspath, char *lang) { - nl_catd cfd = (nl_catd) -1; -- char *path0, *path, *s, *file, *lang, *lang_l, *lang_t, *lang_c; -+ char *path0, *path, *s, *file, *lang_l, *lang_t, *lang_c; - int langsz, namesz, sz, lang_l_sz, lang_t_sz, lang_c_sz; - - namesz = strlen(name); - -- lang = getenv("LANG"); - if (!lang) - lang = ""; - langsz = strlen(lang); -@@ -194,14 +220,9 @@ - path = s+1; - } else - path = 0; -- fd = open(file, O_RDONLY); -- if (fd != -1) { -- /* we found the right catalog - but we don't know the -- type of nl_catd, so close it again and ask libc */ -- close(fd); -- cfd = catopen(file, 0); -- break; -- } -+ cfd = catopen(file, 0); -+ if (cfd != (nl_catd) -1) -+ break; - } - - free(path0); -diff -Naur man-1.6e.orig/src/manpath.c man-1.6e/src/manpath.c ---- man-1.6e.orig/src/manpath.c 2006-08-03 18:18:33.000000000 -0300 -+++ man-1.6e/src/manpath.c 2007-05-18 11:02:48.000000000 -0300 -@@ -282,13 +282,14 @@ - /* We cannot use "lang = setlocale(LC_MESSAGES, NULL)" or so: - the return value of setlocale is an opaque string. */ - /* POSIX prescribes the order: LC_ALL, LC_MESSAGES, LANG */ -- if((lang = getenv("LC_ALL")) != NULL) -+ /* LANGUAGE is GNU/Linux and overrules all */ -+ if((lang = getenv("LANGUAGE")) != NULL) - split2(dir, lang, add_to_mandirlist_x, perrs); -- if((lang = getenv("LC_MESSAGES")) != NULL) -+ else if((lang = getenv("LC_ALL")) != NULL) - split2(dir, lang, add_to_mandirlist_x, perrs); -- if((lang = getenv("LANG")) != NULL) -+ else if((lang = getenv("LC_MESSAGES")) != NULL) - split2(dir, lang, add_to_mandirlist_x, perrs); -- if((lang = getenv("LANGUAGE")) != NULL) -+ else if((lang = getenv("LANG")) != NULL) - split2(dir, lang, add_to_mandirlist_x, perrs); - add_to_mandirlist_x(dir, 0, perrs); - } diff --git a/meta/recipes-extended/man/man/man-1.6e-whatis2.patch b/meta/recipes-extended/man/man/man-1.6e-whatis2.patch deleted file mode 100644 index fc4ed3135d..0000000000 --- a/meta/recipes-extended/man/man/man-1.6e-whatis2.patch +++ /dev/null @@ -1,59 +0,0 @@ -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - -Index: man-1.6f/src/makewhatis.sh -=================================================================== ---- man-1.6f.orig/src/makewhatis.sh 2010-12-29 13:51:45.000000000 -0800 -+++ man-1.6f/src/makewhatis.sh 2010-12-29 13:59:35.399799412 -0800 -@@ -164,10 +164,15 @@ - fi - catpath=`echo ${catpath} | tr : ' '` - -+#WHATIS_DIR=$DESTDIR/var/cache/man/`echo $here|sed -e 's!.*/man/!!g'` -+WHATIS_DIR=$DESTDIR/var/cache/man/$LANG -+[[ -d $WHATIS_DIR ]] || mkdir -p $WHATIS_DIR/ -+ - # first truncate all the whatis files that will be created new, - # then only update - we might visit the same directory twice - if [ x$update = x ]; then -- cp /dev/null /var/cache/man/whatis -+ mkdir -p $WHATIS_DIR/ -+ /bin/echo -n > $WHATIS_DIR/whatis - fi - - for pages in man cat -@@ -180,13 +185,7 @@ - echo "about to enter $mandir" > /dev/stderr - fi - -- # kludge for Slackware's /usr/man/preformat -- if [ $mandir = /usr/man/preformat ] -- then -- mandir1=/usr/man -- else -- mandir1=$mandir -- fi -+ mandir1=$WHATIS_DIR - - # if $mandir is on a readonly partition, and the whatis file - # is not a symlink, then let's skip trying to update it -@@ -207,11 +206,6 @@ - fi - fi - -- if [ -s ${mandir}/whatis -a $pages = man -a x$update = x ]; then -- if [ x$verbose != x ]; then -- echo skipping $mandir - we did it already > /dev/stderr -- fi -- else - here=`pwd` - cd $mandir - for i in $sections -@@ -447,7 +447,6 @@ - - chmod 644 ${mandir1}/whatis - rm $TMPFILE -- fi - done - done diff --git a/meta/recipes-extended/man/man/man-1.6g-whatis3.patch b/meta/recipes-extended/man/man/man-1.6g-whatis3.patch deleted file mode 100644 index 6334456857..0000000000 --- a/meta/recipes-extended/man/man/man-1.6g-whatis3.patch +++ /dev/null @@ -1,20 +0,0 @@ -Do not use absolute path for awk while getting the path of awk -when running makewhatis. -This can avoid errors if path of awk changes. - -Upstream-Status: Submitted [man-1.6g] - -Signed-off-by: Jian Liu <jian.liu@windriver.com> - -diff -Nur man-1.6g.orig/src/makewhatis.sh man-1.6g/src/makewhatis.sh ---- man-1.6g.orig/src/makewhatis.sh 2015-02-25 16:13:12.657611419 +0800 -+++ man-1.6g/src/makewhatis.sh 2015-02-25 16:14:49.334694815 +0800 -@@ -67,7 +67,7 @@ - # but that leads to problems and bugs. - - # AWK=/usr/bin/gawk --AWK=@awk@ -+AWK=`which awk` - - # Find a place for our temporary files. If security is not a concern, use - # TMPFILE=/tmp/whatis$$; TMPFILEDIR=none diff --git a/meta/recipes-extended/man/man/man.1.gz b/meta/recipes-extended/man/man/man.1.gz Binary files differdeleted file mode 100644 index c368045153..0000000000 --- a/meta/recipes-extended/man/man/man.1.gz +++ /dev/null diff --git a/meta/recipes-extended/man/man/man.7.gz b/meta/recipes-extended/man/man/man.7.gz Binary files differdeleted file mode 100644 index e85af82426..0000000000 --- a/meta/recipes-extended/man/man/man.7.gz +++ /dev/null diff --git a/meta/recipes-extended/man/man/man.conf b/meta/recipes-extended/man/man/man.conf deleted file mode 100644 index fc10be2758..0000000000 --- a/meta/recipes-extended/man/man/man.conf +++ /dev/null @@ -1,141 +0,0 @@ -# -# Generated automatically from man.conf.in by the -# configure script. -# -# man.conf from man-1.5p -# -# For more information about this file, see the man pages man(1) -# and man.conf(5). -# -# This file is read by man to configure the default manpath (also used -# when MANPATH contains an empty substring), to find out where the cat -# pages corresponding to given man pages should be stored, -# and to map each PATH element to a manpath element. -# It may also record the pathname of the man binary. [This is unused.] -# The format is: -# -# MANBIN pathname -# MANPATH manpath_element [corresponding_catdir] -# MANPATH_MAP path_element manpath_element -# -# If no catdir is given, it is assumed to be equal to the mandir -# (so that this dir has both man1 etc. and cat1 etc. subdirs). -# This is the traditional Unix setup. -# Certain versions of the FSSTND recommend putting formatted versions -# of /usr/.../man/manx/page.x into /var/catman/.../catx/page.x. -# The keyword FSSTND will cause this behaviour. -# Certain versions of the FHS recommend putting formatted versions of -# /usr/.../share/man/[locale/]manx/page.x into -# /var/cache/man/.../[locale/]catx/page.x. -# The keyword FHS will cause this behaviour (and overrides FSSTND). -# Explicitly given catdirs override. -# -# FSSTND -FHS -# -# This file is also read by man in order to find how to call nroff, less, etc., -# and to determine the correspondence between extensions and decompressors. -# -# MANBIN /usr/local/bin/man -# -# Every automatically generated MANPATH includes these fields -# -MANPATH /usr/man -MANPATH /usr/share/man -MANPATH /usr/local/man -MANPATH /usr/local/share/man -MANPATH /usr/X11R6/man -# -# Uncomment if you want to include one of these by default -# -# MANPATH /opt/*/man -# MANPATH /usr/lib/*/man -# MANPATH /usr/share/*/man -# MANPATH /usr/kerberos/man -# -# Set up PATH to MANPATH mapping -# -# If people ask for "man foo" and have "/dir/bin/foo" in their PATH -# and the docs are found in "/dir/man", then no mapping is required. -# -# The below mappings are superfluous when the right hand side is -# in the mandatory manpath already, but will keep man from statting -# lots of other nearby files and directories. -# -MANPATH_MAP /bin /usr/share/man -MANPATH_MAP /sbin /usr/share/man -MANPATH_MAP /usr/bin /usr/share/man -MANPATH_MAP /usr/sbin /usr/share/man -MANPATH_MAP /usr/local/bin /usr/local/share/man -MANPATH_MAP /usr/local/sbin /usr/local/share/man -MANPATH_MAP /usr/X11R6/bin /usr/X11R6/man -MANPATH_MAP /usr/bin/X11 /usr/X11R6/man -MANPATH_MAP /usr/bin/mh /usr/share/man -# -# NOAUTOPATH keeps man from automatically adding directories that look like -# manual page directories to the path. -# -#NOAUTOPATH -# -# NOCACHE keeps man from creating cache pages ("cat pages") -# (generally one enables/disable cat page creation by creating/deleting -# the directory they would live in - man never does mkdir) -# -#NOCACHE -# -# Useful paths - note that COL should not be defined when -# NROFF is defined as "groff -Tascii" or "groff -Tlatin1"; -# not only is it superfluous, but it actually damages the output. -# For use with utf-8, NROFF should be "nroff -mandoc" without -T option. -# (Maybe - but today I need -Tlatin1 to prevent double conversion to utf8.) -# -# If you have a new troff (version 1.18.1?) and its colored output -# causes problems, add the -c option to TROFF, NROFF, JNROFF. -# -TROFF /usr/bin/groff -Tps -mandoc -NROFF /usr/bin/nroff -Tlatin1 -mandoc -JNROFF /usr/bin/groff -Tnippon -mandocj -EQN /usr/bin/eqn -Tps -NEQN /usr/bin/eqn -Tlatin1 -JNEQN /usr/bin/eqn -Tnippon -TBL /usr/bin/tbl -# COL /usr/bin/col -REFER /usr/bin/refer -PIC /usr/bin/pic -VGRIND -GRAP -PAGER /usr/bin/less -isR -CAT /bin/cat -# -# The command "man -a xyzzy" will show all man pages for xyzzy. -# When CMP is defined man will try to avoid showing the same -# text twice. (But compressed pages compare unequal.) -# -CMP /usr/bin/cmp -s -# -# Compress cat pages -# -COMPRESS /bin/bzip2 -COMPRESS_EXT .bz2 -# -# Default manual sections (and order) to search if -S is not specified -# and the MANSECT environment variable is not set. -# -MANSECT 1:1p:8:2:3:3p:4:5:6:7:9:0p:tcl:n:l:p:o -# -# Default options to use when man is invoked without options -# This is mainly for the benefit of those that think -a should be the default -# Note that some systems have /usr/man/allman, causing pages to be shown twice. -# -#MANDEFOPTIONS -a -# -# Decompress with given decompressor when input file has given extension -# The command given must act as a filter. -# -.gz /bin/gunzip -c -.bz2 /usr/bin/bunzip2 -c -.xz /usr/bin/unxz -c -.z -.Z /bin/zcat -.F -.Y diff --git a/meta/recipes-extended/man/man/manpath.5.gz b/meta/recipes-extended/man/man/manpath.5.gz Binary files differdeleted file mode 100644 index c012ff8976..0000000000 --- a/meta/recipes-extended/man/man/manpath.5.gz +++ /dev/null diff --git a/meta/recipes-extended/man/man_1.6g.bb b/meta/recipes-extended/man/man_1.6g.bb deleted file mode 100644 index 6a4c734051..0000000000 --- a/meta/recipes-extended/man/man_1.6g.bb +++ /dev/null @@ -1,82 +0,0 @@ -SUMMARY = "Online documentation tools" -DESCRIPTION = "A set of documentation tools: man, apropos and whatis" -SECTION = "console/utils" -HOMEPAGE = "http://primates.ximian.com/~flucifredi/man" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" - -PR = "r1" - -DEPENDS = "groff less" - -def compress_pkg(d): - if "compress_doc" in (d.getVar("INHERIT", True) or "").split(): - compress = d.getVar("DOC_COMPRESS", True) - if compress == "gz": - return "gzip" - elif compress == "bz2": - return "bzip2" - elif compress == "xz": - return "xz" - return "" - -RDEPENDS_${PN} += "${@compress_pkg(d)}" - -SRC_URI = "http://pkgs.fedoraproject.org/lookaside/pkgs/man2html/${BP}.tar.gz/ba154d5796928b841c9c69f0ae376660/${BP}.tar.gz \ - file://man-1.5k-confpath.patch;striplevel=0 \ - file://man-1.5h1-make.patch \ - file://man-1.5k-nonascii.patch \ - file://man-1.6e-security.patch \ - file://man-1.6e-mandirs.patch \ - file://man-1.5m2-bug11621.patch \ - file://man-1.5k-sofix.patch \ - file://man-1.5m2-buildroot.patch \ - file://man-1.6e-ro_usr.patch \ - file://man-1.5i2-newline.patch;striplevel=0 \ - file://man-1.5j-utf8.patch \ - file://man-1.5i2-overflow.patch \ - file://man-1.5j-nocache.patch \ - file://man-1.5i2-initial.patch \ - file://man-1.5h1-gencat.patch;striplevel=0 \ - file://man-1.5g-nonrootbuild.patch \ - file://man-1.5m2-tv_fhs.patch;striplevel=0 \ - file://man-1.5j-i18n.patch \ - file://man-1.6e-whatis2.patch \ - file://man-1.6e-use_i18n_vars_in_a_std_way.patch \ - file://man-1.5m2-no-color-for-printing.patch \ - file://man-1.5m2-sigpipe.patch \ - file://man-1.6e-i18n_whatis.patch \ - file://man-1.6e-new_sections.patch \ - file://man.1.gz;unpack=false \ - file://man.7.gz;unpack=false \ - file://man.conf \ - file://manpath.5.gz;unpack=false \ - file://man-1.6g-whatis3.patch \ - file://configure_sed.patch \ -" - -SRC_URI[md5sum] = "ba154d5796928b841c9c69f0ae376660" -SRC_URI[sha256sum] = "ccdcb8c3f4e0080923d7e818f0e4a202db26c46415eaef361387c20995b8959f" - -do_configure () { - ${S}/configure -default -confdir /etc +sgid +fhs +lang all -} - - -do_install() { - oe_runmake install DESTDIR=${D} -} - -do_install_append(){ - mkdir -p ${D}${sysconfdir} - mkdir -p ${D}${datadir}/man/man5 - mkdir -p ${D}${datadir}/man/man7 - cp ${WORKDIR}/man.conf ${D}${sysconfdir}/man.config - cp ${WORKDIR}/man.1.gz ${D}${datadir}/man/man1/ - cp ${WORKDIR}/man.7.gz ${D}${datadir}/man/man7/ - cp ${WORKDIR}/manpath.5.gz ${D}${datadir}/man/man5/ -} - - -RDEPENDS_${PN} = "less groff" -FILES_${PN} += "${datadir}/locale ${sysconfdir}/man.config" diff --git a/meta/recipes-extended/mc/files/0001-mc-replace-perl-w-with-use-warnings.patch b/meta/recipes-extended/mc/files/0001-mc-replace-perl-w-with-use-warnings.patch new file mode 100644 index 0000000000..bf8037cd28 --- /dev/null +++ b/meta/recipes-extended/mc/files/0001-mc-replace-perl-w-with-use-warnings.patch @@ -0,0 +1,129 @@ +From cdc7c278212ae836eecb4cc9d42c29443cc128a0 Mon Sep 17 00:00:00 2001 +From: Robert Yang <liezhi.yang@windriver.com> +Date: Thu, 6 Apr 2017 02:24:28 -0700 +Subject: [PATCH] mc: replace "perl -w" with "use warnings" + +The shebang's max length is usually 128 as defined in +/usr/include/linux/binfmts.h: + #define BINPRM_BUF_SIZE 128 + +There would be errors when @PERL@ is longer than 128, use +'/usr/bin/env perl' can fix the problem, but '/usr/bin/env perl -w' +doesn't work: + +/usr/bin/env: perl -w: No such file or directory + +So replace "perl -w" with "use warnings" to make it work. + +The man2hlp.in already has "use warnings;", so just remove '-w' is OK. + +Upstream-Status: Pending + +Signed-off-by: Robert Yang <liezhi.yang@windriver.com> +--- + src/man2hlp/man2hlp.in | 2 +- + src/vfs/extfs/helpers/a+.in | 4 +++- + src/vfs/extfs/helpers/mailfs.in | 3 ++- + src/vfs/extfs/helpers/patchfs.in | 3 ++- + src/vfs/extfs/helpers/ulib.in | 4 +++- + src/vfs/extfs/helpers/uzip.in | 3 ++- + 6 files changed, 13 insertions(+), 6 deletions(-) + +diff --git a/src/man2hlp/man2hlp.in b/src/man2hlp/man2hlp.in +index f095830..558a674 100644 +--- a/src/man2hlp/man2hlp.in ++++ b/src/man2hlp/man2hlp.in +@@ -1,4 +1,4 @@ +-#! @PERL@ -w ++#! @PERL@ + # + # Man page to help file converter + # Copyright (C) 1994, 1995, 1998, 2000, 2001, 2002, 2003, 2004, 2005, +diff --git a/src/vfs/extfs/helpers/a+.in b/src/vfs/extfs/helpers/a+.in +index 579441c..fe446f4 100644 +--- a/src/vfs/extfs/helpers/a+.in ++++ b/src/vfs/extfs/helpers/a+.in +@@ -1,4 +1,4 @@ +-#! @PERL@ -w ++#! @PERL@ + # + # External filesystem for mc, using mtools + # Written Ludek Brukner <lubr@barco.cz>, 1997 +@@ -9,6 +9,8 @@ + + # These mtools components must be in PATH for this to work + ++use warnings; ++ + sub quote { + $_ = shift(@_); + s/([^\w\/.+-])/\\$1/g; +diff --git a/src/vfs/extfs/helpers/mailfs.in b/src/vfs/extfs/helpers/mailfs.in +index e9455be..059f41f 100644 +--- a/src/vfs/extfs/helpers/mailfs.in ++++ b/src/vfs/extfs/helpers/mailfs.in +@@ -1,6 +1,7 @@ +-#! @PERL@ -w ++#! @PERL@ + + use bytes; ++use warnings; + + # MC extfs for (possibly compressed) Berkeley style mailbox files + # Peter Daum <gator@cs.tu-berlin.de> (Jan 1998, mc-4.1.24) +diff --git a/src/vfs/extfs/helpers/patchfs.in b/src/vfs/extfs/helpers/patchfs.in +index ef407de..3ad4b53 100644 +--- a/src/vfs/extfs/helpers/patchfs.in ++++ b/src/vfs/extfs/helpers/patchfs.in +@@ -1,4 +1,4 @@ +-#! @PERL@ -w ++#! @PERL@ + # + # Written by Adam Byrtek <alpha@debian.org>, 2002 + # Rewritten by David Sterba <dave@jikos.cz>, 2009 +@@ -9,6 +9,7 @@ + + use bytes; + use strict; ++use warnings; + use POSIX; + use File::Temp 'tempfile'; + +diff --git a/src/vfs/extfs/helpers/ulib.in b/src/vfs/extfs/helpers/ulib.in +index 418611f..82c7ccf 100644 +--- a/src/vfs/extfs/helpers/ulib.in ++++ b/src/vfs/extfs/helpers/ulib.in +@@ -1,9 +1,11 @@ +-#! @PERL@ -w ++#! @PERL@ + # + # VFS to manage the gputils archives. + # Written by Molnár Károly (proton7@freemail.hu) 2012 + # + ++use warnings; ++ + my %month = ('jan' => '01', 'feb' => '02', 'mar' => '03', + 'apr' => '04', 'may' => '05', 'jun' => '06', + 'jul' => '07', 'aug' => '08', 'sep' => '09', +diff --git a/src/vfs/extfs/helpers/uzip.in b/src/vfs/extfs/helpers/uzip.in +index b1c4f90..c8eb335 100644 +--- a/src/vfs/extfs/helpers/uzip.in ++++ b/src/vfs/extfs/helpers/uzip.in +@@ -1,4 +1,4 @@ +-#! @PERL@ -w ++#! @PERL@ + # + # zip file archive Virtual File System for Midnight Commander + # Version 1.4.0 (2001-08-07). +@@ -9,6 +9,7 @@ + use POSIX; + use File::Basename; + use strict; ++use warnings; + + # + # Configuration options +-- +2.10.2 + diff --git a/meta/recipes-extended/mc/files/nomandate.patch b/meta/recipes-extended/mc/files/nomandate.patch new file mode 100644 index 0000000000..48bd73b110 --- /dev/null +++ b/meta/recipes-extended/mc/files/nomandate.patch @@ -0,0 +1,21 @@ +The man page date can vary depending upon the host perl, e.g. in Russian +some versions print 'июнÑ', others 'Июнь' or Polish 'czerwca' or 'czerwiec'. +Rather than depend upon perl-native to fix this, just remove the date from +the manpages. + +RP 2020/2/4 + +Upstream-Status: Inappropriate [OE specficic reproducibility workaround] +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Index: mc-4.8.23/doc/man/date-of-man-include.am +=================================================================== +--- mc-4.8.23.orig/doc/man/date-of-man-include.am ++++ mc-4.8.23/doc/man/date-of-man-include.am +@@ -1,5 +1,5 @@ + SED_PARAMETERS = \ +- -e "s/%DATE_OF_MAN_PAGE%/$${MAN_DATE}/g" \ ++ -e "s/%DATE_OF_MAN_PAGE%//g" \ + -e "s/%DISTR_VERSION%/@DISTR_VERSION@/g" \ + -e "s{%prefix%{@prefix@{g" \ + -e "s{%sysconfdir%{@sysconfdir@{g" \ diff --git a/meta/recipes-extended/mc/mc/mc-CTRL.patch b/meta/recipes-extended/mc/mc/mc-CTRL.patch deleted file mode 100644 index e23d9dd81c..0000000000 --- a/meta/recipes-extended/mc/mc/mc-CTRL.patch +++ /dev/null @@ -1,31 +0,0 @@ -Fix build with musl by ensuring CTRL is defined. - -musl does not define CTRL in <termios.h>, we could include <sys/ttydefaults.h> -explicitly but it's easier just to ensure CTRL is defined. - -This patch is taken from Sabotage Linux, the license statement for patches and -build scripts in Sabotage Linux says: - - To the extent possible under law, Christian Neukirchen has waived - all copyright and related or neighboring rights to this work. - - http://creativecommons.org/publicdomain/zero/1.0/ - -Therefore this should be good to include in OpenEmbedded. - -Signed-off-by: Paul Barker <paul@paulbarker.me.uk> - -Upstream-status: Accepted (should be included in v4.8.14) - -diff -u mc-4.8.1.7.org/lib/tty/tty-ncurses.c mc-4.8.1.7/lib/tty/tty-ncurses.c ---- mc-4.8.1.7.org/lib/tty/tty-ncurses.c -+++ mc-4.8.1.7/lib/tty/tty-ncurses.c -@@ -65,7 +65,7 @@ - - /*** file scope macro definitions ****************************************************************/ - --#if defined(_AIX) && !defined(CTRL) -+#if !defined(CTRL) - #define CTRL(x) ((x) & 0x1f) - #endif - diff --git a/meta/recipes-extended/mc/mc_4.7.5.2.bb b/meta/recipes-extended/mc/mc_4.7.5.2.bb deleted file mode 100644 index b47eb02323..0000000000 --- a/meta/recipes-extended/mc/mc_4.7.5.2.bb +++ /dev/null @@ -1,49 +0,0 @@ -SUMMARY = "Midnight Commander is an ncurses based file manager" -HOMEPAGE = "http://www.midnight-commander.org/" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" -SECTION = "console/utils" -DEPENDS = "ncurses glib-2.0" -RDEPENDS_${PN} = "ncurses-terminfo" - -PR = "r3" - -SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \ - file://mc-CTRL.patch \ - " - -SRC_URI[md5sum] = "bdae966244496cd4f6d282d80c9cf3c6" -SRC_URI[sha256sum] = "a68338862bb30017eb65ed569a58e80ab66ae8cef11c886440c9e9f4d1efc6ab" - -inherit autotools gettext pkgconfig - -EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x --without-samba" - -FILES_${PN}-dbg += "${libexecdir}/mc/.debug/" - -do_install_append () { - sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/* - sed -i -e '1s,#!.*python,#!${bindir}/env python,' ${D}${libexecdir}/mc/extfs.d/* -} - -PACKAGES =+ "${BPN}-helpers-perl ${BPN}-helpers-python ${BPN}-helpers ${BPN}-fish" - -SUMMARY_${BPN}-helpers-perl = "Midnight Commander Perl-based helper scripts" -FILES_${BPN}-helpers-perl = "${libexecdir}/mc/extfs.d/a+ ${libexecdir}/mc/extfs.d/apt+ \ - ${libexecdir}/mc/extfs.d/deb ${libexecdir}/mc/extfs.d/deba \ - ${libexecdir}/mc/extfs.d/debd ${libexecdir}/mc/extfs.d/dpkg+ \ - ${libexecdir}/mc/extfs.d/mailfs ${libexecdir}/mc/extfs.d/patchfs \ - ${libexecdir}/mc/extfs.d/rpms+ ${libexecdir}/mc/extfs.d/ulib \ - ${libexecdir}/mc/extfs.d/uzip" -RDEPENDS_${BPN}-helpers-perl = "perl" - -SUMMARY_${BPN}-helpers-python = "Midnight Commander Python-based helper scripts" -FILES_${BPN}-helpers-python = "${libexecdir}/mc/extfs.d/s3+ ${libexecdir}/mc/extfs.d/uc1541" -RDEPENDS_${BPN}-helpers-python = "python" - -SUMMARY_${BPN}-helpers = "Midnight Commander shell helper scripts" -FILES_${BPN}-helpers = "${libexecdir}/mc/extfs.d/* ${libexecdir}/mc/ext.d/*" - -SUMMARY_${BPN}-fish = "Midnight Commander Fish scripts" -FILES_${BPN}-fish = "${libexecdir}/mc/fish" - diff --git a/meta/recipes-extended/mc/mc_4.8.14.bb b/meta/recipes-extended/mc/mc_4.8.25.bb index 3b6c2ffec5..83c8a6ecf6 100644 --- a/meta/recipes-extended/mc/mc_4.8.14.bb +++ b/meta/recipes-extended/mc/mc_4.8.25.bb @@ -4,13 +4,14 @@ LICENSE = "GPLv3" LIC_FILES_CHKSUM = "file://COPYING;md5=270bbafe360e73f9840bd7981621f9c2" SECTION = "console/utils" DEPENDS = "ncurses glib-2.0 util-linux" -RDEPENDS_${PN} = "ncurses-terminfo" +RDEPENDS_${PN} = "ncurses-terminfo-base" +RRECOMMENDS_${PN} = "ncurses-terminfo" SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \ + file://0001-mc-replace-perl-w-with-use-warnings.patch \ + file://nomandate.patch \ " - -SRC_URI[md5sum] = "fe1cb75643c2bd4df64bbcf2dab76905" -SRC_URI[sha256sum] = "61fd0fd2280c3d09d7e0aec8ab001fc89dad8e4fd9941f386414667b55152ec5" +SRC_URI[sha256sum] = "407dc20f70082f26c7f5716406cb755cbb6cba3f2f13b841b79a991282d310c2" inherit autotools gettext pkgconfig @@ -21,16 +22,20 @@ PACKAGECONFIG ??= "" PACKAGECONFIG[smb] = "--enable-vfs-smb,--disable-vfs-smb,samba," PACKAGECONFIG[sftp] = "--enable-vfs-sftp,--disable-vfs-sftp,libssh2," -EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x" +EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x --disable-configure-args" -FILES_${PN}-dbg += "${libexecdir}/mc/.debug/" +CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'" +CACHED_CONFIGUREVARS += "ac_cv_path_PYTHON='/usr/bin/env python'" +CACHED_CONFIGUREVARS += "ac_cv_path_GREP='/usr/bin/env grep'" +CACHED_CONFIGUREVARS += "mc_cv_have_zipinfo=yes" do_install_append () { sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/* - sed -i -e '1s,#!.*python,#!${bindir}/env python,' ${D}${libexecdir}/mc/extfs.d/* + + rm ${D}${libexecdir}/mc/extfs.d/s3+ ${D}${libexecdir}/mc/extfs.d/uc1541 } -PACKAGES =+ "${BPN}-helpers-perl ${BPN}-helpers-python ${BPN}-helpers ${BPN}-fish" +PACKAGES =+ "${BPN}-helpers-perl ${BPN}-helpers ${BPN}-fish" SUMMARY_${BPN}-helpers-perl = "Midnight Commander Perl-based helper scripts" FILES_${BPN}-helpers-perl = "${libexecdir}/mc/extfs.d/a+ ${libexecdir}/mc/extfs.d/apt+ \ @@ -41,10 +46,6 @@ FILES_${BPN}-helpers-perl = "${libexecdir}/mc/extfs.d/a+ ${libexecdir}/mc/extfs. ${libexecdir}/mc/extfs.d/uzip" RDEPENDS_${BPN}-helpers-perl = "perl" -SUMMARY_${BPN}-helpers-python = "Midnight Commander Python-based helper scripts" -FILES_${BPN}-helpers-python = "${libexecdir}/mc/extfs.d/s3+ ${libexecdir}/mc/extfs.d/uc1541" -RDEPENDS_${BPN}-helpers-python = "python" - SUMMARY_${BPN}-helpers = "Midnight Commander shell helper scripts" FILES_${BPN}-helpers = "${libexecdir}/mc/extfs.d/* ${libexecdir}/mc/ext.d/*" diff --git a/meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch b/meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch new file mode 100644 index 0000000000..803a59b3ec --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch @@ -0,0 +1,31 @@ +From b273e892bd6aaafe448f84356abb78a6d463e784 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 7 Dec 2018 17:22:39 -0800 +Subject: [PATCH] Compute abs diff in a standard compliant way + +This make it a bit less implementation defined and silences clang +warning -Wabsolute-value + +| super-intel.c:2822:20: error: taking the absolute value of unsigned type 'unsi +gned long long' has no effect [-Werror,-Wabsolute-value] + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + super-intel.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/super-intel.c b/super-intel.c +index 6438987..10d7218 100644 +--- a/super-intel.c ++++ b/super-intel.c +@@ -2819,7 +2819,7 @@ static unsigned long long calc_component_size(struct imsm_map *map, + * 2048 blocks per each device. If the difference is higher it means + * that array size was expanded and num_data_stripes was not updated. + */ +- if ((unsigned int)abs(calc_dev_size - dev_size) > ++ if ((unsigned int)abs((int)calc_dev_size - (int)dev_size) > + (1 << SECT_PER_MB_SHIFT) * member_disks) { + component_size = dev_size / member_disks; + dprintf("Invalid num_data_stripes in metadata; expected=%llu, found=%llu\n", diff --git a/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch b/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch new file mode 100644 index 0000000000..298f276cd6 --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch @@ -0,0 +1,31 @@ +From a9166bf422da1001bac9cc819386bf39b7cd1b73 Mon Sep 17 00:00:00 2001 +From: "Maxin B. John" <maxin.john@intel.com> +Date: Tue, 9 Feb 2016 11:44:01 +0200 +Subject: [PATCH] Fix the path of corosync and dlm header files check + +Original Makefile will check headers on host instead of sysroot. +Fix it. + +Upstream-Status: Inappropriate [Yocto specific] + +Signed-off-by: Maxin B. John <maxin.john@intel.com> + +--- + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 2767ac6..46bf57b 100644 +--- a/Makefile ++++ b/Makefile +@@ -91,8 +91,8 @@ FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots + SYSTEMD_DIR=/lib/systemd/system + LIB_DIR=/usr/libexec/mdadm + +-COROSYNC:=$(shell [ -d /usr/include/corosync ] || echo -DNO_COROSYNC) +-DLM:=$(shell [ -f /usr/include/libdlm.h ] || echo -DNO_DLM) ++COROSYNC:=$(shell [ -f $(SYSROOT)/usr/include/corosync/cmap.h ] || echo -DNO_COROSYNC) ++DLM:=$(shell [ -f $(SYSROOT)/usr/include/libdlm.h ] || echo -DNO_DLM) + + DIRFLAGS = -DMAP_DIR=\"$(MAP_DIR)\" -DMAP_FILE=\"$(MAP_FILE)\" + DIRFLAGS += -DMDMON_DIR=\"$(MDMON_DIR)\" diff --git a/meta/recipes-extended/mdadm/files/0001-Revert-tests-wait-for-complete-rebuild-in-integrity-.patch b/meta/recipes-extended/mdadm/files/0001-Revert-tests-wait-for-complete-rebuild-in-integrity-.patch new file mode 100644 index 0000000000..b196084a5c --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-Revert-tests-wait-for-complete-rebuild-in-integrity-.patch @@ -0,0 +1,53 @@ +From 02a41c3fd560fb5250186dd6b3cff6b21daa2e2b Mon Sep 17 00:00:00 2001 +From: Mingli Yu <Mingli.Yu@windriver.com> +Date: Mon, 15 Jul 2019 14:12:24 +0800 +Subject: [PATCH] Revert "tests: wait for complete rebuild in integrity checks" + +This reverts commit e2a8e9dcf67a28bc722fa5ab2c49b0bc452d4d74 +as the logic "check state 'U*'" will make the test enters +infinite loop especially in qemu env, so revert it to +use the previous logic "check wait" which also used +commonly by other tests such as tests/02r5grow, tests/07revert-grow +and etc. + +Upstream-Status: Submitted[https://marc.info/?l=linux-raid&m=156317157314030&w=2] + +Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> +--- + tests/01r5integ | 2 +- + tests/01raid6integ | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/tests/01r5integ b/tests/01r5integ +index 48676a2..ffb30ce 100644 +--- a/tests/01r5integ ++++ b/tests/01r5integ +@@ -27,7 +27,7 @@ do + exit 1 + fi + mdadm $md0 -a $i +- while ! (check state 'U*'); do check wait; sleep 0.2; done ++ check wait + done + mdadm -S $md0 + done +diff --git a/tests/01raid6integ b/tests/01raid6integ +index 12f4d81..c6fcdae 100644 +--- a/tests/01raid6integ ++++ b/tests/01raid6integ +@@ -47,10 +47,10 @@ do + exit 1 + fi + mdadm $md0 -a $first +- while ! (check state 'U*_U*'); do check wait; sleep 0.2; done ++ check wait + done + mdadm $md0 -a $second +- while ! (check state 'U*'); do check wait; sleep 0.2; done ++ check wait + totest="$totest $second" + done + mdadm -S $md0 +-- +2.7.4 + diff --git a/meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch b/meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch new file mode 100644 index 0000000000..12bf6a5920 --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch @@ -0,0 +1,28 @@ +From 37c35f94d9d95dbd2b5f8a919f5478be51453590 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 13 Oct 2017 10:27:34 -0700 +Subject: [PATCH] Use CC to check for implicit-fallthrough warning support + +This warning it new in gcc7 and in cross compile case +its possible that build host gcc is version 7+ but the +cross compile used for compiling mdadm is < version 7 + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Pending +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 46bf57b..a075912 100644 +--- a/Makefile ++++ b/Makefile +@@ -53,7 +53,7 @@ ifdef WARN_UNUSED + CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3 + endif + +-FALLTHROUGH := $(shell gcc -v --help 2>&1 | grep "implicit-fallthrough" | wc -l) ++FALLTHROUGH := $(shell ${CC} -v --help 2>&1 | grep "implicit-fallthrough" | wc -l) + ifneq "$(FALLTHROUGH)" "0" + CWFLAGS += -Wimplicit-fallthrough=0 + endif diff --git a/meta/recipes-extended/mdadm/files/0001-fix-gcc-8-format-truncation-warning.patch b/meta/recipes-extended/mdadm/files/0001-fix-gcc-8-format-truncation-warning.patch new file mode 100644 index 0000000000..fa9c8cc835 --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-fix-gcc-8-format-truncation-warning.patch @@ -0,0 +1,39 @@ +From 3158d3788c2e0fb75ace2c89840bd8a977fb4cb0 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Fri, 14 Dec 2018 15:12:31 +0800 +Subject: [PATCH] fix gcc-8 format-truncation warning + +While compiling with `-Werror=format-truncation=', it failed +[snip] +|super0.c:236:32: error: 'snprintf' output may be truncated +before the last format character [-Werror=format-truncation=] +| snprintf(nb, sizeof(nb), "%4d", d); +| ^ +|super0.c:236:3: note: 'snprintf' output between 5 and 12 bytes +into a destination of size 11 +| snprintf(nb, sizeof(nb), "%4d", d); +[snip] + +Upstream-Status: Submitted [https://github.com/neilbrown/mdadm/pull/34] + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + super0.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/super0.c b/super0.c +index 756cab5..12c28da 100644 +--- a/super0.c ++++ b/super0.c +@@ -229,7 +229,7 @@ static void examine_super0(struct supertype *st, char *homehost) + d++) { + mdp_disk_t *dp; + char *dv; +- char nb[11]; ++ char nb[12]; + int wonly, failfast; + if (d>=0) dp = &sb->disks[d]; + else dp = &sb->this_disk; +-- +2.7.4 + diff --git a/meta/recipes-extended/mdadm/files/0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch b/meta/recipes-extended/mdadm/files/0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch new file mode 100644 index 0000000000..e00287cab1 --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch @@ -0,0 +1,28 @@ +From 5fdc0173cb4fcf8656f0889ad364d2549795607f Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Mon, 1 Jul 2019 11:34:49 +0800 +Subject: [PATCH] mdadm: add option -y for use syslog to recive event report + +fix service startup failed when there is +No mail address or alert command + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Changqing Li <changqing.li@windriver.com> +--- + systemd/mdmonitor.service | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/systemd/mdmonitor.service b/systemd/mdmonitor.service +index 46f7b88..3fc4687 100644 +--- a/systemd/mdmonitor.service ++++ b/systemd/mdmonitor.service +@@ -13,4 +13,4 @@ DefaultDependencies=no + Environment= MDADM_MONITOR_ARGS=--scan + EnvironmentFile=-/run/sysconfig/mdadm + ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh +-ExecStart=BINDIR/mdadm --monitor $MDADM_MONITOR_ARGS ++ExecStart=BINDIR/mdadm --monitor -y $MDADM_MONITOR_ARGS +-- +2.7.4 + diff --git a/meta/recipes-extended/mdadm/files/0001-mdadm-skip-test-11spare-migration.patch b/meta/recipes-extended/mdadm/files/0001-mdadm-skip-test-11spare-migration.patch new file mode 100644 index 0000000000..3a192cc95c --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-mdadm-skip-test-11spare-migration.patch @@ -0,0 +1,43 @@ +From 1b83afa7c3121f819e72ea74883f8b6d61d6548e Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Fri, 6 Sep 2019 10:59:02 +0800 +Subject: [PATCH] mdadm: skip test 11spare-migration + +11spare-migration is a test series to check mdadm Monitor migrates spares +according to rules in /etc/mdadm.conf defined by POLICY lines. + +[snip] +for scan in no yes; do + for platform in 1.2 imsm; do + try + done +done +[snip] + +"try" includes near 20 sub testcase, so there are nearly 80 subcases need to run, +so it will take long time than ptest-runner timeout limit, skip it as workaround. + +Upstream-Status: Inappropriate[oe-specific] + +Signed-off-by: Changqing Li <changqing.li@windriver.com> +--- + test | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/test b/test +index 711a3c7..880dd1d 100755 +--- a/test ++++ b/test +@@ -272,6 +272,9 @@ main() { + else + for script in $testdir/$prefix $testdir/$prefix*[^~] + do ++ if [ $script == "$testdir/11spare-migration" ];then ++ continue ++ fi + do_test $script + done + fi +-- +2.7.4 + diff --git a/meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch b/meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch new file mode 100644 index 0000000000..a1e7e59323 --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch @@ -0,0 +1,39 @@ +From b431cb4e1ed060122fa300dc0008f74080d38f73 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 9 May 2016 22:03:57 +0000 +Subject: [PATCH] mdadm.h: Undefine dprintf before redefining + +dprintf is also defined in libc see +usr/include/bits/stdio2.h, this comes into +play especially when fortify sources is enabled +and compilers like clang reports the override + +In file included from policy.c:25: +./mdadm.h:1562:9: error: 'dprintf' macro redefined [-Werror,-Wmacro-redefined] + ^ +/mnt/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/bits/stdio2.h:145:12: note: previous definition is here + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Pending +--- + mdadm.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/mdadm.h b/mdadm.h +index 387e681..bb943bf 100644 +--- a/mdadm.h ++++ b/mdadm.h +@@ -1649,11 +1649,13 @@ static inline char *to_subarray(struct mdstat_ent *ent, char *container) + } + + #ifdef DEBUG ++#undef dprintf + #define dprintf(fmt, arg...) \ + fprintf(stderr, "%s: %s: "fmt, Name, __func__, ##arg) + #define dprintf_cont(fmt, arg...) \ + fprintf(stderr, fmt, ##arg) + #else ++#undef dprintf + #define dprintf(fmt, arg...) \ + ({ if (0) fprintf(stderr, "%s: %s: " fmt, Name, __func__, ##arg); 0; }) + #define dprintf_cont(fmt, arg...) \ diff --git a/meta/recipes-extended/mdadm/files/debian-no-Werror.patch b/meta/recipes-extended/mdadm/files/debian-no-Werror.patch new file mode 100644 index 0000000000..e66a15cd79 --- /dev/null +++ b/meta/recipes-extended/mdadm/files/debian-no-Werror.patch @@ -0,0 +1,25 @@ +From: martin f. krafft <madduck@debian.org> +Subject: Remove -Werror from compiler flags + +-Werror seems like a bad idea on released/packaged code because a toolchain +update (introducing new warnings) could break the build. We'll let upstream +use it to beautify the code, but remove it for out builds. + +Signed-off-by: martin f. krafft <madduck@debian.org> + +Upstream-Status: Pending +--- + Makefile | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +--- a/Makefile ++++ b/Makefile +@@ -48,7 +48,7 @@ endif + + CC ?= $(CROSS_COMPILE)gcc + CXFLAGS ?= -ggdb +-CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter ++CWFLAGS = -Wall -Wstrict-prototypes -Wextra -Wno-unused-parameter + ifdef WARN_UNUSED + CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3 + endif diff --git a/meta/recipes-extended/mdadm/files/gcc-4.9.patch b/meta/recipes-extended/mdadm/files/gcc-4.9.patch deleted file mode 100644 index 54bf1d79ab..0000000000 --- a/meta/recipes-extended/mdadm/files/gcc-4.9.patch +++ /dev/null @@ -1,22 +0,0 @@ -super-intel.c:5063:2: error: right-hand operand of comma expression has no effect [-Werror=unused-value] - snprintf((char *) spare->sig, MAX_SIGNATURE_LENGTH, - ^ -cc1: all warnings being treated as errors -make: *** [super-intel.o] Error 1 - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Upstream-Status: Pending - -Index: mdadm-3.3/super-intel.c -=================================================================== ---- mdadm-3.3.orig/super-intel.c 2014-05-02 15:08:21.154319651 -0700 -+++ mdadm-3.3/super-intel.c 2014-05-02 15:09:31.470985794 -0700 -@@ -5060,7 +5060,7 @@ - spare->cache_size = mpb->cache_size, - spare->pwr_cycle_count = __cpu_to_le32(1), - -- snprintf((char *) spare->sig, MAX_SIGNATURE_LENGTH, -+ (void)snprintf((char *) spare->sig, MAX_SIGNATURE_LENGTH, - MPB_SIGNATURE MPB_VERSION_RAID0); - - for (d = super->disks; d; d = d->next) { diff --git a/meta/recipes-extended/mdadm/files/include_sysmacros.patch b/meta/recipes-extended/mdadm/files/include_sysmacros.patch new file mode 100644 index 0000000000..8a1d8342d8 --- /dev/null +++ b/meta/recipes-extended/mdadm/files/include_sysmacros.patch @@ -0,0 +1,14 @@ +include sys/sysmacros.h for major/minor macro definitions + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/mdadm.h ++++ b/mdadm.h +@@ -35,6 +35,7 @@ extern __off64_t lseek64 __P ((int __fd, + + #include <sys/types.h> + #include <sys/stat.h> ++#include <sys/sysmacros.h> + #include <stdint.h> + #include <stdlib.h> + #include <time.h> diff --git a/meta/recipes-extended/mdadm/files/inline.patch b/meta/recipes-extended/mdadm/files/inline.patch deleted file mode 100644 index 9009f0650c..0000000000 --- a/meta/recipes-extended/mdadm/files/inline.patch +++ /dev/null @@ -1,39 +0,0 @@ -with gnu11 turning on a default with gcc-5 we have to abide by new inline semantics -using 'inline' and using is in same translation unit means an external definition has to exist -same like "external inline" in gnu89, we simply make the functions static inline since they -are just meant to be used in this file - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> - -Index: mdadm-3.3.2/bitmap.c -=================================================================== ---- mdadm-3.3.2.orig/bitmap.c -+++ mdadm-3.3.2/bitmap.c -@@ -20,7 +20,7 @@ - - #include "mdadm.h" - --inline void sb_le_to_cpu(bitmap_super_t *sb) -+static inline void sb_le_to_cpu(bitmap_super_t *sb) - { - sb->magic = __le32_to_cpu(sb->magic); - sb->version = __le32_to_cpu(sb->version); -@@ -34,7 +34,7 @@ inline void sb_le_to_cpu(bitmap_super_t - sb->write_behind = __le32_to_cpu(sb->write_behind); - } - --inline void sb_cpu_to_le(bitmap_super_t *sb) -+static inline void sb_cpu_to_le(bitmap_super_t *sb) - { - sb_le_to_cpu(sb); /* these are really the same thing */ - } -@@ -74,7 +74,7 @@ typedef struct bitmap_info_s { - } bitmap_info_t; - - /* count the dirty bits in the first num_bits of byte */ --inline int count_dirty_bits_byte(char byte, int num_bits) -+static inline int count_dirty_bits_byte(char byte, int num_bits) - { - int num = 0; - diff --git a/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch b/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch deleted file mode 100644 index 3b3db0a7f0..0000000000 --- a/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch +++ /dev/null @@ -1,23 +0,0 @@ -Upstream-Status: pending - -By hardcoding CC's definition in the Makefile, all the gcc parameters -set by tune settings are lost. Causing compile failure with x32 toolchain - -As the bitbake defined CC is good, there is no need to redfine CC in the -make file, hence making the CC definition in the Makefile conditional. - -Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/07 - -Index: mdadm-3.3/Makefile -=================================================================== ---- mdadm-3.3.orig/Makefile 2013-09-03 07:47:47.000000000 +0300 -+++ mdadm-3.3/Makefile 2013-10-16 16:44:23.542295487 +0300 -@@ -41,7 +41,7 @@ - - KLIBC_GCC = gcc -nostdinc -iwithprefix include -I$(KLIBC)/klibc/include -I$(KLIBC)/linux/include -I$(KLIBC)/klibc/arch/i386/include -I$(KLIBC)/klibc/include/bits32 - --CC = $(CROSS_COMPILE)gcc -+CC ?= $(CROSS_COMPILE)gcc - CXFLAGS ?= -ggdb - CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter - ifdef WARN_UNUSED diff --git a/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch b/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch index 143a8d952e..7a2c888701 100644 --- a/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch +++ b/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch @@ -1,3 +1,11 @@ +From e37f7f6a0f1ef1b594574d11a8b90b8c861d047b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com> +Date: Sun, 15 Mar 2015 09:02:14 +0000 +Subject: [PATCH] mdadm: Fix build in x32 ABI +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + When try to print time_t values as a long int it causes an error because time_t data type in x32 ABI is long long int. @@ -5,22 +13,25 @@ Upstream-Status: Pending Signed-off-by: AnÃbal Limón <anibal.limon@linux.intel.com> +--- + monitor.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + diff --git a/monitor.c b/monitor.c -index f81e707..19ea041 100644 +index 81537ed..7c33382 100644 --- a/monitor.c +++ b/monitor.c -@@ -260,8 +260,13 @@ static int read_and_act(struct active_array *a) +@@ -445,9 +445,12 @@ static int read_and_act(struct active_array *a, fd_set *fds) + if (FD_ISSET(mdi->bb_fd, fds)) + check_for_cleared_bb(a, mdi); } - +- gettimeofday(&tv, NULL); +#if defined(__x86_64__) && defined(__ILP32__) -+ dprintf("%s(%d): %lld.%06lld state:%s prev:%s action:%s prev: %s start:%llu\n", ++ dprintf("(%d): %lld.%06lld state:%s prev:%s action:%s prev: %s start:%llu\n", +#else - dprintf("%s(%d): %ld.%06ld state:%s prev:%s action:%s prev: %s start:%llu\n", -- __func__, a->info.container_member, + dprintf("(%d): %ld.%06ld state:%s prev:%s action:%s prev: %s start:%llu\n", +#endif -+ __func__, -+ a->info.container_member, + a->info.container_member, tv.tv_sec, tv.tv_usec, array_states[a->curr_state], - array_states[a->prev_state], diff --git a/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch b/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch new file mode 100644 index 0000000000..8e2a8a9043 --- /dev/null +++ b/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch @@ -0,0 +1,43 @@ +From 911f6ea9be0c334885aeff66853b111cbd4066df Mon Sep 17 00:00:00 2001 +From: "Maxin B. John" <maxin.john@intel.com> +Date: Wed, 10 Feb 2016 17:28:05 +0200 +Subject: [PATCH] mdadm-fix-ptest-build-errors + +builds fail with ptest enabled: + +| restripe.c: In function 'test_stripes': +| restripe.c:845:4: error: ignoring return value of 'read', declared with +| attribute warn_unused_result [-Werror=unused-result] +| read(source[i], stripes[i], chunk_size); +| ^ +| cc1: all warnings being treated as errors +| Makefile:214: recipe for target 'test_stripe' failed + +Upstream-Status: Pending + +Signed-off-by: Maxin B. John <maxin.john@intel.com> + +--- + restripe.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/restripe.c b/restripe.c +index 31b07e8..592ba5d 100644 +--- a/restripe.c ++++ b/restripe.c +@@ -864,10 +864,14 @@ int test_stripes(int *source, unsigned long long *offsets, + + while (length > 0) { + int disk; ++ ssize_t ret; + + for (i = 0 ; i < raid_disks ; i++) { + lseek64(source[i], offsets[i]+start, 0); +- read(source[i], stripes[i], chunk_size); ++ ret = read(source[i], stripes[i], chunk_size); ++ if (ret == -1) { ++ printf("Read Failed\n"); ++ } + } + for (i = 0 ; i < data_disks ; i++) { + int disk = geo_map(i, start/chunk_size, raid_disks, diff --git a/meta/recipes-extended/mdadm/files/mdadm.init b/meta/recipes-extended/mdadm/files/mdadm.init new file mode 100644 index 0000000000..cab91b9acc --- /dev/null +++ b/meta/recipes-extended/mdadm/files/mdadm.init @@ -0,0 +1,72 @@ +#!/bin/sh +# +# Start the MD monitor daemon for all active MD arrays if desired. +# +### BEGIN INIT INFO +# Provides: mdadm +# Required-Start: $local_fs $syslog mdadm-raid +# Required-Stop: $local_fs $syslog mdadm-raid +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: MD monitoring daemon +# Description: mdadm provides a monitor mode, in which it will scan for +# problems with the MD devices. If a problem is found, the +# administrator is alerted via email, or a custom script is +# run. +### END INIT INFO +# + +MDADM=/sbin/mdadm +RUNDIR=/var/run/mdadm +PIDFILE=$RUNDIR/monitor.pid +DEBIANCONFIG=/etc/default/mdadm + +test -x "$MDADM" || exit 0 + +test -f /proc/mdstat || exit 0 + +START_DAEMON=true +test -f $DEBIANCONFIG && . $DEBIANCONFIG + +. /lib/lsb/init-functions + +# Include functions +. /etc/init.d/functions + +case "${1:-}" in + start) + if is_true $START_DAEMON; then + log_daemon_msg "Starting MD monitoring service" "mdadm --monitor" + mkdir -p $RUNDIR + start-stop-daemon -S -p $PIDFILE -x $MDADM -- \ + --monitor --pid-file $PIDFILE --daemonise --scan ${DAEMON_OPTIONS:-} + RETVAL=$? + log_end_msg $RETVAL + exit $RETVAL + fi + ;; + stop) + if [ -f $PIDFILE ] ; then + log_daemon_msg "Stopping MD monitoring service" "mdadm --monitor" + start-stop-daemon -K -p $PIDFILE -x $MDADM + RETVAL=$? + rm -f $PIDFILE + log_end_msg $RETVAL + exit $RETVAL + fi + ;; + status) + status -p $PIDFILE "$MDADM" && exit 0 || exit $? + ;; + restart|reload|force-reload) + ${0:-} stop + ${0:-} start + ;; + *) + echo "Usage: ${0:-} {start|stop|status|restart|reload|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 + diff --git a/meta/recipes-extended/mdadm/files/run-ptest b/meta/recipes-extended/mdadm/files/run-ptest index 5b276090f5..fae8071d43 100644 --- a/meta/recipes-extended/mdadm/files/run-ptest +++ b/meta/recipes-extended/mdadm/files/run-ptest @@ -1,10 +1,7 @@ #!/bin/sh -./test &>./test.log -if [ $? -eq 0 ] -then - echo "PASS: mdadm" - rm test.log -else - echo "FAIL: mdadm" -fi +mkdir -p /mdadm-testing-dir +# make the test continue to execute even one fail +dir=. ./test --keep-going --disable-integrity + +rm -rf /mdadm-testing-dir/* diff --git a/meta/recipes-extended/mdadm/mdadm_3.3.2.bb b/meta/recipes-extended/mdadm/mdadm_3.3.2.bb deleted file mode 100644 index b2fbe4ae54..0000000000 --- a/meta/recipes-extended/mdadm/mdadm_3.3.2.bb +++ /dev/null @@ -1,72 +0,0 @@ -SUMMARY = "Tool for managing software RAID under Linux" -HOMEPAGE = "http://www.kernel.org/pub/linux/utils/raid/mdadm/" - -# Some files are GPLv2+ while others are GPLv2. -LICENSE = "GPLv2 & GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://mdmon.c;beginline=4;endline=18;md5=af7d8444d9c4d3e5c7caac0d9d34039d \ - file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161" - - -SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \ - file://mdadm-3.2.2_fix_for_x32.patch \ - file://gcc-4.9.patch \ - file://mdadm-3.3.2_x32_abi_time_t.patch \ - file://inline.patch \ - file://run-ptest \ - " - -SRC_URI[md5sum] = "44698d351501cac6a89072dc877eb220" -SRC_URI[sha256sum] = "0f3a7e1a76b13892b79f9fceaf99ecb23513260389a768ac644ffa3ae06e5b8c" - -CFLAGS += "-fno-strict-aliasing" - -inherit autotools-brokensep - -EXTRA_OEMAKE = "CHECK_RUN_DIR=0" -# PPC64 and MIPS64 uses long long for u64 in the kernel, but powerpc's asm/types.h -# prevents 64-bit userland from seeing this definition, instead defaulting -# to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get -# int-ll64.h included -EXTRA_OEMAKE_append_powerpc64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__' -EXTRA_OEMAKE_append_mips64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__' -EXTRA_OEMAKE_append_mips64n32 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__' - -do_compile() { - oe_runmake -} - -do_install() { - export STRIP="" - autotools_do_install -} - -FILES_${PN} += "${base_libdir}/udev/rules.d/*.rules" - -inherit ptest - -do_compile_ptest() { - oe_runmake test -} - -do_install_ptest() { - cp -a ${S}/tests ${D}${PTEST_PATH}/tests - cp ${S}/test ${D}${PTEST_PATH} - sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/!g' -i ${D}${PTEST_PATH}/test - ln -s /sbin/mdadm ${D}${PTEST_PATH}/mdadm - for prg in test_stripe swap_super raid6check - do - install -D -m 755 $prg ${D}${PTEST_PATH}/ - done -} -RDEPENDS_${PN}-ptest += "bash" -RRECOMMENDS_${PN}-ptest += " \ - coreutils \ - util-linux \ - kernel-module-loop \ - kernel-module-linear \ - kernel-module-raid0 \ - kernel-module-raid1 \ - kernel-module-raid10 \ - kernel-module-raid456 \ -" diff --git a/meta/recipes-extended/mdadm/mdadm_4.1.bb b/meta/recipes-extended/mdadm/mdadm_4.1.bb new file mode 100644 index 0000000000..001d3331a7 --- /dev/null +++ b/meta/recipes-extended/mdadm/mdadm_4.1.bb @@ -0,0 +1,107 @@ +SUMMARY = "Tool for managing software RAID under Linux" +HOMEPAGE = "http://www.kernel.org/pub/linux/utils/raid/mdadm/" + +# Some files are GPLv2+ while others are GPLv2. +LICENSE = "GPLv2 & GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://mdmon.c;beginline=4;endline=18;md5=af7d8444d9c4d3e5c7caac0d9d34039d \ + file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161" + + +SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \ + file://run-ptest \ + file://mdadm-3.3.2_x32_abi_time_t.patch \ + file://mdadm-fix-ptest-build-errors.patch \ + file://0001-mdadm.h-Undefine-dprintf-before-redefining.patch \ + file://0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch \ + file://0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch \ + file://0001-Compute-abs-diff-in-a-standard-compliant-way.patch \ + file://0001-fix-gcc-8-format-truncation-warning.patch \ + file://debian-no-Werror.patch \ + file://0001-Revert-tests-wait-for-complete-rebuild-in-integrity-.patch \ + file://mdadm.init \ + file://0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch \ + file://include_sysmacros.patch \ + file://0001-mdadm-skip-test-11spare-migration.patch \ + " + +SRC_URI[md5sum] = "51bf3651bd73a06c413a2f964f299598" +SRC_URI[sha256sum] = "ab7688842908d3583a704d491956f31324c3a5fc9f6a04653cb75d19f1934f4a" + +inherit autotools-brokensep ptest systemd + +SYSTEMD_SERVICE_${PN} = "mdmonitor.service" +SYSTEMD_AUTO_ENABLE = "disable" + +CFLAGS_append_toolchain-clang = " -Wno-error=address-of-packed-member" + +# PPC64 and MIPS64 uses long long for u64 in the kernel, but powerpc's asm/types.h +# prevents 64-bit userland from seeing this definition, instead defaulting +# to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get +# int-ll64.h included +CFLAGS_append_powerpc64 = ' -D__SANE_USERSPACE_TYPES__' +CFLAGS_append_mipsarchn64 = ' -D__SANE_USERSPACE_TYPES__' +CFLAGS_append_mipsarchn32 = ' -D__SANE_USERSPACE_TYPES__' + +EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CXFLAGS="${CFLAGS}" SYSTEMD_DIR=${systemd_unitdir}/system \ + BINDIR="${base_sbindir}" UDEVDIR="${nonarch_base_libdir}/udev"' + +DEBUG_OPTIMIZATION_append = " -Wno-error" + +do_compile() { + oe_runmake SYSROOT="${STAGING_DIR_TARGET}" +} + +do_install() { + export STRIP="" + autotools_do_install +} + +do_install_append() { + install -d ${D}/${sysconfdir}/ + install -m 644 ${S}/mdadm.conf-example ${D}${sysconfdir}/mdadm.conf + install -d ${D}/${sysconfdir}/init.d + install -m 755 ${WORKDIR}/mdadm.init ${D}${sysconfdir}/init.d/mdmonitor +} + +do_install_append() { + oe_runmake install-systemd DESTDIR=${D} +} + +do_compile_ptest() { + oe_runmake test +} + +do_install_ptest() { + cp -R --no-dereference --preserve=mode,links -v ${S}/tests ${D}${PTEST_PATH}/tests + cp ${S}/test ${D}${PTEST_PATH} + sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/mdadm-testing-dir!g' -i ${D}${PTEST_PATH}/test + sed -e 's!/var/tmp!/mdadm-testing-dir!g' -i ${D}${PTEST_PATH}/tests/* + sed -i -e '/echo -ne "$_script... "/d' \ + -e 's/echo "succeeded"/echo -e "PASS: $_script"/g' \ + -e '/save_log fail/N; /_fail=1/i\\t\t\techo -ne "FAIL: $_script"' \ + -e '/die "dmesg prints errors when testing $_basename!"/i\\t\t\t\techo -ne "FAIL: $_script" &&' \ + ${D}${PTEST_PATH}/test + + chmod +x ${D}${PTEST_PATH}/test + + ln -s ${base_sbindir}/mdadm ${D}${PTEST_PATH}/mdadm + for prg in test_stripe swap_super raid6check + do + install -D -m 755 $prg ${D}${PTEST_PATH}/ + done +} + +RDEPENDS_${PN}-ptest += "bash e2fsprogs-mke2fs" +RRECOMMENDS_${PN}-ptest += " \ + coreutils \ + util-linux \ + kernel-module-loop \ + kernel-module-linear \ + kernel-module-raid0 \ + kernel-module-raid1 \ + kernel-module-raid10 \ + kernel-module-raid456 \ +" + +FILES_${PN} += "${systemd_unitdir}/*" diff --git a/meta/recipes-extended/mingetty/mingetty_1.08.bb b/meta/recipes-extended/mingetty/mingetty_1.08.bb index 3c16228b0d..491b892093 100644 --- a/meta/recipes-extended/mingetty/mingetty_1.08.bb +++ b/meta/recipes-extended/mingetty/mingetty_1.08.bb @@ -16,6 +16,7 @@ EXTRA_OEMAKE = "CC='${CC}' \ CFLAGS='${CFLAGS} -D_GNU_SOURCE'" do_install(){ + sed -i -e "s;SBINDIR=/sbin;SBINDIR=$base_sbindir;" ${S}/Makefile install -d ${D}${mandir}/man8 ${D}/${base_sbindir} oe_runmake install DESTDIR=${D} } diff --git a/meta/recipes-extended/minicom/minicom/0001-Drop-superfluous-global-variable-definitions.patch b/meta/recipes-extended/minicom/minicom/0001-Drop-superfluous-global-variable-definitions.patch new file mode 100644 index 0000000000..4c6e249315 --- /dev/null +++ b/meta/recipes-extended/minicom/minicom/0001-Drop-superfluous-global-variable-definitions.patch @@ -0,0 +1,35 @@ +From b65152ebc03832972115e6d98e50cb6190d01793 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com> +Date: Mon, 3 Feb 2020 13:18:13 +0100 +Subject: [PATCH 1/3] Drop superfluous global variable definitions + +The file minicom.c, by including the minicom.h header, already defines +the global variables 'dial_user' and 'dial_pass'. The object file +minicom.o is always linked to dial.o. Thus the definitions in dial.c +can be dropped. + +This fixes linking with gcc 10 which uses -fno-common by default, +disallowing multiple global variable definitions. + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/dial.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/src/dial.c b/src/dial.c +index eada5ee..d9d481f 100644 +--- a/src/dial.c ++++ b/src/dial.c +@@ -146,8 +146,6 @@ static int newtype; + /* Access to ".dialdir" denied? */ + static int dendd = 0; + static char *tagged; +-char *dial_user; +-char *dial_pass; + + /* Change the baud rate. Treat all characters in the given array as if + * they were key presses within the comm parameters dialog (C-A P) and +-- +2.24.1 + diff --git a/meta/recipes-extended/minicom/minicom/0001-Fix-build-issus-surfaced-due-to-musl.patch b/meta/recipes-extended/minicom/minicom/0001-Fix-build-issus-surfaced-due-to-musl.patch new file mode 100644 index 0000000000..fec67fdd3f --- /dev/null +++ b/meta/recipes-extended/minicom/minicom/0001-Fix-build-issus-surfaced-due-to-musl.patch @@ -0,0 +1,47 @@ +From d62a5862e26ed3fc58d789efe9c40ca6c911d36b Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 31 Aug 2015 22:35:31 +0000 +Subject: [PATCH] Fix build issus surfaced due to musl + +src/getsdir.h:28:14: error: 'MAXNAMLEN' undeclared here (not in a function) + char fname[MAXNAMLEN + 1]; /* filename + terminating null */ + +src/dial.c:352:22: error: 'KIOCSOUND' undeclared (first use in this function) +| ioctl(consolefd, KIOCSOUND, k); + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + src/dial.c | 2 +- + src/getsdir.c | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/dial.c b/src/dial.c +index a90c1d2..bf02574 100644 +--- a/src/dial.c ++++ b/src/dial.c +@@ -39,7 +39,7 @@ + #include "intl.h" + + #ifdef VC_MUSIC +-# if defined(__GLIBC__) ++# if defined(__GLIBC__) || defined(__linux__) + # include <sys/ioctl.h> + # include <sys/kd.h> + # include <sys/time.h> +diff --git a/src/getsdir.c b/src/getsdir.c +index 2195b27..b61a361 100644 +--- a/src/getsdir.c ++++ b/src/getsdir.c +@@ -30,6 +30,7 @@ + #include <string.h> + #include <sys/types.h> + #include <sys/stat.h> ++#include <sys/param.h> + #include <errno.h> + + #include "getsdir.h" +-- +2.5.1 + diff --git a/meta/recipes-extended/minicom/minicom/0002-Drop-superfluous-global-variable-definitions.patch b/meta/recipes-extended/minicom/minicom/0002-Drop-superfluous-global-variable-definitions.patch new file mode 100644 index 0000000000..1740051e0a --- /dev/null +++ b/meta/recipes-extended/minicom/minicom/0002-Drop-superfluous-global-variable-definitions.patch @@ -0,0 +1,37 @@ +From 924bd2da3a00e030e29d82b74ef82900bd50b475 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com> +Date: Mon, 3 Feb 2020 13:18:33 +0100 +Subject: [PATCH 2/3] Drop superfluous global variable definitions + +The only place where the EXTERN macro mechanism is used to define the +global variables 'vt_outmap' and 'vt_inmap' is minicom.c (by defining +an empty EXTERN macro and including the minicom.h header). The file +vt100.c already defines these variables. The vt100.o object file is +always linked to minicom.o. Thus it is safe not to define the +variables in minicom.c and only declare them in the minicom.h header. + +This fixes linking with gcc 10 which uses -fno-common by default, +disallowing multiple global variable definitions. + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/minicom.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/minicom.h b/src/minicom.h +index 061c013..0f9693b 100644 +--- a/src/minicom.h ++++ b/src/minicom.h +@@ -141,7 +141,7 @@ EXTERN int sbcolor; /* Status Bar Background Color */ + EXTERN int st_attr; /* Status Bar attributes. */ + + /* jl 04.09.97 conversion tables */ +-EXTERN unsigned char vt_outmap[256], vt_inmap[256]; ++extern unsigned char vt_outmap[256], vt_inmap[256]; + + /* MARK updated 02/17/95 - history buffer */ + EXTERN int num_hist_lines; /* History buffer size */ +-- +2.24.1 + diff --git a/meta/recipes-extended/minicom/minicom/0003-Drop-superfluous-global-variable-definitions.patch b/meta/recipes-extended/minicom/minicom/0003-Drop-superfluous-global-variable-definitions.patch new file mode 100644 index 0000000000..58cd58eda8 --- /dev/null +++ b/meta/recipes-extended/minicom/minicom/0003-Drop-superfluous-global-variable-definitions.patch @@ -0,0 +1,42 @@ +From a4fc603b3641d2efe31479116eb7ba66932901c7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com> +Date: Mon, 3 Feb 2020 13:21:41 +0100 +Subject: [PATCH 3/3] Drop superfluous global variable definitions + +The only place where the EXTERN macro mechanism is used to define the +global variables 'portfd_is_socket', 'portfd_is_connected' and +'portfd_sock_addr' is minicom.c (by defining an empty EXTERN macro and +including the minicom.h header). The source file sysdep1_s.c already +defines these variables. The sysdep1_s.o object file is always linked +to minicom.o. Thus it is safe to drop the definitions from minicom.c +and only declare the variables in the minicom.h header. + +This fixes linking with gcc 10 which uses -fno-common by default, +disallowing multiple global variable definitions. + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/minicom.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/minicom.h b/src/minicom.h +index 0f9693b..1e7cb8c 100644 +--- a/src/minicom.h ++++ b/src/minicom.h +@@ -113,9 +113,9 @@ EXTERN char *dial_user; /* Our username there */ + EXTERN char *dial_pass; /* Our password */ + + #ifdef USE_SOCKET +-EXTERN int portfd_is_socket; /* File descriptor is a unix socket */ +-EXTERN int portfd_is_connected; /* 1 if the socket is connected */ +-EXTERN struct sockaddr_un portfd_sock_addr; /* the unix socket address */ ++extern int portfd_is_socket; /* File descriptor is a unix socket */ ++extern int portfd_is_connected; /* 1 if the socket is connected */ ++extern struct sockaddr_un portfd_sock_addr; /* the unix socket address */ + #define portfd_connected ((portfd_is_socket && !portfd_is_connected) \ + ? -1 : portfd) + #else +-- +2.24.1 + diff --git a/meta/recipes-extended/minicom/minicom_2.7.bb b/meta/recipes-extended/minicom/minicom_2.7.1.bb index c002bc82d9..6d61684e69 100644 --- a/meta/recipes-extended/minicom/minicom_2.7.bb +++ b/meta/recipes-extended/minicom/minicom_2.7.1.bb @@ -1,4 +1,5 @@ SUMMARY = "Text-based modem control and terminal emulation program" +HOMEPAGE = "http://alioth.debian.org/projects/minicom/" DESCRIPTION = "Minicom is a text-based modem control and terminal emulation program for Unix-like operating systems" SECTION = "console/network" DEPENDS = "ncurses virtual/libiconv" @@ -6,13 +7,17 @@ LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=420477abc567404debca0a2a1cb6b645 \ file://src/minicom.h;beginline=1;endline=12;md5=a58838cb709f0db517f4e42730c49e81" -SRC_URI = "https://alioth.debian.org/frs/download.php/latestfile/3/${BP}.tar.gz \ +SRC_URI = "${DEBIAN_MIRROR}/main/m/${BPN}/${BPN}_${PV}.orig.tar.gz \ file://allow.to.disable.lockdev.patch \ file://0001-fix-minicom-h-v-return-value-is-not-0.patch \ + file://0001-Fix-build-issus-surfaced-due-to-musl.patch \ + file://0001-Drop-superfluous-global-variable-definitions.patch \ + file://0002-Drop-superfluous-global-variable-definitions.patch \ + file://0003-Drop-superfluous-global-variable-definitions.patch \ " -SRC_URI[md5sum] = "7044ca3e291268c33294f171d426dc2d" -SRC_URI[sha256sum] = "9ac3a663b82f4f5df64114b4792b9926b536c85f59de0f2d2b321c7626a904f4" +SRC_URI[md5sum] = "9021cb8c5445f6e6e74b2acc39962d62" +SRC_URI[sha256sum] = "532f836b7a677eb0cb1dca8d70302b73729c3d30df26d58368d712e5cca041f1" PACKAGECONFIG ??= "" PACKAGECONFIG[lockdev] = "--enable-lockdev,--disable-lockdev,lockdev" @@ -23,3 +28,6 @@ do_install() { for d in doc extras man lib src; do make -C $d DESTDIR=${D} install; done } +RRECOMMENDS_${PN} += "lrzsz" + +RDEPENDS_${PN} += "ncurses-terminfo-base" diff --git a/meta/recipes-extended/mktemp/files/disable-strip.patch b/meta/recipes-extended/mktemp/files/disable-strip.patch deleted file mode 100644 index e06869e3ad..0000000000 --- a/meta/recipes-extended/mktemp/files/disable-strip.patch +++ /dev/null @@ -1,15 +0,0 @@ -Upstream-Status: Inappropriate [configuration] - -diff --git a/Makefile.in b/Makefile.in -index 37b3cc9..f1026f3 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -95,7 +95,7 @@ install-dirs: - $(DESTDIR)$(mandir)/man1 - - install-binaries: $(PROG) -- $(INSTALL) -m 0555 -s $(PROG) $(DESTDIR)$(bindir)/$(PROG) -+ $(INSTALL) -m 0555 $(PROG) $(DESTDIR)$(bindir)/$(PROG) - - install-man: - $(INSTALL) -m 0444 $(srcdir)/mktemp.$(mantype) \ diff --git a/meta/recipes-extended/mktemp/files/fix-parallel-make.patch b/meta/recipes-extended/mktemp/files/fix-parallel-make.patch deleted file mode 100644 index f3b6dcc34a..0000000000 --- a/meta/recipes-extended/mktemp/files/fix-parallel-make.patch +++ /dev/null @@ -1,24 +0,0 @@ -This fixes the parallel make install failure - -Upstream-Status: Accepted -http://www.gratisoft.us/bugzilla/show_bug.cgi?id=528 - -Signed-off-by: Saul Wold <sgw@linux.intel.com> - -Index: mktemp-1.7/Makefile.in -=================================================================== ---- mktemp-1.7.orig/Makefile.in -+++ mktemp-1.7/Makefile.in -@@ -94,10 +94,10 @@ install-dirs: - $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) \ - $(DESTDIR)$(mandir)/man1 - --install-binaries: $(PROG) -+install-binaries: install-dirs $(PROG) - $(INSTALL) -m 0555 $(PROG) $(DESTDIR)$(bindir)/$(PROG) - --install-man: -+install-man: install-dirs - $(INSTALL) -m 0444 $(srcdir)/mktemp.$(mantype) \ - $(DESTDIR)$(mandir)/man1/mktemp.1 - diff --git a/meta/recipes-extended/mktemp/mktemp_1.7.bb b/meta/recipes-extended/mktemp/mktemp_1.7.bb deleted file mode 100644 index fe238eea37..0000000000 --- a/meta/recipes-extended/mktemp/mktemp_1.7.bb +++ /dev/null @@ -1,34 +0,0 @@ -SUMMARY = "Enables safe temporary file creation from shell scripts" -HOMEPAGE = "http://www.mktemp.org/" -BUGTRACKER = "http://www.mktemp.org/bugs" -SECTION = "console/utils" -LICENSE = "ISC" -LIC_FILES_CHKSUM = "file://LICENSE;md5=430680f6322a1eb87199b5e01a82c0d4" - -PR = "r3" - -SRC_URI = "ftp://ftp.mktemp.org/pub/mktemp/${BPN}-${PV}.tar.gz \ - file://disable-strip.patch \ - file://fix-parallel-make.patch \ - " - -SRC_URI[md5sum] = "787bbed9fa2ee8e7645733c0e8e65172" -SRC_URI[sha256sum] = "8e94b9e1edf866b2609545da65b627996ac5d158fda071e492bddb2f4a482675" - -inherit autotools update-alternatives - -EXTRA_OECONF = "--with-libc" - -do_install_append () { - install -d ${D}${base_bindir} - mv ${D}${bindir}/mktemp ${D}${base_bindir}/mktemp - rmdir ${D}${bindir} -} - -ALTERNATIVE_${PN} = "mktemp" -ALTERNATIVE_LINK_NAME[mktemp] = "${base_bindir}/mktemp" -ALTERNATIVE_PRIORITY = "100" - -ALTERNATIVE_${PN}-doc = "mktemp.1" -ALTERNATIVE_PRIORITY_${PN}-doc = "300" -ALTERNATIVE_LINK_NAME[mktemp.1] = "${mandir}/man1/mktemp.1" diff --git a/meta/recipes-extended/msmtp/msmtp_1.6.2.bb b/meta/recipes-extended/msmtp/msmtp_1.8.12.bb index f9bf5631b2..54798f9e6f 100644 --- a/meta/recipes-extended/msmtp/msmtp_1.6.2.bb +++ b/meta/recipes-extended/msmtp/msmtp_1.8.12.bb @@ -1,30 +1,27 @@ SUMMARY = "msmtp is an SMTP client" DESCRIPTION = "A sendmail replacement for use in MTAs like mutt" -HOMEPAGE = "http://msmtp.sourceforge.net/" +HOMEPAGE = "https://marlam.de/msmtp/" SECTION = "console/network" LICENSE = "GPLv3" DEPENDS = "zlib gnutls" -#COPYING or Licence LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" -SRC_URI = "http://sourceforge.net/projects/msmtp/files/msmtp/${PV}/${BPN}-${PV}.tar.xz \ - " +UPSTREAM_CHECK_URI = "https://marlam.de/msmtp/download/" -SRC_URI[md5sum] = "3baca93c7e5f1aa9d36a2e5b38739ab9" -SRC_URI[sha256sum] = "2f6ecd7cbfadf548fd55205bd24cb63b84bcbb1185efed917dd7800595a48789" +SRC_URI = "https://marlam.de/${BPN}/releases/${BP}.tar.xz" +SRC_URI[sha256sum] = "a86fef9477339923afefe974988a38e32d0feb90dfeeb88f7f55aac356a96354" inherit gettext autotools update-alternatives pkgconfig EXTRA_OECONF += "--without-libsecret --without-libgsasl --without-libidn" ALTERNATIVE_${PN} = "sendmail" +# /usr/lib/sendmial is required by LSB core test +ALTERNATIVE_${PN}_linuxstdbase = "sendmail usr-lib-sendmail" ALTERNATIVE_TARGET[sendmail] = "${bindir}/msmtp" ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail" +ALTERNATIVE_TARGET[usr-lib-sendmail] = "${bindir}/msmtp" +ALTERNATIVE_LINK_NAME[usr-lib-sendmail] = "/usr/lib/sendmail" ALTERNATIVE_PRIORITY = "100" - -pkg_postinst_${PN}_linuxstdbase () { - # /usr/lib/sendmial is required by LSB core test - [ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/ -} diff --git a/meta/recipes-extended/net-tools/net-tools/Add_missing_headers.patch b/meta/recipes-extended/net-tools/net-tools/Add_missing_headers.patch new file mode 100644 index 0000000000..f15d3654c7 --- /dev/null +++ b/meta/recipes-extended/net-tools/net-tools/Add_missing_headers.patch @@ -0,0 +1,15 @@ +Description: Add missing headers + +Upstream-Status: Pending +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> + +--- a/netstat.c ++++ b/netstat.c +@@ -88,6 +88,7 @@ + #include <sys/stat.h> + #include <net/if.h> + #include <dirent.h> ++#include <sys/types.h> + + #include "net-support.h" + #include "pathnames.h" diff --git a/meta/recipes-extended/net-tools/net-tools/Bug_443075-ifconfig.c-pointtopoint_spelling.patch b/meta/recipes-extended/net-tools/net-tools/Bug_443075-ifconfig.c-pointtopoint_spelling.patch new file mode 100644 index 0000000000..74d74668ce --- /dev/null +++ b/meta/recipes-extended/net-tools/net-tools/Bug_443075-ifconfig.c-pointtopoint_spelling.patch @@ -0,0 +1,26 @@ +Description: Accept "pointtopoint" as a synonym for "pointopoint" +Bug-Debian: https://bugs.debian.org/443075 +Author: Justin Pryzby <pryzbyj@libra> + +Upstream-Status: Pending +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> + +--- a/ifconfig.c ++++ b/ifconfig.c +@@ -644,14 +644,14 @@ + spp++; + continue; + } +- if (!strcmp(*spp, "-pointopoint")) { ++ if (!strcmp(*spp, "-pointopoint") || !strcmp(*spp, "-pointtopoint")) { + goterr |= clr_flag(ifr.ifr_name, IFF_POINTOPOINT); + spp++; + if (test_flag(ifr.ifr_name, IFF_POINTOPOINT) > 0) + fprintf(stderr, _("Warning: Interface %s still in POINTOPOINT mode.\n"), ifr.ifr_name); + continue; + } +- if (!strcmp(*spp, "pointopoint")) { ++ if (!strcmp(*spp, "pointopoint") || !strcmp(*spp, "pointtopoint")) { + if (*(spp + 1) != NULL) { + spp++; + safe_strncpy(host, *spp, (sizeof host)); diff --git a/meta/recipes-extended/net-tools/net-tools/Bug_541172-netstat.c-exit-codes.patch b/meta/recipes-extended/net-tools/net-tools/Bug_541172-netstat.c-exit-codes.patch new file mode 100644 index 0000000000..782b94bc61 --- /dev/null +++ b/meta/recipes-extended/net-tools/net-tools/Bug_541172-netstat.c-exit-codes.patch @@ -0,0 +1,22 @@ +Description: Bug#541172: netstat.c exit codes + +Upstream-Status: Pending +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> + +--- a/netstat.c ++++ b/netstat.c +@@ -2237,12 +2237,14 @@ + parsesnmp(flag_raw, flag_tcp, flag_udp, flag_sctp); + #else + ENOSUPP("netstat", "AF INET"); ++ exit(1); + #endif + } else if(!strcmp(afname, "inet6")) { + #if HAVE_AFINET6 + parsesnmp6(flag_raw, flag_tcp, flag_udp); + #else + ENOSUPP("netstat", "AF INET6"); ++ exit(1); + #endif + } else { + printf(_("netstat: No statistics support for specified address family: %s\n"), afname); diff --git a/meta/recipes-extended/net-tools/net-tools/ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch b/meta/recipes-extended/net-tools/net-tools/ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch deleted file mode 100644 index 06f81420e9..0000000000 --- a/meta/recipes-extended/net-tools/net-tools/ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 81814dc2b14843009193efd307d814c26baa61f0 Mon Sep 17 00:00:00 2001 -From: Jiri Popelka <jpopelka@redhat.com> -Date: Wed, 7 Dec 2011 19:14:09 +0100 -Subject: [PATCH] ifconfig interface:0 del <IP> will remove the aliased IP on IA64 - -Upstream-Status: Backport - -commit 81814dc2b14843009193efd307d814c26baa61f0 from -git://git.code.sf.net/p/net-tools/code - ---- - ifconfig.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/ifconfig.c b/ifconfig.c -index bc405c6..dae8922 100644 ---- a/ifconfig.c -+++ b/ifconfig.c -@@ -890,7 +890,9 @@ int main(int argc, char **argv) - continue; - } - -- memcpy(&ip, &sin.sin_addr.s_addr, sizeof(unsigned long)); -+ /* Clear "ip" in case sizeof(unsigned long) > sizeof(sin.sin_addr.s_addr) */ -+ ip = 0; -+ memcpy(&ip, &sin.sin_addr.s_addr, sizeof(sin.sin_addr.s_addr)); - - if (get_nmbc_parent(ifr.ifr_name, &nm, &bc) < 0) { - fprintf(stderr, _("Interface %s not initialized\n"), --- -1.7.9.5 - diff --git a/meta/recipes-extended/net-tools/net-tools_1.60-20181103.bb b/meta/recipes-extended/net-tools/net-tools_1.60-20181103.bb new file mode 100644 index 0000000000..e97731073e --- /dev/null +++ b/meta/recipes-extended/net-tools/net-tools_1.60-20181103.bb @@ -0,0 +1,110 @@ +SUMMARY = "Basic networking tools" +DESCRIPTION = "A collection of programs that form the base set of the NET-3 networking distribution for the Linux operating system" +HOMEPAGE = "http://net-tools.berlios.de/" +BUGTRACKER = "http://bugs.debian.org/net-tools" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://ifconfig.c;beginline=11;endline=15;md5=d1ca372080ad5401e23ca0afc35cf9ba" + +PV = "1.60-20181103+git${SRCPV}" +SRCREV = "0eebece8c964e3cfa8a018f42b2e7e751a7009a0" +SRC_URI = "git://git.code.sf.net/p/net-tools/code;protocol=https \ + file://net-tools-config.h \ + file://net-tools-config.make \ + file://Add_missing_headers.patch \ + file://Bug_443075-ifconfig.c-pointtopoint_spelling.patch \ + file://Bug_541172-netstat.c-exit-codes.patch \ +" + +UPSTREAM_VERSION_UNKNOWN = "1" + +S = "${WORKDIR}/git" + +inherit gettext + +# The Makefile is lame, no parallel build +PARALLEL_MAKE = "" + +PACKAGECONFIG ??= "hostname arp serial plip" +PACKAGECONFIG[hostname] = "" +PACKAGECONFIG[arp] = "" +PACKAGECONFIG[serial] = "" +PACKAGECONFIG[plip] = "" + +do_configure() { + # net-tools has its own config mechanism requiring "make config" + # we pre-generate desired options and copy to source directory instead + cp ${WORKDIR}/net-tools-config.h ${S}/config.h + cp ${WORKDIR}/net-tools-config.make ${S}/config.make + + if [ "${USE_NLS}" = "no" ]; then + sed -i -e 's/^I18N=1/# I18N=1/' ${S}/config.make + fi + + if ${@bb.utils.contains('PACKAGECONFIG', 'hostname', 'true', 'false', d)} ; then + echo "#define HAVE_HOSTNAME_TOOLS 1" >> ${S}/config.h + echo "#define HAVE_HOSTNAME_SYMLINKS 1" >> ${S}/config.h + echo "HAVE_HOSTNAME_TOOLS=1" >> ${S}/config.make + echo "HAVE_HOSTNAME_SYMLINKS=1" >> ${S}/config.make + fi + if ${@bb.utils.contains('PACKAGECONFIG', 'arp', 'true', 'false', d)} ; then + echo "#define HAVE_ARP_TOOLS 1" >> ${S}/config.h + echo "HAVE_ARP_TOOLS=1" >> ${S}/config.make + fi + if ${@bb.utils.contains('PACKAGECONFIG', 'serial', 'true', 'false', d)} ; then + echo "#define HAVE_SERIAL_TOOLS 1" >> ${S}/config.h + echo "HAVE_SERIAL_TOOLS=1" >> ${S}/config.make + fi + if ${@bb.utils.contains('PACKAGECONFIG', 'plip', 'true', 'false', d)} ; then + echo "#define HAVE_PLIP_TOOLS 1" >> ${S}/config.h + echo "HAVE_PLIP_TOOLS=1" >> ${S}/config.make + fi +} + +do_compile() { + # net-tools use COPTS/LOPTS to allow adding custom options + oe_runmake COPTS="$CFLAGS" LOPTS="$LDFLAGS" +} + +do_install() { + # We don't need COPTS or LOPTS, but let's be consistent. + oe_runmake COPTS="$CFLAGS" LOPTS="$LDFLAGS" BASEDIR=${D} INSTALLNLSDIR=${D}${datadir}/locale mandir=${mandir} install + + if [ "${base_bindir}" != "/bin" ]; then + mkdir -p ${D}/${base_bindir} + mv ${D}/bin/* ${D}/${base_bindir}/ + rmdir ${D}/bin + fi + if [ "${base_sbindir}" != "/sbin" ]; then + mkdir ${D}/${base_sbindir} + mv ${D}/sbin/* ${D}/${base_sbindir}/ + rmdir ${D}/sbin + fi +} + +inherit update-alternatives + +base_sbindir_progs = "ipmaddr iptunnel mii-tool nameif \ + ${@bb.utils.contains('PACKAGECONFIG', 'arp', 'arp rarp', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'plip', 'plipconfig', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'serial', 'slattach', '', d)} \ +" +base_bindir_progs = "ifconfig netstat route \ + ${@bb.utils.contains('PACKAGECONFIG', 'hostname', 'dnsdomainname domainname hostname nisdomainname ypdomainname', '', d)} \ +" + +ALTERNATIVE_${PN} = "${base_sbindir_progs} ${base_bindir_progs}" +ALTERNATIVE_${PN}-doc += "${@bb.utils.contains('PACKAGECONFIG', 'hostname', 'hostname.1 dnsdomainname.1', '', d)}" +ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1" +ALTERNATIVE_LINK_NAME[dnsdomainname.1] = "${mandir}/man1/dnsdomainname.1" +ALTERNATIVE_PRIORITY[hostname.1] = "10" + +python __anonymous() { + for prog in d.getVar('base_sbindir_progs').split(): + d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir'), prog)) + for prog in d.getVar('base_bindir_progs').split(): + d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog)) +} +ALTERNATIVE_PRIORITY = "100" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-extended/net-tools/net-tools_1.60-25.bb b/meta/recipes-extended/net-tools/net-tools_1.60-25.bb deleted file mode 100644 index c47d69a43d..0000000000 --- a/meta/recipes-extended/net-tools/net-tools_1.60-25.bb +++ /dev/null @@ -1,89 +0,0 @@ -SUMMARY = "Basic networking tools" -DESCRIPTION = "A collection of programs that form the base set of the NET-3 networking distribution for the Linux operating system" -HOMEPAGE = "http://net-tools.berlios.de/" -BUGTRACKER = "http://bugs.debian.org/net-tools" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \ - file://ifconfig.c;beginline=11;endline=15;md5=d1ca372080ad5401e23ca0afc35cf9ba" - -SRC_URI = "http://snapshot.debian.org/archive/debian/20050312T000000Z/pool/main/n/${BPN}/${BPN}_1.60.orig.tar.gz;name=tarball \ - http://snapshot.debian.org/archive/debian/20130511T214653Z/pool/main/n/${BPN}/${BPN}_${PV}.diff.gz;apply=no;name=patch \ - file://net-tools-config.h \ - file://net-tools-config.make \ - file://ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch \ - " - -S = "${WORKDIR}/net-tools-1.60" - -SRC_URI[tarball.md5sum] = "ecaf37acb5b5daff4bdda77785fd916d" -SRC_URI[tarball.sha256sum] = "ec67967cf7b1a3a3828a84762fbc013ac50ee5dc9aa3095d5c591f302c2de0f5" - -SRC_URI[patch.md5sum] = "5ab1e2184d0fa6518031291138f2fc51" -SRC_URI[patch.sha256sum] = "1bddcd96ac60e794978cb20fb7ea4c2e77258c56c042c9ac8b6ec2b2033bc56f" - -inherit gettext - -# The Makefile is lame, no parallel build -PARALLEL_MAKE = "" - -# Unlike other Debian packages, net-tools *.diff.gz contains another series of -# patches maintained by quilt. So manually apply them before applying other local -# patches. Also remove all temp files before leaving, because do_patch() will pop -# up all previously applied patches in the start -nettools_do_patch() { - cd ${S} - quilt pop -a || true - if [ -d ${S}/.pc-nettools ]; then - rm -rf ${S}/.pc - mv ${S}/.pc-nettools ${S}/.pc - QUILT_PATCHES=${S}/debian/patches quilt pop -a - rm -rf ${S}/.pc ${S}/debian - fi - patch -p1 < ${WORKDIR}/${BPN}_${PV}.diff - QUILT_PATCHES=${S}/debian/patches quilt push -a - mv ${S}/.pc ${S}/.pc-nettools -} - -do_unpack[cleandirs] += "${S}" - -# We invoke base do_patch at end, to incorporate any local patch -python do_patch() { - bb.build.exec_func('nettools_do_patch', d) - bb.build.exec_func('patch_do_patch', d) -} - -do_configure() { - # net-tools has its own config mechanism requiring "make config" - # we pre-generate desired options and copy to source directory instead - cp ${WORKDIR}/net-tools-config.h ${S}/config.h - cp ${WORKDIR}/net-tools-config.make ${S}/config.make -} - -do_compile() { - # net-tools use COPTS/LOPTS to allow adding custom options - export COPTS="$CFLAGS" - export LOPTS="$LDFLAGS" - unset CFLAGS - unset LDFLAGS - - oe_runmake -} - -do_install() { - oe_runmake 'BASEDIR=${D}' install -} - -inherit update-alternatives - -base_sbindir_progs = "arp ifconfig ipmaddr iptunnel mii-tool nameif plipconfig rarp route slattach" -base_bindir_progs = "dnsdomainname domainname hostname netstat nisdomainname ypdomainname" - -ALTERNATIVE_${PN} = "${base_sbindir_progs} ${base_bindir_progs}" -python __anonymous() { - for prog in d.getVar('base_sbindir_progs', True).split(): - d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir', True), prog)) - for prog in d.getVar('base_bindir_progs', True).split(): - d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir', True), prog)) -} -ALTERNATIVE_PRIORITY = "100" - diff --git a/meta/recipes-extended/newt/files/0001-detect-gold-as-GNU-linker-too.patch b/meta/recipes-extended/newt/files/0001-detect-gold-as-GNU-linker-too.patch new file mode 100644 index 0000000000..a4b3afd959 --- /dev/null +++ b/meta/recipes-extended/newt/files/0001-detect-gold-as-GNU-linker-too.patch @@ -0,0 +1,31 @@ +From 58245b859ffbcb1780575bf1b0a018d55e74e434 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> +Date: Wed, 21 Sep 2016 21:14:40 +0200 +Subject: [PATCH] detect gold as GNU linker too +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Pending + +Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 03e8bda..c2fce51 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -28,7 +28,7 @@ AC_CHECK_SIZEOF([void *]) + AC_MSG_CHECKING([for GNU ld]) + LD=`$CC -print-prog-name=ld 2>&5` + +-if test `$LD -v 2>&1 | $ac_cv_path_GREP -c "GNU ld"` = 0; then ++if test `$LD -v 2>&1 | $ac_cv_path_GREP -c "GNU "` = 0; then + # Not + GNU_LD="" + AC_MSG_RESULT([no]) +-- +2.5.5 + diff --git a/meta/recipes-extended/newt/files/0002-don-t-ignore-CFLAGS-when-building-snack.patch b/meta/recipes-extended/newt/files/0002-don-t-ignore-CFLAGS-when-building-snack.patch new file mode 100644 index 0000000000..ca235d5108 --- /dev/null +++ b/meta/recipes-extended/newt/files/0002-don-t-ignore-CFLAGS-when-building-snack.patch @@ -0,0 +1,29 @@ +From f60dc1063607ca1f201ba4cbda467d8af3f78f64 Mon Sep 17 00:00:00 2001 +From: Miroslav Lichvar <mlichvar@redhat.com> +Date: Tue, 1 Oct 2019 16:37:55 +0200 +Subject: [PATCH] don't ignore CFLAGS when building snack + +In addition to the flags returned by python-config --cflags, use the +user-specified CFLAGS when building the snack object. + +Upstream-Status: Backport from master +Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> +--- + Makefile.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index be5f87b..6facd5e 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -96,8 +96,8 @@ _snack.$(SOEXT): snack.c $(LIBNEWTSH) + PIFLAGS=`$$pyconfig --includes`; \ + PLDFLAGS=`$$pyconfig --ldflags`; \ + PLFLAGS=`$$pyconfig --libs`; \ +- echo $(CC) $(SHCFLAGS) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snack.o snack.c; \ +- $(CC) $(SHCFLAGS) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snack.o snack.c; \ ++ echo $(CC) $(SHCFLAGS) $(CFLAGS) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snack.o snack.c; \ ++ $(CC) $(SHCFLAGS) $(CFLAGS) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snack.o snack.c; \ + echo $(CC) --shared $$PLDFLAGS $$PLFLAGS $(LDFLAGS) -o $$ver/_snack.$(SOEXT) $$ver/snack.o -L. -lnewt $(LIBS); \ + $(CC) --shared $$PLDFLAGS $$PLFLAGS $(LDFLAGS) -o $$ver/_snack.$(SOEXT) $$ver/snack.o -L. -lnewt $(LIBS); \ + done || : diff --git a/meta/recipes-extended/newt/files/Makefile.in-Add-tinfo-library-to-the-linking-librari.patch b/meta/recipes-extended/newt/files/Makefile.in-Add-tinfo-library-to-the-linking-librari.patch new file mode 100644 index 0000000000..bc55582fd9 --- /dev/null +++ b/meta/recipes-extended/newt/files/Makefile.in-Add-tinfo-library-to-the-linking-librari.patch @@ -0,0 +1,26 @@ +From fad40cfc18a42946a9a9e440c3434cd6b847ff9d Mon Sep 17 00:00:00 2001 +From: Otavio Salvador <otavio@ossystems.com.br> +Date: Mon, 18 Jan 2016 17:05:19 +0000 +Subject: [PATCH] Makefile.in: Add tinfo library to the linking libraries +Organization: O.S. Systems Software LTDA. + +Upstream-Status: Pending + +Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> +--- + Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index a85d00f..98b85f9 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -1,4 +1,4 @@ +-LIBS = -lslang @LIBS@ ++LIBS = -lslang -ltinfo @LIBS@ + LIBTCL = @TCL_LIB_FLAG@ + + CC = @CC@ +-- +2.1.4 + diff --git a/meta/recipes-extended/newt/files/cross_ar.patch b/meta/recipes-extended/newt/files/cross_ar.patch index 03007aa4f4..86cc0be1d3 100644 --- a/meta/recipes-extended/newt/files/cross_ar.patch +++ b/meta/recipes-extended/newt/files/cross_ar.patch @@ -18,18 +18,19 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> configure.ac | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) -diff --git a/Makefile.in b/Makefile.in ---- a/Makefile.in -+++ b/Makefile.in +Index: newt-0.52.20/Makefile.in +=================================================================== +--- newt-0.52.20.orig/Makefile.in ++++ newt-0.52.20/Makefile.in @@ -7,6 +7,7 @@ CFLAGS = @CFLAGS@ LDFLAGS = @LDFLAGS@ - CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@ + CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@ GNU_LD = @GNU_LD@ +AR = @AR@ VERSION = @VERSION@ TAG = r$(subst .,-,$(VERSION)) -@@ -109,7 +110,7 @@ whiptcl.$(SOEXT): $(WHIPTCLOBJS) $(LIBNEWTSH) +@@ -109,7 +110,7 @@ whiptcl.$(SOEXT): $(WHIPTCLOBJS) $(LIBNE $(CC) -shared $(SHCFLAGS) $(LDFLAGS) -o whiptcl.$(SOEXT) $(WHIPTCLOBJS) -L. -lnewt $(LIBTCL) -lpopt $(LIBS) $(LIBNEWT): $(LIBOBJS) @@ -38,10 +39,10 @@ diff --git a/Makefile.in b/Makefile.in newt.o $(SHAREDDIR)/newt.o: newt.c Makefile -diff --git a/configure.ac b/configure.ac -index 92e6da8..cd83d57 100644 ---- a/configure.ac -+++ b/configure.ac +Index: newt-0.52.20/configure.ac +=================================================================== +--- newt-0.52.20.orig/configure.ac ++++ newt-0.52.20/configure.ac @@ -15,6 +15,10 @@ AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_GREP @@ -51,8 +52,5 @@ index 92e6da8..cd83d57 100644 +AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)]) +AC_PROG_AR - # Are we using GNU ld? - AC_MSG_CHECKING([for GNU ld]) --- -1.8.1.2 - + AC_CHECK_SIZEOF([long]) + AC_CHECK_SIZEOF([long long]) diff --git a/meta/recipes-extended/newt/files/fix_SHAREDDIR.patch b/meta/recipes-extended/newt/files/fix_SHAREDDIR.patch deleted file mode 100644 index b0a1e8c105..0000000000 --- a/meta/recipes-extended/newt/files/fix_SHAREDDIR.patch +++ /dev/null @@ -1,37 +0,0 @@ -Upstream-Status: Pending - -Author: dexuan.cui@intel.com -Date: Fri Apr 15 16:17:39 CST 2011 - -The patch fixes a parallel-make issue: when generating $(SHAREDDIR)/%.o, we should -ensure the directory ${SHAREDDIR} exists. - -We need to push the patch to upstream. - -Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - Makefile.in | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/Makefile.in b/Makefile.in ---- a/Makefile.in -+++ b/Makefile.in -@@ -128,12 +128,12 @@ $(SHAREDDIR): - - sharedlib: $(LIBNEWTSH) - --$(LIBNEWTSH): $(SHAREDDIR) $(SHAREDOBJS) -+$(LIBNEWTSH): $(SHAREDOBJS) - $(CC) -shared -o $(LIBNEWTSH) $(SHLIBFLAGS) $(SHAREDOBJS) $(LDFLAGS) $(LIBS) - ln -fs $(LIBNEWTSONAME) libnewt.$(SOEXT) - ln -fs $(LIBNEWTSH) $(LIBNEWTSONAME) - --$(SHAREDDIR)/%.o : %.c -+$(SHAREDDIR)/%.o : %.c $(SHAREDDIR) - $(CC) $(SHCFLAGS) -c $(CFLAGS) $(CPPFLAGS) -o $@ $< - - install: $(LIBNEWT) install-sh whiptail --- -1.8.1.2 - diff --git a/meta/recipes-extended/newt/files/remove_slang_include.patch b/meta/recipes-extended/newt/files/remove_slang_include.patch deleted file mode 100644 index a2634ec75b..0000000000 --- a/meta/recipes-extended/newt/files/remove_slang_include.patch +++ /dev/null @@ -1,16 +0,0 @@ - -Upstream-Status: Pending - -Index: git/Makefile.in -=================================================================== ---- git.orig/Makefile.in -+++ git/Makefile.in -@@ -5,7 +5,7 @@ CC = @CC@ - CPP = @CPP@ - CFLAGS = @CFLAGS@ - LDFLAGS = @LDFLAGS@ --CPPFLAGS = -D_GNU_SOURCE -I/usr/include/slang @CPPFLAGS@ -+CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@ - GNU_LD = @GNU_LD@ - - VERSION = @VERSION@ diff --git a/meta/recipes-extended/newt/libnewt-python_0.52.18.bb b/meta/recipes-extended/newt/libnewt-python_0.52.18.bb deleted file mode 100644 index 94a41a38ea..0000000000 --- a/meta/recipes-extended/newt/libnewt-python_0.52.18.bb +++ /dev/null @@ -1,29 +0,0 @@ -require recipes-extended/newt/libnewt_${PV}.bb - -SUMMARY .= " - python" -DEPENDS = "libnewt python" -RDEPENDS_${PN} += "python-core" - -inherit pythonnative python-dir - -EXTRA_OECONF += "--with-python" -EXTRA_OEMAKE += "PYTHONVERS=${PYTHON_DIR}" - - -do_compile () { - VERSION="$(sed -n 's/^VERSION = //p' Makefile)" - oe_runmake _snack.so -} - -do_install () { - install -d ${D}${PYTHON_SITEPACKAGES_DIR} - install -m 0755 ${PYTHON_DIR}/_snack.so ${D}${PYTHON_SITEPACKAGES_DIR}/ - install -m 0644 snack.py ${D}${PYTHON_SITEPACKAGES_DIR}/ -} - -PACKAGES_remove = "whiptail" - -FILES_${PN} = "${PYTHON_SITEPACKAGES_DIR}/*" -FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/" - -BBCLASSEXTEND = "native" diff --git a/meta/recipes-extended/newt/libnewt_0.52.18.bb b/meta/recipes-extended/newt/libnewt_0.52.21.bb index 302e418a9d..88b4cf4a03 100644 --- a/meta/recipes-extended/newt/libnewt_0.52.18.bb +++ b/meta/recipes-extended/newt/libnewt_0.52.21.bb @@ -8,39 +8,41 @@ shared library needed by programs built with newt, as well as a \ /usr/bin/dialog replacement called whiptail. Newt is based on the \ slang library." -HOMEPAGE = "https://fedorahosted.org/newt/" +HOMEPAGE = "https://releases.pagure.org/newt/" SECTION = "libs" LICENSE = "LGPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" # slang needs to be >= 2.2 -DEPENDS = "slang popt" +DEPENDS = "slang popt python3" -SRC_URI = "https://fedorahosted.org/releases/n/e/newt/newt-${PV}.tar.gz \ - file://remove_slang_include.patch \ - file://fix_SHAREDDIR.patch \ +SRC_URI = "https://releases.pagure.org/newt/newt-${PV}.tar.gz \ file://cross_ar.patch \ -" + file://Makefile.in-Add-tinfo-library-to-the-linking-librari.patch \ + file://0001-detect-gold-as-GNU-linker-too.patch \ + file://0002-don-t-ignore-CFLAGS-when-building-snack.patch \ + " -SRC_URI[md5sum] = "685721bee1a318570704b19dcf31d268" -SRC_URI[sha256sum] = "771b0e634ede56ae6a6acd910728bb5832ac13ddb0d1d27919d2498dab70c91e" +SRC_URI[md5sum] = "a0a5fd6b53bb167a65e15996b249ebb5" +SRC_URI[sha256sum] = "265eb46b55d7eaeb887fca7a1d51fe115658882dfe148164b6c49fccac5abb31" S = "${WORKDIR}/newt-${PV}" -EXTRA_OECONF = "--without-tcl --without-python" +inherit autotools-brokensep python3native python3-dir -inherit autotools-brokensep +EXTRA_OECONF = "--without-tcl --with-python" + +EXTRA_OEMAKE += "PYTHONVERS=${PYTHON_DIR}" CLEANBROKEN = "1" -export STAGING_INCDIR -export STAGING_LIBDIR +export CPPFLAGS -export BUILD_SYS -export HOST_SYS +PACKAGES_prepend = "whiptail ${PN}-python " -PACKAGES_prepend = "whiptail " +RDEPENDS_${PN}-python += "python3-core" +FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*" do_configure_prepend() { sh autogen.sh @@ -53,4 +55,4 @@ do_compile_prepend() { FILES_whiptail = "${bindir}/whiptail" -BBCLASSEXTEND = "native" +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-extended/packagegroups/packagegroup-core-base-utils.bb b/meta/recipes-extended/packagegroups/packagegroup-core-base-utils.bb new file mode 100644 index 0000000000..1e63da7f16 --- /dev/null +++ b/meta/recipes-extended/packagegroups/packagegroup-core-base-utils.bb @@ -0,0 +1,61 @@ +# +# Copyright (C) 2019 Konsulko Group +# + +SUMMARY = "Full-featured set of base utils" +DESCRIPTION = "Package group bringing in packages needed to provide much of the base utils type functionality found in busybox" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit packagegroup + +VIRTUAL-RUNTIME_vim ?= "vim-tiny" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +RDEPENDS_${PN} = "\ + base-passwd \ + bash \ + bind-utils \ + bzip2 \ + coreutils \ + cpio \ + ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "", "debianutils-run-parts", d)} \ + dhcpcd \ + ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "", "kea", d)} \ + diffutils \ + ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "", "dpkg-start-stop", d)} \ + e2fsprogs \ + ed \ + file \ + findutils \ + gawk \ + grep \ + gzip \ + ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "", "ifupdown", d)} \ + inetutils \ + inetutils-ping \ + inetutils-telnet \ + inetutils-tftp \ + inetutils-traceroute \ + iproute2 \ + ${@bb.utils.contains("MACHINE_FEATURES", "keyboard", "kbd", "", d)} \ + kmod \ + less \ + ncurses-tools \ + net-tools \ + parted \ + patch \ + procps \ + psmisc \ + sed \ + shadow-base \ + tar \ + time \ + unzip \ + util-linux \ + ${VIRTUAL-RUNTIME_vim} \ + wget \ + which \ + xz \ + " diff --git a/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb b/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb index 1d7e6089eb..16c2f9f2aa 100644 --- a/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb +++ b/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb @@ -5,7 +5,6 @@ SUMMARY = "Standard full-featured Linux system" DESCRIPTION = "Package group bringing in packages needed for a more traditional full-featured Linux system" PR = "r6" -LICENSE = "MIT" inherit packagegroup @@ -32,22 +31,24 @@ python __anonymous () { namemap["packagegroup-core-full-cmdline-initscripts"] = "packagegroup-core-initscripts" namemap["packagegroup-core-full-cmdline-sys-services"] = "packagegroup-core-sys-services" - packages = d.getVar("PACKAGES", True).split() + packages = d.getVar("PACKAGES").split() + mlprefix = d.getVar("MLPREFIX") for pkg in packages: + pkg2 = pkg[len(mlprefix):] if pkg.endswith('-dev'): - mapped = namemap.get(pkg[:-4], None) + mapped = namemap.get(pkg2[:-4], None) if mapped: mapped += '-dev' elif pkg.endswith('-dbg'): - mapped = namemap.get(pkg[:-4], None) + mapped = namemap.get(pkg2[:-4], None) if mapped: mapped += '-dbg' else: - mapped = namemap.get(pkg, None) + mapped = namemap.get(pkg2, None) if mapped: oldtaskname = mapped.replace("packagegroup-core", "task-core") - mapstr = " %s %s" % (mapped, oldtaskname) + mapstr = " %s%s %s%s" % (mlprefix, mapped, mlprefix, oldtaskname) d.appendVar("RPROVIDES_%s" % pkg, mapstr) d.appendVar("RREPLACES_%s" % pkg, mapstr) d.appendVar("RCONFLICTS_%s" % pkg, mapstr) @@ -82,24 +83,20 @@ RDEPENDS_packagegroup-core-full-cmdline-utils = "\ gawk \ gmp \ grep \ + less \ makedevs \ mc \ mc-fish \ mc-helpers \ mc-helpers-perl \ - mc-helpers-python \ - mktemp \ ncurses \ net-tools \ - pax \ - popt \ procps \ psmisc \ sed \ tar \ time \ util-linux \ - zlib \ " RDEPENDS_packagegroup-core-full-cmdline-extended = "\ @@ -111,16 +108,12 @@ RDEPENDS_packagegroup-core-full-cmdline-extended = "\ " RDEPENDS_packagegroup-core-full-cmdline-dev-utils = "\ - byacc \ diffutils \ m4 \ make \ patch \ " -VIRTUAL-RUNTIME_initscripts ?= "initscripts" -VIRTUAL-RUNTIME_init_manager ?= "sysvinit" -VIRTUAL-RUNTIME_login_manager ?= "busybox" VIRTUAL-RUNTIME_syslog ?= "sysklogd" RDEPENDS_packagegroup-core-full-cmdline-initscripts = "\ ${VIRTUAL-RUNTIME_initscripts} \ @@ -131,32 +124,16 @@ RDEPENDS_packagegroup-core-full-cmdline-initscripts = "\ " RDEPENDS_packagegroup-core-full-cmdline-multiuser = "\ + bzip2 \ cracklib \ gzip \ - ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libuser', '', d)} \ shadow \ sudo \ " RDEPENDS_packagegroup-core-full-cmdline-sys-services = "\ at \ - bzip2 \ cronie \ - dbus \ - dbus-glib \ - python-dbus \ - elfutils \ - gzip \ - less \ - libcap \ - libevent \ logrotate \ - nfs-utils \ - pciutils \ - libpcre \ - rpcbind \ - sysfsutils \ - tcp-wrappers \ - tzdata \ + ${@bb.utils.contains('DISTRO_FEATURES', 'nfs', 'nfs-utils rpcbind', '', d)} \ " - diff --git a/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb b/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb deleted file mode 100644 index ce823858ce..0000000000 --- a/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb +++ /dev/null @@ -1,278 +0,0 @@ -# -# Copyright (C) 2010 Intel Corporation -# - -SUMMARY = "Linux Standard Base (LSB)" -DESCRIPTION = "Packages required to satisfy the Linux Standard Base (LSB) specification" -PR = "r10" -LICENSE = "MIT" - -inherit packagegroup distro_features_check - -# The libxt, libxtst and others require x11 in DISTRO_FEATURES -REQUIRED_DISTRO_FEATURES = "x11" - -# -# We will skip parsing this packagegeoup for non-glibc systems -# -python __anonymous () { - if d.getVar('TCLIBC', True) != "glibc": - raise bb.parse.SkipPackage("incompatible with %s C library" % - d.getVar('TCLIBC', True)) -} - -PACKAGES = "\ - packagegroup-core-lsb \ - packagegroup-core-sys-extended \ - packagegroup-core-db \ - packagegroup-core-perl \ - packagegroup-core-python \ - packagegroup-core-tcl \ - packagegroup-core-lsb-misc \ - packagegroup-core-lsb-core \ - packagegroup-core-lsb-perl \ - packagegroup-core-lsb-python \ - packagegroup-core-lsb-desktop \ - packagegroup-core-lsb-runtime-add \ - " - - -RDEPENDS_packagegroup-core-lsb = "\ - packagegroup-core-sys-extended \ - packagegroup-core-db \ - packagegroup-core-perl \ - packagegroup-core-python \ - packagegroup-core-tcl \ - packagegroup-core-lsb-misc \ - packagegroup-core-lsb-core \ - packagegroup-core-lsb-perl \ - packagegroup-core-lsb-python \ - packagegroup-core-lsb-desktop \ - packagegroup-core-lsb-runtime-add \ - " - - -RDEPENDS_packagegroup-core-sys-extended = "\ - curl \ - dhcp-client \ - hdparm \ - lighttpd \ - libaio \ - lrzsz \ - lzo \ - mc \ - mc-fish \ - mc-helpers \ - mc-helpers-perl \ - mc-helpers-python \ - mdadm \ - minicom \ - neon \ - parted \ - ${PTH} \ - quota \ - screen \ - setserial \ - sysstat \ - udev-extraconf \ - unzip \ - watchdog \ - wget \ - which \ - xinetd \ - zip \ - " - -RDEPENDS_packagegroup-core-db = "\ - db \ - sqlite3 \ - " - -RDEPENDS_packagegroup-core-perl = "\ - gdbm \ - perl \ - zlib \ - " - - -RDEPENDS_packagegroup-core-python = "\ - expat \ - gdbm \ - gmp \ - ncurses \ - openssl \ - python \ - readline \ - zip \ - " - -RDEPENDS_packagegroup-core-tcl = "\ - tcl \ - " - -# Miscellaneous packages required by LSB (or LSB tests) -RDEPENDS_packagegroup-core-lsb-misc = "\ - chkconfig \ - gettext \ - gettext-runtime \ - groff \ - lsbinitscripts \ - lsbtest \ - lsof \ - strace \ - libusb1 \ - usbutils \ - rpm \ - " - -SUMMARY_packagegroup-core-lsb-core = "LSB Core" -DESCRIPTION_packagegroup-core-lsb-core = "Packages required to support commands/libraries \ - specified in the LSB Core specification" -RDEPENDS_packagegroup-core-lsb-core = "\ - at \ - bash \ - bc \ - binutils \ - binutils-symlinks \ - coreutils \ - cpio \ - cronie \ - cups \ - diffutils \ - ed \ - glibc-utils \ - elfutils \ - file \ - findutils \ - fontconfig-utils \ - foomatic-filters \ - gawk \ - ghostscript \ - grep \ - gzip \ - localedef \ - lsb \ - m4 \ - mailx \ - make \ - man \ - man-pages \ - mktemp \ - msmtp \ - patch \ - pax \ - procps \ - psmisc \ - sed \ - shadow \ - tar \ - time \ - util-linux \ - xdg-utils \ - \ - glibc \ - libgcc \ - libpam \ - libxml2 \ - ncurses \ - zlib \ - nspr \ - libpng12 \ - nss \ -" - -SUMMARY_packagegroup-core-lsb-perl = "LSB Runtime Languages (Perl)" -DESCRIPTION_packagegroup-core-lsb-perl = "Packages required to support libraries \ - specified in the LSB Runtime languages specification (Perl parts)" -RDEPENDS_packagegroup-core-lsb-perl = "\ - perl \ - perl-modules \ - perl-misc \ - perl-pod \ - perl-dev \ - perl-doc \ -" - -SUMMARY_packagegroup-core-lsb-python = "LSB Runtime Languages (Python)" -DESCRIPTION_packagegroup-core-lsb-python = "Packages required to support libraries \ - specified in the LSB Runtime languages specification (Python parts)" -RDEPENDS_packagegroup-core-lsb-python = "\ - python \ - python-modules \ - python-misc \ -" - -def get_libqt3(d): - if 'linuxstdbase' in d.getVar('DISTROOVERRIDES', False) or "": - if 'qt3' in d.getVar('BBFILE_COLLECTIONS', False) or "": - return 'libqt-mt3' - - bb.warn('The meta-qt3 layer should be added, this layer provides Qt 3.x' \ - 'libraries. Its intended use is for passing LSB tests as Qt3 is' \ - 'a requirement for LSB.') - return '' - -QT4PKGS = " \ - libqtcore4 \ - libqtgui4 \ - libqtsql4 \ - libqtsvg4 \ - libqtxml4 \ - libqtnetwork4 \ - qt4-plugin-sqldriver-sqlite \ - ${@bb.utils.contains("DISTRO_FEATURES", "opengl", "libqtopengl4", "", d)} \ - " -QT4PKGS_mips64 = "" -QT4PKGS_mips64n32 = "" - -SUMMARY_packagegroup-core-lsb-desktop = "LSB Desktop" -DESCRIPTION_packagegroup-core-lsb-desktop = "Packages required to support libraries \ - specified in the LSB Desktop specification" -RDEPENDS_packagegroup-core-lsb-desktop = "\ - libxt \ - libxxf86vm \ - libdrm \ - libglu \ - libxi \ - libxtst \ - libx11-locale \ - xorg-minimal-fonts \ - gdk-pixbuf-loader-ico \ - gdk-pixbuf-loader-bmp \ - gdk-pixbuf-loader-ani \ - gdk-pixbuf-xlib \ - liberation-fonts \ - gtk+ \ - atk \ - libasound \ - ${QT4PKGS} \ - ${@get_libqt3(d)} \ -" - -RDEPENDS_packagegroup-core-lsb-runtime-add = "\ - ldd \ - pam-plugin-wheel \ - e2fsprogs-mke2fs \ - mkfontdir \ - liburi-perl \ - libxml-parser-perl \ - libxml-perl \ - libxml-sax-perl \ - glibc-localedatas \ - glibc-gconvs \ - glibc-charmaps \ - glibc-binaries \ - glibc-localedata-posix \ - glibc-extra-nss \ - glibc-pcprofile \ - libclass-isa-perl \ - libenv-perl \ - libdumpvalue-perl \ - libfile-checktree-perl \ - libi18n-collate-perl \ - libpod-plainer-perl \ -" - -PTH = "pth" -PTH_libc-uclibc = "" - diff --git a/meta/recipes-extended/pam/libpam/0001-Add-support-for-defining-missing-funcitonality.patch b/meta/recipes-extended/pam/libpam/0001-Add-support-for-defining-missing-funcitonality.patch new file mode 100644 index 0000000000..c55b648139 --- /dev/null +++ b/meta/recipes-extended/pam/libpam/0001-Add-support-for-defining-missing-funcitonality.patch @@ -0,0 +1,68 @@ +From 45d1ed58927593968faead7dbb295f3922f41a2f Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 8 Aug 2015 14:16:43 -0700 +Subject: [PATCH] Add support for defining missing funcitonality + +In order to support alternative libc on linux ( musl, bioninc ) etc we +need to check for glibc-only features and provide alternatives, in this +list strndupa is first one, when configure detects that its not included +in system C library then the altrnative implementation from missing.h is +used + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + configure.ac | 3 +++ + libpam/include/missing.h | 12 ++++++++++++ + modules/pam_exec/pam_exec.c | 1 + + 3 files changed, 16 insertions(+) + create mode 100644 libpam/include/missing.h + +diff --git a/configure.ac b/configure.ac +index 9e1257f..cbed979 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -599,6 +599,9 @@ dnl + AC_CHECK_DECL(__NR_keyctl, [have_key_syscalls=1],[have_key_syscalls=0],[#include <sys/syscall.h>]) + AC_CHECK_DECL(ENOKEY, [have_key_errors=1],[have_key_errors=0],[#include <errno.h>]) + ++# musl and bionic don't have strndupa ++AC_CHECK_DECLS_ONCE([strndupa]) ++ + HAVE_KEY_MANAGEMENT=0 + if test $have_key_syscalls$have_key_errors = 11 + then +diff --git a/libpam/include/missing.h b/libpam/include/missing.h +new file mode 100644 +index 0000000..3cf011c +--- /dev/null ++++ b/libpam/include/missing.h +@@ -0,0 +1,12 @@ ++#pragma once ++ ++#if !HAVE_DECL_STRNDUPA ++#define strndupa(s, n) \ ++ ({ \ ++ const char *__old = (s); \ ++ size_t __len = strnlen(__old, (n)); \ ++ char *__new = alloca(__len + 1); \ ++ __new[__len] = '\0'; \ ++ memcpy(__new, __old, __len); \ ++ }) ++#endif +diff --git a/modules/pam_exec/pam_exec.c b/modules/pam_exec/pam_exec.c +index 17ba6ca..3aa2694 100644 +--- a/modules/pam_exec/pam_exec.c ++++ b/modules/pam_exec/pam_exec.c +@@ -59,6 +59,7 @@ + #include <security/pam_modutil.h> + #include <security/pam_ext.h> + #include <security/_pam_macros.h> ++#include <missing.h> + + #define ENV_ITEM(n) { (n), #n } + static struct { +-- +2.1.4 + diff --git a/meta/recipes-extended/pam/libpam/crypt_configure.patch b/meta/recipes-extended/pam/libpam/crypt_configure.patch index bec82a5f10..917a8af64d 100644 --- a/meta/recipes-extended/pam/libpam/crypt_configure.patch +++ b/meta/recipes-extended/pam/libpam/crypt_configure.patch @@ -1,31 +1,40 @@ +From b86575ab4a0df07da160283459da270e1c0372a0 Mon Sep 17 00:00:00 2001 +From: "Maxin B. John" <maxin.john@intel.com> +Date: Tue, 24 May 2016 14:11:09 +0300 +Subject: [PATCH] crypt_configure + This patch fixes a case where it find crypt defined in libc (musl) but not in specified libraries then it ends up assigning - LIBCRYPT="-l" which then goes into makefile cause all sort of problems e.g. ld: cannot find -l-m32 | collect2: error: ld returned 1 exit status - -The reason is that -l appears on commandline with out any library and -compiler treats the next argument as library name whatever it is. - +The reason is that -l appears on commandline with +out any library and compiler treats the next argument as library name +whatever it is. Upstream-Status: Pending + Signed-off-by: Khem Raj <raj.khem@gmail.com> +Signed-off-by: Maxin B. John <maxin.john@intel.com> +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -Index: Linux-PAM-1.1.6/configure.in -=================================================================== ---- Linux-PAM-1.1.6.org/configure.ac -+++ Linux-PAM-1.1.6/configure.ac -@@ -400,7 +400,9 @@ AS_IF([test "x$ac_cv_header_xcrypt_h" = +diff --git a/configure.ac b/configure.ac +index df39d07..e68d856 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -401,7 +401,7 @@ AS_IF([test "x$ac_cv_header_xcrypt_h" = "xyes"], [crypt_libs="crypt"]) BACKUP_LIBS=$LIBS --AC_SEARCH_LIBS([crypt],[$crypt_libs], LIBCRYPT="-l$ac_lib", LIBCRYPT="") -+AC_SEARCH_LIBS([crypt],[$crypt_libs], -+ [test "$ac_cv_search_crypt" = "none required" || -+ LIBCRYPT="$ac_cv_search_crypt"]) +-AC_SEARCH_LIBS([crypt],[$crypt_libs], LIBCRYPT="${ac_lib:+-l$ac_lib}", LIBCRYPT="") ++AC_SEARCH_LIBS([crypt],[$crypt_libs], [test "$ac_cv_search_crypt" = "none required" || LIBCRYPT="$ac_cv_search_crypt"]) AC_CHECK_FUNCS(crypt_r crypt_gensalt_r) LIBS=$BACKUP_LIBS AC_SUBST(LIBCRYPT) +-- +2.4.0 + diff --git a/meta/recipes-extended/pam/libpam/fixsepbuild.patch b/meta/recipes-extended/pam/libpam/fixsepbuild.patch deleted file mode 100644 index 8a9c3b2fa1..0000000000 --- a/meta/recipes-extended/pam/libpam/fixsepbuild.patch +++ /dev/null @@ -1,24 +0,0 @@ -Fix the build error when a separate build directory is used: - -Making install in xtestsmake[1]: Entering directory `/media/build1/poky/build1/tmp/work/i586-poky-linux/libpam/1.1.6-r2/build/xtests'/usr/bin/install -c -d /media/build1/poky/build1/tmp/work/i586-poky-linux/libpam/1.1.6-r2/image/usr/share/Linux-PAM/xtestsfor file in run-xtests.sh tst-pam_dispatch1.pamd tst-pam_dispatch2.pamd tst-pam_dispatch3.pamd tst-pam_dispatch4.pamd tst-pam_dispatch5.pamd tst-pam_cracklib1.pamd tst-pam_cracklib2.pamd tst-pam_unix1.pamd tst-pam_unix2.pamd tst-pam_unix3.pamd tst-pam_unix4.pamd tst-pam_unix1.sh tst-pam_unix2.sh tst-pam_unix3.sh tst-pam_unix4.sh access.conf tst-pam_access1.pamd tst-pam_access1.sh tst-pam_access2.pamd tst-pam_access2.sh tst-pam_access3.pamd tst-pam_access3.sh tst-pam_access4.pamd tst-pam_access4.sh limits.conf tst-pam_limits1.pamd tst-pam_limits1.sh tst-pam_succeed_if1.pamd tst-pam_succeed_if1.sh group.conf tst-pam_group1.pamd tst-pam_group1.sh tst-pam_authfail.pamd tst-pam_authsucceed.pamd tst-pam_substack1.pamd tst-pam_substack1a.pamd tst-pam_substack1.sh tst-pam_substack2.pamd tst-pam_substack2a.pamd tst-pam_substack2.sh tst-pam_substack3.pamd tst-pam_substack3a.pamd tst-pam_substack3.sh tst-pam_substack4.pamd tst-pam_substack4a.pamd tst-pam_substack4.sh tst-pam_substack5.pamd tst-pam_substack5a.pamd tst-pam_substack5.sh tst-pam_assemble_line1.pamd tst-pam_assemble_line1.sh tst-pam_pwhistory1.pamd tst-pam_pwhistory1.sh tst-pam_time1.pamd time.conf ; do \/usr/bin/install -c $file /media/build1/poky/build1/tmp/work/i586-poky-linux/libpam/1.1.6-r2/image/usr/share/Linux-PAM/xtests ; \ done -/usr/bin/install: cannot stat `run-xtests.sh': No such file or directory -/usr/bin/install: cannot stat `tst-pam_dispatch1.pamd': No such file or directory -/usr/bin/install: cannot stat `tst-pam_dispatch2.pamd': No such file or directory - -Upstream-Status: Pending - -RP 2013/03/21 - -Index: Linux-PAM-1.1.6/xtests/Makefile.am -=================================================================== ---- Linux-PAM-1.1.6.orig/xtests/Makefile.am 2013-03-08 12:26:30.360266000 +0000 -+++ Linux-PAM-1.1.6/xtests/Makefile.am 2013-03-21 11:39:58.557166650 +0000 -@@ -59,7 +59,7 @@ - install_xtests: - $(INSTALL) -d $(DESTDIR)$(pkgdatadir)/xtests - for file in $(EXTRA_DIST) ; do \ -- $(INSTALL) $$file $(DESTDIR)$(pkgdatadir)/xtests ; \ -+ $(INSTALL) $(srcdir)/$$file $(DESTDIR)$(pkgdatadir)/xtests ; \ - done - for file in $(XTESTS); do \ - $(INSTALL) .libs/$$file $(DESTDIR)$(pkgdatadir)/xtests ; \ diff --git a/meta/recipes-extended/pam/libpam/include_paths_header.patch b/meta/recipes-extended/pam/libpam/include_paths_header.patch new file mode 100644 index 0000000000..e4eb95669b --- /dev/null +++ b/meta/recipes-extended/pam/libpam/include_paths_header.patch @@ -0,0 +1,59 @@ +This patch adds missing include for paths.h which should provide +_PATH_LASTLOG definition + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Index: Linux-PAM-1.1.6/modules/pam_lastlog/pam_lastlog.c +=================================================================== +--- Linux-PAM-1.1.6.orig/modules/pam_lastlog/pam_lastlog.c ++++ Linux-PAM-1.1.6/modules/pam_lastlog/pam_lastlog.c +@@ -23,9 +23,11 @@ + #include <stdarg.h> + #include <stdio.h> + #include <string.h> ++#include <sys/file.h> + #include <sys/types.h> + #include <syslog.h> + #include <unistd.h> ++#include <paths.h> + + #if defined(hpux) || defined(sunos) || defined(solaris) + # ifndef _PATH_LASTLOG +@@ -332,6 +334,23 @@ last_login_read(pam_handle_t *pamh, int + return retval; + } + ++#ifndef __GLIBC__ ++static void logwtmp(const char * line, const char * name, const char * host) ++{ ++ struct utmp u; ++ memset(&u, 0, sizeof(u)); ++ ++ u.ut_pid = getpid(); ++ u.ut_type = name[0] ? USER_PROCESS : DEAD_PROCESS; ++ strncpy(u.ut_line, line, sizeof(u.ut_line)); ++ strncpy(u.ut_name, name, sizeof(u.ut_name)); ++ strncpy(u.ut_host, host, sizeof(u.ut_host)); ++ gettimeofday(&(u.ut_tv), NULL); ++ ++ updwtmp(_PATH_WTMP, &u); ++} ++#endif /* __GLIBC__ */ ++ + static int + last_login_write(pam_handle_t *pamh, int announce, int last_fd, + uid_t uid, const char *user) +Index: Linux-PAM-1.1.6/modules/Makefile.am +=================================================================== +--- Linux-PAM-1.1.6.orig/modules/Makefile.am ++++ Linux-PAM-1.1.6/modules/Makefile.am +@@ -7,7 +7,7 @@ SUBDIRS = pam_access pam_cracklib pam_de + pam_group pam_issue pam_keyinit pam_lastlog pam_limits \ + pam_listfile pam_localuser pam_loginuid pam_mail \ + pam_mkhomedir pam_motd pam_namespace pam_nologin \ +- pam_permit pam_pwhistory pam_rhosts pam_rootok pam_securetty \ ++ pam_permit pam_pwhistory pam_rootok pam_securetty \ + pam_selinux pam_sepermit pam_shells pam_stress \ + pam_succeed_if pam_tally pam_tally2 pam_time pam_timestamp \ + pam_tty_audit pam_umask \ diff --git a/meta/recipes-extended/pam/libpam/libpam-xtests-remove-bash-dependency.patch b/meta/recipes-extended/pam/libpam/libpam-xtests-remove-bash-dependency.patch deleted file mode 100644 index 680029ae0d..0000000000 --- a/meta/recipes-extended/pam/libpam/libpam-xtests-remove-bash-dependency.patch +++ /dev/null @@ -1,226 +0,0 @@ -From 555407ff6e2f742df64ae93859f14a0fc1397829 Mon Sep 17 00:00:00 2001 -From: Wenzong Fan <wenzong.fan@windriver.com> -Date: Fri, 12 Sep 2014 05:35:05 -0400 -Subject: [PATCH] libpam/xtests: remove bash dependency - -There's not bash specific syntax in the xtest scripts: - - # after below patches applied: - $ cd Linux-PAM-1.1.6/xtests - $ checkbashisms *.sh - No output - -Just remove the runtime dependency to bash. - -Upstream-Status: Pending - -Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> ---- - xtests/run-xtests.sh | 2 +- - xtests/tst-pam_access1.sh | 2 +- - xtests/tst-pam_access2.sh | 2 +- - xtests/tst-pam_access3.sh | 2 +- - xtests/tst-pam_access4.sh | 2 +- - xtests/tst-pam_assemble_line1.sh | 2 +- - xtests/tst-pam_group1.sh | 2 +- - xtests/tst-pam_limits1.sh | 2 +- - xtests/tst-pam_pwhistory1.sh | 2 +- - xtests/tst-pam_substack1.sh | 2 +- - xtests/tst-pam_substack2.sh | 2 +- - xtests/tst-pam_substack3.sh | 2 +- - xtests/tst-pam_substack4.sh | 2 +- - xtests/tst-pam_substack5.sh | 2 +- - xtests/tst-pam_succeed_if1.sh | 2 +- - xtests/tst-pam_unix1.sh | 2 +- - xtests/tst-pam_unix2.sh | 2 +- - xtests/tst-pam_unix3.sh | 2 +- - xtests/tst-pam_unix4.sh | 2 +- - 19 files changed, 19 insertions(+), 19 deletions(-) - -diff --git a/xtests/run-xtests.sh b/xtests/run-xtests.sh -index 3a89057..1cf8684 100755 ---- a/xtests/run-xtests.sh -+++ b/xtests/run-xtests.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - SRCDIR=$1 - shift 1 -diff --git a/xtests/tst-pam_access1.sh b/xtests/tst-pam_access1.sh -index 180d256..70521d2 100755 ---- a/xtests/tst-pam_access1.sh -+++ b/xtests/tst-pam_access1.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - /usr/sbin/groupadd tstpamaccess - /usr/sbin/useradd -G tstpamaccess -p '!!' tstpamaccess1 -diff --git a/xtests/tst-pam_access2.sh b/xtests/tst-pam_access2.sh -index 0a30275..7e3e60f 100755 ---- a/xtests/tst-pam_access2.sh -+++ b/xtests/tst-pam_access2.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - /usr/sbin/groupadd tstpamaccess - /usr/sbin/useradd -p '!!' tstpamaccess2 -diff --git a/xtests/tst-pam_access3.sh b/xtests/tst-pam_access3.sh -index 348e0c3..3630e2e 100755 ---- a/xtests/tst-pam_access3.sh -+++ b/xtests/tst-pam_access3.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - /usr/sbin/useradd -p '!!' tstpamaccess3 - ./tst-pam_access3 -diff --git a/xtests/tst-pam_access4.sh b/xtests/tst-pam_access4.sh -index 61e7b44..4538df4 100755 ---- a/xtests/tst-pam_access4.sh -+++ b/xtests/tst-pam_access4.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - /usr/sbin/useradd -p '!!' tstpamaccess4 - ./tst-pam_access4 -diff --git a/xtests/tst-pam_assemble_line1.sh b/xtests/tst-pam_assemble_line1.sh -index 248d47e..dc2a675 100755 ---- a/xtests/tst-pam_assemble_line1.sh -+++ b/xtests/tst-pam_assemble_line1.sh -@@ -1,3 +1,3 @@ --#!/bin/bash -+#!/bin/sh - - exec ./tst-pam_authfail tst-pam_assemble_line1 -diff --git a/xtests/tst-pam_group1.sh b/xtests/tst-pam_group1.sh -index b76377f..44faca9 100755 ---- a/xtests/tst-pam_group1.sh -+++ b/xtests/tst-pam_group1.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - /usr/sbin/groupadd tstpamgrpg - /usr/sbin/useradd -p '!!' tstpamgrp -diff --git a/xtests/tst-pam_limits1.sh b/xtests/tst-pam_limits1.sh -index 4faa822..32c021d 100755 ---- a/xtests/tst-pam_limits1.sh -+++ b/xtests/tst-pam_limits1.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - /usr/sbin/useradd -p '!!' tstpamlimits - ./tst-pam_limits1 -diff --git a/xtests/tst-pam_pwhistory1.sh b/xtests/tst-pam_pwhistory1.sh -index ddb3b8b..0f212e2 100644 ---- a/xtests/tst-pam_pwhistory1.sh -+++ b/xtests/tst-pam_pwhistory1.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - /usr/sbin/useradd tstpampwhistory - ./tst-pam_pwhistory1 -diff --git a/xtests/tst-pam_substack1.sh b/xtests/tst-pam_substack1.sh -index 5260175..f1b72a7 100755 ---- a/xtests/tst-pam_substack1.sh -+++ b/xtests/tst-pam_substack1.sh -@@ -1,3 +1,3 @@ --#!/bin/bash -+#!/bin/sh - - exec ./tst-pam_authfail tst-pam_substack1 -diff --git a/xtests/tst-pam_substack2.sh b/xtests/tst-pam_substack2.sh -index c02f597..3804fa7 100755 ---- a/xtests/tst-pam_substack2.sh -+++ b/xtests/tst-pam_substack2.sh -@@ -1,3 +1,3 @@ --#!/bin/bash -+#!/bin/sh - - exec ./tst-pam_authsucceed tst-pam_substack2 -diff --git a/xtests/tst-pam_substack3.sh b/xtests/tst-pam_substack3.sh -index 0e572aa..aa48e8e 100755 ---- a/xtests/tst-pam_substack3.sh -+++ b/xtests/tst-pam_substack3.sh -@@ -1,3 +1,3 @@ --#!/bin/bash -+#!/bin/sh - - exec ./tst-pam_authsucceed tst-pam_substack3 -diff --git a/xtests/tst-pam_substack4.sh b/xtests/tst-pam_substack4.sh -index a3ef08a..958a07a 100755 ---- a/xtests/tst-pam_substack4.sh -+++ b/xtests/tst-pam_substack4.sh -@@ -1,3 +1,3 @@ --#!/bin/bash -+#!/bin/sh - - exec ./tst-pam_authsucceed tst-pam_substack4 -diff --git a/xtests/tst-pam_substack5.sh b/xtests/tst-pam_substack5.sh -index e2714fd..7e0da74 100755 ---- a/xtests/tst-pam_substack5.sh -+++ b/xtests/tst-pam_substack5.sh -@@ -1,3 +1,3 @@ --#!/bin/bash -+#!/bin/sh - - exec ./tst-pam_authfail tst-pam_substack5 -diff --git a/xtests/tst-pam_succeed_if1.sh b/xtests/tst-pam_succeed_if1.sh -index a643b2e..58e57b4 100755 ---- a/xtests/tst-pam_succeed_if1.sh -+++ b/xtests/tst-pam_succeed_if1.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - /usr/sbin/useradd -p '!!' tstpamtest - /usr/sbin/useradd -p '!!' pamtest -diff --git a/xtests/tst-pam_unix1.sh b/xtests/tst-pam_unix1.sh -index f75bd84..72deac0 100755 ---- a/xtests/tst-pam_unix1.sh -+++ b/xtests/tst-pam_unix1.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - /usr/sbin/useradd -p '!!' tstpamunix - ./tst-pam_unix1 -diff --git a/xtests/tst-pam_unix2.sh b/xtests/tst-pam_unix2.sh -index 7093155..c04d6e6 100755 ---- a/xtests/tst-pam_unix2.sh -+++ b/xtests/tst-pam_unix2.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - # pamunix0 = 0aXKZztA.d1KY - /usr/sbin/useradd -p 0aXKZztA.d1KY tstpamunix -diff --git a/xtests/tst-pam_unix3.sh b/xtests/tst-pam_unix3.sh -index ef4a07c..b52db2b 100755 ---- a/xtests/tst-pam_unix3.sh -+++ b/xtests/tst-pam_unix3.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - # pamunix01 = 0aXKZztA.d1KYIuFXArmd2jU - /usr/sbin/useradd -p 0aXKZztA.d1KYIuFXArmd2jU tstpamunix -diff --git a/xtests/tst-pam_unix4.sh b/xtests/tst-pam_unix4.sh -index 787c2f9..e7976fd 100755 ---- a/xtests/tst-pam_unix4.sh -+++ b/xtests/tst-pam_unix4.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - # pamunix01 = 0aXKZztA.d1KYIuFXArmd2jU - /usr/sbin/useradd -p 0aXKZztA.d1KYIuFXArmd2jU tstpamunix --- -1.7.9.5 - diff --git a/meta/recipes-extended/pam/libpam/libpam-xtests.patch b/meta/recipes-extended/pam/libpam/libpam-xtests.patch index be687457f8..ea145899b4 100644 --- a/meta/recipes-extended/pam/libpam/libpam-xtests.patch +++ b/meta/recipes-extended/pam/libpam/libpam-xtests.patch @@ -3,18 +3,20 @@ This patch is used to create a new sub package libpam-xtests to do more checks. Upstream-Status: Pending Signed-off-by: Kang Kai <kai.kang@windriver.com> ---- Linux-PAM-1.1.4/xtests/Makefile.am.orig 2011-07-19 17:00:09.619980001 +0800 -+++ Linux-PAM-1.1.4/xtests/Makefile.am 2011-07-19 16:54:00.229979998 +0800 -@@ -7,7 +7,7 @@ - AM_LDFLAGS = -L$(top_builddir)/libpam -lpam \ - -L$(top_builddir)/libpam_misc -lpam_misc +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 @@ +@@ -51,3 +51,18 @@ EXTRA_PROGRAMS = $(XTESTS) xtests: $(XTESTS) run-xtests.sh "$(srcdir)"/run-xtests.sh "$(srcdir)" ${XTESTS} ${NOSRCTESTS} @@ -26,7 +28,7 @@ Signed-off-by: Kang Kai <kai.kang@windriver.com> +install_xtests: + $(INSTALL) -d $(DESTDIR)$(pkgdatadir)/xtests + for file in $(EXTRA_DIST) ; do \ -+ $(INSTALL) $$file $(DESTDIR)$(pkgdatadir)/xtests ; \ ++ $(INSTALL) $(srcdir)/$$file $(DESTDIR)$(pkgdatadir)/xtests ; \ + done + for file in $(XTESTS); do \ + $(INSTALL) .libs/$$file $(DESTDIR)$(pkgdatadir)/xtests ; \ diff --git a/meta/recipes-extended/pam/libpam/pam-no-innetgr.patch b/meta/recipes-extended/pam/libpam/pam-no-innetgr.patch deleted file mode 100644 index 5e551ac48f..0000000000 --- a/meta/recipes-extended/pam/libpam/pam-no-innetgr.patch +++ /dev/null @@ -1,97 +0,0 @@ -innetgr may not be there so make sure that when innetgr is not present -then we inform about it and not use it. - --Khem - -Upstream-Status: Pending - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - -Index: Linux-PAM-1.1.3/modules/pam_group/pam_group.c -=================================================================== ---- Linux-PAM-1.1.3.orig/modules/pam_group/pam_group.c -+++ Linux-PAM-1.1.3/modules/pam_group/pam_group.c -@@ -659,7 +659,11 @@ static int check_account(pam_handle_t *p - } - /* If buffer starts with @, we are using netgroups */ - if (buffer[0] == '@') -- good &= innetgr (&buffer[1], NULL, user, NULL); -+#ifdef HAVE_INNETGR -+ good &= innetgr (&buffer[1], NULL, user, NULL); -+#else -+ pam_syslog (pamh, LOG_ERR, "pam_group does not have netgroup support"); -+#endif - /* otherwise, if the buffer starts with %, it's a UNIX group */ - else if (buffer[0] == '%') - good &= pam_modutil_user_in_group_nam_nam(pamh, user, &buffer[1]); -Index: Linux-PAM-1.1.3/modules/pam_time/pam_time.c -=================================================================== ---- Linux-PAM-1.1.3.orig/modules/pam_time/pam_time.c -+++ Linux-PAM-1.1.3/modules/pam_time/pam_time.c -@@ -555,9 +555,13 @@ check_account(pam_handle_t *pamh, const - } - /* If buffer starts with @, we are using netgroups */ - if (buffer[0] == '@') -- good &= innetgr (&buffer[1], NULL, user, NULL); -+#ifdef HAVE_INNETGR -+ good &= innetgr (&buffer[1], NULL, user, NULL); -+#else -+ pam_syslog (pamh, LOG_ERR, "pam_time does not have netgroup support"); -+#endif - else -- good &= logic_field(pamh, user, buffer, count, is_same); -+ good &= logic_field(pamh, user, buffer, count, is_same); - D(("with user: %s", good ? "passes":"fails" )); - - /* here we get the time field */ -Index: Linux-PAM-1.1.3/modules/pam_succeed_if/pam_succeed_if.c -=================================================================== ---- Linux-PAM-1.1.3.orig/modules/pam_succeed_if/pam_succeed_if.c -+++ Linux-PAM-1.1.3/modules/pam_succeed_if/pam_succeed_if.c -@@ -231,18 +231,27 @@ evaluate_notingroup(pam_handle_t *pamh, - } - /* Return PAM_SUCCESS if the (host,user) is in the netgroup. */ - static int --evaluate_innetgr(const char *host, const char *user, const char *group) -+evaluate_innetgr(const pam_handle_t* pamh, const char *host, const char *user, const char *group) - { -+#ifdef HAVE_INNETGR - if (innetgr(group, host, user, NULL) == 1) - return PAM_SUCCESS; -+#else -+ pam_syslog (pamh, LOG_ERR, "pam_succeed_if does not have netgroup support"); -+#endif -+ - return PAM_AUTH_ERR; - } - /* Return PAM_SUCCESS if the (host,user) is NOT in the netgroup. */ - static int --evaluate_notinnetgr(const char *host, const char *user, const char *group) -+evaluate_notinnetgr(const pam_handle_t* pamh, const char *host, const char *user, const char *group) - { -+#ifdef HAVE_INNETGR - if (innetgr(group, host, user, NULL) == 0) - return PAM_SUCCESS; -+#else -+ pam_syslog (pamh, LOG_ERR, "pam_succeed_if does not have netgroup support"); -+#endif - return PAM_AUTH_ERR; - } - -@@ -361,14 +370,14 @@ evaluate(pam_handle_t *pamh, int debug, - const void *rhost; - if (pam_get_item(pamh, PAM_RHOST, &rhost) != PAM_SUCCESS) - rhost = NULL; -- return evaluate_innetgr(rhost, user, right); -+ return evaluate_innetgr(pamh, rhost, user, right); - } - /* (Rhost, user) is not in this group. */ - if (strcasecmp(qual, "notinnetgr") == 0) { - const void *rhost; - if (pam_get_item(pamh, PAM_RHOST, &rhost) != PAM_SUCCESS) - rhost = NULL; -- return evaluate_notinnetgr(rhost, user, right); -+ return evaluate_notinnetgr(pamh, rhost, user, right); - } - /* Fail closed. */ - return PAM_SERVICE_ERR; diff --git a/meta/recipes-extended/pam/libpam/pam-security-abstract-securetty-handling.patch b/meta/recipes-extended/pam/libpam/pam-security-abstract-securetty-handling.patch index f1834f6ce3..9b8d4c2975 100644 --- a/meta/recipes-extended/pam/libpam/pam-security-abstract-securetty-handling.patch +++ b/meta/recipes-extended/pam/libpam/pam-security-abstract-securetty-handling.patch @@ -5,12 +5,13 @@ Upstream-Status: Pending Signed-off-by: Ming Liu <ming.liu@windriver.com> =================================================================== -diff -urpN a/modules/pam_securetty/Makefile.am b/modules/pam_securetty/Makefile.am ---- a/modules/pam_securetty/Makefile.am 2013-07-05 11:08:23.224483237 +0800 -+++ b/modules/pam_securetty/Makefile.am 2013-07-05 11:15:21.304486456 +0800 +Index: Linux-PAM-1.3.0/modules/pam_securetty/Makefile.am +=================================================================== +--- Linux-PAM-1.3.0.orig/modules/pam_securetty/Makefile.am ++++ Linux-PAM-1.3.0/modules/pam_securetty/Makefile.am @@ -24,6 +24,10 @@ endif securelib_LTLIBRARIES = pam_securetty.la - pam_securetty_la_LIBADD = -L$(top_builddir)/libpam -lpam + pam_securetty_la_LIBADD = $(top_builddir)/libpam/libpam.la +pam_securetty_la_SOURCES = \ + pam_securetty.c \ @@ -19,9 +20,10 @@ diff -urpN a/modules/pam_securetty/Makefile.am b/modules/pam_securetty/Makefile. if ENABLE_REGENERATE_MAN noinst_DATA = README README: pam_securetty.8.xml -diff -urpN a/modules/pam_securetty/pam_securetty.c b/modules/pam_securetty/pam_securetty.c ---- a/modules/pam_securetty/pam_securetty.c 2013-07-05 11:07:50.064483568 +0800 -+++ b/modules/pam_securetty/pam_securetty.c 2013-07-05 11:12:23.994483344 +0800 +Index: Linux-PAM-1.3.0/modules/pam_securetty/pam_securetty.c +=================================================================== +--- Linux-PAM-1.3.0.orig/modules/pam_securetty/pam_securetty.c ++++ Linux-PAM-1.3.0/modules/pam_securetty/pam_securetty.c @@ -1,7 +1,5 @@ /* pam_securetty module */ @@ -104,9 +106,10 @@ diff -urpN a/modules/pam_securetty/pam_securetty.c b/modules/pam_securetty/pam_s if (retval && !(ctrl & PAM_NOCONSOLE_ARG)) { FILE *cmdlinefile; -diff -urpN a/modules/pam_securetty/tty_secure.c b/modules/pam_securetty/tty_secure.c ---- a/modules/pam_securetty/tty_secure.c 1970-01-01 08:30:00.000000000 +0830 -+++ b/modules/pam_securetty/tty_secure.c 2013-07-05 11:14:21.534482900 +0800 +Index: Linux-PAM-1.3.0/modules/pam_securetty/tty_secure.c +=================================================================== +--- /dev/null ++++ Linux-PAM-1.3.0/modules/pam_securetty/tty_secure.c @@ -0,0 +1,90 @@ +/* + * A function to determine if a particular line is in /etc/securetty diff --git a/meta/recipes-extended/pam/libpam/pam-unix-nullok-secure.patch b/meta/recipes-extended/pam/libpam/pam-unix-nullok-secure.patch index 3241e82959..d2cc66882e 100644 --- a/meta/recipes-extended/pam/libpam/pam-unix-nullok-secure.patch +++ b/meta/recipes-extended/pam/libpam/pam-unix-nullok-secure.patch @@ -1,9 +1,11 @@ -From 9bdc197474795f2d000c2bc04f58f7cef8898f21 Mon Sep 17 00:00:00 2001 -From: Amarnath Valluri <amarnath.valluri@intel.com> -Date: Wed, 15 Jul 2015 13:07:20 +0300 -Subject: [PATCH] Debian patch to add a new 'nullok_secure' option to pam_unix, - which accepts users with null passwords only when the applicant is connected - from a tty listed in /etc/securetty. +From b6545b83f94c5fb7aec1478b8d458a1393f479c8 Mon Sep 17 00:00:00 2001 +From: "Maxin B. John" <maxin.john@intel.com> +Date: Wed, 25 May 2016 14:12:25 +0300 +Subject: [PATCH] pam_unix: support 'nullok_secure' option + +Debian patch to add a new 'nullok_secure' option to pam_unix, +which accepts users with null passwords only when the applicant is +connected from a tty listed in /etc/securetty. Authors: Sam Hartman <hartmans@debian.org>, Steve Langasek <vorlon@debian.org> @@ -11,78 +13,31 @@ Authors: Sam Hartman <hartmans@debian.org>, Upstream-Status: Pending Signed-off-by: Ming Liu <ming.liu@windriver.com> - -v2: - - Forward ported from v1.1.6 to v1.2.1 - Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com> +Signed-off-by: Maxin B. John <maxin.john@intel.com> --- modules/pam_unix/Makefile.am | 3 ++- - modules/pam_unix/README | 11 ++++++++++- - modules/pam_unix/pam_unix.8 | 9 ++++++++- modules/pam_unix/pam_unix.8.xml | 19 ++++++++++++++++++- modules/pam_unix/support.c | 40 +++++++++++++++++++++++++++++++++++----- modules/pam_unix/support.h | 8 ++++++-- - 6 files changed, 79 insertions(+), 11 deletions(-) + 4 files changed, 61 insertions(+), 9 deletions(-) diff --git a/modules/pam_unix/Makefile.am b/modules/pam_unix/Makefile.am -index 56ed591..9a372ac 100644 +index 56df178..2bba460 100644 --- a/modules/pam_unix/Makefile.am +++ b/modules/pam_unix/Makefile.am @@ -30,7 +30,8 @@ if HAVE_VERSIONING pam_unix_la_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif pam_unix_la_LIBADD = $(top_builddir)/libpam/libpam.la \ -- @LIBCRYPT@ @LIBSELINUX@ $(NIS_LIBS) -+ @LIBCRYPT@ @LIBSELINUX@ $(NIS_LIBS) \ +- @LIBCRYPT@ @LIBSELINUX@ @TIRPC_LIBS@ @NSL_LIBS@ ++ @LIBCRYPT@ @LIBSELINUX@ @TIRPC_LIBS@ @NSL_LIBS@ \ + ../pam_securetty/tty_secure.lo securelib_LTLIBRARIES = pam_unix.la -diff --git a/modules/pam_unix/README b/modules/pam_unix/README -index 3935dba..7880d91 100644 ---- a/modules/pam_unix/README -+++ b/modules/pam_unix/README -@@ -67,7 +67,16 @@ nullok - - The default action of this module is to not permit the user access to a - service if their official password is blank. The nullok argument overrides -- this default. -+ this default and allows any user with a blank password to access the -+ service. -+ -+nullok_secure -+ -+ The default action of this module is to not permit the user access to a -+ service if their official password is blank. The nullok_secure argument -+ overrides this default and allows any user with a blank password to access -+ the service as long as the value of PAM_TTY is set to one of the values -+ found in /etc/securetty. - - try_first_pass - -diff --git a/modules/pam_unix/pam_unix.8 b/modules/pam_unix/pam_unix.8 -index 339178b..a4bd906 100644 ---- a/modules/pam_unix/pam_unix.8 -+++ b/modules/pam_unix/pam_unix.8 -@@ -92,7 +92,14 @@ Turns off informational messages namely messages about session open and close vi - .RS 4 - The default action of this module is to not permit the user access to a service if their official password is blank\&. The - \fBnullok\fR --argument overrides this default\&. -+argument overrides this default and allows any user with a blank password to access the service\&. -+.RE -+.PP -+\fBnullok_secure\fR -+.RS 4 -+The default action of this module is to not permit the user access to a service if their official password is blank\&. The -+\fBnullok_secure\fR -+argument overrides this default and allows any user with a blank password to access the service as long as the value of PAM_TTY is set to one of the values found in /etc/securetty\&. - .RE - .PP - \fBtry_first_pass\fR diff --git a/modules/pam_unix/pam_unix.8.xml b/modules/pam_unix/pam_unix.8.xml -index a8b64bb..1ced6f4 100644 +index 1b318f1..be0330e 100644 --- a/modules/pam_unix/pam_unix.8.xml +++ b/modules/pam_unix/pam_unix.8.xml @@ -159,7 +159,24 @@ @@ -112,10 +67,10 @@ index a8b64bb..1ced6f4 100644 </listitem> </varlistentry> diff --git a/modules/pam_unix/support.c b/modules/pam_unix/support.c -index abccd82..2361957 100644 +index fc8595e..29e3341 100644 --- a/modules/pam_unix/support.c +++ b/modules/pam_unix/support.c -@@ -189,13 +189,22 @@ int _set_ctrl(pam_handle_t *pamh, int flags, int *remember, int *rounds, +@@ -183,13 +183,22 @@ int _set_ctrl(pam_handle_t *pamh, int flags, int *remember, int *rounds, /* now parse the arguments to this module */ for (; argc-- > 0; ++argv) { @@ -141,7 +96,7 @@ index abccd82..2361957 100644 } } -@@ -566,6 +575,7 @@ static int _unix_run_helper_binary(pam_handle_t *pamh, const char *passwd, +@@ -560,6 +569,7 @@ static int _unix_run_helper_binary(pam_handle_t *pamh, const char *passwd, if (child == 0) { static char *envp[] = { NULL }; const char *args[] = { NULL, NULL, NULL, NULL }; @@ -149,7 +104,7 @@ index abccd82..2361957 100644 /* XXX - should really tidy up PAM here too */ -@@ -593,7 +603,16 @@ static int _unix_run_helper_binary(pam_handle_t *pamh, const char *passwd, +@@ -587,7 +597,16 @@ static int _unix_run_helper_binary(pam_handle_t *pamh, const char *passwd, /* exec binary helper */ args[0] = CHKPWD_HELPER; args[1] = user; @@ -167,7 +122,7 @@ index abccd82..2361957 100644 args[2]="nullok"; } else { args[2]="nonull"; -@@ -678,6 +697,17 @@ _unix_blankpasswd (pam_handle_t *pamh, unsigned int ctrl, const char *name) +@@ -672,6 +691,17 @@ _unix_blankpasswd (pam_handle_t *pamh, unsigned int ctrl, const char *name) if (on(UNIX__NONULL, ctrl)) return 0; /* will fail but don't let on yet */ @@ -185,7 +140,7 @@ index abccd82..2361957 100644 /* UNIX passwords area */ retval = get_pwd_hash(pamh, name, &pwd, &salt); -@@ -764,7 +794,7 @@ int _unix_verify_password(pam_handle_t * pamh, const char *name +@@ -758,7 +788,7 @@ int _unix_verify_password(pam_handle_t * pamh, const char *name } } } else { @@ -195,46 +150,46 @@ index abccd82..2361957 100644 if (retval == PAM_SUCCESS) { diff --git a/modules/pam_unix/support.h b/modules/pam_unix/support.h -index 3729ce0..43cdbea 100644 +index b4c279c..8da4a8e 100644 --- a/modules/pam_unix/support.h +++ b/modules/pam_unix/support.h -@@ -99,8 +99,9 @@ typedef struct { - #define UNIX_MIN_PASS_LEN 27 /* min length for password */ +@@ -98,8 +98,9 @@ typedef struct { #define UNIX_QUIET 28 /* Don't print informational messages */ - #define UNIX_DES 29 /* DES, default */ -+#define UNIX_NULLOK_SECURE 30 /* NULL passwords allowed only on secure ttys */ + #define UNIX_NO_PASS_EXPIRY 29 /* Don't check for password expiration if not used for authentication */ + #define UNIX_DES 30 /* DES, default */ ++#define UNIX_NULLOK_SECURE 31 /* NULL passwords allowed only on secure ttys */ /* -------------- */ --#define UNIX_CTRLS_ 30 /* number of ctrl arguments defined */ -+#define UNIX_CTRLS_ 31 /* number of ctrl arguments defined */ +-#define UNIX_CTRLS_ 31 /* number of ctrl arguments defined */ ++#define UNIX_CTRLS_ 32 /* number of ctrl arguments defined */ #define UNIX_DES_CRYPT(ctrl) (off(UNIX_MD5_PASS,ctrl)&&off(UNIX_BIGCRYPT,ctrl)&&off(UNIX_SHA256_PASS,ctrl)&&off(UNIX_SHA512_PASS,ctrl)&&off(UNIX_BLOWFISH_PASS,ctrl)) -@@ -118,7 +119,7 @@ static const UNIX_Ctrls unix_args[UNIX_CTRLS_] = - /* UNIX_NOT_SET_PASS */ {"not_set_pass", _ALL_ON_, 0100, 0}, +@@ -117,7 +118,7 @@ static const UNIX_Ctrls unix_args[UNIX_CTRLS_] = + /* UNIX_AUTHTOK_TYPE */ {"authtok_type=", _ALL_ON_, 0100, 0}, /* UNIX__PRELIM */ {NULL, _ALL_ON_^(0600), 0200, 0}, /* UNIX__UPDATE */ {NULL, _ALL_ON_^(0600), 0400, 0}, -/* UNIX__NONULL */ {NULL, _ALL_ON_, 01000, 0}, -+/* UNIX__NONULL */ {NULL, _ALL_ON_^(02000000000), 01000, 0}, ++/* UNIX__NONULL */ {NULL, _ALL_ON_^(02000000000), 01000, 0}, /* UNIX__QUIET */ {NULL, _ALL_ON_, 02000, 0}, /* UNIX_USE_AUTHTOK */ {"use_authtok", _ALL_ON_, 04000, 0}, /* UNIX_SHADOW */ {"shadow", _ALL_ON_, 010000, 0}, @@ -139,6 +140,7 @@ static const UNIX_Ctrls unix_args[UNIX_CTRLS_] = - /* UNIX_MIN_PASS_LEN */ {"minlen=", _ALL_ON_, 0400000000, 0}, /* UNIX_QUIET */ {"quiet", _ALL_ON_, 01000000000, 0}, + /* UNIX_NO_PASS_EXPIRY */ {"no_pass_expiry", _ALL_ON_, 02000000000, 0}, /* UNIX_DES */ {"des", _ALL_ON_^(0260420000), 0, 1}, -+/* UNIX_NULLOK_SECURE */ {"nullok_secure", _ALL_ON_^(01000), 02000000000, 0}, ++/* UNIX_NULLOK_SECURE */ {"nullok_secure", _ALL_ON_^(01000), 02000000000, 0}, }; #define UNIX_DEFAULTS (unix_args[UNIX__NONULL].flag) -@@ -171,6 +173,8 @@ extern int _unix_read_password(pam_handle_t * pamh - ,const char *prompt2 +@@ -172,6 +174,8 @@ extern int _unix_read_password(pam_handle_t * pamh ,const char *data_name ,const void **pass); -+extern int _pammodutil_tty_secure(const pam_handle_t *pamh, -+ const char *uttyname); ++extern int _pammodutil_tty_secure(const pam_handle_t *pamh, const char *uttyname); ++ extern int _unix_run_verify_binary(pam_handle_t *pamh, unsigned int ctrl, const char *user, int *daysleft); + #endif /* _PAM_UNIX_SUPPORT_H */ -- -2.1.4 +2.4.0 diff --git a/meta/recipes-extended/pam/libpam/pam.d/common-password b/meta/recipes-extended/pam/libpam/pam.d/common-password index 3896057328..52478dae77 100644 --- a/meta/recipes-extended/pam/libpam/pam.d/common-password +++ b/meta/recipes-extended/pam/libpam/pam.d/common-password @@ -10,13 +10,10 @@ # The "sha512" option enables salted SHA512 passwords. Without this option, # the default is Unix crypt. Prior releases used the option "md5". # -# The "obscure" option replaces the old `OBSCURE_CHECKS_ENAB' option in -# login.defs. -# # See the pam_unix manpage for other options. # here are the per-package modules (the "Primary" block) -password [success=1 default=ignore] pam_unix.so obscure sha512 +password [success=1 default=ignore] pam_unix.so sha512 # here's the fallback if no module succeeds password requisite pam_deny.so # prime the stack with a positive return value if there isn't one already; diff --git a/meta/recipes-extended/pam/libpam_1.2.1.bb b/meta/recipes-extended/pam/libpam_1.3.1.bb index ac3097ef7c..bc72afe6ad 100644 --- a/meta/recipes-extended/pam/libpam_1.2.1.bb +++ b/meta/recipes-extended/pam/libpam_1.3.1.bb @@ -1,3 +1,4 @@ +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/" @@ -7,9 +8,11 @@ SECTION = "base" # /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" -LIC_FILES_CHKSUM = "file://COPYING;md5=7eb5c1bf854e8881005d673599ee74d3" +LIC_FILES_CHKSUM = "file://COPYING;md5=7eb5c1bf854e8881005d673599ee74d3 \ + file://libpamc/License;md5=a4da476a14c093fdc73be3c3c9ba8fb3 \ + " -SRC_URI = "http://linux-pam.org/library/Linux-PAM-${PV}.tar.bz2 \ +SRC_URI = "https://github.com/linux-pam/linux-pam/releases/download/v${PV}/Linux-PAM-${PV}.tar.xz \ file://99_pam \ file://pam.d/common-account \ file://pam.d/common-auth \ @@ -18,23 +21,21 @@ SRC_URI = "http://linux-pam.org/library/Linux-PAM-${PV}.tar.bz2 \ file://pam.d/common-session-noninteractive \ file://pam.d/other \ file://libpam-xtests.patch \ - file://fixsepbuild.patch \ file://pam-security-abstract-securetty-handling.patch \ file://pam-unix-nullok-secure.patch \ - file://libpam-xtests-remove-bash-dependency.patch \ file://crypt_configure.patch \ " -SRC_URI[md5sum] = "9dc53067556d2dd567808fd509519dd6" -SRC_URI[sha256sum] = "342b1211c0d3b203a7df2540a5b03a428a087bd8a48c17e49ae268f992b334d9" +SRC_URI[md5sum] = "558ff53b0fc0563ca97f79e911822165" +SRC_URI[sha256sum] = "eff47a4ecd833fbf18de9686632a70ee8d0794b79aecb217ebd0ce11db4cd0db" -SRC_URI_append_libc-uclibc = " file://pam-no-innetgr.patch" -SRC_URI_append_libc-musl = " file://pam-no-innetgr.patch" +SRC_URI_append_libc-musl = " file://0001-Add-support-for-defining-missing-funcitonality.patch \ + file://include_paths_header.patch \ + " -DEPENDS = "bison flex flex-native cracklib" +DEPENDS = "bison-native flex flex-native cracklib libxml2-native virtual/crypt" -EXTRA_OECONF = "--with-db-uniquename=_pam \ - --includedir=${includedir}/security \ +EXTRA_OECONF = "--includedir=${includedir}/security \ --libdir=${base_libdir} \ --disable-nis \ --disable-regenerate-docu \ @@ -42,20 +43,16 @@ EXTRA_OECONF = "--with-db-uniquename=_pam \ CFLAGS_append = " -fPIC " -PR = "r5" - S = "${WORKDIR}/Linux-PAM-${PV}" inherit autotools gettext pkgconfig +PACKAGECONFIG ??= "" PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit," +PACKAGECONFIG[userdb] = "--enable-db=db,--enable-db=no,db," PACKAGES += "${PN}-runtime ${PN}-xtests" FILES_${PN} = "${base_libdir}/lib*${SOLIBS}" -FILES_${PN}-dbg += "${base_libdir}/security/.debug \ - ${base_libdir}/security/pam_filter/.debug \ - ${datadir}/Linux-PAM/xtests/.debug" - FILES_${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libdir}/lib*${SOLIBSDEV}" FILES_${PN}-runtime = "${sysconfdir}" FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests" @@ -63,7 +60,7 @@ FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests" PACKAGES_DYNAMIC += "^${MLPREFIX}pam-plugin-.*" def get_multilib_bit(d): - baselib = d.getVar('baselib', True) or '' + baselib = d.getVar('baselib') or '' return baselib.replace('lib', '') libpam_suffix = "suffix${@get_multilib_bit(d)}" @@ -93,37 +90,37 @@ RRECOMMENDS_${PN}_class-native = "" python populate_packages_prepend () { def pam_plugin_append_file(pn, dir, file): nf = os.path.join(dir, file) - of = d.getVar('FILES_' + pn, True) + of = d.getVar('FILES_' + pn) if of: nf = of + " " + nf d.setVar('FILES_' + pn, nf) def pam_plugin_hook(file, pkg, pattern, format, basename): - pn = d.getVar('PN', True) - libpam_suffix = d.getVar('libpam_suffix', True) + pn = d.getVar('PN') + libpam_suffix = d.getVar('libpam_suffix') - rdeps = d.getVar('RDEPENDS_' + pkg, True) + 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, True) + 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', True) or '' - dvar = bb.data.expand('${WORKDIR}/package', d, True) + 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, '^pam(.*)\.so$', pam_pkgname, + do_split_packages(d, pam_libdir, r'^pam(.*)\.so$', pam_pkgname, 'PAM plugin for %s', hook=pam_plugin_hook, extra_depends='') pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_chkpwd') pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_update') @@ -132,7 +129,7 @@ python populate_packages_prepend () { pam_plugin_append_file('%spam-plugin-timestamp' % mlprefix, pam_sbindir, 'pam_timestamp_check') pam_plugin_append_file('%spam-plugin-mkhomedir' % mlprefix, pam_sbindir, 'mkhomedir_helper') pam_plugin_append_file('%spam-plugin-console' % mlprefix, pam_sbindir, 'pam_console_apply') - do_split_packages(d, pam_filterdir, '^(.*)$', 'pam-filter-%s', 'PAM filter for %s', extra_depends='') + do_split_packages(d, pam_filterdir, r'^(.*)$', 'pam-filter-%s', 'PAM filter for %s', extra_depends='') } do_install() { @@ -154,11 +151,8 @@ do_install() { fi } -python do_pam_sanity () { - if not bb.utils.contains('DISTRO_FEATURES', 'pam', True, False, d): - bb.warn("Building libpam but 'pam' isn't in DISTRO_FEATURES, PAM won't work correctly") -} -addtask pam_sanity before do_configure +inherit features_check +REQUIRED_DISTRO_FEATURES = "pam" BBCLASSEXTEND = "nativesdk native" @@ -167,3 +161,8 @@ 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/recipes-extended/parted/files/0001-Include-fcntl.h-in-platform_defs.h.patch b/meta/recipes-extended/parted/files/0001-Include-fcntl.h-in-platform_defs.h.patch deleted file mode 100644 index b0376cefcf..0000000000 --- a/meta/recipes-extended/parted/files/0001-Include-fcntl.h-in-platform_defs.h.patch +++ /dev/null @@ -1,29 +0,0 @@ -From d78dd087c4ec4715aab5fe115668e726046ecd76 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 13 Apr 2015 18:16:05 -0700 -Subject: [PATCH] Include fcntl.h in /platform_defs.h - -exposed when compiling using musl - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - libparted/fs/xfs/platform_defs.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/libparted/fs/xfs/platform_defs.h b/libparted/fs/xfs/platform_defs.h -index 2b55752..32bd3d3 100644 ---- a/libparted/fs/xfs/platform_defs.h -+++ b/libparted/fs/xfs/platform_defs.h -@@ -42,6 +42,7 @@ - #include <stdlib.h> - #include <string.h> - #include <unistd.h> -+#include <fcntl.h> - #include <sys/param.h> - #include <sys/types.h> - --- -2.1.4 - diff --git a/meta/recipes-extended/parted/files/0001-Move-python-helper-scripts-used-only-in-tests-to-Pyt.patch b/meta/recipes-extended/parted/files/0001-Move-python-helper-scripts-used-only-in-tests-to-Pyt.patch new file mode 100644 index 0000000000..829c0c8b78 --- /dev/null +++ b/meta/recipes-extended/parted/files/0001-Move-python-helper-scripts-used-only-in-tests-to-Pyt.patch @@ -0,0 +1,33 @@ +From ddbefd80d74c3baaae328332458db447e1666240 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Thu, 27 Apr 2017 16:37:24 +0300 +Subject: [PATCH] Move python helper scripts (used only in tests) to Python 3 + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> + +--- + tests/gpt-header-move | 2 +- + tests/msdos-overlap | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/gpt-header-move b/tests/gpt-header-move +index 3dda5cb..a2b9508 100755 +--- a/tests/gpt-header-move ++++ b/tests/gpt-header-move +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/env python3 + + # open img file, subtract 33 from altlba address, and move the last 33 sectors + # back by 33 sectors +diff --git a/tests/msdos-overlap b/tests/msdos-overlap +index d6ae8d6..2c6747b 100755 +--- a/tests/msdos-overlap ++++ b/tests/msdos-overlap +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/env python3 + """ + Write an overlapping partition to a msdos disk + diff --git a/meta/recipes-extended/parted/files/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/parted/files/0001-Unset-need_charset_alias-when-building-for-musl.patch deleted file mode 100644 index abdfa2a50b..0000000000 --- a/meta/recipes-extended/parted/files/0001-Unset-need_charset_alias-when-building-for-musl.patch +++ /dev/null @@ -1,33 +0,0 @@ -From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 13 Apr 2015 17:02:13 -0700 -Subject: [PATCH] Unset need_charset_alias when building for musl - -localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 -which actually shoudl be fixed in gnulib and then all downstream -projects will get it eventually. For now we apply the fix to -coreutils - -Upstream-Status: Not Required - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - lib/gnulib.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/gnulib.mk b/lib/gnulib.mk -index e1d74db..c0e92dd 100644 ---- a/lib/gnulib.mk -+++ b/lib/gnulib.mk -@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local - case '$(host_os)' in \ - darwin[56]*) \ - need_charset_alias=true ;; \ -- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ -+ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ - need_charset_alias=false ;; \ - *) \ - need_charset_alias=true ;; \ --- -2.1.4 - diff --git a/meta/recipes-extended/parted/files/0001-libparted-fs-add-sourcedir-lib-to-include-paths.patch b/meta/recipes-extended/parted/files/0001-libparted-fs-add-sourcedir-lib-to-include-paths.patch new file mode 100644 index 0000000000..4dc2ab259d --- /dev/null +++ b/meta/recipes-extended/parted/files/0001-libparted-fs-add-sourcedir-lib-to-include-paths.patch @@ -0,0 +1,26 @@ +From d60a8a86f6593738b5324ccd8fe3e6d84a1fe7bc Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Wed, 11 Dec 2019 14:18:36 +0100 +Subject: [PATCH] libparted/fs: add $sourcedir/lib to include paths + +Otherwise, getopt-pfx-core.h won't be found. + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + libparted/fs/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libparted/fs/Makefile.am b/libparted/fs/Makefile.am +index 286bff6..65f45d3 100644 +--- a/libparted/fs/Makefile.am ++++ b/libparted/fs/Makefile.am +@@ -3,7 +3,7 @@ + # + # This file may be modified and/or distributed without restriction. + +-partedincludedir = -I$(top_builddir)/include -I$(top_srcdir)/include ++partedincludedir = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/lib + + AM_CFLAGS = $(WARN_CFLAGS) + diff --git a/meta/recipes-extended/parted/files/0002-libparted_fs_resize-link-against-libuuid-explicitly-.patch b/meta/recipes-extended/parted/files/0002-libparted_fs_resize-link-against-libuuid-explicitly-.patch new file mode 100644 index 0000000000..bd2b5c55b1 --- /dev/null +++ b/meta/recipes-extended/parted/files/0002-libparted_fs_resize-link-against-libuuid-explicitly-.patch @@ -0,0 +1,34 @@ +From 5c99d7e4c2b5e7a957dc922aff03debfebbd6154 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> +Date: Fri, 3 Mar 2017 21:49:15 +0100 +Subject: [PATCH] libparted_fs_resize: link against libuuid explicitly to + unbreak gold linking on test +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +| ../libparted/fs/.libs/libparted-fs-resize.so: error: undefined reference to 'uuid_generate' + +Upstream-Status: Pending + +Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> +--- + libparted/fs/Makefile.am | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libparted/fs/Makefile.am b/libparted/fs/Makefile.am +index d3cc8bc..c301b0b 100644 +--- a/libparted/fs/Makefile.am ++++ b/libparted/fs/Makefile.am +@@ -113,6 +113,8 @@ libparted_fs_resize_la_SOURCES = \ + r/hfs/reloc_plus.c \ + r/hfs/reloc_plus.h + ++libparted_fs_resize_la_LIBADD = $(UUID_LIBS) ++ + AM_CPPFLAGS = \ + -I$(top_srcdir)/libparted/labels \ + $(partedincludedir) \ +-- +2.9.3 + diff --git a/meta/recipes-extended/parted/files/0002-tests-use-skip_-rather-than-skip_test_-which-is-unde.patch b/meta/recipes-extended/parted/files/0002-tests-use-skip_-rather-than-skip_test_-which-is-unde.patch new file mode 100644 index 0000000000..9524adf7b8 --- /dev/null +++ b/meta/recipes-extended/parted/files/0002-tests-use-skip_-rather-than-skip_test_-which-is-unde.patch @@ -0,0 +1,66 @@ +From 9f844484cedb39e301b016e9da7852c1a0fb6eea Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Wed, 11 Dec 2019 16:27:48 +0100 +Subject: [PATCH] tests: use skip_ rather than skip_test_ (which is undefined) + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + tests/t6001-psep.sh | 2 +- + tests/t6004-dm-many-partitions.sh | 2 +- + tests/t6005-dm-uuid.sh | 2 +- + tests/t6006-dm-512b-sectors.sh | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/tests/t6001-psep.sh b/tests/t6001-psep.sh +index e350bd2..67014a0 100644 +--- a/tests/t6001-psep.sh ++++ b/tests/t6001-psep.sh +@@ -21,7 +21,7 @@ + require_root_ + require_udevadm_settle_ + +-(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed" ++(dmsetup --help) > /dev/null 2>&1 || skip_ "No dmsetup installed" + + # Device maps names - should be random to not conflict with existing ones on + # the system +diff --git a/tests/t6004-dm-many-partitions.sh b/tests/t6004-dm-many-partitions.sh +index b4be975..7214f60 100755 +--- a/tests/t6004-dm-many-partitions.sh ++++ b/tests/t6004-dm-many-partitions.sh +@@ -21,7 +21,7 @@ + + require_root_ + require_udevadm_settle_ +-(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed" ++(dmsetup --help) > /dev/null 2>&1 || skip_ "No dmsetup installed" + + ss=$sector_size_ + ns=300 +diff --git a/tests/t6005-dm-uuid.sh b/tests/t6005-dm-uuid.sh +index 4266747..4790a8b 100755 +--- a/tests/t6005-dm-uuid.sh ++++ b/tests/t6005-dm-uuid.sh +@@ -21,7 +21,7 @@ + + require_root_ + require_udevadm_settle_ +-(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed" ++(dmsetup --help) > /dev/null 2>&1 || skip_ "No dmsetup installed" + + ss=$sector_size_ + ns=300 +diff --git a/tests/t6006-dm-512b-sectors.sh b/tests/t6006-dm-512b-sectors.sh +index bf32135..b679adb 100644 +--- a/tests/t6006-dm-512b-sectors.sh ++++ b/tests/t6006-dm-512b-sectors.sh +@@ -25,7 +25,7 @@ require_scsi_debug_module_ + grep '^#define USE_BLKID 1' "$CONFIG_HEADER" > /dev/null || + skip_ 'this system lacks a new-enough libblkid' + +-(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed" ++(dmsetup --help) > /dev/null 2>&1 || skip_ "No dmsetup installed" + + # Device maps names - should be random to not conflict with existing ones on + # the system diff --git a/meta/recipes-extended/parted/files/Makefile b/meta/recipes-extended/parted/files/Makefile deleted file mode 100644 index ee90be0814..0000000000 --- a/meta/recipes-extended/parted/files/Makefile +++ /dev/null @@ -1,285 +0,0 @@ -am__tty_colors_dummy = \ - mgn= red= grn= lgn= blu= brg= std=; \ - am__color_tests=no - -am__tty_colors = \ -$(am__tty_colors_dummy); \ -test "X$(AM_COLOR_TESTS)" != Xno \ -&& test "X$$TERM" != Xdumb \ -&& { test "X$(AM_COLOR_TESTS)" = Xalways || test -t 1 2>/dev/null; } \ -&& { \ - am__color_tests=yes; \ - red='[0;31m'; \ - grn='[0;32m'; \ - lgn='[1;32m'; \ - blu='[1;34m'; \ - mgn='[0;35m'; \ - brg='[1m'; \ - std='[m'; \ -} - -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__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } -am__rst_section = { sed 'p;s/./=/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; \ -am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`; \ -test "x$$am__odir" = x. || $(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_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) - -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 -am__test_logs1 = $(TESTS:=.log) -am__test_logs2 = $(am__test_logs1:.log=.log) -TEST_LOGS = $(am__test_logs2:.sh.log=.log) -SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver -SH_LOG_COMPILE = $(SH_LOG_COMPILER) - -am__set_b = \ - case '$@' in \ - */*) \ - case '$*' in \ - */*) b='$*';; \ - *) b=`echo '$@' | sed 's/\.log$$//'`; \ - esac;; \ - *) \ - b='$*';; \ - esac - -MKDIR_P = /bin/mkdir -p -SHELL = /bin/bash -VERSION = 3.1 -PACKAGE_STRING = GNU parted 3.1 -PACKAGE_BUGREPORT = bug-parted@gnu.org -abs_srcdir = $(PWD) -abs_top_builddir = $(PWD)/.. -abs_top_srcdir = $(PWD)/.. -srcdir = . -top_srcdir = .. -subdir = tests -SH_LOG_COMPILER = $(SHELL) - -TESTS = \ - help-version.sh \ - t0000-basic.sh \ - t0001-tiny.sh \ - t0010-script-no-ctrl-chars.sh \ - t0100-print.sh \ - t0101-print-empty.sh \ - t0200-gpt.sh \ - t0201-gpt.sh \ - t0202-gpt-pmbr.sh \ - t0203-gpt-tiny-device-abort.sh \ - t0203-gpt-shortened-device-primary-valid.sh \ - t0205-gpt-list-clobbers-pmbr.sh \ - t0206-gpt-print-with-corrupt-primary-clobbers-pmbr.sh \ - t0207-IEC-binary-notation.sh \ - t0208-mkpart-end-in-IEC.sh \ - t0209-gpt-pmbr_boot.sh \ - t0210-gpt-resized-partition-entry-array.sh \ - t0211-gpt-rewrite-header.sh \ - t0212-gpt-many-partitions.sh \ - t0220-gpt-msftres.sh \ - t0250-gpt.sh \ - t0280-gpt-corrupt.sh \ - t0300-dos-on-gpt.sh \ - t0400-loop-clobber-infloop.sh \ - t0500-dup-clobber.sh \ - t0501-duplicate.sh \ - t1100-busy-label.sh \ - t1101-busy-partition.sh \ - t1700-probe-fs.sh \ - t2200-dos-label-recog.sh \ - t2201-pc98-label-recog.sh \ - t2300-dos-label-extended-bootcode.sh \ - t2310-dos-extended-2-sector-min-offset.sh \ - t2400-dos-hfs-partition-type.sh \ - t2500-probe-corrupt-hfs.sh \ - t3000-resize-fs.sh \ - t3200-type-change.sh \ - t3300-palo-prep.sh \ - t3310-flags.sh \ - t3400-whole-disk-FAT-partition.sh \ - t4000-sun-raid-type.sh \ - t4001-sun-vtoc.sh \ - t4100-msdos-partition-limits.sh \ - t4100-dvh-partition-limits.sh \ - t4100-msdos-starting-sector.sh \ - t4200-partprobe.sh \ - t4300-nilfs2-tiny.sh \ - t5000-tags.sh \ - t6000-dm.sh \ - t6001-psep.sh \ - t6100-mdraid-partitions.sh \ - t7000-scripting.sh \ - t8000-loop.sh \ - t8001-loop-blkpg.sh \ - t9010-big-sector.sh \ - t9020-alignment.sh \ - t9021-maxima.sh \ - t9022-one-unit-snap.sh \ - t9023-value-lt-one.sh \ - t9030-align-check.sh \ - t9040-many-partitions.sh \ - t9041-undetected-in-use-16th-partition.sh \ - t9042-dos-partition-limit.sh \ - t9050-partition-table-types.sh - -TESTS_ENVIRONMENT = \ - export \ - abs_top_builddir='$(abs_top_builddir)' \ - abs_top_srcdir='$(abs_top_srcdir)' \ - abs_srcdir='$(abs_srcdir)' \ - built_programs=parted \ - srcdir='$(srcdir)' \ - top_srcdir='$(top_srcdir)' \ - VERSION=$(VERSION) \ - ; 9>&2 - -.SUFFIXES: .log - -$(TEST_SUITE_LOG): $(TEST_LOGS) - @$(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 i in $$bases; do \ - if grep "^$$ws*:copy-in-global-log:$$ws*no$$ws*$$" $$i.trs \ - >/dev/null; then continue; \ - fi; \ - glob_res=`sed -n -e "s/$$ws*$$//" \ - -e "s/^$$ws*:global-test-result:$$ws*//p" \ - $$i.trs`; \ - test -n "$$glob_res" || glob_res=RUN; \ - echo "$$glob_res: $$i" | $(am__rst_section); \ - if test ! -r $$i.log; then \ - echo "fatal: making $@: $$i.log is unreadable" >&2; \ - exit 1; \ - fi; \ - cat $$i.log; echo; \ - done; \ - } >$(TEST_SUITE_LOG).tmp; \ - 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}"; \ - if test -n "$(PACKAGE_BUGREPORT)"; then \ - echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ - fi; \ - echo "$$col$$br$$std"; \ - fi; \ - $$success || exit 1 - -check-TESTS: - @if test $@ != recheck; then \ - list='$(RECHECK_LOGS)'; \ - test -z "$$list" || rm -f $$list; \ - fi - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @ws='[ ]'; \ - log_list='' trs_list=''; $(am__set_TESTS_bases); \ - for i in $$bases; do \ - if test -z "$$log_list"; then \ - log_list="$$i.log"; \ - else \ - log_list="$$log_list $$i.log"; \ - fi; \ - if test -z "$$trs_list"; then \ - trs_list="$$i.trs"; \ - else \ - trs_list="$$trs_list $$i.trs"; \ - fi; \ - done; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list" - -.sh.log: - @p='$<'; \ - $(am__set_b); \ - $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) -- $(SH_LOG_COMPILE) "$$tst" diff --git a/meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch b/meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch deleted file mode 100644 index 68ab715f32..0000000000 --- a/meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 060e74354774d36d2c11ef08e3e7ea9b9b6e23fb Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Thu, 13 Nov 2014 11:29:33 +0800 -Subject: [PATCH] libparted/arch/linux.c: fix compile failure while - --disable-device-mapper - -While --disable-device-mapper, the MACRO ENABLE_DEVICE_MAPPER is -undef, but it missed to scope some device mapper functions. - -Upstream-Status: Pending - -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - libparted/arch/linux.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c -index 6fd73c5..2afa479 100644 ---- a/libparted/arch/linux.c -+++ b/libparted/arch/linux.c -@@ -2320,6 +2320,7 @@ zasprintf (const char *format, ...) - static char * - dm_canonical_path (PedDevice const *dev) - { -+#ifdef ENABLE_DEVICE_MAPPER - LinuxSpecific const *arch_specific = LINUX_SPECIFIC (dev); - - /* Get map name from devicemapper */ -@@ -2337,6 +2338,7 @@ dm_canonical_path (PedDevice const *dev) - dm_task_destroy (task); - return dev_name; - err: -+#endif - return NULL; - } - -@@ -2957,13 +2959,15 @@ _disk_sync_part_table (PedDisk* disk) - unsigned long long *start, - unsigned long long *length); - -- -+#ifdef ENABLE_DEVICE_MAPPER - if (disk->dev->type == PED_DEVICE_DM) { - add_partition = _dm_add_partition; - remove_partition = _dm_remove_partition; - resize_partition = _dm_resize_partition; - get_partition_start_and_length = _dm_get_partition_start_and_length; -- } else { -+ } else -+#endif -+ { - add_partition = _blkpg_add_partition; - remove_partition = _blkpg_remove_partition; - #ifdef BLKPG_RESIZE_PARTITION --- -1.9.1 - diff --git a/meta/recipes-extended/parted/files/no_check.patch b/meta/recipes-extended/parted/files/no_check.patch index 58d8db4426..e6a26d11a5 100644 --- a/meta/recipes-extended/parted/files/no_check.patch +++ b/meta/recipes-extended/parted/files/no_check.patch @@ -5,12 +5,12 @@ it to be disabled. RP - 4/11/08 -Index: parted-1.9.0/configure.ac +Index: parted-3.2/configure.ac =================================================================== ---- parted-1.9.0.orig/configure.ac 2009-07-23 18:52:08.000000000 +0100 -+++ parted-1.9.0/configure.ac 2010-02-02 14:13:56.013905093 +0000 -@@ -477,7 +477,7 @@ - AM_CONDITIONAL([BUILD_LINUX], [test "$OS" = linux]) +--- parted-3.2.orig/configure.ac ++++ parted-3.2/configure.ac +@@ -555,7 +555,7 @@ AC_CHECK_HEADER([execinfo.h], [ + AM_CONDITIONAL([COMPILE_FOR_S390], [test "$host_cpu" = s390 || test "$host_cpu" = s390x]) dnl check for "check", unit testing library/header -PKG_CHECK_MODULES([CHECK], [check >= 0.9.3], have_check=yes, have_check=no) diff --git a/meta/recipes-extended/parted/files/run-ptest b/meta/recipes-extended/parted/files/run-ptest index 695c5e8a7b..374f1bfbc9 100644 --- a/meta/recipes-extended/parted/files/run-ptest +++ b/meta/recipes-extended/parted/files/run-ptest @@ -1,3 +1,7 @@ #!/bin/sh -make -C tests check-TESTS +mkdir -p /etc/udev/mount.blacklist.d +echo /dev/sda1 >> /etc/udev/mount.blacklist.d/parted-tmp +rm -f *.log +make -C tests test-suite.log +rm /etc/udev/mount.blacklist.d/parted-tmp diff --git a/meta/recipes-extended/parted/files/syscalls.patch b/meta/recipes-extended/parted/files/syscalls.patch deleted file mode 100644 index e9bbe9a956..0000000000 --- a/meta/recipes-extended/parted/files/syscalls.patch +++ /dev/null @@ -1,55 +0,0 @@ -Upstream-Status: Pending - ---- - libparted/arch/linux.c | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -Index: parted-1.9.0/libparted/arch/linux.c -=================================================================== ---- parted-1.9.0.orig/libparted/arch/linux.c 2009-07-23 18:52:08.000000000 +0100 -+++ parted-1.9.0/libparted/arch/linux.c 2010-02-02 14:14:16.523904768 +0000 -@@ -17,6 +17,8 @@ - - #define PROC_DEVICES_BUFSIZ 16384 - -+#include <linux/version.h> -+ - #include <config.h> - #include <arch/linux.h> - -@@ -1477,12 +1479,14 @@ - - #if SIZEOF_OFF_T < 8 - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) - static _syscall5(int,_llseek, - unsigned int, fd, - unsigned long, offset_high, - unsigned long, offset_low, - loff_t*, result, - unsigned int, origin) -+#endif - - loff_t - llseek (unsigned int fd, loff_t offset, unsigned int whence) -@@ -1490,11 +1494,20 @@ - loff_t result; - int retval; - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) - retval = _llseek(fd, - ((unsigned long long)offset) >> 32, - ((unsigned long long)offset) & 0xffffffff, - &result, - whence); -+#else -+ retval = syscall(__NR__llseek, fd, -+ ((unsigned long long)offset) >> 32, -+ ((unsigned long long)offset) & 0xffffffff, -+ &result, -+ whence); -+#endif -+ - return (retval==-1 ? (loff_t) retval : result); - } - diff --git a/meta/recipes-extended/parted/parted_3.2.bb b/meta/recipes-extended/parted/parted_3.2.bb deleted file mode 100644 index 5d34749b01..0000000000 --- a/meta/recipes-extended/parted/parted_3.2.bb +++ /dev/null @@ -1,45 +0,0 @@ -SUMMARY = "Disk partition editing/resizing utility" -HOMEPAGE = "http://www.gnu.org/software/parted/parted.html" -LICENSE = "GPLv3+" -LIC_FILES_CHKSUM = "file://COPYING;md5=2f31b266d3440dd7ee50f92cf67d8e6c" -SECTION = "console/tools" -DEPENDS = "ncurses readline util-linux" -PR = "r1" - -SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \ - file://no_check.patch \ - file://syscalls.patch \ - file://fix-doc-mandir.patch \ - file://fix-compile-failure-while-dis.patch \ - file://0001-Include-fcntl.h-in-platform_defs.h.patch \ - file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ - file://run-ptest \ - file://Makefile \ -" - -SRC_URI[md5sum] = "0247b6a7b314f8edeb618159fa95f9cb" -SRC_URI[sha256sum] = "858b589c22297cacdf437f3baff6f04b333087521ab274f7ab677cb8c6bb78e4" - -EXTRA_OECONF = "--disable-device-mapper" - -inherit autotools pkgconfig gettext texinfo ptest - -BBCLASSEXTEND = "native" - -do_compile_ptest() { - oe_runmake -C tests print-align print-max dup-clobber duplicate fs-resize -} - -do_install_ptest() { - t=${D}${PTEST_PATH} - mkdir $t/build-aux - cp ${S}/build-aux/test-driver $t/build-aux/ - cp -r ${S}/tests $t - cp ${WORKDIR}/Makefile $t/tests/ - for i in print-align print-max dup-clobber duplicate fs-resize; \ - do cp ${B}/tests/.libs/$i $t/tests/; \ - done - sed -e 's| ../parted||' -i $t/tests/*.sh -} - -RDEPENDS_${PN}-ptest = "bash coreutils perl util-linux-losetup python" diff --git a/meta/recipes-extended/parted/parted_3.3.bb b/meta/recipes-extended/parted/parted_3.3.bb new file mode 100644 index 0000000000..a1fd3ef07b --- /dev/null +++ b/meta/recipes-extended/parted/parted_3.3.bb @@ -0,0 +1,59 @@ +SUMMARY = "Disk partition editing/resizing utility" +HOMEPAGE = "http://www.gnu.org/software/parted/parted.html" +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=2f31b266d3440dd7ee50f92cf67d8e6c" +SECTION = "console/tools" +DEPENDS = "ncurses readline util-linux virtual/libiconv" + +SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \ + file://no_check.patch \ + file://fix-doc-mandir.patch \ + file://0002-libparted_fs_resize-link-against-libuuid-explicitly-.patch \ + file://0001-Move-python-helper-scripts-used-only-in-tests-to-Pyt.patch \ + file://run-ptest \ + file://0001-libparted-fs-add-sourcedir-lib-to-include-paths.patch \ + file://0002-tests-use-skip_-rather-than-skip_test_-which-is-unde.patch \ + " + +SRC_URI[md5sum] = "090655d05f3c471aa8e15a27536889ec" +SRC_URI[sha256sum] = "57e2b4bd87018625c515421d4524f6e3b55175b472302056391c5f7eccb83d44" + +EXTRA_OECONF = "--disable-device-mapper" + +inherit autotools pkgconfig gettext texinfo ptest + +BBCLASSEXTEND = "native nativesdk" + +do_compile_ptest() { + oe_runmake -C tests print-align print-max dup-clobber duplicate fs-resize print-flags +} + +do_install_ptest() { + t=${D}${PTEST_PATH} + mkdir $t/build-aux + cp ${S}/build-aux/test-driver $t/build-aux/ + cp -r ${S}/tests $t + cp ${B}/tests/Makefile $t/tests/ + sed -i "s|^VERSION.*|VERSION = ${PV}|g" $t/tests/Makefile + sed -i "s|^srcdir =.*|srcdir = \.|g" $t/tests/Makefile + sed -i "s|^abs_srcdir =.*|abs_srcdir = \.|g" $t/tests/Makefile + sed -i "s|^abs_top_srcdir =.*|abs_top_srcdir = \.\.|g" $t/tests/Makefile + sed -i "s|^Makefile:.*|Makefile:|g" $t/tests/Makefile + for i in print-align print-max print-flags dup-clobber duplicate fs-resize; \ + do cp ${B}/tests/.libs/$i $t/tests/; \ + done + sed -e 's| ../parted||' -i $t/tests/*.sh +} + +RDEPENDS_${PN}-ptest = "bash coreutils perl util-linux-losetup python3 make gawk e2fsprogs-mke2fs" +RRECOMMENDS_${PN}-ptest = "kernel-module-scsi-debug" +RDEPENDS_${PN}-ptest_append_libc-glibc = "\ + glibc-utils \ + locale-base-en-us \ + " + +inherit update-alternatives + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN} = "partprobe" +ALTERNATIVE_LINK_NAME[partprobe] = "${sbindir}/partprobe" diff --git a/meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch b/meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch deleted file mode 100644 index 88779c3bbd..0000000000 --- a/meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch +++ /dev/null @@ -1,25 +0,0 @@ -Upstream-Status: Pending - -This patch fixes this compiler error with gcc 4.6.0 - -Nitin A Kamble <nitin.a.kamble@intel.com> 2011/05/08 - -| fts.c: In function 'pax_fts_set': -| fts.c:469:7: error: parameter 'sp' set but not used [-Werror=unused-but-set-parameter] -| cc1: all warnings being treated as errors -| -| make[2]: *** [fts.o] Error 1 - -Index: pax-3.4/lib/fts.c -=================================================================== ---- pax-3.4.orig/lib/fts.c -+++ pax-3.4/lib/fts.c -@@ -466,7 +466,7 @@ name: t = sp->fts_path + NAPPEND(p->fts - /* ARGSUSED */ - int - fts_set(sp, p, instr) -- FTS *sp; -+ FTS __attribute__((__unused__)) *sp; - FTSENT *p; - int instr; - { diff --git a/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch b/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch deleted file mode 100644 index 80878f38b2..0000000000 --- a/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch +++ /dev/null @@ -1,185 +0,0 @@ -Upstream-Status: Pending - -Author: H.J. Lu <hjl.tools@gmail.com> -Date: Tue Dec 6 10:34:53 2011 -0800 - - Fix pax-3.4 build for x32 - - off_t is 8byte for x32. We need to check both _FILE_OFFSET_BITS and - size of off_t to see if file offset is 64bit. This patch adds - AC_CHECK_SIZEOF(off_t) and checks SIZEOF_OFF_T == 8. - -Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/06 - -Index: pax-3.4/configure.in -=================================================================== ---- pax-3.4.orig/configure.in -+++ pax-3.4/configure.in -@@ -33,4 +33,7 @@ dnl Checks for header files. - dnl Checks for typedefs, structures, and compiler characteristics. - AC_C_CONST - -+AC_CHECK_SIZEOF(off_t) -+AC_CHECK_SIZEOF(long) -+ - AC_OUTPUT([Makefile lib/Makefile src/Makefile]) -Index: pax-3.4/src/ar_io.c -=================================================================== ---- pax-3.4.orig/src/ar_io.c -+++ pax-3.4/src/ar_io.c -@@ -378,7 +378,8 @@ ar_close(void) - * could have written anything yet. - */ - if (frmt == NULL) { --#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 -+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ -+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) - (void)fprintf(listf, "%s: unknown format, %qu bytes skipped.\n", - #else - (void)fprintf(listf, "%s: unknown format, %lu bytes skipped.\n", -@@ -391,7 +392,8 @@ ar_close(void) - - if (strcmp(NM_CPIO, argv0) == 0) - (void)fprintf(listf, --#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 -+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ -+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) - "%qu blocks\n", - #else - "%lu blocks\n", -@@ -399,7 +401,8 @@ ar_close(void) - (rdcnt ? rdcnt : wrcnt) / 5120); - else if (strcmp(NM_TAR, argv0) != 0) - (void)fprintf(listf, --#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 -+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ -+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) - "%s: %s vol %d, %lu files, %qu bytes read, %qu bytes written.\n", - #else - "%s: %s vol %d, %lu files, %lu bytes read, %lu bytes written.\n", -Index: pax-3.4/src/cpio.c -=================================================================== ---- pax-3.4.orig/src/cpio.c -+++ pax-3.4/src/cpio.c -@@ -218,7 +218,8 @@ rd_ln_nm (ARCHD *arcn) - */ - if ((arcn->sb.st_size == 0) || - (arcn->sb.st_size >= (off_t) sizeof(arcn->ln_name))) { --#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 -+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ -+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) - paxwarn (1, "Cpio link name length is invalid: %qu", - arcn->sb.st_size); - #else -Index: pax-3.4/src/gen_subs.c -=================================================================== ---- pax-3.4.orig/src/gen_subs.c -+++ pax-3.4/src/gen_subs.c -@@ -133,7 +133,8 @@ ls_list (ARCHD *arcn, time_t now, FILE * - * print device id's for devices, or sizes for other nodes - */ - if ((arcn->type == PAX_CHR) || (arcn->type == PAX_BLK)) --#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 -+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ -+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) - (void) fprintf (fp, "%4lu,%4lu ", (unsigned long) MAJOR (sbp->st_rdev), - (unsigned long) MINOR (sbp->st_rdev)); - #else -@@ -142,7 +143,8 @@ ls_list (ARCHD *arcn, time_t now, FILE * - #endif - else - { --#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 -+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ -+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) - (void) fprintf (fp, "%9qu ", sbp->st_size); - #else - (void) fprintf (fp, "%9lu ", sbp->st_size); -@@ -334,7 +336,8 @@ ul_asc (u_long val, char *str, int len, - return (0); - } - --#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 -+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ -+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) - /* - * asc_uqd() - * convert hex/octal character string into a u_quad_t. We do not have to -Index: pax-3.4/src/options.c -=================================================================== ---- pax-3.4.orig/src/options.c -+++ pax-3.4/src/options.c -@@ -1545,7 +1545,8 @@ str_offt (char *val) - char *expr; - off_t num, t; - --#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 -+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ -+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) - num = strtoq (val, &expr, 0); - if ((num == LONG_LONG_MAX) || (num <= 0) || (expr == val)) - #else -Index: pax-3.4/src/tar.c -=================================================================== ---- pax-3.4.orig/src/tar.c -+++ pax-3.4/src/tar.c -@@ -58,7 +58,8 @@ - static unsigned long tar_chksm (char *, int); - static char *name_split (char *, int); - static int ul_oct (u_long, char *, int, int); --#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 -+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ -+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) - static int uqd_oct (u_quad_t, char *, int, int); - #endif - -@@ -196,7 +197,8 @@ ul_oct (u_long val, register char *str, - return (0); - } - --#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 -+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ -+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) - /* - * uqd_oct() - * convert an u_quad_t to an octal string. one of many oddball field -@@ -427,7 +429,8 @@ tar_rd (ARCHD *arcn, char *buf) - 0xfff); - arcn->sb.st_uid = (uid_t) asc_ul (hd->uid, sizeof (hd->uid), OCT); - arcn->sb.st_gid = (gid_t) asc_ul (hd->gid, sizeof (hd->gid), OCT); --#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 -+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ -+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) - arcn->sb.st_size = (off_t) asc_uqd (hd->size, sizeof (hd->size), OCT); - #else - arcn->sb.st_size = (off_t) asc_ul (hd->size, sizeof (hd->size), OCT); -@@ -659,7 +662,8 @@ tar_wr (register ARCHD * arcn) - * data follows this file, so set the pad - */ - hd->linkflag = AREGTYPE; --#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 -+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ -+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) - if (uqd_oct ((u_quad_t) arcn->sb.st_size, hd->size, - sizeof (hd->size), 1)) - #else -@@ -834,7 +838,8 @@ ustar_rd (ARCHD *arcn, char *buf) - */ - arcn->sb.st_mode = (mode_t) (asc_ul (hd->mode, sizeof (hd->mode), OCT) & - 0xfff); --#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 -+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ -+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) - arcn->sb.st_size = (off_t) asc_uqd (hd->size, sizeof (hd->size), OCT); - #else - arcn->sb.st_size = (off_t) asc_ul (hd->size, sizeof (hd->size), OCT); -@@ -1081,7 +1086,8 @@ ustar_wr (register ARCHD * arcn) - else - hd->typeflag = REGTYPE; - arcn->pad = TAR_PAD (arcn->sb.st_size); --#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 -+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ -+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) - if (uqd_oct ((u_quad_t) arcn->sb.st_size, hd->size, - sizeof (hd->size), 3)) - { diff --git a/meta/recipes-extended/pax/pax_3.4.bb b/meta/recipes-extended/pax/pax_3.4.bb deleted file mode 100644 index ad04871a8e..0000000000 --- a/meta/recipes-extended/pax/pax_3.4.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "Portable Archive eXchange" -DESCRIPTION = "pax (Portable Archive eXchange) is the POSIX standard archive tool" -HOMEPAGE = "http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/bin/pax/" -BUGTRACKER = "http://www.openbsd.org/query-pr.html" - -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=4b0b674dfdc56daa3832d4069b820ea0 \ - file://src/pax.h;endline=40;md5=309d3e241c1d82069228e5a51e9b8d60 \ - file://src/cpio.h;endline=40;md5=c3b4bbff6133a83387968617bbae8ac4 \ - file://lib/vis.h;endline=40;md5=b283f759abd4a5ad7e014b80f51fc053" - -SECTION = "base" -PR = "r2" - -SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.tar.bz2/fbd9023b590b45ac3ade95870702a0d6/${BP}.tar.bz2 \ - file://fix_for_compile_with_gcc-4.6.0.patch \ - file://pax-3.4_fix_for_x32.patch" - -SRC_URI[md5sum] = "fbd9023b590b45ac3ade95870702a0d6" -SRC_URI[sha256sum] = "ac3c06048e02828077cf7757d3d142241429238893b91d529af29a2e8cc5623b" - -inherit autotools diff --git a/meta/recipes-extended/pbzip2/pbzip2/0001-pbzip2-Fix-invalid-suffix-on-literal-C-11-warning.patch b/meta/recipes-extended/pbzip2/pbzip2/0001-pbzip2-Fix-invalid-suffix-on-literal-C-11-warning.patch new file mode 100644 index 0000000000..8fc377c31b --- /dev/null +++ b/meta/recipes-extended/pbzip2/pbzip2/0001-pbzip2-Fix-invalid-suffix-on-literal-C-11-warning.patch @@ -0,0 +1,73 @@ +From de4a948d356c9befb88c796168e97eb05b9a3385 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 23 Apr 2018 22:54:42 -0700 +Subject: [PATCH] pbzip2: Fix invalid suffix on literal C++11 warning + +Fixes -Wreserved-user-defined-literal] errors. +Also reported in launchpad here https://bugs.launchpad.net/pbzip2/+bug/1746369 + +Upstream-Status: Submitted [https://launchpadlibrarian.net/355230152/pbzip2.patch] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + pbzip2.cpp | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/pbzip2.cpp b/pbzip2.cpp +index 66ca978..4287ea7 100644 +--- a/pbzip2.cpp ++++ b/pbzip2.cpp +@@ -1220,7 +1220,7 @@ int producer_decompress(int hInfile, OFF_T fileSize, queue *fifo) + // give warning to user if block is larger than 250 million bytes + if (fileData->bufSize > 250000000) + { +- fprintf(stderr, "pbzip2: *WARNING: Compressed block size is large [%"PRIuMAX" bytes].\n", ++ fprintf(stderr, "pbzip2: *WARNING: Compressed block size is large [%" PRIuMAX " bytes].\n", + (uintmax_t) fileData->bufSize); + fprintf(stderr, " If program aborts, use regular BZIP2 to decompress.\n"); + } +@@ -1829,7 +1829,7 @@ void *fileWriter(void *outname) + + if (QuietMode != 1) + { +- fprintf(stderr, " Output Size: %"PRIuMAX" bytes\n", (uintmax_t)CompressedSize); ++ fprintf(stderr, " Output Size: %" PRIuMAX " bytes\n", (uintmax_t)CompressedSize); + } + + #ifdef PBZIP_DEBUG +@@ -2072,7 +2072,7 @@ int directcompress(int hInfile, OFF_T fileSize, int blockSize, const char *OutFi + close(hOutfile); + if (QuietMode != 1) + { +- fprintf(stderr, " Output Size: %"PRIuMAX" bytes\n", (uintmax_t)CompressedSize); ++ fprintf(stderr, " Output Size: %" PRIuMAX " bytes\n", (uintmax_t)CompressedSize); + } + + syncSetProducerDone(1); // Not really needed for direct version +@@ -2794,7 +2794,7 @@ void outputBufferInit(size_t size) + // unlikely to get here since more likely exception will be thrown + if (OutputBuffer.size() != size) + { +- fprintf(stderr, "pbzip2: *ERROR: Could not initialize (OutputBuffer); size=%"PRIuMAX"! Aborting...\n", (uintmax_t)size); ++ fprintf(stderr, "pbzip2: *ERROR: Could not initialize (OutputBuffer); size=%" PRIuMAX "! Aborting...\n", (uintmax_t)size); + safe_mutex_unlock(OutMutex); + exit(1); + } +@@ -4102,7 +4102,7 @@ int main(int argc, char* argv[]) + if (decompress == 1) + fprintf(stderr, " BWT Block Size: %c00k\n", BWTblockSizeChar); + if (hasInFile) +- fprintf(stderr, " Input Size: %"PRIuMAX" bytes\n", (uintmax_t)InFileSize); ++ fprintf(stderr, " Input Size: %" PRIuMAX " bytes\n", (uintmax_t)InFileSize); + } + + if (decompress == 1) +@@ -4224,7 +4224,7 @@ int main(int argc, char* argv[]) + { + NumBufferedBlocksMax = numCPU; + if (QuietMode != 1) +- fprintf(stderr, "*Warning* Max memory limit increased to %"PRIuMAX" MB to support %d CPUs\n", (uintmax_t)((NumBufferedBlocksMax + (numCPU * 2)) * blockSize)/1000000, numCPU); ++ fprintf(stderr, "*Warning* Max memory limit increased to %" PRIuMAX " MB to support %d CPUs\n", (uintmax_t)((NumBufferedBlocksMax + (numCPU * 2)) * blockSize)/1000000, numCPU); + } + else + { diff --git a/meta/recipes-extended/pbzip2/pbzip2_1.1.12.bb b/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb index 0330981af3..d24035b677 100644 --- a/meta/recipes-extended/pbzip2/pbzip2_1.1.12.bb +++ b/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb @@ -5,18 +5,21 @@ machines. The output of this version is fully compatible with bzip2 v1.0.2 or \ newer (ie: anything compressed with pbzip2 can be decompressed with bzip2)." HOMEPAGE = "http://compression.ca/pbzip2/" SECTION = "console/utils" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=4c4f2edec9679d5abef3514a816b54a4" +LICENSE = "bzip2-1.0.6" +LIC_FILES_CHKSUM = "file://COPYING;md5=398b8832c6f840cfebd20ab2be6a3743" DEPENDS = "bzip2" DEPENDS_append_class-native = " bzip2-replacement-native" -SRC_URI = "https://launchpad.net/${BPN}/1.1/${PV}/+download/${BP}.tar.gz" +SRC_URI = "https://launchpad.net/${BPN}/1.1/${PV}/+download/${BP}.tar.gz \ + file://0001-pbzip2-Fix-invalid-suffix-on-literal-C-11-warning.patch \ + " -SRC_URI[md5sum] = "91a4911b13305850423840eb0fa6f4f9" -SRC_URI[sha256sum] = "573bb358a5a7d3bf5f42f881af324cedf960c786e8d66dd03d448ddd8a0166ee" +SRC_URI[md5sum] = "4cb87da2dba05540afce162f34b3a9a6" +SRC_URI[sha256sum] = "8fd13eaaa266f7ee91f85c1ea97c86d9c9cc985969db9059cdebcb1e1b7bdbe6" -do_configure[noexec] = "1" +UPSTREAM_CHECK_URI = "https://launchpad.net/pbzip2/+milestones" +UPSTREAM_CHECK_REGEX = "pbzip2 (?P<pver>\d+(\.\d+)+)" EXTRA_OEMAKE = "CXX='${CXX} ${CXXFLAGS}' LDFLAGS='${LDFLAGS}'" @@ -25,4 +28,4 @@ do_install() { install -m 0755 pbzip2 ${D}${bindir}/ } -BBCLASSEXTEND = "native" +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb b/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb index 170e7ecdea..9f992d3e83 100644 --- a/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb +++ b/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb @@ -10,8 +10,11 @@ SRC_URI[sha256sum] = "74a4a78ae0c5e973100ac0a8f203a110f76fb047b79dae4fc1fd7d6814 S = "${WORKDIR}/Convert-ASN1-${PV}" -inherit cpan +inherit cpan ptest-perl EXTRA_PERLFLAGS = "-I ${PERLHOSTLIB}" +RDEPENDS_${PN} += "perl-module-exporter perl-module-constant perl-module-encode perl-module-encode-encoding perl-module-utf8 perl-module-socket perl-module-time-local perl-module-posix" +RDEPENDS_${PN}-ptest += "perl-module-math-bigint perl-module-io-socket perl-module-data-dumper perl-module-math-bigint-calc" + BBCLASSEXTEND = "native" diff --git a/meta/recipes-extended/perl/libtimedate-perl_2.30.bb b/meta/recipes-extended/perl/libtimedate-perl_2.30.bb index c8fcde45f4..7219c7d11e 100644 --- a/meta/recipes-extended/perl/libtimedate-perl_2.30.bb +++ b/meta/recipes-extended/perl/libtimedate-perl_2.30.bb @@ -1,4 +1,5 @@ SUMMARY = "Perl modules useful for manipulating date and time information" +HOMEPAGE = "https://metacpan.org/release/TimeDate" SECTION = "libs" # You can redistribute it and/or modify it under the same terms as Perl itself. LICENSE = "Artistic-1.0 | GPL-1.0+" @@ -8,12 +9,13 @@ SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/TimeDate-${PV}.tar. S = "${WORKDIR}/TimeDate-${PV}" -inherit cpan +inherit cpan ptest-perl BBCLASSEXTEND = "native" RDEPENDS_${PN}_class-native = "" RDEPENDS_${PN} += "perl-module-carp perl-module-exporter perl-module-strict perl-module-time-local" +RDEPENDS_${PN}-ptest += "perl-module-test-more perl-module-utf8" SRC_URI[md5sum] = "b1d91153ac971347aee84292ed886c1c" SRC_URI[sha256sum] = "75bd254871cb5853a6aa0403ac0be270cdd75c9d1b6639f18ecba63c15298e86" diff --git a/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.11.bb b/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.11.bb deleted file mode 100644 index 9a9e71011e..0000000000 --- a/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.11.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "Perl module for supporting simple generic namespaces" -DESCRIPTION = "XML::NamespaceSupport offers a simple way to process namespace-based XML names. \ - It also helps maintain a prefix-to-namespace URI map, and provides a number of \ - basic checks. " - -SECTION = "libs" -LICENSE = "Artistic-1.0 | GPL-1.0+" -PR = "r3" - -LIC_FILES_CHKSUM = "file://META.yml;beginline=22;endline=22;md5=3b2b564dae8b9af9e8896e85c07dcbe5" - -SRC_URI = "http://search.cpan.org/CPAN/authors/id/P/PE/PERIGRIN/XML-NamespaceSupport-${PV}.tar.gz" -SRC_URI[md5sum] = "222cca76161cd956d724286d36b607da" -SRC_URI[sha256sum] = "6d8151f0a3f102313d76b64bfd1c2d9ed46bfe63a16f038e7d860fda287b74ea" - - -S = "${WORKDIR}/XML-NamespaceSupport-${PV}" - -inherit cpan - -BBCLASSEXTEND="native" - diff --git a/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.12.bb b/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.12.bb new file mode 100644 index 0000000000..57c407e0f8 --- /dev/null +++ b/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.12.bb @@ -0,0 +1,27 @@ +SUMMARY = "Perl module for supporting simple generic namespaces" +HOMEPAGE = "http://veillard.com/XML/" +DESCRIPTION = "XML::NamespaceSupport offers a simple way to process namespace-based XML names. \ + It also helps maintain a prefix-to-namespace URI map, and provides a number of \ + basic checks. " + +SECTION = "libs" +LICENSE = "Artistic-1.0 | GPL-1.0+" + +SRCNAME = "XML-NamespaceSupport" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=c9d8a117e7620b5adf8d69c29613ceab" + +SRC_URI = "${CPAN_MIRROR}/authors/id/P/PE/PERIGRIN/${SRCNAME}-${PV}.tar.gz" +SRC_URI[md5sum] = "a8916c6d095bcf073e1108af02e78c97" +SRC_URI[sha256sum] = "47e995859f8dd0413aa3f22d350c4a62da652e854267aa0586ae544ae2bae5ef" + +UPSTREAM_CHECK_REGEX = "XML\-NamespaceSupport\-(?P<pver>(\d+\.\d+))(?!_\d+).tar" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit cpan ptest-perl + +RDEPENDS_${PN}-ptest += "perl-module-test-more" + +BBCLASSEXTEND="native nativesdk" + diff --git a/meta/recipes-extended/perl/libxml-sax-base-perl_1.08.bb b/meta/recipes-extended/perl/libxml-sax-base-perl_1.09.bb index 14a337057e..2bff65a082 100644 --- a/meta/recipes-extended/perl/libxml-sax-base-perl_1.08.bb +++ b/meta/recipes-extended/perl/libxml-sax-base-perl_1.09.bb @@ -1,4 +1,5 @@ SUMMARY = "Base class SAX Drivers and Filters" +HOMEPAGE = "http://search.cpan.org/dist/XML-SAX-Base/" DESCRIPTION = "This module has a very simple task - to be a base class for \ PerlSAX drivers and filters. It's default behaviour is to pass \ the input directly to the output unchanged. It can be useful to \ @@ -13,11 +14,13 @@ LIC_FILES_CHKSUM = "file://dist.ini;endline=5;md5=8f9c9a55340aefaee6e9704c884664 SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GR/GRANTM/XML-SAX-Base-${PV}.tar.gz" -SRC_URI[md5sum] = "38c8c3247dfd080712596118d70dbe32" -SRC_URI[sha256sum] = "666270318b15f88b8427e585198abbc19bc2e6ccb36dc4c0a4f2d9807330219e" +SRC_URI[md5sum] = "ec347a14065dd7aec7d9fb181b2d7946" +SRC_URI[sha256sum] = "66cb355ba4ef47c10ca738bd35999723644386ac853abbeb5132841f5e8a2ad0" S = "${WORKDIR}/XML-SAX-Base-${PV}" -inherit cpan +inherit cpan ptest-perl -BBCLASSEXTEND = "native" +RDEPENDS_${PN}-ptest += "perl-module-test perl-module-test-more" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb b/meta/recipes-extended/perl/libxml-sax-perl_1.02.bb index 45d396639b..02ee34ee17 100644 --- a/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb +++ b/meta/recipes-extended/perl/libxml-sax-perl_1.02.bb @@ -1,4 +1,5 @@ SUMMARY = "Perl module for using and building Perl SAX2 XML processors" +HOMEPAGE = "http://search.cpan.org/dist/XML-SAX/" DESCRIPTION = "XML::SAX consists of several framework classes for using and \ building Perl SAX2 XML parsers, filters, and drivers. It is designed \ around the need to be able to "plug in" different SAX parsers to an \ @@ -11,17 +12,31 @@ SECTION = "libs" LICENSE = "Artistic-1.0 | GPL-1.0+" DEPENDS += "libxml-namespacesupport-perl-native" RDEPENDS_${PN} += "libxml-namespacesupport-perl libxml-sax-base-perl perl-module-file-temp" -PR = "r2" LIC_FILES_CHKSUM = "file://LICENSE;md5=65c4cd8f39c24c7135ed70dacbcb09e3" SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GR/GRANTM/XML-SAX-${PV}.tar.gz" -SRC_URI[md5sum] = "290f5375ae87fdebfdb5bc3854019f24" -SRC_URI[sha256sum] = "32b04b8e36b6cc4cfc486de2d859d87af5386dd930f2383c49347050d6f5ad84" +SRC_URI[md5sum] = "b62e3754523695c7f5bbcafa3676a38d" +SRC_URI[sha256sum] = "4506c387043aa6a77b455f00f57409f3720aa7e553495ab2535263b4ed1ea12a" S = "${WORKDIR}/XML-SAX-${PV}" -inherit cpan +inherit cpan ptest-perl -BBCLASSEXTEND = "native" +do_install_ptest() { + cp -r ${B}/testfiles ${D}${PTEST_PATH} + chown -R root:root ${D}${PTEST_PATH}/testfiles +} + +RDEPENDS_${PN} += "perl-module-encode perl-module-perlio" + +RDEPENDS_${PN}-ptest += " \ + perl-module-base \ + perl-module-encode-byte \ + perl-module-encode-unicode \ + perl-module-fatal \ + perl-module-test \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-extended/pigz/pigz/link-order.patch b/meta/recipes-extended/pigz/pigz/link-order.patch deleted file mode 100644 index 4becc0e3fe..0000000000 --- a/meta/recipes-extended/pigz/pigz/link-order.patch +++ /dev/null @@ -1,38 +0,0 @@ -This patch avoids underlinking issues since we pass -lz via LDFLAGS but it appears -before pigz.o which needs symbols from libz however due to order linker happily discards libz - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - -Index: pigz-2.3.3/Makefile -=================================================================== ---- pigz-2.3.3.orig/Makefile 2015-01-19 20:12:31.000000000 -0800 -+++ pigz-2.3.3/Makefile 2015-01-28 09:11:50.266669184 -0800 -@@ -5,7 +5,7 @@ - # use gcc and gmake on Solaris - - pigz: pigz.o yarn.o try.o ${ZOPFLI}deflate.o ${ZOPFLI}blocksplitter.o ${ZOPFLI}tree.o ${ZOPFLI}lz77.o ${ZOPFLI}cache.o ${ZOPFLI}hash.o ${ZOPFLI}util.o ${ZOPFLI}squeeze.o ${ZOPFLI}katajainen.o -- $(CC) $(LDFLAGS) -o pigz $^ -lpthread -lm -+ $(CC) -o pigz $^ $(LDFLAGS) -lz -lpthread -lm - ln -f pigz unpigz - - pigz.o: pigz.c yarn.h try.h ${ZOPFLI}deflate.h ${ZOPFLI}util.h -@@ -35,7 +35,7 @@ - dev: pigz pigzt pigzn - - pigzt: pigzt.o yarnt.o try.o ${ZOPFLI}deflate.o ${ZOPFLI}blocksplitter.o ${ZOPFLI}tree.o ${ZOPFLI}lz77.o ${ZOPFLI}cache.o ${ZOPFLI}hash.o ${ZOPFLI}util.o ${ZOPFLI}squeeze.o ${ZOPFLI}katajainen.o -- $(CC) $(LDFLAGS) -o pigzt $^ -lpthread -lm -+ $(CC) -o pigzt $^ $(LDFLAGS) -lz -lpthread -lm - - pigzt.o: pigz.c yarn.h try.h - $(CC) $(CFLAGS) -DDEBUG -g -c -o pigzt.o pigz.c -@@ -44,7 +44,7 @@ - $(CC) $(CFLAGS) -DDEBUG -g -c -o yarnt.o yarn.c - - pigzn: pigzn.o tryn.o ${ZOPFLI}deflate.o ${ZOPFLI}blocksplitter.o ${ZOPFLI}tree.o ${ZOPFLI}lz77.o ${ZOPFLI}cache.o ${ZOPFLI}hash.o ${ZOPFLI}util.o ${ZOPFLI}squeeze.o ${ZOPFLI}katajainen.o -- $(CC) $(LDFLAGS) -o pigzn $^ -lm -+ $(CC) -o pigzn $^ $(LDFLAGS) -lz -lm - - pigzn.o: pigz.c try.h - $(CC) $(CFLAGS) -DDEBUG -DNOTHREAD -g -c -o pigzn.o pigz.c diff --git a/meta/recipes-extended/pigz/pigz_2.3.3.bb b/meta/recipes-extended/pigz/pigz_2.3.3.bb deleted file mode 100644 index 080be2bbc9..0000000000 --- a/meta/recipes-extended/pigz/pigz_2.3.3.bb +++ /dev/null @@ -1,12 +0,0 @@ -require pigz.inc -LIC_FILES_CHKSUM = "file://pigz.c;beginline=7;endline=21;md5=a21d4075cb00ab4ca17fce5e7534ca95" - -SRC_URI += "file://link-order.patch" - -SRC_URI[md5sum] = "01d7a16cce77929cc1a78aa1bdfb68cb" -SRC_URI[sha256sum] = "4e8b67b432ce7907575a549f3e1cac4709781ba0f6b48afea9f59369846b509c" - -NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}" - -BBCLASSEXTEND = "native nativesdk" - diff --git a/meta/recipes-extended/pigz/pigz.inc b/meta/recipes-extended/pigz/pigz_2.4.bb index cb8991dcd2..8c65ec34f0 100644 --- a/meta/recipes-extended/pigz/pigz.inc +++ b/meta/recipes-extended/pigz/pigz_2.4.bb @@ -6,16 +6,24 @@ Adler, and uses the zlib and pthread libraries." HOMEPAGE = "http://zlib.net/pigz/" SECTION = "console/utils" LICENSE = "Zlib & Apache-2.0" +LIC_FILES_CHKSUM = "file://pigz.c;md5=9ae6dee8ceba9610596ed0ada493d142;beginline=7;endline=21" -SRC_URI = "http://zlib.net/${BPN}/${BP}.tar.gz" - +SRC_URI = "http://zlib.net/${BPN}/fossils/${BP}.tar.gz" +SRC_URI[md5sum] = "def2f6e19d9d8231445adc1349d346df" +SRC_URI[sha256sum] = "a4f816222a7b4269bd232680590b579ccc72591f1bb5adafcd7208ca77e14f73" PROVIDES_class-native += "gzip-native" +# Point this at the homepage in case /fossils/ isn't updated +UPSTREAM_CHECK_URI = "http://zlib.net/${BPN}/" +UPSTREAM_CHECK_REGEX = "pigz-(?P<pver>.*)\.tar" + DEPENDS = "zlib" +EXTRA_OEMAKE = "-e MAKEFLAGS=" + inherit update-alternatives -do_install_class-target() { +do_install() { # Install files into /bin (FHS), which is typical place for gzip install -d ${D}${base_bindir} install ${B}/pigz ${D}${base_bindir}/pigz @@ -23,17 +31,19 @@ do_install_class-target() { ln -nsf pigz ${D}${base_bindir}/pigzcat } -do_install() { +do_install_append_class-native() { install -d ${D}${bindir} install ${B}/pigz ${D}${bindir}/gzip ln -nsf gzip ${D}${bindir}/gunzip ln -nsf gzip ${D}${bindir}/zcat } -ALTERNATIVE_PRIORITY = "80" +ALTERNATIVE_PRIORITY = "110" ALTERNATIVE_${PN} = "gunzip gzip zcat" ALTERNATIVE_${PN}_class-nativesdk = "" ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip" ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip" ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat" ALTERNATIVE_TARGET = "${base_bindir}/pigz" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-extended/procps/procps/fix-configure.patch b/meta/recipes-extended/procps/procps/fix-configure.patch deleted file mode 100644 index 934ae80954..0000000000 --- a/meta/recipes-extended/procps/procps/fix-configure.patch +++ /dev/null @@ -1,19 +0,0 @@ - -exec_prefix is /usr default in OE-Core - -Upstream-Status: Inappropriate [embedded specific] - -Signed-off-by: Saul Wold <sgw@linux.intel.com> -Index: procps-ng-3.3.10/configure.ac -=================================================================== ---- procps-ng-3.3.10.orig/configure.ac -+++ procps-ng-3.3.10/configure.ac -@@ -70,7 +70,7 @@ AC_FUNC_MMAP - AC_FUNC_REALLOC - AC_FUNC_STRTOD - --usrbin_execdir='${exec_prefix}/usr/bin' -+usrbin_execdir='${exec_prefix}/bin' - AC_SUBST([usrbin_execdir]) - - AM_GNU_GETTEXT_VERSION([0.14.1]) diff --git a/meta/recipes-extended/procps/procps/sysctl.conf b/meta/recipes-extended/procps/procps/sysctl.conf index 34e7488bf7..253f3701bd 100644 --- a/meta/recipes-extended/procps/procps/sysctl.conf +++ b/meta/recipes-extended/procps/procps/sysctl.conf @@ -1,64 +1,67 @@ -# This configuration file is taken from Debian. +# 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. -# -#kernel.domainname = example.com +# 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 -# Uncomment the following to stop low-level messages on console -#kernel.printk = 4 4 1 7 +# protection from the SYN flood attack +net/ipv4/tcp_syncookies=1 -##############################################################3 -# Functions previously found in netbase -# +# see the evil packets in your log files +net/ipv4/conf/all/log_martians=1 -# Uncomment the next two lines to enable Spoof protection (reverse-path filter) -# Turn on Source Address Verification in all interfaces to -# prevent some spoofing attacks -net.ipv4.conf.default.rp_filter=1 -net.ipv4.conf.all.rp_filter=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 -# Uncomment the next line to enable TCP/IP SYN cookies -#net.ipv4.tcp_syncookies=1 +# needed for routing, including masquerading or NAT +#net/ipv4/ip_forward=1 -# Uncomment the next line to enable packet forwarding for IPv4 -#net.ipv4.ip_forward=1 +# sets the port range used for outgoing connections +#net.ipv4.ip_local_port_range = 32768 61000 -# Uncomment the next line to enable packet forwarding for IPv6 -#net.ipv6.conf.all.forwarding=1 +# 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 -################################################################### -# Additional settings - these settings can improve the network -# security of the host and prevent against some network attacks -# including spoofing attacks and man in the middle attacks through -# redirection. Some network environments, however, require that these -# settings are disabled so review and enable them as needed. -# -# Ignore ICMP broadcasts -#net.ipv4.icmp_echo_ignore_broadcasts = 1 -# -# Ignore bogus ICMP errors -#net.ipv4.icmp_ignore_bogus_error_responses = 1 -# -# Do not accept ICMP redirects (prevent MITM attacks) -#net.ipv4.conf.all.accept_redirects = 0 -#net.ipv6.conf.all.accept_redirects = 0 -# _or_ -# Accept ICMP redirects only for gateways listed in our default -# gateway list (enabled by default) -# net.ipv4.conf.all.secure_redirects = 1 -# -# Do not send ICMP redirects (we are not a router) -#net.ipv4.conf.all.send_redirects = 0 -# -# Do not accept IP source route packets (we are not a router) -#net.ipv4.conf.all.accept_source_route = 0 -#net.ipv6.conf.all.accept_source_route = 0 -# -# Log Martian Packets -#net.ipv4.conf.all.log_martians = 1 -# +#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 -#kernel.shmmax = 141762560 +# 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/recipes-extended/procps/procps_3.3.10.bb b/meta/recipes-extended/procps/procps_3.3.16.bb index 65d64ec478..2810ebd285 100644 --- a/meta/recipes-extended/procps/procps_3.3.10.bb +++ b/meta/recipes-extended/procps/procps_3.3.16.bb @@ -1,38 +1,44 @@ 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://gitorious.org/procps" +HOMEPAGE = "https://gitlab.com/procps-ng/procps" SECTION = "base" LICENSE = "GPLv2+ & LGPLv2+" -LIC_FILES_CHKSUM="file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://COPYING.LIB;md5=4cf66a4984120007c9881cc871cf49db \ - " +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.LIB;md5=4cf66a4984120007c9881cc871cf49db \ + " DEPENDS = "ncurses" inherit autotools gettext pkgconfig update-alternatives -SRC_URI = "http://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-${PV}.tar.xz \ - file://fix-configure.patch \ +SRC_URI = "git://gitlab.com/procps-ng/procps.git;protocol=https \ file://sysctl.conf \ - " + " +SRCREV = "59c88e18f29000ceaf7e5f98181b07be443cf12f" -SRC_URI[md5sum] = "1fb7f3f6bf92ce6c5c9ed9949ae858fe" -SRC_URI[sha256sum] = "a02e6f98974dfceab79884df902ca3df30b0e9bad6d76aee0fb5dce17f267f04" +S = "${WORKDIR}/git" -S = "${WORKDIR}/procps-ng-${PV}" +# Upstream has a custom autogen.sh which invokes po/update-potfiles as they +# don't ship a po/POTFILES.in (which is silly). Without that file gettext +# doesn't believe po/ is a gettext directory and won't generate po/Makefile. +do_configure_prepend() { + ( cd ${S} && po/update-potfiles ) +} EXTRA_OECONF = "--enable-skill --disable-modern-top" -CPPFLAGS += "-I${S}" +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 - # Remove now empty dir - rmdir ${D}/${sbindir} + if [ "${base_sbindir}" != "${sbindir}" ]; then + rmdir ${D}${sbindir} + fi install -d ${D}${sysconfdir} install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf @@ -44,11 +50,12 @@ do_install_append () { CONFFILES_${PN} = "${sysconfdir}/sysctl.conf" -bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime" +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 = "100" +ALTERNATIVE_PRIORITY = "200" +ALTERNATIVE_PRIORITY[pidof] = "150" ALTERNATIVE_${PN} = "${bindir_progs} ${base_bindir_progs} ${base_sbindir_progs}" @@ -57,10 +64,13 @@ 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', True).split(): - d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir', True), prog)) + 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', True).split(): - d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir', True), 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" diff --git a/meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch b/meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch deleted file mode 100644 index e57d60f6a3..0000000000 --- a/meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 3638cc55b4d08851faba46635d737b24d016665b Mon Sep 17 00:00:00 2001 -From: Brad Jorsch <anomie@users.sourceforge.net> -Date: Fri, 28 Feb 2014 21:55:02 +1100 -Subject: [PATCH] Typo in fuser makes -M on all the time - -Brad found that fuser had the -M option on all the time. -A simple but significant typo caused this, thanks the the patch. - -Bug-Debian: http://bugs.debian.org/740275 - -Upstream-Status: Backport - -Signed-off-by: Craig Small <csmall@enc.com.au> ---- - ChangeLog | 4 ++++ - src/fuser.c | 2 +- - 2 files changed, 5 insertions(+), 1 deletion(-) - -diff --git a/ChangeLog b/ChangeLog -index fd1cccf..e5f784c 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -1,3 +1,7 @@ -+Changes in 22.22 -+================ -+ * Fixed typo in fuser which has -M on Debian #740275 -+ - Changes in 22.21 - ================ - * Missing comma in fuser(1) added Debian #702391 -diff --git a/src/fuser.c b/src/fuser.c -index b485f65..389b302 100644 ---- a/src/fuser.c -+++ b/src/fuser.c -@@ -1174,7 +1174,7 @@ int main(int argc, char *argv[]) - usage(_("No process specification given")); - - /* Check if -M flag was used and if so check mounts */ -- if (opts * OPT_ISMOUNTPOINT) { -+ if (opts & OPT_ISMOUNTPOINT) { - check_mountpoints(&mounts, &names_head, &names_tail); - } - --- -1.8.4.2 - diff --git a/meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch b/meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch deleted file mode 100644 index c0835e041e..0000000000 --- a/meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch +++ /dev/null @@ -1,29 +0,0 @@ -From aa66afecd8ba9cc4139f25ab15ec315173413a7d Mon Sep 17 00:00:00 2001 -From: Paul Barker <paul@paulbarker.me.uk> -Date: Wed, 20 Aug 2014 10:31:37 +0000 -Subject: [PATCH] Include <limits.h> for PATH_MAX - -When building against musl libc, PATH_MAX is defined in <limits.h>. - -Signed-off-by: Paul Barker <paul@paulbarker.me.uk> - -Upstream-status: Accepted (Should be in next release after 22.21) ---- - src/pstree.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/pstree.c b/src/pstree.c -index 071e6c4..0d28260 100644 ---- a/src/pstree.c -+++ b/src/pstree.c -@@ -41,6 +41,7 @@ - #include <sys/types.h> - #include <sys/stat.h> - #include <sys/ioctl.h> -+#include <limits.h> - - #include "i18n.h" - #include "comm.h" --- -2.0.4 - diff --git a/meta/recipes-extended/psmisc/psmisc.inc b/meta/recipes-extended/psmisc/psmisc.inc index 68e06561f9..6ab1288152 100644 --- a/meta/recipes-extended/psmisc/psmisc.inc +++ b/meta/recipes-extended/psmisc/psmisc.inc @@ -1,4 +1,5 @@ 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 \ @@ -15,6 +16,17 @@ S = "${WORKDIR}/psmisc-${PV}" inherit autotools gettext +# Upstream has a custom autogen.sh which invokes po/update-potfiles as they +# don't ship a po/POTFILES.in (which is silly). Without that file gettext +# doesn't believe po/ is a gettext directory and won't generate po/Makefile. +do_configure_prepend() { + ( cd ${S} && po/update-potfiles ) +} + + +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" diff --git a/meta/recipes-extended/psmisc/psmisc/0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch b/meta/recipes-extended/psmisc/psmisc/0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch new file mode 100644 index 0000000000..ca13bdbd15 --- /dev/null +++ b/meta/recipes-extended/psmisc/psmisc/0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch @@ -0,0 +1,47 @@ +From 115fcf1daff18aa2f2e130d63704f04031878db0 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 24 Mar 2016 15:46:14 +0000 +Subject: [PATCH] Use UINTPTR_MAX instead of __WORDSIZE + +Do not include sys/user.h since it conflicts with +pt_regs struct from kernel APIs in asm/ptrace.h + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Pending +--- + src/peekfd.c | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +diff --git a/src/peekfd.c b/src/peekfd.c +index 5aa990a..7e8e3fc 100644 +--- a/src/peekfd.c ++++ b/src/peekfd.c +@@ -30,8 +30,11 @@ + #include <asm/ptrace.h> + #include <byteswap.h> + #include <endian.h> ++#ifdef __GLIBC__ + #include <sys/user.h> ++#endif + #include <stdlib.h> ++#include <stdint.h> + #include <getopt.h> + #include <ctype.h> + #include <dirent.h> +@@ -266,11 +269,11 @@ int main(int argc, char **argv) + if (WIFSTOPPED(status)) { + #ifdef PPC + struct pt_regs regs; +- regs.gpr[0] = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_R0, 0); +- regs.gpr[3] = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_R3, 0); +- regs.gpr[4] = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_R4, 0); +- regs.gpr[5] = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_R5, 0); +- regs.orig_gpr3 = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_ORIG_R3, 0); ++ regs.gpr[0] = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_R0, 0); ++ regs.gpr[3] = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_R3, 0); ++ regs.gpr[4] = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_R4, 0); ++ regs.gpr[5] = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_R5, 0); ++ regs.orig_gpr3 = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_ORIG_R3, 0); + #elif defined(ARM) + struct pt_regs regs; + ptrace(PTRACE_GETREGS, pid, 0, ®s); diff --git a/meta/recipes-extended/psmisc/psmisc_22.21.bb b/meta/recipes-extended/psmisc/psmisc_22.21.bb deleted file mode 100644 index 66aba9ec57..0000000000 --- a/meta/recipes-extended/psmisc/psmisc_22.21.bb +++ /dev/null @@ -1,10 +0,0 @@ -require psmisc.inc -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" - -SRC_URI[md5sum] = "935c0fd6eb208288262b385fa656f1bf" -SRC_URI[sha256sum] = "97323cad619210845b696d7d722c383852b2acb5c49b5b0852c4f29c77a8145a" - -SRC_URI += "file://0001-Typo-in-fuser-makes-M-on-all-the-time.patch \ - file://0002-Include-limits.h-for-PATH_MAX.patch \ - " diff --git a/meta/recipes-extended/psmisc/psmisc_23.3.bb b/meta/recipes-extended/psmisc/psmisc_23.3.bb new file mode 100644 index 0000000000..e569f1074b --- /dev/null +++ b/meta/recipes-extended/psmisc/psmisc_23.3.bb @@ -0,0 +1,9 @@ +require psmisc.inc +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" + +SRC_URI = "git://gitlab.com/psmisc/psmisc.git;protocol=https \ + file://0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch \ + " +SRCREV = "78bde849041e6c914a2a517ebe1255b86dc98772" +S = "${WORKDIR}/git" diff --git a/meta/recipes-extended/quota/quota/config-tcpwrappers.patch b/meta/recipes-extended/quota/quota/config-tcpwrappers.patch deleted file mode 100644 index 5f47fbd183..0000000000 --- a/meta/recipes-extended/quota/quota/config-tcpwrappers.patch +++ /dev/null @@ -1,75 +0,0 @@ -Upstream-Status: Pending - ---- quota-tools.orig/configure.in -+++ quota-tools/configure.in -@@ -151,33 +151,46 @@ AC_SUBST(QUOTA_NETLINK_PROG) - AC_SUBST(NETLINKLIBS) - - AC_SEARCH_LIBS(gethostbyname, nsl) --AC_MSG_CHECKING(for host_access in -lwrap) --AC_CACHE_VAL(ac_cv_lib_wrap_main, -- saved_LIBS="$LIBS" -- LIBS="$LIBS -lwrap" -- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ -- #include <stdio.h> -- #include <sys/types.h> -- #include <sys/socket.h> -- #include <netinet/in.h> -- #include <tcpd.h> -- struct request_info request; -- int deny_severity, allow_severity;]],[[hosts_access(&request);]])], -- dnl We always restore LIBS as we add -lwrap in the next check -- [ac_cv_lib_wrap_main=yes; LIBS="$saved_LIBS"; AC_MSG_RESULT(yes)], -- [ac_cv_lib_wrap_main=no; LIBS="$saved_LIBS"; AC_MSG_RESULT(no)]) -- ]) - --if test ${ac_cv_lib_wrap_main} = yes; then -- AC_CHECK_HEADER(tcpd.h,, [ -- echo 'ERROR: could not find tcpd.h - missing TCP wrappers package' -- exit 1 -- ]) -- LIBS="$LIBS -lwrap" -- AC_DEFINE([HOSTS_ACCESS], 1, [Use hosts.allow and hosts.deny for access checking of rpc.rquotad]) -- COMPILE_OPTS="$COMPILE_OPTS HOSTS_ACCESS" -+AC_ARG_WITH(tcpwrappers, -+ [ --with-tcpwrappers=[yes/no/try] Use hosts.allow and hosts.deny for access checking of rpc.rquota [default=yes, if available.]], -+ , -+ with_tcpwrappers="try") -+ -+if test "x$with_tcpwrappers" != xno; then -+ AC_MSG_CHECKING(for host_access in -lwrap) -+ AC_CACHE_VAL(ac_cv_lib_wrap_main, -+ saved_LIBS="$LIBS" -+ LIBS="$LIBS -lwrap" -+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ -+ #include <stdio.h> -+ #include <sys/types.h> -+ #include <sys/socket.h> -+ #include <netinet/in.h> -+ #include <tcpd.h> -+ struct request_info request; -+ int deny_severity, allow_severity;]],[[hosts_access(&request);]])], -+ dnl We always restore LIBS as we add -lwrap in the next try -+ [ac_cv_lib_wrap_main=yes; LIBS="$saved_LIBS"; AC_MSG_RESULT(yes)], -+ [ac_cv_lib_wrap_main=no; LIBS="$saved_LIBS"; AC_MSG_RESULT(no)]) -+ ]) -+ -+ if test "x$ac_cv_lib_wrap_main" = xyes; then -+ AC_CHECK_HEADER(tcpd.h,, [ -+ if test "x$with_tcpwrappers" != xtry; then -+ AC_MSG_ERROR([could not find tcpd.h - missing TCP wrappers package]) -+ fi -+ ]) -+ -+ LIBS="$LIBS -lwrap" -+ AC_DEFINE([HOSTS_ACCESS], 1, [Use hosts.allow and hosts.deny for access checking of rpc.rquotad]) -+ COMPILE_OPTS="$COMPILE_OPTS HOSTS_ACCESS" -+ elif test "x$with_tcpwrappers" != xtry; then -+ AC_MSG_ERROR([could not find libwrap - missing TCP wrappers package]) -+ fi - fi - -+ - dnl Checks for typedefs, structures, and compiler characteristics. - AC_C_CONST - AC_C_INLINE diff --git a/meta/recipes-extended/quota/quota/fcntl.patch b/meta/recipes-extended/quota/quota/fcntl.patch index 27e60fd07d..51a770ce6e 100644 --- a/meta/recipes-extended/quota/quota/fcntl.patch +++ b/meta/recipes-extended/quota/quota/fcntl.patch @@ -9,13 +9,11 @@ Upstream-Status: Pending Signed-off-by: Khem Raj <raj.khem@gmail.com> -ndex: quota-tools/quota.h -=================================================================== -Index: quota-tools/quota.h -=================================================================== ---- quota-tools.orig/quota.h -+++ quota-tools/quota.h -@@ -165,6 +165,6 @@ enum { +diff --git a/quota.h b/quota.h +index 4c21411..d20c217 100644 +--- a/quota.h ++++ b/quota.h +@@ -182,6 +182,6 @@ enum { #endif #endif @@ -23,10 +21,10 @@ Index: quota-tools/quota.h +long quotactl (int, const char *, qid_t, caddr_t); #endif /* _QUOTA_ */ -Index: quota-tools/quotacheck.c -=================================================================== ---- quota-tools.orig/quotacheck.c -+++ quota-tools/quotacheck.c +diff --git a/quotacheck.c b/quotacheck.c +index 2cdf475..07c18a7 100644 +--- a/quotacheck.c ++++ b/quotacheck.c @@ -19,6 +19,7 @@ #include <unistd.h> #include <stdlib.h> @@ -35,10 +33,10 @@ Index: quota-tools/quotacheck.c #include <sys/stat.h> #include <sys/types.h> -Index: quota-tools/quotaio.c -=================================================================== ---- quota-tools.orig/quotaio.c -+++ quota-tools/quotaio.c +diff --git a/quotaio.c b/quotaio.c +index 94ae458..d57fc1a 100644 +--- a/quotaio.c ++++ b/quotaio.c @@ -12,6 +12,7 @@ #include <string.h> #include <unistd.h> @@ -47,36 +45,10 @@ Index: quota-tools/quotaio.c #include <sys/types.h> #include <sys/stat.h> #include <sys/file.h> -Index: quota-tools/dqblk_v2.h -=================================================================== ---- quota-tools.orig/dqblk_v2.h -+++ quota-tools/dqblk_v2.h -@@ -7,6 +7,7 @@ - #ifndef GUARD_DQBLK_V2_H - #define GUARD_DQBLK_V2_H - -+#include <fcntl.h> - #include <sys/types.h> - #include "quota_tree.h" - -Index: quota-tools/quotaops.c -=================================================================== ---- quota-tools.orig/quotaops.c -+++ quota-tools/quotaops.c -@@ -34,7 +34,9 @@ - - #include "config.h" - -+#if defined(RPC) - #include <rpc/rpc.h> -+#endif - #include <sys/types.h> - #include <sys/stat.h> - #include <sys/file.h> -Index: quota-tools/rquota_client.c -=================================================================== ---- quota-tools.orig/rquota_client.c -+++ quota-tools/rquota_client.c +diff --git a/rquota_client.c b/rquota_client.c +index a3a4ae3..0ffe7a9 100644 +--- a/rquota_client.c ++++ b/rquota_client.c @@ -19,7 +19,9 @@ #include "config.h" @@ -97,17 +69,3 @@ Index: quota-tools/rquota_client.c #include "common.h" #include "quotaio.h" #include "quotasys.h" -Index: quota-tools/setquota.c -=================================================================== ---- quota-tools.orig/setquota.c -+++ quota-tools/setquota.c -@@ -7,7 +7,9 @@ - - #include "config.h" - -+#if defined(RPC) - #include <rpc/rpc.h> -+#endif - #include <sys/types.h> - #include <errno.h> - #include <stdio.h> diff --git a/meta/recipes-extended/quota/quota/remove_non_posix_types.patch b/meta/recipes-extended/quota/quota/remove_non_posix_types.patch deleted file mode 100644 index 5442d9854d..0000000000 --- a/meta/recipes-extended/quota/quota/remove_non_posix_types.patch +++ /dev/null @@ -1,185 +0,0 @@ -Use proper C99 integer types - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - -Index: quota-tools/bylabel.c -=================================================================== ---- quota-tools.orig/bylabel.c -+++ quota-tools/bylabel.c -@@ -20,6 +20,7 @@ - #include <ctype.h> - #include <fcntl.h> - #include <unistd.h> -+#include <stdint.h> - - #include "bylabel.h" - #include "common.h" -@@ -37,32 +38,32 @@ static struct uuidCache_s { - - #define EXT2_SUPER_MAGIC 0xEF53 - struct ext2_super_block { -- u_char s_dummy1[56]; -- u_char s_magic[2]; -- u_char s_dummy2[46]; -- u_char s_uuid[16]; -- u_char s_volume_name[16]; -+ uint8_t s_dummy1[56]; -+ uint8_t s_magic[2]; -+ uint8_t s_dummy2[46]; -+ uint8_t s_uuid[16]; -+ uint8_t s_volume_name[16]; - }; - --#define ext2magic(s) ((uint) s.s_magic[0] + (((uint) s.s_magic[1]) << 8)) -+#define ext2magic(s) ((uint32_t) s.s_magic[0] + (((uint32_t) s.s_magic[1]) << 8)) - - #define XFS_SUPER_MAGIC "XFSB" - #define XFS_SUPER_MAGIC2 "BSFX" - struct xfs_super_block { -- u_char s_magic[4]; -- u_char s_dummy[28]; -- u_char s_uuid[16]; -- u_char s_dummy2[60]; -- u_char s_fsname[12]; -+ uint8_t s_magic[4]; -+ uint8_t s_dummy[28]; -+ uint8_t s_uuid[16]; -+ uint8_t s_dummy2[60]; -+ uint8_t s_fsname[12]; - }; - - #define REISER_SUPER_MAGIC "ReIsEr2Fs" - struct reiserfs_super_block { -- u_char s_dummy1[52]; -- u_char s_magic[10]; -- u_char s_dummy2[22]; -- u_char s_uuid[16]; -- u_char s_volume_name[16]; -+ uint8_t s_dummy1[52]; -+ uint8_t s_magic[10]; -+ uint8_t s_dummy2[22]; -+ uint8_t s_uuid[16]; -+ uint8_t s_volume_name[16]; - }; - - static inline unsigned short swapped(unsigned short a) -@@ -222,7 +223,7 @@ static char *get_spec_by_x(int n, const - return NULL; - } - --static u_char fromhex(char c) -+static uint8_t fromhex(char c) - { - if (isdigit(c)) - return (c - '0'); -@@ -234,7 +235,7 @@ static u_char fromhex(char c) - - static char *get_spec_by_uuid(const char *s) - { -- u_char uuid[16]; -+ uint8_t uuid[16]; - int i; - - if (strlen(s) != 36 || s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-') -Index: quota-tools/quot.c -=================================================================== ---- quota-tools.orig/quot.c -+++ quota-tools/quot.c -@@ -47,6 +47,7 @@ - #include <utmp.h> - #include <pwd.h> - #include <grp.h> -+#include <stdint.h> - - #include "pot.h" - #include "quot.h" -@@ -56,8 +57,8 @@ - #include "quotasys.h" - - #define TSIZE 500 --static __uint64_t sizes[TSIZE]; --static __uint64_t overflow; -+static uint64_t sizes[TSIZE]; -+static uint64_t overflow; - - static int aflag; - static int cflag; -@@ -72,7 +73,7 @@ static time_t now; - char *progname; - - static void mounttable(void); --static char *idname(__uint32_t, int); -+static char *idname(uint32_t, int); - static void report(const char *, const char *, int); - static void creport(const char *, const char *); - -@@ -173,7 +174,7 @@ static int qcmp(du_t * p1, du_t * p2) - static void creport(const char *file, const char *fsdir) - { - int i; -- __uint64_t t = 0; -+ uint64_t t = 0; - - printf(_("%s (%s):\n"), file, fsdir); - for (i = 0; i < TSIZE - 1; i++) -@@ -219,7 +220,7 @@ static void report(const char *file, con - } - } - --static idcache_t *getnextent(int type, __uint32_t id, int byid) -+static idcache_t *getnextent(int type, uint32_t id, int byid) - { - struct passwd *pw; - struct group *gr; -@@ -240,7 +241,7 @@ static idcache_t *getnextent(int type, _ - return &idc; - } - --static char *idname(__uint32_t id, int type) -+static char *idname(uint32_t id, int type) - { - idcache_t *ncp, *idp; - static idcache_t nc[2][NID]; -@@ -286,8 +287,8 @@ static void acctXFS(xfs_bstat_t *p) - { - register du_t *dp; - du_t **hp; -- __uint64_t size; -- __uint32_t i, id; -+ uint64_t size; -+ uint32_t i, id; - - if ((p->bs_mode & S_IFMT) == 0) - return; -Index: quota-tools/quot.h -=================================================================== ---- quota-tools.orig/quot.h -+++ quota-tools/quot.h -@@ -35,18 +35,18 @@ - #define SEC24HR (60*60*24) /* seconds per day */ - - typedef struct { -- __uint32_t id; -+ uint32_t id; - char name[UT_NAMESIZE + 1]; - } idcache_t; - - typedef struct du { - struct du *next; -- __uint64_t blocks; -- __uint64_t blocks30; -- __uint64_t blocks60; -- __uint64_t blocks90; -- __uint64_t nfiles; -- __uint32_t id; -+ uint64_t blocks; -+ uint64_t blocks30; -+ uint64_t blocks60; -+ uint64_t blocks90; -+ uint64_t nfiles; -+ uint32_t id; - } du_t; - - #define NDU 60000 diff --git a/meta/recipes-extended/quota/quota/replace_getrpcbynumber_r.patch b/meta/recipes-extended/quota/quota/replace_getrpcbynumber_r.patch deleted file mode 100644 index 9ca2ffc0d4..0000000000 --- a/meta/recipes-extended/quota/quota/replace_getrpcbynumber_r.patch +++ /dev/null @@ -1,20 +0,0 @@ -Replace getrpcbynumber_r with getrpcbynumber -musl and uclibc dont implement it - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Index: quota-tools/svc_socket.c -=================================================================== ---- quota-tools.orig/svc_socket.c -+++ quota-tools/svc_socket.c -@@ -55,7 +55,8 @@ static int svc_socket (u_long number, in - addr.sin_family = AF_INET; - - if (!port) { -- ret = getrpcbynumber_r(number, &rpcbuf, rpcdata, sizeof(rpcdata), &rpcp); -+ rpcp = getrpcbynumber(number); -+ ret = 0; - if (ret == 0 && rpcp != NULL) { - /* First try name */ - ret = getservbyname_r(rpcp->r_name, proto, &servbuf, servdata, diff --git a/meta/recipes-extended/quota/quota_4.02.bb b/meta/recipes-extended/quota/quota_4.02.bb deleted file mode 100644 index 124b0a3691..0000000000 --- a/meta/recipes-extended/quota/quota_4.02.bb +++ /dev/null @@ -1,40 +0,0 @@ -SUMMARY = "Tools for monitoring & limiting user disk usage per filesystem" -SECTION = "base" -HOMEPAGE = "http://sourceforge.net/projects/linuxquota/" -BUGTRACKER = "http://sourceforge.net/tracker/?group_id=18136&atid=118136" -LICENSE = "BSD & GPLv2+ & LGPLv2.1+" -LIC_FILES_CHKSUM = "file://quota.c;beginline=1;endline=33;md5=331c7d77744bfe0ad24027f0651028ec \ - file://rquota_server.c;beginline=1;endline=20;md5=fe7e0d7e11c6f820f8fa62a5af71230f \ - file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb" - -SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz \ - file://config-tcpwrappers.patch \ - file://fcntl.patch \ - file://remove_non_posix_types.patch \ - " -SRC_URI_append_libc-musl = " file://replace_getrpcbynumber_r.patch" - -SRC_URI[md5sum] = "a8a5df262261e659716ccad2a5d6df0d" -SRC_URI[sha256sum] = "f4c2f48abf94bbdc396df33d276f2e9d19af58c232cb85eef9c174a747c33795" - -S = "${WORKDIR}/quota-tools" - -DEPENDS = "gettext-native e2fsprogs" - -inherit autotools-brokensep gettext pkgconfig - -CFLAGS += "-I=${includedir}/tirpc" -LDFLAGS += "-ltirpc" -ASNEEDED = "" -EXTRA_OEMAKE += 'STRIP=""' - -PACKAGECONFIG ??= "tcp-wrappers rpc bsd" -PACKAGECONFIG_libc-musl = "tcp-wrappers rpc" - -PACKAGECONFIG[tcp-wrappers] = "--with-tcpwrappers,--without-tcpwrappers,tcp-wrappers" -PACKAGECONFIG[rpc] = "--enable-rpc=yes,--enable-rpc=no,libtirpc" -PACKAGECONFIG[bsd] = "--enable-bsd_behaviour=yes,--enable-bsd_behaviour=no," - -do_install() { - oe_runmake ROOTDIR=${D} install -} diff --git a/meta/recipes-extended/quota/quota_4.05.bb b/meta/recipes-extended/quota/quota_4.05.bb new file mode 100644 index 0000000000..c5da1e71ed --- /dev/null +++ b/meta/recipes-extended/quota/quota_4.05.bb @@ -0,0 +1,34 @@ +SUMMARY = "Tools for monitoring & limiting user disk usage per filesystem" +SECTION = "base" +HOMEPAGE = "http://sourceforge.net/projects/linuxquota/" +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 = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz \ + file://fcntl.patch \ + " +SRC_URI[md5sum] = "1c1dbd2cd3d680ccac661239b067e147" +SRC_URI[sha256sum] = "ef3b5b5d1014ed1344b46c1826145e20cbef8db967b522403c9a060761cf7ab9" + +CVE_PRODUCT = "linux_diskquota" + +UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/linuxquota/files/quota-tools/" +UPSTREAM_CHECK_REGEX = "/quota-tools/(?P<pver>(\d+[\.\-_]*)+)/" + +DEPENDS = "gettext-native e2fsprogs libnl dbus" + +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 ??= "tcp-wrappers rpc bsd" +PACKAGECONFIG_libc-musl = "tcp-wrappers rpc" + +PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" +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/recipes-extended/rpcbind/rpcbind/0001-Avoid-use-of-glibc-sys-cdefs.h-header.patch b/meta/recipes-extended/rpcbind/rpcbind/0001-Avoid-use-of-glibc-sys-cdefs.h-header.patch deleted file mode 100644 index eeef9f152f..0000000000 --- a/meta/recipes-extended/rpcbind/rpcbind/0001-Avoid-use-of-glibc-sys-cdefs.h-header.patch +++ /dev/null @@ -1,221 +0,0 @@ -From 2a44d862233f2126581e290d568e1c8b8f2eb9f5 Mon Sep 17 00:00:00 2001 -From: Carlo Landmeter <clandmeter@gmail.com> -Date: Thu, 19 Feb 2015 15:28:45 +0000 -Subject: [PATCH] Avoid use of glibc sys/cdefs.h header - -Upstream-Status: Pending ---- - src/check_bound.c | 2 +- - src/pmap_svc.c | 10 +++++----- - src/rpcb_svc.c | 10 +++++----- - src/rpcb_svc_4.c | 14 +++++++------- - src/rpcb_svc_com.c | 46 +++++++++++++++++++++++----------------------- - src/rpcbind.c | 12 ++++++------ - src/util.c | 2 +- - src/warmstart.c | 4 ++-- - 8 files changed, 50 insertions(+), 50 deletions(-) - -diff --git a/src/check_bound.c b/src/check_bound.c -index c70b845..5d21730 100644 ---- a/src/check_bound.c -+++ b/src/check_bound.c -@@ -70,7 +70,7 @@ static struct fdlist *fdhead; /* Link list of the check fd's */ - static struct fdlist *fdtail; - static char *nullstring = ""; - --static bool_t check_bound __P((struct fdlist *, char *uaddr)); -+static bool_t check_bound (struct fdlist *, char *uaddr); - - /* - * Returns 1 if the given address is bound for the given addr & transport -diff --git a/src/pmap_svc.c b/src/pmap_svc.c -index ad28b93..9c7d409 100644 ---- a/src/pmap_svc.c -+++ b/src/pmap_svc.c -@@ -60,11 +60,11 @@ static char sccsid[] = "@(#)pmap_svc.c 1.23 89/04/05 Copyr 1984 Sun Micro"; - #include "rpcbind.h" - #include "xlog.h" - #include <rpc/svc_soc.h> /* svc_getcaller routine definition */ --static struct pmaplist *find_service_pmap __P((rpcprog_t, rpcvers_t, -- rpcprot_t)); --static bool_t pmapproc_change __P((struct svc_req *, SVCXPRT *, u_long)); --static bool_t pmapproc_getport __P((struct svc_req *, SVCXPRT *)); --static bool_t pmapproc_dump __P((struct svc_req *, SVCXPRT *)); -+static struct pmaplist *find_service_pmap (rpcprog_t, rpcvers_t, -+ rpcprot_t); -+static bool_t pmapproc_change (struct svc_req *, SVCXPRT *, u_long); -+static bool_t pmapproc_getport (struct svc_req *, SVCXPRT *); -+static bool_t pmapproc_dump (struct svc_req *, SVCXPRT *); - - /* - * Called for all the version 2 inquiries. -diff --git a/src/rpcb_svc.c b/src/rpcb_svc.c -index bd92201..6c7f7fe 100644 ---- a/src/rpcb_svc.c -+++ b/src/rpcb_svc.c -@@ -53,10 +53,10 @@ - #include "rpcbind.h" - #include "xlog.h" - --static void *rpcbproc_getaddr_3_local __P((void *, struct svc_req *, SVCXPRT *, -- rpcvers_t)); --static void *rpcbproc_dump_3_local __P((void *, struct svc_req *, SVCXPRT *, -- rpcvers_t)); -+static void *rpcbproc_getaddr_3_local (void *, struct svc_req *, SVCXPRT *, -+ rpcvers_t); -+static void *rpcbproc_dump_3_local (void *, struct svc_req *, SVCXPRT *, -+ rpcvers_t); - - /* - * Called by svc_getreqset. There is a separate server handle for -@@ -75,7 +75,7 @@ rpcb_service_3(struct svc_req *rqstp, SVCXPRT *transp) - } argument; - char *result; - xdrproc_t xdr_argument, xdr_result; -- void *(*local) __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t)); -+ void *(*local) (void *, struct svc_req *, SVCXPRT *, rpcvers_t); - rpcprog_t setprog = 0; - - rpcbs_procinfo(RPCBVERS_3_STAT, rqstp->rq_proc); -diff --git a/src/rpcb_svc_4.c b/src/rpcb_svc_4.c -index b673452..6764c0a 100644 ---- a/src/rpcb_svc_4.c -+++ b/src/rpcb_svc_4.c -@@ -54,13 +54,13 @@ - #include "rpcbind.h" - #include "xlog.h" - --static void *rpcbproc_getaddr_4_local __P((void *, struct svc_req *, SVCXPRT *, -- rpcvers_t)); --static void *rpcbproc_getversaddr_4_local __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t)); -+static void *rpcbproc_getaddr_4_local (void *, struct svc_req *, SVCXPRT *, -+ rpcvers_t); -+static void *rpcbproc_getversaddr_4_local (void *, struct svc_req *, SVCXPRT *, rpcvers_t); - static void *rpcbproc_getaddrlist_4_local -- __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t)); --static void free_rpcb_entry_list __P((rpcb_entry_list_ptr *)); --static void *rpcbproc_dump_4_local __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t)); -+ (void *, struct svc_req *, SVCXPRT *, rpcvers_t); -+static void free_rpcb_entry_list (rpcb_entry_list_ptr *); -+static void *rpcbproc_dump_4_local (void *, struct svc_req *, SVCXPRT *, rpcvers_t); - - /* - * Called by svc_getreqset. There is a separate server handle for -@@ -78,7 +78,7 @@ rpcb_service_4(struct svc_req *rqstp, SVCXPRT *transp) - } argument; - char *result; - xdrproc_t xdr_argument, xdr_result; -- void *(*local) __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t)); -+ void *(*local) (void *, struct svc_req *, SVCXPRT *, rpcvers_t); - rpcprog_t setprog = 0; - - rpcbs_procinfo(RPCBVERS_4_STAT, rqstp->rq_proc); -diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c -index ff9ce6b..8aef9e5 100644 ---- a/src/rpcb_svc_com.c -+++ b/src/rpcb_svc_com.c -@@ -100,29 +100,29 @@ struct finfo { - static struct finfo FINFO[NFORWARD]; - - --static bool_t xdr_encap_parms __P((XDR *, struct encap_parms *)); --static bool_t xdr_rmtcall_args __P((XDR *, struct r_rmtcall_args *)); --static bool_t xdr_rmtcall_result __P((XDR *, struct r_rmtcall_args *)); --static bool_t xdr_opaque_parms __P((XDR *, struct r_rmtcall_args *)); --static int find_rmtcallfd_by_netid __P((char *)); --static SVCXPRT *find_rmtcallxprt_by_fd __P((int)); --static int forward_register __P((u_int32_t, struct netbuf *, int, char *, -- rpcproc_t, rpcvers_t, u_int32_t *)); --static struct finfo *forward_find __P((u_int32_t)); --static int free_slot_by_xid __P((u_int32_t)); --static int free_slot_by_index __P((int)); --static int netbufcmp __P((struct netbuf *, struct netbuf *)); --static struct netbuf *netbufdup __P((struct netbuf *)); --static void netbuffree __P((struct netbuf *)); --static int check_rmtcalls __P((struct pollfd *, int)); --static void xprt_set_caller __P((SVCXPRT *, struct finfo *)); --static void send_svcsyserr __P((SVCXPRT *, struct finfo *)); --static void handle_reply __P((int, SVCXPRT *)); --static void find_versions __P((rpcprog_t, char *, rpcvers_t *, rpcvers_t *)); --static rpcblist_ptr find_service __P((rpcprog_t, rpcvers_t, char *)); --static char *getowner __P((SVCXPRT *, char *, size_t)); --static int add_pmaplist __P((RPCB *)); --static int del_pmaplist __P((RPCB *)); -+static bool_t xdr_encap_parms (XDR *, struct encap_parms *); -+static bool_t xdr_rmtcall_args (XDR *, struct r_rmtcall_args *); -+static bool_t xdr_rmtcall_result (XDR *, struct r_rmtcall_args *); -+static bool_t xdr_opaque_parms (XDR *, struct r_rmtcall_args *); -+static int find_rmtcallfd_by_netid (char *); -+static SVCXPRT *find_rmtcallxprt_by_fd (int); -+static int forward_register (u_int32_t, struct netbuf *, int, char *, -+ rpcproc_t, rpcvers_t, u_int32_t *); -+static struct finfo *forward_find (u_int32_t); -+static int free_slot_by_xid (u_int32_t); -+static int free_slot_by_index (int); -+static int netbufcmp (struct netbuf *, struct netbuf *); -+static struct netbuf *netbufdup (struct netbuf *); -+static void netbuffree (struct netbuf *); -+static int check_rmtcalls (struct pollfd *, int); -+static void xprt_set_caller (SVCXPRT *, struct finfo *); -+static void send_svcsyserr (SVCXPRT *, struct finfo *); -+static void handle_reply (int, SVCXPRT *); -+static void find_versions (rpcprog_t, char *, rpcvers_t *, rpcvers_t *); -+static rpcblist_ptr find_service (rpcprog_t, rpcvers_t, char *); -+static char *getowner (SVCXPRT *, char *, size_t); -+static int add_pmaplist (RPCB *); -+static int del_pmaplist (RPCB *); - - /* - * Set a mapping of program, version, netid -diff --git a/src/rpcbind.c b/src/rpcbind.c -index 045daa1..137011b 100644 ---- a/src/rpcbind.c -+++ b/src/rpcbind.c -@@ -135,13 +135,13 @@ char *tcp_uaddr; /* Universal TCP address */ - static char servname[] = "rpcbind"; - static char superuser[] = "superuser"; - --int main __P((int, char *[])); -+int main (int, char *[]); - --static int init_transport __P((struct netconfig *)); --static void rbllist_add __P((rpcprog_t, rpcvers_t, struct netconfig *, -- struct netbuf *)); --static void terminate __P((int)); --static void parseargs __P((int, char *[])); -+static int init_transport (struct netconfig *); -+static void rbllist_add (rpcprog_t, rpcvers_t, struct netconfig *, -+ struct netbuf *); -+static void terminate (int); -+static void parseargs (int, char *[]); - - int - main(int argc, char *argv[]) -diff --git a/src/util.c b/src/util.c -index a6c835b..33b9e4f 100644 ---- a/src/util.c -+++ b/src/util.c -@@ -70,7 +70,7 @@ static struct sockaddr_in *local_in4; - static struct sockaddr_in6 *local_in6; - #endif - --static int bitmaskcmp __P((void *, void *, void *, int)); -+static int bitmaskcmp (void *, void *, void *, int); - - /* - * For all bits set in "mask", compare the corresponding bits in -diff --git a/src/warmstart.c b/src/warmstart.c -index b6eb73e..42dd3af 100644 ---- a/src/warmstart.c -+++ b/src/warmstart.c -@@ -58,8 +58,8 @@ - #define PMAPFILE RPCBIND_STATEDIR "/portmap.xdr" - #endif - --static bool_t write_struct __P((char *, xdrproc_t, void *)); --static bool_t read_struct __P((char *, xdrproc_t, void *)); -+static bool_t write_struct (char *, xdrproc_t, void *); -+static bool_t read_struct (char *, xdrproc_t, void *); - - static bool_t - write_struct(char *filename, xdrproc_t structproc, void *list) diff --git a/meta/recipes-extended/rpcbind/rpcbind/0001-systemd-use-EnvironmentFile.patch b/meta/recipes-extended/rpcbind/rpcbind/0001-systemd-use-EnvironmentFile.patch new file mode 100644 index 0000000000..b92f2cf7b1 --- /dev/null +++ b/meta/recipes-extended/rpcbind/rpcbind/0001-systemd-use-EnvironmentFile.patch @@ -0,0 +1,42 @@ +From da528d5d60137f13202102b53cf178aba45849a5 Mon Sep 17 00:00:00 2001 +From: Stefan Agner <stefan.agner@toradex.com> +Date: Sun, 6 Oct 2019 00:05:54 +0200 +Subject: [PATCH] systemd: use EnvironmentFile + +Use OE specific environment file. + +Upstream-Status: Inappropriate [OE specific] +Signed-off-by: Stefan Agner <stefan.agner@toradex.com> +--- + configure.ac | 2 ++ + systemd/rpcbind.service.in | 2 +- + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 2dd9471..47a46c0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -69,5 +69,7 @@ AC_CHECK_HEADERS([nss.h rpcsvc/mount.h]) + # 2 "evals" needed to expand variable names + AC_SUBST([_sbindir]) + AC_CONFIG_COMMANDS_PRE([eval eval _sbindir=$sbindir]) ++AC_SUBST([_sysconfdir]) ++AC_CONFIG_COMMANDS_PRE([eval eval _sysconfdir=$sbindir]) + + AC_OUTPUT([Makefile systemd/rpcbind.service]) +diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in +index 7b1c74b..f45ee1e 100644 +--- a/systemd/rpcbind.service.in ++++ b/systemd/rpcbind.service.in +@@ -11,7 +11,7 @@ Wants=rpcbind.target + + [Service] + Type=notify +-# distro can provide a drop-in adding EnvironmentFile=-/??? if needed. ++EnvironmentFile=-@_sysconfdir@/rpcbind.conf + ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS -w -f + + [Install] +-- +2.23.0 + diff --git a/meta/recipes-extended/rpcbind/rpcbind/0001-uclibc-nss.patch b/meta/recipes-extended/rpcbind/rpcbind/0001-uclibc-nss.patch deleted file mode 100644 index afa55f3b76..0000000000 --- a/meta/recipes-extended/rpcbind/rpcbind/0001-uclibc-nss.patch +++ /dev/null @@ -1,30 +0,0 @@ -Upstream-Status: Pending - -From b8f0d7b7318ba344c25785d6f5cf3f8de98012d4 Mon Sep 17 00:00:00 2001 -From: Natanael Copa <ncopa@alpinelinux.org> -Date: Tue, 2 Feb 2010 09:36:03 +0000 -Subject: [PATCH 1/2] uclibc-nss - ---- - src/rpcbind.c | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) - -diff --git a/src/rpcbind.c b/src/rpcbind.c -index 525ffba..1fe1a60 100644 ---- a/src/rpcbind.c -+++ b/src/rpcbind.c -@@ -67,7 +67,11 @@ - #include <pwd.h> - #include <string.h> - #include <errno.h> -+#if defined(__UCLIBC__) -+#define __nss_configure_lookup(x,y) -+#else - #include <nss.h> -+#endif - #include "config.h" - #include "rpcbind.h" - --- -1.6.6.1 - diff --git a/meta/recipes-extended/rpcbind/rpcbind/musl-sunrpc.patch b/meta/recipes-extended/rpcbind/rpcbind/musl-sunrpc.patch deleted file mode 100644 index 9c72a1bdf4..0000000000 --- a/meta/recipes-extended/rpcbind/rpcbind/musl-sunrpc.patch +++ /dev/null @@ -1,29 +0,0 @@ -The musl implementation of getaddrinfo and getservbyname does not -aliases. As a workaround we use "sunprc" instead of "portmapper" - -ported from alpine linux - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - -Index: rpcbind-0.2.2/src/rpcbind.c -=================================================================== ---- rpcbind-0.2.2.orig/src/rpcbind.c -+++ rpcbind-0.2.2/src/rpcbind.c -@@ -491,7 +491,7 @@ init_transport(struct netconfig *nconf) - if ((aicode = getaddrinfo(hosts[nhostsbak], - servname, &hints, &res)) != 0) { - if ((aicode = getaddrinfo(hosts[nhostsbak], -- "portmapper", &hints, &res)) != 0) { -+ "sunrpc", &hints, &res)) != 0) { - syslog(LOG_ERR, - "cannot get local address for %s: %s", - nconf->nc_netid, gai_strerror(aicode)); -@@ -564,7 +564,7 @@ init_transport(struct netconfig *nconf) - if ((strcmp(nconf->nc_netid, "local") != 0) && - (strcmp(nconf->nc_netid, "unix") != 0)) { - if ((aicode = getaddrinfo(NULL, servname, &hints, &res))!= 0) { -- if ((aicode = getaddrinfo(NULL, "portmapper", &hints, &res))!= 0) { -+ if ((aicode = getaddrinfo(NULL, "sunrpc", &hints, &res))!= 0) { - printf("cannot get local address for %s: %s", nconf->nc_netid, gai_strerror(aicode)); - syslog(LOG_ERR, - "cannot get local address for %s: %s", diff --git a/meta/recipes-extended/rpcbind/rpcbind/remove-sys-queue.patch b/meta/recipes-extended/rpcbind/rpcbind/remove-sys-queue.patch deleted file mode 100644 index 84fc974fdf..0000000000 --- a/meta/recipes-extended/rpcbind/rpcbind/remove-sys-queue.patch +++ /dev/null @@ -1,22 +0,0 @@ -musl does not provide this header and here is reasoning -http://wiki.musl-libc.org/wiki/FAQ#Q:_why_is_sys.2Fqueue.h_not_included_.3F - -So include it only when __GLIBC__ is defined which is true for uclibc and glibc - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Upstream-Status: Pending - -Index: rpcbind-0.2.2/src/util.c -=================================================================== ---- rpcbind-0.2.2.orig/src/util.c -+++ rpcbind-0.2.2/src/util.c -@@ -41,7 +41,9 @@ - - #include <sys/types.h> - #include <sys/socket.h> -+#ifdef __GLIBC__ - #include <sys/queue.h> -+#endif - #include <net/if.h> - #include <netinet/in.h> - #include <ifaddrs.h> diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf index 2a4dfbcfbc..f423ac1788 100644 --- a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf +++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf @@ -1,3 +1,3 @@ # Optional arguments passed to rpcbind. # -RPCBIND_OPTS="" +RPCBIND_OPTIONS="" diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service deleted file mode 100644 index b3ae2541a0..0000000000 --- a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=RPC Bind Service -Requires=rpcbind.socket - -[Service] -Type=forking -EnvironmentFile=-@SYSCONFDIR@/rpcbind.conf -ExecStart=@SBINDIR@/rpcbind -w $RPCBIND_OPTS -SuccessExitStatus=2 - -[Install] -Also=rpcbind.socket diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket deleted file mode 100644 index d63c1d9720..0000000000 --- a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=RPCbind Server Activation Socket - -[Socket] -ListenStream=/var/run/rpcbind.sock - -[Install] -WantedBy=sockets.target diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind_add_option_to_fix_port_number.patch b/meta/recipes-extended/rpcbind/rpcbind/rpcbind_add_option_to_fix_port_number.patch new file mode 100644 index 0000000000..434b6b1c4c --- /dev/null +++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind_add_option_to_fix_port_number.patch @@ -0,0 +1,130 @@ +From 76f8598fd20727908e760cbb497dd6a17eda4af5 Mon Sep 17 00:00:00 2001 +From: Roy Li <rongqing.li@windriver.com> +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 <li.wang@windriver.com> +Signed-off-by: Roy Li <rongqing.li@windriver.com> +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + 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 af6200f..2e6146b 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 +@@ -107,6 +107,8 @@ will automatically add + and if IPv6 is enabled, + .Li ::1 + to the list. ++.It Fl p ++Bind for fixed UDP port number + .It Fl i + .Dq Insecure + mode. +diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c +index 8aef9e5..c2632a4 100644 +--- a/src/rpcb_svc_com.c ++++ b/src/rpcb_svc_com.c +@@ -48,6 +48,7 @@ + #include <rpc/rpc.h> + #include <rpc/rpcb_prot.h> + #include <rpc/svc_dg.h> ++#include <rpc/rpc_com.h> + #include <netconfig.h> + #include <errno.h> + #include <syslog.h> +@@ -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 137011b..dc3d2d6 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; +@@ -869,7 +870,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 */ +@@ -887,6 +888,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; +@@ -905,7 +909,7 @@ parseargs(int argc, char *argv[]) + break; + #endif + default: /* error */ +- fprintf(stderr, "usage: rpcbind [-adhilswf]\n"); ++ fprintf(stderr, "usage: rpcbind [-adhpilswf]\n"); + exit (1); + } + } +-- +1.9.1 + diff --git a/meta/recipes-extended/rpcbind/rpcbind_0.2.3.bb b/meta/recipes-extended/rpcbind/rpcbind_1.2.5.bb index 333602185c..ec8f9e48b2 100644 --- a/meta/recipes-extended/rpcbind/rpcbind_0.2.3.bb +++ b/meta/recipes-extended/rpcbind/rpcbind_1.2.5.bb @@ -6,31 +6,20 @@ HOMEPAGE = "http://sourceforge.net/projects/rpcbind/" BUGTRACKER = "http://sourceforge.net/tracker/?group_id=201237&atid=976751" DEPENDS = "libtirpc quota" -LICENSE = "BSD" +LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=b46486e4c4a416602693a711bb5bfa39 \ file://src/rpcinfo.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24" SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \ file://init.d \ - file://0001-Avoid-use-of-glibc-sys-cdefs.h-header.patch \ - file://remove-sys-queue.patch \ - ${UCLIBCPATCHES} \ - ${MUSLPATCHES} \ file://rpcbind.conf \ - file://rpcbind.socket \ - file://rpcbind.service \ + file://rpcbind_add_option_to_fix_port_number.patch \ + file://0001-systemd-use-EnvironmentFile.patch \ " -MUSLPATCHES_libc-musl = "file://musl-sunrpc.patch" +SRC_URI[md5sum] = "ed46f09b9c0fa2d49015f6431bc5ea7b" +SRC_URI[sha256sum] = "2ce360683963b35c19c43f0ee2c7f18aa5b81ef41c3fdbd15ffcb00b8bffda7a" -UCLIBCPATCHES_libc-uclibc = "file://0001-uclibc-nss.patch \ - " -UCLIBCPATCHES ?= "" -MUSLPATCHES ?= "" - -SRC_URI[md5sum] = "c8875246b2688a1adfbd6ad43480278d" -SRC_URI[sha256sum] = "9897823a9d820ea011d9ea02054d5ab99469b9ca5346265fee380713c8fed27b" - -inherit autotools update-rc.d systemd pkgconfig +inherit autotools update-rc.d systemd pkgconfig update-alternatives PACKAGECONFIG ??= "tcp-wrappers" PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" @@ -38,7 +27,7 @@ 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" +SYSTEMD_SERVICE_${PN} = "rpcbind.service rpcbind.socket" inherit useradd @@ -46,7 +35,7 @@ USERADD_PACKAGES = "${PN}" USERADD_PARAM_${PN} = "--system --no-create-home --home-dir / \ --shell /bin/false --user-group rpc" -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/, \ --without-systemdsystemunitdir, \ systemd \ @@ -55,19 +44,12 @@ PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/ EXTRA_OECONF += " --enable-warmstarts --with-rpcuser=rpc" do_install_append () { - mv ${D}${bindir} ${D}${sbindir} - 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 0755 ${D}${sysconfdir}/init.d/rpcbind - - install -m 0755 ${WORKDIR}/rpcbind.conf ${D}${sysconfdir} - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/rpcbind.socket ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/rpcbind.service ${D}${systemd_unitdir}/system - sed -i -e 's,@SBINDIR@,${sbindir},g' \ - -e 's,@SYSCONFDIR@,${sysconfdir},g' \ - ${D}${systemd_unitdir}/system/rpcbind.service } + +ALTERNATIVE_${PN} = "rpcinfo" +ALTERNATIVE_LINK_NAME[rpcinfo] = "${bindir}/rpcinfo" diff --git a/meta/recipes-extended/rpcsvc-proto/rpcsvc-proto.bb b/meta/recipes-extended/rpcsvc-proto/rpcsvc-proto.bb new file mode 100644 index 0000000000..5aff2b56a6 --- /dev/null +++ b/meta/recipes-extended/rpcsvc-proto/rpcsvc-proto.bb @@ -0,0 +1,41 @@ +# Copyright (C) 2018 Khem Raj <raj.khem@gmail.com> +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "rpcsvc protocol definitions from glibc" + +DESCRIPTION = "This package contains rpcsvc proto.x files from glibc, which are\ +missing in libtirpc. Additional it contains rpcgen, which is needed\ +to create header files and sources from protocol files.\ +This package is only needed, if glibc is installed without the\ +deprecated sunrpc functionality and libtirpc should replace it." + +HOMEPAGE = "https://github.com/thkukuk/rpcsvc-proto" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=0daaf958d5531ab86169ec6e275e1517" +SECTION = "libs" +DEPENDS += "rpcsvc-proto-native" + +PV = "1.4.2" + +SRCREV = "6f54e54455c073d08a56ea627c6cd2355a40eb53" + +SRC_URI = "git://github.com/thkukuk/${BPN} \ + file://0001-Use-cross-compiled-rpcgen.patch \ + " + +S = "${WORKDIR}/git" + +inherit autotools gettext + +EXTRA_OEMAKE_class-native = " -C rpcgen" + +do_configure_prepend() { + touch ${S}/ABOUT-NLS +} + +do_install_append() { + # They come from quota recipe + rm -rf ${D}${includedir}/rpcsvc/rquota.[hx] +} + +BBCLASSEXTEND += "native nativesdk" diff --git a/meta/recipes-extended/rpcsvc-proto/rpcsvc-proto/0001-Use-cross-compiled-rpcgen.patch b/meta/recipes-extended/rpcsvc-proto/rpcsvc-proto/0001-Use-cross-compiled-rpcgen.patch new file mode 100644 index 0000000000..208974004b --- /dev/null +++ b/meta/recipes-extended/rpcsvc-proto/rpcsvc-proto/0001-Use-cross-compiled-rpcgen.patch @@ -0,0 +1,23 @@ +From de9345207beb71e4d5b6b40b52cac4ebd2e3858c Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 27 Apr 2018 23:23:20 -0700 +Subject: [PATCH] Use cross compiled rpcgen + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + rpcsvc/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: git/rpcsvc/Makefile.am +=================================================================== +--- git.orig/rpcsvc/Makefile.am ++++ git/rpcsvc/Makefile.am +@@ -12,5 +12,5 @@ nodist_rpcsvc_HEADERS = klm_prot.h nlm_p + nfs_prot.h rquota.h sm_inter.h + + %.h: %.x +- $(top_builddir)/rpcgen/rpcgen -h -o $@ $< ++ rpcgen -h -o $@ $< + diff --git a/meta/recipes-extended/screen/screen/0001-Remove-more-compatibility-stuff.patch b/meta/recipes-extended/screen/screen/0001-Remove-more-compatibility-stuff.patch new file mode 100644 index 0000000000..1413724d07 --- /dev/null +++ b/meta/recipes-extended/screen/screen/0001-Remove-more-compatibility-stuff.patch @@ -0,0 +1,31 @@ +This fixes +../screen-4.6.2/pty.c: In function 'OpenPTY': +../screen-4.6.2/pty.c:328:7: warning: implicit declaration of function 'openpty'; did you mean 'openat'? [-Wimplicit-function-declaration] + if (openpty(&f, &s, TtyName, NULL, NULL) != 0) + ^~~~~~~ + +Signed-off-by: Amadeusz SÅ‚awiÅ„ski <amade@asmblr.net> +Signed-off-by: Adrian Bunk <bunk@stusta.de> +Upstream-Status: Backport + +--- + pty.c | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/pty.c b/pty.c +index 1c0660e..502338f 100644 +--- a/pty.c ++++ b/pty.c +@@ -47,11 +47,7 @@ + # include <sys/ttold.h> + #endif + +-#ifdef ISC +-# include <sys/tty.h> +-# include <sys/sioctl.h> +-# include <sys/pty.h> +-#endif ++#include <pty.h> + + #ifdef sgi + # include <sys/sysmacros.h> diff --git a/meta/recipes-extended/screen/screen/0001-fix-for-multijob-build.patch b/meta/recipes-extended/screen/screen/0001-fix-for-multijob-build.patch new file mode 100644 index 0000000000..fbdb0eb478 --- /dev/null +++ b/meta/recipes-extended/screen/screen/0001-fix-for-multijob-build.patch @@ -0,0 +1,58 @@ +From 79ad2885e26631077dd6b8aebe17ae95b38133a6 Mon Sep 17 00:00:00 2001 +From: Jackie Huang <jackie.huang@windriver.com> +Date: Tue, 26 Jul 2016 14:23:59 +0800 +Subject: [PATCH] fix for multijob build + +make sure that comm.sh script generates comm.h header before doing +anything else + +Signed-off-by: Amadeusz Sawiski <amade@asmblr.net> + +Upstream-Status: Backport + +Backport patch to fix parallel build failure and update context to make patch +coulde be applied. + +http://git.savannah.gnu.org/cgit/screen.git/commit?id=c0de6dd + +Signed-off-by: Kai Kang <kai.kang@windriver.com> +Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +--- + Makefile.in | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index aca7da3..3607711 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -298,7 +298,7 @@ search.o: layout.h viewport.h canvas.h search.c config.h screen.h os.h osdef.h a + comm.h layer.h term.h image.h display.h window.h mark.h extern.h + tty.o: layout.h viewport.h canvas.h tty.c config.h screen.h os.h osdef.h ansi.h acls.h comm.h \ + layer.h term.h image.h display.h window.h extern.h +-term.o: layout.h viewport.h canvas.h term.c term.h ++term.o: layout.h viewport.h canvas.h term.c term.h comm.h + window.o: layout.h viewport.h canvas.h window.c config.h screen.h os.h osdef.h ansi.h acls.h \ + comm.h layer.h term.h image.h display.h window.h extern.h logfile.h + utmp.o: layout.h viewport.h canvas.h utmp.c config.h screen.h os.h osdef.h ansi.h acls.h \ +@@ -324,7 +324,7 @@ canvas.o: layout.h viewport.h canvas.h canvas.c config.h screen.h os.h osdef.h a + comm.h layer.h term.h image.h display.h window.h extern.h \ + braille.h + comm.o: layout.h viewport.h canvas.h comm.c config.h acls.h comm.h +-kmapdef.o: layout.h viewport.h canvas.h kmapdef.c config.h ++kmapdef.o: layout.h viewport.h canvas.h kmapdef.c config.h comm.h + acls.o: layout.h viewport.h canvas.h acls.c config.h screen.h os.h osdef.h ansi.h acls.h comm.h \ + layer.h term.h image.h display.h window.h extern.h + braille.o: layout.h viewport.h canvas.h braille.c config.h screen.h os.h osdef.h ansi.h acls.h \ +@@ -350,7 +350,7 @@ layout.o: layout.h viewport.h canvas.h layout.c config.h screen.h os.h osdef.h a + viewport.o: layout.h viewport.h canvas.h viewport.c config.h screen.h os.h osdef.h ansi.h acls.h \ + comm.h layer.h term.h image.h display.h window.h extern.h \ + braille.h +-list_generic.o: list_generic.h list_generic.c layer.h screen.h osdef.h +-list_display.o: list_generic.h list_display.c layer.h screen.h osdef.h ++list_generic.o: list_generic.h list_generic.c layer.h screen.h osdef.h comm.h ++list_display.o: list_generic.h list_display.c layer.h screen.h osdef.h comm.h + list_window.o: list_generic.h list_window.c window.h layer.h screen.h osdef.h comm.h + +-- +1.9.1 + diff --git a/meta/recipes-extended/screen/screen/0002-comm.h-now-depends-on-term.h.patch b/meta/recipes-extended/screen/screen/0002-comm.h-now-depends-on-term.h.patch new file mode 100644 index 0000000000..a01dc24751 --- /dev/null +++ b/meta/recipes-extended/screen/screen/0002-comm.h-now-depends-on-term.h.patch @@ -0,0 +1,30 @@ +Upstream-Status: Backport + +Backport from: + +http://git.savannah.gnu.org/cgit/screen.git/commit/?id=39c5f1c + +Signed-off-by: Kai Kang <kai.kang@windriver.com> +--- +From 39c5f1c76f1fcef4b5958bf828a63f53426b6984 Mon Sep 17 00:00:00 2001 +From: Mike Gerwitz <mike@mikegerwitz.com> +Date: Tue, 24 Dec 2013 22:16:31 -0500 +Subject: [PATCH] comm.h now depends on term.h + +--- + src/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: screen-4.6.1/Makefile.in +=================================================================== +--- screen-4.6.1.orig/Makefile.in ++++ screen-4.6.1/Makefile.in +@@ -133,7 +133,7 @@ kmapdef.c: term.h + tty.c: tty.sh + sh $(srcdir)/tty.sh tty.c + +-comm.h: comm.c comm.sh config.h ++comm.h: comm.c comm.sh config.h term.h + AWK=$(AWK) CC="$(CC) $(CFLAGS)" srcdir=${srcdir} sh $(srcdir)/comm.sh + + osdef.h: osdef.sh config.h osdef.h.in diff --git a/meta/recipes-extended/screen/screen/Avoid-mis-identifying-systems-as-SVR4.patch b/meta/recipes-extended/screen/screen/Avoid-mis-identifying-systems-as-SVR4.patch deleted file mode 100644 index e184aa1f31..0000000000 --- a/meta/recipes-extended/screen/screen/Avoid-mis-identifying-systems-as-SVR4.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 79afb676904653403145fda9e1a6a9d3ea1cb22a Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen <jussi.kukkonen@intel.com> -Date: Fri, 7 Aug 2015 11:10:32 +0300 -Subject: [PATCH 4/4] Avoid mis-identifying systems as SVR4 - -Linux can be misdetected as SVR4 because it has -libelf installed. This leads to linking with libelf, even though no -symbols from that library were actually used, and to a workaround for -a buggy getlogin() being enabled. - -It is not documented which exact SVR4 system had the bug that the -workaround was added for, so all I could do is make an educated guess -at the #defines its compiler would be likely to set. - -Modified from patch by Maarten ter Huurne. - -Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223] - -Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> ---- - configure.ac | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index dc928ae..65439ce 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -179,14 +179,24 @@ AC_EGREP_CPP(yes, - #endif - ], LIBS="$LIBS -lsocket -linet";seqptx=1) - -+AC_CHECKING(SVR4) -+AC_EGREP_CPP(yes, -+[main () { -+#if defined(SVR4) || defined(__SVR4) -+ yes; -+#endif -+], AC_NOTE(- you have a SVR4 system) AC_DEFINE(SVR4) svr4=1) -+if test -n "$svr4" ; then - oldlibs="$LIBS" - LIBS="$LIBS -lelf" - AC_CHECKING(SVR4) - AC_TRY_LINK([#include <utmpx.h> - ],, --[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN), --[AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN))])] -+[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(BUGGYGETLOGIN), -+[AC_CHECK_HEADER(elf.h, AC_DEFINE(BUGGYGETLOGIN))])] - ,LIBS="$oldlibs") -+fi -+ - AC_CHECK_HEADERS([stropts.h string.h strings.h]) - - AC_CHECKING(for Solaris 2.x) --- -2.1.4 - diff --git a/meta/recipes-extended/screen/screen/Provide-cross-compile-alternatives-for-AC_TRY_RUN.patch b/meta/recipes-extended/screen/screen/Provide-cross-compile-alternatives-for-AC_TRY_RUN.patch deleted file mode 100644 index 248bf087e2..0000000000 --- a/meta/recipes-extended/screen/screen/Provide-cross-compile-alternatives-for-AC_TRY_RUN.patch +++ /dev/null @@ -1,137 +0,0 @@ -From cd0f7f10a3fffbc60fe55eb200474d13fe1da65b Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen <jussi.kukkonen@intel.com> -Date: Fri, 7 Aug 2015 10:34:29 +0300 -Subject: [PATCH 2/4] Provide cross compile alternatives for AC_TRY_RUN - -Modified from patch by Maarten ter Huurne. - -Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223] - -Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> ---- - configure.ac | 32 ++++++++++++++++++++------------ - 1 file changed, 20 insertions(+), 12 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 27690a6..ce89f56 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -348,7 +348,8 @@ main() - exit(0); - } - ], AC_NOTE(- your fifos are usable) fifo=1, --AC_NOTE(- your fifos are not usable)) -+AC_NOTE(- your fifos are not usable), -+AC_NOTE(- skipping check because we are cross compiling; assuming fifos are usable) fifo=1) - rm -f /tmp/conftest* - - if test -n "$fifo"; then -@@ -396,7 +397,8 @@ main() - exit(0); - } - ], AC_NOTE(- your implementation is ok), --AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1) -+AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1, -+AC_NOTE(- skipping check because we are cross compiling; assuming fifo implementation is ok)) - rm -f /tmp/conftest* - fi - -@@ -458,7 +460,8 @@ main() - exit(0); - } - ], AC_NOTE(- your sockets are usable) sock=1, --AC_NOTE(- your sockets are not usable)) -+AC_NOTE(- your sockets are not usable), -+AC_NOTE(- skipping check because we are cross compiling; assuming sockets are usable) sock=1) - rm -f /tmp/conftest* - - if test -n "$sock"; then -@@ -497,7 +500,8 @@ main() - } - ],AC_NOTE(- you are normal), - AC_NOTE(- unix domain sockets are not kept in the filesystem) --AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1) -+AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1, -+AC_NOTE(- skipping check because we are cross compiling; assuming sockets are normal)) - rm -f /tmp/conftest* - fi - -@@ -624,7 +628,8 @@ main() - exit(0); - } - ],AC_NOTE(- select is ok), --AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN)) -+AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN), -+AC_NOTE(- skipping check because we are cross compiling; assuming select is ok)) - - dnl - dnl **** termcap or terminfo **** -@@ -666,7 +671,8 @@ main() - { - exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1); - }], AC_NOTE(- you use the termcap database), --AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO)) -+AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO), -+AC_NOTE(- skipping check because we are cross compiling; assuming terminfo database is used) AC_DEFINE(TERMINFO)) - AC_CHECKING(ospeed) - AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED)) - -@@ -801,7 +807,8 @@ main() - else - AC_NOTE(- can't determine - assume ptys are world accessable) - fi -- ] -+ ], -+ AC_NOTE(- skipping check because we are cross compiling; assuming ptys are world accessable) - ) - rm -f conftest_grp - fi -@@ -885,7 +892,7 @@ AC_EGREP_CPP(yes, - #endif - ], load=1) - fi --if test -z "$load" ; then -+if test -z "$load" && test "$cross_compiling" = no ; then - AC_CHECKING(for kernelfile) - for core in /unix /vmunix /dynix /hp-ux /xelos /dev/ksyms /kernel/unix /kernel/genunix /unicos /mach /netbsd /386bsd /dgux /bsd /stand/vmunix; do - if test -f $core || test -c $core; then -@@ -1078,7 +1085,7 @@ main() - #endif - exit(0); - } --],,AC_DEFINE(SYSVSIGS)) -+],,AC_DEFINE(SYSVSIGS),:) - - fi - -@@ -1158,7 +1165,7 @@ main() { - if (strncmp(buf, "cdedef", 6)) - exit(1); - exit(0); /* libc version works properly. */ --}], AC_DEFINE(USEBCOPY)) -+}], AC_DEFINE(USEBCOPY),,:) - - AC_TRY_RUN([ - #define bcopy(s,d,l) memmove(d,s,l) -@@ -1173,7 +1180,8 @@ main() { - if (strncmp(buf, "cdedef", 6)) - exit(1); - exit(0); /* libc version works properly. */ --}], AC_DEFINE(USEMEMMOVE)) -+}], AC_DEFINE(USEMEMMOVE),, -+ AC_NOTE(- skipping check because we are cross compiling; use memmove) AC_DEFINE(USEMEMMOVE)) - - - AC_TRY_RUN([ -@@ -1189,7 +1197,7 @@ main() { - if (strncmp(buf, "cdedef", 6)) - exit(1); - exit(0); /* libc version works properly. */ --}], AC_DEFINE(USEMEMCPY)) -+}], AC_DEFINE(USEMEMCPY),,:) - - AC_SYS_LONG_FILE_NAMES - --- -2.1.4 - diff --git a/meta/recipes-extended/screen/screen/Remove-redundant-compiler-sanity-checks.patch b/meta/recipes-extended/screen/screen/Remove-redundant-compiler-sanity-checks.patch deleted file mode 100644 index cc62c12e05..0000000000 --- a/meta/recipes-extended/screen/screen/Remove-redundant-compiler-sanity-checks.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 73b726c25f94c1b15514ed9249b927afdfbbfb94 Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen <jussi.kukkonen@intel.com> -Date: Fri, 7 Aug 2015 10:30:40 +0300 -Subject: [PATCH 1/4] Remove redundant compiler sanity checks - -AC_PROG_CC already performs sanity checks. And unlike the removed -checks, it does so in a way that supports cross compilation. - -Modified from patch by Maarten ter Huurne. - -Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223] - -Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> ---- - configure.ac | 27 --------------------------- - 1 file changed, 27 deletions(-) - -diff --git a/configure.ac b/configure.ac -index ffe2e37..27690a6 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -48,31 +48,6 @@ AC_PROG_GCC_TRADITIONAL - AC_ISC_POSIX - AC_USE_SYSTEM_EXTENSIONS - --AC_TRY_RUN(main(){exit(0);},,[ --if test $CC != cc ; then --AC_NOTE(Your $CC failed - restarting with CC=cc) --AC_NOTE() --CC=cc --export CC --exec $0 $configure_args --fi --]) -- --AC_TRY_RUN(main(){exit(0);},, --exec 5>&2 --eval $ac_link --AC_NOTE(CC=$CC; CFLAGS=$CFLAGS; LIBS=$LIBS;) --AC_NOTE($ac_compile) --AC_MSG_ERROR(Can't run the compiler - sorry)) -- --AC_TRY_RUN([ --main() --{ -- int __something_strange_(); -- __something_strange_(0); --} --],AC_MSG_ERROR(Your compiler does not set the exit status - sorry)) -- - AC_PROG_AWK - - AC_PROG_INSTALL -@@ -1300,8 +1275,6 @@ fi - dnl Ptx bug workaround -- insert -lc after -ltermcap - test -n "$seqptx" && LIBS="-ltermcap -lc -lsocket -linet -lnsl -lsec -lseq" - --AC_TRY_RUN(main(){exit(0);},,AC_MSG_ERROR(Can't run the compiler - internal error. Sorry.)) -- - ETCSCREENRC= - AC_MSG_CHECKING(for the global screenrc file) - AC_ARG_WITH(sys-screenrc, [ --with-sys-screenrc=path to the global screenrc file], [ ETCSCREENRC="${withval}" ]) --- -2.1.4 - diff --git a/meta/recipes-extended/screen/screen/Skip-host-file-system-checks-when-cross-compiling.patch b/meta/recipes-extended/screen/screen/Skip-host-file-system-checks-when-cross-compiling.patch deleted file mode 100644 index d7e55a4451..0000000000 --- a/meta/recipes-extended/screen/screen/Skip-host-file-system-checks-when-cross-compiling.patch +++ /dev/null @@ -1,135 +0,0 @@ -From d0b20e4cacc60ad62a2150ce07388cb5a25c2040 Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen <jussi.kukkonen@intel.com> -Date: Fri, 7 Aug 2015 11:09:01 +0300 -Subject: [PATCH 3/4] Skip host file system checks when cross-compiling - -Modified from patch by Maarten ter Huurne. - -Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223] - -Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> ---- - configure.ac | 23 +++++++++++++++++++---- - 1 file changed, 19 insertions(+), 4 deletions(-) - -diff --git a/configure.ac b/configure.ac -index ce89f56..dc928ae 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -85,7 +85,7 @@ AC_ARG_ENABLE(socket-dir, - dnl - dnl **** special unix variants **** - dnl --if test -n "$ISC"; then -+if test "$cross_compiling" = no && test -n "$ISC" ; then - AC_DEFINE(ISC) LIBS="$LIBS -linet" - fi - -@@ -96,10 +96,11 @@ dnl AC_DEFINE(OSF1) # this disables MIPS again.... - dnl fi - dnl fi - --if test -f /sysV68 ; then -+if test "$cross_compiling" = no && test -f /sysV68 ; then - AC_DEFINE(sysV68) - fi - -+if test "$cross_compiling" = no ; then - AC_CHECKING(for MIPS) - if test -f /lib/libmld.a || test -f /usr/lib/libmld.a || test -f /usr/lib/cmplrs/cc/libmld.a; then - oldlibs="$LIBS" -@@ -123,6 +124,7 @@ AC_DEFINE(USE_WAIT2) LIBS="$LIBS -lbsd" ; CC="$CC -I/usr/include/bsd" - )) - fi - fi -+fi - - - AC_CHECKING(for Ultrix) -@@ -132,7 +134,7 @@ AC_EGREP_CPP(yes, - #endif - ], ULTRIX=1) - --if test -f /usr/lib/libpyr.a ; then -+if test "$cross_compiling" = no && test -f /usr/lib/libpyr.a ; then - oldlibs="$LIBS" - LIBS="$LIBS -lpyr" - AC_CHECKING(Pyramid OSX) -@@ -679,17 +681,21 @@ AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED)) - dnl - dnl **** PTY specific things **** - dnl -+if test "$cross_compiling" = no ; then - AC_CHECKING(for /dev/ptc) - if test -r /dev/ptc; then - AC_DEFINE(HAVE_DEV_PTC) - fi -+fi - -+if test "$cross_compiling" = no ; then - AC_CHECKING(for SVR4 ptys) - sysvr4ptys= - if test -c /dev/ptmx ; then - AC_TRY_LINK([],[ptsname(0);grantpt(0);unlockpt(0);],[AC_DEFINE(HAVE_SVR4_PTYS) - sysvr4ptys=1]) - fi -+fi - - AC_CHECK_FUNCS(getpt) - -@@ -699,6 +705,7 @@ AC_CHECK_FUNCS(openpty,, - [AC_CHECK_LIB(util,openpty, [AC_DEFINE(HAVE_OPENPTY)] [LIBS="$LIBS -lutil"])]) - fi - -+if test "$cross_compiling" = no ; then - AC_CHECKING(for ptyranges) - if test -d /dev/ptym ; then - pdir='/dev/ptym' -@@ -722,6 +729,7 @@ p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\ - AC_DEFINE_UNQUOTED(PTYRANGE0,"$p0") - AC_DEFINE_UNQUOTED(PTYRANGE1,"$p1") - fi -+fi - - dnl **** pty mode/group handling **** - dnl -@@ -869,14 +877,16 @@ fi - dnl - dnl **** loadav **** - dnl -+if test "$cross_compiling" = no ; then - AC_CHECKING(for libutil(s)) - test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils" - test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil" -+fi - - AC_CHECKING(getloadavg) - AC_TRY_LINK(,[getloadavg((double *)0, 0);], - AC_DEFINE(LOADAV_GETLOADAVG) load=1, --if test -f /usr/lib/libkvm.a ; then -+if test "$cross_compiling" = no && test -f /usr/lib/libkvm.a ; then - olibs="$LIBS" - LIBS="$LIBS -lkvm" - AC_CHECKING(getloadavg with -lkvm) -@@ -1094,13 +1104,18 @@ dnl **** libraries **** - dnl - - AC_CHECKING(for crypt and sec libraries) -+if test "$cross_compiling" = no ; then - test -f /lib/libcrypt_d.a || test -f /usr/lib/libcrypt_d.a && LIBS="$LIBS -lcrypt_d" -+fi - oldlibs="$LIBS" - LIBS="$LIBS -lcrypt" - AC_CHECKING(crypt) - AC_TRY_LINK(,,,LIBS="$oldlibs") -+if test "$cross_compiling" = no ; then - test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec" - test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow" -+fi -+ - oldlibs="$LIBS" - LIBS="$LIBS -lsun" - AC_CHECKING(IRIX sun library) --- -2.1.4 - diff --git a/meta/recipes-extended/screen/screen/fix-parallel-make.patch b/meta/recipes-extended/screen/screen/fix-parallel-make.patch deleted file mode 100644 index e0caf5d83e..0000000000 --- a/meta/recipes-extended/screen/screen/fix-parallel-make.patch +++ /dev/null @@ -1,19 +0,0 @@ -This fixes the parallel make install failure - -Upstream-Status: Pending - -Signed-off-by: Saul Wold <sgw@linux.intel.com> - -Index: screen-4.0.3/Makefile.in -=================================================================== ---- screen-4.0.3.orig/Makefile.in -+++ screen-4.0.3/Makefile.in -@@ -70,7 +70,7 @@ screen: $(OFILES) - .c.o: - $(CC) -c -I. -I$(srcdir) $(M_CFLAGS) $(DEFS) $(OPTIONS) $(CFLAGS) $< - --install_bin: .version screen -+install_bin: .version screen installdirs - -if [ -f $(DESTDIR)$(bindir)/$(SCREEN) ] && [ ! -f $(DESTDIR)$(bindir)/$(SCREEN).old ]; \ - then mv $(DESTDIR)$(bindir)/$(SCREEN) $(DESTDIR)$(bindir)/$(SCREEN).old; fi - $(INSTALL_PROGRAM) screen $(DESTDIR)$(bindir)/$(SCREEN) diff --git a/meta/recipes-extended/screen/screen_4.3.1.bb b/meta/recipes-extended/screen/screen_4.8.0.bb index f95578b510..4772eb6c7a 100644 --- a/meta/recipes-extended/screen/screen_4.3.1.bb +++ b/meta/recipes-extended/screen/screen_4.8.0.bb @@ -9,33 +9,34 @@ SECTION = "console/utils" LICENSE = "GPLv3+" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ - file://screen.h;endline=26;md5=3971142989289a8198a544220703c2bf" + file://screen.h;endline=26;md5=b8dc717c9a3dba842ae6c44ca0f73f52 \ + " -DEPENDS = "ncurses \ +DEPENDS = "ncurses virtual/crypt \ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" RDEPENDS_${PN} = "base-files" SRC_URI = "${GNU_MIRROR}/screen/screen-${PV}.tar.gz \ - file://fix-parallel-make.patch \ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'file://screen.pam', '', d)} \ - file://Remove-redundant-compiler-sanity-checks.patch \ - file://Provide-cross-compile-alternatives-for-AC_TRY_RUN.patch \ - file://Skip-host-file-system-checks-when-cross-compiling.patch \ - file://Avoid-mis-identifying-systems-as-SVR4.patch" + file://0002-comm.h-now-depends-on-term.h.patch \ + file://0001-fix-for-multijob-build.patch \ + file://0001-Remove-more-compatibility-stuff.patch \ + " -SRC_URI[md5sum] = "5bb3b0ff2674e29378c31ad3411170ad" -SRC_URI[sha256sum] = "fa4049f8aee283de62e283d427f2cfd35d6c369b40f7f45f947dbfd915699d63" +SRC_URI[md5sum] = "d276213d3acd10339cd37848b8c4ab1e" +SRC_URI[sha256sum] = "6e11b13d8489925fde25dfb0935bf6ed71f9eb47eff233a181e078fde5655aa1" inherit autotools texinfo PACKAGECONFIG ??= "" PACKAGECONFIG[utempter] = "ac_cv_header_utempter_h=yes,ac_cv_header_utempter_h=no,libutempter," -EXTRA_OECONF = "--with-pty-mode=0620 --with-pty-group=5 \ +EXTRA_OECONF = "--with-pty-mode=0620 --with-pty-group=5 --with-sys-screenrc=${sysconfdir}/screenrc \ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}" do_install_append () { - if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then + install -D -m 644 ${S}/etc/etcscreenrc ${D}/${sysconfdir}/screenrc + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then install -D -m 644 ${WORKDIR}/screen.pam ${D}/${sysconfdir}/pam.d/screen fi } diff --git a/meta/recipes-extended/sed/sed-4.1.2/Makevars b/meta/recipes-extended/sed/sed-4.1.2/Makevars deleted file mode 100644 index 8b09f53b0f..0000000000 --- a/meta/recipes-extended/sed/sed-4.1.2/Makevars +++ /dev/null @@ -1,25 +0,0 @@ -# Makefile variables for PO directory in any package using GNU gettext. - -# Usually the message domain is the same as the package name. -DOMAIN = $(PACKAGE) - -# These two variables depend on the location of this directory. -subdir = po -top_builddir = .. - -# These options get passed to xgettext. -XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ - -# This is the copyright holder that gets inserted into the header of the -# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding -# package. (Note that the msgstr strings, extracted from the package's -# sources, belong to the copyright holder of the package.) Translators are -# expected to transfer the copyright for their translations to this person -# or entity, or to disclaim their copyright. The empty string stands for -# the public domain; in this case the translators are expected to disclaim -# their copyright. -COPYRIGHT_HOLDER = Free Software Foundation, Inc. - -# This is the list of locale categories, beyond LC_MESSAGES, for which the -# message catalogs shall be used. It is usually empty. -EXTRA_LOCALE_CATEGORIES = diff --git a/meta/recipes-extended/sed/sed-4.1.2/fix_return_type.patch b/meta/recipes-extended/sed/sed-4.1.2/fix_return_type.patch deleted file mode 100644 index 836551ea18..0000000000 --- a/meta/recipes-extended/sed/sed-4.1.2/fix_return_type.patch +++ /dev/null @@ -1,18 +0,0 @@ -Upstream-Status: Pending - -Change the getline return type to match its declaration. - -Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> - -diff -urN sed-4.1.2-orig/lib/getline.c sed-4.1.2/lib/getline.c ---- sed-4.1.2-orig/lib/getline.c 2010-08-31 08:47:50.070094024 +0800 -+++ sed-4.1.2/lib/getline.c 2010-08-31 08:48:50.982178172 +0800 -@@ -30,7 +30,7 @@ - necessary. Returns the number of characters read (not including the - null terminator), or -1 on error or EOF. */ - --size_t -+ssize_t - getline (lineptr, n, stream) - char **lineptr; - size_t *n; diff --git a/meta/recipes-extended/sed/sed-4.1.2/sed-4.1.2_fix_for_automake-1.12.patch b/meta/recipes-extended/sed/sed-4.1.2/sed-4.1.2_fix_for_automake-1.12.patch deleted file mode 100644 index 80594068ac..0000000000 --- a/meta/recipes-extended/sed/sed-4.1.2/sed-4.1.2_fix_for_automake-1.12.patch +++ /dev/null @@ -1,37 +0,0 @@ -Upstream-Status: Pending - -automake-1.12.x has deprecated use of @mkdir_p@, fix the issue by using @MKDIR_P@ instead. - -Avoid this build issue: -| make[1]: mkdir_p@: Command not found -| make[1]: *** [install-data-yes] Error 127 - -Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> -2012/07/13 - -Index: sed-4.1.2/intl/Makefile.in -=================================================================== ---- sed-4.1.2.orig/intl/Makefile.in -+++ sed-4.1.2/intl/Makefile.in -@@ -40,7 +40,7 @@ subdir = intl - INSTALL = @INSTALL@ - INSTALL_DATA = @INSTALL_DATA@ - mkinstalldirs = $(mkdir_p) --mkdir_p = @mkdir_p@ -+mkdir_p = @MKDIR_P@ - - l = @INTL_LIBTOOL_SUFFIX_PREFIX@ - -Index: sed-4.1.2/po/Makefile.in.in -=================================================================== ---- sed-4.1.2.orig/po/Makefile.in.in -+++ sed-4.1.2/po/Makefile.in.in -@@ -29,7 +29,7 @@ gettextsrcdir = $(datadir)/gettext/po - INSTALL = /srv/home/nitin/builds2/build0/tmp/sysroots/x86_64-linux/usr/bin/install -c - INSTALL_DATA = ${INSTALL} -m 644 - mkinstalldirs = $(mkdir_p) --mkdir_p = @mkdir_p@ -+mkdir_p = @MKDIR_P@ - - CC = i586-poky-linux-gcc -m32 -march=i586 --sysroot=/srv/home/nitin/builds2/build0/tmp/sysroots/qemux86 - GMSGFMT = /srv/home/nitin/builds2/build0/tmp/sysroots/x86_64-linux/usr/bin/msgfmt diff --git a/meta/recipes-extended/sed/sed-4.2.2/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/sed/sed-4.2.2/0001-Unset-need_charset_alias-when-building-for-musl.patch deleted file mode 100644 index abdfa2a50b..0000000000 --- a/meta/recipes-extended/sed/sed-4.2.2/0001-Unset-need_charset_alias-when-building-for-musl.patch +++ /dev/null @@ -1,33 +0,0 @@ -From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 13 Apr 2015 17:02:13 -0700 -Subject: [PATCH] Unset need_charset_alias when building for musl - -localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 -which actually shoudl be fixed in gnulib and then all downstream -projects will get it eventually. For now we apply the fix to -coreutils - -Upstream-Status: Not Required - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - lib/gnulib.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/gnulib.mk b/lib/gnulib.mk -index e1d74db..c0e92dd 100644 ---- a/lib/gnulib.mk -+++ b/lib/gnulib.mk -@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local - case '$(host_os)' in \ - darwin[56]*) \ - need_charset_alias=true ;; \ -- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ -+ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ - need_charset_alias=false ;; \ - *) \ - need_charset_alias=true ;; \ --- -2.1.4 - diff --git a/meta/recipes-extended/sed/sed-4.2.2/run-ptest b/meta/recipes-extended/sed/sed-4.2.2/run-ptest deleted file mode 100644 index 7c0f62770e..0000000000 --- a/meta/recipes-extended/sed/sed-4.2.2/run-ptest +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -make -C testsuite -k runtest-TESTS diff --git a/meta/recipes-extended/sed/sed-4.2.2/sed-add-ptest.patch b/meta/recipes-extended/sed/sed-4.2.2/sed-add-ptest.patch deleted file mode 100644 index 105e8b745b..0000000000 --- a/meta/recipes-extended/sed/sed-4.2.2/sed-add-ptest.patch +++ /dev/null @@ -1,66 +0,0 @@ -sed: add ptest - -ptest needs buildtest-TESTS and runtest-TESTS targets. -serial-tests is required to generate those targets. - -And fix following error after add serial-tests. - -[snip] -help2man: can't get `--help' info from ../sed/sed -make[2]: *** [sed.1] Error 2 -[snip] - -Upstream-Status: Inappropriate - -Signed-off-by: Chong Lu <Chong.Lu@windriver.com> ---- - configure.ac | 2 +- - doc/Makefile.am | 2 +- - testsuite/Makefile.am | 6 ++++++ - 3 files changed, 8 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 9d33ec9..4f0c532 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -4,7 +4,7 @@ AC_CONFIG_AUX_DIR(build-aux) - AC_CONFIG_SRCDIR([sed/sed.c]) - AM_CONFIG_HEADER(config.h:config_h.in) - AC_PREREQ(2.60) --AM_INIT_AUTOMAKE -+AM_INIT_AUTOMAKE([serial-tests]) - - SED_FEATURE_VERSION=4.2.2 - AC_DEFINE_UNQUOTED(SED_FEATURE_VERSION, "$SED_FEATURE_VERSION", -diff --git a/doc/Makefile.am b/doc/Makefile.am -index af6975c..6fd8c9a 100644 ---- a/doc/Makefile.am -+++ b/doc/Makefile.am -@@ -25,7 +25,7 @@ $(srcdir)/s-texi: sed-in.texi $(srcdir)/groupify.sed - fi - echo stamp > $(srcdir)/s-texi - --sed.1: $(top_srcdir)/sed/sed.c $(top_srcdir)/configure.ac $(srcdir)/sed.x -+_sed.1: $(top_srcdir)/sed/sed.c $(top_srcdir)/configure.ac $(srcdir)/sed.x - $(HELP2MAN) --name "stream editor for filtering and transforming text" \ - -p sed --include $(srcdir)/sed.x -o $(srcdir)/sed.1 $(SED) - -diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am -index d80e72c..b05f01e 100644 ---- a/testsuite/Makefile.am -+++ b/testsuite/Makefile.am -@@ -99,5 +99,11 @@ EXTRA_DIST = \ - # automake makes `check' depend on $(TESTS). Declare - # dummy targets for $(TESTS) so that make does not complain. - -+install-ptest: -+ cd $(BUILDDIR); tar -cf - $(TESTDIR) --exclude *.o | ( cd $(DESTDIR) && tar -xf - ) -+ for i in $(EXTRA_DIST) tst-regex2.c; do install $(srcdir)/$$i $(DESTDIR)/$(TESTDIR); done -+ sed -e 's/^Makefile:/_Makefile:/' -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/bash/sh/' -i $(DESTDIR)/$(TESTDIR)/Makefile -+ for i in `grep -rl "../sed/sed" $(DESTDIR)/$(TESTDIR)`; do sed -e 's/..\/sed\/sed/sed/' -i $$i; done -+ - .PHONY: $(SEDTESTS) - $(SEDTESTS): --- -1.7.9.5 - diff --git a/meta/recipes-extended/sed/sed/run-ptest b/meta/recipes-extended/sed/sed/run-ptest new file mode 100644 index 0000000000..993d7d5d75 --- /dev/null +++ b/meta/recipes-extended/sed/sed/run-ptest @@ -0,0 +1,5 @@ +#!/bin/sh + +chown nobody testsuite +chown nobody ../ptest +su nobody -c "make test-suite.log" diff --git a/meta/recipes-extended/sed/sed_4.1.2.bb b/meta/recipes-extended/sed/sed_4.1.2.bb deleted file mode 100644 index 40e3a53ceb..0000000000 --- a/meta/recipes-extended/sed/sed_4.1.2.bb +++ /dev/null @@ -1,35 +0,0 @@ -SUMMARY = "Stream EDitor (text filtering utility)" -HOMEPAGE = "http://www.gnu.org/software/sed/" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ - file://sed/sed.h;beginline=1;endline=17;md5=e00ffd1837f298439a214fd197f6a407" -SECTION = "console/utils" -PR = "r7" - -SRC_URI = "${GNU_MIRROR}/sed/sed-${PV}.tar.gz \ - file://fix_return_type.patch \ - file://sed-4.1.2_fix_for_automake-1.12.patch \ - file://Makevars" - -SRC_URI[md5sum] = "928f0e06422f414091917401f1a834d0" -SRC_URI[sha256sum] = "638e837ba765d5da0a30c98b57c2953cecea96827882f594612acace93ceeeab" - -inherit autotools texinfo update-alternatives gettext - -do_configure_prepend () { - cp ${WORKDIR}/Makevars ${S}/po/ -} - -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" - diff --git a/meta/recipes-extended/sed/sed_4.2.2.bb b/meta/recipes-extended/sed/sed_4.2.2.bb deleted file mode 100644 index 5aa7d8a079..0000000000 --- a/meta/recipes-extended/sed/sed_4.2.2.bb +++ /dev/null @@ -1,46 +0,0 @@ -SUMMARY = "Stream EDitor (text filtering utility)" -HOMEPAGE = "http://www.gnu.org/software/sed/" -LICENSE = "GPLv3+" -LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \ - file://sed/sed.h;beginline=1;endline=17;md5=767ab3a06d7584f6fd0469abaec4412f" -SECTION = "console/utils" - -SRC_URI = "${GNU_MIRROR}/sed/sed-${PV}.tar.gz \ - file://sed-add-ptest.patch \ - file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ - file://run-ptest \ -" - -SRC_URI[md5sum] = "4111de4faa3b9848a0686b2f260c5056" -SRC_URI[sha256sum] = "fea0a94d4b605894f3e2d5572e3f96e4413bcad3a085aae7367c2cf07908b2ff" - -inherit autotools texinfo update-alternatives gettext ptest -RDEPENDS_${PN}-ptest += "make ${PN}" -RRECOMMENDS_${PN}-ptest_append_libc-glibc = " locale-base-ru-ru" - -EXTRA_OECONF = "--disable-acl \ - ${@bb.utils.contains('PTEST_ENABLED', '1', '--enable-regex-tests', '', d)}" - -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" - -TESTDIR = "testsuite" - -do_compile_ptest() { - oe_runmake -C ${TESTDIR} buildtest-TESTS -} - -do_install_ptest() { - oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR} -} - diff --git a/meta/recipes-extended/sed/sed_4.8.bb b/meta/recipes-extended/sed/sed_4.8.bb new file mode 100644 index 0000000000..39e3a61df5 --- /dev/null +++ b/meta/recipes-extended/sed/sed_4.8.bb @@ -0,0 +1,65 @@ +SUMMARY = "Stream EDitor (text filtering utility)" +HOMEPAGE = "http://www.gnu.org/software/sed/" +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=c678957b0c8e964aa6c70fd77641a71e \ + file://sed/sed.h;beginline=1;endline=15;md5=fb3c7e6fbca6f66943859153d4be8efe \ + " +SECTION = "console/utils" + +SRC_URI = "${GNU_MIRROR}/sed/sed-${PV}.tar.xz \ + file://run-ptest \ +" + +SRC_URI[md5sum] = "6d906edfdb3202304059233f51f9a71d" +SRC_URI[sha256sum] = "f79b0cfea71b37a8eeec8490db6c5f7ae7719c35587f21edb0617f370eeff633" + +inherit autotools texinfo update-alternatives gettext ptest + +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)}" diff --git a/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch b/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch new file mode 100644 index 0000000000..ab317b9aa0 --- /dev/null +++ b/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch @@ -0,0 +1,123 @@ +From fa2d9453656641002802d8165e80adb9e6a729d2 Mon Sep 17 00:00:00 2001 +From: Scott Garman <scott.a.garman@intel.com> +Date: Thu, 14 Apr 2016 12:28:57 +0200 +Subject: [PATCH] Disable use of syslog for sysroot + +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 [disable feature] + +Signed-off-by: Scott Garman <scott.a.garman@intel.com> +Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> + +--- + src/groupadd.c | 3 +++ + src/groupdel.c | 3 +++ + src/groupmems.c | 3 +++ + src/groupmod.c | 3 +++ + src/useradd.c | 3 +++ + src/userdel.c | 3 +++ + src/usermod.c | 3 +++ + 7 files changed, 21 insertions(+) + +diff --git a/src/groupadd.c b/src/groupadd.c +index 2dd8eec..e9c4bb7 100644 +--- a/src/groupadd.c ++++ b/src/groupadd.c +@@ -34,6 +34,9 @@ + + #ident "$Id$" + ++/* Disable use of syslog since we're running this command against a sysroot */ ++#undef USE_SYSLOG ++ + #include <ctype.h> + #include <fcntl.h> + #include <getopt.h> +diff --git a/src/groupdel.c b/src/groupdel.c +index f941a84..5a70056 100644 +--- a/src/groupdel.c ++++ b/src/groupdel.c +@@ -34,6 +34,9 @@ + + #ident "$Id$" + ++/* Disable use of syslog since we're running this command against a sysroot */ ++#undef USE_SYSLOG ++ + #include <ctype.h> + #include <fcntl.h> + #include <grp.h> +diff --git a/src/groupmems.c b/src/groupmems.c +index fc91c8b..2842514 100644 +--- a/src/groupmems.c ++++ b/src/groupmems.c +@@ -32,6 +32,9 @@ + + #include <config.h> + ++/* Disable use of syslog since we're running this command against a sysroot */ ++#undef USE_SYSLOG ++ + #include <fcntl.h> + #include <getopt.h> + #include <grp.h> +diff --git a/src/groupmod.c b/src/groupmod.c +index 1dca5fc..bc14438 100644 +--- a/src/groupmod.c ++++ b/src/groupmod.c +@@ -34,6 +34,9 @@ + + #ident "$Id$" + ++/* Disable use of syslog since we're running this command against a sysroot */ ++#undef USE_SYSLOG ++ + #include <ctype.h> + #include <fcntl.h> + #include <getopt.h> +diff --git a/src/useradd.c b/src/useradd.c +index 4af0f7c..1b7bf06 100644 +--- a/src/useradd.c ++++ b/src/useradd.c +@@ -34,6 +34,9 @@ + + #ident "$Id$" + ++/* Disable use of syslog since we're running this command against a sysroot */ ++#undef USE_SYSLOG ++ + #include <assert.h> + #include <ctype.h> + #include <errno.h> +diff --git a/src/userdel.c b/src/userdel.c +index cc951e5..153e0be 100644 +--- a/src/userdel.c ++++ b/src/userdel.c +@@ -34,6 +34,9 @@ + + #ident "$Id$" + ++/* Disable use of syslog since we're running this command against a sysroot */ ++#undef USE_SYSLOG ++ + #include <assert.h> + #include <errno.h> + #include <fcntl.h> +diff --git a/src/usermod.c b/src/usermod.c +index 05b9871..21c6da9 100644 +--- a/src/usermod.c ++++ b/src/usermod.c +@@ -34,6 +34,9 @@ + + #ident "$Id$" + ++/* Disable use of syslog since we're running this command against a sysroot */ ++#undef USE_SYSLOG ++ + #include <assert.h> + #include <ctype.h> + #include <errno.h> diff --git a/meta/recipes-extended/shadow/files/0001-Do-not-read-login.defs-before-doing-chroot.patch b/meta/recipes-extended/shadow/files/0001-Do-not-read-login.defs-before-doing-chroot.patch deleted file mode 100644 index 828b95a572..0000000000 --- a/meta/recipes-extended/shadow/files/0001-Do-not-read-login.defs-before-doing-chroot.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 170c25c8e0b5c3dc2615d1db94c8d24a13ff99bf Mon Sep 17 00:00:00 2001 -From: Peter Kjellerstedt <pkj@axis.com> -Date: Thu, 11 Sep 2014 15:11:23 +0200 -Subject: [PATCH] Do not read login.defs before doing chroot() - -If "useradd --root <root> ..." was used, the login.defs file would still -be read from /etc/login.defs instead of <root>/etc/login.defs. This was -due to getdef_ulong() being called before process_root_flag(). - -Upstream-Status: Submitted [http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/2014-September/010446.html] - -Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> ---- - src/useradd.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/src/useradd.c b/src/useradd.c -index a8a1f76..e1ebf50 100644 ---- a/src/useradd.c -+++ b/src/useradd.c -@@ -1993,9 +1993,11 @@ int main (int argc, char **argv) - #endif /* USE_PAM */ - #endif /* ACCT_TOOLS_SETUID */ - -+#ifdef ENABLE_SUBIDS - /* Needed for userns check */ -- uid_t uid_min = (uid_t) getdef_ulong ("UID_MIN", 1000UL); -- uid_t uid_max = (uid_t) getdef_ulong ("UID_MAX", 60000UL); -+ uid_t uid_min; -+ uid_t uid_max; -+#endif - - /* - * Get my name so that I can use it to report errors. -@@ -2026,6 +2028,8 @@ int main (int argc, char **argv) - is_shadow_grp = sgr_file_present (); - #endif - #ifdef ENABLE_SUBIDS -+ uid_min = (uid_t) getdef_ulong ("UID_MIN", 1000UL); -+ uid_max = (uid_t) getdef_ulong ("UID_MAX", 60000UL); - is_sub_uid = sub_uid_file_present () && !rflg && - (!user_id || (user_id <= uid_max && user_id >= uid_min)); - is_sub_gid = sub_gid_file_present () && !rflg && --- -1.9.0 - diff --git a/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch b/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch deleted file mode 100644 index 85dde8e1bb..0000000000 --- a/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch +++ /dev/null @@ -1,109 +0,0 @@ -Upstream-Status: Inappropriate [OE specific] - -Subject: useradd.c: create parent directories when necessary - -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - src/useradd.c | 72 +++++++++++++++++++++++++++++++++++++++------------------ - 1 file changed, 49 insertions(+), 23 deletions(-) - -diff --git a/src/useradd.c b/src/useradd.c -index 4bd969d..cb5dd6c 100644 ---- a/src/useradd.c -+++ b/src/useradd.c -@@ -1893,6 +1893,35 @@ static void usr_update (void) - } - - /* -+ * mkdir_p - create directories, including parent directories when needed -+ * -+ * similar to `mkdir -p' -+ */ -+void mkdir_p(const char *path) { -+ int len = strlen(path); -+ char newdir[len + 1]; -+ mode_t mode = 0755; -+ int i = 0; -+ -+ if (path[i] == '\0') { -+ return; -+ } -+ -+ /* skip the leading '/' */ -+ i++; -+ -+ while(path[i] != '\0') { -+ if (path[i] == '/') { -+ strncpy(newdir, path, i); -+ newdir[i] = '\0'; -+ mkdir(newdir, mode); -+ } -+ i++; -+ } -+ mkdir(path, mode); -+} -+ -+/* - * create_home - create the user's home directory - * - * create_home() creates the user's home directory if it does not -@@ -1907,36 +1936,33 @@ static void create_home (void) - fail_exit (E_HOMEDIR); - } - #endif -- /* XXX - create missing parent directories. --marekm */ -- if (mkdir (user_home, 0) != 0) { -- fprintf (stderr, -- _("%s: cannot create directory %s\n"), -- Prog, user_home); --#ifdef WITH_AUDIT -- audit_logger (AUDIT_ADD_USER, Prog, -- "adding home directory", -- user_name, (unsigned int) user_id, -- SHADOW_AUDIT_FAILURE); --#endif -- fail_exit (E_HOMEDIR); -- } -- chown (user_home, user_id, user_gid); -- chmod (user_home, -- 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK)); -- home_added = true; -+ mkdir_p(user_home); -+ } -+ if (access (user_home, F_OK) != 0) { - #ifdef WITH_AUDIT - audit_logger (AUDIT_ADD_USER, Prog, - "adding home directory", - user_name, (unsigned int) user_id, -- SHADOW_AUDIT_SUCCESS); -+ SHADOW_AUDIT_FAILURE); - #endif --#ifdef WITH_SELINUX -- /* Reset SELinux to create files with default contexts */ -- if (reset_selinux_file_context () != 0) { -- fail_exit (E_HOMEDIR); -- } -+ fail_exit (E_HOMEDIR); -+ } -+ chown (user_home, user_id, user_gid); -+ chmod (user_home, -+ 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK)); -+ home_added = true; -+#ifdef WITH_AUDIT -+ audit_logger (AUDIT_ADD_USER, Prog, -+ "adding home directory", -+ user_name, (unsigned int) user_id, -+ SHADOW_AUDIT_SUCCESS); - #endif -+#ifdef WITH_SELINUX -+ /* Reset SELinux to create files with default contexts */ -+ if (reset_selinux_file_context () != 0) { -+ fail_exit (E_HOMEDIR); - } -+#endif - } - - /* --- -1.7.9.5 - diff --git a/meta/recipes-extended/shadow/files/0002-Allow-for-setting-password-in-clear-text.patch b/meta/recipes-extended/shadow/files/0002-Allow-for-setting-password-in-clear-text.patch new file mode 100644 index 0000000000..c6332e4f76 --- /dev/null +++ b/meta/recipes-extended/shadow/files/0002-Allow-for-setting-password-in-clear-text.patch @@ -0,0 +1,301 @@ +From a7d995228491ad5255ad86c1f04ba071f6880897 Mon Sep 17 00:00:00 2001 +From: Chen Qi <Qi.Chen@windriver.com> +Date: Sat, 16 Nov 2013 15:27:47 +0800 +Subject: [PATCH] Allow for setting password in clear text + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> + +--- + src/Makefile.am | 8 ++++---- + src/groupadd.c | 20 +++++++++++++++----- + src/groupmod.c | 20 +++++++++++++++----- + src/useradd.c | 21 +++++++++++++++------ + src/usermod.c | 20 +++++++++++++++----- + 5 files changed, 64 insertions(+), 25 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index f31fd7a..4a317a3 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -103,10 +103,10 @@ chsh_LDADD = $(LDADD) $(LIBPAM) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT_NOPAM) + chpasswd_LDADD = $(LDADD) $(LIBPAM) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT) $(LIBECONF) + expiry_LDADD = $(LDADD) $(LIBECONF) + gpasswd_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT) $(LIBECONF) +-groupadd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF) ++groupadd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF) $(LIBCRYPT) + groupdel_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF) + groupmems_LDADD = $(LDADD) $(LIBPAM) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF) +-groupmod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF) ++groupmod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF) $(LIBCRYPT) + grpck_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF) + grpconv_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF) + grpunconv_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF) +@@ -127,9 +127,9 @@ su_SOURCES = \ + suauth.c + su_LDADD = $(LDADD) $(LIBPAM) $(LIBAUDIT) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD) $(LIBECONF) + sulogin_LDADD = $(LDADD) $(LIBCRYPT) $(LIBECONF) +-useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBECONF) ++useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBECONF) $(LIBCRYPT) + userdel_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBECONF) +-usermod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBECONF) ++usermod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBECONF) $(LIBCRYPT) + vipw_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF) + + install-am: all-am +diff --git a/src/groupadd.c b/src/groupadd.c +index e9c4bb7..d572c00 100644 +--- a/src/groupadd.c ++++ b/src/groupadd.c +@@ -127,9 +127,10 @@ static /*@noreturn@*/void usage (int status) + (void) fputs (_(" -o, --non-unique allow to create groups with duplicate\n" + " (non-unique) GID\n"), usageout); + (void) fputs (_(" -p, --password PASSWORD use this encrypted password for the new group\n"), usageout); ++ (void) fputs (_(" -P, --clear-password PASSWORD use this clear password for the new group\n"), usageout); + (void) fputs (_(" -r, --system create a system account\n"), usageout); + (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout); +- (void) fputs (_(" -P, --prefix PREFIX_DIR directory prefix\n"), usageout); ++ (void) fputs (_(" -A, --prefix PREFIX_DIR directory prefix\n"), usageout); + (void) fputs ("\n", usageout); + exit (status); + } +@@ -391,13 +392,14 @@ static void process_flags (int argc, char **argv) + {"key", required_argument, NULL, 'K'}, + {"non-unique", no_argument, NULL, 'o'}, + {"password", required_argument, NULL, 'p'}, ++ {"clear-password", required_argument, NULL, 'P'}, + {"system", no_argument, NULL, 'r'}, + {"root", required_argument, NULL, 'R'}, +- {"prefix", required_argument, NULL, 'P'}, ++ {"prefix", required_argument, NULL, 'A'}, + {NULL, 0, NULL, '\0'} + }; + +- while ((c = getopt_long (argc, argv, "fg:hK:op:rR:P:", ++ while ((c = getopt_long (argc, argv, "fg:hK:op:P:rR:A:", + long_options, NULL)) != -1) { + switch (c) { + case 'f': +@@ -449,12 +451,20 @@ static void process_flags (int argc, char **argv) + pflg = true; + group_passwd = optarg; + break; ++ case 'P': ++ pflg = true; ++ group_passwd = pw_encrypt (optarg, crypt_make_salt (NULL, NULL)); ++ break; + case 'r': + rflg = true; + break; + case 'R': /* no-op, handled in process_root_flag () */ + break; +- case 'P': /* no-op, handled in process_prefix_flag () */ ++ case 'A': /* no-op, handled in process_prefix_flag () */ ++ fprintf (stderr, ++ _("%s: -A is deliberately not supported \n"), ++ Prog); ++ exit (E_BAD_ARG); + break; + default: + usage (E_USAGE); +@@ -588,7 +598,7 @@ int main (int argc, char **argv) + (void) textdomain (PACKAGE); + + process_root_flag ("-R", argc, argv); +- prefix = process_prefix_flag ("-P", argc, argv); ++ prefix = process_prefix_flag ("-A", argc, argv); + + OPENLOG ("groupadd"); + #ifdef WITH_AUDIT +diff --git a/src/groupmod.c b/src/groupmod.c +index bc14438..25ccb44 100644 +--- a/src/groupmod.c ++++ b/src/groupmod.c +@@ -138,8 +138,9 @@ static void usage (int status) + (void) fputs (_(" -o, --non-unique allow to use a duplicate (non-unique) GID\n"), usageout); + (void) fputs (_(" -p, --password PASSWORD change the password to this (encrypted)\n" + " PASSWORD\n"), usageout); ++ (void) fputs (_(" -P, --clear-password PASSWORD change the password to this clear PASSWORD\n"), usageout); + (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout); +- (void) fputs (_(" -P, --prefix PREFIX_DIR prefix directory where are located the /etc/* files\n"), usageout); ++ (void) fputs (_(" -A, --prefix PREFIX_DIR prefix directory where are located the /etc/* files\n"), usageout); + (void) fputs ("\n", usageout); + exit (status); + } +@@ -387,11 +388,12 @@ static void process_flags (int argc, char **argv) + {"new-name", required_argument, NULL, 'n'}, + {"non-unique", no_argument, NULL, 'o'}, + {"password", required_argument, NULL, 'p'}, ++ {"clear-password", required_argument, NULL, 'P'}, + {"root", required_argument, NULL, 'R'}, +- {"prefix", required_argument, NULL, 'P'}, ++ {"prefix", required_argument, NULL, 'A'}, + {NULL, 0, NULL, '\0'} + }; +- while ((c = getopt_long (argc, argv, "g:hn:op:R:P:", ++ while ((c = getopt_long (argc, argv, "g:hn:op:P:R:A:", + long_options, NULL)) != -1) { + switch (c) { + case 'g': +@@ -418,9 +420,17 @@ static void process_flags (int argc, char **argv) + group_passwd = optarg; + pflg = true; + break; ++ case 'P': ++ group_passwd = pw_encrypt (optarg, crypt_make_salt (NULL, NULL)); ++ pflg = true; ++ break; + case 'R': /* no-op, handled in process_root_flag () */ + break; +- case 'P': /* no-op, handled in process_prefix_flag () */ ++ case 'A': /* no-op, handled in process_prefix_flag () */ ++ fprintf (stderr, ++ _("%s: -A is deliberately not supported \n"), ++ Prog); ++ exit (E_BAD_ARG); + break; + default: + usage (E_USAGE); +@@ -761,7 +771,7 @@ int main (int argc, char **argv) + (void) textdomain (PACKAGE); + + process_root_flag ("-R", argc, argv); +- prefix = process_prefix_flag ("-P", argc, argv); ++ prefix = process_prefix_flag ("-A", argc, argv); + + OPENLOG ("groupmod"); + #ifdef WITH_AUDIT +diff --git a/src/useradd.c b/src/useradd.c +index 1b7bf06..44f09e2 100644 +--- a/src/useradd.c ++++ b/src/useradd.c +@@ -853,9 +853,10 @@ static void usage (int status) + (void) fputs (_(" -o, --non-unique allow to create users with duplicate\n" + " (non-unique) UID\n"), usageout); + (void) fputs (_(" -p, --password PASSWORD encrypted password of the new account\n"), usageout); ++ (void) fputs (_(" -P, --clear-password PASSWORD clear password of the new account\n"), usageout); + (void) fputs (_(" -r, --system create a system account\n"), usageout); + (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout); +- (void) fputs (_(" -P, --prefix PREFIX_DIR prefix directory where are located the /etc/* files\n"), usageout); ++ (void) fputs (_(" -A, --prefix PREFIX_DIR prefix directory where are located the /etc/* files\n"), usageout); + (void) fputs (_(" -s, --shell SHELL login shell of the new account\n"), usageout); + (void) fputs (_(" -u, --uid UID user ID of the new account\n"), usageout); + (void) fputs (_(" -U, --user-group create a group with the same name as the user\n"), usageout); +@@ -1133,9 +1134,10 @@ static void process_flags (int argc, char **argv) + {"no-user-group", no_argument, NULL, 'N'}, + {"non-unique", no_argument, NULL, 'o'}, + {"password", required_argument, NULL, 'p'}, ++ {"clear-password", required_argument, NULL, 'P'}, + {"system", no_argument, NULL, 'r'}, + {"root", required_argument, NULL, 'R'}, +- {"prefix", required_argument, NULL, 'P'}, ++ {"prefix", required_argument, NULL, 'A'}, + {"shell", required_argument, NULL, 's'}, + {"uid", required_argument, NULL, 'u'}, + {"user-group", no_argument, NULL, 'U'}, +@@ -1146,9 +1148,9 @@ static void process_flags (int argc, char **argv) + }; + while ((c = getopt_long (argc, argv, + #ifdef WITH_SELINUX +- "b:c:d:De:f:g:G:hk:K:lmMNop:rR:P:s:u:UZ:", ++ "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:A:s:u:UZ:", + #else /* !WITH_SELINUX */ +- "b:c:d:De:f:g:G:hk:K:lmMNop:rR:P:s:u:U", ++ "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:A:s:u:U", + #endif /* !WITH_SELINUX */ + long_options, NULL)) != -1) { + switch (c) { +@@ -1320,12 +1322,19 @@ static void process_flags (int argc, char **argv) + } + user_pass = optarg; + break; ++ case 'P': /* set clear text password */ ++ user_pass = pw_encrypt (optarg, crypt_make_salt (NULL, NULL)); ++ break; + case 'r': + rflg = true; + break; + case 'R': /* no-op, handled in process_root_flag () */ + break; +- case 'P': /* no-op, handled in process_prefix_flag () */ ++ case 'A': /* no-op, handled in process_prefix_flag () */ ++ fprintf (stderr, ++ _("%s: -A is deliberately not supported \n"), ++ Prog); ++ exit (E_BAD_ARG); + break; + case 's': + if ( ( !VALID (optarg) ) +@@ -2257,7 +2266,7 @@ int main (int argc, char **argv) + + process_root_flag ("-R", argc, argv); + +- prefix = process_prefix_flag("-P", argc, argv); ++ prefix = process_prefix_flag("-A", argc, argv); + + OPENLOG ("useradd"); + #ifdef WITH_AUDIT +diff --git a/src/usermod.c b/src/usermod.c +index 21c6da9..cffdb3e 100644 +--- a/src/usermod.c ++++ b/src/usermod.c +@@ -431,8 +431,9 @@ static /*@noreturn@*/void usage (int status) + " new location (use only with -d)\n"), usageout); + (void) fputs (_(" -o, --non-unique allow using duplicate (non-unique) UID\n"), usageout); + (void) fputs (_(" -p, --password PASSWORD use encrypted password for the new password\n"), usageout); ++ (void) fputs (_(" -P, --clear-password PASSWORD use clear password for the new password\n"), usageout); + (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout); +- (void) fputs (_(" -P, --prefix PREFIX_DIR prefix directory where are located the /etc/* files\n"), usageout); ++ (void) fputs (_(" -A, --prefix PREFIX_DIR prefix directory where are located the /etc/* files\n"), usageout); + (void) fputs (_(" -s, --shell SHELL new login shell for the user account\n"), usageout); + (void) fputs (_(" -u, --uid UID new UID for the user account\n"), usageout); + (void) fputs (_(" -U, --unlock unlock the user account\n"), usageout); +@@ -1010,8 +1011,9 @@ static void process_flags (int argc, char **argv) + {"move-home", no_argument, NULL, 'm'}, + {"non-unique", no_argument, NULL, 'o'}, + {"password", required_argument, NULL, 'p'}, ++ {"clear-password", required_argument, NULL, 'P'}, + {"root", required_argument, NULL, 'R'}, +- {"prefix", required_argument, NULL, 'P'}, ++ {"prefix", required_argument, NULL, 'A'}, + {"shell", required_argument, NULL, 's'}, + {"uid", required_argument, NULL, 'u'}, + {"unlock", no_argument, NULL, 'U'}, +@@ -1027,7 +1029,7 @@ static void process_flags (int argc, char **argv) + {NULL, 0, NULL, '\0'} + }; + while ((c = getopt_long (argc, argv, +- "abc:d:e:f:g:G:hl:Lmop:R:s:u:UP:" ++ "abc:d:e:f:g:G:hl:Lmop:P:R:s:u:UA:" + #ifdef ENABLE_SUBIDS + "v:w:V:W:" + #endif /* ENABLE_SUBIDS */ +@@ -1130,9 +1132,17 @@ static void process_flags (int argc, char **argv) + user_pass = optarg; + pflg = true; + break; ++ case 'P': ++ user_pass = pw_encrypt (optarg, crypt_make_salt (NULL, NULL)); ++ pflg = true; ++ break; + case 'R': /* no-op, handled in process_root_flag () */ + break; +- case 'P': /* no-op, handled in process_prefix_flag () */ ++ case 'A': /* no-op, handled in process_prefix_flag () */ ++ fprintf (stderr, ++ _("%s: -A is deliberately not supported \n"), ++ Prog); ++ exit (E_BAD_ARG); + break; + case 's': + if (!VALID (optarg)) { +@@ -2127,7 +2137,7 @@ int main (int argc, char **argv) + (void) textdomain (PACKAGE); + + process_root_flag ("-R", argc, argv); +- prefix = process_prefix_flag ("-P", argc, argv); ++ prefix = process_prefix_flag ("-A", argc, argv); + + OPENLOG ("usermod"); + #ifdef WITH_AUDIT diff --git a/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch b/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch deleted file mode 100644 index 68da25f406..0000000000 --- a/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch +++ /dev/null @@ -1,201 +0,0 @@ -Upstream-Status: Inappropriate [OE specific] - -Allow for setting password in clear text. - -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - src/Makefile.am | 8 ++++---- - src/groupadd.c | 8 +++++++- - src/groupmod.c | 8 +++++++- - src/useradd.c | 9 +++++++-- - src/usermod.c | 8 +++++++- - 5 files changed, 32 insertions(+), 9 deletions(-) - -diff --git a/src/Makefile.am b/src/Makefile.am -index 25e288d..856b087 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -88,10 +88,10 @@ chgpasswd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBSELINUX) $(LIBCRYPT) - chsh_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD) - chpasswd_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT) - gpasswd_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT) --groupadd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) -+groupadd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT) - groupdel_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) - groupmems_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) --groupmod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) -+groupmod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT) - grpck_LDADD = $(LDADD) $(LIBSELINUX) - grpconv_LDADD = $(LDADD) $(LIBSELINUX) - grpunconv_LDADD = $(LDADD) $(LIBSELINUX) -@@ -111,9 +111,9 @@ su_SOURCES = \ - suauth.c - su_LDADD = $(LDADD) $(LIBPAM) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD) - sulogin_LDADD = $(LDADD) $(LIBCRYPT) --useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) -+useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBCRYPT) - userdel_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) --usermod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) -+usermod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBCRYPT) - vipw_LDADD = $(LDADD) $(LIBSELINUX) - - install-am: all-am -diff --git a/src/groupadd.c b/src/groupadd.c -index f716f57..4e28c26 100644 ---- a/src/groupadd.c -+++ b/src/groupadd.c -@@ -124,6 +124,7 @@ static /*@noreturn@*/void usage (int status) - (void) fputs (_(" -o, --non-unique allow to create groups with duplicate\n" - " (non-unique) GID\n"), usageout); - (void) fputs (_(" -p, --password PASSWORD use this encrypted password for the new group\n"), usageout); -+ (void) fputs (_(" -P, --clear-password PASSWORD use this clear password for the new group\n"), usageout); - (void) fputs (_(" -r, --system create a system account\n"), usageout); - (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout); - (void) fputs ("\n", usageout); -@@ -387,12 +388,13 @@ static void process_flags (int argc, char **argv) - {"key", required_argument, NULL, 'K'}, - {"non-unique", no_argument, NULL, 'o'}, - {"password", required_argument, NULL, 'p'}, -+ {"clear-password", required_argument, NULL, 'P'}, - {"system", no_argument, NULL, 'r'}, - {"root", required_argument, NULL, 'R'}, - {NULL, 0, NULL, '\0'} - }; - -- while ((c = getopt_long (argc, argv, "fg:hK:op:rR:", -+ while ((c = getopt_long (argc, argv, "fg:hK:op:P:rR:", - long_options, NULL)) != -1) { - switch (c) { - case 'f': -@@ -444,6 +446,10 @@ static void process_flags (int argc, char **argv) - pflg = true; - group_passwd = optarg; - break; -+ case 'P': -+ pflg = true; -+ group_passwd = pw_encrypt (optarg, crypt_make_salt (NULL, NULL)); -+ break; - case 'r': - rflg = true; - break; -diff --git a/src/groupmod.c b/src/groupmod.c -index d9d3807..68f49d1 100644 ---- a/src/groupmod.c -+++ b/src/groupmod.c -@@ -127,6 +127,7 @@ static void usage (int status) - (void) fputs (_(" -o, --non-unique allow to use a duplicate (non-unique) GID\n"), usageout); - (void) fputs (_(" -p, --password PASSWORD change the password to this (encrypted)\n" - " PASSWORD\n"), usageout); -+ (void) fputs (_(" -P, --clear-password PASSWORD change the password to this clear PASSWORD\n"), usageout); - (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout); - (void) fputs ("\n", usageout); - exit (status); -@@ -375,10 +376,11 @@ static void process_flags (int argc, char **argv) - {"new-name", required_argument, NULL, 'n'}, - {"non-unique", no_argument, NULL, 'o'}, - {"password", required_argument, NULL, 'p'}, -+ {"clear-password", required_argument, NULL, 'P'}, - {"root", required_argument, NULL, 'R'}, - {NULL, 0, NULL, '\0'} - }; -- while ((c = getopt_long (argc, argv, "g:hn:op:R:", -+ while ((c = getopt_long (argc, argv, "g:hn:op:P:R:", - long_options, NULL)) != -1) { - switch (c) { - case 'g': -@@ -405,6 +407,10 @@ static void process_flags (int argc, char **argv) - group_passwd = optarg; - pflg = true; - break; -+ case 'P': -+ group_passwd = pw_encrypt (optarg, crypt_make_salt (NULL, NULL)); -+ pflg = true; -+ break; - case 'R': /* no-op, handled in process_root_flag () */ - break; - default: -diff --git a/src/useradd.c b/src/useradd.c -index b3bd451..4416f90 100644 ---- a/src/useradd.c -+++ b/src/useradd.c -@@ -773,6 +773,7 @@ static void usage (int status) - (void) fputs (_(" -o, --non-unique allow to create users with duplicate\n" - " (non-unique) UID\n"), usageout); - (void) fputs (_(" -p, --password PASSWORD encrypted password of the new account\n"), usageout); -+ (void) fputs (_(" -P, --clear-password PASSWORD clear password of the new account\n"), usageout); - (void) fputs (_(" -r, --system create a system account\n"), usageout); - (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout); - (void) fputs (_(" -s, --shell SHELL login shell of the new account\n"), usageout); -@@ -1047,6 +1048,7 @@ static void process_flags (int argc, char **argv) - {"no-user-group", no_argument, NULL, 'N'}, - {"non-unique", no_argument, NULL, 'o'}, - {"password", required_argument, NULL, 'p'}, -+ {"clear-password", required_argument, NULL, 'P'}, - {"system", no_argument, NULL, 'r'}, - {"root", required_argument, NULL, 'R'}, - {"shell", required_argument, NULL, 's'}, -@@ -1059,9 +1061,9 @@ static void process_flags (int argc, char **argv) - }; - while ((c = getopt_long (argc, argv, - #ifdef WITH_SELINUX -- "b:c:d:De:f:g:G:hk:K:lmMNop:rR:s:u:UZ:", -+ "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:s:u:UZ:", - #else /* !WITH_SELINUX */ -- "b:c:d:De:f:g:G:hk:K:lmMNop:rR:s:u:U", -+ "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:s:u:U", - #endif /* !WITH_SELINUX */ - long_options, NULL)) != -1) { - switch (c) { -@@ -1227,6 +1229,9 @@ static void process_flags (int argc, char **argv) - } - user_pass = optarg; - break; -+ case 'P': /* set clear text password */ -+ user_pass = pw_encrypt (optarg, crypt_make_salt (NULL, NULL)); -+ break; - case 'r': - rflg = true; - break; -diff --git a/src/usermod.c b/src/usermod.c -index e7d4351..b79f7a3 100644 ---- a/src/usermod.c -+++ b/src/usermod.c -@@ -419,6 +419,7 @@ static /*@noreturn@*/void usage (int status) - " new location (use only with -d)\n"), usageout); - (void) fputs (_(" -o, --non-unique allow using duplicate (non-unique) UID\n"), usageout); - (void) fputs (_(" -p, --password PASSWORD use encrypted password for the new password\n"), usageout); -+ (void) fputs (_(" -P, --clear-password PASSWORD use clear password for the new password\n"), usageout); - (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout); - (void) fputs (_(" -s, --shell SHELL new login shell for the user account\n"), usageout); - (void) fputs (_(" -u, --uid UID new UID for the user account\n"), usageout); -@@ -996,6 +997,7 @@ static void process_flags (int argc, char **argv) - {"move-home", no_argument, NULL, 'm'}, - {"non-unique", no_argument, NULL, 'o'}, - {"password", required_argument, NULL, 'p'}, -+ {"clear-password", required_argument, NULL, 'P'}, - {"root", required_argument, NULL, 'R'}, - {"shell", required_argument, NULL, 's'}, - {"uid", required_argument, NULL, 'u'}, -@@ -1012,7 +1014,7 @@ static void process_flags (int argc, char **argv) - {NULL, 0, NULL, '\0'} - }; - while ((c = getopt_long (argc, argv, -- "ac:d:e:f:g:G:hl:Lmop:R:s:u:U" -+ "ac:d:e:f:g:G:hl:Lmop:P:R:s:u:U" - #ifdef ENABLE_SUBIDS - "v:w:V:W:" - #endif /* ENABLE_SUBIDS */ -@@ -1112,6 +1114,10 @@ static void process_flags (int argc, char **argv) - user_pass = optarg; - pflg = true; - break; -+ case 'P': -+ user_pass = pw_encrypt (optarg, crypt_make_salt (NULL, NULL)); -+ pflg = true; -+ break; - case 'R': /* no-op, handled in process_root_flag () */ - break; - case 's': --- -1.7.9.5 - diff --git a/meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch b/meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch deleted file mode 100644 index 185590cabd..0000000000 --- a/meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 2cb54158b80cdbd97ca3b36df83f9255e923ae3f Mon Sep 17 00:00:00 2001 -From: James Le Cuirot <chewi@aura-online.co.uk> -Date: Sat, 23 Aug 2014 09:46:39 +0100 -Subject: [PATCH] Check size of uid_t and gid_t using AC_CHECK_SIZEOF - -This built-in check is simpler than the previous method and, most -importantly, works when cross-compiling. - -Upstream-Status: Accepted -[https://github.com/shadow-maint/shadow/commit/2cb54158b80cdbd97ca3b36df83f9255e923ae3f] - -Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> ---- - configure.in | 14 ++++---------- - 1 file changed, 4 insertions(+), 10 deletions(-) - -diff --git a/configure.in b/configure.in -index 1a3f841..4a4d6d0 100644 ---- a/configure.in -+++ b/configure.in -@@ -335,16 +335,10 @@ if test "$enable_subids" != "no"; then - dnl - dnl FIXME: check if 32 bit UIDs/GIDs are supported by libc - dnl -- AC_RUN_IFELSE([AC_LANG_SOURCE([ --#include <sys/types.h> --int main(void) { -- uid_t u; -- gid_t g; -- return (sizeof u < 4) || (sizeof g < 4); --} -- ])], [id32bit="yes"], [id32bit="no"]) -- -- if test "x$id32bit" = "xyes"; then -+ AC_CHECK_SIZEOF([uid_t],, [#include "sys/types.h"]) -+ AC_CHECK_SIZEOF([gid_t],, [#include "sys/types.h"]) -+ -+ if test "$ac_cv_sizeof_uid_t" -ge 4 && test "$ac_cv_sizeof_gid_t" -ge 4; then - AC_DEFINE(ENABLE_SUBIDS, 1, [Define to support the subordinate IDs.]) - enable_subids="yes" - else diff --git a/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch b/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch index 4fa3d184ed..9825216369 100644 --- a/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch +++ b/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch @@ -1,3 +1,8 @@ +From 66533c7c6f347d257020675a1ed6e0c59cbbc3f0 Mon Sep 17 00:00:00 2001 +From: Chen Qi <Qi.Chen@windriver.com> +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 @@ -10,15 +15,16 @@ Note that this patch doesn't change the logic in the code, it just expands the codes. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> + --- - lib/commonio.c | 16 ++++++++++++---- + lib/commonio.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/commonio.c b/lib/commonio.c -index cc536bf..51cafd9 100644 +index 16fa7e7..d6bc297 100644 --- a/lib/commonio.c +++ b/lib/commonio.c -@@ -613,10 +613,18 @@ int commonio_open (struct commonio_db *db, int mode) +@@ -632,10 +632,18 @@ int commonio_open (struct commonio_db *db, int mode) db->cursor = NULL; db->changed = false; @@ -41,6 +47,3 @@ index cc536bf..51cafd9 100644 db->fp = NULL; if (fd >= 0) { #ifdef WITH_TCB --- -1.7.9.5 - diff --git a/meta/recipes-extended/shadow/files/disable-syslog.patch b/meta/recipes-extended/shadow/files/disable-syslog.patch deleted file mode 100644 index 1943fd6faf..0000000000 --- a/meta/recipes-extended/shadow/files/disable-syslog.patch +++ /dev/null @@ -1,34 +0,0 @@ -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 [disable feature] - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - -diff -urN shadow-4.1.4.3.orig//src/groupadd.c shadow-4.1.4.3/src/groupadd.c ---- shadow-4.1.4.3.orig//src/groupadd.c 2011-02-13 09:58:16.000000000 -0800 -+++ shadow-4.1.4.3/src/groupadd.c 2012-04-05 10:05:59.440001758 -0700 -@@ -34,6 +34,9 @@ - - #ident "$Id: groupadd.c 3015 2009-06-05 22:16:56Z nekral-guest $" - -+/* Disable use of syslog since we're running this command against a sysroot */ -+#undef USE_SYSLOG -+ - #include <ctype.h> - #include <fcntl.h> - #include <getopt.h> -diff -urN shadow-4.1.4.3.orig//src/useradd.c shadow-4.1.4.3/src/useradd.c ---- shadow-4.1.4.3.orig//src/useradd.c 2011-02-13 09:58:16.000000000 -0800 -+++ shadow-4.1.4.3/src/useradd.c 2012-04-05 10:06:25.076001315 -0700 -@@ -34,6 +34,9 @@ - - #ident "$Id: useradd.c 3015 2009-06-05 22:16:56Z nekral-guest $" - -+/* Disable use of syslog since we're running this command against a sysroot */ -+#undef USE_SYSLOG -+ - #include <assert.h> - #include <ctype.h> - #include <errno.h> diff --git a/meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch b/meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch deleted file mode 100644 index 02cb91aafd..0000000000 --- a/meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch +++ /dev/null @@ -1,28 +0,0 @@ -Upstream-Status: Pending - -Subject: fix installation failure with subids disabled - -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - src/Makefile.am | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/Makefile.am b/src/Makefile.am -index 25e288d..076f8ef 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -52,7 +52,10 @@ usbin_PROGRAMS = \ - noinst_PROGRAMS = id sulogin - - suidbins = su --suidubins = chage chfn chsh expiry gpasswd newgrp passwd newuidmap newgidmap -+suidubins = chage chfn chsh expiry gpasswd newgrp passwd -+if ENABLE_SUBIDS -+suidubins += newgidmap newuidmap -+endif - if ACCT_TOOLS_SETUID - suidubins += chage chgpasswd chpasswd groupadd groupdel groupmod newusers useradd userdel usermod - endif --- -1.7.9.5 - diff --git a/meta/recipes-extended/shadow/files/pam.d/chpasswd b/meta/recipes-extended/shadow/files/pam.d/chpasswd index 9e3efa68ba..b769d92ba4 100644 --- a/meta/recipes-extended/shadow/files/pam.d/chpasswd +++ b/meta/recipes-extended/shadow/files/pam.d/chpasswd @@ -1,4 +1,6 @@ # The PAM configuration file for the Shadow 'chpasswd' service # +auth sufficient pam_rootok.so +account required pam_permit.so password include common-password diff --git a/meta/recipes-extended/shadow/files/pam.d/newusers b/meta/recipes-extended/shadow/files/pam.d/newusers index 4aa3dde48b..4c59dfa478 100644 --- a/meta/recipes-extended/shadow/files/pam.d/newusers +++ b/meta/recipes-extended/shadow/files/pam.d/newusers @@ -1,4 +1,6 @@ # The PAM configuration file for the Shadow 'newusers' service # +auth sufficient pam_rootok.so +account required pam_permit.so password include common-password diff --git a/meta/recipes-extended/shadow/files/shadow-relaxed-usernames.patch b/meta/recipes-extended/shadow/files/shadow-relaxed-usernames.patch new file mode 100644 index 0000000000..cc833362e9 --- /dev/null +++ b/meta/recipes-extended/shadow/files/shadow-relaxed-usernames.patch @@ -0,0 +1,111 @@ +From ca472d6866e545aaa70a70020e3226f236a8aafc Mon Sep 17 00:00:00 2001 +From: Shan Hai <shan.hai@windriver.com> +Date: Tue, 13 Sep 2016 13:45:46 +0800 +Subject: [PATCH] shadow: use relaxed usernames + +The groupadd from shadow does not allow upper case group names, the +same is true for the upstream shadow. But distributions like +Debian/Ubuntu/CentOS has their own way to cope with this problem, +this patch is picked up from CentOS release 7.0 to relax the usernames +restrictions to allow the upper case group names, and the relaxation is +POSIX compliant because POSIX indicate that usernames are composed of +characters from the portable filename character set [A-Za-z0-9._-]. + +Upstream-Status: Pending + +Signed-off-by: Shan Hai <shan.hai@windriver.com> + +--- + libmisc/chkname.c | 30 ++++++++++++++++++------------ + man/groupadd.8.xml | 6 ------ + man/useradd.8.xml | 8 +------- + 3 files changed, 19 insertions(+), 25 deletions(-) + +diff --git a/libmisc/chkname.c b/libmisc/chkname.c +index 90f185c..65762b4 100644 +--- a/libmisc/chkname.c ++++ b/libmisc/chkname.c +@@ -55,22 +55,28 @@ static bool is_valid_name (const char *name) + } + + /* +- * User/group names must match [a-z_][a-z0-9_-]*[$] +- */ +- +- if (('\0' == *name) || +- !((('a' <= *name) && ('z' >= *name)) || ('_' == *name))) { ++ * User/group names must match gnu e-regex: ++ * [a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,30}[a-zA-Z0-9_.$-]? ++ * ++ * as a non-POSIX, extension, allow "$" as the last char for ++ * sake of Samba 3.x "add machine script" ++ */ ++ if ( ('\0' == *name) || ++ !((*name >= 'a' && *name <= 'z') || ++ (*name >= 'A' && *name <= 'Z') || ++ (*name >= '0' && *name <= '9') || ++ (*name == '_') || (*name == '.') ++ )) { + return false; + } + + while ('\0' != *++name) { +- if (!(( ('a' <= *name) && ('z' >= *name) ) || +- ( ('0' <= *name) && ('9' >= *name) ) || +- ('_' == *name) || +- ('-' == *name) || +- ('.' == *name) || +- ( ('$' == *name) && ('\0' == *(name + 1)) ) +- )) { ++ if (!( (*name >= 'a' && *name <= 'z') || ++ (*name >= 'A' && *name <= 'Z') || ++ (*name >= '0' && *name <= '9') || ++ (*name == '_') || (*name == '.') || (*name == '-') || ++ (*name == '$' && *(name + 1) == '\0') ++ )) { + return false; + } + } +diff --git a/man/groupadd.8.xml b/man/groupadd.8.xml +index 1e58f09..d804b61 100644 +--- a/man/groupadd.8.xml ++++ b/man/groupadd.8.xml +@@ -272,12 +272,6 @@ + + <refsect1 id='caveats'> + <title>CAVEATS</title> +- <para> +- Groupnames must start with a lower case letter or an underscore, +- followed by lower case letters, digits, underscores, or dashes. +- They can end with a dollar sign. +- In regular expression terms: [a-z_][a-z0-9_-]*[$]? +- </para> + <para> + Groupnames may only be up to &GROUP_NAME_MAX_LENGTH; characters long. + </para> +diff --git a/man/useradd.8.xml b/man/useradd.8.xml +index a16d730..c0bd777 100644 +--- a/man/useradd.8.xml ++++ b/man/useradd.8.xml +@@ -366,7 +366,7 @@ + </term> + <listitem> + <para> +- Do no create the user's home directory, even if the system ++ Do not create the user's home directory, even if the system + wide setting from <filename>/etc/login.defs</filename> + (<option>CREATE_HOME</option>) is set to + <replaceable>yes</replaceable>. +@@ -660,12 +660,6 @@ + the user account creation request. + </para> + +- <para> +- Usernames must start with a lower case letter or an underscore, +- followed by lower case letters, digits, underscores, or dashes. +- They can end with a dollar sign. +- In regular expression terms: [a-z_][a-z0-9_-]*[$]? +- </para> + <para> + Usernames may only be up to 32 characters long. + </para> diff --git a/meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch b/meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch deleted file mode 100644 index 37dc153fca..0000000000 --- a/meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch +++ /dev/null @@ -1,33 +0,0 @@ -Upstream-Status: Pending - -usermod: fix compilation failure with subids disabled - -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - src/usermod.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/usermod.c b/src/usermod.c -index e7d4351..685b50a 100644 ---- a/src/usermod.c -+++ b/src/usermod.c -@@ -1360,7 +1360,7 @@ static void process_flags (int argc, char **argv) - Prog, (unsigned long) user_newid); - exit (E_UID_IN_USE); - } -- -+#ifdef ENABLE_SUBIDS - if ( (vflg || Vflg) - && !is_sub_uid) { - fprintf (stderr, -@@ -1376,6 +1376,7 @@ static void process_flags (int argc, char **argv) - Prog, sub_gid_dbname (), "-w", "-W"); - exit (E_USAGE); - } -+#endif - } - - /* --- -1.7.9.5 - diff --git a/meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb b/meta/recipes-extended/shadow/shadow-securetty_4.6.bb index c78f888cf4..c78f888cf4 100644 --- a/meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb +++ b/meta/recipes-extended/shadow/shadow-securetty_4.6.bb diff --git a/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb b/meta/recipes-extended/shadow/shadow-sysroot_4.6.bb index 697569c47e..1f6232e43c 100644 --- a/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb +++ b/meta/recipes-extended/shadow/shadow-sysroot_4.6.bb @@ -1,6 +1,6 @@ SUMMARY = "Shadow utils requirements for useradd.bbclass" -HOMEPAGE = "http://pkg-shadow.alioth.debian.org" -BUGTRACKER = "https://alioth.debian.org/tracker/?group_id=30580" +HOMEPAGE = "http://github.com/shadow-maint/shadow" +BUGTRACKER = "http://github.com/shadow-maint/shadow/issues" SECTION = "base utils" LICENSE = "BSD | Artistic-1.0" LIC_FILES_CHKSUM = "file://login.defs_shadow-sysroot;md5=25e2f2de4dfc8f966ac5cdfce45cd7d5" @@ -14,21 +14,18 @@ PR = "r3" # 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 755 ${S}/login.defs_shadow-sysroot ${D}${sysconfdir}/login.defs + install -p -m 644 ${S}/login.defs_shadow-sysroot ${D}${sysconfdir}/login.defs } -sysroot_stage_all() { - sysroot_stage_dir ${D} ${SYSROOT_DESTDIR} -} +SYSROOT_DIRS += "${sysconfdir}" # don't create any packages -# otherwise: dbus-dev depends on shadow-sysroot-dev which depends on shadow-sysroot +# 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 = "" + +inherit nopackages diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc index 4313ffe952..f86e5e03c0 100644 --- a/meta/recipes-extended/shadow/shadow.inc +++ b/meta/recipes-extended/shadow/shadow.inc @@ -1,22 +1,18 @@ SUMMARY = "Tools to change and administer password and group data" -HOMEPAGE = "http://pkg-shadow.alioth.debian.org" -BUGTRACKER = "https://alioth.debian.org/tracker/?group_id=30580" +HOMEPAGE = "http://github.com/shadow-maint/shadow" +BUGTRACKER = "http://github.com/shadow-maint/shadow/issues" SECTION = "base/utils" LICENSE = "BSD | Artistic-1.0" LIC_FILES_CHKSUM = "file://COPYING;md5=ed80ff1c2b40843cf5768e5229cf16e5 \ - file://src/passwd.c;beginline=8;endline=30;md5=d83888ea14ae61951982d77125947661" + file://src/passwd.c;beginline=2;endline=30;md5=5720ff729a6ff39ecc9f64555d75f4af" -DEPENDS = "shadow-native" -DEPENDS_class-native = "" -DEPENDS_class-nativesdk = "" +DEPENDS = "virtual/crypt" -SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.xz \ +UPSTREAM_CHECK_URI = "https://github.com/shadow-maint/shadow/releases" +SRC_URI = "https://github.com/shadow-maint/shadow/releases/download/${PV}/${BP}.tar.gz \ file://shadow-4.1.3-dots-in-usernames.patch \ - file://usermod-fix-compilation-failure-with-subids-disabled.patch \ - file://fix-installation-failure-with-subids-disabled.patch \ - file://0001-Do-not-read-login.defs-before-doing-chroot.patch \ - file://check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch \ ${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \ + file://shadow-relaxed-usernames.patch \ " SRC_URI_append_class-target = " \ @@ -25,17 +21,16 @@ SRC_URI_append_class-target = " \ " SRC_URI_append_class-native = " \ - file://disable-syslog.patch \ - file://allow-for-setting-password-in-clear-text.patch \ + 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 \ - file://0001-useradd.c-create-parent-directories-when-necessary.patch \ " SRC_URI_append_class-nativesdk = " \ - file://disable-syslog.patch \ + file://0001-Disable-use-of-syslog-for-sysroot.patch \ " -SRC_URI[md5sum] = "2bfafe7d4962682d31b5eba65dba4fc8" -SRC_URI[sha256sum] = "3b0893d1476766868cd88920f4f1231c4795652aa407569faff802bcda0f3d41" +SRC_URI[md5sum] = "3d97f11e66bfb0b14702b115fa8be480" +SRC_URI[sha256sum] = "3ee3081fbbcbcfea5c8916419e46bc724807bab271072104f23e7a29e9668f3a" # Additional Policy files for PAM PAM_SRC_URI = "file://pam.d/chfn \ @@ -48,19 +43,21 @@ PAM_SRC_URI = "file://pam.d/chfn \ 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 \ + --without-sssd \ ${NSCDOPT}" NSCDOPT = "" NSCDOPT_class-native = "--without-nscd" NSCDOPT_class-nativesdk = "--without-nscd" -NSCDOPT_libc-uclibc = " --without-nscd" -NSCDOPT_libc-glibc = "${@bb.utils.contains('DISTRO_FEATURES', 'libc-spawn', '--with-nscd', '--without-nscd', d)}" - +NSCDOPT_libc-glibc = "--with-nscd" + PAM_PLUGINS = "libpam-runtime \ pam-plugin-faildelay \ pam-plugin-securetty \ @@ -74,8 +71,9 @@ PAM_PLUGINS = "libpam-runtime \ pam-plugin-shells \ pam-plugin-rootok" -PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" -PACKAGECONFIG_class-native = "" +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" @@ -126,7 +124,8 @@ 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 -d ${D}${localstatedir}/spool/mail + 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/ @@ -135,7 +134,7 @@ do_install_append() { sed -i -f ${WORKDIR}/login_defs_pam.sed ${D}${sysconfdir}/login.defs fi - install -d ${D}${sbindir} ${D}${base_sbindir} ${D}${base_bindir} + install -d ${D}${sbindir} ${D}${base_sbindir} ${D}${base_bindir} # Move binaries to the locations we want rm ${D}${sbindir}/vigr @@ -170,21 +169,25 @@ inherit update-alternatives ALTERNATIVE_PRIORITY = "200" -ALTERNATIVE_${PN} = "passwd chfn chsh chpasswd vipw vigr" +ALTERNATIVE_${PN} = "passwd chfn chsh chpasswd vipw vigr nologin" ALTERNATIVE_LINK_NAME[chpasswd] = "${sbindir}/chpasswd" ALTERNATIVE_LINK_NAME[vipw] = "${base_sbindir}/vipw" ALTERNATIVE_LINK_NAME[vigr] = "${base_sbindir}/vigr" +ALTERNATIVE_LINK_NAME[nologin] = "${base_sbindir}/nologin" ALTERNATIVE_${PN}-base = "newgrp groups login su" ALTERNATIVE_LINK_NAME[login] = "${base_bindir}/login" ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su" -ALTERNATIVE_${PN}-doc = "passwd.5 getspnam.3 groups.1" +ALTERNATIVE_${PN}-doc = "passwd.5 getspnam.3 groups.1 su.1 nologin.8" ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5" ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3" ALTERNATIVE_LINK_NAME[groups.1] = "${mandir}/man1/groups.1" +ALTERNATIVE_LINK_NAME[su.1] = "${mandir}/man1/su.1" +ALTERNATIVE_LINK_NAME[nologin.8] = "${mandir}/man8/nologin.8" -pkg_postinst_${PN} () { +PACKAGE_WRITE_DEPS += "shadow-native" +pkg_postinst_${PN}_class-target () { if [ "x$D" != "x" ]; then rootarg="--root $D" else diff --git a/meta/recipes-extended/shadow/shadow_4.2.1.bb b/meta/recipes-extended/shadow/shadow_4.8.1.bb index 5675cb8cc9..c975395ff8 100644 --- a/meta/recipes-extended/shadow/shadow_4.2.1.bb +++ b/meta/recipes-extended/shadow/shadow_4.8.1.bb @@ -2,7 +2,7 @@ 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', bb.utils.contains('DISTRO_FEATURES', 'libc-crypt', '-lcrypt', '', d), '', d)}" +BUILD_LDFLAGS_append_class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '-lcrypt', '', d)}" BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-extended/slang/slang/array_test.patch b/meta/recipes-extended/slang/slang/array_test.patch new file mode 100644 index 0000000000..ccd416f207 --- /dev/null +++ b/meta/recipes-extended/slang/slang/array_test.patch @@ -0,0 +1,20 @@ +slang: modify array test + +One array test tries to create an array that is far too large and anticipates an exception. +IndexError will only be thrown for 64 bit machines, so we add InvalidParmError for 32 bit ones. + +Upstream-Status: Submitted [jedsoft.org] + +Signed-off-by: Joe Slater <joe.slater@windriver.com> + +--- a/src/test/array.sl ++++ b/src/test/array.sl +@@ -165,7 +165,7 @@ try + { + SS = Long_Type[10000,10000,10000,10000,10000,10000]; + } +-catch IndexError; ++catch IndexError,InvalidParmError; + + private define array_map2_func () + { diff --git a/meta/recipes-extended/slang/slang/change-char-type-to-signed-char-in-macros.patch b/meta/recipes-extended/slang/slang/change-char-type-to-signed-char-in-macros.patch deleted file mode 100644 index 2ea1ffda57..0000000000 --- a/meta/recipes-extended/slang/slang/change-char-type-to-signed-char-in-macros.patch +++ /dev/null @@ -1,218 +0,0 @@ -slang: change char type to signed char in macros - -C language has 3 distinct char types: - char - unsigned char - signed char -A char has the same range of values as signed char on X86, -but same as unsigned char on ARM which made Slang's typecast() -and array_sort() unable to work for char value on ARM, since -Slang is assuming "char" as "signed char". - -Now we change "char" as "signed char" explicitly in -util/mkslarith2.sl, and use it to regenerate src/slarith2.inc - -Upstream-Status: Submitted -Signed-off-by: Roy.Li <rongqing.li@windriver.com> ---- - src/slarith2.inc | 72 ++++++++++++++++++++++++------------------------- - src/util/mkslarith2.sl | 2 - - 2 files changed, 37 insertions(+), 37 deletions(-) - ---- a/src/util/mkslarith2.sl -+++ b/src/util/mkslarith2.sl -@@ -1,7 +1,7 @@ - #!/usr/bin/env slsh - - private variable CTypes = -- ["char", "unsigned char", "short", "unsigned short", "int", "unsigned int", -+ ["signed char", "unsigned char", "short", "unsigned short", "int", "unsigned int", - "long", "unsigned long", "long long", "unsigned long long", - "float", "double", "long double"]; - private variable Is_Int_Type = ---- a/src/slarith2.inc -+++ b/src/slarith2.inc -@@ -1,43 +1,43 @@ - /* DO NOT EDIT -- this file was generated by src/util/mkslarith2.sl */ --/* ------------ char ---------- */ --DEFUN_1(copy_char_to_char,char,char) -+/* ------------ signed char ---------- */ -+DEFUN_1(copy_char_to_char,signed char,signed char) - #define char_to_char NULL - #define copy_char_to_uchar copy_char_to_char - #define char_to_uchar NULL --DEFUN_1(copy_char_to_short,char,short) -+DEFUN_1(copy_char_to_short,signed char,short) - #define char_to_short NULL --DEFUN_1(copy_char_to_ushort,char,unsigned short) -+DEFUN_1(copy_char_to_ushort,signed char,unsigned short) - #define char_to_ushort NULL --DEFUN_1(copy_char_to_int,char,int) --DEFUN_2(char_to_int,char,int,copy_char_to_int) --DEFUN_1(copy_char_to_uint,char,unsigned int) --DEFUN_2(char_to_uint,char,unsigned int,copy_char_to_uint) --DEFUN_1(copy_char_to_long,char,long) --DEFUN_2(char_to_long,char,long,copy_char_to_long) --DEFUN_1(copy_char_to_ulong,char,unsigned long) --DEFUN_2(char_to_ulong,char,unsigned long,copy_char_to_ulong) -+DEFUN_1(copy_char_to_int,signed char,int) -+DEFUN_2(char_to_int,signed char,int,copy_char_to_int) -+DEFUN_1(copy_char_to_uint,signed char,unsigned int) -+DEFUN_2(char_to_uint,signed char,unsigned int,copy_char_to_uint) -+DEFUN_1(copy_char_to_long,signed char,long) -+DEFUN_2(char_to_long,signed char,long,copy_char_to_long) -+DEFUN_1(copy_char_to_ulong,signed char,unsigned long) -+DEFUN_2(char_to_ulong,signed char,unsigned long,copy_char_to_ulong) - #if defined(HAVE_LONG_LONG) --DEFUN_1(copy_char_to_llong,char,long long) --DEFUN_2(char_to_llong,char,long long,copy_char_to_llong) -+DEFUN_1(copy_char_to_llong,signed char,long long) -+DEFUN_2(char_to_llong,signed char,long long,copy_char_to_llong) - #endif /* defined(HAVE_LONG_LONG) */ - #if defined(HAVE_LONG_LONG) --DEFUN_1(copy_char_to_ullong,char,unsigned long long) --DEFUN_2(char_to_ullong,char,unsigned long long,copy_char_to_ullong) -+DEFUN_1(copy_char_to_ullong,signed char,unsigned long long) -+DEFUN_2(char_to_ullong,signed char,unsigned long long,copy_char_to_ullong) - #endif /* defined(HAVE_LONG_LONG) */ - #if SLANG_HAS_FLOAT --DEFUN_1(copy_char_to_float,char,float) --DEFUN_2(char_to_float,char,float,copy_char_to_float) -+DEFUN_1(copy_char_to_float,signed char,float) -+DEFUN_2(char_to_float,signed char,float,copy_char_to_float) - #endif /* SLANG_HAS_FLOAT */ - #if SLANG_HAS_FLOAT --DEFUN_1(copy_char_to_double,char,double) --DEFUN_2(char_to_double,char,double,copy_char_to_double) -+DEFUN_1(copy_char_to_double,signed char,double) -+DEFUN_2(char_to_double,signed char,double,copy_char_to_double) - #endif /* SLANG_HAS_FLOAT */ - #if defined(HAVE_LONG_DOUBLE) --DEFUN_1(copy_char_to_ldouble,char,long double) --DEFUN_2(char_to_ldouble,char,long double,copy_char_to_ldouble) -+DEFUN_1(copy_char_to_ldouble,signed char,long double) -+DEFUN_2(char_to_ldouble,signed char,long double,copy_char_to_ldouble) - #endif /* defined(HAVE_LONG_DOUBLE) */ - #if SLANG_HAS_FLOAT --TO_DOUBLE_FUN(char_to_one_double,char) -+TO_DOUBLE_FUN(char_to_one_double,signed char) - #endif - - /* ------------ unsigned char ---------- */ -@@ -82,7 +82,7 @@ TO_DOUBLE_FUN(uchar_to_one_double,unsign - #endif - - /* ------------ short ---------- */ --DEFUN_1(copy_short_to_char,short,char) -+DEFUN_1(copy_short_to_char,short,signed char) - #define short_to_char NULL - DEFUN_1(copy_short_to_uchar,short,unsigned char) - #define short_to_uchar NULL -@@ -123,7 +123,7 @@ TO_DOUBLE_FUN(short_to_one_double,short) - #endif - - /* ------------ unsigned short ---------- */ --DEFUN_1(copy_ushort_to_char,unsigned short,char) -+DEFUN_1(copy_ushort_to_char,unsigned short,signed char) - #define ushort_to_char NULL - DEFUN_1(copy_ushort_to_uchar,unsigned short,unsigned char) - #define ushort_to_uchar NULL -@@ -164,7 +164,7 @@ TO_DOUBLE_FUN(ushort_to_one_double,unsig - #endif - - /* ------------ int ---------- */ --DEFUN_1(copy_int_to_char,int,char) -+DEFUN_1(copy_int_to_char,int,signed char) - #define int_to_char NULL - DEFUN_1(copy_int_to_uchar,int,unsigned char) - #define int_to_uchar NULL -@@ -205,7 +205,7 @@ TO_DOUBLE_FUN(int_to_one_double,int) - #endif - - /* ------------ unsigned int ---------- */ --DEFUN_1(copy_uint_to_char,unsigned int,char) -+DEFUN_1(copy_uint_to_char,unsigned int,signed char) - #define uint_to_char NULL - DEFUN_1(copy_uint_to_uchar,unsigned int,unsigned char) - #define uint_to_uchar NULL -@@ -246,7 +246,7 @@ TO_DOUBLE_FUN(uint_to_one_double,unsigne - #endif - - /* ------------ long ---------- */ --DEFUN_1(copy_long_to_char,long,char) -+DEFUN_1(copy_long_to_char,long,signed char) - #define long_to_char NULL - DEFUN_1(copy_long_to_uchar,long,unsigned char) - #define long_to_uchar NULL -@@ -287,7 +287,7 @@ TO_DOUBLE_FUN(long_to_one_double,long) - #endif - - /* ------------ unsigned long ---------- */ --DEFUN_1(copy_ulong_to_char,unsigned long,char) -+DEFUN_1(copy_ulong_to_char,unsigned long,signed char) - #define ulong_to_char NULL - DEFUN_1(copy_ulong_to_uchar,unsigned long,unsigned char) - #define ulong_to_uchar NULL -@@ -329,7 +329,7 @@ TO_DOUBLE_FUN(ulong_to_one_double,unsign - - /* ------------ long long ---------- */ - #if defined(HAVE_LONG_LONG) --DEFUN_1(copy_llong_to_char,long long,char) -+DEFUN_1(copy_llong_to_char,long long,signed char) - #define llong_to_char NULL - DEFUN_1(copy_llong_to_uchar,long long,unsigned char) - #define llong_to_uchar NULL -@@ -372,7 +372,7 @@ TO_DOUBLE_FUN(llong_to_one_double,long l - - /* ------------ unsigned long long ---------- */ - #if defined(HAVE_LONG_LONG) --DEFUN_1(copy_ullong_to_char,unsigned long long,char) -+DEFUN_1(copy_ullong_to_char,unsigned long long,signed char) - #define ullong_to_char NULL - DEFUN_1(copy_ullong_to_uchar,unsigned long long,unsigned char) - #define ullong_to_uchar NULL -@@ -415,7 +415,7 @@ TO_DOUBLE_FUN(ullong_to_one_double,unsig - - /* ------------ float ---------- */ - #if SLANG_HAS_FLOAT --DEFUN_1(copy_float_to_char,float,char) -+DEFUN_1(copy_float_to_char,float,signed char) - #define float_to_char NULL - DEFUN_1(copy_float_to_uchar,float,unsigned char) - #define float_to_uchar NULL -@@ -458,7 +458,7 @@ TO_DOUBLE_FUN(float_to_one_double,float) - - /* ------------ double ---------- */ - #if SLANG_HAS_FLOAT --DEFUN_1(copy_double_to_char,double,char) -+DEFUN_1(copy_double_to_char,double,signed char) - #define double_to_char NULL - DEFUN_1(copy_double_to_uchar,double,unsigned char) - #define double_to_uchar NULL -@@ -501,7 +501,7 @@ TO_DOUBLE_FUN(double_to_one_double,doubl - - /* ------------ long double ---------- */ - #if defined(HAVE_LONG_DOUBLE) --DEFUN_1(copy_ldouble_to_char,long double,char) -+DEFUN_1(copy_ldouble_to_char,long double,signed char) - #define ldouble_to_char NULL - DEFUN_1(copy_ldouble_to_uchar,long double,unsigned char) - #define ldouble_to_uchar NULL -@@ -545,7 +545,7 @@ TO_DOUBLE_FUN(ldouble_to_one_double,long - #if SLANG_HAS_FLOAT - static To_Double_Fun_Table_Type To_Double_Fun_Table [MAX_ARITHMETIC_TYPES] = - { -- {sizeof(char), char_to_one_double}, -+ {sizeof(signed char), char_to_one_double}, - {sizeof(unsigned char), uchar_to_one_double}, - {sizeof(short), short_to_one_double}, - {sizeof(unsigned short), ushort_to_one_double}, -@@ -583,7 +583,7 @@ static To_Double_Fun_Table_Type To_Doubl - - static Binary_Matrix_Type Binary_Matrix [MAX_ARITHMETIC_TYPES][MAX_ARITHMETIC_TYPES] = - { -- /* char */ -+ /* signed char */ - { - {(FVOID_STAR)copy_char_to_char, char_to_char}, - {(FVOID_STAR)copy_char_to_uchar, char_to_uchar}, diff --git a/meta/recipes-extended/slang/slang/dont-link-to-host.patch b/meta/recipes-extended/slang/slang/dont-link-to-host.patch new file mode 100644 index 0000000000..42dba0fae4 --- /dev/null +++ b/meta/recipes-extended/slang/slang/dont-link-to-host.patch @@ -0,0 +1,16 @@ +SLANG_INST_LIB is the location of where slang will end up, but when building for +packaging this doesn't have DESTDIR appended so can potentially link to the host +for cross builds and will trigger QA errors. + +As this is obviously wrong, delete it. + +Upstream-Status: Pending +Signed-off-by: Ross Burton <ross.burton@intel.com> + +diff --git a/slsh/Makefile.in b/slsh/Makefile.in +index cba9d81..4c1c370 100644 +--- a/slsh/Makefile.in ++++ b/slsh/Makefile.in +@@ -80 +80 @@ SHELL = /bin/sh +-INST_LIBS = $(DEST_LIB_DIR) $(RPATH) $(SLANG_INST_LIB) -lslang $(READLINE_LIB) $(DYNAMIC_LIBS) ++INST_LIBS = $(DEST_LIB_DIR) $(RPATH) -lslang $(READLINE_LIB) $(DYNAMIC_LIBS) diff --git a/meta/recipes-extended/slang/slang/fix-check-pcre.patch b/meta/recipes-extended/slang/slang/fix-check-pcre.patch deleted file mode 100644 index 0c1553a661..0000000000 --- a/meta/recipes-extended/slang/slang/fix-check-pcre.patch +++ /dev/null @@ -1,108 +0,0 @@ -fix the pcre existence checking - -when check if there is pcre, the configure file always check -the host dir. now we make it work by adding correct prefix for -cross-compile environment. - -When enable pcre-module, we see a QA warning because rpaths -hardcoded into the build, rpaths are not needed, so lets turn -this off. - -Upstream-Status: Inappropriate -Signed-off-by: Roy.Li <rongqing.li@windriver.com> ---- - configure | 60 ++++++------------------------------------------------------ - 1 files changed, 6 insertions(+), 54 deletions(-) - -diff --git a/configure b/configure -index f1586c3..d22814f 100755 ---- a/configure -+++ b/configure -@@ -6991,6 +6991,7 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; } - /usr/include/pcre,/usr/lib \ - /usr/pcre/include,/usr/pcre/lib \ - /usr/include,/usr/lib \ -+ /usr/include,/usr/lib64 \ - /opt/include/pcre,/opt/lib \ - /opt/pcre/include,/opt/pcre/lib \ - /opt/include,/opt/lib" -@@ -7021,14 +7022,14 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; } - xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $1}'` - xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'` - found=0 -- if test -r $xincdir/$xincfile -+ if test -r $PKG_CONFIG_SYSROOT_DIR/$xincdir/$xincfile - then - for E in $exts - do -- if test -r "$xlibdir/$xlibfile.$E" -+ if test -r "$PKG_CONFIG_SYSROOT_DIR/$xlibdir/$xlibfile.$E" - then -- jd_pcre_include_dir="$xincdir" -- jd_pcre_library_dir="$xlibdir" -+ jd_pcre_include_dir="$PKG_CONFIG_SYSROOT_DIR/$xincdir" -+ jd_pcre_library_dir="$PKG_CONFIG_SYSROOT_DIR/$xlibdir" - jd_with_pcre_library="yes" - found=1 - break -@@ -7054,56 +7055,7 @@ $as_echo "yes: $jd_pcre_library_dir and $jd_pcre_include_dir" >&6; } - then - PCRE_LIB="" - else -- --if test "X$jd_pcre_library_dir" != "X" --then -- if test "X$RPATH" = "X" -- then -- --case "$host_os" in -- *linux*|*solaris* ) -- if test "X$GCC" = Xyes -- then -- if test "X$ac_R_nospace" = "Xno" -- then -- RPATH="-Wl,-R," -- else -- RPATH="-Wl,-R" -- fi -- else -- if test "X$ac_R_nospace" = "Xno" -- then -- RPATH="-R " -- else -- RPATH="-R" -- fi -- fi -- ;; -- *osf*|*openbsd*) -- if test "X$GCC" = Xyes -- then -- RPATH="-Wl,-rpath," -- else -- RPATH="-rpath " -- fi -- ;; -- *netbsd*) -- if test "X$GCC" = Xyes -- then -- RPATH="-Wl,-R" -- fi -- ;; --esac -- -- if test "X$RPATH" != "X" -- then -- RPATH="$RPATH$jd_pcre_library_dir" -- fi -- else -- RPATH="$RPATH:$jd_pcre_library_dir" -- fi --fi -- -+ RPATH="" - fi - - PCRE_INC=-I$jd_pcre_include_dir --- -1.7.4.1 - diff --git a/meta/recipes-extended/slang/slang/no-x.patch b/meta/recipes-extended/slang/slang/no-x.patch new file mode 100644 index 0000000000..7dc1602fe3 --- /dev/null +++ b/meta/recipes-extended/slang/slang/no-x.patch @@ -0,0 +1,18 @@ +There's no need to check for the X libraries as the socket module doesn't use +anything from X. + +Upstream-Status: Pending +Signed-off-by: Ross Burton <ross.burton@intel.com> + +diff --git a/autoconf/configure.ac b/autoconf/configure.ac +index b61e974..a3e5db2 100644 +--- a/autoconf/configure.ac ++++ b/autoconf/configure.ac +@@ -72,3 +71,0 @@ AC_SUBST(LIB_READLINE) +-# For the socket module +-AC_PATH_XTRA +- +--- a/modules/Makefile.in ++++ b/modules/Makefile.in +@@ -67 +66,0 @@ ZLIB_LIB = @Z_LIB@ -lz +-SOCKET_LIBS = @X_EXTRA_LIBS@ diff --git a/meta/recipes-extended/slang/slang/rpathfix.patch b/meta/recipes-extended/slang/slang/rpathfix.patch deleted file mode 100644 index 50cac9264f..0000000000 --- a/meta/recipes-extended/slang/slang/rpathfix.patch +++ /dev/null @@ -1,70 +0,0 @@ -Without this patch we see rpaths hardcoded into the build which results in QA -warnings. These rpaths are not needed so lets turn this off. - -Upstream-Status: Inappropriate -(but could be turned into a proper configure option) - -RP 2012/03/14 - -Index: slang-2.2.4/configure -=================================================================== ---- slang-2.2.4.orig/configure 2012-03-14 23:40:01.283560679 +0000 -+++ slang-2.2.4/configure 2012-03-14 23:41:18.023558900 +0000 -@@ -6081,56 +6081,7 @@ - ELF_CFLAGS="$ELF_CFLAGS $IEEE_CFLAGS" - CFLAGS="$CFLAGS $IEEE_CFLAGS" - -- --if test "X$libdir" != "X" --then -- if test "X$RPATH" = "X" -- then -- --case "$host_os" in -- *linux*|*solaris* ) -- if test "X$GCC" = Xyes -- then -- if test "X$ac_R_nospace" = "Xno" -- then -- RPATH="-Wl,-R," -- else -- RPATH="-Wl,-R" -- fi -- else -- if test "X$ac_R_nospace" = "Xno" -- then -- RPATH="-R " -- else -- RPATH="-R" -- fi -- fi -- ;; -- *osf*|*openbsd*) -- if test "X$GCC" = Xyes -- then -- RPATH="-Wl,-rpath," -- else -- RPATH="-rpath " -- fi -- ;; -- *netbsd*) -- if test "X$GCC" = Xyes -- then -- RPATH="-Wl,-R" -- fi -- ;; --esac -- -- if test "X$RPATH" != "X" -- then -- RPATH="$RPATH$libdir" -- fi -- else -- RPATH="$RPATH:$libdir" -- fi --fi -- -+RPATH="" - - # The cast to long int works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects diff --git a/meta/recipes-extended/slang/slang/run-ptest b/meta/recipes-extended/slang/slang/run-ptest new file mode 100644 index 0000000000..39f474af31 --- /dev/null +++ b/meta/recipes-extended/slang/slang/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +make -C test runtests diff --git a/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch b/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch deleted file mode 100644 index 958fe983c5..0000000000 --- a/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch +++ /dev/null @@ -1,116 +0,0 @@ -From 4588f4a0287787788eb86fb16f326cbaa7454e1d Mon Sep 17 00:00:00 2001 -From: Zheng Junling <zhengjunling@huawei.com> -Date: Mon, 16 Jun 2014 12:51:25 +0000 -Subject: [PATCH] slang: fix the iconv existence checking - -When checking whether there is iconv, the configure file always check -the host env. - -Now we make it working properly by adding correct prefix for cross- -compiling environment. - -When enabling iconv-module, we see a QA warning because rpaths hardcoded -into the build. And rpaths are not needed, so let's turn this off. - -This patch is generated by referencing the existing "fix-check-pcre" -patch. - -Upstream-Status: Inappropriate - -Signed-off-by: Zheng Junling <zhengjunling@huawei.com> ---- - configure | 60 ++++++------------------------------------------------------ - 1 file changed, 6 insertions(+), 54 deletions(-) - -diff --git a/configure b/configure -index 7a96256..91632f3 100755 ---- a/configure -+++ b/configure -@@ -7909,6 +7909,7 @@ $as_echo_n "checking for the iconv library and header files ... " >&6; } - /usr/include/iconv,/usr/lib \ - /usr/iconv/include,/usr/iconv/lib \ - /usr/include,/usr/lib \ -+ /usr/include,/usr/lib64 \ - /opt/include/iconv,/opt/lib \ - /opt/iconv/include,/opt/iconv/lib \ - /opt/include,/opt/lib" -@@ -7939,14 +7940,14 @@ $as_echo_n "checking for the iconv library and header files ... " >&6; } - xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $1}'` - xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'` - found=0 -- if test -r $xincdir/$xincfile -+ if test -r $PKG_CONFIG_SYSROOT_DIR/$xincdir/$xincfile - then - for E in $exts - do -- if test -r "$xlibdir/$xlibfile.$E" -+ if test -r "$PKG_CONFIG_SYSROOT_DIR/$xlibdir/$xlibfile.$E" - then -- jd_iconv_include_dir="$xincdir" -- jd_iconv_library_dir="$xlibdir" -+ jd_iconv_include_dir="$PKG_CONFIG_SYSROOT_DIR/$xincdir" -+ jd_iconv_library_dir="$PKG_CONFIG_SYSROOT_DIR/$xlibdir" - jd_with_iconv_library="yes" - found=1 - break -@@ -7972,56 +7973,7 @@ $as_echo "yes: $jd_iconv_library_dir and $jd_iconv_include_dir" >&6; } - then - ICONV_LIB="" - else -- --if test "X$jd_iconv_library_dir" != "X" --then -- if test "X$RPATH" = "X" -- then -- --case "$host_os" in -- *linux*|*solaris* ) -- if test "X$GCC" = Xyes -- then -- if test "X$ac_R_nospace" = "Xno" -- then -- RPATH="-Wl,-R," -- else -- RPATH="-Wl,-R" -- fi -- else -- if test "X$ac_R_nospace" = "Xno" -- then -- RPATH="-R " -- else -- RPATH="-R" -- fi -- fi -- ;; -- *osf*|*openbsd*) -- if test "X$GCC" = Xyes -- then -- RPATH="-Wl,-rpath," -- else -- RPATH="-rpath " -- fi -- ;; -- *netbsd*) -- if test "X$GCC" = Xyes -- then -- RPATH="-Wl,-R" -- fi -- ;; --esac -- -- if test "X$RPATH" != "X" -- then -- RPATH="$RPATH$jd_iconv_library_dir" -- fi -- else -- RPATH="$RPATH:$jd_iconv_library_dir" -- fi --fi -- -+ RPATH="" - fi - - ICONV_INC=-I$jd_iconv_include_dir --- -1.8.3.4 - diff --git a/meta/recipes-extended/slang/slang/sprintf-bug-concerning-8-bit-characters.patch b/meta/recipes-extended/slang/slang/sprintf-bug-concerning-8-bit-characters.patch deleted file mode 100644 index ddf5cce5cb..0000000000 --- a/meta/recipes-extended/slang/slang/sprintf-bug-concerning-8-bit-characters.patch +++ /dev/null @@ -1,42 +0,0 @@ -Upstream-Status: Backported - -From 3a05d1a920140e9f2c72791c12f664213feb46df Mon Sep 17 00:00:00 2001 -From: Manfred Hanke <Manfred.Hanke@tngtech.com> -Date: Thu, 20 Jun 2013 10:24:12 +0200 -Subject: [PATCH] sprintf bug (concerning %c for 8-bit character in non-UTF8 - mode) fixed - -char *str points to SLuchar_Type utf8_buf[], which had too small scope - -src/test/strops.sl failed in the following environment: - - compiler: gcc (Debian 4.7.2-5) 4.7.2 - - CFLAGS: -g -O2 - - libc: GNU C Library (Debian EGLIBC 2.13-38) stable release version 2.13 - - kernel: 3.2.0-4-686-pae #1 SMP Debian 3.2.39-2 i686 GNU/Linux ---- - src/slstrops.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/slstrops.c b/src/slstrops.c -index ce6acb0..cbbbb01 100644 ---- a/src/slstrops.c -+++ b/src/slstrops.c -@@ -1884,6 +1884,7 @@ static char *SLdo_sprintf (char *fmt) /*{{{*/ - #endif - unsigned char uch; - int use_long = 0, use_alt_format = 0; -+ SLuchar_Type utf8_buf[SLUTF8_MAX_MBLEN+1]; - - while (1) - { -@@ -2071,7 +2072,6 @@ static char *SLdo_sprintf (char *fmt) /*{{{*/ - #endif - { - SLwchar_Type wc; -- SLuchar_Type utf8_buf[SLUTF8_MAX_MBLEN+1]; - - if (-1 == SLang_pop_wchar (&wc)) - return out; --- -1.7.9.5 - diff --git a/meta/recipes-extended/slang/slang/terminfo_fixes.patch b/meta/recipes-extended/slang/slang/terminfo_fixes.patch new file mode 100644 index 0000000000..3e6d15aa79 --- /dev/null +++ b/meta/recipes-extended/slang/slang/terminfo_fixes.patch @@ -0,0 +1,148 @@ +Do not use the JD_TERMCAP macro since we cannot get the terminfo from +ncurses pkg-config, but fix the macro to not reference host directories. +Also add src/test/Makefile.in so that we can use -ltermcap if we want to. + +Upstream-Status: Pending + +Signed-off-by: Joe Slater <joe.slater@windriver.com> + + +--- a/autoconf/aclocal.m4 ++++ b/autoconf/aclocal.m4 +@@ -506,14 +506,10 @@ then + else + MISC_TERMINFO_DIRS="" + fi +-JD_Terminfo_Dirs="$MISC_TERMINFO_DIRS \ +- /usr/lib/terminfo \ +- /usr/share/terminfo \ +- /usr/share/lib/terminfo \ +- /usr/local/lib/terminfo" ++ + TERMCAP=-ltermcap + +-for terminfo_dir in $JD_Terminfo_Dirs ++for terminfo_dir in $MISC_TERMINFO_DIRS + do + if test -d $terminfo_dir + then +--- a/autoconf/configure.ac ++++ b/autoconf/configure.ac +@@ -249,7 +249,14 @@ AC_CHECK_SIZEOF(size_t) + JD_CHECK_LONG_LONG + JD_LARGE_FILE_SUPPORT + +-JD_TERMCAP ++dnl Do not use JD_TERMCAP, since we cannot get terminfo from ncurses*-config anymore. ++dnl Set TERMCAP=-ltermcap and AC_DEFINE(USE_TERMCAP,1,[Define to use termcap]) ++dnl to use libtermcap. ++TERMCAP="" ++MISC_TERMINFO_DIRS="" ++AC_SUBST(TERMCAP)dnl ++AC_SUBST(MISC_TERMINFO_DIRS)dnl ++ + JD_GCC_WARNINGS + + JD_SET_OBJ_SRC_DIR(src) +@@ -364,7 +371,7 @@ AC_CONFIG_HEADER(src/sysconf.h:src/confi + dnl AC_CONFIG_SUBDIRS(demo) + + AC_OUTPUT(Makefile:autoconf/Makefile.in \ +- src/Makefile slsh/Makefile modules/Makefile demo/Makefile \ ++ src/Makefile src/test/Makefile slsh/Makefile modules/Makefile demo/Makefile \ + slang.pc:autoconf/slangpc.in \ + ) + +--- /dev/null ++++ b/src/test/Makefile.in +@@ -0,0 +1,90 @@ ++# -*- make -*- ++TEST_SCRIPTS_SLC = argv syntax scircuit eqs sscanf loops arith array strops \ ++ bstring pack stdio assoc selfload struct nspace path ifeval anytype arrmult \ ++ time utf8 except bugs list regexp method deref naninf overflow sort \ ++ longlong signal dollar req docfun debug qualif compare break multline \ ++ stack misc posixio posdir proc math ++ ++TEST_SCRIPTS_NO_SLC = autoload nspace2 prep ++ ++TEST_SCRIPTS = $(TEST_SCRIPTS_SLC) $(TEST_SCRIPTS_NO_SLC) ++ ++TEST_PGM = sltest ++MEMCHECK = valgrind --tool=memcheck --leak-check=yes --leak-resolution=med --num-callers=20 ++RUN_TEST_PGM = ./$(TEST_PGM) ++SLANGINC = .. ++SLANGLIB = ../$(ARCH)objs ++OTHER_LIBS = -lm @TERMCAP@ ++OTHER_CFLAGS = ++ ++runtests: $(TEST_PGM) cleantmp ++ @tests=""; \ ++ for test in $(TEST_SCRIPTS); \ ++ do \ ++ tests="$$tests $$test.sl"; \ ++ done; \ ++ for test in $(TEST_SCRIPTS_SLC); \ ++ do \ ++ tests="$$tests $$test.slc"; \ ++ done; \ ++ MAKERUNNING=1 ./runtests.sh $$tests ++# @touch $(TEST_PGM).c ++ ++update: $(TEST_PGM) cleantmp ++ @tests=""; \ ++ for X in $(TEST_SCRIPTS); \ ++ do \ ++ if [ ! -e lastrun/$$X.sl ] || [ $$X.sl -nt lastrun/$$X.sl ] ; \ ++ then \ ++ tests="$$tests $$X.sl"; \ ++ fi \ ++ done; \ ++ for X in $(TEST_SCRIPTS_SLC); \ ++ do \ ++ if [ ! -e lastrun/$$X.slc ] || [ $$X.sl -nt lastrun/$$X.slc ] ; \ ++ then \ ++ tests="$$tests $$X.slc"; \ ++ fi \ ++ done; \ ++ if test -n "$$tests"; \ ++ then \ ++ MAKERUNNING=1 ./runtests.sh $$tests; \ ++ fi ++# @touch $(TEST_PGM).c ++ ++memcheck_runtests: $(TEST_PGM) cleantmp ++ @echo "" ++ @echo "Running tests:" ++ @echo "" ++ -@for X in $(TEST_SCRIPTS); \ ++ do \ ++ $(MEMCHECK) --log-file=log.$${X} $(RUN_TEST_PGM) $$X.sl; \ ++ grep ERROR log.$${X}; grep 'lost: [^0]' log.$${X}; \ ++ $(MEMCHECK) --log-file=log.$${X}_u $(RUN_TEST_PGM) -utf8 $$X.sl; \ ++ grep ERROR log.$${X}_u; grep 'lost: [^0]' log.$${X}_u; \ ++ done ++# touch $(TEST_PGM).c ++ ++memcheck_runtests_slc: $(TEST_PGM) cleantmp ++ @echo "" ++ @echo "Running tests:" ++ @echo "" ++ -@for X in $(TEST_SCRIPTS_SLC); \ ++ do \ ++ $(MEMCHECK) --log-file=log.$${X}_c $(RUN_TEST_PGM) $$X.slc; \ ++ $(MEMCHECK) --log-file=log.$${X}_uc $(RUN_TEST_PGM) -utf8 $$X.slc; \ ++ done ++# touch $(TEST_PGM).c ++ ++memcheck: memcheck_runtests memcheck_runtests_slc ++ ++$(TEST_PGM): $(TEST_PGM).c assoc.c list.c $(SLANGLIB)/libslang.a ++ $(CC) $(CFLAGS) $(OTHER_CFLAGS) $(LDFLAGS) $(TEST_PGM).c -o $(TEST_PGM) -I$(SLANGINC) -L$(SLANGLIB) -lslang $(OTHER_LIBS) ++cleantmp: ++ -/bin/rm -rf tmpfile*.* tmpdir*.* ++clean: cleantmp ++ -/bin/rm -f *~ *.o *.log log.pid* *.slc log.* *.log-* ++distclean: clean ++ /bin/rm -f $(TEST_PGM) $(TEST_PGM).gcda $(TEST_PGM).gcno ++.PHONY: clean memcheck runtests memcheck_runtests_slc memcheck_runtests cleantmp ++ diff --git a/meta/recipes-extended/slang/slang/test-add-output-in-the-format-result-testname.patch b/meta/recipes-extended/slang/slang/test-add-output-in-the-format-result-testname.patch new file mode 100644 index 0000000000..27a9bb87ea --- /dev/null +++ b/meta/recipes-extended/slang/slang/test-add-output-in-the-format-result-testname.patch @@ -0,0 +1,30 @@ +From 38688ee2754415cf2a1935dafb8278861b7315e7 Mon Sep 17 00:00:00 2001 +From: Stefan Strogin <sstrogin@cisco.com> +Date: Thu, 2 Mar 2017 00:26:31 +0200 +Subject: [PATCH] test: add output in the format "result: testname" + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Stefan Strogin <sstrogin@cisco.com> +--- + src/test/runtests.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/test/runtests.sh b/src/test/runtests.sh +index a3eaad0..64f0705 100755 +--- a/src/test/runtests.sh ++++ b/src/test/runtests.sh +@@ -34,8 +34,10 @@ do + then + n_failed=`expr ${n_failed} + 1` + tests_failed="$tests_failed $testfile" ++ echo "FAIL: $testfile" + else + touch lastrun/$testfile ++ echo "PASS: $testfile" + fi + done + +-- +2.11.0 + diff --git a/meta/recipes-extended/slang/slang_2.2.4.bb b/meta/recipes-extended/slang/slang_2.2.4.bb deleted file mode 100644 index 25f1b0c08d..0000000000 --- a/meta/recipes-extended/slang/slang_2.2.4.bb +++ /dev/null @@ -1,53 +0,0 @@ -SUMMARY = "The shared library for the S-Lang extension language" - -DESCRIPTION = "S-Lang is an interpreted language and a programming library. The \ -S-Lang language was designed so that it can be easily embedded into \ -a program to provide the program with a powerful extension language. \ -The S-Lang library, provided in this package, provides the S-Lang \ -extension language. S-Lang's syntax resembles C, which makes it easy \ -to recode S-Lang procedures in C if you need to." - -HOMEPAGE = "http://www.jedsoft.org/slang/" -SECTION = "libs" -DEPENDS = "pcre" -PR = "r12" - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02" - - -SRC_URI = "ftp://space.mit.edu/pub/davis/slang/v2.2/slang-${PV}.tar.bz2 \ - file://rpathfix.patch \ - file://fix-check-pcre.patch \ - file://change-char-type-to-signed-char-in-macros.patch \ - file://sprintf-bug-concerning-8-bit-characters.patch \ - file://slang-fix-the-iconv-existence-checking.patch \ - " - -inherit autotools-brokensep - -CLEANBROKEN = "1" - -SRC_URI[md5sum] = "7fcfd447e378f07dd0c0bae671fe6487" -SRC_URI[sha256sum] = "9a8257a9a2a55099af858b13338dc8f3a06dd2069f46f0df2c9c3bb84a01d5db" - -EXTRA_OECONF += " --without-z --without-png --without-onig --x-includes=${STAGING_DIR_HOST}/usr/include/X11 --x-libraries=${STAGING_DIR_HOST}/usr/lib" - -do_configure_prepend() { - # slang keeps configure.ac and rest of autoconf files in autoconf/ directory - # we have to go there to be able to run gnu-configize cause it expects configure.{in,ac} - # to be present. Resulting files land in autoconf/autoconf/ so we need to move them. - cd ${S}/autoconf && gnu-configize --force && mv autoconf/config.* . - cd ${B} -} - -do_install() { - oe_runmake install DESTDIR=${D} -e 'INST_LIB_DIR=${STAGING_DIR_HOST}/usr/lib' -} - -FILES_${PN} += "${libdir}/${BPN}/v2/modules/ ${datadir}/slsh/" -FILES_${PN}-dbg += "${libdir}/${BPN}/v2/modules/.debug" - -PARALLEL_MAKE = "" - -BBCLASSEXTEND = "native" diff --git a/meta/recipes-extended/slang/slang_2.3.2.bb b/meta/recipes-extended/slang/slang_2.3.2.bb new file mode 100644 index 0000000000..99efb16da6 --- /dev/null +++ b/meta/recipes-extended/slang/slang_2.3.2.bb @@ -0,0 +1,84 @@ +SUMMARY = "The shared library for the S-Lang extension language" + +DESCRIPTION = "S-Lang is an interpreted language and a programming library. The \ +S-Lang language was designed so that it can be easily embedded into \ +a program to provide the program with a powerful extension language. \ +The S-Lang library, provided in this package, provides the S-Lang \ +extension language. S-Lang's syntax resembles C, which makes it easy \ +to recode S-Lang procedures in C if you need to." + +HOMEPAGE = "http://www.jedsoft.org/slang/" +SECTION = "libs" +DEPENDS = "ncurses virtual/libiconv" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02" + +SRC_URI = "http://www.jedsoft.org/releases/${BPN}/${BP}.tar.bz2 \ + file://no-x.patch \ + file://dont-link-to-host.patch \ + file://test-add-output-in-the-format-result-testname.patch \ + file://terminfo_fixes.patch \ + file://array_test.patch \ + file://run-ptest \ + " + +SRC_URI[md5sum] = "c2d5a7aa0246627da490be4e399c87cb" +SRC_URI[sha256sum] = "fc9e3b0fc4f67c3c1f6d43c90c16a5c42d117b8e28457c5b46831b8b5d3ae31a" + +UPSTREAM_CHECK_URI = "http://www.jedsoft.org/releases/slang/" +PREMIRRORS_append = "\n http://www.jedsoft.org/releases/slang/.* http://www.jedsoft.org/releases/slang/old/ \n" + +inherit autotools-brokensep ptest +CLEANBROKEN = "1" + +EXTRA_OECONF = "--without-onig" +# There's no way to turn off rpaths and slang will -rpath to the default search +# path. Unset RPATH to stop this. +EXTRA_OEMAKE = "RPATH=''" + +PACKAGECONFIG ??= "pcre" +PACKAGECONFIG[pcre] = "--with-pcre=${STAGING_DIR_HOST}${prefix},--without-pcre,pcre" +PACKAGECONFIG[png] = "--with-png=${STAGING_DIR_HOST}${prefix},--without-png,libpng" +PACKAGECONFIG[zlib] = "--with-z=${STAGING_DIR_HOST}${prefix},--without-z,zlib" + +do_configure_prepend() { + cd ${S}/autoconf + # slang keeps configure.ac and rest of autoconf files in autoconf/ directory + # we have to go there to be able to run gnu-configize cause it expects configure.{in,ac} + # to be present. Resulting files land in autoconf/autoconf/ so we need to move them. + gnu-configize --force && mv autoconf/config.* . + # For the same reason we also need to run autoconf manually. + autoconf && mv configure .. + cd ${B} +} + +do_compile_ptest() { + oe_runmake -C src static + oe_runmake -C src/test sltest +} + +do_install_ptest() { + mkdir ${D}${PTEST_PATH}/test + for f in Makefile sltest runtests.sh *.sl *.inc; do + cp ${S}/src/test/$f ${D}${PTEST_PATH}/test/ + done + sed -e 's/\ \$(TEST_PGM)\.c\ assoc\.c\ list\.c\ \$(SLANGLIB)\/libslang\.a//' \ + -e '/\$(CC).*(TEST_PGM)/d' \ + -i ${D}${PTEST_PATH}/test/Makefile + + cp ${S}/slsh/lib/require.sl ${D}${PTEST_PATH}/test/ + sed -i 's/\.\.\/\.\.\/slsh\/lib\/require\.sl/require\.sl/' ${D}${PTEST_PATH}/test/req.sl + + cp ${S}/doc/text/slangfun.txt ${D}${PTEST_PATH}/test/ + sed -i 's/\.\.\/\.\.\/doc\/text\/slangfun\.txt/slangfun\.txt/' ${D}${PTEST_PATH}/test/docfun.sl +} + +FILES_${PN} += "${libdir}/${BPN}/v2/modules/ ${datadir}/slsh/" + +RDEPENDS_${PN}-ptest += "make" + +PARALLEL_MAKE = "" +PARALLEL_MAKEINST = "" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-extended/stat/stat-3.3/fix-error-return.patch b/meta/recipes-extended/stat/stat-3.3/fix-error-return.patch deleted file mode 100644 index 032995db8f..0000000000 --- a/meta/recipes-extended/stat/stat-3.3/fix-error-return.patch +++ /dev/null @@ -1,16 +0,0 @@ -This patch fixies the wrong return code of stat -h. - -Upstream-Status: Pending -Signed-off-by: Zhangle Yang <zhangle.yang@windriver.com> - ---- stat-3.3/stat.c.orig 2013-08-22 10:49:45.000000000 +0800 -+++ stat-3.3/stat.c 2013-08-22 10:50:31.000000000 +0800 -@@ -845,7 +845,7 @@ - fprintf(stderr, "\t\t%%S - Security ID in SE-Linux\n"); - fprintf(stderr, "\t\t%%C - Security context in SE-Linux\n"); - fprintf(stderr, "\t\t%%d - Free file nodes in file system\n"); -- exit(1); -+ exit(0); - } - - diff --git a/meta/recipes-extended/stat/stat_3.3.bb b/meta/recipes-extended/stat/stat_3.3.bb deleted file mode 100644 index 651831e314..0000000000 --- a/meta/recipes-extended/stat/stat_3.3.bb +++ /dev/null @@ -1,31 +0,0 @@ -SUMMARY = "Command line file status display utility" -DESCRIPTION = "Displays all information about a file that the stat() call provides and all information about a filesystem that statfs() provides." -SECTION = "console/utils" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=39886b077fd072e876e5c4c16310b631 \ - file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f" - -SRC_URI = "http://www.ibiblio.org/pub/Linux/utils/file/${BP}.tar.gz \ - file://fix-error-return.patch" - -SRC_URI[md5sum] = "37e247e8e400ad9205f1b0500b728fd3" -SRC_URI[sha256sum] = "7071f0384a423a938dd542c1f08547a02824f6359acd3ef3f944b2c4c2d1ee09" - -do_install() { - install -d ${D}${base_bindir} ${D}${mandir}/man1 - install -m 755 stat ${D}${base_bindir}/stat.stat - install -m 644 stat.1 ${D}${mandir}/man1 -} - -inherit update-alternatives - -ALTERNATIVE_${PN} = "stat" -ALTERNATIVE_PRIORITY[stat] = "200" -ALTERNATIVE_LINK_NAME[stat] = "${base_bindir}/stat" -ALTERNATIVE_TARGET[stat] = "${base_bindir}/stat.stat" - -ALTERNATIVE_${PN}-doc = "stat.1" -ALTERNATIVE_LINK_NAME[stat.1] = "${mandir}/man1/stat.1" - -BBCLASSEXTEND = "native" - diff --git a/meta/recipes-extended/stress-ng/stress-ng/0001-Do-not-preserve-ownership-when-installing-example-jo.patch b/meta/recipes-extended/stress-ng/stress-ng/0001-Do-not-preserve-ownership-when-installing-example-jo.patch new file mode 100644 index 0000000000..c860c717ac --- /dev/null +++ b/meta/recipes-extended/stress-ng/stress-ng/0001-Do-not-preserve-ownership-when-installing-example-jo.patch @@ -0,0 +1,23 @@ +From bbc85a439672120fa1d36be79e959b28fe840919 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Tue, 30 Jul 2019 18:38:03 +0200 +Subject: [PATCH] Do not preserve ownership when installing example jobs + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index f36e57e..20488af 100644 +--- a/Makefile ++++ b/Makefile +@@ -452,6 +452,6 @@ install: stress-ng stress-ng.1.gz + mkdir -p ${DESTDIR}${MANDIR} + cp stress-ng.1.gz ${DESTDIR}${MANDIR} + mkdir -p ${DESTDIR}${JOBDIR} +- cp -rp example-jobs/*.job ${DESTDIR}${JOBDIR} ++ cp -r example-jobs/*.job ${DESTDIR}${JOBDIR} + mkdir -p ${DESTDIR}${BASHDIR} + cp bash-completion/stress-ng ${DESTDIR}${BASHDIR} diff --git a/meta/recipes-extended/stress-ng/stress-ng/no_daddr_t.patch b/meta/recipes-extended/stress-ng/stress-ng/no_daddr_t.patch new file mode 100644 index 0000000000..dba4494b91 --- /dev/null +++ b/meta/recipes-extended/stress-ng/stress-ng/no_daddr_t.patch @@ -0,0 +1,32 @@ +From 55e11765af2bdc8adfac87dab1fb2682f7e6c236 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 9 Jun 2020 22:10:28 -0700 +Subject: [PATCH] Define daddr_t if __DADDR_T_TYPE is not defined + +glibc defined daddr_t but musl does not, ideally it should not be used +and simple int type is enough. However, its better to leave glibc behavior +as it is and only define it to int if daddr_t is not provided by libc + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- + stress-ng.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/stress-ng.h b/stress-ng.h +index 1a66293..802dc25 100644 +--- a/stress-ng.h ++++ b/stress-ng.h +@@ -3763,6 +3763,10 @@ struct shim_statx { + uint64_t __spare2[14]; + }; + ++#ifndef __DADDR_T_TYPE ++typedef int daddr_t; ++#endif ++ + /* old ustat struct */ + struct shim_ustat { + #if defined(HAVE_DADDR_T) diff --git a/meta/recipes-extended/stress-ng/stress-ng_0.11.21.bb b/meta/recipes-extended/stress-ng/stress-ng_0.11.21.bb new file mode 100644 index 0000000000..71671dd046 --- /dev/null +++ b/meta/recipes-extended/stress-ng/stress-ng_0.11.21.bb @@ -0,0 +1,27 @@ +SUMMARY = "System load testing utility" +DESCRIPTION = "Deliberately simple workload generator for POSIX systems. It \ +imposes a configurable amount of CPU, memory, I/O, and disk stress on the system." +HOMEPAGE = "https://kernel.ubuntu.com/~cking/stress-ng/" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRC_URI = "https://kernel.ubuntu.com/~cking/tarballs/${BPN}/${BP}.tar.xz \ + file://0001-Do-not-preserve-ownership-when-installing-example-jo.patch \ + file://no_daddr_t.patch \ + " +SRC_URI[sha256sum] = "ee44b71aba20e9c7d10ec4768efa2245d12579fa17e08b9314c17f06f785ae39" + +DEPENDS = "coreutils-native" + +PROVIDES = "stress" +RPROVIDES_${PN} = "stress" +RREPLACES_${PN} = "stress" +RCONFLICTS_${PN} = "stress" + +inherit bash-completion + +do_install() { + oe_runmake DESTDIR=${D} install + ln -s stress-ng ${D}${bindir}/stress +} + diff --git a/meta/recipes-extended/stress/files/texinfo.patch b/meta/recipes-extended/stress/files/texinfo.patch deleted file mode 100644 index 5ac595192f..0000000000 --- a/meta/recipes-extended/stress/files/texinfo.patch +++ /dev/null @@ -1,79 +0,0 @@ ---- a/doc/stress.texi -+++ b/doc/stress.texi -@@ -62,47 +62,47 @@ - - @table @samp - @item -? --@itemx --help -+@item --help - Show help information. - --@itemx --version -+@item --version - Show version information. - - @item -v --@itemx --verbose -+@item --verbose - Turn up verbosity. - - @item -q --@itemx --quiet -+@item --quiet - Turn down verbosity. - - @item -n --@itemx --dry-run -+@item --dry-run - Show what would have been done. - - @item -t @var{secs} --@itemx --timeout @var{secs} -+@item --timeout @var{secs} - Time out after @var{secs} seconds. - --@itemx --backoff @var{usecs} -+@item --backoff @var{usecs} - Wait for factor of @var{usecs} microseconds before starting work. - - @item -c @var{forks} --@itemx --cpu @var{forks} -+@item --cpu @var{forks} - Spawn @var{forks} processes each spinning on @samp{sqrt()}. - - @item -i @var{forks} --@itemx --io @var{forks} -+@item --io @var{forks} - Spawn @var{forks} processes each spinning on @samp{sync()}. - - @item -m @var{forks} --@itemx --vm @var{forks} -+@item --vm @var{forks} - Spawn @var{forks} processes each spinning on @samp{malloc()}. - --@itemx --vm-bytes @var{bytes} -+@item --vm-bytes @var{bytes} - Allocate @var{bytes} number of bytes. The default is 1. - --@itemx --vm-hang -+@item --vm-hang - Instruct each vm hog process to go to sleep after allocating memory. This - contrasts with their normal behavior, which is to free the memory and - reallocate @emph{ad infinitum}. This is useful for simulating low memory -@@ -114,13 +114,13 @@ - @end example - - @item -d @var{forks} --@itemx --hdd @var{forks} -+@item --hdd @var{forks} - Spawn @var{forks} processes each spinning on @samp{write()}. - --@itemx --hdd-bytes @var{bytes} -+@item --hdd-bytes @var{bytes} - Write @var{bytes} number of bytes. The default is 1GB. - --@itemx --hdd-noclean -+@item --hdd-noclean - Do not unlink file(s) to which random ASCII data is written. - - @end table diff --git a/meta/recipes-extended/stress/stress_1.0.4.bb b/meta/recipes-extended/stress/stress_1.0.4.bb deleted file mode 100644 index 4b7e4bab71..0000000000 --- a/meta/recipes-extended/stress/stress_1.0.4.bb +++ /dev/null @@ -1,14 +0,0 @@ -DESCRIPTION = "Deliberately simple workload generator for POSIX systems. It \ -imposes a configurable amount of CPU, memory, I/O, and disk stress on the system." -HOMEPAGE = "http://people.seas.harvard.edu/~apw/stress/" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -SRC_URI = "http://people.seas.harvard.edu/~apw/${BPN}/${BP}.tar.gz \ - file://texinfo.patch \ - " - -SRC_URI[md5sum] = "890a4236dd1656792f3ef9a190cf99ef" -SRC_URI[sha256sum] = "057e4fc2a7706411e1014bf172e4f94b63a12f18412378fca8684ca92408825b" - -inherit autotools diff --git a/meta/recipes-extended/sudo/files/sudo.pam b/meta/recipes-extended/sudo/files/sudo.pam index 5bc26e7025..515eab0c6c 100644 --- a/meta/recipes-extended/sudo/files/sudo.pam +++ b/meta/recipes-extended/sudo/files/sudo.pam @@ -2,5 +2,5 @@ auth include common-auth account include common-account password include common-password -session required pam_keyinit.so revoke +session optional pam_keyinit.so revoke session required pam_limits.so diff --git a/meta/recipes-extended/sudo/sudo.inc b/meta/recipes-extended/sudo/sudo.inc index a25876b7fc..86a18be7e2 100644 --- a/meta/recipes-extended/sudo/sudo.inc +++ b/meta/recipes-extended/sudo/sudo.inc @@ -4,29 +4,40 @@ HOMEPAGE = "http://www.sudo.ws" BUGTRACKER = "http://www.sudo.ws/bugs/" SECTION = "admin" LICENSE = "ISC & BSD & Zlib" -LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=c16e542408abda013d672be8eb88d174 \ - file://plugins/sudoers/redblack.c;beginline=1;endline=41;md5=cfe41112f96c19a074934d128f45c693 \ - file://lib/util/reallocarray.c;beginline=3;endline=16;md5=85b0905b795d4d58bf2e00635649eec6 \ - file://lib/util/fnmatch.c;beginline=3;endline=27;md5=67f83ee9bd456557397082f8f1be0efd \ - file://lib/util/getcwd.c;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \ - file://lib/util/glob.c;beginline=6;endline=31;md5=5872733146b9eb0deb79e1f664815b85 \ - file://lib/util/snprintf.c;beginline=6;endline=34;md5=c82c1b3a5c32e08545c9ec5d71e41e50 \ - file://include/sudo_queue.h;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \ - file://lib/util/inet_pton.c;beginline=3;endline=17;md5=3970ab0518ab79cbd0bafb697f10b33a" +LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=828cd502ad216ff869bf83adf3301e02 \ + file://plugins/sudoers/redblack.c;beginline=1;endline=46;md5=03e35317699ba00b496251e0dfe9f109 \ + file://lib/util/reallocarray.c;beginline=3;endline=15;md5=397dd45c7683e90b9f8bf24638cf03bf \ + file://lib/util/fnmatch.c;beginline=3;endline=27;md5=004d7d2866ba1f5b41174906849d2e0f \ + file://lib/util/getcwd.c;beginline=2;endline=27;md5=50f8d9667750e18dea4e84a935c12009 \ + file://lib/util/glob.c;beginline=2;endline=31;md5=2852f68687544e3eb8a0a61665506f0e \ + file://lib/util/snprintf.c;beginline=3;endline=33;md5=b70df6179969e38fcf68da91b53b8029 \ + file://include/sudo_queue.h;beginline=2;endline=27;md5=ad578e9664d17a010b63e4bc0576ee8d \ + file://lib/util/inet_pton.c;beginline=3;endline=17;md5=27785c9f5835093eda42aa0816a2d0b4 \ + file://lib/util/arc4random.c;beginline=3;endline=20;md5=ced8636ecefa2ba907cfe390bc3bd964 \ + file://lib/util/arc4random_uniform.c;beginline=3;endline=17;md5=e30c2b777cdc00cfcaf7c445a10b262f \ + file://lib/util/getentropy.c;beginline=1;endline=19;md5=a0f58be3d60b6dcd898ec5fe0866d36f \ + " inherit autotools PACKAGECONFIG ??= "" PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib" +PACKAGECONFIG[pam-wheel] = ",,,pam-plugin-wheel" CONFFILES_${PN} = "${sysconfdir}/sudoers" -EXTRA_OECONF = "--with-editor=/bin/vi --with-env-editor" +EXTRA_OECONF = "--with-editor=${base_bindir}/vi --with-env-editor" EXTRA_OECONF_append_libc-musl = " --disable-hardening " # mksigname/mksiglist are used on build host to generate source files do_compile_prepend () { + # Remove build host references from sudo_usage.h + sed -i \ + -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \ + -e 's,--build=${BUILD_SYS},,g' \ + -e 's,--host=${HOST_SYS},,g' \ + ${B}/src/sudo_usage.h oe_runmake SSP_CFLAGS="" SSP_LDFLAGS="" CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS" CPPFLAGS="$BUILD_CPPFLAGS -I${S}/include -I${S} -I${B}" -C lib/util mksigname mksiglist } diff --git a/meta/recipes-extended/sudo/sudo/0001-Use-correct-path-to-init.d-and-tmpfiles.d-files.patch b/meta/recipes-extended/sudo/sudo/0001-Use-correct-path-to-init.d-and-tmpfiles.d-files.patch deleted file mode 100644 index 2418689dac..0000000000 --- a/meta/recipes-extended/sudo/sudo/0001-Use-correct-path-to-init.d-and-tmpfiles.d-files.patch +++ /dev/null @@ -1,31 +0,0 @@ -The makefile uses top_srcdir to find files that were created by configure, when -it should use top_builddir. - -Upstream-Status: Submitted (http://bugzilla.sudo.ws/show_bug.cgi?id=708) -Signed-off-by: Ross Burton <ross.burton@intel.com> - ---- - src/Makefile.in | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/Makefile.in b/src/Makefile.in -index f009e10..7acfb2d 100644 ---- a/src/Makefile.in -+++ b/src/Makefile.in -@@ -165,11 +165,11 @@ install-dirs: - - install-rc: install-dirs - if [ -n "$(INIT_SCRIPT)" ]; then \ -- $(INSTALL) $(INSTALL_OWNER) -m 0755 $(top_srcdir)/init.d/$(INIT_SCRIPT) $(DESTDIR)$(INIT_DIR)/sudo; \ -+ $(INSTALL) $(INSTALL_OWNER) -m 0755 $(top_builddir)/init.d/$(INIT_SCRIPT) $(DESTDIR)$(INIT_DIR)/sudo; \ - rm -f $(DESTDIR)$(RC_LINK); \ - ln -s $(INIT_DIR)/sudo $(DESTDIR)$(RC_LINK); \ - elif test -n "$(tmpfiles_d)"; then \ -- $(INSTALL) $(INSTALL_OWNER) -m 0644 $(top_srcdir)/init.d/sudo.conf $(DESTDIR)$(tmpfiles_d)/sudo.conf; \ -+ $(INSTALL) $(INSTALL_OWNER) -m 0644 $(top_builddir)/init.d/sudo.conf $(DESTDIR)$(tmpfiles_d)/sudo.conf; \ - fi - - install-binaries: install-dirs $(PROGS) --- -2.1.4 - diff --git a/meta/recipes-extended/sudo/sudo_1.8.14p3.bb b/meta/recipes-extended/sudo/sudo_1.8.14p3.bb deleted file mode 100644 index ea37aafc34..0000000000 --- a/meta/recipes-extended/sudo/sudo_1.8.14p3.bb +++ /dev/null @@ -1,34 +0,0 @@ -require sudo.inc - -SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \ - ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ - file://0001-Use-correct-path-to-init.d-and-tmpfiles.d-files.patch \ - " - -PAM_SRC_URI = "file://sudo.pam" - -SRC_URI[md5sum] = "93dbd1e47c136179ff1b01494c1c0e75" -SRC_URI[sha256sum] = "a8a697cbb113859058944850d098464618254804cf97961dee926429f00a1237" - -DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" -RDEPENDS_${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}" - -EXTRA_OECONF += " \ - ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-tmpfiles.d=${libdir}/tmpfiles.d', '--disable-tmpfiles.d', d)} \ - " - -do_install_append () { - if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then - install -D -m 664 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo - fi - - chmod 4111 ${D}${bindir}/sudo - chmod 0440 ${D}${sysconfdir}/sudoers - - # Explicitly remove the ${localstatedir}/run directory to avoid QA error - rmdir -p --ignore-fail-on-non-empty ${D}${localstatedir}/run/sudo -} - -FILES_${PN} += "${libdir}/tmpfiles.d" -FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/*.la" diff --git a/meta/recipes-extended/sudo/sudo_1.9.3.bb b/meta/recipes-extended/sudo/sudo_1.9.3.bb new file mode 100644 index 0000000000..270625ebe8 --- /dev/null +++ b/meta/recipes-extended/sudo/sudo_1.9.3.bb @@ -0,0 +1,47 @@ +require sudo.inc + +SRC_URI = "https://www.sudo.ws/dist/sudo-${PV}.tar.gz \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ + " + +PAM_SRC_URI = "file://sudo.pam" + +SRC_URI[sha256sum] = "1d9889cc3b3b15ed8c2c7c3de3aa392a3a726838d020815067c080525c3f5837" + +DEPENDS += " virtual/crypt ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" +RDEPENDS_${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}" + +CACHED_CONFIGUREVARS = " \ + ac_cv_type_rsize_t=no \ + ac_cv_path_MVPROG=${base_bindir}/mv \ + ac_cv_path_BSHELLPROG=${base_bindir}/sh \ + ac_cv_path_SENDMAILPROG=${sbindir}/sendmail \ + ac_cv_path_VIPROG=${base_bindir}/vi \ + " + +EXTRA_OECONF += " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-tmpfiles.d=${nonarch_libdir}/tmpfiles.d', '--disable-tmpfiles.d', d)} \ + --with-rundir=/run/sudo \ + --with-vardir=/var/lib/sudo \ + " + +do_install_append () { + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then + install -D -m 644 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo + if ${@bb.utils.contains('PACKAGECONFIG', 'pam-wheel', 'true', 'false', d)} ; then + echo 'auth required pam_wheel.so use_uid' >>${D}${sysconfdir}/pam.d/sudo + sed -i 's/# \(%wheel ALL=(ALL) ALL\)/\1/' ${D}${sysconfdir}/sudoers + fi + fi + + chmod 4111 ${D}${bindir}/sudo + chmod 0440 ${D}${sysconfdir}/sudoers + + # Explicitly remove the /sudo directory to avoid QA error + rmdir -p --ignore-fail-on-non-empty ${D}/run/sudo +} + +FILES_${PN} += "${nonarch_libdir}/tmpfiles.d" +FILES_${PN}-dev += "${libexecdir}/${BPN}/lib*${SOLIBSDEV} ${libexecdir}/${BPN}/*.la \ + ${libexecdir}/lib*${SOLIBSDEV} ${libexecdir}/*.la" diff --git a/meta/recipes-extended/sysklogd/files/0001-Makefile.am-fixup-issue-17.patch b/meta/recipes-extended/sysklogd/files/0001-Makefile.am-fixup-issue-17.patch new file mode 100644 index 0000000000..96365648d7 --- /dev/null +++ b/meta/recipes-extended/sysklogd/files/0001-Makefile.am-fixup-issue-17.patch @@ -0,0 +1,43 @@ +From a4a472c19eaaf03cc0e70797b2d24b540d6424e1 Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Wed, 3 Jun 2020 13:39:18 +0800 +Subject: [PATCH] Makefile.am: fixup issue #17 + +only make $(LIBOBJS) depend on $(LTLIBOBJS) still have race condition, +library like pidfile.o may be changed when compile or link for +libsyslog_la_LIBADD, which will cause problem like below: + +ERROR: dwarfsrcfiles failed with exit code 1 (cmd was ['dwarfsrcfiles', /tmp/work/ppc7400-oe-linux/sysklogd/2.1.2-r0/package/usr/lib/libsyslog.a']): +dwarfsrcfiles: tmp/work/ppc7400-oe-linux/sysklogd/2.1.2-r0/package/usr/lib/libsyslog.a: not a valid ELF file + +arm-oe-linux-gnueabi-libtool: link: arm-oe-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard --sysroot=TOPDIR/tmp-glibc/work/armv7vet2hf-neon-oe-linux-gnueabi/sysklogd/2.1.2-r0/recipe-sysroot -shared -fPIC -DPIC .libs/libsyslog_la-syslog.o ../lib/.libs/pidfile.o ../lib/.libs/strlcpy.o ../lib/.libs/strlcat.o -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard --sysroot=TOPDIR/tmp-glibc/work/armv7vet2hf-neon-oe-linux-gnueabi/sysklogd/2.1.2-r0/recipe-sysroot -O2 -g -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-soname -Wl,libsyslog.so.0 -o .libs/libsyslog.so.0.0.0 +arm-oe-linux-gnueabi-libtool: link: (cd ".libs" && rm -f "libsyslog.so.0" && ln -s "libsyslog.so.0.0.0" "libsyslog.so.0") +arm-oe-linux-gnueabi-libtool: link: (cd ".libs" && rm -f "libsyslog.so" && ln -s "libsyslog.so.0.0.0" "libsyslog.so") +arm-oe-linux-gnueabi-libtool: link: arm-oe-linux-gnueabi-gcc-ar cru .libs/libsyslog.a libsyslog_la-syslog.o ../lib/pidfile.o ../lib/strlcpy.o ../lib/strlcat.o +TOPDIR/tmp-glibc/work/armv7vet2hf-neon-oe-linux-gnueabi/sysklogd/2.1.2-r0/recipe-sysroot-native/usr/bin/arm-oe-linux-gnueabi/../../libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/10.1.0/ar: `u' modifier ignored since `D' is the default (see `U') +TOPDIR/tmp-glibc/work/armv7vet2hf-neon-oe-linux-gnueabi/sysklogd/2.1.2-r0/recipe-sysroot-native/usr/bin/arm-oe-linux-gnueabi/../../libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/10.1.0/ar: ../lib/strlcat.o: No such file or directory + +Upstream-Status: Submitted [https://github.com/troglobit/sysklogd/pull/23/commits/e684939559341cb1c6373dfc6469b59e580d80af] + +Signed-off-by: Changqing Li <changqing.li@windriver.com> +--- + src/Makefile.am | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index f8a6820..f45c773 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -66,6 +66,7 @@ libsyslog_la_LIBADD = $(LTLIBOBJS) + # ld: syslogd-syslogd.o: in function `main': syslogd.c:417: undefined + # reference to `__pidfile' + # +-# Work around the problem by building one .o from lib at a time, this +-# can be achieved by making LIBOBJS depend on LTLIBOBJS. +-$(LIBOBJS): $(LTLIBOBJS) ++# Work around the problem by make LIBOBJS depend on libsyslog.la, ++# so that LIBOBJS/syslogd/logger will start compile after libsyslog.la ++# is completed ++$(LIBOBJS): $(lib_LTLIBRARIES) +-- +2.17.1 diff --git a/meta/recipes-extended/sysklogd/files/no-strip-install.patch b/meta/recipes-extended/sysklogd/files/no-strip-install.patch deleted file mode 100644 index 00fba71017..0000000000 --- a/meta/recipes-extended/sysklogd/files/no-strip-install.patch +++ /dev/null @@ -1,17 +0,0 @@ -Upstream-Status: Inappropriate [configuration] - -Index: sysklogd-1.5/Makefile -=================================================================== ---- sysklogd-1.5.orig/Makefile 2009-06-09 13:02:41.000000000 +0200 -+++ sysklogd-1.5/Makefile 2009-06-09 13:03:06.000000000 +0200 -@@ -127,8 +127,8 @@ - rm -f syslogd klogd ksym syslog_tst oops_test TAGS tsyslogd tklogd - - install_exec: syslogd klogd -- ${INSTALL} -m 500 -s syslogd ${BINDIR}/syslogd -- ${INSTALL} -m 500 -s klogd ${BINDIR}/klogd -+ ${INSTALL} -m 500 syslogd ${BINDIR}/syslogd -+ ${INSTALL} -m 500 klogd ${BINDIR}/klogd - - install_man: - ${INSTALL} -m ${MAN_PERMS} sysklogd.8 ${MANDIR}/man8/sysklogd.8 diff --git a/meta/recipes-extended/sysklogd/files/no-vectorization.patch b/meta/recipes-extended/sysklogd/files/no-vectorization.patch deleted file mode 100644 index c1cc042c9c..0000000000 --- a/meta/recipes-extended/sysklogd/files/no-vectorization.patch +++ /dev/null @@ -1,20 +0,0 @@ -Upstream-Status: Inappropriate - -The compiler should not be generating vectorized instructions on this target. -This is a work around until I can determine why this is occuring on this -particular recipe - -Index: sysklogd-1.5/Makefile -=================================================================== ---- sysklogd-1.5.orig/Makefile -+++ sysklogd-1.5/Makefile -@@ -20,7 +20,8 @@ - CC= gcc - #SKFLAGS= -g -DSYSV -Wall - #LDFLAGS= -g --SKFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce -+SKFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce \ -+ -fno-tree-vectorize - # -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE - # -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE - # $(shell getconf LFS_SKFLAGS) diff --git a/meta/recipes-extended/sysklogd/files/sysklogd b/meta/recipes-extended/sysklogd/files/sysklogd index 258f882803..2a356a637a 100755 --- a/meta/recipes-extended/sysklogd/files/sysklogd +++ b/meta/recipes-extended/sysklogd/files/sysklogd @@ -18,9 +18,7 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin pidfile_syslogd=/var/run/syslogd.pid -pidfile_klogd=/var/run/klogd.pid -binpath_syslogd=/sbin/syslogd -binpath_klogd=/sbin/klogd +binpath_syslogd=/usr/sbin/syslogd test -x $binpath || exit 0 @@ -90,42 +88,46 @@ running() return 0 } +waitpid () +{ + pid=$1 + # Give pid a chance to exit before we restart with a 5s timeout in 1s intervals + if [ -z "$pid" ]; then + return + fi + timeout=5; + while [ $timeout -gt 0 ] + do + timeout=$(( $timeout-1 )) + kill -0 $pid 2> /dev/null || break + sleep 1 + done +} + case "$1" in start) log_begin_msg "Starting system log daemon..." create_xconsole start-stop-daemon --start --quiet --pidfile $pidfile_syslogd --name syslogd --startas $binpath_syslogd -- $SYSLOGD log_end_msg $? - log_begin_msg "Starting kernel log daemon..." - start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD - log_end_msg $? ;; stop) log_begin_msg "Stopping system log daemon..." start-stop-daemon --stop --quiet --pidfile $pidfile_syslogd --name syslogd log_end_msg $? - log_begin_msg "Stopping kernel log daemon..." - start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd - log_end_msg $? ;; reload|force-reload) log_begin_msg "Reloading system log daemon..." start-stop-daemon --stop --quiet --signal 1 --pidfile $pidfile_syslogd --name syslogd log_end_msg $? - log_begin_msg "Reloading kernel log daemon..." - start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd - start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD - log_end_msg $? ;; restart) log_begin_msg "Restarting system log daemon..." + pid=`cat $pidfile_syslogd 2> /dev/null` start-stop-daemon --stop --retry 5 --quiet --pidfile $pidfile_syslogd --name syslogd + waitpid $pid start-stop-daemon --start --quiet --pidfile $pidfile_syslogd --name syslogd --startas $binpath_syslogd -- $SYSLOGD log_end_msg $? - log_begin_msg "Reloading kernel log daemon..." - start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd - start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD - log_end_msg $? ;; reload-or-restart) if running @@ -138,8 +140,6 @@ case "$1" in status) status syslogd RETVAL=$? - status klogd - rval=$? [ $RETVAL -eq 0 ] && exit $rval exit $RETVAL ;; diff --git a/meta/recipes-extended/sysklogd/files/syslog.conf b/meta/recipes-extended/sysklogd/files/syslog.conf deleted file mode 100644 index 0849de1268..0000000000 --- a/meta/recipes-extended/sysklogd/files/syslog.conf +++ /dev/null @@ -1,71 +0,0 @@ -# /etc/syslog.conf Configuration file for syslogd. -# -# Ported from debian by Yu Ke <ke.yu@intel.com> -# - -# -# First some standard logfiles. Log by facility. -# - -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 - -# -# 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 - -# Logging for INN news system -# -news.crit /var/log/news.crit -news.err /var/log/news.err -news.notice -/var/log/news.notice - -# -# 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 - -# -# Emergencies are sent to everybody logged in. -# -*.emerg * - -# -# I like to have messages displayed on the console, but only on a virtual -# console I usually leave idle. -# -#daemon,mail.*;\ -#news.=crit;news.=err;news.=notice;\ -#*.=debug;*.=info;\ -#*.=notice;*.=warn /dev/tty8 - -# The named pipe /dev/xconsole is for the `xconsole' utility. To use it, -# you must invoke `xconsole' with the `-file' option: -# -# $ xconsole -file /dev/xconsole [...] -# -# NOTE: adjust the list below, or you'll go crazy if you have a reasonably -# busy site.. -# -daemon.*;mail.*;\ -news.err;\ -*.=debug;*.=info;\ -*.=notice;*.=warn |/dev/xconsole - diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc index bcf8aa7a96..162260f000 100644 --- a/meta/recipes-extended/sysklogd/sysklogd.inc +++ b/meta/recipes-extended/sysklogd/sysklogd.inc @@ -1,58 +1,54 @@ SUMMARY = "System Log Daemons" -DESCRIPTION = "The sysklogd package implements two system log daemons: syslogd, klogd" +DESCRIPTION = "The sysklogd package implements system log daemons: syslogd" HOMEPAGE = "http://www.infodrom.org/projects/sysklogd/" SECTION = "base" -LICENSE = "GPLv2+ & BSD" -LICENSE_syslogd = "BSD" -LICENSE_klogd = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \ - file://syslogd.c;beginline=2;endline=15;md5=77ffb2fec48c46d7ca0abb2d5813e7fd \ - file://klogd.c;beginline=2;endline=19;md5=7e87ed0ae6142de079bce738c10c899d \ +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=5b4be4b2549338526758ef479c040943 \ + file://src/syslogd.c;beginline=2;endline=15;md5=a880fecbc04503f071c494a9c0dd4f97 \ " -inherit update-rc.d update-alternatives +inherit update-rc.d update-alternatives systemd autotools -SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \ - file://no-strip-install.patch \ +SRC_URI = "git://github.com/troglobit/sysklogd.git;nobranch=1 \ file://sysklogd \ - file://syslog.conf \ + file://0001-Makefile.am-fixup-issue-17.patch \ " +S = "${WORKDIR}/git" -SRC_URI_append_e500v2 = " file://no-vectorization.patch" +EXTRA_OECONF = "--with-systemd=${systemd_system_unitdir} --without-logger" -INITSCRIPT_NAME = "syslog" -CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${BPN}" - -CFLAGS_append = " -DSYSV" - -do_install () { - install -d ${D}${mandir}/man8 \ - ${D}${mandir}/man5 \ - ${D}${base_sbindir} - oe_runmake 'BINDIR=${D}${base_sbindir}' \ - 'MANDIR=${D}${mandir}' install - install -d ${D}${sysconfdir} - install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf - install -d ${D}${sysconfdir}/init.d - install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog +do_install_append () { + install -d ${D}${sysconfdir} + install -m 644 ${S}/syslog.conf ${D}${sysconfdir}/syslog.conf + install -d ${D}${sysconfdir}/init.d + install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog } -# sysklogd package has no internal systemd support, so we weigh busybox's -# sysklogd utility over it in case of systemd -ALTERNATIVE_PRIORITY = "${@bb.utils.contains('DISTRO_FEATURES','systemd','10','100',d)}" +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE_${PN} = "syslogd.service" +SYSTEMD_AUTO_ENABLE = "enable" + +INITSCRIPT_NAME = "syslog" +CONFFILES_${PN} = "${sysconfdir}/syslog.conf" +RCONFLICTS_${PN} = "rsyslog busybox-syslog syslog-ng" + +FILES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/sysklogd.conf', '', d)}" -ALTERNATIVE_${PN} = "syslogd klogd syslog-init syslog-conf" +ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd" -ALTERNATIVE_LINK_NAME[klogd] = "${base_sbindir}/klogd" -ALTERNATIVE_LINK_NAME[syslog-init] = "${sysconfdir}/init.d/syslog" -ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf" +ALTERNATIVE_${PN}-doc = "syslogd.8" +ALTERNATIVE_LINK_NAME[syslogd.8] = "${mandir}/man8/syslogd.8" pkg_prerm_${PN} () { if test "x$D" = "x"; then if test "$1" = "upgrade" -o "$1" = "remove"; then - /etc/init.d/syslog stop + /etc/init.d/syslog stop || : fi fi } + +python () { + if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): + d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") +} diff --git a/meta/recipes-extended/sysklogd/sysklogd_1.5.1.bb b/meta/recipes-extended/sysklogd/sysklogd_1.5.1.bb deleted file mode 100644 index 975ecc2b63..0000000000 --- a/meta/recipes-extended/sysklogd/sysklogd_1.5.1.bb +++ /dev/null @@ -1,4 +0,0 @@ -require sysklogd.inc - -SRC_URI[md5sum] = "c70599ab0d037fde724f7210c2c8d7f8" -SRC_URI[sha256sum] = "5166c185ae23c92e8b9feee66a6e3d0bc944bf673112f53e3ecf62e08ce7c201" diff --git a/meta/recipes-extended/sysklogd/sysklogd_2.1.2.bb b/meta/recipes-extended/sysklogd/sysklogd_2.1.2.bb new file mode 100644 index 0000000000..2917c2aae0 --- /dev/null +++ b/meta/recipes-extended/sysklogd/sysklogd_2.1.2.bb @@ -0,0 +1,3 @@ +require sysklogd.inc + +SRCREV = "6d6010add698370fc7d9828f0aaa18613dd2397f" diff --git a/meta/recipes-extended/sysstat/sysstat.inc b/meta/recipes-extended/sysstat/sysstat.inc index 40630070d8..e5e134c038 100644 --- a/meta/recipes-extended/sysstat/sysstat.inc +++ b/meta/recipes-extended/sysstat/sysstat.inc @@ -4,43 +4,64 @@ HOMEPAGE = "http://sebastien.godard.pagesperso-orange.fr/" LICENSE = "GPLv2+" SECTION = "console/utils" -SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/sysstat-${PV}.tar.xz \ +SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/${BP}.tar.xz \ file://99_sysstat \ + file://sysstat.service \ " +UPSTREAM_CHECK_URI = "http://sebastien.godard.pagesperso-orange.fr/download.html" + DEPENDS += "base-passwd" -inherit autotools-brokensep gettext +# autotools-brokensep as this package doesn't use automake +inherit autotools-brokensep gettext systemd upstream-version-is-even + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" +PACKAGECONFIG[lm-sensors] = "--enable-sensors,--disable-sensors,lmsensors,lmsensors-libsensors" +PACKAGECONFIG[cron] = "--enable-install-cron --enable-copy-only,--disable-install-cron --disable-copy-only" +PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}" -EXTRA_OECONF += "--disable-sensors" -EXTRA_OEMAKE += 'LFLAGS=""' +EXTRA_OECONF += "--disable-stripping" do_configure_prepend() { - export sa_lib_dir=${libdir}/sa + export sa_lib_dir=${libexecdir}/sa } do_install() { autotools_do_install - # don't install /var/log/sa when populating rootfs. Do it through volatile + # Don't version the documentation + mv ${D}${docdir}/${BP} ${D}${docdir}/${BPN} + # don't install /var/log/sa when populating rootfs. Do it through volatile rm -rf ${D}/var - install -d ${D}/etc/default/volatiles - install -m 0644 ${WORKDIR}/99_sysstat ${D}/etc/default/volatiles + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + install -d ${D}/etc/default/volatiles + install -m 0644 ${WORKDIR}/99_sysstat ${D}/etc/default/volatiles + fi + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/tmpfiles.d + echo "d ${localstatedir}/log/sa - - - -" \ + > ${D}${sysconfdir}/tmpfiles.d/sysstat.conf + + # Unless both cron and systemd are enabled, install our own + # systemd unit file. Otherwise the package will install one. + if ${@bb.utils.contains('PACKAGECONFIG', 'cron systemd', 'false', 'true', d)}; then + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/sysstat.service ${D}${systemd_unitdir}/system + sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}${systemd_unitdir}/system/sysstat.service + fi + fi } pkg_postinst_${PN} () { - if [ -n "$D" ]; then - exit 0 - fi - if [ -e /etc/init.d/populate-volatile.sh ]; then - /etc/init.d/populate-volatile.sh update - fi + if [ ! -n "$D" ]; then + if [ -e /etc/init.d/populate-volatile.sh ]; then + /etc/init.d/populate-volatile.sh update + fi + fi } - -FILES_${PN} += "${libdir}/sa" -FILES_${PN}-dbg += "${libdir}/sa/.debug/" +FILES_${PN} += "${systemd_system_unitdir} ${nonarch_base_libdir}/systemd" TARGET_CC_ARCH += "${LDFLAGS}" -LDFLAGS_append_libc-uclibc = " -lintl" diff --git a/meta/recipes-extended/sysstat/sysstat/0001-configure.in-remove-check-for-chkconfig.patch b/meta/recipes-extended/sysstat/sysstat/0001-configure.in-remove-check-for-chkconfig.patch new file mode 100644 index 0000000000..4067bb983b --- /dev/null +++ b/meta/recipes-extended/sysstat/sysstat/0001-configure.in-remove-check-for-chkconfig.patch @@ -0,0 +1,31 @@ +From 1590cc614aaf0fb81cd804414d6c9d5a9227352c Mon Sep 17 00:00:00 2001 +From: Wenlin Kang <wenlin.kang@windriver.com> +Date: Tue, 5 Nov 2019 16:16:44 +0800 +Subject: [PATCH] configure.in: remove check for chkconfig + +chkconfig can't work on cross-platform, so should remove check for it. + +Upstream-Status: Inappropriate [ embedded specific ] + +Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com> +--- + configure.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/configure.in b/configure.in +index 48b9a31..cedeb43 100644 +--- a/configure.in ++++ b/configure.in +@@ -42,7 +42,8 @@ AC_SUBST(VER_JSON) + AC_SUBST(VER_XML) + + AC_PATH_PROG(PATH_CP, cp) +-AC_PATH_PROG(PATH_CHKCONFIG, chkconfig) ++#AC_PATH_PROG(PATH_CHKCONFIG, chkconfig) ++AC_SUBST(PATH_CHKCONFIG) + + # Check for systemd + AC_CHECK_PROG(PKG_CONFIG, pkg-config, pkg-config) +-- +1.9.1 + diff --git a/meta/recipes-extended/sysstat/sysstat/sysstat.service b/meta/recipes-extended/sysstat/sysstat/sysstat.service new file mode 100644 index 0000000000..ca46befb99 --- /dev/null +++ b/meta/recipes-extended/sysstat/sysstat/sysstat.service @@ -0,0 +1,12 @@ +[Unit] +Description=Resets System Activity Logs + +[Service] +Type=oneshot +RemainAfterExit=yes +User=root +ExecStart=@LIBEXECDIR@/sa/sa1 --boot + +[Install] +WantedBy=multi-user.target + diff --git a/meta/recipes-extended/sysstat/sysstat_11.1.5.bb b/meta/recipes-extended/sysstat/sysstat_11.1.5.bb deleted file mode 100644 index 69d2ec26bf..0000000000 --- a/meta/recipes-extended/sysstat/sysstat_11.1.5.bb +++ /dev/null @@ -1,7 +0,0 @@ -require sysstat.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" - -SRC_URI[md5sum] = "4d8e6e72d057189a1660462a678d9ada" -SRC_URI[sha256sum] = "feb3a90d86ffd69cf5b88144a8876ae05bd42384f559676f08100671589fa2bb" - diff --git a/meta/recipes-extended/sysstat/sysstat_12.4.0.bb b/meta/recipes-extended/sysstat/sysstat_12.4.0.bb new file mode 100644 index 0000000000..6773213a40 --- /dev/null +++ b/meta/recipes-extended/sysstat/sysstat_12.4.0.bb @@ -0,0 +1,7 @@ +require sysstat.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb" + +SRC_URI += "file://0001-configure.in-remove-check-for-chkconfig.patch" + +SRC_URI[sha256sum] = "78556c339795ecd07eb10ee09e3f5d52901d3a29f874ae92b45efd0de7b62d16" diff --git a/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch b/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch deleted file mode 100644 index da2ae3cb0f..0000000000 --- a/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch +++ /dev/null @@ -1,22 +0,0 @@ -Upstream-Status: Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624] - -This patch avoids heap overflow reported by : -http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624 - -This is a clean patch for the GPLv2 tar recipe. - -Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/25 - -Index: tar-1.17/lib/rtapelib.c -=================================================================== ---- tar-1.17.orig/lib/rtapelib.c -+++ tar-1.17/lib/rtapelib.c -@@ -570,7 +570,7 @@ rmt_read__ (int handle, char *buffer, si - - sprintf (command_buffer, "R%lu\n", (unsigned long) length); - if (do_command (handle, command_buffer) == -1 -- || (status = get_status (handle)) == SAFE_READ_ERROR) -+ || ((status = get_status (handle)) == SAFE_READ_ERROR) || (status > length)) - return SAFE_READ_ERROR; - - for (counter = 0; counter < status; counter += rlen, buffer += rlen) diff --git a/meta/recipes-extended/tar/tar-1.17/gcc43build.patch b/meta/recipes-extended/tar/tar-1.17/gcc43build.patch deleted file mode 100644 index f8059a0a89..0000000000 --- a/meta/recipes-extended/tar/tar-1.17/gcc43build.patch +++ /dev/null @@ -1,37 +0,0 @@ -Upstream-Status: Inappropriate [licensing] - -# Fix errors when built with gcc 4.3 -# Patch taken from Debian bug #452096 - -diff -urN tar-1.17.orig/lib/argp-fmtstream.h tar-1.17/lib/argp-fmtstream.h ---- tar-1.17.orig/lib/argp-fmtstream.h 2006-01-11 12:24:05.000000000 -0800 -+++ tar-1.17/lib/argp-fmtstream.h 2010-07-22 22:36:12.000000000 -0700 -@@ -198,7 +198,11 @@ - #endif - - #ifndef ARGP_FS_EI --#define ARGP_FS_EI extern inline -+ #if defined __GNUC_STDC_INLINE__ -+ #define ARGP_FS_EI extern inline __attribute__((__gnu_inline__)) -+ #else -+ #define ARGP_FS_EI extern inline -+ #endif - #endif - - ARGP_FS_EI size_t -diff -urN tar-1.17.orig/lib/argp.h tar-1.17/lib/argp.h ---- tar-1.17.orig/lib/argp.h 2007-03-30 00:09:11.000000000 -0700 -+++ tar-1.17/lib/argp.h 2010-07-22 22:38:44.000000000 -0700 -@@ -580,7 +580,11 @@ - # endif - - # ifndef ARGP_EI --# define ARGP_EI extern __inline__ -+# if defined __GNUC_STDC_INLINE__ -+# define ARGP_EI extern __inline__ __attribute__((__gnu_inline__)) -+# else -+# define ARGP_EI extern __inline__ -+# endif - # endif - - ARGP_EI void diff --git a/meta/recipes-extended/tar/tar-1.17/m4extensions.patch b/meta/recipes-extended/tar/tar-1.17/m4extensions.patch deleted file mode 100644 index 30534c29ce..0000000000 --- a/meta/recipes-extended/tar/tar-1.17/m4extensions.patch +++ /dev/null @@ -1,30 +0,0 @@ -Upstream-Status: Inappropriate [licensing] - -# Define AC_USE_SYSTEM_EXTENSIONS only if it was previously undefined. -# This is needed to configure correctly with newer versions of autoconf. - ---- tar-1.17/m4/extensions.m4.orig 2010-07-22 22:21:35.000000000 -0700 -+++ tar-1.17/m4/extensions.m4 2010-07-22 22:23:41.000000000 -0700 -@@ -1,4 +1,4 @@ --# serial 4 -*- Autoconf -*- -+# serial 5 -*- Autoconf -*- - # Enable extensions on systems that normally disable them. - - # Copyright (C) 2003, 2006 Free Software Foundation, Inc. -@@ -16,6 +16,7 @@ - # ------------------------ - # Enable extensions on systems that normally disable them, - # typically due to standards-conformance issues. -+m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [], [ - AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], - [ - AC_BEFORE([$0], [AC_COMPILE_IFELSE]) -@@ -48,7 +49,7 @@ - AC_DEFINE([__EXTENSIONS__]) - AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) - AC_DEFINE([_TANDEM_SOURCE]) --]) -+])]) - - # gl_USE_SYSTEM_EXTENSIONS - # ------------------------ diff --git a/meta/recipes-extended/tar/tar-replacement-native_1.28.bb b/meta/recipes-extended/tar/tar-replacement-native_1.28.bb deleted file mode 100644 index 071ede765b..0000000000 --- a/meta/recipes-extended/tar/tar-replacement-native_1.28.bb +++ /dev/null @@ -1,6 +0,0 @@ -require tar_${PV}.bb - -inherit native - -BPN = "tar" -EXTRAINSTALL = "" diff --git a/meta/recipes-extended/tar/tar.inc b/meta/recipes-extended/tar/tar.inc deleted file mode 100644 index 74169274f4..0000000000 --- a/meta/recipes-extended/tar/tar.inc +++ /dev/null @@ -1,51 +0,0 @@ -SUMMARY = "GNU file archiving program" -DESCRIPTION = "GNU tar saves many files together into a single tape \ -or disk archive, and can restore individual files from the archive." -HOMEPAGE = "http://www.gnu.org/software/tar/" -SECTION = "base" - -SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2" - -inherit autotools gettext texinfo - -EXTRA_OECONF += "DEFAULT_RMT_DIR=${base_sbindir}" - -# Let aclocal use the relative path for the m4 file rather than the -# absolute since tar has a lot of m4 files, otherwise there might -# be an "Argument list too long" error when it is built in a long/deep -# directory. -acpaths = "-I ./m4" - -EXTRAINSTALL = "do_install_extra" -EXTRAINSTALL_class-nativesdk = "" - -do_install () { - autotools_do_install - ln -s tar ${D}${bindir}/gtar - ${EXTRAINSTALL} -} - -do_install_extra () { - install -d ${D}${base_bindir} - mv ${D}${bindir}/tar ${D}${base_bindir}/tar - mv ${D}${bindir}/gtar ${D}${base_bindir}/gtar - rmdir ${D}${bindir}/ -} - -PACKAGES =+ "${PN}-rmt" - -FILES_${PN}-rmt = "${base_sbindir}/rmt*" - -inherit update-alternatives - -ALTERNATIVE_PRIORITY = "100" - -ALTERNATIVE_${PN} = "tar" -ALTERNATIVE_${PN}-rmt = "rmt" -ALTERNATIVE_${PN}_class-nativesdk = "" -ALTERNATIVE_${PN}-rmt_class-nativesdk = "" - -ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar" -ALTERNATIVE_LINK_NAME[rmt] = "${base_sbindir}/rmt" - -BBCLASSEXTEND = "nativesdk" diff --git a/meta/recipes-extended/tar/tar/musl_dirent.patch b/meta/recipes-extended/tar/tar/musl_dirent.patch new file mode 100644 index 0000000000..2d98ed1310 --- /dev/null +++ b/meta/recipes-extended/tar/tar/musl_dirent.patch @@ -0,0 +1,19 @@ +musl has valid d_ino implementation + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Pending + +Index: tar-1.28/m4/d-ino.m4 +=================================================================== +--- tar-1.28.orig/m4/d-ino.m4 ++++ tar-1.28/m4/d-ino.m4 +@@ -40,7 +40,8 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_ + [gl_cv_struct_dirent_d_ino=no], + [case "$host_os" in + # Guess yes on glibc systems with Linux kernel. +- linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;; ++ linux*-gnu*|linux*-musl*) ++ gl_cv_struct_dirent_d_ino="guessing yes" ;; + # Guess no on native Windows. + mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;; + # If we don't know, assume the worst. diff --git a/meta/recipes-extended/tar/tar/remove-gets.patch b/meta/recipes-extended/tar/tar/remove-gets.patch deleted file mode 100644 index 0b8be39eed..0000000000 --- a/meta/recipes-extended/tar/tar/remove-gets.patch +++ /dev/null @@ -1,22 +0,0 @@ -ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ removed it - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - -Upstream-Status: Pending -Index: tar-1.27/gnu/stdio.in.h -=================================================================== ---- tar-1.27.orig/gnu/stdio.in.h 2013-06-29 08:54:26.000000000 +0300 -+++ tar-1.27/gnu/stdio.in.h 2013-10-16 15:22:46.977204737 +0300 -@@ -710,10 +710,12 @@ - /* It is very rare that the developer ever has full control of stdin, - so any use of gets warrants an unconditional warning; besides, C11 - removed it. */ -+#if defined gets - #undef gets - #if HAVE_RAW_DECL_GETS - _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); - #endif -+#endif - - - #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ diff --git a/meta/recipes-extended/tar/tar_1.17.bb b/meta/recipes-extended/tar/tar_1.17.bb deleted file mode 100644 index b9ca2063df..0000000000 --- a/meta/recipes-extended/tar/tar_1.17.bb +++ /dev/null @@ -1,14 +0,0 @@ -require tar.inc - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" - -PR = "r3" - -SRC_URI += "file://m4extensions.patch \ - file://gcc43build.patch \ - file://avoid_heap_overflow.patch \ - " - -SRC_URI[md5sum] = "c6c4f1c075dbf0f75c29737faa58f290" -SRC_URI[sha256sum] = "19f9021dda51a16295e4706e80870e71f87107675e51c176a491eba0fc4ca492" diff --git a/meta/recipes-extended/tar/tar_1.28.bb b/meta/recipes-extended/tar/tar_1.28.bb deleted file mode 100644 index 8816000399..0000000000 --- a/meta/recipes-extended/tar/tar_1.28.bb +++ /dev/null @@ -1,12 +0,0 @@ -require tar.inc - -PACKAGECONFIG ??= "" -PACKAGECONFIG[acl] = "--with-posix-acls, --without-posix-acls, acl," - -LICENSE = "GPLv3" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -SRC_URI += "file://remove-gets.patch \ - " -SRC_URI[md5sum] = "8f32b2bc1ed7ddf4cf4e4a39711341b0" -SRC_URI[sha256sum] = "60e4bfe0602fef34cd908d91cf638e17eeb09394d7b98c2487217dc4d3147562" diff --git a/meta/recipes-extended/tar/tar_1.32.bb b/meta/recipes-extended/tar/tar_1.32.bb new file mode 100644 index 0000000000..ebe6cb0dbd --- /dev/null +++ b/meta/recipes-extended/tar/tar_1.32.bb @@ -0,0 +1,66 @@ +SUMMARY = "GNU file archiving program" +DESCRIPTION = "GNU tar saves many files together into a single tape \ +or disk archive, and can restore individual files from the archive." +HOMEPAGE = "http://www.gnu.org/software/tar/" +SECTION = "base" +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2 \ + file://musl_dirent.patch \ +" + +SRC_URI[md5sum] = "17917356fff5cb4bd3cd5a6c3e727b05" +SRC_URI[sha256sum] = "e4bb9e08e12e7fa9f11fef544efc85e59ba34538593d9ad38148c7ca2bfbb566" + +inherit autotools gettext texinfo + +PACKAGECONFIG ??= "" +PACKAGECONFIG_append_class-target = " ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)}" + +PACKAGECONFIG[acl] = "--with-posix-acls,--without-posix-acls,acl" + +EXTRA_OECONF += "DEFAULT_RMT_DIR=${sbindir}" + +CACHED_CONFIGUREVARS += "tar_cv_path_RSH=no" + +# Let aclocal use the relative path for the m4 file rather than the +# absolute since tar has a lot of m4 files, otherwise there might +# be an "Argument list too long" error when it is built in a long/deep +# directory. +acpaths = "-I ./m4" + +do_install () { + autotools_do_install + ln -s tar ${D}${bindir}/gtar +} + +do_install_append_class-target() { + if [ "${base_bindir}" != "${bindir}" ]; then + install -d ${D}${base_bindir} + mv ${D}${bindir}/tar ${D}${base_bindir}/tar + mv ${D}${bindir}/gtar ${D}${base_bindir}/gtar + rmdir ${D}${bindir}/ + fi +} + +PACKAGES =+ "${PN}-rmt" + +FILES_${PN}-rmt = "${sbindir}/rmt*" + +inherit update-alternatives + +ALTERNATIVE_PRIORITY = "100" + +ALTERNATIVE_${PN} = "tar" +ALTERNATIVE_${PN}-rmt = "rmt" +ALTERNATIVE_${PN}_class-nativesdk = "" +ALTERNATIVE_${PN}-rmt_class-nativesdk = "" + +ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar" +ALTERNATIVE_LINK_NAME[rmt] = "${sbindir}/rmt" + +PROVIDES_append_class-native = " tar-replacement-native" +NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-build-with-clang.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-build-with-clang.patch new file mode 100644 index 0000000000..9d1e05d7f4 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-build-with-clang.patch @@ -0,0 +1,65 @@ +From 7f8878ac1aaf4a19992d39379797c151301bedb1 Mon Sep 17 00:00:00 2001 +From: Oleksiy Obitotskyy <oobitots@cisco.com> +Date: Mon, 5 Feb 2018 08:29:10 -0800 +Subject: [PATCH] Fix build with clang + +Fix "error: non-void function 'fix_options' should return a value". +Add function prototype to tcpd.c and miscd.c. + +Upstream-Status: Pending + +Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com> +--- + v2 - add function prototypes + + fix_options.c | 2 +- + miscd.c | 4 ++++ + tcpd.c | 4 ++++ + 3 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/fix_options.c b/fix_options.c +index b5e81b8..9958ff4 100644 +--- a/fix_options.c ++++ b/fix_options.c +@@ -29,7 +29,7 @@ static char sccsid[] = "@(#) fix_options.c 1.6 97/04/08 02:29:19"; + + /* fix_options - get rid of IP-level socket options */ + +-fix_options(request) ++void fix_options(request) + struct request_info *request; + { + #ifdef IP_OPTIONS +diff --git a/miscd.c b/miscd.c +index 1ab835c..723b83a 100644 +--- a/miscd.c ++++ b/miscd.c +@@ -40,6 +40,10 @@ static char sccsid[] = "@(#) miscd.c 1.10 96/02/11 17:01:30"; + #include "patchlevel.h" + #include "tcpd.h" + ++#ifdef KILL_IP_OPTIONS ++void fix_options(struct request_info *); ++#endif ++ + int allow_severity = SEVERITY; /* run-time adjustable */ + int deny_severity = LOG_WARNING; /* ditto */ + +diff --git a/tcpd.c b/tcpd.c +index d865b9c..a179891 100644 +--- a/tcpd.c ++++ b/tcpd.c +@@ -38,6 +38,10 @@ static char sccsid[] = "@(#) tcpd.c 1.10 96/02/11 17:01:32"; + #include "patchlevel.h" + #include "tcpd.h" + ++#ifdef KILL_IP_OPTIONS ++void fix_options(struct request_info *); ++#endif ++ + int allow_severity = SEVERITY; /* run-time adjustable */ + int deny_severity = LOG_WARNING; /* ditto */ + +-- +2.10.3.dirty + diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Remove-fgets-extern-declaration.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Remove-fgets-extern-declaration.patch new file mode 100644 index 0000000000..88c8d9cae7 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Remove-fgets-extern-declaration.patch @@ -0,0 +1,43 @@ +From 24d10919b4bc5e37a2d80b274d2cd2ee77b03549 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 13 Jan 2020 14:25:47 -0800 +Subject: [PATCH] Remove fgets() extern declaration + +These sources already include <stdio.h> which should bring the correct +declaration + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + hosts_access.c | 1 - + misc.c | 2 -- + 2 files changed, 3 deletions(-) + +diff --git a/hosts_access.c b/hosts_access.c +index 329b35e..0133e5e 100644 +--- a/hosts_access.c ++++ b/hosts_access.c +@@ -44,7 +44,6 @@ static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22"; + #include <netdb.h> + #endif + +-extern char *fgets(); + extern int errno; + + #ifndef INADDR_NONE +diff --git a/misc.c b/misc.c +index 74ca319..9a5e73a 100644 +--- a/misc.c ++++ b/misc.c +@@ -18,8 +18,6 @@ static char sccsic[] = "@(#) misc.c 1.2 96/02/11 17:01:29"; + + #include "tcpd.h" + +-extern char *fgets(); +- + #ifndef INADDR_NONE + #define INADDR_NONE (-1) /* XXX should be 0xffffffff */ + #endif +-- +2.24.1 + diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch index e8289e44d9..d473fb6342 100644 --- a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch @@ -1,9 +1,10 @@ Upstream-Status: Backport -diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile ---- tcp_wrappers_7.6.orig/Makefile 2003-08-21 01:43:39.000000000 +0200 -+++ tcp_wrappers_7.6/Makefile 2003-08-21 01:43:35.000000000 +0200 -@@ -45,7 +45,7 @@ +Index: tcp_wrappers_7.6/Makefile +=================================================================== +--- tcp_wrappers_7.6.orig/Makefile ++++ tcp_wrappers_7.6/Makefile +@@ -45,7 +45,7 @@ what: # # SysV.4 Solaris 2.x OSF AIX #REAL_DAEMON_DIR=/usr/sbin @@ -12,7 +13,7 @@ diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile # BSD 4.4 #REAL_DAEMON_DIR=/usr/libexec # -@@ -512,6 +519,7 @@ +@@ -513,6 +513,7 @@ VSYSLOG = -Dvsyslog=myvsyslog # (examples: allow, deny, banners, twist and spawn). # #STYLE = -DPROCESS_OPTIONS # Enable language extensions. @@ -20,7 +21,7 @@ diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile ################################################################ # Optional: Changing the default disposition of logfile records -@@ -535,6 +543,7 @@ +@@ -536,6 +537,7 @@ VSYSLOG = -Dvsyslog=myvsyslog # The LOG_XXX names below are taken from the /usr/include/syslog.h file. FACILITY= LOG_MAIL # LOG_MAIL is what most sendmail daemons use @@ -28,7 +29,7 @@ diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile # The syslog priority at which successful connections are logged. -@@ -631,6 +640,7 @@ +@@ -632,6 +634,7 @@ TABLES = -DHOSTS_DENY=\"/etc/hosts.deny\ # lookups altogether, see the next section. PARANOID= -DPARANOID @@ -36,7 +37,7 @@ diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile ######################################## # Optional: turning off hostname lookups -@@ -644,6 +654,7 @@ +@@ -645,6 +648,7 @@ PARANOID= -DPARANOID # mode (see previous section) and comment out the following definition. HOSTNAME= -DALWAYS_HOSTNAME @@ -44,7 +45,7 @@ diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile ############################################# # Optional: Turning on host ADDRESS checking -@@ -670,6 +681,7 @@ +@@ -671,6 +675,7 @@ HOSTNAME= -DALWAYS_HOSTNAME # Solaris 2.x, and Linux. See your system documentation for details. # # KILL_OPT= -DKILL_IP_OPTIONS @@ -52,7 +53,7 @@ diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile ## End configuration options ############################ -@@ -677,9 +689,10 @@ +@@ -678,9 +683,10 @@ HOSTNAME= -DALWAYS_HOSTNAME # Protection against weird shells or weird make programs. SHELL = /bin/sh @@ -65,7 +66,7 @@ diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile $(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \ -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \ -DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \ -@@ -712,10 +725,11 @@ +@@ -713,11 +719,12 @@ all other: config-check tcpd tcpdmatch t config-check: @set +e; test -n "$(REAL_DAEMON_DIR)" || { make; exit 1; } @@ -81,3 +82,4 @@ diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile + @if [ ! -d shared ]; then mkdir shared; fi $(LIB): $(LIB_OBJ) + rm -f $(LIB) diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/fix_warnings.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/fix_warnings.patch new file mode 100644 index 0000000000..965544cc0b --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/fix_warnings.patch @@ -0,0 +1,25 @@ +Compile warning fixes from Debian + +Signed-off-by: Adrian Bunk <bunk@stusta.de> +Upstream-Status: Inappropriate [upstream is dead] + +--- a/options.c ++++ b/options.c +@@ -41,6 +41,7 @@ static char sccsid[] = "@(#) options.c 1 + #include <netinet/in.h> + #include <netdb.h> + #include <stdio.h> ++#include <unistd.h> + #include <syslog.h> + #include <pwd.h> + #include <grp.h> +--- a/scaffold.c ++++ b/scaffold.c +@@ -17,6 +17,7 @@ static char sccs_id[] = "@(#) scaffold.c + #include <arpa/inet.h> + #include <netdb.h> + #include <stdio.h> ++#include <stdlib.h> + #include <syslog.h> + #include <setjmp.h> + #include <string.h> diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/fix_warnings2.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/fix_warnings2.patch new file mode 100644 index 0000000000..27157a2e6d --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/fix_warnings2.patch @@ -0,0 +1,200 @@ +Compile warning fixes from Debian + +Signed-off-by: Adrian Bunk <bunk@stusta.de> +Upstream-Status: Inappropriate [upstream is dead] + +--- a/clean_exit.c ++++ b/clean_exit.c +@@ -13,6 +13,7 @@ static char sccsid[] = "@(#) clean_exit. + #endif + + #include <stdio.h> ++#include <unistd.h> + + extern void exit(); + +--- a/hosts_access.c ++++ b/hosts_access.c +@@ -34,6 +34,7 @@ static char sccsid[] = "@(#) hosts_acces + #include <netinet/in.h> + #include <arpa/inet.h> + #include <stdio.h> ++#include <stdlib.h> + #include <syslog.h> + #include <ctype.h> + #include <errno.h> +--- a/misc.c ++++ b/misc.c +@@ -13,6 +13,7 @@ static char sccsic[] = "@(#) misc.c 1.2 + #include <netinet/in.h> + #include <arpa/inet.h> + #include <stdio.h> ++#include <stdlib.h> + #include <string.h> + + #include "tcpd.h" +--- a/options.c ++++ b/options.c +@@ -41,6 +41,7 @@ static char sccsid[] = "@(#) options.c 1 + #include <netinet/in.h> + #include <netdb.h> + #include <stdio.h> ++#include <stdlib.h> + #include <unistd.h> + #include <syslog.h> + #include <pwd.h> +--- a/percent_x.c ++++ b/percent_x.c +@@ -17,6 +17,7 @@ static char sccsid[] = "@(#) percent_x.c + /* System libraries. */ + + #include <stdio.h> ++#include <unistd.h> + #include <syslog.h> + #include <string.h> + +--- a/rfc931.c ++++ b/rfc931.c +@@ -16,6 +16,7 @@ static char sccsid[] = "@(#) rfc931.c 1. + /* System libraries. */ + + #include <stdio.h> ++#include <unistd.h> + #include <syslog.h> + #include <sys/types.h> + #include <sys/socket.h> +--- a/tcpd.c ++++ b/tcpd.c +@@ -22,6 +22,7 @@ static char sccsid[] = "@(#) tcpd.c 1.10 + #include <sys/socket.h> + #include <netinet/in.h> + #include <stdio.h> ++#include <unistd.h> + #include <syslog.h> + #include <string.h> + +--- a/update.c ++++ b/update.c +@@ -20,6 +20,7 @@ static char sccsid[] = "@(#) update.c 1. + /* System libraries */ + + #include <stdio.h> ++#include <unistd.h> + #include <syslog.h> + #include <string.h> + +--- a/fakelog.c ++++ b/fakelog.c +@@ -17,7 +17,7 @@ static char sccsid[] = "@(#) fakelog.c 1 + + /* ARGSUSED */ + +-openlog(name, logopt, facility) ++void openlog(name, logopt, facility) + char *name; + int logopt; + int facility; +@@ -27,7 +27,7 @@ int facility; + + /* vsyslog - format one record */ + +-vsyslog(severity, fmt, ap) ++void vsyslog(severity, fmt, ap) + int severity; + char *fmt; + va_list ap; +@@ -43,7 +43,7 @@ va_list ap; + + /* VARARGS */ + +-VARARGS(syslog, int, severity) ++void VARARGS(syslog, int, severity) + { + va_list ap; + char *fmt; +@@ -56,7 +56,7 @@ VARARGS(syslog, int, severity) + + /* closelog - dummy */ + +-closelog() ++void closelog() + { + /* void */ + } +--- a/safe_finger.c ++++ b/safe_finger.c +@@ -22,10 +22,15 @@ static char sccsid[] = "@(#) safe_finger + + #include <sys/types.h> + #include <sys/stat.h> ++#include <sys/wait.h> ++#include <fcntl.h> + #include <signal.h> + #include <stdio.h> ++#include <stdlib.h> ++#include <unistd.h> + #include <ctype.h> + #include <pwd.h> ++#include <grp.h> + #include <syslog.h> + + extern void exit(); +@@ -52,7 +59,7 @@ int sig; + exit(0); + } + +-main(argc, argv) ++int main(argc, argv) + int argc; + char **argv; + { +--- a/tcpdchk.c ++++ b/tcpdchk.c +@@ -28,6 +28,8 @@ static char sccsid[] = "@(#) tcpdchk.c 1 + #include <netinet/in.h> + #include <arpa/inet.h> + #include <stdio.h> ++#include <stdlib.h> ++#include <unistd.h> + #include <syslog.h> + #include <setjmp.h> + #include <errno.h> +--- a/tcpdmatch.c ++++ b/tcpdmatch.c +@@ -26,6 +26,7 @@ static char sccsid[] = "@(#) tcpdmatch.c + #include <arpa/inet.h> + #include <netdb.h> + #include <stdio.h> ++#include <unistd.h> + #include <syslog.h> + #include <setjmp.h> + #include <string.h> +--- a/try-from.c ++++ b/try-from.c +@@ -37,7 +37,7 @@ static char sccsid[] = "@(#) try-from.c + int allow_severity = SEVERITY; /* run-time adjustable */ + int deny_severity = LOG_WARNING; /* ditto */ + +-main(argc, argv) ++int main(argc, argv) + int argc; + char **argv; + { +--- a/inetcf.c ++++ b/inetcf.c +@@ -12,6 +12,7 @@ static char sccsid[] = "@(#) inetcf.c 1. + #include <sys/types.h> + #include <sys/stat.h> + #include <stdio.h> ++#include <stdlib.h> + #include <errno.h> + #include <string.h> + +@@ -20,6 +21,7 @@ extern void exit(); + + #include "tcpd.h" + #include "inetcf.h" ++#include "scaffold.h" + + /* + * Network configuration files may live in unusual places. Here are some diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/musl-decls.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/musl-decls.patch new file mode 100644 index 0000000000..eee640e8a8 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/musl-decls.patch @@ -0,0 +1,31 @@ +__BEGIN_DECLS/__END_DECLS are BSD specific and not defined in musl +glibc and uclibc had sys/cdefs.h doing it. + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Index: tcp_wrappers_7.6/tcpd.h +=================================================================== +--- tcp_wrappers_7.6.orig/tcpd.h ++++ tcp_wrappers_7.6/tcpd.h +@@ -11,7 +11,9 @@ + #include <netinet/in.h> + #include <stdio.h> + +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + /* Structure to describe one communications endpoint. */ + +@@ -252,6 +254,8 @@ extern char *fix_strtok(); + extern char *my_strtok(); + #endif + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb index 2630478284..e903b9db14 100644 --- a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb @@ -1,12 +1,14 @@ SUMMARY = "Security tool that is a wrapper for TCP daemons" +HOMEPAGE = "http://www.softpanorama.org/Net/Network_security/TCP_wrappers/" DESCRIPTION = "Tools for monitoring and filtering incoming requests for tcp \ services." SECTION = "console/network" -LICENSE = "BSD" +LICENSE = "BSD-1-Clause" LIC_FILES_CHKSUM = "file://DISCLAIMER;md5=071bd69cb78b18888ea5e3da5c3127fa" PR ="r10" +DEPENDS += "libnsl2" PACKAGES = "${PN}-dbg libwrap libwrap-doc libwrap-dev libwrap-staticdev ${PN} ${PN}-doc" FILES_libwrap = "${base_libdir}/lib*${SOLIBS}" @@ -16,7 +18,7 @@ FILES_libwrap-staticdev = "${libdir}/lib*.a" FILES_${PN} = "${sbindir}" FILES_${PN}-doc = "${mandir}/man8" -SRC_URI = "ftp://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \ +SRC_URI = "http://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \ file://00_man_quoting.diff \ file://01_man_portability.patch \ file://05_wildcard_matching.patch \ @@ -43,6 +45,11 @@ SRC_URI = "ftp://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \ file://try-from.8 \ file://safe_finger.8 \ file://makefile-fix-parallel.patch \ + file://musl-decls.patch \ + file://0001-Fix-build-with-clang.patch \ + file://fix_warnings.patch \ + file://fix_warnings2.patch \ + file://0001-Remove-fgets-extern-declaration.patch \ " SRC_URI[md5sum] = "e6fa25f71226d090f34de3f6b122fb5a" @@ -64,7 +71,6 @@ EXTRA_OEMAKE = "'CC=${CC}' \ 'KILL_OPT=-DKILL_IP_OPTIONS' \ 'UMASK=-DDAEMON_UMASK=022' \ 'NETGROUP=${EXTRA_OEMAKE_NETGROUP}' \ - 'LIBS=-lnsl' \ 'ARFLAGS=rv' \ 'AUX_OBJ=weak_symbols.o' \ 'TLI=' \ @@ -72,7 +78,9 @@ EXTRA_OEMAKE = "'CC=${CC}' \ 'EXTRA_CFLAGS=${CFLAGS} -DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len'" EXTRA_OEMAKE_NETGROUP = "-DNETGROUP -DUSE_GETDOMAIN" -EXTRA_OEMAKE_NETGROUP_libc-uclibc = "-DUSE_GETDOMAIN" +EXTRA_OEMAKE_NETGROUP_libc-musl = "-DUSE_GETDOMAIN" + +EXTRA_OEMAKE_append_libc-musl = " 'LIBS='" do_compile () { oe_runmake 'TABLES=-DHOSTS_DENY=\"${sysconfdir}/hosts.deny\" -DHOSTS_ALLOW=\"${sysconfdir}/hosts.allow\"' \ diff --git a/meta/recipes-extended/texi2html/texi2html_5.0.bb b/meta/recipes-extended/texi2html/texi2html_5.0.bb deleted file mode 100644 index eac289e3b5..0000000000 --- a/meta/recipes-extended/texi2html/texi2html_5.0.bb +++ /dev/null @@ -1,28 +0,0 @@ -SUMMARY = "Perl script that converts Texinfo to HTML" -HOMEPAGE = "http://www.nongnu.org/texi2html/" -SECTION = "console/utils" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" - -PR = "r2" - -SRC_URI = "${SAVANNAH_GNU_MIRROR}/texi2html/${BPN}-${PV}.tar.bz2 \ - " - -SRC_URI[md5sum] = "f15ac876fcdc8be865b16535f480aa54" -SRC_URI[sha256sum] = "e8a98b0ee20c495a6ab894398a065ef580272dbd5a15b1b19e8bd1bc89d9f9fa" - -inherit autotools gettext texinfo - -do_configure_prepend() { - # autotools_do_configure updates po/Makefile.in.in, we also need - # update po_document. - cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po_document/ - cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po_messages/ -} - -do_install_append () { - sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/texi2html -} - -FILES_${PN}-doc += "${datadir}/texinfo" diff --git a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb index b5420a3e5f..ec04bfe390 100644 --- a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb +++ b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb @@ -1,4 +1,4 @@ -DESCRIPTION = "Fake version of the texinfo utility suite" +SUMMARY = "Fake version of the texinfo utility suite" SECTION = "console/utils" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=d6bb62e73ca8b901d3f2e9d71542f4bb" @@ -9,19 +9,21 @@ SRC_URI = "file://template.py file://COPYING" S = "${WORKDIR}" -NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}" - inherit native +# +# To avoid texinfo-dummy-native and texinfo-native conflicting we install to base_bindir +# which is later in PATH than bindir where texinfo-native installs +# do_install_name() { - FILENAME="${D}${bindir}/$1" + FILENAME="${D}${base_bindir}/$1" # Using ln causes problems with rm_work cp -T "${S}/template.py" "$FILENAME" chmod +x $FILENAME } do_install() { - mkdir -p "${D}${bindir}" + mkdir -p "${D}${base_bindir}" for i in makeinfo pod2texi texi2dvi pdftexi2dvi texindex texi2pdf \ txixml2texi texi2any install-info ginstall-info \ update-info-dir; do diff --git a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py index 8b7033eccc..86c7c1811a 100644 --- a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py +++ b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python2.7 +#! /usr/bin/env python3 # template.py (and other filenames) # By Max Eliaser (max.eliaser@intel.com) @@ -28,26 +28,23 @@ # of the executable from argv[0] and emulate the corresponding program, so # multiple copies of this script will exist under different names. -import sys, os +import sys, os, argparse -olong = "--output=" -Elong = "--macro-expand=" - -this_binary = sys.argv[0].split ("/")[-1] +this_binary = sys.argv[0].split("/")[-1] # To be outputted if functionality that hasn't been stubbed yet is invoked. stub_msg = """ -This stand-in version of %s is not yet fully capable of emulating the real -version from the GNU texinfo suite. If you see this message, file a bug report -with details on the recipe that failed. +This stand-in version of %s is not yet fully capable of emulating +the real version from the GNU texinfo suite. If you see this message, file a +bug report with details on the recipe that failed. """ % this_binary # Autotools setups query the version, so this is actually necessary. Some of # them (lookin' at you, glibc) actually look for the substring "GNU texinfo," # so we put that substring in there without actually telling a lie. -version_str = """ %s (fake texinfo, emulating GNU texinfo) 5.2 - +version_str = """%s (fake texinfo, emulating GNU texinfo) 5.2 + Super amazing version which is totally not fake in any way whatsoever. Copyright (C) 2014 Intel Corp. Distributed under the terms of the MIT license. @@ -55,63 +52,45 @@ license. simple_binaries = "pod2texi texi2dvi pdftexi2dvi texindex texi2pdf \ txixml2texi install-info ginstall-info \ - update-info-dir".split () + update-info-dir".split() # These utilities use a slightly different set of options and flags. -complex_binaries = "makeinfo texi2any".split () +complex_binaries = "makeinfo texi2any".split() valid_binaries = simple_binaries + complex_binaries -# For generating blank output files. -def touch_file (path): - f = open (path, "w") - f.close () - assert this_binary in valid_binaries, \ - this_binary + " is not one of " + ', '.join (valid_binaries) - -if "--version" in sys.argv: - print version_str - sys.exit (0) + this_binary + " is not one of " + ', '.join(valid_binaries) # For debugging log_interceptions = False if log_interceptions: - f = open ("/tmp/intercepted_" + this_binary, "a") - f.write (' '.join ([this_binary] + sys.argv[1:]) + '\n') - f.close () + with open("/tmp/intercepted_" + this_binary, "a") as f: + f.write(' '.join([this_binary] + sys.argv[1:]) + '\n') # Look through the options and flags, and if necessary, touch any output # files. -arg_idx = 1 -while arg_idx < len (sys.argv): - arg = sys.argv [arg_idx] - - if arg == "--": - break - - # Something like -I . can result in a need for this (specifically the .) - elif len (arg) < 2: +p = argparse.ArgumentParser() +if this_binary in complex_binaries: + p.add_argument('-E', '--macro-expand', metavar='FILE') +p.add_argument('-o', '--output', metavar='DEST') +p.add_argument('--version', action='store_true') + +args, unknown = p.parse_known_args() + +if args.version: + print(version_str) + sys.exit(0) + +# Check for functionality that isn't implemented yet. +assert not getattr(args, 'macro_expand', None), \ + "-E/--macro-expand option not yet supported" + stub_msg + +# Check if -o or --output is specified. +if args.output: + with open(args.output, 'w'): pass - - # Check if -o or --output is specified. These can be used at most once. - elif arg[0] == '-' and arg[1] != '-' and arg[len (arg) - 1] == 'o': - touch_file (sys.argv[arg_idx + 1]) - sys.exit (0) - elif arg.startswith (olong): - touch_file (arg.split ("=")[1]) - sys.exit (0) - - # Check for functionality that isn't implemented yet. - else: - assert arg[0] != '-' or arg[1] == '-' or 'E' not in arg or \ - this_binary in simple_binaries, \ - "-E option not yet supported" + stub_msg - - assert not arg.startswith (Elong), \ - Elong[:-1] + " option not yet supported" + stub_msg - - arg_idx += 1 + sys.exit(0) # The -o/--output option overrides the default. For makeinfo and texi2any, # that default is to look for a @setfilename command in the input file. @@ -119,4 +98,3 @@ while arg_idx < len (sys.argv): assert this_binary in simple_binaries, \ "Don't know how to get default output file name from input file!" + \ stub_msg - diff --git a/meta/recipes-extended/texinfo/texinfo-4.8/check-locale-h.patch b/meta/recipes-extended/texinfo/texinfo-4.8/check-locale-h.patch deleted file mode 100644 index 4a8cc57a56..0000000000 --- a/meta/recipes-extended/texinfo/texinfo-4.8/check-locale-h.patch +++ /dev/null @@ -1,28 +0,0 @@ -fix the macro check - -Upstream-status: Pending - -configure does not check if locale.h exists, but check setlocale, -if setlocale exist, the locale.h should exist. - -Signed-off-by: Roy Li <rongqing.li@windriver.com> ---- - lib/system.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/system.h b/lib/system.h -index 946eb3c..c70037b 100644 ---- a/lib/system.h -+++ b/lib/system.h -@@ -42,7 +42,7 @@ extern char *substring (const char *, const char *); - #include <ctype.h> - - /* All systems nowadays probably have these functions, but ... */ --#ifdef HAVE_LOCALE_H -+#ifdef HAVE_SETLOCALE - #include <locale.h> - #endif - #ifndef HAVE_SETLOCALE --- -1.7.10.4 - diff --git a/meta/recipes-extended/texinfo/texinfo-4.8/do-compile-native-tools.patch b/meta/recipes-extended/texinfo/texinfo-4.8/do-compile-native-tools.patch deleted file mode 100644 index 2cc5fbb1fc..0000000000 --- a/meta/recipes-extended/texinfo/texinfo-4.8/do-compile-native-tools.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 458e9450cecf703f55536e609365162719585900 Mon Sep 17 00:00:00 2001 -From: "Roy.Li" <rongqing.li@windriver.com> -Date: Wed, 10 Sep 2014 17:03:29 +0800 -Subject: [PATCH] do not compile host tools, since we have native - -Upstream-status: Pending - -Signed-off-by: Roy.Li <rongqing.li@windriver.com> ---- - configure.ac | 23 +---------------------- - 1 file changed, 1 insertion(+), 22 deletions(-) - -diff --git a/configure.ac b/configure.ac -index b46130d..cf58654 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -90,28 +90,7 @@ AC_CANONICAL_BUILD - # $native_tools is also added to SUBDIRS in the main Makefile.am, - # so that make compiles the native tools first. - # --if test "$cross_compiling" = no; then -- native_tools= --else -- native_tools=tools -- test -d "$native_tools" || mkdir "$native_tools" -- confdir=`(cd "$srcdir";pwd)` -- # Make sure the secondary configure won't fail with -- # "error: source directory already configured". -- rm -f config.status -- AC_MSG_NOTICE([[Doing configure of native tools (${build}).]]) -- cd "$native_tools" || exit 1 -- # Run secondary configure in alternate environment or -- # it gets the wrong CC etc. env -i gives this build host configure -- # a clean environment. -- env -i CC="${BUILD_CC}" AR="${BUILD_AR}" RANLIB="${BUILD_RANLIB}" \ -- PATH="${PATH}" \ -- tools_only=1 \ -- ${confdir}/configure --build=${build} --host=${build} \ -- --disable-rpath --disable-nls -- cd .. || exit 1 -- AC_MSG_NOTICE([[Continuing with main configure (${host}).]]) --fi -+native_tools= - AC_SUBST(native_tools) - AM_CONDITIONAL(TOOLS_ONLY, [[test "x$tools_only" = x1]]) - --- -1.9.1 - diff --git a/meta/recipes-extended/texinfo/texinfo-4.8/using-native-makeinfo.patch b/meta/recipes-extended/texinfo/texinfo-4.8/using-native-makeinfo.patch deleted file mode 100644 index d9bed6933d..0000000000 --- a/meta/recipes-extended/texinfo/texinfo-4.8/using-native-makeinfo.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 9b0df7d6d3c18cfac82c291d60a5357d1bc8d9d0 Mon Sep 17 00:00:00 2001 -From: "Roy.Li" <rongqing.li@windriver.com> -Date: Wed, 10 Sep 2014 17:10:03 +0800 -Subject: [PATCH] using native makeinfo - -Upstream-status: Pending - -Signed-off-by: Roy.Li <rongqing.li@windriver.com> ---- - doc/Makefile.am | 2 +- - -diff --git a/doc/Makefile.am b/doc/Makefile.am -index 63df818..b6ceb34 100644 ---- a/doc/Makefile.am -+++ b/doc/Makefile.am -@@ -19,7 +19,7 @@ man_MANS = info.1 infokey.1 install-info.1 makeinfo.1 texindex.1 texi2dvi.1 \ - - # Use the programs built in our distribution, taking account of possible - # cross-compiling. --MAKEINFO = $(top_builddir)/$(native_tools)/makeinfo/makeinfo -+MAKEINFO = makeinfo - INSTALL_INFO = $(top_builddir)/$(native_tools)/util/install-info - - TXI_XLATE = txi-cs.tex txi-de.tex txi-en.tex txi-es.tex txi-fr.tex \ diff --git a/meta/recipes-extended/texinfo/texinfo/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/texinfo/texinfo/0001-Unset-need_charset_alias-when-building-for-musl.patch deleted file mode 100644 index 6ea6380c55..0000000000 --- a/meta/recipes-extended/texinfo/texinfo/0001-Unset-need_charset_alias-when-building-for-musl.patch +++ /dev/null @@ -1,30 +0,0 @@ -From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 13 Apr 2015 17:02:13 -0700 -Subject: [PATCH] Unset need_charset_alias when building for musl - -localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 -which actually shoudl be fixed in gnulib and then all downstream -projects will get it eventually. For now we apply the fix to -coreutils - -Upstream-Status: Not Required - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - lib/gnulib.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: texinfo-5.2/gnulib/lib/Makefile.am -=================================================================== ---- texinfo-5.2.orig/gnulib/lib/Makefile.am -+++ texinfo-5.2/gnulib/lib/Makefile.am -@@ -378,7 +378,7 @@ install-exec-localcharset: all-local - case '$(host_os)' in \ - darwin[56]*) \ - need_charset_alias=true ;; \ -- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ -+ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ - need_charset_alias=false ;; \ - *) \ - need_charset_alias=true ;; \ diff --git a/meta/recipes-extended/texinfo/texinfo/dont-depend-on-help2man.patch b/meta/recipes-extended/texinfo/texinfo/dont-depend-on-help2man.patch index 0ce47ecdb9..0d6bbafadd 100644 --- a/meta/recipes-extended/texinfo/texinfo/dont-depend-on-help2man.patch +++ b/meta/recipes-extended/texinfo/texinfo/dont-depend-on-help2man.patch @@ -1,34 +1,36 @@ -From 6f1f3912fcb900b3a3e6cbe3360306fade333497 Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen <jussi.kukkonen@intel.com> -Date: Thu, 6 Aug 2015 14:55:08 +0300 +From 63a803ead3656353329a801846a9a3beb7210c46 Mon Sep 17 00:00:00 2001 +From: Edwin Plauchu <edwin.plauchu.camacho@intel.com> +Date: Tue, 29 Nov 2016 13:43:24 -0600 Subject: [PATCH] dont-depend-on-help2man Upstream-Status: Inappropriate Signed-off-by: Marko Lindqvist <cazfi74@gmail.com> +Signed-off-by: Edwin Plauchu <edwin.plauchu.camacho@intel.com> + --- doc/Makefile.am | 2 +- man/Makefile.am | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/Makefile.am b/doc/Makefile.am -index 7198a6b..4bba550 100644 +index 732833e..041cb9b 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am -@@ -40,7 +40,7 @@ refcard_files = refcard/Makefile refcard/txicmdcheck \ +@@ -37,7 +37,7 @@ refcard_files = refcard/Makefile refcard/txicmdcheck \ # Include our texinfo.tex, not Automake's. EXTRA_DIST = epsf.tex texinfo.tex \ fdl.texi \ - $(man_MANS) $(TXI_XLATE) \ + $(TXI_XLATE) \ - $(refcard_files) - - if INSTALL_WARNINGS + $(refcard_files) \ + texinfo-tex-test.texi texinfo-tex-test.WIDOWs \ + texinfo-ja.tex short-sample-ja.texi diff --git a/man/Makefile.am b/man/Makefile.am -index a08d603..bdfc9a4 100644 +index d0cd72c..a19e52a 100644 --- a/man/Makefile.am +++ b/man/Makefile.am -@@ -13,24 +13,24 @@ +@@ -11,27 +11,27 @@ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # These are generated using help2man. @@ -46,10 +48,13 @@ index a08d603..bdfc9a4 100644 -man_MANS += info.5 texinfo.5 +#man_MANS += info.5 texinfo.5 - # This is generated by pod2man, but let's just run it by hand. -man_MANS += pod2texi.1 +#man_MANS += pod2texi.1 + pod2texi.1: $(top_srcdir)/Pod-Simple-Texinfo/pod2texi.pl + $(POD2MAN) $(top_srcdir)/Pod-Simple-Texinfo/pod2texi.pl >"$@" + + # These are just .so's to the common program. -man_MANS += texi2any.1 texi2pdf.1 pdftexi2dvi.1 +#man_MANS += texi2any.1 texi2pdf.1 pdftexi2dvi.1 @@ -59,6 +64,3 @@ index a08d603..bdfc9a4 100644 # Maintainers should be able to regenerate. MAINTAINERCLEANFILES = $(man_MANS) --- -2.1.4 - diff --git a/meta/recipes-extended/texinfo/texinfo/link-zip.patch b/meta/recipes-extended/texinfo/texinfo/link-zip.patch index 0b6e9fd7ea..15c030c0c6 100644 --- a/meta/recipes-extended/texinfo/texinfo/link-zip.patch +++ b/meta/recipes-extended/texinfo/texinfo/link-zip.patch @@ -1,16 +1,23 @@ -install-info uses symbols from zlib so must link against it. +From c1002138033fcccb2d1abfc41f5c2e46c836f7a0 Mon Sep 17 00:00:00 2001 +From: Joshua Lock <josh@linux.intel.com> +Date: Mon, 29 Jul 2013 15:02:34 -0700 +Subject: [PATCH] install-info uses symbols from zlib so must link against it. Upstream-Status: Pending Signed-off-by: Joshua Lock <josh@linux.intel.com> -Index: texinfo-5.1/install-info/Makefile.am -=================================================================== ---- texinfo-5.1.orig/install-info/Makefile.am -+++ texinfo-5.1/install-info/Makefile.am -@@ -34,4 +34,4 @@ AM_CPPFLAGS = \ +--- + install-info/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/install-info/Makefile.am b/install-info/Makefile.am +index 9bcff71..68247f9 100644 +--- a/install-info/Makefile.am ++++ b/install-info/Makefile.am +@@ -33,4 +33,4 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/gnulib/lib \ -I$(top_builddir)/gnulib/lib \ -DLOCALEDIR=\"$(localedir)\" --LDADD = $(top_builddir)/gnulib/lib/libgnu.a $(LIBINTL) -+LDADD = $(top_builddir)/gnulib/lib/libgnu.a $(LIBINTL) -lz +-LDADD = $(top_builddir)/gnulib/lib/libgnu.a $(LIBINTL) $(LIBTHREAD) ++LDADD = $(top_builddir)/gnulib/lib/libgnu.a $(LIBINTL) $(LIBTHREAD) -lz diff --git a/meta/recipes-extended/texinfo/texinfo/texinfo-4.12-zlib.patch b/meta/recipes-extended/texinfo/texinfo/texinfo-4.12-zlib.patch index 41bd220bad..f72097e639 100644 --- a/meta/recipes-extended/texinfo/texinfo/texinfo-4.12-zlib.patch +++ b/meta/recipes-extended/texinfo/texinfo/texinfo-4.12-zlib.patch @@ -1,19 +1,23 @@ -From 20e1d8a9481dc13dd1d4d168b90e0ed2ff097b98 Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen <jussi.kukkonen@intel.com> -Date: Thu, 6 Aug 2015 14:29:57 +0300 +From 3d3b66cf398853c666e724c3dbcc37d53a2240d5 Mon Sep 17 00:00:00 2001 +From: Edwin Plauchu <edwin.plauchu.camacho@intel.com> +Date: Tue, 29 Nov 2016 12:27:17 -0600 Subject: [PATCH] texinfo-4.12-zlib Upstream-Status: Pending + +Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> +Signed-off-by: Edwin Plauchu <edwin.plauchu.camacho@intel.com> + --- install-info/Makefile.in | 2 +- - install-info/install-info.c | 67 +++++++++++++++++++++++++++------------------ - 2 files changed, 42 insertions(+), 27 deletions(-) + install-info/install-info.c | 79 ++++++++++++++++++++++--------------- + 2 files changed, 48 insertions(+), 33 deletions(-) diff --git a/install-info/Makefile.in b/install-info/Makefile.in -index ad73abb..eaa2153 100644 +index c924509..746df05 100644 --- a/install-info/Makefile.in +++ b/install-info/Makefile.in -@@ -241,7 +241,7 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" +@@ -218,7 +218,7 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_ginstall_info_OBJECTS = install-info.$(OBJEXT) ginstall_info_OBJECTS = $(am_ginstall_info_OBJECTS) @@ -21,12 +25,12 @@ index ad73abb..eaa2153 100644 +ginstall_info_LDADD = $(LDADD) -lz am__DEPENDENCIES_1 = ginstall_info_DEPENDENCIES = $(top_builddir)/gnulib/lib/libgnu.a \ - $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) diff --git a/install-info/install-info.c b/install-info/install-info.c -index b454c15..4e39122 100644 +index 21f4fe3..a7aba82 100644 --- a/install-info/install-info.c +++ b/install-info/install-info.c -@@ -22,6 +22,7 @@ +@@ -19,6 +19,7 @@ #include <getopt.h> #include <regex.h> #include <argz.h> @@ -34,7 +38,7 @@ index b454c15..4e39122 100644 #define TAB_WIDTH 8 -@@ -684,15 +685,15 @@ The first time you invoke Info you start off looking at this node.\n\ +@@ -681,15 +682,15 @@ The first time you invoke Info you start off looking at this node.\n\ Return either stdin reading the file, or a non-stdin pipe reading the output of the compression program. */ @@ -43,7 +47,7 @@ index b454c15..4e39122 100644 open_possibly_compressed_file (char *filename, void (*create_callback) (char *), - char **opened_filename, char **compression_program) -+ char **opened_filename, char **compression_program, int *is_pipe) ++ char **opened_filename, char **compression_program, int *is_pipe) { char *local_opened_filename, *local_compression_program; int nread; @@ -53,7 +57,7 @@ index b454c15..4e39122 100644 /* We let them pass NULL if they don't want this info, but it's easier to always determine it. */ -@@ -700,48 +701,48 @@ open_possibly_compressed_file (char *filename, +@@ -697,48 +698,48 @@ open_possibly_compressed_file (char *filename, opened_filename = &local_opened_filename; *opened_filename = filename; @@ -110,7 +114,7 @@ index b454c15..4e39122 100644 } #endif /* __MSDOS__ */ if (!f) -@@ -757,7 +758,7 @@ open_possibly_compressed_file (char *filename, +@@ -754,7 +755,7 @@ open_possibly_compressed_file (char *filename, (*create_callback) (filename); /* And try opening it again. */ @@ -119,7 +123,7 @@ index b454c15..4e39122 100644 if (!f) return 0; } -@@ -767,12 +768,12 @@ open_possibly_compressed_file (char *filename, +@@ -764,26 +765,26 @@ open_possibly_compressed_file (char *filename, /* Read first few bytes of file rather than relying on the filename. If the file is shorter than this it can't be usable anyway. */ @@ -128,14 +132,34 @@ index b454c15..4e39122 100644 + nread = gzread (f, data, sizeof (data)); + if (nread != sizeof (data)) { - /* Empty files don't set errno. Calling code can check for - this, so make sure errno == 0 just in case it isn't already. */ - if (nread == 0) + if (nread >= 0) - errno = 0; - return 0; - } -@@ -838,35 +839,40 @@ open_possibly_compressed_file (char *filename, + { + /* Try to create the file if its empty. */ +- if (feof (f) && create_callback) ++ if (gzeof(f) && create_callback) + { +- if (fclose (f) != 0) ++ if (gzclose(f) != 0) + return 0; /* unknown error closing file */ + +- if (remove (filename) != 0) ++ if (remove(filename) != 0) + return 0; /* unknown error deleting file */ + + (*create_callback) (filename); +- f = fopen (*opened_filename, FOPEN_RBIN); ++ f = gzopen (*opened_filename, FOPEN_RBIN); + if (!f) + return 0; +- nread = fread (data, sizeof (data), 1, f); +- if (nread == 0) ++ nread = gzread(f, data, sizeof (data)); ++ if (nread >= 0) + return 0; + goto determine_file_type; /* success */ + } +@@ -854,35 +855,40 @@ determine_file_type: *compression_program = NULL; /* Seek back over the magic bytes. */ @@ -183,7 +207,7 @@ index b454c15..4e39122 100644 } return f; -@@ -885,7 +891,8 @@ readfile (char *filename, int *sizep, +@@ -901,7 +907,8 @@ readfile (char *filename, int *sizep, void (*create_callback) (char *), char **opened_filename, char **compression_program) { @@ -193,7 +217,7 @@ index b454c15..4e39122 100644 int filled = 0; int data_size = 8192; char *data = xmalloc (data_size); -@@ -893,14 +900,20 @@ readfile (char *filename, int *sizep, +@@ -909,14 +916,20 @@ readfile (char *filename, int *sizep, /* If they passed the space for the file name to return, use it. */ f = open_possibly_compressed_file (filename, create_callback, opened_filename, @@ -216,7 +240,7 @@ index b454c15..4e39122 100644 if (nread < 0) return 0; if (nread == 0) -@@ -919,8 +932,10 @@ readfile (char *filename, int *sizep, +@@ -935,8 +948,10 @@ readfile (char *filename, int *sizep, /* We need to close the stream, since on some systems the pipe created by popen is simulated by a temporary file which only gets removed inside pclose. */ @@ -228,6 +252,3 @@ index b454c15..4e39122 100644 *sizep = filled; return data; --- -2.1.4 - diff --git a/meta/recipes-extended/texinfo/texinfo_4.8.bb b/meta/recipes-extended/texinfo/texinfo_4.8.bb deleted file mode 100644 index 13678e093b..0000000000 --- a/meta/recipes-extended/texinfo/texinfo_4.8.bb +++ /dev/null @@ -1,55 +0,0 @@ -SUMMARY = "Documentation system for on-line information and printed output" -DESCRIPTION = "Texinfo is a documentation system that can produce both \ -online information and printed output from a single source file. The \ -GNU Project uses the Texinfo file format for most of its documentation." -HOMEPAGE = "http://www.gnu.org/software/texinfo/" -SECTION = "console/utils" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" - -PROVIDES_append_class-native = " texinfo-4.8-replacement-native" - -DEPENDS = "zlib ncurses texinfo-4.8-replacement-native" -DEPENDS_class-native = "zlib-native ncurses-native" - -TARGET_PATCH = "file://use_host_makedoc.patch \ - file://using-native-makeinfo.patch \ -" -TARGET_PATCH_class-native = "" - -SRC_URI = "${GNU_MIRROR}/texinfo/${BP}.tar.gz \ - file://check-locale-h.patch \ - file://do-compile-native-tools.patch \ - ${TARGET_PATCH} \ - " - -SRC_URI[md5sum] = "4e9a1a591ed236003d0d4b008bf07eef" -SRC_URI[sha256sum] = "1f3cdeebe65fdf510f55d765ab1031b54416aa5bc2635b6a54ef9bcb2367c917" - -tex_texinfo = "texmf/tex/texinfo" - -inherit gettext autotools - -do_install_append() { - mkdir -p ${D}${datadir}/${tex_texinfo} - install -p -m644 ${S}/doc/texinfo.tex ${S}/doc/txi-??.tex ${D}${datadir}/${tex_texinfo} -} - -do_install_append_class-native() { - install -m 755 info/makedoc ${D}${bindir} - install -m 755 makeinfo/makeinfo ${D}${bindir} -} - -PACKAGES += "info info-doc" - -FILES_info = "${bindir}/info ${bindir}/infokey ${bindir}/install-info" -FILES_info-doc = "${infodir}/info.info ${infodir}/dir ${infodir}/info-*.info \ - ${mandir}/man1/info.1* ${mandir}/man5/info.5* \ - ${mandir}/man1/infokey.1* ${mandir}/man1/install-info.1*" - -FILES_${PN} = "${bindir}/makeinfo ${bindir}/texi* ${bindir}/pdftexi2dvi ${bindir}/pod2texi ${datadir}/texinfo" -FILES_${PN}-doc = "${infodir}/texinfo* \ - ${datadir}/${tex_texinfo} \ - ${mandir}/man1 ${mandir}/man5" - -BBCLASSEXTEND = "native" diff --git a/meta/recipes-extended/texinfo/texinfo_6.0.bb b/meta/recipes-extended/texinfo/texinfo_6.7.bb index 8fb715a11e..d421b79a0b 100644 --- a/meta/recipes-extended/texinfo/texinfo_6.0.bb +++ b/meta/recipes-extended/texinfo/texinfo_6.7.bb @@ -5,13 +5,13 @@ GNU Project uses the Texinfo file format for most of its documentation." HOMEPAGE = "http://www.gnu.org/software/texinfo/" SECTION = "console/utils" LICENSE = "GPLv3+" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" +LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464" PROVIDES_append_class-native = " texinfo-replacement-native" def compress_pkg(d): - if "compress_doc" in (d.getVar("INHERIT", True) or "").split(): - compress = d.getVar("DOC_COMPRESS", True) + if bb.data.inherits_class('compress_doc', d): + compress = d.getVar("DOC_COMPRESS") if compress == "gz": return "gzip" elif compress == "bz2": @@ -33,16 +33,19 @@ SRC_URI = "${GNU_MIRROR}/texinfo/${BP}.tar.gz \ file://disable-native-tools.patch \ file://link-zip.patch \ file://dont-depend-on-help2man.patch \ - file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ ${TARGET_PATCH} \ - " + " -SRC_URI[md5sum] = "e1a2ef5dce5018b53f0f6eed45b247a7" -SRC_URI[sha256sum] = "83d3183290f34e7f958d209d0b20022c6fe9e921eb6fe94c27d988827d4878d2" +SRC_URI[md5sum] = "f0c1782f68ef73738d74bd1e9e30793a" +SRC_URI[sha256sum] = "a52d05076b90032cb2523673c50e53185938746482cf3ca0213e9b4b50ac2d3e" tex_texinfo = "texmf/tex/texinfo" -inherit gettext autotools +inherit gettext autotools multilib_script + +MULTILIB_SCRIPTS = "${PN}:${bindir}/texi2any" + +EXTRA_AUTORECONF += "-I ${S}/gnulib/m4" do_configure_prepend () { # autotools_do_configure updates po/Makefile.in.in, we also need @@ -79,4 +82,10 @@ FILES_${PN}-doc = "${infodir}/texinfo* \ ${datadir}/${tex_texinfo} \ ${mandir}/man1 ${mandir}/man5" -BBCLASSEXTEND = "native" +# Lie about providing the Locale::gettext_xs module. It is not actually built, +# but the code will test for it and if not found use Locale::gettext_pp instead. +# However, this causes a file dependency on perl(Locale::gettext_xs) to be +# generated, which must be satisfied. +RPROVIDES_${PN} += "perl(Locale::gettext_xs)" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-extended/time/time-1.7/debian.patch b/meta/recipes-extended/time/time-1.7/debian.patch deleted file mode 100644 index 23ea0e3eb9..0000000000 --- a/meta/recipes-extended/time/time-1.7/debian.patch +++ /dev/null @@ -1,1301 +0,0 @@ -Upstream-Status: Backport - ---- time-1.7.orig/configure.in -+++ time-1.7/configure.in -@@ -1,11 +1,8 @@ - dnl Process this file with autoconf to produce a configure script. - AC_INIT(time.c) --VERSION=1.7 --AC_SUBST(VERSION) --PACKAGE=time --AC_SUBST(PACKAGE) -+AM_INIT_AUTOMAKE(time, 1.7) - --AC_ARG_PROGRAM -+AM_MAINTAINER_MODE - - dnl Checks for programs. - AC_PROG_CC -@@ -15,7 +12,7 @@ - dnl Checks for header files. - AC_HEADER_STDC - AC_HEADER_SYS_WAIT --AC_CHECK_HEADERS(unistd.h string.h sys/rusage.h) -+AC_CHECK_HEADERS(unistd.h string.h sys/rusage.h sys/resource.h) - - dnl Checks for typedefs, structures, and compiler characteristics. - AC_C_CONST ---- time-1.7.orig/version.texi -+++ time-1.7/version.texi -@@ -1,3 +1,3 @@ --@set UPDATED 12 June 1996 -+@set UPDATED 9 May 2002 - @set EDITION 1.7 - @set VERSION 1.7 ---- time-1.7.orig/time.c -+++ time-1.7/time.c -@@ -147,6 +147,10 @@ - NULL - }; - -+ -+/* If true, do not show the exit message */ -+static boolean quiet; -+ - /* If true, show an English description next to each statistic. */ - static boolean verbose; - -@@ -172,6 +176,7 @@ - {"help", no_argument, NULL, 'h'}, - {"output-file", required_argument, NULL, 'o'}, - {"portability", no_argument, NULL, 'p'}, -+ {"quiet", no_argument,NULL, 'q'}, - {"verbose", no_argument, NULL, 'v'}, - {"version", no_argument, NULL, 'V'}, - {NULL, no_argument, NULL, 0} -@@ -333,7 +338,8 @@ - else if (WIFSIGNALED (resp->waitstatus)) - fprintf (fp, "Command terminated by signal %d\n", - WTERMSIG (resp->waitstatus)); -- else if (WIFEXITED (resp->waitstatus) && WEXITSTATUS (resp->waitstatus)) -+ else if (WIFEXITED (resp->waitstatus) && WEXITSTATUS (resp->waitstatus) -+ && !quiet) - fprintf (fp, "Command exited with non-zero status %d\n", - WEXITSTATUS (resp->waitstatus)); - -@@ -523,6 +529,7 @@ - char *format; /* Format found in environment. */ - - /* Initialize the option flags. */ -+ quiet = false; - verbose = false; - outfile = NULL; - outfp = stderr; -@@ -536,7 +543,7 @@ - if (format) - output_format = format; - -- while ((optc = getopt_long (argc, argv, "+af:o:pvV", longopts, (int *) 0)) -+ while ((optc = getopt_long (argc, argv, "+af:o:pqvV", longopts, (int *) 0)) - != EOF) - { - switch (optc) -@@ -555,6 +562,9 @@ - case 'p': - output_format = posix_format; - break; -+ case 'q': -+ quiet = true; -+ break; - case 'v': - verbose = true; - break; -@@ -642,9 +652,9 @@ - fflush (outfp); - - if (WIFSTOPPED (res.waitstatus)) -- exit (WSTOPSIG (res.waitstatus)); -+ exit (WSTOPSIG (res.waitstatus) + 128); - else if (WIFSIGNALED (res.waitstatus)) -- exit (WTERMSIG (res.waitstatus)); -+ exit (WTERMSIG (res.waitstatus) + 128); - else if (WIFEXITED (res.waitstatus)) - exit (WEXITSTATUS (res.waitstatus)); - } -@@ -657,7 +667,7 @@ - fprintf (stream, "\ - Usage: %s [-apvV] [-f format] [-o file] [--append] [--verbose]\n\ - [--portability] [--format=format] [--output=file] [--version]\n\ -- [--help] command [arg...]\n", -+ [--quiet] [--help] command [arg...]\n", - program_name); - exit (status); - } ---- time-1.7.orig/resuse.h -+++ time-1.7/resuse.h -@@ -36,19 +36,8 @@ - # include <sys/rusage.h> - #else - # define TV_MSEC tv_usec / 1000 --# if HAVE_WAIT3 -+# if HAVE_SYS_RESOURCE_H - # include <sys/resource.h> --# else --/* Process resource usage structure. */ --struct rusage --{ -- struct timeval ru_utime; /* User time used. */ -- struct timeval ru_stime; /* System time used. */ -- int ru_maxrss, ru_ixrss, ru_idrss, ru_isrss, -- ru_minflt, ru_majflt, ru_nswap, ru_inblock, -- ru_oublock, ru_msgsnd, ru_msgrcv, ru_nsignals, -- ru_nvcsw, ru_nivcsw; --}; - # endif - #endif - ---- time-1.7.orig/time.texi -+++ time-1.7/time.texi -@@ -11,6 +11,12 @@ - @finalout - @end iftex - -+@dircategory Individual utilities -+@direntry -+* time: (time). Run programs and summarize -+ system resource usage. -+@end direntry -+ - @ifinfo - This file documents the the GNU @code{time} command for running programs - and summarizing the system resources they use. -@@ -185,6 +191,10 @@ - sys %S - @end example - -+@item -q -+@itemx --quiet -+Suppress non-zero error code from the executed program. -+ - @item -v - @itemx --verbose - @cindex format ---- time-1.7.orig/time.info -+++ time-1.7/time.info -@@ -1,5 +1,10 @@ --This is Info file ./time.info, produced by Makeinfo-1.55 from the input --file time.texi. -+This is time.info, produced by makeinfo version 4.1 from time.texi. -+ -+INFO-DIR-SECTION Individual utilities -+START-INFO-DIR-ENTRY -+* time: (time). Run programs and summarize -+ system resource usage. -+END-INFO-DIR-ENTRY - - This file documents the the GNU `time' command for running programs - and summarizing the system resources they use. -@@ -31,7 +36,7 @@ - - * Resource Measurement:: Measuring program resource use. - -- -- The Detailed Node Listing -- -+ --- The Detailed Node Listing --- - - Measuring Program Resource Use - -@@ -58,14 +63,14 @@ - The `time' command runs another program, then displays information - about the resources used by that program, collected by the system while - the program was running. You can select which information is reported --and the format in which it is shown (*note Setting Format::.), or have -+and the format in which it is shown (*note Setting Format::), or have - `time' save the information in a file instead of displaying it on the --screen (*note Redirecting::.). -+screen (*note Redirecting::). - - The resources that `time' can report on fall into the general - categories of time, memory, and I/O and IPC calls. Some systems do not - provide much information about program resource use; `time' reports --unavailable information as zero values (*note Accuracy::.). -+unavailable information as zero values (*note Accuracy::). - - The format of the `time' command is: - -@@ -132,6 +137,10 @@ - user %U - sys %S - -+`-q' -+`--quiet' -+ Suppress non-zero error code from the executed program. -+ - `-v' - `--verbose' - Use the built-in verbose format, which displays each available -@@ -174,7 +183,7 @@ - The resource specifiers, which are a superset of those recognized by - the `tcsh' builtin `time' command, are listed below. Not all resources - are measured by all versions of Unix, so some of the values might be --reported as zero (*note Accuracy::.). -+reported as zero (*note Accuracy::). - - * Menu: - -@@ -308,11 +317,11 @@ - `-o FILE' - `--output=FILE' - Write the resource use statistics to FILE. By default, this -- *overwrites* the file, destroying the file's previous contents. -+ _overwrites_ the file, destroying the file's previous contents. - - `-a' - `--append' -- *Append* the resource use information to the output file instead -+ _Append_ the resource use information to the output file instead - of overwriting it. This option is only useful with the `-o' or - `--output' option. - -@@ -437,7 +446,7 @@ - - `-a' - `--append' -- *Append* the resource use information to the output file instead -+ _Append_ the resource use information to the output file instead - of overwriting it. - - `-f FORMAT' -@@ -462,17 +471,17 @@ - - - Tag Table: --Node: Top934 --Node: Resource Measurement1725 --Node: Setting Format3678 --Node: Format String4907 --Node: Time Resources6214 --Node: Memory Resources6844 --Node: I/O Resources7549 --Node: Command Info8747 --Node: Redirecting8964 --Node: Examples9754 --Node: Accuracy12064 --Node: Invoking time13586 -+Node: Top1115 -+Node: Resource Measurement1908 -+Node: Setting Format3858 -+Node: Format String5164 -+Node: Time Resources6470 -+Node: Memory Resources7100 -+Node: I/O Resources7805 -+Node: Command Info9003 -+Node: Redirecting9220 -+Node: Examples10010 -+Node: Accuracy12320 -+Node: Invoking time13842 - - End Tag Table ---- time-1.7.orig/time.html -+++ time-1.7/time.html -@@ -0,0 +1,1021 @@ -+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" -+ "http://www.w3.org/TR/html40/loose.dtd"> -+<HTML> -+<!-- Created on September, 1 2003 by texi2html 1.66 --> -+<!-- -+Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author) -+ Karl Berry <karl@freefriends.org> -+ Olaf Bachmann <obachman@mathematik.uni-kl.de> -+ and many others. -+Maintained by: Many creative people <dev@texi2html.cvshome.org> -+Send bugs and suggestions to <users@texi2html.cvshome.org> -+ -+--> -+<HEAD> -+<TITLE>Measuring Program Resource Use</TITLE> -+ -+<META NAME="description" CONTENT="Measuring Program Resource Use"> -+<META NAME="keywords" CONTENT="Measuring Program Resource Use"> -+<META NAME="resource-type" CONTENT="document"> -+<META NAME="distribution" CONTENT="global"> -+<META NAME="Generator" CONTENT="texi2html 1.66"> -+ -+</HEAD> -+ -+<BODY LANG="en" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000"> -+ -+<A NAME="SEC_Top"></A> -+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> -+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> -+</TR></TABLE> -+<H1>Measuring Program Resource Use</H1> -+ -+<P> -+ -+This file documents the the GNU <CODE>time</CODE> command for running programs -+and summarizing the system resources they use. -+This is edition 1.7, for version 1.7. -+</P> -+<P> -+ -+</P> -+<TABLE BORDER="0" CELLSPACING="0"> -+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC1">1. Measuring Program Resource Use</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Measuring program resource use.</TD></TR> -+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP"> -+</TH></TR> -+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP"> -- The Detailed Node Listing --- -+</TH></TR> -+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP"> -+</TH></TR> -+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">Measuring Program Resource Use -+</TH></TR> -+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP"> -+</TH></TR> -+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC2">1.1 Setting the Output Format</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Selecting the information reported by <CODE>time</CODE>.</TD></TR> -+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC3">1.2 The Format String</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">The information <CODE>time</CODE> can report.</TD></TR> -+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC8">1.3 Redirecting Output</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Writing the information to a file.</TD></TR> -+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC9">1.4 Examples</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Examples of using <CODE>time</CODE>.</TD></TR> -+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC10">1.5 Accuracy</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Limitations on the accuracy of <CODE>time</CODE> output.</TD></TR> -+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC11">1.6 Running the <CODE>time</CODE> Command</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Summary of the options to the <CODE>time</CODE> command.</TD></TR> -+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP"> -+</TH></TR> -+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">The Format String -+</TH></TR> -+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP"> -+</TH></TR> -+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC4">1.2.1 Time Resources</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR> -+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC5">1.2.2 Memory Resources</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR> -+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC6">1.2.3 I/O Resources</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR> -+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC7">1.2.4 Command Info</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR> -+</TABLE> -+<P> -+ -+<HR SIZE=1> -+<A NAME="SEC1"></A> -+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> -+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> < </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC2"> > </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> -+</TR></TABLE> -+<A NAME="Resource Measurement"></A> -+<H1> 1. Measuring Program Resource Use </H1> -+<!--docid::SEC1::--> -+<P> -+ -+The <CODE>time</CODE> command runs another program, then displays information -+about the resources used by that program, collected by the system while -+the program was running. You can select which information is reported -+and the format in which it is shown (see section <A HREF="time.html#SEC2">1.1 Setting the Output Format</A>), or have -+<CODE>time</CODE> save the information in a file instead of displaying it on the -+screen (see section <A HREF="time.html#SEC8">1.3 Redirecting Output</A>). -+</P> -+<P> -+ -+The resources that <CODE>time</CODE> can report on fall into the general -+categories of time, memory, and I/O and IPC calls. Some systems do not -+provide much information about program resource use; <CODE>time</CODE> -+reports unavailable information as zero values (see section <A HREF="time.html#SEC10">1.5 Accuracy</A>). -+</P> -+<P> -+ -+The format of the <CODE>time</CODE> command is: -+</P> -+<P> -+ -+<TABLE><tr><td> </td><td class=example><pre>time [option<small>...</small>] <VAR>command</VAR> [<VAR>arg</VAR><small>...</small>] -+</pre></td></tr></table><P> -+ -+<A NAME="IDX1"></A> -+<CODE>time</CODE> runs the program <VAR>command</VAR>, with any given arguments -+<VAR>arg</VAR><small>...</small>. When <VAR>command</VAR> finishes, <CODE>time</CODE> displays -+information about resources used by <VAR>command</VAR>. -+</P> -+<P> -+ -+Here is an example of using <CODE>time</CODE> to measure the time and other -+resources used by running the program <CODE>grep</CODE>: -+</P> -+<P> -+ -+<TABLE><tr><td> </td><td class=example><pre>eg$ time grep nobody /etc/aliases -+nobody:/dev/null -+etc-files:nobody -+misc-group:nobody -+0.07user 0.50system 0:06.69elapsed 8%CPU (0avgtext+489avgdata 324maxresident)k -+46inputs+7outputs (43major+251minor)pagefaults 0swaps -+</pre></td></tr></table><P> -+ -+Mail suggestions and bug reports for GNU <CODE>time</CODE> to -+<CODE>bug-gnu-utils@prep.ai.mit.edu</CODE>. Please include the version of -+<CODE>time</CODE>, which you can get by running `<SAMP>time --version</SAMP>', and the -+operating system and C compiler you used. -+</P> -+<P> -+ -+<TABLE BORDER="0" CELLSPACING="0"> -+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC2">1.1 Setting the Output Format</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Selecting the information reported by <CODE>time</CODE>.</TD></TR> -+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC3">1.2 The Format String</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">The information <CODE>time</CODE> can report.</TD></TR> -+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC8">1.3 Redirecting Output</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Writing the information to a file.</TD></TR> -+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC9">1.4 Examples</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Examples of using <CODE>time</CODE>.</TD></TR> -+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC10">1.5 Accuracy</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Limitations on the accuracy of <CODE>time</CODE> output.</TD></TR> -+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC11">1.6 Running the <CODE>time</CODE> Command</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Summary of the options to the <CODE>time</CODE> command.</TD></TR> -+</TABLE> -+<P> -+ -+<A NAME="Setting Format"></A> -+<HR SIZE="6"> -+<A NAME="SEC2"></A> -+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> -+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> < </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC3"> > </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> -+</TR></TABLE> -+<H2> 1.1 Setting the Output Format </H2> -+<!--docid::SEC2::--> -+<P> -+ -+<CODE>time</CODE> uses a <EM>format string</EM> to determine which information to -+display about the resources used by the command it runs. See section <A HREF="time.html#SEC3">1.2 The Format String</A>, for the interpretation of the format string contents. -+</P> -+<P> -+ -+You can specify a format string with the command line options listed -+below. If no format is specified on the command line, but the -+<CODE>TIME</CODE> environment variable is set, its value is used as the format -+string. Otherwise, the default format built into <CODE>time</CODE> is used: -+</P> -+<P> -+ -+<TABLE><tr><td> </td><td class=example><pre>%Uuser %Ssystem %Eelapsed %PCPU (%Xtext+%Ddata %Mmax)k -+%Iinputs+%Ooutputs (%Fmajor+%Rminor)pagefaults %Wswaps -+</pre></td></tr></table><P> -+ -+The command line options to set the format are: -+</P> -+<P> -+ -+</P> -+<DL COMPACT> -+<DT><CODE>-f <VAR>format</VAR></CODE> -+<DD><DT><CODE>--format=<VAR>format</VAR></CODE> -+<DD>Use <VAR>format</VAR> as the format string. -+<P> -+ -+</P> -+<DT><CODE>-p</CODE> -+<DD><DT><CODE>--portability</CODE> -+<DD>Use the following format string, for conformance with POSIX standard -+1003.2: -+<P> -+ -+<TABLE><tr><td> </td><td class=example><pre>real %e -+user %U -+sys %S -+</pre></td></tr></table><P> -+ -+</P> -+<DT><CODE>-q</CODE> -+<DD><DT><CODE>--quiet</CODE> -+<DD>Suppress non-zero error code from the executed program. -+<P> -+ -+</P> -+<DT><CODE>-v</CODE> -+<DD><DT><CODE>--verbose</CODE> -+<DD><A NAME="IDX2"></A> -+Use the built-in verbose format, which displays each available piece of -+information on the program's resource use on its own line, with an -+English description of its meaning. -+</DL> -+<P> -+ -+<A NAME="Format String"></A> -+<HR SIZE="6"> -+<A NAME="SEC3"></A> -+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> -+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC2"> < </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC4"> > </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> -+</TR></TABLE> -+<H2> 1.2 The Format String </H2> -+<!--docid::SEC3::--> -+<P> -+ -+<A NAME="IDX3"></A> -+<A NAME="IDX4"></A> -+The <EM>format string</EM> controls the contents of the <CODE>time</CODE> output. -+It consists of <EM>resource specifiers</EM> and <EM>escapes</EM>, interspersed -+with plain text. -+</P> -+<P> -+ -+A backslash introduces an <EM>escape</EM>, which is translated -+into a single printing character upon output. The valid escapes are -+listed below. An invalid escape is output as a question mark followed -+by a backslash. -+</P> -+<P> -+ -+</P> -+<DL COMPACT> -+<DT><CODE>\t</CODE> -+<DD>a tab character -+<P> -+ -+</P> -+<DT><CODE>\n</CODE> -+<DD>a newline -+<P> -+ -+</P> -+<DT><CODE>\\</CODE> -+<DD>a literal backslash -+</DL> -+<P> -+ -+<CODE>time</CODE> always prints a newline after printing the resource use -+information, so normally format strings do not end with a newline -+character (or `<SAMP>\n</SAMP>'). -+</P> -+<P> -+ -+A resource specifier consists of a percent sign followed by another -+character. An invalid resource specifier is output as a question mark -+followed by the invalid character. Use `<SAMP>%%</SAMP>' to output a literal -+percent sign. -+</P> -+<P> -+ -+The resource specifiers, which are a superset of those recognized by the -+<CODE>tcsh</CODE> builtin <CODE>time</CODE> command, are listed below. Not all -+resources are measured by all versions of Unix, so some of the values -+might be reported as zero (see section <A HREF="time.html#SEC10">1.5 Accuracy</A>). -+</P> -+<P> -+ -+<TABLE BORDER="0" CELLSPACING="0"> -+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC4">1.2.1 Time Resources</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR> -+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC5">1.2.2 Memory Resources</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR> -+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC6">1.2.3 I/O Resources</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR> -+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC7">1.2.4 Command Info</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR> -+</TABLE> -+<P> -+ -+<A NAME="Time Resources"></A> -+<HR SIZE="6"> -+<A NAME="SEC4"></A> -+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> -+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC3"> < </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC5"> > </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> -+</TR></TABLE> -+<H3> 1.2.1 Time Resources </H3> -+<!--docid::SEC4::--> -+<P> -+ -+</P> -+<DL COMPACT> -+<DT><CODE>E</CODE> -+<DD>Elapsed real (wall clock) time used by the process, in -+[hours:]minutes:seconds. -+<P> -+ -+</P> -+<DT><CODE>e</CODE> -+<DD>Elapsed real (wall clock) time used by the process, in -+seconds. -+<P> -+ -+</P> -+<DT><CODE>S</CODE> -+<DD>Total number of CPU-seconds used by the system on behalf of the process -+(in kernel mode), in seconds. -+<P> -+ -+</P> -+<DT><CODE>U</CODE> -+<DD>Total number of CPU-seconds that the process used directly (in user -+mode), in seconds. -+<P> -+ -+</P> -+<DT><CODE>P</CODE> -+<DD>Percentage of the CPU that this job got. This is just user + system -+times divied by the total running time. -+</DL> -+<P> -+ -+<A NAME="Memory Resources"></A> -+<HR SIZE="6"> -+<A NAME="SEC5"></A> -+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> -+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC4"> < </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC6"> > </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> -+</TR></TABLE> -+<H3> 1.2.2 Memory Resources </H3> -+<!--docid::SEC5::--> -+<P> -+ -+</P> -+<DL COMPACT> -+<DT><CODE>M</CODE> -+<DD>Maximum resident set size of the process during its lifetime, in -+Kilobytes. -+<P> -+ -+</P> -+<DT><CODE>t</CODE> -+<DD>Average resident set size of the process, in Kilobytes. -+<P> -+ -+</P> -+<DT><CODE>K</CODE> -+<DD>Average total (data+stack+text) memory use of the process, in Kilobytes. -+<P> -+ -+</P> -+<DT><CODE>D</CODE> -+<DD>Average size of the process's unshared data area, in Kilobytes. -+<P> -+ -+</P> -+<DT><CODE>p</CODE> -+<DD>Average size of the process's unshared stack, in Kilobytes. -+<P> -+ -+</P> -+<DT><CODE>X</CODE> -+<DD>Average size of the process's shared text, in Kilobytes. -+<P> -+ -+</P> -+<DT><CODE>Z</CODE> -+<DD>System's page size, in bytes. This is a per-system constant, but -+varies between systems. -+</DL> -+<P> -+ -+<A NAME="I/O Resources"></A> -+<HR SIZE="6"> -+<A NAME="SEC6"></A> -+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> -+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC5"> < </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC7"> > </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> -+</TR></TABLE> -+<H3> 1.2.3 I/O Resources </H3> -+<!--docid::SEC6::--> -+<P> -+ -+</P> -+<DL COMPACT> -+<DT><CODE>F</CODE> -+<DD>Number of major, or I/O-requiring, page faults that occurred while the -+process was running. These are faults where the page has actually -+migrated out of primary memory. -+<P> -+ -+</P> -+<DT><CODE>R</CODE> -+<DD>Number of minor, or recoverable, page faults. These are pages that are -+not valid (so they fault) but which have not yet been claimed by other -+virtual pages. Thus the data in the page is still valid but the system -+tables must be updated. -+<P> -+ -+</P> -+<DT><CODE>W</CODE> -+<DD>Number of times the process was swapped out of main memory. -+<P> -+ -+</P> -+<DT><CODE>c</CODE> -+<DD>Number of times the process was context-switched involuntarily (because -+the time slice expired). -+<P> -+ -+</P> -+<DT><CODE>w</CODE> -+<DD>Number of times that the program was context-switched voluntarily, for -+instance while waiting for an I/O operation to complete. -+<P> -+ -+</P> -+<DT><CODE>I</CODE> -+<DD>Number of file system inputs by the process. -+<P> -+ -+</P> -+<DT><CODE>O</CODE> -+<DD>Number of file system outputs by the process. -+<P> -+ -+</P> -+<DT><CODE>r</CODE> -+<DD>Number of socket messages received by the process. -+<P> -+ -+</P> -+<DT><CODE>s</CODE> -+<DD>Number of socket messages sent by the process. -+<P> -+ -+</P> -+<DT><CODE>k</CODE> -+<DD>Number of signals delivered to the process. -+</DL> -+<P> -+ -+<A NAME="Command Info"></A> -+<HR SIZE="6"> -+<A NAME="SEC7"></A> -+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> -+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC6"> < </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC8"> > </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> -+</TR></TABLE> -+<H3> 1.2.4 Command Info </H3> -+<!--docid::SEC7::--> -+<P> -+ -+</P> -+<DL COMPACT> -+<DT><CODE>C</CODE> -+<DD>Name and command line arguments of the command being timed. -+<P> -+ -+</P> -+<DT><CODE>x</CODE> -+<DD>Exit status of the command. -+</DL> -+<P> -+ -+<A NAME="Redirecting"></A> -+<HR SIZE="6"> -+<A NAME="SEC8"></A> -+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> -+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC7"> < </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC9"> > </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> -+</TR></TABLE> -+<H2> 1.3 Redirecting Output </H2> -+<!--docid::SEC8::--> -+<P> -+ -+By default, <CODE>time</CODE> writes the resource use statistics to the -+standard error stream. The options below make it write the statistics -+to a file instead. Doing this can be useful if the program you're -+running writes to the standard error or you're running <CODE>time</CODE> -+noninteractively or in the background. -+</P> -+<P> -+ -+</P> -+<DL COMPACT> -+<DT><CODE>-o <VAR>file</VAR></CODE> -+<DD><DT><CODE>--output=<VAR>file</VAR></CODE> -+<DD>Write the resource use statistics to <VAR>file</VAR>. By default, this -+<EM>overwrites</EM> the file, destroying the file's previous contents. -+<P> -+ -+</P> -+<DT><CODE>-a</CODE> -+<DD><DT><CODE>--append</CODE> -+<DD><EM>Append</EM> the resource use information to the output file instead -+of overwriting it. This option is only useful with the `<SAMP>-o</SAMP>' or -+`<SAMP>--output</SAMP>' option. -+</DL> -+<P> -+ -+<A NAME="Examples"></A> -+<HR SIZE="6"> -+<A NAME="SEC9"></A> -+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> -+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC8"> < </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC10"> > </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> -+</TR></TABLE> -+<H2> 1.4 Examples </H2> -+<!--docid::SEC9::--> -+<P> -+ -+Run the command `<SAMP>wc /etc/hosts</SAMP>' and show the default information: -+</P> -+<P> -+ -+<TABLE><tr><td> </td><td class=example><pre>eg$ time wc /etc/hosts -+ 35 111 1134 /etc/hosts -+0.00user 0.01system 0:00.04elapsed 25%CPU (0avgtext+0avgdata 0maxresident)k -+1inputs+1outputs (0major+0minor)pagefaults 0swaps -+</pre></td></tr></table><P> -+ -+Run the command `<SAMP>ls -Fs</SAMP>' and show just the user, system, and -+wall-clock time: -+</P> -+<P> -+ -+<TABLE><tr><td> </td><td class=example><pre>eg$ time -f "\t%E real,\t%U user,\t%S sys" ls -Fs -+total 16 -+1 account/ 1 db/ 1 mail/ 1 run/ -+1 backups/ 1 emacs/ 1 msgs/ 1 rwho/ -+1 crash/ 1 games/ 1 preserve/ 1 spool/ -+1 cron/ 1 log/ 1 quotas/ 1 tmp/ -+ 0:00.03 real, 0.00 user, 0.01 sys -+</pre></td></tr></table><P> -+ -+Edit the file `<TT>.bashrc</TT>' and have <CODE>time</CODE> append the elapsed time -+and number of signals to the file `<TT>log</TT>', reading the format string -+from the environment variable <CODE>TIME</CODE>: -+</P> -+<P> -+ -+<TABLE><tr><td> </td><td class=example><pre>eg$ export TIME="\t%E,\t%k" # If using bash or ksh -+eg$ setenv TIME "\t%E,\t%k" # If using csh or tcsh -+eg$ time -a -o log emacs .bashrc -+eg$ cat log -+ 0:16.55, 726 -+</pre></td></tr></table><P> -+ -+Run the command `<SAMP>sleep 4</SAMP>' and show all of the information about it -+verbosely: -+</P> -+<P> -+ -+<TABLE><tr><td> </td><td class=example><pre>eg$ time -v sleep 4 -+ Command being timed: "sleep 4" -+ User time (seconds): 0.00 -+ System time (seconds): 0.05 -+ Percent of CPU this job got: 1% -+ Elapsed (wall clock) time (h:mm:ss or m:ss): 0:04.26 -+ Average shared text size (kbytes): 36 -+ Average unshared data size (kbytes): 24 -+ Average stack size (kbytes): 0 -+ Average total size (kbytes): 60 -+ Maximum resident set size (kbytes): 32 -+ Average resident set size (kbytes): 24 -+ Major (requiring I/O) page faults: 3 -+ Minor (reclaiming a frame) page faults: 0 -+ Voluntary context switches: 11 -+ Involuntary context switches: 0 -+ Swaps: 0 -+ File system inputs: 3 -+ File system outputs: 1 -+ Socket messages sent: 0 -+ Socket messages received: 0 -+ Signals delivered: 1 -+ Page size (bytes): 4096 -+ Exit status: 0 -+</pre></td></tr></table><P> -+ -+<A NAME="Accuracy"></A> -+<HR SIZE="6"> -+<A NAME="SEC10"></A> -+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> -+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC9"> < </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC11"> > </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> -+</TR></TABLE> -+<H2> 1.5 Accuracy </H2> -+<!--docid::SEC10::--> -+<P> -+ -+The elapsed time is not collected atomically with the execution of the -+program; as a result, in bizarre circumstances (if the <CODE>time</CODE> -+command gets stopped or swapped out in between when the program being -+timed exits and when <CODE>time</CODE> calculates how long it took to run), it -+could be much larger than the actual execution time. -+</P> -+<P> -+ -+When the running time of a command is very nearly zero, some values -+(e.g., the percentage of CPU used) may be reported as either zero (which -+is wrong) or a question mark. -+</P> -+<P> -+ -+Most information shown by <CODE>time</CODE> is derived from the <CODE>wait3</CODE> -+system call. The numbers are only as good as those returned by -+<CODE>wait3</CODE>. Many systems do not measure all of the resources that -+<CODE>time</CODE> can report on; those resources are reported as zero. The -+systems that measure most or all of the resources are based on 4.2 or -+4.3BSD. Later BSD releases use different memory management code that -+measures fewer resources. -+</P> -+<P> -+ -+On systems that do not have a <CODE>wait3</CODE> call that returns status -+information, the <CODE>times</CODE> system call is used instead. It provides -+much less information than <CODE>wait3</CODE>, so on those systems <CODE>time</CODE> -+reports most of the resources as zero. -+</P> -+<P> -+ -+The `<SAMP>%I</SAMP>' and `<SAMP>%O</SAMP>' values are allegedly only "real" input -+and output and do not include those supplied by caching devices. The -+meaning of "real" I/O reported by `<SAMP>%I</SAMP>' and `<SAMP>%O</SAMP>' may be -+muddled for workstations, especially diskless ones. -+</P> -+<P> -+ -+<A NAME="Invoking time"></A> -+<HR SIZE="6"> -+<A NAME="SEC11"></A> -+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> -+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC10"> < </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ > ]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> -+</TR></TABLE> -+<H2> 1.6 Running the <CODE>time</CODE> Command </H2> -+<!--docid::SEC11::--> -+<P> -+ -+The format of the <CODE>time</CODE> command is: -+</P> -+<P> -+ -+<TABLE><tr><td> </td><td class=example><pre>time [option<small>...</small>] <VAR>command</VAR> [<VAR>arg</VAR><small>...</small>] -+</pre></td></tr></table><P> -+ -+<A NAME="IDX5"></A> -+<CODE>time</CODE> runs the program <VAR>command</VAR>, with any given arguments -+<VAR>arg</VAR><small>...</small>. When <VAR>command</VAR> finishes, <CODE>time</CODE> displays -+information about resources used by <VAR>command</VAR> (on the standard error -+output, by default). If <VAR>command</VAR> exits with non-zero status or is -+terminated by a signal, <CODE>time</CODE> displays a warning message and the -+exit status or signal number. -+</P> -+<P> -+ -+Options to <CODE>time</CODE> must appear on the command line before -+<VAR>command</VAR>. Anything on the command line after <VAR>command</VAR> is -+passed as arguments to <VAR>command</VAR>. -+</P> -+<P> -+ -+</P> -+<DL COMPACT> -+<DT><CODE>-o <VAR>file</VAR></CODE> -+<DD><DT><CODE>--output=<VAR>file</VAR></CODE> -+<DD>Write the resource use statistics to <VAR>file</VAR>. -+<P> -+ -+</P> -+<DT><CODE>-a</CODE> -+<DD><DT><CODE>--append</CODE> -+<DD><EM>Append</EM> the resource use information to the output file instead -+of overwriting it. -+<P> -+ -+</P> -+<DT><CODE>-f <VAR>format</VAR></CODE> -+<DD><DT><CODE>--format=<VAR>format</VAR></CODE> -+<DD>Use <VAR>format</VAR> as the format string. -+<P> -+ -+</P> -+<DT><CODE>--help</CODE> -+<DD>Print a summary of the command line options to <CODE>time</CODE> and exit. -+<P> -+ -+</P> -+<DT><CODE>-p</CODE> -+<DD><DT><CODE>--portability</CODE> -+<DD>Use the POSIX format. -+<P> -+ -+</P> -+<DT><CODE>-v</CODE> -+<DD><DT><CODE>--verbose</CODE> -+<DD><A NAME="IDX6"></A> -+Use the built-in verbose format. -+<P> -+ -+</P> -+<DT><CODE>-V</CODE> -+<DD><DT><CODE>--version</CODE> -+<DD><A NAME="IDX7"></A> -+Print the version number of <CODE>time</CODE> and exit. -+</DL> -+<P> -+ -+<HR SIZE="6"> -+<A NAME="SEC_Contents"></A> -+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> -+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> -+</TR></TABLE> -+<H1>Table of Contents</H1> -+<BLOCKQUOTE> -+<A NAME="TOC1" HREF="time.html#SEC1">1. Measuring Program Resource Use</A> -+<BR> -+<BLOCKQUOTE> -+<A NAME="TOC2" HREF="time.html#SEC2">1.1 Setting the Output Format</A> -+<BR> -+<A NAME="TOC3" HREF="time.html#SEC3">1.2 The Format String</A> -+<BR> -+<BLOCKQUOTE> -+<A NAME="TOC4" HREF="time.html#SEC4">1.2.1 Time Resources</A> -+<BR> -+<A NAME="TOC5" HREF="time.html#SEC5">1.2.2 Memory Resources</A> -+<BR> -+<A NAME="TOC6" HREF="time.html#SEC6">1.2.3 I/O Resources</A> -+<BR> -+<A NAME="TOC7" HREF="time.html#SEC7">1.2.4 Command Info</A> -+<BR> -+</BLOCKQUOTE> -+<A NAME="TOC8" HREF="time.html#SEC8">1.3 Redirecting Output</A> -+<BR> -+<A NAME="TOC9" HREF="time.html#SEC9">1.4 Examples</A> -+<BR> -+<A NAME="TOC10" HREF="time.html#SEC10">1.5 Accuracy</A> -+<BR> -+<A NAME="TOC11" HREF="time.html#SEC11">1.6 Running the <CODE>time</CODE> Command</A> -+<BR> -+</BLOCKQUOTE> -+</BLOCKQUOTE> -+<HR SIZE=1> -+<A NAME="SEC_OVERVIEW"></A> -+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> -+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> -+</TR></TABLE> -+<H1>Short Table of Contents</H1> -+<BLOCKQUOTE> -+<A NAME="TOC1" HREF="time.html#SEC1">1. Measuring Program Resource Use</A> -+<BR> -+ -+</BLOCKQUOTE> -+<HR SIZE=1> -+<A NAME="SEC_About"></A> -+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> -+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> -+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> -+</TR></TABLE> -+<H1>About this document</H1> -+This document was generated -+by -+using <A HREF="http://texi2html.cvshome.org"><I>texi2html</I></A> -+<P></P> -+The buttons in the navigation panels have the following meaning: -+<P></P> -+<table border = "1"> -+<TR> -+<TH> Button </TH> -+<TH> Name </TH> -+<TH> Go to </TH> -+<TH> From 1.2.3 go to</TH> -+</TR> -+<TR> -+<TD ALIGN="CENTER"> -+ [ < ] </TD> -+<TD ALIGN="CENTER"> -+Back -+</TD> -+<TD> -+previous section in reading order -+</TD> -+<TD> -+1.2.2 -+</TD> -+</TR> -+<TR> -+<TD ALIGN="CENTER"> -+ [ > ] </TD> -+<TD ALIGN="CENTER"> -+Forward -+</TD> -+<TD> -+next section in reading order -+</TD> -+<TD> -+1.2.4 -+</TD> -+</TR> -+<TR> -+<TD ALIGN="CENTER"> -+ [ << ] </TD> -+<TD ALIGN="CENTER"> -+FastBack -+</TD> -+<TD> -+beginning of this chapter or previous chapter -+</TD> -+<TD> -+1 -+</TD> -+</TR> -+<TR> -+<TD ALIGN="CENTER"> -+ [ Up ] </TD> -+<TD ALIGN="CENTER"> -+Up -+</TD> -+<TD> -+up section -+</TD> -+<TD> -+1.2 -+</TD> -+</TR> -+<TR> -+<TD ALIGN="CENTER"> -+ [ >> ] </TD> -+<TD ALIGN="CENTER"> -+FastForward -+</TD> -+<TD> -+next chapter -+</TD> -+<TD> -+2 -+</TD> -+</TR> -+<TR> -+<TD ALIGN="CENTER"> -+ [Top] </TD> -+<TD ALIGN="CENTER"> -+Top -+</TD> -+<TD> -+cover (top) of document -+</TD> -+<TD> -+ -+</TD> -+</TR> -+<TR> -+<TD ALIGN="CENTER"> -+ [Contents] </TD> -+<TD ALIGN="CENTER"> -+Contents -+</TD> -+<TD> -+table of contents -+</TD> -+<TD> -+ -+</TD> -+</TR> -+<TR> -+<TD ALIGN="CENTER"> -+ [Index] </TD> -+<TD ALIGN="CENTER"> -+Index -+</TD> -+<TD> -+concept index -+</TD> -+<TD> -+ -+</TD> -+</TR> -+<TR> -+<TD ALIGN="CENTER"> -+ [ ? ] </TD> -+<TD ALIGN="CENTER"> -+About -+</TD> -+<TD> -+this page -+</TD> -+<TD> -+ -+</TD> -+</TR> -+</TABLE> -+ <P> -+ where the <STRONG> Example </STRONG> assumes that the current position -+ is at <STRONG> Subsubsection One-Two-Three </STRONG> of a document of -+ the following structure:</P> -+ <UL> -+ <LI> 1. Section One -+ <UL> -+ <LI>1.1 Subsection One-One -+ <UL> -+ <LI>...</LI> -+ </UL> -+ <LI>1.2 Subsection One-Two -+ <UL> -+ <LI>1.2.1 Subsubsection One-Two-One</LI> -+ <LI>1.2.2 Subsubsection One-Two-Two</LI> -+ <LI>1.2.3 Subsubsection One-Two-Three -+ <STRONG><== Current Position </STRONG></LI> -+ <LI>1.2.4 Subsubsection One-Two-Four</LI> -+ </UL> -+ </LI> -+ <LI>1.3 Subsection One-Three -+ <UL> -+ <LI>...</LI> -+ </UL> -+ </LI> -+ <LI>1.4 Subsection One-Four</LI> -+ </UL> -+ </LI> -+ </UL> -+ -+<HR SIZE=1> -+<BR> -+<FONT SIZE="-1"> -+This document was generated -+by <I>root</I> on <I>September, 1 2003</I> -+using <A HREF="http://texi2html.cvshome.org"><I>texi2html</I></A> -+</FONT> -+ -+</BODY> -+</HTML> diff --git a/meta/recipes-extended/time/time.inc b/meta/recipes-extended/time/time.inc deleted file mode 100644 index 85862177b7..0000000000 --- a/meta/recipes-extended/time/time.inc +++ /dev/null @@ -1,12 +0,0 @@ -SUMMARY = "Tool that measures CPU resources" -DESCRIPTION = "time measures many of the CPU resources, such as time and \ -memory, that other programs use." -HOMEPAGE = "http://www.gnu.org/software/time/" -SECTION = "utils" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" - -inherit texinfo update-alternatives - -ALTERNATIVE_${PN} = "time" -ALTERNATIVE_PRIORITY = "100" diff --git a/meta/recipes-extended/time/time_1.7.bb b/meta/recipes-extended/time/time_1.7.bb deleted file mode 100644 index 92c5353d09..0000000000 --- a/meta/recipes-extended/time/time_1.7.bb +++ /dev/null @@ -1,11 +0,0 @@ -require time.inc - -PR = "r2" - -SRC_URI = "${GNU_MIRROR}/time/time-${PV}.tar.gz \ - file://debian.patch" - -SRC_URI[md5sum] = "e38d2b8b34b1ca259cf7b053caac32b3" -SRC_URI[sha256sum] = "e37ea79a253bf85a85ada2f7c632c14e481a5fd262a362f6f4fd58e68601496d" - -inherit autotools diff --git a/meta/recipes-extended/time/time_1.9.bb b/meta/recipes-extended/time/time_1.9.bb new file mode 100644 index 0000000000..e2b084caae --- /dev/null +++ b/meta/recipes-extended/time/time_1.9.bb @@ -0,0 +1,21 @@ +SUMMARY = "Tool that measures CPU resources" +DESCRIPTION = "time measures many of the CPU resources, such as time and \ +memory, that other programs use." +HOMEPAGE = "http://www.gnu.org/software/time/" +SECTION = "utils" +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +inherit texinfo update-alternatives + +ALTERNATIVE_${PN} = "time" +ALTERNATIVE_PRIORITY = "100" + +BBCLASSEXTEND = "native nativesdk" + +SRC_URI = "${GNU_MIRROR}/time/time-${PV}.tar.gz" + +SRC_URI[md5sum] = "d2356e0fe1c0b85285d83c6b2ad51b5f" +SRC_URI[sha256sum] = "fbacf0c81e62429df3e33bda4cee38756604f18e01d977338e23306a3e3b521e" + +inherit autotools diff --git a/meta/recipes-extended/timezone/timezone.inc b/meta/recipes-extended/timezone/timezone.inc new file mode 100644 index 0000000000..8eb17c5eaf --- /dev/null +++ b/meta/recipes-extended/timezone/timezone.inc @@ -0,0 +1,18 @@ +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" + +PV = "2020b" + +SRC_URI =" http://www.iana.org/time-zones/repository/releases/tzcode${PV}.tar.gz;name=tzcode \ + http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata \ + " + +UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones" + +SRC_URI[tzcode.sha256sum] = "47eff8944de4a64f7629b851e4a32338ab12c9b73edd62063795167ff1fe43da" +SRC_URI[tzdata.sha256sum] = "9b053f951d245ce89d850b96ee4711d82d833559b1fc96ba19f90bc4d745e809" diff --git a/meta/recipes-extended/timezone/tzcode-native.bb b/meta/recipes-extended/timezone/tzcode-native.bb new file mode 100644 index 0000000000..e3582ba674 --- /dev/null +++ b/meta/recipes-extended/timezone/tzcode-native.bb @@ -0,0 +1,17 @@ +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/recipes-extended/tzdata/tzdata_2015f.bb b/meta/recipes-extended/timezone/tzdata.bb index 7cda40daf5..f8443110d5 100644 --- a/meta/recipes-extended/tzdata/tzdata_2015f.bb +++ b/meta/recipes-extended/timezone/tzdata.bb @@ -1,14 +1,6 @@ -DESCRIPTION = "Timezone data" -HOMEPAGE = "http://www.iana.org/time-zones" -SECTION = "base" -LICENSE = "PD & BSD" -LIC_FILES_CHKSUM = "file://asia;beginline=2;endline=3;md5=996a9811747aa48db91ed239e5b355a1" -DEPENDS = "tzcode-native" - -SRC_URI = "ftp://ftp.iana.org/tz/releases/tzdata${PV}.tar.gz;name=tzdata" +require timezone.inc -SRC_URI[tzdata.md5sum] = "e3b82732d20e973e48af1c6f13df9a1d" -SRC_URI[tzdata.sha256sum] = "959f81b541e042ecb13c50097d264ae92ff03a57979c478dbcf24d5da242531d" +DEPENDS = "tzcode-native" inherit allarch @@ -20,20 +12,21 @@ RCONFLICTS_${PN} = "timezones timezone-africa timezone-america timezone-antarcti S = "${WORKDIR}" DEFAULT_TIMEZONE ?= "Universal" +INSTALL_TIMEZONE_FILE ?= "1" TZONES= "africa antarctica asia australasia europe northamerica southamerica \ - factory etcetera backward systemv \ + factory etcetera backward \ " # pacificnew do_compile () { for zone in ${TZONES}; do \ ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo -L /dev/null \ - -y ${S}/yearistype.sh ${S}/${zone} ; \ + ${S}/${zone} ; \ ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/posix -L /dev/null \ - -y ${S}/yearistype.sh ${S}/${zone} ; \ + ${S}/${zone} ; \ ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/right -L ${S}/leapseconds \ - -y ${S}/yearistype.sh ${S}/${zone} ; \ + ${S}/${zone} ; \ done } @@ -42,12 +35,17 @@ do_install () { 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} - echo ${DEFAULT_TIMEZONE} > ${D}${sysconfdir}/timezone + 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." @@ -64,12 +62,8 @@ pkg_postinst_${PN} () { if [ -e ${src} ] ; then tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}") fi - - if [ -z "${tz}" ] ; then - exit 0 - fi - - if [ ! -e "$D${datadir}/zoneinfo/${tz}" ] ; then + + 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" @@ -84,9 +78,11 @@ pkg_postinst_${PN} () { # Packages primarily organized by directory with a major city # in most time zones in the base package -PACKAGES = "tzdata tzdata-misc tzdata-posix tzdata-right tzdata-africa \ +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" @@ -128,7 +124,6 @@ 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 \ @@ -149,8 +144,12 @@ FILES_tzdata-misc += "${datadir}/zoneinfo/Cuba \ ${datadir}/zoneinfo/Turkey" RPROVIDES_tzdata-misc = "tzdata-misc" - -FILES_${PN} += "${datadir}/zoneinfo/Pacific/Honolulu \ +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 \ @@ -165,7 +164,7 @@ FILES_${PN} += "${datadir}/zoneinfo/Pacific/Honolulu \ ${datadir}/zoneinfo/Asia/Dubai \ ${datadir}/zoneinfo/Asia/Karachi \ ${datadir}/zoneinfo/Asia/Dhaka \ - ${datadir}/zoneinfo/Asia/Bankok \ + ${datadir}/zoneinfo/Asia/Bangkok \ ${datadir}/zoneinfo/Asia/Hong_Kong \ ${datadir}/zoneinfo/Asia/Tokyo \ ${datadir}/zoneinfo/Australia/Darwin \ @@ -201,7 +200,11 @@ FILES_${PN} += "${datadir}/zoneinfo/Pacific/Honolulu \ ${datadir}/zoneinfo/WET \ ${datadir}/zoneinfo/Zulu \ ${datadir}/zoneinfo/zone.tab \ + ${datadir}/zoneinfo/zone1970.tab \ ${datadir}/zoneinfo/iso3166.tab \ ${datadir}/zoneinfo/Etc/*" -CONFFILES_${PN} += "${sysconfdir}/timezone ${sysconfdir}/localtime" +CONFFILES_tzdata-core = "${sysconfdir}/localtime ${sysconfdir}/timezone" + +ALLOW_EMPTY_${PN} = "1" +RDEPENDS_${PN} = "${TZ_PACKAGES}" diff --git a/meta/recipes-extended/tzcode/tzcode-native_2015f.bb b/meta/recipes-extended/tzcode/tzcode-native_2015f.bb deleted file mode 100644 index a8865a3167..0000000000 --- a/meta/recipes-extended/tzcode/tzcode-native_2015f.bb +++ /dev/null @@ -1,25 +0,0 @@ -# note that we allow for us to use data later than our code version -# -DESCRIPTION = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect" -LICENSE = "PD & BSD" - -LIC_FILES_CHKSUM = "file://${WORKDIR}/README;md5=d0ff93a73dd5bc3c6e724bb4343760f6" - -SRC_URI =" ftp://ftp.iana.org/tz/releases/tzcode${PV}.tar.gz;name=tzcode \ - ftp://ftp.iana.org/tz/releases/tzdata2015f.tar.gz;name=tzdata" - -SRC_URI[tzcode.md5sum] = "19578d432ba8b92f73406a17a9bc268d" -SRC_URI[tzcode.sha256sum] = "0c95e0a42bb61141f790f4f5f204b954d7654c894aa54a594a215d6f38de84ae" -SRC_URI[tzdata.md5sum] = "e3b82732d20e973e48af1c6f13df9a1d" -SRC_URI[tzdata.sha256sum] = "959f81b541e042ecb13c50097d264ae92ff03a57979c478dbcf24d5da242531d" - -S = "${WORKDIR}" - -inherit native - -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/recipes-extended/unzip/unzip/0001-unzip-fix-CVE-2018-1000035.patch b/meta/recipes-extended/unzip/unzip/0001-unzip-fix-CVE-2018-1000035.patch new file mode 100644 index 0000000000..37289d1a53 --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/0001-unzip-fix-CVE-2018-1000035.patch @@ -0,0 +1,48 @@ +From 349f566e6e757458843fa164a0f0584280e1501e Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Wed, 15 Aug 2018 16:20:53 +0800 +Subject: [PATCH] unzip: fix CVE-2018-1000035 + +Upstream-Status: Backport + +CVE: CVE-2018-1000035 + +backport from unzip6.10c23 + +Signed-off-by: Changqing Li <changqing.li@windriver.com> +--- + fileio.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/fileio.c b/fileio.c +index 36bfea3..7605a29 100644 +--- a/fileio.c ++++ b/fileio.c +@@ -1582,6 +1582,8 @@ int UZ_EXP UzpPassword (pG, rcnt, pwbuf, size, zfn, efn) + int r = IZ_PW_ENTERED; + char *m; + char *prompt; ++ char *ep; ++ char *zp; + + #ifndef REENTRANT + /* tell picky compilers to shut up about "unused variable" warnings */ +@@ -1590,9 +1592,12 @@ int UZ_EXP UzpPassword (pG, rcnt, pwbuf, size, zfn, efn) + + if (*rcnt == 0) { /* First call for current entry */ + *rcnt = 2; +- if ((prompt = (char *)malloc(2*FILNAMSIZ + 15)) != (char *)NULL) { +- sprintf(prompt, LoadFarString(PasswPrompt), +- FnFilter1(zfn), FnFilter2(efn)); ++ zp = FnFilter1( zfn); ++ ep = FnFilter2( efn); ++ prompt = (char *)malloc( /* Slightly too long (2* "%s"). */ ++ sizeof( PasswPrompt)+ strlen( zp)+ strlen( ep)); ++ if (prompt != (char *)NULL) { ++ sprintf(prompt, LoadFarString(PasswPrompt), zp, ep); + m = prompt; + } else + m = (char *)LoadFarString(PasswPrompt2); +-- +2.7.4 + diff --git a/meta/recipes-extended/unzip/unzip/06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch b/meta/recipes-extended/unzip/unzip/06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch index 9ba3c1dc62..afc4c734a7 100644 --- a/meta/recipes-extended/unzip/unzip/06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch +++ b/meta/recipes-extended/unzip/unzip/06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch @@ -3,6 +3,7 @@ Subject: unzip files encoded with non-latin, non-unicode file names Last-Update: 2015-02-11 Upstream-Status: Backport +CVE: CVE-2015-1315 Updated 2015-02-11 by Marc Deslauriers <marc.deslauriers@canonical.com> to fix buffer overflow in charset_to_intern() diff --git a/meta/recipes-extended/unzip/unzip/09-cve-2014-8139-crc-overflow.patch b/meta/recipes-extended/unzip/unzip/09-cve-2014-8139-crc-overflow.patch index e137f0dc76..0e497cc65f 100644 --- a/meta/recipes-extended/unzip/unzip/09-cve-2014-8139-crc-overflow.patch +++ b/meta/recipes-extended/unzip/unzip/09-cve-2014-8139-crc-overflow.patch @@ -5,6 +5,7 @@ Bug-Debian: http://bugs.debian.org/773722 The patch comes from unzip_6.0-8+deb7u2.debian.tar.gz Upstream-Status: Backport +CVE: CVE-2014-8139 Signed-off-by: Roy Li <rongqing.li@windriver.com> diff --git a/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch b/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch index edc7d515b0..ca4aaadffe 100644 --- a/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch +++ b/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch @@ -5,12 +5,15 @@ Bug-Debian: http://bugs.debian.org/773722 The patch comes from unzip_6.0-8+deb7u2.debian.tar.gz Upstream-Status: Backport +CVE: CVE-2014-8140 Signed-off-by: Roy Li <rongqing.li@windriver.com> ---- a/extract.c -+++ b/extract.c -@@ -2232,10 +2232,17 @@ +Index: unzip60/extract.c +=================================================================== +--- unzip60.orig/extract.c ++++ unzip60/extract.c +@@ -2233,10 +2233,17 @@ static int test_compr_eb(__G__ eb, eb_si if (compr_offset < 4) /* field is not compressed: */ return PK_OK; /* do nothing and signal OK */ @@ -29,5 +32,5 @@ Signed-off-by: Roy Li <rongqing.li@windriver.com> + ((eb_ucsize > 0L) && (eb_size <= (compr_offset + EB_CMPRHEADLEN)))) + return IZ_EF_TRUNC; /* no/bad compressed data! */ - if ( - #ifdef INT_16BIT + method = makeword(eb + (EB_HEADSIZE + compr_offset)); + if ((method == STORED) && diff --git a/meta/recipes-extended/unzip/unzip/11-cve-2014-8141-getzip64data.patch b/meta/recipes-extended/unzip/unzip/11-cve-2014-8141-getzip64data.patch index d0c1db3925..c48c23f304 100644 --- a/meta/recipes-extended/unzip/unzip/11-cve-2014-8141-getzip64data.patch +++ b/meta/recipes-extended/unzip/unzip/11-cve-2014-8141-getzip64data.patch @@ -5,6 +5,7 @@ Bug-Debian: http://bugs.debian.org/773722 The patch comes from unzip_6.0-8+deb7u2.debian.tar.gz Upstream-Status: Backport +CVE: CVE-2014-8141 Signed-off-by: Roy Li <rongqing.li@windriver.com> diff --git a/meta/recipes-extended/unzip/unzip/18-cve-2014-9913-unzip-buffer-overflow.patch b/meta/recipes-extended/unzip/unzip/18-cve-2014-9913-unzip-buffer-overflow.patch new file mode 100644 index 0000000000..3c02d596cc --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/18-cve-2014-9913-unzip-buffer-overflow.patch @@ -0,0 +1,33 @@ +From: "Steven M. Schweda" <sms@antinode.info> +Subject: Fix CVE-2014-9913, buffer overflow in unzip +Bug: https://sourceforge.net/p/infozip/bugs/27/ +Bug-Debian: https://bugs.debian.org/847485 +Bug-Ubuntu: https://launchpad.net/bugs/387350 +X-Debian-version: 6.0-21 + +Upstream-Status: Backport +CVE: CVE-2014-9913 +Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> + +--- a/list.c ++++ b/list.c +@@ -339,7 +339,18 @@ + G.crec.compression_method == ENHDEFLATED) { + methbuf[5] = dtype[(G.crec.general_purpose_bit_flag>>1) & 3]; + } else if (methnum >= NUM_METHODS) { +- sprintf(&methbuf[4], "%03u", G.crec.compression_method); ++ /* 2013-02-26 SMS. ++ * http://sourceforge.net/p/infozip/bugs/27/ CVE-2014-9913. ++ * Unexpectedly large compression methods overflow ++ * &methbuf[]. Use the old, three-digit decimal format ++ * for values which fit. Otherwise, sacrifice the ++ * colon, and use four-digit hexadecimal. ++ */ ++ if (G.crec.compression_method <= 999) { ++ sprintf( &methbuf[ 4], "%03u", G.crec.compression_method); ++ } else { ++ sprintf( &methbuf[ 3], "%04X", G.crec.compression_method); ++ } + } + + #if 0 /* GRR/Euro: add this? */ diff --git a/meta/recipes-extended/unzip/unzip/19-cve-2016-9844-zipinfo-buffer-overflow.patch b/meta/recipes-extended/unzip/unzip/19-cve-2016-9844-zipinfo-buffer-overflow.patch new file mode 100644 index 0000000000..ffadbc2efa --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/19-cve-2016-9844-zipinfo-buffer-overflow.patch @@ -0,0 +1,32 @@ +From: "Steven M. Schweda" <sms@antinode.info> +Subject: Fix CVE-2016-9844, buffer overflow in zipinfo +Bug-Debian: https://bugs.debian.org/847486 +Bug-Ubuntu: https://launchpad.net/bugs/1643750 +X-Debian-version: 6.0-21 + +Upstream-Status: Backport +CVE: CVE-2016-9844 +Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> + +--- a/zipinfo.c ++++ b/zipinfo.c +@@ -1921,7 +1921,18 @@ + ush dnum=(ush)((G.crec.general_purpose_bit_flag>>1) & 3); + methbuf[3] = dtype[dnum]; + } else if (methnum >= NUM_METHODS) { /* unknown */ +- sprintf(&methbuf[1], "%03u", G.crec.compression_method); ++ /* 2016-12-05 SMS. ++ * https://launchpad.net/bugs/1643750 ++ * Unexpectedly large compression methods overflow ++ * &methbuf[]. Use the old, three-digit decimal format ++ * for values which fit. Otherwise, sacrifice the "u", ++ * and use four-digit hexadecimal. ++ */ ++ if (G.crec.compression_method <= 999) { ++ sprintf( &methbuf[ 1], "%03u", G.crec.compression_method); ++ } else { ++ sprintf( &methbuf[ 0], "%04X", G.crec.compression_method); ++ } + } + + for (k = 0; k < 15; ++k) diff --git a/meta/recipes-extended/unzip/unzip/CVE-2015-7696.patch b/meta/recipes-extended/unzip/unzip/CVE-2015-7696.patch new file mode 100644 index 0000000000..87eed965d0 --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/CVE-2015-7696.patch @@ -0,0 +1,39 @@ +Upstream-Status: Backport +CVE: CVE-2015-7696 +Signed-off-by: Tudor Florea <tudor.flore@enea.com> + +From 68efed87fabddd450c08f3112f62a73f61d493c9 Mon Sep 17 00:00:00 2001 +From: Petr Stodulka <pstodulk@redhat.com> +Date: Mon, 14 Sep 2015 18:23:17 +0200 +Subject: [PATCH 1/2] upstream fix for heap overflow + +https://bugzilla.redhat.com/attachment.cgi?id=1073002 +--- + crypt.c | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/crypt.c b/crypt.c +index 784e411..a8975f2 100644 +--- a/crypt.c ++++ b/crypt.c +@@ -465,7 +465,17 @@ int decrypt(__G__ passwrd) + GLOBAL(pInfo->encrypted) = FALSE; + defer_leftover_input(__G); + for (n = 0; n < RAND_HEAD_LEN; n++) { +- b = NEXTBYTE; ++ /* 2012-11-23 SMS. (OUSPG report.) ++ * Quit early if compressed size < HEAD_LEN. The resulting ++ * error message ("unable to get password") could be improved, ++ * but it's better than trying to read nonexistent data, and ++ * then continuing with a negative G.csize. (See ++ * fileio.c:readbyte()). ++ */ ++ if ((b = NEXTBYTE) == (ush)EOF) ++ { ++ return PK_ERR; ++ } + h[n] = (uch)b; + Trace((stdout, " (%02x)", h[n])); + } +-- +2.4.6 diff --git a/meta/recipes-extended/unzip/unzip/CVE-2015-7697.patch b/meta/recipes-extended/unzip/unzip/CVE-2015-7697.patch new file mode 100644 index 0000000000..a8f293674b --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/CVE-2015-7697.patch @@ -0,0 +1,32 @@ +Upstream-Status: Backport +CVE: CVE-2015-7697 +Signed-off-by: Tudor Florea <tudor.flore@enea.com> + +From bd8a743ee0a77e65ad07ef4196c4cd366add3f26 Mon Sep 17 00:00:00 2001 +From: Kamil Dudka <kdudka@redhat.com> +Date: Mon, 14 Sep 2015 18:24:56 +0200 +Subject: [PATCH 2/2] fix infinite loop when extracting empty bzip2 data + +--- + extract.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/extract.c b/extract.c +index 7134bfe..29db027 100644 +--- a/extract.c ++++ b/extract.c +@@ -2733,6 +2733,12 @@ __GDEF + int repeated_buf_err; + bz_stream bstrm; + ++ if (G.incnt <= 0 && G.csize <= 0L) { ++ /* avoid an infinite loop */ ++ Trace((stderr, "UZbunzip2() got empty input\n")); ++ return 2; ++ } ++ + #if (defined(DLL) && !defined(NO_SLIDE_REDIR)) + if (G.redirect_slide) + wsize = G.redirect_size, redirSlide = G.redirect_buffer; +-- +2.4.6 diff --git a/meta/recipes-extended/unzip/unzip/CVE-2018-18384.patch b/meta/recipes-extended/unzip/unzip/CVE-2018-18384.patch new file mode 100644 index 0000000000..cc9e2c1ea1 --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/CVE-2018-18384.patch @@ -0,0 +1,39 @@ +Upstream-Status: Backport [https://sourceforge.net/p/infozip/bugs/53/] +CVE: CVE-2018-18384 +Signed-off-by: Changqing Li <changqing.li@windriver.com> + +--- unzip60/list.c ++++ unzip60/list.c +@@ -97,7 +97,7 @@ int list_files(__G) /* return PK-type + { + int do_this_file=FALSE, cfactor, error, error_in_archive=PK_COOL; + #ifndef WINDLL +- char sgn, cfactorstr[10]; ++ char sgn, cfactorstr[1+10+1+1]; /* <sgn><int>%NUL */ + int longhdr=(uO.vflag>1); + #endif + int date_format; +@@ -389,9 +389,9 @@ int list_files(__G) /* return PK-type + } + #else /* !WINDLL */ + if (cfactor == 100) +- sprintf(cfactorstr, LoadFarString(CompFactor100)); ++ snprintf(cfactorstr, sizeof(cfactorstr), LoadFarString(CompFactor100)); + else +- sprintf(cfactorstr, LoadFarString(CompFactorStr), sgn, cfactor); ++ snprintf(cfactorstr, sizeof(cfactorstr), LoadFarString(CompFactorStr), sgn, cfactor); + if (longhdr) + Info(slide, 0, ((char *)slide, LoadFarString(LongHdrStats), + FmZofft(G.crec.ucsize, "8", "u"), methbuf, +@@ -471,9 +471,9 @@ int list_files(__G) /* return PK-type + + #else /* !WINDLL */ + if (cfactor == 100) +- sprintf(cfactorstr, LoadFarString(CompFactor100)); ++ snprintf(cfactorstr, sizeof(cfactorstr), LoadFarString(CompFactor100)); + else +- sprintf(cfactorstr, LoadFarString(CompFactorStr), sgn, cfactor); ++ snprintf(cfactorstr, sizeof(cfactorstr), LoadFarString(CompFactorStr), sgn, cfactor); + if (longhdr) { + Info(slide, 0, ((char *)slide, LoadFarString(LongFileTrailer), + FmZofft(tot_ucsize, "8", "u"), FmZofft(tot_csize, "8", "u"), diff --git a/meta/recipes-extended/unzip/unzip/CVE-2019-13232_p1.patch b/meta/recipes-extended/unzip/unzip/CVE-2019-13232_p1.patch new file mode 100644 index 0000000000..d485a1bd6e --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/CVE-2019-13232_p1.patch @@ -0,0 +1,33 @@ +From 080d52c3c9416c731f637f9c6e003961ef43f079 Mon Sep 17 00:00:00 2001 +From: Mark Adler <madler@alumni.caltech.edu> +Date: Mon, 27 May 2019 08:20:32 -0700 +Subject: [PATCH 1/3] Fix bug in undefer_input() that misplaced the input + state. + +CVE: CVE-2019-13232 +Upstream-Status: Backport +[https://github.com/madler/unzip/commit/41beb477c5744bc396fa1162ee0c14218ec12213] + +Signed-off-by: Dan Tran <dantran@microsoft.com> +--- + fileio.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/fileio.c b/fileio.c +index 7605a29..14460f3 100644 +--- a/fileio.c ++++ b/fileio.c +@@ -532,8 +532,10 @@ void undefer_input(__G) + * This condition was checked when G.incnt_leftover was set > 0 in + * defer_leftover_input(), and it is NOT allowed to touch G.csize + * before calling undefer_input() when (G.incnt_leftover > 0) +- * (single exception: see read_byte()'s "G.csize <= 0" handling) !! ++ * (single exception: see readbyte()'s "G.csize <= 0" handling) !! + */ ++ if (G.csize < 0L) ++ G.csize = 0L; + G.incnt = G.incnt_leftover + (int)G.csize; + G.inptr = G.inptr_leftover - (int)G.csize; + G.incnt_leftover = 0; +-- +2.22.0.vfs.1.1.57.gbaf16c8 diff --git a/meta/recipes-extended/unzip/unzip/CVE-2019-13232_p2.patch b/meta/recipes-extended/unzip/unzip/CVE-2019-13232_p2.patch new file mode 100644 index 0000000000..41037a8e24 --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/CVE-2019-13232_p2.patch @@ -0,0 +1,356 @@ +From 1aae47fa8935654a84403768f32c03ecbb1be470 Mon Sep 17 00:00:00 2001 +From: Mark Adler <madler@alumni.caltech.edu> +Date: Tue, 11 Jun 2019 22:01:18 -0700 +Subject: [PATCH 2/3] Detect and reject a zip bomb using overlapped entries. + +This detects an invalid zip file that has at least one entry that +overlaps with another entry or with the central directory to the +end of the file. A Fifield zip bomb uses overlapped local entries +to vastly increase the potential inflation ratio. Such an invalid +zip file is rejected. + +See https://www.bamsoftware.com/hacks/zipbomb/ for David Fifield's +analysis, construction, and examples of such zip bombs. + +The detection maintains a list of covered spans of the zip files +so far, where the central directory to the end of the file and any +bytes preceding the first entry at zip file offset zero are +considered covered initially. Then as each entry is decompressed +or tested, it is considered covered. When a new entry is about to +be processed, its initial offset is checked to see if it is +contained by a covered span. If so, the zip file is rejected as +invalid. + +This commit depends on a preceding commit: "Fix bug in +undefer_input() that misplaced the input state." + +CVE: CVE-2019-13232 +Upstream-Status: Backport +[https://github.com/madler/unzip/commit/47b3ceae397d21bf822bc2ac73052a4b1daf8e1c] + +Signed-off-by: Dan Tran <dantran@microsoft.com> +--- + extract.c | 190 +++++++++++++++++++++++++++++++++++++++++++++++++++++- + globals.c | 1 + + globals.h | 3 + + process.c | 10 +++ + unzip.h | 1 + + 5 files changed, 204 insertions(+), 1 deletion(-) + +diff --git a/extract.c b/extract.c +index 24db2a8..2bb72ba 100644 +--- a/extract.c ++++ b/extract.c +@@ -321,6 +321,125 @@ static ZCONST char Far UnsupportedExtraField[] = + "\nerror: unsupported extra-field compression type (%u)--skipping\n"; + static ZCONST char Far BadExtraFieldCRC[] = + "error [%s]: bad extra-field CRC %08lx (should be %08lx)\n"; ++static ZCONST char Far NotEnoughMemCover[] = ++ "error: not enough memory for bomb detection\n"; ++static ZCONST char Far OverlappedComponents[] = ++ "error: invalid zip file with overlapped components (possible zip bomb)\n"; ++ ++ ++ ++ ++ ++/* A growable list of spans. */ ++typedef zoff_t bound_t; ++typedef struct { ++ bound_t beg; /* start of the span */ ++ bound_t end; /* one past the end of the span */ ++} span_t; ++typedef struct { ++ span_t *span; /* allocated, distinct, and sorted list of spans */ ++ size_t num; /* number of spans in the list */ ++ size_t max; /* allocated number of spans (num <= max) */ ++} cover_t; ++ ++/* ++ * Return the index of the first span in cover whose beg is greater than val. ++ * If there is no such span, then cover->num is returned. ++ */ ++static size_t cover_find(cover, val) ++ cover_t *cover; ++ bound_t val; ++{ ++ size_t lo = 0, hi = cover->num; ++ while (lo < hi) { ++ size_t mid = (lo + hi) >> 1; ++ if (val < cover->span[mid].beg) ++ hi = mid; ++ else ++ lo = mid + 1; ++ } ++ return hi; ++} ++ ++/* Return true if val lies within any one of the spans in cover. */ ++static int cover_within(cover, val) ++ cover_t *cover; ++ bound_t val; ++{ ++ size_t pos = cover_find(cover, val); ++ return pos > 0 && val < cover->span[pos - 1].end; ++} ++ ++/* ++ * Add a new span to the list, but only if the new span does not overlap any ++ * spans already in the list. The new span covers the values beg..end-1. beg ++ * must be less than end. ++ * ++ * Keep the list sorted and merge adjacent spans. Grow the allocated space for ++ * the list as needed. On success, 0 is returned. If the new span overlaps any ++ * existing spans, then 1 is returned and the new span is not added to the ++ * list. If the new span is invalid because beg is greater than or equal to ++ * end, then -1 is returned. If the list needs to be grown but the memory ++ * allocation fails, then -2 is returned. ++ */ ++static int cover_add(cover, beg, end) ++ cover_t *cover; ++ bound_t beg; ++ bound_t end; ++{ ++ size_t pos; ++ int prec, foll; ++ ++ if (beg >= end) ++ /* The new span is invalid. */ ++ return -1; ++ ++ /* Find where the new span should go, and make sure that it does not ++ overlap with any existing spans. */ ++ pos = cover_find(cover, beg); ++ if ((pos > 0 && beg < cover->span[pos - 1].end) || ++ (pos < cover->num && end > cover->span[pos].beg)) ++ return 1; ++ ++ /* Check for adjacencies. */ ++ prec = pos > 0 && beg == cover->span[pos - 1].end; ++ foll = pos < cover->num && end == cover->span[pos].beg; ++ if (prec && foll) { ++ /* The new span connects the preceding and following spans. Merge the ++ following span into the preceding span, and delete the following ++ span. */ ++ cover->span[pos - 1].end = cover->span[pos].end; ++ cover->num--; ++ memmove(cover->span + pos, cover->span + pos + 1, ++ (cover->num - pos) * sizeof(span_t)); ++ } ++ else if (prec) ++ /* The new span is adjacent only to the preceding span. Extend the end ++ of the preceding span. */ ++ cover->span[pos - 1].end = end; ++ else if (foll) ++ /* The new span is adjacent only to the following span. Extend the ++ beginning of the following span. */ ++ cover->span[pos].beg = beg; ++ else { ++ /* The new span has gaps between both the preceding and the following ++ spans. Assure that there is room and insert the span. */ ++ if (cover->num == cover->max) { ++ size_t max = cover->max == 0 ? 16 : cover->max << 1; ++ span_t *span = realloc(cover->span, max * sizeof(span_t)); ++ if (span == NULL) ++ return -2; ++ cover->span = span; ++ cover->max = max; ++ } ++ memmove(cover->span + pos + 1, cover->span + pos, ++ (cover->num - pos) * sizeof(span_t)); ++ cover->num++; ++ cover->span[pos].beg = beg; ++ cover->span[pos].end = end; ++ } ++ return 0; ++} + + + +@@ -376,6 +495,29 @@ int extract_or_test_files(__G) /* return PK-type error code */ + } + #endif /* !SFX || SFX_EXDIR */ + ++ /* One more: initialize cover structure for bomb detection. Start with a ++ span that covers the central directory though the end of the file. */ ++ if (G.cover == NULL) { ++ G.cover = malloc(sizeof(cover_t)); ++ if (G.cover == NULL) { ++ Info(slide, 0x401, ((char *)slide, ++ LoadFarString(NotEnoughMemCover))); ++ return PK_MEM; ++ } ++ ((cover_t *)G.cover)->span = NULL; ++ ((cover_t *)G.cover)->max = 0; ++ } ++ ((cover_t *)G.cover)->num = 0; ++ if ((G.extra_bytes != 0 && ++ cover_add((cover_t *)G.cover, 0, G.extra_bytes) != 0) || ++ cover_add((cover_t *)G.cover, ++ G.extra_bytes + G.ecrec.offset_start_central_directory, ++ G.ziplen) != 0) { ++ Info(slide, 0x401, ((char *)slide, ++ LoadFarString(NotEnoughMemCover))); ++ return PK_MEM; ++ } ++ + /*--------------------------------------------------------------------------- + The basic idea of this function is as follows. Since the central di- + rectory lies at the end of the zipfile and the member files lie at the +@@ -593,7 +735,8 @@ int extract_or_test_files(__G) /* return PK-type error code */ + if (error > error_in_archive) + error_in_archive = error; + /* ...and keep going (unless disk full or user break) */ +- if (G.disk_full > 1 || error_in_archive == IZ_CTRLC) { ++ if (G.disk_full > 1 || error_in_archive == IZ_CTRLC || ++ error == PK_BOMB) { + /* clear reached_end to signal premature stop ... */ + reached_end = FALSE; + /* ... and cancel scanning the central directory */ +@@ -1062,6 +1205,11 @@ static int extract_or_test_entrylist(__G__ numchunk, + + /* seek_zipf(__G__ pInfo->offset); */ + request = G.pInfo->offset + G.extra_bytes; ++ if (cover_within((cover_t *)G.cover, request)) { ++ Info(slide, 0x401, ((char *)slide, ++ LoadFarString(OverlappedComponents))); ++ return PK_BOMB; ++ } + inbuf_offset = request % INBUFSIZ; + bufstart = request - inbuf_offset; + +@@ -1593,6 +1741,18 @@ reprompt: + return IZ_CTRLC; /* cancel operation by user request */ + } + #endif ++ error = cover_add((cover_t *)G.cover, request, ++ G.cur_zipfile_bufstart + (G.inptr - G.inbuf)); ++ if (error < 0) { ++ Info(slide, 0x401, ((char *)slide, ++ LoadFarString(NotEnoughMemCover))); ++ return PK_MEM; ++ } ++ if (error != 0) { ++ Info(slide, 0x401, ((char *)slide, ++ LoadFarString(OverlappedComponents))); ++ return PK_BOMB; ++ } + #ifdef MACOS /* MacOS is no preemptive OS, thus call event-handling by hand */ + UserStop(); + #endif +@@ -1994,6 +2154,34 @@ static int extract_or_test_member(__G) /* return PK-type error code */ + } + + undefer_input(__G); ++ ++ if ((G.lrec.general_purpose_bit_flag & 8) != 0) { ++ /* skip over data descriptor (harder than it sounds, due to signature ++ * ambiguity) ++ */ ++# define SIG 0x08074b50 ++# define LOW 0xffffffff ++ uch buf[12]; ++ unsigned shy = 12 - readbuf((char *)buf, 12); ++ ulg crc = shy ? 0 : makelong(buf); ++ ulg clen = shy ? 0 : makelong(buf + 4); ++ ulg ulen = shy ? 0 : makelong(buf + 8); /* or high clen if ZIP64 */ ++ if (crc == SIG && /* if not SIG, no signature */ ++ (G.lrec.crc32 != SIG || /* if not SIG, have signature */ ++ (clen == SIG && /* if not SIG, no signature */ ++ ((G.lrec.csize & LOW) != SIG || /* if not SIG, have signature */ ++ (ulen == SIG && /* if not SIG, no signature */ ++ (G.zip64 ? G.lrec.csize >> 32 : G.lrec.ucsize) != SIG ++ /* if not SIG, have signature */ ++ ))))) ++ /* skip four more bytes to account for signature */ ++ shy += 4 - readbuf((char *)buf, 4); ++ if (G.zip64) ++ shy += 8 - readbuf((char *)buf, 8); /* skip eight more for ZIP64 */ ++ if (shy) ++ error = PK_ERR; ++ } ++ + return error; + + } /* end function extract_or_test_member() */ +diff --git a/globals.c b/globals.c +index fa8cca5..1e0f608 100644 +--- a/globals.c ++++ b/globals.c +@@ -181,6 +181,7 @@ Uz_Globs *globalsCtor() + # if (!defined(NO_TIMESTAMPS)) + uO.D_flag=1; /* default to '-D', no restoration of dir timestamps */ + # endif ++ G.cover = NULL; /* not allocated yet */ + #endif + + uO.lflag=(-1); +diff --git a/globals.h b/globals.h +index 11b7215..2bdcdeb 100644 +--- a/globals.h ++++ b/globals.h +@@ -260,12 +260,15 @@ typedef struct Globals { + ecdir_rec ecrec; /* used in unzip.c, extract.c */ + z_stat statbuf; /* used by main, mapname, check_for_newer */ + ++ int zip64; /* true if Zip64 info in extra field */ ++ + int mem_mode; + uch *outbufptr; /* extract.c static */ + ulg outsize; /* extract.c static */ + int reported_backslash; /* extract.c static */ + int disk_full; + int newfile; ++ void **cover; /* used in extract.c for bomb detection */ + + int didCRlast; /* fileio static */ + ulg numlines; /* fileio static: number of lines printed */ +diff --git a/process.c b/process.c +index a3c1a4d..208619c 100644 +--- a/process.c ++++ b/process.c +@@ -637,6 +637,13 @@ void free_G_buffers(__G) /* releases all memory allocated in global vars */ + } + #endif + ++ /* Free the cover span list and the cover structure. */ ++ if (G.cover != NULL) { ++ free(*(G.cover)); ++ free(G.cover); ++ G.cover = NULL; ++ } ++ + } /* end function free_G_buffers() */ + + +@@ -1905,6 +1912,7 @@ int getZip64Data(__G__ ef_buf, ef_len) + + #define Z64FLGS 0xffff + #define Z64FLGL 0xffffffff ++ G.zip64 = FALSE; + + if (ef_len == 0 || ef_buf == NULL) + return PK_COOL; +@@ -1964,6 +1972,8 @@ int getZip64Data(__G__ ef_buf, ef_len) + G.crec.disk_number_start = (zuvl_t)makelong(offset + ef_buf); + offset += 4; + } ++ ++ G.zip64 = TRUE; + #if 0 + break; /* Expect only one EF_PKSZ64 block. */ + #endif /* 0 */ +diff --git a/unzip.h b/unzip.h +index 5b2a326..ed24a5b 100644 +--- a/unzip.h ++++ b/unzip.h +@@ -645,6 +645,7 @@ typedef struct _Uzp_cdir_Rec { + #define PK_NOZIP 9 /* zipfile not found */ + #define PK_PARAM 10 /* bad or illegal parameters specified */ + #define PK_FIND 11 /* no files found */ ++#define PK_BOMB 12 /* likely zip bomb */ + #define PK_DISK 50 /* disk full */ + #define PK_EOF 51 /* unexpected EOF */ + +-- +2.22.0.vfs.1.1.57.gbaf16c8 diff --git a/meta/recipes-extended/unzip/unzip/CVE-2019-13232_p3.patch b/meta/recipes-extended/unzip/unzip/CVE-2019-13232_p3.patch new file mode 100644 index 0000000000..fd26fdd833 --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/CVE-2019-13232_p3.patch @@ -0,0 +1,121 @@ +From be88aa4811af47ca06d8b7dcda294f899eba70ea Mon Sep 17 00:00:00 2001 +From: Mark Adler <madler@alumni.caltech.edu> +Date: Thu, 25 Jul 2019 20:43:17 -0700 +Subject: [PATCH 3/3] Do not raise a zip bomb alert for a misplaced central + directory. + +There is a zip-like file in the Firefox distribution, omni.ja, +which is a zip container with the central directory placed at the +start of the file instead of after the local entries as required +by the zip standard. This commit marks the actual location of the +central directory, as well as the end of central directory records, +as disallowed locations. This now permits such containers to not +raise a zip bomb alert, where in fact there are no overlaps. + +CVE: CVE-2019-13232 +Upstream-Status: Backport +[https://github.com/madler/unzip/commit/6d351831be705cc26d897db44f878a978f4138fc] + +Signed-off-by: Dan Tran <dantran@microsoft.com> +--- + extract.c | 25 +++++++++++++++++++------ + process.c | 6 ++++++ + unzpriv.h | 10 ++++++++++ + 3 files changed, 35 insertions(+), 6 deletions(-) + +diff --git a/extract.c b/extract.c +index 2bb72ba..a9dcca8 100644 +--- a/extract.c ++++ b/extract.c +@@ -495,8 +495,11 @@ int extract_or_test_files(__G) /* return PK-type error code */ + } + #endif /* !SFX || SFX_EXDIR */ + +- /* One more: initialize cover structure for bomb detection. Start with a +- span that covers the central directory though the end of the file. */ ++ /* One more: initialize cover structure for bomb detection. Start with ++ spans that cover any extra bytes at the start, the central directory, ++ the end of central directory record (including the Zip64 end of central ++ directory locator, if present), and the Zip64 end of central directory ++ record, if present. */ + if (G.cover == NULL) { + G.cover = malloc(sizeof(cover_t)); + if (G.cover == NULL) { +@@ -508,15 +511,25 @@ int extract_or_test_files(__G) /* return PK-type error code */ + ((cover_t *)G.cover)->max = 0; + } + ((cover_t *)G.cover)->num = 0; +- if ((G.extra_bytes != 0 && +- cover_add((cover_t *)G.cover, 0, G.extra_bytes) != 0) || +- cover_add((cover_t *)G.cover, ++ if (cover_add((cover_t *)G.cover, + G.extra_bytes + G.ecrec.offset_start_central_directory, +- G.ziplen) != 0) { ++ G.extra_bytes + G.ecrec.offset_start_central_directory + ++ G.ecrec.size_central_directory) != 0) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(NotEnoughMemCover))); + return PK_MEM; + } ++ if ((G.extra_bytes != 0 && ++ cover_add((cover_t *)G.cover, 0, G.extra_bytes) != 0) || ++ (G.ecrec.have_ecr64 && ++ cover_add((cover_t *)G.cover, G.ecrec.ec64_start, ++ G.ecrec.ec64_end) != 0) || ++ cover_add((cover_t *)G.cover, G.ecrec.ec_start, ++ G.ecrec.ec_end) != 0) { ++ Info(slide, 0x401, ((char *)slide, ++ LoadFarString(OverlappedComponents))); ++ return PK_BOMB; ++ } + + /*--------------------------------------------------------------------------- + The basic idea of this function is as follows. Since the central di- +diff --git a/process.c b/process.c +index 208619c..5f8f6c6 100644 +--- a/process.c ++++ b/process.c +@@ -1408,6 +1408,10 @@ static int find_ecrec64(__G__ searchlen) /* return PK-class error */ + + /* Now, we are (almost) sure that we have a Zip64 archive. */ + G.ecrec.have_ecr64 = 1; ++ G.ecrec.ec_start -= ECLOC64_SIZE+4; ++ G.ecrec.ec64_start = ecrec64_start_offset; ++ G.ecrec.ec64_end = ecrec64_start_offset + ++ 12 + makeint64(&byterec[ECREC64_LENGTH]); + + /* Update the "end-of-central-dir offset" for later checks. */ + G.real_ecrec_offset = ecrec64_start_offset; +@@ -1542,6 +1546,8 @@ static int find_ecrec(__G__ searchlen) /* return PK-class error */ + makelong(&byterec[OFFSET_START_CENTRAL_DIRECTORY]); + G.ecrec.zipfile_comment_length = + makeword(&byterec[ZIPFILE_COMMENT_LENGTH]); ++ G.ecrec.ec_start = G.real_ecrec_offset; ++ G.ecrec.ec_end = G.ecrec.ec_start + 22 + G.ecrec.zipfile_comment_length; + + /* Now, we have to read the archive comment, BEFORE the file pointer + is moved away backwards to seek for a Zip64 ECLOC64 structure. +diff --git a/unzpriv.h b/unzpriv.h +index c8d3eab..5e177c7 100644 +--- a/unzpriv.h ++++ b/unzpriv.h +@@ -2185,6 +2185,16 @@ typedef struct VMStimbuf { + int have_ecr64; /* valid Zip64 ecdir-record exists */ + int is_zip64_archive; /* Zip64 ecdir-record is mandatory */ + ush zipfile_comment_length; ++ zusz_t ec_start, ec_end; /* offsets of start and end of the ++ end of central directory record, ++ including if present the Zip64 ++ end of central directory locator, ++ which immediately precedes the ++ end of central directory record */ ++ zusz_t ec64_start, ec64_end; /* if have_ecr64 is true, then these ++ are the offsets of the start and ++ end of the Zip64 end of central ++ directory record */ + } ecdir_rec; + + +-- +2.22.0.vfs.1.1.57.gbaf16c8 + diff --git a/meta/recipes-extended/unzip/unzip/unzip-6.0_overflow3.diff b/meta/recipes-extended/unzip/unzip/cve-2014-9636.patch index 0a0bfbbb17..5fcd318b25 100644 --- a/meta/recipes-extended/unzip/unzip/unzip-6.0_overflow3.diff +++ b/meta/recipes-extended/unzip/unzip/cve-2014-9636.patch @@ -4,6 +4,7 @@ Date: Wed, 11 Feb 2015 Subject: Info-ZIP UnZip buffer overflow Upstream-Status: Backport +CVE: CVE-2014-9636 By carefully crafting a corrupt ZIP archive with "extra fields" that purport to have compressed blocks larger than the corresponding diff --git a/meta/recipes-extended/unzip/unzip/fix-security-format.patch b/meta/recipes-extended/unzip/unzip/fix-security-format.patch new file mode 100644 index 0000000000..8e9b06c423 --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/fix-security-format.patch @@ -0,0 +1,97 @@ +unzip: Fixing security formatting issues + +Fix security formatting issues related to sprintf parameters expeted. + +[YOCTO #9551] +[https://bugzilla.yoctoproject.org/show_bug.cgi?id=9551] + +Upstream-Status: Pending + +Signed-off-by: Edwin Plauchu <edwin.plauchu.camacho@intel.com> + +diff --git a/extract.c b/extract.c +index 7cd9123..25c5a62 100644 +--- a/extract.c ++++ b/extract.c +@@ -475,7 +475,7 @@ int extract_or_test_files(__G) /* return PK-type error code */ + Info(slide, 0x401, ((char *)slide, + LoadFarString(CentSigMsg), j + blknum*DIR_BLKSIZ + 1)); + Info(slide, 0x401, ((char *)slide, +- LoadFarString(ReportMsg))); ++ "%s",LoadFarString(ReportMsg))); + error_in_archive = PK_BADERR; + } + reached_end = TRUE; /* ...so no more left to do */ +@@ -754,8 +754,8 @@ int extract_or_test_files(__G) /* return PK-type error code */ + + #ifndef SFX + if (no_endsig_found) { /* just to make sure */ +- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); +- Info(slide, 0x401, ((char *)slide, LoadFarString(ReportMsg))); ++ Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(EndSigMsg))); ++ Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(ReportMsg))); + if (!error_in_archive) /* don't overwrite stronger error */ + error_in_archive = PK_WARN; + } +diff --git a/list.c b/list.c +index 15e0011..0b484f6 100644 +--- a/list.c ++++ b/list.c +@@ -181,7 +181,7 @@ int list_files(__G) /* return PK-type error code */ + Info(slide, 0x401, + ((char *)slide, LoadFarString(CentSigMsg), j)); + Info(slide, 0x401, +- ((char *)slide, LoadFarString(ReportMsg))); ++ ((char *)slide, "%s", LoadFarString(ReportMsg))); + return PK_BADERR; /* sig not found */ + } + } +@@ -507,7 +507,7 @@ int list_files(__G) /* return PK-type error code */ + && (!G.ecrec.is_zip64_archive) + && (memcmp(G.sig, end_central_sig, 4) != 0) + ) { /* just to make sure again */ +- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); ++ Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(EndSigMsg))); + error_in_archive = PK_WARN; /* didn't find sig */ + } + +@@ -591,7 +591,7 @@ int get_time_stamp(__G__ last_modtime, nmember) /* return PK-type error code */ + Info(slide, 0x401, + ((char *)slide, LoadFarString(CentSigMsg), j)); + Info(slide, 0x401, +- ((char *)slide, LoadFarString(ReportMsg))); ++ ((char *)slide, "%s", LoadFarString(ReportMsg))); + return PK_BADERR; /* sig not found */ + } + } +@@ -674,7 +674,7 @@ int get_time_stamp(__G__ last_modtime, nmember) /* return PK-type error code */ + ---------------------------------------------------------------------------*/ + + if (memcmp(G.sig, end_central_sig, 4)) { /* just to make sure again */ +- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); ++ Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(EndSigMsg))); + error_in_archive = PK_WARN; + } + if (*nmember == 0L && error_in_archive <= PK_WARN) +diff --git a/zipinfo.c b/zipinfo.c +index 0ac75b3..1e7fa82 100644 +--- a/zipinfo.c ++++ b/zipinfo.c +@@ -833,7 +833,7 @@ int zipinfo(__G) /* return PK-type error code */ + Info(slide, 0x401, + ((char *)slide, LoadFarString(CentSigMsg), j)); + Info(slide, 0x401, +- ((char *)slide, LoadFarString(ReportMsg))); ++ ((char *)slide, "%s", LoadFarString(ReportMsg))); + error_in_archive = PK_BADERR; /* sig not found */ + break; + } +@@ -1022,7 +1022,7 @@ int zipinfo(__G) /* return PK-type error code */ + && (!G.ecrec.is_zip64_archive) + && (memcmp(G.sig, end_central_sig, 4) != 0) + ) { /* just to make sure again */ +- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); ++ Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(EndSigMsg))); + error_in_archive = PK_WARN; /* didn't find sig */ + } + diff --git a/meta/recipes-extended/unzip/unzip/symlink.patch b/meta/recipes-extended/unzip/unzip/symlink.patch new file mode 100644 index 0000000000..a38f6f1612 --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/symlink.patch @@ -0,0 +1,26 @@ +Unzip doesn't handle large zip files well and crashes: + +"This only happens if you have more then 16k entries and when one of +the 16k entry infos is reused it happend to be previously used for +a symlink entry." + +This patch is taken from Fedora (https://bugzilla.redhat.com/show_bug.cgi?id=972427) + +Upstream-Status: Pending (upstream is dead) +Signed-off-by: Ross Burton <ross.burton@intel.com> + +--- unzip60/process.c.sav 2013-06-09 12:08:57.070392264 +0200 ++++ unzip60/process.c 2013-06-09 12:10:08.641696988 +0200 +@@ -1751,6 +1751,12 @@ + = (G.crec.general_purpose_bit_flag & (1 << 11)) == (1 << 11); + #endif + ++#ifdef SYMLINKS ++ /* Initialize the symlink flag, may be set by the platform-specific ++ mapattr function. */ ++ G.pInfo->symlink = 0; ++#endif ++ + return PK_COOL; + + } /* end function process_cdir_file_hdr() */ diff --git a/meta/recipes-extended/unzip/unzip_6.0.bb b/meta/recipes-extended/unzip/unzip_6.0.bb index 4a0a713a61..c1ea0a9a2c 100644 --- a/meta/recipes-extended/unzip/unzip_6.0.bb +++ b/meta/recipes-extended/unzip/unzip_6.0.bb @@ -6,25 +6,41 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=94caec5a51ef55ef711ee4e8b1c69e29" PE = "1" PR = "r5" -SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/unzip60.tgz \ +SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz \ file://avoid-strip.patch \ file://define-ldflags.patch \ file://06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch \ - file://unzip-6.0_overflow3.diff \ + file://cve-2014-9636.patch \ file://09-cve-2014-8139-crc-overflow.patch \ file://10-cve-2014-8140-test-compr-eb.patch \ file://11-cve-2014-8141-getzip64data.patch \ + file://CVE-2015-7696.patch \ + file://CVE-2015-7697.patch \ + file://fix-security-format.patch \ + file://18-cve-2014-9913-unzip-buffer-overflow.patch \ + file://19-cve-2016-9844-zipinfo-buffer-overflow.patch \ + file://symlink.patch \ + file://0001-unzip-fix-CVE-2018-1000035.patch \ + file://CVE-2018-18384.patch \ + file://CVE-2019-13232_p1.patch \ + file://CVE-2019-13232_p2.patch \ + file://CVE-2019-13232_p3.patch \ " +UPSTREAM_VERSION_UNKNOWN = "1" SRC_URI[md5sum] = "62b490407489521db863b523a7f86375" SRC_URI[sha256sum] = "036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37" + +# exclude version 5.5.2 which triggers a false positive +UPSTREAM_CHECK_REGEX = "unzip(?P<pver>(?!552).+)\.tgz" + S = "${WORKDIR}/unzip60" # Makefile uses CF_NOOPT instead of CFLAGS. We lifted the values from # Makefile and add CFLAGS. Optimization will be overriden by unzip # configure to be -O3. # -EXTRA_OEMAKE += "STRIP=true LF2='' \ +EXTRA_OEMAKE = "-e MAKEFLAGS= STRIP=true LF2='' \ 'CF_NOOPT=-I. -Ibzip2 -DUNIX ${CFLAGS}'" export LD = "${CC}" @@ -48,4 +64,4 @@ ALTERNATIVE_PRIORITY = "100" ALTERNATIVE_${PN} = "unzip" ALTERNATIVE_LINK_NAME[unzip] = "${bindir}/unzip" -BBCLASSEXTEND = "native" +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-extended/watchdog/watchdog-config.bb b/meta/recipes-extended/watchdog/watchdog-config.bb new file mode 100644 index 0000000000..8bf40f0f0e --- /dev/null +++ b/meta/recipes-extended/watchdog/watchdog-config.bb @@ -0,0 +1,20 @@ +SUMMARY = "Software watchdog" +DESCRIPTION = "Watchdog is a daemon that checks if your system is still \ +working. If programs in user space are not longer executed it will reboot \ +the system." +HOMEPAGE = "http://watchdog.sourceforge.net/" +BUGTRACKER = "http://sourceforge.net/tracker/?group_id=172030&atid=860194" + +LICENSE = "MIT-X" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +SRC_URI = " \ + file://watchdog.default \ + file://watchdog.conf \ +" + +do_install() { + install -Dm 0644 ${WORKDIR}/watchdog.default ${D}${sysconfdir}/default/watchdog + install -Dm 0644 ${WORKDIR}/watchdog.conf ${D}${sysconfdir}/watchdog.conf +} + diff --git a/meta/recipes-extended/watchdog/watchdog-config/watchdog.conf b/meta/recipes-extended/watchdog/watchdog-config/watchdog.conf new file mode 100644 index 0000000000..c493d12d34 --- /dev/null +++ b/meta/recipes-extended/watchdog/watchdog-config/watchdog.conf @@ -0,0 +1,42 @@ +#ping = 172.31.14.1 +#ping = 172.26.1.255 +#interface = eth0 +#file = /var/log/messages +#change = 1407 + +# Uncomment to enable test. Setting one of these values to '0' disables it. +# These values will hopefully never reboot your machine during normal use +# (if your machine is really hung, the loadavg will go much higher than 25) +#max-load-1 = 24 +#max-load-5 = 18 +#max-load-15 = 12 + +# Note that this is the number of pages! +# To get the real size, check how large the pagesize is on your machine. +#min-memory = 1 + +#repair-binary = /usr/sbin/repair +#repair-timeout = +#test-binary = +#test-timeout = + +watchdog-device = /dev/watchdog + +# Defaults compiled into the binary +#temperature-device = +#max-temperature = 120 + +# Defaults compiled into the binary +#admin = root +#interval = 1 +#logtick = 1 +#log-dir = /var/log/watchdog + +# This greatly decreases the chance that watchdog won't be scheduled before +# your machine is really loaded +realtime = yes +priority = 1 + +# Check if rsyslogd is still running by enabling the following line +#pidfile = /var/run/rsyslogd.pid + diff --git a/meta/recipes-extended/watchdog/watchdog-config/watchdog.default b/meta/recipes-extended/watchdog/watchdog-config/watchdog.default new file mode 100644 index 0000000000..647d5abca5 --- /dev/null +++ b/meta/recipes-extended/watchdog/watchdog-config/watchdog.default @@ -0,0 +1,2 @@ +# Start watchdog at boot time? 0 or 1 +run_watchdog=1 diff --git a/meta/recipes-extended/watchdog/watchdog/0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch b/meta/recipes-extended/watchdog/watchdog/0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch new file mode 100644 index 0000000000..075a98e5e5 --- /dev/null +++ b/meta/recipes-extended/watchdog/watchdog/0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch @@ -0,0 +1,68 @@ +From c1fe14fa5bd168292cc4670034bc48b954e9dac7 Mon Sep 17 00:00:00 2001 +From: "Maxin B. John" <maxin.john@intel.com> +Date: Tue, 13 Mar 2018 14:49:55 +0200 +Subject: [PATCH] watchdog: remove interdependencies of watchdog and + wd_keepalive services + +Since watchdog and watchdog-keepalive packages can't be installed +together, remove the inter-dependencies of watchdog and wd_keepalive +services + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Maxin B. John <maxin.john@intel.com> +--- + debian/watchdog.service | 9 +++------ + debian/wd_keepalive.service | 10 +++++----- + 2 files changed, 8 insertions(+), 11 deletions(-) + +diff --git a/debian/watchdog.service b/debian/watchdog.service +index 7a2fc36..f31d1fe 100644 +--- a/debian/watchdog.service ++++ b/debian/watchdog.service +@@ -1,16 +1,13 @@ + [Unit] + Description=watchdog daemon +-Conflicts=wd_keepalive.service + After=multi-user.target +-OnFailure=wd_keepalive.service + + [Service] + Type=forking + EnvironmentFile=/etc/default/watchdog + ExecStartPre=/bin/sh -c '[ -z "${watchdog_module}" ] || [ "${watchdog_module}" = "none" ] || /sbin/modprobe $watchdog_module' +-ExecStart=/bin/sh -c '[ $run_watchdog != 1 ] || exec /usr/sbin/watchdog $watchdog_options' +-ExecStopPost=/bin/sh -c '[ $run_wd_keepalive != 1 ] || false' ++ExecStart=/bin/sh -c '[ x$run_watchdog != x1 ] || exec /usr/sbin/watchdog $watchdog_options' ++PIDFile=/run/watchdog.pid + + [Install] +-WantedBy=default.target +- ++WantedBy=multi-user.target +diff --git a/debian/wd_keepalive.service b/debian/wd_keepalive.service +index 45b018e..7f8b1dc 100644 +--- a/debian/wd_keepalive.service ++++ b/debian/wd_keepalive.service +@@ -1,13 +1,13 @@ + [Unit] + Description=watchdog keepalive daemon +-Before=watchdog.service shutdown.target +-Conflicts=watchdog.service shutdown.target ++After=multi-user.target + + [Service] + Type=forking + EnvironmentFile=/etc/default/watchdog + ExecStartPre=/bin/sh -c '[ -z "${watchdog_module}" ] || [ "${watchdog_module}" = "none" ] || /sbin/modprobe $watchdog_module' +-ExecStartPre=-/bin/systemctl reset-failed watchdog.service + ExecStart=/usr/sbin/wd_keepalive $watchdog_options +-ExecStartPost=/bin/sh -c 'ln -s /var/run/wd_keepalive.pid /run/sendsigs.omit.d/wd_keepalive.pid' +-ExecStopPost=/bin/sh -c 'rm -f /run/sendsigs.omit.d/wd_keepalive.pid' ++PIDFile=/var/run/wd_keepalive.pid ++ ++[Install] ++WantedBy=multi-user.target +-- +2.4.0 + diff --git a/meta/recipes-extended/watchdog/watchdog/0001-wd_keepalive.service-use-run-instead-of-var-run.patch b/meta/recipes-extended/watchdog/watchdog/0001-wd_keepalive.service-use-run-instead-of-var-run.patch new file mode 100644 index 0000000000..5c5d2f4e44 --- /dev/null +++ b/meta/recipes-extended/watchdog/watchdog/0001-wd_keepalive.service-use-run-instead-of-var-run.patch @@ -0,0 +1,30 @@ +From b5cb6166dbfa57d1d94b19d4a098991a817f68f5 Mon Sep 17 00:00:00 2001 +From: Chen Qi <Qi.Chen@windriver.com> +Date: Thu, 15 Oct 2020 10:02:17 +0800 +Subject: [PATCH] wd_keepalive.service: use /run instead of /var/run + +/var/run is deprecated by systemd, use /run instead. + +Upstream-Status: Pending + +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +--- + debian/wd_keepalive.service | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/debian/wd_keepalive.service b/debian/wd_keepalive.service +index 7f8b1dc..0f2a153 100644 +--- a/debian/wd_keepalive.service ++++ b/debian/wd_keepalive.service +@@ -7,7 +7,7 @@ Type=forking + EnvironmentFile=/etc/default/watchdog + ExecStartPre=/bin/sh -c '[ -z "${watchdog_module}" ] || [ "${watchdog_module}" = "none" ] || /sbin/modprobe $watchdog_module' + ExecStart=/usr/sbin/wd_keepalive $watchdog_options +-PIDFile=/var/run/wd_keepalive.pid ++PIDFile=/run/wd_keepalive.pid + + [Install] + WantedBy=multi-user.target +-- +2.17.1 + diff --git a/meta/recipes-extended/watchdog/watchdog/fix-ping-failure.patch b/meta/recipes-extended/watchdog/watchdog/fix-ping-failure.patch deleted file mode 100644 index 14ab9c56ab..0000000000 --- a/meta/recipes-extended/watchdog/watchdog/fix-ping-failure.patch +++ /dev/null @@ -1,79 +0,0 @@ -Fix ping mode failure - -Upstream-Status: Pending - -When watchdog works on ping mode, the system will be rebooted since -watchdog can not receive the expected ECOREPLY on a setting interval. - -Ping mode uses a raw socket to send a ECO packet, then uses select() -to wait and recvfrom() to receive the ECOREPLY packet, if select() -shows the data is ready, and the data is not the expected ECOREPLY, -and waiting time is not overdue, it will continue use select() and -recvfrom(). - -Problem is that the raw socket can receive any icmp packets, if we do -not set filters, and there are many icmp packets on socket, this -program will not find its interested ECOREPLY packet in a special -interval, which makes the ping mode fail. - - -Other program is that watchdog sometime can not reach the call of -recvfrom to try to receive packets since tv_sec of struct timeval -of select parameter is 0. - -The timeout of select() is the result of ping interval minusing the -time of calling gettimeofday spending, when ping interval is 1 second, -and the call of gettimeofday() spends several useconds, the tv_sec of -struct timeval of select parameter must be 0, at that condition, we -should it is valid of tv_sec of struct timeval of select parameter be 0 - -Signed-off-by: Roy.Li <rongqing.li@windriver.com> ---- - src/net.c | 2 +- - src/watchdog.c | 5 ++++- - 2 files changed, 5 insertions(+), 2 deletions(-) - -Index: watchdog-5.14/src/watchdog.c -=================================================================== ---- watchdog-5.14.orig/src/watchdog.c -+++ watchdog-5.14/src/watchdog.c -@@ -24,6 +24,7 @@ - #include <sys/types.h> - #include <sys/ioctl.h> - #include <linux/oom.h> -+#include <linux/icmp.h> - #include <linux/watchdog.h> - #include <string.h> - -Index: watchdog-5.14/src/net.c -=================================================================== ---- watchdog-5.14.orig/src/net.c -+++ watchdog-5.14/src/net.c -@@ -11,7 +11,8 @@ - #include <errno.h> - #include <sys/time.h> - #include <netinet/ip.h> --#include <netinet/ip_icmp.h> -+#include <linux/icmp.h> -+//#include <netinet/ip_icmp.h> - #include <fcntl.h> - #include <string.h> - #include <unistd.h> /* for gethostname() etc */ -@@ -179,6 +180,9 @@ int open_netcheck(struct list *tlist) - { - struct list *act; - int hold = 0; -+ struct icmp_filter filt; -+ filt.data = ~(1<<ICMP_ECHOREPLY); -+ - - if (tlist != NULL) { - for (act = tlist; act != NULL; act = act->next) { -@@ -202,6 +206,7 @@ int open_netcheck(struct list *tlist) - fatal_error(EX_SYSERR, "error opening socket (%s)", strerror(errno)); - } - -+ setsockopt(net->sock_fp, SOL_RAW, ICMP_FILTER, (char*)&filt, sizeof(filt)); - /* this is necessary for broadcast pings to work */ - (void)setsockopt(net->sock_fp, SOL_SOCKET, SO_BROADCAST, (char *)&hold, sizeof(hold)); - diff --git a/meta/recipes-extended/watchdog/watchdog/fixsepbuild.patch b/meta/recipes-extended/watchdog/watchdog/fixsepbuild.patch deleted file mode 100644 index 2fad3a112f..0000000000 --- a/meta/recipes-extended/watchdog/watchdog/fixsepbuild.patch +++ /dev/null @@ -1,27 +0,0 @@ -Fix out of tree build support: - -| installing /etc/watchdog.conf -| /bin/mkdir -p '/media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/image/usr/share/man/man5' -| /bin/mkdir -p '/media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/image/usr/share/man/man8' -| /usr/bin/install -c -m 644 /media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/watchdog-5.13/watchdog.conf.5 '/media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/image/usr/share/man/man5' -| /usr/bin/install -c -m 644 /media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/watchdog-5.13/watchdog.8 /media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/watchdog-5.13/wd_keepalive.8 /media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/watchdog-5.13/wd_identify.8 '/media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/image/usr/share/man/man8' -| /usr/bin/install: cannot stat `watchdog.conf': No such file or directory -| make[2]: *** [install-etc-local] Error 1 - -Upstream-Status: Pending - -RP 2013/03/21 - -Index: watchdog-5.13/Makefile.am -=================================================================== ---- watchdog-5.13.orig/Makefile.am 2013-02-01 11:15:44.000000000 +0000 -+++ watchdog-5.13/Makefile.am 2013-03-21 11:59:35.637139031 +0000 -@@ -16,7 +16,7 @@ - else \ - echo "installing $(CONFIG_FILENAME)"; \ - $(mkinstalldirs) `dirname $(DESTDIR)$(CONFIG_FILENAME)`; \ -- $(INSTALL_DATA) watchdog.conf $(DESTDIR)$(CONFIG_FILENAME); \ -+ $(INSTALL_DATA) $(srcdir)/watchdog.conf $(DESTDIR)$(CONFIG_FILENAME); \ - fi - - install-data-local: install-etc-local diff --git a/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch b/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch deleted file mode 100644 index 36f2968f5a..0000000000 --- a/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- watchdog-5.13.orig/watchdog.conf 2013-02-01 12:15:44.000000000 +0100 -+++ watchdog-5.13/watchdog.conf 2014-11-13 10:59:43.233943000 +0100 -@@ -20,7 +20,7 @@ - #test-binary = - #test-timeout = - --#watchdog-device = /dev/watchdog -+watchdog-device = /dev/watchdog - - # Defaults compiled into the binary - #temperature-device = diff --git a/meta/recipes-extended/watchdog/watchdog/watchdog-init.patch b/meta/recipes-extended/watchdog/watchdog/watchdog-init.patch deleted file mode 100644 index 0fa8ee97cb..0000000000 --- a/meta/recipes-extended/watchdog/watchdog/watchdog-init.patch +++ /dev/null @@ -1,53 +0,0 @@ ---- watchdog-5.13.orig/redhat/watchdog.init 2014-11-12 17:18:39.125943000 +0100 -+++ watchdog-5.13/redhat/watchdog.init 2014-11-12 18:27:36.189943000 +0100 -@@ -7,7 +7,7 @@ - # Henning P. Schmiedehausen <hps@tanstaafl.de> - - # Source function library. --. /etc/rc.d/init.d/functions -+. /etc/init.d/functions - - [ -x /usr/sbin/watchdog -a -e /etc/watchdog.conf ] || exit 0 - -@@ -23,22 +23,22 @@ - - start() { - -- echo -n $"Starting $prog: " -+ echo -n "Starting $prog: " - if [ -n "$(pidofproc $prog)" ]; then -- echo -n $"$prog: already running" -- echo_failure -+ echo -n "$prog: already running " -+ failure - echo - return 1 - fi - if [ "$VERBOSE" = "yes" ]; then -- daemon /usr/sbin/${prog} -v -+ /usr/sbin/${prog} -v - else -- daemon /usr/sbin/${prog} -+ /usr/sbin/${prog} - fi - RETVAL=$? - [ $RETVAL -eq 0 ] && touch $lockfile -- [ $RETVAL -eq 0 ] && echo_success -- [ $RETVAL -ne 0 ] && echo_failure -+ [ $RETVAL -eq 0 ] && success -+ [ $RETVAL -ne 0 ] && failure - echo - return $RETVAL - } -@@ -50,8 +50,10 @@ - # and reboot the box. - killproc $prog -TERM - RETVAL=$? -- echo - [ $RETVAL -eq 0 ] && rm -f $lockfile $pidfile -+ [ $RETVAL -eq 0 ] && success -+ [ $RETVAL -ne 0 ] && failure -+ echo - return $RETVAL - } - diff --git a/meta/recipes-extended/watchdog/watchdog/watchdog.init b/meta/recipes-extended/watchdog/watchdog/watchdog.init new file mode 100644 index 0000000000..d37107cf0e --- /dev/null +++ b/meta/recipes-extended/watchdog/watchdog/watchdog.init @@ -0,0 +1,110 @@ +#!/bin/sh +#/etc/init.d/watchdog: start watchdog daemon. + +### BEGIN INIT INFO +# Provides: watchdog +# Short-Description: Start software watchdog daemon +# Required-Start: $all +# Required-Stop: $all +# Should-Start: +# Should-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +### END INIT INFO + +PATH=/bin:/usr/bin:/sbin:/usr/sbin + +test -x /usr/sbin/watchdog || exit 0 + +# For configuration of the init script use the file +# /etc/default/watchdog, do not edit this init script. + +# Set run_watchdog to 1 to start watchdog or 0 to disable it. +run_watchdog=0 + +# Specify additional watchdog options here (see manpage). +watchdog_options="" + +# Specify module to load +watchdog_module="none" + +[ -e /etc/default/watchdog ] && . /etc/default/watchdog + +NAME=watchdog +DAEMON=/usr/sbin/watchdog + +STOP_RETRY_SCHEDULE='TERM/10/forever/KILL/1' + +. /etc/init.d/functions + +# Mock Debian stuff +log_begin_msg() { + echo -n $* +} + +log_end_msg() { + if [ "$1" = "0" ]; then + echo 'done' + else + echo 'error' + fi +} + +log_daemon_msg() { + echo $* +} + +log_progress_msg() { + echo $* +} + +case "$1" in + start) + if [ $run_watchdog = 1 ] + then + # do we have to load a module? + [ "${watchdog_module:-none}" != "none" ] && /sbin/modprobe $watchdog_module + + # Check /dev/watchdog here because if it does not exist after module loading, + # it makes no sense to start the daemon + test -e /dev/watchdog || { log_daemon_msg "daemon not start due to lack of /dev/watchdog"; exit 0; } + + log_begin_msg "Starting watchdog daemon..." + start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ + --exec $DAEMON -- $watchdog_options + log_end_msg $? + fi + ;; + + stop) + if [ $run_watchdog = 1 ] + then + log_begin_msg "Stopping watchdog daemon..." + start-stop-daemon --stop --quiet --retry $STOP_RETRY_SCHEDULE \ + --pidfile /var/run/$NAME.pid + + fi + ;; + + restart) + $0 force-reload + ;; + + force-reload) + if [ $run_watchdog = 0 ]; then exit 0; fi + log_daemon_msg "Restarting $NAME" + $0 stop + $0 start + ;; + + status) + status "$DAEMON" + ;; + + *) + echo "Usage: /etc/init.d/watchdog {start|stop|restart|force-reload|status}" + exit 1 + +esac + +exit 0 diff --git a/meta/recipes-extended/watchdog/watchdog/wd_keepalive.init b/meta/recipes-extended/watchdog/watchdog/wd_keepalive.init new file mode 100644 index 0000000000..1d3e4c5558 --- /dev/null +++ b/meta/recipes-extended/watchdog/watchdog/wd_keepalive.init @@ -0,0 +1,121 @@ +#!/bin/sh +#/etc/init.d/wd_keepalive: start wd_keepalive daemon. + +### BEGIN INIT INFO +# Provides: wd_keepalive +# Short-Description: Start watchdog keepalive daemon +# Required-Start: $remote_fs +# Required-Stop: $remote_fs +# X-Start-Before: $all +# Default-Start: 2 3 4 5 +# Default-Stop +### END INIT INFO + +PATH=/bin:/usr/bin:/sbin:/usr/sbin + +test -x /usr/sbin/wd_keepalive || exit 0 + +# For configuration of the init script use the file +# /etc/default/watchdog, do not edit this init script. + +# Set run_watchdog to 1 to start watchdog or 0 to disable it. +run_watchdog=0 + +# Specify additional watchdog options here (see manpage). +watchdog_options="" + +# Specify module to load +watchdog_module="none" + +[ -e /etc/default/watchdog ] && . /etc/default/watchdog + +NAME=wd_keepalive +DAEMON=/usr/sbin/wd_keepalive + +STOP_RETRY_SCHEDULE='TERM/10/forever/KILL/1' + +# . /lib/lsb/init-functions + +# Mock Debian stuff +log_begin_msg() { + echo -n $* +} + +log_end_msg() { + if [ "$1" = "0" ]; then + echo 'done' + else + echo 'error' + fi +} + +log_daemon_msg() { + echo $* +} + +log_progress_msg() { + echo $* +} + + +case "$1" in + start) + if [ $run_watchdog = 1 ] + then + [ ${watchdog_module:-none} != "none" ] && /sbin/modprobe $watchdog_module + echo -n "Starting watchdog keepalive daemon: " + if start-stop-daemon --start --quiet \ + --exec $DAEMON -- $watchdog_options + then + echo wd_keepalive. + else + echo + fi + fi + ;; + + stop) + if [ $run_watchdog = 1 ] + then + echo -n "Stopping watchdog keepalive daemon: " + if start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ + $STOP_RETRY_SCHEDULE + then + echo wd_keepalive. + else + echo + fi + fi + ;; + + status) + status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? + ;; + + restart) + $0 force-reload + ;; + + force-reload) + if [ $run_watchdog = 0 ]; then exit 0; fi + echo -n "Restarting $NAME daemon." + start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ + $STOP_RETRY_SCHEDULE + echo -n "." + if start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ + --exec $DAEMON -- $watchdog_options + then + echo "done." + else + echo + fi + ;; + + *) + echo "Usage: /etc/init.d/wd_keepalive {start|stop|status|restart|force-reload}" + exit 1 + +esac + +exit 0 + diff --git a/meta/recipes-extended/watchdog/watchdog_5.14.bb b/meta/recipes-extended/watchdog/watchdog_5.14.bb deleted file mode 100644 index 9ec0a8e84a..0000000000 --- a/meta/recipes-extended/watchdog/watchdog_5.14.bb +++ /dev/null @@ -1,30 +0,0 @@ -SUMMARY = "Software watchdog" -DESCRIPTION = "Watchdog is a daemon that checks if your system is still \ -working. If programs in user space are not longer executed \ -it will reboot the system." -HOMEPAGE = "http://watchdog.sourceforge.net/" -BUGTRACKER = "http://sourceforge.net/tracker/?group_id=172030&atid=860194" - -LICENSE = "GPL-2.0+" -LIC_FILES_CHKSUM = "file://COPYING;md5=ecc0551bf54ad97f6b541720f84d6569" - -SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \ - file://fixsepbuild.patch \ - file://fix-ping-failure.patch \ - file://watchdog-init.patch \ - file://watchdog-conf.patch" - -SRC_URI[md5sum] = "5b2dba0c593942f4acc100bca0d560c4" -SRC_URI[sha256sum] = "620b2f49e9879f2e85c73d4c1f422f9101e6b38e824fea2414befd8bb6866ad1" - -inherit autotools -inherit update-rc.d - -INITSCRIPT_NAME = "watchdog.sh" -INITSCRIPT_PARAMS = "start 15 1 2 3 4 5 . stop 85 0 6 ." - -RRECOMMENDS_${PN} = "kernel-module-softdog" - -do_install_append() { - install -D ${S}/redhat/watchdog.init ${D}/${sysconfdir}/init.d/watchdog.sh -} diff --git a/meta/recipes-extended/watchdog/watchdog_5.16.bb b/meta/recipes-extended/watchdog/watchdog_5.16.bb new file mode 100644 index 0000000000..1988952603 --- /dev/null +++ b/meta/recipes-extended/watchdog/watchdog_5.16.bb @@ -0,0 +1,72 @@ +SUMMARY = "Software watchdog" +DESCRIPTION = "Watchdog is a daemon that checks if your system is still \ +working. If programs in user space are not longer executed \ +it will reboot the system." +HOMEPAGE = "http://watchdog.sourceforge.net/" +BUGTRACKER = "http://sourceforge.net/tracker/?group_id=172030&atid=860194" + +LICENSE = "GPL-2.0+" +LIC_FILES_CHKSUM = "file://COPYING;md5=084236108b1d4a9851bf5213fea586fd" + +SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \ + file://0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch \ + file://watchdog.init \ + file://wd_keepalive.init \ + file://0001-wd_keepalive.service-use-run-instead-of-var-run.patch \ +" + +SRC_URI[md5sum] = "1b4f51cabc64d1bee2fce7cdd626831f" +SRC_URI[sha256sum] = "b8e7c070e1b72aee2663bdc13b5cc39f76c9232669cfbb1ac0adc7275a3b019d" + +UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/watchdog/files/watchdog/" +UPSTREAM_CHECK_REGEX = "/watchdog/(?P<pver>(\d+[\.\-_]*)+)/" + +inherit autotools update-rc.d systemd pkgconfig + +DEPENDS += "libtirpc" +CFLAGS += "-I${STAGING_INCDIR}/tirpc" +LDFLAGS += "-ltirpc" + +EXTRA_OECONF += " --disable-nfs " + +INITSCRIPT_PACKAGES = "${PN} ${PN}-keepalive" + +INITSCRIPT_NAME_${PN} = "watchdog" +INITSCRIPT_PARAMS_${PN} = "start 25 1 2 3 4 5 . stop 85 0 6 ." + +INITSCRIPT_NAME_${PN}-keepalive = "wd_keepalive" +INITSCRIPT_PARAMS_${PN}-keepalive = "start 25 1 2 3 4 5 . stop 85 0 6 ." + +SYSTEMD_PACKAGES = "${PN} ${PN}-keepalive" +SYSTEMD_SERVICE_${PN} = "watchdog.service" +SYSTEMD_SERVICE_${PN}-keepalive = "wd_keepalive.service" +# When using systemd, consider making use of internal watchdog support of systemd. +# See RuntimeWatchdogSec in /etc/systemd/system.conf. +SYSTEMD_AUTO_ENABLE = "disable" + +do_install_append() { + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${S}/debian/watchdog.service ${D}${systemd_system_unitdir} + install -m 0644 ${S}/debian/wd_keepalive.service ${D}${systemd_system_unitdir} + + install -Dm 0755 ${WORKDIR}/watchdog.init ${D}/${sysconfdir}/init.d/watchdog + install -Dm 0755 ${WORKDIR}/wd_keepalive.init ${D}${sysconfdir}/init.d/wd_keepalive + + # watchdog.conf is provided by the watchdog-config recipe + rm ${D}${sysconfdir}/watchdog.conf +} + +PACKAGES =+ "${PN}-keepalive" + +FILES_${PN}-keepalive = " \ + ${sysconfdir}/init.d/wd_keepalive \ + ${systemd_system_unitdir}/wd_keepalive.service \ + ${sbindir}/wd_keepalive \ +" + +RDEPENDS_${PN} += "${PN}-config" +RRECOMMENDS_${PN} += "kernel-module-softdog" + +RDEPENDS_${PN}-keepalive += "${PN}-config" +RCONFLICTS_${PN}-keepalive += "${PN}" +RRECOMMENDS_${PN}-keepalive += "kernel-module-softdog" diff --git a/meta/recipes-extended/wget/wget.inc b/meta/recipes-extended/wget/wget.inc index 049b898d39..2338328216 100644 --- a/meta/recipes-extended/wget/wget.inc +++ b/meta/recipes-extended/wget/wget.inc @@ -1,16 +1,21 @@ SUMMARY = "Console URL download utility supporting HTTP, FTP, etc" +DESCRIPTION = "Wget is a network utility to retrieve files from the web using \ +HTTP(S) and FTP, the two most widely used internet protocols. It works \ +non-interactively, so it will work in the background, after having logged off. \ +The program supports recursive retrieval of web-authoring pages as well as \ +FTP sites" HOMEPAGE = "https://www.gnu.org/software/wget/" SECTION = "console/network" LICENSE = "GPLv3" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" -DEPENDS = "gnutls zlib libpcre" - -INC_PR = "r16" +LIC_FILES_CHKSUM = "file://COPYING;md5=c678957b0c8e964aa6c70fd77641a71e" inherit autotools gettext texinfo update-alternatives pkgconfig -EXTRA_OECONF = "--enable-ipv6 --with-ssl=gnutls --disable-rpath --disable-iri \ - --without-libgnutls-prefix ac_cv_header_uuid_uuid_h=no" +EXTRA_OECONF = "--without-libgnutls-prefix --without-libssl-prefix \ + --disable-rpath" + +EXTRA_OEMAKE += 'TOOLCHAIN_OPTIONS="${TOOLCHAIN_OPTIONS}" \ + DEBUG_PREFIX_MAP="${DEBUG_PREFIX_MAP}"' ALTERNATIVE_${PN} = "wget" ALTERNATIVE_${PN}_class-nativesdk = "" @@ -18,7 +23,21 @@ ALTERNATIVE_PRIORITY = "100" RRECOMMENDS_${PN} += "ca-certificates" -BBCLASSEXTEND += "nativesdk" +BBCLASSEXTEND = "nativesdk" + +PACKAGECONFIG ??= "gnutls pcre zlib \ + ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" +PACKAGECONFIG[ares] = "--with-cares,--without-cares,c-ares" +PACKAGECONFIG[gnutls] = "--with-ssl=gnutls,,gnutls" +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," +PACKAGECONFIG[iri] = "--enable-iri,--disable-iri,libidn2" +PACKAGECONFIG[libpsl] = "--with-libpsl,--without-libpsl,libpsl" +PACKAGECONFIG[libuuid] = "--with-libuuid,--without-libuuid,util-linux" +PACKAGECONFIG[openssl] = "--with-ssl=openssl,,openssl" +PACKAGECONFIG[pcre] = "--enable-pcre,--disable-pcre,libpcre" +PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib" -PACKAGECONFIG ??= "" -PACKAGECONFIG[libuuid] = "--with-libuuid, --without-libuuid,util-linux" +# Let aclocal use the relative path for the m4 file rather than +# absolute, otherwise there might be an "Argument list too long" error +# when it is built in a long/deep directory. +acpaths = "-I ./m4" diff --git a/meta/recipes-extended/wget/wget/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/wget/wget/0001-Unset-need_charset_alias-when-building-for-musl.patch deleted file mode 100644 index c1cbd145b3..0000000000 --- a/meta/recipes-extended/wget/wget/0001-Unset-need_charset_alias-when-building-for-musl.patch +++ /dev/null @@ -1,30 +0,0 @@ -From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 13 Apr 2015 17:02:13 -0700 -Subject: [PATCH] Unset need_charset_alias when building for musl - -localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 -which actually shoudl be fixed in gnulib and then all downstream -projects will get it eventually. For now we apply the fix to -coreutils - -Upstream-Status: Not Required - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - lib/gnulib.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: wget-1.16.3/lib/Makefile.am -=================================================================== ---- wget-1.16.3.orig/lib/Makefile.am -+++ wget-1.16.3/lib/Makefile.am -@@ -846,7 +846,7 @@ install-exec-localcharset: all-local - case '$(host_os)' in \ - darwin[56]*) \ - need_charset_alias=true ;; \ -- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ -+ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ - need_charset_alias=false ;; \ - *) \ - need_charset_alias=true ;; \ diff --git a/meta/recipes-extended/wget/wget/0002-improve-reproducibility.patch b/meta/recipes-extended/wget/wget/0002-improve-reproducibility.patch new file mode 100644 index 0000000000..050fc2c7e1 --- /dev/null +++ b/meta/recipes-extended/wget/wget/0002-improve-reproducibility.patch @@ -0,0 +1,66 @@ +From 7f1357529d23b356b45fbb0dd7388588162e4cb8 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Wed, 10 Jan 2018 14:43:20 +0800 +Subject: [PATCH] src/Makefile.am: improve reproducibility + +Remove build host references from the internally +generated file version.c. The references get compiled into +executables, which leads to non-reproducible builds. +The removed references (--sysroot, -fdebug-prefix-map) were +only used as part of the `wget --version' which do not have +side effect. + +... +$ wget --version +GNU Wget 1.14 built on linux-gnu. + ++digest +https +ipv6 +iri +large-file +nls +ntlm +opie +ssl/openssl + +Wgetrc: + /etc/wgetrc (system) +Locale: /usr/share/locale +Compile: gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/etc/wgetrc" + -DLOCALEDIR="/usr/share/locale" -I. -I../lib -I../lib -O2 -g -pipe + -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong + --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic +Link: gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions + -fstack-protector-strong --param=ssp-buffer-size=4 + -grecord-gcc-switches -m64 -mtune=generic -lssl -lcrypto + /usr/lib64/libssl.so /usr/lib64/libcrypto.so /usr/lib64/libz.so + -ldl -lz -lz -lidn -luuid -lpcre ftp-opie.o openssl.o http-ntlm.o + ../lib/libgnu.a +... + +Upstream-Status: Inappropriate [oe-core specific] + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> + +sed use of DEBUG_PREFIX_MAP must treat whitespace the same as the +echo command building version.c or the expression match will fail. + +Signed-off-by: Joe Slater <jslater@windriver.com> +--- + src/Makefile.am | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 28c0be2..44084a3 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -87,9 +87,13 @@ version.c: $(wget_SOURCES) ../lib/libgnu.a + echo '#include "version.h"' >> $@ + echo 'const char *version_string = "@VERSION@";' >> $@ + echo 'const char *compilation_string = "'$(COMPILE)'";' \ ++ | sed -e "s,$(TOOLCHAIN_OPTIONS),,g" \ ++ -e "s,$$(echo $(DEBUG_PREFIX_MAP)),,g" \ + | $(ESCAPEQUOTE) >> $@ + echo 'const char *link_string = "'$(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) $(LIBS) $(wget_LDADD)'";' \ ++ | sed -e "s,$(TOOLCHAIN_OPTIONS),,g" \ ++ -e "s,$$(echo $(DEBUG_PREFIX_MAP)),,g" \ + | $(ESCAPEQUOTE) >> $@ + + css.c: $(srcdir)/css.l +-- +1.8.3.1 + diff --git a/meta/recipes-extended/wget/wget/fix_makefile.patch b/meta/recipes-extended/wget/wget/fix_makefile.patch deleted file mode 100644 index eaa2e7e8c6..0000000000 --- a/meta/recipes-extended/wget/wget/fix_makefile.patch +++ /dev/null @@ -1,18 +0,0 @@ - -Upstream-Status: Pending - -Signed-off-by: Saul Wold <sgw@linux.intel.com> - -Index: wget-1.12/configure.ac -=================================================================== ---- wget-1.12.orig/configure.ac 2009-09-22 09:39:49.000000000 -0700 -+++ wget-1.12/configure.ac 2011-10-19 20:32:53.714812160 -0700 -@@ -177,7 +177,7 @@ - dnl Gettext - dnl - AM_GNU_GETTEXT([external],[need-ngettext]) --AM_GNU_GETTEXT_VERSION([0.17]) -+AM_GNU_GETTEXT_VERSION([0.18]) - - AC_PROG_RANLIB - diff --git a/meta/recipes-extended/wget/wget_1.16.3.bb b/meta/recipes-extended/wget/wget_1.16.3.bb deleted file mode 100644 index 5c34a42dfe..0000000000 --- a/meta/recipes-extended/wget/wget_1.16.3.bb +++ /dev/null @@ -1,9 +0,0 @@ -SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \ - file://fix_makefile.patch \ - file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ - " - -SRC_URI[md5sum] = "f61d9011b99f824106a5d5a05dd0f63d" -SRC_URI[sha256sum] = "9f1c6d09d7148c1c2d9fd0ea655dcf4dcc407deb2db32d4126251ca0245cb670" - -require wget.inc diff --git a/meta/recipes-extended/wget/wget_1.20.3.bb b/meta/recipes-extended/wget/wget_1.20.3.bb new file mode 100644 index 0000000000..4fa273d093 --- /dev/null +++ b/meta/recipes-extended/wget/wget_1.20.3.bb @@ -0,0 +1,8 @@ +SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \ + file://0002-improve-reproducibility.patch \ + " + +SRC_URI[md5sum] = "db4e6dc7977cbddcd543b240079a4899" +SRC_URI[sha256sum] = "31cccfc6630528db1c8e3a06f6decf2a370060b982841cfab2b8677400a5092e" + +require wget.inc diff --git a/meta/recipes-extended/which/which-2.18/automake-foreign.patch b/meta/recipes-extended/which/which-2.18/automake-foreign.patch deleted file mode 100644 index 495cdc6cf4..0000000000 --- a/meta/recipes-extended/which/which-2.18/automake-foreign.patch +++ /dev/null @@ -1,28 +0,0 @@ -Subject: [PATCH] automake foreign strictness - -Use foreign strictness to avoid automake errors. - -Upstream-Status: Inappropriate [upstream no longer active] - -Signed-off-by: Jackie Huang <jackie.huang@windriver.com> ---- - configure.ac | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index b30b6f5..bd3222c 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1,6 +1,7 @@ - dnl Process this file with autoconf to produce a configure script. --AC_INIT(which.c) --AM_INIT_AUTOMAKE(which, 2.18) -+AC_INIT([which],[2.18]) -+AC_CONFIG_SRCDIR(which.c) -+AM_INIT_AUTOMAKE([foreign]) - AM_CONFIG_HEADER(config.h) - AM_MAINTAINER_MODE - --- -1.7.1 - diff --git a/meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch b/meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch deleted file mode 100644 index fb9b1a4083..0000000000 --- a/meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch +++ /dev/null @@ -1,53 +0,0 @@ -Upstream-Status: Inappropriate [this is 2.18(GPLv2) specific] - -# glibc also implements the function group_member. To avoid name conflict, -# here let us append a "_" to which's version. -# -# Signed-off-by Dexuan Cui <dexuan.cui@intel.com>, 2010-08-20 -# (this patch is licensed under GPLv2) - ---- which-2.18/bash.c -+++ which-2.18/bash.c -@@ -45,7 +45,12 @@ - * - changed all occurences of 'gid_t' into 'GID_T'. - * - exported functions needed in which.c - */ --static int group_member (GID_T gid); -+ -+/* -+ * glibc also implements the function group_member. To avoid name conflict, -+ * here let us append a "_" to which's version. -+ */ -+static int _group_member (GID_T gid); - static char* extract_colon_unit (char const* string, int *p_index); - - /*=========================================================================== -@@ -200,8 +205,8 @@ - - /* From bash-2.05b / general.c / line 805 */ - /* Return non-zero if GID is one that we have in our groups list. */ --int --group_member (GID_T gid) -+static int -+_group_member (GID_T gid) - { - #if defined (HAVE_GETGROUPS) - register int i; -@@ -290,7 +295,7 @@ - return (X_BIT (u_mode_bits (finfo.st_mode))) ? (FS_EXISTS | FS_EXECABLE) : FS_EXISTS; - - /* Otherwise, if we are in the owning group, the group permissions apply. */ -- if (group_member (finfo.st_gid)) -+ if (_group_member (finfo.st_gid)) - return (X_BIT (g_mode_bits (finfo.st_mode))) ? (FS_EXISTS | FS_EXECABLE) : FS_EXISTS; - - /* Otherwise, if we are in the other group, the other permissions apply. */ -@@ -331,7 +336,7 @@ - /* Given a string containing units of information separated by colons, - return the next one pointed to by (P_INDEX), or NULL if there are no more. - Advance (P_INDEX) to the character after the colon. */ --char* -+static char* - extract_colon_unit (char const* string, int* p_index) - { - int i, start, len; diff --git a/meta/recipes-extended/which/which_2.18.bb b/meta/recipes-extended/which/which_2.18.bb deleted file mode 100644 index eb6cc9967e..0000000000 --- a/meta/recipes-extended/which/which_2.18.bb +++ /dev/null @@ -1,34 +0,0 @@ -SUMMARY = "Displays the full path of shell commands" -DESCRIPTION = "Which is a utility that prints out the full path of the \ -executables that bash(1) would execute when the passed \ -program names would have been entered on the shell prompt. \ -It does this by using the exact same algorithm as bash." -SECTION = "libs" -HOMEPAGE = "http://carlo17.home.xs4all.nl/which/" - -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" - -PR = "r2" - -SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/which/which-2.18.tar.gz/42d51938e48b91f6e19fabf216f5c3e9/which-${PV}.tar.gz \ - file://fix_name_conflict_group_member.patch \ - file://automake-foreign.patch \ -" - -SRC_URI[md5sum] = "42d51938e48b91f6e19fabf216f5c3e9" -SRC_URI[sha256sum] = "9445cd7e02ec0c26a44fd56098464ded064ba5d93dd2e15ec12410ba56b2e544" - -DEPENDS = "cwautomacros-native" - -inherit autotools texinfo update-alternatives - -do_configure_prepend() { - OLD="@ACLOCAL_CWFLAGS@" - NEW="-I ${STAGING_DIR_NATIVE}/${datadir}/cwautomacros/m4" - sed -i "s#${OLD}#${NEW}#g" `grep -rl ${OLD} ${S}` -} - -ALTERNATIVE_${PN} = "which" -ALTERNATIVE_PRIORITY = "100" - diff --git a/meta/recipes-extended/which/which_2.21.bb b/meta/recipes-extended/which/which_2.21.bb index a7687f6fe4..fac0fd3944 100644 --- a/meta/recipes-extended/which/which_2.21.bb +++ b/meta/recipes-extended/which/which_2.21.bb @@ -30,3 +30,6 @@ do_configure_prepend() { ALTERNATIVE_${PN} = "which" ALTERNATIVE_PRIORITY = "100" + +ALTERNATIVE_${PN}-doc = "which.1" +ALTERNATIVE_LINK_NAME[which.1] = "${mandir}/man1/which.1" diff --git a/meta/recipes-extended/xdg-utils/xdg-utils/0001-Don-t-build-the-in-script-manual.patch b/meta/recipes-extended/xdg-utils/xdg-utils/0001-Don-t-build-the-in-script-manual.patch new file mode 100644 index 0000000000..14160bf8df --- /dev/null +++ b/meta/recipes-extended/xdg-utils/xdg-utils/0001-Don-t-build-the-in-script-manual.patch @@ -0,0 +1,30 @@ +From 33f42aa8d190b40be18cd0541b5881d46978b572 Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen <jussi.kukkonen@intel.com> +Date: Thu, 17 Dec 2015 11:50:05 +0200 +Subject: [PATCH] Don't build the in-script manual + +Building the contents for "--manual" option requires a web browser +or java (these are the two options for "xmlto txt" support). +That's bonkers so don't do it: the man pages are still available +and contain the same info. + +Upstream-Status: Inappropriate [disables in-script docs] +Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> +--- + scripts/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scripts/Makefile.in b/scripts/Makefile.in +index 430032d..85359bc 100644 +--- a/scripts/Makefile.in ++++ b/scripts/Makefile.in +@@ -112,5 +112,5 @@ html/%.html: desc/%.xml + (cd html;$(XMLTO) html-nochunks ../$<) + + %.txt: desc/%.xml +- $(XMLTO) txt $< ++ echo "Please see the man pages." > $@ + +-- +2.1.4 + diff --git a/meta/recipes-extended/xdg-utils/xdg-utils/0001-Reinstate-xdg-terminal.patch b/meta/recipes-extended/xdg-utils/xdg-utils/0001-Reinstate-xdg-terminal.patch index 6d5cc2f917..e9defadeaf 100644 --- a/meta/recipes-extended/xdg-utils/xdg-utils/0001-Reinstate-xdg-terminal.patch +++ b/meta/recipes-extended/xdg-utils/xdg-utils/0001-Reinstate-xdg-terminal.patch @@ -1,22 +1,20 @@ -From 174aa7206f4b308d4d2292bb8067a07d8cc715c0 Mon Sep 17 00:00:00 2001 -From: Koen Kooi <koen@dominion.thruhere.net> -Date: Tue, 29 Apr 2014 07:29:32 +0200 -Subject: [PATCH] Reinstate xdg-terminal +From 37e227ae1766568d8de55e268bb69bc15eee3529 Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen <jussi.kukkonen@intel.com> +Date: Thu, 26 Nov 2015 16:01:47 +0200 +Subject: [PATCH] Enable xdg-terminal -Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> +Upstream-Status: Inappropriate [configuration] -Upstream-status: Inappropriate [Revert] +Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> --- - scripts/Makefile.in | 6 +- - scripts/xdg-terminal | 622 +++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 625 insertions(+), 3 deletions(-) - create mode 100755 scripts/xdg-terminal + scripts/Makefile.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/Makefile.in b/scripts/Makefile.in -index 2c7d2ac..bef10d1 100644 +index d167393..430032d 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in -@@ -20,11 +20,11 @@ SCRIPTS = \ +@@ -20,7 +20,8 @@ SCRIPTS = \ xdg-open \ xdg-email \ xdg-screensaver \ @@ -26,647 +24,6 @@ index 2c7d2ac..bef10d1 100644 # xdg-su # xdg-copy \ # xdg-file-dialog --# xdg-terminal - - MANPAGES= $(SCRIPTS:%=man/%.1) - WEBPAGES= $(SCRIPTS:%=%.html) -@@ -42,7 +42,7 @@ release: scripts html man - rm -f xdg-*.in *~ HACKING generate-help-script.awk - rm -rf desc/ - rm -rf xsl/ -- rm -f xdg-file-dialog xdg-su xdg-copy xdg-terminal -+ rm -f xdg-file-dialog xdg-su xdg-copy - - distclean: clean - rm -f Makefile -diff --git a/scripts/xdg-terminal b/scripts/xdg-terminal -new file mode 100755 -index 0000000..4bd9205 ---- /dev/null -+++ b/scripts/xdg-terminal -@@ -0,0 +1,622 @@ -+#!/bin/sh -+#--------------------------------------------- -+# xdg-terminal -+# -+# Utility script to open the registered terminal emulator -+# -+# Refer to the usage() function below for usage. -+# -+# Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org> -+# Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org> -+# Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at> -+# -+# LICENSE: -+# -+# Permission is hereby granted, free of charge, to any person obtaining a -+# copy of this software and associated documentation files (the "Software"), -+# to deal in the Software without restriction, including without limitation -+# the rights to use, copy, modify, merge, publish, distribute, sublicense, -+# and/or sell copies of the Software, and to permit persons to whom the -+# Software is furnished to do so, subject to the following conditions: -+# -+# The above copyright notice and this permission notice shall be included -+# in all copies or substantial portions of the Software. -+# -+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -+# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -+# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+# OTHER DEALINGS IN THE SOFTWARE. -+# -+#--------------------------------------------- -+ -+manualpage() -+{ -+cat << _MANUALPAGE -+Name -+ -+ xdg-terminal - opens the user's preferred terminal emulator application -+ -+Synopsis -+ -+ xdg-terminal [command] -+ -+ xdg-terminal { --help | --manual | --version } -+ -+Description -+ -+ xdg-terminal opens the user's preferred terminal emulator application. If -+ a command is provided the command will be executed by the shell within the -+ newly opened terminal window. -+ -+ xdg-terminal is for use inside a desktop session only. It is not -+ recommended to use xdg-terminal as root. -+ -+Options -+ -+ --help -+ Show command synopsis. -+ -+ --manual -+ Show this manual page. -+ -+ --version -+ Show the xdg-utils version information. -+ -+Exit Codes -+ -+ An exit code of 0 indicates success while a non-zero exit code indicates -+ failure. The following failure codes can be returned: -+ -+ 1 -+ Error in command line syntax. -+ -+ 3 -+ A required tool could not be found. -+ -+ 4 -+ The action failed. -+ -+Examples -+ -+ xdg-terminal -+ -+ Opens the user's default terminal emulator, just starting an interactive -+ shell. -+ -+ xdg-terminal top -+ -+ Opens the user's default terminal emulator and lets it run the top -+ executable. -+_MANUALPAGE -+} -+ -+usage() -+{ -+cat << _USAGE -+ xdg-terminal - opens the user's preferred terminal emulator application -+ -+Synopsis -+ -+ xdg-terminal [command] -+ -+ xdg-terminal { --help | --manual | --version } -+ -+_USAGE -+} -+ -+#@xdg-utils-common@ -+ -+#---------------------------------------------------------------------------- -+# Common utility functions included in all XDG wrapper scripts -+#---------------------------------------------------------------------------- -+ -+DEBUG() -+{ -+ [ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && return 0; -+ [ ${XDG_UTILS_DEBUG_LEVEL} -lt $1 ] && return 0; -+ shift -+ echo "$@" >&2 -+} -+ -+# This handles backslashes but not quote marks. -+first_word() -+{ -+ read first rest -+ echo "$first" -+} -+ -+#------------------------------------------------------------- -+# map a binary to a .desktop file -+binary_to_desktop_file() -+{ -+ search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" -+ binary="`which "$1"`" -+ binary="`readlink -f "$binary"`" -+ base="`basename "$binary"`" -+ IFS=: -+ for dir in $search; do -+ unset IFS -+ [ "$dir" ] || continue -+ [ -d "$dir/applications" ] || [ -d "$dir/applnk" ] || continue -+ for file in "$dir"/applications/*.desktop "$dir"/applications/*/*.desktop "$dir"/applnk/*.desktop "$dir"/applnk/*/*.desktop; do -+ [ -r "$file" ] || continue -+ # Check to make sure it's worth the processing. -+ grep -q "^Exec.*$base" "$file" || continue -+ # Make sure it's a visible desktop file (e.g. not "preferred-web-browser.desktop"). -+ grep -Eq "^(NoDisplay|Hidden)=true" "$file" && continue -+ command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`" -+ command="`which "$command"`" -+ if [ x"`readlink -f "$command"`" = x"$binary" ]; then -+ # Fix any double slashes that got added path composition -+ echo "$file" | sed -e 's,//*,/,g' -+ return -+ fi -+ done -+ done -+} -+ -+#------------------------------------------------------------- -+# map a .desktop file to a binary -+## FIXME: handle vendor dir case -+desktop_file_to_binary() -+{ -+ search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" -+ desktop="`basename "$1"`" -+ IFS=: -+ for dir in $search; do -+ unset IFS -+ [ "$dir" ] && [ -d "$dir/applications" ] || continue -+ file="$dir/applications/$desktop" -+ [ -r "$file" ] || continue -+ # Remove any arguments (%F, %f, %U, %u, etc.). -+ command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`" -+ command="`which "$command"`" -+ readlink -f "$command" -+ return -+ done -+} -+ -+#------------------------------------------------------------- -+# Exit script on successfully completing the desired operation -+ -+exit_success() -+{ -+ if [ $# -gt 0 ]; then -+ echo "$@" -+ echo -+ fi -+ -+ exit 0 -+} -+ -+ -+#----------------------------------------- -+# Exit script on malformed arguments, not enough arguments -+# or missing required option. -+# prints usage information -+ -+exit_failure_syntax() -+{ -+ if [ $# -gt 0 ]; then -+ echo "xdg-terminal: $@" >&2 -+ echo "Try 'xdg-terminal --help' for more information." >&2 -+ else -+ usage -+ echo "Use 'man xdg-terminal' or 'xdg-terminal --manual' for additional info." -+ fi -+ -+ exit 1 -+} -+ -+#------------------------------------------------------------- -+# Exit script on missing file specified on command line -+ -+exit_failure_file_missing() -+{ -+ if [ $# -gt 0 ]; then -+ echo "xdg-terminal: $@" >&2 -+ fi -+ -+ exit 2 -+} -+ -+#------------------------------------------------------------- -+# Exit script on failure to locate necessary tool applications -+ -+exit_failure_operation_impossible() -+{ -+ if [ $# -gt 0 ]; then -+ echo "xdg-terminal: $@" >&2 -+ fi -+ -+ exit 3 -+} -+ -+#------------------------------------------------------------- -+# Exit script on failure returned by a tool application -+ -+exit_failure_operation_failed() -+{ -+ if [ $# -gt 0 ]; then -+ echo "xdg-terminal: $@" >&2 -+ fi -+ -+ exit 4 -+} -+ -+#------------------------------------------------------------ -+# Exit script on insufficient permission to read a specified file -+ -+exit_failure_file_permission_read() -+{ -+ if [ $# -gt 0 ]; then -+ echo "xdg-terminal: $@" >&2 -+ fi -+ -+ exit 5 -+} -+ -+#------------------------------------------------------------ -+# Exit script on insufficient permission to write a specified file -+ -+exit_failure_file_permission_write() -+{ -+ if [ $# -gt 0 ]; then -+ echo "xdg-terminal: $@" >&2 -+ fi -+ -+ exit 6 -+} -+ -+check_input_file() -+{ -+ if [ ! -e "$1" ]; then -+ exit_failure_file_missing "file '$1' does not exist" -+ fi -+ if [ ! -r "$1" ]; then -+ exit_failure_file_permission_read "no permission to read file '$1'" -+ fi -+} -+ -+check_vendor_prefix() -+{ -+ file_label="$2" -+ [ -n "$file_label" ] || file_label="filename" -+ file=`basename "$1"` -+ case "$file" in -+ [[:alpha:]]*-*) -+ return -+ ;; -+ esac -+ -+ echo "xdg-terminal: $file_label '$file' does not have a proper vendor prefix" >&2 -+ echo 'A vendor prefix consists of alpha characters ([a-zA-Z]) and is terminated' >&2 -+ echo 'with a dash ("-"). An example '"$file_label"' is '"'example-$file'" >&2 -+ echo "Use --novendor to override or 'xdg-terminal --manual' for additional info." >&2 -+ exit 1 -+} -+ -+check_output_file() -+{ -+ # if the file exists, check if it is writeable -+ # if it does not exists, check if we are allowed to write on the directory -+ if [ -e "$1" ]; then -+ if [ ! -w "$1" ]; then -+ exit_failure_file_permission_write "no permission to write to file '$1'" -+ fi -+ else -+ DIR=`dirname "$1"` -+ if [ ! -w "$DIR" ] || [ ! -x "$DIR" ]; then -+ exit_failure_file_permission_write "no permission to create file '$1'" -+ fi -+ fi -+} -+ -+#---------------------------------------- -+# Checks for shared commands, e.g. --help -+ -+check_common_commands() -+{ -+ while [ $# -gt 0 ] ; do -+ parm="$1" -+ shift -+ -+ case "$parm" in -+ --help) -+ usage -+ echo "Use 'man xdg-terminal' or 'xdg-terminal --manual' for additional info." -+ exit_success -+ ;; -+ -+ --manual) -+ manualpage -+ exit_success -+ ;; -+ -+ --version) -+ echo "xdg-terminal 1.1.0 rc1" -+ exit_success -+ ;; -+ esac -+ done -+} -+ -+check_common_commands "$@" -+ -+[ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && unset XDG_UTILS_DEBUG_LEVEL; -+if [ ${XDG_UTILS_DEBUG_LEVEL-0} -lt 1 ]; then -+ # Be silent -+ xdg_redirect_output=" > /dev/null 2> /dev/null" -+else -+ # All output to stderr -+ xdg_redirect_output=" >&2" -+fi -+ -+#-------------------------------------- -+# Checks for known desktop environments -+# set variable DE to the desktop environments name, lowercase -+ -+detectDE() -+{ -+ # see https://bugs.freedesktop.org/show_bug.cgi?id=34164 -+ unset GREP_OPTIONS -+ -+ if [ -n "${XDG_CURRENT_DESKTOP}" ]; then -+ case "${XDG_CURRENT_DESKTOP}" in -+ ENLIGHTENMENT) -+ DE=enlightenment; -+ ;; -+ GNOME) -+ DE=gnome; -+ ;; -+ KDE) -+ DE=kde; -+ ;; -+ LXDE) -+ DE=lxde; -+ ;; -+ MATE) -+ DE=mate; -+ ;; -+ XFCE) -+ DE=xfce -+ ;; -+ esac -+ fi -+ -+ if [ x"$DE" = x"" ]; then -+ # classic fallbacks -+ if [ x"$KDE_FULL_SESSION" != x"" ]; then DE=kde; -+ elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome; -+ elif [ x"$MATE_DESKTOP_SESSION_ID" != x"" ]; then DE=mate; -+ elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome; -+ elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce; -+ elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce -+ elif echo $DESKTOP | grep -q '^Enlightenment'; then DE=enlightenment; -+ fi -+ fi -+ -+ if [ x"$DE" = x"" ]; then -+ # fallback to checking $DESKTOP_SESSION -+ case "$DESKTOP_SESSION" in -+ gnome) -+ DE=gnome; -+ ;; -+ LXDE|Lubuntu) -+ DE=lxde; -+ ;; -+ MATE) -+ DE=mate; -+ ;; -+ xfce|xfce4|'Xfce Session') -+ DE=xfce; -+ ;; -+ esac -+ fi -+ -+ if [ x"$DE" = x"" ]; then -+ # fallback to uname output for other platforms -+ case "$(uname 2>/dev/null)" in -+ Darwin) -+ DE=darwin; -+ ;; -+ esac -+ fi -+ -+ if [ x"$DE" = x"gnome" ]; then -+ # gnome-default-applications-properties is only available in GNOME 2.x -+ # but not in GNOME 3.x -+ which gnome-default-applications-properties > /dev/null 2>&1 || DE="gnome3" -+ fi -+} -+ -+#---------------------------------------------------------------------------- -+# kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 -+# It also always returns 1 in KDE 3.4 and earlier -+# Simply return 0 in such case -+ -+kfmclient_fix_exit_code() -+{ -+ version=`LC_ALL=C.UTF-8 kde-config --version 2>/dev/null | grep '^KDE'` -+ major=`echo $version | sed 's/KDE.*: \([0-9]\).*/\1/'` -+ minor=`echo $version | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/'` -+ release=`echo $version | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'` -+ test "$major" -gt 3 && return $1 -+ test "$minor" -gt 5 && return $1 -+ test "$release" -gt 4 && return $1 -+ return 0 -+} -+ -+terminal_kde() -+{ -+ terminal=`kreadconfig --file kdeglobals --group General --key TerminalApplication --default konsole` -+ -+ terminal_exec=`which $terminal 2>/dev/null` -+ -+ if [ -x "$terminal_exec" ]; then -+ if [ x"$1" = x"" ]; then -+ $terminal_exec -+ else -+ $terminal_exec -e "$1" -+ fi -+ -+ if [ $? -eq 0 ]; then -+ exit_success -+ else -+ exit_failure_operation_failed -+ fi -+ else -+ exit_failure_operation_impossible "configured terminal program '$terminal' not found or not executable" -+ fi -+} -+ -+terminal_gnome() -+{ -+ term_exec_key="/desktop/gnome/applications/terminal/exec" -+ term_exec_arg_key="/desktop/gnome/applications/terminal/exec_arg" -+ -+ term_exec=`gconftool-2 --get ${term_exec_key}` -+ term_exec_arg=`gconftool-2 --get ${term_exec_arg_key}` -+ -+ terminal_exec=`which $term_exec 2>/dev/null` -+ -+ if [ -x "$terminal_exec" ]; then -+ if [ x"$1" = x"" ]; then -+ $terminal_exec -+ else -+ if [ x"$term_exec_arg" = x"" ]; then -+ $terminal_exec "$1" -+ else -+ $terminal_exec "$term_exec_arg" "$1" -+ fi -+ fi -+ -+ if [ $? -eq 0 ]; then -+ exit_success -+ else -+ exit_failure_operation_failed -+ fi -+ else -+ exit_failure_operation_impossible "configured terminal program '$term_exec' not found or not executable" -+ fi -+} -+ -+terminal_xfce() -+{ -+ if [ x"$1" = x"" ]; then -+ exo-open --launch TerminalEmulator -+ else -+ exo-open --launch TerminalEmulator "$1" -+ fi -+ -+ if [ $? -eq 0 ]; then -+ exit_success -+ else -+ exit_failure_operation_failed -+ fi -+} -+ -+terminal_generic() -+{ -+ # if $TERM is a known non-command, use hard-coded fallbacks -+ if [ x"$TERM" = x"" ] || [ x"$TERM" = x"linux" ] || [ x"$TERM" = x"vt100" ]; then -+ TERM=xterm -+ fi -+ -+ terminal_exec=`which $TERM 2>/dev/null` -+ -+ if [ -x "$terminal_exec" ]; then -+ if [ x"$1" = x"" ]; then -+ $terminal_exec -+ else -+ # screen and urxvt won't do their own parsing of quoted arguments -+ if [ x"$TERM" = x"screen" ]; then -+ # screen has an incompatible meaning for -e -+ sh -c "exec $terminal_exec $1" -+ elif [ x"$TERM" = x"urxvt" ] || [ x"$TERM" = x"rxvt-unicode" ] || [ x"$TERM" = x"rxvt" ]; then -+ #TODO: Use whatever mechanism dash supports to test for -+ # rxvt-* to match things like rxvt-unicode-256color -+ sh -c "exec $terminal_exec -e $1" -+ else -+ $terminal_exec -e "$1" -+ fi -+ fi -+ -+ if [ $? -eq 0 ]; then -+ exit_success -+ else -+ exit_failure_operation_failed -+ fi -+ else -+ exit_failure_operation_impossible "configured terminal program '$TERM' not found or not executable" -+ fi -+} -+ -+terminal_lxde() -+{ -+ if which lxterminal &>/dev/null; then -+ if [ x"$1" = x"" ]; then -+ lxterminal -+ else -+ lxterminal -e "$1" -+ fi -+ else -+ terminal_generic "$1" -+ fi -+} -+ -+#[ x"$1" != x"" ] || exit_failure_syntax -+ -+command= -+while [ $# -gt 0 ] ; do -+ parm="$1" -+ shift -+ -+ case "$parm" in -+ -*) -+ exit_failure_syntax "unexpected option '$parm'" -+ ;; -+ -+ *) -+ if [ -n "$command" ] ; then -+ exit_failure_syntax "unexpected argument '$parm'" -+ fi -+ command="$parm" -+ ;; -+ esac -+done -+ -+detectDE -+ -+if [ x"$DE" = x"" ]; then -+ DE=generic -+fi -+ -+case "$DE" in -+ kde) -+ terminal_kde "$command" -+ ;; -+ -+ gnome*) -+ terminal_gnome "$command" -+ ;; -+ -+ xfce) -+ terminal_xfce "$command" -+ ;; -+ -+ lxde) -+ terminal_lxde "$command" -+ ;; -+ -+ generic) -+ terminal_generic "$command" -+ ;; -+ -+ *) -+ exit_failure_operation_impossible "no terminal emulator available" -+ ;; -+esac -- -1.9.0 +2.1.4 diff --git a/meta/recipes-extended/xdg-utils/xdg-utils_1.1.0-rc1.bb b/meta/recipes-extended/xdg-utils/xdg-utils_1.1.0-rc1.bb deleted file mode 100644 index 46f1e3c6e3..0000000000 --- a/meta/recipes-extended/xdg-utils/xdg-utils_1.1.0-rc1.bb +++ /dev/null @@ -1,32 +0,0 @@ -SUMMARY = "Basic desktop integration functions" - -DESCRIPTION = "The xdg-utils package is a set of simple scripts that provide basic \ -desktop integration functions for any Free Desktop, such as Linux. \ -They are intended to provide a set of defacto standards. \ -The following scripts are provided at this time: \ -xdg-desktop-icon \ -xdg-desktop-menu \ -xdg-email \ -xdg-icon-resource \ -xdg-mime \ -xdg-open \ -xdg-screensaver \ -xdg-terminal \ -" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=a5367a90934098d6b05af3b746405014" - -SRC_URI = "http://portland.freedesktop.org/download/${BPN}-${PV}.tar.gz \ - file://0001-Reinstate-xdg-terminal.patch \ - " - -SRC_URI[md5sum] = "fadf5e7a08e0526fc60dbe3e5b7ef8d6" -SRC_URI[sha256sum] = "7b05558ae4bb8ede356863cae8c42e3e012aa421bf9d45130a570fd209d79102" - -inherit autotools-brokensep distro_features_check - -# The xprop requires x11 in DISTRO_FEATURES -REQUIRED_DISTRO_FEATURES = "x11" - -RDEPENDS_${PN} += "xprop" diff --git a/meta/recipes-extended/xdg-utils/xdg-utils_1.1.3.bb b/meta/recipes-extended/xdg-utils/xdg-utils_1.1.3.bb new file mode 100644 index 0000000000..d371c5c28c --- /dev/null +++ b/meta/recipes-extended/xdg-utils/xdg-utils_1.1.3.bb @@ -0,0 +1,37 @@ +SUMMARY = "Basic desktop integration functions" +HOMEPAGE = "https://www.freedesktop.org/wiki/Software/xdg-utils/" +DESCRIPTION = "The xdg-utils package is a set of simple scripts that provide basic \ +desktop integration functions for any Free Desktop, such as Linux. \ +They are intended to provide a set of defacto standards. \ +The following scripts are provided at this time: \ +xdg-desktop-icon \ +xdg-desktop-menu \ +xdg-email \ +xdg-icon-resource \ +xdg-mime \ +xdg-open \ +xdg-screensaver \ +xdg-terminal \ +" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a5367a90934098d6b05af3b746405014" + +SRC_URI = "https://portland.freedesktop.org/download/${BPN}-${PV}.tar.gz \ + file://0001-Reinstate-xdg-terminal.patch \ + file://0001-Don-t-build-the-in-script-manual.patch \ + " + +SRC_URI[md5sum] = "902042508b626027a3709d105f0b63ff" +SRC_URI[sha256sum] = "d798b08af8a8e2063ddde6c9fa3398ca81484f27dec642c5627ffcaa0d4051d9" + +UPSTREAM_CHECK_REGEX = "xdg-utils-(?P<pver>((\d+[\.\-_]*)+)((rc|alpha|beta)\d+)?)\.(tar\.gz|tgz)" + +# Needs brokensep as this doesn't use automake +inherit autotools-brokensep features_check + +# The xprop requires x11 in DISTRO_FEATURES +REQUIRED_DISTRO_FEATURES = "x11" + +DEPENDS = "xmlto-native libxslt-native" +RDEPENDS_${PN} += "xprop" diff --git a/meta/recipes-extended/xinetd/xinetd/Disable-services-from-inetd.conf-if-a-service-with-t.patch b/meta/recipes-extended/xinetd/xinetd/Disable-services-from-inetd.conf-if-a-service-with-t.patch deleted file mode 100644 index cd6e6c1078..0000000000 --- a/meta/recipes-extended/xinetd/xinetd/Disable-services-from-inetd.conf-if-a-service-with-t.patch +++ /dev/null @@ -1,86 +0,0 @@ -Upstream-Status: Pending [from other distro Debian] - -From d588b6530e1382a624898b3f4307f636c72c80a9 Mon Sep 17 00:00:00 2001 -From: Pierre Habouzit <madcoder@debian.org> -Date: Wed, 28 Nov 2007 10:13:08 +0100 -Subject: [PATCH] Disable services from inetd.conf if a service with the same id exists. - - This way, if a service is enabled in /etc/xinetd* _and_ in -/etc/inetd.conf, the one (even if disabled) from /etc/xinetd* takes -precedence. - -Signed-off-by: Pierre Habouzit <madcoder@debian.org> ---- - xinetd/inet.c | 22 +++++++++++++++++++--- - 1 files changed, 19 insertions(+), 3 deletions(-) - -diff --git a/xinetd/inet.c b/xinetd/inet.c -index 1cb2ba2..8caab45 100644 ---- a/xinetd/inet.c -+++ b/xinetd/inet.c -@@ -23,6 +23,8 @@ - #include "parsesup.h" - #include "nvlists.h" - -+static psi_h iter ; -+ - static int get_next_inet_entry( int fd, pset_h sconfs, - struct service_config *defaults); - -@@ -32,12 +34,15 @@ void parse_inet_conf_file( int fd, struct configuration *confp ) - struct service_config *default_config = CNF_DEFAULTS( confp ); - - line_count = 0; -+ iter = psi_create (sconfs); - - for( ;; ) - { - if (get_next_inet_entry(fd, sconfs, default_config) == -2) - break; - } -+ -+ psi_destroy(iter); - } - - static int get_next_inet_entry( int fd, pset_h sconfs, -@@ -46,7 +51,7 @@ static int get_next_inet_entry( int fd, pset_h sconfs, - char *p; - str_h strp; - char *line = next_line(fd); -- struct service_config *scp; -+ struct service_config *scp, *tmp; - unsigned u, i; - const char *func = "get_next_inet_entry"; - char *name = NULL, *rpcvers = NULL, *rpcproto = NULL; -@@ -405,7 +410,16 @@ static int get_next_inet_entry( int fd, pset_h sconfs, - SC_SPECIFY( scp, A_SOCKET_TYPE ); - SC_SPECIFY( scp, A_WAIT ); - -- if( ! pset_add(sconfs, scp) ) -+ for ( tmp = SCP( psi_start( iter ) ) ; tmp ; tmp = SCP( psi_next(iter)) ){ -+ if (EQ(SC_ID(scp), SC_ID(tmp))) { -+ parsemsg(LOG_DEBUG, func, "removing duplicate service %s", SC_NAME(scp)); -+ sc_free(scp); -+ scp = NULL; -+ break; -+ } -+ } -+ -+ if( scp && ! pset_add(sconfs, scp) ) - { - out_of_memory( func ); - pset_destroy(args); -@@ -414,7 +428,9 @@ static int get_next_inet_entry( int fd, pset_h sconfs, - } - - pset_destroy(args); -- parsemsg( LOG_DEBUG, func, "added service %s", SC_NAME(scp)); -+ if (scp) { -+ parsemsg( LOG_DEBUG, func, "added service %s", SC_NAME(scp)); -+ } - return 0; - } - --- -1.5.3.6.2040.g15e6 - diff --git a/meta/recipes-extended/xinetd/xinetd/Various-fixes-from-the-previous-maintainer.patch b/meta/recipes-extended/xinetd/xinetd/Various-fixes-from-the-previous-maintainer.patch deleted file mode 100644 index 8e59cdcaae..0000000000 --- a/meta/recipes-extended/xinetd/xinetd/Various-fixes-from-the-previous-maintainer.patch +++ /dev/null @@ -1,79 +0,0 @@ -Upstream-Status: Pending [from other distro Debian] - -From a3410b0bc81ab03a889d9ffc14e351badf8372f1 Mon Sep 17 00:00:00 2001 -From: Pierre Habouzit <madcoder@debian.org> -Date: Mon, 26 Nov 2007 16:02:04 +0100 -Subject: [PATCH] Various fixes from the previous maintainer. - ---- - xinetd/child.c | 20 +++++++++++++++++--- - xinetd/service.c | 8 ++++---- - 2 files changed, 21 insertions(+), 7 deletions(-) - -diff --git a/xinetd/child.c b/xinetd/child.c -index 89ee54c..48e9615 100644 ---- a/xinetd/child.c -+++ b/xinetd/child.c -@@ -284,6 +284,7 @@ void child_process( struct server *serp ) - connection_s *cp = SERVER_CONNECTION( serp ) ; - struct service_config *scp = SVC_CONF( sp ) ; - const char *func = "child_process" ; -+ int fd, null_fd; - - signal_default_state(); - -@@ -296,9 +297,22 @@ void child_process( struct server *serp ) - signals_pending[0] = -1; - signals_pending[1] = -1; - -- Sclose(0); -- Sclose(1); -- Sclose(2); -+ if ( ( null_fd = open( "/dev/null", O_RDONLY ) ) == -1 ) -+ { -+ msg( LOG_ERR, func, "open('/dev/null') failed: %m") ; -+ _exit( 1 ) ; -+ } -+ -+ for ( fd = 0 ; fd <= MAX_PASS_FD ; fd++ ) -+ { -+ if ( fd != null_fd && dup2( null_fd, fd ) == -1 ) -+ { -+ msg( LOG_ERR, func, "dup2(%d, %d) failed: %m") ; -+ _exit( 1 ) ; -+ } -+ } -+ if ( null_fd > MAX_PASS_FD ) -+ (void) Sclose( null_fd ) ; - - - #ifdef DEBUG_SERVER -diff --git a/xinetd/service.c b/xinetd/service.c -index 3d68d78..0132d6c 100644 ---- a/xinetd/service.c -+++ b/xinetd/service.c -@@ -745,8 +745,8 @@ static status_e failed_service(struct service *sp, - return FAILED; - - if ( last == NULL ) { -- last = SAIN( calloc( 1, sizeof(union xsockaddr) ) ); -- SVC_LAST_DGRAM_ADDR(sp) = (union xsockaddr *)last; -+ SVC_LAST_DGRAM_ADDR(sp) = SAIN( calloc( 1, sizeof(union xsockaddr) ) ); -+ last = SAIN( SVC_LAST_DGRAM_ADDR(sp) ); - } - - (void) time( ¤t_time ) ; -@@ -772,8 +772,8 @@ static status_e failed_service(struct service *sp, - return FAILED; - - if( last == NULL ) { -- last = SAIN6(calloc( 1, sizeof(union xsockaddr) ) ); -- SVC_LAST_DGRAM_ADDR( sp ) = (union xsockaddr *)last; -+ SVC_LAST_DGRAM_ADDR(sp) = SAIN6(calloc( 1, sizeof(union xsockaddr) ) ); -+ last = SAIN6(SVC_LAST_DGRAM_ADDR(sp)); - } - - (void) time( ¤t_time ) ; --- -1.5.3.6.2040.g15e6 - diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch b/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch deleted file mode 100644 index 0542dbe835..0000000000 --- a/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch +++ /dev/null @@ -1,32 +0,0 @@ -xinetd: CVE-2013-4342 - -xinetd does not enforce the user and group configuration directives -for TCPMUX services, which causes these services to be run as root -and makes it easier for remote attackers to gain privileges by -leveraging another vulnerability in a service. -http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-4342 - -the patch come from: -https://bugzilla.redhat.com/attachment.cgi?id=799732&action=diff - -Signed-off-by: Li Wang <li.wang@windriver.com> ---- - xinetd/builtins.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/xinetd/builtins.c b/xinetd/builtins.c -index 3b85579..34a5bac 100644 ---- a/xinetd/builtins.c -+++ b/xinetd/builtins.c -@@ -617,7 +617,7 @@ static void tcpmux_handler( const struct server *serp ) - if( SC_IS_INTERNAL( scp ) ) { - SC_INTERNAL(scp, nserp); - } else { -- exec_server(nserp); -+ child_process(nserp); - } - } - --- -1.7.9.5 - diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch b/meta/recipes-extended/xinetd/xinetd/xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch deleted file mode 100644 index 2365ca123b..0000000000 --- a/meta/recipes-extended/xinetd/xinetd/xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch +++ /dev/null @@ -1,112 +0,0 @@ -Upstream-Status: Pending [from other distro Debian] - -From f44b218ccc779ab3f4aed072390ccf129d94b58d Mon Sep 17 00:00:00 2001 -From: David Madore <david@pleiades.stars> -Date: Mon, 24 Mar 2008 12:45:36 +0100 -Subject: [PATCH] xinetd should be able to listen on IPv6 even in -inetd_compat mode - -xinetd does not bind to IPv6 addresses (and does not seem to have an -option to do so) when used in -inetd_compat mode. As current inetd's -are IPv6-aware, this is a problem: this means xinetd cannot be used as -a drop-in inetd replacement. - -The attached patch is a suggestion: it adds a -inetd_ipv6 global -option that, if used, causes inetd-compatibility lines to have an -implicit "IPv6" option. Perhaps this is not the best solution, but -there should definitely be a way to get inetd.conf to be read in -IPv6-aware mode. ---- - xinetd/confparse.c | 1 + - xinetd/inet.c | 17 +++++++++++++++++ - xinetd/options.c | 3 +++ - xinetd/xinetd.man | 6 ++++++ - 4 files changed, 27 insertions(+), 0 deletions(-) - -diff --git a/xinetd/confparse.c b/xinetd/confparse.c -index db9f431..d7b0bcc 100644 ---- a/xinetd/confparse.c -+++ b/xinetd/confparse.c -@@ -40,6 +40,7 @@ - #include "inet.h" - #include "main.h" - -+extern int inetd_ipv6; - extern int inetd_compat; - - /* -diff --git a/xinetd/inet.c b/xinetd/inet.c -index 8caab45..2e617ae 100644 ---- a/xinetd/inet.c -+++ b/xinetd/inet.c -@@ -25,6 +25,8 @@ - - static psi_h iter ; - -+extern int inetd_ipv6; -+ - static int get_next_inet_entry( int fd, pset_h sconfs, - struct service_config *defaults); - -@@ -360,6 +362,21 @@ static int get_next_inet_entry( int fd, pset_h sconfs, - } - SC_SERVER_ARGV(scp)[u] = p; - } -+ -+ /* Set the IPv6 flag if we were passed the -inetd_ipv6 option */ -+ if ( inetd_ipv6 ) -+ { -+ nvp = nv_find_value( service_flags, "IPv6" ); -+ if ( nvp == NULL ) -+ { -+ parsemsg( LOG_WARNING, func, "inetd.conf - Bad foo %s", name ) ; -+ pset_destroy(args); -+ sc_free(scp); -+ return -1; -+ } -+ M_SET(SC_XFLAGS(scp), nvp->value); -+ } -+ - /* Set the reuse flag, as this is the default for inetd */ - nvp = nv_find_value( service_flags, "REUSE" ); - if ( nvp == NULL ) -diff --git a/xinetd/options.c b/xinetd/options.c -index b058b6a..dc2f3a0 100644 ---- a/xinetd/options.c -+++ b/xinetd/options.c -@@ -30,6 +30,7 @@ int logprocs_option ; - unsigned logprocs_option_arg ; - int stayalive_option=0; - char *program_name ; -+int inetd_ipv6 = 0 ; - int inetd_compat = 0 ; - int dont_fork = 0; - -@@ -128,6 +129,8 @@ int opt_recognize( int argc, char *argv[] ) - fprintf(stderr, "\n"); - exit(0); - } -+ else if ( strcmp ( &argv[ arg ][ 1 ], "inetd_ipv6" ) == 0 ) -+ inetd_ipv6 = 1; - else if ( strcmp ( &argv[ arg ][ 1 ], "inetd_compat" ) == 0 ) - inetd_compat = 1; - } -diff --git a/xinetd/xinetd.man b/xinetd/xinetd.man -index c76c3c6..c9dd803 100644 ---- a/xinetd/xinetd.man -+++ b/xinetd/xinetd.man -@@ -106,6 +106,12 @@ This option causes xinetd to read /etc/inetd.conf in addition to the - standard xinetd config files. /etc/inetd.conf is read after the - standard xinetd config files. - .TP -+.BI \-inetd_ipv6 -+This option causes xinetd to bind to IPv6 (AF_INET6) addresses for -+inetd compatibility lines (see previous option). This only affects -+how /etc/inetd.conf is interpreted and thus only has any effect if -+the \-inetd_compat option is also used. -+.TP - .BI \-cc " interval" - This option instructs - .B xinetd --- -1.5.5.rc0.127.gb4337 - diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd.conf b/meta/recipes-extended/xinetd/xinetd/xinetd.conf deleted file mode 100644 index 9e6ea2577e..0000000000 --- a/meta/recipes-extended/xinetd/xinetd/xinetd.conf +++ /dev/null @@ -1,11 +0,0 @@ -# Simple configuration file for xinetd -# -# Some defaults, and include /etc/xinetd.d/ - -defaults -{ - - -} - -includedir /etc/xinetd.d diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd.service b/meta/recipes-extended/xinetd/xinetd/xinetd.service index d5fdc5bc29..6da92f2bf5 100644 --- a/meta/recipes-extended/xinetd/xinetd/xinetd.service +++ b/meta/recipes-extended/xinetd/xinetd/xinetd.service @@ -3,11 +3,8 @@ Description=Xinetd A Powerful Replacement For Inetd After=syslog.target network.target [Service] -Type=forking -PIDFile=/var/run/xinetd.pid EnvironmentFile=-/etc/sysconfig/xinetd -ExecStart=@SBINDIR@/xinetd -stayalive -pidfile /var/run/xinetd.pid "$EXTRAOPTIONS" -ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID +ExecStart=@SBINDIR@/xinetd -dontfork "$EXTRAOPTIONS" [Install] WantedBy=multi-user.target diff --git a/meta/recipes-extended/xinetd/xinetd_2.3.15.4.bb b/meta/recipes-extended/xinetd/xinetd_2.3.15.4.bb new file mode 100644 index 0000000000..4f0f9531a1 --- /dev/null +++ b/meta/recipes-extended/xinetd/xinetd_2.3.15.4.bb @@ -0,0 +1,47 @@ +SUMMARY = "Socket-based service activation daemon" +HOMEPAGE = "https://github.com/xinetd-org/xinetd" + +# xinetd is a BSD-like license +# Apple and Gentoo say BSD here. +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=55c5fdf02cfcca3fc9621b6f2ceae10f" + +UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)" + +SRC_URI = "git://github.com/openSUSE/xinetd.git;protocol=https \ + file://xinetd.init \ + file://xinetd.default \ + file://xinetd.service \ + " + +SRCREV = "6a4af7786630ce48747d9687e2f18f45ea6684c4" + +S = "${WORKDIR}/git" + +inherit autotools update-rc.d systemd pkgconfig + +SYSTEMD_SERVICE_${PN} = "xinetd.service" + +INITSCRIPT_NAME = "xinetd" +INITSCRIPT_PARAMS = "defaults" + +PACKAGECONFIG ??= "tcp-wrappers" +PACKAGECONFIG[tcp-wrappers] = "--with-libwrap,,tcp-wrappers" + +CONFFILES_${PN} = "${sysconfdir}/xinetd.conf" + +do_install_append() { + install -d "${D}${sysconfdir}/init.d" + install -d "${D}${sysconfdir}/default" + install -m 755 "${WORKDIR}/xinetd.init" "${D}${sysconfdir}/init.d/xinetd" + install -m 644 "${WORKDIR}/xinetd.default" "${D}${sysconfdir}/default/xinetd" + + # Install systemd unit files + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/xinetd.service ${D}${systemd_unitdir}/system + sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ + -e 's,@SBINDIR@,${sbindir},g' \ + ${D}${systemd_unitdir}/system/xinetd.service +} + +RDEPENDS_${PN} += "perl" diff --git a/meta/recipes-extended/xinetd/xinetd_2.3.15.bb b/meta/recipes-extended/xinetd/xinetd_2.3.15.bb deleted file mode 100644 index ffc03e5c70..0000000000 --- a/meta/recipes-extended/xinetd/xinetd_2.3.15.bb +++ /dev/null @@ -1,68 +0,0 @@ -SUMMARY = "Socket-based service activation daemon" -HOMEPAGE = "https://github.com/xinetd-org/xinetd" - -# xinetd is a BSD-like license -# Apple and Gentoo say BSD here. -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=8ad8615198542444f84d28a6cf226dd8" - -DEPENDS = "" -PR = "r2" - -SRC_URI = "git://github.com/xinetd-org/xinetd.git;protocol=https \ - file://xinetd.init \ - file://xinetd.conf \ - file://xinetd.default \ - file://Various-fixes-from-the-previous-maintainer.patch \ - file://Disable-services-from-inetd.conf-if-a-service-with-t.patch \ - file://xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch \ - file://xinetd-CVE-2013-4342.patch \ - file://xinetd.service \ - " - -SRCREV = "68bb9ab9e9f214ad8a2322f28ac1d6733e70bc24" - -S = "${WORKDIR}/git" - -inherit autotools update-rc.d systemd - -SYSTEMD_SERVICE_${PN} = "xinetd.service" - -INITSCRIPT_NAME = "xinetd" -INITSCRIPT_PARAMS = "defaults" - -EXTRA_OECONF="--disable-nls" - -PACKAGECONFIG ??= "tcp-wrappers" -PACKAGECONFIG[tcp-wrappers] = "--with-libwrap,,tcp-wrappers" - -do_configure() { - # Looks like configure.in is broken, so we are skipping - # rebuilding configure and are just using the shipped one - ( cd ${S}; gnu-configize --force ) - oe_runconf -} - -do_install() { - # Same here, the Makefile does some really stupid things, - # but since we only want two files why not override - # do_install from autotools and doing it ourselfs? - install -d "${D}${sbindir}" - install -d "${D}${sysconfdir}/init.d" - install -d "${D}${sysconfdir}/xinetd.d" - install -d "${D}${sysconfdir}/default" - install -m 644 "${WORKDIR}/xinetd.conf" "${D}${sysconfdir}" - install -m 755 "${WORKDIR}/xinetd.init" "${D}${sysconfdir}/init.d/xinetd" - install -m 644 "${WORKDIR}/xinetd.default" "${D}${sysconfdir}/default/xinetd" - install -m 755 "${B}/xinetd/xinetd" "${D}${sbindir}" - install -m 755 "${B}/xinetd/itox" "${D}${sbindir}" - - # Install systemd unit files - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/xinetd.service ${D}${systemd_unitdir}/system - sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ - -e 's,@SBINDIR@,${sbindir},g' \ - ${D}${systemd_unitdir}/system/xinetd.service -} - -CONFFILES_${PN} = "${sysconfdir}/xinetd.conf" diff --git a/meta/recipes-extended/xz/xz_5.2.1.bb b/meta/recipes-extended/xz/xz_5.2.5.bb index e0ae48fe4f..af21b60563 100644 --- a/meta/recipes-extended/xz/xz_5.2.1.bb +++ b/meta/recipes-extended/xz/xz_5.2.5.bb @@ -1,12 +1,12 @@ SUMMARY = "Utilities for managing LZMA compressed files" -HOMEPAGE = "http://tukaani.org/xz/" +HOMEPAGE = "https://tukaani.org/xz/" 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+ & GPLv3+ & LGPLv2.1+ & PD" +LICENSE = "GPLv2+ & GPL-3.0-with-autoconf-exception & LGPLv2.1+ & PD" LICENSE_${PN} = "GPLv2+" LICENSE_${PN}-dev = "GPLv2+" LICENSE_${PN}-staticdev = "GPLv2+" @@ -15,15 +15,19 @@ LICENSE_${PN}-dbg = "GPLv2+" LICENSE_${PN}-locale = "GPLv2+" LICENSE_liblzma = "PD" -LIC_FILES_CHKSUM = "file://COPYING;md5=c475b6c7dca236740ace4bba553e8e1c \ +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 " + file://lib/getopt.c;endline=23;md5=2069b0ee710572c03bb3114e4532cd84 \ + " -SRC_URI = "http://tukaani.org/xz/xz-${PV}.tar.gz" -SRC_URI[md5sum] = "3e44c766c3fb4f19e348e646fcd5778a" -SRC_URI[sha256sum] = "b918b6648076e74f8d7ae19db5ee663df800049e187259faf5eb997a7b974681" +SRC_URI = "https://tukaani.org/xz/xz-${PV}.tar.gz" +SRC_URI[md5sum] = "0d270c997aff29708c74d53f599ef717" +SRC_URI[sha256sum] = "f6f4910fd033078738bd82bfba4f49219d03b17eb0794eb91efbae419f4aba10" +UPSTREAM_CHECK_REGEX = "xz-(?P<pver>\d+(\.\d+)+)\.tar" + +CACHED_CONFIGUREVARS += "gl_cv_posix_shell=/bin/sh" inherit autotools gettext @@ -31,6 +35,9 @@ PACKAGES =+ "liblzma" FILES_liblzma = "${libdir}/liblzma*${SOLIBS}" -BBCLASSEXTEND = "native nativesdk" +inherit update-alternatives +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN} = "xz xzcat unxz \ + lzma lzcat unlzma" -export CONFIG_SHELL="/bin/sh" +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-extended/zip/zip-3.0/10-remove-build-date.patch b/meta/recipes-extended/zip/zip-3.0/10-remove-build-date.patch new file mode 100644 index 0000000000..244ddea363 --- /dev/null +++ b/meta/recipes-extended/zip/zip-3.0/10-remove-build-date.patch @@ -0,0 +1,19 @@ +From: Santiago Vila <sanvila@debian.org> +Subject: Remove (optional) build date to make the build reproducible +Bug-Debian: http://bugs.debian.org/779042 + +Upstream-Status: Inappropriate [no upstream] + +Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> + +--- a/unix/unix.c ++++ b/unix/unix.c +@@ -1020,7 +1020,7 @@ + + + /* Define the compile date string */ +-#ifdef __DATE__ ++#if 0 + # define COMPILE_DATE " on " __DATE__ + #else + # define COMPILE_DATE "" diff --git a/meta/recipes-extended/zip/zip-3.0/fix-security-format.patch b/meta/recipes-extended/zip/zip-3.0/fix-security-format.patch new file mode 100644 index 0000000000..19d8548273 --- /dev/null +++ b/meta/recipes-extended/zip/zip-3.0/fix-security-format.patch @@ -0,0 +1,42 @@ +zip: Fixing security formatting issues + +Fix security formatting issues related to printing without NULL argument + +zip.c: In function 'help_extended': +zip.c:1031:5: error: format not a string literal and no format arguments [-Werror=format-security] + printf(text[i]); + ^ +zip.c: In function 'version_info': +zip.c:1228:5: error: format not a string literal and no format arguments [-Werror=format-security] + printf(cryptnote[i]); + ^ + +[YOCTO #9552] +[https://bugzilla.yoctoproject.org/show_bug.cgi?id=9552] + +Upstream-Status: Pending + +Signed-off-by: Edwin Plauchu <edwin.plauchu.camacho@intel.com> + +diff --git a/zip.c b/zip.c +index 439821f..d7da768 100644 +--- a/zip.c ++++ b/zip.c +@@ -1028,7 +1028,7 @@ local void help_extended() + + for (i = 0; i < sizeof(text)/sizeof(char *); i++) + { +- printf(text[i]); ++ fputs(text[i],stdout); + putchar('\n'); + } + #ifdef DOS +@@ -1225,7 +1225,7 @@ local void version_info() + CR_MAJORVER, CR_MINORVER, CR_BETA_VER, CR_VERSION_DATE); + for (i = 0; i < sizeof(cryptnote)/sizeof(char *); i++) + { +- printf(cryptnote[i]); ++ fputs(cryptnote[i],stdout); + putchar('\n'); + } + ++i; /* crypt support means there IS at least one compilation option */ diff --git a/meta/recipes-extended/zip/zip-3.0/zipnote-crashes-with-segfault.patch b/meta/recipes-extended/zip/zip-3.0/zipnote-crashes-with-segfault.patch new file mode 100644 index 0000000000..ce6caff83e --- /dev/null +++ b/meta/recipes-extended/zip/zip-3.0/zipnote-crashes-with-segfault.patch @@ -0,0 +1,22 @@ +Close the correct file descriptor + +https://bugs.archlinux.org/task/47713 + +Signed-off-by: Jate Sujjavanich <jatedev@gmail.com> + +Upstream-Status: Inappropriate [no upstream] + +diff --git a/zipnote.c b/zipnote.c +index 5e02cb6..996f012 100644 +--- a/zipnote.c ++++ b/zipnote.c +@@ -661,7 +661,7 @@ char **argv; /* command line tokens */ + if ((r = zipcopy(z)) != ZE_OK) + ziperr(r, "was copying an entry"); + } +- fclose(x); ++ fclose(in_file); + + /* Write central directory and end of central directory with new comments */ + if ((c = zftello(y)) == (zoff_t)-1) /* get start of central */ + diff --git a/meta/recipes-extended/zip/zip.inc b/meta/recipes-extended/zip/zip.inc deleted file mode 100644 index 6221c5e139..0000000000 --- a/meta/recipes-extended/zip/zip.inc +++ /dev/null @@ -1,26 +0,0 @@ -SUMMARY = "Compressor/archiver for creating and modifying .zip files" -HOMEPAGE = "http://www.info-zip.org" -SECTION = "console/utils" - -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=04d43c5d70b496c032308106e26ae17d" - -SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/zip${@d.getVar('PV',1).replace('.', '')}.tgz" - -EXTRA_OEMAKE = "'CC=${CC}' 'BIND=${CC}' 'AS=${CC} -c' 'CPP=${CPP}' \ - 'CFLAGS=-I. -DUNIX ${CFLAGS}' 'INSTALL=install' \ - 'BINFLAGS=0755' 'INSTALL_D=install -d'" - -do_compile() { - oe_runmake -f unix/Makefile flags IZ_BZIP2=no_such_directory - sed -i 's#LFLAGS1=""#LFLAGS1="${LDFLAGS}"#' flags - oe_runmake -f unix/Makefile generic IZ_BZIP2=no_such_directory -} - -do_install() { - oe_runmake -f unix/Makefile prefix=${D}${prefix} \ - BINDIR=${D}${bindir} MANDIR=${D}${mandir}/man1 \ - install -} - -BBCLASSEXTEND = "native" diff --git a/meta/recipes-extended/zip/zip_3.0.bb b/meta/recipes-extended/zip/zip_3.0.bb index 1e961101bc..c00a932763 100644 --- a/meta/recipes-extended/zip/zip_3.0.bb +++ b/meta/recipes-extended/zip/zip_3.0.bb @@ -1,15 +1,46 @@ -require zip.inc +SUMMARY = "Compressor/archiver for creating and modifying .zip files" +HOMEPAGE = "http://www.info-zip.org" +SECTION = "console/utils" -PR="r2" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=04d43c5d70b496c032308106e26ae17d" + +PR = "r2" -# zip-2.32 still uses directory name of zip-2.30 S = "${WORKDIR}/zip30" +SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/Zip%203.x%20%28latest%29/3.0/zip30.tar.gz \ + file://fix-security-format.patch \ + file://10-remove-build-date.patch \ + file://zipnote-crashes-with-segfault.patch \ + " +UPSTREAM_VERSION_UNKNOWN = "1" + SRC_URI[md5sum] = "7b74551e63f8ee6aab6fbc86676c0d37" SRC_URI[sha256sum] = "f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369" # zip.inc sets CFLAGS, but what Makefile actually uses is # CFLAGS_NOOPT. It will also force -O3 optimization, overriding # whatever we set. -# -EXTRA_OEMAKE_append = " 'CFLAGS_NOOPT=-I. -DUNIX ${CFLAGS}'" +EXTRA_OEMAKE = "'CC=${CC}' 'BIND=${CC}' 'AS=${CC} -c' 'CPP=${CPP}' \ + 'CFLAGS=-I. -DUNIX ${CFLAGS}' \ + 'CFLAGS_NOOPT=-I. -DUNIX ${CFLAGS}' \ + 'INSTALL=install' 'INSTALL_D=install -d' \ + 'BINFLAGS=0755'" + +do_compile() { + oe_runmake -f unix/Makefile flags IZ_BZIP2=no_such_directory + sed -i 's#LFLAGS1=""#LFLAGS1="${LDFLAGS}"#' flags + oe_runmake -f unix/Makefile generic IZ_BZIP2=no_such_directory +} + +do_install() { + oe_runmake -f unix/Makefile prefix=${D}${prefix} \ + BINDIR=${D}${bindir} MANDIR=${D}${mandir}/man1 \ + install +} + +BBCLASSEXTEND = "native" + +# exclude version 2.3.2 which triggers a false positive +UPSTREAM_CHECK_REGEX = "^zip(?P<pver>(?!232).+)\.tgz" |