diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-04-05 22:28:33 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-04-05 22:31:28 +0300 |
commit | 193236933b0f4ab91b1625b64e2187e2db4e0e8f (patch) | |
tree | e12769d7c76d8b0517d6de3d3c72189753d253ed /poky/meta/recipes-extended | |
parent | bd93df9478f2f56ffcbc8cb88f1709c735dcd85b (diff) | |
download | openbmc-193236933b0f4ab91b1625b64e2187e2db4e0e8f.tar.xz |
reset upstream subtrees to HEAD
Reset the following subtrees on HEAD:
poky: 8217b477a1(master)
meta-xilinx: 64aa3d35ae(master)
meta-openembedded: 0435c9e193(master)
meta-raspberrypi: 490a4441ac(master)
meta-security: cb6d1c85ee(master)
Squashed patches:
meta-phosphor: drop systemd 239 patches
meta-phosphor: mrw-api: use correct install path
Change-Id: I268e2646d9174ad305630c6bbd3fbc1a6105f43d
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/recipes-extended')
126 files changed, 1462 insertions, 4917 deletions
diff --git a/poky/meta/recipes-extended/asciidoc/asciidoc/auto-catalogs.patch b/poky/meta/recipes-extended/asciidoc/asciidoc/auto-catalogs.patch new file mode 100644 index 000000000..ca170db00 --- /dev/null +++ b/poky/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/poky/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb b/poky/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb index 38164d557..751bf0f19 100644 --- a/poky/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb +++ b/poky/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb @@ -8,17 +8,25 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \ file://COPYRIGHT;md5=029ad5428ba5efa20176b396222d4069" -SRC_URI = "http://downloads.sourceforge.net/project/${BPN}/${BPN}/${PV}/${BP}.tar.gz" -SRC_URI[md5sum] = "c59018f105be8d022714b826b0be130a" -SRC_URI[sha256sum] = "78db9d0567c8ab6570a6eff7ffdf84eadd91f2dfc0a92a2d0105d323cab4e1f0" +SRC_URI = "git://github.com/asciidoc/asciidoc-py3;protocol=https \ + file://auto-catalogs.patch" +SRCREV = "618f6e6f6b558ed1e5f2588cd60a5a6b4f881ca0" +PV .= "+py3-git${SRCPV}" -UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/asciidoc/files/" +DEPENDS = "libxml2-native libxslt-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" -inherit autotools-brokensep +S = "${WORKDIR}/git" -export DESTDIR = "${D}" -DEPENDS_class-native = "docbook-xml-dtd4-native" -RDEPENDS_${PN} += "python" -BBCLASSEXTEND = "native" +# 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/poky/meta/recipes-extended/at/at/fix_parallel_build_error.patch b/poky/meta/recipes-extended/at/at/fix_parallel_build_error.patch index 100f8898e..30d232412 100644 --- a/poky/meta/recipes-extended/at/at/fix_parallel_build_error.patch +++ b/poky/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,24 +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(+) diff --git a/Makefile.in b/Makefile.in -index dd3c2f8..7897e45 100644 +index 4c11913..18ecc23 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -82,6 +82,8 @@ y.tab.c y.tab.h: parsetime.y +@@ -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 + atd.service: atd.service.in - sed -e 's![@]sbindir[@]!$(sbindir)!g' < $< > $@ + cat $< | sed -e 's![@]sbindir[@]!$(sbindir)!g' | sed -e 's![@]atjobdir[@]!$(atjobdir)!g' > $@ -- -1.9.1 +2.7.4 diff --git a/poky/meta/recipes-extended/at/at/pam.conf.patch b/poky/meta/recipes-extended/at/at/pam.conf.patch index b5ceb9ae8..c9f337ede 100644 --- a/poky/meta/recipes-extended/at/at/pam.conf.patch +++ b/poky/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 ++acount 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/poky/meta/recipes-extended/at/at_3.1.20.bb b/poky/meta/recipes-extended/at/at_3.1.23.bb index b76e83d1d..b74882d34 100644 --- a/poky/meta/recipes-extended/at/at_3.1.20.bb +++ b/poky/meta/recipes-extended/at/at_3.1.23.bb @@ -22,7 +22,7 @@ PAM_DEPS = "libpam libpam-runtime pam-plugin-env pam-plugin-limits" RCONFLICTS_${PN} = "atd" RREPLACES_${PN} = "atd" -SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/a/${BPN}/${BPN}_${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 \ @@ -37,8 +37,8 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/ PAM_SRC_URI = "file://pam.conf.patch \ file://configure-add-enable-pam.patch" -SRC_URI[md5sum] = "e7bd7b785b2cbb17e133d6bdc0fb099e" -SRC_URI[sha256sum] = "0871923cab73050b98ace020664eb2ddc1e669e4166b5abb64d864d02fcefab9" +SRC_URI[md5sum] = "1cec945506b5ddf1d776c92c315fc581" +SRC_URI[sha256sum] = "97450aa954aaa8a70218cc8e61a33df9fee9f86527e9f861de302fb7a3c81710" UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/a/at/" diff --git a/poky/meta/recipes-extended/blktool/blktool/0004-fix-ftbfs-glibc-2.28.patch b/poky/meta/recipes-extended/blktool/blktool/0004-fix-ftbfs-glibc-2.28.patch new file mode 100644 index 000000000..65bca6510 --- /dev/null +++ b/poky/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/poky/meta/recipes-extended/blktool/blktool/blktool-gnulib-makedev.patch b/poky/meta/recipes-extended/blktool/blktool/blktool-gnulib-makedev.patch deleted file mode 100644 index 6eea608b2..000000000 --- a/poky/meta/recipes-extended/blktool/blktool/blktool-gnulib-makedev.patch +++ /dev/null @@ -1,23 +0,0 @@ -include <sys/sysmacros.h> for major/minor defintions - -Fixes - -| ../blktool-4.orig/blktool.c: In function 'detect_dev_class': -| ../blktool-4.orig/blktool.c:295:10: warning: implicit declaration of function 'major' [-Wimplicit-function-declaration] -| switch (major(st_rdev)) { -| ^~~~~ - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Index: blktool-4.orig/blktool.c -=================================================================== ---- blktool-4.orig.orig/blktool.c -+++ blktool-4.orig/blktool.c -@@ -27,6 +27,7 @@ - #include <linux/cdrom.h> - #include <linux/major.h> - #include <scsi/scsi.h> -+#include <sys/sysmacros.h> - - #include "blktool.h" - diff --git a/poky/meta/recipes-extended/blktool/blktool_4-7.bb b/poky/meta/recipes-extended/blktool/blktool_4-7.1.bb index 0e6f7ee6d..ff2eaa535 100644 --- a/poky/meta/recipes-extended/blktool/blktool_4-7.bb +++ b/poky/meta/recipes-extended/blktool/blktool_4-7.1.bb @@ -13,7 +13,7 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/ 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://blktool-gnulib-makedev.patch \ + file://0004-fix-ftbfs-glibc-2.28.patch \ " SRC_URI[tarball.md5sum] = "62edc09c9908107e69391c87f4f3fd40" diff --git a/poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb b/poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb index 025f45c47..7d04e30d5 100644 --- a/poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb +++ b/poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb @@ -29,7 +29,7 @@ CFLAGS_append = " -fPIC -fpic -Winline -fno-strength-reduce -D_FILE_OFFSET_BITS= inherit autotools update-alternatives ptest relative_symlinks ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE_${PN} = "bunzip2 bzcat" +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}" diff --git a/poky/meta/recipes-extended/cpio/cpio-2.12/0001-Fix-segfault-with-append.patch b/poky/meta/recipes-extended/cpio/cpio-2.12/0001-Fix-segfault-with-append.patch index 2043c890c..ec8b303c4 100644 --- a/poky/meta/recipes-extended/cpio/cpio-2.12/0001-Fix-segfault-with-append.patch +++ b/poky/meta/recipes-extended/cpio/cpio-2.12/0001-Fix-segfault-with-append.patch @@ -1,87 +1,51 @@ -Upstream-Status: Submitted [bugs-cpio] +Upstream-Status: Backport Signed-off-by: Ross Burton <ross.burton@intel.com> -From 3f0bd5a40ad0ceaee78c74a52a7166ed7f08db81 Mon Sep 17 00:00:00 2001 -From: Pavel Raiskup <praiskup@redhat.com> -Date: Thu, 29 Nov 2018 07:03:48 +0100 -Subject: [PATCH] Fix segfault with --append +From 32d95fe0c90c59352a0ce3102fc9866cbfb0f629 Mon Sep 17 00:00:00 2001 +From: Sergey Poznyakoff <gray@gnu.org> +Date: Sat, 1 Dec 2018 11:40:02 +0200 +Subject: [PATCH] Fix sigfault when appending to archive -The --append mode combines both process_copy_in() and -process_copy_out() methods, each of them working with different -(local) file_hdr->c_name buffers. So ensure that -cpio_set_c_name() isn't using the same static variable for -maintaining length of different buffers. +Bug reported by Ross Burton. See +<http://lists.gnu.org/archive/html/bug-cpio/2018-11/msg00000.html> -Complements d36ec5f4e93130efb24fb9. Thanks to Ross Burton. - -* src/copyin.c (process_copy_in): Always initialize file_hdr. -* src/copyout.c (process_copy_out): Likewise. -* src/cpiohdr.h (cpio_file_stat): Add c_name_buflen variable. -* src/util.c (cpio_set_c_name): Use file_hdr->c_name_buflen. +* src/util.c: Keep static copy of the buffer pointer; always +assign it to file_hdr->c_name. Use x2realloc for memory management. --- - src/copyin.c | 1 + - src/copyout.c | 1 + - src/cpiohdr.h | 1 + - src/util.c | 3 ++- - 4 files changed, 5 insertions(+), 1 deletion(-) + src/util.c | 17 ++++------------- + 1 file changed, 4 insertions(+), 13 deletions(-) -diff --git a/src/copyin.c b/src/copyin.c -index ba887ae..767c2f8 100644 ---- a/src/copyin.c -+++ b/src/copyin.c -@@ -1213,6 +1213,7 @@ process_copy_in () - - newdir_umask = umask (0); /* Reset umask to preserve modes of - created files */ -+ memset (&file_hdr, 0, sizeof (struct cpio_file_stat)); - - /* Initialize the copy in. */ - if (pattern_file_name) -diff --git a/src/copyout.c b/src/copyout.c -index 7532dac..fb890cb 100644 ---- a/src/copyout.c -+++ b/src/copyout.c -@@ -594,6 +594,7 @@ process_copy_out () - - /* Initialize the copy out. */ - ds_init (&input_name, 128); -+ memset (&file_hdr, 0, sizeof (struct cpio_file_stat)); - file_hdr.c_magic = 070707; - - /* Check whether the output file might be a tape. */ -diff --git a/src/cpiohdr.h b/src/cpiohdr.h -index 588135b..cf64f3e 100644 ---- a/src/cpiohdr.h -+++ b/src/cpiohdr.h -@@ -127,6 +127,7 @@ struct cpio_file_stat /* Internal representation of a CPIO header */ - uint32_t c_chksum; - char *c_name; - char *c_tar_linkname; -+ size_t c_name_buflen; - }; - - void cpio_set_c_name(struct cpio_file_stat *file_hdr, char *name); diff --git a/src/util.c b/src/util.c -index 10486dc..1256469 100644 +index 10486dc..4e49124 100644 --- a/src/util.c +++ b/src/util.c -@@ -1413,7 +1413,7 @@ set_file_times (int fd, +@@ -1413,22 +1413,13 @@ set_file_times (int fd, void cpio_set_c_name (struct cpio_file_stat *file_hdr, char *name) { -- static size_t buflen = 0; -+ size_t buflen = file_hdr->c_name_buflen; ++ static char *buf = NULL; + static size_t buflen = 0; size_t len = strlen (name) + 1; - if (buflen == 0) -@@ -1430,6 +1430,7 @@ cpio_set_c_name (struct cpio_file_stat *file_hdr, char *name) - } - +- if (buflen == 0) +- { +- buflen = len; +- if (buflen < 32) +- buflen = 32; +- file_hdr->c_name = xmalloc (buflen); +- } +- else if (buflen < len) +- { +- buflen = len; +- file_hdr->c_name = xrealloc (file_hdr->c_name, buflen); +- } +- ++ while (buflen < len) ++ buf = x2realloc (buf, &buflen); ++ file_hdr->c_name = buf; file_hdr->c_namesize = len; -+ file_hdr->c_name_buflen = buflen; memmove (file_hdr->c_name, name, len); } - -- -2.11.0 +2.18.0 diff --git a/poky/meta/recipes-extended/cpio/cpio_2.12.bb b/poky/meta/recipes-extended/cpio/cpio_2.12.bb index 6ba8337e5..cb845c307 100644 --- a/poky/meta/recipes-extended/cpio/cpio_2.12.bb +++ b/poky/meta/recipes-extended/cpio/cpio_2.12.bb @@ -27,6 +27,9 @@ do_install () { mv "${D}${bindir}/cpio" "${D}${base_bindir}/cpio" rmdir ${D}${bindir}/ fi + + # Avoid conflicts with the version from tar + mv "${D}${mandir}/man8/rmt.8" "${D}${mandir}/man8/rmt-cpio.8" } PACKAGES =+ "${PN}-rmt" diff --git a/poky/meta/recipes-extended/cups/cups.inc b/poky/meta/recipes-extended/cups/cups.inc index c142a4d99..5010f0861 100644 --- a/poky/meta/recipes-extended/cups/cups.inc +++ b/poky/meta/recipes-extended/cups/cups.inc @@ -29,7 +29,7 @@ PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', ${@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" diff --git a/poky/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch b/poky/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch index db013cf08..d6a69f283 100644 --- a/poky/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch +++ b/poky/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch @@ -1,20 +1,21 @@ -Upstream-Status: Inappropriate [embedded specific] - -From 90069586167b930befce7303aea57078f04b4ed8 Mon Sep 17 00:00:00 2001 +From 1fb07162a9ed187cccf06e34c9bf841d15c6e64e 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 +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.2.6/ppdc/Makefile -=================================================================== ---- cups-2.2.6.orig/ppdc/Makefile -+++ cups-2.2.6/ppdc/Makefile -@@ -228,8 +228,8 @@ genstrings: genstrings.o libcupsppdc.a +diff --git a/ppdc/Makefile b/ppdc/Makefile +index e563988..973dd3f 100644 +--- a/ppdc/Makefile ++++ b/ppdc/Makefile +@@ -189,8 +189,8 @@ genstrings: genstrings.o libcupsppdc.a ../cups/$(LIBCUPSSTATIC) \ $(LD_CXX) $(ARCHFLAGS) $(LDFLAGS) -o genstrings genstrings.o \ libcupsppdc.a ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) \ $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) @@ -25,10 +26,10 @@ Index: cups-2.2.6/ppdc/Makefile # -@@ -246,9 +246,9 @@ ppdc-static: ppdc.o libcupsppdc.a ../cu - $(LD_CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a \ +@@ -209,9 +209,9 @@ ppdc-static: ppdc.o libcupsppdc.a ../cups/$(LIBCUPSSTATIC) foo.drv foo-fr.po ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \ $(COMMONLIBS) $(LIBZ) + $(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.2.6/ppdc/Makefile # -@@ -274,17 +274,17 @@ ppdi-static: ppdc-static ppdi.o libcups - $(LD_CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdi-static ppdi.o libcupsppdc.a \ +@@ -240,17 +240,17 @@ ppdi-static: ppdc-static ppdi.o libcupsppdc.a ../cups/$(LIBCUPSSTATIC) ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \ $(COMMONLIBS) $(LIBZ) + $(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 diff --git a/poky/meta/recipes-extended/cups/cups_2.2.10.bb b/poky/meta/recipes-extended/cups/cups_2.2.10.bb new file mode 100644 index 000000000..490c84e2f --- /dev/null +++ b/poky/meta/recipes-extended/cups/cups_2.2.10.bb @@ -0,0 +1,6 @@ +require cups.inc + +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f212b4338db0da8cb892e94bf2949460" + +SRC_URI[md5sum] = "3d22d747403ec5dcd0b66d1332564816" +SRC_URI[sha256sum] = "77c8b2b3bb7fe8b5fbfffc307f2c817b2d7ec67b657f261a1dd1c61ab81205bb" diff --git a/poky/meta/recipes-extended/cups/cups_2.2.8.bb b/poky/meta/recipes-extended/cups/cups_2.2.8.bb deleted file mode 100644 index de1bd84bf..000000000 --- a/poky/meta/recipes-extended/cups/cups_2.2.8.bb +++ /dev/null @@ -1,6 +0,0 @@ -require cups.inc - -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f212b4338db0da8cb892e94bf2949460" - -SRC_URI[md5sum] = "33150d08993a04c8e22176e93805a051" -SRC_URI[sha256sum] = "3968fc1d26fc48727508db1c1380e36c6694ab90177fd6920aec5f6cc73af9e4" diff --git a/poky/meta/recipes-extended/diffutils/diffutils-3.6/0001-Unset-need_charset_alias-when-building-for-musl.patch b/poky/meta/recipes-extended/diffutils/diffutils-3.6/0001-Unset-need_charset_alias-when-building-for-musl.patch deleted file mode 100644 index ba1a4bab4..000000000 --- a/poky/meta/recipes-extended/diffutils/diffutils-3.6/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: Pending - -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/poky/meta/recipes-extended/diffutils/diffutils-3.6/0001-explicitly-disable-replacing-getopt.patch b/poky/meta/recipes-extended/diffutils/diffutils-3.6/0001-explicitly-disable-replacing-getopt.patch deleted file mode 100644 index 351f87cab..000000000 --- a/poky/meta/recipes-extended/diffutils/diffutils-3.6/0001-explicitly-disable-replacing-getopt.patch +++ /dev/null @@ -1,30 +0,0 @@ -Subject: explicitly disable replacing getopt - -Explicitly disable replacing getopt to avoid compilation error like below. - - xstrtol-error.c:84:26: error: invalid use of undefined type 'struct rpl_option' - -Upstream-Status: Inappropriate [workaround] -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - m4/getopt.m4 | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/m4/getopt.m4 b/m4/getopt.m4 -index 3ebc7b7..8934426 100644 ---- a/m4/getopt.m4 -+++ b/m4/getopt.m4 -@@ -22,8 +22,8 @@ AC_DEFUN([gl_FUNC_GETOPT_POSIX], - fi - ]) - if test $REPLACE_GETOPT = 1; then -- dnl Arrange for getopt.h to be created. -- gl_GETOPT_SUBSTITUTE_HEADER -+ dnl Explicitly disable replacing getopt -+ : - fi - ]) - --- -2.11.0 - diff --git a/poky/meta/recipes-extended/diffutils/diffutils-3.6/run-ptest b/poky/meta/recipes-extended/diffutils/diffutils/run-ptest index 695c5e8a7..695c5e8a7 100644 --- a/poky/meta/recipes-extended/diffutils/diffutils-3.6/run-ptest +++ b/poky/meta/recipes-extended/diffutils/diffutils/run-ptest diff --git a/poky/meta/recipes-extended/diffutils/diffutils_3.6.bb b/poky/meta/recipes-extended/diffutils/diffutils_3.7.bb index 8ba897d18..7daeee351 100644 --- a/poky/meta/recipes-extended/diffutils/diffutils_3.6.bb +++ b/poky/meta/recipes-extended/diffutils/diffutils_3.7.bb @@ -4,13 +4,11 @@ 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 \ " -SRC_URI_append_libc-glibc = " file://0001-explicitly-disable-replacing-getopt.patch" -SRC_URI[md5sum] = "07cf286672ced26fba54cd0313bdc071" -SRC_URI[sha256sum] = "d621e8bdd4b573918c8145f7ae61817d1be9deb4c8d2328a65cea8e11d783bd6" +SRC_URI[md5sum] = "4824adc0e95dbbf11dfbdfaad6a1e461" +SRC_URI[sha256sum] = "b3a7a6221c3dc916085f0d205abf6b8e1ba443d4dd965118da364a1dc1cb3a26" EXTRA_OECONF += "ac_cv_path_PR_PROGRAM=${bindir}/pr --without-libsigsegv-prefix" diff --git a/poky/meta/recipes-extended/ed/ed_1.14.2.bb b/poky/meta/recipes-extended/ed/ed_1.15.bb index 87d03b10b..c79310325 100644 --- a/poky/meta/recipes-extended/ed/ed_1.14.2.bb +++ b/poky/meta/recipes-extended/ed/ed_1.15.bb @@ -3,8 +3,9 @@ HOMEPAGE = "http://www.gnu.org/software/ed/" LICENSE = "GPLv3+" LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7 \ - file://ed.h;endline=20;md5=4e36b7a40e137f42aee718165590d125 \ - file://main.c;endline=17;md5=c5b8f78f115df187af76868a2aead16a" + file://ed.h;endline=20;md5=8af8e7dc7275dca05ce6c9e7ece7aec8 \ + file://main.c;endline=17;md5=d4dd6a62c502712358ca18551f978781 \ + " SECTION = "base" @@ -15,8 +16,8 @@ bindir = "${base_bindir}" SRC_URI = "${GNU_MIRROR}/ed/${BP}.tar.lz" UPSTREAM_CHECK_URI = "${GNU_MIRROR}/ed/" -SRC_URI[md5sum] = "273d04778b2a51f7c3cbfcd2001876bf" -SRC_URI[sha256sum] = "f57962ba930d70d02fc71d6be5c5f2346b16992a455ab9c43be7061dec9810db" +SRC_URI[md5sum] = "d3aaeb5eb032142948d7a2f98a24899b" +SRC_URI[sha256sum] = "ad4489c0ad7a108c514262da28e6c2a426946fb408a3977ef1ed34308bdfd174" EXTRA_OEMAKE = "-e MAKEFLAGS=" diff --git a/poky/meta/recipes-extended/findutils/findutils_4.6.0.bb b/poky/meta/recipes-extended/findutils/findutils_4.6.0.bb index 5e4ca9486..3b62ed996 100644 --- a/poky/meta/recipes-extended/findutils/findutils_4.6.0.bb +++ b/poky/meta/recipes-extended/findutils/findutils_4.6.0.bb @@ -16,6 +16,6 @@ SRC_URI[md5sum] = "9936aa8009438ce185bea2694a997fc1" SRC_URI[sha256sum] = "ded4c9f73731cd48fec3b6bdaccce896473b6d8e337e9612e16cf1431bb1169d" # http://savannah.gnu.org/bugs/?27299 -CACHED_CONFIGUREVARS += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-posix-clang-wchar', 'gl_cv_func_wcwidth_works=yes', '', d)}" +CACHED_CONFIGUREVARS += "gl_cv_func_wcwidth_works=yes" EXTRA_OECONF += "ac_cv_path_SORT=${bindir}/sort" diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0001.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0001.patch deleted file mode 100644 index b2c1ade4b..000000000 --- a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0001.patch +++ /dev/null @@ -1,177 +0,0 @@ -From c8c77690199b677f70093824382f0881e643e17b Mon Sep 17 00:00:00 2001 -From: Chris Liddell <chris.liddell@artifex.com> -Date: Wed, 5 Dec 2018 12:22:13 +0000 -Subject: [PATCH 1/7] Sanitize op stack for error conditions - -We save the stacks to an array and store the array for the error handler to -access. - -For SAFER, we traverse the array, and deep copy any op arrays (procedures). As -we make these copies, we check for operators that do *not* exist in systemdict, -when we find one, we replace the operator with a name object (of the form -"/--opname--"). - -CVE: CVE-2019-6116 -Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] - -Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> ---- - psi/int.mak | 3 +- - psi/interp.c | 8 ++++++ - psi/istack.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++ - psi/istack.h | 3 ++ - 4 files changed, 91 insertions(+), 1 deletion(-) - -diff --git a/psi/int.mak b/psi/int.mak -index 6ab5bf0..6b349cb 100644 ---- a/psi/int.mak -+++ b/psi/int.mak -@@ -204,7 +204,8 @@ $(PSOBJ)iparam.$(OBJ) : $(PSSRC)iparam.c $(GH)\ - $(PSOBJ)istack.$(OBJ) : $(PSSRC)istack.c $(GH) $(memory__h)\ - $(ierrors_h) $(gsstruct_h) $(gsutil_h)\ - $(ialloc_h) $(istack_h) $(istkparm_h) $(istruct_h) $(iutil_h) $(ivmspace_h)\ -- $(store_h) $(INT_MAK) $(MAKEDIRS) -+ $(store_h) $(icstate_h) $(iname_h) $(dstack_h) $(idict_h) \ -+ $(INT_MAK) $(MAKEDIRS) - $(PSCC) $(PSO_)istack.$(OBJ) $(C_) $(PSSRC)istack.c - - $(PSOBJ)iutil.$(OBJ) : $(PSSRC)iutil.c $(GH) $(math__h) $(memory__h) $(string__h)\ -diff --git a/psi/interp.c b/psi/interp.c -index 6dc0dda..aa5779c 100644 ---- a/psi/interp.c -+++ b/psi/interp.c -@@ -761,6 +761,7 @@ copy_stack(i_ctx_t *i_ctx_p, const ref_stack_t * pstack, int skip, ref * arr) - uint size = ref_stack_count(pstack) - skip; - uint save_space = ialloc_space(idmemory); - int code, i; -+ ref *safety, *safe; - - if (size > 65535) - size = 65535; -@@ -778,6 +779,13 @@ copy_stack(i_ctx_t *i_ctx_p, const ref_stack_t * pstack, int skip, ref * arr) - make_null(&arr->value.refs[i]); - } - } -+ if (pstack == &o_stack && dict_find_string(systemdict, "SAFETY", &safety) > 0 && -+ dict_find_string(safety, "safe", &safe) > 0 && r_has_type(safe, t_boolean) && -+ safe->value.boolval == true) { -+ code = ref_stack_array_sanitize(i_ctx_p, arr, arr); -+ if (code < 0) -+ return code; -+ } - ialloc_set_space(idmemory, save_space); - return code; - } -diff --git a/psi/istack.c b/psi/istack.c -index 8fe151f..f1a3e51 100644 ---- a/psi/istack.c -+++ b/psi/istack.c -@@ -27,6 +27,10 @@ - #include "iutil.h" - #include "ivmspace.h" /* for local/global test */ - #include "store.h" -+#include "icstate.h" -+#include "iname.h" -+#include "dstack.h" -+#include "idict.h" - - /* Forward references */ - static void init_block(ref_stack_t *pstack, const ref *pblock_array, -@@ -294,6 +298,80 @@ ref_stack_store_check(const ref_stack_t *pstack, ref *parray, uint count, - return 0; - } - -+int -+ref_stack_array_sanitize(i_ctx_t *i_ctx_p, ref *sarr, ref *darr) -+{ -+ int i, code; -+ ref obj, arr2; -+ ref *pobj2; -+ gs_memory_t *mem = (gs_memory_t *)idmemory->current; -+ -+ if (!r_is_array(sarr) || !r_has_type(darr, t_array)) -+ return_error(gs_error_typecheck); -+ -+ for (i = 0; i < r_size(sarr); i++) { -+ code = array_get(mem, sarr, i, &obj); -+ if (code < 0) -+ make_null(&obj); -+ switch(r_type(&obj)) { -+ case t_operator: -+ { -+ int index = op_index(&obj); -+ -+ if (index > 0 && index < op_def_count) { -+ const byte *data = (const byte *)(op_index_def(index)->oname + 1); -+ if (dict_find_string(systemdict, (const char *)data, &pobj2) <= 0) { -+ byte *s = gs_alloc_bytes(mem, strlen((char *)data) + 5, "ref_stack_array_sanitize"); -+ if (s) { -+ s[0] = '\0'; -+ strcpy((char *)s, "--"); -+ strcpy((char *)s + 2, (char *)data); -+ strcpy((char *)s + strlen((char *)data) + 2, "--"); -+ } -+ else { -+ s = (byte *)data; -+ } -+ code = name_ref(imemory, s, strlen((char *)s), &obj, 1); -+ if (code < 0) make_null(&obj); -+ if (s != data) -+ gs_free_object(mem, s, "ref_stack_array_sanitize"); -+ } -+ } -+ else { -+ make_null(&obj); -+ } -+ ref_assign(darr->value.refs + i, &obj); -+ break; -+ } -+ case t_array: -+ case t_shortarray: -+ case t_mixedarray: -+ { -+ int attrs = r_type_attrs(&obj) & (a_write | a_read | a_execute | a_executable); -+ /* We only want to copy executable arrays */ -+ if (attrs & (a_execute | a_executable)) { -+ code = ialloc_ref_array(&arr2, attrs, r_size(&obj), "ref_stack_array_sanitize"); -+ if (code < 0) { -+ make_null(&arr2); -+ } -+ else { -+ code = ref_stack_array_sanitize(i_ctx_p, &obj, &arr2); -+ } -+ ref_assign(darr->value.refs + i, &arr2); -+ } -+ else { -+ ref_assign(darr->value.refs + i, &obj); -+ } -+ break; -+ } -+ default: -+ ref_assign(darr->value.refs + i, &obj); -+ } -+ } -+ return 0; -+} -+ -+ - /* - * Store the top 'count' elements of a stack, starting 'skip' elements below - * the top, into an array, with or without store/undo checking. age=-1 for -diff --git a/psi/istack.h b/psi/istack.h -index 051dcbe..54be405 100644 ---- a/psi/istack.h -+++ b/psi/istack.h -@@ -129,6 +129,9 @@ int ref_stack_store(const ref_stack_t *pstack, ref *parray, uint count, - uint skip, int age, bool check, - gs_dual_memory_t *idmem, client_name_t cname); - -+int -+ref_stack_array_sanitize(i_ctx_t *i_ctx_p, ref *sarr, ref *darr); -+ - /* - * Pop the top N elements off a stack. - * The number must not exceed the number of elements in use. --- -2.18.1 - diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0002.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0002.patch deleted file mode 100644 index 97c74e7e3..000000000 --- a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0002.patch +++ /dev/null @@ -1,442 +0,0 @@ -From 20001d2bdf3cc60e76241a6ae72b1df01c5424c5 Mon Sep 17 00:00:00 2001 -From: Chris Liddell <chris.liddell@artifex.com> -Date: Thu, 13 Dec 2018 15:28:34 +0000 -Subject: [PATCH 2/7] Any transient procedures that call .force* operators - -(i.e. for conditionals or loops) make them executeonly. - -CVE: CVE-2019-6116 -Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] - -Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> ---- - Resource/Init/gs_diskn.ps | 2 +- - Resource/Init/gs_dps1.ps | 4 ++-- - Resource/Init/gs_fntem.ps | 4 ++-- - Resource/Init/gs_fonts.ps | 12 ++++++------ - Resource/Init/gs_init.ps | 4 ++-- - Resource/Init/gs_lev2.ps | 11 ++++++----- - Resource/Init/gs_pdfwr.ps | 2 +- - Resource/Init/gs_res.ps | 4 ++-- - Resource/Init/gs_setpd.ps | 2 +- - Resource/Init/pdf_base.ps | 13 ++++++++----- - Resource/Init/pdf_draw.ps | 16 +++++++++------- - Resource/Init/pdf_font.ps | 6 +++--- - Resource/Init/pdf_main.ps | 4 ++-- - Resource/Init/pdf_ops.ps | 7 ++++--- - 14 files changed, 49 insertions(+), 42 deletions(-) - -diff --git a/Resource/Init/gs_diskn.ps b/Resource/Init/gs_diskn.ps -index fd694bc..8bf2054 100644 ---- a/Resource/Init/gs_diskn.ps -+++ b/Resource/Init/gs_diskn.ps -@@ -51,7 +51,7 @@ systemdict begin - mark 5 1 roll ] mark exch { { } forall } forall ] - //systemdict /.searchabledevs 2 index .forceput - exch .setglobal -- } -+ } executeonly - if - } .bind executeonly odef % must be bound and hidden for .forceput - -diff --git a/Resource/Init/gs_dps1.ps b/Resource/Init/gs_dps1.ps -index ec5db61..4fae283 100644 ---- a/Resource/Init/gs_dps1.ps -+++ b/Resource/Init/gs_dps1.ps -@@ -78,7 +78,7 @@ level2dict begin - .currentglobal - { % Current mode is global; delete from local directory too. - //systemdict /LocalFontDirectory .knownget -- { 1 index .forceundef } % LocalFontDirectory is readonly -+ { 1 index .forceundef } executeonly % LocalFontDirectory is readonly - if - } - { % Current mode is local; if there was a shadowed global -@@ -126,7 +126,7 @@ level2dict begin - } - ifelse - } forall -- pop counttomark 2 idiv { .forceundef } repeat pop % readonly -+ pop counttomark 2 idiv { .forceundef } executeonly repeat pop % readonly - } - if - //SharedFontDirectory exch .forcecopynew pop -diff --git a/Resource/Init/gs_fntem.ps b/Resource/Init/gs_fntem.ps -index c1f7651..6eb672a 100644 ---- a/Resource/Init/gs_fntem.ps -+++ b/Resource/Init/gs_fntem.ps -@@ -401,12 +401,12 @@ currentdict end def - .forceput % FontInfo can be read-only. - pop % bool <font> - exit -- } if -+ } executeonly if - dup /FontInfo get % bool <font> <FI> - /GlyphNames2Unicode /Unicode /Decoding findresource - .forceput % FontInfo can be read-only. - exit -- } loop -+ } executeonly loop - exch setglobal - } .bind executeonly odef % must be bound and hidden for .forceput - -diff --git a/Resource/Init/gs_fonts.ps b/Resource/Init/gs_fonts.ps -index 803faca..290da0c 100644 ---- a/Resource/Init/gs_fonts.ps -+++ b/Resource/Init/gs_fonts.ps -@@ -374,7 +374,7 @@ FONTPATH length 0 eq { (%END FONTPATH) .skipeof } if - /.setnativefontmapbuilt { % set whether we've been run - dup type /booleantype eq { - systemdict exch /.nativefontmapbuilt exch .forceput -- } -+ } executeonly - {pop} - ifelse - } .bind executeonly odef -@@ -1007,11 +1007,11 @@ $error /SubstituteFont { } put - { 2 index gcheck currentglobal - 2 copy eq { - pop pop .forceput -- } { -+ } executeonly { - 5 1 roll setglobal - dup length string copy - .forceput setglobal -- } ifelse -+ } executeonly ifelse - } .bind executeonly odef % must be bound and hidden for .forceput - - % Attempt to load a font from a file. -@@ -1084,7 +1084,7 @@ $error /SubstituteFont { } put - .FontDirectory 3 index .forceundef % readonly - 1 index (r) file .loadfont .FontDirectory exch - /.setglobal .systemvar exec -- } -+ } executeonly - { .loadfont .FontDirectory - } - ifelse -@@ -1105,7 +1105,7 @@ $error /SubstituteFont { } put - dup 3 index .fontknownget - { dup /PathLoad 4 index .putgstringcopy - 4 1 roll pop pop pop //true exit -- } if -+ } executeonly if - - % Maybe the file had a different FontName. - % See if we can get a FontName from the file, and if so, -@@ -1134,7 +1134,7 @@ $error /SubstituteFont { } put - ifelse % Stack: origfontname fontdict - exch pop //true exit - % Stack: fontdict -- } -+ } executeonly - if pop % Stack: origfontname fontdirectory path - } - if pop pop % Stack: origfontname -diff --git a/Resource/Init/gs_init.ps b/Resource/Init/gs_init.ps -index d733124..56c0bd2 100644 ---- a/Resource/Init/gs_init.ps -+++ b/Resource/Init/gs_init.ps -@@ -2357,7 +2357,7 @@ SAFER { .setsafeglobal } if - % Update the copy of the user parameters. - mark .currentuserparams counttomark 2 idiv { - userparams 3 1 roll .forceput % userparams is read-only -- } repeat pop -+ } executeonly repeat pop - % Turn on idiom recognition, if available. - currentuserparams /IdiomRecognition known { - /IdiomRecognition //true .definepsuserparam -@@ -2376,7 +2376,7 @@ SAFER { .setsafeglobal } if - % Remove real system params from pssystemparams. - mark .currentsystemparams counttomark 2 idiv { - pop pssystemparams exch .forceundef -- } repeat pop -+ } executeonly repeat pop - } if - - % Set up AlignToPixels : -diff --git a/Resource/Init/gs_lev2.ps b/Resource/Init/gs_lev2.ps -index 44fe619..0f0d573 100644 ---- a/Resource/Init/gs_lev2.ps -+++ b/Resource/Init/gs_lev2.ps -@@ -154,7 +154,8 @@ end - % protect top level of parameters that we copied - dup type dup /arraytype eq exch /stringtype eq or { readonly } if - /userparams .systemvar 3 1 roll .forceput % userparams is read-only -- } { -+ } executeonly -+ { - pop pop - } ifelse - } forall -@@ -224,7 +225,7 @@ end - % protect top level parameters that we copied - dup type dup /arraytype eq exch /stringtype eq or { readonly } if - //pssystemparams 3 1 roll .forceput % pssystemparams is read-only -- } -+ } executeonly - { pop pop - } - ifelse -@@ -934,7 +935,7 @@ mark - dup /PaintProc get - 1 index /Implementation known not { - 1 index dup /Implementation //null .forceput readonly pop -- } if -+ } executeonly if - exec - }.bind odef - -@@ -958,7 +959,7 @@ mark - dup /PaintProc get - 1 index /Implementation known not { - 1 index dup /Implementation //null .forceput readonly pop -- } if -+ } executeonly if - /UNROLLFORMS where {/UNROLLFORMS get}{false}ifelse not - %% [CTM] <<Form>> PaintProc .beginform - - { -@@ -1005,7 +1006,7 @@ mark - %% Form dictioanry using the /Implementation key). - 1 dict dup /FormID 4 -1 roll put - 1 index exch /Implementation exch .forceput readonly pop -- } -+ } executeonly - ifelse - } - { -diff --git a/Resource/Init/gs_pdfwr.ps b/Resource/Init/gs_pdfwr.ps -index 58e75d3..b425103 100644 ---- a/Resource/Init/gs_pdfwr.ps -+++ b/Resource/Init/gs_pdfwr.ps -@@ -650,7 +650,7 @@ currentdict /.pdfmarkparams .undef - } ifelse - } bind .makeoperator .forceput - systemdict /.pdf_hooked_DSC_Creator //true .forceput -- } if -+ } executeonly if - pop - } if - } { -diff --git a/Resource/Init/gs_res.ps b/Resource/Init/gs_res.ps -index 8eb8bb0..d9b3459 100644 ---- a/Resource/Init/gs_res.ps -+++ b/Resource/Init/gs_res.ps -@@ -152,7 +152,7 @@ setglobal - % use .forceput / .forcedef later to replace the dummy, - % empty .Instances dictionary with the real one later. - readonly -- } { -+ }{ - /defineresource cvx /typecheck signaloperror - } ifelse - } bind executeonly odef -@@ -424,7 +424,7 @@ status { - % As noted above, Category dictionaries are read-only, - % so we have to use .forcedef here. - /.Instances 1 index .forcedef % Category dict is read-only -- } if -+ } executeonly if - } - { .LocalInstances dup //.emptydict eq - { pop 3 dict localinstancedict Category 2 index put -diff --git a/Resource/Init/gs_setpd.ps b/Resource/Init/gs_setpd.ps -index e22597e..7875d1f 100644 ---- a/Resource/Init/gs_setpd.ps -+++ b/Resource/Init/gs_setpd.ps -@@ -634,7 +634,7 @@ NOMEDIAATTRS { - SETPDDEBUG { (Rolling back.) = pstack flush } if - 3 index 2 index 3 -1 roll .forceput - 4 index 1 index .knownget -- { 4 index 3 1 roll .forceput } -+ { 4 index 3 1 roll .forceput } executeonly - { 3 index exch .undef } - ifelse - } bind executeonly odef -diff --git a/Resource/Init/pdf_base.ps b/Resource/Init/pdf_base.ps -index b45e980..7312729 100644 ---- a/Resource/Init/pdf_base.ps -+++ b/Resource/Init/pdf_base.ps -@@ -130,26 +130,29 @@ currentdict /num-chars-dict .undef - - /.pdfexectoken { % <count> <opdict> <exectoken> .pdfexectoken ? - PDFDEBUG { -- pdfdict /PDFSTEPcount known not { pdfdict /PDFSTEPcount 1 .forceput } if -+ pdfdict /PDFSTEPcount known not { pdfdict /PDFSTEPcount 1 .forceput } executeonly if - PDFSTEP { - pdfdict /PDFtokencount 2 copy .knownget { 1 add } { 1 } ifelse .forceput - PDFSTEPcount 1 gt { - pdfdict /PDFSTEPcount PDFSTEPcount 1 sub .forceput -- } { -+ } executeonly -+ { - dup ==only - ( step # ) print PDFtokencount =only - ( ? ) print flush 1 //false .outputpage - (%stdin) (r) file 255 string readline { - token { - exch pop pdfdict /PDFSTEPcount 3 -1 roll .forceput -- } { -+ } executeonly -+ { - pdfdict /PDFSTEPcount 1 .forceput -- } ifelse % token -+ } executeonly ifelse % token - } { - pop /PDFSTEP //false def % EOF on stdin - } ifelse % readline - } ifelse % PDFSTEPcount > 1 -- } { -+ } executeonly -+ { - dup ==only () = flush - } ifelse % PDFSTEP - } if % PDFDEBUG -diff --git a/Resource/Init/pdf_draw.ps b/Resource/Init/pdf_draw.ps -index 6b0ba93..40c6ac8 100644 ---- a/Resource/Init/pdf_draw.ps -+++ b/Resource/Init/pdf_draw.ps -@@ -1118,14 +1118,14 @@ currentdict end readonly def - pdfdict /.Qqwarning_issued //true .forceput - .setglobal - pdfformaterror -- } ifelse -+ } executeonly ifelse - } - { - currentglobal pdfdict gcheck .setglobal - pdfdict /.Qqwarning_issued //true .forceput - .setglobal - pdfformaterror -- } ifelse -+ } executeonly ifelse - end - } ifelse - } loop -@@ -1141,14 +1141,14 @@ currentdict end readonly def - pdfdict /.Qqwarning_issued //true .forceput - .setglobal - pdfformaterror -- } ifelse -+ } executeonly ifelse - } - { - currentglobal pdfdict gcheck .setglobal - pdfdict /.Qqwarning_issued //true .forceput - .setglobal - pdfformaterror -- } ifelse -+ } executeonly ifelse - } if - pop - -@@ -2350,9 +2350,10 @@ currentdict /last-ditch-bpc-csp undef - /IncrementAppearanceNumber { - pdfdict /AppearanceNumber .knownget { - 1 add pdfdict /AppearanceNumber 3 -1 roll .forceput -- }{ -+ } executeonly -+ { - pdfdict /AppearanceNumber 0 .forceput -- } ifelse -+ } executeonly ifelse - }bind executeonly odef - - /MakeAppearanceName { -@@ -2510,7 +2511,8 @@ currentdict /last-ditch-bpc-csp undef - %% want to preserve it. - pdfdict /.PreservePDFForm false .forceput - /q cvx /execform cvx 5 -2 roll -- }{ -+ } executeonly -+ { - /q cvx /PDFexecform cvx 5 -2 roll - } ifelse - -diff --git a/Resource/Init/pdf_font.ps b/Resource/Init/pdf_font.ps -index bea9ea9..4cd62b9 100644 ---- a/Resource/Init/pdf_font.ps -+++ b/Resource/Init/pdf_font.ps -@@ -714,7 +714,7 @@ currentdict end readonly def - pop pop pop - currentdict /.stackdepth .forceundef - currentdict /.dstackdepth .forceundef -- } -+ } executeonly - {pop pop pop} - ifelse - -@@ -1232,7 +1232,7 @@ currentdict /eexec_pdf_param_dict .undef - (\n **** Warning: Type 3 glyph has unbalanced q/Q operators \(too many q's\)\n Output may be incorrect.\n) - pdfformatwarning - pdfdict /.Qqwarning_issued //true .forceput -- } if -+ } executeonly if - Q - } repeat - Q -@@ -2016,7 +2016,7 @@ currentdict /CMap_read_dict undef - /CIDFallBack /CIDFont findresource - } if - exit -- } if -+ } executeonly if - } if - } if - -diff --git a/Resource/Init/pdf_main.ps b/Resource/Init/pdf_main.ps -index 00da47a..37e69b3 100644 ---- a/Resource/Init/pdf_main.ps -+++ b/Resource/Init/pdf_main.ps -@@ -2701,14 +2701,14 @@ currentdict /PDF2PS_matrix_key undef - pdfdict /.Qqwarning_issued //true .forceput - .setglobal - pdfformaterror -- } ifelse -+ } executeonly ifelse - } - { - currentglobal pdfdict gcheck .setglobal - pdfdict /.Qqwarning_issued //true .forceput - .setglobal - pdfformaterror -- } ifelse -+ } executeonly ifelse - } if - } if - pop -diff --git a/Resource/Init/pdf_ops.ps b/Resource/Init/pdf_ops.ps -index 8672d61..aa09641 100644 ---- a/Resource/Init/pdf_ops.ps -+++ b/Resource/Init/pdf_ops.ps -@@ -184,14 +184,14 @@ currentdict /gput_always_allow .undef - pdfdict /.Qqwarning_issued //true .forceput - .setglobal - pdfformaterror -- } ifelse -+ } executeonly ifelse - } - { - currentglobal pdfdict gcheck .setglobal - pdfdict /.Qqwarning_issued //true .forceput - .setglobal - pdfformaterror -- } ifelse -+ } executeonly ifelse - } if - } bind executeonly odef - -@@ -439,7 +439,8 @@ currentdict /gput_always_allow .undef - dup type /booleantype eq { - .currentSMask type /dicttype eq { - .currentSMask /Processed 2 index .forceput -- } { -+ } executeonly -+ { - .setSMask - }ifelse - }{ --- -2.18.1 - diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0003.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0003.patch deleted file mode 100644 index 02b1dc962..000000000 --- a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0003.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 60b77b8bf8b6e4d30519c47724631012b530cf0e Mon Sep 17 00:00:00 2001 -From: Chris Liddell <chris.liddell@artifex.com> -Date: Sat, 15 Dec 2018 09:08:32 +0000 -Subject: [PATCH 3/7] Bug700317: Fix logic for an older change - -Unlike almost every other function in gs, dict_find_string() returns 1 on -success 0 or <0 on failure. The logic for this case was wrong. - -CVE: CVE-2019-6116 -Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] - -Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> ---- - psi/interp.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/psi/interp.c b/psi/interp.c -index aa5779c..f6c45bb 100644 ---- a/psi/interp.c -+++ b/psi/interp.c -@@ -703,7 +703,7 @@ again: - * i.e. it's an internal operator we have hidden - */ - code = dict_find_string(systemdict, (const char *)bufptr, &tobj); -- if (code < 0) { -+ if (code <= 0) { - buf[0] = buf[1] = buf[rlen + 2] = buf[rlen + 3] = '-'; - rlen += 4; - bufptr = buf; --- -2.18.1 - diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0004.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0004.patch deleted file mode 100644 index cc15453f0..000000000 --- a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0004.patch +++ /dev/null @@ -1,136 +0,0 @@ -From d739565534e955c4336731e4ea4eebc895c09c5c Mon Sep 17 00:00:00 2001 -From: Chris Liddell <chris.liddell@artifex.com> -Date: Tue, 18 Dec 2018 10:42:10 +0000 -Subject: [PATCH 4/7] Harden some uses of .force* operators - -by adding a few immediate evalutions - -CVE: CVE-2019-6116 -Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] - -Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> ---- - Resource/Init/gs_dps1.ps | 4 ++-- - Resource/Init/gs_fonts.ps | 20 ++++++++++---------- - Resource/Init/gs_init.ps | 6 +++--- - 3 files changed, 15 insertions(+), 15 deletions(-) - -diff --git a/Resource/Init/gs_dps1.ps b/Resource/Init/gs_dps1.ps -index 4fae283..b75ea14 100644 ---- a/Resource/Init/gs_dps1.ps -+++ b/Resource/Init/gs_dps1.ps -@@ -74,7 +74,7 @@ level2dict begin - } odef - % undefinefont has to take local/global VM into account. - /undefinefont % <fontname> undefinefont - -- { .FontDirectory 1 .argindex .forceundef % FontDirectory is readonly -+ { //.FontDirectory 1 .argindex .forceundef % FontDirectory is readonly - .currentglobal - { % Current mode is global; delete from local directory too. - //systemdict /LocalFontDirectory .knownget -@@ -85,7 +85,7 @@ level2dict begin - % definition, copy it into the local directory. - //systemdict /SharedFontDirectory .knownget - { 1 index .knownget -- { .FontDirectory 2 index 3 -1 roll { put } systemdict /superexec known {//superexec}{1183615869 internaldict /superexec get exec} ifelse } % readonly -+ { //.FontDirectory 2 index 3 -1 roll { put } systemdict /superexec known {//superexec}{1183615869 internaldict /superexec get exec} ifelse } % readonly - if - } - if -diff --git a/Resource/Init/gs_fonts.ps b/Resource/Init/gs_fonts.ps -index 290da0c..c13a2fc 100644 ---- a/Resource/Init/gs_fonts.ps -+++ b/Resource/Init/gs_fonts.ps -@@ -516,7 +516,7 @@ buildfontdict 3 /.buildfont3 cvx put - if - } - if -- dup .FontDirectory 4 -2 roll { .growput } systemdict /superexec known {//superexec}{1183615869 internaldict /superexec get exec} ifelse % readonly -+ dup //.FontDirectory 4 -2 roll { .growput } systemdict /superexec known {//superexec}{1183615869 internaldict /superexec get exec} ifelse % readonly - % If the font originated as a resource, register it. - currentfile .currentresourcefile eq { dup .registerfont } if - readonly -@@ -943,7 +943,7 @@ $error /SubstituteFont { } put - % Try to find a font using only the present contents of Fontmap. - /.tryfindfont { % <fontname> .tryfindfont <font> true - % <fontname> .tryfindfont false -- .FontDirectory 1 index .fontknownget -+ //.FontDirectory 1 index .fontknownget - { % Already loaded - exch pop //true - } -@@ -975,7 +975,7 @@ $error /SubstituteFont { } put - { % Font with a procedural definition - exec % The procedure will load the font. - % Check to make sure this really happened. -- .FontDirectory 1 index .knownget -+ //.FontDirectory 1 index .knownget - { exch pop //true exit } - if - } -@@ -1081,11 +1081,11 @@ $error /SubstituteFont { } put - % because it's different depending on language level. - .currentglobal exch /.setglobal .systemvar exec - % Remove the fake definition, if any. -- .FontDirectory 3 index .forceundef % readonly -- 1 index (r) file .loadfont .FontDirectory exch -+ //.FontDirectory 3 index .forceundef % readonly -+ 1 index (r) file .loadfont //.FontDirectory exch - /.setglobal .systemvar exec - } executeonly -- { .loadfont .FontDirectory -+ { .loadfont //.FontDirectory - } - ifelse - % Stack: fontname fontfilename fontdirectory -@@ -1119,8 +1119,8 @@ $error /SubstituteFont { } put - % Stack: origfontname fontdirectory filefontname fontdict - 3 -1 roll pop - % Stack: origfontname filefontname fontdict -- dup /FontName get dup FontDirectory exch .forceundef -- GlobalFontDirectory exch .forceundef -+ dup /FontName get dup //.FontDirectory exch .forceundef -+ /GlobalFontDirectory .systemvar exch .forceundef - dup length dict .copydict dup 3 index /FontName exch put - 2 index exch definefont - exch -@@ -1176,10 +1176,10 @@ currentdict /.putgstringcopy .undef - { - { - pop dup type /stringtype eq { cvn } if -- .FontDirectory 1 index known not { -+ //.FontDirectory 1 index known not { - 2 dict dup /FontName 3 index put - dup /FontType 1 put -- .FontDirectory 3 1 roll { put } systemdict /superexec known {//superexec}{1183615869 internaldict /superexec get exec} ifelse % readonly -+ //.FontDirectory 3 1 roll { put } systemdict /superexec known {//superexec}{1183615869 internaldict /superexec get exec} ifelse % readonly - } { - pop - } ifelse -diff --git a/Resource/Init/gs_init.ps b/Resource/Init/gs_init.ps -index 56c0bd2..d9a0829 100644 ---- a/Resource/Init/gs_init.ps -+++ b/Resource/Init/gs_init.ps -@@ -1168,8 +1168,8 @@ errordict /unknownerror .undef - }ifelse - }forall - noaccess pop -- systemdict /.setsafeerrors .forceundef -- systemdict /.SAFERERRORLIST .forceundef -+ //systemdict /.setsafeerrors .forceundef -+ //systemdict /.SAFERERRORLIST .forceundef - } bind executeonly odef - - SAFERERRORS {.setsafererrors} if -@@ -2114,7 +2114,7 @@ currentdict /tempfilepaths undef - - /.locksafe { - .locksafe_userparams -- systemdict /getenv {pop //false} .forceput -+ //systemdict /getenv {pop //false} .forceput - % setpagedevice has the side effect of clearing the page, but - % we will just document that. Using setpagedevice keeps the device - % properties and pagedevice .LockSafetyParams in agreement even --- -2.18.1 - diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0005.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0005.patch deleted file mode 100644 index db70bba21..000000000 --- a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0005.patch +++ /dev/null @@ -1,250 +0,0 @@ -From 1e830cafa56c6e3e1b08d246eaf5496fe81a0032 Mon Sep 17 00:00:00 2001 -From: Nancy Durgin <nancy.durgin@artifex.com> -Date: Tue, 27 Nov 2018 12:36:14 -0800 -Subject: [PATCH 5/7] Undef a bunch of internal things in gs_res.ps - -CVE: CVE-2019-6116 -Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] - -Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> ---- - Resource/Init/gs_res.ps | 72 +++++++++++++++++++++++++-------------- - Resource/Init/gs_resmp.ps | 4 +-- - 2 files changed, 49 insertions(+), 27 deletions(-) - -diff --git a/Resource/Init/gs_res.ps b/Resource/Init/gs_res.ps -index d9b3459..18d5452 100644 ---- a/Resource/Init/gs_res.ps -+++ b/Resource/Init/gs_res.ps -@@ -197,7 +197,7 @@ setglobal - /.findresource { % <key> <category> findresource <instance> - 2 copy dup /Category eq - { pop //Category 0 get begin } { .findcategory } ifelse -- /FindResource .resourceexec exch pop exch pop -+ /FindResource //.resourceexec exec exch pop exch pop - } bind - end % .Instances of Category - def -@@ -223,7 +223,7 @@ def - not { /defineresource cvx /typecheck signaloperror } if - } if - } if -- /DefineResource .resourceexec -+ /DefineResource //.resourceexec exec - 4 1 roll pop pop pop - } .errorexec - } bind executeonly odef -@@ -252,7 +252,7 @@ def - % without the check. - /resourcestatus cvx /typecheck signalerror - } if -- 2 copy .findcategory /ResourceStatus .resourceexec -+ 2 copy .findcategory /ResourceStatus //.resourceexec exec - { 4 2 roll pop pop //true } { pop pop //false } ifelse - } stopped { - % Although resourcestatus is an operator, Adobe uses executable name -@@ -266,7 +266,7 @@ def - } if - 1 .argindex 1 index % catch stackunderflow - -- { .findcategory /UndefineResource .resourceexec pop pop -+ { .findcategory /UndefineResource //.resourceexec exec pop pop - } stopped { - % Although undefineresource is an operator, Adobe uses executable name - % here but uses operator for the errors above. CET 23-33 -@@ -315,10 +315,10 @@ currentdict /pssystemparams known not { - /pssystemparams 10 dict readonly def - } if - pssystemparams begin -- .default_resource_dir -- /FontResourceDir (Font) .resource_dir_name -+ //.default_resource_dir exec -+ /FontResourceDir (Font) //.resource_dir_name exec - readonly .forcedef % pssys'params is r-o -- /GenericResourceDir () .resource_dir_name -+ /GenericResourceDir () //.resource_dir_name exec - readonly .forcedef % pssys'params is r-o - pop % .default_resource_dir - /GenericResourcePathSep -@@ -387,13 +387,13 @@ status { - } bind def - /.localresourceforall { % <key> <value> <args> .localr'forall - - exch pop -- 2 copy 0 get .stringmatch { .enumerateresource } { pop pop } ifelse -+ 2 copy 0 get .stringmatch { //.enumerateresource exec } { pop pop } ifelse - } bind def - /.globalresourceforall { % <key> <value> <args> .globalr'forall - - exch pop - 2 copy 0 get .stringmatch { - dup 3 get begin .LocalInstances end 2 index known not { -- .enumerateresource -+ //.enumerateresource exec - } { - pop pop - } ifelse -@@ -408,7 +408,7 @@ status { - 3 index known { - pop pop pop - } { -- 2 index known { pop pop } { .enumerateresource } ifelse -+ 2 index known { pop pop } { //.enumerateresource exec } ifelse - } ifelse - } bind def - -@@ -468,19 +468,19 @@ status { - % .knownget doesn't fail on null - /findresource cvx /typecheck signaloperror - } if -- dup .getvminstance { -+ dup //.getvminstance exec { - exch pop 0 get - } { - dup ResourceStatus { - pop 1 gt { -- .DoLoadResource .getvminstance not { -- /findresource cvx .undefinedresource -+ .DoLoadResource //.getvminstance exec not { -+ /findresource cvx //.undefinedresource exec - } if 0 get - } { - .GetInstance pop 0 get - } ifelse - } { -- /findresource cvx .undefinedresource -+ /findresource cvx //.undefinedresource exec - } ifelse - } ifelse - } bind executeonly -@@ -621,7 +621,7 @@ status { - .currentglobal not .setglobal - vmstatus pop exch pop add - } repeat --} bind def -+} bind executeonly odef - /.DoLoadResource { - % .LoadResource may push entries on the operand stack. - % It is an undocumented feature of Adobe implementations, -@@ -633,8 +633,8 @@ status { - {.LoadResource} 4 1 roll 4 .execn - % Stack: ... count key memused - .vmused exch sub -- 1 index .getvminstance not { -- pop dup .undefinedresource % didn't load -+ 1 index //.getvminstance exec not { -+ pop dup //.undefinedresource exec % didn't load - } if - dup 1 1 put - 2 3 -1 roll put -@@ -648,7 +648,7 @@ status { - { //true setglobal { .runresource } stopped //false setglobal { stop } if } - ifelse - } -- { dup .undefinedresource -+ { dup //.undefinedresource exec - } - ifelse - } bind -@@ -758,7 +758,7 @@ counttomark 2 idiv - /FindResource - { .Instances 1 index .knownget - { exch pop } -- { /findresource cvx .undefinedresource } -+ { /findresource cvx //.undefinedresource exec } - ifelse - } bind executeonly - /ResourceStatus -@@ -862,7 +862,7 @@ userdict /.localcsdefaults //false put - 2 copy /Generic /Category findresource /DefineResource get exec - exch pop - exch //.defaultcsnames exch .knownget { -- 1 index .definedefaultcs -+ 1 index //.definedefaultcs exec - currentglobal not { .userdict /.localcsdefaults //true put } if - } if - } bind executeonly -@@ -872,13 +872,13 @@ userdict /.localcsdefaults //false put - //.defaultcsnames 1 index .knownget { - % Stack: resname index - currentglobal { -- .undefinedefaultcs pop -+ //.undefinedefaultcs exec pop - } { - % We removed the local definition, but there might be a global one. - exch .GetInstance { -- 0 get .definedefaultcs -+ 0 get //.definedefaultcs exec - } { -- .undefinedefaultcs -+ //.undefinedefaultcs exec - } ifelse - % Recompute .localcsdefaults by scanning. This is rarely needed. - .userdict /.localcsdefaults //false //.defaultcsnames { -@@ -997,7 +997,7 @@ currentdict /.fontstatusaux .undef - /Generic /Category findresource /UndefineResource get exec - } bind executeonly - /FindResource { -- dup .getvminstance { -+ dup //.getvminstance exec { - exch pop 0 get - } { - dup ResourceStatus { -@@ -1024,7 +1024,7 @@ currentdict /.fontstatusaux .undef - % stack: name font vmused - % findfont has the prerogative of not calling definefont - % in certain obscure cases of font substitution. -- 2 index .getvminstance { -+ 2 index //.getvminstance exec { - dup 1 1 put - 2 3 -1 roll put - } { -@@ -1159,3 +1159,25 @@ end % level2dict - - %% Replace 1 (gs_resmp.ps) - (gs_resmp.ps) dup runlibfile VMDEBUG -+ -+[ -+ /.default_resource_dir -+ /.resource_dir_name -+] -+{systemdict exch .forceundef} forall -+ -+[ -+ /.definedefaultcs -+ /.undefinedefaultcs -+ /.defaultcsnames -+ /.enumerateresource -+ /.externalresourceforall -+ /.getvminstance -+ /.globalresourceforall -+ /.localresourceforall -+ /resourceforall1 -+ /.resourceexec -+ /.undefinedresource -+ /.vmused -+] -+{level2dict exch .forceundef} forall -diff --git a/Resource/Init/gs_resmp.ps b/Resource/Init/gs_resmp.ps -index 9bb4263..cb948d1 100644 ---- a/Resource/Init/gs_resmp.ps -+++ b/Resource/Init/gs_resmp.ps -@@ -230,7 +230,7 @@ currentpacking //false setpacking - } { - dup dup .map exch .knownget { % /Name /Name <<record>> - dup dup /RecordVirtualMethods get /IsActive get exec { -- 1 index .getvminstance { % /Name /Name <<record>> holder -+ 1 index //.getvminstance exec { % /Name /Name <<record>> holder - 1 get 1 eq - } { - //true -@@ -242,7 +242,7 @@ currentpacking //false setpacking - DefineResource exec % size bStatusIs1 /Name Instance - % Make ResourceStatus to return correct values for this instance : - % Hack: we replace status values in the instance holder : -- exch .getvminstance pop % size bStatusIs1 Instance holder -+ exch //.getvminstance exec pop % size bStatusIs1 Instance holder - dup 5 -1 roll 2 exch put % bStatusIs1 Instance holder - 3 2 roll { % Instance holder - 1 1 put % Instance --- -2.18.1 - diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0006.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0006.patch deleted file mode 100644 index 79e640b18..000000000 --- a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0006.patch +++ /dev/null @@ -1,596 +0,0 @@ -From 97f9052ce49e6844b06a49ff9e4b8fc1eaf6bd10 Mon Sep 17 00:00:00 2001 -From: Chris Liddell <chris.liddell@artifex.com> -Date: Wed, 9 Jan 2019 14:24:07 +0000 -Subject: [PATCH 6/7] Undefine a bunch of gs_fonts.ps specific procs - -Also reorder and add some immediate evaluation, so it still works with the -undefining. - -CVE: CVE-2019-6116 -Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] - -Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> ---- - Resource/Init/gs_dps1.ps | 3 +- - Resource/Init/gs_fonts.ps | 275 +++++++++++++++++++++----------------- - Resource/Init/gs_res.ps | 7 +- - 3 files changed, 157 insertions(+), 128 deletions(-) - -diff --git a/Resource/Init/gs_dps1.ps b/Resource/Init/gs_dps1.ps -index b75ea14..8700c8c 100644 ---- a/Resource/Init/gs_dps1.ps -+++ b/Resource/Init/gs_dps1.ps -@@ -67,7 +67,8 @@ level2dict begin - - /selectfont % <fontname> <size> selectfont - - { -- { 1 .argindex findfont -+ { -+ 1 .argindex findfont - 1 index dup type /arraytype eq { makefont } { scalefont } ifelse - setfont pop pop - } stopped { /selectfont .systemvar $error /errorname get signalerror } if -diff --git a/Resource/Init/gs_fonts.ps b/Resource/Init/gs_fonts.ps -index c13a2fc..0562235 100644 ---- a/Resource/Init/gs_fonts.ps -+++ b/Resource/Init/gs_fonts.ps -@@ -100,7 +100,7 @@ userdict /.nativeFontmap .FontDirectory maxlength dict put - { 2 index token not - { (Fontmap entry for ) print 1 index =only - ( ends prematurely! Giving up.) = flush -- {.loadFontmap} 0 get 1 .quit -+ {//.loadFontmap exec} 0 get 1 .quit - } if - dup /; eq { pop 3 index 3 1 roll .growput exit } if - pop -@@ -202,6 +202,14 @@ NOFONTPATH { /FONTPATH () def } if - { pop } - { /FONTPATH (GS_FONTPATH) getenv not { () } if def } - ifelse -+ -+% The following are dummy definitions that, if we have a FONTPATH, will -+% be replaced in the following section. -+% They are here so immediately evaulation will work, and allow them to -+% undefined at the bottom of the file. -+/.scanfontbegin{} bind def -+/.scanfontdir {} bind def -+ - FONTPATH length 0 eq { (%END FONTPATH) .skipeof } if - /FONTPATH [ FONTPATH .pathlist ] def - -@@ -242,12 +250,12 @@ FONTPATH length 0 eq { (%END FONTPATH) .skipeof } if - /.scanfontbegin - { % Construct the table of all file names already in Fontmap. - currentglobal //true setglobal -- .scanfontdict dup maxlength Fontmap length 2 add .max .setmaxlength -+ //.scanfontdict dup maxlength Fontmap length 2 add .max .setmaxlength - Fontmap - { exch pop - { dup type /stringtype eq -- { .splitfilename pop .fonttempstring copy .lowerstring cvn -- .scanfontdict exch //true put -+ { //.splitfilename exec pop //.fonttempstring copy //.lowerstring exec cvn -+ //.scanfontdict exch //true put - } - { pop - } -@@ -280,9 +288,9 @@ FONTPATH length 0 eq { (%END FONTPATH) .skipeof } if - /txt //true - .dicttomark def - /.scan1fontstring 8192 string def --% %%BeginFont: is not per Adobe documentation, but a few fonts have it. -+% BeginFont: is not per Adobe documentation, but a few fonts have it. - /.scanfontheaders [(%!PS-Adobe*) (%!FontType*) (%%BeginFont:*)] def --0 .scanfontheaders { length .max } forall 6 add % extra for PFB header -+0 //.scanfontheaders { length .max } forall 6 add % extra for PFB header - /.scan1fontfirst exch string def - /.scanfontdir % <dirname> .scanfontdir - - { currentglobal exch //true setglobal -@@ -291,10 +299,10 @@ FONTPATH length 0 eq { (%END FONTPATH) .skipeof } if - 0 0 0 4 -1 roll % found scanned files - { % stack: <fontcount> <scancount> <filecount> <filename> - exch 1 add exch % increment filecount -- dup .splitfilename .fonttempstring copy .lowerstring -+ dup //.splitfilename exec //.fonttempstring copy //.lowerstring exec - % stack: <fontcount> <scancount> <filecount+1> <filename> - % <BASE> <ext> -- .scanfontskip exch known exch .scanfontdict exch known or -+ //.scanfontskip exch known exch //.scanfontdict exch known or - { pop - % stack: <fontcount> <scancount> <filecount+1> - } -@@ -309,7 +317,7 @@ FONTPATH length 0 eq { (%END FONTPATH) .skipeof } if - % On some platforms, the file operator will open directories, - % but an error will occur if we try to read from one. - % Handle this possibility here. -- dup .scan1fontfirst { readstring } .internalstopped -+ dup //.scan1fontfirst { readstring } .internalstopped - { pop pop () } - { pop } - ifelse -@@ -322,7 +330,7 @@ FONTPATH length 0 eq { (%END FONTPATH) .skipeof } if - { dup length 6 sub 6 exch getinterval } - if - % Check for font file headers. -- //false .scanfontheaders -+ //false //.scanfontheaders - { 2 index exch .stringmatch or - } - forall exch pop -@@ -335,7 +343,7 @@ FONTPATH length 0 eq { (%END FONTPATH) .skipeof } if - { exch copystring exch - DEBUG { ( ) print dup =only flush } if - 1 index .definenativefontmap -- .splitfilename pop //true .scanfontdict 3 1 roll .growput -+ //.splitfilename exec pop //true //.scanfontdict 3 1 roll .growput - % Increment fontcount. - 3 -1 roll 1 add 3 1 roll - } -@@ -352,7 +360,7 @@ FONTPATH length 0 eq { (%END FONTPATH) .skipeof } if - } - ifelse - } -- .scan1fontstring filenameforall -+ //.scan1fontstring filenameforall - QUIET - { pop pop pop } - { ( ) print =only ( files, ) print =only ( scanned, ) print -@@ -422,7 +430,6 @@ systemdict /NONATIVEFONTMAP known .setnativefontmapbuilt - //true .setnativefontmapbuilt - } ifelse - } bind def --currentdict /.setnativefontmapbuilt .forceundef - - % Create the dictionary that registers the .buildfont procedure - % (called by definefont) for each FontType. -@@ -526,7 +533,8 @@ buildfontdict 3 /.buildfont3 cvx put - % We use this only for explicitly aliased fonts, not substituted fonts: - % we think this matches the observed behavior of Adobe interpreters. - /.aliasfont % <name> <font> .aliasfont <newFont> -- { .currentglobal 3 1 roll dup .gcheck .setglobal -+ { -+ currentglobal 3 1 roll dup gcheck setglobal - % <bool> <name> <font> - dup length 2 add dict % <bool> <name> <font> <dict> - dup 3 -1 roll % <bool> <name> <dict> <dict> <font> -@@ -541,7 +549,7 @@ buildfontdict 3 /.buildfont3 cvx put - % whose FontName is a local non-string, if someone passed a - % garbage value to findfont. In this case, just don't - % call definefont at all. -- 2 index dup type /stringtype eq exch .gcheck or 1 index .gcheck not or -+ 2 index dup type /stringtype eq exch gcheck or 1 index gcheck not or - { pop % <bool> <name> <dict> - 1 index dup type /stringtype eq { cvn } if - % <bool> <name> <dict> <name1> -@@ -566,10 +574,11 @@ buildfontdict 3 /.buildfont3 cvx put - % Don't bind in definefont, since Level 2 redefines it. - /definefont .systemvar exec - } -- { /findfont cvx {.completefont} .errorexec pop exch pop -+ { -+ /findfont cvx {.completefont} //.errorexec exec pop exch pop - } - ifelse -- exch .setglobal -+ exch setglobal - } odef % so findfont will bind it - - % Define .loadfontfile for loading a font. If we recognize Type 1 and/or -@@ -669,10 +678,19 @@ buildfontdict 3 /.buildfont3 cvx put - [(Cn) 4] [(Cond) 4] [(Narrow) 4] [(Pkg) 4] [(Compr) 4] - [(Serif) 8] [(Sans) -8] - ] readonly def -+ -+/.fontnamestring { % <fontname> .fontnamestring <string|name> -+ dup type dup /nametype eq { -+ pop .namestring -+ } { -+ /stringtype ne { pop () } if -+ } ifelse -+} bind def -+ - /.fontnameproperties { % <int> <string|name> .fontnameproperties - % <int'> -- .fontnamestring -- .substituteproperties { -+ //.fontnamestring exec -+ //.substituteproperties { - 2 copy 0 get search { - pop pop pop dup length 1 sub 1 exch getinterval 3 -1 roll exch { - dup 0 ge { or } { neg not and } ifelse -@@ -710,13 +728,7 @@ buildfontdict 3 /.buildfont3 cvx put - % <other> .nametostring <other> - dup type /nametype eq { .namestring } if - } bind def --/.fontnamestring { % <fontname> .fontnamestring <string|name> -- dup type dup /nametype eq { -- pop .namestring -- } { -- /stringtype ne { pop () } if -- } ifelse --} bind def -+ - /.substitutefontname { % <fontname> <properties> .substitutefontname - % <altname|null> - % Look for properties and/or a face name in the font name. -@@ -724,7 +736,7 @@ buildfontdict 3 /.buildfont3 cvx put - % base font; otherwise, use the default font. - % Note that the "substituted" font name may be the same as - % the requested one; the caller must check this. -- exch .fontnamestring { -+ exch //.fontnamestring exec { - defaultfontname /Helvetica-Oblique /Helvetica-Bold /Helvetica-BoldOblique - /Helvetica-Narrow /Helvetica-Narrow-Oblique - /Helvetica-Narrow-Bold /Helvetica-Narrow-BoldOblique -@@ -734,12 +746,12 @@ buildfontdict 3 /.buildfont3 cvx put - } 3 1 roll - % Stack: facelist properties fontname - % Look for a face name. -- .substitutefaces { -+ //.substitutefaces { - 2 copy 0 get search { - pop pop pop - % Stack: facelist properties fontname [(pattern) family properties] - dup 2 get 4 -1 roll or 3 1 roll -- 1 get .substitutefamilies exch get -+ 1 get //.substitutefamilies exch get - 4 -1 roll pop 3 1 roll - } { - pop pop -@@ -748,7 +760,7 @@ buildfontdict 3 /.buildfont3 cvx put - 1 index length mod get exec - } bind def - /.substitutefont { % <fontname> .substitutefont <altname> -- dup 0 exch .fontnameproperties .substitutefontname -+ dup 0 exch //.fontnameproperties exec .substitutefontname - % Only accept fonts known in the Fontmap. - Fontmap 1 index known not - { -@@ -814,7 +826,7 @@ FAKEFONTS not { (%END FAKEFONTS) .skipeof } if - counttomark 1 sub { .aliasfont } repeat end - % <fontname> mark <font> - exch pop exch pop --} odef -+} bind odef - /findfont { - .findfont - } bind def -@@ -860,7 +872,7 @@ FAKEFONTS not { (%END FAKEFONTS) .skipeof } if - } { - dup .substitutefont - 2 copy eq { pop defaultfontname } if -- .checkalias -+ //.checkalias exec - QUIET not { - SHORTERRORS { - (%%[) print 1 index =only -@@ -886,8 +898,8 @@ $error /SubstituteFont { } put - //null 0 1 FONTPATH length 1 sub { - FONTPATH 1 index get //null ne { exch pop exit } if pop - } for dup //null ne { -- dup 0 eq { .scanfontbegin } if -- FONTPATH 1 index get .scanfontdir -+ dup 0 eq { //.scanfontbegin exec} if -+ FONTPATH 1 index get //.scanfontdir exec - FONTPATH exch //null put //true - } { - pop //false -@@ -897,11 +909,10 @@ $error /SubstituteFont { } put - % scanning of FONTPATH. - /.dofindfont { % mark <fontname> .dofindfont % mark <alias> ... <font> - .tryfindfont not { -- - % We didn't find the font. If we haven't scanned - % all the directories in FONTPATH, scan the next one - % now and look for the font again. -- .scannextfontdir { -+ //.scannextfontdir exec { - % Start over with an empty alias list. - counttomark 1 sub { pop } repeat % mark <fontname> - .dofindfont -@@ -927,6 +938,7 @@ $error /SubstituteFont { } put - } if - % Substitute for the font. Don't alias. - % Same stack as at the beginning of .dofindfont. -+ - $error /SubstituteFont get exec - % - % igorm: I guess the surrounding code assumes that .stdsubstfont -@@ -935,72 +947,11 @@ $error /SubstituteFont { } put - % used in .dofindfont and through .stdsubstfont - % just to represent a simple iteration, - % which accumulates the aliases after the mark. -- .stdsubstfont -+ //.stdsubstfont exec - } ifelse - } ifelse - } if - } bind def --% Try to find a font using only the present contents of Fontmap. --/.tryfindfont { % <fontname> .tryfindfont <font> true -- % <fontname> .tryfindfont false -- //.FontDirectory 1 index .fontknownget -- { % Already loaded -- exch pop //true -- } -- { -- dup Fontmap exch .knownget -- { //true //true } -- { % Unknown font name. Look for a file with the -- % same name as the requested font. -- dup .tryloadfont -- { exch pop //true //false } -- { -- % if we can't load by name check the native font map -- dup .nativeFontmap exch .knownget -- { //true //true } -- { //false //false } ifelse -- } ifelse -- } ifelse -- -- { % Try each element of the Fontmap in turn. -- pop -- //false exch % (in case we exhaust the list) -- % Stack: fontname false fontmaplist -- { exch pop -- dup type /nametype eq -- { % Font alias -- .checkalias .tryfindfont exit -- } -- { dup dup type dup /arraytype eq exch /packedarraytype eq or exch xcheck and -- { % Font with a procedural definition -- exec % The procedure will load the font. -- % Check to make sure this really happened. -- //.FontDirectory 1 index .knownget -- { exch pop //true exit } -- if -- } -- { % Font file name -- //true .loadfontloop { //true exit } if -- } -- ifelse -- } -- ifelse //false -- } -- forall -- % Stack: font true -or- fontname false -- { //true -- } -- { % None of the Fontmap entries worked. -- % Try loading a file with the same name -- % as the requested font. -- .tryloadfont -- } -- ifelse -- } -- if -- } -- ifelse -- } bind def - - % any user of .putgstringcopy must use bind and executeonly - /.putgstringcopy % <dict> <name> <string> .putgstringcopy - -@@ -1014,25 +965,6 @@ $error /SubstituteFont { } put - } executeonly ifelse - } .bind executeonly odef % must be bound and hidden for .forceput - --% Attempt to load a font from a file. --/.tryloadfont { % <fontname> .tryloadfont <font> true -- % <fontname> .tryloadfont false -- dup .nametostring -- % Hack: check for the presence of the resource machinery. -- /.genericrfn where { -- pop -- pop dup .fonttempstring /FontResourceDir getsystemparam .genericrfn -- {//false .loadfontloop} .internalstopped {//false} if { -- //true -- } { -- dup .nametostring -- {//true .loadfontloop} .internalstopped {//false} if -- } ifelse -- } { -- {//true .loadfontloop} .internalstopped {//false} if -- } ifelse --} bind def -- - /.loadfontloop { % <fontname> <filename> <libflag> .loadfontloop - % <font> true - % -or- -@@ -1102,7 +1034,7 @@ $error /SubstituteFont { } put - } if - - % Check to make sure the font was actually loaded. -- dup 3 index .fontknownget -+ dup 3 index //.fontknownget exec - { dup /PathLoad 4 index .putgstringcopy - 4 1 roll pop pop pop //true exit - } executeonly if -@@ -1113,7 +1045,7 @@ $error /SubstituteFont { } put - exch dup % Stack: origfontname fontdirectory path path - (r) file .findfontname - { % Stack: origfontname fontdirectory path filefontname -- 2 index 1 index .fontknownget -+ 2 index 1 index //.fontknownget exec - { % Yes. Stack: origfontname fontdirectory path filefontname fontdict - dup 4 -1 roll /PathLoad exch .putgstringcopy - % Stack: origfontname fontdirectory filefontname fontdict -@@ -1136,7 +1068,7 @@ $error /SubstituteFont { } put - % Stack: fontdict - } executeonly - if pop % Stack: origfontname fontdirectory path -- } -+ } executeonly - if pop pop % Stack: origfontname - - % The font definitely did not load correctly. -@@ -1150,7 +1082,87 @@ $error /SubstituteFont { } put - - } bind executeonly odef % must be bound and hidden for .putgstringcopy - --currentdict /.putgstringcopy .undef -+% Attempt to load a font from a file. -+/.tryloadfont { % <fontname> .tryloadfont <font> true -+ % <fontname> .tryloadfont false -+ dup //.nametostring exec -+ % Hack: check for the presence of the resource machinery. -+ /.genericrfn where { -+ pop -+ pop dup //.fonttempstring /FontResourceDir getsystemparam .genericrfn -+ {//false .loadfontloop} .internalstopped {//false} if { -+ //true -+ } { -+ dup //.nametostring exec -+ {//true .loadfontloop} .internalstopped {//false} if -+ } ifelse -+ } { -+ {//true .loadfontloop} .internalstopped {//false} if -+ } ifelse -+} bind def -+ -+% Try to find a font using only the present contents of Fontmap. -+/.tryfindfont { % <fontname> .tryfindfont <font> true -+ % <fontname> .tryfindfont false -+ //.FontDirectory 1 index //.fontknownget exec -+ { % Already loaded -+ exch pop //true -+ } -+ { -+ dup Fontmap exch .knownget -+ { //true //true } -+ { % Unknown font name. Look for a file with the -+ % same name as the requested font. -+ dup //.tryloadfont exec -+ { exch pop //true //false } -+ { -+ % if we can't load by name check the native font map -+ dup .nativeFontmap exch .knownget -+ { //true //true } -+ { //false //false } ifelse -+ } ifelse -+ } ifelse -+ -+ { % Try each element of the Fontmap in turn. -+ pop -+ //false exch % (in case we exhaust the list) -+ % Stack: fontname false fontmaplist -+ { exch pop -+ dup type /nametype eq -+ { % Font alias -+ //.checkalias exec -+ .tryfindfont exit -+ } -+ { dup dup type dup /arraytype eq exch /packedarraytype eq or exch xcheck and -+ { % Font with a procedural definition -+ exec % The procedure will load the font. -+ % Check to make sure this really happened. -+ //.FontDirectory 1 index .knownget -+ { exch pop //true exit } -+ if -+ } -+ { % Font file name -+ //true .loadfontloop { //true exit } if -+ } -+ ifelse -+ } -+ ifelse //false -+ } -+ forall -+ % Stack: font true -or- fontname false -+ { //true -+ } -+ { % None of the Fontmap entries worked. -+ % Try loading a file with the same name -+ % as the requested font. -+ //.tryloadfont exec -+ } -+ ifelse -+ } -+ if -+ } -+ ifelse -+ } bind def - - % Define a procedure to load all known fonts. - % This isn't likely to be very useful. -@@ -1192,9 +1204,9 @@ FAKEFONTS { exch } if pop def % don't bind, .current/setglobal get redefined - /.loadinitialfonts - { NOFONTMAP not - { /FONTMAP where -- { pop [ FONTMAP .pathlist ] -+ { pop [ FONTMAP //.pathlist exec] - { dup VMDEBUG findlibfile -- { exch pop .loadFontmap } -+ { exch pop //.loadFontmap exec } - { /undefinedfilename signalerror } - ifelse - } -@@ -1208,7 +1220,7 @@ FAKEFONTS { exch } if pop def % don't bind, .current/setglobal get redefined - pop pop - defaultfontmap_content { .definefontmap } forall - } { -- .loadFontmap -+ //.loadFontmap exec - } ifelse - } { - pop pop -@@ -1272,3 +1284,18 @@ FAKEFONTS { exch } if pop def % don't bind, .current/setglobal get redefined - { .makemodifiedfont - dup /FontName get exch definefont pop - } bind def -+ -+% Undef these, not needed outside this file -+[ -+ % /.fonttempstring /.scannextfontdir - are also used in gs_res.ps, so are undefined there -+ % /.fontnameproperties - is used in pdf_font.ps -+ % /.scanfontheaders - used in gs_cff.ps, gs_ttf.ps -+ /.loadfontloop /.tryloadfont /.findfont /.pathlist /.loadFontmap /.lowerstring -+ /.splitfilename /.scanfontdict /.scanfontbegin -+ /.scanfontskip /.scan1fontstring -+ /.scan1fontfirst /.scanfontdir -+ /.setnativefontmapbuilt /.aliasfont -+ /.setloadingfont /.substitutefaces /.substituteproperties /.substitutefamilies -+ /.nametostring /.fontnamestring /.checkalias /.fontknownget /.stdsubstfont -+ /.putgstringcopy -+] {systemdict exch .forceundef} forall -diff --git a/Resource/Init/gs_res.ps b/Resource/Init/gs_res.ps -index 18d5452..b016113 100644 ---- a/Resource/Init/gs_res.ps -+++ b/Resource/Init/gs_res.ps -@@ -961,7 +961,7 @@ userdict /.localcsdefaults //false put - dup type /nametype eq { .namestring } if - dup type /stringtype ne { //false exit } if - % Check the resource directory. -- dup .fonttempstring /FontResourceDir getsystemparam .genericrfn -+ dup //.fonttempstring /FontResourceDir getsystemparam .genericrfn - status { - pop pop pop pop //true exit - } if -@@ -969,7 +969,7 @@ userdict /.localcsdefaults //false put - % as the font. - findlibfile { closefile //true exit } if - % Scan a FONTPATH directory and try again. -- .scannextfontdir not { //false exit } if -+ //.scannextfontdir exec not { //false exit } if - } loop - } bind def - -@@ -1008,7 +1008,7 @@ currentdict /.fontstatusaux .undef - } ifelse - } bind executeonly - /ResourceForAll { -- { .scannextfontdir not { exit } if } loop -+ { //.scannextfontdir exec not { exit } if } loop - /Generic /Category findresource /ResourceForAll get exec - } bind executeonly - /.ResourceFileStatus { -@@ -1163,6 +1163,7 @@ end % level2dict - [ - /.default_resource_dir - /.resource_dir_name -+ /.fonttempstring /.scannextfontdir % from gs_fonts.ps - ] - {systemdict exch .forceundef} forall - --- -2.18.1 - diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0007.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0007.patch deleted file mode 100644 index 5c1f83959..000000000 --- a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0007.patch +++ /dev/null @@ -1,346 +0,0 @@ -From 5c49efe24dda0f2dbd2a09b9159e683cce99b6d8 Mon Sep 17 00:00:00 2001 -From: Chris Liddell <chris.liddell@artifex.com> -Date: Fri, 11 Jan 2019 13:36:36 +0000 -Subject: [PATCH 7/7] Remove .forcedef, and harden .force* ops more - -Remove .forcedef and replace all uses with a direct call to .forceput instead. - -Ensure every procedure (named and trasient) that calls .forceput is -executeonly. - -CVE: CVE-2019-6116 -Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] - -Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> ---- - Resource/Init/gs_dps1.ps | 15 +++++++----- - Resource/Init/gs_init.ps | 28 ++++++++------------- - Resource/Init/gs_lev2.ps | 51 +++++++++++++++++++-------------------- - Resource/Init/gs_ll3.ps | 5 ++-- - Resource/Init/gs_res.ps | 29 +++++++++++----------- - Resource/Init/gs_statd.ps | 4 +-- - 6 files changed, 63 insertions(+), 69 deletions(-) - -diff --git a/Resource/Init/gs_dps1.ps b/Resource/Init/gs_dps1.ps -index 8700c8c..3d2cf7a 100644 ---- a/Resource/Init/gs_dps1.ps -+++ b/Resource/Init/gs_dps1.ps -@@ -33,14 +33,17 @@ systemdict begin - - /SharedFontDirectory .FontDirectory .gcheck - { .currentglobal //false .setglobal -+ currentdict - /LocalFontDirectory .FontDirectory dup maxlength dict copy -- .forcedef % LocalFontDirectory is local, systemdict is global -+ .forceput % LocalFontDirectory is local, systemdict is global - .setglobal .FontDirectory -- } -- { /LocalFontDirectory .FontDirectory -- .forcedef % LocalFontDirectory is local, systemdict is global -+ } executeonly -+ { -+ currentdict -+ /LocalFontDirectory .FontDirectory -+ .forceput % LocalFontDirectory is local, systemdict is global - 50 dict -- } -+ }executeonly - ifelse def - - end % systemdict -@@ -55,7 +58,7 @@ level2dict begin - { //SharedFontDirectory } - { /LocalFontDirectory .systemvar } % can't embed ref to local VM - ifelse .forceput pop % LocalFontDirectory is local, systemdict is global -- } .bind odef -+ } .bind executeonly odef - % Don't just copy (load) the definition of .setglobal: - % it gets redefined for LL3. - /setshared { /.setglobal .systemvar exec } odef -diff --git a/Resource/Init/gs_init.ps b/Resource/Init/gs_init.ps -index d9a0829..45bebf4 100644 ---- a/Resource/Init/gs_init.ps -+++ b/Resource/Init/gs_init.ps -@@ -54,7 +54,7 @@ systemdict exch - dup /userdict - currentdict dup 200 .setmaxlength % userdict - .forceput % userdict is local, systemdict is global -- } -+ } executeonly - if begin - - % Define dummy local/global operators if needed. -@@ -299,13 +299,6 @@ QUIET not { printgreeting flush } if - 1 index exch .makeoperator def - } .bind def - --% Define a special version of def for storing local objects into global --% dictionaries. Like .forceput, this exists only during initialization. --/.forcedef { % <key> <value> .forcedef - -- 1 .argindex pop % check # of args -- currentdict 3 1 roll .forceput --} .bind odef -- - % Define procedures for accessing variables in systemdict and userdict - % regardless of the contents of the dictionary stack. - /.systemvar { % <name> .systemvar <value> -@@ -347,7 +340,7 @@ DELAYBIND - } - ifelse - } .bind def --} if -+} executeonly if - - %**************** BACKWARD COMPATIBILITY **************** - /hwsizedict mark /HWSize //null .dicttomark readonly def -@@ -655,7 +648,7 @@ currentdict /.typenames .undef - /ifelse .systemvar - ] cvx executeonly - exch .setglobal --} odef -+} executeonly odef - systemdict /internaldict dup .makeinternaldict .makeoperator - .forceput % proc is local, systemdict is global - -@@ -1093,7 +1086,7 @@ def - - % Define $error. This must be in local VM. - .currentglobal //false .setglobal --/$error 40 dict .forcedef % $error is local, systemdict is global -+currentdict /$error 40 dict .forceput % $error is local, systemdict is global - % newerror, errorname, command, errorinfo, - % ostack, estack, dstack, recordstacks, - % binary, globalmode, -@@ -1112,8 +1105,8 @@ end - % Define errordict similarly. It has one entry per error name, - % plus handleerror. However, some astonishingly badly written PostScript - % files require it to have at least one empty slot. --/errordict ErrorNames length 3 add dict --.forcedef % errordict is local, systemdict is global -+currentdict /errordict ErrorNames length 3 add dict -+.forceput % errordict is local, systemdict is global - .setglobal % back to global VM - % gserrordict contains all the default error handling methods, but unlike - % errordict it is noaccess after creation (also it is in global VM). -@@ -1273,8 +1266,9 @@ end - (END PROCS) VMDEBUG - - % Define the font directory. -+currentdict - /FontDirectory //false .setglobal 100 dict //true .setglobal --.forcedef % FontDirectory is local, systemdict is global -+.forceput % FontDirectory is local, systemdict is global - - % Define the encoding dictionary. - /EncodingDirectory 16 dict def % enough for Level 2 + PDF standard encodings -@@ -2333,7 +2327,6 @@ SAFER { .setsafeglobal } if - //systemdict /UndefinePostScriptOperators get exec - //systemdict /UndefinePDFOperators get exec - //systemdict /.forcecopynew .forceundef % remove temptation -- //systemdict /.forcedef .forceundef % ditto - //systemdict /.forceput .forceundef % ditto - //systemdict /.undef .forceundef % ditto - //systemdict /.forceundef .forceundef % ditto -@@ -2368,9 +2361,9 @@ SAFER { .setsafeglobal } if - % (and, if implemented, context switching). - .currentglobal //false .setglobal - mark userparams { } forall .dicttomark readonly -- /userparams exch .forcedef % systemdict is read-only -+ currentdict exch /userparams exch .forceput % systemdict is read-only - .setglobal --} if -+} executeonly if - /.currentsystemparams where { - pop - % Remove real system params from pssystemparams. -@@ -2458,7 +2451,6 @@ end - DELAYBIND not { - systemdict /.bindnow .undef % We only need this for DELAYBIND - systemdict /.forcecopynew .undef % remove temptation -- systemdict /.forcedef .undef % ditto - systemdict /.forceput .undef % ditto - systemdict /.forceundef .undef % ditto - } if -diff --git a/Resource/Init/gs_lev2.ps b/Resource/Init/gs_lev2.ps -index 0f0d573..9c0c3a6 100644 ---- a/Resource/Init/gs_lev2.ps -+++ b/Resource/Init/gs_lev2.ps -@@ -304,31 +304,30 @@ end - psuserparams exch /.checkFilePermitparams load put - .setglobal - --pssystemparams begin -- /CurDisplayList 0 .forcedef -- /CurFormCache 0 .forcedef -- /CurInputDevice () .forcedef -- /CurOutlineCache 0 .forcedef -- /CurOutputDevice () .forcedef -- /CurPatternCache 0 .forcedef -- /CurUPathCache 0 .forcedef -- /CurScreenStorage 0 .forcedef -- /CurSourceList 0 .forcedef -- /DoPrintErrors //false .forcedef -- /JobTimeout 0 .forcedef -- /LicenseID (LN-001) .forcedef % bogus -- /MaxDisplayList 140000 .forcedef -- /MaxFormCache 100000 .forcedef -- /MaxImageBuffer 524288 .forcedef -- /MaxOutlineCache 65000 .forcedef -- /MaxPatternCache 100000 .forcedef -- /MaxUPathCache 300000 .forcedef -- /MaxScreenStorage 84000 .forcedef -- /MaxSourceList 25000 .forcedef -- /PrinterName product .forcedef -- /RamSize 4194304 .forcedef -- /WaitTimeout 40 .forcedef --end -+pssystemparams -+dup /CurDisplayList 0 .forceput -+dup /CurFormCache 0 .forceput -+dup /CurInputDevice () .forceput -+dup /CurOutlineCache 0 .forceput -+dup /CurOutputDevice () .forceput -+dup /CurPatternCache 0 .forceput -+dup /CurUPathCache 0 .forceput -+dup /CurScreenStorage 0 .forceput -+dup /CurSourceList 0 .forceput -+dup /DoPrintErrors //false .forceput -+dup /JobTimeout 0 .forceput -+dup /LicenseID (LN-001) .forceput % bogus -+dup /MaxDisplayList 140000 .forceput -+dup /MaxFormCache 100000 .forceput -+dup /MaxImageBuffer 524288 .forceput -+dup /MaxOutlineCache 65000 .forceput -+dup /MaxPatternCache 100000 .forceput -+dup /MaxUPathCache 300000 .forceput -+dup /MaxScreenStorage 84000 .forceput -+dup /MaxSourceList 25000 .forceput -+dup /PrinterName product .forceput -+dup /RamSize 4194304 .forceput -+ /WaitTimeout 40 .forceput - - % Define the procedures for handling comment scanning. The names - % %ProcessComment and %ProcessDSCComment are known to the interpreter. -@@ -710,7 +709,7 @@ pop % currentsystemparams - /statusdict currentdict def - - currentdict end --/statusdict exch .forcedef % statusdict is local, systemdict is global -+currentdict exch /statusdict exch .forceput % statusdict is local, systemdict is global - - % The following compatibility operators are in systemdict. They are - % defined here, rather than in gs_init.ps, because they require the -diff --git a/Resource/Init/gs_ll3.ps b/Resource/Init/gs_ll3.ps -index c86721f..881af44 100644 ---- a/Resource/Init/gs_ll3.ps -+++ b/Resource/Init/gs_ll3.ps -@@ -521,9 +521,8 @@ end - % Define additional user and system parameters. - /HalftoneMode 0 .definepsuserparam - /MaxSuperScreen 1016 .definepsuserparam --pssystemparams begin % read-only, so use .forcedef -- /MaxDisplayAndSourceList 160000 .forcedef --end -+% read-only, so use .forceput -+pssystemparams /MaxDisplayAndSourceList 160000 .forceput - - % Define the IdiomSet resource category. - { /IdiomSet } { -diff --git a/Resource/Init/gs_res.ps b/Resource/Init/gs_res.ps -index b016113..89c0ed6 100644 ---- a/Resource/Init/gs_res.ps -+++ b/Resource/Init/gs_res.ps -@@ -41,10 +41,10 @@ level2dict begin - % However, Ed Taft of Adobe says their interpreters don't implement this - % either, so we aren't going to worry about it for a while. - --currentglobal //false setglobal systemdict begin -- /localinstancedict 5 dict -- .forcedef % localinstancedict is local, systemdict is global --end //true setglobal -+currentglobal //false setglobal -+ systemdict /localinstancedict 5 dict -+ .forceput % localinstancedict is local, systemdict is global -+//true setglobal - /.emptydict 0 dict readonly def - setglobal - -@@ -149,7 +149,7 @@ setglobal - dup [ exch 0 -1 ] exch - .Instances 4 2 roll put - % Make the Category dictionary read-only. We will have to -- % use .forceput / .forcedef later to replace the dummy, -+ % use .forceput / .forceput later to replace the dummy, - % empty .Instances dictionary with the real one later. - readonly - }{ -@@ -304,7 +304,8 @@ systemdict begin - dup () ne { - .file_name_directory_separator concatstrings - } if -- 2 index exch //false .file_name_combine not { -+ 2 index exch //false -+ .file_name_combine not { - (Error: .default_resource_dir returned ) print exch print ( that can't combine with ) print = - /.default_resource_dir cvx /configurationerror signalerror - } if -@@ -317,14 +318,14 @@ currentdict /pssystemparams known not { - pssystemparams begin - //.default_resource_dir exec - /FontResourceDir (Font) //.resource_dir_name exec -- readonly .forcedef % pssys'params is r-o -+ readonly currentdict 3 1 roll .forceput % pssys'params is r-o - /GenericResourceDir () //.resource_dir_name exec -- readonly .forcedef % pssys'params is r-o -+ readonly currentdict 3 1 roll .forceput % pssys'params is r-o - pop % .default_resource_dir - /GenericResourcePathSep -- .file_name_separator readonly .forcedef % pssys'params is r-o -- (%diskFontResourceDir) cvn (/Resource/Font/) readonly .forcedef % pssys'params is r-o -- (%diskGenericResourceDir) cvn (/Resource/) readonly .forcedef % pssys'params is r-o -+ .file_name_separator readonly currentdict 3 1 roll .forceput % pssys'params is r-o -+ currentdict (%diskFontResourceDir) cvn (/Resource/Font/) readonly .forceput % pssys'params is r-o -+ currentdict (%diskGenericResourceDir) cvn (/Resource/) readonly .forceput % pssys'params is r-o - end - end - -@@ -422,8 +423,8 @@ status { - .Instances dup //.emptydict eq { - pop 3 dict - % As noted above, Category dictionaries are read-only, -- % so we have to use .forcedef here. -- /.Instances 1 index .forcedef % Category dict is read-only -+ % so we have to use .forceput here. -+ currentdict /.Instances 2 index .forceput % Category dict is read-only - } executeonly if - } - { .LocalInstances dup //.emptydict eq -@@ -441,7 +442,7 @@ status { - { /defineresource cvx /typecheck signaloperror - } - ifelse --} .bind executeonly .makeoperator % executeonly to prevent access to .forcedef -+} .bind executeonly .makeoperator % executeonly to prevent access to .forceput - /UndefineResource - { { dup 2 index .knownget - { dup 1 get 1 ge -diff --git a/Resource/Init/gs_statd.ps b/Resource/Init/gs_statd.ps -index 20d4c96..b6a7659 100644 ---- a/Resource/Init/gs_statd.ps -+++ b/Resource/Init/gs_statd.ps -@@ -21,10 +21,10 @@ systemdict begin - % We make statusdict a little larger for Level 2 stuff. - % Note that it must be allocated in local VM. - .currentglobal //false .setglobal -- /statusdict 91 dict .forcedef % statusdict is local, sys'dict global -+ currentdict /statusdict 91 dict .forceput % statusdict is local, sys'dict global - % To support the Level 2 job control features, - % serverdict must also be in local VM. -- /serverdict 10 dict .forcedef % serverdict is local, sys'dict global -+ currentdict /serverdict 10 dict .forceput % serverdict is local, sys'dict global - .setglobal - end - --- -2.18.1 - diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript_9.26.bb b/poky/meta/recipes-extended/ghostscript/ghostscript_9.26.bb index ad4c5e17d..5ca978f86 100644 --- a/poky/meta/recipes-extended/ghostscript/ghostscript_9.26.bb +++ b/poky/meta/recipes-extended/ghostscript/ghostscript_9.26.bb @@ -32,13 +32,6 @@ SRC_URI = "${SRC_URI_BASE} \ file://ghostscript-9.02-genarch.patch \ file://objarch.h \ file://cups-no-gcrypt.patch \ - file://CVE-2019-6116-0001.patch \ - file://CVE-2019-6116-0002.patch \ - file://CVE-2019-6116-0003.patch \ - file://CVE-2019-6116-0004.patch \ - file://CVE-2019-6116-0005.patch \ - file://CVE-2019-6116-0006.patch \ - file://CVE-2019-6116-0007.patch \ " SRC_URI_class-native = "${SRC_URI_BASE} \ diff --git a/poky/meta/recipes-extended/grep/grep/0001-Unset-need_charset_alias-when-building-for-musl.patch b/poky/meta/recipes-extended/grep/grep/0001-Unset-need_charset_alias-when-building-for-musl.patch deleted file mode 100644 index ba1a4bab4..000000000 --- a/poky/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: Pending - -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/poky/meta/recipes-extended/grep/grep_3.1.bb b/poky/meta/recipes-extended/grep/grep_3.3.bb index 71810dc65..704a3ecd0 100644 --- a/poky/meta/recipes-extended/grep/grep_3.1.bb +++ b/poky/meta/recipes-extended/grep/grep_3.3.bb @@ -3,14 +3,12 @@ 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" +LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464" -SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz \ - file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ - " +SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz" -SRC_URI[md5sum] = "feca7b3e7c7f4aab2b42ecbfc513b070" -SRC_URI[sha256sum] = "db625c7ab3bb3ee757b3926a5cfa8d9e1c3991ad24707a83dde8a5ef2bf7a07e" +SRC_URI[md5sum] = "05d0718a1b7cc706a4bdf8115363f1ed" +SRC_URI[sha256sum] = "b960541c499619efd6afe1fa795402e4733c8e11ebf9fafccc0bb4bccdc5b514" inherit autotools gettext texinfo pkgconfig diff --git a/poky/meta/recipes-extended/gzip/gzip-1.9/wrong-path-fix.patch b/poky/meta/recipes-extended/gzip/gzip-1.10/wrong-path-fix.patch index 7c37bc8d2..7c37bc8d2 100644 --- a/poky/meta/recipes-extended/gzip/gzip-1.9/wrong-path-fix.patch +++ b/poky/meta/recipes-extended/gzip/gzip-1.10/wrong-path-fix.patch diff --git a/poky/meta/recipes-extended/gzip/gzip-1.9/gnulib.patch b/poky/meta/recipes-extended/gzip/gzip-1.9/gnulib.patch deleted file mode 100644 index c3cdd72b6..000000000 --- a/poky/meta/recipes-extended/gzip/gzip-1.9/gnulib.patch +++ /dev/null @@ -1,189 +0,0 @@ -From 1831628c0630ae96a43586b2a25ca51cbdba3e53 Mon Sep 17 00:00:00 2001 -From: Paul Eggert <address@hidden> -Date: Mon, 5 Mar 2018 10:56:29 -0800 -Subject: [PATCH] fflush: adjust to glibc 2.28 libio.h removal -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Problem reported by Daniel P. Berrangé in: -https://lists.gnu.org/r/bug-gnulib/2018-03/msg00000.html -* lib/fbufmode.c (fbufmode): -* lib/fflush.c (clear_ungetc_buffer_preserving_position) -(disable_seek_optimization, rpl_fflush): -* lib/fpending.c (__fpending): -* lib/fpurge.c (fpurge): -* lib/freadable.c (freadable): -* lib/freadahead.c (freadahead): -* lib/freading.c (freading): -* lib/freadptr.c (freadptr): -* lib/freadseek.c (freadptrinc): -* lib/fseeko.c (fseeko): -* lib/fseterr.c (fseterr): -* lib/fwritable.c (fwritable): -* lib/fwriting.c (fwriting): -Check _IO_EOF_SEEN instead of _IO_ftrylockfile. -* lib/stdio-impl.h (_IO_IN_BACKUP) [_IO_EOF_SEEN]: -Define if not already defined. ---- - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> - - ChangeLog | 23 +++++++++++++++++++++++ - lib/fbufmode.c | 2 +- - lib/fflush.c | 6 +++--- - lib/fpending.c | 2 +- - lib/fpurge.c | 2 +- - lib/freadable.c | 2 +- - lib/freadahead.c | 2 +- - lib/freading.c | 2 +- - lib/freadptr.c | 2 +- - lib/freadseek.c | 2 +- - lib/fseeko.c | 4 ++-- - lib/fseterr.c | 2 +- - lib/fwritable.c | 2 +- - lib/fwriting.c | 2 +- - lib/stdio-impl.h | 6 ++++++ - 15 files changed, 45 insertions(+), 16 deletions(-) - -Index: gzip-1.9/ChangeLog -=================================================================== ---- gzip-1.9.orig/ChangeLog -+++ gzip-1.9/ChangeLog -@@ -1,3 +1,26 @@ -+2018-03-05 Paul Eggert <address@hidden> -+ -+ fflush: adjust to glibc 2.28 libio.h removal -+ Problem reported by Daniel P. Berrangé in: -+ https://lists.gnu.org/r/bug-gnulib/2018-03/msg00000.html -+ * lib/fbufmode.c (fbufmode): -+ * lib/fflush.c (clear_ungetc_buffer_preserving_position) -+ (disable_seek_optimization, rpl_fflush): -+ * lib/fpending.c (__fpending): -+ * lib/fpurge.c (fpurge): -+ * lib/freadable.c (freadable): -+ * lib/freadahead.c (freadahead): -+ * lib/freading.c (freading): -+ * lib/freadptr.c (freadptr): -+ * lib/freadseek.c (freadptrinc): -+ * lib/fseeko.c (fseeko): -+ * lib/fseterr.c (fseterr): -+ * lib/fwritable.c (fwritable): -+ * lib/fwriting.c (fwriting): -+ Check _IO_EOF_SEEN instead of _IO_ftrylockfile. -+ * lib/stdio-impl.h (_IO_IN_BACKUP) [_IO_EOF_SEEN]: -+ Define if not already defined. -+ - 2018-01-07 Jim Meyering <meyering@fb.com> - - version 1.9 -Index: gzip-1.9/lib/fflush.c -=================================================================== ---- gzip-1.9.orig/lib/fflush.c -+++ gzip-1.9/lib/fflush.c -@@ -33,7 +33,7 @@ - #undef fflush - - --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - - /* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */ - static void -@@ -72,7 +72,7 @@ clear_ungetc_buffer (FILE *fp) - - #endif - --#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) -+#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) - - # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT - /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ -@@ -148,7 +148,7 @@ rpl_fflush (FILE *stream) - if (stream == NULL || ! freading (stream)) - return fflush (stream); - --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - - clear_ungetc_buffer_preserving_position (stream); - -Index: gzip-1.9/lib/fpurge.c -=================================================================== ---- gzip-1.9.orig/lib/fpurge.c -+++ gzip-1.9/lib/fpurge.c -@@ -62,7 +62,7 @@ fpurge (FILE *fp) - /* Most systems provide FILE as a struct and the necessary bitmask in - <stdio.h>, because they need it for implementing getc() and putc() as - fast macros. */ --# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - fp->_IO_read_end = fp->_IO_read_ptr; - fp->_IO_write_ptr = fp->_IO_write_base; - /* Avoid memory leak when there is an active ungetc buffer. */ -Index: gzip-1.9/lib/freading.c -=================================================================== ---- gzip-1.9.orig/lib/freading.c -+++ gzip-1.9/lib/freading.c -@@ -31,7 +31,7 @@ freading (FILE *fp) - /* Most systems provide FILE as a struct and the necessary bitmask in - <stdio.h>, because they need it for implementing getc() and putc() as - fast macros. */ --# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - return ((fp->_flags & _IO_NO_WRITES) != 0 - || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0 - && fp->_IO_read_base != NULL)); -Index: gzip-1.9/lib/fseeko.c -=================================================================== ---- gzip-1.9.orig/lib/fseeko.c -+++ gzip-1.9/lib/fseeko.c -@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int when - #endif - - /* These tests are based on fpurge.c. */ --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - if (fp->_IO_read_end == fp->_IO_read_ptr - && fp->_IO_write_ptr == fp->_IO_write_base - && fp->_IO_save_base == NULL) -@@ -123,7 +123,7 @@ fseeko (FILE *fp, off_t offset, int when - return -1; - } - --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - fp->_flags &= ~_IO_EOF_SEEN; - fp->_offset = pos; - #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ -Index: gzip-1.9/lib/fseterr.c -=================================================================== ---- gzip-1.9.orig/lib/fseterr.c -+++ gzip-1.9/lib/fseterr.c -@@ -29,7 +29,7 @@ fseterr (FILE *fp) - /* Most systems provide FILE as a struct and the necessary bitmask in - <stdio.h>, because they need it for implementing getc() and putc() as - fast macros. */ --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - fp->_flags |= _IO_ERR_SEEN; - #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ - /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ -Index: gzip-1.9/lib/stdio-impl.h -=================================================================== ---- gzip-1.9.orig/lib/stdio-impl.h -+++ gzip-1.9/lib/stdio-impl.h -@@ -18,6 +18,12 @@ - the same implementation of stdio extension API, except that some fields - have different naming conventions, or their access requires some casts. */ - -+/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this -+ problem by defining it ourselves. FIXME: Do not rely on glibc -+ internals. */ -+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN -+# define _IO_IN_BACKUP 0x100 -+#endif - - /* BSD stdio derived implementations. */ - diff --git a/poky/meta/recipes-extended/gzip/gzip_1.9.bb b/poky/meta/recipes-extended/gzip/gzip_1.10.bb index 19f658652..75de97063 100644 --- a/poky/meta/recipes-extended/gzip/gzip_1.9.bb +++ b/poky/meta/recipes-extended/gzip/gzip_1.10.bb @@ -4,7 +4,6 @@ LICENSE = "GPLv3+" SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz \ file://run-ptest \ - file://gnulib.patch \ " SRC_URI_append_class-target = " file://wrong-path-fix.patch" @@ -35,6 +34,5 @@ do_install_ptest() { ${B}/tests/Makefile > ${D}${PTEST_PATH}/src/tests/Makefile } -SRC_URI[md5sum] = "929d6a6b832f75b28e3eeeafb30c1d9b" -SRC_URI[sha256sum] = "5d2d3a3432ef32f24cdb060d278834507b481a75adeca18850c73592f778f6ad" - +SRC_URI[md5sum] = "cf9ee51aff167ff69844d5d7d71c8b20" +SRC_URI[sha256sum] = "c91f74430bf7bc20402e1f657d0b252cb80aa66ba333a25704512af346633c68" diff --git a/poky/meta/recipes-extended/hdparm/hdparm_9.56.bb b/poky/meta/recipes-extended/hdparm/hdparm_9.58.bb index 17932ad22..e47dedae8 100644 --- a/poky/meta/recipes-extended/hdparm/hdparm_9.56.bb +++ b/poky/meta/recipes-extended/hdparm/hdparm_9.58.bb @@ -25,8 +25,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/${BP}.tar.gz \ file://wiper.sh-fix-stat-path.patch \ " -SRC_URI[md5sum] = "7900608e32834f65d2654fdb696e71a0" -SRC_URI[sha256sum] = "6ff9ed695f1017396eec4101f990f114b7b0e0a04c5aa6369c0394053d16e4da" +SRC_URI[md5sum] = "4652c49cf096a64683c05f54b4fa4679" +SRC_URI[sha256sum] = "9ae78e883f3ce071d32ee0f1b9a2845a634fc4dd94a434e653fdbef551c5e10f" EXTRA_OEMAKE = 'STRIP="echo" LDFLAGS="${LDFLAGS}"' diff --git a/poky/meta/recipes-extended/images/core-image-kernel-dev.bb b/poky/meta/recipes-extended/images/core-image-kernel-dev.bb index a40b3aa95..4d16da1ea 100644 --- a/poky/meta/recipes-extended/images/core-image-kernel-dev.bb +++ b/poky/meta/recipes-extended/images/core-image-kernel-dev.bb @@ -11,6 +11,7 @@ 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. @@ -18,3 +19,5 @@ 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 parselogs" + +IMAGE_FEATURES += "tools-profile" diff --git a/poky/meta/recipes-extended/iptables/iptables_1.6.2.bb b/poky/meta/recipes-extended/iptables/iptables_1.6.2.bb index e00824f76..a57cac34e 100644 --- a/poky/meta/recipes-extended/iptables/iptables_1.6.2.bb +++ b/poky/meta/recipes-extended/iptables/iptables_1.6.2.bb @@ -39,7 +39,7 @@ PACKAGES += "${PN}-modules" PACKAGES_DYNAMIC += "^${PN}-module-.*" python populate_packages_prepend() { - modules = do_split_packages(d, '${libdir}/xtables', 'lib(.*)\.so$', '${PN}-module-%s', '${PN} module %s', extra_depends='') + 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)) diff --git a/poky/meta/recipes-extended/less/less_530.bb b/poky/meta/recipes-extended/less/less_550.bb index c07b12174..bb1618f1e 100644 --- a/poky/meta/recipes-extended/less/less_530.bb +++ b/poky/meta/recipes-extended/less/less_550.bb @@ -21,14 +21,15 @@ SECTION = "console/utils" LICENSE = "GPLv3+ | BSD-2-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ - file://LICENSE;md5=2ef3e4b8dafc85612bc5254b8081e234" + file://LICENSE;md5=ba01d0cab7f62f7f2204c7780ff6a87d \ + " DEPENDS = "ncurses" SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz \ " -SRC_URI[md5sum] = "6a39bccf420c946b0fd7ffc64961315b" -SRC_URI[sha256sum] = "503f91ab0af4846f34f0444ab71c4b286123f0044a4964f1ae781486c617f2e2" +SRC_URI[md5sum] = "8caff88e34afff512b663d7c690bd2cf" +SRC_URI[sha256sum] = "6a53639f08d7ed05b6e104b82c32193f79ac01a3eddb20e114e1c261948bd57b" UPSTREAM_CHECK_URI = "http://www.greenwoodsoftware.com/less/download.html" diff --git a/poky/meta/recipes-extended/libarchive/libarchive/CVE-2018-1000877.patch b/poky/meta/recipes-extended/libarchive/libarchive/CVE-2018-1000877.patch new file mode 100644 index 000000000..ce638370b --- /dev/null +++ b/poky/meta/recipes-extended/libarchive/libarchive/CVE-2018-1000877.patch @@ -0,0 +1,38 @@ +CVE: CVE-2018-1000877 +Upstream-Status: Backport +Signed-off-by: Ross Burton <ross.burton@intel.com> + +From 021efa522ad729ff0f5806c4ce53e4a6cc1daa31 Mon Sep 17 00:00:00 2001 +From: Daniel Axtens <dja@axtens.net> +Date: Tue, 20 Nov 2018 17:56:29 +1100 +Subject: [PATCH] Avoid a double-free when a window size of 0 is specified + +new_size can be 0 with a malicious or corrupted RAR archive. + +realloc(area, 0) is equivalent to free(area), so the region would +be free()d here and the free()d again in the cleanup function. + +Found with a setup running AFL, afl-rb, and qsym. +--- + libarchive/archive_read_support_format_rar.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c +index 23452222..6f419c27 100644 +--- a/libarchive/archive_read_support_format_rar.c ++++ b/libarchive/archive_read_support_format_rar.c +@@ -2300,6 +2300,11 @@ parse_codes(struct archive_read *a) + new_size = DICTIONARY_MAX_SIZE; + else + new_size = rar_fls((unsigned int)rar->unp_size) << 1; ++ if (new_size == 0) { ++ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, ++ "Zero window size is invalid."); ++ return (ARCHIVE_FATAL); ++ } + new_window = realloc(rar->lzss.window, new_size); + if (new_window == NULL) { + archive_set_error(&a->archive, ENOMEM, +-- +2.20.0 + diff --git a/poky/meta/recipes-extended/libarchive/libarchive/CVE-2018-1000878.patch b/poky/meta/recipes-extended/libarchive/libarchive/CVE-2018-1000878.patch new file mode 100644 index 000000000..7468fd3c9 --- /dev/null +++ b/poky/meta/recipes-extended/libarchive/libarchive/CVE-2018-1000878.patch @@ -0,0 +1,79 @@ +CVE: CVE-2018-1000878 +Upstream-Status: Backport +Signed-off-by: Ross Burton <ross.burton@intel.com> + +From bfcfe6f04ed20db2504db8a254d1f40a1d84eb28 Mon Sep 17 00:00:00 2001 +From: Daniel Axtens <dja@axtens.net> +Date: Tue, 4 Dec 2018 00:55:22 +1100 +Subject: [PATCH] rar: file split across multi-part archives must match + +Fuzzing uncovered some UAF and memory overrun bugs where a file in a +single file archive reported that it was split across multiple +volumes. This was caused by ppmd7 operations calling +rar_br_fillup. This would invoke rar_read_ahead, which would in some +situations invoke archive_read_format_rar_read_header. That would +check the new file name against the old file name, and if they didn't +match up it would free the ppmd7 buffer and allocate a new +one. However, because the ppmd7 decoder wasn't actually done with the +buffer, it would continue to used the freed buffer. Both reads and +writes to the freed region can be observed. + +This is quite tricky to solve: once the buffer has been freed it is +too late, as the ppmd7 decoder functions almost universally assume +success - there's no way for ppmd_read to signal error, nor are there +good ways for functions like Range_Normalise to propagate them. So we +can't detect after the fact that we're in an invalid state - e.g. by +checking rar->cursor, we have to prevent ourselves from ever ending up +there. So, when we are in the dangerous part or rar_read_ahead that +assumes a valid split, we set a flag force read_header to either go +down the path for split files or bail. This means that the ppmd7 +decoder keeps a valid buffer and just runs out of data. + +Found with a combination of AFL, afl-rb and qsym. +--- + libarchive/archive_read_support_format_rar.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c +index 6f419c27..a8cc5c94 100644 +--- a/libarchive/archive_read_support_format_rar.c ++++ b/libarchive/archive_read_support_format_rar.c +@@ -258,6 +258,7 @@ struct rar + struct data_block_offsets *dbo; + unsigned int cursor; + unsigned int nodes; ++ char filename_must_match; + + /* LZSS members */ + struct huffman_code maincode; +@@ -1560,6 +1561,12 @@ read_header(struct archive_read *a, struct archive_entry *entry, + } + return ret; + } ++ else if (rar->filename_must_match) ++ { ++ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, ++ "Mismatch of file parts split across multi-volume archive"); ++ return (ARCHIVE_FATAL); ++ } + + rar->filename_save = (char*)realloc(rar->filename_save, + filename_size + 1); +@@ -2933,12 +2940,14 @@ rar_read_ahead(struct archive_read *a, size_t min, ssize_t *avail) + else if (*avail == 0 && rar->main_flags & MHD_VOLUME && + rar->file_flags & FHD_SPLIT_AFTER) + { ++ rar->filename_must_match = 1; + ret = archive_read_format_rar_read_header(a, a->entry); + if (ret == (ARCHIVE_EOF)) + { + rar->has_endarc_header = 1; + ret = archive_read_format_rar_read_header(a, a->entry); + } ++ rar->filename_must_match = 0; + if (ret != (ARCHIVE_OK)) + return NULL; + return rar_read_ahead(a, min, avail); +-- +2.20.0 + diff --git a/poky/meta/recipes-extended/libarchive/libarchive/CVE-2018-1000879.patch b/poky/meta/recipes-extended/libarchive/libarchive/CVE-2018-1000879.patch new file mode 100644 index 000000000..9f25932a1 --- /dev/null +++ b/poky/meta/recipes-extended/libarchive/libarchive/CVE-2018-1000879.patch @@ -0,0 +1,50 @@ +CVE: CVE-2018-1000879 +Upstream-Status: Backport +Signed-off-by: Ross Burton <ross.burton@intel.com> + +From 15bf44fd2c1ad0e3fd87048b3fcc90c4dcff1175 Mon Sep 17 00:00:00 2001 +From: Daniel Axtens <dja@axtens.net> +Date: Tue, 4 Dec 2018 14:29:42 +1100 +Subject: [PATCH] Skip 0-length ACL fields + +Currently, it is possible to create an archive that crashes bsdtar +with a malformed ACL: + +Program received signal SIGSEGV, Segmentation fault. +archive_acl_from_text_l (acl=<optimised out>, text=0x7e2e92 "", want_type=<optimised out>, sc=<optimised out>) at libarchive/archive_acl.c:1726 +1726 switch (*s) { +(gdb) p n +$1 = 1 +(gdb) p field[n] +$2 = {start = 0x0, end = 0x0} + +Stop this by checking that the length is not zero before beginning +the switch statement. + +I am pretty sure this is the bug mentioned in the qsym paper [1], +and I was able to replicate it with a qsym + AFL + afl-rb setup. + +[1] https://www.usenix.org/conference/usenixsecurity18/presentation/yun +--- + libarchive/archive_acl.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/libarchive/archive_acl.c b/libarchive/archive_acl.c +index 512beee1..7beeee86 100644 +--- a/libarchive/archive_acl.c ++++ b/libarchive/archive_acl.c +@@ -1723,6 +1723,11 @@ archive_acl_from_text_l(struct archive_acl *acl, const char *text, + st = field[n].start + 1; + len = field[n].end - field[n].start; + ++ if (len == 0) { ++ ret = ARCHIVE_WARN; ++ continue; ++ } ++ + switch (*s) { + case 'u': + if (len == 1 || (len == 4 +-- +2.20.0 + diff --git a/poky/meta/recipes-extended/libarchive/libarchive/CVE-2018-1000880.patch b/poky/meta/recipes-extended/libarchive/libarchive/CVE-2018-1000880.patch new file mode 100644 index 000000000..bc264a124 --- /dev/null +++ b/poky/meta/recipes-extended/libarchive/libarchive/CVE-2018-1000880.patch @@ -0,0 +1,44 @@ +CVE: CVE-2018-1000880 +Upstream-Status: Backport +Signed-off-by: Ross Burton <ross.burton@intel.com> + +From 9c84b7426660c09c18cc349f6d70b5f8168b5680 Mon Sep 17 00:00:00 2001 +From: Daniel Axtens <dja@axtens.net> +Date: Tue, 4 Dec 2018 16:33:42 +1100 +Subject: [PATCH] warc: consume data once read + +The warc decoder only used read ahead, it wouldn't actually consume +data that had previously been printed. This means that if you specify +an invalid content length, it will just reprint the same data over +and over and over again until it hits the desired length. + +This means that a WARC resource with e.g. +Content-Length: 666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666665 +but only a few hundred bytes of data, causes a quasi-infinite loop. + +Consume data in subsequent calls to _warc_read. + +Found with an AFL + afl-rb + qsym setup. +--- + libarchive/archive_read_support_format_warc.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/libarchive/archive_read_support_format_warc.c b/libarchive/archive_read_support_format_warc.c +index e8753853..e8fc8428 100644 +--- a/libarchive/archive_read_support_format_warc.c ++++ b/libarchive/archive_read_support_format_warc.c +@@ -386,6 +386,11 @@ _warc_read(struct archive_read *a, const void **buf, size_t *bsz, int64_t *off) + return (ARCHIVE_EOF); + } + ++ if (w->unconsumed) { ++ __archive_read_consume(a, w->unconsumed); ++ w->unconsumed = 0U; ++ } ++ + rab = __archive_read_ahead(a, 1U, &nrd); + if (nrd < 0) { + *bsz = 0U; +-- +2.20.0 + diff --git a/poky/meta/recipes-extended/libarchive/libarchive/CVE-2019-1000019.patch b/poky/meta/recipes-extended/libarchive/libarchive/CVE-2019-1000019.patch new file mode 100644 index 000000000..7f39893c2 --- /dev/null +++ b/poky/meta/recipes-extended/libarchive/libarchive/CVE-2019-1000019.patch @@ -0,0 +1,59 @@ +CVE: CVE-2019-1000019 +Upstream-Status: Backport +Signed-off-by: Ross Burton <ross.burton@intel.com> + +From 65a23f5dbee4497064e9bb467f81138a62b0dae1 Mon Sep 17 00:00:00 2001 +From: Daniel Axtens <dja@axtens.net> +Date: Tue, 1 Jan 2019 16:01:40 +1100 +Subject: [PATCH 2/2] 7zip: fix crash when parsing certain archives + +Fuzzing with CRCs disabled revealed that a call to get_uncompressed_data() +would sometimes fail to return at least 'minimum' bytes. This can cause +the crc32() invocation in header_bytes to read off into invalid memory. + +A specially crafted archive can use this to cause a crash. + +An ASAN trace is below, but ASAN is not required - an uninstrumented +binary will also crash. + +==7719==ERROR: AddressSanitizer: SEGV on unknown address 0x631000040000 (pc 0x7fbdb3b3ec1d bp 0x7ffe77a51310 sp 0x7ffe77a51150 T0) +==7719==The signal is caused by a READ memory access. + #0 0x7fbdb3b3ec1c in crc32_z (/lib/x86_64-linux-gnu/libz.so.1+0x2c1c) + #1 0x84f5eb in header_bytes (/tmp/libarchive/bsdtar+0x84f5eb) + #2 0x856156 in read_Header (/tmp/libarchive/bsdtar+0x856156) + #3 0x84e134 in slurp_central_directory (/tmp/libarchive/bsdtar+0x84e134) + #4 0x849690 in archive_read_format_7zip_read_header (/tmp/libarchive/bsdtar+0x849690) + #5 0x5713b7 in _archive_read_next_header2 (/tmp/libarchive/bsdtar+0x5713b7) + #6 0x570e63 in _archive_read_next_header (/tmp/libarchive/bsdtar+0x570e63) + #7 0x6f08bd in archive_read_next_header (/tmp/libarchive/bsdtar+0x6f08bd) + #8 0x52373f in read_archive (/tmp/libarchive/bsdtar+0x52373f) + #9 0x5257be in tar_mode_x (/tmp/libarchive/bsdtar+0x5257be) + #10 0x51daeb in main (/tmp/libarchive/bsdtar+0x51daeb) + #11 0x7fbdb27cab96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310 + #12 0x41dd09 in _start (/tmp/libarchive/bsdtar+0x41dd09) + +This was primarly done with afl and FairFuzz. Some early corpus entries +may have been generated by qsym. +--- + libarchive/archive_read_support_format_7zip.c | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +diff --git a/libarchive/archive_read_support_format_7zip.c b/libarchive/archive_read_support_format_7zip.c +index bccbf8966..b6d1505d3 100644 +--- a/libarchive/archive_read_support_format_7zip.c ++++ b/libarchive/archive_read_support_format_7zip.c +@@ -2964,13 +2964,7 @@ get_uncompressed_data(struct archive_read *a, const void **buff, size_t size, + if (zip->codec == _7Z_COPY && zip->codec2 == (unsigned long)-1) { + /* Copy mode. */ + +- /* +- * Note: '1' here is a performance optimization. +- * Recall that the decompression layer returns a count of +- * available bytes; asking for more than that forces the +- * decompressor to combine reads by copying data. +- */ +- *buff = __archive_read_ahead(a, 1, &bytes_avail); ++ *buff = __archive_read_ahead(a, minimum, &bytes_avail); + if (bytes_avail <= 0) { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_FILE_FORMAT, diff --git a/poky/meta/recipes-extended/libarchive/libarchive/CVE-2019-1000020.patch b/poky/meta/recipes-extended/libarchive/libarchive/CVE-2019-1000020.patch new file mode 100644 index 000000000..25a76fdcd --- /dev/null +++ b/poky/meta/recipes-extended/libarchive/libarchive/CVE-2019-1000020.patch @@ -0,0 +1,61 @@ +CVE: CVE-2019-1000020 +Upstream-Status: Backport +Signed-off-by: Ross Burton <ross.burton@intel.com> + +From 8312eaa576014cd9b965012af51bc1f967b12423 Mon Sep 17 00:00:00 2001 +From: Daniel Axtens <dja@axtens.net> +Date: Tue, 1 Jan 2019 17:10:49 +1100 +Subject: [PATCH 1/2] iso9660: Fail when expected Rockridge extensions is + missing + +A corrupted or malicious ISO9660 image can cause read_CE() to loop +forever. + +read_CE() calls parse_rockridge(), expecting a Rockridge extension +to be read. However, parse_rockridge() is structured as a while +loop starting with a sanity check, and if the sanity check fails +before the loop has run, the function returns ARCHIVE_OK without +advancing the position in the file. This causes read_CE() to retry +indefinitely. + +Make parse_rockridge() return ARCHIVE_WARN if it didn't read an +extension. As someone with no real knowledge of the format, this +seems more apt than ARCHIVE_FATAL, but both the call-sites escalate +it to a fatal error immediately anyway. + +Found with a combination of AFL, afl-rb (FairFuzz) and qsym. +--- + libarchive/archive_read_support_format_iso9660.c | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/libarchive/archive_read_support_format_iso9660.c b/libarchive/archive_read_support_format_iso9660.c +index 28acfefbb..bad8f1dfe 100644 +--- a/libarchive/archive_read_support_format_iso9660.c ++++ b/libarchive/archive_read_support_format_iso9660.c +@@ -2102,6 +2102,7 @@ parse_rockridge(struct archive_read *a, struct file_info *file, + const unsigned char *p, const unsigned char *end) + { + struct iso9660 *iso9660; ++ int entry_seen = 0; + + iso9660 = (struct iso9660 *)(a->format->data); + +@@ -2257,8 +2258,16 @@ parse_rockridge(struct archive_read *a, struct file_info *file, + } + + p += p[2]; ++ entry_seen = 1; ++ } ++ ++ if (entry_seen) ++ return (ARCHIVE_OK); ++ else { ++ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, ++ "Tried to parse Rockridge extensions, but none found"); ++ return (ARCHIVE_WARN); + } +- return (ARCHIVE_OK); + } + + static int + diff --git a/poky/meta/recipes-extended/libarchive/libarchive_3.3.3.bb b/poky/meta/recipes-extended/libarchive/libarchive_3.3.3.bb index 46a3d4376..af5ca6529 100644 --- a/poky/meta/recipes-extended/libarchive/libarchive_3.3.3.bb +++ b/poky/meta/recipes-extended/libarchive/libarchive_3.3.3.bb @@ -34,6 +34,12 @@ EXTRA_OECONF += "--enable-largefile" SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \ file://non-recursive-extract-and-list.patch \ file://bug1066.patch \ + file://CVE-2018-1000877.patch \ + file://CVE-2018-1000878.patch \ + file://CVE-2018-1000879.patch \ + file://CVE-2018-1000880.patch \ + file://CVE-2019-1000019.patch \ + file://CVE-2019-1000020.patch \ " SRC_URI[md5sum] = "4038e366ca5b659dae3efcc744e72120" diff --git a/poky/meta/recipes-extended/libpipeline/libpipeline_1.5.0.bb b/poky/meta/recipes-extended/libpipeline/libpipeline_1.5.1.bb index 14cc9e519..a5802074b 100644 --- a/poky/meta/recipes-extended/libpipeline/libpipeline_1.5.0.bb +++ b/poky/meta/recipes-extended/libpipeline/libpipeline_1.5.1.bb @@ -7,8 +7,9 @@ LICENSE = "GPLv3" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" SRC_URI = "${SAVANNAH_GNU_MIRROR}/libpipeline/libpipeline-${PV}.tar.gz" -SRC_URI[md5sum] = "b7437a5020190cfa84f09c412db38902" -SRC_URI[sha256sum] = "0d72e12e4f2afff67fd7b9df0a24d7ba42b5a7c9211ac5b3dcccc5cd8b286f2b" +SRC_URI[md5sum] = "4c8fe6cd85422baafd6e060f896c61bc" +SRC_URI[sha256sum] = "d633706b7d845f08b42bc66ddbe845d57e726bf89298e2cee29f09577e2f902f" inherit pkgconfig autotools +acpaths = "-I ${S}/gl/m4 -I ${S}/m4" diff --git a/poky/meta/recipes-extended/libsolv/libsolv/0001-Add-fallback-fopencookie-implementation.patch b/poky/meta/recipes-extended/libsolv/libsolv/0001-Add-fallback-fopencookie-implementation.patch deleted file mode 100644 index e5cb60dd5..000000000 --- a/poky/meta/recipes-extended/libsolv/libsolv/0001-Add-fallback-fopencookie-implementation.patch +++ /dev/null @@ -1,251 +0,0 @@ -From 47c6f1b4332a9e4935c48cca826786a6b8fe6f59 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Neal=20Gompa=20=28=E3=83=8B=E3=83=BC=E3=83=AB=E3=83=BB?= - =?UTF-8?q?=E3=82=B3=E3=82=99=E3=83=B3=E3=83=8F=E3=82=9A=29?= - <ngompa13@gmail.com> -Date: Wed, 11 Nov 2015 20:32:17 -0500 -Subject: [PATCH 1/2] Add fallback fopencookie() implementation - -In environments where neither fopencookie() nor funopen() -are implemented, we need to provide a suitable implementation -of fopencookie() that we can use. - -Alex Kanavin: rebased CMakeLists.txt change to apply to latest upstream code. - -Upstream-Status: Denied [https://github.com/openSUSE/libsolv/pull/112] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - ---- - ext/CMakeLists.txt | 7 ++ - ext/solv_xfopen.c | 10 +-- - ext/solv_xfopen_fallback_fopencookie.c | 123 +++++++++++++++++++++++++++++++++ - ext/solv_xfopen_fallback_fopencookie.h | 28 ++++++++ - 4 files changed, 164 insertions(+), 4 deletions(-) - create mode 100644 ext/solv_xfopen_fallback_fopencookie.c - create mode 100644 ext/solv_xfopen_fallback_fopencookie.h - -diff --git a/ext/CMakeLists.txt b/ext/CMakeLists.txt -index b8917a2..fac6c32 100644 ---- a/ext/CMakeLists.txt -+++ b/ext/CMakeLists.txt -@@ -4,6 +4,13 @@ SET (libsolvext_SRCS - SET (libsolvext_HEADERS - tools_util.h solv_xfopen.h testcase.h) - -+IF (NOT HAVE_FOPENCOOKIE AND NOT HAVE_FUNOPEN) -+ SET (libsolvext_SRCS ${libsolvext_SRCS} -+ solv_xfopen_fallback_fopencookie.c) -+ SET (libsolvext_HEADERS ${libsolvext_HEADERS} -+ solv_xfopen_fallback_fopencookie.h) -+ENDIF (NOT HAVE_FOPENCOOKIE AND NOT HAVE_FUNOPEN) -+ - IF (ENABLE_RPMDB OR ENABLE_RPMPKG) - SET (libsolvext_SRCS ${libsolvext_SRCS} - pool_fileconflicts.c repo_rpmdb.c) -diff --git a/ext/solv_xfopen.c b/ext/solv_xfopen.c -index 2c64bb6..eb3a3ad 100644 ---- a/ext/solv_xfopen.c -+++ b/ext/solv_xfopen.c -@@ -12,6 +12,10 @@ - #include <string.h> - #include <fcntl.h> - -+#if !defined(HAVE_FUNOPEN) && !defined(HAVE_FOPENCOOKIE) -+#include "solv_xfopen_fallback_fopencookie.h" -+#endif -+ - #include "solv_xfopen.h" - #include "util.h" - -@@ -21,7 +25,7 @@ static FILE *cookieopen(void *cookie, const char *mode, - ssize_t (*cwrite)(void *, const char *, size_t), - int (*cclose)(void *)) - { --#ifdef HAVE_FUNOPEN -+#if defined(HAVE_FUNOPEN) && !defined(HAVE_FOPENCOOKIE) - if (!cookie) - return 0; - return funopen(cookie, -@@ -30,7 +34,7 @@ static FILE *cookieopen(void *cookie, const char *mode, - (fpos_t (*)(void *, fpos_t, int))NULL, /* seekfn */ - cclose - ); --#elif defined(HAVE_FOPENCOOKIE) -+#else - cookie_io_functions_t cio; - - if (!cookie) -@@ -42,8 +46,6 @@ static FILE *cookieopen(void *cookie, const char *mode, - cio.write = cwrite; - cio.close = cclose; - return fopencookie(cookie, *mode == 'w' ? "w" : "r", cio); --#else --# error Need to implement custom I/O - #endif - } - -diff --git a/ext/solv_xfopen_fallback_fopencookie.c b/ext/solv_xfopen_fallback_fopencookie.c -new file mode 100644 -index 0000000..0ce2571 ---- /dev/null -+++ b/ext/solv_xfopen_fallback_fopencookie.c -@@ -0,0 +1,123 @@ -+/* -+ * Provides a very limited fopencookie() for environments with a libc -+ * that lacks it. -+ * -+ * Author: zhasha -+ * Modified for libsolv by Neal Gompa -+ * -+ * This program is licensed under the BSD license, read LICENSE.BSD -+ * for further information. -+ * -+ */ -+ -+#define _LARGEFILE64_SOURCE 1 -+#include <pthread.h> -+#include <stdio.h> -+#include <stdlib.h> -+#include <unistd.h> -+#include <fcntl.h> -+#include <sys/types.h> -+#include <errno.h> -+#include "solv_xfopen_fallback_fopencookie.h" -+ -+extern int pipe2(int[2], int); -+ -+struct ctx { -+ int fd; -+ void *cookie; -+ struct cookie_io_functions_t io; -+ char buf[1024]; -+}; -+ -+static void *proxy(void *arg) -+{ -+ struct ctx *ctx = arg; -+ ssize_t r; -+ size_t n; -+ -+ pthread_detach(pthread_self()); -+ -+ while (1) { -+ r = ctx->io.read ? -+ (ctx->io.read)(ctx->cookie, ctx->buf, sizeof(ctx->buf)) : -+ read(ctx->fd, ctx->buf, sizeof(ctx->buf)); -+ if (r < 0) { -+ if (errno != EINTR) { break; } -+ continue; -+ } -+ if (r == 0) { break; } -+ -+ while (n > 0) { -+ r = ctx->io.write ? -+ (ctx->io.write)(ctx->cookie, ctx->buf + ((size_t)r - n), n) : -+ write(ctx->fd, ctx->buf + ((size_t)r - n), n); -+ if (r < 0) { -+ if (errno != EINTR) { break; } -+ continue; -+ } -+ if (r == 0) { break; } -+ -+ n -= (size_t)r; -+ } -+ if (n > 0) { break; } -+ } -+ -+ if (ctx->io.close) { (ctx->io.close)(ctx->cookie); } -+ close(ctx->fd); -+ return NULL; -+} -+ -+FILE *fopencookie(void *cookie, const char *mode, struct cookie_io_functions_t io) -+{ -+ struct ctx *ctx = NULL; -+ int rd = 0, wr = 0; -+ int p[2] = { -1, -1 }; -+ FILE *f = NULL; -+ pthread_t dummy; -+ -+ switch (mode[0]) { -+ case 'a': -+ case 'r': rd = 1; break; -+ case 'w': wr = 1; break; -+ default: -+ errno = EINVAL; -+ return NULL; -+ } -+ switch (mode[1]) { -+ case '\0': break; -+ case '+': -+ if (mode[2] == '\0') { -+ errno = ENOTSUP; -+ return NULL; -+ } -+ default: -+ errno = EINVAL; -+ return NULL; -+ } -+ if (io.seek) { -+ errno = ENOTSUP; -+ return NULL; -+ } -+ -+ ctx = malloc(sizeof(*ctx)); -+ if (!ctx) { return NULL; } -+ if (pipe2(p, O_CLOEXEC) != 0) { goto err; } -+ if ((f = fdopen(p[wr], mode)) == NULL) { goto err; } -+ p[wr] = -1; -+ ctx->fd = p[rd]; -+ ctx->cookie = cookie; -+ ctx->io.read = rd ? io.read : NULL; -+ ctx->io.write = wr ? io.write : NULL; -+ ctx->io.seek = NULL; -+ ctx->io.close = io.close; -+ if (pthread_create(&dummy, NULL, proxy, ctx) != 0) { goto err; } -+ -+ return f; -+ -+err: -+ if (p[0] >= 0) { close(p[0]); } -+ if (p[1] >= 0) { close(p[1]); } -+ if (f) { fclose(f); } -+ free(ctx); -+ return NULL; -+} -diff --git a/ext/solv_xfopen_fallback_fopencookie.h b/ext/solv_xfopen_fallback_fopencookie.h -new file mode 100644 -index 0000000..6a7bfee ---- /dev/null -+++ b/ext/solv_xfopen_fallback_fopencookie.h -@@ -0,0 +1,28 @@ -+/* -+ * Provides a very limited fopencookie() for environments with a libc -+ * that lacks it. -+ * -+ * Author: zhasha -+ * Modified for libsolv by Neal Gompa -+ * -+ * This program is licensed under the BSD license, read LICENSE.BSD -+ * for further information. -+ * -+ */ -+ -+#ifndef SOLV_XFOPEN_FALLBACK_FOPENCOOKIE_H -+#define SOLV_XFOPEN_FALLBACK_FOPENCOOKIE_H -+ -+#include <stdio.h> -+#include <stdint.h> -+ -+typedef struct cookie_io_functions_t { -+ ssize_t (*read)(void *, char *, size_t); -+ ssize_t (*write)(void *, const char *, size_t); -+ int (*seek)(void *, off64_t, int); -+ int (*close)(void *); -+} cookie_io_functions_t; -+ -+FILE *fopencookie(void *cookie, const char *mode, struct cookie_io_functions_t io); -+ -+#endif --- -2.4.0 - diff --git a/poky/meta/recipes-extended/libsolv/libsolv/0001-build-use-GNUInstallDirs.patch b/poky/meta/recipes-extended/libsolv/libsolv/0001-build-use-GNUInstallDirs.patch new file mode 100644 index 000000000..75ef15005 --- /dev/null +++ b/poky/meta/recipes-extended/libsolv/libsolv/0001-build-use-GNUInstallDirs.patch @@ -0,0 +1,188 @@ +Backport a patch from upstream to use GNUInstallDirs instead of +hand-coded path logic, so we have proper control over where files end up. + +Upstream-Status: Backport +Signed-off-by: Ross Burton <ross.burton@intel.com> + +From b6c9df4c686975ce5009d09dac706a4e83f02a31 Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko <i.gnatenko.brain@gmail.com> +Date: Mon, 2 Jul 2018 12:56:41 +0100 +Subject: [PATCH] build: use GNUInstallDirs + +Fixes: #128 +Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com> +--- + CMakeLists.txt | 34 +++++++--------------------------- + README | 2 +- + doc/CMakeLists.txt | 4 ++-- + examples/solv/CMakeLists.txt | 2 +- + ext/CMakeLists.txt | 8 ++++---- + libsolv.pc.in | 4 ++-- + libsolvext.pc.in | 4 ++-- + src/CMakeLists.txt | 8 ++++---- + tools/CMakeLists.txt | 3 +-- + 9 files changed, 24 insertions(+), 45 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1deef57d..7e9ffa9b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,6 +1,6 @@ + PROJECT (libsolv) + +-CMAKE_MINIMUM_REQUIRED (VERSION 2.4) ++CMAKE_MINIMUM_REQUIRED (VERSION 2.8.5) + + OPTION (ENABLE_STATIC "Build a static version of the libraries?" OFF) + OPTION (DISABLE_SHARED "Do not build a shared version of the libraries?" OFF) +@@ -38,34 +38,14 @@ OPTION (ENABLE_ZCHUNK_COMPRESSION "Build with zchunk compression support?" OFF) + OPTION (WITH_SYSTEM_ZCHUNK "Use system zchunk library?" OFF) + OPTION (WITH_LIBXML2 "Build with libxml2 instead of libexpat?" OFF) + +-# Library +-IF (DEFINED LIB) +- SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${LIB}") +-ELSE (DEFINED LIB) +- IF (CMAKE_SIZEOF_VOID_P MATCHES "8") +- SET (LIB_SUFFIX "64") +- ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8") +- SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}") +-ENDIF (DEFINED LIB) +-MESSAGE (STATUS "Libraries will be installed in ${LIB_INSTALL_DIR}") +-# Library +-IF (DEFINED INCLUDE) +- SET (INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${INCLUDE}") +-else (DEFINED INCLUDE) +- SET (INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include") +-ENDIF (DEFINED INCLUDE) +-MESSAGE (STATUS "Header files will be installed in ${INCLUDE_INSTALL_DIR}") +-SET (BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin") +-IF (NOT MAN_INSTALL_DIR) +-SET (MAN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/man") +-IF (IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/man" AND NOT IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/share/man") +- SET (MAN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/man") +-ENDIF (IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/man" AND NOT IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/share/man") +-ENDIF (NOT MAN_INSTALL_DIR) +-MESSAGE(STATUS "Man pages will be installed in ${MAN_INSTALL_DIR}") ++include (GNUInstallDirs) ++message (STATUS "Libraries will be installed in ${CMAKE_INSTALL_FULL_LIBDIR}") ++message (STATUS "Header files will be installed in ${CMAKE_INSTALL_FULL_INCLUDEDIR}") ++message (STATUS "Binaries will be installed in ${CMAKE_INSTALL_FULL_BINDIR}") ++message (STATUS "Man pages will be installed in ${CMAKE_INSTALL_FULL_MANDIR}") + + IF (NOT PKGCONFIG_INSTALL_DIR) +- SET (PKGCONFIG_INSTALL_DIR ${LIB_INSTALL_DIR}/pkgconfig) ++ SET (PKGCONFIG_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + ENDIF (NOT PKGCONFIG_INSTALL_DIR) + #################################################################### + # CONFIGURATION # +diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt +index 66011b48..ed38274e 100644 +--- a/doc/CMakeLists.txt ++++ b/doc/CMakeLists.txt +@@ -48,8 +48,8 @@ STRING(REGEX REPLACE "([^;]+)" "gen/\\1" libsolv_MANPAGES3 "${libsolv_MANPAGES3} + + INSTALL(FILES + ${libsolv_MANPAGES3} +- DESTINATION "${MAN_INSTALL_DIR}/man3") ++ DESTINATION "${CMAKE_INSTALL_MANDIR}/man3") + + INSTALL(FILES + ${libsolv_MANPAGES1} +- DESTINATION "${MAN_INSTALL_DIR}/man1") ++ DESTINATION "${CMAKE_INSTALL_MANDIR}/man1") +diff --git a/examples/solv/CMakeLists.txt b/examples/solv/CMakeLists.txt +index 41f45f74..0f3bd477 100644 +--- a/examples/solv/CMakeLists.txt ++++ b/examples/solv/CMakeLists.txt +@@ -25,5 +25,5 @@ TARGET_LINK_LIBRARIES (solv libsolvext libsolv ${SYSTEM_LIBRARIES}) + + INSTALL(TARGETS + solv +- DESTINATION ${BIN_INSTALL_DIR}) ++ DESTINATION ${CMAKE_INSTALL_BINDIR}) + +diff --git a/ext/CMakeLists.txt b/ext/CMakeLists.txt +index edc2b9f9..6dd28b1a 100644 +--- a/ext/CMakeLists.txt ++++ b/ext/CMakeLists.txt +@@ -145,14 +145,14 @@ ENDIF (DISABLE_SHARED) + + SET_TARGET_PROPERTIES(libsolvext PROPERTIES OUTPUT_NAME "solvext") + SET_TARGET_PROPERTIES(libsolvext PROPERTIES SOVERSION ${LIBSOLVEXT_SOVERSION}) +-SET_TARGET_PROPERTIES(libsolvext PROPERTIES INSTALL_NAME_DIR ${LIB_INSTALL_DIR}) ++SET_TARGET_PROPERTIES(libsolvext PROPERTIES INSTALL_NAME_DIR ${CMAKE_INSTALL_LIBDIR}) + +-INSTALL (FILES ${libsolvext_HEADERS} DESTINATION "${INCLUDE_INSTALL_DIR}/solv") +-INSTALL (TARGETS libsolvext LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR} RUNTIME DESTINATION bin) ++INSTALL (FILES ${libsolvext_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/solv") ++INSTALL (TARGETS libsolvext LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + + IF (ENABLE_STATIC AND NOT DISABLE_SHARED) + ADD_LIBRARY (libsolvext_static STATIC ${libsolvext_SRCS}) + SET_TARGET_PROPERTIES(libsolvext_static PROPERTIES OUTPUT_NAME "solvext") + SET_TARGET_PROPERTIES(libsolvext_static PROPERTIES SOVERSION ${LIBSOLVEXT_SOVERSION}) +-INSTALL (TARGETS libsolvext_static LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) ++INSTALL (TARGETS libsolvext_static LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ENDIF (ENABLE_STATIC AND NOT DISABLE_SHARED) +diff --git a/libsolv.pc.in b/libsolv.pc.in +index 40a86230..766146c5 100644 +--- a/libsolv.pc.in ++++ b/libsolv.pc.in +@@ -1,5 +1,5 @@ +-libdir=@LIB_INSTALL_DIR@ +-includedir=@INCLUDE_INSTALL_DIR@ ++libdir=@CMAKE_INSTALL_FULL_LIBDIR@ ++includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ + + Name: libsolv + Description: Library for solving packages +diff --git a/libsolvext.pc.in b/libsolvext.pc.in +index d48b6fab..d0078461 100644 +--- a/libsolvext.pc.in ++++ b/libsolvext.pc.in +@@ -1,5 +1,5 @@ +-libdir=@LIB_INSTALL_DIR@ +-includedir=@INCLUDE_INSTALL_DIR@ ++libdir=@CMAKE_INSTALL_FULL_LIBDIR@ ++includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ + + Name: libsolvext + Description: Library for reading repositories +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 2e32968e..03ea9119 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -42,14 +42,14 @@ ENDIF (DISABLE_SHARED) + + SET_TARGET_PROPERTIES(libsolv PROPERTIES OUTPUT_NAME "solv") + SET_TARGET_PROPERTIES(libsolv PROPERTIES SOVERSION ${LIBSOLV_SOVERSION}) +-SET_TARGET_PROPERTIES(libsolv PROPERTIES INSTALL_NAME_DIR ${LIB_INSTALL_DIR}) ++SET_TARGET_PROPERTIES(libsolv PROPERTIES INSTALL_NAME_DIR ${CMAKE_INSTALL_LIBDIR}) + +-INSTALL (FILES ${libsolv_HEADERS} DESTINATION "${INCLUDE_INSTALL_DIR}/solv") +-INSTALL (TARGETS libsolv LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR} RUNTIME DESTINATION bin) ++INSTALL (FILES ${libsolv_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/solv") ++INSTALL (TARGETS libsolv LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + + IF (ENABLE_STATIC AND NOT DISABLE_SHARED) + ADD_LIBRARY (libsolv_static STATIC ${libsolv_SRCS}) + SET_TARGET_PROPERTIES(libsolv_static PROPERTIES OUTPUT_NAME "solv") + SET_TARGET_PROPERTIES(libsolv_static PROPERTIES SOVERSION ${LIBSOLV_SOVERSION}) +-INSTALL (TARGETS libsolv_static LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) ++INSTALL (TARGETS libsolv_static LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ENDIF (ENABLE_STATIC AND NOT DISABLE_SHARED) +diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt +index 802dc500..0d677f69 100644 +--- a/tools/CMakeLists.txt ++++ b/tools/CMakeLists.txt +@@ -110,5 +110,4 @@ TARGET_LINK_LIBRARIES (testsolv libsolvext libsolv ${SYSTEM_LIBRARIES}) + ADD_EXECUTABLE (repo2solv repo2solv.c ) + TARGET_LINK_LIBRARIES (repo2solv toolstuff libsolvext libsolv ${SYSTEM_LIBRARIES}) + +-INSTALL (TARGETS ${tools_list} DESTINATION ${BIN_INSTALL_DIR}) +- ++INSTALL (TARGETS ${tools_list} DESTINATION ${CMAKE_INSTALL_BINDIR}) +-- +2.11.0 + diff --git a/poky/meta/recipes-extended/libsolv/libsolv/0001-solver_solve-only-disfavor-recommends-if-there-are-a.patch b/poky/meta/recipes-extended/libsolv/libsolv/0001-solver_solve-only-disfavor-recommends-if-there-are-a.patch new file mode 100644 index 000000000..139613a0a --- /dev/null +++ b/poky/meta/recipes-extended/libsolv/libsolv/0001-solver_solve-only-disfavor-recommends-if-there-are-a.patch @@ -0,0 +1,33 @@ +From 19d7cc87adba92d31d5fafdf7db00920d24a96a6 Mon Sep 17 00:00:00 2001 +From: Alejandro del Castillo <alejandro.delcastillo@ni.com> +Date: Wed, 6 Feb 2019 13:24:04 -0600 +Subject: [PATCH] solver_solve: only disfavor recommends if there are any + +In a repo that have pkg 'a' and 'b' available, and 'b' is disfavored, +but 'a' doesn't recommend 'b', libsolv segfaults on +solver_addrecommendsrules, since solv->recommendsruleq is null. Only +call solver_addrecommendsrules if there are recommends rules. + +Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com> + +Upstream-Status: Accepted +--- + src/solver.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/solver.c b/src/solver.c +index a80090d19..ad78327a8 100644 +--- a/src/solver.c ++++ b/src/solver.c +@@ -3920,7 +3920,7 @@ solver_solve(Solver *solv, Queue *job) + else + solv->yumobsrules = solv->yumobsrules_end = solv->nrules; + +- if (solv->havedisfavored && solv->strongrecommends) ++ if (solv->havedisfavored && solv->strongrecommends && solv->recommendsruleq) + solver_addrecommendsrules(solv); + else + solv->recommendsrules = solv->recommendsrules_end = solv->nrules; +-- +2.20.1 + diff --git a/poky/meta/recipes-extended/libsolv/libsolv/0002-Fixes-to-internal-fopencookie-implementation.patch b/poky/meta/recipes-extended/libsolv/libsolv/0002-Fixes-to-internal-fopencookie-implementation.patch deleted file mode 100644 index 93b8cc9c1..000000000 --- a/poky/meta/recipes-extended/libsolv/libsolv/0002-Fixes-to-internal-fopencookie-implementation.patch +++ /dev/null @@ -1,105 +0,0 @@ -From 84e12bf7ece49073c559dfd58005132a6099a964 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Neal=20Gompa=20=28=E3=83=8B=E3=83=BC=E3=83=AB=E3=83=BB?= - =?UTF-8?q?=E3=82=B3=E3=82=99=E3=83=B3=E3=83=8F=E3=82=9A=29?= - <ngompa13@gmail.com> -Date: Mon, 23 Nov 2015 18:19:41 -0500 -Subject: [PATCH 2/2] Fixes to internal fopencookie() implementation - -Credits to the fixes go to nsz on #musl on Freenode, -who gloriously fixed the implementation such that -the tests all pass. - -Upstream-Status: Denied [https://github.com/openSUSE/libsolv/pull/112] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - ---- - ext/solv_xfopen_fallback_fopencookie.c | 19 ++++++++++--------- - ext/solv_xfopen_fallback_fopencookie.h | 10 +++++----- - 2 files changed, 15 insertions(+), 14 deletions(-) - -diff --git a/ext/solv_xfopen_fallback_fopencookie.c b/ext/solv_xfopen_fallback_fopencookie.c -index 0ce2571..89426a9 100644 ---- a/ext/solv_xfopen_fallback_fopencookie.c -+++ b/ext/solv_xfopen_fallback_fopencookie.c -@@ -1,10 +1,10 @@ --/* -+/* - * Provides a very limited fopencookie() for environments with a libc - * that lacks it. -- * -- * Author: zhasha -+ * -+ * Authors: zhasha & nsz - * Modified for libsolv by Neal Gompa -- * -+ * - * This program is licensed under the BSD license, read LICENSE.BSD - * for further information. - * -@@ -33,7 +33,7 @@ static void *proxy(void *arg) - { - struct ctx *ctx = arg; - ssize_t r; -- size_t n; -+ size_t n, k; - - pthread_detach(pthread_self()); - -@@ -47,17 +47,18 @@ static void *proxy(void *arg) - } - if (r == 0) { break; } - -+ n = r, k = 0; - while (n > 0) { - r = ctx->io.write ? -- (ctx->io.write)(ctx->cookie, ctx->buf + ((size_t)r - n), n) : -- write(ctx->fd, ctx->buf + ((size_t)r - n), n); -+ (ctx->io.write)(ctx->cookie, ctx->buf + k, n) : -+ write(ctx->fd, ctx->buf + k, n); - if (r < 0) { - if (errno != EINTR) { break; } - continue; - } - if (r == 0) { break; } - -- n -= (size_t)r; -+ n -= r, k += r; - } - if (n > 0) { break; } - } -@@ -77,8 +78,8 @@ FILE *fopencookie(void *cookie, const char *mode, struct cookie_io_functions_t i - - switch (mode[0]) { - case 'a': -- case 'r': rd = 1; break; - case 'w': wr = 1; break; -+ case 'r': rd = 1; break; - default: - errno = EINVAL; - return NULL; -diff --git a/ext/solv_xfopen_fallback_fopencookie.h b/ext/solv_xfopen_fallback_fopencookie.h -index 6a7bfee..7223e3f 100644 ---- a/ext/solv_xfopen_fallback_fopencookie.h -+++ b/ext/solv_xfopen_fallback_fopencookie.h -@@ -1,13 +1,13 @@ --/* -+/* - * Provides a very limited fopencookie() for environments with a libc - * that lacks it. -- * -- * Author: zhasha -+ * -+ * Authors: zhasha & nsz - * Modified for libsolv by Neal Gompa -- * -+ * - * This program is licensed under the BSD license, read LICENSE.BSD - * for further information. -- * -+ * - */ - - #ifndef SOLV_XFOPEN_FALLBACK_FOPENCOOKIE_H --- -2.4.0 - diff --git a/poky/meta/recipes-extended/libsolv/libsolv_0.6.35.bb b/poky/meta/recipes-extended/libsolv/libsolv_0.7.3.bb index 12dfc5d3a..70c8dbc2e 100644 --- a/poky/meta/recipes-extended/libsolv/libsolv_0.6.35.bb +++ b/poky/meta/recipes-extended/libsolv/libsolv_0.7.3.bb @@ -7,12 +7,12 @@ LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8" DEPENDS = "expat zlib" -SRC_URI = "git://github.com/openSUSE/libsolv.git" -SRC_URI_append_libc-musl = " file://0001-Add-fallback-fopencookie-implementation.patch \ - file://0002-Fixes-to-internal-fopencookie-implementation.patch \ - " +SRC_URI = "git://github.com/openSUSE/libsolv.git \ + file://0001-solver_solve-only-disfavor-recommends-if-there-are-a.patch \ + file://0001-build-use-GNUInstallDirs.patch \ +" -SRCREV = "38c5374d4712667b0b6ada4bf78ddbb343095d0c" +SRCREV = "dc7d0f1c3113f2c8217563166906bef3eb5d1ee1" UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)" S = "${WORKDIR}/git" @@ -22,7 +22,7 @@ inherit cmake PACKAGECONFIG ??= "rpm" PACKAGECONFIG[rpm] = "-DENABLE_RPMMD=ON -DENABLE_RPMDB=ON,,rpm" -EXTRA_OECMAKE = "-DLIB=${baselib} -DMULTI_SEMANTICS=ON -DENABLE_COMPLEX_DEPS=ON" +EXTRA_OECMAKE = "-DMULTI_SEMANTICS=ON -DENABLE_COMPLEX_DEPS=ON" PACKAGES =+ "${PN}-tools ${PN}ext" diff --git a/poky/meta/recipes-extended/libtirpc/libtirpc_1.0.3.bb b/poky/meta/recipes-extended/libtirpc/libtirpc_1.0.3.bb index 17bc038d6..f978c8c8a 100644 --- a/poky/meta/recipes-extended/libtirpc/libtirpc_1.0.3.bb +++ b/poky/meta/recipes-extended/libtirpc/libtirpc_1.0.3.bb @@ -13,7 +13,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2 \ file://libtirpc-1.0.4-rc1.patch \ file://musl.patch \ " - +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/libtirpc/files/libtirpc/" +UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/" SRC_URI[md5sum] = "f8403a10695348854e71d525c4db5931" SRC_URI[sha256sum] = "86c3a78fc1bddefa96111dd233124c703b22a78884203c55c3e06b3be6a0fd5e" diff --git a/poky/meta/recipes-extended/lighttpd/lighttpd/lighttpd b/poky/meta/recipes-extended/lighttpd/lighttpd/lighttpd index bf89a60b7..82fbaa523 100644 --- a/poky/meta/recipes-extended/lighttpd/lighttpd/lighttpd +++ b/poky/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/poky/meta/recipes-extended/lighttpd/lighttpd/lighttpd.service b/poky/meta/recipes-extended/lighttpd/lighttpd/lighttpd.service deleted file mode 100644 index 66a907aa1..000000000 --- a/poky/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/poky/meta/recipes-extended/lighttpd/lighttpd_1.4.51.bb b/poky/meta/recipes-extended/lighttpd/lighttpd_1.4.53.bb index f28fd2f69..a0b350f35 100644 --- a/poky/meta/recipes-extended/lighttpd/lighttpd_1.4.51.bb +++ b/poky/meta/recipes-extended/lighttpd/lighttpd_1.4.53.bb @@ -16,12 +16,11 @@ SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.t file://index.html.lighttpd \ file://lighttpd.conf \ file://lighttpd \ - file://lighttpd.service \ file://0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch \ " -SRC_URI[md5sum] = "6e68c19601af332fa3c5f174245f59bf" -SRC_URI[sha256sum] = "2af9fdb265d1f025bfa634e13770239712ecbd585e4975b8226edf1df74e9c82" +SRC_URI[md5sum] = "f93436d8d400b2b0e26ee4bcc60b9ac7" +SRC_URI[sha256sum] = "3bdfce1cf3e9650a556a8c26fb15342c5717c63f530c54693db632b0371dcb78" PACKAGECONFIG ??= "openssl pcre zlib \ ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ @@ -57,13 +56,13 @@ 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 -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} + 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 ${WORKDIR}/lighttpd.service ${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' \ @@ -75,11 +74,11 @@ do_install_append() { FILES_${PN} += "${sysconfdir} /www" -CONFFILES_${PN} = "${sysconfdir}/lighttpd.conf" +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, '^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='') + do_split_packages(d, lighttpd_libdir, r'^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='') } diff --git a/poky/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch b/poky/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch index 04cb588db..79805b514 100644 --- a/poky/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch +++ b/poky/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch @@ -1,4 +1,4 @@ -From 517cbff66c8bdbf455bc3b7c1a85a4f990d0f9a6 Mon Sep 17 00:00:00 2001 +From c637948ebab5aff5641700c5cf613321ca0a6e6b 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 @@ -10,14 +10,14 @@ Upstream-Status: Pending Signed-off-by: Robert Yang <liezhi.yang@windriver.com> --- - logrotate.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++----------- - 1 file changed, 60 insertions(+), 12 deletions(-) + logrotate.c | 71 ++++++++++++++++++++++++++++++++++++++++++++--------- + 1 file changed, 59 insertions(+), 12 deletions(-) diff --git a/logrotate.c b/logrotate.c -index 4ad58d4..ba05884 100644 +index 54dac90..bf3ec23 100644 --- a/logrotate.c +++ b/logrotate.c -@@ -1315,6 +1315,54 @@ static int findNeedRotating(struct logInfo *log, int logNum, int force) +@@ -1360,6 +1360,53 @@ static int findNeedRotating(struct logInfo *log, int logNum, int force) return 0; } @@ -68,84 +68,83 @@ index 4ad58d4..ba05884 100644 + return 1; +} + -+ - static int prerotateSingleLog(struct logInfo *log, int logNum, - struct logState *state, struct logNames *rotNames) - { -@@ -1674,15 +1722,15 @@ static int prerotateSingleLog(struct logInfo *log, int logNum, - } + /* find the rotated file with the highest index */ + static int findLastRotated(const struct logNames *rotNames, + const char *fileext, const char *compext) +@@ -1800,15 +1847,15 @@ static int prerotateSingleLog(struct logInfo *log, int 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; - } -@@ -1767,21 +1815,21 @@ static int rotateSingleLog(struct logInfo *log, int logNum, - 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; + } +@@ -1891,21 +1938,21 @@ static int rotateSingleLog(struct logInfo *log, int 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], rotNames->finalName, - strerror(errno)); - hasErrors = 1; -@@ -2170,7 +2218,7 @@ static 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; + } + } + 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; +@@ -2297,7 +2344,7 @@ static int rotateLogSet(struct logInfo *log, int force) return hasErrors; } -static int writeState(const char *stateFilename) +static int writeState(struct logInfo *log, char *stateFilename) { - struct logState *p; - FILE *f; -@@ -2322,7 +2370,7 @@ static int writeState(const char *stateFilename) - fclose(f); + struct logState *p; + FILE *f; +@@ -2460,7 +2507,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", -@@ -2648,7 +2696,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)) { + unlink(tmpFilename); + error = 1; + message(MESS_ERROR, "error renaming temp state file %s\n", +@@ -2805,7 +2852,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); } -- -1.8.3.1 +2.18.1 diff --git a/poky/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch b/poky/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch index 793d70259..96ff098a3 100644 --- a/poky/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch +++ b/poky/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch @@ -1,4 +1,7 @@ -Disable the check for different filesystems +From e47796c8e8270a3d14f0b06af8a9e916c2225514 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. @@ -7,26 +10,29 @@ 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 633b843..99a4a3b 100644 --- a/config.c +++ b/config.c -@@ -1493,15 +1493,6 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig) - goto error; - } - } +@@ -1765,15 +1765,6 @@ duperror: + 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[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[i]); +- goto error; +- } + } + } +-- +2.18.1 + diff --git a/poky/meta/recipes-extended/logrotate/logrotate_3.14.0.bb b/poky/meta/recipes-extended/logrotate/logrotate_3.15.0.bb index ccc68ad3a..0f3da2b94 100644 --- a/poky/meta/recipes-extended/logrotate/logrotate_3.14.0.bb +++ b/poky/meta/recipes-extended/logrotate/logrotate_3.15.0.bb @@ -25,8 +25,8 @@ SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz file://disable-check-different-filesystems.patch \ " -SRC_URI[md5sum] = "1c0f6e6e490c4bcac0a1e77ad1310683" -SRC_URI[sha256sum] = "4703bdc0e2df3b322f9dff0aafc99aa9172c9e4acae28b7c924cc7d4e5b29d55" +SRC_URI[md5sum] = "320046f0b9fc38337e8827d4c5a866a0" +SRC_URI[sha256sum] = "313612c4776a305393454c874ef590d8acf84c9ffa648717731dfe902284ff8f" PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)}" @@ -72,7 +72,7 @@ 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-default ${D}${sysconfdir}/logrotate.conf + 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 diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch b/poky/meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch deleted file mode 100644 index 18eba27c2..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch +++ /dev/null @@ -1,41 +0,0 @@ -From b909805b4fc1b72e0ce299afb4abc02720ee81da Mon Sep 17 00:00:00 2001 -From: Dengke Du <dengke.du@windriver.com> -Date: Wed, 12 Sep 2018 14:24:35 +0800 -Subject: [PATCH] mmap15: mips64 return EINVAL - -In mips64 kernel, system check the addr that passed to mmap: - - if (TASK_SIZE - len < addr) - return -EINVAL; - -Link: https://github.com/torvalds/linux/blob/master/arch/mips/mm/mmap.c#L71 - -Upstream-Status: Submitted [https://github.com/linux-test-project/ltp/pull/394] - -Signed-off-by: Dengke Du <dengke.du@windriver.com> ---- - testcases/kernel/syscalls/mmap/mmap15.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/testcases/kernel/syscalls/mmap/mmap15.c b/testcases/kernel/syscalls/mmap/mmap15.c -index eff27d6..a10b5c7 100644 ---- a/testcases/kernel/syscalls/mmap/mmap15.c -+++ b/testcases/kernel/syscalls/mmap/mmap15.c -@@ -81,9 +81,14 @@ int main(int ac, char **av) - } - - if (errno != ENOMEM) { -+#ifdef __mips__ -+ tst_resm(TPASS | TERRNO, "mmap into high region " -+ "failed as expected"); -+#else - tst_resm(TFAIL | TERRNO, "mmap into high region " - "failed unexpectedly - expect " - "errno=ENOMEM, got"); -+#endif - } else { - tst_resm(TPASS | TERRNO, "mmap into high region " - "failed as expected"); --- -2.7.4 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-netns_helper.sh-use-ping-6-when-ping6-is-not-avaliab.patch b/poky/meta/recipes-extended/ltp/ltp/0001-netns_helper.sh-use-ping-6-when-ping6-is-not-avaliab.patch deleted file mode 100644 index 32e7a0eb2..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0001-netns_helper.sh-use-ping-6-when-ping6-is-not-avaliab.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 76d8343ad300f6507233abcdf97629290e35848a Mon Sep 17 00:00:00 2001 -From: Lei Yang <Lei.Yang@windriver.com> -Date: Wed, 29 Aug 2018 11:51:24 +0800 -Subject: [PATCH] netns_helper.sh: use 'ping -6' when ping6 is not avaliable - -ping6 has been merged into ping since 2015 by using "ping -6" -in some distributions (e.g. OpenEmbedded) they dropped ping6 completely -this patch will let both "ping -6" and ping6 work. - -[pvorel: change was done in s20150815: -ebad35f ("ping: merge `ping6` command into `ping`"), -before that release switch '-6' didn't exist. -Upstream leaves ping6 symlink to distributions.] - -Upstream-Status: Backport -[https://github.com/linux-test-project/ltp/commit/76d8343ad300f6507233abcdf97629290e35848a] - -Signed-off-by: Lei Yang <Lei.Yang@windriver.com> -Signed-off-by: Petr Vorel <pvorel@suse.cz> -Signed-off-by: Yi Zhao <yi.zhao@windriver.com> ---- - testcases/kernel/containers/netns/netns_helper.sh | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/testcases/kernel/containers/netns/netns_helper.sh b/testcases/kernel/containers/netns/netns_helper.sh -index 6aea10b..a9d0459 100755 ---- a/testcases/kernel/containers/netns/netns_helper.sh -+++ b/testcases/kernel/containers/netns/netns_helper.sh -@@ -168,7 +168,12 @@ netns_setup() - ipv6) - IFCONF_IN6_ARG="inet6 add" - IP0=$6; IP1=$7; -- tping="ping6"; NETMASK=64 -+ if which ping6 >/dev/null 2>&1; then -+ tping="ping6" -+ else -+ tping="ping -6" -+ fi -+ NETMASK=64 - ;; - *) - tst_brkm TBROK "second argument must be an ip version (ipv4|ipv6)" --- -2.7.4 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch b/poky/meta/recipes-extended/ltp/ltp/0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch index 4d771c0b9..84736053b 100644 --- a/poky/meta/recipes-extended/ltp/ltp/0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch +++ b/poky/meta/recipes-extended/ltp/ltp/0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch @@ -43,8 +43,8 @@ index de51d43..810e5c8 100644 + * 3. Should get ENOMEM or EINVAL. */ - #define _XOPEN_SOURCE 600 -@@ -93,8 +93,8 @@ int main(void) + #include <stdio.h> +@@ -92,8 +92,8 @@ int main(void) (unsigned long)len); pa = mmap(addr, len, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, fd, 0); @@ -55,7 +55,7 @@ index de51d43..810e5c8 100644 exit(PTS_PASS); } -@@ -103,6 +103,6 @@ int main(void) +@@ -102,6 +102,6 @@ int main(void) else munmap(pa, len); close(fd); diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-sigwaitinfo01-recent-glibc-calls-syscall-directly.patch b/poky/meta/recipes-extended/ltp/ltp/0001-sigwaitinfo01-recent-glibc-calls-syscall-directly.patch deleted file mode 100644 index c412c89e9..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0001-sigwaitinfo01-recent-glibc-calls-syscall-directly.patch +++ /dev/null @@ -1,75 +0,0 @@ -From bb977ca0716ae98f10102c7122fe15bc0ddb5356 Mon Sep 17 00:00:00 2001 -From: "Hongzhi.Song" <hongzhi.song@windriver.com> -Date: Thu, 20 Sep 2018 21:49:02 -0400 -Subject: [PATCH] sigwaitinfo01: recent glibc calls syscall directly - -glibc commit - 8b0e795aaa44 ("Simplify Linux sig{timed}wait{info} implementations") -changed sigwaitinfo to call sigtimedwait, which calls rt_sigtimedwait -syscall directly. - -So, an invalid pointer no longer crashes child process and test -reports failure. Fix it by accepting either crash or EFAULT. - -Signed-off-by: Jan Stancek <jstancek@redhat.com> - -Upstream-Status: Submitted [https://lists.linux.it/pipermail/ltp/2018-September/009338.html] - -Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com> ---- - .../kernel/syscalls/sigwaitinfo/sigwaitinfo01.c | 30 +++++++++++++++++++--- - 1 file changed, 26 insertions(+), 4 deletions(-) - -diff --git a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c -index 95a9436a4..8fa8ac34b 100644 ---- a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c -+++ b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c -@@ -371,19 +371,41 @@ void test_bad_address2(swi_func sigwaitinfo, int signo) - tst_brkm(TBROK | TERRNO, NULL, "fork() failed"); - case 0: - signal(SIGSEGV, SIG_DFL); -+ -+ /* -+ * depending on glibc implementation we should -+ * either crash or get EFAULT -+ */ - TEST(sigwaitinfo((void *)1, NULL, NULL)); - -- _exit(0); -+ if (TEST_RETURN == -1 && TEST_ERRNO == EFAULT) -+ _exit(0); -+ -+ tst_resm(TINFO, "swi_func returned: %ld, errno: %d", -+ TEST_RETURN, TEST_ERRNO); -+ _exit(1); -+ - break; - default: - break; - } - - SUCCEED_OR_DIE(waitpid, "waitpid failed", pid, &status, 0); -- if (WIFSIGNALED(status) && WTERMSIG(status) == SIGSEGV) -+ -+ if ((WIFSIGNALED(status) && WTERMSIG(status) == SIGSEGV) -+ || (WIFEXITED(status) && WEXITSTATUS(status) == 0)) { - tst_resm(TPASS, "Test passed"); -- else -- tst_resm(TFAIL, "Unrecognised child exit code"); -+ return; -+ } -+ -+ if (WIFEXITED(status)) { -+ tst_resm(TFAIL, "Unrecognised child exit code: %d", -+ WEXITSTATUS(status)); -+ } -+ if (WIFSIGNALED(status)) { -+ tst_resm(TFAIL, "Unrecognised child termsig: %d", -+ WTERMSIG(status)); -+ } - } - - void test_bad_address3(swi_func sigwaitinfo, int signo) --- -2.11.0 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-syscalls-fcntl-make-OFD-command-use-fcntl64-syscall-.patch b/poky/meta/recipes-extended/ltp/ltp/0001-syscalls-fcntl-make-OFD-command-use-fcntl64-syscall-.patch deleted file mode 100644 index 2755596d0..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0001-syscalls-fcntl-make-OFD-command-use-fcntl64-syscall-.patch +++ /dev/null @@ -1,184 +0,0 @@ -From 8de03ea1200480b922d5ba05b69dc94db60496f5 Mon Sep 17 00:00:00 2001 -From: "Hongzhi.Song" <hongzhi.song@windriver.com> -Date: Sat, 15 Sep 2018 22:39:32 -0400 -Subject: [PATCH] syscalls/fcntl: make OFD command use fcntl64() syscall on - 32-bit - -To cope with glibc commit: - 06ab719d30b0 ("Fix Linux fcntl OFD locks for non-LFS architectures -(BZ#20251)") - -WIP: Still need to test this with new glibc. - Test with old glibc look OK so far. - -Signed-off-by: Jan Stancek <jstancek@redhat.com> - -Upstream-Status: Backport - Backported from upstream maillist - https://lists.linux.it/pipermail/ltp/2018-September/009370.html - -Signed-off-by: Hongzhi Song <hongzhi.song@windriver.com> ---- - testcases/kernel/syscalls/fcntl/fcntl34.c | 12 +++++++--- - testcases/kernel/syscalls/fcntl/fcntl36.c | 23 +++++++++++++----- - testcases/kernel/syscalls/fcntl/fcntl_common.h | 32 ++++++++++++++++++++++++++ - 3 files changed, 58 insertions(+), 9 deletions(-) - create mode 100644 testcases/kernel/syscalls/fcntl/fcntl_common.h - -diff --git a/testcases/kernel/syscalls/fcntl/fcntl34.c b/testcases/kernel/syscalls/fcntl/fcntl34.c -index aa29cf9..109f834 100644 ---- a/testcases/kernel/syscalls/fcntl/fcntl34.c -+++ b/testcases/kernel/syscalls/fcntl/fcntl34.c -@@ -28,6 +28,7 @@ - #include "lapi/fcntl.h" - #include "tst_safe_pthread.h" - #include "tst_test.h" -+#include "fcntl_common.h" - - static int thread_cnt; - static const int max_thread_cnt = 32; -@@ -68,7 +69,12 @@ void *thread_fn_01(void *arg) - - memset(buf, (intptr_t)arg, write_size); - -- struct flock64 lck = { -+ /* see explanation in fcntl_common.h */ -+ #ifdef USE_STRUCT_FLOCK -+ struct flock lck = { -+ #else -+ struct flock64 lck = { -+ #endif - .l_whence = SEEK_SET, - .l_start = 0, - .l_len = 1, -@@ -76,13 +82,13 @@ void *thread_fn_01(void *arg) - - for (i = 0; i < writes_num; ++i) { - lck.l_type = F_WRLCK; -- SAFE_FCNTL(fd, F_OFD_SETLKW, &lck); -+ my_fcntl(fd, F_OFD_SETLKW, &lck); - - SAFE_LSEEK(fd, 0, SEEK_END); - SAFE_WRITE(1, fd, buf, write_size); - - lck.l_type = F_UNLCK; -- SAFE_FCNTL(fd, F_OFD_SETLKW, &lck); -+ my_fcntl(fd, F_OFD_SETLKW, &lck); - - sched_yield(); - } -diff --git a/testcases/kernel/syscalls/fcntl/fcntl36.c b/testcases/kernel/syscalls/fcntl/fcntl36.c -index 3246d13..f263b6b 100644 ---- a/testcases/kernel/syscalls/fcntl/fcntl36.c -+++ b/testcases/kernel/syscalls/fcntl/fcntl36.c -@@ -57,6 +57,7 @@ - #include "lapi/fcntl.h" - #include "tst_safe_pthread.h" - #include "tst_test.h" -+#include "fcntl_common.h" - - static int thread_cnt; - static int fail_flag = 0; -@@ -87,7 +88,12 @@ static void *fn_ofd_w(void *arg) - int fd = SAFE_OPEN(fname, O_RDWR); - long wt = pa->cnt; - -- struct flock64 lck = { -+ /* see explanation in fcntl_common.h */ -+ #ifdef USE_STRUCT_FLOCK -+ struct flock lck = { -+ #else -+ struct flock64 lck = { -+ #endif - .l_whence = SEEK_SET, - .l_start = pa->offset, - .l_len = pa->length, -@@ -99,13 +105,13 @@ static void *fn_ofd_w(void *arg) - memset(buf, wt, pa->length); - - lck.l_type = F_WRLCK; -- SAFE_FCNTL(fd, F_OFD_SETLKW, &lck); -+ my_fcntl(fd, F_OFD_SETLKW, &lck); - - SAFE_LSEEK(fd, pa->offset, SEEK_SET); - SAFE_WRITE(1, fd, buf, pa->length); - - lck.l_type = F_UNLCK; -- SAFE_FCNTL(fd, F_OFD_SETLKW, &lck); -+ my_fcntl(fd, F_OFD_SETLKW, &lck); - - wt++; - if (wt >= 255) -@@ -166,7 +172,12 @@ static void *fn_ofd_r(void *arg) - int i; - int fd = SAFE_OPEN(fname, O_RDWR); - -- struct flock64 lck = { -+ /* see explanation in fcntl_common.h */ -+ #ifdef USE_STRUCT_FLOCK -+ struct flock lck = { -+ #else -+ struct flock64 lck = { -+ #endif - .l_whence = SEEK_SET, - .l_start = pa->offset, - .l_len = pa->length, -@@ -178,7 +189,7 @@ static void *fn_ofd_r(void *arg) - memset(buf, 0, pa->length); - - lck.l_type = F_RDLCK; -- SAFE_FCNTL(fd, F_OFD_SETLKW, &lck); -+ my_fcntl(fd, F_OFD_SETLKW, &lck); - - /* rlock acquired */ - SAFE_LSEEK(fd, pa->offset, SEEK_SET); -@@ -209,7 +220,7 @@ static void *fn_ofd_r(void *arg) - } - - lck.l_type = F_UNLCK; -- SAFE_FCNTL(fd, F_OFD_SETLK, &lck); -+ my_fcntl(fd, F_OFD_SETLK, &lck); - - sched_yield(); - } -diff --git a/testcases/kernel/syscalls/fcntl/fcntl_common.h b/testcases/kernel/syscalls/fcntl/fcntl_common.h -new file mode 100644 -index 0000000..3fe399b ---- /dev/null -+++ b/testcases/kernel/syscalls/fcntl/fcntl_common.h -@@ -0,0 +1,32 @@ -+#include "lapi/syscalls.h" -+ -+/* -+ * glibc commit: -+ * 06ab719d30b0 ("Fix Linux fcntl OFD locks for non-LFS architectures (BZ#20251)") -+ * changed behavior of arg parameter for OFD commands. It is no -+ * longer passing arg directly to syscall, but expects it to be -+ * 'struct flock'. -+ * -+ * On 64-bit or _FILE_OFFSET_BITS == 64 we can use fcntl() and -+ * struct flock with any glibc version. struct flock and flock64 -+ * should be identical. -+ * -+ * On 32-bit, older glibc would pass arg directly, recent one treats -+ * it as 'struct flock' and converts it to 'struct flock64'. -+ * So, for 32-bit we use fcntl64 syscall directly with struct flock64. -+ */ -+#if __WORDSIZE == 64 || _FILE_OFFSET_BITS == 64 -+#define USE_STRUCT_FLOCK -+static int my_fcntl(int fd, int cmd, void *lck) -+{ -+ return SAFE_FCNTL(fd, cmd, lck); -+} -+#else -+static int my_fcntl(int fd, int cmd, void *lck) -+{ -+ int ret = tst_syscall(__NR_fcntl64, fd, cmd, lck); -+ if (ret == -1) -+ tst_brk(TBROK|TERRNO, "fcntl64"); -+ return ret; -+} -+#endif --- -2.8.1 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch b/poky/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch index 2df385591..3c66c9436 100644 --- a/poky/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch +++ b/poky/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch @@ -42,7 +42,7 @@ diff --git a/testcases/kernel/Makefile b/testcases/kernel/Makefile index 50a12fa..4f1987f 100644 --- a/testcases/kernel/Makefile +++ b/testcases/kernel/Makefile -@@ -48,13 +48,16 @@ SUBDIRS += connectors \ +@@ -49,12 +49,15 @@ SUBDIRS += connectors \ logging \ mem \ numa \ @@ -51,7 +51,6 @@ index 50a12fa..4f1987f 100644 security \ timers \ tracing \ - module \ +ifneq ($(LIBC),musl) +SUBDIRS += pty diff --git a/poky/meta/recipes-extended/ltp/ltp/0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch b/poky/meta/recipes-extended/ltp/ltp/0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch index 2f4ca6375..6e6dbf398 100644 --- a/poky/meta/recipes-extended/ltp/ltp/0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch +++ b/poky/meta/recipes-extended/ltp/ltp/0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch @@ -16,7 +16,7 @@ diff --git a/include/old/test.h b/include/old/test.h index b36764d83..cc6f1b551 100644 --- a/include/old/test.h +++ b/include/old/test.h -@@ -44,6 +44,9 @@ +@@ -17,6 +17,9 @@ #include <string.h> #include <stdlib.h> #include <stdint.h> diff --git a/poky/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch b/poky/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch index 428ac3004..7311ee2e4 100644 --- a/poky/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch +++ b/poky/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch @@ -1,7 +1,7 @@ -From a3cbee31daae2466bc8dcac36b33a01352693346 Mon Sep 17 00:00:00 2001 +From fc2b47ad979a87bfbd11aeea3f67c26e7fb39e30 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Thu, 7 Jan 2016 19:40:08 +0000 -Subject: [PATCH 01/26] Check if __GLIBC_PREREQ is defined before using it +Subject: [PATCH] Check if __GLIBC_PREREQ is defined before using it __GLIBC_PREREQ is specific to glibc so it should be checked if it is defined or not. @@ -10,13 +10,12 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> Upstream-Status: Pending --- - testcases/kernel/syscalls/accept4/accept4_01.c | 9 ++++- - testcases/kernel/syscalls/getcpu/getcpu01.c | 39 +++++++++++++++++++++- - .../sched_getaffinity/sched_getaffinity01.c | 26 +++++++++++++++ - 3 files changed, 72 insertions(+), 2 deletions(-) + .../kernel/syscalls/accept4/accept4_01.c | 9 ++++++- + .../sched_getaffinity/sched_getaffinity01.c | 26 +++++++++++++++++++ + 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/testcases/kernel/syscalls/accept4/accept4_01.c b/testcases/kernel/syscalls/accept4/accept4_01.c -index 6072bfa..2b090cb 100644 +index dec4ef93b..c5d74b07f 100644 --- a/testcases/kernel/syscalls/accept4/accept4_01.c +++ b/testcases/kernel/syscalls/accept4/accept4_01.c @@ -64,6 +64,7 @@ static void cleanup(void) @@ -59,131 +58,8 @@ index 6072bfa..2b090cb 100644 #else acceptfd = accept4(lfd, (struct sockaddr *)&claddr, &addrlen, closeonexec_flag | nonblock_flag); -diff --git a/testcases/kernel/syscalls/getcpu/getcpu01.c b/testcases/kernel/syscalls/getcpu/getcpu01.c -index c927512..921b107 100644 ---- a/testcases/kernel/syscalls/getcpu/getcpu01.c -+++ b/testcases/kernel/syscalls/getcpu/getcpu01.c -@@ -62,6 +62,7 @@ - #include <dirent.h> - - #if defined(__i386__) || defined(__x86_64__) -+#if defined(__GLIBC__) - #if __GLIBC_PREREQ(2,6) - #if defined(__x86_64__) - #include <utmpx.h> -@@ -75,10 +76,17 @@ int sys_support = 0; - #else - int sys_support = 0; - #endif -+#else -+int sys_support = 0; -+#endif - -+#if defined(__GLIBC__) - #if !(__GLIBC_PREREQ(2, 7)) - #define CPU_FREE(ptr) free(ptr) - #endif -+#else -+#define CPU_FREE(ptr) free(ptr) -+#endif - - void cleanup(void); - void setup(void); -@@ -164,7 +172,11 @@ static inline int getcpu(unsigned *cpu_id, unsigned *node_id, - { - #if defined(__i386__) - return syscall(318, cpu_id, node_id, cache_struct); --#elif __GLIBC_PREREQ(2,6) -+#elif defined(__GLIBC__) -+#if __GLIBC_PREREQ(2,6) -+ *cpu_id = sched_getcpu(); -+#endif -+#else - *cpu_id = sched_getcpu(); - #endif - return 0; -@@ -191,15 +203,20 @@ unsigned int set_cpu_affinity(void) - cpu_set_t *set; - size_t size; - int nrcpus = 1024; -+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) - #if __GLIBC_PREREQ(2, 7) - realloc: - set = CPU_ALLOC(nrcpus); - #else - set = malloc(sizeof(cpu_set_t)); - #endif -+#else -+ set = malloc(sizeof(cpu_set_t)); -+#endif - if (set == NULL) { - tst_brkm(TFAIL, NULL, "CPU_ALLOC:errno:%d", errno); - } -+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) - #if __GLIBC_PREREQ(2, 7) - size = CPU_ALLOC_SIZE(nrcpus); - CPU_ZERO_S(size, set); -@@ -207,8 +224,13 @@ realloc: - size = sizeof(cpu_set_t); - CPU_ZERO(set); - #endif -+#else -+ size = sizeof(cpu_set_t); -+ CPU_ZERO(set); -+#endif - if (sched_getaffinity(0, size, set) < 0) { - CPU_FREE(set); -+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) - #if __GLIBC_PREREQ(2, 7) - if (errno == EINVAL && nrcpus < (1024 << 8)) { - nrcpus = nrcpus << 2; -@@ -220,10 +242,17 @@ realloc: - "NR_CPUS of the kernel is more than 1024, so we'd better use a newer glibc(>= 2.7)"); - else - #endif -+#else -+ if (errno == EINVAL) -+ tst_resm(TFAIL, -+ "NR_CPUS of the kernel is more than 1024, so we'd better use a newer glibc(>= 2.7)"); -+ else -+#endif - tst_resm(TFAIL, "sched_getaffinity:errno:%d", errno); - tst_exit(); - } - cpu_max = max_cpuid(size, set); -+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) - #if __GLIBC_PREREQ(2, 7) - CPU_ZERO_S(size, set); - CPU_SET_S(cpu_max, size, set); -@@ -231,6 +260,10 @@ realloc: - CPU_ZERO(set); - CPU_SET(cpu_max, set); - #endif -+#else -+ CPU_ZERO(set); -+ CPU_SET(cpu_max, set); -+#endif - if (sched_setaffinity(0, size, set) < 0) { - CPU_FREE(set); - tst_brkm(TFAIL, NULL, "sched_setaffinity:errno:%d", errno); -@@ -247,11 +280,15 @@ unsigned int max_cpuid(size_t size, cpu_set_t * set) - { - unsigned int index, max = 0; - for (index = 0; index < size * BITS_PER_BYTE; index++) -+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) - #if __GLIBC_PREREQ(2, 7) - if (CPU_ISSET_S(index, size, set)) - #else - if (CPU_ISSET(index, set)) - #endif -+#else -+ if (CPU_ISSET(index, set)) -+#endif - max = index; - return max; - } diff --git a/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c b/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c -index 9d6a81a..4ed13b2 100644 +index 02f04b909..d906d7e09 100644 --- a/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c +++ b/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c @@ -67,9 +67,11 @@ do { \ @@ -198,7 +74,7 @@ index 9d6a81a..4ed13b2 100644 int main(int ac, char **av) { -@@ -96,14 +98,19 @@ static void do_test(void) +@@ -96,17 +98,26 @@ static void do_test(void) pid_t unused_pid; unsigned len; @@ -206,27 +82,26 @@ index 9d6a81a..4ed13b2 100644 #if __GLIBC_PREREQ(2, 7) realloc: mask = CPU_ALLOC(nrcpus); - #else - mask = malloc(sizeof(cpu_set_t)); - #endif +#else + mask = malloc(sizeof(cpu_set_t)); +#endif + #else + mask = malloc(sizeof(cpu_set_t)); + #endif if (mask == NULL) tst_brkm(TFAIL | TTERRNO, cleanup, "fail to get enough memory"); +#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) #if __GLIBC_PREREQ(2, 7) len = CPU_ALLOC_SIZE(nrcpus); CPU_ZERO_S(len, mask); -@@ -111,10 +118,15 @@ realloc: - len = sizeof(cpu_set_t); - CPU_ZERO(mask); - #endif +#else + len = sizeof(cpu_set_t); + CPU_ZERO(mask); +#endif - /* positive test */ + #else + len = sizeof(cpu_set_t); + CPU_ZERO(mask); +@@ -115,11 +126,18 @@ realloc: TEST(sched_getaffinity(0, len, mask)); if (TEST_RETURN == -1) { CPU_FREE(mask); @@ -234,50 +109,43 @@ index 9d6a81a..4ed13b2 100644 #if __GLIBC_PREREQ(2, 7) if (errno == EINVAL && nrcpus < (1024 << 8)) { nrcpus = nrcpus << 2; -@@ -126,17 +138,27 @@ realloc: - "newer glibc(>= 2.7)"); - else - #endif + goto realloc; + } +#else + if (errno == EINVAL) + tst_resm(TFAIL, "NR_CPUS > 1024, we'd better use a " + "newer glibc(>= 2.7)"); + else +#endif - tst_resm(TFAIL | TTERRNO, "fail to get cpu affinity"); - cleanup(); - } else { + #else + if (errno == EINVAL) + tst_resm(TFAIL, "NR_CPUS > 1024, we'd better use a " +@@ -132,8 +150,12 @@ realloc: tst_resm(TINFO, "cpusetsize is %d", len); tst_resm(TINFO, "mask.__bits[0] = %lu ", mask->__bits[0]); for (i = 0; i < num; i++) { +#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) #if __GLIBC_PREREQ(2, 7) TEST(CPU_ISSET_S(i, len, mask)); - #else - TEST(CPU_ISSET(i, mask)); - #endif +#else + TEST(CPU_ISSET(i, mask)); +#endif - if (TEST_RETURN != -1) - tst_resm(TPASS, "sched_getaffinity() succeed, " - "this process %d is running " -@@ -144,11 +166,15 @@ realloc: + #else + TEST(CPU_ISSET(i, mask)); + #endif +@@ -144,8 +166,12 @@ realloc: } } +#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) #if __GLIBC_PREREQ(2, 7) CPU_ZERO_S(len, mask); - #else - CPU_ZERO(mask); - #endif +#else + CPU_ZERO(mask); +#endif - /* negative tests */ - QUICK_TEST(sched_getaffinity(0, len, (cpu_set_t *) - 1)); - QUICK_TEST(sched_getaffinity(0, 0, mask)); + #else + CPU_ZERO(mask); + #endif -- -1.9.1 +2.17.1 diff --git a/poky/meta/recipes-extended/ltp/ltp/0035-fix-test_proc_kill-hang.patch b/poky/meta/recipes-extended/ltp/ltp/0035-fix-test_proc_kill-hang.patch index 71e32a5e5..665da3bef 100644 --- a/poky/meta/recipes-extended/ltp/ltp/0035-fix-test_proc_kill-hang.patch +++ b/poky/meta/recipes-extended/ltp/ltp/0035-fix-test_proc_kill-hang.patch @@ -19,7 +19,7 @@ diff --git a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh b/testca index b785fe3..2918cc5 100755 --- a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh +++ b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh -@@ -283,6 +283,7 @@ test_proc_kill() +@@ -291,6 +291,7 @@ test_proc_kill() pid=$! TST_CHECKPOINT_WAIT 0 echo $pid > tasks diff --git a/poky/meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch b/poky/meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch index e7c927e11..ec5e2ef95 100644 --- a/poky/meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch +++ b/poky/meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch @@ -21,16 +21,18 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> 1 file changed, 52 insertions(+), 40 deletions(-) diff --git a/testcases/commands/ar/ar01 b/testcases/commands/ar/ar01 -index ddab2e0..d688f76 100644 +index be105f6da..813a51d9c 100644 --- a/testcases/commands/ar/ar01 +++ b/testcases/commands/ar/ar01 -@@ -23,14 +23,26 @@ - # This is a basic ar command test. +@@ -24,16 +24,28 @@ # + AR="${AR:=ar}" TST_CNT=17 +TST_SETUP=setup TST_TESTFUNC=test TST_NEEDS_TMPDIR=1 + TST_NEEDS_CMDS="$AR" + . tst_test.sh +setup() @@ -53,7 +55,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp -@@ -47,9 +59,9 @@ test1() +@@ -50,9 +62,9 @@ test1() test2() { @@ -66,7 +68,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file1.in\nfile4.in\nfile2.in\nfile3.in\n" > ar.exp -@@ -66,8 +78,8 @@ test2() +@@ -69,8 +81,8 @@ test2() test3() { @@ -77,7 +79,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp -@@ -84,9 +96,9 @@ test3() +@@ -87,9 +99,9 @@ test3() test4() { @@ -90,7 +92,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp -@@ -103,7 +115,7 @@ test4() +@@ -106,7 +118,7 @@ test4() test5() { @@ -99,7 +101,7 @@ index ddab2e0..d688f76 100644 if [ -s ar.out ]; then tst_res TFAIL "ar produced output unexpectedly (-c)" -@@ -117,7 +129,7 @@ test5() +@@ -120,7 +132,7 @@ test5() test6() { @@ -108,7 +110,7 @@ index ddab2e0..d688f76 100644 if [ -s ar.out ]; then tst_res TFAIL "ar produced output unexpectedly (-qc)" -@@ -131,9 +143,9 @@ test6() +@@ -134,9 +146,9 @@ test6() test7() { @@ -121,7 +123,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file3.in\n" > ar.exp -@@ -150,9 +162,9 @@ test7() +@@ -153,9 +165,9 @@ test7() test8() { @@ -134,7 +136,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp -@@ -169,8 +181,8 @@ test8() +@@ -172,8 +184,8 @@ test8() test9() { @@ -145,7 +147,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp -@@ -187,9 +199,9 @@ test9() +@@ -190,9 +202,9 @@ test9() test10() { @@ -158,7 +160,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp -@@ -206,9 +218,9 @@ test10() +@@ -209,9 +221,9 @@ test10() test11() { @@ -171,7 +173,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp -@@ -225,9 +237,9 @@ test11() +@@ -228,9 +240,9 @@ test11() test12() { @@ -184,7 +186,7 @@ index ddab2e0..d688f76 100644 printf "This is file one\nThis is file two\nThis is file three\n" > ar.exp -@@ -244,9 +256,9 @@ test12() +@@ -247,9 +259,9 @@ test12() test13() { @@ -197,7 +199,7 @@ index ddab2e0..d688f76 100644 ROD ar -t lib.a \> ar.out printf "file1.in\nfile2.in\nfile3.in\nfile4.in\n" > ar.exp -@@ -264,14 +276,14 @@ test13() +@@ -267,14 +279,14 @@ test13() test14() { ROD touch file0.in @@ -214,7 +216,7 @@ index ddab2e0..d688f76 100644 file0_mtime2=$(ar -tv lib.a | grep file0.in) file1_mtime2=$(ar -tv lib.a | grep file1.in) -@@ -293,7 +305,7 @@ test14() +@@ -296,7 +308,7 @@ test14() test15() { @@ -223,7 +225,7 @@ index ddab2e0..d688f76 100644 ROD ar -tv lib.a \> ar.out if grep -q '[rwx-]\{9\} [0-9].*/[0-9].*\s*[0-9].*.*file1.in' ar.out; then -@@ -308,9 +320,9 @@ test15() +@@ -311,9 +323,9 @@ test15() test16() { @@ -236,7 +238,7 @@ index ddab2e0..d688f76 100644 printf "x - file1.in\nx - file2.in\nx - file3.in\n" > ar.exp -@@ -332,8 +344,8 @@ test16() +@@ -335,8 +347,8 @@ test16() test17() { @@ -248,5 +250,5 @@ index ddab2e0..d688f76 100644 printf "x - file2.in\n" > ar.exp -- -2.7.4 +2.19.0.rc2 diff --git a/poky/meta/recipes-extended/ltp/ltp/0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch b/poky/meta/recipes-extended/ltp/ltp/0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch deleted file mode 100644 index 0245a89f3..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 23518508de307790231d16af307291f1b45e903a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.diaz@linaro.org> -Date: Tue, 5 Jun 2018 15:36:30 -0500 -Subject: [PATCH] read_all: Define FNM_EXTMATCH if not already (like under - musl). -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -With musl, FNM_EXTMATCH is not defined: -| read_all.c: In function 'read_test': -| read_all.c:201:41: error: 'FNM_EXTMATCH' undeclared (first use in this function); did you mean 'FNM_NOMATCH'? -| if (exclude && !fnmatch(exclude, path, FNM_EXTMATCH)) { -| ^~~~~~~~~~~~ -| FNM_NOMATCH -| read_all.c:201:41: note: each undeclared identifier is reported only once for each function it appears in -| <builtin>: recipe for target 'read_all' failed -| make[4]: *** [read_all] Error 1 - -Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> - -Upstream-Status: Pending ---- - testcases/kernel/fs/read_all/read_all.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/testcases/kernel/fs/read_all/read_all.c b/testcases/kernel/fs/read_all/read_all.c -index a8e1611..e9ff47a 100644 ---- a/testcases/kernel/fs/read_all/read_all.c -+++ b/testcases/kernel/fs/read_all/read_all.c -@@ -59,6 +59,10 @@ - #define MAX_PATH 4096 - #define MAX_DISPLAY 40 - -+#if !defined(FNM_EXTMATCH) -+#define FNM_EXTMATCH 0 -+#endif -+ - struct queue { - sem_t sem; - int front; --- -2.7.4 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0041-cve-2017-5669-shmat-for-0-or-PAGESIZE-with-RND-flag-.patch b/poky/meta/recipes-extended/ltp/ltp/0041-cve-2017-5669-shmat-for-0-or-PAGESIZE-with-RND-flag-.patch deleted file mode 100644 index 0d2d2cbce..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0041-cve-2017-5669-shmat-for-0-or-PAGESIZE-with-RND-flag-.patch +++ /dev/null @@ -1,97 +0,0 @@ -From b767b73ef027ba8d35f297c7d3659265ac80425b Mon Sep 17 00:00:00 2001 -From: Rafael David Tinoco <rafael.tinoco@canonical.com> -Date: Wed, 30 May 2018 09:14:34 -0300 -Subject: [PATCH] cve-2017-5669: shmat() for 0 (or <PAGESIZE with RND flag) has - to fail with REMAPs - -Fixes: https://github.com/linux-test-project/ltp/issues/319 - -According to upstream thread (https://lkml.org/lkml/2018/5/28/2056), -cve-2017-5669 needs to address the "new" way of handling nil addresses -for shmat() when used with MAP_FIXED or SHM_REMAP flags. - -- mapping nil-page is OK on lower addresses with MAP_FIXED (or else X11 is broken) -- mapping nil-page is NOT OK with SHM_REMAP on lower addresses - -Addresses Davidlohr Bueso's comments/changes: - -commit 8f89c007b6de -Author: Davidlohr Bueso <dave@stgolabs.net> -Date: Fri May 25 14:47:30 2018 -0700 - - ipc/shm: fix shmat() nil address after round-down when remapping - -commit a73ab244f0da -Author: Davidlohr Bueso <dave@stgolabs.net> -Date: Fri May 25 14:47:27 2018 -0700 - - Revert "ipc/shm: Fix shmat mmap nil-page protection" - -For previously test, and now broken, made based on: - -commit 95e91b831f87 -Author: Davidlohr Bueso <dave@stgolabs.net> -Date: Mon Feb 27 14:28:24 2017 -0800 - - ipc/shm: Fix shmat mmap nil-page protection - -Signed-off-by: Rafael David Tinoco <rafael.tinoco@linaro.org> -Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org> -Reviewed-by: Jan Stancek <jstancek@redhat.com> - -Upstream-Status: Accepted [https://github.com/linux-test-project/ltp/pull/324] -CVE: CVE-2017-5669 -Signed-off-by: Rafael David Tinoco <rafael.tinoco@linaro.org> ---- - testcases/cve/cve-2017-5669.c | 20 +++++++++++++++++++- - 1 file changed, 19 insertions(+), 1 deletion(-) - -diff --git a/testcases/cve/cve-2017-5669.c b/testcases/cve/cve-2017-5669.c -index 1ca5983..0834626 100644 ---- a/testcases/cve/cve-2017-5669.c -+++ b/testcases/cve/cve-2017-5669.c -@@ -28,7 +28,20 @@ - * is just to see if we get an access error or some other unexpected behaviour. - * - * See commit 95e91b831f (ipc/shm: Fix shmat mmap nil-page protection) -+ * -+ * The commit above disallowed SHM_RND maps to zero (and rounded) entirely and -+ * that broke userland for cases like Xorg. New behavior disallows REMAPs to -+ * lower addresses (0<=PAGESIZE). -+ * -+ * See commit a73ab244f0da (Revert "ipc/shm: Fix shmat mmap nil-page protect...) -+ * See commit 8f89c007b6de (ipc/shm: fix shmat() nil address after round-dow...) -+ * See https://github.com/linux-test-project/ltp/issues/319 -+ * -+ * This test needs root permissions or else security_mmap_addr(), from -+ * get_unmapped_area(), will cause permission errors when trying to mmap lower -+ * addresses. - */ -+ - #include <sys/types.h> - #include <sys/ipc.h> - #include <sys/shm.h> -@@ -60,7 +73,11 @@ static void cleanup(void) - static void run(void) - { - tst_res(TINFO, "Attempting to attach shared memory to null page"); -- shm_addr = shmat(shm_id, ((void *)1), SHM_RND); -+ /* -+ * shmat() for 0 (or < PAGESIZE with RND flag) has to fail with REMAPs -+ * https://github.com/linux-test-project/ltp/issues/319 -+ */ -+ shm_addr = shmat(shm_id, ((void *)1), SHM_RND | SHM_REMAP); - if (shm_addr == (void *)-1) { - shm_addr = NULL; - if (errno == EINVAL) { -@@ -89,6 +106,7 @@ static void run(void) - } - - static struct tst_test test = { -+ .needs_root = 1, - .setup = setup, - .cleanup = cleanup, - .test_all = run, --- -2.7.4 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0042-fs-ftest-ftest06.c-Fix-too-small-name-string-and-rel.patch b/poky/meta/recipes-extended/ltp/ltp/0042-fs-ftest-ftest06.c-Fix-too-small-name-string-and-rel.patch deleted file mode 100644 index 407d98eff..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0042-fs-ftest-ftest06.c-Fix-too-small-name-string-and-rel.patch +++ /dev/null @@ -1,34 +0,0 @@ -From baeef026f80e19a634a4096e97286419aca1cf68 Mon Sep 17 00:00:00 2001 -From: He Zhe <zhe.he@windriver.com> -Date: Thu, 23 Aug 2018 00:22:04 +0800 -Subject: [PATCH] fs/ftest/ftest06.c: Fix too small name string and related - failure - -The name string is too small to contain normal full path names and causes -the following failure. - -"ftest06 2 TFAIL : ftest06.c:223: Can't chdir(): errno=ENOENT(2): No such file or directory" - -Upstream-Status: Submitted [ltp-list@lists.sourceforge.net] - -Signed-off-by: He Zhe <zhe.he@windriver.com> ---- - testcases/kernel/fs/ftest/ftest06.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/testcases/kernel/fs/ftest/ftest06.c b/testcases/kernel/fs/ftest/ftest06.c -index 2ca7c88..b434067 100644 ---- a/testcases/kernel/fs/ftest/ftest06.c -+++ b/testcases/kernel/fs/ftest/ftest06.c -@@ -100,7 +100,7 @@ static char *fstyp; - int main(int ac, char *av[]) - { - int pid, child, status, count, k, j; -- char name[3]; -+ char name[MAXPATHLEN]; - - int lc; - --- -2.7.4 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch b/poky/meta/recipes-extended/ltp/ltp/0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch deleted file mode 100644 index dc61fcc03..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 3c87ef2961dedb10d1f674c6a530e00dbab8ec1b Mon Sep 17 00:00:00 2001 -From: Jan Stancek <jstancek@redhat.com> -Date: Tue, 17 Jul 2018 10:26:39 +0200 -Subject: [PATCH] open|creat: skip S_ISGID check on files created by non-group - members - -0fa3ecd87848 ("Fix up non-directory creation in SGID directories") -fixes problem described in CVE-2018-13405. This commit is getting -backported to older streams as well. - -This patch removes S_ISGID check for files created by non-group members -in LTP tests creat08 and open10. - -Once 0fa3ecd87848 will be in non-rc kernel, we could add a new test -for this CVE that would be limited to 4.18+ kernels. - -Signed-off-by: Jan Stancek <jstancek@redhat.com> -Acked-by: Cyril Hrubis <chrubis@suse.cz> -Reviewed-by: Naresh Kamboju <naresh.kamboju@linaro.org> - -Upstream-Status: Backport -[ git://github.com/linux-test-project/ltp.git - 3c87ef2961dedb10d1f674c6a530e00dbab8ec1b - "open|creat: skip S_ISGID check on files created by non-group members" ] - -Signed-off-by: He Zhe <zhe.he@windriver.com> ---- - testcases/kernel/syscalls/creat/creat08.c | 13 ++++++------- - testcases/kernel/syscalls/open/open10.c | 12 +++++------- - 2 files changed, 11 insertions(+), 14 deletions(-) - -diff --git a/testcases/kernel/syscalls/creat/creat08.c b/testcases/kernel/syscalls/creat/creat08.c -index 50f2b3993..d22558ac3 100644 ---- a/testcases/kernel/syscalls/creat/creat08.c -+++ b/testcases/kernel/syscalls/creat/creat08.c -@@ -361,13 +361,12 @@ int main(int ac, char **av) - local_flag = FAILED; - } - -- /* Verify modes */ -- if (!(buf.st_mode & S_ISGID)) { -- tst_resm(TFAIL, -- "%s: Incorrect modes, setgid bit should be set", -- setgid_B); -- local_flag = FAILED; -- } -+ /* -+ * Skip S_ISGID check -+ * 0fa3ecd87848 ("Fix up non-directory creation in SGID directories") -+ * clears S_ISGID for files created by non-group members -+ */ -+ - close(fd); - - if (local_flag == PASSED) { -diff --git a/testcases/kernel/syscalls/open/open10.c b/testcases/kernel/syscalls/open/open10.c -index 613f2288f..14feec9e1 100644 ---- a/testcases/kernel/syscalls/open/open10.c -+++ b/testcases/kernel/syscalls/open/open10.c -@@ -345,13 +345,11 @@ int main(int ac, char *av[]) - local_flag = FAILED; - } - -- /* Verify modes */ -- if (!(buf.st_mode & S_ISGID)) { -- tst_resm(TFAIL, -- "%s: Incorrect modes, setgid bit not set", -- setgid_B); -- local_flag = FAILED; -- } -+ /* -+ * Skip S_ISGID check -+ * 0fa3ecd87848 ("Fix up non-directory creation in SGID directories") -+ * clears S_ISGID for files created by non-group members -+ */ - - if (local_flag == PASSED) { - tst_resm(TPASS, "Test passed in block2."); --- -2.11.0 - diff --git a/poky/meta/recipes-extended/ltp/ltp/define-sigrtmin-and-sigrtmax-for-musl.patch b/poky/meta/recipes-extended/ltp/ltp/define-sigrtmin-and-sigrtmax-for-musl.patch new file mode 100644 index 000000000..c324463e6 --- /dev/null +++ b/poky/meta/recipes-extended/ltp/ltp/define-sigrtmin-and-sigrtmax-for-musl.patch @@ -0,0 +1,114 @@ +From 34b91edc70709f32b44f6b3a32c8f18db393e36c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.diaz@linaro.org> +Date: Wed, 20 Feb 2019 08:07:27 -0600 +Subject: [PATCH] Define __SIGRTMIN and __SIGRTMAX for MUSL +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Some libc implementations might differ in the definitions they +include. Exempli gratia: MUSL does not define __SIGRTMAX nor +__SIGRTMIN. + +These two tests fail to build because of the missing +definitions: + testcases/kernel/syscalls/ptrace/ptrace05.c + testcases/kernel/syscalls/sighold/sighold02.c + +Out of precaution, these two also include this header: + lib/tst_sig.c + testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c + +Upstream-Status: Submitted [http://lists.linux.it/pipermail/ltp/2019-February/010916.html] + +Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> +--- + include/lapi/signal.h | 24 +++++++++++++++++++ + lib/tst_sig.c | 1 + + testcases/kernel/syscalls/ptrace/ptrace05.c | 1 + + .../syscalls/rt_sigsuspend/rt_sigsuspend01.c | 1 + + testcases/kernel/syscalls/sighold/sighold02.c | 1 + + 5 files changed, 28 insertions(+) + create mode 100644 include/lapi/signal.h + +diff --git a/include/lapi/signal.h b/include/lapi/signal.h +new file mode 100644 +index 000000000..d22965a94 +--- /dev/null ++++ b/include/lapi/signal.h +@@ -0,0 +1,24 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later ++/* ++ * Copyright (c) 2019 Linaro Limited. All rights reserved. ++ * Author: Daniel Díaz <daniel.diaz@linaro.org> ++ */ ++ ++#ifndef LAPI_SIGNAL_H ++#define LAPI_SIGNAL_H ++ ++#include <signal.h> ++ ++/* ++ * Some libc implementations might differ in the definitions they include. This ++ * covers those differences for all tests to successfully build. ++ */ ++ ++#ifndef __SIGRTMIN ++# define __SIGRTMIN 32 ++#endif ++#ifndef __SIGRTMAX ++# define __SIGRTMAX (_NSIG - 1) ++#endif ++ ++#endif +diff --git a/lib/tst_sig.c b/lib/tst_sig.c +index 36565e13d..6d77aeafd 100644 +--- a/lib/tst_sig.c ++++ b/lib/tst_sig.c +@@ -72,6 +72,7 @@ + #include <signal.h> + #include <unistd.h> + #include "test.h" ++#include "lapi/signal.h" + + #define MAXMESG 150 /* size of mesg string sent to tst_res */ + +diff --git a/testcases/kernel/syscalls/ptrace/ptrace05.c b/testcases/kernel/syscalls/ptrace/ptrace05.c +index 420330029..54cfa4d7b 100644 +--- a/testcases/kernel/syscalls/ptrace/ptrace05.c ++++ b/testcases/kernel/syscalls/ptrace/ptrace05.c +@@ -38,6 +38,7 @@ + #include "ptrace.h" + + #include "test.h" ++#include "lapi/signal.h" + + char *TCID = "ptrace05"; + int TST_TOTAL = 0; +diff --git a/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c b/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c +index f17a9aae6..e577cf227 100644 +--- a/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c ++++ b/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c +@@ -18,6 +18,7 @@ + #include "tst_test.h" + #include "lapi/syscalls.h" + #include "lapi/safe_rt_signal.h" ++#include "lapi/signal.h" + + static void sig_handler(int sig) + { +diff --git a/testcases/kernel/syscalls/sighold/sighold02.c b/testcases/kernel/syscalls/sighold/sighold02.c +index d1d4b0b06..b763142df 100644 +--- a/testcases/kernel/syscalls/sighold/sighold02.c ++++ b/testcases/kernel/syscalls/sighold/sighold02.c +@@ -49,6 +49,7 @@ + #include <sys/wait.h> + #include "test.h" + #include "safe_macros.h" ++#include "lapi/signal.h" + + /* _XOPEN_SOURCE disables NSIG */ + #ifndef NSIG +-- +2.17.1 + diff --git a/poky/meta/recipes-extended/ltp/ltp/setregid01-security-string-formatting.patch b/poky/meta/recipes-extended/ltp/ltp/setregid01-security-string-formatting.patch new file mode 100644 index 000000000..24449148f --- /dev/null +++ b/poky/meta/recipes-extended/ltp/ltp/setregid01-security-string-formatting.patch @@ -0,0 +1,46 @@ +From 430e05c2169ed15aaa6d7f9459edd607603cee02 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.diaz@linaro.org> +Date: Mon, 25 Feb 2019 10:44:33 -0600 +Subject: [PATCH] setregid01: Fix security warning for string formatting +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +GCC 8.2.0 complains with the following: + setregid01.c: In function 'run': + setregid01.c:47:3: error: format not a string literal and no format arguments [-Werror=format-security] + tst_res(TFAIL | TTERRNO, tc->msg); + ^~~~~~~ +because there is no string formatting in the message. This can +be seen with CFLAGS set to: + -Wformat -Wformat-security -Werror=format-security +as Yocto Project's Poky does, e.g.: + http://errors.yoctoproject.org/Errors/Details/230043/ + +Upstream-Status: Backport [46e1eda55f188810e6bf3a939b92d604321807ae] + +Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> +Reviewed-by: Enji Cooper <yaneurabeya@gmail.com> +--- + testcases/kernel/syscalls/setregid/setregid01.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/testcases/kernel/syscalls/setregid/setregid01.c b/testcases/kernel/syscalls/setregid/setregid01.c +index f2e41e134..8c9e11918 100644 +--- a/testcases/kernel/syscalls/setregid/setregid01.c ++++ b/testcases/kernel/syscalls/setregid/setregid01.c +@@ -44,9 +44,9 @@ static void run(unsigned int n) + TEST(SETREGID(*tc->arg1, *tc->arg2)); + + if (TST_RET == -1) +- tst_res(TFAIL | TTERRNO, tc->msg); ++ tst_res(TFAIL | TTERRNO, "%s", tc->msg); + else +- tst_res(TPASS, tc->msg); ++ tst_res(TPASS, "%s", tc->msg); + } + + static void setup(void) +-- +2.17.1 + diff --git a/poky/meta/recipes-extended/ltp/ltp_20180515.bb b/poky/meta/recipes-extended/ltp/ltp_20190115.bb index ff85be723..ddf97e26c 100644 --- a/poky/meta/recipes-extended/ltp/ltp_20180515.bb +++ b/poky/meta/recipes-extended/ltp/ltp_20190115.bb @@ -1,6 +1,6 @@ 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" +HOMEPAGE = "https://linux-test-project.github.io/" SECTION = "console/utils" LICENSE = "GPLv2 & GPLv2+ & LGPLv2+ & LGPLv2.1+ & BSD-2-Clause" LIC_FILES_CHKSUM = "\ @@ -11,7 +11,6 @@ LIC_FILES_CHKSUM = "\ file://testcases/kernel/hotplug/cpu_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \ file://testcases/open_posix_testsuite/COPYING;md5=48b1c5ec633e3e30ec2cf884ae699947 \ file://testcases/realtime/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ - file://tools/pounder21/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ file://utils/benchmark/kernbench-0.42/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ file://utils/ffsb-6.0-rc2/COPYING;md5=c46082167a314d785d012a244748d803 \ " @@ -28,10 +27,9 @@ CFLAGS_append_x86-64 = " -fomit-frame-pointer" CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__" CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__" -SRCREV = "96cbf48313afa65ef4d693d3441cbfd60a8d9b27" +SRCREV = "a6a5caef13632e669dda27b0461726eba546a2f3" SRC_URI = "git://github.com/linux-test-project/ltp.git \ - file://0001-mmap15-mips64-return-EINVAL.patch \ file://0004-build-Add-option-to-select-libc-implementation.patch \ file://0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch \ file://0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch \ @@ -48,14 +46,9 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \ file://0035-fix-test_proc_kill-hang.patch \ file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \ file://0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch \ - file://0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch \ - file://0041-cve-2017-5669-shmat-for-0-or-PAGESIZE-with-RND-flag-.patch \ - file://0042-fs-ftest-ftest06.c-Fix-too-small-name-string-and-rel.patch \ - file://0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch \ - file://0001-syscalls-fcntl-make-OFD-command-use-fcntl64-syscall-.patch \ - file://0001-sigwaitinfo01-recent-glibc-calls-syscall-directly.patch \ - file://0001-netns_helper.sh-use-ping-6-when-ping6-is-not-avaliab.patch \ file://0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch \ + file://define-sigrtmin-and-sigrtmax-for-musl.patch \ + file://setregid01-security-string-formatting.patch \ " S = "${WORKDIR}/git" @@ -99,6 +92,7 @@ RDEPENDS_${PN} = "\ curl \ e2fsprogs-mke2fs \ expect \ + file \ gawk \ gzip \ iproute2 \ @@ -108,6 +102,7 @@ RDEPENDS_${PN} = "\ perl \ python-core \ procps \ + quota \ unzip \ util-linux \ which \ diff --git a/poky/meta/recipes-extended/lzip/lzip_1.20.bb b/poky/meta/recipes-extended/lzip/lzip_1.21.bb index d1fc2a1da..bb3d2a6fe 100644 --- a/poky/meta/recipes-extended/lzip/lzip_1.20.bb +++ b/poky/meta/recipes-extended/lzip/lzip_1.21.bb @@ -6,9 +6,11 @@ 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" -SRC_URI[md5sum] = "21c1517da2ace9689fd953918660b3c3" -SRC_URI[sha256sum] = "c93b81a5a7788ef5812423d311345ba5d3bd4f5ebf1f693911e3a13553c1290c" +B = "${WORKDIR}/build" +do_configure[cleandirs] = "${B}" CONFIGUREOPTS = "\ '--srcdir=${S}' \ @@ -23,9 +25,7 @@ CONFIGUREOPTS = "\ 'CXXFLAGS=${CXXFLAGS}' \ 'LDFLAGS=${LDFLAGS}' \ " -EXTRA_OEMAKE = "" -B = "${S}/obj" do_configure () { ${S}/configure ${CONFIGUREOPTS} } diff --git a/poky/meta/recipes-extended/man-db/man-db_2.8.3.bb b/poky/meta/recipes-extended/man-db/man-db_2.8.4.bb index cd8d27c33..aa364659e 100644 --- a/poky/meta/recipes-extended/man-db/man-db_2.8.3.bb +++ b/poky/meta/recipes-extended/man-db/man-db_2.8.4.bb @@ -7,8 +7,8 @@ LIC_FILES_CHKSUM = "file://docs/COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 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[md5sum] = "6f3055e18fdd1ce5cbbdb30403991ec7" -SRC_URI[sha256sum] = "5932a1ca366e1ec61a3ece1a3afa0e92f2fdc125b61d236f20cc6ff9d80cc4ac" +SRC_URI[md5sum] = "ab41db551f500e4a595b11203b86c67a" +SRC_URI[sha256sum] = "103c185f9d8269b9ee3b8a4cb27912b3aa393e952731ef96fedc880723472bc3" DEPENDS = "libpipeline gdbm groff-native base-passwd" RDEPENDS_${PN} += "base-passwd" @@ -19,6 +19,7 @@ USE_NLS_libc-musl = "no" inherit gettext pkgconfig autotools EXTRA_OECONF = "--with-pager=less" +EXTRA_AUTORECONF += "-I ${S}/gl/m4" do_install() { autotools_do_install diff --git a/poky/meta/recipes-extended/man-pages/man-pages_4.16.bb b/poky/meta/recipes-extended/man-pages/man-pages_4.16.bb index a64587cf0..1f14c891b 100644 --- a/poky/meta/recipes-extended/man-pages/man-pages_4.16.bb +++ b/poky/meta/recipes-extended/man-pages/man-pages_4.16.bb @@ -31,6 +31,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/poky/meta/recipes-extended/mc/mc_4.8.21.bb b/poky/meta/recipes-extended/mc/mc_4.8.22.bb index c6a4500b8..f64effbce 100644 --- a/poky/meta/recipes-extended/mc/mc_4.8.21.bb +++ b/poky/meta/recipes-extended/mc/mc_4.8.22.bb @@ -9,8 +9,8 @@ RDEPENDS_${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 \ " -SRC_URI[md5sum] = "63d2b90e2198ee79d08eb4a8989220e2" -SRC_URI[sha256sum] = "251d9f0ef9309ef3eea0fdc4c12b8b61149e5056bef1b2de2ccc7f015d973444" +SRC_URI[md5sum] = "29983a215c96030f06d5b112088ec5dc" +SRC_URI[sha256sum] = "8d9f1c75369967adfd317a05fef9861444ed049b033e4debaeaafc6df218b431" inherit autotools gettext pkgconfig diff --git a/poky/meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch b/poky/meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch new file mode 100644 index 000000000..803a59b3e --- /dev/null +++ b/poky/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/poky/meta/recipes-extended/mdadm/files/0001-Disable-gcc8-warnings.patch b/poky/meta/recipes-extended/mdadm/files/0001-Disable-gcc8-warnings.patch deleted file mode 100644 index 739652cd5..000000000 --- a/poky/meta/recipes-extended/mdadm/files/0001-Disable-gcc8-warnings.patch +++ /dev/null @@ -1,152 +0,0 @@ -From b83218de2623c0bbe9af355a81ae8385d7f30cfc Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Wed, 9 May 2018 12:56:41 -0700 -Subject: [PATCH] Disable gcc8 warnings - -This is needed until -https://bugzilla.redhat.com/show_bug.cgi?id=1553958 - -Fix super0.c issue which is triggered only in DEBUG_BUILD with -O1 (or any -configuration without -ftree-vrp or with -fno-tree-vrp) - -super0.c: In function 'examine_super0': -super0.c:238:32: error: 'snprintf' output may be truncated before the last format character [-Werror=format-truncation=] - snprintf(nb, sizeof(nb), "%4d", d); - ^ - -Upstream-Status: Inappropriate [Workaround] - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- - Monitor.c | 4 +++- - mdopen.c | 4 ++++ - super-ddf.c | 4 ++++ - super-intel.c | 6 ++++++ - super1.c | 5 +++++ - super0.c | 2 +- - 6 files changed, 22 insertions(+), 1 deletion(-) - -diff --git a/super0.c b/super0.c -index f5b4507..264b598 100644 ---- a/super0.c -+++ b/super0.c -@@ -231,7 +231,7 @@ - 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; -diff --git a/Monitor.c b/Monitor.c -index 802a9d9..23b246b 100644 ---- a/Monitor.c -+++ b/Monitor.c -@@ -441,7 +441,8 @@ static void alert(char *event, char *dev, char *disc, struct alert_info *info) - event, dev); - } - } -- -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wformat-truncation" - static int check_array(struct state *st, struct mdstat_ent *mdstat, - int test, struct alert_info *ainfo, - int increments, char *prefer) -@@ -683,6 +684,7 @@ static int check_array(struct state *st, struct mdstat_ent *mdstat, - return 1; - return 0; - } -+#pragma GCC diagnostic pop - - static int add_new_arrays(struct mdstat_ent *mdstat, struct state **statelist, - int test, struct alert_info *info) -diff --git a/mdopen.c b/mdopen.c -index 685ca32..406aba4 100644 ---- a/mdopen.c -+++ b/mdopen.c -@@ -26,6 +26,9 @@ - #include "md_p.h" - #include <ctype.h> - -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wformat-truncation" -+ - void make_parts(char *dev, int cnt) - { - /* make 'cnt' partition devices for 'dev' -@@ -99,6 +102,7 @@ void make_parts(char *dev, int cnt) - } - free(name); - } -+#pragma GCC diagnostic pop - - /* - * We need a new md device to assemble/build/create an array. -diff --git a/super-ddf.c b/super-ddf.c -index 1707ad1..e08d289 100644 ---- a/super-ddf.c -+++ b/super-ddf.c -@@ -2846,6 +2846,9 @@ static void _set_config_size(struct phys_disk_entry *pde, const struct dl *dl) - (unsigned long long)cfs, (unsigned long long)(dl->size-cfs)); - } - -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wformat-overflow" -+ - /* Add a device to a container, either while creating it or while - * expanding a pre-existing container - */ -@@ -2981,6 +2984,7 @@ static int add_to_super_ddf(struct supertype *st, - - return 0; - } -+#pragma GCC diagnostic pop - - static int remove_from_super_ddf(struct supertype *st, mdu_disk_info_t *dk) - { -diff --git a/super-intel.c b/super-intel.c -index 00a2925..44fbead 100644 ---- a/super-intel.c -+++ b/super-intel.c -@@ -298,6 +298,11 @@ struct md_list { - }; - - #define pr_vrb(fmt, arg...) (void) (verbose && pr_err(fmt, ##arg)) -+#pragma GCC diagnostic push -+# if __GNUC__ == 8 -+# pragma GCC diagnostic ignored "-Wstringop-truncation" -+# endif -+#pragma GCC diagnostic ignored "-Wformat-truncation" - - static __u8 migr_type(struct imsm_dev *dev) - { -@@ -11618,3 +11623,4 @@ struct superswitch super_imsm = { - .get_bad_blocks = imsm_get_badblocks, - #endif /* MDASSEMBLE */ - }; -+#pragma GCC diagnostic pop -diff --git a/super1.c b/super1.c -index 87a74cb..71c515f 100644 ---- a/super1.c -+++ b/super1.c -@@ -1091,6 +1091,10 @@ static struct mdinfo *container_content1(struct supertype *st, char *subarray) - return info; - } - -+#pragma GCC diagnostic push -+# if __GNUC__ == 8 -+# pragma GCC diagnostic ignored "-Wstringop-truncation" -+#endif - static int update_super1(struct supertype *st, struct mdinfo *info, - char *update, - char *devname, int verbose, -@@ -1473,6 +1477,7 @@ static int init_super1(struct supertype *st, mdu_array_info_t *info, - - return 1; - } -+#pragma GCC diagnostic pop - - struct devinfo { - int fd; diff --git a/poky/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch b/poky/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch index a89161404..298f276cd 100644 --- a/poky/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch +++ b/poky/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch @@ -1,4 +1,4 @@ -From 1f5baf3ad95ae4c39efe4d8ad8b2e642b3a351da Mon Sep 17 00:00:00 2001 +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 @@ -9,28 +9,18 @@ Fix it. Upstream-Status: Inappropriate [Yocto specific] Signed-off-by: Maxin B. John <maxin.john@intel.com> ---- -mdadm only works with corosync 2.x which provides header file corosync/cmap.h. -If build mdadm with corosync 1.x, it fails with: - -| member.c:12:27: fatal error: corosync/cmap.h: No such file or directory -| #include <corosync/cmap.h> -| ^ -Build with corosync only header file corosync/cmap.h exists. - -Signed-off-by: Kai Kang <kai.kang@windriver.com> --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile -index fd79cfb..34150a9 100644 +index 2767ac6..46bf57b 100644 --- a/Makefile +++ b/Makefile -@@ -80,8 +80,8 @@ MDMON_DIR = $(RUN_DIR) - FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots +@@ -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) @@ -39,6 +29,3 @@ index fd79cfb..34150a9 100644 DIRFLAGS = -DMAP_DIR=\"$(MAP_DIR)\" -DMAP_FILE=\"$(MAP_FILE)\" DIRFLAGS += -DMDMON_DIR=\"$(MDMON_DIR)\" --- -2.4.0 - diff --git a/poky/meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch b/poky/meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch index a4b7b8acd..12bf6a592 100644 --- a/poky/meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch +++ b/poky/meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch @@ -1,4 +1,4 @@ -From a129ee6d80f3b2cda0d827c35fa81a517cf6d505 Mon Sep 17 00:00:00 2001 +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 @@ -8,16 +8,16 @@ 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 d207ee4..971f255 100644 +index 46bf57b..a075912 100644 --- a/Makefile +++ b/Makefile -@@ -48,7 +48,7 @@ ifdef WARN_UNUSED +@@ -53,7 +53,7 @@ ifdef WARN_UNUSED CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3 endif @@ -26,6 +26,3 @@ index d207ee4..971f255 100644 ifneq "$(FALLTHROUGH)" "0" CWFLAGS += -Wimplicit-fallthrough=0 endif --- -2.14.2 - diff --git a/poky/meta/recipes-extended/mdadm/files/0001-fix-gcc-8-format-truncation-warning.patch b/poky/meta/recipes-extended/mdadm/files/0001-fix-gcc-8-format-truncation-warning.patch new file mode 100644 index 000000000..fa9c8cc83 --- /dev/null +++ b/poky/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/poky/meta/recipes-extended/mdadm/files/0001-include-sys-sysmacros.h-for-major-minor-defintions.patch b/poky/meta/recipes-extended/mdadm/files/0001-include-sys-sysmacros.h-for-major-minor-defintions.patch deleted file mode 100644 index acd64ada2..000000000 --- a/poky/meta/recipes-extended/mdadm/files/0001-include-sys-sysmacros.h-for-major-minor-defintions.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 943616e5dffb79f307e4bd9b249d316212998750 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sun, 18 Dec 2016 08:30:51 +0000 -Subject: [PATCH] include <sys/sysmacros.h> for major/minor defintions - -glibc 2.25 is warning about it if applications depend on -sys/types.h for these macros, it expects to be included -from <sys/sysmacros.h> - -Fixes -| Grow.c:3534:13: error: In the GNU C Library, "minor" is defined -| by <sys/sysmacros.h>. For historical compatibility, it is -| currently defined by <sys/types.h> as well, but we plan to -| remove this soon. To use "minor", include <sys/sysmacros.h> -| directly. If you did not intend to use a system-defined macro -| "minor", you should undefine it after including <sys/types.h>. [-Werror] -| Query.c: In function 'Query': -| Query.c:105:13: error: In the GNU C Library, "makedev" is defined -| by <sys/sysmacros.h>. For historical compatibility, it is -| currently defined by <sys/types.h> as well, but we plan to -| remove this soon. To use "makedev", include <sys/sysmacros.h> -| directly. If you did not intend to use a system-defined macro -| "makedev", you should undefine it after including <sys/types.h>. [-Werror] -| makedev((unsigned)disc.major,(unsigned)disc.minor) == stb.st_rdev) -| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - - mdadm.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/mdadm.h b/mdadm.h -index 8c8f4d1..3ce13b5 100755 ---- a/mdadm.h -+++ b/mdadm.h -@@ -34,6 +34,7 @@ extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence)); - #endif - - #include <sys/types.h> -+#include <sys/sysmacros.h> - #include <sys/stat.h> - #include <stdint.h> - #include <stdlib.h> --- -1.9.1 - diff --git a/poky/meta/recipes-extended/mdadm/files/0001-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch b/poky/meta/recipes-extended/mdadm/files/0001-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch deleted file mode 100644 index ce15170c7..000000000 --- a/poky/meta/recipes-extended/mdadm/files/0001-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch +++ /dev/null @@ -1,37 +0,0 @@ -From aa09af0fe2ec0737fa04ffd00957532684e257b9 Mon Sep 17 00:00:00 2001 -From: Xiao Ni <xni@redhat.com> -Date: Fri, 17 Mar 2017 19:55:42 +0800 -Subject: [PATCH 1/5] mdadm: Add Wimplicit-fallthrough=0 in Makefile - -There are many errors like 'error: this statement may fall through'. -But the logic is right. So add the flag Wimplicit-fallthrough=0 -to disable the error messages. The method I use is from -https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html -#index-Wimplicit-fallthrough-375 - -Signed-off-by: Xiao Ni <xni@redhat.com> -Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com> ---- -Upstream-Status: Backport - Makefile | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/Makefile b/Makefile -index 0f307ec..e1a7058 100644 ---- a/Makefile -+++ b/Makefile -@@ -48,6 +48,11 @@ ifdef WARN_UNUSED - CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3 - endif - -+FALLTHROUGH := $(shell gcc -v --help 2>&1 | grep "implicit-fallthrough" | wc -l) -+ifneq "$(FALLTHROUGH)" "0" -+CWFLAGS += -Wimplicit-fallthrough=0 -+endif -+ - ifdef DEBIAN - CPPFLAGS += -DDEBIAN - endif --- -2.12.2 - diff --git a/poky/meta/recipes-extended/mdadm/files/0001-mdadm-gcc8-maybe-uninitialized-format-overflow-warni.patch b/poky/meta/recipes-extended/mdadm/files/0001-mdadm-gcc8-maybe-uninitialized-format-overflow-warni.patch new file mode 100644 index 000000000..237f83a87 --- /dev/null +++ b/poky/meta/recipes-extended/mdadm/files/0001-mdadm-gcc8-maybe-uninitialized-format-overflow-warni.patch @@ -0,0 +1,60 @@ +From bf457a83834932ba06de3528b8779a023e73fa7b Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Tue, 12 Mar 2019 16:17:29 +0800 +Subject: [PATCH] mdadm: gcc8 maybe-uninitialized/format-overflow warning + +while compiled with -Werror=maybe-uninitialized/-Werror=format-overflow=, +it failed + +[snip] +| Incremental.c: In function 'Incremental_container': +| Incremental.c:1593:3: error: 'mdfd' may be used uninitialized in this function [-Werror=maybe-uninitialized] +| close(mdfd); +| ^~~~~~~~~~~ + +[snip] +super-intel.c: In function 'apply_takeover_update': +| super-intel.c:9615:15: error: '%d' directive writing between 1 and 11 bytes into a region of size 7 [-Werror=format-overflow=] +| " MISSING_%d", du->index); +| ^~ + +Upstream-Status: Submitted [https://github.com/neilbrown/mdadm/pull/36] + +Signed-off-by: Changqing Li <changqing.li@windriver.com> +--- + Incremental.c | 2 +- + super-intel.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Incremental.c b/Incremental.c +index a4ff7d4..b667868 100644 +--- a/Incremental.c ++++ b/Incremental.c +@@ -1500,7 +1500,7 @@ static int Incremental_container(struct supertype *st, char *devname, + return 0; + } + for (ra = list ; ra ; ra = ra->next) { +- int mdfd; ++ int mdfd = 0; + char chosen_name[1024]; + struct map_ent *mp; + struct mddev_ident *match = NULL; +diff --git a/super-intel.c b/super-intel.c +index 10d7218..c3741ea 100644 +--- a/super-intel.c ++++ b/super-intel.c +@@ -9612,9 +9612,9 @@ static int apply_takeover_update(struct imsm_update_takeover *u, + du->major = 0; + du->index = (i * 2) + 1; + sprintf((char *)du->disk.serial, +- " MISSING_%d", du->index); ++ " MISSING_%hu", du->index); + sprintf((char *)du->serial, +- "MISSING_%d", du->index); ++ "MISSING_%hu", du->index); + du->next = super->missing; + super->missing = du; + } +-- +2.7.4 + diff --git a/poky/meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch b/poky/meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch index 4cf809290..a1e7e5932 100644 --- a/poky/meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch +++ b/poky/meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch @@ -1,4 +1,4 @@ -From 6d369e8f226594632ce4260129509daf7030de0a Mon Sep 17 00:00:00 2001 +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 @@ -14,17 +14,16 @@ In file included from policy.c:25: /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 230e60f..8c8f4d1 100755 +index 387e681..bb943bf 100644 --- a/mdadm.h +++ b/mdadm.h -@@ -1554,11 +1554,13 @@ static inline char *to_subarray(struct mdstat_ent *ent, char *container) +@@ -1649,11 +1649,13 @@ static inline char *to_subarray(struct mdstat_ent *ent, char *container) } #ifdef DEBUG @@ -38,6 +37,3 @@ index 230e60f..8c8f4d1 100755 #define dprintf(fmt, arg...) \ ({ if (0) fprintf(stderr, "%s: %s: " fmt, Name, __func__, ##arg); 0; }) #define dprintf_cont(fmt, arg...) \ --- -1.9.1 - diff --git a/poky/meta/recipes-extended/mdadm/files/0001-use-memmove-instead-of-memcpy-on-overlapping-region.patch b/poky/meta/recipes-extended/mdadm/files/0001-use-memmove-instead-of-memcpy-on-overlapping-region.patch deleted file mode 100644 index 44351b656..000000000 --- a/poky/meta/recipes-extended/mdadm/files/0001-use-memmove-instead-of-memcpy-on-overlapping-region.patch +++ /dev/null @@ -1,31 +0,0 @@ -From ab18f04cf89ef4e8521c81c50477e1363b2d333b Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 28 Apr 2018 09:46:12 -0700 -Subject: [PATCH] use memmove instead of memcpy on overlapping region - -Fixes -super0.c:526:3: error: 'memcpy' accessing 3936 bytes at offsets 156 and 160 overlaps 3932 bytes at offset 160 [-Werror=restrict] - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - super0.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/super0.c b/super0.c -index f5b4507..264b598 100644 ---- a/super0.c -+++ b/super0.c -@@ -523,7 +523,7 @@ static int update_super0(struct supertype *st, struct mdinfo *info, - * up 4 bytes before continuing - */ - __u32 *sb32 = (__u32*)sb; -- memcpy(sb32+MD_SB_GENERIC_CONSTANT_WORDS+7, -+ memmove(sb32+MD_SB_GENERIC_CONSTANT_WORDS+7, - sb32+MD_SB_GENERIC_CONSTANT_WORDS+7+1, - (MD_SB_WORDS - (MD_SB_GENERIC_CONSTANT_WORDS+7+1))*4); - if (verbose >= 0) --- -2.17.0 - diff --git a/poky/meta/recipes-extended/mdadm/files/0002-mdadm-Specify-enough-length-when-write-to-buffer.patch b/poky/meta/recipes-extended/mdadm/files/0002-mdadm-Specify-enough-length-when-write-to-buffer.patch deleted file mode 100644 index cbce053a3..000000000 --- a/poky/meta/recipes-extended/mdadm/files/0002-mdadm-Specify-enough-length-when-write-to-buffer.patch +++ /dev/null @@ -1,75 +0,0 @@ -From bb4df273041ba206008bdb0ada75ccd97c29f623 Mon Sep 17 00:00:00 2001 -From: Xiao Ni <xni@redhat.com> -Date: Fri, 17 Mar 2017 19:55:43 +0800 -Subject: [PATCH 2/5] mdadm: Specify enough length when write to buffer -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -In Detail.c the buffer path in function Detail is defined as path[200], -in fact the max lenth of content which needs to write to the buffer is -287. Because the length of dname of struct dirent is 255. -During building it reports error: -error: ‘%s’ directive writing up to 255 bytes into a region of size 189 -[-Werror=format-overflow=] - -In function examine_super0 there is a buffer nb with length 5. -But it need to show a int type argument. The lenght of max -number of int is 10. So the buffer length should be 11. - -In human_size function the length of buf is 30. During building -there is a error: -output between 20 and 47 bytes into a destination of size 30. -Change the length to 47. - -Signed-off-by: Xiao Ni <xni@redhat.com> -Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com> ---- -Upstream-Status: Backport - Detail.c | 2 +- - super0.c | 2 +- - util.c | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/Detail.c b/Detail.c -index 509b0d4..cb33794 100644 ---- a/Detail.c -+++ b/Detail.c -@@ -575,7 +575,7 @@ This is pretty boring - printf(" Member Arrays :"); - - while (dir && (de = readdir(dir)) != NULL) { -- char path[200]; -+ char path[287]; - char vbuf[1024]; - int nlen = strlen(sra->sys_name); - dev_t devid; -diff --git a/super0.c b/super0.c -index 938cfd9..f5b4507 100644 ---- a/super0.c -+++ b/super0.c -@@ -231,7 +231,7 @@ static void examine_super0(struct supertype *st, char *homehost) - d++) { - mdp_disk_t *dp; - char *dv; -- char nb[5]; -+ char nb[11]; - int wonly, failfast; - if (d>=0) dp = &sb->disks[d]; - else dp = &sb->this_disk; -diff --git a/util.c b/util.c -index f100972..32bd909 100644 ---- a/util.c -+++ b/util.c -@@ -811,7 +811,7 @@ unsigned long calc_csum(void *super, int bytes) - #ifndef MDASSEMBLE - char *human_size(long long bytes) - { -- static char buf[30]; -+ static char buf[47]; - - /* We convert bytes to either centi-M{ega,ibi}bytes or - * centi-G{igi,ibi}bytes, with appropriate rounding, --- -2.12.2 - diff --git a/poky/meta/recipes-extended/mdadm/files/0003-Replace-snprintf-with-strncpy-at-some-places-to-avoi.patch b/poky/meta/recipes-extended/mdadm/files/0003-Replace-snprintf-with-strncpy-at-some-places-to-avoi.patch deleted file mode 100644 index dcec84ffc..000000000 --- a/poky/meta/recipes-extended/mdadm/files/0003-Replace-snprintf-with-strncpy-at-some-places-to-avoi.patch +++ /dev/null @@ -1,59 +0,0 @@ -From bc87af1314325b00c6ac002a60a2b0f0caa81e34 Mon Sep 17 00:00:00 2001 -From: Xiao Ni <xni@redhat.com> -Date: Sat, 18 Mar 2017 10:33:44 +0800 -Subject: [PATCH 3/5] Replace snprintf with strncpy at some places to avoid - truncation - -In gcc7 there are some building errors like: -directive output may be truncated writing up to 31 bytes into a region of size 24 -snprintf(str, MPB_SIG_LEN, %s, mpb->sig); - -It just need to copy one string to target. So use strncpy to replace it. - -For this line code: snprintf(str, MPB_SIG_LEN, %s, mpb->sig); -Because mpb->sig has the content of version after magic, so -it's better to use strncpy to replace snprintf too. - -Signed-off-by: Xiao Ni <xni@redhat.com> -Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com> ---- -Upstream-Status: Backport - super-intel.c | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/super-intel.c b/super-intel.c -index 57c7e75..5499098 100644 ---- a/super-intel.c -+++ b/super-intel.c -@@ -1811,7 +1811,8 @@ static void examine_super_imsm(struct supertype *st, char *homehost) - __u32 reserved = imsm_reserved_sectors(super, super->disks); - struct dl *dl; - -- snprintf(str, MPB_SIG_LEN, "%s", mpb->sig); -+ strncpy(str, (char *)mpb->sig, MPB_SIG_LEN); -+ str[MPB_SIG_LEN-1] = '\0'; - printf(" Magic : %s\n", str); - snprintf(str, strlen(MPB_VERSION_RAID0), "%s", get_imsm_version(mpb)); - printf(" Version : %s\n", get_imsm_version(mpb)); -@@ -7142,14 +7143,16 @@ static int update_subarray_imsm(struct supertype *st, char *subarray, - - u->type = update_rename_array; - u->dev_idx = vol; -- snprintf((char *) u->name, MAX_RAID_SERIAL_LEN, "%s", name); -+ strncpy((char *) u->name, name, MAX_RAID_SERIAL_LEN); -+ u->name[MAX_RAID_SERIAL_LEN-1] = '\0'; - append_metadata_update(st, u, sizeof(*u)); - } else { - struct imsm_dev *dev; - int i; - - dev = get_imsm_dev(super, vol); -- snprintf((char *) dev->volume, MAX_RAID_SERIAL_LEN, "%s", name); -+ strncpy((char *) dev->volume, name, MAX_RAID_SERIAL_LEN); -+ dev->volume[MAX_RAID_SERIAL_LEN-1] = '\0'; - for (i = 0; i < mpb->num_raid_devs; i++) { - dev = get_imsm_dev(super, i); - handle_missing(super, dev); --- -2.12.2 - diff --git a/poky/meta/recipes-extended/mdadm/files/0004-mdadm-Forced-type-conversion-to-avoid-truncation.patch b/poky/meta/recipes-extended/mdadm/files/0004-mdadm-Forced-type-conversion-to-avoid-truncation.patch deleted file mode 100644 index 94fde42e9..000000000 --- a/poky/meta/recipes-extended/mdadm/files/0004-mdadm-Forced-type-conversion-to-avoid-truncation.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 5da889032e2d99751ed9fe60016146e9ae8114cd Mon Sep 17 00:00:00 2001 -From: Xiao Ni <xni@redhat.com> -Date: Sat, 18 Mar 2017 10:33:45 +0800 -Subject: [PATCH 4/5] mdadm: Forced type conversion to avoid truncation - -Gcc reports it needs 19 bytes to right to disk->serial. Because the -type of argument i is int. But the meaning of i is failed disk -number. So it doesn't need to use 19 bytes. Just add a type -conversion to avoid this building error - -Signed-off-by: Xiao Ni <xni@redhat.com> -Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com> ---- -Upstream-Status: Backport - super-intel.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/super-intel.c b/super-intel.c -index 5499098..4e466ff 100644 ---- a/super-intel.c -+++ b/super-intel.c -@@ -5228,7 +5228,7 @@ static int init_super_imsm_volume(struct supertype *st, mdu_array_info_t *info, - disk->status = CONFIGURED_DISK | FAILED_DISK; - disk->scsi_id = __cpu_to_le32(~(__u32)0); - snprintf((char *) disk->serial, MAX_RAID_SERIAL_LEN, -- "missing:%d", i); -+ "missing:%d", (__u8)i); - } - find_missing(super); - } else { --- -2.12.2 - diff --git a/poky/meta/recipes-extended/mdadm/files/0005-Add-a-comment-to-indicate-valid-fallthrough.patch b/poky/meta/recipes-extended/mdadm/files/0005-Add-a-comment-to-indicate-valid-fallthrough.patch deleted file mode 100644 index 3d9d3b904..000000000 --- a/poky/meta/recipes-extended/mdadm/files/0005-Add-a-comment-to-indicate-valid-fallthrough.patch +++ /dev/null @@ -1,128 +0,0 @@ -From 09014233bf10900f7bd8390b3b64ff82bca45222 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Wed, 19 Apr 2017 12:04:15 -0700 -Subject: [PATCH 5/5] Add a comment to indicate valid fallthrough - -gcc7 warns about code with fallthroughs, this patch adds -the comment to indicate a valid fallthrough, helps gcc7 -compiler warnings - -This works in cross and native compilation case - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Submitted - - Grow.c | 4 ++++ - bitmap.c | 8 ++++++++ - mdadm.c | 2 ++ - super-intel.c | 1 + - util.c | 1 + - 5 files changed, 16 insertions(+) - -diff --git a/Grow.c b/Grow.c -index 455c5f9..27c73b1 100755 ---- a/Grow.c -+++ b/Grow.c -@@ -1257,6 +1257,7 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re) - switch (info->new_level) { - case 4: - delta_parity = 1; -+ /* fallthrough */ - case 0: - re->level = 4; - re->before.layout = 0; -@@ -1284,10 +1285,12 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re) - - case 4: - info->array.layout = ALGORITHM_PARITY_N; -+ /* fallthrough */ - case 5: - switch (info->new_level) { - case 0: - delta_parity = -1; -+ /* fallthrough */ - case 4: - re->level = info->array.level; - re->before.data_disks = info->array.raid_disks - 1; -@@ -1343,6 +1346,7 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re) - case 4: - case 5: - delta_parity = -1; -+ /* fallthrough */ - case 6: - re->level = 6; - re->before.data_disks = info->array.raid_disks - 2; -diff --git a/bitmap.c b/bitmap.c -index ccedfd3..a6ff091 100644 ---- a/bitmap.c -+++ b/bitmap.c -@@ -82,13 +82,21 @@ static inline int count_dirty_bits_byte(char byte, int num_bits) - - switch (num_bits) { /* fall through... */ - case 8: if (byte & 128) num++; -+ /* fallthrough */ - case 7: if (byte & 64) num++; -+ /* fallthrough */ - case 6: if (byte & 32) num++; -+ /* fallthrough */ - case 5: if (byte & 16) num++; -+ /* fallthrough */ - case 4: if (byte & 8) num++; -+ /* fallthrough */ - case 3: if (byte & 4) num++; -+ /* fallthrough */ - case 2: if (byte & 2) num++; -+ /* fallthrough */ - case 1: if (byte & 1) num++; -+ /* fallthrough */ - default: break; - } - -diff --git a/mdadm.c b/mdadm.c -index c3a265b..2d06d3b 100644 ---- a/mdadm.c -+++ b/mdadm.c -@@ -148,6 +148,7 @@ int main(int argc, char *argv[]) - mode == CREATE || mode == GROW || - mode == INCREMENTAL || mode == MANAGE) - break; /* b means bitmap */ -+ /* fallthrough */ - case Brief: - c.brief = 1; - continue; -@@ -828,6 +829,7 @@ int main(int argc, char *argv[]) - - case O(INCREMENTAL,NoDegraded): - pr_err("--no-degraded is deprecated in Incremental mode\n"); -+ /* fallthrough */ - case O(ASSEMBLE,NoDegraded): /* --no-degraded */ - c.runstop = -1; /* --stop isn't allowed for --assemble, - * so we overload slightly */ -diff --git a/super-intel.c b/super-intel.c -index 4e466ff..00a2925 100644 ---- a/super-intel.c -+++ b/super-intel.c -@@ -3271,6 +3271,7 @@ static void getinfo_super_imsm_volume(struct supertype *st, struct mdinfo *info, - << SECT_PER_MB_SHIFT; - } - } -+ /* fallthrough */ - case MIGR_VERIFY: - /* we could emulate the checkpointing of - * 'sync_action=check' migrations, but for now -diff --git a/util.c b/util.c -index 32bd909..f2a4d19 100644 ---- a/util.c -+++ b/util.c -@@ -335,6 +335,7 @@ unsigned long long parse_size(char *size) - switch (*c) { - case 'K': - c++; -+ /* fallthrough */ - default: - s *= 2; - break; --- -2.12.2 - diff --git a/poky/meta/recipes-extended/mdadm/files/gcc-4.9.patch b/poky/meta/recipes-extended/mdadm/files/gcc-4.9.patch deleted file mode 100644 index df21399de..000000000 --- a/poky/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-4.0/super-intel.c -=================================================================== ---- mdadm-4.0.orig/super-intel.c -+++ mdadm-4.0/super-intel.c -@@ -5725,7 +5725,7 @@ static int write_super_imsm_spares(struc - 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/poky/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch b/poky/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch index 00e6657e0..7a2c88870 100644 --- a/poky/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch +++ b/poky/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,11 +13,15 @@ Upstream-Status: Pending Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> -Index: mdadm-4.0/monitor.c -=================================================================== ---- mdadm-4.0.orig/monitor.c -+++ mdadm-4.0/monitor.c -@@ -445,9 +445,12 @@ static int read_and_act(struct active_ar +--- + monitor.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/monitor.c b/monitor.c +index 81537ed..7c33382 100644 +--- a/monitor.c ++++ b/monitor.c +@@ -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); } diff --git a/poky/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch b/poky/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch index 267c007c2..8e2a8a904 100644 --- a/poky/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch +++ b/poky/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch @@ -1,4 +1,4 @@ -From c65898b9da82df94e1bae7937e415a7eb80355d5 Mon Sep 17 00:00:00 2001 +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 @@ -16,15 +16,16 @@ builds fail with ptest enabled: 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 56dca73..d24b2b4 100644 +index 31b07e8..592ba5d 100644 --- a/restripe.c +++ b/restripe.c -@@ -842,10 +842,14 @@ int test_stripes(int *source, unsigned long long *offsets, +@@ -864,10 +864,14 @@ int test_stripes(int *source, unsigned long long *offsets, while (length > 0) { int disk; @@ -40,6 +41,3 @@ index 56dca73..d24b2b4 100644 } for (i = 0 ; i < data_disks ; i++) { int disk = geo_map(i, start/chunk_size, raid_disks, --- -2.4.0 - diff --git a/poky/meta/recipes-extended/mdadm/mdadm_4.0.bb b/poky/meta/recipes-extended/mdadm/mdadm_4.1.bb index 8155ae41b..9862a38dc 100644 --- a/poky/meta/recipes-extended/mdadm/mdadm_4.0.bb +++ b/poky/meta/recipes-extended/mdadm/mdadm_4.1.bb @@ -9,31 +9,28 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \ - file://gcc-4.9.patch \ + file://run-ptest \ file://mdadm-3.3.2_x32_abi_time_t.patch \ file://mdadm-fix-ptest-build-errors.patch \ - file://0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch \ - file://run-ptest \ file://0001-mdadm.h-Undefine-dprintf-before-redefining.patch \ - file://0001-include-sys-sysmacros.h-for-major-minor-defintions.patch \ - file://0001-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch \ - file://0002-mdadm-Specify-enough-length-when-write-to-buffer.patch \ - file://0003-Replace-snprintf-with-strncpy-at-some-places-to-avoi.patch \ - file://0004-mdadm-Forced-type-conversion-to-avoid-truncation.patch \ - file://0005-Add-a-comment-to-indicate-valid-fallthrough.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-use-memmove-instead-of-memcpy-on-overlapping-region.patch \ - file://0001-Disable-gcc8-warnings.patch \ - file://mdadm.init \ - file://mdmonitor.service \ + file://0001-Compute-abs-diff-in-a-standard-compliant-way.patch \ + file://0001-fix-gcc-8-format-truncation-warning.patch \ + file://mdadm.init \ + file://mdmonitor.service \ + file://0001-mdadm-gcc8-maybe-uninitialized-format-overflow-warni.patch \ " -SRC_URI[md5sum] = "2cb4feffea9167ba71b5f346a0c0a40d" -SRC_URI[sha256sum] = "1d6ae7f24ced3a0fa7b5613b32f4a589bb4881e3946a5a2c3724056254ada3a9" +SRC_URI[md5sum] = "51bf3651bd73a06c413a2f964f299598" +SRC_URI[sha256sum] = "ab7688842908d3583a704d491956f31324c3a5fc9f6a04653cb75d19f1934f4a" -CFLAGS += "-fno-strict-aliasing" -inherit autotools-brokensep systemd +inherit autotools-brokensep ptest systemd + +SYSTEMD_SERVICE_${PN} = "mdmonitor.service mdmon@.service" +SYSTEMD_AUTO_ENABLE = "disable" + +CFLAGS_append_toolchain-clang = " -Wno-error=address-of-packed-member" -EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CXFLAGS="${CFLAGS}"' # 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 @@ -42,6 +39,10 @@ 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}"' + +DEBUG_OPTIMIZATION_append = " -Wno-error" + do_compile() { # Point to right sbindir sed -i -e "s;BINDIR = /sbin;BINDIR = $base_sbindir;" -e "s;UDEVDIR = /lib;UDEVDIR = $nonarch_base_libdir;" ${S}/Makefile @@ -54,17 +55,15 @@ do_install() { } do_install_append() { - install -d ${D}/${sysconfdir}/ - install -m 644 ${S}/mdadm.conf-example ${D}${sysconfdir}/mdadm.conf - install -d ${D}/${systemd_unitdir}/system - install -m 644 ${S}/systemd/mdmonitor.service ${D}/${systemd_unitdir}/system - install -d ${D}/${sysconfdir}/init.d - install -m 755 ${WORKDIR}/mdadm.init ${D}${sysconfdir}/init.d/mdmonitor + install -d ${D}/${sysconfdir}/ + install -m 644 ${S}/mdadm.conf-example ${D}${sysconfdir}/mdadm.conf + install -d ${D}/${systemd_unitdir}/system + install -m 644 ${WORKDIR}/mdmonitor.service ${D}/${systemd_unitdir}/system + install -m 644 ${S}/systemd/mdmon@.service ${D}/${systemd_unitdir}/system + install -d ${D}/${sysconfdir}/init.d + install -m 755 ${WORKDIR}/mdadm.init ${D}${sysconfdir}/init.d/mdmonitor } -SYSTEMD_SERVICE_${PN} = "mdmonitor.service" -SYSTEMD_AUTO_ENABLE = "disable" - do_compile_ptest() { oe_runmake test } diff --git a/poky/meta/recipes-extended/packagegroups/packagegroup-core-base-utils.bb b/poky/meta/recipes-extended/packagegroups/packagegroup-core-base-utils.bb new file mode 100644 index 000000000..611e0cafc --- /dev/null +++ b/poky/meta/recipes-extended/packagegroups/packagegroup-core-base-utils.bb @@ -0,0 +1,57 @@ +# +# 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" + +inherit packagegroup + +VIRTUAL-RUNTIME_vim ?= "vim-tiny" + +RDEPENDS_${PN} = "\ + base-passwd \ + bash \ + bind-utils \ + bzip2 \ + coreutils \ + cpio \ + ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "", "debianutils-run-parts", d)} \ + dhcp-client \ + ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "", "dhcp-server", 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/poky/meta/recipes-extended/pam/libpam_1.3.0.bb b/poky/meta/recipes-extended/pam/libpam_1.3.0.bb index cc1241020..c124e3bb0 100644 --- a/poky/meta/recipes-extended/pam/libpam_1.3.0.bb +++ b/poky/meta/recipes-extended/pam/libpam_1.3.0.bb @@ -122,7 +122,7 @@ python populate_packages_prepend () { 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') @@ -131,7 +131,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() { diff --git a/poky/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.12.bb b/poky/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.12.bb index fa9f9954b..57c407e0f 100644 --- a/poky/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.12.bb +++ b/poky/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.12.bb @@ -23,5 +23,5 @@ inherit cpan ptest-perl RDEPENDS_${PN}-ptest += "perl-module-test-more" -BBCLASSEXTEND="native" +BBCLASSEXTEND="native nativesdk" diff --git a/poky/meta/recipes-extended/perl/libxml-sax-base-perl_1.09.bb b/poky/meta/recipes-extended/perl/libxml-sax-base-perl_1.09.bb index b3e01e9ac..373b522d6 100644 --- a/poky/meta/recipes-extended/perl/libxml-sax-base-perl_1.09.bb +++ b/poky/meta/recipes-extended/perl/libxml-sax-base-perl_1.09.bb @@ -21,4 +21,4 @@ S = "${WORKDIR}/XML-SAX-Base-${PV}" inherit cpan ptest-perl -BBCLASSEXTEND = "native" +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-extended/perl/libxml-sax-perl_1.00.bb b/poky/meta/recipes-extended/perl/libxml-sax-perl_1.00.bb index 141830efe..eccd0ad6b 100644 --- a/poky/meta/recipes-extended/perl/libxml-sax-perl_1.00.bb +++ b/poky/meta/recipes-extended/perl/libxml-sax-perl_1.00.bb @@ -29,4 +29,4 @@ do_install_ptest() { chown -R root:root ${D}${PTEST_PATH}/testfiles } -BBCLASSEXTEND = "native" +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-extended/psmisc/psmisc/0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch b/poky/meta/recipes-extended/psmisc/psmisc/0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch index b57a006bc..ca13bdbd1 100644 --- a/poky/meta/recipes-extended/psmisc/psmisc/0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch +++ b/poky/meta/recipes-extended/psmisc/psmisc/0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch @@ -1,4 +1,4 @@ -From 5dc872bb2fba6421cb8e1ee578f7bd4aaed55f61 Mon Sep 17 00:00:00 2001 +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 @@ -7,14 +7,13 @@ 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 cba2130..0d39878 100644 +index 5aa990a..7e8e3fc 100644 --- a/src/peekfd.c +++ b/src/peekfd.c @@ -30,8 +30,11 @@ @@ -28,8 +27,8 @@ index cba2130..0d39878 100644 +#include <stdint.h> #include <getopt.h> #include <ctype.h> - -@@ -228,11 +231,11 @@ int main(int argc, char **argv) + #include <dirent.h> +@@ -266,11 +269,11 @@ int main(int argc, char **argv) if (WIFSTOPPED(status)) { #ifdef PPC struct pt_regs regs; @@ -46,6 +45,3 @@ index cba2130..0d39878 100644 #elif defined(ARM) struct pt_regs regs; ptrace(PTRACE_GETREGS, pid, 0, ®s); --- -1.9.1 - diff --git a/poky/meta/recipes-extended/psmisc/psmisc_23.1.bb b/poky/meta/recipes-extended/psmisc/psmisc_23.2.bb index f07c9db1e..38e0a4405 100644 --- a/poky/meta/recipes-extended/psmisc/psmisc_23.1.bb +++ b/poky/meta/recipes-extended/psmisc/psmisc_23.2.bb @@ -6,5 +6,5 @@ SRC_URI = "git://gitlab.com/psmisc/psmisc.git;protocol=https \ file://0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch \ file://0001-Makefile.am-create-src-directory-before-attempting-t.patch \ " -SRCREV = "bd952b3063f2466ecab4ec093026cf0c4ce373c7" +SRCREV = "44eab9a3a63394eae6b79a7ef0a042f57e0c8a8f" S = "${WORKDIR}/git" diff --git a/poky/meta/recipes-extended/rpcbind/rpcbind/0001-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch b/poky/meta/recipes-extended/rpcbind/rpcbind/0001-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch deleted file mode 100644 index bf7aaef5a..000000000 --- a/poky/meta/recipes-extended/rpcbind/rpcbind/0001-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch +++ /dev/null @@ -1,221 +0,0 @@ -From 7ea36eeece56b59f98e469934e4c20b4da043346 Mon Sep 17 00:00:00 2001 -From: Doran Moppert <dmoppert@redhat.com> -Date: Thu, 11 May 2017 11:42:54 -0400 -Subject: [PATCH] rpcbind: pair all svc_getargs() calls with svc_freeargs() to - avoid memory leak - -This patch is to address CVE-2017-8779 "rpcbomb" in rpcbind, discussed -at [1], [2], [3]. The last link suggests this issue is actually a bug -in rpcbind, which led me here. - -The leak caused by the reproducer at [4] appears to come from -rpcb_service_4(), in the case where svc_getargs() returns false and the -function had an early return, rather than passing through the cleanup -path at done:, as would otherwise occur. - -It also addresses a couple of other locations where the same fault seems -to exist, though I haven't been able to exercise those. I hope someone -more intimate with rpc(3) can confirm my understanding is correct, and -that I haven't introduced any new bugs. - -Without this patch, using the reproducer (and variants) repeatedly -against rpcbind with a numBytes argument of 1_000_000_000, /proc/$(pidof -rpcbind)/status reports VmSize increase of 976564 kB each call, and -VmRSS increase of around 260 kB every 33 calls - the specific numbers -are probably an artifact of my rhel/glibc version. With the patch, -there is a small (~50 kB) VmSize increase with the first message, but -thereafter both VmSize and VmRSS remain steady. - -[1]: http://seclists.org/oss-sec/2017/q2/209 -[2]: https://bugzilla.redhat.com/show_bug.cgi?id=1448124 -[3]: https://sourceware.org/ml/libc-alpha/2017-05/msg00129.html -[4]: https://github.com/guidovranken/rpcbomb/ - - -CVE: CVE-2017-8779 -Upstream-Status: Backport - -Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com> ---- - src/pmap_svc.c | 56 +++++++++++++++++++++++++++++++++++++++++++++--------- - src/rpcb_svc.c | 2 +- - src/rpcb_svc_4.c | 2 +- - src/rpcb_svc_com.c | 8 ++++++++ - 4 files changed, 57 insertions(+), 11 deletions(-) - -diff --git a/src/pmap_svc.c b/src/pmap_svc.c -index 4c744fe..e926cdc 100644 ---- a/src/pmap_svc.c -+++ b/src/pmap_svc.c -@@ -175,6 +175,7 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long - long ans; - uid_t uid; - char uidbuf[32]; -+ int rc = TRUE; - - /* - * Can't use getpwnam here. We might end up calling ourselves -@@ -194,7 +195,8 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long - - if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { - svcerr_decode(xprt); -- return (FALSE); -+ rc = FALSE; -+ goto done; - } - #ifdef RPCBIND_DEBUG - if (debugging) -@@ -205,7 +207,8 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long - - if (!check_access(xprt, op, reg.pm_prog, PMAPVERS)) { - svcerr_weakauth(xprt); -- return (FALSE); -+ rc = (FALSE); -+ goto done; - } - - rpcbreg.r_prog = reg.pm_prog; -@@ -258,7 +261,16 @@ done_change: - rpcbs_set(RPCBVERS_2_STAT, ans); - else - rpcbs_unset(RPCBVERS_2_STAT, ans); -- return (TRUE); -+done: -+ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { -+ if (debugging) { -+ /*(void) xlog(LOG_DEBUG, "unable to free arguments\n");*/ -+ if (doabort) { -+ rpcbind_abort(); -+ } -+ } -+ } -+ return (rc); - } - - /* ARGSUSED */ -@@ -272,15 +284,18 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) - #ifdef RPCBIND_DEBUG - char *uaddr; - #endif -+ int rc = TRUE; - - if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { - svcerr_decode(xprt); -- return (FALSE); -+ rc = FALSE; -+ goto done; - } - - if (!check_access(xprt, PMAPPROC_GETPORT, reg.pm_prog, PMAPVERS)) { - svcerr_weakauth(xprt); -- return FALSE; -+ rc = FALSE; -+ goto done; - } - - #ifdef RPCBIND_DEBUG -@@ -330,21 +345,34 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) - pmap_ipprot2netid(reg.pm_prot) ?: "<unknown>", - port ? udptrans : ""); - -- return (TRUE); -+done: -+ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { -+ if (debugging) { -+ /* (void) xlog(LOG_DEBUG, "unable to free arguments\n");*/ -+ if (doabort) { -+ rpcbind_abort(); -+ } -+ } -+ } -+ return (rc); - } - - /* ARGSUSED */ - static bool_t - pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) - { -+ int rc = TRUE; -+ - if (!svc_getargs(xprt, (xdrproc_t)xdr_void, NULL)) { - svcerr_decode(xprt); -- return (FALSE); -+ rc = FALSE; -+ goto done; - } - - if (!check_access(xprt, PMAPPROC_DUMP, 0, PMAPVERS)) { - svcerr_weakauth(xprt); -- return FALSE; -+ rc = FALSE; -+ goto done; - } - - if ((!svc_sendreply(xprt, (xdrproc_t) xdr_pmaplist_ptr, -@@ -354,7 +382,17 @@ pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) - rpcbind_abort(); - } - } -- return (TRUE); -+ -+done: -+ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)NULL)) { -+ if (debugging) { -+ /*(void) xlog(LOG_DEBUG, "unable to free arguments\n");*/ -+ if (doabort) { -+ rpcbind_abort(); -+ } -+ } -+ } -+ return (rc); - } - - int pmap_netid2ipprot(const char *netid) -diff --git a/src/rpcb_svc.c b/src/rpcb_svc.c -index 709e3fb..091f530 100644 ---- a/src/rpcb_svc.c -+++ b/src/rpcb_svc.c -@@ -166,7 +166,7 @@ rpcb_service_3(struct svc_req *rqstp, SVCXPRT *transp) - svcerr_decode(transp); - if (debugging) - (void) xlog(LOG_DEBUG, "rpcbind: could not decode"); -- return; -+ goto done; - } - - if (rqstp->rq_proc == RPCBPROC_SET -diff --git a/src/rpcb_svc_4.c b/src/rpcb_svc_4.c -index 5094879..eebbbbe 100644 ---- a/src/rpcb_svc_4.c -+++ b/src/rpcb_svc_4.c -@@ -218,7 +218,7 @@ rpcb_service_4(struct svc_req *rqstp, SVCXPRT *transp) - svcerr_decode(transp); - if (debugging) - (void) xlog(LOG_DEBUG, "rpcbind: could not decode\n"); -- return; -+ goto done; - } - - if (rqstp->rq_proc == RPCBPROC_SET -diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c -index 5862c26..cb63afd 100644 ---- a/src/rpcb_svc_com.c -+++ b/src/rpcb_svc_com.c -@@ -927,6 +927,14 @@ error: - if (call_msg.rm_xid != 0) - (void) free_slot_by_xid(call_msg.rm_xid); - out: -+ if (!svc_freeargs(transp, (xdrproc_t) xdr_rmtcall_args, (char *) &a)) { -+ if (debugging) { -+ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); -+ if (doabort) { -+ rpcbind_abort(); -+ } -+ } -+ } - if (local_uaddr) - free(local_uaddr); - if (buf_alloc) --- -1.9.1 - diff --git a/poky/meta/recipes-extended/rpcbind/rpcbind/pmapproc_dump-Fixed-typo-in-memory-leak-patch.patch b/poky/meta/recipes-extended/rpcbind/rpcbind/pmapproc_dump-Fixed-typo-in-memory-leak-patch.patch deleted file mode 100644 index 4c23ee01c..000000000 --- a/poky/meta/recipes-extended/rpcbind/rpcbind/pmapproc_dump-Fixed-typo-in-memory-leak-patch.patch +++ /dev/null @@ -1,30 +0,0 @@ -From c49a7ea639eb700823e174fd605bbbe183e229aa Mon Sep 17 00:00:00 2001 -From: Steve Dickson <steved@redhat.com> -Date: Wed, 17 May 2017 10:52:25 -0400 -Subject: [PATCH] pmapproc_dump: Fixed typo in memory leak patch - -commit 7ea36eee introduce a typo that caused -NIS (aka ypbind) to fail. - -Signed-off-by: Steve Dickson <steved@redhat.com> - -Upstream-Status: Backport - -Signed-off-by: Jackie Huang <jackie.huang@windriver.com> ---- - src/pmap_svc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: rpcbind-0.2.4/src/pmap_svc.c -=================================================================== ---- rpcbind-0.2.4.orig/src/pmap_svc.c -+++ rpcbind-0.2.4/src/pmap_svc.c -@@ -384,7 +384,7 @@ pmapproc_dump(struct svc_req *rqstp /*__ - } - - done: -- if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)NULL)) { -+ if (!svc_freeargs(xprt, (xdrproc_t) xdr_void, (char *)NULL)) { - if (debugging) { - /*(void) xlog(LOG_DEBUG, "unable to free arguments\n");*/ - if (doabort) { diff --git a/poky/meta/recipes-extended/rpcbind/rpcbind/rpcbproc_callit_com-Stop-freeing-a-static-pointer.patch b/poky/meta/recipes-extended/rpcbind/rpcbind/rpcbproc_callit_com-Stop-freeing-a-static-pointer.patch deleted file mode 100644 index 9a000d028..000000000 --- a/poky/meta/recipes-extended/rpcbind/rpcbind/rpcbproc_callit_com-Stop-freeing-a-static-pointer.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 7c7590ad536c0e24bef790cb1e65702fc54db566 Mon Sep 17 00:00:00 2001 -From: Steve Dickson <steved@redhat.com> -Date: Tue, 30 May 2017 11:27:22 -0400 -Subject: [PATCH] rpcbproc_callit_com: Stop freeing a static pointer - -commit 7ea36ee introduced a svc_freeargs() call -that ended up freeing static pointer. - -It turns out the allocations for the rmt_args -is not necessary . The xdr routines (xdr_bytes) will -handle the memory management and the largest -possible message size is UDPMSGSIZE (due to UDP only) -which is smaller than RPC_BUF_MAX - -Signed-off-by: Steve Dickson <steved@redhat.com> - -Upstream-Status: Backport - -Signed-off-by: Jackie Huang <jackie.huang@windriver.com> ---- - src/rpcb_svc_com.c | 39 ++++++--------------------------------- - 1 file changed, 6 insertions(+), 33 deletions(-) - -diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c -index cb63afd..1fc2229 100644 ---- a/src/rpcb_svc_com.c -+++ b/src/rpcb_svc_com.c -@@ -612,9 +612,9 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, - struct netconfig *nconf; - struct netbuf *caller; - struct r_rmtcall_args a; -- char *buf_alloc = NULL, *outbufp; -+ char *outbufp; - char *outbuf_alloc = NULL; -- char buf[RPC_BUF_MAX], outbuf[RPC_BUF_MAX]; -+ char outbuf[RPC_BUF_MAX]; - struct netbuf *na = (struct netbuf *) NULL; - struct rpc_msg call_msg; - int outlen; -@@ -635,36 +635,10 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, - } - if (si.si_socktype != SOCK_DGRAM) - return; /* Only datagram type accepted */ -- sendsz = __rpc_get_t_size(si.si_af, si.si_proto, UDPMSGSIZE); -- if (sendsz == 0) { /* data transfer not supported */ -- if (reply_type == RPCBPROC_INDIRECT) -- svcerr_systemerr(transp); -- return; -- } -- /* -- * Should be multiple of 4 for XDR. -- */ -- sendsz = ((sendsz + 3) / 4) * 4; -- if (sendsz > RPC_BUF_MAX) { --#ifdef notyet -- buf_alloc = alloca(sendsz); /* not in IDR2? */ --#else -- buf_alloc = malloc(sendsz); --#endif /* notyet */ -- if (buf_alloc == NULL) { -- if (debugging) -- xlog(LOG_DEBUG, -- "rpcbproc_callit_com: No Memory!\n"); -- if (reply_type == RPCBPROC_INDIRECT) -- svcerr_systemerr(transp); -- return; -- } -- a.rmt_args.args = buf_alloc; -- } else { -- a.rmt_args.args = buf; -- } -+ sendsz = UDPMSGSIZE; - - call_msg.rm_xid = 0; /* For error checking purposes */ -+ memset(&a, 0, sizeof(a)); /* Zero out the input buffer */ - if (!svc_getargs(transp, (xdrproc_t) xdr_rmtcall_args, (char *) &a)) { - if (reply_type == RPCBPROC_INDIRECT) - svcerr_decode(transp); -@@ -704,7 +678,8 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, - if (rbl == (rpcblist_ptr)NULL) { - #ifdef RPCBIND_DEBUG - if (debugging) -- xlog(LOG_DEBUG, "not found\n"); -+ xlog(LOG_DEBUG, "prog %lu vers %lu: not found\n", -+ a.rmt_prog, a.rmt_vers); - #endif - if (reply_type == RPCBPROC_INDIRECT) - svcerr_noprog(transp); -@@ -937,8 +912,6 @@ out: - } - if (local_uaddr) - free(local_uaddr); -- if (buf_alloc) -- free(buf_alloc); - if (outbuf_alloc) - free(outbuf_alloc); - if (na) { --- -2.7.4 - diff --git a/poky/meta/recipes-extended/rpcbind/rpcbind_0.2.4.bb b/poky/meta/recipes-extended/rpcbind/rpcbind_1.2.5.bb index 3c6774c28..7c96aca36 100644 --- a/poky/meta/recipes-extended/rpcbind/rpcbind_0.2.4.bb +++ b/poky/meta/recipes-extended/rpcbind/rpcbind_1.2.5.bb @@ -15,13 +15,10 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \ file://rpcbind.conf \ file://rpcbind.socket \ file://rpcbind.service \ - file://0001-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch \ - file://pmapproc_dump-Fixed-typo-in-memory-leak-patch.patch \ - file://rpcbproc_callit_com-Stop-freeing-a-static-pointer.patch \ file://rpcbind_add_option_to_fix_port_number.patch \ " -SRC_URI[md5sum] = "cf10cd41ed8228fc54c316191c1f07fe" -SRC_URI[sha256sum] = "074a9a530dc7c11e0d905aa59bcb0847c009313f02e98d3d798aa9568f414c66" +SRC_URI[md5sum] = "ed46f09b9c0fa2d49015f6431bc5ea7b" +SRC_URI[sha256sum] = "2ce360683963b35c19c43f0ee2c7f18aa5b81ef41c3fdbd15ffcb00b8bffda7a" inherit autotools update-rc.d systemd pkgconfig @@ -48,8 +45,6 @@ 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' \ diff --git a/poky/meta/recipes-extended/shadow/files/0001-useradd-copy-extended-attributes-of-home.patch b/poky/meta/recipes-extended/shadow/files/0001-useradd-copy-extended-attributes-of-home.patch deleted file mode 100644 index 474b3a257..000000000 --- a/poky/meta/recipes-extended/shadow/files/0001-useradd-copy-extended-attributes-of-home.patch +++ /dev/null @@ -1,41 +0,0 @@ -Subject: [PATCH] useradd: copy extended attributes of home - -The Home directory wasn't getting the extended attributes -of /etc/skel. This patch fixes that issue and adds the copy -of the extended attributes of the root of the home directory. - -Upstream-Status: Pending - -Signed-off-by: José Bollo <jose.bollo@iot.bzh> -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - src/useradd.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/src/useradd.c b/src/useradd.c -index e721e52..c74e491 100644 ---- a/src/useradd.c -+++ b/src/useradd.c -@@ -54,6 +54,9 @@ - #include <sys/wait.h> - #include <time.h> - #include <unistd.h> -+#ifdef WITH_ATTR -+#include <attr/libattr.h> -+#endif - #include "chkname.h" - #include "defines.h" - #include "faillog.h" -@@ -2042,6 +2045,9 @@ static void create_home (void) - (void) chown (prefix_user_home, user_id, user_gid); - chmod (prefix_user_home, - 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK)); -+#ifdef WITH_ATTR -+ attr_copy_file (def_template, user_home, NULL, NULL); -+#endif - home_added = true; - #ifdef WITH_AUDIT - audit_logger (AUDIT_ADD_USER, Prog, --- -2.11.0 - diff --git a/poky/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch b/poky/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch index 702413659..faa6f68eb 100644 --- a/poky/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch +++ b/poky/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch @@ -4,11 +4,11 @@ Upstream-Status: Inappropriate [OE specific] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> --- - src/useradd.c | 82 +++++++++++++++++++++++++++++++++++++++-------------------- - 1 file changed, 54 insertions(+), 28 deletions(-) + src/useradd.c | 80 +++++++++++++++++++++++++++++++++++++++-------------------- + 1 file changed, 53 insertions(+), 27 deletions(-) diff --git a/src/useradd.c b/src/useradd.c -index 7214e72..3aaf45c 100644 +index 00a3c30..9ecbb58 100644 --- a/src/useradd.c +++ b/src/useradd.c @@ -2021,6 +2021,35 @@ static void usr_update (void) @@ -47,7 +47,7 @@ index 7214e72..3aaf45c 100644 * create_home - create the user's home directory * * create_home() creates the user's home directory if it does not -@@ -2038,42 +2067,39 @@ static void create_home (void) +@@ -2038,39 +2067,36 @@ static void create_home (void) fail_exit (E_HOMEDIR); } #endif @@ -74,16 +74,12 @@ index 7214e72..3aaf45c 100644 - (void) chown (prefix_user_home, user_id, user_gid); - chmod (prefix_user_home, - 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK)); +- home_added = true; + fail_exit (E_HOMEDIR); + } + (void) chown (prefix_user_home, user_id, user_gid); + chmod (prefix_user_home, + 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK)); - #ifdef WITH_ATTR -- attr_copy_file (def_template, user_home, NULL, NULL); -+ attr_copy_file (def_template, user_home, NULL, NULL); - #endif -- home_added = true; + home_added = true; #ifdef WITH_AUDIT - audit_logger (AUDIT_ADD_USER, Prog, diff --git a/poky/meta/recipes-extended/shadow/shadow.inc b/poky/meta/recipes-extended/shadow/shadow.inc index 09c37ef8a..4de21acb7 100644 --- a/poky/meta/recipes-extended/shadow/shadow.inc +++ b/poky/meta/recipes-extended/shadow/shadow.inc @@ -11,7 +11,6 @@ DEPENDS = "virtual/crypt" 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://0001-useradd-copy-extended-attributes-of-home.patch \ ${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \ " @@ -57,7 +56,7 @@ EXTRA_OECONF += "--without-audit \ NSCDOPT = "" NSCDOPT_class-native = "--without-nscd" NSCDOPT_class-nativesdk = "--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 \ diff --git a/poky/meta/recipes-extended/shadow/shadow_4.6.bb b/poky/meta/recipes-extended/shadow/shadow_4.6.bb index 5675cb8cc..c975395ff 100644 --- a/poky/meta/recipes-extended/shadow/shadow_4.6.bb +++ b/poky/meta/recipes-extended/shadow/shadow_4.6.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/poky/meta/recipes-extended/sudo/sudo.inc b/poky/meta/recipes-extended/sudo/sudo.inc index 69dccde59..90f2039bb 100644 --- a/poky/meta/recipes-extended/sudo/sudo.inc +++ b/poky/meta/recipes-extended/sudo/sudo.inc @@ -4,8 +4,8 @@ HOMEPAGE = "http://www.sudo.ws" BUGTRACKER = "http://www.sudo.ws/bugs/" SECTION = "admin" LICENSE = "ISC & BSD & Zlib" -LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=cc4bf2366b059c9598e3947f885931ec \ - file://plugins/sudoers/redblack.c;beginline=1;endline=41;md5=805782a8466975716f8376b2be9aedde \ +LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=6c76b73603ac7763ab0516ebfbe67b42 \ + file://plugins/sudoers/redblack.c;beginline=1;endline=46;md5=4a162fc04b86b03f5632180fe6076cda \ 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 \ @@ -13,6 +13,9 @@ LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=cc4bf2366b059c9598e3947f885931ec \ 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 \ + file://lib/util/arc4random.c;beginline=3;endline=20;md5=15bdc89c1b003fa4d7353e6296ebfd68 \ + file://lib/util/arc4random_uniform.c;beginline=3;endline=17;md5=31e630ac814d692fd0ab7a942659b46f \ + file://lib/util/getentropy.c;beginline=1;endline=19;md5=9f1a275ecd44cc264a2a4d5e06a75292 \ " inherit autotools diff --git a/poky/meta/recipes-extended/sudo/sudo_1.8.23.bb b/poky/meta/recipes-extended/sudo/sudo_1.8.27.bb index ce32bd187..4a3439302 100644 --- a/poky/meta/recipes-extended/sudo/sudo_1.8.23.bb +++ b/poky/meta/recipes-extended/sudo/sudo_1.8.27.bb @@ -7,8 +7,8 @@ SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \ PAM_SRC_URI = "file://sudo.pam" -SRC_URI[md5sum] = "ea444d747feb1decfebdffd0b38b0739" -SRC_URI[sha256sum] = "d863d29b6fc87bc784a3223350e2b28a2ff2c4738f0fb8f1c92bb38c3017e679" +SRC_URI[md5sum] = "b5c184b13b6b5de32af630af2fd013fd" +SRC_URI[sha256sum] = "7beb68b94471ef56d8a1036dbcdc09a7b58a949a68ffce48b83f837dd33e2ec0" 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)}" diff --git a/poky/meta/recipes-extended/sysklogd/sysklogd.inc b/poky/meta/recipes-extended/sysklogd/sysklogd.inc index f151dd87f..749026f85 100644 --- a/poky/meta/recipes-extended/sysklogd/sysklogd.inc +++ b/poky/meta/recipes-extended/sysklogd/sysklogd.inc @@ -13,7 +13,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \ inherit update-rc.d update-alternatives systemd -SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \ +SRC_URI = "git://github.com/troglobit/sysklogd.git;nobranch=1 \ file://no-strip-install.patch \ file://0001-Fix-build-with-musl.patch \ file://0001-fix-problems-that-causes-a-segmentation-fault-under-.patch \ @@ -24,6 +24,7 @@ SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar file://klogd.service \ file://tmpfiles.sysklogd.conf \ " +S = "${WORKDIR}/git" SRC_URI_append_e500v2 = " file://no-vectorization.patch" diff --git a/poky/meta/recipes-extended/sysklogd/sysklogd_1.5.1.bb b/poky/meta/recipes-extended/sysklogd/sysklogd_1.5.1.bb index 975ecc2b6..88bcfd9e4 100644 --- a/poky/meta/recipes-extended/sysklogd/sysklogd_1.5.1.bb +++ b/poky/meta/recipes-extended/sysklogd/sysklogd_1.5.1.bb @@ -1,4 +1,3 @@ require sysklogd.inc -SRC_URI[md5sum] = "c70599ab0d037fde724f7210c2c8d7f8" -SRC_URI[sha256sum] = "5166c185ae23c92e8b9feee66a6e3d0bc944bf673112f53e3ecf62e08ce7c201" +SRCREV = "930a2b1c0d15b14309a49f14e3f30e905456af4d" diff --git a/poky/meta/recipes-extended/sysstat/sysstat_11.7.4.bb b/poky/meta/recipes-extended/sysstat/sysstat_12.1.3.bb index c9b9130e9..5daf3f45f 100644 --- a/poky/meta/recipes-extended/sysstat/sysstat_11.7.4.bb +++ b/poky/meta/recipes-extended/sysstat/sysstat_12.1.3.bb @@ -4,5 +4,5 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb" SRC_URI += "file://0001-Include-needed-headers-explicitly.patch" -SRC_URI[md5sum] = "421f958db80e67a27eda1ff6b8ebcdeb" -SRC_URI[sha256sum] = "a96265a22784c29888669f961a0896841d177853f8f057efe063e891962b9090" +SRC_URI[md5sum] = "0f9b73f60aba6fd49de346bc384902c3" +SRC_URI[sha256sum] = "55498bf82755ba9fed3e7df61fd26f8f50dd3e7b3b229c731029a4c8ab51a1aa" diff --git a/poky/meta/recipes-extended/tar/tar_1.30.bb b/poky/meta/recipes-extended/tar/tar_1.31.bb index bd24f4762..a78504261 100644 --- a/poky/meta/recipes-extended/tar/tar_1.30.bb +++ b/poky/meta/recipes-extended/tar/tar_1.31.bb @@ -11,8 +11,8 @@ SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2 \ file://musl_dirent.patch \ " -SRC_URI[md5sum] = "8404e4c1fc5a3000228ab2b8ad674a65" -SRC_URI[sha256sum] = "87592b86cb037c554375f5868bdd3cc57748aef38d6cb741c81065f0beac63b7" +SRC_URI[md5sum] = "77afa35b696c8d760331fa0e12c2fac9" +SRC_URI[sha256sum] = "577bd4463eea103bdfc662fc385789e2228dbeb399a1d0b98571ed9ce044f763" inherit autotools gettext texinfo @@ -43,11 +43,6 @@ do_install_append_class-target() { fi } -do_install_append_libc-musl() { - rm -f ${D}${libdir}/charset.alias - rmdir ${D}${libdir} -} - PACKAGES =+ "${PN}-rmt" FILES_${PN}-rmt = "${base_sbindir}/rmt*" diff --git a/poky/meta/recipes-extended/timezone/timezone.inc b/poky/meta/recipes-extended/timezone/timezone.inc new file mode 100644 index 000000000..1ade0075e --- /dev/null +++ b/poky/meta/recipes-extended/timezone/timezone.inc @@ -0,0 +1,18 @@ +SUMMARY = "Timezone data" +HOMEPAGE = "http://www.iana.org/time-zones" +SECTION = "base" +LICENSE = "PD & BSD & BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c679c9d6b02bc2757b3eaf8f53c43fba" + +PV = "2019a" + +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.md5sum] = "27585a20bc5401324f42c8deb6e4677f" +SRC_URI[tzcode.sha256sum] = "8739f162bc30cdfb482435697f969253abea49595541a0afd5f443fbae433ff5" +SRC_URI[tzdata.md5sum] = "288f7b1e43018c633da108f13b27cf91" +SRC_URI[tzdata.sha256sum] = "90366ddf4aa03e37a16cd49255af77f801822310b213f195e2206ead48c59772" diff --git a/poky/meta/recipes-extended/timezone/tzcode-native.bb b/poky/meta/recipes-extended/timezone/tzcode-native.bb new file mode 100644 index 000000000..e3582ba67 --- /dev/null +++ b/poky/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/poky/meta/recipes-extended/tzdata/tzdata_2018i.bb b/poky/meta/recipes-extended/timezone/tzdata.bb index 4482e89d3..82fe369ba 100644 --- a/poky/meta/recipes-extended/tzdata/tzdata_2018i.bb +++ b/poky/meta/recipes-extended/timezone/tzdata.bb @@ -1,17 +1,7 @@ -SUMMARY = "Timezone data" -HOMEPAGE = "http://www.iana.org/time-zones" -SECTION = "base" -LICENSE = "PD & BSD & BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=c679c9d6b02bc2757b3eaf8f53c43fba" +require timezone.inc DEPENDS = "tzcode-native" -SRC_URI = "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[tzdata.md5sum] = "b3f0a1a789480a036e58466cd0702477" -SRC_URI[tzdata.sha256sum] = "82c45ef84ca3bc01d0a4a397ba8adeb8f7f199c6550740587c6ac5a7108c00d9" - inherit allarch RCONFLICTS_${PN} = "timezones timezone-africa timezone-america timezone-antarctica \ @@ -90,9 +80,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" @@ -134,7 +126,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 \ @@ -155,8 +146,8 @@ FILES_tzdata-misc += "${datadir}/zoneinfo/Cuba \ ${datadir}/zoneinfo/Turkey" RPROVIDES_tzdata-misc = "tzdata-misc" - -FILES_${PN} += "${datadir}/zoneinfo/Pacific/Honolulu \ +FILES_tzdata-core += " \ + ${datadir}/zoneinfo/Pacific/Honolulu \ ${datadir}/zoneinfo/America/Anchorage \ ${datadir}/zoneinfo/America/Los_Angeles \ ${datadir}/zoneinfo/America/Denver \ @@ -211,5 +202,8 @@ FILES_${PN} += "${datadir}/zoneinfo/Pacific/Honolulu \ ${datadir}/zoneinfo/iso3166.tab \ ${datadir}/zoneinfo/Etc/*" -CONFFILES_${PN} += "${@ "${sysconfdir}/timezone" if bb.utils.to_boolean(d.getVar('INSTALL_TIMEZONE_FILE')) else "" }" -CONFFILES_${PN} += "${sysconfdir}/localtime" +CONFFILES_tzdata-core += "${@ "${sysconfdir}/timezone" if bb.utils.to_boolean(d.getVar('INSTALL_TIMEZONE_FILE')) else "" }" +CONFFILES_tzdata-core += "${sysconfdir}/localtime" + +ALLOW_EMPTY_${PN} = "1" +RDEPENDS_${PN} = "${TZ_PACKAGES}" diff --git a/poky/meta/recipes-extended/tzcode/tzcode-native_2018i.bb b/poky/meta/recipes-extended/tzcode/tzcode-native_2018i.bb deleted file mode 100644 index f056370b4..000000000 --- a/poky/meta/recipes-extended/tzcode/tzcode-native_2018i.bb +++ /dev/null @@ -1,30 +0,0 @@ -# note that we allow for us to use data later than our code version -# -SUMMARY = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect" -LICENSE = "PD & BSD & BSD-3-Clause" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=c679c9d6b02bc2757b3eaf8f53c43fba" - -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.md5sum] = "6a6d98be8fa2fa3485e25343e79188b4" -SRC_URI[tzcode.sha256sum] = "aaacdb876ca6fb9d58e244b462cbc7578a496b1b10994381b4b32b9f2ded32dc" -SRC_URI[tzdata.md5sum] = "b3f0a1a789480a036e58466cd0702477" -SRC_URI[tzdata.sha256sum] = "82c45ef84ca3bc01d0a4a397ba8adeb8f7f199c6550740587c6ac5a7108c00d9" - -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/poky/meta/recipes-extended/wget/wget.inc b/poky/meta/recipes-extended/wget/wget.inc index 3cff656a6..07e8d8e87 100644 --- a/poky/meta/recipes-extended/wget/wget.inc +++ b/poky/meta/recipes-extended/wget/wget.inc @@ -3,12 +3,11 @@ HOMEPAGE = "https://www.gnu.org/software/wget/" SECTION = "console/network" LICENSE = "GPLv3" LIC_FILES_CHKSUM = "file://COPYING;md5=c678957b0c8e964aa6c70fd77641a71e" -DEPENDS = "gnutls zlib libpcre" inherit autotools gettext texinfo update-alternatives pkgconfig -EXTRA_OECONF = "--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}"' @@ -21,9 +20,17 @@ RRECOMMENDS_${PN} += "ca-certificates" BBCLASSEXTEND = "nativesdk" -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" -PACKAGECONFIG[libuuid] = "--with-libuuid, --without-libuuid,util-linux" +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" # Let aclocal use the relative path for the m4 file rather than # absolute, otherwise there might be an "Argument list too long" error diff --git a/poky/meta/recipes-extended/wget/wget/0001-Unset-need_charset_alias-when-building-for-musl.patch b/poky/meta/recipes-extended/wget/wget/0001-Unset-need_charset_alias-when-building-for-musl.patch deleted file mode 100644 index 0b3c6f555..000000000 --- a/poky/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: Pending - -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/poky/meta/recipes-extended/wget/wget_1.19.5.bb b/poky/meta/recipes-extended/wget/wget_1.19.5.bb deleted file mode 100644 index e37d8c784..000000000 --- a/poky/meta/recipes-extended/wget/wget_1.19.5.bb +++ /dev/null @@ -1,9 +0,0 @@ -SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \ - file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ - file://0002-improve-reproducibility.patch \ - " - -SRC_URI[md5sum] = "2db6f03d655041f82eb64b8c8a1fa7da" -SRC_URI[sha256sum] = "b39212abe1a73f2b28f4c6cb223c738559caac91d6e416a6d91d4b9d55c9faee" - -require wget.inc diff --git a/poky/meta/recipes-extended/wget/wget_1.20.1.bb b/poky/meta/recipes-extended/wget/wget_1.20.1.bb new file mode 100644 index 000000000..d176bd0ac --- /dev/null +++ b/poky/meta/recipes-extended/wget/wget_1.20.1.bb @@ -0,0 +1,8 @@ +SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \ + file://0002-improve-reproducibility.patch \ + " + +SRC_URI[md5sum] = "f6ebe9c7b375fc9832fb1b2028271fb7" +SRC_URI[sha256sum] = "b783b390cb571c837b392857945f5a1f00ec6b043177cc42abb8ee1b542ee1b3" + +require wget.inc |