diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-12-16 17:11:34 -0800 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-01-08 18:21:44 -0500 |
commit | 1a4b7ee28bf7413af6513fb45ad0d0736048f866 (patch) | |
tree | 79f6d8ea698cab8f2eaf4f54b793d2ca7a1451ce /poky/meta/recipes-extended | |
parent | 5b9ede0403237c7dace972affa65cf64a1aadd0e (diff) | |
download | talos-openbmc-1a4b7ee28bf7413af6513fb45ad0d0736048f866.tar.gz talos-openbmc-1a4b7ee28bf7413af6513fb45ad0d0736048f866.zip |
reset upstream subtrees to yocto 2.6
Reset the following subtrees on thud HEAD:
poky: 87e3a9739d
meta-openembedded: 6094ae18c8
meta-security: 31dc4e7532
meta-raspberrypi: a48743dc36
meta-xilinx: c42016e2e6
Also re-apply backports that didn't make it into thud:
poky:
17726d0 systemd-systemctl-native: handle Install wildcards
meta-openembedded:
4321a5d libtinyxml2: update to 7.0.1
042f0a3 libcereal: Add native and nativesdk classes
e23284f libcereal: Allow empty package
030e8d4 rsyslog: curl-less build with fmhttp PACKAGECONFIG
179a1b9 gtest: update to 1.8.1
Squashed OpenBMC subtree compatibility updates:
meta-aspeed:
Brad Bishop (1):
aspeed: add yocto 2.6 compatibility
meta-ibm:
Brad Bishop (1):
ibm: prepare for yocto 2.6
meta-ingrasys:
Brad Bishop (1):
ingrasys: set layer compatibility to yocto 2.6
meta-openpower:
Brad Bishop (1):
openpower: set layer compatibility to yocto 2.6
meta-phosphor:
Brad Bishop (3):
phosphor: set layer compatibility to thud
phosphor: libgpg-error: drop patches
phosphor: react to fitimage artifact rename
Ed Tanous (4):
Dropbear: upgrade options for latest upgrade
yocto2.6: update openssl options
busybox: remove upstream watchdog patch
systemd: Rebase CONFIG_CGROUP_BPF patch
Change-Id: I7b1fe71cca880d0372a82d94b5fd785323e3a9e7
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/recipes-extended')
203 files changed, 4621 insertions, 5485 deletions
diff --git a/poky/meta/recipes-extended/acpica/acpica_20170303.bb b/poky/meta/recipes-extended/acpica/acpica_20180508.bb index 51ae77b78..b5c89fafc 100644 --- a/poky/meta/recipes-extended/acpica/acpica_20170303.bb +++ b/poky/meta/recipes-extended/acpica/acpica_20180508.bb @@ -14,15 +14,14 @@ LIC_FILES_CHKSUM = "file://generate/unix/readme.txt;md5=204407e197c1a01154a48f6c COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" -DEPENDS = "bison flex" +DEPENDS = "bison flex bison-native" SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix2-${PV}.tar.gz \ - file://rename-yy_scan_string-manually.patch \ - file://manipulate-fds-instead-of-FILE.patch;striplevel=2 \ - file://0001-Linux-add-support-for-X32-ABI-compilation.patch \ - " -SRC_URI[md5sum] = "48ef4314fb4ffdd0c96f14dcf20544e1" -SRC_URI[sha256sum] = "b2d81e84107ac9a02be86ea43cbea7afa8fd4b4150270bc88c2d4c9fea0b8aad" + file://rename-yy_scan_string-manually.patch \ + file://manipulate-fds-instead-of-FILE.patch \ + " +SRC_URI[md5sum] = "31691e2eb82b2064f78536a3423c18d6" +SRC_URI[sha256sum] = "5d8fc9d9db9e04830d40bec9add04b21c05d466e0187d354815006fdd823cf15" UPSTREAM_CHECK_URI = "https://acpica.org/downloads" S = "${WORKDIR}/acpica-unix2-${PV}" diff --git a/poky/meta/recipes-extended/acpica/files/0001-Linux-add-support-for-X32-ABI-compilation.patch b/poky/meta/recipes-extended/acpica/files/0001-Linux-add-support-for-X32-ABI-compilation.patch deleted file mode 100644 index df7420006..000000000 --- a/poky/meta/recipes-extended/acpica/files/0001-Linux-add-support-for-X32-ABI-compilation.patch +++ /dev/null @@ -1,31 +0,0 @@ -From d22241efc0708c9799f17a20eabb52a48d6d6ea1 Mon Sep 17 00:00:00 2001 -From: Anuj Mittal <anuj.mittal@intel.com> -Date: Tue, 2 Jan 2018 12:35:32 +0800 -Subject: [PATCH] Linux: add support for X32 ABI compilation - -X32 follows ILP32 model. Check for ILP32 as well when checking for -x86_64 to ensure the defines are correct for X32 ABI. - -Upstream-Status: Submitted [https://github.com/acpica/acpica/pull/348] - -Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> ---- - source/include/platform/aclinux.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/source/include/platform/aclinux.h b/source/include/platform/aclinux.h -index 75b1d82..6b8ff73 100644 ---- a/source/include/platform/aclinux.h -+++ b/source/include/platform/aclinux.h -@@ -315,7 +315,7 @@ - #define ACPI_FLUSH_CPU_CACHE() - #define ACPI_CAST_PTHREAD_T(Pthread) ((ACPI_THREAD_ID) (Pthread)) - --#if defined(__ia64__) || defined(__x86_64__) ||\ -+#if defined(__ia64__) || (defined(__x86_64__) && !defined(__ILP32__)) ||\ - defined(__aarch64__) || defined(__PPC64__) ||\ - defined(__s390x__) - #define ACPI_MACHINE_WIDTH 64 --- -2.7.4 - diff --git a/poky/meta/recipes-extended/acpica/files/manipulate-fds-instead-of-FILE.patch b/poky/meta/recipes-extended/acpica/files/manipulate-fds-instead-of-FILE.patch index 5610ed9be..d8b5f9aa8 100644 --- a/poky/meta/recipes-extended/acpica/files/manipulate-fds-instead-of-FILE.patch +++ b/poky/meta/recipes-extended/acpica/files/manipulate-fds-instead-of-FILE.patch @@ -1,4 +1,4 @@ -From 69171c22f3872ecb4c1ab27985e93ca44084595e Mon Sep 17 00:00:00 2001 +From 540d80469e6a7dce6baf7214df90e86daffc5175 Mon Sep 17 00:00:00 2001 From: Fan Xin <fan.xin@jp.fujitsu.com> Date: Mon, 5 Jun 2017 13:26:38 +0900 Subject: [PATCH] aslfiles.c: manipulate fds instead of FILE @@ -16,18 +16,20 @@ Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Rebase on acpica 20170303 Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com> + --- - acpica-unix2-20170303/source/compiler/aslfiles.c | 14 +++++++++++--- - 1 file changed, 11 insertions(+), 3 deletions(-) + source/compiler/aslfiles.c | 15 ++++++++++++--- + 1 file changed, 12 insertions(+), 3 deletions(-) -diff --git a/acpica-unix2-20170303/source/compiler/aslfiles.c b/acpica-unix2-20170303/source/compiler/aslfiles.c -index 809090c..97898b1 100644 ---- a/acpica-unix2-20170303/source/compiler/aslfiles.c -+++ b/acpica-unix2-20170303/source/compiler/aslfiles.c -@@ -44,6 +44,10 @@ +diff --git a/source/compiler/aslfiles.c b/source/compiler/aslfiles.c +index 82865db..cc072dc 100644 +--- a/source/compiler/aslfiles.c ++++ b/source/compiler/aslfiles.c +@@ -43,6 +43,11 @@ + #include "aslcompiler.h" #include "acapps.h" - #include "dtcompiler.h" ++#include "dtcompiler.h" +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> @@ -35,7 +37,7 @@ index 809090c..97898b1 100644 #define _COMPONENT ACPI_COMPILER ACPI_MODULE_NAME ("aslfiles") -@@ -607,6 +611,8 @@ FlOpenMiscOutputFiles ( +@@ -606,6 +611,8 @@ FlOpenMiscOutputFiles ( if (Gbl_DebugFlag) { @@ -44,7 +46,7 @@ index 809090c..97898b1 100644 Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_DEBUG); if (!Filename) { -@@ -618,10 +624,10 @@ FlOpenMiscOutputFiles ( +@@ -617,10 +624,10 @@ FlOpenMiscOutputFiles ( /* Open the debug file as STDERR, text mode */ Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Filename = Filename; @@ -58,7 +60,7 @@ index 809090c..97898b1 100644 { /* * A problem with freopen is that on error, we no longer -@@ -635,6 +641,8 @@ FlOpenMiscOutputFiles ( +@@ -634,6 +641,8 @@ FlOpenMiscOutputFiles ( exit (1); } @@ -67,6 +69,3 @@ index 809090c..97898b1 100644 AslCompilerSignon (ASL_FILE_DEBUG_OUTPUT); AslCompilerFileHeader (ASL_FILE_DEBUG_OUTPUT); } --- -1.9.1 - diff --git a/poky/meta/recipes-extended/bash/bash/bash-memleak-bug-fix-for-builtin-command-read.patch b/poky/meta/recipes-extended/bash/bash/bash-memleak-bug-fix-for-builtin-command-read.patch deleted file mode 100644 index 9fb6ba972..000000000 --- a/poky/meta/recipes-extended/bash/bash/bash-memleak-bug-fix-for-builtin-command-read.patch +++ /dev/null @@ -1,35 +0,0 @@ -From d3b6303a6853f612a56848ee4e59eaa0b0ab9489 Mon Sep 17 00:00:00 2001 -From: Zhang Xiao <xiao.zhang@windriver.com> -Date: Tue, 21 Feb 2017 11:30:14 +0800 -Subject: [PATCH] bash: memleak bug fix for builtin command read - -Built in command "read" with "-e" use Readline to obtain the line -in an interactive shell. In this process, a string "rlbuf" is -just allocated without free operation thus cause memory leak. Fix it. - -Upstream-Status: Submitted [http://lists.gnu.org/archive/html/bug-bash/2017-02/msg00061.html] - -Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com> ---- - builtins/read.def | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/builtins/read.def b/builtins/read.def -index 4397154..ee0c5a6 100644 ---- a/builtins/read.def -+++ b/builtins/read.def -@@ -674,6 +674,11 @@ add_char: - input_string[i] = '\0'; - CHECK_ALRM; - -+#if defined (READLINE) -+ if (edit) -+ xfree (rlbuf); -+#endif -+ - if (retval < 0) - { - t_errno = errno; --- -1.9.1 - diff --git a/poky/meta/recipes-extended/bash/bash_4.4.12.bb b/poky/meta/recipes-extended/bash/bash_4.4.12.bb deleted file mode 100644 index 9382a77af..000000000 --- a/poky/meta/recipes-extended/bash/bash_4.4.12.bb +++ /dev/null @@ -1,24 +0,0 @@ -require bash.inc - -# GPLv2+ (< 4.0), GPLv3+ (>= 4.0) -LICENSE = "GPLv3+" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \ - file://execute_cmd.patch;striplevel=0 \ - file://mkbuiltins_have_stringize.patch \ - file://build-tests.patch \ - file://test-output.patch \ - file://fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch \ - file://run-ptest \ - file://fix-run-builtins.patch \ - file://0001-help-fix-printf-format-security-warning.patch \ - file://bash-memleak-bug-fix-for-builtin-command-read.patch \ - file://pathexp-dep.patch \ - " - -SRC_URI[tarball.md5sum] = "7c112970cbdcadfc331e10eeb5f6aa41" -SRC_URI[tarball.sha256sum] = "57d8432be54541531a496fd4904fdc08c12542f43605a9202594fa5d5f9f2331" - - -BBCLASSEXTEND = "nativesdk" diff --git a/poky/meta/recipes-extended/bash/bash_4.4.18.bb b/poky/meta/recipes-extended/bash/bash_4.4.18.bb new file mode 100644 index 000000000..8fa0978d4 --- /dev/null +++ b/poky/meta/recipes-extended/bash/bash_4.4.18.bb @@ -0,0 +1,41 @@ +require bash.inc + +# GPLv2+ (< 4.0), GPLv3+ (>= 4.0) +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \ + ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-019;apply=yes;striplevel=0;name=patch019 \ + ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-020;apply=yes;striplevel=0;name=patch020 \ + ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-021;apply=yes;striplevel=0;name=patch021 \ + ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-022;apply=yes;striplevel=0;name=patch022 \ + ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-023;apply=yes;striplevel=0;name=patch023 \ + file://execute_cmd.patch;striplevel=0 \ + file://mkbuiltins_have_stringize.patch \ + file://build-tests.patch \ + file://test-output.patch \ + file://fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch \ + file://run-ptest \ + file://fix-run-builtins.patch \ + file://0001-help-fix-printf-format-security-warning.patch \ + file://pathexp-dep.patch \ + " + +SRC_URI[tarball.md5sum] = "518e2c187cc11a17040f0915dddce54e" +SRC_URI[tarball.sha256sum] = "604d9eec5e4ed5fd2180ee44dd756ddca92e0b6aa4217bbab2b6227380317f23" + +SRC_URI[patch019.md5sum] = "8f43e1d277b02f3319a34c1cd4a4ff3e" +SRC_URI[patch019.sha256sum] = "27170d6edfe8819835407fdc08b401d2e161b1400fe9d0c5317a51104c89c11e" +SRC_URI[patch020.md5sum] = "5217ff08c444446ec306dce60437c288" +SRC_URI[patch020.sha256sum] = "1840e2cbf26ba822913662f74037594ed562361485390c52813b38156c99522c" +SRC_URI[patch021.md5sum] = "282c7d9b38da8005d25b4f816328a2f4" +SRC_URI[patch021.sha256sum] = "bd8f59054a763ec1c64179ad5cb607f558708a317c2bdb22b814e3da456374c1" +SRC_URI[patch022.md5sum] = "0b709c9d7f8e6cf267a8b863efb899f7" +SRC_URI[patch022.sha256sum] = "45331f0936e36ab91bfe44b936e33ed8a1b1848fa896e8a1d0f2ef74f297cb79" +SRC_URI[patch023.md5sum] = "fe2e0ca4cf9409ff0e9428e1236f983e" +SRC_URI[patch023.sha256sum] = "4fec236f3fbd3d0c47b893fdfa9122142a474f6ef66c20ffb6c0f4864dd591b6" + +DEBUG_OPTIMIZATION_append_armv4 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}" +DEBUG_OPTIMIZATION_append_armv5 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}" + +BBCLASSEXTEND = "nativesdk" diff --git a/poky/meta/recipes-extended/bc/bc/libmath.h b/poky/meta/recipes-extended/bc/bc/libmath.h new file mode 100644 index 000000000..63e1acb9e --- /dev/null +++ b/poky/meta/recipes-extended/bc/bc/libmath.h @@ -0,0 +1,46 @@ +{"@iK20:s2:p@r", +"@iF1,5.6,7,8,9,10,11,12,13,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C1,0:", +"s14:pl7:s0:pl14:RN1:l5:0<Z2:1s12:pl5:ns5:pN2:l2:s15:pK6:l15:+", +"K.44:l5:*+s13:pl5:cS1+s2:pN3:l5:1>Z4:l10:1+s10:pl5:K2:/s5:pl2:", +"1+s2:pJ3:N4:l13:s2:p1l5:+s14:pl5:s6:p1s8:pK2:s11:pN6:1B7:J5:N8:", +"l11:i11:pJ6:N7:l6:l5:*s6:l8:l11:*s8:/s9:pl9:0=Z9:l10:0>Z10:N11:", +"l10:d10:Z12:l14:l14:*s14:pJ11:N12:N10:l15:s2:pl12:Z13:1l14:/R", +"N13:l14:1/RN9:l14:l9:+s14:pJ8:N5:0R]@r", +"@iF2,5.7,9,10,11,12,13,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C2,0:", +"s14:pl7:s0:pl14:RN1:l5:0{Z2:1K10:l2:^-1/RN2:l2:s15:pK6:l2:+s2:", +"pK2:s10:p0s11:pN3:l5:K2:}Z4:l10:K2:*s10:pl5:cRs5:pJ3:N4:N5:l5:", +"K.5:{Z6:l10:K2:*s10:pl5:cRs5:pJ5:N6:l5:1-l5:1+/s13:s14:pl13:l13:", +"*s12:pK3:s11:pN8:1B9:J7:N10:l11:K2:+s11:pJ8:N9:l13:l12:*s13:l11:", +"/s9:pl9:0=Z11:l10:l14:*s14:pl15:s2:pl14:1/RN11:l14:l9:+s14:pJ10:N7:", +"0R]@r", +"@iF3,5.7,9,11,12,13,16,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C3,0:", +"s14:pl7:s0:pl14:RN1:l2:s15:pK1.1:l15:*K2:+s2:p1C4,0:s14:pl5:0", +"<Z2:1s12:pl5:ns5:pN2:0s2:pl5:l14:/K2:+K4:/s13:pl5:K4:l13:*l14:", +"*-s5:pl13:K2:%Z3:l5:ns5:pN3:l15:K2:+s2:pl5:s9:s14:pl5:nl5:*s16:", +"pK3:s11:pN5:1B6:J4:N7:l11:K2:+s11:pJ5:N6:l9:l16:l11:l11:1-*/*", +"s9:pl9:0=Z8:l15:s2:pl12:Z9:l14:n1/RN9:l14:1/RN8:l14:l9:+s14:p", +"J7:N4:0R]@r", +"@iF5,5.7,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C5,0:s14:pl7:s0:pl14:", +"RN1:l2:s15:pl2:K1.2:*s2:pl5:1C4,0:K2:*+C3,0:s14:pl15:s2:pl14:", +"1/R0R]@r", +"@iF4,5.6,7,9,10,11,12,13,16,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:", +"C4,0:s14:pl7:s0:pl14:RN1:1s12:pl5:0<Z2:1ns12:pl5:ns5:pN2:l5:1", +"=Z3:l2:K25:{Z4:K.7853981633974483096156608:l12:/RN4:l2:K40:{Z5:", +"K.7853981633974483096156608458198757210492:l12:/RN5:l2:K60:{Z6:", +"K.785398163397448309615660845819875721049292349843776455243736", +":l12:/RN6:N3:l5:K.2:=Z7:l2:K25:{Z8:K.1973955598498807583700497", +":l12:/RN8:l2:K40:{Z9:K.1973955598498807583700497651947902934475", +":l12:/RN9:l2:K60:{Z10:K.197395559849880758370049765194790293447585103787852101517688", +":l12:/RN10:N7:l2:s15:pl5:K.2:>Z11:l15:K5:+s2:pK.2:C4,0:s6:pN11:", +"l15:K3:+s2:pN12:l5:K.2:>Z13:l10:1+s10:pl5:K.2:-1l5:K.2:*+/s5:", +"pJ12:N13:l5:s13:s14:pl5:nl5:*s16:pK3:s11:pN15:1B16:J14:N17:l11:", +"K2:+s11:pJ15:N16:l13:l16:*s13:l11:/s9:pl9:0=Z18:l15:s2:pl10:l6:", +"*l14:+l12:/RN18:l14:l9:+s14:pJ17:N14:0R]@r", +"@iF6,13,5.6,7,8,9,10,11,12,16,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl13:", +"l5:C6,00:s14:pl7:s0:pl14:RN1:l2:s15:p0s2:pl13:1/s13:pl13:0<Z2:", +"l13:ns13:pl13:K2:%1=Z3:1s12:pN3:N2:1s10:pK2:s11:pN5:l11:l13:{", +"B6:J4:N7:l11:i11:pJ5:N6:l10:l11:*s10:pJ7:N4:K1.5:l15:*s2:pl5:", +"l13:^K2:l13:^/l10:/s10:p1s9:s14:pl5:nl5:*K4:/s16:pK1.5:l15:*l10:", +"cL+l10:cS-s2:p1s11:pN9:1B10:J8:N11:l11:i11:pJ9:N10:l9:l16:*l11:", +"/l13:l11:+/s9:pl9:0=Z12:l15:s2:pl12:Z13:l10:nl14:*1/RN13:l10:", +"l14:*1/RN12:l14:l9:+s14:pJ11:N8:0R]@r",0} diff --git a/poky/meta/recipes-extended/bc/bc/no-gen-libmath.patch b/poky/meta/recipes-extended/bc/bc/no-gen-libmath.patch new file mode 100644 index 000000000..c4cce5875 --- /dev/null +++ b/poky/meta/recipes-extended/bc/bc/no-gen-libmath.patch @@ -0,0 +1,24 @@ +These rules are not cross-friendly so delete them and we'll generate the file offline. + +Upstream-Status: Inappropriate +Signed-off-by: Ross Burton <ross.burton@intel.com> + +diff --git a/bc/Makefile.am b/bc/Makefile.am +index d9d412e..f244241 100644 +--- a/bc/Makefile.am ++++ b/bc/Makefile.am +@@ -31,14 +31,6 @@ global.o: libmath.h + + fbcOBJ = main.o bc.o scan.o execute.o load.o storage.o util.o warranty.o + +-libmath.h: libmath.b $(fbcOBJ) $(LIBBC) +- echo '{0}' > libmath.h +- $(MAKE) global.o +- $(LINK) -o fbc $(fbcOBJ) global.o $(LIBBC) $(LIBL) $(READLINELIB) $(LIBS) +- ./fbc -c $(srcdir)/libmath.b </dev/null >libmath.h +- $(srcdir)/fix-libmath_h +- rm -f ./fbc ./global.o +- + sbcOBJ = main.o sbc.o scan.o execute.o global.o load.o storage.o util.o \ + warranty.o + sbc.o: sbc.c diff --git a/poky/meta/recipes-extended/bc/bc_1.06.bb b/poky/meta/recipes-extended/bc/bc_1.06.bb deleted file mode 100644 index d8c8a860f..000000000 --- a/poky/meta/recipes-extended/bc/bc_1.06.bb +++ /dev/null @@ -1,26 +0,0 @@ -SUMMARY = "Arbitrary precision calculator language" -HOMEPAGE = "http://www.gnu.org/software/bc/bc.html" - -LICENSE = "GPLv2+ & LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ - file://COPYING.LIB;md5=d8045f3b8f929c1cb29a1e3fd737b499 \ - file://bc/bcdefs.h;endline=31;md5=46dffdaf10a99728dd8ce358e45d46d8 \ - file://dc/dc.h;endline=25;md5=2f9c558cdd80e31b4d904e48c2374328 \ - file://lib/number.c;endline=31;md5=99434a0898abca7784acfd36b8191199" - -SECTION = "base" -DEPENDS = "flex" -PR = "r3" - -SRC_URI = "${GNU_MIRROR}/bc/bc-${PV}.tar.gz \ - file://fix-segment-fault.patch " - -SRC_URI[md5sum] = "d44b5dddebd8a7a7309aea6c36fda117" -SRC_URI[sha256sum] = "4ef6d9f17c3c0d92d8798e35666175ecd3d8efac4009d6457b5c99cea72c0e33" - -inherit autotools texinfo update-alternatives - -ALTERNATIVE_${PN} = "dc" -ALTERNATIVE_PRIORITY = "100" - -BBCLASSEXTEND = "native" diff --git a/poky/meta/recipes-extended/bc/bc_1.07.1.bb b/poky/meta/recipes-extended/bc/bc_1.07.1.bb new file mode 100644 index 000000000..e80857745 --- /dev/null +++ b/poky/meta/recipes-extended/bc/bc_1.07.1.bb @@ -0,0 +1,33 @@ +SUMMARY = "Arbitrary precision calculator language" +HOMEPAGE = "http://www.gnu.org/software/bc/bc.html" + +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ + file://bc/bcdefs.h;endline=17;md5=4295c06df9e833519a342f7b5d43db06 \ + file://dc/dc.h;endline=18;md5=36b8c600b63ee8c3aeade2764f6b2a4b \ + file://lib/number.c;endline=20;md5=cf43068cc88f837731dc53240456cfaf" + +SECTION = "base" +DEPENDS = "flex-native" + +SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \ + file://no-gen-libmath.patch \ + file://libmath.h" +SRC_URI[md5sum] = "cda93857418655ea43590736fc3ca9fc" +SRC_URI[sha256sum] = "62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664cb02a" + +inherit autotools texinfo update-alternatives + +PACKAGECONFIG ??= "readline" +PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" +PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit" + +do_compile_prepend() { + cp -f ${WORKDIR}/libmath.h ${B}/bc/libmath.h +} + +ALTERNATIVE_${PN} = "dc" +ALTERNATIVE_PRIORITY = "100" + +BBCLASSEXTEND = "native"
\ No newline at end of file diff --git a/poky/meta/recipes-extended/bc/files/fix-segment-fault.patch b/poky/meta/recipes-extended/bc/files/fix-segment-fault.patch deleted file mode 100644 index 20c0da2eb..000000000 --- a/poky/meta/recipes-extended/bc/files/fix-segment-fault.patch +++ /dev/null @@ -1,28 +0,0 @@ -Upstream-Status: Pending - -when run command such as 'echo "a = 13" | bc -l', it segmentation faults. -This patch is from http://www.mail-archive.com/blfs-support@linuxfromscratch.org/msg04602.html. - -Signed-off-by: Kai Kang <kai.kang@windriver.com> - ---- bc-1.06/lib/number.c.orig 2003-09-26 21:14:02.000000000 +0000 -+++ bc-1.06/lib/number.c 2003-09-26 21:14:26.000000000 +0000 -@@ -34,6 +34,7 @@ - #include <number.h> - #include <assert.h> - #include <stdlib.h> -+#include <string.h> - #include <ctype.h>/* Prototypes needed for external utility routines. */ - - #define bc_rt_warn rt_warn ---- bc-1.06/bc/load.c.orig 2003-09-26 21:14:14.000000000 +0000 -+++ bc-1.06/bc/load.c 2003-09-26 21:14:26.000000000 +0000 -@@ -156,7 +156,7 @@ - long label_no; - long vaf_name; /* variable, array or function number. */ - long func; -- program_counter save_adr; -+ static program_counter save_adr; - - /* Initialize. */ - str = code; diff --git a/poky/meta/recipes-extended/blktool/blktool/0001-fix-typos-in-manpage.patch b/poky/meta/recipes-extended/blktool/blktool/0001-fix-typos-in-manpage.patch index fee368dac..25a2fabe1 100644 --- a/poky/meta/recipes-extended/blktool/blktool/0001-fix-typos-in-manpage.patch +++ b/poky/meta/recipes-extended/blktool/blktool/0001-fix-typos-in-manpage.patch @@ -7,7 +7,7 @@ This patch is taken from ftp://ftp.debian.org/debian/pool/main/b/blktool/blktool_4-7.debian.tar.xz Upstream-Status: Inappropriate [upstream is dead] -Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> --- blktool.8 | 4 ++-- diff --git a/poky/meta/recipes-extended/blktool/blktool/0002-fix-string-error.patch b/poky/meta/recipes-extended/blktool/blktool/0002-fix-string-error.patch index d08aba5f0..401e41e3e 100644 --- a/poky/meta/recipes-extended/blktool/blktool/0002-fix-string-error.patch +++ b/poky/meta/recipes-extended/blktool/blktool/0002-fix-string-error.patch @@ -7,7 +7,7 @@ This patch is taken from ftp://ftp.debian.org/debian/pool/main/b/blktool/blktool_4-7.debian.tar.xz Upstream-Status: Inappropriate [upstream is dead] -Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> --- util.c | 2 +- diff --git a/poky/meta/recipes-extended/blktool/blktool/0003-Fix-3-d-argument-for-BLKROSET-it-must-be-const-int.patch b/poky/meta/recipes-extended/blktool/blktool/0003-Fix-3-d-argument-for-BLKROSET-it-must-be-const-int.patch index d7ed0b9f4..d1f1e797f 100644 --- a/poky/meta/recipes-extended/blktool/blktool/0003-Fix-3-d-argument-for-BLKROSET-it-must-be-const-int.patch +++ b/poky/meta/recipes-extended/blktool/blktool/0003-Fix-3-d-argument-for-BLKROSET-it-must-be-const-int.patch @@ -14,7 +14,7 @@ This patch is taken from ftp://ftp.debian.org/debian/pool/main/b/blktool/blktool_4-7.debian.tar.xz Upstream-Status: Inappropriate [upstream is dead] -Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> --- blktool.c | 11 +++++++++-- diff --git a/poky/meta/recipes-extended/blktool/blktool/blktool-gnulib-makedev.patch b/poky/meta/recipes-extended/blktool/blktool/blktool-gnulib-makedev.patch new file mode 100644 index 000000000..6eea608b2 --- /dev/null +++ b/poky/meta/recipes-extended/blktool/blktool/blktool-gnulib-makedev.patch @@ -0,0 +1,23 @@ +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.bb index 4551c3233..0e6f7ee6d 100644 --- a/poky/meta/recipes-extended/blktool/blktool_4-7.bb +++ b/poky/meta/recipes-extended/blktool/blktool_4-7.bb @@ -13,6 +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 \ " 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 acbf80a68..025f45c47 100644 --- a/poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb +++ b/poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb @@ -5,7 +5,7 @@ LZ77/LZ78-based compressors, and approaches the performance of the PPM family of HOMEPAGE = "https://sourceware.org/bzip2/" SECTION = "console/utils" LICENSE = "bzip2" -LIC_FILES_CHKSUM = "file://LICENSE;beginline=8;endline=37;md5=40d9d1eb05736d1bfc86cfdd9106e6b2" +LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;endline=37;md5=39406315f540c69bd05b1531daedd2ae" PR = "r5" SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/${BP}.tar.gz \ @@ -20,6 +20,7 @@ SRC_URI[md5sum] = "00b516f4704d4a7cb50a1d97e6e8e15b" SRC_URI[sha256sum] = "a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd" UPSTREAM_CHECK_URI = "https://www.sourceware.org/bzip2/" +UPSTREAM_VERSION_UNKNOWN = "1" PACKAGES =+ "libbz2" diff --git a/poky/meta/recipes-extended/cronie/cronie_1.5.1.bb b/poky/meta/recipes-extended/cronie/cronie_1.5.2.bb index cfb8c2105..3abca7f92 100644 --- a/poky/meta/recipes-extended/cronie/cronie_1.5.1.bb +++ b/poky/meta/recipes-extended/cronie/cronie_1.5.2.bb @@ -25,8 +25,8 @@ SRC_URI = "https://github.com/cronie-crond/cronie/releases/download/cronie-${PV} PAM_SRC_URI = "file://crond_pam_config.patch" PAM_DEPS = "libpam libpam-runtime pam-plugin-access pam-plugin-loginuid" -SRC_URI[md5sum] = "910e6effcc032998b0a49fbd46322e18" -SRC_URI[sha256sum] = "6c73666102a6b5d35e2eaf1bd06925f2d4b0cef8d3323c37286dda3089a85338" +SRC_URI[md5sum] = "703314f58a49ea136e9966d3937d9bf4" +SRC_URI[sha256sum] = "370bf34641691489330e708bd4cdbd779267296a030668a12f77b7e36872fd75" inherit autotools update-rc.d useradd systemd diff --git a/poky/meta/recipes-extended/cups/cups.inc b/poky/meta/recipes-extended/cups/cups.inc index ac4d225c1..c142a4d99 100644 --- a/poky/meta/recipes-extended/cups/cups.inc +++ b/poky/meta/recipes-extended/cups/cups.inc @@ -2,13 +2,14 @@ SUMMARY = "An Internet printing system for Unix" HOMEPAGE = "https://www.cups.org/" SECTION = "console/utils" LICENSE = "GPLv2 & LGPLv2" -DEPENDS = "gnutls libpng jpeg dbus dbus-glib zlib libusb" +DEPENDS = "gnutls libpng jpeg dbus dbus-glib zlib libusb1" SRC_URI = "https://github.com/apple/cups/releases/download/v${PV}/${BP}-source.tar.gz \ file://use_echo_only_in_init.patch \ file://0001-don-t-try-to-run-generated-binaries.patch \ file://cups_serverbin.patch \ - " + file://cups-avoid-install-file-conflicts.patch \ + " UPSTREAM_CHECK_URI = "https://github.com/apple/cups/releases" UPSTREAM_CHECK_REGEX = "cups-(?P<pver>\d+\.\d+(\.\d+)?)-source.tar" diff --git a/poky/meta/recipes-extended/cups/cups/cups-avoid-install-file-conflicts.patch b/poky/meta/recipes-extended/cups/cups/cups-avoid-install-file-conflicts.patch new file mode 100644 index 000000000..68885fa4d --- /dev/null +++ b/poky/meta/recipes-extended/cups/cups/cups-avoid-install-file-conflicts.patch @@ -0,0 +1,21 @@ +@CUPS_SERVERBIN@ is ${libdir} related that causes multilib install file +conflict. Remove @CUPS_SERVERBIN@ from the comment line of cups-files.conf to +avoid the conflict. + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Kai Kang <kai.kang@windriver.com> + +diff --git a/conf/cups-files.conf.in b/conf/cups-files.conf.in +index 4a78ba6..03c6582 100644 +--- a/conf/cups-files.conf.in ++++ b/conf/cups-files.conf.in +@@ -73,7 +73,7 @@ PageLog @CUPS_LOGDIR@/page_log + #RequestRoot @CUPS_REQUESTS@ + + # Location of helper programs... +-#ServerBin @CUPS_SERVERBIN@ ++#ServerBin + + # SSL/TLS keychain for the scheduler... + #ServerKeychain @CUPS_SERVERKEYCHAIN@ diff --git a/poky/meta/recipes-extended/cups/cups_2.2.6.bb b/poky/meta/recipes-extended/cups/cups_2.2.6.bb deleted file mode 100644 index 3aa934bc0..000000000 --- a/poky/meta/recipes-extended/cups/cups_2.2.6.bb +++ /dev/null @@ -1,6 +0,0 @@ -require cups.inc - -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f212b4338db0da8cb892e94bf2949460" - -SRC_URI[md5sum] = "e91c26d8d97b5a1630a962f530f02192" -SRC_URI[sha256sum] = "40385778c2b3bdf55030d1c999734e22774c79e3425d91339ce677825620169b" diff --git a/poky/meta/recipes-extended/cups/cups_2.2.8.bb b/poky/meta/recipes-extended/cups/cups_2.2.8.bb new file mode 100644 index 000000000..de1bd84bf --- /dev/null +++ b/poky/meta/recipes-extended/cups/cups_2.2.8.bb @@ -0,0 +1,6 @@ +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.bb b/poky/meta/recipes-extended/diffutils/diffutils_3.6.bb index deadd62c6..8ba897d18 100644 --- a/poky/meta/recipes-extended/diffutils/diffutils_3.6.bb +++ b/poky/meta/recipes-extended/diffutils/diffutils_3.6.bb @@ -19,6 +19,8 @@ acpaths = "-I ./m4" inherit ptest +RDEPENDS_${PN}-ptest += "make" + do_install_ptest() { t=${D}${PTEST_PATH} install -D ${S}/build-aux/test-driver $t/build-aux/test-driver diff --git a/poky/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch b/poky/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch index de3810404..d81320a94 100644 --- a/poky/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch +++ b/poky/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch @@ -1,3 +1,8 @@ +From 1484545a150de79483b6e2a74be02ebd030f1920 Mon Sep 17 00:00:00 2001 +From: Tudor Florea <tudor.florea@enea.com> +Date: Wed, 28 May 2014 18:59:54 +0200 +Subject: [PATCH] ethtool: use serial-tests config needed by ptest. + ptest needs buildtest-TESTS and runtest-TESTS targets. serial-tests is required to generate those targets. @@ -5,12 +10,16 @@ Signed-off-by: Tudor Florea <tudor.florea@enea.com> Upstream-Status: Inappropriate (default automake behavior incompatible with ptest) -Index: ethtool-4.13/configure.ac -=================================================================== ---- ethtool-4.13.orig/configure.ac -+++ ethtool-4.13/configure.ac -@@ -2,7 +2,7 @@ dnl Process this file with autoconf to p - AC_INIT(ethtool, 4.13, netdev@vger.kernel.org) +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index e891d91..600f8a8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script. + AC_INIT(ethtool, 4.17, netdev@vger.kernel.org) AC_PREREQ(2.52) AC_CONFIG_SRCDIR([ethtool.c]) -AM_INIT_AUTOMAKE([gnu]) diff --git a/poky/meta/recipes-extended/ethtool/ethtool_4.13.bb b/poky/meta/recipes-extended/ethtool/ethtool_4.17.bb index c862a5795..844a958ed 100644 --- a/poky/meta/recipes-extended/ethtool/ethtool_4.13.bb +++ b/poky/meta/recipes-extended/ethtool/ethtool_4.17.bb @@ -11,8 +11,8 @@ SRC_URI = "${KERNELORG_MIRROR}/software/network/ethtool/ethtool-${PV}.tar.gz \ file://avoid_parallel_tests.patch \ " -SRC_URI[md5sum] = "2ba44eb0ca96752392e9bf8dc83ba302" -SRC_URI[sha256sum] = "d311c4b557c44c5248ac5436b9e19c391a60d8e4830b6a7f41be16d89c0556de" +SRC_URI[md5sum] = "4dba0345a4ab9f51b4a4a9739284238d" +SRC_URI[sha256sum] = "4130142a15f7409d18de3667998f3c99fba52fd7c8d94be7ecdabf8dcab3d6c1" inherit autotools ptest RDEPENDS_${PN}-ptest += "make" diff --git a/poky/meta/recipes-extended/findutils/findutils/0001-Unset-need_charset_alias-when-building-for-musl.patch b/poky/meta/recipes-extended/findutils/findutils/0001-Unset-need_charset_alias-when-building-for-musl.patch index 8729e1b44..6064d1885 100644 --- a/poky/meta/recipes-extended/findutils/findutils/0001-Unset-need_charset_alias-when-building-for-musl.patch +++ b/poky/meta/recipes-extended/findutils/findutils/0001-Unset-need_charset_alias-when-building-for-musl.patch @@ -1,4 +1,4 @@ -From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 +From 86db2a5f3b7ef8113e5384b4e02d2b299c87a047 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 @@ -11,15 +11,16 @@ coreutils Upstream-Status: Pending Signed-off-by: Khem Raj <raj.khem@gmail.com> + --- - lib/gnulib.mk | 2 +- + gl/lib/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: findutils-4.5.14/gl/lib/Makefile.am -=================================================================== ---- findutils-4.5.14.orig/gl/lib/Makefile.am -+++ findutils-4.5.14/gl/lib/Makefile.am -@@ -1220,7 +1220,7 @@ install-exec-localcharset: all-local +diff --git a/gl/lib/Makefile.am b/gl/lib/Makefile.am +index a9e2fe4..1c6ea9c 100644 +--- a/gl/lib/Makefile.am ++++ b/gl/lib/Makefile.am +@@ -1234,7 +1234,7 @@ install-exec-localcharset: all-local case '$(host_os)' in \ darwin[56]*) \ need_charset_alias=true ;; \ diff --git a/poky/meta/recipes-extended/findutils/findutils/0001-find-make-delete-honour-the-ignore_readdir_race-opti.patch b/poky/meta/recipes-extended/findutils/findutils/0001-find-make-delete-honour-the-ignore_readdir_race-opti.patch new file mode 100644 index 000000000..a570473cc --- /dev/null +++ b/poky/meta/recipes-extended/findutils/findutils/0001-find-make-delete-honour-the-ignore_readdir_race-opti.patch @@ -0,0 +1,144 @@ +From a3f4821c4a3f723d21c9298d54bee8a656bfd7fb Mon Sep 17 00:00:00 2001 +From: Bernhard Voelker <mail@bernhard-voelker.de> +Date: Tue, 30 Jan 2018 23:30:09 +0100 +Subject: [PATCH] find: make -delete honour the -ignore_readdir_race option + +* find/pred.c (pred_delete): Return true when the -ignore_readdir_race +option is active and unlinkat() came back with ENOENT. +* doc/find.texi (Option -ignore_readdir_race): Document the change. +(Action -delete): Likewise. +* find/find.1: Likewise. +* NEWS (Bug Fixes): Mention the fix. + +For now, it seems a bit hard to add a proper test for this, +so the following shell snippet demonstrates the race: + + $ seq 10 | xargs touch + $ env time -f 'find exit status: %x\nfind time: %e' \ + find -ignore_readdir_race -type f \ + -delete \ + -exec sh -c 'sleep $(basename {})' \; \ + -printf 'find deleted: %p\n' \ + & \ + sleep 20; \ + seq 10 | xargs rm -fv; \ + wait $! + +Reported by Alexander Golubev in +https://savannah.gnu.org/bugs/?52981 + +Upstream-Status: Backport +Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> + +--- + NEWS | 4 ++++ + doc/find.texi | 15 ++++++++++++++- + find/find.1 | 22 ++++++++++++++++++++++ + find/pred.c | 6 ++++++ + 4 files changed, 46 insertions(+), 1 deletion(-) + +diff --git a/NEWS b/NEWS +index 660c241..b86ec1e 100644 +--- a/NEWS ++++ b/NEWS +@@ -42,6 +42,10 @@ Updated the Danish translation. + + ** Bug Fixes: + ++#52981: find: the '-delete' action no longer complains about disappeared files ++ when the '-ignore_readdir_race' option is given, too. That action will ++ also returns true in such a case now. ++ + Applied patch #8688: Spelling fixes. + + * Major changes in release 4.5.18, 2015-12-27 +diff --git a/doc/find.texi b/doc/find.texi +index fdeb841..247c19a 100644 +--- a/doc/find.texi ++++ b/doc/find.texi +@@ -1418,7 +1418,15 @@ gives a significant increase in search speed. + If a file disappears after its name has been read from a directory but + before @code{find} gets around to examining the file with @code{stat}, + don't issue an error message. If you don't specify this option, an +-error message will be issued. This option can be useful in system ++error message will be issued. ++ ++Furthermore, @code{find} with the @samp{-ignore_readdir_race} option ++will ignore errors of the @samp{-delete} action in the case the file ++has disappeared since the parent directory was read: it will not output ++an error diagnostic, and the return code of the @samp{-delete} action ++will be true. ++ ++This option can be useful in system + scripts (cron scripts, for example) that examine areas of the + filesystem that change frequently (mail queues, temporary directories, + and so forth), because this scenario is common for those sorts of +@@ -2779,6 +2787,11 @@ explicitly. + + If @samp{-delete} fails, @code{find}'s exit status will be nonzero + (when it eventually exits). ++ ++Together with the @samp{-ignore_readdir_race} option, @code{find} will ++ignore errors of the @samp{-delete} action in the case the file has disappeared ++since the parent directory was read: it will not output an error diagnostic, and ++the return code of the @samp{-delete} action will be true. + @end deffn + + @node Adding Tests +diff --git a/find/find.1 b/find/find.1 +index 7b141b8..0eec41c 100644 +--- a/find/find.1 ++++ b/find/find.1 +@@ -479,6 +479,17 @@ one part of the filesystem with this option on and part of it with this option + off (if you need to do that, you will need to issue two \fBfind\fR commands + instead, one with the option and one without it). + ++Furthermore, ++.B find ++with the ++.B \-ignore_readdir_race ++option will ignore errors of the ++.B \-delete ++action in the case the file has disappeared since the parent directory was read: ++it will not output an error diagnostic, and the return code of the ++.B \-delete ++action will be true. ++ + .IP "\-maxdepth \fIlevels\fR" + Descend at most \fIlevels\fR (a non-negative integer) levels of + directories below the starting-points. +@@ -1030,6 +1041,17 @@ and + .B \-delete + together. + ++Together with the ++.B \-ignore_readdir_race ++option, ++.B find ++will ignore errors of the ++.B \-delete ++action in the case the file has disappeared since the parent directory was ++read: it will not output an error diagnostic, and the return code of the ++.B \-delete ++action will be true. ++ + .IP "\-exec \fIcommand\fR ;" + Execute \fIcommand\fR; true if 0 status is returned. All following + arguments to +diff --git a/find/pred.c b/find/pred.c +index 32938fb..431f065 100644 +--- a/find/pred.c ++++ b/find/pred.c +@@ -324,6 +324,12 @@ pred_delete (const char *pathname, struct stat *stat_buf, struct predicate *pred + } + else + { ++ if (ENOENT == errno && options.ignore_readdir_race) ++ { ++ /* Ignore unlink() error for vanished files. */ ++ errno = 0; ++ return true; ++ } + if (EISDIR == errno) + { + if ((flags & AT_REMOVEDIR) == 0) diff --git a/poky/meta/recipes-extended/findutils/findutils/findutils-4.6.0-gnulib-fflush.patch b/poky/meta/recipes-extended/findutils/findutils/findutils-4.6.0-gnulib-fflush.patch new file mode 100644 index 000000000..d13e8ed3c --- /dev/null +++ b/poky/meta/recipes-extended/findutils/findutils/findutils-4.6.0-gnulib-fflush.patch @@ -0,0 +1,140 @@ +From 80cdfba079627e15129a926a133825b961d41e36 Mon Sep 17 00:00:00 2001 +From: Paul Eggert <eggert@cs.ucla.edu> +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/fflush.c (clear_ungetc_buffer_preserving_position) +(disable_seek_optimization, rpl_fflush): +* lib/fpurge.c (fpurge): +* lib/freadahead.c (freadahead): +* lib/freading.c (freading): +* lib/fseeko.c (fseeko): +* lib/stdio-impl.h (_IO_IN_BACKUP) [_IO_EOF_SEEN]: +Define if not already defined. + +Upstream-commit: 4af4a4a71827c0bc5e0ec67af23edef4f15cee8e +Signed-off-by: Kamil Dudka <kdudka@redhat.com> +Upstream-Status: Backport [4af4a4a71827c0bc5e0ec67af23edef4f15cee8e] +--- + gl/lib/fflush.c | 6 +++--- + gl/lib/fpurge.c | 2 +- + gl/lib/freadahead.c | 2 +- + gl/lib/freading.c | 2 +- + gl/lib/fseeko.c | 4 ++-- + gl/lib/stdio-impl.h | 6 ++++++ + 6 files changed, 14 insertions(+), 8 deletions(-) + +Index: findutils-4.6.0/gl/lib/fflush.c +=================================================================== +--- findutils-4.6.0.orig/gl/lib/fflush.c ++++ findutils-4.6.0/gl/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, 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: findutils-4.6.0/gl/lib/fpurge.c +=================================================================== +--- findutils-4.6.0.orig/gl/lib/fpurge.c ++++ findutils-4.6.0/gl/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: findutils-4.6.0/gl/lib/freadahead.c +=================================================================== +--- findutils-4.6.0.orig/gl/lib/freadahead.c ++++ findutils-4.6.0/gl/lib/freadahead.c +@@ -25,7 +25,7 @@ + size_t + freadahead (FILE *fp) + { +-#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_write_ptr > fp->_IO_write_base) + return 0; + return (fp->_IO_read_end - fp->_IO_read_ptr) +Index: findutils-4.6.0/gl/lib/freading.c +=================================================================== +--- findutils-4.6.0.orig/gl/lib/freading.c ++++ findutils-4.6.0/gl/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: findutils-4.6.0/gl/lib/fseeko.c +=================================================================== +--- findutils-4.6.0.orig/gl/lib/fseeko.c ++++ findutils-4.6.0/gl/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: findutils-4.6.0/gl/lib/stdio-impl.h +=================================================================== +--- findutils-4.6.0.orig/gl/lib/stdio-impl.h ++++ findutils-4.6.0/gl/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/findutils/findutils/findutils-4.6.0-gnulib-makedev.patch b/poky/meta/recipes-extended/findutils/findutils/findutils-4.6.0-gnulib-makedev.patch new file mode 100644 index 000000000..0fb3953cf --- /dev/null +++ b/poky/meta/recipes-extended/findutils/findutils/findutils-4.6.0-gnulib-makedev.patch @@ -0,0 +1,78 @@ +From 80628047a6cc83f82e0c410a82b8f7facd9d50f2 Mon Sep 17 00:00:00 2001 +From: Eric Blake <eblake@redhat.com> +Date: Wed, 14 Sep 2016 19:21:42 -0500 +Subject: [PATCH] mountlist: include sysmacros.h for glibc + +On Fedora rawhide (glibc 2.25), './gnulib-tool --test mountlist' +reports: +../../gllib/mountlist.c: In function 'read_file_system_list': +../../gllib/mountlist.c:534:13: warning: '__makedev_from_sys_types' is deprecated: + 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 #undef it after including <sys/types.h>. + [-Wdeprecated-declarations] + me->me_dev = makedev (devmaj, devmin); + ^~ +In file included from /usr/include/features.h:397:0, + from /usr/include/sys/types.h:25, + from ./sys/types.h:28, + from ../../gllib/mountlist.h:23, + from ../../gllib/mountlist.c:20: +/usr/include/sys/sysmacros.h:89:1: note: declared here + __SYSMACROS_DEFINE_MAKEDEV (__SYSMACROS_FST_IMPL_TEMPL) + ^ + +Fix it by including the right headers. We also need a fix to +autoconf's AC_HEADER_MAJOR, but that's a separate patch. + +* m4/mountlist.m4 (gl_PREREQ_MOUTLIST_EXTRA): Include +AC_HEADER_MAJOR. +* lib/mountlist.c (includes): Use correct headers. + +Signed-off-by: Eric Blake <eblake@redhat.com> + +Upstream-commit: 4da63c5881f60f71999a943612da9112232b9161 +Signed-off-by: Kamil Dudka <kdudka@redhat.com> +Upstream-Status: Backport [4da63c5881f60f71999a943612da9112232b9161] +--- + gl/lib/mountlist.c | 6 ++++++ + gl/m4/mountlist.m4 | 3 ++- + 2 files changed, 8 insertions(+), 1 deletion(-) + +Index: findutils-4.6.0/gl/lib/mountlist.c +=================================================================== +--- findutils-4.6.0.orig/gl/lib/mountlist.c ++++ findutils-4.6.0/gl/lib/mountlist.c +@@ -37,6 +37,12 @@ + # include <sys/param.h> + #endif + ++#if MAJOR_IN_MKDEV ++# include <sys/mkdev.h> ++#elif MAJOR_IN_SYSMACROS ++# include <sys/sysmacros.h> ++#endif ++ + #if defined MOUNTED_GETFSSTAT /* OSF_1 and Darwin1.3.x */ + # if HAVE_SYS_UCRED_H + # include <grp.h> /* needed on OSF V4.0 for definition of NGROUPS, +Index: findutils-4.6.0/gl/m4/mountlist.m4 +=================================================================== +--- findutils-4.6.0.orig/gl/m4/mountlist.m4 ++++ findutils-4.6.0/gl/m4/mountlist.m4 +@@ -1,4 +1,4 @@ +-# serial 11 ++# serial 12 + dnl Copyright (C) 2002-2006, 2009-2015 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, +@@ -15,5 +15,6 @@ AC_DEFUN([gl_PREREQ_MOUNTLIST_EXTRA], + [ + dnl Note gl_LIST_MOUNTED_FILE_SYSTEMS checks for mntent.h, not sys/mntent.h. + AC_CHECK_HEADERS([sys/mntent.h]) ++ AC_HEADER_MAJOR()dnl for use of makedev () + gl_FSTYPENAME + ]) 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 072d3b3c0..5e4ca9486 100644 --- a/poky/meta/recipes-extended/findutils/findutils_4.6.0.bb +++ b/poky/meta/recipes-extended/findutils/findutils_4.6.0.bb @@ -6,7 +6,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949" DEPENDS = "bison-native" -SRC_URI += "file://0001-Unset-need_charset_alias-when-building-for-musl.patch" +SRC_URI += "file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ + file://0001-find-make-delete-honour-the-ignore_readdir_race-opti.patch \ + file://findutils-4.6.0-gnulib-fflush.patch \ + file://findutils-4.6.0-gnulib-makedev.patch \ +" SRC_URI[md5sum] = "9936aa8009438ce185bea2694a997fc1" SRC_URI[sha256sum] = "ded4c9f73731cd48fec3b6bdaccce896473b6d8e337e9612e16cf1431bb1169d" diff --git a/poky/meta/recipes-extended/ghostscript/files/0001-Bug-699795-add-operand-checking-to-.setnativefontmap.patch b/poky/meta/recipes-extended/ghostscript/files/0001-Bug-699795-add-operand-checking-to-.setnativefontmap.patch new file mode 100644 index 000000000..f175da0ca --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/files/0001-Bug-699795-add-operand-checking-to-.setnativefontmap.patch @@ -0,0 +1,59 @@ +From 274b2cc08b0d10a4cac3fe8b50022889f22580cb Mon Sep 17 00:00:00 2001 +From: Chris Liddell <chris.liddell@artifex.com> +Date: Thu, 20 Sep 2018 16:35:28 +0100 +Subject: [PATCH 1/5] Bug 699795: add operand checking to + .setnativefontmapbuilt + +.setnativefontmapbuilt .forceputs a value into systemdict - it is intended +to be a boolean, but in this case was being called with a compound object +(a dictionary). Such an object, in local VM, being forced into systemdict +would then confuse the garbager, since it could be restored away with the +reference remaining. + +This adds operand checking, so .setnativefontmapbuilt will simply ignore +anything other than a boolean value, and also removes the definition of +.setnativefontmapbuilt after use, since it is only used in two, closely +related places. + +CVE: CVE-2018-17961 +Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + Resource/Init/gs_fonts.ps | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/Resource/Init/gs_fonts.ps b/Resource/Init/gs_fonts.ps +index 38f0f6c..45b6613 100644 +--- a/Resource/Init/gs_fonts.ps ++++ b/Resource/Init/gs_fonts.ps +@@ -372,9 +372,13 @@ FONTPATH length 0 eq { (%END FONTPATH) .skipeof } if + % of strings: what the system thinks is the ps name, + % and the access path. + /.setnativefontmapbuilt { % set whether we've been run +- systemdict exch /.nativefontmapbuilt exch .forceput ++ dup type /booleantype eq { ++ systemdict exch /.nativefontmapbuilt exch .forceput ++ } ++ {pop} ++ ifelse + } .bind executeonly def +-systemdict /NONATIVEFONTMAP known .setnativefontmapbuilt ++systemdict /NONATIVEFONTMAP known //.setnativefontmapbuilt exec + /.buildnativefontmap { % - .buildnativefontmap <bool> + systemdict /.nativefontmapbuilt .knownget not + { //false} if +@@ -415,9 +419,10 @@ systemdict /NONATIVEFONTMAP known .setnativefontmapbuilt + } forall + } if + % record that we've been run +- //true .setnativefontmapbuilt ++ //true //.setnativefontmapbuilt exec + } ifelse + } bind def ++currentdict /.setnativefontmapbuilt .forceundef + + % Create the dictionary that registers the .buildfont procedure + % (called by definefont) for each FontType. +-- +2.7.4 + diff --git a/poky/meta/recipes-extended/ghostscript/files/0002-Bug-699816-Improve-hiding-of-security-critical-custo.patch b/poky/meta/recipes-extended/ghostscript/files/0002-Bug-699816-Improve-hiding-of-security-critical-custo.patch new file mode 100644 index 000000000..000f9c9ef --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/files/0002-Bug-699816-Improve-hiding-of-security-critical-custo.patch @@ -0,0 +1,434 @@ +From 0661bf23a5be32973682e17afed4a2f23a8214ba Mon Sep 17 00:00:00 2001 +From: Chris Liddell <chris.liddell@artifex.com> +Date: Sat, 29 Sep 2018 15:34:55 +0100 +Subject: [PATCH 2/5] Bug 699816: Improve hiding of security critical custom + operators + +Make procedures that use .forceput/.forcedef/.forceundef into operators. + +The result of this is that errors get reported against the "top" operator, +rather than the "called" operator within the procedure. + +For example: +/myproc +{ + myop +} bind def + +If 'myop' throws an error, the error handler will be passed the 'myop' +operator. Promoting 'myproc' to a operator means the error handler will be +passed 'myproc'. + +CVE: CVE-2018-17961 +Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + Resource/Init/gs_diskn.ps | 2 +- + Resource/Init/gs_dps.ps | 2 +- + Resource/Init/gs_fntem.ps | 2 +- + Resource/Init/gs_fonts.ps | 10 +++++----- + Resource/Init/gs_lev2.ps | 13 +++++++++---- + Resource/Init/gs_pdfwr.ps | 2 +- + Resource/Init/gs_setpd.ps | 25 +++++++++++++++++-------- + Resource/Init/gs_typ32.ps | 14 +++++++++----- + Resource/Init/gs_type1.ps | 2 +- + Resource/Init/pdf_base.ps | 2 +- + Resource/Init/pdf_draw.ps | 10 +++++----- + Resource/Init/pdf_font.ps | 8 ++++---- + Resource/Init/pdf_main.ps | 4 ++-- + Resource/Init/pdf_ops.ps | 8 ++++---- + 14 files changed, 61 insertions(+), 43 deletions(-) + +diff --git a/Resource/Init/gs_diskn.ps b/Resource/Init/gs_diskn.ps +index 5540715..26ec0b5 100644 +--- a/Resource/Init/gs_diskn.ps ++++ b/Resource/Init/gs_diskn.ps +@@ -53,7 +53,7 @@ systemdict begin + exch .setglobal + } + if +-} .bind executeonly def % must be bound and hidden for .forceput ++} .bind executeonly odef % must be bound and hidden for .forceput + + % Modify .putdevparams to force regeneration of .searchabledevs list + /.putdevparams { +diff --git a/Resource/Init/gs_dps.ps b/Resource/Init/gs_dps.ps +index cad7056..daf7b0f 100644 +--- a/Resource/Init/gs_dps.ps ++++ b/Resource/Init/gs_dps.ps +@@ -70,7 +70,7 @@ + % Save a copy of the initial gstate. + //systemdict /savedinitialgstate gstate readonly .forceput + .setglobal +-} .bind executeonly def % must be bound and hidden for .forceput ++} .bind executeonly odef % must be bound and hidden for .forceput + + % Initialize local dictionaries and gstate when creating a new context. + % Note that until this completes, we are in the anomalous situation of +diff --git a/Resource/Init/gs_fntem.ps b/Resource/Init/gs_fntem.ps +index 3ceee18..c1f7651 100644 +--- a/Resource/Init/gs_fntem.ps ++++ b/Resource/Init/gs_fntem.ps +@@ -408,7 +408,7 @@ currentdict end def + exit + } loop + exch setglobal +-} .bind executeonly def % must be bound and hidden for .forceput ++} .bind executeonly odef % must be bound and hidden for .forceput + + currentdict end /ProcSet defineresource pop + +diff --git a/Resource/Init/gs_fonts.ps b/Resource/Init/gs_fonts.ps +index 45b6613..89c3ab7 100644 +--- a/Resource/Init/gs_fonts.ps ++++ b/Resource/Init/gs_fonts.ps +@@ -377,8 +377,8 @@ FONTPATH length 0 eq { (%END FONTPATH) .skipeof } if + } + {pop} + ifelse +-} .bind executeonly def +-systemdict /NONATIVEFONTMAP known //.setnativefontmapbuilt exec ++} .bind executeonly odef ++systemdict /NONATIVEFONTMAP known .setnativefontmapbuilt + /.buildnativefontmap { % - .buildnativefontmap <bool> + systemdict /.nativefontmapbuilt .knownget not + { //false} if +@@ -419,7 +419,7 @@ systemdict /NONATIVEFONTMAP known //.setnativefontmapbuilt exec + } forall + } if + % record that we've been run +- //true //.setnativefontmapbuilt exec ++ //true .setnativefontmapbuilt + } ifelse + } bind def + currentdict /.setnativefontmapbuilt .forceundef +@@ -1103,7 +1103,7 @@ $error /SubstituteFont { } put + + % Check to make sure the font was actually loaded. + dup 3 index .fontknownget +- { dup /PathLoad 4 index //.putgstringcopy exec ++ { dup /PathLoad 4 index .putgstringcopy + 4 1 roll pop pop pop //true exit + } if + +@@ -1115,7 +1115,7 @@ $error /SubstituteFont { } put + { % Stack: origfontname fontdirectory path filefontname + 2 index 1 index .fontknownget + { % Yes. Stack: origfontname fontdirectory path filefontname fontdict +- dup 4 -1 roll /PathLoad exch //.putgstringcopy exec ++ dup 4 -1 roll /PathLoad exch .putgstringcopy + % Stack: origfontname fontdirectory filefontname fontdict + 3 -1 roll pop + % Stack: origfontname filefontname fontdict +diff --git a/Resource/Init/gs_lev2.ps b/Resource/Init/gs_lev2.ps +index eee0b9f..a8ed892 100644 +--- a/Resource/Init/gs_lev2.ps ++++ b/Resource/Init/gs_lev2.ps +@@ -163,10 +163,11 @@ end + % Set them again to the new values. From here on, we are safe, + % since a context switch will consult userparams. + .setuserparams +-} .bind executeonly def % must be bound and hidden for .forceput ++} .bind executeonly odef % must be bound and hidden for .forceput + + /setuserparams { % <dict> setuserparams - +- .setuserparams2 ++ {.setuserparams2} stopped ++ {/setuserparams load $error /errorname get signalerror} if + } .bind odef + % Initialize user parameters managed here. + /JobName () .definepsuserparam +@@ -415,7 +416,9 @@ psuserparams /ProcessDSCComment {.checkprocesscomment} put + + % VMReclaim and VMThreshold are user parameters. + /setvmthreshold { % <int> setvmthreshold - +- mark /VMThreshold 2 .argindex .dicttomark .setuserparams2 pop ++ mark /VMThreshold 2 .argindex .dicttomark {.setuserparams2} stopped ++ {pop /setvmthreshold load $error /errorname get signalerror} ++ {pop} ifelse + } odef + /vmreclaim { % <int> vmreclaim - + dup 0 gt { +@@ -427,7 +430,9 @@ psuserparams /ProcessDSCComment {.checkprocesscomment} put + ifelse + } { + % VMReclaim userparam controls enable/disable GC +- mark /VMReclaim 2 index .dicttomark .setuserparams2 pop ++ mark /VMReclaim 2 index .dicttomark {.setuserparams2} stopped ++ {pop /vmreclaim load $error /errorname get signalerror} ++ {pop} ifelse + } ifelse + } odef + -1 setvmthreshold +diff --git a/Resource/Init/gs_pdfwr.ps b/Resource/Init/gs_pdfwr.ps +index fb1c419..58e75d3 100644 +--- a/Resource/Init/gs_pdfwr.ps ++++ b/Resource/Init/gs_pdfwr.ps +@@ -660,7 +660,7 @@ currentdict /.pdfmarkparams .undef + { + pop + } ifelse +-} .bind executeonly def % must be bound and hidden for .forceput ++} .bind executeonly odef % must be bound and hidden for .forceput + + % Use the DSC processing hook to pass DSC comments to the driver. + % We use a pseudo-parameter named DSC whose value is an array: +diff --git a/Resource/Init/gs_setpd.ps b/Resource/Init/gs_setpd.ps +index 8fa7c51..afb4ffa 100644 +--- a/Resource/Init/gs_setpd.ps ++++ b/Resource/Init/gs_setpd.ps +@@ -608,6 +608,20 @@ NOMEDIAATTRS { + % in the <failed> dictionary with the policy value, + % and we replace the key in the <merged> dictionary with its prior value + % (or remove it if it had no prior value). ++ ++% Making this an operator means we can properly hide ++% the contents - specifically .forceput ++/1Policy ++{ ++ % Roll back the failed request to its previous status. ++ 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 } ++ { 3 index exch .undef } ++ ifelse ++} bind executeonly odef ++ + /.policyprocs mark + % These procedures are called with the following on the stack: + % <orig> <merged> <failed> <Policies> <key> <policy> +@@ -631,14 +645,7 @@ NOMEDIAATTRS { + /setpagedevice .systemvar /configurationerror signalerror + } ifelse + } bind +- 1 { % Roll back the failed request to its previous status. +-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 } +- { 3 index exch .undef } +- ifelse +- } .bind executeonly % must be bound and hidden for .forceput ++ 1 /1Policy load + 7 { % For PageSize only, just impose the request. + 1 index /PageSize eq + { pop pop 1 index /PageSize 7 put } +@@ -646,6 +653,8 @@ SETPDDEBUG { (Rolling back.) = pstack flush } if + ifelse + } bind + .dicttomark readonly def ++currentdict /1Policy undef ++ + /.applypolicies % <orig> <merged> <failed> .applypolicies + % <orig> <merged'> <failed'> + { 1 index /Policies get 1 index +diff --git a/Resource/Init/gs_typ32.ps b/Resource/Init/gs_typ32.ps +index b6600b0..9150f71 100644 +--- a/Resource/Init/gs_typ32.ps ++++ b/Resource/Init/gs_typ32.ps +@@ -79,15 +79,19 @@ systemdict /.removeglyphs .undef + .dicttomark /ProcSet defineresource pop + + /.cidfonttypes where { pop } { /.cidfonttypes 6 dict def } ifelse +-.cidfonttypes begin +- +-4 % CIDFontType 4 = FontType 32 +-{ dup /FontType 32 .forceput ++/CIDFontType4 ++{ ++ dup /FontType 32 .forceput + dup /CharStrings 20 dict .forceput + 1 index exch .buildfont32 exch pop +-} .bind executeonly def % must be bound and hidden for .forceput ++} .bind executeonly odef ++.cidfonttypes begin ++ ++ ++4 /CIDFontType4 load def % CIDFontType 4 = FontType 32 + + end % .cidfonttypes ++currentdict /CIDFontType4 .forceundef + + % Define the BuildGlyph procedure. + % Since Type 32 fonts are indexed by CID, there is no BuildChar procedure. +diff --git a/Resource/Init/gs_type1.ps b/Resource/Init/gs_type1.ps +index efdae48..2935d9c 100644 +--- a/Resource/Init/gs_type1.ps ++++ b/Resource/Init/gs_type1.ps +@@ -283,7 +283,7 @@ currentdict /closesourcedict .undef + } if + 2 copy /WeightVector exch .forceput + .setweightvector +-} .bind executeonly def ++} .bind executeonly odef + end + + % Register the font types for definefont. +diff --git a/Resource/Init/pdf_base.ps b/Resource/Init/pdf_base.ps +index a82a2a3..7ccd4cd 100644 +--- a/Resource/Init/pdf_base.ps ++++ b/Resource/Init/pdf_base.ps +@@ -218,7 +218,7 @@ currentdict /num-chars-dict .undef + } ifelse + } ifelse + } ifelse +-} bind executeonly def ++} bind executeonly odef + /PDFScanRules_true << /PDFScanRules //true >> def + /PDFScanRules_null << /PDFScanRules //null >> def + /.pdfrun { % <file> <opdict> .pdfrun - +diff --git a/Resource/Init/pdf_draw.ps b/Resource/Init/pdf_draw.ps +index d1b6ac9..c239daf 100644 +--- a/Resource/Init/pdf_draw.ps ++++ b/Resource/Init/pdf_draw.ps +@@ -1158,7 +1158,7 @@ currentdict end readonly def + Q + PDFDEBUG { pdfdict /PDFSTEPcount .knownget { 1 le } { //true } ifelse { (%End PaintProc) print dup === flush } if } if + PDFfile exch setfileposition +-} bind executeonly def ++} bind executeonly odef + + /.pdfpaintproc { + %% Get the /m from pdfopdict (must be present) +@@ -1189,7 +1189,7 @@ currentdict end readonly def + { + switch_to_text_marking_ops + } if +-}bind executeonly def ++}bind executeonly odef + + /resolvepattern { % <patternstreamdict> resolvepattern <patterndict> + % Don't do the resolvestream now: just capture the data +@@ -2353,7 +2353,7 @@ currentdict /last-ditch-bpc-csp undef + }{ + pdfdict /AppearanceNumber 0 .forceput + } ifelse +-}bind executeonly def ++}bind executeonly odef + + /MakeAppearanceName { + pdfdict /AppearanceNumber get +@@ -2382,7 +2382,7 @@ currentdict /last-ditch-bpc-csp undef + DoForm + pdfdict /.PreservePDFForm 3 -1 roll .forceput + grestore +-} bind executeonly def ++} bind executeonly odef + + /DoForm { + %% save the current value, if its true we will set it to false later, in order +@@ -2541,7 +2541,7 @@ currentdict /last-ditch-bpc-csp undef + end + } if + pdfdict /.PreservePDFForm 3 -1 roll .forceput +-} bind executeonly def ++} bind executeonly odef + + /_dops_save 1 array def + +diff --git a/Resource/Init/pdf_font.ps b/Resource/Init/pdf_font.ps +index feaf0d0..535b14a 100644 +--- a/Resource/Init/pdf_font.ps ++++ b/Resource/Init/pdf_font.ps +@@ -718,7 +718,7 @@ currentdict end readonly def + {pop pop pop} + ifelse + +-} bind executeonly def ++} bind executeonly odef + + currentdict /.DoToUnicode? .forceundef + +@@ -1241,7 +1241,7 @@ currentdict /eexec_pdf_param_dict .undef + } bdef + dup currentdict Encoding .processToUnicode + currentdict end .completefont exch pop +-} bind executeonly def ++} bind executeonly odef + /.adjustcharwidth { % <wx> <wy> .adjustcharwidth <wx'> <wy'> + % Enforce the metrics, in glyph space, to the values found in the PDF Font object + % - force wy == 0 (assumed, and not stored in the PDF font) +@@ -2026,7 +2026,7 @@ currentdict /CMap_read_dict undef + } if + /findresource cvx /undefined signalerror + } loop +-} bind executeonly def ++} bind executeonly odef + + /buildCIDType0 { % <CIDFontType0-font-resource> buildCIDType0 <font> + dup /BaseFont get findCIDFont exch pop +@@ -2211,7 +2211,7 @@ currentdict /CMap_read_dict undef + /Type0 //buildType0 + /Type1 //buildType1 + /MMType1 //buildType1 +- /Type3 //buildType3 ++ /Type3 /buildType3 load + /TrueType //buildTrueType + /CIDFontType0 //buildCIDType0 + /CIDFontType2 //buildCIDType2 +diff --git a/Resource/Init/pdf_main.ps b/Resource/Init/pdf_main.ps +index 09f8735..c823e69 100644 +--- a/Resource/Init/pdf_main.ps ++++ b/Resource/Init/pdf_main.ps +@@ -660,7 +660,7 @@ currentdict /runpdfstring .undef + } forall + pop + } ifelse +-} bind executeonly def ++} bind executeonly odef + + currentdict /pdf_collection_files .undef + +@@ -2715,7 +2715,7 @@ currentdict /PDF2PS_matrix_key undef + .setglobal + /RepairedAnError exch def + /Repaired exch def +-} bind executeonly def ++} bind executeonly odef + + % Display the contents of a page (including annotations). + /showpagecontents { % <pagedict> showpagecontents - +diff --git a/Resource/Init/pdf_ops.ps b/Resource/Init/pdf_ops.ps +index c45fc51..8672d61 100644 +--- a/Resource/Init/pdf_ops.ps ++++ b/Resource/Init/pdf_ops.ps +@@ -193,7 +193,7 @@ currentdict /gput_always_allow .undef + pdfformaterror + } ifelse + } if +-} bind executeonly def ++} bind executeonly odef + + % Save PDF gstate + /qstate { % - qstate <qstate> +@@ -451,7 +451,7 @@ currentdict /gput_always_allow .undef + %% a gsave, so we haven't copied it to /self, if we don't do that here + %% then transparent annotations cause an invalid access error. + currentdict //nodict eq {/self dup load end 5 dict begin def} if +-} bind executeonly def ++} bind executeonly odef + /AIS { .setalphaisshape } bind executeonly def + /BM { + /.setblendmode where { +@@ -1077,7 +1077,7 @@ end readonly def + pdfopdict /v {inside_text_v} bind .forceput + pdfopdict /y {inside_text_y} bind .forceput + pdfopdict /re {inside_text_re} bind .forceput +-} bind executeonly def ++} bind executeonly odef + + /switch_to_normal_marking_ops { + pdfopdict /m {normal_m} bind .forceput +@@ -1086,7 +1086,7 @@ end readonly def + pdfopdict /v {normal_v} bind .forceput + pdfopdict /y {normal_y} bind .forceput + pdfopdict /re {normal_re} bind .forceput +-} bind executeonly def ++} bind executeonly odef + + /BT { + currentdict /TextSaveMatrix known { +-- +2.7.4 + diff --git a/poky/meta/recipes-extended/ghostscript/files/0003-Bug-699832-add-control-over-hiding-error-handlers.patch b/poky/meta/recipes-extended/ghostscript/files/0003-Bug-699832-add-control-over-hiding-error-handlers.patch new file mode 100644 index 000000000..cd7865958 --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/files/0003-Bug-699832-add-control-over-hiding-error-handlers.patch @@ -0,0 +1,172 @@ +From 1f9a91c86bd56acf57826b9b0e020ebe1953e2ae Mon Sep 17 00:00:00 2001 +From: Chris Liddell <chris.liddell@artifex.com> +Date: Thu, 4 Oct 2018 10:42:13 +0100 +Subject: [PATCH 3/5] Bug 699832: add control over hiding error handlers. + +With a previous commit changing error handling in SAFER so the handler gets +passed a name object (rather than executable object), it is less critical to +hide the error handlers. + +This introduces a -dSAFERERRORS option to force only use of the default error +handlers. + +It also adds a .setsafererrors Postscript call, meaning a caller, without +-dSAFERERRORS, can create their own default error handlers (in errordict, as +normal), and then call .setsafererrors meaning their own handlers are always +called. + +With -dSAFERERRORS or after a call to .setsafererrors, .setsafererrors is +removed. + +CVE: CVE-2018-17961 +Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + Resource/Init/gs_init.ps | 42 +++++++++++++++++++++++++++++------------ + psi/interp.c | 49 ++++++++++++++++++++++++++++-------------------- + 2 files changed, 59 insertions(+), 32 deletions(-) + +diff --git a/Resource/Init/gs_init.ps b/Resource/Init/gs_init.ps +index bec307d..f952f32 100644 +--- a/Resource/Init/gs_init.ps ++++ b/Resource/Init/gs_init.ps +@@ -188,6 +188,16 @@ currentdict /DELAYSAFER known { /DELAYSAFER //true def /NOSAFER //true def } if + currentdict /PARANOIDSAFER known or % PARANOIDSAFER is equivalent + } + ifelse def ++ ++/SAFERERRORS ++currentdict /NOSAFERERRORS known ++{ ++ //false ++} ++{ ++ currentdict /SAFERERRORS known ++} ifelse def ++ + currentdict /SHORTERRORS known /SHORTERRORS exch def + currentdict /TTYPAUSE known /TTYPAUSE exch def + currentdict /WRITESYSTEMDICT known /WRITESYSTEMDICT exch def +@@ -1123,12 +1133,23 @@ errordict begin + } bind def + end % errordict + +-% Put all the default handlers in gserrordict +-gserrordict +-errordict {2 index 3 1 roll put} forall +-noaccess pop +-% remove the non-standard errors from errordict ++gserrordict /unknownerror errordict /unknownerror get put + errordict /unknownerror .undef ++ ++/.SAFERERRORLIST ErrorNames def ++/.setsafererrors ++{ ++% Put all the requested handlers in gserrordict ++ gserrordict ++ //.SAFERERRORLIST ++ {dup errordict exch get 2 index 3 1 roll put} forall ++ noaccess pop ++ systemdict /.setsafeerrors .forceundef ++ systemdict /.SAFERERRORLIST .forceundef ++} bind executeonly odef ++ ++SAFERERRORS {.setsafererrors} if ++ + % Define a stable private copy of handleerror that we will always use under + % JOBSERVER mode. + /.GShandleerror errordict /handleerror get def +@@ -1760,18 +1781,15 @@ currentdict /.runlibfile .undef + + % Bind all the operators defined as procedures. + /.bindoperators % binds operators in currentdict +- { % Temporarily disable the typecheck error. +- errordict /typecheck 2 copy get +- errordict /typecheck { pop } put % pop the command ++ { + currentdict + { dup type /operatortype eq +- { % This might be a real operator, so bind might cause a typecheck, +- % but we've made the error a no-op temporarily. +- .bind ++ { ++ % This might be a real operator, so bind might cause a typecheck ++ {.bind} .internalstopped pop + } + if pop pop + } forall +- put + } def + DELAYBIND not { .bindoperators } if + +diff --git a/psi/interp.c b/psi/interp.c +index 3dd5f7a..cd894f9 100644 +--- a/psi/interp.c ++++ b/psi/interp.c +@@ -662,27 +662,18 @@ again: + if (gs_errorname(i_ctx_p, code, &error_name) < 0) + return code; /* out-of-range error code! */ + +- /* If LockFilePermissions is true, we only refer to gserrordict, which +- * is not accessible to Postcript jobs ++ /* We refer to gserrordict first, which is not accessible to Postcript jobs ++ * If we're running with SAFERERRORS all the handlers are copied to gserrordict ++ * so we'll always find the default one. If not SAFERERRORS, only gs specific ++ * errors are in gserrordict. + */ +- if (i_ctx_p->LockFilePermissions) { +- if (((dict_find_string(systemdict, "gserrordict", &perrordict) <= 0 || +- dict_find(perrordict, &error_name, &epref) <= 0)) +- ) +- return code; /* error name not in errordict??? */ +- } +- else { +- /* +- * For greater Adobe compatibility, only the standard PostScript errors +- * are defined in errordict; the rest are in gserrordict. +- */ +- if (dict_find_string(systemdict, "errordict", &perrordict) <= 0 || +- (dict_find(perrordict, &error_name, &epref) <= 0 && +- (dict_find_string(systemdict, "gserrordict", &perrordict) <= 0 || +- dict_find(perrordict, &error_name, &epref) <= 0)) +- ) +- return code; /* error name not in errordict??? */ +- } ++ if (dict_find_string(systemdict, "gserrordict", &perrordict) <= 0 || ++ (dict_find(perrordict, &error_name, &epref) <= 0 && ++ (dict_find_string(systemdict, "errordict", &perrordict) <= 0 || ++ dict_find(perrordict, &error_name, &epref) <= 0)) ++ ) ++ return code; /* error name not in errordict??? */ ++ + doref = *epref; + epref = &doref; + /* Push the error object on the operand stack if appropriate. */ +@@ -695,6 +686,24 @@ again: + } + *osp = *perror_object; + errorexec_find(i_ctx_p, osp); ++ /* If using SAFER, hand a name object to the error handler, rather than the executable ++ * object/operator itself. ++ */ ++ if (i_ctx_p->LockFilePermissions) { ++ code = obj_cvs(imemory, osp, buf + 2, 256, &rlen, (const byte **)&bufptr); ++ if (code < 0) { ++ const char *unknownstr = "--unknown--"; ++ rlen = strlen(unknownstr); ++ memcpy(buf, unknownstr, rlen); ++ } ++ else { ++ buf[0] = buf[1] = buf[rlen + 2] = buf[rlen + 3] = '-'; ++ rlen += 4; ++ } ++ code = name_ref(imemory, buf, rlen, osp, 1); ++ if (code < 0) ++ make_null(osp); ++ } + } + goto again; + } +-- +2.7.4 + diff --git a/poky/meta/recipes-extended/ghostscript/files/0004-For-hidden-operators-pass-a-name-object-to-error-han.patch b/poky/meta/recipes-extended/ghostscript/files/0004-For-hidden-operators-pass-a-name-object-to-error-han.patch new file mode 100644 index 000000000..6c715ad43 --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/files/0004-For-hidden-operators-pass-a-name-object-to-error-han.patch @@ -0,0 +1,105 @@ +From 34a8c5aa987d4db5234172a62218b168371606b1 Mon Sep 17 00:00:00 2001 +From: Chris Liddell <chris.liddell@artifex.com> +Date: Tue, 2 Oct 2018 16:02:58 +0100 +Subject: [PATCH 4/5] For hidden operators, pass a name object to error + handler. + +In normal operation, Postscript error handlers are passed the object which +triggered the error: this is invariably an operator object. + +The issue arises when an error is triggered by an operator which is for internal +use only, and that operator is then passed to the error handler, meaning it +becomes visible to the error handler code. + +By converting to a name object, the error message is still valid, but we no +longer expose internal use only operators. + +The change in gs_dps1.ps is related to the above: previously an error in +scheck would throw an error against .gcheck, but as .gcheck is now a hidden +operator, it resulted in a name object being passed to the error handler. As +scheck is a 'real' operator, it's better to use the real operator, rather than +the name of an internal, hidden one. + +CVE: CVE-2018-17961 +Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + Resource/Init/gs_dps1.ps | 2 +- + psi/interp.c | 33 ++++++++++++++++++++++++--------- + 2 files changed, 25 insertions(+), 10 deletions(-) + +diff --git a/Resource/Init/gs_dps1.ps b/Resource/Init/gs_dps1.ps +index 1182f53..ec5db61 100644 +--- a/Resource/Init/gs_dps1.ps ++++ b/Resource/Init/gs_dps1.ps +@@ -21,7 +21,7 @@ level2dict begin + % ------ Virtual memory ------ % + + /currentshared /.currentglobal load def +-/scheck /.gcheck load def ++/scheck {.gcheck} bind odef + %****** FOLLOWING IS WRONG ****** + /shareddict currentdict /globaldict .knownget not { 20 dict } if def + +diff --git a/psi/interp.c b/psi/interp.c +index cd894f9..b70769d 100644 +--- a/psi/interp.c ++++ b/psi/interp.c +@@ -678,6 +678,8 @@ again: + epref = &doref; + /* Push the error object on the operand stack if appropriate. */ + if (!GS_ERROR_IS_INTERRUPT(code)) { ++ byte buf[260], *bufptr; ++ uint rlen; + /* Replace the error object if within an oparray or .errorexec. */ + osp++; + if (osp >= ostop) { +@@ -686,23 +688,36 @@ again: + } + *osp = *perror_object; + errorexec_find(i_ctx_p, osp); +- /* If using SAFER, hand a name object to the error handler, rather than the executable +- * object/operator itself. +- */ +- if (i_ctx_p->LockFilePermissions) { ++ ++ if (!r_has_type(osp, t_string) && !r_has_type(osp, t_name)) { + code = obj_cvs(imemory, osp, buf + 2, 256, &rlen, (const byte **)&bufptr); + if (code < 0) { + const char *unknownstr = "--unknown--"; + rlen = strlen(unknownstr); + memcpy(buf, unknownstr, rlen); ++ bufptr = buf; + } + else { +- buf[0] = buf[1] = buf[rlen + 2] = buf[rlen + 3] = '-'; +- rlen += 4; ++ ref *tobj; ++ bufptr[rlen] = '\0'; ++ /* Only pass a name object if the operator doesn't exist in systemdict ++ * i.e. it's an internal operator we have hidden ++ */ ++ code = dict_find_string(systemdict, (const char *)bufptr, &tobj); ++ if (code < 0) { ++ buf[0] = buf[1] = buf[rlen + 2] = buf[rlen + 3] = '-'; ++ rlen += 4; ++ bufptr = buf; ++ } ++ else { ++ bufptr = NULL; ++ } ++ } ++ if (bufptr) { ++ code = name_ref(imemory, buf, rlen, osp, 1); ++ if (code < 0) ++ make_null(osp); + } +- code = name_ref(imemory, buf, rlen, osp, 1); +- if (code < 0) +- make_null(osp); + } + } + goto again; +-- +2.7.4 + diff --git a/poky/meta/recipes-extended/ghostscript/files/0005-Bug-699938-.loadfontloop-must-be-an-operator.patch b/poky/meta/recipes-extended/ghostscript/files/0005-Bug-699938-.loadfontloop-must-be-an-operator.patch new file mode 100644 index 000000000..4924b3cac --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/files/0005-Bug-699938-.loadfontloop-must-be-an-operator.patch @@ -0,0 +1,31 @@ +From f0a61679d28bc1561640403d92492e199bc1c0f3 Mon Sep 17 00:00:00 2001 +From: Chris Liddell <chris.liddell@artifex.com> +Date: Wed, 10 Oct 2018 23:25:51 +0100 +Subject: [PATCH 5/5] Bug 699938: .loadfontloop must be an operator + +In the fix for Bug 699816, I omitted to make .loadfontloop into an operator, to +better hide .forceundef and .putgstringcopy. + +CVE: CVE-2018-17961 +Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + Resource/Init/gs_fonts.ps | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Resource/Init/gs_fonts.ps b/Resource/Init/gs_fonts.ps +index 89c3ab7..72feff2 100644 +--- a/Resource/Init/gs_fonts.ps ++++ b/Resource/Init/gs_fonts.ps +@@ -1148,7 +1148,7 @@ $error /SubstituteFont { } put + + } loop % end of loop + +- } bind executeonly def % must be bound and hidden for .putgstringcopy ++ } bind executeonly odef % must be bound and hidden for .putgstringcopy + + currentdict /.putgstringcopy .undef + +-- +2.7.4 + diff --git a/poky/meta/recipes-extended/ghostscript/files/0006-Undefine-some-additional-internal-operators.patch b/poky/meta/recipes-extended/ghostscript/files/0006-Undefine-some-additional-internal-operators.patch new file mode 100644 index 000000000..19cf7cc8c --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/files/0006-Undefine-some-additional-internal-operators.patch @@ -0,0 +1,42 @@ +From 37d7c9117b70e75ebed21c6c8192251f127c0fb0 Mon Sep 17 00:00:00 2001 +From: Nancy Durgin <nancy.durgin@artifex.com> +Date: Mon, 5 Nov 2018 15:36:27 +0800 +Subject: [PATCH 1/2] Undefine some additional internal operators. + +.type, .writecvs, .setSMask, .currentSMask + +These don't seem to be referenced anywhere outside of the initialization code, +which binds their usages. Passes cluster if they are removed. + +CVE: CVE-2018-18073 +Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + Resource/Init/gs_init.ps | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/Resource/Init/gs_init.ps b/Resource/Init/gs_init.ps +index f952f32..7c71d18 100644 +--- a/Resource/Init/gs_init.ps ++++ b/Resource/Init/gs_init.ps +@@ -2230,6 +2230,7 @@ SAFER { .setsafeglobal } if + /.localvmarray /.localvmdict /.localvmpackedarray /.localvmstring /.systemvmarray /.systemvmdict /.systemvmpackedarray /.systemvmstring /.systemvmfile /.systemvmlibfile + /.systemvmSFD /.settrapparams /.currentsystemparams /.currentuserparams /.getsystemparam /.getuserparam /.setsystemparams /.setuserparams + /.checkpassword /.locale_to_utf8 /.currentglobal /.gcheck /.imagepath ++ /.type /.writecvs /.setSMask /.currentSMask + + % Used by a free user in the Library of Congress. Apparently this is used to + % draw a partial page, which is then filled in by the results of a barcode +@@ -2248,7 +2249,7 @@ SAFER { .setsafeglobal } if + % test files/utilities, or engineers expressed a desire to keep them visible. + % + %/currentdevice /.sort /.buildfont0 /.buildfont1 /.buildfont2 /.buildfont3 /.buildfont4 /.buildfont9 /.buildfont10 /.buildfont11 +- %/.buildfotn32 /.buildfont42 /.type9mapcid /.type11mapcid /.swapcolors ++ %/.buildfont32 /.buildfont42 /.type9mapcid /.type11mapcid /.swapcolors + %/currentdevice /.quit /.setuseciecolor /.needinput /.setoverprintmode /.special_op /.dicttomark /.knownget + %/.FAPIavailable /.FAPIpassfont /.FAPIrebuildfont /.FAPIBuildGlyph /.FAPIBuildChar /.FAPIBuildGlyph9 + %/.tempfile /.numicc_components /.set_outputintent /.max /.min /.vmreclaim /.getpath /.setglobal +-- +2.7.4 + diff --git a/poky/meta/recipes-extended/ghostscript/files/0007-Bug-699927-don-t-include-operator-arrays-in-execstac.patch b/poky/meta/recipes-extended/ghostscript/files/0007-Bug-699927-don-t-include-operator-arrays-in-execstac.patch new file mode 100644 index 000000000..ad66fc3d6 --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/files/0007-Bug-699927-don-t-include-operator-arrays-in-execstac.patch @@ -0,0 +1,197 @@ +From 430f39144244ba4fd7b720cf87031e415e0fabce Mon Sep 17 00:00:00 2001 +From: Chris Liddell <chris.liddell@artifex.com> +Date: Mon, 5 Nov 2018 15:42:52 +0800 +Subject: [PATCH 2/2] Bug 699927: don't include operator arrays in execstack + output + +When we transfer the contents of the execution stack into the array, take the +extra step of replacing any operator arrays on the stack with the operator +that reference them. + +This prevents the contents of Postscript defined, internal only operators (those +created with .makeoperator) being exposed via execstack (and thus, via error +handling). + +This necessitates a change in the resource remapping 'resource', which contains +a procedure which relies on the contents of the operators arrays being present. +As we already had internal-only variants of countexecstack and execstack +(.countexecstack and .execstack) - using those, and leaving thier operation +including the operator arrays means the procedure continues to work correctly. + +Both .countexecstack and .execstack are undefined after initialization. + +Also, when we store the execstack (or part thereof) for an execstackoverflow +error, make the same oparray/operator substitution as above for execstack. + +CVE: CVE-2018-18073 +Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + Resource/Init/gs_init.ps | 4 ++-- + Resource/Init/gs_resmp.ps | 2 +- + psi/int.mak | 2 +- + psi/interp.c | 14 +++++++++++--- + psi/interp.h | 2 ++ + psi/zcontrol.c | 13 ++++++++++--- + 6 files changed, 27 insertions(+), 10 deletions(-) + +diff --git a/Resource/Init/gs_init.ps b/Resource/Init/gs_init.ps +index 7c71d18..f4c1053 100644 +--- a/Resource/Init/gs_init.ps ++++ b/Resource/Init/gs_init.ps +@@ -2191,7 +2191,7 @@ SAFER { .setsafeglobal } if + %% but can be easily restored (just delete the name from the list in the array). In future + %% we may remove the operator and the code implementation entirely. + [ +- /.bitadd /.charboxpath /.cond /.countexecstack /.execstack /.runandhide /.popdevicefilter ++ /.bitadd /.charboxpath /.cond /.runandhide /.popdevicefilter + /.execfile /.filenamesplit /.file_name_parent + /.setdefaultmatrix /.isprocfilter /.unread /.psstringencode + /.buildsampledfunction /.isencapfunction /.currentaccuratecurves /.currentcurvejoin /.currentdashadapt /.currentdotlength +@@ -2230,7 +2230,7 @@ SAFER { .setsafeglobal } if + /.localvmarray /.localvmdict /.localvmpackedarray /.localvmstring /.systemvmarray /.systemvmdict /.systemvmpackedarray /.systemvmstring /.systemvmfile /.systemvmlibfile + /.systemvmSFD /.settrapparams /.currentsystemparams /.currentuserparams /.getsystemparam /.getuserparam /.setsystemparams /.setuserparams + /.checkpassword /.locale_to_utf8 /.currentglobal /.gcheck /.imagepath +- /.type /.writecvs /.setSMask /.currentSMask ++ /.type /.writecvs /.setSMask /.currentSMask /.countexecstack /.execstack + + % Used by a free user in the Library of Congress. Apparently this is used to + % draw a partial page, which is then filled in by the results of a barcode +diff --git a/Resource/Init/gs_resmp.ps b/Resource/Init/gs_resmp.ps +index 7cacaf8..9bb4263 100644 +--- a/Resource/Init/gs_resmp.ps ++++ b/Resource/Init/gs_resmp.ps +@@ -183,7 +183,7 @@ setpacking + % We don't check them. + + currentglobal //false setglobal % <object> bGlobal +- countexecstack array execstack % <object> bGlobal [execstack] ++ //false .countexecstack array //false .execstack % <object> bGlobal [execstack] + dup //null exch % <object> bGlobal [execstack] null [execstack] + length 3 sub -1 0 { % <object> bGlobal [execstack] null i + 2 index exch get % <object> bGlobal [execstack] null proc +diff --git a/psi/int.mak b/psi/int.mak +index 5d9b3d5..6ab5bf0 100644 +--- a/psi/int.mak ++++ b/psi/int.mak +@@ -323,7 +323,7 @@ $(PSOBJ)zarray.$(OBJ) : $(PSSRC)zarray.c $(OP) $(memory__h)\ + + $(PSOBJ)zcontrol.$(OBJ) : $(PSSRC)zcontrol.c $(OP) $(string__h)\ + $(estack_h) $(files_h) $(ipacked_h) $(iutil_h) $(store_h) $(stream_h)\ +- $(INT_MAK) $(MAKEDIRS) ++ $(interp_h) $(INT_MAK) $(MAKEDIRS) + $(PSCC) $(PSO_)zcontrol.$(OBJ) $(C_) $(PSSRC)zcontrol.c + + $(PSOBJ)zdict.$(OBJ) : $(PSSRC)zdict.c $(OP)\ +diff --git a/psi/interp.c b/psi/interp.c +index b70769d..6dc0dda 100644 +--- a/psi/interp.c ++++ b/psi/interp.c +@@ -142,7 +142,6 @@ static int oparray_pop(i_ctx_t *); + static int oparray_cleanup(i_ctx_t *); + static int zerrorexec(i_ctx_t *); + static int zfinderrorobject(i_ctx_t *); +-static int errorexec_find(i_ctx_t *, ref *); + static int errorexec_pop(i_ctx_t *); + static int errorexec_cleanup(i_ctx_t *); + static int zsetstackprotect(i_ctx_t *); +@@ -761,7 +760,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; ++ int code, i; + + if (size > 65535) + size = 65535; +@@ -770,6 +769,15 @@ copy_stack(i_ctx_t *i_ctx_p, const ref_stack_t * pstack, int skip, ref * arr) + if (code >= 0) + code = ref_stack_store(pstack, arr, size, 0, 1, true, idmemory, + "copy_stack"); ++ /* If we are copying the exec stack, try to replace any oparrays with ++ * with the operator than references them ++ */ ++ if (pstack == &e_stack) { ++ for (i = 0; i < size; i++) { ++ if (errorexec_find(i_ctx_p, &arr->value.refs[i]) < 0) ++ make_null(&arr->value.refs[i]); ++ } ++ } + ialloc_set_space(idmemory, save_space); + return code; + } +@@ -1934,7 +1942,7 @@ zfinderrorobject(i_ctx_t *i_ctx_p) + * .errorexec with errobj != null, store it in *perror_object and return 1, + * otherwise return 0; + */ +-static int ++int + errorexec_find(i_ctx_t *i_ctx_p, ref *perror_object) + { + long i; +diff --git a/psi/interp.h b/psi/interp.h +index e9275b9..4f551d1 100644 +--- a/psi/interp.h ++++ b/psi/interp.h +@@ -91,5 +91,7 @@ void gs_interp_reset(i_ctx_t *i_ctx_p); + /* Define the top-level interface to the interpreter. */ + int gs_interpret(i_ctx_t **pi_ctx_p, ref * pref, int user_errors, + int *pexit_code, ref * perror_object); ++int ++errorexec_find(i_ctx_t *i_ctx_p, ref *perror_object); + + #endif /* interp_INCLUDED */ +diff --git a/psi/zcontrol.c b/psi/zcontrol.c +index 36da22c..0362cf4 100644 +--- a/psi/zcontrol.c ++++ b/psi/zcontrol.c +@@ -24,6 +24,7 @@ + #include "ipacked.h" + #include "iutil.h" + #include "store.h" ++#include "interp.h" + + /* Forward references */ + static int check_for_exec(const_os_ptr); +@@ -787,7 +788,7 @@ zexecstack2(i_ctx_t *i_ctx_p) + /* Continuation operator to do the actual transfer. */ + /* r_size(op1) was set just above. */ + static int +-do_execstack(i_ctx_t *i_ctx_p, bool include_marks, os_ptr op1) ++do_execstack(i_ctx_t *i_ctx_p, bool include_marks, bool include_oparrays, os_ptr op1) + { + os_ptr op = osp; + ref *arefs = op1->value.refs; +@@ -829,6 +830,12 @@ do_execstack(i_ctx_t *i_ctx_p, bool include_marks, os_ptr op1) + strlen(tname), (const byte *)tname); + break; + } ++ case t_array: ++ case t_shortarray: ++ case t_mixedarray: ++ if (!include_oparrays && errorexec_find(i_ctx_p, rq) < 0) ++ make_null(rq); ++ break; + default: + ; + } +@@ -841,14 +848,14 @@ execstack_continue(i_ctx_t *i_ctx_p) + { + os_ptr op = osp; + +- return do_execstack(i_ctx_p, false, op); ++ return do_execstack(i_ctx_p, false, false, op); + } + static int + execstack2_continue(i_ctx_t *i_ctx_p) + { + os_ptr op = osp; + +- return do_execstack(i_ctx_p, op->value.boolval, op - 1); ++ return do_execstack(i_ctx_p, op->value.boolval, true, op - 1); + } + + /* - .needinput - */ +-- +2.7.4 + diff --git a/poky/meta/recipes-extended/ghostscript/files/0008-Make-.forceput-unavailable-from-.policyprocs-helper-.patch b/poky/meta/recipes-extended/ghostscript/files/0008-Make-.forceput-unavailable-from-.policyprocs-helper-.patch new file mode 100644 index 000000000..7cc51629e --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/files/0008-Make-.forceput-unavailable-from-.policyprocs-helper-.patch @@ -0,0 +1,245 @@ +From 9096beaa4451c12dd2a2caf000658fbac4a5bcdf Mon Sep 17 00:00:00 2001 +From: Ken Sharp <ken.sharp@artifex.com> +Date: Mon, 5 Nov 2018 15:51:32 +0800 +Subject: [PATCH] Make .forceput unavailable from '.policyprocs' helper + dictionary + +Bug #69963 "1Policy is a dangerous operator, any callers should be odef" + +Leaving the .policyprocs dictionary with a procedure which is a simple +wrapper for .forceput effectively leaves .forceput available. + +It seems that the only reason to have .policyprocs is to minimise the +code in .applypolicies, so we can remove the dictionary and put the +code straight into .applypolicies, which we can then bind and make +executeonly, which hides the .forceput. Also, since we don't need +.applypolicies after startup, we can undefine that from systemdict too. + +While we're here, review all the uses of .force* to make certain that +there are no other similar cases. This showed a few places where we +hadn't made a function executeonly, so do that too. Its probably not +required, since I'm reasonably sure its impossible to load those +functions as packed arrays (they are all defined as operators), but lets +have a belt and braces approach, the additional time cost is negligible. + +CVE: CVE-2018-18284 +Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + Resource/Init/gs_diskn.ps | 2 +- + Resource/Init/gs_dps.ps | 2 +- + Resource/Init/gs_epsf.ps | 2 +- + Resource/Init/gs_fonts.ps | 4 +- + Resource/Init/gs_init.ps | 2 +- + Resource/Init/gs_setpd.ps | 100 ++++++++++++++++++++++++---------------------- + 6 files changed, 58 insertions(+), 54 deletions(-) + +diff --git a/Resource/Init/gs_diskn.ps b/Resource/Init/gs_diskn.ps +index 26ec0b5..fd694bc 100644 +--- a/Resource/Init/gs_diskn.ps ++++ b/Resource/Init/gs_diskn.ps +@@ -61,7 +61,7 @@ systemdict begin + % doesn't get run enough to justify the complication + //.putdevparams + //systemdict /.searchabledevs .forceundef +-} .bind odef % must be bound and hidden for .forceundef ++} .bind executeonly odef % must be bound and hidden for .forceundef + + % ------ extend filenameforall to handle wildcards in %dev% part of pattern -------% + /filenameforall { +diff --git a/Resource/Init/gs_dps.ps b/Resource/Init/gs_dps.ps +index daf7b0f..00c14d5 100644 +--- a/Resource/Init/gs_dps.ps ++++ b/Resource/Init/gs_dps.ps +@@ -124,7 +124,7 @@ + /savedinitialgstate .systemvar setgstate gsave + % Wrap up. + end .setglobal +-} odef ++} bind executeonly odef + + % Check whether an object is a procedure. + /.proccheck { % <obj> .proccheck <bool> +diff --git a/Resource/Init/gs_epsf.ps b/Resource/Init/gs_epsf.ps +index e4037d9..2d0f677 100644 +--- a/Resource/Init/gs_epsf.ps ++++ b/Resource/Init/gs_epsf.ps +@@ -31,7 +31,7 @@ + /EPSBoundingBoxState 5 def + /EPSBoundingBoxSetState { + //systemdict /EPSBoundingBoxState 3 -1 roll .forceput +-} .bind odef % .forceput must be bound and hidden ++} .bind executeonly odef % .forceput must be bound and hidden + + % Parse 4 numbers for a bounding box + /EPSBoundingBoxParse { % (llx lly urx ury) -- llx lly urx ury true OR false +diff --git a/Resource/Init/gs_fonts.ps b/Resource/Init/gs_fonts.ps +index 72feff2..803faca 100644 +--- a/Resource/Init/gs_fonts.ps ++++ b/Resource/Init/gs_fonts.ps +@@ -583,7 +583,7 @@ buildfontdict 3 /.buildfont3 cvx put + } bind def + /.setloadingfont { + //systemdict /.loadingfont 3 -1 roll .forceput +-} .bind odef % .forceput must be bound and hidden ++} .bind executeonly odef % .forceput must be bound and hidden + /.loadfont + { % Some buggy fonts leave extra junk on the stack, + % so we have to make a closure that records the stack depth +@@ -1012,7 +1012,7 @@ $error /SubstituteFont { } put + dup length string copy + .forceput setglobal + } ifelse +-} .bind odef % must be bound and hidden for .forceput ++} .bind executeonly odef % must be bound and hidden for .forceput + + % Attempt to load a font from a file. + /.tryloadfont { % <fontname> .tryloadfont <font> true +diff --git a/Resource/Init/gs_init.ps b/Resource/Init/gs_init.ps +index f4c1053..07ee968 100644 +--- a/Resource/Init/gs_init.ps ++++ b/Resource/Init/gs_init.ps +@@ -2230,7 +2230,7 @@ SAFER { .setsafeglobal } if + /.localvmarray /.localvmdict /.localvmpackedarray /.localvmstring /.systemvmarray /.systemvmdict /.systemvmpackedarray /.systemvmstring /.systemvmfile /.systemvmlibfile + /.systemvmSFD /.settrapparams /.currentsystemparams /.currentuserparams /.getsystemparam /.getuserparam /.setsystemparams /.setuserparams + /.checkpassword /.locale_to_utf8 /.currentglobal /.gcheck /.imagepath +- /.type /.writecvs /.setSMask /.currentSMask /.countexecstack /.execstack ++ /.type /.writecvs /.setSMask /.currentSMask /.countexecstack /.execstack /.applypolicies + + % Used by a free user in the Library of Congress. Apparently this is used to + % draw a partial page, which is then filled in by the results of a barcode +diff --git a/Resource/Init/gs_setpd.ps b/Resource/Init/gs_setpd.ps +index afb4ffa..7c076ad 100644 +--- a/Resource/Init/gs_setpd.ps ++++ b/Resource/Init/gs_setpd.ps +@@ -609,6 +609,23 @@ NOMEDIAATTRS { + % and we replace the key in the <merged> dictionary with its prior value + % (or remove it if it had no prior value). + ++% These procedures are called with the following on the stack: ++% <orig> <merged> <failed> <Policies> <key> <policy> ++% They are expected to consume the top 2 operands. ++% NOTE: we currently treat all values other than 0, 1, or 7 (for PageSize) ++% the same as 0, i.e., we signal an error. ++/0Policy { % Set errorinfo and signal a configurationerror. ++ NOMEDIAATTRS { ++ % NOMEDIAATTRS means that the default policy is 7... ++ pop 2 index exch 7 put ++ } { ++ pop dup 4 index exch get 2 array astore ++ $error /errorinfo 3 -1 roll put ++ cleartomark ++ /setpagedevice .systemvar /configurationerror signalerror ++ } ifelse ++} bind executeonly odef ++ + % Making this an operator means we can properly hide + % the contents - specifically .forceput + /1Policy +@@ -617,59 +634,46 @@ 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 } +- { 3 index exch .undef } ++ { 4 index 3 1 roll .forceput } ++ { 3 index exch .undef } + ifelse + } bind executeonly odef + +-/.policyprocs mark +-% These procedures are called with the following on the stack: +-% <orig> <merged> <failed> <Policies> <key> <policy> +-% They are expected to consume the top 2 operands. +-% NOTE: we currently treat all values other than 0, 1, or 7 (for PageSize) +-% the same as 0, i.e., we signal an error. +-% +-% M. Sweet, Easy Software Products: +-% +-% Define NOMEDIAATTRS to turn off the default (but unimplementable) media +-% selection policies for setpagedevice. This is used by CUPS to support +-% the standard Adobe media attributes. +- 0 { % Set errorinfo and signal a configurationerror. +- NOMEDIAATTRS { +- % NOMEDIAATTRS means that the default policy is 7... +- pop 2 index exch 7 put +- } { +- pop dup 4 index exch get 2 array astore +- $error /errorinfo 3 -1 roll put +- cleartomark +- /setpagedevice .systemvar /configurationerror signalerror +- } ifelse +- } bind +- 1 /1Policy load +- 7 { % For PageSize only, just impose the request. +- 1 index /PageSize eq +- { pop pop 1 index /PageSize 7 put } +- { .policyprocs 0 get exec } +- ifelse +- } bind +-.dicttomark readonly def +-currentdict /1Policy undef ++/7Policy { % For PageSize only, just impose the request. ++ 1 index /PageSize eq ++ { pop pop 1 index /PageSize 7 put } ++ { .policyprocs 0 get exec } ++ ifelse ++} bind executeonly odef + + /.applypolicies % <orig> <merged> <failed> .applypolicies + % <orig> <merged'> <failed'> +- { 1 index /Policies get 1 index +- { type /integertype eq +- { pop % already processed +- } +- { 2 copy .knownget not { 1 index /PolicyNotFound get } if +- % Stack: <orig> <merged> <failed> <Policies> <key> +- % <policy> +- .policyprocs 1 index .knownget not { .policyprocs 0 get } if exec +- } +- ifelse +- } +- forall pop +- } bind def ++{ ++ 1 index /Policies get 1 index ++ { type /integertype eq ++ { ++ pop % already processed ++ }{ ++ 2 copy .knownget not { 1 index /PolicyNotFound get } if ++ % Stack: <orig> <merged> <failed> <Policies> <key> ++ % <policy> ++ dup 1 eq { ++ 1Policy ++ }{ ++ dup 7 eq { ++ 7Policy ++ }{ ++ 0Policy ++ } ifelse ++ } ifelse ++ } ifelse ++ } ++ forall pop ++} bind executeonly odef ++ ++currentdict /0Policy undef ++currentdict /1Policy undef ++currentdict /7Policy undef + + % Prepare to present parameters to the device, by spreading them onto the + % operand stack and removing any that shouldn't be presented. +@@ -1006,7 +1010,7 @@ SETPDDEBUG { (Installing.) = pstack flush } if + .postinstall + } ifelse + setglobal % return to original VM allocation mode +-} odef ++} bind executeonly odef + + % We break out the code after calling the Install procedure into a + % separate procedure, since it is executed even if Install causes an error. +-- +2.7.4 + diff --git a/poky/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch b/poky/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch index c3e44fe86..5834ffaf9 100644 --- a/poky/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch +++ b/poky/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch @@ -1,7 +1,7 @@ -From 5ef8b85bc98f3bd9a15d5f47e24d3e23ae27c265 Mon Sep 17 00:00:00 2001 +From a954bf29a5f906b3151dffbecb5856e02e1565da Mon Sep 17 00:00:00 2001 From: Hongxu Jia <hongxu.jia@windriver.com> Date: Mon, 18 Jan 2016 01:00:30 -0500 -Subject: [PATCH] configure.ac: do not check local png source +Subject: [PATCH 03/10] configure.ac: do not check local png source In oe-core, it did not need to compile local libpng source in ghostscript, so do not check local png @@ -16,10 +16,10 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac -index bf6d3f5..01df03f 100644 +index 9341930..80a60b1 100644 --- a/configure.ac +++ b/configure.ac -@@ -930,11 +930,11 @@ AC_SUBST(ZLIBDIR) +@@ -1114,11 +1114,11 @@ AC_SUBST(ZLIBDIR) AC_SUBST(FT_SYS_ZLIB) dnl png for the png output device; it also requires zlib @@ -34,5 +34,5 @@ index bf6d3f5..01df03f 100644 SHARE_LIBPNG=0 LIBPNGDIR=$srcdir/libpng -- -2.8.1 +1.8.3.1 diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-11714.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-11714.patch deleted file mode 100644 index 84983c5ae..000000000 --- a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-11714.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 671fd59eb657743aa86fbc1895cb15872a317caa Mon Sep 17 00:00:00 2001 -From: Chris Liddell <chris.liddell@artifex.com> -Date: Thu, 6 Jul 2017 14:54:02 +0100 -Subject: [PATCH] Bug 698158: prevent trying to reloc a freed object - -In the token reader, we pass the scanner state structure around as a -t_struct ref on the Postscript operand stack. - -But we explicitly free the scanner state when we're done, which leaves a -dangling reference on the operand stack and, unless that reference gets -overwritten before the next garbager run, we can end up with the garbager -trying to deal with an already freed object - that can cause a crash, or -memory corruption. ---- - psi/ztoken.c | 14 +++++++++++++- - 1 file changed, 13 insertions(+), 1 deletion(-) - ---- end of original header - -CVE: CVE-2017-11714 - -Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] - -Signed-off-by: Joe Slater <joe.slater@windriver.com> - -diff --git a/psi/ztoken.c b/psi/ztoken.c -index 4dba7c5..af1ceeb 100644 ---- a/psi/ztoken.c -+++ b/psi/ztoken.c -@@ -107,6 +107,12 @@ token_continue(i_ctx_t *i_ctx_p, scanner_state * pstate, bool save) - int code; - ref token; - -+ /* Since we might free pstate below, and we're dealing with -+ * gc memory referenced by the stack, we need to explicitly -+ * remove the reference to pstate from the stack, otherwise -+ * the garbager will fall over -+ */ -+ make_null(osp); - /* Note that gs_scan_token may change osp! */ - pop(1); /* remove the file or scanner state */ - again: -@@ -183,8 +189,14 @@ ztokenexec_continue(i_ctx_t *i_ctx_p) - static int - tokenexec_continue(i_ctx_t *i_ctx_p, scanner_state * pstate, bool save) - { -- os_ptr op; -+ os_ptr op = osp; - int code; -+ /* Since we might free pstate below, and we're dealing with -+ * gc memory referenced by the stack, we need to explicitly -+ * remove the reference to pstate from the stack, otherwise -+ * the garbager will fall over -+ */ -+ make_null(osp); - /* Note that gs_scan_token may change osp! */ - pop(1); - again: --- -1.7.9.5 - diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-5951.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-5951.patch deleted file mode 100644 index 62cc1342a..000000000 --- a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-5951.patch +++ /dev/null @@ -1,44 +0,0 @@ -From bfa6b2ecbe48edc69a7d9d22a12419aed25960b8 Mon Sep 17 00:00:00 2001 -From: Chris Liddell <chris.liddell@artifex.com> -Date: Thu, 6 Apr 2017 16:44:54 +0100 -Subject: [PATCH] Bug 697548: use the correct param list enumerator - -When we encountered dictionary in a ref_param_list, we were using the enumerator -for the "parent" param_list, rather than the enumerator for the param_list -we just created for the dictionary. That parent was usually the stack -list enumerator, and caused a segfault. - -Using the correct enumerator works better. - -Upstream-Status: Backport -CVE: CVE-2017-5951 - -Signed-off-by: Catalin Enache <catalin.enache@windriver.com> ---- - psi/iparam.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/psi/iparam.c b/psi/iparam.c -index 4e63b6d..b2fa85f 100644 ---- a/psi/iparam.c -+++ b/psi/iparam.c -@@ -770,12 +770,13 @@ ref_param_read_typed(gs_param_list * plist, gs_param_name pkey, - gs_param_enumerator_t enumr; - gs_param_key_t key; - ref_type keytype; -+ dict_param_list *dlist = (dict_param_list *) pvalue->value.d.list; - - param_init_enumerator(&enumr); -- if (!(*((iparam_list *) plist)->enumerate) -- ((iparam_list *) pvalue->value.d.list, &enumr, &key, &keytype) -+ if (!(*(dlist->enumerate)) -+ ((iparam_list *) dlist, &enumr, &key, &keytype) - && keytype == t_integer) { -- ((dict_param_list *) pvalue->value.d.list)->int_keys = 1; -+ dlist->int_keys = 1; - pvalue->type = gs_param_type_dict_int_keys; - } - } --- -2.10.2 - diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-7207.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-7207.patch deleted file mode 100644 index a05dc02c6..000000000 --- a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-7207.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 0e88bee1304993668fede72498d656a2dd33a35e Mon Sep 17 00:00:00 2001 -From: Ken Sharp <ken.sharp@artifex.com> -Date: Mon, 20 Mar 2017 09:34:11 +0000 -Subject: [PATCH] Ensure a device has raster memory, before trying to read it. - -Bug #697676 "Null pointer dereference in mem_get_bits_rectangle()" - -This is only possible by abusing/mis-using Ghostscript-specific -language extensions, so cannot happen in a general PostScript program. - -Nevertheless, Ghostscript should not crash. So this commit checks the -memory device to see if raster memory has been allocated, before trying -to read from it. - -Upstream-Status: Backport -CVE: CVE-2017-7207 - -Author: Ken Sharp <ken.sharp@artifex.com> -Signed-off-by: Catalin Enache <catalin.enache@windriver.com> ---- - base/gdevmem.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/base/gdevmem.c b/base/gdevmem.c -index 41108ba..183f96d 100644 ---- a/base/gdevmem.c -+++ b/base/gdevmem.c -@@ -605,6 +605,8 @@ mem_get_bits_rectangle(gx_device * dev, const gs_int_rect * prect, - GB_PACKING_CHUNKY | GB_COLORS_NATIVE | GB_ALPHA_NONE; - return_error(gs_error_rangecheck); - } -+ if (mdev->line_ptrs == 0x00) -+ return_error(gs_error_rangecheck); - if ((w <= 0) | (h <= 0)) { - if ((w | h) < 0) - return_error(gs_error_rangecheck); --- -2.10.2 - diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-7975.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-7975.patch deleted file mode 100644 index e406086e8..000000000 --- a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-7975.patch +++ /dev/null @@ -1,37 +0,0 @@ -From b39be1019b4acc1aa50c6026463c543332e95a31 Mon Sep 17 00:00:00 2001 -From: Catalin Enache <catalin.enache@windriver.com> -Date: Mon, 8 May 2017 16:18:14 +0300 - -Subject: [PATCH] Bug 697693: Prevent SEGV due to integer overflow. - -While building a Huffman table, the start and end points were susceptible -to integer overflow. - -Thank you to Jiaqi for finding this issue and suggesting a patch. - -Upstream-Status: Backport -CVE: CVE-2017-7975 - -Signed-off-by: Catalin Enache <catalin.enache@windriver.com> - -Contents of this patch were extracted from a larger patch which addressed -two CVE's. The context (location of {) was also modified to apply to -ghostscript 9.21. - -Signed-off-by: Joe Slater <joe.slater@windriver.com> - - ---- a/jbig2dec/jbig2_huffman.c -+++ b/jbig2dec/jbig2_huffman.c -@@ -421,8 +421,8 @@ jbig2_build_huffman_table(Jbig2Ctx *ctx, - - if (PREFLEN == CURLEN) { - int RANGELEN = lines[CURTEMP].RANGELEN; -- int start_j = CURCODE << shift; -- int end_j = (CURCODE + 1) << shift; -+ uint32_t start_j = CURCODE << shift; -+ uint32_t end_j = (CURCODE + 1) << shift; - byte eflags = 0; - - if (end_j > max_j) { - diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9216.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9216.patch deleted file mode 100644 index 1caeb3ef5..000000000 --- a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9216.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 3ebffb1d96ba0cacec23016eccb4047dab365853 Mon Sep 17 00:00:00 2001 -From: Shailesh Mistry <shailesh.mistry@hotmail.co.uk> -Date: Wed, 24 May 2017 19:29:57 +0100 -Subject: [PATCH] Bug 697934: Fix SEGV due to error code being ignored. - -The return code from jbig2_decode_text_region was being ignored so the -code continued to try and parse the invalid file using incomplete/empty -structures. - -Upstream-Status: Backport -CVE: CVE-2017-9216 - -Signed-off-by: Catalin Enache <catalin.enache@windriver.com> ---- - jbig2dec/jbig2_symbol_dict.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/jbig2dec/jbig2_symbol_dict.c b/jbig2dec/jbig2_symbol_dict.c -index 3cc1731..672425d 100644 ---- a/jbig2dec/jbig2_symbol_dict.c -+++ b/jbig2dec/jbig2_symbol_dict.c -@@ -493,8 +493,10 @@ jbig2_decode_symbol_dict(Jbig2Ctx *ctx, - } - - /* multiple symbols are handled as a text region */ -- jbig2_decode_text_region(ctx, segment, tparams, (const Jbig2SymbolDict * const *)refagg_dicts, -+ code = jbig2_decode_text_region(ctx, segment, tparams, (const Jbig2SymbolDict * const *)refagg_dicts, - n_refagg_dicts, image, data, size, GR_stats, as, ws); -+ if (code < 0) -+ goto cleanup4; - - SDNEWSYMS->glyphs[NSYMSDECODED] = image; - refagg_dicts[0]->glyphs[params->SDNUMINSYMS + NSYMSDECODED] = jbig2_image_clone(ctx, SDNEWSYMS->glyphs[NSYMSDECODED]); --- -2.10.2 - diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9611.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9611.patch deleted file mode 100644 index 58ef04d1f..000000000 --- a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9611.patch +++ /dev/null @@ -1,34 +0,0 @@ -From c7c55972758a93350882c32147801a3485b010fe Mon Sep 17 00:00:00 2001 -From: Chris Liddell <chris.liddell@artifex.com> -Date: Mon, 12 Jun 2017 13:08:40 +0100 -Subject: [PATCH] Bug 698024: bounds check zone pointer in Ins_MIRP() - ---- - base/ttinterp.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - ---- end of original header - -CVE: CVE-2017-9611 - -Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] - -Signed-off-by: Joe Slater <joe.slater@windriver.com> - -diff --git a/base/ttinterp.c b/base/ttinterp.c -index e56aec6..f6a6d95 100644 ---- a/base/ttinterp.c -+++ b/base/ttinterp.c -@@ -3858,7 +3858,8 @@ static int nInstrCount=0; - /* XXX: UNDOCUMENTED! cvt[-1] = 0 always */ - - if ( BOUNDS( args[0], CUR.zp1.n_points ) || -- BOUNDS( args[1]+1, CUR.cvtSize+1 ) ) -+ BOUNDS( args[1]+1, CUR.cvtSize+1 ) || -+ BOUNDS(CUR.GS.rp0, CUR.zp0.n_points) ) - { - CUR.error = TT_Err_Invalid_Reference; - return; --- -1.7.9.5 - diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9612.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9612.patch deleted file mode 100644 index b737cc56b..000000000 --- a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9612.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 98f6da60b9d463c617e631fc254cf6d66f2e8e3c Mon Sep 17 00:00:00 2001 -From: Chris Liddell <chris.liddell@artifex.com> -Date: Mon, 12 Jun 2017 13:15:17 +0100 -Subject: [PATCH] Bug 698026: bounds check zone pointers in Ins_IP() - ---- - base/ttinterp.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - ---- end of original header - -CVE: CVE-2017-9612 - -Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] - -Signed-off-by: Joe Slater <joe.slater@windriver.com> - -diff --git a/base/ttinterp.c b/base/ttinterp.c -index f6a6d95..e7c9d68 100644 ---- a/base/ttinterp.c -+++ b/base/ttinterp.c -@@ -4129,7 +4129,9 @@ static int nInstrCount=0; - Int point; - (void)args; - -- if ( CUR.top < CUR.GS.loop ) -+ if ( CUR.top < CUR.GS.loop || -+ BOUNDS(CUR.GS.rp1, CUR.zp0.n_points) || -+ BOUNDS(CUR.GS.rp2, CUR.zp1.n_points)) - { - CUR.error = TT_Err_Invalid_Reference; - return; --- -1.7.9.5 - diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9726.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9726.patch deleted file mode 100644 index 3e6c65699..000000000 --- a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9726.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 7755e67116e8973ee0e3b22d653df026a84fa01b Mon Sep 17 00:00:00 2001 -From: Chris Liddell <chris.liddell@artifex.com> -Date: Thu, 15 Jun 2017 08:58:31 +0100 -Subject: [PATCH] Bug 698055: bounds check zone pointer in Ins_MDRP - ---- - base/ttinterp.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - ---- end of original header - -CVE: CVE-2017-9726 - -Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] - -Signed-off-by: Joe Slater <joe.slater@windriver.com> -diff --git a/base/ttinterp.c b/base/ttinterp.c -index e7c9d68..af457e8 100644 ---- a/base/ttinterp.c -+++ b/base/ttinterp.c -@@ -3770,7 +3770,8 @@ static int nInstrCount=0; - - point = (Int)args[0]; - -- if ( BOUNDS( args[0], CUR.zp1.n_points ) ) -+ if ( BOUNDS( args[0], CUR.zp1.n_points ) || -+ BOUNDS( CUR.GS.rp0, CUR.zp0.n_points) ) - { - /* Current version of FreeType silently ignores this out of bounds error - * and drops the instruction, see bug #691121 --- -1.7.9.5 - diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9727.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9727.patch deleted file mode 100644 index a2f7bfa50..000000000 --- a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9727.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 937ccd17ac65935633b2ebc06cb7089b91e17e6b Mon Sep 17 00:00:00 2001 -From: Chris Liddell <chris.liddell@artifex.com> -Date: Thu, 15 Jun 2017 09:05:20 +0100 -Subject: [PATCH] Bug 698056: make bounds check in gx_ttfReader__Read more - robust - ---- - base/gxttfb.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - ---- end of original header - -CVE: CVE-2017-9727 - -Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] - -Signed-off-by: Joe Slater <joe.slater@windriver.com> - -diff --git a/base/gxttfb.c b/base/gxttfb.c -index 0e9a444..e1561af 100644 ---- a/base/gxttfb.c -+++ b/base/gxttfb.c -@@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n) - if (!r->error) { - if (r->extra_glyph_index != -1) { - q = r->glyph_data.bits.data + r->pos; -- r->error = (r->glyph_data.bits.size - r->pos < n ? -+ r->error = ((r->pos >= r->glyph_data.bits.size || -+ r->glyph_data.bits.size - r->pos < n) ? - gs_note_error(gs_error_invalidfont) : 0); - if (r->error == 0) - memcpy(p, q, n); --- -1.7.9.5 - diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9739.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9739.patch deleted file mode 100644 index 69a94df7b..000000000 --- a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9739.patch +++ /dev/null @@ -1,37 +0,0 @@ -From c501a58f8d5650c8ba21d447c0d6f07eafcb0f15 Mon Sep 17 00:00:00 2001 -From: Chris Liddell <chris.liddell@artifex.com> -Date: Fri, 16 Jun 2017 08:29:25 +0100 -Subject: [PATCH] Bug 698063: Bounds check Ins_JMPR - ---- - base/ttinterp.c | 6 ++++++ - 1 file changed, 6 insertions(+) - ---- end of original header - -CVE: CVE-2017-9739 - -Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] - -Signed-off-by: Joe Slater <joe.slater@windriver.com> - -diff --git a/base/ttinterp.c b/base/ttinterp.c -index af457e8..adf3f0c 100644 ---- a/base/ttinterp.c -+++ b/base/ttinterp.c -@@ -1794,6 +1794,12 @@ static int nInstrCount=0; - - static void Ins_JMPR( INS_ARG ) - { -+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) -+ { -+ CUR.error = TT_Err_Invalid_Reference; -+ return; -+ } -+ - CUR.IP += (Int)(args[0]); - CUR.step_ins = FALSE; - --- -1.7.9.5 - diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9835.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9835.patch deleted file mode 100644 index 7c65690c6..000000000 --- a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9835.patch +++ /dev/null @@ -1,125 +0,0 @@ -From cfde94be1d4286bc47633c6e6eaf4e659bd78066 Mon Sep 17 00:00:00 2001 -From: Chris Liddell <chris.liddell@artifex.com> -Date: Wed, 7 Jun 2017 14:55:12 +0100 -Subject: [PATCH] Bug 697985: bounds check the array allocations methods - -The clump allocator has four allocation functions that use 'number of elements' -and 'size of elements' parameters (rather than a simple 'number of bytes'). - -Those need specific bounds checking. ---- - base/gsalloc.c | 42 ++++++++++++++++++++++++++++-------------- - 1 file changed, 28 insertions(+), 14 deletions(-) - ---- end of original header - -CVE: CVE-2017-9835 - -Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] - -Signed-off-by: Joe Slater <joe.slater@windriver.com> - -diff --git a/base/gsalloc.c b/base/gsalloc.c -index 741ba00..10c04dd 100644 ---- a/base/gsalloc.c -+++ b/base/gsalloc.c -@@ -1248,19 +1248,32 @@ i_alloc_struct_immovable(gs_memory_t * mem, gs_memory_type_ptr_t pstype, - alloc_trace("|+<.", imem, cname, pstype, size, obj); - return obj; - } -+ -+static inline bool -+alloc_array_check_size(ulong num_elements, ulong elt_size, ulong *lsize) -+{ -+ int64_t s = (int64_t)num_elements * elt_size; -+ if (s > max_uint) { -+ return false; -+ } -+ *lsize = (ulong)s; -+ return true; -+} -+ - static byte * - i_alloc_byte_array(gs_memory_t * mem, uint num_elements, uint elt_size, - client_name_t cname) - { - gs_ref_memory_t * const imem = (gs_ref_memory_t *)mem; - obj_header_t *obj; -- -+ ulong lsize; - #ifdef MEMENTO - if (Memento_failThisEvent()) - return NULL; - #endif -- -- obj = alloc_obj(imem, (ulong) num_elements * elt_size, -+ if (alloc_array_check_size(num_elements, elt_size, &lsize) == false) -+ return NULL; -+ obj = alloc_obj(imem, lsize, - &st_bytes, ALLOC_DIRECT, cname); - - if_debug6m('A', mem, "[a%d:+b.]%s -bytes-*(%lu=%u*%u) = 0x%lx\n", -@@ -1275,13 +1288,14 @@ i_alloc_byte_array_immovable(gs_memory_t * mem, uint num_elements, - { - gs_ref_memory_t * const imem = (gs_ref_memory_t *)mem; - obj_header_t *obj; -- -+ ulong lsize; - #ifdef MEMENTO - if (Memento_failThisEvent()) - return NULL; - #endif -- -- obj = alloc_obj(imem, (ulong) num_elements * elt_size, -+ if (alloc_array_check_size(num_elements, elt_size, &lsize) == false) -+ return NULL; -+ obj = alloc_obj(imem, lsize, - &st_bytes, ALLOC_IMMOVABLE | ALLOC_DIRECT, - cname); - -@@ -1297,7 +1311,7 @@ i_alloc_struct_array(gs_memory_t * mem, uint num_elements, - { - gs_ref_memory_t * const imem = (gs_ref_memory_t *)mem; - obj_header_t *obj; -- -+ ulong lsize; - #ifdef MEMENTO - if (Memento_failThisEvent()) - return NULL; -@@ -1311,9 +1325,9 @@ i_alloc_struct_array(gs_memory_t * mem, uint num_elements, - return NULL; /* fail */ - } - #endif -- obj = alloc_obj(imem, -- (ulong) num_elements * pstype->ssize, -- pstype, ALLOC_DIRECT, cname); -+ if (alloc_array_check_size(num_elements, pstype->ssize, &lsize) == false) -+ return NULL; -+ obj = alloc_obj(imem, lsize, pstype, ALLOC_DIRECT, cname); - if_debug7m('A', mem, "[a%d:+<.]%s %s*(%lu=%u*%u) = 0x%lx\n", - alloc_trace_space(imem), client_name_string(cname), - struct_type_name_string(pstype), -@@ -1327,16 +1341,16 @@ i_alloc_struct_array_immovable(gs_memory_t * mem, uint num_elements, - { - gs_ref_memory_t * const imem = (gs_ref_memory_t *)mem; - obj_header_t *obj; -- -+ ulong lsize; - #ifdef MEMENTO - if (Memento_failThisEvent()) - return NULL; - #endif - - ALLOC_CHECK_SIZE(mem,pstype); -- obj = alloc_obj(imem, -- (ulong) num_elements * pstype->ssize, -- pstype, ALLOC_IMMOVABLE | ALLOC_DIRECT, cname); -+ if (alloc_array_check_size(num_elements, pstype->ssize, &lsize) == false) -+ return NULL; -+ obj = alloc_obj(imem, lsize, pstype, ALLOC_IMMOVABLE | ALLOC_DIRECT, cname); - if_debug7m('A', mem, "[a%d|+<.]%s %s*(%lu=%u*%u) = 0x%lx\n", - alloc_trace_space(imem), client_name_string(cname), - struct_type_name_string(pstype), --- -1.7.9.5 - diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch index c4794e7d8..e8cb16c36 100644 --- a/poky/meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch @@ -1,14 +1,25 @@ +From 0ccbaa134093bf6afc79f2d20d061bca5a8754ed Mon Sep 17 00:00:00 2001 +From: Kai Kang <kai.kang@windriver.com> +Date: Thu, 29 Mar 2018 16:02:05 +0800 +Subject: [PATCH 04/10] avoid host contamination + Remove hardcode path refer to host to avoid host contamination. Upstream-Status: Inappropriate [embedded specific] Signed-off-by: Kai Kang <kai.kang@windriver.com> + +Rebase to 9.23 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- + devices/devs.mak | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + diff --git a/devices/devs.mak b/devices/devs.mak -index 3070d2e..df663f0 100644 +index 846aa50..9570182 100644 --- a/devices/devs.mak +++ b/devices/devs.mak -@@ -546,7 +546,7 @@ $(DEVOBJ)gdevxalt.$(OBJ) : $(DEVSRC)gdevxalt.c $(GDEVX) $(math__h) $(memory__h)\ +@@ -393,7 +393,7 @@ $(DEVOBJ)gdevxalt.$(OBJ) : $(DEVSRC)gdevxalt.c $(GDEVX) $(math__h) $(memory__h)\ ### NON PORTABLE, ONLY UNIX WITH GCC SUPPORT $(DEVOBJ)X11.so : $(x11alt_) $(x11_) $(DEVS_MAK) $(MAKEDIRS) @@ -17,3 +28,6 @@ index 3070d2e..df663f0 100644 ###### --------------- Memory-buffered printer devices --------------- ###### +-- +1.8.3.1 + diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch index d97d4ecd7..7d80066a8 100644 --- a/poky/meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch @@ -1,4 +1,8 @@ -base/genht.c: add a preprocessor define to allow fopen calling +From 9ca6f795409b988d38dd98bc2a6ecb68a9392312 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Thu, 29 Mar 2018 16:37:40 +0800 +Subject: [PATCH 10/10] base/genht.c: add a preprocessor define to allow fopen + calling The commit in upstream: http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=773c69e46e70bdd5482676437dafd2ca83397643 @@ -7,17 +11,19 @@ Replace all fopen calls with gp_fopen and add a preprocessor define so that any unintential calls directly to fopen will cause an error. Only exceptions are those in the platform specific code, and mkromfs.c. -This patch add a preprocessor define to allow fopen calling in base/genht.c. +This patch add a preprocessor define to allow fopen calling in +base/genht.c. Upstream-Status: Pending +Rebase to 9.23 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- base/genht.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/base/genht.c b/base/genht.c -index 4b04085..cc82fff 100644 +index e597e72..e96bfb5 100644 --- a/base/genht.c +++ b/base/genht.c @@ -16,6 +16,10 @@ @@ -32,5 +38,5 @@ index 4b04085..cc82fff 100644 #include "string_.h" #include "gscdefs.h" -- -1.8.1.2 +1.8.3.1 diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch index a1c9368cc..4c9bb22fa 100644 --- a/poky/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch @@ -1,6 +1,12 @@ -Subject: [PATCH] Don't build-depend on libgcrypt, as nothing is used from it +From 9129eb7fa9dc160d64a7d9df9279a3b1dae4d793 Mon Sep 17 00:00:00 2001 +From: Jackie Huang <jackie.huang@windriver.com> +Date: Thu, 29 Mar 2018 16:16:18 +0800 +Subject: [PATCH 08/10] cups no gcrypt -Backported from http://www.cups.org/strfiles.php/3308/cups-no-gcrypt.patch +Don't build-depend on libgcrypt, as nothing is used from it + +Backported from +http://www.cups.org/strfiles.php/3308/cups-no-gcrypt.patch This addresses the cryto dependency seen during build. @@ -8,7 +14,7 @@ Upstream-Status: Backport Signed-off-by: Jackie Huang <jackie.huang@windriver.com> -Rebase the patch to ghostscript-9.15 +Rebase to 9.23 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- cups/libs/cups/http-private.h | 1 - @@ -27,5 +33,5 @@ index 99a85c3..a674852 100644 # include <CoreFoundation/CoreFoundation.h> # include <Security/Security.h> -- -1.9.1 +1.8.3.1 diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch index b4c14ea23..fc144f625 100644 --- a/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch @@ -1,22 +1,28 @@ -Import patch from windriver linux for cross compilation, and split patches -into oe way under different directories such as i586, powerpc etc according -to Richard's opinion. +From 94850954b88440df6c41d2dd133c422ffc84d9aa Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Thu, 29 Mar 2018 16:12:48 +0800 +Subject: [PATCH 07/10] not generate objarch.h at compile time + +Import patch from windriver linux for cross compilation, and split +patches into oe way under different directories such as i586, powerpc etc +according to Richard's opinion. Upstream-Status: Pending Signed-off-by: Kang Kai <kai.kang@windriver.com> Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> -# Author: Chi Xu <chi.xu@windriver.com> -# Date: Feb 26 2010 -# Summary: Generate arch.h for ppc32 -# +Rebase to 9.23 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + base/lib.mak | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -Index: ghostscript-9.21/base/lib.mak -=================================================================== ---- ghostscript-9.21.orig/base/lib.mak -+++ ghostscript-9.21/base/lib.mak -@@ -73,8 +73,8 @@ arch_h=$(GLGEN)arch.h +diff --git a/base/lib.mak b/base/lib.mak +index 0036d1e..302877e 100644 +--- a/base/lib.mak ++++ b/base/lib.mak +@@ -87,8 +87,8 @@ arch_h=$(GLGEN)arch.h stdpre_h=$(GLSRC)stdpre.h stdint__h=$(GLSRC)stdint_.h $(std_h) @@ -27,3 +33,6 @@ Index: ghostscript-9.21/base/lib.mak # Platform interfaces +-- +1.8.3.1 + diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.15-parallel-make.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.15-parallel-make.patch index 3ec395640..ffa269e3b 100644 --- a/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.15-parallel-make.patch +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.15-parallel-make.patch @@ -1,25 +1,23 @@ -From 14937d9247330065359ca0fb648c28dfa5c3b224 Mon Sep 17 00:00:00 2001 -From: Huang Qiyu <huangqy.fnst@cn.fujitsu.com> -Date: Tue, 13 Dec 2016 18:16:41 +0900 -Subject: [PATCH] ghostscript-9.15-parallel-make +From 84bb692d6b047c09266de154f404af9817fa04aa Mon Sep 17 00:00:00 2001 +From: Robert Yang <liezhi.yang@windriver.com> +Date: Thu, 29 Mar 2018 15:59:05 +0800 +Subject: [PATCH 01/10] contrib.mak: fix for parallel build -From 767bdf8a412b0cce2b734998e9b7e55abeaf932c Mon Sep 17 00:00:00 2001 -From: Huang Qiyu <huangqy.fnst@cn.fujitsu.com> -Date: Tue, 13 Dec 2016 17:55:54 +0900 -Subject: [PATCH] Robert Yang <liezhi.yang@windriver.com> Date: Fri, 30 Jan -2015 00:40:22 -0800 Subject: [PATCH] contrib.mak: fix for parallel build - -Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com> Upstream-Status: Pending + +Signed-off-by: Robert Yang <liezhi.yang@windriver.com> + +Rebase to 9.23 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- contrib/contrib.mak | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/contrib.mak b/contrib/contrib.mak -index 55415b3..0b6b5ae 100644 +index f5a2fa4..4999752 100644 --- a/contrib/contrib.mak +++ b/contrib/contrib.mak -@@ -1099,6 +1099,7 @@ $(DEVOBJ)dviprlib.$(OBJ) : $(JAPSRC)dviprlib.c $(JAPSRC)dviprlib.h \ +@@ -1067,6 +1067,7 @@ $(DEVOBJ)dviprlib.$(OBJ) : $(JAPSRC)dviprlib.c $(JAPSRC)dviprlib.h \ $(DEVCC) $(O_)$@ $(C_) $(JAPSRC)dviprlib.c extra-dmprt-install: install-libdata @@ -27,7 +25,7 @@ index 55415b3..0b6b5ae 100644 $(INSTALL_DATA) $(JAPSRC)dmp_init.ps $(DESTDIR)$(gsdatadir)$(D)lib || exit 1 $(INSTALL_DATA) $(JAPSRC)dmp_site.ps $(DESTDIR)$(gsdatadir)$(D)lib || exit 1 $(INSTALL_DATA) $(JAPSRC)escp_24.src $(DESTDIR)$(gsdatadir)$(D)lib || exit 1 -@@ -1267,6 +1268,7 @@ $(DEVOBJ)gdevalps.$(OBJ) : $(JAPSRC)gdevalps.c $(PDEVH) \ +@@ -1235,6 +1236,7 @@ $(DEVOBJ)gdevalps.$(OBJ) : $(JAPSRC)gdevalps.c $(PDEVH) \ ### ----------------- Additional .upp files ---------------- ### extra-upp-install: install-libdata @@ -36,5 +34,5 @@ index 55415b3..0b6b5ae 100644 $(INSTALL_DATA) $$f $(DESTDIR)$(gsdatadir)$(D)lib || exit 1; \ done -- -2.7.4 +1.8.3.1 diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.16-Werror-return-type.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.16-Werror-return-type.patch index d78648200..8c4a5d44e 100644 --- a/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.16-Werror-return-type.patch +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.16-Werror-return-type.patch @@ -1,7 +1,7 @@ -From 5d5c83c89be0cff29dde2267fa168e6f7146be8c Mon Sep 17 00:00:00 2001 +From c481b055cd464734a3c2d80719ead4c1c92a40c9 Mon Sep 17 00:00:00 2001 From: Robert Yang <liezhi.yang@windriver.com> Date: Mon, 4 May 2015 22:31:48 -0700 -Subject: [PATCH] base/gendev.c: fix for -Werror=return-type +Subject: [PATCH 02/10] base/gendev.c: fix for -Werror=return-type Fixed: base/gendev.c:80:1: error: return type defaults to 'int' [-Werror=return-type] @@ -10,11 +10,11 @@ Upstream-Status: Pending Signed-off-by: Robert Yang <liezhi.yang@windriver.com> --- - base/gendev.c | 1 + + base/gendev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/base/gendev.c b/base/gendev.c -index 68a745f..8058b5a 100644 +index 59d5999..7766b08 100644 --- a/base/gendev.c +++ b/base/gendev.c @@ -77,6 +77,7 @@ static const char *indent_item = ""; @@ -26,5 +26,5 @@ index 68a745f..8058b5a 100644 { config conf; -- -1.7.9.5 +1.8.3.1 diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-native-fix-disable-system-libtiff.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-native-fix-disable-system-libtiff.patch index bff3e6176..a382c7f89 100644 --- a/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-native-fix-disable-system-libtiff.patch +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-native-fix-disable-system-libtiff.patch @@ -1,31 +1,38 @@ -ghostscript-native:fix disable-system-libtiff +From 0124b1c29b9cfe46d73ae82ce023dd7c5b055744 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Thu, 29 Mar 2018 16:36:12 +0800 +Subject: [PATCH 09/10] ghostscript-native:fix disable-system-libtiff Modify configure to add the check to make sure ghostscrip could work while system-libtiff is disabled. -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> - -Updated to apply to ghostscript 9.21. - -Signed-off-by: Joe Slater <joe.slater@windriver.com> - Upstream-Status: Pending +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +Rebase to ghostscript 9.25. +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> +--- + configure.ac | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 80a60b1..f3e9efb 100644 --- a/configure.ac +++ b/configure.ac -@@ -1259,6 +1259,7 @@ case "x$with_system_libtiff" in - esac +@@ -1319,6 +1319,7 @@ AC_TRY_COMPILE([], [return 0;], + CFLAGS=$CGLAGS_STORE if test x"$SHARE_LIBTIFF" = x"0" ; then + if test -e $LIBTIFFDIR/configure; then echo "Running libtiff configure script..." olddir=`pwd` if ! test -d "$LIBTIFFCONFDIR" ; then -@@ -1272,6 +1273,10 @@ if test x"$SHARE_LIBTIFF" = x"0" ; then - cd "$olddir" +@@ -1337,6 +1338,10 @@ if test x"$SHARE_LIBTIFF" = x"0" ; then + echo echo "Continuing with Ghostscript configuration..." + else @@ -35,3 +42,6 @@ Upstream-Status: Pending fi AC_SUBST(SHARE_LIBTIFF) +-- +1.8.3.1 + diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-prevent_recompiling.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-prevent_recompiling.patch index f2c6d04e0..c76915fb8 100644 --- a/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-prevent_recompiling.patch +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-prevent_recompiling.patch @@ -1,32 +1,41 @@ -Just use commands provided by ghostscript-native, preventing recompile them when -compile ghostscript. -Way to enable cross compile. +From 239d681306a8d97ed10954788d32ba2f4b55f77c Mon Sep 17 00:00:00 2001 +From: Kang Kai <kai.kang@windriver.com> +Date: Thu, 29 Mar 2018 16:10:16 +0800 +Subject: [PATCH 06/10] prevent recompiling + +Just use commands provided by ghostscript-native, preventing recompile +them when compile ghostscript. Way to enable cross compile. Upstream-Status: Pending Signed-off-by: Kang Kai <kai.kang@windriver.com> Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> -Rebase to 9.19 +Rebase to 9.25 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> +--- + base/unix-aux.mak | 44 -------------------------------------------- + 1 file changed, 44 deletions(-) -Rebase to 9.21 -Signed-off-by: Joe Slater <joe.slater@windriver.com> - +diff --git a/base/unix-aux.mak b/base/unix-aux.mak +index 5bf72e9..9cb39d7 100644 --- a/base/unix-aux.mak +++ b/base/unix-aux.mak -@@ -66,45 +66,45 @@ $(GLOBJ)gp_sysv.$(OBJ): $(GLSRC)gp_sysv. - - # -------------------------- Auxiliary programs --------------------------- # +@@ -54,50 +54,6 @@ $(AUX)gp_stdia.$(OBJ): $(GLSRC)gp_stdia. + $(stdio__h) $(time__h) $(unistd__h) $(gx_h) $(gp_h) $(UNIX_AUX_MAK) $(MAKEDIRS) + $(GLCCAUX) $(AUXO_)gp_stdia.$(OBJ) $(C_) $(GLSRC)gp_stdia.c +-# -------------------------- Auxiliary programs --------------------------- # +- -$(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(UNIX_AUX_MAK) $(MAKEDIRS) - $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(ECHOGS_XE) $(GLSRC)echogs.c $(AUXEXTRALIBS) - -+#$(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(UNIX_AUX_MAK) $(MAKEDIRS) -+# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(ECHOGS_XE) $(GLSRC)echogs.c $(AUXEXTRALIBS) -+# - # On the RS/6000 (at least), compiling genarch.c with gcc with -O - # produces a buggy executable. +-$(PACKPS_XE): $(GLSRC)pack_ps.c $(stdpre_h) $(UNIX_AUX_MAK) $(MAKEDIRS) +- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(PACKPS_XE) $(GLSRC)pack_ps.c $(AUXEXTRALIBS) +- +-# On the RS/6000 (at least), compiling genarch.c with gcc with -O +-# produces a buggy executable. -$(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS) - $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENARCH_XE) $(GLSRC)genarch.c $(AUXEXTRALIBS) - @@ -39,21 +48,9 @@ Signed-off-by: Joe Slater <joe.slater@windriver.com> -$(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS) - $(CCAUX_) $(GENHT_CFLAGS) $(O_)$(GENHT_XE) $(GLSRC)genht.c $(AUXEXTRALIBS) - -+#$(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS) -+# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENARCH_XE) $(GLSRC)genarch.c $(AUXEXTRALIBS) -+# -+#$(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS) -+# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENCONF_XE) $(GLSRC)genconf.c $(AUXEXTRALIBS) -+# -+#$(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS) -+# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENDEV_XE) $(GLSRC)gendev.c $(AUXEXTRALIBS) -+# -+#$(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS) -+# $(CCAUX_) $(GENHT_CFLAGS) $(O_)$(GENHT_XE) $(GLSRC)genht.c $(AUXEXTRALIBS) -+# - # To get GS to use the system zlib, you remove/hide the gs/zlib directory - # which means that the mkromfs build can't find the zlib source it needs. - # So it's split into two targets, one using the zlib source directly..... +-# To get GS to use the system zlib, you remove/hide the gs/zlib directory +-# which means that the mkromfs build can't find the zlib source it needs. +-# So it's split into two targets, one using the zlib source directly..... -MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ - $(AUX)gscdefs.$(OBJ) $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ - $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ) @@ -61,14 +58,7 @@ Signed-off-by: Joe Slater <joe.slater@windriver.com> -$(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) $(UNIX_AUX_MAK) $(MAKEDIRS) - $(CCAUX_) $(GENOPTAUX) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS) - -+#MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ -+# $(AUX)gscdefs.$(OBJ) $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ -+# $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ) -+# -+#$(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) $(UNIX_AUX_MAK) $(MAKEDIRS) -+# $(CCAUX_) $(GENOPTAUX) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS) -+# - # .... and one using the zlib library linked via the command line +-# .... and one using the zlib library linked via the command line -MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \ - $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ - $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ @@ -80,17 +70,9 @@ Signed-off-by: Joe Slater <joe.slater@windriver.com> -$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(UNIX_AUX_MAK) $(MAKEDIRS) - $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE) - -+#MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \ -+# $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ -+# $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ -+# $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) -+# -+#$(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1) $(UNIX_AUX_MAK) $(MAKEDIRS) -+# $(CCAUX_) $(GENOPTAUX) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS) -+# -+#$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(UNIX_AUX_MAK) $(MAKEDIRS) -+# $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE) -+# # Query the environment to construct gconfig_.h. # These are all defined conditionally (except the JasPER one), so that # they can be overridden by settings from the configure script. +-- +1.8.3.1 + diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/mkdir-p.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/mkdir-p.patch index 5a7eab1c2..3e6d3e3c4 100644 --- a/poky/meta/recipes-extended/ghostscript/ghostscript/mkdir-p.patch +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/mkdir-p.patch @@ -1,4 +1,8 @@ -ghostscript: allow directories to be created more than once +From 2b23026f8e2a352417fb1c4da94bf69b19bef267 Mon Sep 17 00:00:00 2001 +From: Joe Slater <joe.slater@windriver.com> +Date: Thu, 29 Mar 2018 16:04:32 +0800 +Subject: [PATCH 05/10] ghostscript: allow directories to be created more than + once When doing parallel builds, we might try to create directories more than once. This should not cause an error. @@ -7,7 +11,14 @@ Upstream-Status: Pending Signed-off-by: Joe Slater <joe.slater@windriver.com> +Rebase to 9.23 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + base/unix-end.mak | 17 ++++++++--------- + 1 file changed, 8 insertions(+), 9 deletions(-) +diff --git a/base/unix-end.mak b/base/unix-end.mak +index 9ce599a..feff5a6 100644 --- a/base/unix-end.mak +++ b/base/unix-end.mak @@ -17,15 +17,14 @@ @@ -34,3 +45,6 @@ Signed-off-by: Joe Slater <joe.slater@windriver.com> gs: .gssubtarget $(UNIX_END_MAK) +-- +1.8.3.1 + diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript_9.21.bb b/poky/meta/recipes-extended/ghostscript/ghostscript_9.25.bb index 50ec7e20c..fdca8a2ac 100644 --- a/poky/meta/recipes-extended/ghostscript/ghostscript_9.21.bb +++ b/poky/meta/recipes-extended/ghostscript/ghostscript_9.25.bb @@ -19,12 +19,20 @@ DEPENDS_class-native = "libpng-native" UPSTREAM_CHECK_URI = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases" UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar" -SRC_URI_BASE = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs921/${BPN}-${PV}.tar.gz \ +SRC_URI_BASE = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs925/${BPN}-${PV}.tar.gz \ file://ghostscript-9.15-parallel-make.patch \ file://ghostscript-9.16-Werror-return-type.patch \ file://do-not-check-local-libpng-source.patch \ file://avoid-host-contamination.patch \ file://mkdir-p.patch \ + file://0001-Bug-699795-add-operand-checking-to-.setnativefontmap.patch \ + file://0002-Bug-699816-Improve-hiding-of-security-critical-custo.patch \ + file://0003-Bug-699832-add-control-over-hiding-error-handlers.patch \ + file://0004-For-hidden-operators-pass-a-name-object-to-error-han.patch \ + file://0005-Bug-699938-.loadfontloop-must-be-an-operator.patch \ + file://0006-Undefine-some-additional-internal-operators.patch \ + file://0007-Bug-699927-don-t-include-operator-arrays-in-execstac.patch \ + file://0008-Make-.forceput-unavailable-from-.policyprocs-helper-.patch \ " SRC_URI = "${SRC_URI_BASE} \ @@ -32,17 +40,6 @@ SRC_URI = "${SRC_URI_BASE} \ file://ghostscript-9.02-genarch.patch \ file://objarch.h \ file://cups-no-gcrypt.patch \ - file://CVE-2017-7207.patch \ - file://CVE-2017-5951.patch \ - file://CVE-2017-7975.patch \ - file://CVE-2017-9216.patch \ - file://CVE-2017-9611.patch \ - file://CVE-2017-9612.patch \ - file://CVE-2017-9739.patch \ - file://CVE-2017-9726.patch \ - file://CVE-2017-9727.patch \ - file://CVE-2017-9835.patch \ - file://CVE-2017-11714.patch \ " SRC_URI_class-native = "${SRC_URI_BASE} \ @@ -50,8 +47,8 @@ SRC_URI_class-native = "${SRC_URI_BASE} \ file://base-genht.c-add-a-preprocessor-define-to-allow-fope.patch \ " -SRC_URI[md5sum] = "5f213281761d2750fcf27476c404d17f" -SRC_URI[sha256sum] = "02bceadbc4dddeb6f2eec9c8b1623d945d355ca11b8b4df035332b217d58ce85" +SRC_URI[md5sum] = "eebd0fadbfa8e800094422ce65e94d5d" +SRC_URI[sha256sum] = "baafa64740b090bff50b220a6df3be95c46069b7e30f4b4effed28316e5b2389" # Put something like # @@ -104,7 +101,7 @@ do_configure_append () { # copy tools from the native ghostscript build if [ "${PN}" != "ghostscript-native" ]; then mkdir -p obj/aux soobj - for i in genarch genconf mkromfs echogs gendev genht; do + for i in genarch genconf mkromfs echogs gendev genht packps; do cp ${STAGING_BINDIR_NATIVE}/ghostscript-${PV}/$i obj/aux/$i done fi @@ -118,14 +115,14 @@ do_install_append () { do_compile_class-native () { mkdir -p obj - for i in genarch genconf mkromfs echogs gendev genht; do + for i in genarch genconf mkromfs echogs gendev genht packps; do oe_runmake obj/aux/$i done } do_install_class-native () { install -d ${D}${bindir}/ghostscript-${PV} - for i in genarch genconf mkromfs echogs gendev genht; do + for i in genarch genconf mkromfs echogs gendev genht packps; do install -m 755 obj/aux/$i ${D}${bindir}/ghostscript-${PV}/$i done } diff --git a/poky/meta/recipes-extended/groff/groff-1.22.3/groff-not-search-fonts-on-build-host.patch b/poky/meta/recipes-extended/groff/groff-1.22.3/groff-not-search-fonts-on-build-host.patch new file mode 100644 index 000000000..ff8f32059 --- /dev/null +++ b/poky/meta/recipes-extended/groff/groff-1.22.3/groff-not-search-fonts-on-build-host.patch @@ -0,0 +1,20 @@ +groff searchs fonts which are provided by ghostscript on build host. +It causes non-determinism issue. So not search font dirs on host. + +Upstream-Status: Inappropriate [cross build specific] + +Signed-off-by: Kai Kang <kai.kang@windriver.com> + +diff --git a/font/devpdf/Foundry.in b/font/devpdf/Foundry.in +index a6e968f..8094642 100644 +--- a/font/devpdf/Foundry.in ++++ b/font/devpdf/Foundry.in +@@ -65,7 +65,7 @@ ZD|Y||||Dingbats!d050000l.pfb + #====================================================================== + + #Foundry|Name|Searchpath +-foundry|U|(gs):/usr/share/fonts/type1/gsfonts :/opt/local/share/fonts/urw-fonts # the URW fonts delivered with ghostscript (may be different) ++foundry|U|(gs) # the URW fonts delivered with ghostscript (may be different) + #Define Flags for afmtodit + + r=-i 0 -m diff --git a/poky/meta/recipes-extended/groff/groff_1.22.3.bb b/poky/meta/recipes-extended/groff/groff_1.22.3.bb index 7472f5982..ba90cadd8 100644 --- a/poky/meta/recipes-extended/groff/groff_1.22.3.bb +++ b/poky/meta/recipes-extended/groff/groff_1.22.3.bb @@ -11,6 +11,7 @@ SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz \ file://groff-1.22.2-correct-man.local-install-path.patch \ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ file://0001-replace-perl-w-with-use-warnings.patch \ + file://groff-not-search-fonts-on-build-host.patch \ " SRC_URI[md5sum] = "cc825fa64bc7306a885f2fb2268d3ec5" @@ -20,7 +21,9 @@ DEPENDS = "groff-native" DEPENDS_class-native = "" RDEPENDS_${PN} += "perl sed" -inherit autotools texinfo +inherit autotools texinfo multilib_script + +MULTILIB_SCRIPTS = "${PN}:${bindir}/gpinyin ${PN}:${bindir}/groffer ${PN}:${bindir}/grog" EXTRA_OECONF = "--without-x" PARALLEL_MAKE = "" diff --git a/poky/meta/recipes-extended/gzip/gzip-1.9/gnulib.patch b/poky/meta/recipes-extended/gzip/gzip-1.9/gnulib.patch new file mode 100644 index 000000000..c3cdd72b6 --- /dev/null +++ b/poky/meta/recipes-extended/gzip/gzip-1.9/gnulib.patch @@ -0,0 +1,189 @@ +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.9.bb index a8eeba138..19f658652 100644 --- a/poky/meta/recipes-extended/gzip/gzip_1.9.bb +++ b/poky/meta/recipes-extended/gzip/gzip_1.9.bb @@ -3,7 +3,9 @@ require gzip.inc LICENSE = "GPLv3+" SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz \ - file://run-ptest" + file://run-ptest \ + file://gnulib.patch \ + " SRC_URI_append_class-target = " file://wrong-path-fix.patch" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ diff --git a/poky/meta/recipes-extended/hdparm/hdparm_9.53.bb b/poky/meta/recipes-extended/hdparm/hdparm_9.56.bb index 4c3ec5c48..17932ad22 100644 --- a/poky/meta/recipes-extended/hdparm/hdparm_9.53.bb +++ b/poky/meta/recipes-extended/hdparm/hdparm_9.56.bb @@ -25,8 +25,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/${BP}.tar.gz \ file://wiper.sh-fix-stat-path.patch \ " -SRC_URI[md5sum] = "1e54b52e0c8cb79389d4d47eacba411d" -SRC_URI[sha256sum] = "2673f591df6916c6a1faec07069a7eb1cb8ee307615a615d808192fb0c0265e5" +SRC_URI[md5sum] = "7900608e32834f65d2654fdb696e71a0" +SRC_URI[sha256sum] = "6ff9ed695f1017396eec4101f990f114b7b0e0a04c5aa6369c0394053d16e4da" EXTRA_OEMAKE = 'STRIP="echo" LDFLAGS="${LDFLAGS}"' 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 38a83d2b3..e00824f76 100644 --- a/poky/meta/recipes-extended/iptables/iptables_1.6.2.bb +++ b/poky/meta/recipes-extended/iptables/iptables_1.6.2.bb @@ -7,17 +7,6 @@ LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263\ file://iptables/iptables.c;beginline=13;endline=25;md5=c5cffd09974558cf27d0f763df2a12dc" -RRECOMMENDS_${PN} = "kernel-module-x-tables \ - kernel-module-ip-tables \ - kernel-module-iptable-filter \ - kernel-module-iptable-nat \ - kernel-module-nf-defrag-ipv4 \ - kernel-module-nf-conntrack \ - kernel-module-nf-conntrack-ipv4 \ - kernel-module-nf-nat \ - kernel-module-ipt-masquerade" -FILES_${PN} =+ "${libdir}/xtables/ ${datadir}/xtables" - SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \ file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \ file://0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch \ @@ -28,8 +17,8 @@ SRC_URI[sha256sum] = "55d02dfa46263343a401f297d44190f2a3e5113c8933946f094ed40237 inherit autotools pkgconfig -EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR} \ - " +EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR}" + PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," @@ -45,3 +34,31 @@ do_configure_prepend() { # Keep ax_check_linker_flags.m4 which belongs to autoconf-archive. rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 } + +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='') + if modules: + metapkg = d.getVar('PN') + '-modules' + d.appendVar('RDEPENDS_' + metapkg, ' ' + ' '.join(modules)) +} + +FILES_${PN} += "${datadir}/xtables" + +ALLOW_EMPTY_${PN}-modules = "1" + +RDEPENDS_${PN} = "${PN}-module-xt-standard" +RRECOMMENDS_${PN} = " \ + ${PN}-modules \ + kernel-module-x-tables \ + kernel-module-ip-tables \ + kernel-module-iptable-filter \ + kernel-module-iptable-nat \ + kernel-module-nf-defrag-ipv4 \ + kernel-module-nf-conntrack \ + kernel-module-nf-conntrack-ipv4 \ + kernel-module-nf-nat \ + kernel-module-ipt-masquerade \ +" diff --git a/poky/meta/recipes-extended/iputils/files/0001-Fix-build-on-MUSL.patch b/poky/meta/recipes-extended/iputils/files/0001-Fix-build-on-MUSL.patch deleted file mode 100644 index ce8cfebbb..000000000 --- a/poky/meta/recipes-extended/iputils/files/0001-Fix-build-on-MUSL.patch +++ /dev/null @@ -1,95 +0,0 @@ -From c6c5966d9fae27bc2f0a34ab59b999555111bd2d Mon Sep 17 00:00:00 2001 -From: Aric Belsito <lluixhi@gmail.com> -Date: Sun, 29 Oct 2017 23:17:03 +0100 -Subject: [PATCH] Fix build on MUSL - -Add missing AI_IDN and NI_IDN declarations. - -Bug: https://bugs.gentoo.org/503914 - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - arping.c | 7 +++++++ - ping.h | 11 +++++++++++ - tracepath.c | 8 ++++++++ - traceroute6.c | 4 ++++ - 4 files changed, 30 insertions(+) - -diff --git a/arping.c b/arping.c -index 1a3f40b..531d29d 100644 ---- a/arping.c -+++ b/arping.c -@@ -45,6 +45,13 @@ struct sysfs_devattr_values; - #ifdef USE_IDN - #include <idna.h> - #include <locale.h> -+ -+#ifndef AI_IDN -+#define AI_IDN 0x0040 -+#endif -+#ifndef AI_CANONIDN -+#define AI_CANONIDN 0x0080 -+#endif - #endif - - #include "SNAPSHOT.h" -diff --git a/ping.h b/ping.h -index 749f3ff..227315f 100644 ---- a/ping.h -+++ b/ping.h -@@ -38,6 +38,17 @@ - #include <locale.h> - #include <idna.h> - #include <stringprep.h> -+ -+#ifndef AI_IDN -+#define AI_IDN 0x0040 -+#endif -+#ifndef AI_CANONIDN -+#define AI_CANONIDN 0x0080 -+#endif -+#ifndef NI_IDN -+#define NI_IDN 32 -+#endif -+ - #define getaddrinfo_flags (AI_CANONNAME | AI_IDN | AI_CANONIDN) - #define getnameinfo_flags NI_IDN - #else -diff --git a/tracepath.c b/tracepath.c -index 74a829d..dcec5b9 100644 ---- a/tracepath.c -+++ b/tracepath.c -@@ -30,6 +30,14 @@ - #ifdef USE_IDN - #include <idna.h> - #include <locale.h> -+ -+#ifndef AI_IDN -+#define AI_IDN 0x0040 -+#endif -+#ifndef NI_IDN -+#define NI_IDN 32 -+#endif -+ - #define getnameinfo_flags NI_IDN - #else - #define getnameinfo_flags 0 -diff --git a/traceroute6.c b/traceroute6.c -index 48fc5c5..8d1eebf 100644 ---- a/traceroute6.c -+++ b/traceroute6.c -@@ -251,6 +251,10 @@ - #include <idna.h> - #include <locale.h> - -+#ifndef NI_IDN -+#define NI_IDN 32 -+#endif -+ - #define getnameinfo_flags NI_IDN - #else - #define getnameinfo_flags 0 --- -2.15.1 - diff --git a/poky/meta/recipes-extended/iputils/iputils/ai_canonidn.patch b/poky/meta/recipes-extended/iputils/iputils/ai_canonidn.patch new file mode 100644 index 000000000..cd91267b7 --- /dev/null +++ b/poky/meta/recipes-extended/iputils/iputils/ai_canonidn.patch @@ -0,0 +1,58 @@ +From 714e2b458c151c5bdfe93647445cd00dd8e36fff Mon Sep 17 00:00:00 2001 +From: Petr Vorel <petr.vorel@gmail.com> +Date: Sat, 21 Jul 2018 17:46:14 +0200 +Subject: [PATCH] ping: Fix AI_CANONIDN usage on some systems + +Upstream-Status: Backport +Signed-off-by: Ross Burton <ross.burton@intel.com> + +Commit 99f67db used AI_CANONIDN in a way, which broke compilation on +systems where AI_CANONIDN is not defined in netdb.h (e.g. glibc < 2.3.4, +alternative libcs that don't support IDN: e.g. current musl 1.1.19 and +uClibc-ng 1.0.30) when not using the system libidn2. + +Fixes: 99f67db ping: Fix ping name encoded using ACE on C locale + +Reported-by: Nicholas Fish +Signed-off-by: Petr Vorel <petr.vorel@gmail.com> + +--- + ping.c | 2 +- + ping.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ping.c b/ping.c +index 733477f..b241815 100644 +--- a/ping.c ++++ b/ping.c +@@ -207,9 +207,9 @@ main(int argc, char **argv) + + #ifdef USE_IDN + setlocale(LC_ALL, ""); +-#endif + if (!strcmp(setlocale(LC_ALL, NULL), "C")) + hints.ai_flags &= ~ AI_CANONIDN; ++#endif + + /* Support being called using `ping4` or `ping6` symlinks */ + if (argv[0][strlen(argv[0])-1] == '4') +diff --git a/ping.h b/ping.h +index 3e09685..8a0c4ef 100644 +--- a/ping.h ++++ b/ping.h +@@ -28,7 +28,6 @@ + #include <netinet/icmp6.h> + #include <linux/filter.h> + #include <resolv.h> +-#include <locale.h> + + #ifdef CAPABILITIES + #include <sys/prctl.h> +@@ -36,6 +35,7 @@ + #endif + + #ifdef USE_IDN ++#include <locale.h> + #include <idn2.h> + #define getaddrinfo_flags (AI_CANONNAME | AI_IDN | AI_CANONIDN) + #define getnameinfo_flags NI_IDN diff --git a/poky/meta/recipes-extended/iputils/iputils/install.patch b/poky/meta/recipes-extended/iputils/iputils/install.patch new file mode 100644 index 000000000..abfefd7a5 --- /dev/null +++ b/poky/meta/recipes-extended/iputils/iputils/install.patch @@ -0,0 +1,26 @@ +From 5c8c3b04d73304679340f893636e87691992053b Mon Sep 17 00:00:00 2001 +From: Ross Burton <ross@burtonini.com> +Date: Mon, 23 Jul 2018 14:21:03 +0100 +Subject: [PATCH] Add install + +Add a simple install rule so that we always install the binaries that were built. + +Upstream-Status: Inappropriate +Signed-off-by: Ross Burton <ross.burton@intel.com> + +--- + Makefile | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/Makefile b/Makefile +index 17fc5c9..e0c2784 100644 +--- a/Makefile ++++ b/Makefile +@@ -231,3 +231,7 @@ rpm: + @$(RPMBUILD) -ta --define 'current yes' $(RPMTMP)/iputils.tar.bz2 + @rm -f $(RPMTMP)/iputils.tar.bz2 + ++install: ++ for t in $(TARGETS); do \ ++ install -D $$t $(DESTDIR)$(bindir)/$$t; \ ++ done diff --git a/poky/meta/recipes-extended/iputils/iputils_s20161105.bb b/poky/meta/recipes-extended/iputils/iputils_s20161105.bb deleted file mode 100644 index 0125739b0..000000000 --- a/poky/meta/recipes-extended/iputils/iputils_s20161105.bb +++ /dev/null @@ -1,62 +0,0 @@ -SUMMARY = "Network monitoring tools" -DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \ -tracepath, tracepath6, ping, ping6 and arping." -HOMEPAGE = "https://github.com/iputils/iputils" -SECTION = "console/network" - -LICENSE = "BSD & GPLv2+" - -LIC_FILES_CHKSUM = "file://ping.c;beginline=1;endline=35;md5=f9ceb201733e9a6cf8f00766dd278d82 \ - file://tracepath.c;beginline=1;endline=10;md5=0ecea2bf60bff2f3d840096d87647f3d \ - file://arping.c;beginline=1;endline=11;md5=fe84301b5c2655c950f8b92a057fafa6 \ - file://tftpd.c;beginline=1;endline=32;md5=28834bf8a91a5b8a92755dbee709ef96 " - -DEPENDS = "gnutls libcap libgcrypt" - -SRC_URI = "git://github.com/iputils/iputils \ - file://0001-Fix-build-on-MUSL.patch \ - " -S = "${WORKDIR}/git" -SRCREV = "bffc0e957b98d626ab4cea218c89251201425442" - -UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>s\d+)" - -EXTRA_OEMAKE = "-e MAKEFLAGS=" - -PACKAGECONFIG ?= "" -PACKAGECONFIG[libidn] = "USE_IDN=yes,USE_IDN=no,libidn" - -do_compile () { - oe_runmake 'CC=${CC} -D_GNU_SOURCE' VPATH="${STAGING_LIBDIR}:${STAGING_DIR_HOST}/${base_libdir}" ${PACKAGECONFIG_CONFARGS} all -} - -do_install () { - install -m 0755 -d ${D}${base_bindir} - # SUID root programs - install -m 4555 ping ${D}${base_bindir}/ping - install -m 4555 traceroute6 ${D}${base_bindir}/ - install -m 4555 clockdiff ${D}${base_bindir}/ - # Other programgs - for i in arping tracepath; do - install -m 0755 $i ${D}${base_bindir}/ - done -} - -inherit update-alternatives - -ALTERNATIVE_PRIORITY = "100" - -ALTERNATIVE_${PN}-ping = "ping" -ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping" - -PACKAGES += "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-traceroute6 ${PN}-clockdiff" - -ALLOW_EMPTY_${PN} = "1" -RDEPENDS_${PN} += "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-traceroute6 ${PN}-clockdiff" - -FILES_${PN} = "" -FILES_${PN}-ping = "${base_bindir}/ping.${BPN}" -FILES_${PN}-arping = "${base_bindir}/arping" -FILES_${PN}-tracepath = "${base_bindir}/tracepath" -FILES_${PN}-traceroute6 = "${base_bindir}/traceroute6" -FILES_${PN}-clockdiff = "${base_bindir}/clockdiff" diff --git a/poky/meta/recipes-extended/iputils/iputils_s20180629.bb b/poky/meta/recipes-extended/iputils/iputils_s20180629.bb new file mode 100644 index 000000000..eff44be1b --- /dev/null +++ b/poky/meta/recipes-extended/iputils/iputils_s20180629.bb @@ -0,0 +1,61 @@ +SUMMARY = "Network monitoring tools" +DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \ +tracepath, tracepath6, ping, ping6 and arping." +HOMEPAGE = "https://github.com/iputils/iputils" +SECTION = "console/network" + +LICENSE = "BSD & GPLv2+" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=b792e38abdc59f766a3153908f23e766 \ + file://LICENSE.BSD3;md5=0f00d99239d922ffd13cabef83b33444 \ + file://LICENSE.GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +DEPENDS = "gnutls libcap libgcrypt" + +SRC_URI = "git://github.com/iputils/iputils \ + file://ai_canonidn.patch \ + file://install.patch" +SRCREV = "f6aac8dbe3f8c45c53424854a3312bdd8cdd58d3" + +S = "${WORKDIR}/git" + +UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>s\d+)" + +EXTRA_OEMAKE = "-e MAKEFLAGS=" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[libidn] = "USE_IDN=yes,USE_IDN=no,libidn2" + +do_compile () { + oe_runmake 'CC=${CC} -D_GNU_SOURCE' VPATH="${STAGING_LIBDIR}:${STAGING_DIR_HOST}/${base_libdir}" ${PACKAGECONFIG_CONFARGS} all +} + +do_install() { + oe_runmake DESTDIR=${D} bindir=${base_bindir} install + for b in ping traceroute6 clockdiff; do + chmod u+s ${D}${base_bindir}/$b + done +} + +inherit update-alternatives + +ALTERNATIVE_PRIORITY = "100" + +ALTERNATIVE_${PN}-ping = "ping" +ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping" + +SPLITPKGS = "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-traceroute6 ${PN}-clockdiff ${PN}-tftpd ${PN}-rarpd ${PN}-rdisc" +PACKAGES += "${SPLITPKGS}" + +ALLOW_EMPTY_${PN} = "1" +RDEPENDS_${PN} += "${SPLITPKGS}" + +FILES_${PN} = "" +FILES_${PN}-ping = "${base_bindir}/ping.${BPN}" +FILES_${PN}-arping = "${base_bindir}/arping" +FILES_${PN}-tracepath = "${base_bindir}/tracepath" +FILES_${PN}-traceroute6 = "${base_bindir}/traceroute6" +FILES_${PN}-clockdiff = "${base_bindir}/clockdiff" +FILES_${PN}-tftpd = "${base_bindir}/tftpd" +FILES_${PN}-rarpd = "${base_bindir}/rarpd" +FILES_${PN}-rdisc = "${base_bindir}/rdisc" diff --git a/poky/meta/recipes-extended/less/less_529.bb b/poky/meta/recipes-extended/less/less_530.bb index c86f75483..c07b12174 100644 --- a/poky/meta/recipes-extended/less/less_529.bb +++ b/poky/meta/recipes-extended/less/less_530.bb @@ -27,8 +27,8 @@ DEPENDS = "ncurses" SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz \ " -SRC_URI[md5sum] = "32018b53a1f7319ab54349baf80e6aa8" -SRC_URI[sha256sum] = "dba42cd4c38174b7bd0d426d8a39df2be6bcc1ec18946a4642713290f6bf9a0b" +SRC_URI[md5sum] = "6a39bccf420c946b0fd7ffc64961315b" +SRC_URI[sha256sum] = "503f91ab0af4846f34f0444ab71c4b286123f0044a4964f1ae781486c617f2e2" UPSTREAM_CHECK_URI = "http://www.greenwoodsoftware.com/less/download.html" diff --git a/poky/meta/recipes-extended/libaio/libaio/00_arches.patch b/poky/meta/recipes-extended/libaio/libaio/00_arches.patch index 9d6447d98..bec189f87 100644 --- a/poky/meta/recipes-extended/libaio/libaio/00_arches.patch +++ b/poky/meta/recipes-extended/libaio/libaio/00_arches.patch @@ -1,11 +1,27 @@ +From ceba1e03e5b57cdae0b3b2d2c9afebc085c986d8 Mon Sep 17 00:00:00 2001 +From: Qing He <qing.he@intel.com> +Date: Fri, 27 Aug 2010 10:15:31 +0800 +Subject: [PATCH] libaio: add new recipe + Upstream-Status: Inappropriate [embedded specific] from openembedded, added by Qing He <qing.he@intel.com> -Index: libaio-0.3.110/src/syscall-m68k.h -=================================================================== +--- + src/syscall-m68k.h | 78 ++++++++++++++++++ + src/syscall-mips.h | 223 +++++++++++++++++++++++++++++++++++++++++++++++++++ + src/syscall-parisc.h | 146 +++++++++++++++++++++++++++++++++ + src/syscall.h | 6 ++ + 4 files changed, 453 insertions(+) + create mode 100644 src/syscall-m68k.h + create mode 100644 src/syscall-mips.h + create mode 100644 src/syscall-parisc.h + +diff --git a/src/syscall-m68k.h b/src/syscall-m68k.h +new file mode 100644 +index 0000000..f440412 --- /dev/null -+++ libaio-0.3.110/src/syscall-m68k.h ++++ b/src/syscall-m68k.h @@ -0,0 +1,78 @@ +#define __NR_io_setup 241 +#define __NR_io_destroy 242 @@ -85,27 +101,11 @@ Index: libaio-0.3.110/src/syscall-m68k.h +return (type) __res; \ +} + -Index: libaio-0.3.110/src/syscall.h -=================================================================== ---- libaio-0.3.110.orig/src/syscall.h -+++ libaio-0.3.110/src/syscall.h -@@ -28,6 +28,12 @@ - #include "syscall-sparc.h" - #elif defined(__aarch64__) - #include "syscall-arm64.h" -+#elif defined(__m68k__) -+#include "syscall-m68k.h" -+#elif defined(__hppa__) -+#include "syscall-parisc.h" -+#elif defined(__mips__) -+#include "syscall-mips.h" - #else - #warning "using generic syscall method" - #include "syscall-generic.h" -Index: libaio-0.3.110/src/syscall-mips.h -=================================================================== +diff --git a/src/syscall-mips.h b/src/syscall-mips.h +new file mode 100644 +index 0000000..4142499 --- /dev/null -+++ libaio-0.3.110/src/syscall-mips.h ++++ b/src/syscall-mips.h @@ -0,0 +1,223 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public @@ -330,10 +330,11 @@ Index: libaio-0.3.110/src/syscall-mips.h + +#endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */ + -Index: libaio-0.3.110/src/syscall-parisc.h -=================================================================== +diff --git a/src/syscall-parisc.h b/src/syscall-parisc.h +new file mode 100644 +index 0000000..ff61746 --- /dev/null -+++ libaio-0.3.110/src/syscall-parisc.h ++++ b/src/syscall-parisc.h @@ -0,0 +1,146 @@ +/* + * Linux system call numbers. @@ -481,127 +482,20 @@ Index: libaio-0.3.110/src/syscall-parisc.h + return K_INLINE_SYSCALL(sname, 5, arg1, arg2, arg3, arg4, arg5); \ +} + -Index: libaio-0.3.110/src/syscall-arm.h -=================================================================== ---- libaio-0.3.110.orig/src/syscall-arm.h -+++ libaio-0.3.110/src/syscall-arm.h -@@ -114,3 +114,119 @@ type fname(type1 arg1, type2 arg2, type3 - return (type) __res_r0; \ - } - -+/* -+ * linux/include/asm-arm/unistd.h -+ * -+ * Copyright (C) 2001-2005 Russell King -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * Please forward _all_ changes to this file to rmk@arm.linux.org.uk, -+ * no matter what the change is. Thanks! -+ */ -+ -+#define __NR_OABI_SYSCALL_BASE 0x900000 -+ -+#if defined(__thumb__) || defined(__ARM_EABI__) -+#define __NR_SYSCALL_BASE 0 -+#else -+#define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE -+#endif -+ -+#define __NR_io_setup (__NR_SYSCALL_BASE+243) -+#define __NR_io_destroy (__NR_SYSCALL_BASE+244) -+#define __NR_io_getevents (__NR_SYSCALL_BASE+245) -+#define __NR_io_submit (__NR_SYSCALL_BASE+246) -+#define __NR_io_cancel (__NR_SYSCALL_BASE+247) -+ -+#define __sys2(x) #x -+#define __sys1(x) __sys2(x) -+ -+#if defined(__thumb__) || defined(__ARM_EABI__) -+#define __SYS_REG(name) register long __sysreg __asm__("r7") = __NR_##name; -+#define __SYS_REG_LIST(regs...) "r" (__sysreg) , ##regs -+#define __syscall(name) "swi\t0" -+#else -+#define __SYS_REG(name) -+#define __SYS_REG_LIST(regs...) regs -+#define __syscall(name) "swi\t" __sys1(__NR_##name) "" -+#endif -+ -+#define io_syscall1(type,fname,sname,type1,arg1) \ -+type fname(type1 arg1) { \ -+ __SYS_REG(sname) \ -+ register long __r0 __asm__("r0") = (long)arg1; \ -+ register long __res_r0 __asm__("r0"); \ -+ __asm__ __volatile__ ( \ -+ __syscall(sname) \ -+ : "=r" (__res_r0) \ -+ : __SYS_REG_LIST( "0" (__r0) ) \ -+ : "memory" ); \ -+ return (type) __res_r0; \ -+} -+ -+#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ -+type fname(type1 arg1,type2 arg2) { \ -+ __SYS_REG(sname) \ -+ register long __r0 __asm__("r0") = (long)arg1; \ -+ register long __r1 __asm__("r1") = (long)arg2; \ -+ register long __res_r0 __asm__("r0"); \ -+ __asm__ __volatile__ ( \ -+ __syscall(sname) \ -+ : "=r" (__res_r0) \ -+ : __SYS_REG_LIST( "0" (__r0), "r" (__r1) ) \ -+ : "memory" ); \ -+ return (type) __res_r0; \ -+} -+ -+#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ -+type fname(type1 arg1,type2 arg2,type3 arg3) { \ -+ __SYS_REG(sname) \ -+ register long __r0 __asm__("r0") = (long)arg1; \ -+ register long __r1 __asm__("r1") = (long)arg2; \ -+ register long __r2 __asm__("r2") = (long)arg3; \ -+ register long __res_r0 __asm__("r0"); \ -+ __asm__ __volatile__ ( \ -+ __syscall(sname) \ -+ : "=r" (__res_r0) \ -+ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2) ) \ -+ : "memory" ); \ -+ return (type) __res_r0; \ -+} -+ -+#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4)\ -+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \ -+ __SYS_REG(sname) \ -+ register long __r0 __asm__("r0") = (long)arg1; \ -+ register long __r1 __asm__("r1") = (long)arg2; \ -+ register long __r2 __asm__("r2") = (long)arg3; \ -+ register long __r3 __asm__("r3") = (long)arg4; \ -+ register long __res_r0 __asm__("r0"); \ -+ __asm__ __volatile__ ( \ -+ __syscall(sname) \ -+ : "=r" (__res_r0) \ -+ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), "r" (__r3) ) \ -+ : "memory" ); \ -+ return (type) __res_r0; \ -+} -+ -+#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ -+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) {\ -+ __SYS_REG(sname) \ -+ register long __r0 __asm__("r0") = (long)arg1; \ -+ register long __r1 __asm__("r1") = (long)arg2; \ -+ register long __r2 __asm__("r2") = (long)arg3; \ -+ register long __r3 __asm__("r3") = (long)arg4; \ -+ register long __r4 __asm__("r4") = (long)arg5; \ -+ register long __res_r0 __asm__("r0"); \ -+ __asm__ __volatile__ ( \ -+ __syscall(sname) \ -+ : "=r" (__res_r0) \ -+ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), \ -+ "r" (__r3), "r" (__r4) ) \ -+ : "memory" ); \ -+ return (type) __res_r0; \ -+} -+ +diff --git a/src/syscall.h b/src/syscall.h +index 9b9e9c1..9ecd3b4 100644 +--- a/src/syscall.h ++++ b/src/syscall.h +@@ -29,6 +29,12 @@ + #include "syscall-sparc.h" + #elif defined(__aarch64__) || defined(__riscv) + #include "syscall-generic.h" ++#elif defined(__m68k__) ++#include "syscall-m68k.h" ++#elif defined(__hppa__) ++#include "syscall-parisc.h" ++#elif defined(__mips__) ++#include "syscall-mips.h" + #else + #warning "using system call numbers from sys/syscall.h" + #endif diff --git a/poky/meta/recipes-extended/libaio/libaio/generic-arch-dectection-for-padding-defines.patch b/poky/meta/recipes-extended/libaio/libaio/generic-arch-dectection-for-padding-defines.patch deleted file mode 100644 index bba7e554a..000000000 --- a/poky/meta/recipes-extended/libaio/libaio/generic-arch-dectection-for-padding-defines.patch +++ /dev/null @@ -1,65 +0,0 @@ -From: Nathan Rossi <nathan.rossi@xilinx.com> -Date: Tue, 27 Jan 2015 14:59:35 +1000 -Subject: [PATCH] Generic arch dectection for padding defines - -When available use the GNU C defines for endian and bitwidth to -determine the padding required. This reduces the need to define the -padding selection for every architecture. - -Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> -Signed-off-by: Jeff Moyer <jmoyer@redhat.com> -Upstream-Status: Backport ---- - src/libaio.h | 16 ++++++++++++---- - 1 file changed, 12 insertions(+), 4 deletions(-) - -diff --git a/src/libaio.h b/src/libaio.h -index 1223146..4a4e0f5 100644 ---- a/src/libaio.h -+++ b/src/libaio.h -@@ -52,14 +52,18 @@ typedef enum io_iocb_cmd { - /* little endian, 32 bits */ - #if defined(__i386__) || (defined(__arm__) && !defined(__ARMEB__)) || \ - defined(__sh__) || defined(__bfin__) || defined(__MIPSEL__) || \ -- defined(__cris__) -+ defined(__cris__) || \ -+ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \ -+ __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG__ == 4) - #define PADDED(x, y) x; unsigned y - #define PADDEDptr(x, y) x; unsigned y - #define PADDEDul(x, y) unsigned long x; unsigned y - - /* little endian, 64 bits */ - #elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) || \ -- (defined(__aarch64__) && defined(__AARCH64EL__)) -+ (defined(__aarch64__) && defined(__AARCH64EL__)) || \ -+ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \ -+ __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG__ == 8) - #define PADDED(x, y) x, y - #define PADDEDptr(x, y) x - #define PADDEDul(x, y) unsigned long x -@@ -67,7 +71,9 @@ typedef enum io_iocb_cmd { - /* big endian, 64 bits */ - #elif defined(__powerpc64__) || defined(__s390x__) || \ - (defined(__sparc__) && defined(__arch64__)) || \ -- (defined(__aarch64__) && defined(__AARCH64EB__)) -+ (defined(__aarch64__) && defined(__AARCH64EB__)) || \ -+ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \ -+ __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ && __SIZEOF_LONG__ == 8) - #define PADDED(x, y) unsigned y; x - #define PADDEDptr(x,y) x - #define PADDEDul(x, y) unsigned long x -@@ -76,7 +82,9 @@ typedef enum io_iocb_cmd { - #elif defined(__PPC__) || defined(__s390__) || \ - (defined(__arm__) && defined(__ARMEB__)) || \ - defined(__sparc__) || defined(__MIPSEB__) || defined(__m68k__) || \ -- defined(__hppa__) || defined(__frv__) || defined(__avr32__) -+ defined(__hppa__) || defined(__frv__) || defined(__avr32__) || \ -+ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \ -+ __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ && __SIZEOF_LONG__ == 4) - #define PADDED(x, y) unsigned y; x - #define PADDEDptr(x, y) unsigned y; x - #define PADDEDul(x, y) unsigned y; unsigned long x --- -2.1.1 - diff --git a/poky/meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch b/poky/meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch deleted file mode 100644 index dc4ba505b..000000000 --- a/poky/meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch +++ /dev/null @@ -1,61 +0,0 @@ -Upstream-Status: Pending - -Properly load arguments 5 an 6 for x86-64 syscall -Use asm ("r10") and asm ("r8") to load arguments 5 an 6 for x86-64 -syscall so that it works with both x32 and x86-64. - -Received this patch from H.J. Lu <hjl.tools@gmail.com> - -Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> -2011/12/02 - ---- libaio-0.3.109/src/syscall-x86_64.h.x32 2009-10-09 11:17:02.000000000 -0700 -+++ libaio-0.3.109/src/syscall-x86_64.h 2011-12-02 09:09:07.537603224 -0800 -@@ -1,8 +1,18 @@ -+#ifndef __NR_io_setup - #define __NR_io_setup 206 -+#endif -+#ifndef __NR_io_destroy - #define __NR_io_destroy 207 -+#endif -+#ifndef __NR_io_getevents - #define __NR_io_getevents 208 -+#endif -+#ifndef __NR_io_submit - #define __NR_io_submit 209 -+#endif -+#ifndef __NR_io_cancel - #define __NR_io_cancel 210 -+#endif - - #define __syscall_clobber "r11","rcx","memory" - #define __syscall "syscall" -@@ -42,10 +52,11 @@ return __res; \ - type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ - { \ - long __res; \ --__asm__ volatile ("movq %5,%%r10 ;" __syscall \ -+register long __a4 asm ("r10") = (long) arg4; \ -+__asm__ volatile (__syscall \ - : "=a" (__res) \ - : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)), \ -- "d" ((long)(arg3)),"g" ((long)(arg4)) : __syscall_clobber,"r10" ); \ -+ "d" ((long)(arg3)),"r" (__a4)); \ - return __res; \ - } - -@@ -54,10 +65,11 @@ return __res; \ - type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ - { \ - long __res; \ --__asm__ volatile ("movq %5,%%r10 ; movq %6,%%r8 ; " __syscall \ -+register long __a4 asm ("r10") = (long) arg4; \ -+register long __a5 asm ("r8") = (long) arg5; \ -+__asm__ volatile ( __syscall \ - : "=a" (__res) \ - : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)), \ -- "d" ((long)(arg3)),"g" ((long)(arg4)),"g" ((long)(arg5)) : \ -- __syscall_clobber,"r8","r10" ); \ -+ "d" ((long)(arg3)),"r" (__a4),"r" (__a5)); \ - return __res; \ - } diff --git a/poky/meta/recipes-extended/libaio/libaio_0.3.110.bb b/poky/meta/recipes-extended/libaio/libaio_0.3.111.bb index 75975d4ab..04b50b61e 100644 --- a/poky/meta/recipes-extended/libaio/libaio_0.3.110.bb +++ b/poky/meta/recipes-extended/libaio/libaio_0.3.111.bb @@ -5,22 +5,19 @@ HOMEPAGE = "http://lse.sourceforge.net/io/aio.html" LICENSE = "LGPLv2.1+" LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499" -SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/liba/${BPN}/${BPN}_${PV}.orig.tar.gz \ - file://generic-arch-dectection-for-padding-defines.patch \ +SRC_URI = "git://pagure.io/libaio.git;protocol=https \ file://00_arches.patch \ file://destdir.patch \ - file://libaio_fix_for_x32.patch \ file://libaio_fix_for_mips_syscalls.patch \ file://system-linkage.patch \ " - -SRC_URI[md5sum] = "2a35602e43778383e2f4907a4ca39ab8" -SRC_URI[sha256sum] = "e019028e631725729376250e32b473012f7cb68e1f7275bfc1bbcdd0f8745f7e" - -UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/liba/libaio/" +SRCREV = "f66be22ab0a59a39858900ab72a8c6a6e8b0b7ec" +S = "${WORKDIR}/git" EXTRA_OEMAKE =+ "prefix=${prefix} includedir=${includedir} libdir=${libdir}" do_install () { oe_runmake install DESTDIR=${D} } + +BBCLASSEXTEND = "nativesdk" diff --git a/poky/meta/recipes-extended/libarchive/libarchive/CVE-2017-14166.patch b/poky/meta/recipes-extended/libarchive/libarchive/CVE-2017-14166.patch deleted file mode 100644 index e85fec40a..000000000 --- a/poky/meta/recipes-extended/libarchive/libarchive/CVE-2017-14166.patch +++ /dev/null @@ -1,37 +0,0 @@ -libarchive-3.3.2: Fix CVE-2017-14166 - -[No upstream tracking] -- https://github.com/libarchive/libarchive/pull/935 - -archive_read_support_format_xar: heap-based buffer overflow in xml_data - -Upstream-Status: Backport [https://github.com/libarchive/libarchive/commit/fa7438a0ff4033e4741c807394a9af6207940d71] -CVE: CVE-2017-14166 -Bug: 935 -Signed-off-by: Andrej Valek <andrej.valek@siemens.com> - -diff --git a/libarchive/archive_read_support_format_xar.c b/libarchive/archive_read_support_format_xar.c -index 7a22beb..93eeacc 100644 ---- a/libarchive/archive_read_support_format_xar.c -+++ b/libarchive/archive_read_support_format_xar.c -@@ -1040,6 +1040,9 @@ atol10(const char *p, size_t char_cnt) - uint64_t l; - int digit; - -+ if (char_cnt == 0) -+ return (0); -+ - l = 0; - digit = *p - '0'; - while (digit >= 0 && digit < 10 && char_cnt-- > 0) { -@@ -1054,7 +1057,10 @@ atol8(const char *p, size_t char_cnt) - { - int64_t l; - int digit; -- -+ -+ if (char_cnt == 0) -+ return (0); -+ - l = 0; - while (char_cnt-- > 0) { - if (*p >= '0' && *p <= '7') diff --git a/poky/meta/recipes-extended/libarchive/libarchive/CVE-2017-14501.patch b/poky/meta/recipes-extended/libarchive/libarchive/CVE-2017-14501.patch deleted file mode 100644 index 1038102e6..000000000 --- a/poky/meta/recipes-extended/libarchive/libarchive/CVE-2017-14501.patch +++ /dev/null @@ -1,79 +0,0 @@ -From f9569c086ff29259c73790db9cbf39fe8fb9d862 Mon Sep 17 00:00:00 2001 -From: John Starks <jostarks@microsoft.com> -Date: Wed, 25 Jul 2018 12:16:34 -0700 -Subject: [PATCH] iso9660: validate directory record length - -CVE: CVE-2017-14501 -Upstream-Status: Backport [https://github.com/mmatuska/libarchive/commit/13e87dcd9c37b533127cceb9f3e1e5a38d95e784] - -Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> ---- - libarchive/archive_read_support_format_iso9660.c | 17 +++++++++++------ - 1 file changed, 11 insertions(+), 6 deletions(-) - -diff --git a/libarchive/archive_read_support_format_iso9660.c b/libarchive/archive_read_support_format_iso9660.c -index f01d37bf..089bb723 100644 ---- a/libarchive/archive_read_support_format_iso9660.c -+++ b/libarchive/archive_read_support_format_iso9660.c -@@ -409,7 +409,8 @@ static int next_entry_seek(struct archive_read *, struct iso9660 *, - struct file_info **); - static struct file_info * - parse_file_info(struct archive_read *a, -- struct file_info *parent, const unsigned char *isodirrec); -+ struct file_info *parent, const unsigned char *isodirrec, -+ size_t reclen); - static int parse_rockridge(struct archive_read *a, - struct file_info *file, const unsigned char *start, - const unsigned char *end); -@@ -1022,7 +1023,7 @@ read_children(struct archive_read *a, struct file_info *parent) - if (*(p + DR_name_len_offset) == 1 - && *(p + DR_name_offset) == '\001') - continue; -- child = parse_file_info(a, parent, p); -+ child = parse_file_info(a, parent, p, b - p); - if (child == NULL) { - __archive_read_consume(a, skip_size); - return (ARCHIVE_FATAL); -@@ -1112,7 +1113,7 @@ choose_volume(struct archive_read *a, struct iso9660 *iso9660) - */ - seenJoliet = iso9660->seenJoliet;/* Save flag. */ - iso9660->seenJoliet = 0; -- file = parse_file_info(a, NULL, block); -+ file = parse_file_info(a, NULL, block, vd->size); - if (file == NULL) - return (ARCHIVE_FATAL); - iso9660->seenJoliet = seenJoliet; -@@ -1144,7 +1145,7 @@ choose_volume(struct archive_read *a, struct iso9660 *iso9660) - return (ARCHIVE_FATAL); - } - iso9660->seenJoliet = 0; -- file = parse_file_info(a, NULL, block); -+ file = parse_file_info(a, NULL, block, vd->size); - if (file == NULL) - return (ARCHIVE_FATAL); - iso9660->seenJoliet = seenJoliet; -@@ -1749,7 +1750,7 @@ archive_read_format_iso9660_cleanup(struct archive_read *a) - */ - static struct file_info * - parse_file_info(struct archive_read *a, struct file_info *parent, -- const unsigned char *isodirrec) -+ const unsigned char *isodirrec, size_t reclen) - { - struct iso9660 *iso9660; - struct file_info *file, *filep; -@@ -1763,7 +1764,11 @@ parse_file_info(struct archive_read *a, struct file_info *parent, - - iso9660 = (struct iso9660 *)(a->format->data); - -- dr_len = (size_t)isodirrec[DR_length_offset]; -+ if (reclen == 0 || reclen < (dr_len = (size_t)isodirrec[DR_length_offset])) { -+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, -+ "Invalid directory record length"); -+ return (NULL); -+ } - name_len = (size_t)isodirrec[DR_name_len_offset]; - location = archive_le32dec(isodirrec + DR_extent_offset); - fsize = toi(isodirrec + DR_size_offset, DR_size_size); --- -2.13.3 - diff --git a/poky/meta/recipes-extended/libarchive/libarchive/CVE-2017-14502.patch b/poky/meta/recipes-extended/libarchive/libarchive/CVE-2017-14502.patch deleted file mode 100644 index 72e154643..000000000 --- a/poky/meta/recipes-extended/libarchive/libarchive/CVE-2017-14502.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 5562545b5562f6d12a4ef991fae158bf4ccf92b6 Mon Sep 17 00:00:00 2001 -From: Joerg Sonnenberger <joerg@bec.de> -Date: Sat, 9 Sep 2017 17:47:32 +0200 -Subject: [PATCH] Avoid a read off-by-one error for UTF16 names in RAR - archives. - -Reported-By: OSS-Fuzz issue 573 - -CVE: CVE-2017-14502 - -Upstream-Status: Backport - -Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> ---- - libarchive/archive_read_support_format_rar.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c -index cbb14c3..751de69 100644 ---- a/libarchive/archive_read_support_format_rar.c -+++ b/libarchive/archive_read_support_format_rar.c -@@ -1496,7 +1496,11 @@ read_header(struct archive_read *a, struct archive_entry *entry, - return (ARCHIVE_FATAL); - } - filename[filename_size++] = '\0'; -- filename[filename_size++] = '\0'; -+ /* -+ * Do not increment filename_size here as the computations below -+ * add the space for the terminating NUL explicitly. -+ */ -+ filename[filename_size] = '\0'; - - /* Decoded unicode form is UTF-16BE, so we have to update a string - * conversion object for it. */ --- -1.9.1 - diff --git a/poky/meta/recipes-extended/libarchive/libarchive/CVE-2017-14503.patch b/poky/meta/recipes-extended/libarchive/libarchive/CVE-2017-14503.patch deleted file mode 100644 index 42fa68cae..000000000 --- a/poky/meta/recipes-extended/libarchive/libarchive/CVE-2017-14503.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 2c8c83b9731ff822fad6cc8c670ea5519c366a14 Mon Sep 17 00:00:00 2001 -From: Joerg Sonnenberger <joerg@bec.de> -Date: Thu, 19 Jul 2018 21:14:53 +0200 -Subject: [PATCH] Reject LHA archive entries with negative size. - -CVE: CVE-2017-14503 -Upstream-Status: Backport [https://github.com/libarchive/libarchive/commit/2c8c83b9731ff822fad6cc8c670ea5519c366a14] - -Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> ---- - libarchive/archive_read_support_format_lha.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/libarchive/archive_read_support_format_lha.c b/libarchive/archive_read_support_format_lha.c -index b8ef4ae1..95c99bb1 100644 ---- a/libarchive/archive_read_support_format_lha.c -+++ b/libarchive/archive_read_support_format_lha.c -@@ -701,6 +701,12 @@ archive_read_format_lha_read_header(struct archive_read *a, - * Prepare variables used to read a file content. - */ - lha->entry_bytes_remaining = lha->compsize; -+ if (lha->entry_bytes_remaining < 0) { -+ archive_set_error(&a->archive, -+ ARCHIVE_ERRNO_FILE_FORMAT, -+ "Invalid LHa entry size"); -+ return (ARCHIVE_FATAL); -+ } - lha->entry_offset = 0; - lha->entry_crc_calculated = 0; - --- -2.13.3 - diff --git a/poky/meta/recipes-extended/libarchive/libarchive/bug1066.patch b/poky/meta/recipes-extended/libarchive/libarchive/bug1066.patch new file mode 100644 index 000000000..0a662b57b --- /dev/null +++ b/poky/meta/recipes-extended/libarchive/libarchive/bug1066.patch @@ -0,0 +1,54 @@ +libarchive-3.3.3: Fix bug1066 + +[No upstream tracking] -- https://github.com/libarchive/libarchive/pull/1066 + +archive_write_set_format_*.c: fix out of bounds read on empty string () filename +for guntar, pax and v7tar + +There is an out of bounds read flaw in the archive_write_gnutar_header, +archive_write_pax_header and archive_write_v7tar_header functions which +could leds to cause a denial of service. + +Upstream-Status: Backport [https://github.com/libarchive/libarchive/commit/c246ec5d058a3f70a2d3fb765f92fe9db77b25df] +Bug: 1066 +Signed-off-by: Andrej Valek <andrej.valek@siemens.com> + +diff --git a/libarchive/archive_write_set_format_gnutar.c b/libarchive/archive_write_set_format_gnutar.c +index 2d858c9..1966c53 100644 +--- a/libarchive/archive_write_set_format_gnutar.c ++++ b/libarchive/archive_write_set_format_gnutar.c +@@ -339,7 +339,7 @@ archive_write_gnutar_header(struct archive_write *a, + * case getting WCS failed. On POSIX, this is a + * normal operation. + */ +- if (p != NULL && p[strlen(p) - 1] != '/') { ++ if (p != NULL && p[0] != '\0' && p[strlen(p) - 1] != '/') { + struct archive_string as; + + archive_string_init(&as); +diff --git a/libarchive/archive_write_set_format_pax.c b/libarchive/archive_write_set_format_pax.c +index 6a301ac..4cfa8ff 100644 +--- a/libarchive/archive_write_set_format_pax.c ++++ b/libarchive/archive_write_set_format_pax.c +@@ -660,7 +660,7 @@ archive_write_pax_header(struct archive_write *a, + * case getting WCS failed. On POSIX, this is a + * normal operation. + */ +- if (p != NULL && p[strlen(p) - 1] != '/') { ++ if (p != NULL && p[0] != '\0' && p[strlen(p) - 1] != '/') { + struct archive_string as; + + archive_string_init(&as); +diff --git a/libarchive/archive_write_set_format_v7tar.c b/libarchive/archive_write_set_format_v7tar.c +index 62b1522..53c0db0 100644 +--- a/libarchive/archive_write_set_format_v7tar.c ++++ b/libarchive/archive_write_set_format_v7tar.c +@@ -284,7 +284,7 @@ archive_write_v7tar_header(struct archive_write *a, struct archive_entry *entry) + * case getting WCS failed. On POSIX, this is a + * normal operation. + */ +- if (p != NULL && p[strlen(p) - 1] != '/') { ++ if (p != NULL && p[0] != '\0' && p[strlen(p) - 1] != '/') { + struct archive_string as; + + archive_string_init(&as); diff --git a/poky/meta/recipes-extended/libarchive/libarchive/bug929.patch b/poky/meta/recipes-extended/libarchive/libarchive/bug929.patch deleted file mode 100644 index 2f3254c8d..000000000 --- a/poky/meta/recipes-extended/libarchive/libarchive/bug929.patch +++ /dev/null @@ -1,38 +0,0 @@ -libarchive-3.3.2: Fix bug929 - -[No upstream tracking] -- https://github.com/libarchive/libarchive/pull/929 - -archive_read_support_format_cpio: header_newc(): Avoid overflow when reading corrupt -cpio archive - -A cpio "newc" archive with a namelength of "FFFFFFFF", if read on a -system with a 32-bit size_t, would result in namelength + name_pad -overflowing 32 bits and libarchive attempting to copy 2^32-1 bytes -from a 2-byte buffer, with appropriately hilarious results. - -Check for this overflow and fail; there's no legitimate reason for a -cpio archive to contain a file with a name over 4 billion characters -in length. - -Upstream-Status: Backport [https://github.com/libarchive/libarchive/commit/bac4659e0b970990e7e3f3a3d239294e96311630] -Bug: 929 -Signed-off-by: Andrej Valek <andrej.valek@siemens.com> - -diff --git a/libarchive/archive_read_support_format_cpio.c b/libarchive/archive_read_support_format_cpio.c -index ad9f782..1faa64d 100644 ---- a/libarchive/archive_read_support_format_cpio.c -+++ b/libarchive/archive_read_support_format_cpio.c -@@ -633,6 +633,13 @@ header_newc(struct archive_read *a, struct cpio *cpio, - /* Pad name to 2 more than a multiple of 4. */ - *name_pad = (2 - *namelength) & 3; - -+ /* Make sure that the padded name length fits into size_t. */ -+ if ((size_t)(*namelength + *name_pad) < *namelength) { -+ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, -+ "cpio archive has invalid namelength"); -+ return (ARCHIVE_FATAL); -+ } -+ - /* - * Note: entry_bytes_remaining is at least 64 bits and - * therefore guaranteed to be big enough for a 33-bit file diff --git a/poky/meta/recipes-extended/libarchive/libarchive_3.3.2.bb b/poky/meta/recipes-extended/libarchive/libarchive_3.3.3.bb index e3d90b276..46a3d4376 100644 --- a/poky/meta/recipes-extended/libarchive/libarchive_3.3.2.bb +++ b/poky/meta/recipes-extended/libarchive/libarchive_3.3.3.bb @@ -32,16 +32,12 @@ PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4," EXTRA_OECONF += "--enable-largefile" SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \ - file://bug929.patch \ - file://CVE-2017-14166.patch \ - file://CVE-2017-14502.patch \ file://non-recursive-extract-and-list.patch \ - file://CVE-2017-14503.patch \ - file://CVE-2017-14501.patch \ - " + file://bug1066.patch \ +" -SRC_URI[md5sum] = "4583bd6b2ebf7e0e8963d90879eb1b27" -SRC_URI[sha256sum] = "ed2dbd6954792b2c054ccf8ec4b330a54b85904a80cef477a1c74643ddafa0ce" +SRC_URI[md5sum] = "4038e366ca5b659dae3efcc744e72120" +SRC_URI[sha256sum] = "ba7eb1781c9fbbae178c4c6bad1c6eb08edab9a1496c64833d1715d022b30e2e" inherit autotools update-alternatives pkgconfig diff --git a/poky/meta/recipes-extended/libidn/libidn/0001-idn-fix-printf-format-security-warnings.patch b/poky/meta/recipes-extended/libidn/libidn/0001-idn-fix-printf-format-security-warnings.patch deleted file mode 100644 index 2d5faabb2..000000000 --- a/poky/meta/recipes-extended/libidn/libidn/0001-idn-fix-printf-format-security-warnings.patch +++ /dev/null @@ -1,694 +0,0 @@ -From 7148adf34dae30345c2e4d9d437838a45ba6f6e8 Mon Sep 17 00:00:00 2001 -From: =?utf8?q?Tim=20R=C3=BChsen?= <tim.ruehsen@gmx.de> -Date: Wed, 1 Feb 2017 11:06:39 +0100 -Subject: [PATCH] Fix -Wformat warnings - ---- -Upstream-Status: Backport -Signed-off-by: Khem Raj <raj.khem@gmail.com> - - examples/example.c | 6 +++--- - examples/example3.c | 4 ++-- - examples/example4.c | 4 ++-- - examples/example5.c | 2 +- - src/idn.c | 2 +- - tests/tst_idna.c | 25 +++++++++++++------------ - tests/tst_idna2.c | 8 ++++---- - tests/tst_idna3.c | 8 ++++---- - tests/tst_nfkc.c | 8 ++++---- - tests/tst_pr29.c | 12 ++++++------ - tests/tst_punycode.c | 13 +++++++------ - tests/tst_strerror.c | 20 ++++++++++---------- - tests/tst_stringprep.c | 12 ++++++------ - tests/tst_tld.c | 20 ++++++++++---------- - tests/utils.c | 6 +++--- - 15 files changed, 76 insertions(+), 74 deletions(-) - -diff --git a/examples/example.c b/examples/example.c -index 6e91783..24f64e0 100644 ---- a/examples/example.c -+++ b/examples/example.c -@@ -55,7 +55,7 @@ main (void) - - printf ("Before locale2utf8 (length %ld): ", (long int) strlen (buf)); - for (i = 0; i < strlen (buf); i++) -- printf ("%02x ", buf[i] & 0xFF); -+ printf ("%02x ", (unsigned) buf[i] & 0xFF); - printf ("\n"); - - p = stringprep_locale_to_utf8 (buf); -@@ -69,7 +69,7 @@ main (void) - - printf ("Before stringprep (length %ld): ", (long int) strlen (buf)); - for (i = 0; i < strlen (buf); i++) -- printf ("%02x ", buf[i] & 0xFF); -+ printf ("%02x ", (unsigned) buf[i] & 0xFF); - printf ("\n"); - - rc = stringprep (buf, BUFSIZ, 0, stringprep_nameprep); -@@ -79,7 +79,7 @@ main (void) - { - printf ("After stringprep (length %ld): ", (long int) strlen (buf)); - for (i = 0; i < strlen (buf); i++) -- printf ("%02x ", buf[i] & 0xFF); -+ printf ("%02x ", (unsigned) buf[i] & 0xFF); - printf ("\n"); - } - -diff --git a/examples/example3.c b/examples/example3.c -index fc11c1c..ffb9042 100644 ---- a/examples/example3.c -+++ b/examples/example3.c -@@ -56,7 +56,7 @@ main (void) - - printf ("Read string (length %ld): ", (long int) strlen (buf)); - for (i = 0; i < strlen (buf); i++) -- printf ("%02x ", buf[i] & 0xFF); -+ printf ("%02x ", (unsigned) buf[i] & 0xFF); - printf ("\n"); - - rc = idna_to_ascii_lz (buf, &p, 0); -@@ -68,7 +68,7 @@ main (void) - - printf ("ACE label (length %ld): '%s'\n", (long int) strlen (p), p); - for (i = 0; i < strlen (p); i++) -- printf ("%02x ", p[i] & 0xFF); -+ printf ("%02x ", (unsigned) p[i] & 0xFF); - printf ("\n"); - - free (p); -diff --git a/examples/example4.c b/examples/example4.c -index 1b319c9..a3315a1 100644 ---- a/examples/example4.c -+++ b/examples/example4.c -@@ -56,7 +56,7 @@ main (void) - - printf ("Read string (length %ld): ", (long int) strlen (buf)); - for (i = 0; i < strlen (buf); i++) -- printf ("%02x ", buf[i] & 0xFF); -+ printf ("%02x ", (unsigned) buf[i] & 0xFF); - printf ("\n"); - - rc = idna_to_unicode_lzlz (buf, &p, 0); -@@ -68,7 +68,7 @@ main (void) - - printf ("ACE label (length %ld): '%s'\n", (long int) strlen (p), p); - for (i = 0; i < strlen (p); i++) -- printf ("%02x ", p[i] & 0xFF); -+ printf ("%02x ", (unsigned) p[i] & 0xFF); - printf ("\n"); - - free (p); -diff --git a/examples/example5.c b/examples/example5.c -index df55798..29d40b9 100644 ---- a/examples/example5.c -+++ b/examples/example5.c -@@ -68,7 +68,7 @@ main (void) - - printf ("Read string (length %ld): ", (long int) strlen (buf)); - for (i = 0; i < strlen (buf); i++) -- printf ("%02x ", buf[i] & 0xFF); -+ printf ("%02x ", (unsigned) buf[i] & 0xFF); - printf ("\n"); - - p = stringprep_locale_to_utf8 (buf); -diff --git a/src/idn.c b/src/idn.c -index be1c7d1..13eb3c9 100644 ---- a/src/idn.c -+++ b/src/idn.c -@@ -419,7 +419,7 @@ main (int argc, char *argv[]) - size_t i; - for (i = 0; p[i]; i++) - fprintf (stderr, "output[%lu] = U+%04x\n", -- (unsigned long) i, p[i]); -+ (unsigned long) i, (unsigned) p[i]); - } - - fprintf (stdout, "%s\n", p); -diff --git a/tests/tst_idna.c b/tests/tst_idna.c -index 415764e..4ac046f 100644 ---- a/tests/tst_idna.c -+++ b/tests/tst_idna.c -@@ -220,13 +220,14 @@ doit (void) - char label[100]; - uint32_t *ucs4label = NULL; - uint32_t tmp[100]; -- size_t len, len2, i; -+ size_t len, len2; - int rc; -+ unsigned i; - - for (i = 0; i < sizeof (idna) / sizeof (idna[0]); i++) - { - if (debug) -- printf ("IDNA entry %ld: %s\n", i, idna[i].name); -+ printf ("IDNA entry %u: %s\n", i, idna[i].name); - - if (debug) - { -@@ -237,7 +238,7 @@ doit (void) - rc = idna_to_ascii_4i (idna[i].in, idna[i].inlen, label, idna[i].flags); - if (rc != idna[i].toasciirc) - { -- fail ("IDNA entry %ld failed: %d\n", i, rc); -+ fail ("IDNA entry %u failed: %d\n", i, rc); - if (debug) - printf ("FATAL\n"); - continue; -@@ -256,7 +257,7 @@ doit (void) - if (strlen (idna[i].out) != strlen (label) || - strcasecmp (idna[i].out, label) != 0) - { -- fail ("IDNA entry %ld failed\n", i); -+ fail ("IDNA entry %u failed\n", i); - if (debug) - printf ("ERROR\n"); - } -@@ -273,8 +274,8 @@ doit (void) - - if (debug) - { -- printf ("in: %s (%ld==%ld)\n", idna[i].out, strlen (idna[i].out), -- len); -+ printf ("in: %s (%d==%d)\n", idna[i].out, (int) strlen (idna[i].out), -+ (int) len); - ucs4print (ucs4label, len); - } - -@@ -282,20 +283,20 @@ doit (void) - rc = idna_to_unicode_44i (ucs4label, len, tmp, &len2, idna[i].flags); - if (debug) - { -- printf ("expected out (%ld):\n", -+ printf ("expected out (%lu):\n", - rc == IDNA_SUCCESS ? idna[i].inlen : len); - if (rc == IDNA_SUCCESS) - ucs4print (idna[i].in, idna[i].inlen); - else - ucs4print (ucs4label, len); - -- printf ("computed out (%ld):\n", len2); -+ printf ("computed out (%d):\n", (int) len2); - ucs4print (tmp, len2); - } - - if (rc != idna[i].tounicoderc) - { -- fail ("IDNA entry %ld failed: %d\n", i, rc); -+ fail ("IDNA entry %u failed: %d\n", i, rc); - if (debug) - printf ("FATAL\n"); - continue; -@@ -309,11 +310,11 @@ doit (void) - if (debug) - { - if (rc == IDNA_SUCCESS) -- printf ("len=%ld len2=%ld\n", len2, idna[i].inlen); -+ printf ("len=%d len2=%d\n", (int) len2, (int) idna[i].inlen); - else -- printf ("len=%ld len2=%ld\n", len, len2); -+ printf ("len=%d len2=%d\n", (int) len, (int) len2); - } -- fail ("IDNA entry %ld failed\n", i); -+ fail ("IDNA entry %u failed\n", i); - if (debug) - printf ("ERROR\n"); - } -diff --git a/tests/tst_idna2.c b/tests/tst_idna2.c -index 65b3a4d..38932ca 100644 ---- a/tests/tst_idna2.c -+++ b/tests/tst_idna2.c -@@ -461,14 +461,14 @@ static const struct idna idna[] = { - void - doit (void) - { -- size_t i; -+ unsigned i; - char *out; - int rc; - - for (i = 0; i < sizeof (idna) / sizeof (idna[0]); i++) - { - if (debug) -- printf ("IDNA2 entry %ld\n", i); -+ printf ("IDNA2 entry %u\n", i); - - if (debug) - { -@@ -487,7 +487,7 @@ doit (void) - IDNA_USE_STD3_ASCII_RULES); - if (rc != IDNA_SUCCESS && strlen (idna[i].out) > 0) - { -- fail ("IDNA2 entry %ld failed: %d\n", i, rc); -+ fail ("IDNA2 entry %u failed: %d\n", i, rc); - continue; - } - -@@ -504,7 +504,7 @@ doit (void) - if (strlen (idna[i].out) != strlen (out) || - strcasecmp (idna[i].out, out) != 0) - { -- fail ("IDNA2 entry %ld failed\n", i); -+ fail ("IDNA2 entry %u failed\n", i); - if (debug) - printf ("ERROR\n"); - } -diff --git a/tests/tst_idna3.c b/tests/tst_idna3.c -index a189378..f65628c 100644 ---- a/tests/tst_idna3.c -+++ b/tests/tst_idna3.c -@@ -59,13 +59,13 @@ doit (void) - { - int rc; - char *out = NULL; -- size_t i; -+ unsigned i; - - for (i = 0; i < sizeof (idna) / sizeof (idna[0]); i++) - { - rc = idna_to_unicode_8z8z (idna[i].in, &out, 0); - if (rc != IDNA_SUCCESS) -- fail ("IDNA3[%ld] failed %d\n", i, rc); -+ fail ("IDNA3[%u] failed %d\n", i, rc); - - if (debug && rc == IDNA_SUCCESS) - { -@@ -75,9 +75,9 @@ doit (void) - } - - if (strcmp (out, idna[i].out) != 0) -- fail ("IDNA3[%ld] failed\n", i); -+ fail ("IDNA3[%u] failed\n", i); - else if (debug) -- printf ("IDNA3[%ld] success\n", i); -+ printf ("IDNA3[%u] success\n", i); - - if (out) - idn_free (out); -diff --git a/tests/tst_nfkc.c b/tests/tst_nfkc.c -index d150fec..f5af9c6 100644 ---- a/tests/tst_nfkc.c -+++ b/tests/tst_nfkc.c -@@ -68,18 +68,18 @@ void - doit (void) - { - char *out; -- size_t i; -+ unsigned i; - - for (i = 0; i < sizeof (nfkc) / sizeof (nfkc[0]); i++) - { - if (debug) -- printf ("NFKC entry %ld\n", i); -+ printf ("NFKC entry %u\n", i); - - out = stringprep_utf8_nfkc_normalize (nfkc[i].in, - (ssize_t) strlen (nfkc[i].in)); - if (out == NULL) - { -- fail ("NFKC entry %ld failed fatally\n", i); -+ fail ("NFKC entry %u failed fatally\n", i); - continue; - } - -@@ -114,7 +114,7 @@ doit (void) - if (strlen (nfkc[i].out) != strlen (out) || - memcmp (nfkc[i].out, out, strlen (out)) != 0) - { -- fail ("NFKC entry %ld failed\n", i); -+ fail ("NFKC entry %u failed\n", i); - if (debug) - printf ("ERROR\n"); - } -diff --git a/tests/tst_pr29.c b/tests/tst_pr29.c -index 3dc5466..11d0ede 100644 ---- a/tests/tst_pr29.c -+++ b/tests/tst_pr29.c -@@ -91,7 +91,7 @@ static const struct tv tv[] = { - void - doit (void) - { -- size_t i; -+ unsigned i; - int rc; - - for (i = 0; i < sizeof (tv) / sizeof (tv[0]); i++) -@@ -100,7 +100,7 @@ doit (void) - { - uint32_t *p, *q; - -- printf ("PR29 entry %ld: %s\n", i, tv[i].name); -+ printf ("PR29 entry %u: %s\n", i, tv[i].name); - - printf ("in:\n"); - ucs4print (tv[i].in, tv[i].inlen); -@@ -120,7 +120,7 @@ doit (void) - rc = pr29_4 (tv[i].in, tv[i].inlen); - if (rc != tv[i].rc) - { -- fail ("PR29 entry %ld failed (expected %d): %d\n", i, tv[i].rc, rc); -+ fail ("PR29 entry %u failed (expected %d): %d\n", i, tv[i].rc, rc); - if (debug) - printf ("FATAL\n"); - continue; -@@ -129,7 +129,7 @@ doit (void) - rc = pr29_4z (tv[i].in); - if (rc != tv[i].rc) - { -- fail ("PR29 entry %ld failed (expected %d): %d\n", i, tv[i].rc, rc); -+ fail ("PR29 entry %u failed (expected %d): %d\n", i, tv[i].rc, rc); - if (debug) - printf ("FATAL\n"); - continue; -@@ -142,7 +142,7 @@ doit (void) - p = stringprep_ucs4_to_utf8 (tv[i].in, (ssize_t) tv[i].inlen, - &items_read, &items_written); - if (p == NULL) -- fail ("FAIL: stringprep_ucs4_to_utf8(tv[%ld]) == NULL\n", i); -+ fail ("FAIL: stringprep_ucs4_to_utf8(tv[%u]) == NULL\n", i); - if (debug) - hexprint (p, strlen (p)); - -@@ -150,7 +150,7 @@ doit (void) - free (p); - if (rc != tv[i].rc) - { -- fail ("PR29 entry %ld failed (expected %d): %d\n", -+ fail ("PR29 entry %u failed (expected %d): %d\n", - i, tv[i].rc, rc); - if (debug) - printf ("FATAL\n"); -diff --git a/tests/tst_punycode.c b/tests/tst_punycode.c -index 493b8a2..997744a 100644 ---- a/tests/tst_punycode.c -+++ b/tests/tst_punycode.c -@@ -173,7 +173,8 @@ doit (void) - char *p; - uint32_t *q; - int rc; -- size_t i, outlen; -+ size_t outlen; -+ unsigned i; - - p = malloc (sizeof (*p) * BUFSIZ); - if (p == NULL) -@@ -186,7 +187,7 @@ doit (void) - for (i = 0; i < sizeof (punycode) / sizeof (punycode[0]); i++) - { - if (debug) -- printf ("PUNYCODE entry %ld: %s\n", i, punycode[i].name); -+ printf ("PUNYCODE entry %u: %s\n", i, punycode[i].name); - - if (debug) - { -@@ -199,7 +200,7 @@ doit (void) - NULL, &outlen, p); - if (rc != punycode[i].rc) - { -- fail ("punycode_encode() entry %ld failed: %d\n", i, rc); -+ fail ("punycode_encode() entry %u failed: %d\n", i, rc); - if (debug) - printf ("FATAL\n"); - continue; -@@ -221,7 +222,7 @@ doit (void) - if (strlen (punycode[i].out) != strlen (p) || - memcmp (punycode[i].out, p, strlen (p)) != 0) - { -- fail ("punycode() entry %ld failed\n", i); -+ fail ("punycode() entry %u failed\n", i); - if (debug) - printf ("ERROR\n"); - } -@@ -241,7 +242,7 @@ doit (void) - &outlen, q, NULL); - if (rc != punycode[i].rc) - { -- fail ("punycode() entry %ld failed: %d\n", i, rc); -+ fail ("punycode() entry %u failed: %d\n", i, rc); - if (debug) - printf ("FATAL\n"); - continue; -@@ -262,7 +263,7 @@ doit (void) - if (punycode[i].inlen != outlen || - memcmp (punycode[i].in, q, outlen) != 0) - { -- fail ("punycode_decode() entry %ld failed\n", i); -+ fail ("punycode_decode() entry %u failed\n", i); - if (debug) - printf ("ERROR\n"); - } -diff --git a/tests/tst_strerror.c b/tests/tst_strerror.c -index 71fff59..730f5e4 100644 ---- a/tests/tst_strerror.c -+++ b/tests/tst_strerror.c -@@ -110,7 +110,7 @@ doit (void) - /* Iterate through all error codes. */ - - { -- size_t i; -+ unsigned i; - const char *last_p = NULL; - - for (i = 0;; i++) -@@ -126,13 +126,13 @@ doit (void) - break; - } - if (debug) -- printf ("idna %ld: %s\n", i, p); -+ printf ("idna %u: %s\n", i, p); - last_p = p; - } - } - - { -- size_t i; -+ unsigned i; - const char *last_p = NULL; - - for (i = 0;; i++) -@@ -141,13 +141,13 @@ doit (void) - if (p == last_p) - break; - if (debug) -- printf ("pr29 %ld: %s\n", i, p); -+ printf ("pr29 %u: %s\n", i, p); - last_p = p; - } - } - - { -- size_t i; -+ unsigned i; - const char *last_p = NULL; - - for (i = 0;; i++) -@@ -156,13 +156,13 @@ doit (void) - if (p == last_p) - break; - if (debug) -- printf ("punycode %ld: %s\n", i, p); -+ printf ("punycode %u: %s\n", i, p); - last_p = p; - } - } - - { -- size_t i; -+ unsigned i; - const char *last_p = NULL; - - for (i = 0;; i++) -@@ -183,13 +183,13 @@ doit (void) - break; - } - if (debug) -- printf ("stringprep %ld: %s\n", i, p); -+ printf ("stringprep %u: %s\n", i, p); - last_p = p; - } - } - - { -- size_t i; -+ unsigned i; - const char *last_p = NULL; - - for (i = 0;; i++) -@@ -198,7 +198,7 @@ doit (void) - if (p == last_p) - break; - if (debug) -- printf ("tld %ld: %s\n", i, p); -+ printf ("tld %u: %s\n", i, p); - last_p = p; - } - } -diff --git a/tests/tst_stringprep.c b/tests/tst_stringprep.c -index 149ce6f..7c9ab06 100644 ---- a/tests/tst_stringprep.c -+++ b/tests/tst_stringprep.c -@@ -205,7 +205,7 @@ doit (void) - { - char *p; - int rc; -- size_t i; -+ unsigned i; - - if (!stringprep_check_version (STRINGPREP_VERSION)) - fail ("stringprep_check_version failed (header %s runtime %s)\n", -@@ -224,7 +224,7 @@ doit (void) - for (i = 0; i < sizeof (strprep) / sizeof (strprep[0]); i++) - { - if (debug) -- printf ("STRINGPREP entry %ld\n", i); -+ printf ("STRINGPREP entry %u\n", i); - - if (debug) - { -@@ -247,12 +247,12 @@ doit (void) - continue; - else if (l == NULL) - { -- fail ("bad UTF-8 in entry %ld\n", i); -+ fail ("bad UTF-8 in entry %u\n", i); - continue; - } - else if (strcmp (strprep[i].in, x) != 0) - { -- fail ("bad UTF-8 in entry %ld\n", i); -+ fail ("bad UTF-8 in entry %u\n", i); - if (debug) - { - puts ("expected:"); -@@ -274,7 +274,7 @@ doit (void) - "Nameprep", strprep[i].flags); - if (rc != strprep[i].rc) - { -- fail ("stringprep() entry %ld failed: %d\n", i, rc); -+ fail ("stringprep() entry %u failed: %d\n", i, rc); - if (debug) - printf ("FATAL\n"); - if (rc == STRINGPREP_OK) -@@ -302,7 +302,7 @@ doit (void) - if (strlen (strprep[i].out) != strlen (p) || - memcmp (strprep[i].out, p, strlen (p)) != 0) - { -- fail ("stringprep() entry %ld failed\n", i); -+ fail ("stringprep() entry %ld failed\n", (long) i); - if (debug) - printf ("ERROR\n"); - } -diff --git a/tests/tst_tld.c b/tests/tst_tld.c -index 2f8e12e..d038c79 100644 ---- a/tests/tst_tld.c -+++ b/tests/tst_tld.c -@@ -80,7 +80,7 @@ const Tld_table * my_tld_tables[] = - void - doit (void) - { -- size_t i; -+ unsigned i; - const Tld_table *tldtable; - char *out; - size_t errpos; -@@ -206,7 +206,7 @@ doit (void) - for (i = 0; i < sizeof (tld) / sizeof (tld[0]); i++) - { - if (debug) -- printf ("TLD entry %ld: %s\n", i, tld[i].name); -+ printf ("TLD entry %u: %s\n", i, tld[i].name); - - if (debug) - { -@@ -217,7 +217,7 @@ doit (void) - tldtable = tld_default_table (tld[i].tld, NULL); - if (tldtable == NULL) - { -- fail ("TLD entry %ld tld_get_table (%s)\n", i, tld[i].tld); -+ fail ("TLD entry %u tld_get_table (%s)\n", i, tld[i].tld); - if (debug) - printf ("FATAL\n"); - continue; -@@ -226,7 +226,7 @@ doit (void) - rc = tld_check_4t (tld[i].in, tld[i].inlen, &errpos, tldtable); - if (rc != tld[i].rc) - { -- fail ("TLD entry %ld failed: %d\n", i, rc); -+ fail ("TLD entry %u failed: %d\n", i, rc); - if (debug) - printf ("FATAL\n"); - continue; -@@ -237,7 +237,7 @@ doit (void) - - if (rc != tld[i].rc) - { -- fail ("TLD entry %ld failed\n", i); -+ fail ("TLD entry %u failed\n", i); - if (debug) - printf ("ERROR\n"); - } -@@ -245,12 +245,12 @@ doit (void) - { - if (debug) - printf ("returned errpos %ld expected errpos %ld\n", -- errpos, tld[i].errpos); -+ (long) errpos, (long) tld[i].errpos); - - if (tld[i].errpos != errpos) - { -- fail ("TLD entry %ld failed because errpos %ld != %ld\n", i, -- tld[i].errpos, errpos); -+ fail ("TLD entry %u failed because errpos %ld != %ld\n", i, -+ (long) tld[i].errpos, (long) errpos); - if (debug) - printf ("ERROR\n"); - } -@@ -262,12 +262,12 @@ doit (void) - rc = tld_check_8z (tld[i].example, &errpos, NULL); - if (rc != tld[i].rc) - { -- fail ("TLD entry %ld failed\n", i); -+ fail ("TLD entry %u failed\n", i); - if (debug) - printf ("ERROR\n"); - } - if (debug) -- printf ("TLD entry %ld tld_check_8z (%s)\n", i, tld[i].example); -+ printf ("TLD entry %u tld_check_8z (%s)\n", i, tld[i].example); - } - } - } -diff --git a/tests/utils.c b/tests/utils.c -index 717ee01..5577dc3 100644 ---- a/tests/utils.c -+++ b/tests/utils.c -@@ -49,7 +49,7 @@ escapeprint (const char *str, size_t len) - { - size_t i; - -- printf (" (length %ld bytes):\n\t", len); -+ printf (" (length %ld bytes):\n\t", (long) len); - for (i = 0; i < len; i++) - { - if (((str[i] & 0xFF) >= 'A' && (str[i] & 0xFF) <= 'Z') || -@@ -58,7 +58,7 @@ escapeprint (const char *str, size_t len) - || (str[i] & 0xFF) == ' ' || (str[i] & 0xFF) == '.') - printf ("%c", (str[i] & 0xFF)); - else -- printf ("\\x%02X", (str[i] & 0xFF)); -+ printf ("\\x%02X", (unsigned) (str[i] & 0xFF)); - if ((i + 1) % 16 == 0 && (i + 1) < len) - printf ("'\n\t'"); - } -@@ -73,7 +73,7 @@ hexprint (const char *str, size_t len) - printf ("\t;; "); - for (i = 0; i < len; i++) - { -- printf ("%02x ", (str[i] & 0xFF)); -+ printf ("%02x ", (unsigned) (str[i] & 0xFF)); - if ((i + 1) % 8 == 0) - printf (" "); - if ((i + 1) % 16 == 0 && i + 1 < len) --- -1.9.1 - diff --git a/poky/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch b/poky/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch index 98ba4d6ff..43bd23294 100644 --- a/poky/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch +++ b/poky/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch @@ -1,25 +1,34 @@ -Upstream-Status: Inappropriate +From cdd9e2e960eeb4eda7b08f0113d0cd03524c1d45 Mon Sep 17 00:00:00 2001 +From: Nitin A Kamble <nitin.a.kamble@intel.com> +Date: Tue, 10 Jul 2012 02:44:30 -0700 +Subject: [PATCH] libidn: fix build with automake 1.12 + +Upstream-Status: Inappropriate automake 1.12.x has deprecated AM_PROG_MKDIR_P , and throws a warning for that, and the warnings are treated as errors because of the -Werror parameter. -These AM_PROG_MKDIR_P are coming from gettext, and the latest gettext code has not +These AM_PROG_MKDIR_P are coming from gettext, and the latest gettext code has not eliminated these deprecated macros yet. So disable the treatment of warnings as errors until gettext is updated to remove the deprecated macros. Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2012/07/10 -Index: libidn-1.24/configure.ac -=================================================================== ---- libidn-1.24.orig/configure.ac -+++ libidn-1.24/configure.ac -@@ -23,7 +23,7 @@ AC_COPYRIGHT([Copyright (c) 2002-2011 Si +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 261dad2..c4f935e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -22,7 +22,7 @@ AC_INIT([GNU Libidn], [1.34], [bug-libidn@gnu.org]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS(config.h) -AM_INIT_AUTOMAKE([1.10 -Wall -Werror -Wno-override]) +AM_INIT_AUTOMAKE([1.10 -Wall -Wno-override]) - AM_SILENT_RULES([yes]) + m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) # Library code modified: REVISION++ diff --git a/poky/meta/recipes-extended/libidn/libidn/gcc7-compatibility.patch b/poky/meta/recipes-extended/libidn/libidn/gcc7-compatibility.patch deleted file mode 100644 index 546a6eaaf..000000000 --- a/poky/meta/recipes-extended/libidn/libidn/gcc7-compatibility.patch +++ /dev/null @@ -1,334 +0,0 @@ -From 230930b3bc3e431b819eb45420cb42475d83ca93 Mon Sep 17 00:00:00 2001 -From: =?utf8?q?Tim=20R=C3=BChsen?= <tim.ruehsen@gmx.de> -Date: Wed, 1 Feb 2017 10:44:36 +0100 -Subject: [PATCH] Update intprops.h for gcc-7 compatibility - ---- -Upstream-Status: Backport -Signed-off-by: Khem Raj <raj.khem@gmail.com> - - gl/intprops.h | 65 ++++++++++++++++++++++++++++++-------------------- - lib/gltests/intprops.h | 65 ++++++++++++++++++++++++++++++-------------------- - 2 files changed, 78 insertions(+), 52 deletions(-) - -diff --git a/gl/intprops.h b/gl/intprops.h -index e1fce5c..eb06b69 100644 ---- a/gl/intprops.h -+++ b/gl/intprops.h -@@ -1,18 +1,18 @@ - /* intprops.h -- properties of integer types - -- Copyright (C) 2001-2016 Free Software Foundation, Inc. -+ Copyright (C) 2001-2017 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published -- by the Free Software Foundation; either version 3 of the License, or -+ under the terms of the GNU Lesser General Public License as published -+ by the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -+ GNU Lesser General Public License for more details. - -- You should have received a copy of the GNU General Public License -+ You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - - /* Written by Paul Eggert. */ -@@ -47,12 +47,16 @@ - - /* Minimum and maximum values for integer types and expressions. */ - -+/* The width in bits of the integer type or expression T. -+ Padding bits are not supported; this is checked at compile-time below. */ -+#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT) -+ - /* The maximum and minimum values for the integer type T. */ - #define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t)) - #define TYPE_MAXIMUM(t) \ - ((t) (! TYPE_SIGNED (t) \ - ? (t) -1 \ -- : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) -+ : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1))) - - /* The maximum and minimum values for the type of the expression E, - after integer promotion. E should not have side effects. */ -@@ -65,7 +69,13 @@ - ? _GL_SIGNED_INT_MAXIMUM (e) \ - : _GL_INT_NEGATE_CONVERT (e, 1)) - #define _GL_SIGNED_INT_MAXIMUM(e) \ -- (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1) -+ (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH ((e) + 0) - 2)) - 1) * 2 + 1) -+ -+/* Work around OpenVMS incompatibility with C99. */ -+#if !defined LLONG_MAX && defined __INT64_MAX -+# define LLONG_MAX __INT64_MAX -+# define LLONG_MIN __INT64_MIN -+#endif - - /* This include file assumes that signed types are two's complement without - padding bits; the above macros have undefined behavior otherwise. -@@ -84,10 +94,15 @@ verify (TYPE_MAXIMUM (long int) == LONG_MAX); - verify (TYPE_MINIMUM (long long int) == LLONG_MIN); - verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); - #endif -+/* Similarly, sanity-check one ISO/IEC TS 18661-1:2014 macro if defined. */ -+#ifdef UINT_WIDTH -+verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH); -+#endif - - /* Does the __typeof__ keyword work? This could be done by - 'configure', but for now it's easier to do it by hand. */ --#if (2 <= __GNUC__ || defined __IBM__TYPEOF__ \ -+#if (2 <= __GNUC__ \ -+ || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \ - || (0x5110 <= __SUNPRO_C && !__STDC__)) - # define _GL_HAVE___TYPEOF__ 1 - #else -@@ -116,8 +131,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); - signed, this macro may overestimate the true bound by one byte when - applied to unsigned types of size 2, 4, 16, ... bytes. */ - #define INT_STRLEN_BOUND(t) \ -- (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT \ -- - _GL_SIGNED_TYPE_OR_EXPR (t)) \ -+ (INT_BITS_STRLEN_BOUND (TYPE_WIDTH (t) - _GL_SIGNED_TYPE_OR_EXPR (t)) \ - + _GL_SIGNED_TYPE_OR_EXPR (t)) - - /* Bound on buffer size needed to represent an integer type or expression T, -@@ -222,20 +236,23 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); - ? (a) < (min) >> (b) \ - : (max) >> (b) < (a)) - --/* True if __builtin_add_overflow (A, B, P) works when P is null. */ --#define _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL (7 <= __GNUC__) -+/* True if __builtin_add_overflow (A, B, P) works when P is non-null. */ -+#define _GL_HAS_BUILTIN_OVERFLOW (5 <= __GNUC__) -+ -+/* True if __builtin_add_overflow_p (A, B, C) works. */ -+#define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__) - - /* The _GL*_OVERFLOW macros have the same restrictions as the - *_RANGE_OVERFLOW macros, except that they do not assume that operands - (e.g., A and B) have the same type as MIN and MAX. Instead, they assume - that the result (e.g., A + B) has that type. */ --#if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL --# define _GL_ADD_OVERFLOW(a, b, min, max) -- __builtin_add_overflow (a, b, (__typeof__ ((a) + (b)) *) 0) --# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) -- __builtin_sub_overflow (a, b, (__typeof__ ((a) - (b)) *) 0) --# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) -- __builtin_mul_overflow (a, b, (__typeof__ ((a) * (b)) *) 0) -+#if _GL_HAS_BUILTIN_OVERFLOW_P -+# define _GL_ADD_OVERFLOW(a, b, min, max) \ -+ __builtin_add_overflow_p (a, b, (__typeof__ ((a) + (b))) 0) -+# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ -+ __builtin_sub_overflow_p (a, b, (__typeof__ ((a) - (b))) 0) -+# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ -+ __builtin_mul_overflow_p (a, b, (__typeof__ ((a) * (b))) 0) - #else - # define _GL_ADD_OVERFLOW(a, b, min, max) \ - ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \ -@@ -315,7 +332,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); - _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW) - #define INT_SUBTRACT_OVERFLOW(a, b) \ - _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW) --#if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL -+#if _GL_HAS_BUILTIN_OVERFLOW_P - # define INT_NEGATE_OVERFLOW(a) INT_SUBTRACT_OVERFLOW (0, a) - #else - # define INT_NEGATE_OVERFLOW(a) \ -@@ -349,10 +366,6 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); - #define INT_MULTIPLY_WRAPV(a, b, r) \ - _GL_INT_OP_WRAPV (a, b, r, *, __builtin_mul_overflow, INT_MULTIPLY_OVERFLOW) - --#ifndef __has_builtin --# define __has_builtin(x) 0 --#endif -- - /* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See: - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193 - https://llvm.org/bugs/show_bug.cgi?id=25390 -@@ -369,7 +382,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); - the operation. BUILTIN is the builtin operation, and OVERFLOW the - overflow predicate. Return 1 if the result overflows. See above - for restrictions. */ --#if 5 <= __GNUC__ || __has_builtin (__builtin_add_overflow) -+#if _GL_HAS_BUILTIN_OVERFLOW - # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r) - #elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS - # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \ -@@ -412,7 +425,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); - # else - # define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \ - _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ -- long int, LONG_MIN, LONG_MAX)) -+ long int, LONG_MIN, LONG_MAX) - # endif - #endif - -diff --git a/lib/gltests/intprops.h b/lib/gltests/intprops.h -index e1fce5c..eb06b69 100644 ---- a/lib/gltests/intprops.h -+++ b/lib/gltests/intprops.h -@@ -1,18 +1,18 @@ - /* intprops.h -- properties of integer types - -- Copyright (C) 2001-2016 Free Software Foundation, Inc. -+ Copyright (C) 2001-2017 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published -- by the Free Software Foundation; either version 3 of the License, or -+ under the terms of the GNU Lesser General Public License as published -+ by the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -+ GNU Lesser General Public License for more details. - -- You should have received a copy of the GNU General Public License -+ You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - - /* Written by Paul Eggert. */ -@@ -47,12 +47,16 @@ - - /* Minimum and maximum values for integer types and expressions. */ - -+/* The width in bits of the integer type or expression T. -+ Padding bits are not supported; this is checked at compile-time below. */ -+#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT) -+ - /* The maximum and minimum values for the integer type T. */ - #define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t)) - #define TYPE_MAXIMUM(t) \ - ((t) (! TYPE_SIGNED (t) \ - ? (t) -1 \ -- : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) -+ : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1))) - - /* The maximum and minimum values for the type of the expression E, - after integer promotion. E should not have side effects. */ -@@ -65,7 +69,13 @@ - ? _GL_SIGNED_INT_MAXIMUM (e) \ - : _GL_INT_NEGATE_CONVERT (e, 1)) - #define _GL_SIGNED_INT_MAXIMUM(e) \ -- (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1) -+ (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH ((e) + 0) - 2)) - 1) * 2 + 1) -+ -+/* Work around OpenVMS incompatibility with C99. */ -+#if !defined LLONG_MAX && defined __INT64_MAX -+# define LLONG_MAX __INT64_MAX -+# define LLONG_MIN __INT64_MIN -+#endif - - /* This include file assumes that signed types are two's complement without - padding bits; the above macros have undefined behavior otherwise. -@@ -84,10 +94,15 @@ verify (TYPE_MAXIMUM (long int) == LONG_MAX); - verify (TYPE_MINIMUM (long long int) == LLONG_MIN); - verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); - #endif -+/* Similarly, sanity-check one ISO/IEC TS 18661-1:2014 macro if defined. */ -+#ifdef UINT_WIDTH -+verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH); -+#endif - - /* Does the __typeof__ keyword work? This could be done by - 'configure', but for now it's easier to do it by hand. */ --#if (2 <= __GNUC__ || defined __IBM__TYPEOF__ \ -+#if (2 <= __GNUC__ \ -+ || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \ - || (0x5110 <= __SUNPRO_C && !__STDC__)) - # define _GL_HAVE___TYPEOF__ 1 - #else -@@ -116,8 +131,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); - signed, this macro may overestimate the true bound by one byte when - applied to unsigned types of size 2, 4, 16, ... bytes. */ - #define INT_STRLEN_BOUND(t) \ -- (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT \ -- - _GL_SIGNED_TYPE_OR_EXPR (t)) \ -+ (INT_BITS_STRLEN_BOUND (TYPE_WIDTH (t) - _GL_SIGNED_TYPE_OR_EXPR (t)) \ - + _GL_SIGNED_TYPE_OR_EXPR (t)) - - /* Bound on buffer size needed to represent an integer type or expression T, -@@ -222,20 +236,23 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); - ? (a) < (min) >> (b) \ - : (max) >> (b) < (a)) - --/* True if __builtin_add_overflow (A, B, P) works when P is null. */ --#define _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL (7 <= __GNUC__) -+/* True if __builtin_add_overflow (A, B, P) works when P is non-null. */ -+#define _GL_HAS_BUILTIN_OVERFLOW (5 <= __GNUC__) -+ -+/* True if __builtin_add_overflow_p (A, B, C) works. */ -+#define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__) - - /* The _GL*_OVERFLOW macros have the same restrictions as the - *_RANGE_OVERFLOW macros, except that they do not assume that operands - (e.g., A and B) have the same type as MIN and MAX. Instead, they assume - that the result (e.g., A + B) has that type. */ --#if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL --# define _GL_ADD_OVERFLOW(a, b, min, max) -- __builtin_add_overflow (a, b, (__typeof__ ((a) + (b)) *) 0) --# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) -- __builtin_sub_overflow (a, b, (__typeof__ ((a) - (b)) *) 0) --# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) -- __builtin_mul_overflow (a, b, (__typeof__ ((a) * (b)) *) 0) -+#if _GL_HAS_BUILTIN_OVERFLOW_P -+# define _GL_ADD_OVERFLOW(a, b, min, max) \ -+ __builtin_add_overflow_p (a, b, (__typeof__ ((a) + (b))) 0) -+# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ -+ __builtin_sub_overflow_p (a, b, (__typeof__ ((a) - (b))) 0) -+# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ -+ __builtin_mul_overflow_p (a, b, (__typeof__ ((a) * (b))) 0) - #else - # define _GL_ADD_OVERFLOW(a, b, min, max) \ - ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \ -@@ -315,7 +332,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); - _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW) - #define INT_SUBTRACT_OVERFLOW(a, b) \ - _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW) --#if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL -+#if _GL_HAS_BUILTIN_OVERFLOW_P - # define INT_NEGATE_OVERFLOW(a) INT_SUBTRACT_OVERFLOW (0, a) - #else - # define INT_NEGATE_OVERFLOW(a) \ -@@ -349,10 +366,6 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); - #define INT_MULTIPLY_WRAPV(a, b, r) \ - _GL_INT_OP_WRAPV (a, b, r, *, __builtin_mul_overflow, INT_MULTIPLY_OVERFLOW) - --#ifndef __has_builtin --# define __has_builtin(x) 0 --#endif -- - /* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See: - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193 - https://llvm.org/bugs/show_bug.cgi?id=25390 -@@ -369,7 +382,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); - the operation. BUILTIN is the builtin operation, and OVERFLOW the - overflow predicate. Return 1 if the result overflows. See above - for restrictions. */ --#if 5 <= __GNUC__ || __has_builtin (__builtin_add_overflow) -+#if _GL_HAS_BUILTIN_OVERFLOW - # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r) - #elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS - # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \ -@@ -412,7 +425,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); - # else - # define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \ - _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ -- long int, LONG_MIN, LONG_MAX)) -+ long int, LONG_MIN, LONG_MAX) - # endif - #endif - --- -1.9.1 - diff --git a/poky/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch b/poky/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch index db91317ca..3c0559e34 100644 --- a/poky/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch +++ b/poky/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch @@ -1,3 +1,8 @@ +From d4f64b78419139eda3c0e1c6ee116bb5f70ea67c Mon Sep 17 00:00:00 2001 +From: Nitin A Kamble <nitin.a.kamble@intel.com> +Date: Wed, 2 May 2012 18:05:19 -0700 +Subject: [PATCH] libtasn1: fix build with automake 1.12 + Upstream-Status: Pending This patch fixes following issue with automake 1.12 @@ -9,12 +14,16 @@ This patch fixes following issue with automake 1.12 Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2012/05/03 -Index: libidn-1.33/configure.ac -=================================================================== ---- libidn-1.33.orig/configure.ac -+++ libidn-1.33/configure.ac -@@ -33,6 +33,10 @@ AC_SUBST(LT_CURRENT, 17) - AC_SUBST(LT_REVISION, 16) +--- + configure.ac | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 8297649..7b9626e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -33,6 +33,10 @@ AC_SUBST(LT_CURRENT, 18) + AC_SUBST(LT_REVISION, 0) AC_SUBST(LT_AGE, 6) +# automake 1.12 seems to require this, but automake 1.11 doesn't recognize it diff --git a/poky/meta/recipes-extended/libidn/libidn2/Unset-need_charset_alias-when-building-for-musl.patch b/poky/meta/recipes-extended/libidn/libidn2/Unset-need_charset_alias-when-building-for-musl.patch new file mode 100644 index 000000000..ace50bbfd --- /dev/null +++ b/poky/meta/recipes-extended/libidn/libidn2/Unset-need_charset_alias-when-building-for-musl.patch @@ -0,0 +1,23 @@ +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> +Index: libidn2-2.0.5/unistring/Makefile.am +=================================================================== +--- libidn2-2.0.5.orig/unistring/Makefile.am ++++ libidn2-2.0.5/unistring/Makefile.am +@@ -293,7 +293,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/libidn/libidn2_2.0.5.bb b/poky/meta/recipes-extended/libidn/libidn2_2.0.5.bb new file mode 100644 index 000000000..0daf7a687 --- /dev/null +++ b/poky/meta/recipes-extended/libidn/libidn2_2.0.5.bb @@ -0,0 +1,29 @@ +SUMMARY = "Internationalized Domain Name support library" +DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group." +HOMEPAGE = "http://www.gnu.org/software/libidn/" +SECTION = "libs" +LICENSE = "(GPLv2+ | LGPLv3) & GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=ab90e75ef97cc6318ce4f2fbda62fe4d \ + file://COPYING.LESSERv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \ + file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://src/idn2.c;endline=16;md5=0283aec28e049f5bcaaeee52aa865874 \ + file://lib/idn2.h.in;endline=27;md5=c2cd28d3f87260f157f022eabb83714f" + +SRC_URI = "${GNU_MIRROR}/libidn/${BPN}-${PV}.tar.gz \ + file://Unset-need_charset_alias-when-building-for-musl.patch \ + " +SRC_URI[md5sum] = "eaf9a5b9d03b0cce3760f34b3124eb36" +SRC_URI[sha256sum] = "53f69170886f1fa6fa5b332439c7a77a7d22626a82ef17e2c1224858bb4ca2b8" + +DEPENDS = "virtual/libiconv libunistring" + +inherit pkgconfig autotools gettext texinfo gtk-doc lib_package + +EXTRA_OECONF += "--disable-rpath \ + --with-libunistring-prefix=${STAGING_EXECPREFIXDIR} \ + " + +LICENSE_${PN} = "(GPLv2+ | LGPLv3)" +LICENSE_${PN}-bin = "GPLv3+" + +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-extended/libidn/libidn_1.33.bb b/poky/meta/recipes-extended/libidn/libidn_1.35.bb index 9e8bdbae1..d5ce5b46b 100644 --- a/poky/meta/recipes-extended/libidn/libidn_1.33.bb +++ b/poky/meta/recipes-extended/libidn/libidn_1.35.bb @@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=df4be47940a91ee69556f5f71eed4aec \ file://COPYINGv3;md5=d32239bcb673463ab874e80d47fae504 \ file://lib/idna.h;endline=21;md5=37cffad24807f446a24de3e7371f20b9 \ file://src/idn.c;endline=20;md5=09e97034a8877b3451cb65065fc2c06e" -DEPENDS = "virtual/libiconv" +DEPENDS = "virtual/libiconv autoconf-archive" inherit pkgconfig autotools gettext texinfo gtk-doc @@ -18,13 +18,11 @@ SRC_URI = "${GNU_MIRROR}/libidn/${BPN}-${PV}.tar.gz \ file://libidn_fix_for_automake-1.12.patch \ file://avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch \ file://dont-depend-on-help2man.patch \ - file://0001-idn-fix-printf-format-security-warnings.patch \ - file://gcc7-compatibility.patch \ file://0001-idn-format-security-warnings.patch \ -" + " -SRC_URI[md5sum] = "a9aa7e003665de9c82bd3f9fc6ccf308" -SRC_URI[sha256sum] = "44a7aab635bb721ceef6beecc4d49dfd19478325e1b47f3196f7d2acc4930e19" +SRC_URI[md5sum] = "bef634141fe39326cb354b75e891fead" +SRC_URI[sha256sum] = "f11af1005b46b7b15d057d7f107315a1ad46935c7fcdf243c16e46ec14f0fe1e" # command tool is under GPLv3+, while libidn itself is under LGPLv2.1+ or LGPLv3 # so package command into a separate package diff --git a/poky/meta/recipes-extended/libnsl/libnsl2/0001-include-sys-cdefs.h-explicitly.patch b/poky/meta/recipes-extended/libnsl/libnsl2/0001-include-sys-cdefs.h-explicitly.patch deleted file mode 100644 index bd647ac55..000000000 --- a/poky/meta/recipes-extended/libnsl/libnsl2/0001-include-sys-cdefs.h-explicitly.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 508a0ff690dfebc17c4f55a5f81824ed549bed66 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 18 Apr 2017 09:13:33 -0700 -Subject: [PATCH 1/2] include sys/cdefs.h explicitly - -glibc includes this header indirectly but not musl - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - - src/rpcsvc/nis.h | 1 + - src/rpcsvc/nislib.h | 1 + - src/rpcsvc/ypclnt.h | 1 + - src/rpcsvc/ypupd.h | 1 + - 4 files changed, 4 insertions(+) - -diff --git a/src/rpcsvc/nis.h b/src/rpcsvc/nis.h -index 933c4d9..88cbca0 100644 ---- a/src/rpcsvc/nis.h -+++ b/src/rpcsvc/nis.h -@@ -32,6 +32,7 @@ - #ifndef _RPCSVC_NIS_H - #define _RPCSVC_NIS_H 1 - -+#include <sys/cdefs.h> - #include <features.h> - #include <rpc/rpc.h> - #include <rpcsvc/nis_tags.h> -diff --git a/src/rpcsvc/nislib.h b/src/rpcsvc/nislib.h -index a59c19b..a53fab3 100644 ---- a/src/rpcsvc/nislib.h -+++ b/src/rpcsvc/nislib.h -@@ -19,6 +19,7 @@ - #ifndef __RPCSVC_NISLIB_H__ - #define __RPCSVC_NISLIB_H__ - -+#include <sys/cdefs.h> - #include <features.h> - - __BEGIN_DECLS -diff --git a/src/rpcsvc/ypclnt.h b/src/rpcsvc/ypclnt.h -index fe43fd4..a686b61 100644 ---- a/src/rpcsvc/ypclnt.h -+++ b/src/rpcsvc/ypclnt.h -@@ -20,6 +20,7 @@ - #ifndef __RPCSVC_YPCLNT_H__ - #define __RPCSVC_YPCLNT_H__ - -+#include <sys/cdefs.h> - #include <features.h> - - /* Some defines */ -diff --git a/src/rpcsvc/ypupd.h b/src/rpcsvc/ypupd.h -index d07fd4d..2c57301 100644 ---- a/src/rpcsvc/ypupd.h -+++ b/src/rpcsvc/ypupd.h -@@ -33,6 +33,7 @@ - #ifndef __RPCSVC_YPUPD_H__ - #define __RPCSVC_YPUPD_H__ - -+#include <sys/cdefs.h> - #include <features.h> - - #include <rpc/rpc.h> --- -2.12.2 - diff --git a/poky/meta/recipes-extended/libnsl/libnsl2/0001-nis_call.c-Include-stdint.h-for-uintptr_t-definition.patch b/poky/meta/recipes-extended/libnsl/libnsl2/0001-nis_call.c-Include-stdint.h-for-uintptr_t-definition.patch deleted file mode 100644 index e9ae51710..000000000 --- a/poky/meta/recipes-extended/libnsl/libnsl2/0001-nis_call.c-Include-stdint.h-for-uintptr_t-definition.patch +++ /dev/null @@ -1,27 +0,0 @@ -From d71cbeb3b76e54778a4d5eec6d387cce653537ca Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 9 Jun 2017 09:49:35 -0700 -Subject: [PATCH] nis_call.c: Include stdint.h for uintptr_t definition - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - - src/nisplus/nis_call.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/nisplus/nis_call.c b/src/nisplus/nis_call.c -index 1a2b90c..1dc982d 100644 ---- a/src/nisplus/nis_call.c -+++ b/src/nisplus/nis_call.c -@@ -23,6 +23,7 @@ - #include <errno.h> - #include <fcntl.h> - #include <string.h> -+#include <stdint.h> - #include <libintl.h> - #include <rpc/rpc.h> - #include <rpc/auth.h> --- -2.13.1 - diff --git a/poky/meta/recipes-extended/libnsl/libnsl2/0002-Define-glibc-specific-macros.patch b/poky/meta/recipes-extended/libnsl/libnsl2/0002-Define-glibc-specific-macros.patch deleted file mode 100644 index 75fda4b0f..000000000 --- a/poky/meta/recipes-extended/libnsl/libnsl2/0002-Define-glibc-specific-macros.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 60282514ea01af004d7f9e66dd3929223b7d2e7b Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 18 Apr 2017 09:16:12 -0700 -Subject: [PATCH 2/2] Define glibc specific macros - -Check and define -rawmemchr, __asprintf, __mempcpy, __strtok_r -__always_inline, TEMP_FAILURE_RETRY - -if not existing. Helps compiling with musl - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - -diff --git a/src/rpcsvc/nis.h b/src/rpcsvc/nis.h -index 88cbca0..23fc20c 100644 ---- a/src/rpcsvc/nis.h -+++ b/src/rpcsvc/nis.h -@@ -57,6 +57,34 @@ __BEGIN_DECLS - * <kukuk@suse.de> - */ - -+#ifndef rawmemchr -+#define rawmemchr(s,c) memchr((s),(size_t)-1,(c)) -+#endif -+ -+#ifndef __asprintf -+#define __asprintf asprintf -+#endif -+ -+#ifndef __mempcpy -+#define __mempcpy mempcpy -+#endif -+ -+#ifndef __strtok_r -+#define __strtok_r strtok_r -+#endif -+ -+#ifndef __always_inline -+#define __always_inline __attribute__((__always_inline__)) -+#endif -+ -+#ifndef TEMP_FAILURE_RETRY -+#define TEMP_FAILURE_RETRY(exp) ({ \ -+typeof (exp) _rc; \ -+ do { \ -+ _rc = (exp); \ -+ } while (_rc == -1 && errno == EINTR); \ -+ _rc; }) -+#endif - - #ifndef __nis_object_h - #define __nis_object_h --- -2.12.2 - diff --git a/poky/meta/recipes-extended/libnsl/libnsl2_git.bb b/poky/meta/recipes-extended/libnsl/libnsl2_git.bb index a539148ca..c3a24face 100644 --- a/poky/meta/recipes-extended/libnsl/libnsl2_git.bb +++ b/poky/meta/recipes-extended/libnsl/libnsl2_git.bb @@ -9,29 +9,16 @@ LICENSE = "LGPL-2.1" LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" SECTION = "libs" DEPENDS = "libtirpc" -DEPENDS_append_libc-musl = " bsd-headers" -PV = "1.0.5+git${SRCPV}" +PV = "1.2.0+git${SRCPV}" -SRCREV = "dfa2f313524aff9243c4d8ce1bace73786478356" +SRCREV = "37c5ffe3038d42e9fa9ed232ad2cbca4d8f14681" SRC_URI = "git://github.com/thkukuk/libnsl \ - file://0001-include-sys-cdefs.h-explicitly.patch \ - file://0002-Define-glibc-specific-macros.patch \ - file://0001-nis_call.c-Include-stdint.h-for-uintptr_t-definition.patch \ " S = "${WORKDIR}/git" inherit autotools pkgconfig gettext -EXTRA_OECONF += "--libdir=${libdir}/nsl --includedir=${includedir}/nsl" - -do_install_append() { - install -d ${D}${libdir} - mv ${D}${libdir}/nsl/pkgconfig ${D}${libdir} -} - -FILES_${PN} += "${libdir}/nsl/*.so.*" -FILES_${PN}-dev += "${includedir}/nsl ${libdir}/nsl/*.so" -FILES_${PN}-staticdev += "${libdir}/nsl/*.a" +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-extended/libnss-nis/libnss-nis.bb b/poky/meta/recipes-extended/libnss-nis/libnss-nis.bb new file mode 100644 index 000000000..47447acd6 --- /dev/null +++ b/poky/meta/recipes-extended/libnss-nis/libnss-nis.bb @@ -0,0 +1,31 @@ +# Copyright (C) 2018 Khem Raj <raj.khem@gmail.com> +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "NSS module for glibc, to provide NIS support for glibc" + +DESCRIPTION = "This package contains the NSS NIS plugin for glibc.\ +This code was formerly part of glibc, but is now standalone to\ +be able to link against TI-RPC for IPv6 support." + +HOMEPAGE = "https://github.com/thkukuk/libnss_nis" +LICENSE = "LGPL-2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" +SECTION = "libs" +DEPENDS += "libtirpc libnsl2" + +PV = "3.0+git${SRCPV}" + +SRCREV = "d4aea48657a8e90d7922574b8021ee03915a36cb" + +SRC_URI = "git://github.com/thkukuk/libnss_nis \ + " + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig + +BBCLASSEXTEND += "native nativesdk" +# +# We will skip parsing this packagegeoup for non-glibc systems +# +COMPATIBLE_HOST_libc-musl = 'null' diff --git a/poky/meta/recipes-extended/libsolv/libsolv_0.6.33.bb b/poky/meta/recipes-extended/libsolv/libsolv_0.6.35.bb index 0401ced24..12dfc5d3a 100644 --- a/poky/meta/recipes-extended/libsolv/libsolv_0.6.33.bb +++ b/poky/meta/recipes-extended/libsolv/libsolv_0.6.35.bb @@ -5,22 +5,24 @@ SECTION = "devel" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8" -DEPENDS = "expat zlib rpm" +DEPENDS = "expat zlib" -SRC_URI = "git://github.com/openSUSE/libsolv.git \ - " +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 \ " -SRCREV = "69f1803978ba7a46a57928fa4be6430792419e4e" +SRCREV = "38c5374d4712667b0b6ada4bf78ddbb343095d0c" UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)" S = "${WORKDIR}/git" inherit cmake -EXTRA_OECMAKE = "-DLIB=${baselib} -DMULTI_SEMANTICS=ON -DENABLE_RPMMD=ON -DENABLE_RPMDB=ON -DENABLE_COMPLEX_DEPS=ON" +PACKAGECONFIG ??= "rpm" +PACKAGECONFIG[rpm] = "-DENABLE_RPMMD=ON -DENABLE_RPMDB=ON,,rpm" + +EXTRA_OECMAKE = "-DLIB=${baselib} -DMULTI_SEMANTICS=ON -DENABLE_COMPLEX_DEPS=ON" PACKAGES =+ "${PN}-tools ${PN}ext" diff --git a/poky/meta/recipes-extended/libtirpc/libtirpc/0001-include-stdint.h-for-uintptr_t.patch b/poky/meta/recipes-extended/libtirpc/libtirpc/0001-include-stdint.h-for-uintptr_t.patch deleted file mode 100644 index 7e3e2f86a..000000000 --- a/poky/meta/recipes-extended/libtirpc/libtirpc/0001-include-stdint.h-for-uintptr_t.patch +++ /dev/null @@ -1,29 +0,0 @@ -Upstream-Status: Backport -Signed-off-by: Ross Burton <ross.burton@intel.com> - -From acb9a37977cf0a9630eac74af9adebf35e38e719 Mon Sep 17 00:00:00 2001 -From: Thorsten Kukuk <kukuk@thkukuk.de> -Date: Tue, 14 Nov 2017 10:39:08 -0500 -Subject: [PATCH] Include stdint.h from xdr_sizeof.c to avoid missing - declaration errors. - -Signed-off-by: Thorsten Kukuk <kukuk@suse.de> -Signed-off-by: Steve Dickson <steved@redhat.com> ---- - src/xdr_sizeof.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/xdr_sizeof.c b/src/xdr_sizeof.c -index d23fbd1..79d6707 100644 ---- a/src/xdr_sizeof.c -+++ b/src/xdr_sizeof.c -@@ -39,6 +39,7 @@ - #include <rpc/xdr.h> - #include <sys/types.h> - #include <stdlib.h> -+#include <stdint.h> - #include "un-namespace.h" - - /* ARGSUSED */ --- -1.8.3.1 diff --git a/poky/meta/recipes-extended/libtirpc/libtirpc/0001-replace-__bzero-with-memset-API.patch b/poky/meta/recipes-extended/libtirpc/libtirpc/0001-replace-__bzero-with-memset-API.patch deleted file mode 100644 index 7ae19cb31..000000000 --- a/poky/meta/recipes-extended/libtirpc/libtirpc/0001-replace-__bzero-with-memset-API.patch +++ /dev/null @@ -1,64 +0,0 @@ -Upstream-Status: Backport -Signed-off-by: Ross Burton <ross.burton@intel.com> - -From 5356b63005e9d8169e0399cb76f26fbd29a78dee Mon Sep 17 00:00:00 2001 -From: Joshua Kinard <kumba@gentoo.org> -Date: Wed, 23 Aug 2017 14:31:36 -0400 -Subject: [PATCH] Replace bzero() calls with equivalent memset() calls - -As annotated in the bzero(3) man page, bzero() was marked as LEGACY in -POSIX.1-2001 and removed in POSIX.1-2008, and should be replaced with -memset() calls to write zeros to a memory region. The attached patch -replaces two bzero() calls and one __bzero() call in libtirpc with -equivalent memset() calls. The latter replacement fixes a compile error -under uclibc-ng, which lacks a definition for __bzero() - -Signed-off-by: Joshua Kinard <kumba@gentoo.org> -Signed-off-by: Steve Dickson <steved@redhat.com> ---- - src/auth_time.c | 2 +- - src/des_impl.c | 2 +- - src/svc_auth_des.c | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/auth_time.c b/src/auth_time.c -index 7f83ab4..69400bc 100644 ---- a/src/auth_time.c -+++ b/src/auth_time.c -@@ -317,7 +317,7 @@ __rpc_get_time_offset(td, srv, thost, uaddr, netid) - sprintf(ipuaddr, "%d.%d.%d.%d.0.111", a1, a2, a3, a4); - useua = &ipuaddr[0]; - -- bzero((char *)&sin, sizeof(sin)); -+ memset(&sin, 0, sizeof(sin)); - if (uaddr_to_sockaddr(useua, &sin)) { - msg("unable to translate uaddr to sockaddr."); - if (needfree) -diff --git a/src/des_impl.c b/src/des_impl.c -index 9dbccaf..15bec2a 100644 ---- a/src/des_impl.c -+++ b/src/des_impl.c -@@ -588,7 +588,7 @@ _des_crypt (char *buf, unsigned len, struct desparams *desp) - } - tin0 = tin1 = tout0 = tout1 = xor0 = xor1 = 0; - tbuf[0] = tbuf[1] = 0; -- __bzero (schedule, sizeof (schedule)); -+ memset (schedule, 0, sizeof (schedule)); - - return (1); - } -diff --git a/src/svc_auth_des.c b/src/svc_auth_des.c -index 2e90146..19a7c60 100644 ---- a/src/svc_auth_des.c -+++ b/src/svc_auth_des.c -@@ -356,7 +356,7 @@ cache_init() - - authdes_cache = (struct cache_entry *) - mem_alloc(sizeof(struct cache_entry) * AUTHDES_CACHESZ); -- bzero((char *)authdes_cache, -+ memset(authdes_cache, 0, - sizeof(struct cache_entry) * AUTHDES_CACHESZ); - - authdes_lru = (short *)mem_alloc(sizeof(short) * AUTHDES_CACHESZ); --- -1.8.3.1 diff --git a/poky/meta/recipes-extended/libtirpc/libtirpc/Use-netbsd-queue.h.patch b/poky/meta/recipes-extended/libtirpc/libtirpc/Use-netbsd-queue.h.patch deleted file mode 100644 index f93223feb..000000000 --- a/poky/meta/recipes-extended/libtirpc/libtirpc/Use-netbsd-queue.h.patch +++ /dev/null @@ -1,878 +0,0 @@ -musl does not provide sys/queue.h implementation. Borrow queue.h from -the NetBSD project -http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/queue.h?rev=1.68 - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks> -Signed-off-by: Maxin B. John <maxin.john@intel.com> ---- -diff -Naur libtirpc-1.0.1-orig/src/clnt_bcast.c libtirpc-1.0.1/src/clnt_bcast.c ---- libtirpc-1.0.1-orig/src/clnt_bcast.c 2015-10-30 17:15:14.000000000 +0200 -+++ libtirpc-1.0.1/src/clnt_bcast.c 2015-12-21 17:03:52.066008311 +0200 -@@ -40,7 +40,6 @@ - */ - #include <sys/socket.h> - #include <sys/types.h> --#include <sys/queue.h> - - #include <net/if.h> - #include <netinet/in.h> -@@ -62,6 +61,7 @@ - #include <err.h> - #include <string.h> - -+#include "queue.h" - #include "rpc_com.h" - #include "debug.h" - -diff -Naur libtirpc-1.0.1-orig/tirpc/queue.h libtirpc-1.0.1/tirpc/queue.h ---- libtirpc-1.0.1-orig/tirpc/queue.h 1970-01-01 02:00:00.000000000 +0200 -+++ libtirpc-1.0.1/tirpc/queue.h 2015-12-21 17:02:44.427853905 +0200 -@@ -0,0 +1,846 @@ -+/* $NetBSD: queue.h,v 1.68 2014/11/19 08:10:01 uebayasi Exp $ */ -+ -+/* -+ * Copyright (c) 1991, 1993 -+ * The Regents of the University of California. All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * 2. Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * 3. Neither the name of the University nor the names of its contributors -+ * may be used to endorse or promote products derived from this software -+ * without specific prior written permission. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -+ * SUCH DAMAGE. -+ * -+ * @(#)queue.h 8.5 (Berkeley) 8/20/94 -+ */ -+ -+#ifndef _SYS_QUEUE_H_ -+#define _SYS_QUEUE_H_ -+ -+/* -+ * This file defines five types of data structures: singly-linked lists, -+ * lists, simple queues, tail queues, and circular queues. -+ * -+ * A singly-linked list is headed by a single forward pointer. The -+ * elements are singly linked for minimum space and pointer manipulation -+ * overhead at the expense of O(n) removal for arbitrary elements. New -+ * elements can be added to the list after an existing element or at the -+ * head of the list. Elements being removed from the head of the list -+ * should use the explicit macro for this purpose for optimum -+ * efficiency. A singly-linked list may only be traversed in the forward -+ * direction. Singly-linked lists are ideal for applications with large -+ * datasets and few or no removals or for implementing a LIFO queue. -+ * -+ * A list is headed by a single forward pointer (or an array of forward -+ * pointers for a hash table header). The elements are doubly linked -+ * so that an arbitrary element can be removed without a need to -+ * traverse the list. New elements can be added to the list before -+ * or after an existing element or at the head of the list. A list -+ * may only be traversed in the forward direction. -+ * -+ * A simple queue is headed by a pair of pointers, one the head of the -+ * list and the other to the tail of the list. The elements are singly -+ * linked to save space, so elements can only be removed from the -+ * head of the list. New elements can be added to the list after -+ * an existing element, at the head of the list, or at the end of the -+ * list. A simple queue may only be traversed in the forward direction. -+ * -+ * A tail queue is headed by a pair of pointers, one to the head of the -+ * list and the other to the tail of the list. The elements are doubly -+ * linked so that an arbitrary element can be removed without a need to -+ * traverse the list. New elements can be added to the list before or -+ * after an existing element, at the head of the list, or at the end of -+ * the list. A tail queue may be traversed in either direction. -+ * -+ * A circle queue is headed by a pair of pointers, one to the head of the -+ * list and the other to the tail of the list. The elements are doubly -+ * linked so that an arbitrary element can be removed without a need to -+ * traverse the list. New elements can be added to the list before or after -+ * an existing element, at the head of the list, or at the end of the list. -+ * A circle queue may be traversed in either direction, but has a more -+ * complex end of list detection. -+ * -+ * For details on the use of these macros, see the queue(3) manual page. -+ */ -+ -+/* -+ * Include the definition of NULL only on NetBSD because sys/null.h -+ * is not available elsewhere. This conditional makes the header -+ * portable and it can simply be dropped verbatim into any system. -+ * The caveat is that on other systems some other header -+ * must provide NULL before the macros can be used. -+ */ -+#ifdef __NetBSD__ -+#include <sys/null.h> -+#endif -+ -+#if defined(QUEUEDEBUG) -+# if defined(_KERNEL) -+# define QUEUEDEBUG_ABORT(...) panic(__VA_ARGS__) -+# else -+# include <err.h> -+# define QUEUEDEBUG_ABORT(...) err(1, __VA_ARGS__) -+# endif -+#endif -+ -+/* -+ * Singly-linked List definitions. -+ */ -+#define SLIST_HEAD(name, type) \ -+struct name { \ -+ struct type *slh_first; /* first element */ \ -+} -+ -+#define SLIST_HEAD_INITIALIZER(head) \ -+ { NULL } -+ -+#define SLIST_ENTRY(type) \ -+struct { \ -+ struct type *sle_next; /* next element */ \ -+} -+ -+/* -+ * Singly-linked List access methods. -+ */ -+#define SLIST_FIRST(head) ((head)->slh_first) -+#define SLIST_END(head) NULL -+#define SLIST_EMPTY(head) ((head)->slh_first == NULL) -+#define SLIST_NEXT(elm, field) ((elm)->field.sle_next) -+ -+#define SLIST_FOREACH(var, head, field) \ -+ for((var) = (head)->slh_first; \ -+ (var) != SLIST_END(head); \ -+ (var) = (var)->field.sle_next) -+ -+#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = SLIST_FIRST((head)); \ -+ (var) != SLIST_END(head) && \ -+ ((tvar) = SLIST_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ -+/* -+ * Singly-linked List functions. -+ */ -+#define SLIST_INIT(head) do { \ -+ (head)->slh_first = SLIST_END(head); \ -+} while (/*CONSTCOND*/0) -+ -+#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \ -+ (elm)->field.sle_next = (slistelm)->field.sle_next; \ -+ (slistelm)->field.sle_next = (elm); \ -+} while (/*CONSTCOND*/0) -+ -+#define SLIST_INSERT_HEAD(head, elm, field) do { \ -+ (elm)->field.sle_next = (head)->slh_first; \ -+ (head)->slh_first = (elm); \ -+} while (/*CONSTCOND*/0) -+ -+#define SLIST_REMOVE_AFTER(slistelm, field) do { \ -+ (slistelm)->field.sle_next = \ -+ SLIST_NEXT(SLIST_NEXT((slistelm), field), field); \ -+} while (/*CONSTCOND*/0) -+ -+#define SLIST_REMOVE_HEAD(head, field) do { \ -+ (head)->slh_first = (head)->slh_first->field.sle_next; \ -+} while (/*CONSTCOND*/0) -+ -+#define SLIST_REMOVE(head, elm, type, field) do { \ -+ if ((head)->slh_first == (elm)) { \ -+ SLIST_REMOVE_HEAD((head), field); \ -+ } \ -+ else { \ -+ struct type *curelm = (head)->slh_first; \ -+ while(curelm->field.sle_next != (elm)) \ -+ curelm = curelm->field.sle_next; \ -+ curelm->field.sle_next = \ -+ curelm->field.sle_next->field.sle_next; \ -+ } \ -+} while (/*CONSTCOND*/0) -+ -+ -+/* -+ * List definitions. -+ */ -+#define LIST_HEAD(name, type) \ -+struct name { \ -+ struct type *lh_first; /* first element */ \ -+} -+ -+#define LIST_HEAD_INITIALIZER(head) \ -+ { NULL } -+ -+#define LIST_ENTRY(type) \ -+struct { \ -+ struct type *le_next; /* next element */ \ -+ struct type **le_prev; /* address of previous next element */ \ -+} -+ -+/* -+ * List access methods. -+ */ -+#define LIST_FIRST(head) ((head)->lh_first) -+#define LIST_END(head) NULL -+#define LIST_EMPTY(head) ((head)->lh_first == LIST_END(head)) -+#define LIST_NEXT(elm, field) ((elm)->field.le_next) -+ -+#define LIST_FOREACH(var, head, field) \ -+ for ((var) = ((head)->lh_first); \ -+ (var) != LIST_END(head); \ -+ (var) = ((var)->field.le_next)) -+ -+#define LIST_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = LIST_FIRST((head)); \ -+ (var) != LIST_END(head) && \ -+ ((tvar) = LIST_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ -+#define LIST_MOVE(head1, head2) do { \ -+ LIST_INIT((head2)); \ -+ if (!LIST_EMPTY((head1))) { \ -+ (head2)->lh_first = (head1)->lh_first; \ -+ LIST_INIT((head1)); \ -+ } \ -+} while (/*CONSTCOND*/0) -+ -+/* -+ * List functions. -+ */ -+#if defined(QUEUEDEBUG) -+#define QUEUEDEBUG_LIST_INSERT_HEAD(head, elm, field) \ -+ if ((head)->lh_first && \ -+ (head)->lh_first->field.le_prev != &(head)->lh_first) \ -+ QUEUEDEBUG_ABORT("LIST_INSERT_HEAD %p %s:%d", (head), \ -+ __FILE__, __LINE__); -+#define QUEUEDEBUG_LIST_OP(elm, field) \ -+ if ((elm)->field.le_next && \ -+ (elm)->field.le_next->field.le_prev != \ -+ &(elm)->field.le_next) \ -+ QUEUEDEBUG_ABORT("LIST_* forw %p %s:%d", (elm), \ -+ __FILE__, __LINE__); \ -+ if (*(elm)->field.le_prev != (elm)) \ -+ QUEUEDEBUG_ABORT("LIST_* back %p %s:%d", (elm), \ -+ __FILE__, __LINE__); -+#define QUEUEDEBUG_LIST_POSTREMOVE(elm, field) \ -+ (elm)->field.le_next = (void *)1L; \ -+ (elm)->field.le_prev = (void *)1L; -+#else -+#define QUEUEDEBUG_LIST_INSERT_HEAD(head, elm, field) -+#define QUEUEDEBUG_LIST_OP(elm, field) -+#define QUEUEDEBUG_LIST_POSTREMOVE(elm, field) -+#endif -+ -+#define LIST_INIT(head) do { \ -+ (head)->lh_first = LIST_END(head); \ -+} while (/*CONSTCOND*/0) -+ -+#define LIST_INSERT_AFTER(listelm, elm, field) do { \ -+ QUEUEDEBUG_LIST_OP((listelm), field) \ -+ if (((elm)->field.le_next = (listelm)->field.le_next) != \ -+ LIST_END(head)) \ -+ (listelm)->field.le_next->field.le_prev = \ -+ &(elm)->field.le_next; \ -+ (listelm)->field.le_next = (elm); \ -+ (elm)->field.le_prev = &(listelm)->field.le_next; \ -+} while (/*CONSTCOND*/0) -+ -+#define LIST_INSERT_BEFORE(listelm, elm, field) do { \ -+ QUEUEDEBUG_LIST_OP((listelm), field) \ -+ (elm)->field.le_prev = (listelm)->field.le_prev; \ -+ (elm)->field.le_next = (listelm); \ -+ *(listelm)->field.le_prev = (elm); \ -+ (listelm)->field.le_prev = &(elm)->field.le_next; \ -+} while (/*CONSTCOND*/0) -+ -+#define LIST_INSERT_HEAD(head, elm, field) do { \ -+ QUEUEDEBUG_LIST_INSERT_HEAD((head), (elm), field) \ -+ if (((elm)->field.le_next = (head)->lh_first) != LIST_END(head))\ -+ (head)->lh_first->field.le_prev = &(elm)->field.le_next;\ -+ (head)->lh_first = (elm); \ -+ (elm)->field.le_prev = &(head)->lh_first; \ -+} while (/*CONSTCOND*/0) -+ -+#define LIST_REMOVE(elm, field) do { \ -+ QUEUEDEBUG_LIST_OP((elm), field) \ -+ if ((elm)->field.le_next != NULL) \ -+ (elm)->field.le_next->field.le_prev = \ -+ (elm)->field.le_prev; \ -+ *(elm)->field.le_prev = (elm)->field.le_next; \ -+ QUEUEDEBUG_LIST_POSTREMOVE((elm), field) \ -+} while (/*CONSTCOND*/0) -+ -+#define LIST_REPLACE(elm, elm2, field) do { \ -+ if (((elm2)->field.le_next = (elm)->field.le_next) != NULL) \ -+ (elm2)->field.le_next->field.le_prev = \ -+ &(elm2)->field.le_next; \ -+ (elm2)->field.le_prev = (elm)->field.le_prev; \ -+ *(elm2)->field.le_prev = (elm2); \ -+ QUEUEDEBUG_LIST_POSTREMOVE((elm), field) \ -+} while (/*CONSTCOND*/0) -+ -+/* -+ * Simple queue definitions. -+ */ -+#define SIMPLEQ_HEAD(name, type) \ -+struct name { \ -+ struct type *sqh_first; /* first element */ \ -+ struct type **sqh_last; /* addr of last next element */ \ -+} -+ -+#define SIMPLEQ_HEAD_INITIALIZER(head) \ -+ { NULL, &(head).sqh_first } -+ -+#define SIMPLEQ_ENTRY(type) \ -+struct { \ -+ struct type *sqe_next; /* next element */ \ -+} -+ -+/* -+ * Simple queue access methods. -+ */ -+#define SIMPLEQ_FIRST(head) ((head)->sqh_first) -+#define SIMPLEQ_END(head) NULL -+#define SIMPLEQ_EMPTY(head) ((head)->sqh_first == SIMPLEQ_END(head)) -+#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next) -+ -+#define SIMPLEQ_FOREACH(var, head, field) \ -+ for ((var) = ((head)->sqh_first); \ -+ (var) != SIMPLEQ_END(head); \ -+ (var) = ((var)->field.sqe_next)) -+ -+#define SIMPLEQ_FOREACH_SAFE(var, head, field, next) \ -+ for ((var) = ((head)->sqh_first); \ -+ (var) != SIMPLEQ_END(head) && \ -+ ((next = ((var)->field.sqe_next)), 1); \ -+ (var) = (next)) -+ -+/* -+ * Simple queue functions. -+ */ -+#define SIMPLEQ_INIT(head) do { \ -+ (head)->sqh_first = NULL; \ -+ (head)->sqh_last = &(head)->sqh_first; \ -+} while (/*CONSTCOND*/0) -+ -+#define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \ -+ if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \ -+ (head)->sqh_last = &(elm)->field.sqe_next; \ -+ (head)->sqh_first = (elm); \ -+} while (/*CONSTCOND*/0) -+ -+#define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \ -+ (elm)->field.sqe_next = NULL; \ -+ *(head)->sqh_last = (elm); \ -+ (head)->sqh_last = &(elm)->field.sqe_next; \ -+} while (/*CONSTCOND*/0) -+ -+#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ -+ if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\ -+ (head)->sqh_last = &(elm)->field.sqe_next; \ -+ (listelm)->field.sqe_next = (elm); \ -+} while (/*CONSTCOND*/0) -+ -+#define SIMPLEQ_REMOVE_HEAD(head, field) do { \ -+ if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \ -+ (head)->sqh_last = &(head)->sqh_first; \ -+} while (/*CONSTCOND*/0) -+ -+#define SIMPLEQ_REMOVE_AFTER(head, elm, field) do { \ -+ if (((elm)->field.sqe_next = (elm)->field.sqe_next->field.sqe_next) \ -+ == NULL) \ -+ (head)->sqh_last = &(elm)->field.sqe_next; \ -+} while (/*CONSTCOND*/0) -+ -+#define SIMPLEQ_REMOVE(head, elm, type, field) do { \ -+ if ((head)->sqh_first == (elm)) { \ -+ SIMPLEQ_REMOVE_HEAD((head), field); \ -+ } else { \ -+ struct type *curelm = (head)->sqh_first; \ -+ while (curelm->field.sqe_next != (elm)) \ -+ curelm = curelm->field.sqe_next; \ -+ if ((curelm->field.sqe_next = \ -+ curelm->field.sqe_next->field.sqe_next) == NULL) \ -+ (head)->sqh_last = &(curelm)->field.sqe_next; \ -+ } \ -+} while (/*CONSTCOND*/0) -+ -+#define SIMPLEQ_CONCAT(head1, head2) do { \ -+ if (!SIMPLEQ_EMPTY((head2))) { \ -+ *(head1)->sqh_last = (head2)->sqh_first; \ -+ (head1)->sqh_last = (head2)->sqh_last; \ -+ SIMPLEQ_INIT((head2)); \ -+ } \ -+} while (/*CONSTCOND*/0) -+ -+#define SIMPLEQ_LAST(head, type, field) \ -+ (SIMPLEQ_EMPTY((head)) ? \ -+ NULL : \ -+ ((struct type *)(void *) \ -+ ((char *)((head)->sqh_last) - offsetof(struct type, field)))) -+ -+/* -+ * Tail queue definitions. -+ */ -+#define _TAILQ_HEAD(name, type, qual) \ -+struct name { \ -+ qual type *tqh_first; /* first element */ \ -+ qual type *qual *tqh_last; /* addr of last next element */ \ -+} -+#define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type,) -+ -+#define TAILQ_HEAD_INITIALIZER(head) \ -+ { TAILQ_END(head), &(head).tqh_first } -+ -+#define _TAILQ_ENTRY(type, qual) \ -+struct { \ -+ qual type *tqe_next; /* next element */ \ -+ qual type *qual *tqe_prev; /* address of previous next element */\ -+} -+#define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type,) -+ -+/* -+ * Tail queue access methods. -+ */ -+#define TAILQ_FIRST(head) ((head)->tqh_first) -+#define TAILQ_END(head) (NULL) -+#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) -+#define TAILQ_LAST(head, headname) \ -+ (*(((struct headname *)((head)->tqh_last))->tqh_last)) -+#define TAILQ_PREV(elm, headname, field) \ -+ (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) -+#define TAILQ_EMPTY(head) (TAILQ_FIRST(head) == TAILQ_END(head)) -+ -+ -+#define TAILQ_FOREACH(var, head, field) \ -+ for ((var) = ((head)->tqh_first); \ -+ (var) != TAILQ_END(head); \ -+ (var) = ((var)->field.tqe_next)) -+ -+#define TAILQ_FOREACH_SAFE(var, head, field, next) \ -+ for ((var) = ((head)->tqh_first); \ -+ (var) != TAILQ_END(head) && \ -+ ((next) = TAILQ_NEXT(var, field), 1); (var) = (next)) -+ -+#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ -+ for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last));\ -+ (var) != TAILQ_END(head); \ -+ (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) -+ -+#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, prev) \ -+ for ((var) = TAILQ_LAST((head), headname); \ -+ (var) != TAILQ_END(head) && \ -+ ((prev) = TAILQ_PREV((var), headname, field), 1); (var) = (prev)) -+ -+/* -+ * Tail queue functions. -+ */ -+#if defined(QUEUEDEBUG) -+#define QUEUEDEBUG_TAILQ_INSERT_HEAD(head, elm, field) \ -+ if ((head)->tqh_first && \ -+ (head)->tqh_first->field.tqe_prev != &(head)->tqh_first) \ -+ QUEUEDEBUG_ABORT("TAILQ_INSERT_HEAD %p %s:%d", (head), \ -+ __FILE__, __LINE__); -+#define QUEUEDEBUG_TAILQ_INSERT_TAIL(head, elm, field) \ -+ if (*(head)->tqh_last != NULL) \ -+ QUEUEDEBUG_ABORT("TAILQ_INSERT_TAIL %p %s:%d", (head), \ -+ __FILE__, __LINE__); -+#define QUEUEDEBUG_TAILQ_OP(elm, field) \ -+ if ((elm)->field.tqe_next && \ -+ (elm)->field.tqe_next->field.tqe_prev != \ -+ &(elm)->field.tqe_next) \ -+ QUEUEDEBUG_ABORT("TAILQ_* forw %p %s:%d", (elm), \ -+ __FILE__, __LINE__); \ -+ if (*(elm)->field.tqe_prev != (elm)) \ -+ QUEUEDEBUG_ABORT("TAILQ_* back %p %s:%d", (elm), \ -+ __FILE__, __LINE__); -+#define QUEUEDEBUG_TAILQ_PREREMOVE(head, elm, field) \ -+ if ((elm)->field.tqe_next == NULL && \ -+ (head)->tqh_last != &(elm)->field.tqe_next) \ -+ QUEUEDEBUG_ABORT("TAILQ_PREREMOVE head %p elm %p %s:%d",\ -+ (head), (elm), __FILE__, __LINE__); -+#define QUEUEDEBUG_TAILQ_POSTREMOVE(elm, field) \ -+ (elm)->field.tqe_next = (void *)1L; \ -+ (elm)->field.tqe_prev = (void *)1L; -+#else -+#define QUEUEDEBUG_TAILQ_INSERT_HEAD(head, elm, field) -+#define QUEUEDEBUG_TAILQ_INSERT_TAIL(head, elm, field) -+#define QUEUEDEBUG_TAILQ_OP(elm, field) -+#define QUEUEDEBUG_TAILQ_PREREMOVE(head, elm, field) -+#define QUEUEDEBUG_TAILQ_POSTREMOVE(elm, field) -+#endif -+ -+#define TAILQ_INIT(head) do { \ -+ (head)->tqh_first = TAILQ_END(head); \ -+ (head)->tqh_last = &(head)->tqh_first; \ -+} while (/*CONSTCOND*/0) -+ -+#define TAILQ_INSERT_HEAD(head, elm, field) do { \ -+ QUEUEDEBUG_TAILQ_INSERT_HEAD((head), (elm), field) \ -+ if (((elm)->field.tqe_next = (head)->tqh_first) != TAILQ_END(head))\ -+ (head)->tqh_first->field.tqe_prev = \ -+ &(elm)->field.tqe_next; \ -+ else \ -+ (head)->tqh_last = &(elm)->field.tqe_next; \ -+ (head)->tqh_first = (elm); \ -+ (elm)->field.tqe_prev = &(head)->tqh_first; \ -+} while (/*CONSTCOND*/0) -+ -+#define TAILQ_INSERT_TAIL(head, elm, field) do { \ -+ QUEUEDEBUG_TAILQ_INSERT_TAIL((head), (elm), field) \ -+ (elm)->field.tqe_next = TAILQ_END(head); \ -+ (elm)->field.tqe_prev = (head)->tqh_last; \ -+ *(head)->tqh_last = (elm); \ -+ (head)->tqh_last = &(elm)->field.tqe_next; \ -+} while (/*CONSTCOND*/0) -+ -+#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ -+ QUEUEDEBUG_TAILQ_OP((listelm), field) \ -+ if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != \ -+ TAILQ_END(head)) \ -+ (elm)->field.tqe_next->field.tqe_prev = \ -+ &(elm)->field.tqe_next; \ -+ else \ -+ (head)->tqh_last = &(elm)->field.tqe_next; \ -+ (listelm)->field.tqe_next = (elm); \ -+ (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \ -+} while (/*CONSTCOND*/0) -+ -+#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ -+ QUEUEDEBUG_TAILQ_OP((listelm), field) \ -+ (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ -+ (elm)->field.tqe_next = (listelm); \ -+ *(listelm)->field.tqe_prev = (elm); \ -+ (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \ -+} while (/*CONSTCOND*/0) -+ -+#define TAILQ_REMOVE(head, elm, field) do { \ -+ QUEUEDEBUG_TAILQ_PREREMOVE((head), (elm), field) \ -+ QUEUEDEBUG_TAILQ_OP((elm), field) \ -+ if (((elm)->field.tqe_next) != TAILQ_END(head)) \ -+ (elm)->field.tqe_next->field.tqe_prev = \ -+ (elm)->field.tqe_prev; \ -+ else \ -+ (head)->tqh_last = (elm)->field.tqe_prev; \ -+ *(elm)->field.tqe_prev = (elm)->field.tqe_next; \ -+ QUEUEDEBUG_TAILQ_POSTREMOVE((elm), field); \ -+} while (/*CONSTCOND*/0) -+ -+#define TAILQ_REPLACE(head, elm, elm2, field) do { \ -+ if (((elm2)->field.tqe_next = (elm)->field.tqe_next) != \ -+ TAILQ_END(head)) \ -+ (elm2)->field.tqe_next->field.tqe_prev = \ -+ &(elm2)->field.tqe_next; \ -+ else \ -+ (head)->tqh_last = &(elm2)->field.tqe_next; \ -+ (elm2)->field.tqe_prev = (elm)->field.tqe_prev; \ -+ *(elm2)->field.tqe_prev = (elm2); \ -+ QUEUEDEBUG_TAILQ_POSTREMOVE((elm), field); \ -+} while (/*CONSTCOND*/0) -+ -+#define TAILQ_CONCAT(head1, head2, field) do { \ -+ if (!TAILQ_EMPTY(head2)) { \ -+ *(head1)->tqh_last = (head2)->tqh_first; \ -+ (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \ -+ (head1)->tqh_last = (head2)->tqh_last; \ -+ TAILQ_INIT((head2)); \ -+ } \ -+} while (/*CONSTCOND*/0) -+ -+/* -+ * Singly-linked Tail queue declarations. -+ */ -+#define STAILQ_HEAD(name, type) \ -+struct name { \ -+ struct type *stqh_first; /* first element */ \ -+ struct type **stqh_last; /* addr of last next element */ \ -+} -+ -+#define STAILQ_HEAD_INITIALIZER(head) \ -+ { NULL, &(head).stqh_first } -+ -+#define STAILQ_ENTRY(type) \ -+struct { \ -+ struct type *stqe_next; /* next element */ \ -+} -+ -+/* -+ * Singly-linked Tail queue access methods. -+ */ -+#define STAILQ_FIRST(head) ((head)->stqh_first) -+#define STAILQ_END(head) NULL -+#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) -+#define STAILQ_EMPTY(head) (STAILQ_FIRST(head) == STAILQ_END(head)) -+ -+/* -+ * Singly-linked Tail queue functions. -+ */ -+#define STAILQ_INIT(head) do { \ -+ (head)->stqh_first = NULL; \ -+ (head)->stqh_last = &(head)->stqh_first; \ -+} while (/*CONSTCOND*/0) -+ -+#define STAILQ_INSERT_HEAD(head, elm, field) do { \ -+ if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \ -+ (head)->stqh_last = &(elm)->field.stqe_next; \ -+ (head)->stqh_first = (elm); \ -+} while (/*CONSTCOND*/0) -+ -+#define STAILQ_INSERT_TAIL(head, elm, field) do { \ -+ (elm)->field.stqe_next = NULL; \ -+ *(head)->stqh_last = (elm); \ -+ (head)->stqh_last = &(elm)->field.stqe_next; \ -+} while (/*CONSTCOND*/0) -+ -+#define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ -+ if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ -+ (head)->stqh_last = &(elm)->field.stqe_next; \ -+ (listelm)->field.stqe_next = (elm); \ -+} while (/*CONSTCOND*/0) -+ -+#define STAILQ_REMOVE_HEAD(head, field) do { \ -+ if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \ -+ (head)->stqh_last = &(head)->stqh_first; \ -+} while (/*CONSTCOND*/0) -+ -+#define STAILQ_REMOVE(head, elm, type, field) do { \ -+ if ((head)->stqh_first == (elm)) { \ -+ STAILQ_REMOVE_HEAD((head), field); \ -+ } else { \ -+ struct type *curelm = (head)->stqh_first; \ -+ while (curelm->field.stqe_next != (elm)) \ -+ curelm = curelm->field.stqe_next; \ -+ if ((curelm->field.stqe_next = \ -+ curelm->field.stqe_next->field.stqe_next) == NULL) \ -+ (head)->stqh_last = &(curelm)->field.stqe_next; \ -+ } \ -+} while (/*CONSTCOND*/0) -+ -+#define STAILQ_FOREACH(var, head, field) \ -+ for ((var) = ((head)->stqh_first); \ -+ (var); \ -+ (var) = ((var)->field.stqe_next)) -+ -+#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = STAILQ_FIRST((head)); \ -+ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ -+#define STAILQ_CONCAT(head1, head2) do { \ -+ if (!STAILQ_EMPTY((head2))) { \ -+ *(head1)->stqh_last = (head2)->stqh_first; \ -+ (head1)->stqh_last = (head2)->stqh_last; \ -+ STAILQ_INIT((head2)); \ -+ } \ -+} while (/*CONSTCOND*/0) -+ -+#define STAILQ_LAST(head, type, field) \ -+ (STAILQ_EMPTY((head)) ? \ -+ NULL : \ -+ ((struct type *)(void *) \ -+ ((char *)((head)->stqh_last) - offsetof(struct type, field)))) -+ -+ -+#ifndef _KERNEL -+/* -+ * Circular queue definitions. Do not use. We still keep the macros -+ * for compatibility but because of pointer aliasing issues their use -+ * is discouraged! -+ */ -+ -+/* -+ * __launder_type(): We use this ugly hack to work around the the compiler -+ * noticing that two types may not alias each other and elide tests in code. -+ * We hit this in the CIRCLEQ macros when comparing 'struct name *' and -+ * 'struct type *' (see CIRCLEQ_HEAD()). Modern compilers (such as GCC -+ * 4.8) declare these comparisons as always false, causing the code to -+ * not run as designed. -+ * -+ * This hack is only to be used for comparisons and thus can be fully const. -+ * Do not use for assignment. -+ * -+ * If we ever choose to change the ABI of the CIRCLEQ macros, we could fix -+ * this by changing the head/tail sentinal values, but see the note above -+ * this one. -+ */ -+static __inline const void * __launder_type(const void *); -+static __inline const void * -+__launder_type(const void *__x) -+{ -+ __asm __volatile("" : "+r" (__x)); -+ return __x; -+} -+ -+#if defined(QUEUEDEBUG) -+#define QUEUEDEBUG_CIRCLEQ_HEAD(head, field) \ -+ if ((head)->cqh_first != CIRCLEQ_ENDC(head) && \ -+ (head)->cqh_first->field.cqe_prev != CIRCLEQ_ENDC(head)) \ -+ QUEUEDEBUG_ABORT("CIRCLEQ head forw %p %s:%d", (head), \ -+ __FILE__, __LINE__); \ -+ if ((head)->cqh_last != CIRCLEQ_ENDC(head) && \ -+ (head)->cqh_last->field.cqe_next != CIRCLEQ_ENDC(head)) \ -+ QUEUEDEBUG_ABORT("CIRCLEQ head back %p %s:%d", (head), \ -+ __FILE__, __LINE__); -+#define QUEUEDEBUG_CIRCLEQ_ELM(head, elm, field) \ -+ if ((elm)->field.cqe_next == CIRCLEQ_ENDC(head)) { \ -+ if ((head)->cqh_last != (elm)) \ -+ QUEUEDEBUG_ABORT("CIRCLEQ elm last %p %s:%d", \ -+ (elm), __FILE__, __LINE__); \ -+ } else { \ -+ if ((elm)->field.cqe_next->field.cqe_prev != (elm)) \ -+ QUEUEDEBUG_ABORT("CIRCLEQ elm forw %p %s:%d", \ -+ (elm), __FILE__, __LINE__); \ -+ } \ -+ if ((elm)->field.cqe_prev == CIRCLEQ_ENDC(head)) { \ -+ if ((head)->cqh_first != (elm)) \ -+ QUEUEDEBUG_ABORT("CIRCLEQ elm first %p %s:%d", \ -+ (elm), __FILE__, __LINE__); \ -+ } else { \ -+ if ((elm)->field.cqe_prev->field.cqe_next != (elm)) \ -+ QUEUEDEBUG_ABORT("CIRCLEQ elm prev %p %s:%d", \ -+ (elm), __FILE__, __LINE__); \ -+ } -+#define QUEUEDEBUG_CIRCLEQ_POSTREMOVE(elm, field) \ -+ (elm)->field.cqe_next = (void *)1L; \ -+ (elm)->field.cqe_prev = (void *)1L; -+#else -+#define QUEUEDEBUG_CIRCLEQ_HEAD(head, field) -+#define QUEUEDEBUG_CIRCLEQ_ELM(head, elm, field) -+#define QUEUEDEBUG_CIRCLEQ_POSTREMOVE(elm, field) -+#endif -+ -+#define CIRCLEQ_HEAD(name, type) \ -+struct name { \ -+ struct type *cqh_first; /* first element */ \ -+ struct type *cqh_last; /* last element */ \ -+} -+ -+#define CIRCLEQ_HEAD_INITIALIZER(head) \ -+ { CIRCLEQ_END(&head), CIRCLEQ_END(&head) } -+ -+#define CIRCLEQ_ENTRY(type) \ -+struct { \ -+ struct type *cqe_next; /* next element */ \ -+ struct type *cqe_prev; /* previous element */ \ -+} -+ -+/* -+ * Circular queue functions. -+ */ -+#define CIRCLEQ_INIT(head) do { \ -+ (head)->cqh_first = CIRCLEQ_END(head); \ -+ (head)->cqh_last = CIRCLEQ_END(head); \ -+} while (/*CONSTCOND*/0) -+ -+#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ -+ QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \ -+ QUEUEDEBUG_CIRCLEQ_ELM((head), (listelm), field) \ -+ (elm)->field.cqe_next = (listelm)->field.cqe_next; \ -+ (elm)->field.cqe_prev = (listelm); \ -+ if ((listelm)->field.cqe_next == CIRCLEQ_ENDC(head)) \ -+ (head)->cqh_last = (elm); \ -+ else \ -+ (listelm)->field.cqe_next->field.cqe_prev = (elm); \ -+ (listelm)->field.cqe_next = (elm); \ -+} while (/*CONSTCOND*/0) -+ -+#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \ -+ QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \ -+ QUEUEDEBUG_CIRCLEQ_ELM((head), (listelm), field) \ -+ (elm)->field.cqe_next = (listelm); \ -+ (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \ -+ if ((listelm)->field.cqe_prev == CIRCLEQ_ENDC(head)) \ -+ (head)->cqh_first = (elm); \ -+ else \ -+ (listelm)->field.cqe_prev->field.cqe_next = (elm); \ -+ (listelm)->field.cqe_prev = (elm); \ -+} while (/*CONSTCOND*/0) -+ -+#define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \ -+ QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \ -+ (elm)->field.cqe_next = (head)->cqh_first; \ -+ (elm)->field.cqe_prev = CIRCLEQ_END(head); \ -+ if ((head)->cqh_last == CIRCLEQ_ENDC(head)) \ -+ (head)->cqh_last = (elm); \ -+ else \ -+ (head)->cqh_first->field.cqe_prev = (elm); \ -+ (head)->cqh_first = (elm); \ -+} while (/*CONSTCOND*/0) -+ -+#define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \ -+ QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \ -+ (elm)->field.cqe_next = CIRCLEQ_END(head); \ -+ (elm)->field.cqe_prev = (head)->cqh_last; \ -+ if ((head)->cqh_first == CIRCLEQ_ENDC(head)) \ -+ (head)->cqh_first = (elm); \ -+ else \ -+ (head)->cqh_last->field.cqe_next = (elm); \ -+ (head)->cqh_last = (elm); \ -+} while (/*CONSTCOND*/0) -+ -+#define CIRCLEQ_REMOVE(head, elm, field) do { \ -+ QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \ -+ QUEUEDEBUG_CIRCLEQ_ELM((head), (elm), field) \ -+ if ((elm)->field.cqe_next == CIRCLEQ_ENDC(head)) \ -+ (head)->cqh_last = (elm)->field.cqe_prev; \ -+ else \ -+ (elm)->field.cqe_next->field.cqe_prev = \ -+ (elm)->field.cqe_prev; \ -+ if ((elm)->field.cqe_prev == CIRCLEQ_ENDC(head)) \ -+ (head)->cqh_first = (elm)->field.cqe_next; \ -+ else \ -+ (elm)->field.cqe_prev->field.cqe_next = \ -+ (elm)->field.cqe_next; \ -+ QUEUEDEBUG_CIRCLEQ_POSTREMOVE((elm), field) \ -+} while (/*CONSTCOND*/0) -+ -+#define CIRCLEQ_FOREACH(var, head, field) \ -+ for ((var) = ((head)->cqh_first); \ -+ (var) != CIRCLEQ_ENDC(head); \ -+ (var) = ((var)->field.cqe_next)) -+ -+#define CIRCLEQ_FOREACH_REVERSE(var, head, field) \ -+ for ((var) = ((head)->cqh_last); \ -+ (var) != CIRCLEQ_ENDC(head); \ -+ (var) = ((var)->field.cqe_prev)) -+ -+/* -+ * Circular queue access methods. -+ */ -+#define CIRCLEQ_FIRST(head) ((head)->cqh_first) -+#define CIRCLEQ_LAST(head) ((head)->cqh_last) -+/* For comparisons */ -+#define CIRCLEQ_ENDC(head) (__launder_type(head)) -+/* For assignments */ -+#define CIRCLEQ_END(head) ((void *)(head)) -+#define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next) -+#define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev) -+#define CIRCLEQ_EMPTY(head) \ -+ (CIRCLEQ_FIRST(head) == CIRCLEQ_ENDC(head)) -+ -+#define CIRCLEQ_LOOP_NEXT(head, elm, field) \ -+ (((elm)->field.cqe_next == CIRCLEQ_ENDC(head)) \ -+ ? ((head)->cqh_first) \ -+ : (elm->field.cqe_next)) -+#define CIRCLEQ_LOOP_PREV(head, elm, field) \ -+ (((elm)->field.cqe_prev == CIRCLEQ_ENDC(head)) \ -+ ? ((head)->cqh_last) \ -+ : (elm->field.cqe_prev)) -+#endif /* !_KERNEL */ -+ -+#endif /* !_SYS_QUEUE_H_ */ diff --git a/poky/meta/recipes-extended/libtirpc/libtirpc/export_key_secretkey_is_set.patch b/poky/meta/recipes-extended/libtirpc/libtirpc/export_key_secretkey_is_set.patch deleted file mode 100644 index d7f496866..000000000 --- a/poky/meta/recipes-extended/libtirpc/libtirpc/export_key_secretkey_is_set.patch +++ /dev/null @@ -1,31 +0,0 @@ -Upstream-Status: Backport -Signed-off-by: Ross Burton <ross.burton@intel.com> - -From e51d67549b516b2dac6c71d92c8499f6e67125ad Mon Sep 17 00:00:00 2001 -From: Thorsten Kukuk <kukuk@thkukuk.de> -Date: Tue, 14 Nov 2017 10:43:53 -0500 -Subject: [PATCH] Fix typo in src/libtirpc.map - -Which prevents that key_secretkey_is_set will be exported. - -Signed-off-by: Thorsten Kukuk <kukuk@suse.de> -Signed-off-by: Steve Dickson <steved@redhat.com> ---- - src/libtirpc.map | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/libtirpc.map b/src/libtirpc.map -index f385de5..21d6065 100644 ---- a/src/libtirpc.map -+++ b/src/libtirpc.map -@@ -298,7 +298,7 @@ TIRPC_0.3.2 { - key_gendes; - key_get_conv; - key_setsecret; -- key_secret_is_set; -+ key_secretkey_is_set; - key_setnet; - netname2host; - netname2user; --- -1.8.3.1 diff --git a/poky/meta/recipes-extended/libtirpc/libtirpc/libtirpc-1.0.4-rc1.patch b/poky/meta/recipes-extended/libtirpc/libtirpc/libtirpc-1.0.4-rc1.patch new file mode 100644 index 000000000..6d40d3cce --- /dev/null +++ b/poky/meta/recipes-extended/libtirpc/libtirpc/libtirpc-1.0.4-rc1.patch @@ -0,0 +1,103 @@ +Patch from Fedora https://src.fedoraproject.org/rpms/libtirpc/raw/master/f/libtirpc-1.0.4-rc1.patch + +Upstream-Status: Backport +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +diff --git a/src/clnt_generic.c b/src/clnt_generic.c +index e5a314f..3f3dabf 100644 +--- a/src/clnt_generic.c ++++ b/src/clnt_generic.c +@@ -47,7 +47,6 @@ + + extern bool_t __rpc_is_local_host(const char *); + int __rpc_raise_fd(int); +-extern int __binddynport(int fd); + + #ifndef NETIDLEN + #define NETIDLEN 32 +@@ -341,8 +340,7 @@ clnt_tli_create(int fd, const struct netconfig *nconf, + servtype = nconf->nc_semantics; + if (!__rpc_fd2sockinfo(fd, &si)) + goto err; +- if (__binddynport(fd) == -1) +- goto err; ++ bindresvport(fd, NULL); + } else { + if (!__rpc_fd2sockinfo(fd, &si)) + goto err; +diff --git a/src/rpc_soc.c b/src/rpc_soc.c +index af6c482..5a6eeb7 100644 +--- a/src/rpc_soc.c ++++ b/src/rpc_soc.c +@@ -67,8 +67,6 @@ + + extern mutex_t rpcsoc_lock; + +-extern int __binddynport(int fd); +- + static CLIENT *clnt_com_create(struct sockaddr_in *, rpcprog_t, rpcvers_t, + int *, u_int, u_int, char *, int); + static SVCXPRT *svc_com_create(int, u_int, u_int, char *); +@@ -147,8 +145,7 @@ clnt_com_create(raddr, prog, vers, sockp, sendsz, recvsz, tp, flags) + bindaddr.maxlen = bindaddr.len = sizeof (struct sockaddr_in); + bindaddr.buf = raddr; + +- if (__binddynport(fd) == -1) +- goto err; ++ bindresvport(fd, NULL); + cl = clnt_tli_create(fd, nconf, &bindaddr, prog, vers, + sendsz, recvsz); + if (cl) { +diff --git a/src/rpcb_clnt.c b/src/rpcb_clnt.c +index a94fc73..4b44364 100644 +--- a/src/rpcb_clnt.c ++++ b/src/rpcb_clnt.c +@@ -752,7 +752,7 @@ __try_protocol_version_2(program, version, nconf, host, tp) + + client = getpmaphandle(nconf, host, &parms.r_addr); + if (client == NULL) +- return (NULL); ++ goto error; + + /* + * Set retry timeout. +@@ -771,11 +771,11 @@ __try_protocol_version_2(program, version, nconf, host, tp) + if (clnt_st != RPC_SUCCESS) { + rpc_createerr.cf_stat = RPC_PMAPFAILURE; + clnt_geterr(client, &rpc_createerr.cf_error); +- return (NULL); ++ goto error; + } else if (port == 0) { + pmapaddress = NULL; + rpc_createerr.cf_stat = RPC_PROGNOTREGISTERED; +- return (NULL); ++ goto error; + } + port = htons(port); + CLNT_CONTROL(client, CLGET_SVC_ADDR, (char *)&remote); +@@ -789,14 +789,24 @@ __try_protocol_version_2(program, version, nconf, host, tp) + free(pmapaddress); + pmapaddress = NULL; + } +- return (NULL); ++ goto error; + } + memcpy(pmapaddress->buf, remote.buf, remote.len); + memcpy(&((char *)pmapaddress->buf)[sizeof (short)], + (char *)(void *)&port, sizeof (short)); + pmapaddress->len = pmapaddress->maxlen = remote.len; + ++ CLNT_DESTROY(client); + return pmapaddress; ++ ++error: ++ if (client) { ++ CLNT_DESTROY(client); ++ client = NULL; ++ ++ } ++ return (NULL); ++ + } + #endif + diff --git a/poky/meta/recipes-extended/libtirpc/libtirpc/musl.patch b/poky/meta/recipes-extended/libtirpc/libtirpc/musl.patch new file mode 100644 index 000000000..0c3ce603e --- /dev/null +++ b/poky/meta/recipes-extended/libtirpc/libtirpc/musl.patch @@ -0,0 +1,18 @@ +Consider musl provided built-in defines + +Helps compile libtirpc with musl + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- ./tirpc/rpc/types.h.orig 2018-03-17 10:23:10.022055255 +0100 ++++ ./tirpc/rpc/types.h 2018-03-17 10:23:30.877751656 +0100 +@@ -66,7 +66,7 @@ + #define mem_free(ptr, bsize) free(ptr) + + +-#if defined __APPLE_CC__ || defined __FreeBSD__ ++#if defined __APPLE_CC__ || defined __FreeBSD__ || !defined(__GLIBC__) + # define __u_char_defined + # define __daddr_t_defined + #endif diff --git a/poky/meta/recipes-extended/libtirpc/libtirpc_1.0.2.bb b/poky/meta/recipes-extended/libtirpc/libtirpc_1.0.3.bb index 99212600e..17bc038d6 100644 --- a/poky/meta/recipes-extended/libtirpc/libtirpc_1.0.2.bb +++ b/poky/meta/recipes-extended/libtirpc/libtirpc_1.0.3.bb @@ -10,17 +10,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=f835cce8852481e4b2bbbdd23b5e47f3 \ PROVIDES = "virtual/librpc" SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2 \ - file://export_key_secretkey_is_set.patch \ - file://0001-replace-__bzero-with-memset-API.patch \ - file://0001-include-stdint.h-for-uintptr_t.patch \ + file://libtirpc-1.0.4-rc1.patch \ + file://musl.patch \ " -SRC_URI_append_libc-musl = " \ - file://Use-netbsd-queue.h.patch \ - " - -SRC_URI[md5sum] = "d5a37f1dccec484f9cabe2b97e54e9a6" -SRC_URI[sha256sum] = "723c5ce92706cbb601a8db09110df1b4b69391643158f20ff587e20e7c5f90f5" +SRC_URI[md5sum] = "f8403a10695348854e71d525c4db5931" +SRC_URI[sha256sum] = "86c3a78fc1bddefa96111dd233124c703b22a78884203c55c3e06b3be6a0fd5e" inherit autotools pkgconfig diff --git a/poky/meta/recipes-extended/libuser/libuser/0001-Check-for-issetugid.patch b/poky/meta/recipes-extended/libuser/libuser/0001-Check-for-issetugid.patch deleted file mode 100644 index 79756b9a0..000000000 --- a/poky/meta/recipes-extended/libuser/libuser/0001-Check-for-issetugid.patch +++ /dev/null @@ -1,62 +0,0 @@ -From d0537cb7f2dc5877700ad78dfd191515379d4edc Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 7 Jan 2016 02:22:51 +0000 -Subject: [PATCH 1/2] Check for issetugid() - -If secure version of getenv is not there then we can use -issetugid() as aid to call getenv() - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - - configure.ac | 1 + - lib/config.c | 12 +++++++++++- - 2 files changed, 12 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 1ded1a2..ee19e1f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -125,6 +125,7 @@ AC_TYPE_OFF_T - AC_TYPE_SIZE_T - - AC_CHECK_FUNCS([__secure_getenv secure_getenv]) -+AC_CHECK_FUNCS([issetugid]) - - # Modify CFLAGS after all tests are run (some of them could fail because - # of the -Werror). -diff --git a/lib/config.c b/lib/config.c -index 29e7120..30f9daf 100644 ---- a/lib/config.c -+++ b/lib/config.c -@@ -44,8 +44,10 @@ - # define safe_getenv(string) secure_getenv(string) - #elif defined(HAVE___SECURE_GETENV) - # define safe_getenv(string) __secure_getenv(string) -+#elif defined(HAVE_ISSETUGID) -+# define safe_getenv(string) safe_getenv_issetugid(string) - #else --# error Neither secure_getenv not __secure_getenv are available -+# error None of secure_getenv, __secure_getenv, or issetugid is available - #endif - - struct config_config { -@@ -59,6 +61,14 @@ struct config_key { - GList *values; - }; - -+static const char* -+safe_getenv_issetugid(const char* name) -+{ -+ if (issetugid ()) -+ return 0; -+ return getenv (name); -+} -+ - /* Compare two section names */ - static int - compare_section_names(gconstpointer a, gconstpointer b) --- -2.7.0 - diff --git a/poky/meta/recipes-extended/libuser/libuser/0001-modules-files.c-parse_field-fix-string-formating-in-.patch b/poky/meta/recipes-extended/libuser/libuser/0001-modules-files.c-parse_field-fix-string-formating-in-.patch deleted file mode 100644 index 7c47df22e..000000000 --- a/poky/meta/recipes-extended/libuser/libuser/0001-modules-files.c-parse_field-fix-string-formating-in-.patch +++ /dev/null @@ -1,34 +0,0 @@ -From a4857911ece5ebfcdef42aee4c070eb216f39597 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com> -Date: Fri, 13 May 2016 11:40:13 -0500 -Subject: [PATCH] modules/files.c: parse_field fix string formating in - g_warnings -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -[YOCTO #9547] - -Signed-off-by: AnĂbal LimĂłn <anibal.limon@linux.intel.com> - -Upstream-Status: Pending ---- - modules/files.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules/files.c b/modules/files.c -index 4ef0a57..35eafc9 100644 ---- a/modules/files.c -+++ b/modules/files.c -@@ -534,7 +534,7 @@ parse_field(const struct format_specifier *format, GValue *value, - string, &err); - if (ret == FALSE) { - g_assert(err != NULL); -- g_warning(lu_strerror(err)); -+ g_warning(lu_strerror(err), NULL); - lu_error_free(&err); - } - return ret; --- -2.1.4 - diff --git a/poky/meta/recipes-extended/libuser/libuser/0002-remove-unused-execinfo.h.patch b/poky/meta/recipes-extended/libuser/libuser/0002-remove-unused-execinfo.h.patch deleted file mode 100644 index 4bc0219f1..000000000 --- a/poky/meta/recipes-extended/libuser/libuser/0002-remove-unused-execinfo.h.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 4b2f81f307ffeac12956e5c16e894e5ebb937ea5 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 7 Jan 2016 02:26:00 +0000 -Subject: [PATCH 2/2] remove unused execinfo.h - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - - lib/error.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/lib/error.c b/lib/error.c -index a5ec30a..443e601 100644 ---- a/lib/error.c -+++ b/lib/error.c -@@ -18,7 +18,6 @@ - #include <config.h> - #include <sys/types.h> - #include <errno.h> --#include <execinfo.h> - #include <libintl.h> - #include <stdarg.h> - #include <stdlib.h> --- -2.7.0 - diff --git a/poky/meta/recipes-extended/libuser/libuser_0.62.bb b/poky/meta/recipes-extended/libuser/libuser_0.62.bb deleted file mode 100644 index 7ec54eb16..000000000 --- a/poky/meta/recipes-extended/libuser/libuser_0.62.bb +++ /dev/null @@ -1,35 +0,0 @@ -SUMMARY = "user and group account administration library" -DESCRIPTION = "The libuser library implements a standardized interface for manipulating and administering user \ -and group accounts" -HOMEPAGE = "https://pagure.io/libuser" -BUGTRACKER = "https://pagure.io/libuser/issues" - -LICENSE = "LGPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ - file://lib/user.h;endline=19;md5=76b301f63c39fa992062395efbdc9558 \ - file://samples/testuser.c;endline=19;md5=3b87fa660fa3f4a6bb31d624afe30ba1" - -SECTION = "base" - -SRC_URI = "https://releases.pagure.org/libuser/libuser-${PV}.tar.xz \ - file://0001-Check-for-issetugid.patch \ - file://0002-remove-unused-execinfo.h.patch \ - file://0001-modules-files.c-parse_field-fix-string-formating-in-.patch \ - " - -SRC_URI[md5sum] = "63e5e5c551e99dc5302b40b80bd6d4f2" -SRC_URI[sha256sum] = "a58ff4fabb01a25043b142185a33eeea961109dd60d4b40b6a9df4fa3cace20b" - -DEPENDS = "popt libpam glib-2.0 python3" - -inherit distro_features_check -REQUIRED_DISTRO_FEATURES = "pam" - -inherit autotools gettext python3native python3-dir pkgconfig gtk-doc - -EXTRA_OEMAKE = "PYTHON_CPPFLAGS=-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}" - -PACKAGES += "${PN}-python " - -FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}" - diff --git a/poky/meta/recipes-extended/lighttpd/lighttpd_1.4.48.bb b/poky/meta/recipes-extended/lighttpd/lighttpd_1.4.50.bb index 3c4444cf4..5373a61d7 100644 --- a/poky/meta/recipes-extended/lighttpd/lighttpd_1.4.48.bb +++ b/poky/meta/recipes-extended/lighttpd/lighttpd_1.4.50.bb @@ -20,8 +20,8 @@ SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.t file://0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch \ " -SRC_URI[md5sum] = "1e3a9eb5078f481e3a8a1d0aaac8c3c8" -SRC_URI[sha256sum] = "0f8ad5aac7529d7b948b9d7e8cd0b4a9e177309d85d6bf6516e28e6e40d74f36" +SRC_URI[md5sum] = "0547831efda8492648b7f0c652865dfd" +SRC_URI[sha256sum] = "29378312d8887cbc14ffe8a7fadef2d5a08c7e7e1be942795142346ad95629eb" PACKAGECONFIG ??= "openssl pcre zlib \ ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ diff --git a/poky/meta/recipes-extended/logrotate/logrotate_3.13.0.bb b/poky/meta/recipes-extended/logrotate/logrotate_3.14.0.bb index 990cf9178..ccc68ad3a 100644 --- a/poky/meta/recipes-extended/logrotate/logrotate_3.13.0.bb +++ b/poky/meta/recipes-extended/logrotate/logrotate_3.14.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] = "78ef24d6fddcc4df8e412dd75c551b4c" -SRC_URI[sha256sum] = "3222ca032f99be8d7a4a8c6ad69f3dcc49b9511bfe384bd5a271ebcd9bd3e52c" +SRC_URI[md5sum] = "1c0f6e6e490c4bcac0a1e77ad1310683" +SRC_URI[sha256sum] = "4703bdc0e2df3b322f9dff0aafc99aa9172c9e4acae28b7c924cc7d4e5b29d55" PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)}" @@ -34,7 +34,9 @@ PACKAGECONFIG[acl] = ",,acl" PACKAGECONFIG[selinux] = ",,libselinux" CONFFILES_${PN} += "${localstatedir}/lib/logrotate.status \ - ${sysconfdir}/logrotate.conf" + ${sysconfdir}/logrotate.conf \ + ${sysconfdir}/logrotate.d/btmp \ + ${sysconfdir}/logrotate.d/wtmp" # If RPM_OPT_FLAGS is unset, it adds -g itself rather than obeying our # optimization variables, so use it rather than EXTRA_CFLAGS. @@ -60,22 +62,34 @@ SYSTEMD_SERVICE_${PN} = "\ ${BPN}.timer \ " +LOGROTATE_OPTIONS ?= "" + LOGROTATE_SYSTEMD_TIMER_BASIS ?= "daily" LOGROTATE_SYSTEMD_TIMER_ACCURACY ?= "12h" +LOGROTATE_SYSTEMD_TIMER_PERSISTENT ?= "true" do_install(){ oe_runmake install DESTDIR=${D} PREFIX=${D} MANDIR=${mandir} mkdir -p ${D}${sysconfdir}/logrotate.d mkdir -p ${D}${localstatedir}/lib install -p -m 644 ${S}/examples/logrotate-default ${D}${sysconfdir}/logrotate.conf + install -p -m 644 ${S}/examples/btmp ${D}${sysconfdir}/logrotate.d/btmp + install -p -m 644 ${S}/examples/wtmp ${D}${sysconfdir}/logrotate.d/wtmp touch ${D}${localstatedir}/lib/logrotate.status if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}${systemd_system_unitdir} install -m 0644 ${S}/examples/logrotate.service ${D}${systemd_system_unitdir}/logrotate.service install -m 0644 ${S}/examples/logrotate.timer ${D}${systemd_system_unitdir}/logrotate.timer - sed -i -e 's,OnCalendar=.*$,OnCalendar=${LOGROTATE_SYSTEMD_TIMER_BASIS},g' ${D}${systemd_system_unitdir}/logrotate.timer - sed -i -e 's,AccuracySec=.*$,AccuracySec=${LOGROTATE_SYSTEMD_TIMER_ACCURACY},g' ${D}${systemd_system_unitdir}/logrotate.timer + [ -z "${LOGROTATE_OPTIONS}" ] || + sed -ri \ + -e 's|(ExecStart=.*/logrotate.*)$|\1 ${LOGROTATE_OPTIONS}|g' \ + ${D}${systemd_system_unitdir}/logrotate.service + sed -ri \ + -e 's|(OnCalendar=).*$|\1${LOGROTATE_SYSTEMD_TIMER_BASIS}|g' \ + -e 's|(AccuracySec=).*$|\1${LOGROTATE_SYSTEMD_TIMER_ACCURACY}|g' \ + -e 's|(Persistent=).*$|\1${LOGROTATE_SYSTEMD_TIMER_PERSISTENT}|g' \ + ${D}${systemd_system_unitdir}/logrotate.timer fi if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then diff --git a/poky/meta/recipes-extended/lsb/lsb_5.0.bb b/poky/meta/recipes-extended/lsb/lsb_5.0.bb index df4812e4b..d1de33400 100644 --- a/poky/meta/recipes-extended/lsb/lsb_5.0.bb +++ b/poky/meta/recipes-extended/lsb/lsb_5.0.bb @@ -34,7 +34,7 @@ S = "${WORKDIR}/lsb-release-1.4" CLEANBROKEN = "1" do_install() { - oe_runmake install prefix=${D}${base_prefix} mandir=${D}${datadir}/man/ DESTDIR=${D} + oe_runmake install prefix=${D}${root_prefix} mandir=${D}${datadir}/man/ DESTDIR=${D} # these two dirs are needed by package lsb-dist-checker mkdir -p ${D}${sysconfdir}/opt @@ -99,7 +99,9 @@ do_install_append() { fi if [ "${TARGET_ARCH}" = "x86_64" ]; then - if [ "${base_libdir}" != "${base_prefix}/lib64" ]; then + # don't symlink if usrmerge is in DISTRO_FEATURES as it manages the symlink + if ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','false','true',d)} && \ + [ "${base_libdir}" != "${base_prefix}/lib64" ]; then lnr ${D}${base_libdir} ${D}${base_prefix}/lib64 fi cd ${D}${base_libdir} diff --git a/poky/meta/recipes-extended/lsb/lsbinitscripts_9.79.bb b/poky/meta/recipes-extended/lsb/lsbinitscripts_9.79.bb index 46edeed8a..6d3fcf13d 100644 --- a/poky/meta/recipes-extended/lsb/lsbinitscripts_9.79.bb +++ b/poky/meta/recipes-extended/lsb/lsbinitscripts_9.79.bb @@ -2,7 +2,6 @@ SUMMARY = "SysV init scripts which are only used in an LSB image" HOMEPAGE = "https://wiki.debian.org/LSBInitScripts" SECTION = "base" LICENSE = "GPLv2" -DEPENDS = "popt glib-2.0" RPROVIDES_${PN} += "initd-functions" RDEPENDS_${PN} += "util-linux" diff --git a/poky/meta/recipes-extended/lsof/lsof_4.89.bb b/poky/meta/recipes-extended/lsof/lsof_4.91.bb index 14546db23..b3adfd57a 100644 --- a/poky/meta/recipes-extended/lsof/lsof_4.89.bb +++ b/poky/meta/recipes-extended/lsof/lsof_4.91.bb @@ -15,26 +15,25 @@ SRC_URI = "http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/uni file://lsof-remove-host-information.patch \ " -SRC_URI[md5sum] = "1b9cd34f3fb86856a125abbf2be3a386" -SRC_URI[sha256sum] = "81ac2fc5fdc944793baf41a14002b6deb5a29096b387744e28f8c30a360a3718" +SRC_URI[md5sum] = "148ed410cb52e08c2adc0c60f480f11f" +SRC_URI[sha256sum] = "c9da946a525fbf82ff80090b6d1879c38df090556f3fe0e6d782cb44172450a3" LOCALSRC = "file://${WORKDIR}/lsof_${PV}/lsof_${PV}_src.tar" S = "${WORKDIR}/lsof_${PV}_src" python do_unpack () { - # temporarily change S for unpack - # of lsof_${PV} - s = d.getVar('S', False) - d.setVar('S', '${WORKDIR}/lsof_${PV}') - bb.build.exec_func('base_do_unpack', d) - # temporarily change SRC_URI for unpack - # of lsof_${PV}_src - src_uri = d.getVar('SRC_URI', False) - d.setVar('SRC_URI', '${LOCALSRC}') - d.setVar('S', s) - bb.build.exec_func('base_do_unpack', d) - d.setVar('SRC_URI', src_uri) + if not bb.data.inherits_class('externalsrc', d) or not d.getVar('EXTERNALSRC'): + # temporarily change S for unpack of lsof_${PV} + s = d.getVar('S', False) + d.setVar('S', '${WORKDIR}/lsof_${PV}') + bb.build.exec_func('base_do_unpack', d) + # temporarily change SRC_URI for unpack of lsof_${PV}_src + src_uri = d.getVar('SRC_URI', False) + d.setVar('SRC_URI', '${LOCALSRC}') + d.setVar('S', s) + bb.build.exec_func('base_do_unpack', d) + d.setVar('SRC_URI', src_uri) } export LSOF_INCLUDE = "${STAGING_INCDIR}" diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-configure-Fix-default-value-of-without-numa-switch-i.patch b/poky/meta/recipes-extended/ltp/ltp/0001-configure-Fix-default-value-of-without-numa-switch-i.patch deleted file mode 100644 index da62687d5..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0001-configure-Fix-default-value-of-without-numa-switch-i.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 4ace68a6ba501907a0741dba5f5f155e06a74c35 Mon Sep 17 00:00:00 2001 -From: Petr Vorel <pvorel@suse.cz> -Date: Wed, 7 Feb 2018 11:09:49 +0100 -Subject: [PATCH] configure: Fix default value of --without-numa switch in help - -The default value is no. - -Fixes: 39a85a1f1 ("configure: add knob to control numa support") - -Signed-off-by: Petr Vorel <pvorel@suse.cz> -Upstream-Status: Accepted ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index b39a31d..d66ea00 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -86,7 +86,7 @@ fi - # Numa - AC_ARG_WITH([numa], - AC_HELP_STRING([--without-numa], -- [without numa support (default=yes)]), -+ [without numa support (default=no)]), - [with_numa=no], - [with_numa=yes] - ) --- -2.7.4 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-configure-add-knob-to-control-numa-support.patch b/poky/meta/recipes-extended/ltp/ltp/0001-configure-add-knob-to-control-numa-support.patch deleted file mode 100644 index 8aaa287b7..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0001-configure-add-knob-to-control-numa-support.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 39a85a1f1e6624f554215ba4b6843d3689a8415e Mon Sep 17 00:00:00 2001 -From: Anders Roxell <anders.roxell@linaro.org> -Date: Mon, 5 Feb 2018 11:56:04 +0100 -Subject: [PATCH] configure: add knob to control numa support - -Allow to disable numa from the top level. - -Based on patch: -http://cgit.openembedded.org/openembedded-core/commit/meta/recipes-extended/ltp?id=4c7873552e13dfdba96afca7562c398d2966ca71 - -Reported-by: Roy Li <rongqing.li@windriver.com> -Signed-off-by: Anders Roxell <anders.roxell@linaro.org> -Signed-off-by: Petr Vorel <pvorel@suse.cz> -Upstream-Status: Accepted ---- - configure.ac | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 5c8d4ea..b39a31d 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -83,6 +83,14 @@ else - AC_SUBST([WITH_EXPECT],["no"]) - fi - -+# Numa -+AC_ARG_WITH([numa], -+ AC_HELP_STRING([--without-numa], -+ [without numa support (default=yes)]), -+ [with_numa=no], -+ [with_numa=yes] -+) -+ - # Perl - AC_ARG_WITH([perl], - [AC_HELP_STRING([--with-perl], -@@ -157,7 +165,9 @@ LTP_CHECK_SELINUX - LTP_CHECK_SIGNAL - LTP_CHECK_SYSCALL_EVENTFD - LTP_CHECK_SYSCALL_MODIFY_LDT -+if test "x$with_numa" = xyes; then - LTP_CHECK_SYSCALL_NUMA -+fi - LTP_CHECK_SYSCALL_QUOTACTL - LTP_CHECK_SYSCALL_SIGNALFD - LTP_CHECK_SYSCALL_UNSHARE --- -2.7.4 - 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 new file mode 100644 index 000000000..18eba27c2 --- /dev/null +++ b/poky/meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch @@ -0,0 +1,41 @@ +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 new file mode 100644 index 000000000..32e7a0eb2 --- /dev/null +++ b/poky/meta/recipes-extended/ltp/ltp/0001-netns_helper.sh-use-ping-6-when-ping6-is-not-avaliab.patch @@ -0,0 +1,45 @@ +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 new file mode 100644 index 000000000..4d771c0b9 --- /dev/null +++ b/poky/meta/recipes-extended/ltp/ltp/0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch @@ -0,0 +1,68 @@ +From 85c972f730e8efe891a06ea3a2dfb5cbbdfbfbf4 Mon Sep 17 00:00:00 2001 +From: "Hongzhi.Song" <hongzhi.song@windriver.com> +Date: Wed, 10 Oct 2018 22:07:05 -0400 +Subject: [PATCH] open_posix_testsuite/mmap24-2: Relax condition a bit + +Mips will return EINVAL instead of ENOMEM as expected +if the range [addr + len) exceeds TASK_SIZE. + +Linux kernel code: arch/mips/mm/mmap.c +if (flags & MAP_FIXED) { + /* Even MAP_FIXED mappings must reside within TASK_SIZE */ + if (TASK_SIZE - len < addr) + return -EINVAL; + +Relax the condition and accept both ENOMEM and EINVAL +as expected outcome. + +Upstream-Status: Submitted [https://lists.linux.it/pipermail/ltp/2018-October/009624.html] + +Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com> +--- + .../open_posix_testsuite/conformance/interfaces/mmap/24-2.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/24-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/24-2.c +index de51d43..810e5c8 100644 +--- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/24-2.c ++++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/24-2.c +@@ -7,7 +7,7 @@ + * source tree. + * + * The mmap() function shall fail if: +- * [ENOMEM] MAP_FIXED was specified, ++ * [ENOMEM or EINVAL] MAP_FIXED was specified, + * and the range [addr,addr+len) exceeds that allowed + * for the address space of a process; or, if MAP_FIXED was not specified and + * there is insufficient room in the address space to effect the mapping. +@@ -15,7 +15,7 @@ + * Test Step: + * 1. Map a shared memory object, with size exceeding the value get from + * rlim_cur of resource RLIMIT_AS, setting MAP_FIXED; +- * 3. Should get ENOMEM. ++ * 3. Should get ENOMEM or EINVAL. + */ + + #define _XOPEN_SOURCE 600 +@@ -93,8 +93,8 @@ int main(void) + (unsigned long)len); + pa = mmap(addr, len, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, fd, + 0); +- if (pa == MAP_FAILED && errno == ENOMEM) { +- printf("Got ENOMEM: %s\nTest PASSED\n", strerror(errno)); ++ if (pa == MAP_FAILED && (errno == ENOMEM || errno == EINVAL)) { ++ printf("Got ENOMEM or EINVAL: %s\nTest PASSED\n", strerror(errno)); + exit(PTS_PASS); + } + +@@ -103,6 +103,6 @@ int main(void) + else + munmap(pa, len); + close(fd); +- printf("Test Fail: Did not get ENOMEM as expected\n"); ++ printf("Test Failed: Did not get ENOMEM or EINVAL as expected\n"); + return PTS_FAIL; + } +-- +2.8.1 + 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 new file mode 100644 index 000000000..c412c89e9 --- /dev/null +++ b/poky/meta/recipes-extended/ltp/ltp/0001-sigwaitinfo01-recent-glibc-calls-syscall-directly.patch @@ -0,0 +1,75 @@ +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 new file mode 100644 index 000000000..2755596d0 --- /dev/null +++ b/poky/meta/recipes-extended/ltp/ltp/0001-syscalls-fcntl-make-OFD-command-use-fcntl64-syscall-.patch @@ -0,0 +1,184 @@ +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/0003-Add-knob-to-control-tirpc-support.patch b/poky/meta/recipes-extended/ltp/ltp/0003-Add-knob-to-control-tirpc-support.patch deleted file mode 100644 index 5cf1e05f7..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0003-Add-knob-to-control-tirpc-support.patch +++ /dev/null @@ -1,46 +0,0 @@ -From b193011da301b3d944e8fddcf4817513c31c5b88 Mon Sep 17 00:00:00 2001 -From: Fathi Boudra <fathi.boudra@linaro.org> -Date: Thu, 7 Jan 2016 17:36:19 +0000 -Subject: [PATCH 03/32] Add knob to control tirpc support - -allow to disable tirpc. Helps to disable it at top level for eg. musl it -does not yet work. - -Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org> -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Upstream-Status: Pending ---- - configure.ac | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/configure.ac b/configure.ac -index cc50397..9e2936b 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -98,6 +98,13 @@ if test "x$with_python" = xyes; then - else - AC_SUBST([WITH_PYTHON],["no"]) - fi -+ -+# TI RPC -+AC_ARG_WITH([tirpc], -+ AC_HELP_STRING([--without-tirpc], -+ [without libtirpc support]), -+ [],[with_tirpc=yes], -+) - # END tools knobs - - # Testsuites knobs -@@ -169,7 +176,9 @@ LTP_CHECK_RENAMEAT2 - LTP_CHECK_FALLOCATE - LTP_CHECK_SYSCALL_FCNTL - LTP_CHECK_SYSCALL_PERF_EVENT_OPEN -+if test "x$with_tirpc" = xyes; then - LTP_CHECK_TIRPC -+fi - LTP_CHECK_TEE - LTP_CHECK_SPLICE - LTP_CHECK_VMSPLICE --- -2.7.0 - 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 84ab37ea3..2df385591 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 @@ -22,10 +22,10 @@ Upstream-Status: Pending testcases/realtime/stress/pi-tests/Makefile | 5 +++++ 8 files changed, 35 insertions(+), 2 deletions(-) -Index: git/Makefile -=================================================================== ---- git.orig/Makefile -+++ git/Makefile +diff --git a/Makefile b/Makefile +index 297f8e7..906b280 100644 +--- a/Makefile ++++ b/Makefile @@ -49,6 +49,11 @@ SKIP_IDCHECK ?= 0 UCLINUX ?= 0 export UCLINUX @@ -38,10 +38,10 @@ Index: git/Makefile # CLEAN_TARGETS: Targets which exist solely in clean. # COMMON_TARGETS: Targets which exist in all, clean, and install. # INSTALL_TARGETS: Targets which exist in clean and install (contains -Index: git/testcases/kernel/Makefile -=================================================================== ---- git.orig/testcases/kernel/Makefile -+++ git/testcases/kernel/Makefile +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 \ logging \ mem \ @@ -60,10 +60,10 @@ Index: git/testcases/kernel/Makefile ifeq ($(WITH_POWER_MANAGEMENT_TESTSUITE),yes) SUBDIRS += power_management endif -Index: git/testcases/kernel/sched/Makefile -=================================================================== ---- git.orig/testcases/kernel/sched/Makefile -+++ git/testcases/kernel/sched/Makefile +diff --git a/testcases/kernel/sched/Makefile b/testcases/kernel/sched/Makefile +index 6245ed0..aa4eb7f 100644 +--- a/testcases/kernel/sched/Makefile ++++ b/testcases/kernel/sched/Makefile @@ -23,5 +23,7 @@ top_srcdir ?= ../../.. @@ -73,10 +73,10 @@ Index: git/testcases/kernel/sched/Makefile + FILTER_OUT_DIRS += process_stress +endif include $(top_srcdir)/include/mk/generic_trunk_target.mk -Index: git/testcases/kernel/syscalls/Makefile -=================================================================== ---- git.orig/testcases/kernel/syscalls/Makefile -+++ git/testcases/kernel/syscalls/Makefile +diff --git a/testcases/kernel/syscalls/Makefile b/testcases/kernel/syscalls/Makefile +index 8acb395..b749126 100644 +--- a/testcases/kernel/syscalls/Makefile ++++ b/testcases/kernel/syscalls/Makefile @@ -28,6 +28,11 @@ ifeq ($(UCLINUX),1) FILTER_OUT_DIRS += capget capset chmod chown clone fork getcontext llseek \ mincore mprotect nftw profil remap_file_pages sbrk @@ -89,11 +89,11 @@ Index: git/testcases/kernel/syscalls/Makefile ifeq ($(UCLIBC),1) FILTER_OUT_DIRS += profil -Index: git/testcases/network/nfsv4/acl/Makefile -=================================================================== ---- git.orig/testcases/network/nfsv4/acl/Makefile -+++ git/testcases/network/nfsv4/acl/Makefile -@@ -26,4 +26,8 @@ include $(top_srcdir)/include/mk/env_pre +diff --git a/testcases/network/nfsv4/acl/Makefile b/testcases/network/nfsv4/acl/Makefile +index 8bc78c2..c36cf50 100644 +--- a/testcases/network/nfsv4/acl/Makefile ++++ b/testcases/network/nfsv4/acl/Makefile +@@ -26,4 +26,8 @@ include $(top_srcdir)/include/mk/env_pre.mk LDLIBS += $(ACL_LIBS) @@ -102,10 +102,10 @@ Index: git/testcases/network/nfsv4/acl/Makefile +endif + include $(top_srcdir)/include/mk/generic_leaf_target.mk -Index: git/testcases/network/rpc/basic_tests/Makefile -=================================================================== ---- git.orig/testcases/network/rpc/basic_tests/Makefile -+++ git/testcases/network/rpc/basic_tests/Makefile +diff --git a/testcases/network/rpc/basic_tests/Makefile b/testcases/network/rpc/basic_tests/Makefile +index 3160813..9bdf5d0 100644 +--- a/testcases/network/rpc/basic_tests/Makefile ++++ b/testcases/network/rpc/basic_tests/Makefile @@ -23,4 +23,9 @@ top_srcdir ?= ../../../.. @@ -116,11 +116,11 @@ Index: git/testcases/network/rpc/basic_tests/Makefile +endif + include $(top_srcdir)/include/mk/generic_trunk_target.mk -Index: git/testcases/realtime/func/pi-tests/Makefile -=================================================================== ---- git.orig/testcases/realtime/func/pi-tests/Makefile -+++ git/testcases/realtime/func/pi-tests/Makefile -@@ -27,5 +27,9 @@ include $(top_srcdir)/include/mk/env_pre +diff --git a/testcases/realtime/func/pi-tests/Makefile b/testcases/realtime/func/pi-tests/Makefile +index 7a7a57a..5808866 100644 +--- a/testcases/realtime/func/pi-tests/Makefile ++++ b/testcases/realtime/func/pi-tests/Makefile +@@ -27,5 +27,9 @@ include $(top_srcdir)/include/mk/env_pre.mk include $(abs_srcdir)/../../config.mk MAKE_TARGETS := testpi-0 testpi-1 testpi-2 testpi-4 testpi-5 testpi-6 testpi-7 sbrk_mutex @@ -130,10 +130,10 @@ Index: git/testcases/realtime/func/pi-tests/Makefile + include $(top_srcdir)/include/mk/generic_leaf_target.mk -Index: git/testcases/realtime/stress/pi-tests/Makefile -=================================================================== ---- git.orig/testcases/realtime/stress/pi-tests/Makefile -+++ git/testcases/realtime/stress/pi-tests/Makefile +diff --git a/testcases/realtime/stress/pi-tests/Makefile b/testcases/realtime/stress/pi-tests/Makefile +index 5edc3b4..aa5987a 100644 +--- a/testcases/realtime/stress/pi-tests/Makefile ++++ b/testcases/realtime/stress/pi-tests/Makefile @@ -24,4 +24,9 @@ top_srcdir ?= ../../../.. include $(top_srcdir)/include/mk/env_pre.mk @@ -144,3 +144,6 @@ Index: git/testcases/realtime/stress/pi-tests/Makefile +endif + include $(top_srcdir)/include/mk/generic_leaf_target.mk +-- +2.7.0 + 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 e325ce4e4..428ac3004 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 @@ -11,9 +11,9 @@ 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 | 40 +++++++++++++++++++++- - .../sched_getaffinity/sched_getaffinity01.c | 26 ++++++++++++++ - 3 files changed, 73 insertions(+), 2 deletions(-) + testcases/kernel/syscalls/getcpu/getcpu01.c | 39 +++++++++++++++++++++- + .../sched_getaffinity/sched_getaffinity01.c | 26 +++++++++++++++ + 3 files changed, 72 insertions(+), 2 deletions(-) diff --git a/testcases/kernel/syscalls/accept4/accept4_01.c b/testcases/kernel/syscalls/accept4/accept4_01.c index 6072bfa..2b090cb 100644 @@ -102,7 +102,7 @@ index c927512..921b107 100644 *cpu_id = sched_getcpu(); #endif return 0; -@@ -191,15 +204,20 @@ unsigned int set_cpu_affinity(void) +@@ -191,15 +203,20 @@ unsigned int set_cpu_affinity(void) cpu_set_t *set; size_t size; int nrcpus = 1024; @@ -123,7 +123,7 @@ index c927512..921b107 100644 #if __GLIBC_PREREQ(2, 7) size = CPU_ALLOC_SIZE(nrcpus); CPU_ZERO_S(size, set); -@@ -207,8 +225,13 @@ realloc: +@@ -207,8 +224,13 @@ realloc: size = sizeof(cpu_set_t); CPU_ZERO(set); #endif @@ -137,7 +137,7 @@ index c927512..921b107 100644 #if __GLIBC_PREREQ(2, 7) if (errno == EINVAL && nrcpus < (1024 << 8)) { nrcpus = nrcpus << 2; -@@ -220,10 +243,17 @@ realloc: +@@ -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 @@ -155,7 +155,7 @@ index c927512..921b107 100644 #if __GLIBC_PREREQ(2, 7) CPU_ZERO_S(size, set); CPU_SET_S(cpu_max, size, set); -@@ -231,6 +261,10 @@ realloc: +@@ -231,6 +260,10 @@ realloc: CPU_ZERO(set); CPU_SET(cpu_max, set); #endif @@ -166,7 +166,7 @@ index c927512..921b107 100644 if (sched_setaffinity(0, size, set) < 0) { CPU_FREE(set); tst_brkm(TFAIL, NULL, "sched_setaffinity:errno:%d", errno); -@@ -247,11 +281,15 @@ unsigned int max_cpuid(size_t size, cpu_set_t * set) +@@ -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++) @@ -186,7 +186,7 @@ diff --git a/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c b index 9d6a81a..4ed13b2 100644 --- a/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c +++ b/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c -@@ -66,9 +66,11 @@ do { \ +@@ -67,9 +67,11 @@ do { \ tst_resm((TEST_RETURN == -1 ? TPASS : TFAIL) | TTERRNO, #t); \ } while (0) @@ -198,7 +198,7 @@ index 9d6a81a..4ed13b2 100644 int main(int ac, char **av) { -@@ -95,14 +97,19 @@ static void do_test(void) +@@ -96,14 +98,19 @@ static void do_test(void) pid_t unused_pid; unsigned len; @@ -218,7 +218,7 @@ index 9d6a81a..4ed13b2 100644 #if __GLIBC_PREREQ(2, 7) len = CPU_ALLOC_SIZE(nrcpus); CPU_ZERO_S(len, mask); -@@ -110,10 +117,15 @@ realloc: +@@ -111,10 +118,15 @@ realloc: len = sizeof(cpu_set_t); CPU_ZERO(mask); #endif @@ -234,7 +234,7 @@ index 9d6a81a..4ed13b2 100644 #if __GLIBC_PREREQ(2, 7) if (errno == EINVAL && nrcpus < (1024 << 8)) { nrcpus = nrcpus << 2; -@@ -125,17 +137,27 @@ realloc: +@@ -126,17 +138,27 @@ realloc: "newer glibc(>= 2.7)"); else #endif @@ -262,7 +262,7 @@ index 9d6a81a..4ed13b2 100644 if (TEST_RETURN != -1) tst_resm(TPASS, "sched_getaffinity() succeed, " "this process %d is running " -@@ -143,11 +165,15 @@ realloc: +@@ -144,11 +166,15 @@ realloc: } } diff --git a/poky/meta/recipes-extended/ltp/ltp/0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch b/poky/meta/recipes-extended/ltp/ltp/0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch deleted file mode 100644 index b9fce880f..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 0130f4146ced320aadb01b22e36b13d269a8ebba Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 7 Jan 2016 19:48:14 +0000 -Subject: [PATCH 10/32] replace __BEGIN_DECLS and __END_DECLS - -They are not portable across libc implementations -therefore replace them with expanded macros - -Include <asm-generic/types.h> to get __s32 definitions -its not a generally available typedef - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - -Upstream-Status: Pending ---- - testcases/kernel/syscalls/epoll2/include/epoll.h | 8 ++++++-- - utils/sctp/include/netinet/sctp.h | 9 +++++++-- - 2 files changed, 13 insertions(+), 4 deletions(-) - -diff --git a/testcases/kernel/syscalls/epoll2/include/epoll.h b/testcases/kernel/syscalls/epoll2/include/epoll.h -index be599c7..8cc5e7e 100644 ---- a/testcases/kernel/syscalls/epoll2/include/epoll.h -+++ b/testcases/kernel/syscalls/epoll2/include/epoll.h -@@ -85,7 +85,9 @@ struct epoll_event - } EPOLL_PACKED; - - --__BEGIN_DECLS -+#ifdef __cplusplus -+extern "C" { -+#endif - - /* Creates an epoll instance. Returns an fd for the new instance. - The "size" parameter is a hint specifying the number of file -@@ -114,6 +116,8 @@ extern int epoll_ctl (int __epfd, int __op, int __fd, - extern int epoll_wait (int __epfd, struct epoll_event *__events, - int __maxevents, int __timeout) __THROW; - --__END_DECLS -+#ifdef __cplusplus -+} -+#endif - - #endif /* sys/epoll.h */ -diff --git a/utils/sctp/include/netinet/sctp.h b/utils/sctp/include/netinet/sctp.h -index 51f5bfb..c61aef3 100644 ---- a/utils/sctp/include/netinet/sctp.h -+++ b/utils/sctp/include/netinet/sctp.h -@@ -35,9 +35,12 @@ - - #include <stdint.h> - #include <linux/types.h> -+#include <asm-generic/types.h> - #include <sys/socket.h> - --__BEGIN_DECLS -+#ifdef __cplusplus -+extern "C" { -+#endif - - typedef __s32 sctp_assoc_t; - -@@ -862,6 +865,8 @@ int sctp_recvmsg(int s, void *msg, size_t len, struct sockaddr *from, - /* Return the address length for an address family. */ - int sctp_getaddrlen(sa_family_t family); - --__END_DECLS -+#ifdef __cplusplus -+} -+#endif - - #endif /* __linux_sctp_h__ */ --- -2.7.0 - diff --git a/poky/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch b/poky/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch index 462976da4..6c5f36035 100644 --- a/poky/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch +++ b/poky/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch @@ -18,10 +18,10 @@ Upstream-Status: Pending testcases/kernel/syscalls/mremap/mremap03.c | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) -Index: git/testcases/kernel/syscalls/mremap/mremap01.c -=================================================================== ---- git.orig/testcases/kernel/syscalls/mremap/mremap01.c -+++ git/testcases/kernel/syscalls/mremap/mremap01.c +diff --git a/testcases/kernel/syscalls/mremap/mremap01.c b/testcases/kernel/syscalls/mremap/mremap01.c +index d63d1e4..24ca174 100644 +--- a/testcases/kernel/syscalls/mremap/mremap01.c ++++ b/testcases/kernel/syscalls/mremap/mremap01.c @@ -76,10 +76,12 @@ */ #include <unistd.h> @@ -36,10 +36,10 @@ Index: git/testcases/kernel/syscalls/mremap/mremap01.c #include "test.h" #include "safe_macros.h" -Index: git/testcases/kernel/syscalls/mremap/mremap02.c -=================================================================== ---- git.orig/testcases/kernel/syscalls/mremap/mremap02.c -+++ git/testcases/kernel/syscalls/mremap/mremap02.c +diff --git a/testcases/kernel/syscalls/mremap/mremap02.c b/testcases/kernel/syscalls/mremap/mremap02.c +index 5a51b9a..a530a6b 100644 +--- a/testcases/kernel/syscalls/mremap/mremap02.c ++++ b/testcases/kernel/syscalls/mremap/mremap02.c @@ -75,9 +75,11 @@ #include <errno.h> #include <unistd.h> @@ -52,10 +52,10 @@ Index: git/testcases/kernel/syscalls/mremap/mremap02.c #include "test.h" -Index: git/testcases/kernel/syscalls/mremap/mremap03.c -=================================================================== ---- git.orig/testcases/kernel/syscalls/mremap/mremap03.c -+++ git/testcases/kernel/syscalls/mremap/mremap03.c +diff --git a/testcases/kernel/syscalls/mremap/mremap03.c b/testcases/kernel/syscalls/mremap/mremap03.c +index 12e3829..9b39f8b 100644 +--- a/testcases/kernel/syscalls/mremap/mremap03.c ++++ b/testcases/kernel/syscalls/mremap/mremap03.c @@ -76,9 +76,11 @@ #include <errno.h> #include <unistd.h> @@ -68,3 +68,6 @@ Index: git/testcases/kernel/syscalls/mremap/mremap03.c #include "test.h" +-- +2.7.0 + diff --git a/poky/meta/recipes-extended/ltp/ltp/0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch b/poky/meta/recipes-extended/ltp/ltp/0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch index c730d46e6..40ee89414 100644 --- a/poky/meta/recipes-extended/ltp/ltp/0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch +++ b/poky/meta/recipes-extended/ltp/ltp/0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch @@ -11,14 +11,14 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> Upstream-Status: Pending --- - include/lapi/rt_sigaction.h | 2 +- + include/lapi/rt_sigaction.h | 4 ++-- testcases/kernel/syscalls/rt_sigsuspend/Makefile | 3 +++ - 2 files changed, 4 insertions(+), 1 deletion(-) + 2 files changed, 5 insertions(+), 2 deletions(-) -Index: git/include/lapi/rt_sigaction.h -=================================================================== ---- git.orig/include/lapi/rt_sigaction.h -+++ git/include/lapi/rt_sigaction.h +diff --git a/include/lapi/rt_sigaction.h b/include/lapi/rt_sigaction.h +index 18236db..15facda 100644 +--- a/include/lapi/rt_sigaction.h ++++ b/include/lapi/rt_sigaction.h @@ -36,12 +36,12 @@ #if defined(__mips__) struct kernel_sigaction { @@ -34,10 +34,10 @@ Index: git/include/lapi/rt_sigaction.h unsigned long sa_flags; void (*sa_restorer) (void); sigset_t sa_mask; -Index: git/testcases/kernel/syscalls/rt_sigsuspend/Makefile -=================================================================== ---- git.orig/testcases/kernel/syscalls/rt_sigsuspend/Makefile -+++ git/testcases/kernel/syscalls/rt_sigsuspend/Makefile +diff --git a/testcases/kernel/syscalls/rt_sigsuspend/Makefile b/testcases/kernel/syscalls/rt_sigsuspend/Makefile +index 37bc3a9..2ca7f7c 100644 +--- a/testcases/kernel/syscalls/rt_sigsuspend/Makefile ++++ b/testcases/kernel/syscalls/rt_sigsuspend/Makefile @@ -19,4 +19,7 @@ top_srcdir ?= ../../../.. diff --git a/poky/meta/recipes-extended/ltp/ltp/0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch b/poky/meta/recipes-extended/ltp/ltp/0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch index 04532be79..e826d48e3 100644 --- a/poky/meta/recipes-extended/ltp/ltp/0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch +++ b/poky/meta/recipes-extended/ltp/ltp/0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch @@ -27,7 +27,7 @@ diff --git a/testcases/network/nfsv4/acl/acl1.c b/testcases/network/nfsv4/acl/ac index b8b67b4..7c7c506 100644 --- a/testcases/network/nfsv4/acl/acl1.c +++ b/testcases/network/nfsv4/acl/acl1.c -@@ -314,7 +314,7 @@ void test_acl_default(char *dir, acl_t acl) +@@ -303,7 +303,7 @@ void test_acl_default(char *dir, acl_t acl) char *cmd = malloc(256); strcpy(cmd, "chmod 7777 "); 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 new file mode 100644 index 000000000..0245a89f3 --- /dev/null +++ b/poky/meta/recipes-extended/ltp/ltp/0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch @@ -0,0 +1,44 @@ +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/0040-safe_macros-make-is_fuse-return-zero-if-fs_type-is-N.patch b/poky/meta/recipes-extended/ltp/ltp/0040-safe_macros-make-is_fuse-return-zero-if-fs_type-is-N.patch deleted file mode 100644 index 5096a85c1..000000000 --- a/poky/meta/recipes-extended/ltp/ltp/0040-safe_macros-make-is_fuse-return-zero-if-fs_type-is-N.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 67af7dbe8bdf29f9ed980d8d29feeae32a0a7a1d Mon Sep 17 00:00:00 2001 -From: Li Wang <liwang@redhat.com> -Date: Tue, 23 Jan 2018 17:46:35 +0800 -Subject: [PATCH] safe_macros: make is_fuse() return zero if fs_type is NULL - -This commmit 28507e514c(safe_mount: Do not try mount() syscall for FUSE fs) -involves FUSE fs check in safe_mount(), but we'd better guarantee the "fs_type" -is legal to check in is_fuse() function otherwise system will kill the program. - - cmdline="fanotify06" - contacts="" - analysis=exit - <<<test_output>>> - tst_test.c:980: INFO: Timeout per run is 0h 10m 00s - tst_test.c:1025: BROK: Test killed by SIGSEGV! - -Signed-off-by: Li Wang <liwang@redhat.com> -Acked-by: Jan Stancek <jstancek@redhat.com> -Upstream-Status: Accepted [https://github.com/linux-test-project/ltp/commit/67af7dbe8bdf29f9ed980d8d29feeae32a0a7a1d] ---- - lib/safe_macros.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/lib/safe_macros.c b/lib/safe_macros.c -index c48e436dc..abdeca013 100644 ---- a/lib/safe_macros.c -+++ b/lib/safe_macros.c -@@ -708,6 +708,9 @@ static int is_fuse(const char *fs_type) - { - unsigned int i; - -+ if (!fs_type) -+ return 0; -+ - for (i = 0; i < ARRAY_SIZE(fuse_fs_types); i++) { - if (!strcmp(fuse_fs_types[i], fs_type)) - return 1; --- -2.11.0 - 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 new file mode 100644 index 000000000..0d2d2cbce --- /dev/null +++ b/poky/meta/recipes-extended/ltp/ltp/0041-cve-2017-5669-shmat-for-0-or-PAGESIZE-with-RND-flag-.patch @@ -0,0 +1,97 @@ +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 new file mode 100644 index 000000000..407d98eff --- /dev/null +++ b/poky/meta/recipes-extended/ltp/ltp/0042-fs-ftest-ftest06.c-Fix-too-small-name-string-and-rel.patch @@ -0,0 +1,34 @@ +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 new file mode 100644 index 000000000..dc61fcc03 --- /dev/null +++ b/poky/meta/recipes-extended/ltp/ltp/0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch @@ -0,0 +1,81 @@ +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_20180118.bb b/poky/meta/recipes-extended/ltp/ltp_20180515.bb index 8754fcd9f..ff85be723 100644 --- a/poky/meta/recipes-extended/ltp/ltp_20180118.bb +++ b/poky/meta/recipes-extended/ltp/ltp_20180515.bb @@ -19,20 +19,24 @@ LIC_FILES_CHKSUM = "\ DEPENDS = "attr libaio libcap acl openssl zip-native" DEPENDS_append_libc-musl = " fts " EXTRA_OEMAKE_append_libc-musl = " LIBC=musl " + +# since ltp contains x86-64 assembler which uses the frame-pointer register, +# set -fomit-frame-pointer x86-64 to handle cases where optimisation +# is set to -O0 or frame pointers have been enabled by -fno-omit-frame-pointer +# earlier in CFLAGS, etc. +CFLAGS_append_x86-64 = " -fomit-frame-pointer" + CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__" CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__" -SRCREV = "731cd34e682d297b207668be8b1d15320a9ac1b1" +SRCREV = "96cbf48313afa65ef4d693d3441cbfd60a8d9b27" SRC_URI = "git://github.com/linux-test-project/ltp.git \ - file://0001-configure-add-knob-to-control-numa-support.patch \ - file://0001-configure-Fix-default-value-of-without-numa-switch-i.patch \ - file://0003-Add-knob-to-control-tirpc-support.patch \ + 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 \ file://0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch \ file://0009-fix-redefinition-of-struct-msgbuf-error-building-wit.patch \ - file://0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch \ file://0018-guard-mallocopt-with-__GLIBC__.patch \ file://0020-getdents-define-getdents-getdents64-only-for-glibc.patch \ file://0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch \ @@ -44,7 +48,14 @@ 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-safe_macros-make-is_fuse-return-zero-if-fs_type-is-N.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 \ " S = "${WORKDIR}/git" diff --git a/poky/meta/recipes-extended/lzip/lzip_1.19.bb b/poky/meta/recipes-extended/lzip/lzip_1.20.bb index 099b36470..d1fc2a1da 100644 --- a/poky/meta/recipes-extended/lzip/lzip_1.19.bb +++ b/poky/meta/recipes-extended/lzip/lzip_1.20.bb @@ -7,8 +7,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=76d6e300ffd8fb9d18bd9b136a9bba13 \ SRC_URI = "${SAVANNAH_GNU_MIRROR}/lzip/lzip-${PV}.tar.gz" -SRC_URI[md5sum] = "4dd8790d7528440d034fc713a8680bd3" -SRC_URI[sha256sum] = "ffadc4f56be1bc0d3ae155ec4527bd003133bdc703a753b2cc683f610e646ba9" +SRC_URI[md5sum] = "21c1517da2ace9689fd953918660b3c3" +SRC_URI[sha256sum] = "c93b81a5a7788ef5812423d311345ba5d3bd4f5ebf1f693911e3a13553c1290c" CONFIGUREOPTS = "\ '--srcdir=${S}' \ diff --git a/poky/meta/recipes-extended/man-db/files/99_mandb b/poky/meta/recipes-extended/man-db/files/99_mandb new file mode 100644 index 000000000..9b8a1712b --- /dev/null +++ b/poky/meta/recipes-extended/man-db/files/99_mandb @@ -0,0 +1 @@ +d man man 0755 /var/cache/man none diff --git a/poky/meta/recipes-extended/man-db/files/man_db.conf-avoid-multilib-install-file-conflict.patch b/poky/meta/recipes-extended/man-db/files/man_db.conf-avoid-multilib-install-file-conflict.patch new file mode 100644 index 000000000..03273d3b4 --- /dev/null +++ b/poky/meta/recipes-extended/man-db/files/man_db.conf-avoid-multilib-install-file-conflict.patch @@ -0,0 +1,16 @@ +The first line of man_db.conf will be replaced by package name. And it causes +multilib install file conflict. Remove the line to avoid the issue. + +Upstream-Status: Pending + +Signed-off-by: Kai Kang <kai.kang@windriver.com> + +diff --git a/src/man_db.conf.in b/src/man_db.conf.in +index bc8bb7e..04cfb31 100644 +--- a/src/man_db.conf.in ++++ b/src/man_db.conf.in +@@ -1,4 +1,3 @@ +-# @config_file_basename@ + # + # This file is used by the man-db package to configure the man and cat paths. + # It is also used to provide a manpath for those without one by examining diff --git a/poky/meta/recipes-extended/man-db/man-db_2.8.1.bb b/poky/meta/recipes-extended/man-db/man-db_2.8.3.bb index 8328a671f..cd8d27c33 100644 --- a/poky/meta/recipes-extended/man-db/man-db_2.8.1.bb +++ b/poky/meta/recipes-extended/man-db/man-db_2.8.3.bb @@ -4,18 +4,30 @@ LICENSE = "LGPLv2.1 & GPLv2" LIC_FILES_CHKSUM = "file://docs/COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 \ file://docs/COPYING;md5=eb723b61539feef013de476e68b5c50a" -SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/man-db/man-db-${PV}.tar.xz" -SRC_URI[md5sum] = "51842978e06686286421f9498d1009b7" -SRC_URI[sha256sum] = "a6aec641ca3d9942b054cc0e9c3f05cb46a3a992bc0006795755e2fed1357f3e" +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" -DEPENDS = "libpipeline gdbm groff-native" +DEPENDS = "libpipeline gdbm groff-native base-passwd" +RDEPENDS_${PN} += "base-passwd" # | /usr/src/debug/man-db/2.8.0-r0/man-db-2.8.0/src/whatis.c:939: undefined reference to `_nl_msg_cat_cntr' USE_NLS_libc-musl = "no" inherit gettext pkgconfig autotools -EXTRA_OECONF = "--with-pager=less --disable-cache-owner" +EXTRA_OECONF = "--with-pager=less" + +do_install() { + autotools_do_install + + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + install -d ${D}/etc/default/volatiles + install -m 0644 ${WORKDIR}/99_mandb ${D}/etc/default/volatiles + fi +} do_install_append_libc-musl() { rm -f ${D}${libdir}/charset.alias diff --git a/poky/meta/recipes-extended/man-pages/man-pages_4.14.bb b/poky/meta/recipes-extended/man-pages/man-pages_4.16.bb index f8bd090d1..a64587cf0 100644 --- a/poky/meta/recipes-extended/man-pages/man-pages_4.14.bb +++ b/poky/meta/recipes-extended/man-pages/man-pages_4.16.bb @@ -7,10 +7,15 @@ LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://README;md5=794f701617cc03fe50c53257660d8ec4" SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/Archive/${BP}.tar.gz" -SRC_URI[md5sum] = "82bd2d05c4d0dba5e7a90d39c9555197" -SRC_URI[sha256sum] = "aeebc6b09a11e7f7bbc98f3984fe8b8b2bde9d2f5f9dcbd4348a9e0d93704238" +SRC_URI[md5sum] = "d1fb8ba312a1c15e0bfda911a98c5544" +SRC_URI[sha256sum] = "d38b0460bf3f35c95faf7f8cf52dac1216d86a47866f5e5f2fda88c61da04960" -RDEPENDS_${PN} = "man" +inherit manpages + +MAN_PKG = "${PN}" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[manpages] = "" do_configure[noexec] = "1" do_compile[noexec] = "1" diff --git a/poky/meta/recipes-extended/mc/mc_4.8.20.bb b/poky/meta/recipes-extended/mc/mc_4.8.21.bb index 70d1b5e0a..c6a4500b8 100644 --- a/poky/meta/recipes-extended/mc/mc_4.8.20.bb +++ b/poky/meta/recipes-extended/mc/mc_4.8.21.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] = "dcfc7aa613c62291a0f71f6b698d8267" -SRC_URI[sha256sum] = "2d85daaa6ab26e524946df4823ac2f69802bc16bc967781b5e28d5b86fc3b979" +SRC_URI[md5sum] = "63d2b90e2198ee79d08eb4a8989220e2" +SRC_URI[sha256sum] = "251d9f0ef9309ef3eea0fdc4c12b8b61149e5056bef1b2de2ccc7f015d973444" inherit autotools gettext pkgconfig 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 new file mode 100644 index 000000000..739652cd5 --- /dev/null +++ b/poky/meta/recipes-extended/mdadm/files/0001-Disable-gcc8-warnings.patch @@ -0,0 +1,152 @@ +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-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 new file mode 100644 index 000000000..44351b656 --- /dev/null +++ b/poky/meta/recipes-extended/mdadm/files/0001-use-memmove-instead-of-memcpy-on-overlapping-region.patch @@ -0,0 +1,31 @@ +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/mdadm_4.0.bb b/poky/meta/recipes-extended/mdadm/mdadm_4.0.bb index dc098f19b..2c4d88a9e 100644 --- a/poky/meta/recipes-extended/mdadm/mdadm_4.0.bb +++ b/poky/meta/recipes-extended/mdadm/mdadm_4.0.bb @@ -22,6 +22,8 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \ file://0004-mdadm-Forced-type-conversion-to-avoid-truncation.patch \ file://0005-Add-a-comment-to-indicate-valid-fallthrough.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 \ " SRC_URI[md5sum] = "2cb4feffea9167ba71b5f346a0c0a40d" SRC_URI[sha256sum] = "1d6ae7f24ced3a0fa7b5613b32f4a589bb4881e3946a5a2c3724056254ada3a9" @@ -40,7 +42,7 @@ CFLAGS_append_mipsarchn32 = ' -D__SANE_USERSPACE_TYPES__' do_compile() { # Point to right sbindir - sed -i -e "s;BINDIR = /sbin;BINDIR = $base_sbindir;" ${S}/Makefile + sed -i -e "s;BINDIR = /sbin;BINDIR = $base_sbindir;" -e "s;UDEVDIR = /lib;UDEVDIR = $nonarch_base_libdir;" ${S}/Makefile oe_runmake SYSROOT="${STAGING_DIR_TARGET}" } diff --git a/poky/meta/recipes-extended/mingetty/mingetty_1.08.bb b/poky/meta/recipes-extended/mingetty/mingetty_1.08.bb index 3c16228b0..491b89209 100644 --- a/poky/meta/recipes-extended/mingetty/mingetty_1.08.bb +++ b/poky/meta/recipes-extended/mingetty/mingetty_1.08.bb @@ -16,6 +16,7 @@ EXTRA_OEMAKE = "CC='${CC}' \ CFLAGS='${CFLAGS} -D_GNU_SOURCE'" do_install(){ + sed -i -e "s;SBINDIR=/sbin;SBINDIR=$base_sbindir;" ${S}/Makefile install -d ${D}${mandir}/man8 ${D}/${base_sbindir} oe_runmake install DESTDIR=${D} } diff --git a/poky/meta/recipes-extended/minicom/minicom_2.7.1.bb b/poky/meta/recipes-extended/minicom/minicom_2.7.1.bb index be0b48dfd..1e6f1317e 100644 --- a/poky/meta/recipes-extended/minicom/minicom_2.7.1.bb +++ b/poky/meta/recipes-extended/minicom/minicom_2.7.1.bb @@ -16,8 +16,6 @@ SRC_URI = "${DEBIAN_MIRROR}/main/m/${BPN}/${BPN}_${PV}.orig.tar.gz \ SRC_URI[md5sum] = "9021cb8c5445f6e6e74b2acc39962d62" SRC_URI[sha256sum] = "532f836b7a677eb0cb1dca8d70302b73729c3d30df26d58368d712e5cca041f1" -UPSTREAM_CHECK_URI = "https://alioth.debian.org/frs/?group_id=30018" - PACKAGECONFIG ??= "" PACKAGECONFIG[lockdev] = "--enable-lockdev,--disable-lockdev,lockdev" diff --git a/poky/meta/recipes-extended/mktemp/files/disable-strip.patch b/poky/meta/recipes-extended/mktemp/files/disable-strip.patch deleted file mode 100644 index e06869e3a..000000000 --- a/poky/meta/recipes-extended/mktemp/files/disable-strip.patch +++ /dev/null @@ -1,15 +0,0 @@ -Upstream-Status: Inappropriate [configuration] - -diff --git a/Makefile.in b/Makefile.in -index 37b3cc9..f1026f3 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -95,7 +95,7 @@ install-dirs: - $(DESTDIR)$(mandir)/man1 - - install-binaries: $(PROG) -- $(INSTALL) -m 0555 -s $(PROG) $(DESTDIR)$(bindir)/$(PROG) -+ $(INSTALL) -m 0555 $(PROG) $(DESTDIR)$(bindir)/$(PROG) - - install-man: - $(INSTALL) -m 0444 $(srcdir)/mktemp.$(mantype) \ diff --git a/poky/meta/recipes-extended/mktemp/files/fix-parallel-make.patch b/poky/meta/recipes-extended/mktemp/files/fix-parallel-make.patch deleted file mode 100644 index f3b6dcc34..000000000 --- a/poky/meta/recipes-extended/mktemp/files/fix-parallel-make.patch +++ /dev/null @@ -1,24 +0,0 @@ -This fixes the parallel make install failure - -Upstream-Status: Accepted -http://www.gratisoft.us/bugzilla/show_bug.cgi?id=528 - -Signed-off-by: Saul Wold <sgw@linux.intel.com> - -Index: mktemp-1.7/Makefile.in -=================================================================== ---- mktemp-1.7.orig/Makefile.in -+++ mktemp-1.7/Makefile.in -@@ -94,10 +94,10 @@ install-dirs: - $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) \ - $(DESTDIR)$(mandir)/man1 - --install-binaries: $(PROG) -+install-binaries: install-dirs $(PROG) - $(INSTALL) -m 0555 $(PROG) $(DESTDIR)$(bindir)/$(PROG) - --install-man: -+install-man: install-dirs - $(INSTALL) -m 0444 $(srcdir)/mktemp.$(mantype) \ - $(DESTDIR)$(mandir)/man1/mktemp.1 - diff --git a/poky/meta/recipes-extended/mktemp/mktemp_1.7.bb b/poky/meta/recipes-extended/mktemp/mktemp_1.7.bb deleted file mode 100644 index e8ae5c6b7..000000000 --- a/poky/meta/recipes-extended/mktemp/mktemp_1.7.bb +++ /dev/null @@ -1,36 +0,0 @@ -SUMMARY = "Enables safe temporary file creation from shell scripts" -HOMEPAGE = "http://www.mktemp.org/" -BUGTRACKER = "http://www.mktemp.org/bugs" -SECTION = "console/utils" -LICENSE = "ISC" -LIC_FILES_CHKSUM = "file://LICENSE;md5=430680f6322a1eb87199b5e01a82c0d4" - -PR = "r3" - -SRC_URI = "ftp://ftp.mktemp.org/pub/mktemp/${BPN}-${PV}.tar.gz \ - file://disable-strip.patch \ - file://fix-parallel-make.patch \ - " - -SRC_URI[md5sum] = "787bbed9fa2ee8e7645733c0e8e65172" -SRC_URI[sha256sum] = "8e94b9e1edf866b2609545da65b627996ac5d158fda071e492bddb2f4a482675" - -inherit autotools update-alternatives - -EXTRA_OECONF = "--with-libc" - -do_install_append () { - if [ "${base_bindir}" != "${bindir}" ] ; then - install -d ${D}${base_bindir} - mv ${D}${bindir}/mktemp ${D}${base_bindir}/mktemp - rmdir ${D}${bindir} - fi -} - -ALTERNATIVE_${PN} = "mktemp" -ALTERNATIVE_LINK_NAME[mktemp] = "${base_bindir}/mktemp" -ALTERNATIVE_PRIORITY = "60" - -ALTERNATIVE_${PN}-doc = "mktemp.1" -ALTERNATIVE_PRIORITY_${PN}-doc = "300" -ALTERNATIVE_LINK_NAME[mktemp.1] = "${mandir}/man1/mktemp.1" diff --git a/poky/meta/recipes-extended/net-tools/net-tools_1.60-26.bb b/poky/meta/recipes-extended/net-tools/net-tools_1.60-26.bb index 5657fd8c5..a4e3285cd 100644 --- a/poky/meta/recipes-extended/net-tools/net-tools_1.60-26.bb +++ b/poky/meta/recipes-extended/net-tools/net-tools_1.60-26.bb @@ -48,7 +48,16 @@ PARALLEL_MAKE = "" # up all previously applied patches in the start nettools_do_patch() { cd ${S} - quilt pop -a || true + # it's important that we only pop the existing patches when they've + # been applied, otherwise quilt will climb the directory tree + # and reverse out some completely different set of patches + if [ -d ${S}/patches ]; then + # whilst this is the default directory, doing it like this + # defeats the directory climbing that quilt will otherwise + # do; note the directory must exist to defeat this, hence + # the test inside which we operate + QUILT_PATCHES=${S}/patches quilt pop -a + fi if [ -d ${S}/.pc-nettools ]; then rm -rf ${S}/.pc mv ${S}/.pc-nettools ${S}/.pc diff --git a/poky/meta/recipes-extended/newt/libnewt-python_0.52.20.bb b/poky/meta/recipes-extended/newt/libnewt-python_0.52.20.bb index 20369effe..433d184c7 100644 --- a/poky/meta/recipes-extended/newt/libnewt-python_0.52.20.bb +++ b/poky/meta/recipes-extended/newt/libnewt-python_0.52.20.bb @@ -25,4 +25,4 @@ PACKAGES_remove = "whiptail" FILES_${PN} = "${PYTHON_SITEPACKAGES_DIR}/*" -BBCLASSEXTEND = "native" +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-extended/newt/libnewt_0.52.20.bb b/poky/meta/recipes-extended/newt/libnewt_0.52.20.bb index 65ce70c47..264ef3b8a 100644 --- a/poky/meta/recipes-extended/newt/libnewt_0.52.20.bb +++ b/poky/meta/recipes-extended/newt/libnewt_0.52.20.bb @@ -51,4 +51,4 @@ do_compile_prepend() { FILES_whiptail = "${bindir}/whiptail" -BBCLASSEXTEND = "native" +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb b/poky/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb index 9002fbc37..ffa838877 100644 --- a/poky/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb +++ b/poky/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb @@ -86,10 +86,8 @@ RDEPENDS_packagegroup-core-full-cmdline-utils = "\ mc-fish \ mc-helpers \ mc-helpers-perl \ - mktemp \ ncurses \ net-tools \ - popt \ procps \ psmisc \ sed \ @@ -127,25 +125,17 @@ RDEPENDS_packagegroup-core-full-cmdline-initscripts = "\ " RDEPENDS_packagegroup-core-full-cmdline-multiuser = "\ + bzip2 \ cracklib \ gzip \ - ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libuser', '', d)} \ shadow \ sudo \ " RDEPENDS_packagegroup-core-full-cmdline-sys-services = "\ at \ - bzip2 \ cronie \ - dbus \ - elfutils \ - gzip \ - less \ logrotate \ nfs-utils \ - pciutils \ rpcbind \ - tcp-wrappers \ - tzdata \ " diff --git a/poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb b/poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb index 53d100ce7..e8dc42159 100644 --- a/poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb +++ b/poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb @@ -76,7 +76,7 @@ RDEPENDS_packagegroup-core-sys-extended = "\ screen \ setserial \ sysstat \ - udev-extraconf \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'udev-extraconf', d)} \ unzip \ watchdog \ wget \ @@ -136,6 +136,7 @@ RDEPENDS_packagegroup-core-lsb-core = "\ bc \ binutils \ binutils-symlinks \ + bzip2 \ coreutils \ cpio \ cronie \ @@ -158,7 +159,6 @@ RDEPENDS_packagegroup-core-lsb-core = "\ make \ man \ man-pages \ - mktemp \ msmtp \ patch \ procps \ @@ -220,7 +220,7 @@ RDEPENDS_packagegroup-core-lsb-desktop = "\ liberation-fonts \ gtk+ \ atk \ - libasound \ + alsa-lib \ " RDEPENDS_packagegroup-core-lsb-runtime-add = "\ 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 92ab72a42..3aec2cdb4 100644 --- a/poky/meta/recipes-extended/pam/libpam_1.3.0.bb +++ b/poky/meta/recipes-extended/pam/libpam_1.3.0.bb @@ -32,7 +32,7 @@ SRC_URI_append_libc-musl = " file://0001-Add-support-for-defining-missing-funcit file://include_paths_header.patch \ " -DEPENDS = "bison-native flex flex-native cracklib libxml2-native" +DEPENDS = "bison-native flex flex-native cracklib libxml2-native virtual/crypt" EXTRA_OECONF = "--with-db-uniquename=_pam \ --includedir=${includedir}/security \ diff --git a/poky/meta/recipes-extended/parted/parted_3.2.bb b/poky/meta/recipes-extended/parted/parted_3.2.bb index ab30108bf..6189fd224 100644 --- a/poky/meta/recipes-extended/parted/parted_3.2.bb +++ b/poky/meta/recipes-extended/parted/parted_3.2.bb @@ -48,3 +48,9 @@ do_install_ptest() { } RDEPENDS_${PN}-ptest = "bash coreutils perl util-linux-losetup python3" + +inherit update-alternatives + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN} = "partprobe" +ALTERNATIVE_LINK_NAME[partprobe] = "${sbindir}/partprobe" diff --git a/poky/meta/recipes-extended/pbzip2/pbzip2/0001-pbzip2-Fix-invalid-suffix-on-literal-C-11-warning.patch b/poky/meta/recipes-extended/pbzip2/pbzip2/0001-pbzip2-Fix-invalid-suffix-on-literal-C-11-warning.patch new file mode 100644 index 000000000..8fc377c31 --- /dev/null +++ b/poky/meta/recipes-extended/pbzip2/pbzip2/0001-pbzip2-Fix-invalid-suffix-on-literal-C-11-warning.patch @@ -0,0 +1,73 @@ +From de4a948d356c9befb88c796168e97eb05b9a3385 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 23 Apr 2018 22:54:42 -0700 +Subject: [PATCH] pbzip2: Fix invalid suffix on literal C++11 warning + +Fixes -Wreserved-user-defined-literal] errors. +Also reported in launchpad here https://bugs.launchpad.net/pbzip2/+bug/1746369 + +Upstream-Status: Submitted [https://launchpadlibrarian.net/355230152/pbzip2.patch] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + pbzip2.cpp | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/pbzip2.cpp b/pbzip2.cpp +index 66ca978..4287ea7 100644 +--- a/pbzip2.cpp ++++ b/pbzip2.cpp +@@ -1220,7 +1220,7 @@ int producer_decompress(int hInfile, OFF_T fileSize, queue *fifo) + // give warning to user if block is larger than 250 million bytes + if (fileData->bufSize > 250000000) + { +- fprintf(stderr, "pbzip2: *WARNING: Compressed block size is large [%"PRIuMAX" bytes].\n", ++ fprintf(stderr, "pbzip2: *WARNING: Compressed block size is large [%" PRIuMAX " bytes].\n", + (uintmax_t) fileData->bufSize); + fprintf(stderr, " If program aborts, use regular BZIP2 to decompress.\n"); + } +@@ -1829,7 +1829,7 @@ void *fileWriter(void *outname) + + if (QuietMode != 1) + { +- fprintf(stderr, " Output Size: %"PRIuMAX" bytes\n", (uintmax_t)CompressedSize); ++ fprintf(stderr, " Output Size: %" PRIuMAX " bytes\n", (uintmax_t)CompressedSize); + } + + #ifdef PBZIP_DEBUG +@@ -2072,7 +2072,7 @@ int directcompress(int hInfile, OFF_T fileSize, int blockSize, const char *OutFi + close(hOutfile); + if (QuietMode != 1) + { +- fprintf(stderr, " Output Size: %"PRIuMAX" bytes\n", (uintmax_t)CompressedSize); ++ fprintf(stderr, " Output Size: %" PRIuMAX " bytes\n", (uintmax_t)CompressedSize); + } + + syncSetProducerDone(1); // Not really needed for direct version +@@ -2794,7 +2794,7 @@ void outputBufferInit(size_t size) + // unlikely to get here since more likely exception will be thrown + if (OutputBuffer.size() != size) + { +- fprintf(stderr, "pbzip2: *ERROR: Could not initialize (OutputBuffer); size=%"PRIuMAX"! Aborting...\n", (uintmax_t)size); ++ fprintf(stderr, "pbzip2: *ERROR: Could not initialize (OutputBuffer); size=%" PRIuMAX "! Aborting...\n", (uintmax_t)size); + safe_mutex_unlock(OutMutex); + exit(1); + } +@@ -4102,7 +4102,7 @@ int main(int argc, char* argv[]) + if (decompress == 1) + fprintf(stderr, " BWT Block Size: %c00k\n", BWTblockSizeChar); + if (hasInFile) +- fprintf(stderr, " Input Size: %"PRIuMAX" bytes\n", (uintmax_t)InFileSize); ++ fprintf(stderr, " Input Size: %" PRIuMAX " bytes\n", (uintmax_t)InFileSize); + } + + if (decompress == 1) +@@ -4224,7 +4224,7 @@ int main(int argc, char* argv[]) + { + NumBufferedBlocksMax = numCPU; + if (QuietMode != 1) +- fprintf(stderr, "*Warning* Max memory limit increased to %"PRIuMAX" MB to support %d CPUs\n", (uintmax_t)((NumBufferedBlocksMax + (numCPU * 2)) * blockSize)/1000000, numCPU); ++ fprintf(stderr, "*Warning* Max memory limit increased to %" PRIuMAX " MB to support %d CPUs\n", (uintmax_t)((NumBufferedBlocksMax + (numCPU * 2)) * blockSize)/1000000, numCPU); + } + else + { diff --git a/poky/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb b/poky/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb index 06d37adc3..7b1b0a117 100644 --- a/poky/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb +++ b/poky/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb @@ -11,12 +11,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=398b8832c6f840cfebd20ab2be6a3743" DEPENDS = "bzip2" DEPENDS_append_class-native = " bzip2-replacement-native" -SRC_URI = "https://launchpad.net/${BPN}/1.1/${PV}/+download/${BP}.tar.gz" +SRC_URI = "https://launchpad.net/${BPN}/1.1/${PV}/+download/${BP}.tar.gz \ + file://0001-pbzip2-Fix-invalid-suffix-on-literal-C-11-warning.patch \ + " SRC_URI[md5sum] = "4cb87da2dba05540afce162f34b3a9a6" SRC_URI[sha256sum] = "8fd13eaaa266f7ee91f85c1ea97c86d9c9cc985969db9059cdebcb1e1b7bdbe6" -UPSTREAM_CHECK_URI = "http://compression.ca/pbzip2/" +UPSTREAM_CHECK_URI = "https://launchpad.net/pbzip2/+milestones" +UPSTREAM_CHECK_REGEX = "pbzip2 (?P<pver>\d+(\.\d+)+)" EXTRA_OEMAKE = "CXX='${CXX} ${CXXFLAGS}' LDFLAGS='${LDFLAGS}'" diff --git a/poky/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb b/poky/meta/recipes-extended/perl/libxml-sax-perl_1.00.bb index cdcbebffc..141830efe 100644 --- a/poky/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb +++ b/poky/meta/recipes-extended/perl/libxml-sax-perl_1.00.bb @@ -12,14 +12,13 @@ SECTION = "libs" LICENSE = "Artistic-1.0 | GPL-1.0+" DEPENDS += "libxml-namespacesupport-perl-native" RDEPENDS_${PN} += "libxml-namespacesupport-perl libxml-sax-base-perl perl-module-file-temp" -PR = "r2" LIC_FILES_CHKSUM = "file://LICENSE;md5=65c4cd8f39c24c7135ed70dacbcb09e3" SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GR/GRANTM/XML-SAX-${PV}.tar.gz" -SRC_URI[md5sum] = "290f5375ae87fdebfdb5bc3854019f24" -SRC_URI[sha256sum] = "32b04b8e36b6cc4cfc486de2d859d87af5386dd930f2383c49347050d6f5ad84" +SRC_URI[md5sum] = "861a454f7bf269990ed2c1c125f4db48" +SRC_URI[sha256sum] = "45ea6564ef8692155d57b2de0862b6442d3c7e29f4a9bc9ede5d7ecdc74c2ae3" S = "${WORKDIR}/XML-SAX-${PV}" diff --git a/poky/meta/recipes-extended/pixz/pixz/0001-configure-Detect-headers-before-using-them.patch b/poky/meta/recipes-extended/pixz/pixz/0001-configure-Detect-headers-before-using-them.patch deleted file mode 100644 index 12bae28dc..000000000 --- a/poky/meta/recipes-extended/pixz/pixz/0001-configure-Detect-headers-before-using-them.patch +++ /dev/null @@ -1,51 +0,0 @@ -From c84480be8df6966c538d1fb67ccae2f42cc46421 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 22 Mar 2016 07:36:54 +0000 -Subject: [PATCH 1/2] configure: Detect headers before using them - -Current logic does not work when system does not have -sys/endian.h, since it tried to reuse the cached results -from first try of detecting htole64 in sys/endian.h which is -'no' and hence the second try to look into endian.h also -comes out negative. - -So we check for header and then run the test for symbols -and these symbols are not standard and we need to define _GNU_SOURCE -for it to work, this issue is exposed by systems using musl e.g. - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Submitted - - configure.ac | 13 +++++++++---- - 1 file changed, 9 insertions(+), 4 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 4cb56bc..5e23c50 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -69,12 +69,17 @@ AC_FUNC_MALLOC - AC_FUNC_REALLOC - AC_FUNC_STRTOD - AC_CHECK_FUNCS([memchr memmove memset strerror strtol]) --AC_CHECK_DECLS([htole64, le64toh], -- [], -+AC_CHECK_HEADER([sys/endian.h], - [ -- AC_CHECK_DECLS([htole64, le64toh], [], [], [#include <endian.h>]) -+ AC_CHECK_DECLS([htole64, le64toh], [], [], [#define _GNU_SOURCE 1 #include <sys/endian.h>]) - ], -- [#include <sys/endian.h>]) -+ [], []) -+ -+AC_CHECK_HEADER([endian.h], -+ [ -+ AC_CHECK_DECLS([htole64, le64toh], [], [], [#define _GNU_SOURCE 1 #include <endian.h>]) -+ ], -+ [], []) - - AC_CONFIG_FILES([Makefile - src/Makefile --- -1.8.3.1 - diff --git a/poky/meta/recipes-extended/pixz/pixz/0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch b/poky/meta/recipes-extended/pixz/pixz/0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch deleted file mode 100644 index 6b615988d..000000000 --- a/poky/meta/recipes-extended/pixz/pixz/0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 5f3a535987bae4c3e3d9e9079c7526e399f7aecd Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 22 Mar 2016 07:42:39 +0000 -Subject: [PATCH 2/2] endian: Use macro bswap_64 instead of __bswap_64 - -byteswap.h defines then as public APIs on all libc -on linux including musl - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Submitted - src/endian.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/endian.c b/src/endian.c -index b7724f3..51aea58 100644 ---- a/src/endian.c -+++ b/src/endian.c -@@ -15,6 +15,7 @@ void xle64enc(uint8_t *d, uint64_t n) { - #include <stdint.h> - #ifdef __linux__ - #include <endian.h> -+ #include <byteswap.h> - #else - #include <sys/endian.h> - #endif -@@ -23,7 +24,7 @@ void xle64enc(uint8_t *d, uint64_t n) { - # if __BYTE_ORDER == __LITTLE_ENDIAN - # define htole64(x) (x) - # else --# define htole64(x) __bswap_64 (x) -+# define htole64(x) bswap_64 (x) - # endif - #endif - -@@ -31,7 +32,7 @@ void xle64enc(uint8_t *d, uint64_t n) { - # if __BYTE_ORDER == __LITTLE_ENDIAN - # define le64toh(x) (x) - # else --# define le64toh(x) __bswap_64 (x) -+# define le64toh(x) bswap_64 (x) - # endif - #endif - --- -1.8.3.1 - diff --git a/poky/meta/recipes-extended/pixz/pixz/936d8068ae19d95260d3058f41dd6cf718101cd6.patch b/poky/meta/recipes-extended/pixz/pixz/936d8068ae19d95260d3058f41dd6cf718101cd6.patch deleted file mode 100644 index e3489db5b..000000000 --- a/poky/meta/recipes-extended/pixz/pixz/936d8068ae19d95260d3058f41dd6cf718101cd6.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 936d8068ae19d95260d3058f41dd6cf718101cd6 Mon Sep 17 00:00:00 2001 -From: Christian Krause <kizkizzbangbang@googlemail.com> -Date: Sat, 26 Dec 2015 14:36:17 +0100 -Subject: [PATCH] option to not build man page - -fixes #56 ---- - configure.ac | 23 +++++++++++++++++++---- - src/Makefile.am | 2 ++ - 2 files changed, 21 insertions(+), 4 deletions(-) - -Upstream-Status: Backport -RP 2016/01/22 - -diff --git a/configure.ac b/configure.ac -index b437e56..4cb56bc 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -20,13 +20,28 @@ AC_CHECK_FILE( - [src/pixz.1], - [], - [ -- AC_CHECK_PROG(A2X, a2x, a2x, []) -- if test "x$A2X" = x ; then -- AC_MSG_ERROR([AsciiDoc not found, not able to generate the man page.]) -- fi -+ AC_ARG_WITH( -+ [manpage], -+ [ --without-manpage don't build man page], -+ [case ${withval} in -+ yes) manpage=true ;; -+ no) manpage=false ;; -+ *) AC_MSG_ERROR([bad value ${withval} for --with-manpage]) ;; -+ esac], -+ [manpage=true] -+ ) - ] - ) - -+AM_CONDITIONAL([MANPAGE], [test x$manpage = xtrue]) -+ -+if test x$manpage = xtrue ; then -+ AC_CHECK_PROG(A2X, a2x, a2x, []) -+ if test "x$A2X" = x ; then -+ AC_MSG_ERROR([AsciiDoc not found, not able to generate the man page.]) -+ fi -+fi -+ - # Checks for libraries. - AC_CHECK_LIB([m], [ceil]) - AX_PTHREAD -diff --git a/src/Makefile.am b/src/Makefile.am -index 600ec90..b98f450 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -15,6 +15,7 @@ pixz_SOURCES = \ - read.c \ - write.c - -+if MANPAGE - # TODO remove when possible: This is a hack because a2x is not able to output the man pages to a - # specific directory, only to where the source is. - pixz.1: pixz.1.asciidoc -@@ -26,3 +27,4 @@ man_MANS = pixz.1 - CLEANFILES = pixz.1 - - EXTRA_DIST = $(man_MANS) pixz.1.asciidoc -+endif diff --git a/poky/meta/recipes-extended/pixz/pixz_1.0.6.bb b/poky/meta/recipes-extended/pixz/pixz_1.0.6.bb deleted file mode 100644 index 303258658..000000000 --- a/poky/meta/recipes-extended/pixz/pixz_1.0.6.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "Parallel, indexed xz compressor" - -DEPENDS = "xz libarchive" - -SRC_URI = "https://github.com/vasi/pixz/releases/download/v${PV}/${BPN}-${PV}.tar.xz" -SRC_URI[md5sum] = "f6dc5909c9a31b192f69aa397ae8df48" -SRC_URI[sha256sum] = "02c50746b134fa1b1aae41fcc314d7c6f1919b3d48bcdea01bf11769f83f72e8" - -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=5cf6d164086105f1512ccb81bfff1926" - -SRC_URI += "file://936d8068ae19d95260d3058f41dd6cf718101cd6.patch \ - file://0001-configure-Detect-headers-before-using-them.patch \ - file://0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch \ -" -UPSTREAM_CHECK_URI = "https://github.com/vasi/pixz/releases" - -PACKAGECONFIG[manpages] = "--with-manpage, --without-manpage, asciidoc-native" - -CFLAGS_append_libc-musl = " -D_GNU_SOURCE" -CACHED_CONFIGUREVARS += "ac_cv_file_src_pixz_1=no" - -inherit autotools pkgconfig manpages - -BBCLASSEXTEND = "native" diff --git a/poky/meta/recipes-extended/procps/procps/0001-Fix-out-of-tree-builds.patch b/poky/meta/recipes-extended/procps/procps/0001-Fix-out-of-tree-builds.patch new file mode 100644 index 000000000..e54819436 --- /dev/null +++ b/poky/meta/recipes-extended/procps/procps/0001-Fix-out-of-tree-builds.patch @@ -0,0 +1,24 @@ +From 0825db94fc91fa2150c0e649e92cc8dcc44f4b38 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Wed, 4 Apr 2018 14:09:45 +0300 +Subject: [PATCH] Fix out of tree builds + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + include/nls.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/nls.h b/include/nls.h +index 1166b7b..f5abe05 100644 +--- a/include/nls.h ++++ b/include/nls.h +@@ -6,7 +6,7 @@ + #define PROCPS_NG_NLS_H + + /* programs issuing textdomain() need PACKAGE string */ +-#include "../config.h" ++#include "config.h" + + /* programs issuing bindtextdomain() also need LOCALEDIR string */ + #ifndef LOCALEDIR diff --git a/poky/meta/recipes-extended/procps/procps/CVE-2018-1124.patch b/poky/meta/recipes-extended/procps/procps/CVE-2018-1124.patch deleted file mode 100644 index bc78faf0d..000000000 --- a/poky/meta/recipes-extended/procps/procps/CVE-2018-1124.patch +++ /dev/null @@ -1,176 +0,0 @@ -From bdd058a0e676d2f013027fcfb2b344c313112a50 Mon Sep 17 00:00:00 2001 -From: Qualys Security Advisory <qsa@qualys.com> -Date: Thu, 1 Jan 1970 00:00:00 +0000 -Subject: [PATCH 074/126] proc/readproc.c: Fix bugs and overflows in - file2strvec(). - -Note: this is by far the most important and complex patch of the whole -series, please review it carefully; thank you very much! - -For this patch, we decided to keep the original function's design and -skeleton, to avoid regressions and behavior changes, while fixing the -various bugs and overflows. And like the "Harden file2str()" patch, this -patch does not fail when about to overflow, but truncates instead: there -is information available about this process, so return it to the caller; -also, we used INT_MAX as a limit, but a lower limit could be used. - -The easy changes: - -- Replace sprintf() with snprintf() (and check for truncation). - -- Replace "if (n == 0 && rbuf == 0)" with "if (n <= 0 && tot <= 0)" and - do break instead of return: it simplifies the code (only one place to - handle errors), and also guarantees that in the while loop either n or - tot is > 0 (or both), even if n is reset to 0 when about to overflow. - -- Remove the "if (n < 0)" block in the while loop: it is (and was) dead - code, since we enter the while loop only if n >= 0. - -- Rewrite the missing-null-terminator detection: in the original - function, if the size of the file is a multiple of 2047, a null- - terminator is appended even if the file is already null-terminated. - -- Replace "if (n <= 0 && !end_of_file)" with "if (n < 0 || tot <= 0)": - originally, it was equivalent to "if (n < 0)", but we added "tot <= 0" - to handle the first break of the while loop, and to guarantee that in - the rest of the function tot is > 0. - -- Double-force ("belt and suspenders") the null-termination of rbuf: - this is (and was) essential to the correctness of the function. - -- Replace the final "while" loop with a "for" loop that behaves just - like the preceding "for" loop: in the original function, this would - lead to unexpected results (for example, if rbuf is |\0|A|\0|, this - would return the array {"",NULL} but should return {"","A",NULL}; and - if rbuf is |A|\0|B| (should never happen because rbuf should be null- - terminated), this would make room for two pointers in ret, but would - write three pointers to ret). - -The hard changes: - -- Prevent the integer overflow of tot in the while loop, but unlike - file2str(), file2strvec() cannot let tot grow until it almost reaches - INT_MAX, because it needs more space for the pointers: this is why we - introduced ARG_LEN, which also guarantees that we can add "align" and - a few sizeof(char*)s to tot without overflowing. - -- Prevent the integer overflow of "tot + c + align": when INT_MAX is - (almost) reached, we write the maximal safe amount of pointers to ret - (ARG_LEN guarantees that there is always space for *ret = rbuf and the - NULL terminator). -[carnil: backport for 3.3.9: Add include for limits.h and use of MAX_INT] - -CVE: CVE-2018-1124 -Upstream-Status: Backport [https://gitlab.com/procps-ng/procps/commit/36c350f07c75aabf747fb833f52a234ae5781b20] - -Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> ---- - proc/readproc.c | 53 ++++++++++++++++++++++++++++++++--------------------- - 1 file changed, 32 insertions(+), 21 deletions(-) - -diff -Naurp procps-ng-3.3.12_org/proc/readproc.c procps-ng-3.3.12/proc/readproc.c ---- procps-ng-3.3.12_org/proc/readproc.c 2016-07-09 14:49:25.825306872 -0700 -+++ procps-ng-3.3.12/proc/readproc.c 2018-07-24 00:46:49.366202531 -0700 -@@ -37,6 +37,7 @@ - #include <dirent.h> - #include <sys/types.h> - #include <sys/stat.h> -+#include <limits.h> - #ifdef WITH_SYSTEMD - #include <systemd/sd-login.h> - #endif ---- a/proc/readproc.c -+++ b/proc/readproc.c -@@ -600,11 +601,12 @@ static int file2str(const char *director - - static char** file2strvec(const char* directory, const char* what) { - char buf[2048]; /* read buf bytes at a time */ -- char *p, *rbuf = 0, *endbuf, **q, **ret; -+ char *p, *rbuf = 0, *endbuf, **q, **ret, *strp; - int fd, tot = 0, n, c, end_of_file = 0; - int align; - -- sprintf(buf, "%s/%s", directory, what); -+ const int len = snprintf(buf, sizeof buf, "%s/%s", directory, what); -+ if(len <= 0 || (size_t)len >= sizeof buf) return NULL; - fd = open(buf, O_RDONLY, 0); - if(fd==-1) return NULL; - -@@ -612,18 +614,23 @@ static char** file2strvec(const char* di - while ((n = read(fd, buf, sizeof buf - 1)) >= 0) { - if (n < (int)(sizeof buf - 1)) - end_of_file = 1; -- if (n == 0 && rbuf == 0) { -- close(fd); -- return NULL; /* process died between our open and read */ -+ if (n <= 0 && tot <= 0) { /* nothing read now, nothing read before */ -+ break; /* process died between our open and read */ - } -- if (n < 0) { -- if (rbuf) -- free(rbuf); -- close(fd); -- return NULL; /* read error */ -+ /* ARG_LEN is our guesstimated median length of a command-line argument -+ or environment variable (the minimum is 1, the maximum is 131072) */ -+ #define ARG_LEN 64 -+ if (tot >= INT_MAX / (ARG_LEN + (int)sizeof(char*)) * ARG_LEN - n) { -+ end_of_file = 1; /* integer overflow: null-terminate and break */ -+ n = 0; /* but tot > 0 */ - } -- if (end_of_file && (n == 0 || buf[n-1]))/* last read char not null */ -+ #undef ARG_LEN -+ if (end_of_file && -+ ((n > 0 && buf[n-1] != '\0') || /* last read char not null */ -+ (n <= 0 && rbuf[tot-1] != '\0'))) /* last read char not null */ - buf[n++] = '\0'; /* so append null-terminator */ -+ -+ if (n <= 0) break; /* unneeded (end_of_file = 1) but avoid realloc */ - rbuf = xrealloc(rbuf, tot + n); /* allocate more memory */ - memcpy(rbuf + tot, buf, n); /* copy buffer into it */ - tot += n; /* increment total byte ctr */ -@@ -631,29 +638,34 @@ static char** file2strvec(const char* di - break; - } - close(fd); -- if (n <= 0 && !end_of_file) { -+ if (n < 0 || tot <= 0) { /* error, or nothing read */ - if (rbuf) free(rbuf); - return NULL; /* read error */ - } -+ rbuf[tot-1] = '\0'; /* belt and suspenders (the while loop did it, too) */ - endbuf = rbuf + tot; /* count space for pointers */ - align = (sizeof(char*)-1) - ((tot + sizeof(char*)-1) & (sizeof(char*)-1)); -- for (c = 0, p = rbuf; p < endbuf; p++) { -- if (!*p || *p == '\n') -+ c = sizeof(char*); /* one extra for NULL term */ -+ for (p = rbuf; p < endbuf; p++) { -+ if (!*p || *p == '\n') { -+ if (c >= INT_MAX - (tot + (int)sizeof(char*) + align)) break; - c += sizeof(char*); -+ } - if (*p == '\n') - *p = 0; - } -- c += sizeof(char*); /* one extra for NULL term */ - - rbuf = xrealloc(rbuf, tot + c + align); /* make room for ptrs AT END */ - endbuf = rbuf + tot; /* addr just past data buf */ - q = ret = (char**) (endbuf+align); /* ==> free(*ret) to dealloc */ -- *q++ = p = rbuf; /* point ptrs to the strings */ -- endbuf--; /* do not traverse final NUL */ -- while (++p < endbuf) -- if (!*p) /* NUL char implies that */ -- *q++ = p+1; /* next string -> next char */ -- -+ for (strp = p = rbuf; p < endbuf; p++) { -+ if (!*p) { /* NUL char implies that */ -+ if (c < 2 * (int)sizeof(char*)) break; -+ c -= sizeof(char*); -+ *q++ = strp; /* point ptrs to the strings */ -+ strp = p+1; /* next string -> next char */ -+ } -+ } - *q = 0; /* null ptr list terminator */ - return ret; - } diff --git a/poky/meta/recipes-extended/procps/procps_3.3.12.bb b/poky/meta/recipes-extended/procps/procps_3.3.15.bb index 6e15b0a5a..9756db0e7 100644 --- a/poky/meta/recipes-extended/procps/procps_3.3.12.bb +++ b/poky/meta/recipes-extended/procps/procps_3.3.15.bb @@ -14,11 +14,11 @@ inherit autotools gettext pkgconfig update-alternatives SRC_URI = "http://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-${PV}.tar.xz \ file://sysctl.conf \ - file://CVE-2018-1124.patch \ - " + file://0001-Fix-out-of-tree-builds.patch \ + " -SRC_URI[md5sum] = "957e42e8b193490b2111252e4a2b443c" -SRC_URI[sha256sum] = "6ed65ab86318f37904e8f9014415a098bec5bc53653e5d9ab404f95ca5e1a7d4" +SRC_URI[md5sum] = "2b0717a7cb474b3d6dfdeedfbad2eccc" +SRC_URI[sha256sum] = "10bd744ffcb3de2d591d2f6acf1a54a7ba070fdcc432a855931a5057149f0465" S = "${WORKDIR}/procps-ng-${PV}" diff --git a/poky/meta/recipes-extended/psmisc/psmisc_23.0.bb b/poky/meta/recipes-extended/psmisc/psmisc_23.1.bb index 2b07f4974..f07c9db1e 100644 --- a/poky/meta/recipes-extended/psmisc/psmisc_23.0.bb +++ b/poky/meta/recipes-extended/psmisc/psmisc_23.1.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 = "67b1da268f4c0ce6859980e3dfcfaec5b2448e80" +SRCREV = "bd952b3063f2466ecab4ec093026cf0c4ce373c7" S = "${WORKDIR}/git" diff --git a/poky/meta/recipes-extended/rpcbind/rpcbind/rpcbind_add_option_to_fix_port_number.patch b/poky/meta/recipes-extended/rpcbind/rpcbind/rpcbind_add_option_to_fix_port_number.patch new file mode 100644 index 000000000..434b6b1c4 --- /dev/null +++ b/poky/meta/recipes-extended/rpcbind/rpcbind/rpcbind_add_option_to_fix_port_number.patch @@ -0,0 +1,130 @@ +From 76f8598fd20727908e760cbb497dd6a17eda4af5 Mon Sep 17 00:00:00 2001 +From: Roy Li <rongqing.li@windriver.com> +Date: Wed, 17 Sep 2014 13:22:14 +0800 +Subject: [PATCH] add option to make users able to use fixed port number + +Upstream-Status: Submitted [https://sourceforge.net/p/rpcbind/discussion/716839/thread/32af721d/] + +Signed-off-by: Li Wang <li.wang@windriver.com> +Signed-off-by: Roy Li <rongqing.li@windriver.com> +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + man/rpcbind.8 | 4 +++- + src/rpcb_svc_com.c | 17 +++++++++++++++++ + src/rpcbind.c | 8 ++++++-- + 3 files changed, 26 insertions(+), 3 deletions(-) + +diff --git a/man/rpcbind.8 b/man/rpcbind.8 +index af6200f..2e6146b 100644 +--- a/man/rpcbind.8 ++++ b/man/rpcbind.8 +@@ -11,7 +11,7 @@ + .Nd universal addresses to RPC program number mapper + .Sh SYNOPSIS + .Nm +-.Op Fl adhiLls ++.Op Fl adhpiLls + .Sh DESCRIPTION + The + .Nm +@@ -107,6 +107,8 @@ will automatically add + and if IPv6 is enabled, + .Li ::1 + to the list. ++.It Fl p ++Bind for fixed UDP port number + .It Fl i + .Dq Insecure + mode. +diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c +index 8aef9e5..c2632a4 100644 +--- a/src/rpcb_svc_com.c ++++ b/src/rpcb_svc_com.c +@@ -48,6 +48,7 @@ + #include <rpc/rpc.h> + #include <rpc/rpcb_prot.h> + #include <rpc/svc_dg.h> ++#include <rpc/rpc_com.h> + #include <netconfig.h> + #include <errno.h> + #include <syslog.h> +@@ -497,6 +498,7 @@ xdr_opaque_parms(XDR *xdrs, struct r_rmtcall_args *cap) + + static struct rmtcallfd_list *rmthead; + static struct rmtcallfd_list *rmttail; ++extern unsigned short fixed_port; + + int + create_rmtcall_fd(struct netconfig *nconf) +@@ -504,6 +506,8 @@ create_rmtcall_fd(struct netconfig *nconf) + int fd; + struct rmtcallfd_list *rmt; + SVCXPRT *xprt; ++ struct __rpc_sockinfo si; ++ struct t_bind taddr; + + if ((fd = __rpc_nconf2fd(nconf)) == -1) { + if (debugging) +@@ -512,6 +516,19 @@ create_rmtcall_fd(struct netconfig *nconf) + nconf->nc_device, errno); + return (-1); + } ++ ++ if (fixed_port) { ++ __rpc_fd2sockinfo(fd, &si); ++ memset(&taddr, 0, sizeof(taddr)); ++ taddr.addr.maxlen = taddr.addr.len = si.si_alen; ++ taddr.addr.buf = malloc(si.si_alen); ++ if (taddr.addr.buf == NULL) { ++ return -1; ++ } ++ *(unsigned short *)(&(taddr.addr.buf[0])) = si.si_af; ++ *(unsigned short *)(&(taddr.addr.buf[2])) = htons(fixed_port); ++ xprt = svc_tli_create(fd, nconf, &taddr, RPC_MAXDATASIZE, RPC_MAXDATASIZE); ++ } else + xprt = svc_tli_create(fd, 0, (struct t_bind *) 0, 0, 0); + if (xprt == NULL) { + if (debugging) +diff --git a/src/rpcbind.c b/src/rpcbind.c +index 137011b..dc3d2d6 100644 +--- a/src/rpcbind.c ++++ b/src/rpcbind.c +@@ -111,6 +111,7 @@ int runasdaemon = 0; + int insecure = 0; + int oldstyle_local = 0; + int verboselog = 0; ++unsigned short fixed_port = 0; + + char **hosts = NULL; + int nhosts = 0; +@@ -869,7 +870,7 @@ parseargs(int argc, char *argv[]) + { + int c; + oldstyle_local = 1; +- while ((c = getopt(argc, argv, "adh:ilswf")) != -1) { ++ while ((c = getopt(argc, argv, "adh:p:ilswf")) != -1) { + switch (c) { + case 'a': + doabort = 1; /* when debugging, do an abort on */ +@@ -887,6 +888,9 @@ parseargs(int argc, char *argv[]) + if (hosts[nhosts - 1] == NULL) + errx(1, "Out of memory"); + break; ++ case 'p': ++ fixed_port = atoi(optarg); ++ break; + case 'i': + insecure = 1; + break; +@@ -905,7 +909,7 @@ parseargs(int argc, char *argv[]) + break; + #endif + default: /* error */ +- fprintf(stderr, "usage: rpcbind [-adhilswf]\n"); ++ fprintf(stderr, "usage: rpcbind [-adhpilswf]\n"); + exit (1); + } + } +-- +1.9.1 + diff --git a/poky/meta/recipes-extended/rpcbind/rpcbind_0.2.4.bb b/poky/meta/recipes-extended/rpcbind/rpcbind_0.2.4.bb index dcdee6c46..3c6774c28 100644 --- a/poky/meta/recipes-extended/rpcbind/rpcbind_0.2.4.bb +++ b/poky/meta/recipes-extended/rpcbind/rpcbind_0.2.4.bb @@ -18,6 +18,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \ 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" diff --git a/poky/meta/recipes-extended/rpcsvc-proto/rpcsvc-proto.bb b/poky/meta/recipes-extended/rpcsvc-proto/rpcsvc-proto.bb new file mode 100644 index 000000000..cb5b288c4 --- /dev/null +++ b/poky/meta/recipes-extended/rpcsvc-proto/rpcsvc-proto.bb @@ -0,0 +1,37 @@ +# Copyright (C) 2018 Khem Raj <raj.khem@gmail.com> +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "rpcsvc protocol definitions from glibc" + +DESCRIPTION = "This package contains rpcsvc proto.x files from glibc, which are\ +missing in libtirpc. Additional it contains rpcgen, which is needed\ +to create header files and sources from protocol files.\ +This package is only needed, if glibc is installed without the\ +deprecated sunrpc functionality and libtirpc should replace it." + +HOMEPAGE = "https://github.com/thkukuk/rpcsvc-proto" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=0daaf958d5531ab86169ec6e275e1517" +SECTION = "libs" +DEPENDS += "rpcsvc-proto-native" + +PV = "1.4+git${SRCPV}" + +SRCREV = "9bc3b5b785723cfff459b0c01b39d87d4bed975c" + +SRC_URI = "git://github.com/thkukuk/${BPN} \ + file://0001-Use-cross-compiled-rpcgen.patch \ + " + +S = "${WORKDIR}/git" + +inherit autotools + +EXTRA_OEMAKE_class-native = " -C rpcgen" + +do_install_append() { + # They come from quota recipe + rm -rf ${D}${includedir}/rpcsvc/rquota.[hx] +} + +BBCLASSEXTEND += "native nativesdk" diff --git a/poky/meta/recipes-extended/rpcsvc-proto/rpcsvc-proto/0001-Use-cross-compiled-rpcgen.patch b/poky/meta/recipes-extended/rpcsvc-proto/rpcsvc-proto/0001-Use-cross-compiled-rpcgen.patch new file mode 100644 index 000000000..208974004 --- /dev/null +++ b/poky/meta/recipes-extended/rpcsvc-proto/rpcsvc-proto/0001-Use-cross-compiled-rpcgen.patch @@ -0,0 +1,23 @@ +From de9345207beb71e4d5b6b40b52cac4ebd2e3858c Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 27 Apr 2018 23:23:20 -0700 +Subject: [PATCH] Use cross compiled rpcgen + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + rpcsvc/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: git/rpcsvc/Makefile.am +=================================================================== +--- git.orig/rpcsvc/Makefile.am ++++ git/rpcsvc/Makefile.am +@@ -12,5 +12,5 @@ nodist_rpcsvc_HEADERS = klm_prot.h nlm_p + nfs_prot.h rquota.h sm_inter.h + + %.h: %.x +- $(top_builddir)/rpcgen/rpcgen -h -o $@ $< ++ rpcgen -h -o $@ $< + diff --git a/poky/meta/recipes-extended/screen/screen_4.6.2.bb b/poky/meta/recipes-extended/screen/screen_4.6.2.bb index 7a33c31d8..375dce949 100644 --- a/poky/meta/recipes-extended/screen/screen_4.6.2.bb +++ b/poky/meta/recipes-extended/screen/screen_4.6.2.bb @@ -11,7 +11,7 @@ LICENSE = "GPLv3+" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ file://screen.h;endline=26;md5=3971142989289a8198a544220703c2bf" -DEPENDS = "ncurses \ +DEPENDS = "ncurses virtual/crypt \ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" RDEPENDS_${PN} = "base-files" diff --git a/poky/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch b/poky/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch index a6f604b65..aac2d42b1 100644 --- a/poky/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch +++ b/poky/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch @@ -11,6 +11,7 @@ Upstream-Status: Inappropriate [disable feature] Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> --- src/groupadd.c | 3 +++ src/groupdel.c | 3 +++ @@ -22,7 +23,7 @@ Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> 7 files changed, 21 insertions(+) diff --git a/src/groupadd.c b/src/groupadd.c -index 39b4ec0..f716f57 100644 +index 63e1c48..a596c49 100644 --- a/src/groupadd.c +++ b/src/groupadd.c @@ -34,6 +34,9 @@ @@ -36,7 +37,7 @@ index 39b4ec0..f716f57 100644 #include <fcntl.h> #include <getopt.h> diff --git a/src/groupdel.c b/src/groupdel.c -index da99347..46a679c 100644 +index 70bed01..ababd81 100644 --- a/src/groupdel.c +++ b/src/groupdel.c @@ -34,6 +34,9 @@ @@ -50,7 +51,7 @@ index da99347..46a679c 100644 #include <fcntl.h> #include <grp.h> diff --git a/src/groupmems.c b/src/groupmems.c -index e4f107f..95cb073 100644 +index fc91c8b..2842514 100644 --- a/src/groupmems.c +++ b/src/groupmems.c @@ -32,6 +32,9 @@ @@ -64,7 +65,7 @@ index e4f107f..95cb073 100644 #include <getopt.h> #include <grp.h> diff --git a/src/groupmod.c b/src/groupmod.c -index d9d3807..6229737 100644 +index 72daf2c..8965f9d 100644 --- a/src/groupmod.c +++ b/src/groupmod.c @@ -34,6 +34,9 @@ @@ -78,7 +79,7 @@ index d9d3807..6229737 100644 #include <fcntl.h> #include <getopt.h> diff --git a/src/useradd.c b/src/useradd.c -index e1ebf50..25679d8 100644 +index 3aaf45c..1ab9174 100644 --- a/src/useradd.c +++ b/src/useradd.c @@ -34,6 +34,9 @@ @@ -92,7 +93,7 @@ index e1ebf50..25679d8 100644 #include <ctype.h> #include <errno.h> diff --git a/src/userdel.c b/src/userdel.c -index 19b12bc..a083929 100644 +index c8de1d3..24d3ea9 100644 --- a/src/userdel.c +++ b/src/userdel.c @@ -34,6 +34,9 @@ @@ -102,11 +103,11 @@ index 19b12bc..a083929 100644 +/* Disable use of syslog since we're running this command against a sysroot */ +#undef USE_SYSLOG + + #include <assert.h> #include <errno.h> #include <fcntl.h> - #include <getopt.h> diff --git a/src/usermod.c b/src/usermod.c -index 685b50a..28e5cfc 100644 +index ccfbb99..24fb60d 100644 --- a/src/usermod.c +++ b/src/usermod.c @@ -34,6 +34,9 @@ @@ -116,9 +117,9 @@ index 685b50a..28e5cfc 100644 +/* Disable use of syslog since we're running this command against a sysroot */ +#undef USE_SYSLOG + + #include <assert.h> #include <ctype.h> #include <errno.h> - #include <fcntl.h> -- -2.1.0 +2.11.0 diff --git a/poky/meta/recipes-extended/shadow/files/0001-Do-not-read-login.defs-before-doing-chroot.patch b/poky/meta/recipes-extended/shadow/files/0001-Do-not-read-login.defs-before-doing-chroot.patch deleted file mode 100644 index 828b95a57..000000000 --- a/poky/meta/recipes-extended/shadow/files/0001-Do-not-read-login.defs-before-doing-chroot.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 170c25c8e0b5c3dc2615d1db94c8d24a13ff99bf Mon Sep 17 00:00:00 2001 -From: Peter Kjellerstedt <pkj@axis.com> -Date: Thu, 11 Sep 2014 15:11:23 +0200 -Subject: [PATCH] Do not read login.defs before doing chroot() - -If "useradd --root <root> ..." was used, the login.defs file would still -be read from /etc/login.defs instead of <root>/etc/login.defs. This was -due to getdef_ulong() being called before process_root_flag(). - -Upstream-Status: Submitted [http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/2014-September/010446.html] - -Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> ---- - src/useradd.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/src/useradd.c b/src/useradd.c -index a8a1f76..e1ebf50 100644 ---- a/src/useradd.c -+++ b/src/useradd.c -@@ -1993,9 +1993,11 @@ int main (int argc, char **argv) - #endif /* USE_PAM */ - #endif /* ACCT_TOOLS_SETUID */ - -+#ifdef ENABLE_SUBIDS - /* Needed for userns check */ -- uid_t uid_min = (uid_t) getdef_ulong ("UID_MIN", 1000UL); -- uid_t uid_max = (uid_t) getdef_ulong ("UID_MAX", 60000UL); -+ uid_t uid_min; -+ uid_t uid_max; -+#endif - - /* - * Get my name so that I can use it to report errors. -@@ -2026,6 +2028,8 @@ int main (int argc, char **argv) - is_shadow_grp = sgr_file_present (); - #endif - #ifdef ENABLE_SUBIDS -+ uid_min = (uid_t) getdef_ulong ("UID_MIN", 1000UL); -+ uid_max = (uid_t) getdef_ulong ("UID_MAX", 60000UL); - is_sub_uid = sub_uid_file_present () && !rflg && - (!user_id || (user_id <= uid_max && user_id >= uid_min)); - is_sub_gid = sub_gid_file_present () && !rflg && --- -1.9.0 - diff --git a/poky/meta/recipes-extended/shadow/files/0001-shadow-CVE-2017-12424 b/poky/meta/recipes-extended/shadow/files/0001-shadow-CVE-2017-12424 deleted file mode 100644 index 4d3e1e016..000000000 --- a/poky/meta/recipes-extended/shadow/files/0001-shadow-CVE-2017-12424 +++ /dev/null @@ -1,46 +0,0 @@ -From 954e3d2e7113e9ac06632aee3c69b8d818cc8952 Mon Sep 17 00:00:00 2001 -From: Tomas Mraz <tmraz@fedoraproject.org> -Date: Fri, 31 Mar 2017 16:25:06 +0200 -Subject: [PATCH] Fix buffer overflow if NULL line is present in db. - -If ptr->line == NULL for an entry, the first cycle will exit, -but the second one will happily write past entries buffer. -We actually do not want to exit the first cycle prematurely -on ptr->line == NULL. -Signed-off-by: Tomas Mraz <tmraz@fedoraproject.org> - -CVE: CVE-2017-12424 -Upstream-Status: Backport -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - lib/commonio.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/lib/commonio.c b/lib/commonio.c -index b10da06..31edbaa 100644 ---- a/lib/commonio.c -+++ b/lib/commonio.c -@@ -751,16 +751,16 @@ commonio_sort (struct commonio_db *db, int (*cmp) (const void *, const void *)) - for (ptr = db->head; - (NULL != ptr) - #if KEEP_NIS_AT_END -- && (NULL != ptr->line) -- && ( ('+' != ptr->line[0]) -- && ('-' != ptr->line[0])) -+ && ((NULL == ptr->line) -+ || (('+' != ptr->line[0]) -+ && ('-' != ptr->line[0]))) - #endif - ; - ptr = ptr->next) { - n++; - } - #if KEEP_NIS_AT_END -- if ((NULL != ptr) && (NULL != ptr->line)) { -+ if (NULL != ptr) { - nis = ptr; - } - #endif --- -2.1.0 - 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 index 60a46e125..474b3a257 100644 --- 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 @@ -1,47 +1,41 @@ -From acec93540eba6899661c607408498ac72ab07a47 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jos=C3=A9=20Bollo?= <jose.bollo@iot.bzh> -Date: Tue, 7 Mar 2017 16:03:03 +0100 Subject: [PATCH] useradd: copy extended attributes of home -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit 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: Submitted [http://lists.alioth.debian.org/pipermail/pkg-shadow-commits/2017-March/003804.html] +Upstream-Status: Pending -Change-Id: Icd633f7c6c494efd2a30cb8f04c306f749ad0c3b 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 a8a1f76..8aefb9c 100644 +index e721e52..c74e491 100644 --- a/src/useradd.c +++ b/src/useradd.c -@@ -52,6 +52,9 @@ - #include <sys/stat.h> - #include <sys/types.h> +@@ -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" -@@ -1915,6 +1918,9 @@ static void create_home (void) - chown (user_home, user_id, user_gid); - chmod (user_home, +@@ -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); ++ attr_copy_file (def_template, user_home, NULL, NULL); +#endif home_added = true; #ifdef WITH_AUDIT audit_logger (AUDIT_ADD_USER, Prog, -- -2.9.3 +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 2f084b4e9..702413659 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 @@ -1,17 +1,17 @@ -Upstream-Status: Inappropriate [OE specific] +Subject: [PATCH] useradd.c: create parent directories when necessary -Subject: useradd.c: create parent directories when necessary +Upstream-Status: Inappropriate [OE specific] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> --- - src/useradd.c | 72 +++++++++++++++++++++++++++++++++++++++------------------ - 1 file changed, 49 insertions(+), 23 deletions(-) + src/useradd.c | 82 +++++++++++++++++++++++++++++++++++++++-------------------- + 1 file changed, 54 insertions(+), 28 deletions(-) diff --git a/src/useradd.c b/src/useradd.c -index 4bd969d..cb5dd6c 100644 +index 7214e72..3aaf45c 100644 --- a/src/useradd.c +++ b/src/useradd.c -@@ -1896,6 +1896,35 @@ static void usr_update (void) +@@ -2021,6 +2021,35 @@ static void usr_update (void) } /* @@ -47,63 +47,68 @@ index 4bd969d..cb5dd6c 100644 * create_home - create the user's home directory * * create_home() creates the user's home directory if it does not -@@ -1910,39 +1939,36 @@ static void create_home (void) +@@ -2038,42 +2067,39 @@ static void create_home (void) fail_exit (E_HOMEDIR); } #endif - /* XXX - create missing parent directories. --marekm */ -- if (mkdir (user_home, 0) != 0) { +- if (mkdir (prefix_user_home, 0) != 0) { - fprintf (stderr, - _("%s: cannot create directory %s\n"), -- Prog, user_home); --#ifdef WITH_AUDIT +- Prog, prefix_user_home); ++ mkdir_p(user_home); ++ } ++ if (access (prefix_user_home, F_OK) != 0) { + #ifdef WITH_AUDIT - audit_logger (AUDIT_ADD_USER, Prog, - "adding home directory", - user_name, (unsigned int) user_id, - SHADOW_AUDIT_FAILURE); --#endif -- fail_exit (E_HOMEDIR); -- } -- chown (user_home, user_id, user_gid); -- chmod (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; -+ mkdir_p(user_home); -+ } -+ if (access (user_home, F_OK) != 0) { - #ifdef WITH_AUDIT - audit_logger (AUDIT_ADD_USER, Prog, - "adding home directory", - user_name, (unsigned int) user_id, -- SHADOW_AUDIT_SUCCESS); -+ SHADOW_AUDIT_FAILURE); ++ audit_logger (AUDIT_ADD_USER, Prog, ++ "adding home directory", ++ user_name, (unsigned int) user_id, ++ SHADOW_AUDIT_FAILURE); #endif --#ifdef WITH_SELINUX -- /* Reset SELinux to create files with default contexts */ -- if (reset_selinux_file_context () != 0) { - fail_exit (E_HOMEDIR); - } +- (void) chown (prefix_user_home, user_id, user_gid); +- chmod (prefix_user_home, +- 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK)); + fail_exit (E_HOMEDIR); + } -+ chown (user_home, user_id, user_gid); -+ chmod (user_home, ++ (void) chown (prefix_user_home, user_id, user_gid); ++ chmod (prefix_user_home, + 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK)); -+#ifdef WITH_ATTR + #ifdef WITH_ATTR +- attr_copy_file (def_template, user_home, NULL, NULL); + attr_copy_file (def_template, user_home, NULL, NULL); -+#endif + #endif +- home_added = true; + home_added = true; -+#ifdef WITH_AUDIT + #ifdef WITH_AUDIT +- audit_logger (AUDIT_ADD_USER, Prog, +- "adding home directory", +- user_name, (unsigned int) user_id, +- SHADOW_AUDIT_SUCCESS); + audit_logger (AUDIT_ADD_USER, Prog, + "adding home directory", + user_name, (unsigned int) user_id, + SHADOW_AUDIT_SUCCESS); #endif -+#ifdef WITH_SELINUX + #ifdef WITH_SELINUX +- /* Reset SELinux to create files with default contexts */ +- if (reset_selinux_file_context () != 0) { +- fprintf (stderr, +- _("%s: cannot reset SELinux file creation context\n"), +- Prog); +- fail_exit (E_HOMEDIR); +- } +-#endif + /* Reset SELinux to create files with default contexts */ + if (reset_selinux_file_context () != 0) { ++ fprintf (stderr, ++ _("%s: cannot reset SELinux file creation context\n"), ++ Prog); + fail_exit (E_HOMEDIR); } +#endif @@ -111,5 +116,5 @@ index 4bd969d..cb5dd6c 100644 /* -- -1.7.9.5 +2.11.0 diff --git a/poky/meta/recipes-extended/shadow/files/CVE-2017-2616.patch b/poky/meta/recipes-extended/shadow/files/CVE-2017-2616.patch deleted file mode 100644 index ee728f095..000000000 --- a/poky/meta/recipes-extended/shadow/files/CVE-2017-2616.patch +++ /dev/null @@ -1,64 +0,0 @@ -shadow-4.2.1: Fix CVE-2017-2616 - -[No upstream tracking] -- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=855943 - -su: properly clear child PID - -If su is compiled with PAM support, it is possible for any local user -to send SIGKILL to other processes with root privileges. There are -only two conditions. First, the user must be able to perform su with -a successful login. This does NOT have to be the root user, even using -su with the same id is enough, e.g. "su $(whoami)". Second, SIGKILL -can only be sent to processes which were executed after the su process. -It is not possible to send SIGKILL to processes which were already -running. I consider this as a security vulnerability, because I was -able to write a proof of concept which unlocked a screen saver of -another user this way. - -Upstream-Status: Backport [https://github.com/shadow-maint/shadow/commit/08fd4b69e84364677a10e519ccb25b71710ee686] -CVE: CVE-2017-2616 -bug: 855943 -Signed-off-by: Andrej Valek <andrej.valek@siemens.com> - -diff --git a/src/su.c b/src/su.c -index 3704217..1efcd61 100644 ---- a/src/su.c -+++ b/src/su.c -@@ -363,20 +363,35 @@ static void prepare_pam_close_session (void) - /* wake child when resumed */ - kill (pid, SIGCONT); - stop = false; -+ } else { -+ pid_child = 0; - } - } while (!stop); - } - -- if (0 != caught) { -+ if (0 != caught && 0 != pid_child) { - (void) fputs ("\n", stderr); - (void) fputs (_("Session terminated, terminating shell..."), - stderr); - (void) kill (-pid_child, caught); - - (void) signal (SIGALRM, kill_child); -+ (void) signal (SIGCHLD, catch_signals); - (void) alarm (2); - -- (void) wait (&status); -+ sigemptyset (&ourset); -+ if ((sigaddset (&ourset, SIGALRM) != 0) -+ || (sigprocmask (SIG_BLOCK, &ourset, NULL) != 0)) { -+ fprintf (stderr, _("%s: signal masking malfunction\n"), Prog); -+ kill_child (0); -+ } else { -+ while (0 == waitpid (pid_child, &status, WNOHANG)) { -+ sigsuspend (&ourset); -+ } -+ pid_child = 0; -+ (void) sigprocmask (SIG_UNBLOCK, &ourset, NULL); -+ } -+ - (void) fputs (_(" ...terminated.\n"), stderr); - } - diff --git a/poky/meta/recipes-extended/shadow/files/CVE-2018-7169.patch b/poky/meta/recipes-extended/shadow/files/CVE-2018-7169.patch deleted file mode 100644 index 36887d44e..000000000 --- a/poky/meta/recipes-extended/shadow/files/CVE-2018-7169.patch +++ /dev/null @@ -1,186 +0,0 @@ -From fb28c99b8a66ff2605c5cb96abc0a4d975f92de0 Mon Sep 17 00:00:00 2001 -From: Aleksa Sarai <asarai@suse.de> -Date: Thu, 15 Feb 2018 23:49:40 +1100 -Subject: [PATCH] newgidmap: enforce setgroups=deny if self-mapping a group - -This is necessary to match the kernel-side policy of "self-mapping in a -user namespace is fine, but you cannot drop groups" -- a policy that was -created in order to stop user namespaces from allowing trivial privilege -escalation by dropping supplementary groups that were "blacklisted" from -certain paths. - -This is the simplest fix for the underlying issue, and effectively makes -it so that unless a user has a valid mapping set in /etc/subgid (which -only administrators can modify) -- and they are currently trying to use -that mapping -- then /proc/$pid/setgroups will be set to deny. This -workaround is only partial, because ideally it should be possible to set -an "allow_setgroups" or "deny_setgroups" flag in /etc/subgid to allow -administrators to further restrict newgidmap(1). - -We also don't write anything in the "allow" case because "allow" is the -default, and users may have already written "deny" even if they -technically are allowed to use setgroups. And we don't write anything if -the setgroups policy is already "deny". - -Ref: https://bugs.launchpad.net/ubuntu/+source/shadow/+bug/1729357 -Fixes: CVE-2018-7169 - -Upstream-Status: Backport [https://github.com/shadow-maint/shadow/commit/fb28c99b8a66ff2605c5cb96abc0a4d975f92de0] -Reported-by: Craig Furman <craig.furman89@gmail.com> -Signed-off-by: Aleksa Sarai <asarai@suse.de> -Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> ---- - src/newgidmap.c | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++------ - 1 file changed, 80 insertions(+), 9 deletions(-) - -diff --git a/src/newgidmap.c b/src/newgidmap.c -index b1e33513..59a2e75c 100644 ---- a/src/newgidmap.c -+++ b/src/newgidmap.c -@@ -46,32 +46,37 @@ - */ - const char *Prog; - --static bool verify_range(struct passwd *pw, struct map_range *range) -+ -+static bool verify_range(struct passwd *pw, struct map_range *range, bool *allow_setgroups) - { - /* An empty range is invalid */ - if (range->count == 0) - return false; - -- /* Test /etc/subgid */ -- if (have_sub_gids(pw->pw_name, range->lower, range->count)) -+ /* Test /etc/subgid. If the mapping is valid then we allow setgroups. */ -+ if (have_sub_gids(pw->pw_name, range->lower, range->count)) { -+ *allow_setgroups = true; - return true; -+ } - -- /* Allow a process to map it's own gid */ -- if ((range->count == 1) && (pw->pw_gid == range->lower)) -+ /* Allow a process to map its own gid. */ -+ if ((range->count == 1) && (pw->pw_gid == range->lower)) { -+ /* noop -- if setgroups is enabled already we won't disable it. */ - return true; -+ } - - return false; - } - - static void verify_ranges(struct passwd *pw, int ranges, -- struct map_range *mappings) -+ struct map_range *mappings, bool *allow_setgroups) - { - struct map_range *mapping; - int idx; - - mapping = mappings; - for (idx = 0; idx < ranges; idx++, mapping++) { -- if (!verify_range(pw, mapping)) { -+ if (!verify_range(pw, mapping, allow_setgroups)) { - fprintf(stderr, _( "%s: gid range [%lu-%lu) -> [%lu-%lu) not allowed\n"), - Prog, - mapping->upper, -@@ -89,6 +94,70 @@ static void usage(void) - exit(EXIT_FAILURE); - } - -+void write_setgroups(int proc_dir_fd, bool allow_setgroups) -+{ -+ int setgroups_fd; -+ char *policy, policy_buffer[4096]; -+ -+ /* -+ * Default is "deny", and any "allow" will out-rank a "deny". We don't -+ * forcefully write an "allow" here because the process we are writing -+ * mappings for may have already set themselves to "deny" (and "allow" -+ * is the default anyway). So allow_setgroups == true is a noop. -+ */ -+ policy = "deny\n"; -+ if (allow_setgroups) -+ return; -+ -+ setgroups_fd = openat(proc_dir_fd, "setgroups", O_RDWR|O_CLOEXEC); -+ if (setgroups_fd < 0) { -+ /* -+ * If it's an ENOENT then we are on too old a kernel for the setgroups -+ * code to exist. Emit a warning and bail on this. -+ */ -+ if (ENOENT == errno) { -+ fprintf(stderr, _("%s: kernel doesn't support setgroups restrictions\n"), Prog); -+ goto out; -+ } -+ fprintf(stderr, _("%s: couldn't open process setgroups: %s\n"), -+ Prog, -+ strerror(errno)); -+ exit(EXIT_FAILURE); -+ } -+ -+ /* -+ * Check whether the policy is already what we want. /proc/self/setgroups -+ * is write-once, so attempting to write after it's already written to will -+ * fail. -+ */ -+ if (read(setgroups_fd, policy_buffer, sizeof(policy_buffer)) < 0) { -+ fprintf(stderr, _("%s: failed to read setgroups: %s\n"), -+ Prog, -+ strerror(errno)); -+ exit(EXIT_FAILURE); -+ } -+ if (!strncmp(policy_buffer, policy, strlen(policy))) -+ goto out; -+ -+ /* Write the policy. */ -+ if (lseek(setgroups_fd, 0, SEEK_SET) < 0) { -+ fprintf(stderr, _("%s: failed to seek setgroups: %s\n"), -+ Prog, -+ strerror(errno)); -+ exit(EXIT_FAILURE); -+ } -+ if (dprintf(setgroups_fd, "%s", policy) < 0) { -+ fprintf(stderr, _("%s: failed to setgroups %s policy: %s\n"), -+ Prog, -+ policy, -+ strerror(errno)); -+ exit(EXIT_FAILURE); -+ } -+ -+out: -+ close(setgroups_fd); -+} -+ - /* - * newgidmap - Set the gid_map for the specified process - */ -@@ -103,6 +172,7 @@ int main(int argc, char **argv) - struct stat st; - struct passwd *pw; - int written; -+ bool allow_setgroups = false; - - Prog = Basename (argv[0]); - -@@ -145,7 +215,7 @@ int main(int argc, char **argv) - (unsigned long) getuid ())); - return EXIT_FAILURE; - } -- -+ - /* Get the effective uid and effective gid of the target process */ - if (fstat(proc_dir_fd, &st) < 0) { - fprintf(stderr, _("%s: Could not stat directory for target %u\n"), -@@ -177,8 +247,9 @@ int main(int argc, char **argv) - if (!mappings) - usage(); - -- verify_ranges(pw, ranges, mappings); -+ verify_ranges(pw, ranges, mappings, &allow_setgroups); - -+ write_setgroups(proc_dir_fd, allow_setgroups); - write_mapping(proc_dir_fd, ranges, mappings, "gid_map"); - sub_gid_close(); - --- -2.13.3 - diff --git a/poky/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch b/poky/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch index 615c6e002..fa7eb07aa 100644 --- a/poky/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch +++ b/poky/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch @@ -1,21 +1,21 @@ -Upstream-Status: Inappropriate [OE specific] +Subject: [PATCH] Allow for setting password in clear text -Allow for setting password in clear text. +Upstream-Status: Inappropriate [OE specific] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> --- - src/Makefile.am | 8 ++++---- - src/groupadd.c | 8 +++++++- - src/groupmod.c | 8 +++++++- - src/useradd.c | 9 +++++++-- - src/usermod.c | 8 +++++++- - 5 files changed, 32 insertions(+), 9 deletions(-) + src/Makefile.am | 8 ++++---- + src/groupadd.c | 20 +++++++++++++++----- + src/groupmod.c | 20 +++++++++++++++----- + src/useradd.c | 21 +++++++++++++++------ + src/usermod.c | 20 +++++++++++++++----- + 5 files changed, 64 insertions(+), 25 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am -index 25e288d..856b087 100644 +index 3c98a8d..b8093d5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am -@@ -88,10 +88,10 @@ chgpasswd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBSELINUX) $(LIBCRYPT) +@@ -93,10 +93,10 @@ chgpasswd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBSELINUX) $(LIBCRYPT) chsh_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD) chpasswd_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT) gpasswd_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT) @@ -28,9 +28,9 @@ index 25e288d..856b087 100644 grpck_LDADD = $(LDADD) $(LIBSELINUX) grpconv_LDADD = $(LDADD) $(LIBSELINUX) grpunconv_LDADD = $(LDADD) $(LIBSELINUX) -@@ -111,9 +111,9 @@ su_SOURCES = \ +@@ -117,9 +117,9 @@ su_SOURCES = \ suauth.c - su_LDADD = $(LDADD) $(LIBPAM) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD) + su_LDADD = $(LDADD) $(LIBPAM) $(LIBAUDIT) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD) sulogin_LDADD = $(LDADD) $(LIBCRYPT) -useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) +useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBCRYPT) @@ -41,33 +41,39 @@ index 25e288d..856b087 100644 install-am: all-am diff --git a/src/groupadd.c b/src/groupadd.c -index f716f57..4e28c26 100644 +index b57006c..63e1c48 100644 --- a/src/groupadd.c +++ b/src/groupadd.c -@@ -124,6 +124,7 @@ static /*@noreturn@*/void usage (int status) +@@ -123,9 +123,10 @@ static /*@noreturn@*/void usage (int status) (void) fputs (_(" -o, --non-unique allow to create groups with duplicate\n" " (non-unique) GID\n"), usageout); (void) fputs (_(" -p, --password PASSWORD use this encrypted password for the new group\n"), usageout); + (void) fputs (_(" -P, --clear-password PASSWORD use this clear password for the new group\n"), usageout); (void) fputs (_(" -r, --system create a system account\n"), usageout); (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout); +- (void) fputs (_(" -P, --prefix PREFIX_DIR directory prefix\n"), usageout); ++ (void) fputs (_(" -A, --prefix PREFIX_DIR directory prefix\n"), usageout); (void) fputs ("\n", usageout); -@@ -387,12 +388,13 @@ static void process_flags (int argc, char **argv) + exit (status); + } +@@ -387,13 +388,14 @@ static void process_flags (int argc, char **argv) {"key", required_argument, NULL, 'K'}, {"non-unique", no_argument, NULL, 'o'}, {"password", required_argument, NULL, 'p'}, + {"clear-password", required_argument, NULL, 'P'}, {"system", no_argument, NULL, 'r'}, {"root", required_argument, NULL, 'R'}, +- {"prefix", required_argument, NULL, 'P'}, ++ {"prefix", required_argument, NULL, 'A'}, {NULL, 0, NULL, '\0'} }; -- while ((c = getopt_long (argc, argv, "fg:hK:op:rR:", -+ while ((c = getopt_long (argc, argv, "fg:hK:op:P:rR:", +- while ((c = getopt_long (argc, argv, "fg:hK:op:rR:P:", ++ while ((c = getopt_long (argc, argv, "fg:hK:op:P:rR:A:", long_options, NULL)) != -1) { switch (c) { case 'f': -@@ -444,6 +446,10 @@ static void process_flags (int argc, char **argv) +@@ -445,12 +447,20 @@ static void process_flags (int argc, char **argv) pflg = true; group_passwd = optarg; break; @@ -78,32 +84,57 @@ index f716f57..4e28c26 100644 case 'r': rflg = true; break; + case 'R': /* no-op, handled in process_root_flag () */ + break; +- case 'P': /* no-op, handled in process_prefix_flag () */ ++ case 'A': /* no-op, handled in process_prefix_flag () */ ++ fprintf (stderr, ++ _("%s: -A is deliberately not supported \n"), ++ Prog); ++ exit (E_BAD_ARG); + break; + default: + usage (E_USAGE); +@@ -584,7 +594,7 @@ int main (int argc, char **argv) + (void) textdomain (PACKAGE); + + process_root_flag ("-R", argc, argv); +- prefix = process_prefix_flag ("-P", argc, argv); ++ prefix = process_prefix_flag ("-A", argc, argv); + + OPENLOG ("groupadd"); + #ifdef WITH_AUDIT diff --git a/src/groupmod.c b/src/groupmod.c -index d9d3807..68f49d1 100644 +index b293b98..72daf2c 100644 --- a/src/groupmod.c +++ b/src/groupmod.c -@@ -127,6 +127,7 @@ static void usage (int status) +@@ -134,8 +134,9 @@ static void usage (int status) (void) fputs (_(" -o, --non-unique allow to use a duplicate (non-unique) GID\n"), usageout); (void) fputs (_(" -p, --password PASSWORD change the password to this (encrypted)\n" " PASSWORD\n"), usageout); + (void) fputs (_(" -P, --clear-password PASSWORD change the password to this clear PASSWORD\n"), usageout); (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout); +- (void) fputs (_(" -P, --prefix PREFIX_DIR prefix directory where are located the /etc/* files\n"), usageout); ++ (void) fputs (_(" -A, --prefix PREFIX_DIR prefix directory where are located the /etc/* files\n"), usageout); (void) fputs ("\n", usageout); exit (status); -@@ -375,10 +376,11 @@ static void process_flags (int argc, char **argv) + } +@@ -383,11 +384,12 @@ static void process_flags (int argc, char **argv) {"new-name", required_argument, NULL, 'n'}, {"non-unique", no_argument, NULL, 'o'}, {"password", required_argument, NULL, 'p'}, + {"clear-password", required_argument, NULL, 'P'}, {"root", required_argument, NULL, 'R'}, +- {"prefix", required_argument, NULL, 'P'}, ++ {"prefix", required_argument, NULL, 'A'}, {NULL, 0, NULL, '\0'} }; -- while ((c = getopt_long (argc, argv, "g:hn:op:R:", -+ while ((c = getopt_long (argc, argv, "g:hn:op:P:R:", +- while ((c = getopt_long (argc, argv, "g:hn:op:R:P:", ++ while ((c = getopt_long (argc, argv, "g:hn:op:P:R:A:", long_options, NULL)) != -1) { switch (c) { case 'g': -@@ -405,6 +407,10 @@ static void process_flags (int argc, char **argv) +@@ -414,9 +416,17 @@ static void process_flags (int argc, char **argv) group_passwd = optarg; pflg = true; break; @@ -113,40 +144,65 @@ index d9d3807..68f49d1 100644 + break; case 'R': /* no-op, handled in process_root_flag () */ break; +- case 'P': /* no-op, handled in process_prefix_flag () */ ++ case 'A': /* no-op, handled in process_prefix_flag () */ ++ fprintf (stderr, ++ _("%s: -A is deliberately not supported \n"), ++ Prog); ++ exit (E_BAD_ARG); + break; default: + usage (E_USAGE); +@@ -757,7 +767,7 @@ int main (int argc, char **argv) + (void) textdomain (PACKAGE); + + process_root_flag ("-R", argc, argv); +- prefix = process_prefix_flag ("-P", argc, argv); ++ prefix = process_prefix_flag ("-A", argc, argv); + + OPENLOG ("groupmod"); + #ifdef WITH_AUDIT diff --git a/src/useradd.c b/src/useradd.c -index b3bd451..4416f90 100644 +index c74e491..7214e72 100644 --- a/src/useradd.c +++ b/src/useradd.c -@@ -776,6 +776,7 @@ static void usage (int status) +@@ -829,9 +829,10 @@ static void usage (int status) (void) fputs (_(" -o, --non-unique allow to create users with duplicate\n" " (non-unique) UID\n"), usageout); (void) fputs (_(" -p, --password PASSWORD encrypted password of the new account\n"), usageout); + (void) fputs (_(" -P, --clear-password PASSWORD clear password of the new account\n"), usageout); (void) fputs (_(" -r, --system create a system account\n"), usageout); (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout); +- (void) fputs (_(" -P, --prefix PREFIX_DIR prefix directory where are located the /etc/* files\n"), usageout); ++ (void) fputs (_(" -A, --prefix PREFIX_DIR prefix directory where are located the /etc/* files\n"), usageout); (void) fputs (_(" -s, --shell SHELL login shell of the new account\n"), usageout); -@@ -1050,6 +1051,7 @@ static void process_flags (int argc, char **argv) + (void) fputs (_(" -u, --uid UID user ID of the new account\n"), usageout); + (void) fputs (_(" -U, --user-group create a group with the same name as the user\n"), usageout); +@@ -1104,9 +1105,10 @@ static void process_flags (int argc, char **argv) {"no-user-group", no_argument, NULL, 'N'}, {"non-unique", no_argument, NULL, 'o'}, {"password", required_argument, NULL, 'p'}, + {"clear-password", required_argument, NULL, 'P'}, {"system", no_argument, NULL, 'r'}, {"root", required_argument, NULL, 'R'}, +- {"prefix", required_argument, NULL, 'P'}, ++ {"prefix", required_argument, NULL, 'A'}, {"shell", required_argument, NULL, 's'}, -@@ -1062,9 +1064,9 @@ static void process_flags (int argc, char **argv) + {"uid", required_argument, NULL, 'u'}, + {"user-group", no_argument, NULL, 'U'}, +@@ -1117,9 +1119,9 @@ static void process_flags (int argc, char **argv) }; while ((c = getopt_long (argc, argv, #ifdef WITH_SELINUX -- "b:c:d:De:f:g:G:hk:K:lmMNop:rR:s:u:UZ:", -+ "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:s:u:UZ:", +- "b:c:d:De:f:g:G:hk:K:lmMNop:rR:P:s:u:UZ:", ++ "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:A:s:u:UZ:", #else /* !WITH_SELINUX */ -- "b:c:d:De:f:g:G:hk:K:lmMNop:rR:s:u:U", -+ "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:s:u:U", +- "b:c:d:De:f:g:G:hk:K:lmMNop:rR:P:s:u:U", ++ "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:A:s:u:U", #endif /* !WITH_SELINUX */ long_options, NULL)) != -1) { switch (c) { -@@ -1230,6 +1232,9 @@ static void process_flags (int argc, char **argv) +@@ -1285,12 +1287,19 @@ static void process_flags (int argc, char **argv) } user_pass = optarg; break; @@ -156,36 +212,62 @@ index b3bd451..4416f90 100644 case 'r': rflg = true; break; + case 'R': /* no-op, handled in process_root_flag () */ + break; +- case 'P': /* no-op, handled in process_prefix_flag () */ ++ case 'A': /* no-op, handled in process_prefix_flag () */ ++ fprintf (stderr, ++ _("%s: -A is deliberately not supported \n"), ++ Prog); ++ exit (E_BAD_ARG); + break; + case 's': + if ( ( !VALID (optarg) ) +@@ -2148,7 +2157,7 @@ int main (int argc, char **argv) + + process_root_flag ("-R", argc, argv); + +- prefix = process_prefix_flag("-P", argc, argv); ++ prefix = process_prefix_flag("-A", argc, argv); + + OPENLOG ("useradd"); + #ifdef WITH_AUDIT diff --git a/src/usermod.c b/src/usermod.c -index e7d4351..b79f7a3 100644 +index e571426..ccfbb99 100644 --- a/src/usermod.c +++ b/src/usermod.c -@@ -419,6 +419,7 @@ static /*@noreturn@*/void usage (int status) +@@ -424,8 +424,9 @@ static /*@noreturn@*/void usage (int status) " new location (use only with -d)\n"), usageout); (void) fputs (_(" -o, --non-unique allow using duplicate (non-unique) UID\n"), usageout); (void) fputs (_(" -p, --password PASSWORD use encrypted password for the new password\n"), usageout); + (void) fputs (_(" -P, --clear-password PASSWORD use clear password for the new password\n"), usageout); (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout); +- (void) fputs (_(" -P, --prefix PREFIX_DIR prefix directory where are located the /etc/* files\n"), usageout); ++ (void) fputs (_(" -A, --prefix PREFIX_DIR prefix directory where are located the /etc/* files\n"), usageout); (void) fputs (_(" -s, --shell SHELL new login shell for the user account\n"), usageout); (void) fputs (_(" -u, --uid UID new UID for the user account\n"), usageout); -@@ -996,6 +997,7 @@ static void process_flags (int argc, char **argv) + (void) fputs (_(" -U, --unlock unlock the user account\n"), usageout); +@@ -1002,8 +1003,9 @@ static void process_flags (int argc, char **argv) {"move-home", no_argument, NULL, 'm'}, {"non-unique", no_argument, NULL, 'o'}, {"password", required_argument, NULL, 'p'}, + {"clear-password", required_argument, NULL, 'P'}, {"root", required_argument, NULL, 'R'}, +- {"prefix", required_argument, NULL, 'P'}, ++ {"prefix", required_argument, NULL, 'A'}, {"shell", required_argument, NULL, 's'}, {"uid", required_argument, NULL, 'u'}, -@@ -1012,7 +1014,7 @@ static void process_flags (int argc, char **argv) + {"unlock", no_argument, NULL, 'U'}, +@@ -1019,7 +1021,7 @@ static void process_flags (int argc, char **argv) {NULL, 0, NULL, '\0'} }; while ((c = getopt_long (argc, argv, -- "ac:d:e:f:g:G:hl:Lmop:R:s:u:U" -+ "ac:d:e:f:g:G:hl:Lmop:P:R:s:u:U" +- "ac:d:e:f:g:G:hl:Lmop:R:s:u:UP:" ++ "ac:d:e:f:g:G:hl:Lmop:P:R:s:u:UA:" #ifdef ENABLE_SUBIDS "v:w:V:W:" #endif /* ENABLE_SUBIDS */ -@@ -1112,6 +1114,10 @@ static void process_flags (int argc, char **argv) +@@ -1119,9 +1121,17 @@ static void process_flags (int argc, char **argv) user_pass = optarg; pflg = true; break; @@ -195,7 +277,24 @@ index e7d4351..b79f7a3 100644 + break; case 'R': /* no-op, handled in process_root_flag () */ break; +- case 'P': /* no-op, handled in process_prefix_flag () */ ++ case 'A': /* no-op, handled in process_prefix_flag () */ ++ fprintf (stderr, ++ _("%s: -A is deliberately not supported \n"), ++ Prog); ++ exit (E_BAD_ARG); + break; case 's': + if (!VALID (optarg)) { +@@ -2098,7 +2108,7 @@ int main (int argc, char **argv) + (void) textdomain (PACKAGE); + + process_root_flag ("-R", argc, argv); +- prefix = process_prefix_flag ("-P", argc, argv); ++ prefix = process_prefix_flag ("-A", argc, argv); + + OPENLOG ("usermod"); + #ifdef WITH_AUDIT -- -1.7.9.5 +2.11.0 diff --git a/poky/meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch b/poky/meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch deleted file mode 100644 index 185590cab..000000000 --- a/poky/meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 2cb54158b80cdbd97ca3b36df83f9255e923ae3f Mon Sep 17 00:00:00 2001 -From: James Le Cuirot <chewi@aura-online.co.uk> -Date: Sat, 23 Aug 2014 09:46:39 +0100 -Subject: [PATCH] Check size of uid_t and gid_t using AC_CHECK_SIZEOF - -This built-in check is simpler than the previous method and, most -importantly, works when cross-compiling. - -Upstream-Status: Accepted -[https://github.com/shadow-maint/shadow/commit/2cb54158b80cdbd97ca3b36df83f9255e923ae3f] - -Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> ---- - configure.in | 14 ++++---------- - 1 file changed, 4 insertions(+), 10 deletions(-) - -diff --git a/configure.in b/configure.in -index 1a3f841..4a4d6d0 100644 ---- a/configure.in -+++ b/configure.in -@@ -335,16 +335,10 @@ if test "$enable_subids" != "no"; then - dnl - dnl FIXME: check if 32 bit UIDs/GIDs are supported by libc - dnl -- AC_RUN_IFELSE([AC_LANG_SOURCE([ --#include <sys/types.h> --int main(void) { -- uid_t u; -- gid_t g; -- return (sizeof u < 4) || (sizeof g < 4); --} -- ])], [id32bit="yes"], [id32bit="no"]) -- -- if test "x$id32bit" = "xyes"; then -+ AC_CHECK_SIZEOF([uid_t],, [#include "sys/types.h"]) -+ AC_CHECK_SIZEOF([gid_t],, [#include "sys/types.h"]) -+ -+ if test "$ac_cv_sizeof_uid_t" -ge 4 && test "$ac_cv_sizeof_gid_t" -ge 4; then - AC_DEFINE(ENABLE_SUBIDS, 1, [Define to support the subordinate IDs.]) - enable_subids="yes" - else diff --git a/poky/meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch b/poky/meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch deleted file mode 100644 index 02cb91aaf..000000000 --- a/poky/meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch +++ /dev/null @@ -1,28 +0,0 @@ -Upstream-Status: Pending - -Subject: fix installation failure with subids disabled - -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - src/Makefile.am | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/Makefile.am b/src/Makefile.am -index 25e288d..076f8ef 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -52,7 +52,10 @@ usbin_PROGRAMS = \ - noinst_PROGRAMS = id sulogin - - suidbins = su --suidubins = chage chfn chsh expiry gpasswd newgrp passwd newuidmap newgidmap -+suidubins = chage chfn chsh expiry gpasswd newgrp passwd -+if ENABLE_SUBIDS -+suidubins += newgidmap newuidmap -+endif - if ACCT_TOOLS_SETUID - suidubins += chage chgpasswd chpasswd groupadd groupdel groupmod newusers useradd userdel usermod - endif --- -1.7.9.5 - diff --git a/poky/meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch b/poky/meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch deleted file mode 100644 index 37dc153fc..000000000 --- a/poky/meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch +++ /dev/null @@ -1,33 +0,0 @@ -Upstream-Status: Pending - -usermod: fix compilation failure with subids disabled - -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - src/usermod.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/usermod.c b/src/usermod.c -index e7d4351..685b50a 100644 ---- a/src/usermod.c -+++ b/src/usermod.c -@@ -1360,7 +1360,7 @@ static void process_flags (int argc, char **argv) - Prog, (unsigned long) user_newid); - exit (E_UID_IN_USE); - } -- -+#ifdef ENABLE_SUBIDS - if ( (vflg || Vflg) - && !is_sub_uid) { - fprintf (stderr, -@@ -1376,6 +1376,7 @@ static void process_flags (int argc, char **argv) - Prog, sub_gid_dbname (), "-w", "-W"); - exit (E_USAGE); - } -+#endif - } - - /* --- -1.7.9.5 - diff --git a/poky/meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb b/poky/meta/recipes-extended/shadow/shadow-securetty_4.6.bb index c78f888cf..c78f888cf 100644 --- a/poky/meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb +++ b/poky/meta/recipes-extended/shadow/shadow-securetty_4.6.bb diff --git a/poky/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb b/poky/meta/recipes-extended/shadow/shadow-sysroot_4.6.bb index ef014628f..ef014628f 100644 --- a/poky/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb +++ b/poky/meta/recipes-extended/shadow/shadow-sysroot_4.6.bb diff --git a/poky/meta/recipes-extended/shadow/shadow.inc b/poky/meta/recipes-extended/shadow/shadow.inc index 4e1eaed9b..09c37ef8a 100644 --- a/poky/meta/recipes-extended/shadow/shadow.inc +++ b/poky/meta/recipes-extended/shadow/shadow.inc @@ -9,18 +9,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ed80ff1c2b40843cf5768e5229cf16e5 \ DEPENDS = "virtual/crypt" UPSTREAM_CHECK_URI = "https://github.com/shadow-maint/shadow/releases" - -SRC_URI = "https://downloads.yoctoproject.org/mirror/sources/${BP}.tar.xz \ +SRC_URI = "https://github.com/shadow-maint/shadow/releases/download/${PV}/${BP}.tar.gz \ file://shadow-4.1.3-dots-in-usernames.patch \ - file://usermod-fix-compilation-failure-with-subids-disabled.patch \ - file://fix-installation-failure-with-subids-disabled.patch \ - file://0001-Do-not-read-login.defs-before-doing-chroot.patch \ - file://check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch \ file://0001-useradd-copy-extended-attributes-of-home.patch \ - file://0001-shadow-CVE-2017-12424 \ - file://CVE-2017-2616.patch \ ${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \ - file://CVE-2018-7169.patch \ " SRC_URI_append_class-target = " \ @@ -39,8 +31,8 @@ SRC_URI_append_class-nativesdk = " \ file://0001-Disable-use-of-syslog-for-sysroot.patch \ " -SRC_URI[md5sum] = "2bfafe7d4962682d31b5eba65dba4fc8" -SRC_URI[sha256sum] = "3b0893d1476766868cd88920f4f1231c4795652aa407569faff802bcda0f3d41" +SRC_URI[md5sum] = "36feb15665338ae3de414f2a88e434db" +SRC_URI[sha256sum] = "4668f99bd087399c4a586084dc3b046b75f560720d83e92fd23bf7a89dda4d31" # Additional Policy files for PAM PAM_SRC_URI = "file://pam.d/chfn \ diff --git a/poky/meta/recipes-extended/shadow/shadow_4.2.1.bb b/poky/meta/recipes-extended/shadow/shadow_4.6.bb index 5675cb8cc..5675cb8cc 100644 --- a/poky/meta/recipes-extended/shadow/shadow_4.2.1.bb +++ b/poky/meta/recipes-extended/shadow/shadow_4.6.bb diff --git a/poky/meta/recipes-extended/slang/slang_2.3.2.bb b/poky/meta/recipes-extended/slang/slang_2.3.2.bb index 87fd41af8..e53c4321b 100644 --- a/poky/meta/recipes-extended/slang/slang_2.3.2.bb +++ b/poky/meta/recipes-extended/slang/slang_2.3.2.bb @@ -78,4 +78,4 @@ FILES_${PN} += "${libdir}/${BPN}/v2/modules/ ${datadir}/slsh/" PARALLEL_MAKE = "" PARALLEL_MAKEINST = "" -BBCLASSEXTEND = "native" +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-extended/sudo/sudo.inc b/poky/meta/recipes-extended/sudo/sudo.inc index 362bd3a2e..69dccde59 100644 --- a/poky/meta/recipes-extended/sudo/sudo.inc +++ b/poky/meta/recipes-extended/sudo/sudo.inc @@ -4,7 +4,7 @@ HOMEPAGE = "http://www.sudo.ws" BUGTRACKER = "http://www.sudo.ws/bugs/" SECTION = "admin" LICENSE = "ISC & BSD & Zlib" -LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=7765a3d787cb4fed3ccc3c9cee030af9 \ +LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=cc4bf2366b059c9598e3947f885931ec \ file://plugins/sudoers/redblack.c;beginline=1;endline=41;md5=805782a8466975716f8376b2be9aedde \ file://lib/util/reallocarray.c;beginline=3;endline=16;md5=85b0905b795d4d58bf2e00635649eec6 \ file://lib/util/fnmatch.c;beginline=3;endline=27;md5=67f83ee9bd456557397082f8f1be0efd \ @@ -12,12 +12,14 @@ LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=7765a3d787cb4fed3ccc3c9cee030af9 \ file://lib/util/glob.c;beginline=6;endline=31;md5=5872733146b9eb0deb79e1f664815b85 \ file://lib/util/snprintf.c;beginline=6;endline=34;md5=c82c1b3a5c32e08545c9ec5d71e41e50 \ file://include/sudo_queue.h;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \ - file://lib/util/inet_pton.c;beginline=3;endline=17;md5=3970ab0518ab79cbd0bafb697f10b33a" + file://lib/util/inet_pton.c;beginline=3;endline=17;md5=3970ab0518ab79cbd0bafb697f10b33a \ + " inherit autotools PACKAGECONFIG ??= "" PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib" +PACKAGECONFIG[pam-wheel] = ",,,pam-plugin-wheel" CONFFILES_${PN} = "${sysconfdir}/sudoers" diff --git a/poky/meta/recipes-extended/sudo/sudo_1.8.22.bb b/poky/meta/recipes-extended/sudo/sudo_1.8.23.bb index 91501781b..ce32bd187 100644 --- a/poky/meta/recipes-extended/sudo/sudo_1.8.22.bb +++ b/poky/meta/recipes-extended/sudo/sudo_1.8.23.bb @@ -7,10 +7,10 @@ SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \ PAM_SRC_URI = "file://sudo.pam" -SRC_URI[md5sum] = "24abdea48db4c5abcd410167c801cc8c" -SRC_URI[sha256sum] = "7256cb27c20883b14360eddbd17f98922073d104b214cf65aeacf1d9c9b9fd02" +SRC_URI[md5sum] = "ea444d747feb1decfebdffd0b38b0739" +SRC_URI[sha256sum] = "d863d29b6fc87bc784a3223350e2b28a2ff2c4738f0fb8f1c92bb38c3017e679" -DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" +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)}" EXTRA_OECONF += " \ @@ -22,13 +22,17 @@ EXTRA_OECONF += " \ do_install_append () { if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then install -D -m 644 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo + if ${@bb.utils.contains('PACKAGECONFIG', 'pam-wheel', 'true', 'false', d)} ; then + echo 'auth required pam_wheel.so use_uid' >>${D}${sysconfdir}/pam.d/sudo + sed -i 's/# \(%wheel ALL=(ALL) ALL\)/\1/' ${D}${sysconfdir}/sudoers + fi fi chmod 4111 ${D}${bindir}/sudo chmod 0440 ${D}${sysconfdir}/sudoers - # Explicitly remove the ${localstatedir}/run directory to avoid QA error - rmdir -p --ignore-fail-on-non-empty ${D}${localstatedir}/run/sudo + # Explicitly remove the /run directory to avoid QA error + rmdir -p --ignore-fail-on-non-empty ${D}/run/sudo } FILES_${PN} += "${libdir}/tmpfiles.d" diff --git a/poky/meta/recipes-extended/sysklogd/sysklogd.inc b/poky/meta/recipes-extended/sysklogd/sysklogd.inc index fc4e67c18..f151dd87f 100644 --- a/poky/meta/recipes-extended/sysklogd/sysklogd.inc +++ b/poky/meta/recipes-extended/sysklogd/sysklogd.inc @@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \ file://klogd.c;beginline=2;endline=19;md5=7e87ed0ae6142de079bce738c10c899d \ " -inherit update-rc.d systemd +inherit update-rc.d update-alternatives systemd SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \ file://no-strip-install.patch \ @@ -58,6 +58,11 @@ do_install () { FILES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/sysklogd.conf', '', d)}" +ALTERNATIVE_PRIORITY = "100" + +ALTERNATIVE_${PN}-doc = "syslogd.8" +ALTERNATIVE_LINK_NAME[syslogd.8] = "${mandir}/man8/syslogd.8" + pkg_prerm_${PN} () { if test "x$D" = "x"; then if test "$1" = "upgrade" -o "$1" = "remove"; then diff --git a/poky/meta/recipes-extended/sysstat/sysstat_11.7.1.bb b/poky/meta/recipes-extended/sysstat/sysstat_11.7.4.bb index 86738e7b7..c9b9130e9 100644 --- a/poky/meta/recipes-extended/sysstat/sysstat_11.7.1.bb +++ b/poky/meta/recipes-extended/sysstat/sysstat_11.7.4.bb @@ -4,5 +4,5 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb" SRC_URI += "file://0001-Include-needed-headers-explicitly.patch" -SRC_URI[md5sum] = "bdcda7c9048c7c22fb1f30f75285d13d" -SRC_URI[sha256sum] = "303a595b1af0330b183a0f1febfccf89f183b9575ae0562b91fdb876f3ef1feb" +SRC_URI[md5sum] = "421f958db80e67a27eda1ff6b8ebcdeb" +SRC_URI[sha256sum] = "a96265a22784c29888669f961a0896841d177853f8f057efe063e891962b9090" diff --git a/poky/meta/recipes-extended/tar/tar.inc b/poky/meta/recipes-extended/tar/tar.inc deleted file mode 100644 index 93e4da114..000000000 --- a/poky/meta/recipes-extended/tar/tar.inc +++ /dev/null @@ -1,52 +0,0 @@ -SUMMARY = "GNU file archiving program" -DESCRIPTION = "GNU tar saves many files together into a single tape \ -or disk archive, and can restore individual files from the archive." -HOMEPAGE = "http://www.gnu.org/software/tar/" -SECTION = "base" - -SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2" - -inherit autotools gettext texinfo - -EXTRA_OECONF += "DEFAULT_RMT_DIR=${base_sbindir}" - -# Let aclocal use the relative path for the m4 file rather than the -# absolute since tar has a lot of m4 files, otherwise there might -# be an "Argument list too long" error when it is built in a long/deep -# directory. -acpaths = "-I ./m4" - -do_install () { - autotools_do_install - ln -s tar ${D}${bindir}/gtar -} - -do_install_append_class-target() { - if [ "${base_bindir}" != "${bindir}" ]; then - install -d ${D}${base_bindir} - mv ${D}${bindir}/tar ${D}${base_bindir}/tar - mv ${D}${bindir}/gtar ${D}${base_bindir}/gtar - rmdir ${D}${bindir}/ - fi -} - -PACKAGES =+ "${PN}-rmt" - -FILES_${PN}-rmt = "${base_sbindir}/rmt*" - -inherit update-alternatives - -ALTERNATIVE_PRIORITY = "100" - -ALTERNATIVE_${PN} = "tar" -ALTERNATIVE_${PN}-rmt = "rmt" -ALTERNATIVE_${PN}_class-nativesdk = "" -ALTERNATIVE_${PN}-rmt_class-nativesdk = "" - -ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar" -ALTERNATIVE_LINK_NAME[rmt] = "${base_sbindir}/rmt" - -PROVIDES_append_class-native = " tar-replacement-native" -NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}" - -BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-extended/tar/tar_1.30.bb b/poky/meta/recipes-extended/tar/tar_1.30.bb index e743a6d0d..bd24f4762 100644 --- a/poky/meta/recipes-extended/tar/tar_1.30.bb +++ b/poky/meta/recipes-extended/tar/tar_1.30.bb @@ -1,18 +1,70 @@ -require tar.inc - -PACKAGECONFIG ??= "" -PACKAGECONFIG[acl] = "--with-posix-acls, --without-posix-acls, acl," - +SUMMARY = "GNU file archiving program" +DESCRIPTION = "GNU tar saves many files together into a single tape \ +or disk archive, and can restore individual files from the archive." +HOMEPAGE = "http://www.gnu.org/software/tar/" +SECTION = "base" LICENSE = "GPLv3" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" -SRC_URI += "file://remove-gets.patch \ - file://musl_dirent.patch \ - " +SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2 \ + file://remove-gets.patch \ + file://musl_dirent.patch \ +" + SRC_URI[md5sum] = "8404e4c1fc5a3000228ab2b8ad674a65" SRC_URI[sha256sum] = "87592b86cb037c554375f5868bdd3cc57748aef38d6cb741c81065f0beac63b7" +inherit autotools gettext texinfo + +PACKAGECONFIG ??= "" +PACKAGECONFIG_append_class-target = " ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)}" + +PACKAGECONFIG[acl] = "--with-posix-acls,--without-posix-acls,acl" + +EXTRA_OECONF += "DEFAULT_RMT_DIR=${base_sbindir}" + +# Let aclocal use the relative path for the m4 file rather than the +# absolute since tar has a lot of m4 files, otherwise there might +# be an "Argument list too long" error when it is built in a long/deep +# directory. +acpaths = "-I ./m4" + +do_install () { + autotools_do_install + ln -s tar ${D}${bindir}/gtar +} + +do_install_append_class-target() { + if [ "${base_bindir}" != "${bindir}" ]; then + install -d ${D}${base_bindir} + mv ${D}${bindir}/tar ${D}${base_bindir}/tar + mv ${D}${bindir}/gtar ${D}${base_bindir}/gtar + rmdir ${D}${bindir}/ + fi +} + do_install_append_libc-musl() { - rm -f ${D}${libdir}/charset.alias - rmdir ${D}${libdir} + rm -f ${D}${libdir}/charset.alias + rmdir ${D}${libdir} } + +PACKAGES =+ "${PN}-rmt" + +FILES_${PN}-rmt = "${base_sbindir}/rmt*" + +inherit update-alternatives + +ALTERNATIVE_PRIORITY = "100" + +ALTERNATIVE_${PN} = "tar" +ALTERNATIVE_${PN}-rmt = "rmt" +ALTERNATIVE_${PN}_class-nativesdk = "" +ALTERNATIVE_${PN}-rmt_class-nativesdk = "" + +ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar" +ALTERNATIVE_LINK_NAME[rmt] = "${base_sbindir}/rmt" + +PROVIDES_append_class-native = " tar-replacement-native" +NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}" + +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb b/poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb index 3ece8c301..0f5067465 100644 --- a/poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb +++ b/poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb @@ -8,6 +8,7 @@ LICENSE = "BSD" LIC_FILES_CHKSUM = "file://DISCLAIMER;md5=071bd69cb78b18888ea5e3da5c3127fa" PR ="r10" +DEPENDS += "libnsl2" PACKAGES = "${PN}-dbg libwrap libwrap-doc libwrap-dev libwrap-staticdev ${PN} ${PN}-doc" FILES_libwrap = "${base_libdir}/lib*${SOLIBS}" @@ -67,7 +68,6 @@ EXTRA_OEMAKE = "'CC=${CC}' \ 'KILL_OPT=-DKILL_IP_OPTIONS' \ 'UMASK=-DDAEMON_UMASK=022' \ 'NETGROUP=${EXTRA_OEMAKE_NETGROUP}' \ - 'LIBS=-lnsl' \ 'ARFLAGS=rv' \ 'AUX_OBJ=weak_symbols.o' \ 'TLI=' \ diff --git a/poky/meta/recipes-extended/time/time_1.8.bb b/poky/meta/recipes-extended/time/time_1.9.bb index fb3147a73..e2b084caa 100644 --- a/poky/meta/recipes-extended/time/time_1.8.bb +++ b/poky/meta/recipes-extended/time/time_1.9.bb @@ -15,7 +15,7 @@ BBCLASSEXTEND = "native nativesdk" SRC_URI = "${GNU_MIRROR}/time/time-${PV}.tar.gz" -SRC_URI[md5sum] = "4e00dcb8c3ab11c7cf5a0d698828ac96" -SRC_URI[sha256sum] = "8a2f540155961a35ba9b84aec5e77e3ae36c74cecb4484db455960601b7a2e1b" +SRC_URI[md5sum] = "d2356e0fe1c0b85285d83c6b2ad51b5f" +SRC_URI[sha256sum] = "fbacf0c81e62429df3e33bda4cee38756604f18e01d977338e23306a3e3b521e" inherit autotools diff --git a/poky/meta/recipes-extended/tzcode/tzcode-native_2018f.bb b/poky/meta/recipes-extended/tzcode/tzcode-native_2018g.bb index 816e34d00..3e2b60aea 100644 --- a/poky/meta/recipes-extended/tzcode/tzcode-native_2018f.bb +++ b/poky/meta/recipes-extended/tzcode/tzcode-native_2018g.bb @@ -11,10 +11,10 @@ SRC_URI =" http://www.iana.org/time-zones/repository/releases/tzcode${PV}.tar.gz UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones" -SRC_URI[tzdata.md5sum] = "e5e84f00f9d18bd6ebc8b1affec91b15" -SRC_URI[tzdata.sha256sum] = "0af6a85fc4ea95832f76524f35696a61abb3992fd3f8db33e5a1f95653e043f2" -SRC_URI[tzcode.md5sum] = "011d394b70e6ee3823fd77010b99737f" -SRC_URI[tzcode.sha256sum] = "4ec74f8a84372570135ea4be16a042442fafe100f5598cb1017bfd30af6aaa70" +SRC_URI[tzcode.md5sum] = "b48f0282b80bb7dbe16e35626f446ae9" +SRC_URI[tzcode.sha256sum] = "aa53f4fb6570f02081be61dc11ade19ea5a280c23822a5b4016ce0c6be23c427" +SRC_URI[tzdata.md5sum] = "e71cb1f9d8d53c43904d79d7aeeedc1b" +SRC_URI[tzdata.sha256sum] = "02dfde534872f6513ae4553a3388fdae579441e31b862ea99170dfc447f46a16" S = "${WORKDIR}" diff --git a/poky/meta/recipes-extended/tzdata/tzdata_2018f.bb b/poky/meta/recipes-extended/tzdata/tzdata_2018g.bb index b16754060..dba82ac62 100644 --- a/poky/meta/recipes-extended/tzdata/tzdata_2018f.bb +++ b/poky/meta/recipes-extended/tzdata/tzdata_2018g.bb @@ -9,8 +9,8 @@ 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] = "e5e84f00f9d18bd6ebc8b1affec91b15" -SRC_URI[tzdata.sha256sum] = "0af6a85fc4ea95832f76524f35696a61abb3992fd3f8db33e5a1f95653e043f2" +SRC_URI[tzdata.md5sum] = "e71cb1f9d8d53c43904d79d7aeeedc1b" +SRC_URI[tzdata.sha256sum] = "02dfde534872f6513ae4553a3388fdae579441e31b862ea99170dfc447f46a16" inherit allarch diff --git a/poky/meta/recipes-extended/unzip/unzip_6.0.bb b/poky/meta/recipes-extended/unzip/unzip_6.0.bb index f6a4cb627..daba72272 100644 --- a/poky/meta/recipes-extended/unzip/unzip_6.0.bb +++ b/poky/meta/recipes-extended/unzip/unzip_6.0.bb @@ -61,4 +61,4 @@ ALTERNATIVE_PRIORITY = "100" ALTERNATIVE_${PN} = "unzip" ALTERNATIVE_LINK_NAME[unzip] = "${bindir}/unzip" -BBCLASSEXTEND = "native" +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch b/poky/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch deleted file mode 100644 index ec44c803b..000000000 --- a/poky/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch +++ /dev/null @@ -1,16 +0,0 @@ -Signed-off-by: Diego Rondini <diego.ml@zoho.com> -Upstream-Status: Inappropriate - -Index: watchdog-5.15/watchdog.conf -=================================================================== ---- watchdog-5.15.orig/watchdog.conf -+++ watchdog-5.15/watchdog.conf -@@ -28,7 +28,7 @@ - #retry-timeout = 60 - #repair-maximum = 1 - --#watchdog-device = /dev/watchdog -+watchdog-device = /dev/watchdog - - # Defaults compiled into the binary - #temperature-sensor = diff --git a/poky/meta/recipes-extended/watchdog/watchdog/watchdog-init.patch b/poky/meta/recipes-extended/watchdog/watchdog/watchdog-init.patch deleted file mode 100644 index b2765f190..000000000 --- a/poky/meta/recipes-extended/watchdog/watchdog/watchdog-init.patch +++ /dev/null @@ -1,56 +0,0 @@ -Signed-off-by: Diego Rondini <diego.ml@zoho.com> -Upstream-Status: Inappropriate - ---- watchdog-5.13.orig/redhat/watchdog.init 2014-11-12 17:18:39.125943000 +0100 -+++ watchdog-5.13/redhat/watchdog.init 2014-11-12 18:27:36.189943000 +0100 -@@ -7,7 +7,7 @@ - # Henning P. Schmiedehausen <hps@tanstaafl.de> - - # Source function library. --. /etc/rc.d/init.d/functions -+. /etc/init.d/functions - - [ -x /usr/sbin/watchdog -a -e /etc/watchdog.conf ] || exit 0 - -@@ -23,22 +23,22 @@ - - start() { - -- echo -n $"Starting $prog: " -+ echo -n "Starting $prog: " - if [ -n "$(pidofproc $prog)" ]; then -- echo -n $"$prog: already running" -- echo_failure -+ echo -n "$prog: already running " -+ failure - echo - return 1 - fi - if [ "$VERBOSE" = "yes" ]; then -- daemon /usr/sbin/${prog} -v -+ /usr/sbin/${prog} -v - else -- daemon /usr/sbin/${prog} -+ /usr/sbin/${prog} - fi - RETVAL=$? - [ $RETVAL -eq 0 ] && touch $lockfile -- [ $RETVAL -eq 0 ] && echo_success -- [ $RETVAL -ne 0 ] && echo_failure -+ [ $RETVAL -eq 0 ] && success -+ [ $RETVAL -ne 0 ] && failure - echo - return $RETVAL - } -@@ -50,8 +50,10 @@ - # and reboot the box. - killproc $prog -TERM - RETVAL=$? -- echo - [ $RETVAL -eq 0 ] && rm -f $lockfile $pidfile -+ [ $RETVAL -eq 0 ] && success -+ [ $RETVAL -ne 0 ] && failure -+ echo - return $RETVAL - } - diff --git a/poky/meta/recipes-extended/watchdog/watchdog/watchdog.init b/poky/meta/recipes-extended/watchdog/watchdog/watchdog.init new file mode 100644 index 000000000..d37107cf0 --- /dev/null +++ b/poky/meta/recipes-extended/watchdog/watchdog/watchdog.init @@ -0,0 +1,110 @@ +#!/bin/sh +#/etc/init.d/watchdog: start watchdog daemon. + +### BEGIN INIT INFO +# Provides: watchdog +# Short-Description: Start software watchdog daemon +# Required-Start: $all +# Required-Stop: $all +# Should-Start: +# Should-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +### END INIT INFO + +PATH=/bin:/usr/bin:/sbin:/usr/sbin + +test -x /usr/sbin/watchdog || exit 0 + +# For configuration of the init script use the file +# /etc/default/watchdog, do not edit this init script. + +# Set run_watchdog to 1 to start watchdog or 0 to disable it. +run_watchdog=0 + +# Specify additional watchdog options here (see manpage). +watchdog_options="" + +# Specify module to load +watchdog_module="none" + +[ -e /etc/default/watchdog ] && . /etc/default/watchdog + +NAME=watchdog +DAEMON=/usr/sbin/watchdog + +STOP_RETRY_SCHEDULE='TERM/10/forever/KILL/1' + +. /etc/init.d/functions + +# Mock Debian stuff +log_begin_msg() { + echo -n $* +} + +log_end_msg() { + if [ "$1" = "0" ]; then + echo 'done' + else + echo 'error' + fi +} + +log_daemon_msg() { + echo $* +} + +log_progress_msg() { + echo $* +} + +case "$1" in + start) + if [ $run_watchdog = 1 ] + then + # do we have to load a module? + [ "${watchdog_module:-none}" != "none" ] && /sbin/modprobe $watchdog_module + + # Check /dev/watchdog here because if it does not exist after module loading, + # it makes no sense to start the daemon + test -e /dev/watchdog || { log_daemon_msg "daemon not start due to lack of /dev/watchdog"; exit 0; } + + log_begin_msg "Starting watchdog daemon..." + start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ + --exec $DAEMON -- $watchdog_options + log_end_msg $? + fi + ;; + + stop) + if [ $run_watchdog = 1 ] + then + log_begin_msg "Stopping watchdog daemon..." + start-stop-daemon --stop --quiet --retry $STOP_RETRY_SCHEDULE \ + --pidfile /var/run/$NAME.pid + + fi + ;; + + restart) + $0 force-reload + ;; + + force-reload) + if [ $run_watchdog = 0 ]; then exit 0; fi + log_daemon_msg "Restarting $NAME" + $0 stop + $0 start + ;; + + status) + status "$DAEMON" + ;; + + *) + echo "Usage: /etc/init.d/watchdog {start|stop|restart|force-reload|status}" + exit 1 + +esac + +exit 0 diff --git a/poky/meta/recipes-extended/watchdog/watchdog_5.15.bb b/poky/meta/recipes-extended/watchdog/watchdog_5.15.bb index 37b37ae12..1acab2e9e 100644 --- a/poky/meta/recipes-extended/watchdog/watchdog_5.15.bb +++ b/poky/meta/recipes-extended/watchdog/watchdog_5.15.bb @@ -11,8 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ecc0551bf54ad97f6b541720f84d6569" SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \ file://0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch \ file://0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch \ - file://watchdog-init.patch \ - file://watchdog-conf.patch \ + file://watchdog.init \ file://wd_keepalive.init \ " @@ -22,31 +21,35 @@ SRC_URI[sha256sum] = "ffdc865137ad5d8e53664bd22bad4de6ca136d1b4636720320cb52af0c UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/watchdog/files/watchdog/" UPSTREAM_CHECK_REGEX = "/watchdog/(?P<pver>(\d+[\.\-_]*)+)/" -inherit autotools update-rc.d systemd +inherit autotools update-rc.d systemd pkgconfig -DEPENDS_append_libc-musl = " libtirpc " -CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc " -LDFLAGS_append_libc-musl = " -ltirpc " -EXTRA_OECONF_append_libc-musl = " --disable-nfs " +DEPENDS += "libtirpc" +CFLAGS += "-I${STAGING_INCDIR}/tirpc" +LDFLAGS += "-ltirpc" + +EXTRA_OECONF += " --disable-nfs " INITSCRIPT_PACKAGES = "${PN} ${PN}-keepalive" -INITSCRIPT_NAME_${PN} = "watchdog.sh" -INITSCRIPT_PARAMS_${PN} = "start 15 1 2 3 4 5 . stop 85 0 6 ." +INITSCRIPT_NAME_${PN} = "watchdog" +INITSCRIPT_PARAMS_${PN} = "start 25 1 2 3 4 5 . stop 85 0 6 ." INITSCRIPT_NAME_${PN}-keepalive = "wd_keepalive" -INITSCRIPT_PARAMS_${PN}-keepalive = "start 15 1 2 3 4 5 . stop 85 0 6 ." +INITSCRIPT_PARAMS_${PN}-keepalive = "start 25 1 2 3 4 5 . stop 85 0 6 ." SYSTEMD_PACKAGES = "${PN} ${PN}-keepalive" SYSTEMD_SERVICE_${PN} = "watchdog.service" SYSTEMD_SERVICE_${PN}-keepalive = "wd_keepalive.service" +# When using systemd, consider making use of internal watchdog support of systemd. +# See RuntimeWatchdogSec in /etc/systemd/system.conf. +SYSTEMD_AUTO_ENABLE = "disable" do_install_append() { install -d ${D}${systemd_system_unitdir} install -m 0644 ${S}/debian/watchdog.service ${D}${systemd_system_unitdir} install -m 0644 ${S}/debian/wd_keepalive.service ${D}${systemd_system_unitdir} - install -D ${S}/redhat/watchdog.init ${D}/${sysconfdir}/init.d/watchdog.sh + install -Dm 0755 ${WORKDIR}/watchdog.init ${D}/${sysconfdir}/init.d/watchdog install -Dm 0755 ${WORKDIR}/wd_keepalive.init ${D}${sysconfdir}/init.d/wd_keepalive # watchdog.conf is provided by the watchdog-config recipe diff --git a/poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.2.bb b/poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.3.bb index 7339289de..8e4663819 100644 --- a/poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.2.bb +++ b/poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.3.bb @@ -22,8 +22,8 @@ SRC_URI = "http://portland.freedesktop.org/download/${BPN}-${PV}.tar.gz \ file://0001-Don-t-build-the-in-script-manual.patch \ " -SRC_URI[md5sum] = "361e75eb76c94d19f6f4f330d8ee626b" -SRC_URI[sha256sum] = "951952e2c6bb21214e0bb54e0dffa057d30f5563300225c24c16fba846258bcc" +SRC_URI[md5sum] = "902042508b626027a3709d105f0b63ff" +SRC_URI[sha256sum] = "d798b08af8a8e2063ddde6c9fa3398ca81484f27dec642c5627ffcaa0d4051d9" UPSTREAM_CHECK_REGEX = "xdg-utils-(?P<pver>((\d+[\.\-_]*)+)((rc|alpha|beta)\d+)?)\.(tar\.gz|tgz)" diff --git a/poky/meta/recipes-extended/xinetd/xinetd_2.3.15.bb b/poky/meta/recipes-extended/xinetd/xinetd_2.3.15.bb index 1beb5456e..6e43f5be6 100644 --- a/poky/meta/recipes-extended/xinetd/xinetd_2.3.15.bb +++ b/poky/meta/recipes-extended/xinetd/xinetd_2.3.15.bb @@ -6,8 +6,7 @@ HOMEPAGE = "https://github.com/xinetd-org/xinetd" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=8ad8615198542444f84d28a6cf226dd8" -DEPENDS = "" -DEPENDS_append_libc-musl = " libtirpc " +DEPENDS += "libtirpc" PR = "r2" # Blacklist a bogus tag in upstream check @@ -42,8 +41,8 @@ EXTRA_OECONF="--disable-nls" PACKAGECONFIG ??= "tcp-wrappers" PACKAGECONFIG[tcp-wrappers] = "--with-libwrap,,tcp-wrappers" -CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc " -LDFLAGS_append_libc-musl = " -ltirpc " +CFLAGS += "-I${STAGING_INCDIR}/tirpc" +LDFLAGS += "-ltirpc" do_configure() { # Looks like configure.in is broken, so we are skipping diff --git a/poky/meta/recipes-extended/xz/xz_5.2.3.bb b/poky/meta/recipes-extended/xz/xz_5.2.4.bb index c0f8b82f6..791746e1c 100644 --- a/poky/meta/recipes-extended/xz/xz_5.2.3.bb +++ b/poky/meta/recipes-extended/xz/xz_5.2.4.bb @@ -15,15 +15,17 @@ LICENSE_${PN}-dbg = "GPLv2+" LICENSE_${PN}-locale = "GPLv2+" LICENSE_liblzma = "PD" -LIC_FILES_CHKSUM = "file://COPYING;md5=c475b6c7dca236740ace4bba553e8e1c \ +LIC_FILES_CHKSUM = "file://COPYING;md5=97d554a32881fee0aa283d96e47cb24a \ file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ file://COPYING.LGPLv2.1;md5=4fbd65380cdd255951079008b364516c \ - file://lib/getopt.c;endline=23;md5=2069b0ee710572c03bb3114e4532cd84 " + file://lib/getopt.c;endline=23;md5=2069b0ee710572c03bb3114e4532cd84 \ + " SRC_URI = "http://tukaani.org/xz/xz-${PV}.tar.gz" -SRC_URI[md5sum] = "ef68674fb47a8b8e741b34e429d86e9d" -SRC_URI[sha256sum] = "71928b357d0a09a12a4b4c5fafca8c31c19b0e7d3b8ebb19622e96f26dbf28cb" +SRC_URI[md5sum] = "5ace3264bdd00c65eeec2891346f65e6" +SRC_URI[sha256sum] = "b512f3b726d3b37b6dc4c8570e137b9311e7552e8ccbab4d39d47ce5f4177145" +UPSTREAM_CHECK_REGEX = "xz-(?P<pver>\d+(\.\d+)+)\.tar" inherit autotools gettext @@ -31,6 +33,11 @@ PACKAGES =+ "liblzma" FILES_liblzma = "${libdir}/liblzma*${SOLIBS}" +inherit update-alternatives +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN} = "xz xzcat unxz \ + lzma lzcat unlzma" + BBCLASSEXTEND = "native nativesdk" export CONFIG_SHELL="/bin/sh" |