From patchwork Thu Aug 11 05:54:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 11272 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DD3DC25B0C for ; Thu, 11 Aug 2022 05:54:47 +0000 (UTC) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by mx.groups.io with SMTP id smtpd.web11.3335.1660197277573419196 for ; Wed, 10 Aug 2022 22:54:37 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=S5/Uzuld; spf=pass (domain: gmail.com, ip: 209.85.210.177, mailfrom: raj.khem@gmail.com) Received: by mail-pf1-f177.google.com with SMTP id u133so15631422pfc.10 for ; Wed, 10 Aug 2022 22:54:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=nns53/K258uPQ/9AJNIeT6W1uTVh2hagnjrhrhhaxFQ=; b=S5/UzuldoFVHgormQVjHfPIyIBYBlc8nUk9L7BMN4NqPjv9naM7DXSTk3k0mUdMvsK nTnwArH8CbkWd8Fh9l9fOx1Of+8RAjYBbM+hQTZXBrhhXkY5rSgs4UFFcwVE8jNEj/Zv QkIwEkq9dQfr71D0Y7vbckYNn9TTHFcpElACLhFzn9dLx9UNUor5Sd9aPywnSXs5tMXE eBeePB+udNCxUp7GD+Eh5DRT+3jq+gquuNE6ipXN5RliNV6yqyZB9uMQ9vJl8ssUKPNg XuaAlOvpZTA83fRY+FXnYWm1PSifanXChDrcwuv04kQk6ZoNeQTiqFNvlASo6Jv+OdJd ixvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=nns53/K258uPQ/9AJNIeT6W1uTVh2hagnjrhrhhaxFQ=; b=Ab/AhJXUaZg9lkH2sY1eJaAzXfCwX6jkvSo0B72IDlMxm1HStycLe0b/6mtdhnAVfL FoZ2RIZPfnTCfUrUP5eR4+qiNb9T6Q9TosZdlys8u0VbDRTT70fLRPR6iwyG9AgMcmit hUKrOHIaFEH0TRB8cQo9TBV+brmcUXX5LohiUSiROCDugjWZQHJxYzQaUX9KmQ7o95/Y 1sxfshMW8YWNxDJtR874BnP3d+Cn8Umqq8jlwedKKoI+k4SQtSVA0EPUv8RcvCmG74KU 6R36xSGT6z9I5bhjt8Vqy3quECC2QsV7bJaYmVO3sHgexzpY5RMUb1AByCyzr3VJFSmH 4axw== X-Gm-Message-State: ACgBeo2zqF5qWuIpMSjmAgSEfq2/90KFdIT3zxYNAnid+xLXyku8MXv+ zYhndGLS4F73HguD0ihEDbPBD26u9zw= X-Google-Smtp-Source: AA6agR63VwIJOuzyk42jHhQ6E7YmcEI2t2421kd6gKoapRyqVTtDpgFzrEahhTUI9YTkEgCYQROvdA== X-Received: by 2002:a63:1b55:0:b0:41e:2cc8:4296 with SMTP id b21-20020a631b55000000b0041e2cc84296mr2590974pgm.510.1660197276448; Wed, 10 Aug 2022 22:54:36 -0700 (PDT) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9200:a0f0::9f45]) by smtp.gmail.com with ESMTPSA id e11-20020a17090301cb00b0016db6bd77f4sm14290483plh.117.2022.08.10.22.54.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Aug 2022 22:54:35 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Cc: Khem Raj Subject: [PATCH 1/5] zip: Enable largefile support based on distro feature Date: Wed, 10 Aug 2022 22:54:29 -0700 Message-Id: <20220811055433.819522-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 11 Aug 2022 05:54:47 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/169227 The configure test tries to run a binary during build to determine largefile support, which wont work in cross-compile mode, therefore specify it when largefile DISTRO_FEATURE is on. Signed-off-by: Khem Raj --- meta/recipes-extended/zip/zip_3.0.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/recipes-extended/zip/zip_3.0.bb b/meta/recipes-extended/zip/zip_3.0.bb index 07a67b96348..d560c83464b 100644 --- a/meta/recipes-extended/zip/zip_3.0.bb +++ b/meta/recipes-extended/zip/zip_3.0.bb @@ -29,6 +29,8 @@ CVE_CHECK_IGNORE += "CVE-2018-13410" # Not for zip but for smart contract implementation for it CVE_CHECK_IGNORE += "CVE-2018-13684" +CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '-DLARGE_FILE_SUPPORT', '', d)}" + # zip.inc sets CFLAGS, but what Makefile actually uses is # CFLAGS_NOOPT. It will also force -O3 optimization, overriding # whatever we set. From patchwork Thu Aug 11 05:54:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 11273 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2F0EC25B0E for ; Thu, 11 Aug 2022 05:54:47 +0000 (UTC) Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by mx.groups.io with SMTP id smtpd.web08.3216.1660197278735178280 for ; Wed, 10 Aug 2022 22:54:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=RLwr8+xV; spf=pass (domain: gmail.com, ip: 209.85.216.50, mailfrom: raj.khem@gmail.com) Received: by mail-pj1-f50.google.com with SMTP id o3-20020a17090a0a0300b001f7649cd317so4386987pjo.0 for ; Wed, 10 Aug 2022 22:54:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=DfIj4QbU1CoGNRpI1+Gd4fXva7ElV7CREoanEXNHMOk=; b=RLwr8+xVsp8u1wx/BtqqLaV1tTkPMJAXpeePNG5Ce09mdAsp6ziAqYsb/bOzLXoap5 KNxRf44wviXXnlqDha6wdPZEqVySOnkereYtBpEwfvrMIH3bKW8n4HketXmEmB6nlmu0 mErwVIlqb2hPtfeHadOc8b4kUYPSJGY3x4Q18aapb7391eclseG8PQjKyHNcEVaus8Wv IDCm7NDg9sDaJKliHvTfrh2DYdeubz5AXGAg3s8sj4zB1ThngTb8X38lhx2I4WDtZinp /ywWDbdhcF9vrQIRNyo3L34t595BLglzuwgQR0LlEva0A2TciAKPwZgPhLZhl8C5Uq4X xmEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=DfIj4QbU1CoGNRpI1+Gd4fXva7ElV7CREoanEXNHMOk=; b=ugDUa11T7BPaVetqissFPimt/EbPP2N8Omn5z9Vt5/zjQFf0EIA9f8Dy933YsFE5TO nyDUCPkqKigeFvic+5wByUvb4AUG2NUOMho2lon9nXAAdC1QHOdhyz4PmlT4fmEo9DDb 1w1eVBtqcx0hFzsUWd7zLYQJItPIDQk+vSx9NTuK12cILANnkGMjsbZrrWul9PVxjxwV ck9T7Iyb4njqxdbCaMYJbae6dRuAYv9DskfDzZlONtrJDz6TXu7vKAYVjkPFPkmZfWpq aR065CzQhnxGDt1kyOU5Bx9BVdYKYkj90NUat8RSfLDeu+zOBbU2J7gxWhvEXNxKY78h a5tw== X-Gm-Message-State: ACgBeo0eMy0FSy7FORLyy5OEwrSQgtxdBydafg9QUvlTKOWDpJEoYe4L T1NU3iGvkHC2HdiZFsKDaLCjK5BnTlE= X-Google-Smtp-Source: AA6agR69SseyrY0Lg7tsejuZzrOuzm8mYoTaeJED+7KaRzJ6uwjF2aHiXeMJJLKymYAoYfVv8cpBJA== X-Received: by 2002:a17:902:9005:b0:16d:1ffd:cf56 with SMTP id a5-20020a170902900500b0016d1ffdcf56mr30939980plp.119.1660197277582; Wed, 10 Aug 2022 22:54:37 -0700 (PDT) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9200:a0f0::9f45]) by smtp.gmail.com with ESMTPSA id e11-20020a17090301cb00b0016db6bd77f4sm14290483plh.117.2022.08.10.22.54.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Aug 2022 22:54:36 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Cc: Khem Raj Subject: [PATCH 2/5] zip: Make configure checks to be more robust Date: Wed, 10 Aug 2022 22:54:30 -0700 Message-Id: <20220811055433.819522-2-raj.khem@gmail.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220811055433.819522-1-raj.khem@gmail.com> References: <20220811055433.819522-1-raj.khem@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 11 Aug 2022 05:54:47 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/169228 Newer compilers are strict and have turned some warnings into hard errors which results in subtle configure check failures. Therefore fix these tests and also enable largefile support via cflags when its desired Signed-off-by: Khem Raj --- ...y-correct-function-signatures-and-de.patch | 134 ++++++++++++++++++ ...2-unix.c-Do-not-redefine-DIR-as-FILE.patch | 35 +++++ meta/recipes-extended/zip/zip_3.0.bb | 2 + 3 files changed, 171 insertions(+) create mode 100644 meta/recipes-extended/zip/zip-3.0/0001-configure-Specify-correct-function-signatures-and-de.patch create mode 100644 meta/recipes-extended/zip/zip-3.0/0002-unix.c-Do-not-redefine-DIR-as-FILE.patch diff --git a/meta/recipes-extended/zip/zip-3.0/0001-configure-Specify-correct-function-signatures-and-de.patch b/meta/recipes-extended/zip/zip-3.0/0001-configure-Specify-correct-function-signatures-and-de.patch new file mode 100644 index 00000000000..a4f83826257 --- /dev/null +++ b/meta/recipes-extended/zip/zip-3.0/0001-configure-Specify-correct-function-signatures-and-de.patch @@ -0,0 +1,134 @@ +From 8810f2643c9372a8083272dc1fc157427646d961 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 10 Aug 2022 17:16:23 -0700 +Subject: [PATCH 1/2] configure: Specify correct function signatures and + declarations + +Include needed system headers in configure tests, this is needed because +newer compilers are getting stricter about the C99 specs and turning +-Wimplicit-function-declaration into hard error e.g. clang-15+ + +Upstream-Status: Inactive-Upstream +Signed-off-by: Khem Raj +--- + unix/configure | 79 +++++++++++++++++++++++++++++++++++++++++--------- + 1 file changed, 66 insertions(+), 13 deletions(-) + +diff --git a/unix/configure b/unix/configure +index 1d9a9bb..f2b3d02 100644 +--- a/unix/configure ++++ b/unix/configure +@@ -513,21 +513,70 @@ $CC $CFLAGS -c conftest.c >/dev/null 2>/dev/null + # Check for missing functions + # add NO_'function_name' to flags if missing + +-for func in rmdir strchr strrchr rename mktemp mktime mkstemp +-do +- echo Check for $func +- echo "int main(){ $func(); return 0; }" > conftest.c +- $CC $CFLAGS $LDFLAGS $BFLAG -o conftest conftest.c >/dev/null 2>/dev/null +- [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_`echo $func | tr '[a-z]' '[A-Z]'`" +-done ++echo Check for rmdir ++cat > conftest.c << _EOF_ ++#include ++int main(){ rmdir(NULL); return 0; } ++_EOF_ ++$CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null ++[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_RMDIR" ++ ++echo Check for strchr ++cat > conftest.c << _EOF_ ++#include ++int main(){ strchr(NULL,0); return 0; } ++_EOF_ ++$CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null ++[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_STRCHR" + ++echo Check for strrchr ++cat > conftest.c << _EOF_ ++#include ++int main(){ strrchr(NULL,0); return 0; } ++_EOF_ ++$CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null ++[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_STRRCHR" ++ ++echo Check for rename ++cat > conftest.c << _EOF_ ++#include ++int main(){ rename(NULL,NULL); return 0; } ++_EOF_ ++$CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null ++[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_RENAME" ++ ++echo Check for mktemp ++cat > conftest.c << _EOF_ ++#include ++int main(){ mktemp(NULL); return 0; } ++_EOF_ ++$CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null ++[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_MKTEMP" ++ ++echo Check for mktime ++cat > conftest.c << _EOF_ ++#include ++int main(){ mktime(NULL); return 0; } ++_EOF_ ++$CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null ++[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_MKTIME" ++ ++echo Check for mkstemp ++cat > conftest.c << _EOF_ ++#include ++int main(){ return mkstemp(NULL); } ++_EOF_ ++$CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null ++[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_MKSTEMP" + + echo Check for memset +-echo "int main(){ char k; memset(&k,0,0); return 0; }" > conftest.c ++cat > conftest.c << _EOF_ ++#include ++int main(){ char k; memset(&k,0,0); return 0; } ++_EOF_ + $CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null + [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DZMEM" + +- + echo Check for memmove + cat > conftest.c << _EOF_ + #include +@@ -548,7 +597,7 @@ $CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null + echo Check for errno declaration + cat > conftest.c << _EOF_ + #include +-main() ++int main() + { + errno = 0; + return 0; +@@ -625,14 +674,18 @@ CFLAGS="${CFLAGS} ${OPT}" + + echo Check for valloc + cat > conftest.c << _EOF_ +-main() ++#include ++int main() + { + #ifdef MMAP +- valloc(); ++ valloc(0); + #endif ++ return 0; + } + _EOF_ +-$CC ${CFLAGS} -c conftest.c > /dev/null 2>/dev/null ++#$CC ${CFLAGS} -c conftest.c > /dev/null 2>/dev/null ++$CC ${CFLAGS} -c conftest.c ++echo "===========================================" + [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_VALLOC" + + +-- +2.37.1 + diff --git a/meta/recipes-extended/zip/zip-3.0/0002-unix.c-Do-not-redefine-DIR-as-FILE.patch b/meta/recipes-extended/zip/zip-3.0/0002-unix.c-Do-not-redefine-DIR-as-FILE.patch new file mode 100644 index 00000000000..a86e03e6203 --- /dev/null +++ b/meta/recipes-extended/zip/zip-3.0/0002-unix.c-Do-not-redefine-DIR-as-FILE.patch @@ -0,0 +1,35 @@ +From 76f5bf3546d826dcbc03acbefcf0b10b972bf136 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 10 Aug 2022 17:19:38 -0700 +Subject: [PATCH 2/2] unix.c: Do not redefine DIR as FILE + +DIR is already provided on Linux via +/usr/include/dirent.h system header + +Upstream-Status: Inactive-Upstream +Signed-off-by: Khem Raj +--- + unix/unix.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/unix/unix.c b/unix/unix.c +index ba87614..6e6f4d2 100644 +--- a/unix/unix.c ++++ b/unix/unix.c +@@ -61,13 +61,11 @@ local time_t label_utim = 0; + /* Local functions */ + local char *readd OF((DIR *)); + +- + #ifdef NO_DIR /* for AT&T 3B1 */ + #include + #ifndef dirent + # define dirent direct + #endif +-typedef FILE DIR; + /* + ** Apparently originally by Rich Salz. + ** Cleaned up and modified by James W. Birdsall. +-- +2.37.1 + diff --git a/meta/recipes-extended/zip/zip_3.0.bb b/meta/recipes-extended/zip/zip_3.0.bb index d560c83464b..65d9b0995bf 100644 --- a/meta/recipes-extended/zip/zip_3.0.bb +++ b/meta/recipes-extended/zip/zip_3.0.bb @@ -17,6 +17,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/Zip%203.x%20%28latest%29/3.0/zip30.tar. file://0001-configure-use-correct-CPP.patch \ file://0002-configure-support-PIC-code-build.patch \ file://0001-configure-Use-CFLAGS-and-LDFLAGS-when-doing-link-tes.patch \ + file://0001-configure-Specify-correct-function-signatures-and-de.patch \ + file://0002-unix.c-Do-not-redefine-DIR-as-FILE.patch \ " UPSTREAM_VERSION_UNKNOWN = "1" From patchwork Thu Aug 11 05:54:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 11274 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1CBCC25B07 for ; Thu, 11 Aug 2022 05:54:47 +0000 (UTC) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by mx.groups.io with SMTP id smtpd.web10.3240.1660197279961718203 for ; Wed, 10 Aug 2022 22:54:40 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=D8uhUgKm; spf=pass (domain: gmail.com, ip: 209.85.210.173, mailfrom: raj.khem@gmail.com) Received: by mail-pf1-f173.google.com with SMTP id f30so15278487pfq.4 for ; Wed, 10 Aug 2022 22:54:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=ny92+QKnX8kITEt7bQsvUDz38Zb2J4+Fck7d/iDURtg=; b=D8uhUgKm7My2/T3I+d444fhhcbGN/98uHsbaM3k61mwlSa/jMnI/KKKUg4lBSusgnW z1aXvhfTqCNBMvNi5+TQtT+dNRhSFPNiNbrrptRfAMlUUb18bom2ChsTaJXeW5rDv2ng UGaHXTnkj20Zro0XRPJx+B8OJc4ytJK9Jr2IDZM4/MxWFc8JVqBFUpTZSGKXr++TJjeW iFEdQYbCjaFDOS6tmRkGN58aQxdIxq7pX7bOsqWuPJmAqpjHL3IK50jUa1cfcxS23xvh vbMOAuN+RA5p11a4C8A1+j4E7jjyd+PKrm4SnQRwhMBScC7iAwZM+lz7x85SSr8zVzFK K3Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=ny92+QKnX8kITEt7bQsvUDz38Zb2J4+Fck7d/iDURtg=; b=PzAP2I4FsbHmykBQ8rOQgLnpARuN3t7I+lYS8NBRPtaKL/qmQOUHrERN9w8pYJi+Nk j42yEDrpfL5s9NjaeqK89VYD8+ZVLcANLRKsdf+ugjTlCmoAd+miW7dzK4WMC5pdB0Wv Fts/fOdeBOmxIpW2g1qXgc8fQkYFkUEYLjs3JbUkwd/iupxglpN7sGWwlGI5toETitz9 qVCTV0IuHKzST0OQ4Rxs7mO+tu+okFgwsgkzj4mfdNMlsg+3oh8UjUco0jcptvocw+Vj JSLoPQFi2uyS5FibMKLnEEJO2+vBLS4R9NDpZgRN7J+0T6G9qSjtkgtkwg8vEHOA5gso SZ0Q== X-Gm-Message-State: ACgBeo2+z/gS7WjG6McnRqA8yzyaM1HeGCBIXT/GAew4Qs/8fbAdEa0N eHiL8kvm1/+zpAD/fkDu4xJTBTZ466k= X-Google-Smtp-Source: AA6agR45TOzn04nHZyS9Fu6WTOKPhnvBLBf4un0g8UGmGCcLvutsF9/Gtx5ehbTr9/ngKwu3rwqllg== X-Received: by 2002:a63:180a:0:b0:41b:ff59:257c with SMTP id y10-20020a63180a000000b0041bff59257cmr26306728pgl.113.1660197278954; Wed, 10 Aug 2022 22:54:38 -0700 (PDT) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9200:a0f0::9f45]) by smtp.gmail.com with ESMTPSA id e11-20020a17090301cb00b0016db6bd77f4sm14290483plh.117.2022.08.10.22.54.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Aug 2022 22:54:38 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Cc: Khem Raj Subject: [PATCH 3/5] unzip: Fix configure tests to use modern C Date: Wed, 10 Aug 2022 22:54:31 -0700 Message-Id: <20220811055433.819522-3-raj.khem@gmail.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220811055433.819522-1-raj.khem@gmail.com> References: <20220811055433.819522-1-raj.khem@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 11 Aug 2022 05:54:47 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/169229 Newer compilers end up with errors while compiling these test snippets and build results in failures. Signed-off-by: Khem Raj --- ...rrect-system-headers-and-prototypes-.patch | 112 ++++++++++++++++++ meta/recipes-extended/unzip/unzip_6.0.bb | 1 + 2 files changed, 113 insertions(+) create mode 100644 meta/recipes-extended/unzip/unzip/0001-configure-Add-correct-system-headers-and-prototypes-.patch diff --git a/meta/recipes-extended/unzip/unzip/0001-configure-Add-correct-system-headers-and-prototypes-.patch b/meta/recipes-extended/unzip/unzip/0001-configure-Add-correct-system-headers-and-prototypes-.patch new file mode 100644 index 00000000000..f7e0854cd9f --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/0001-configure-Add-correct-system-headers-and-prototypes-.patch @@ -0,0 +1,112 @@ +From 5ac5885d35257888d0e4a9dda903405314f9fc84 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 10 Aug 2022 17:53:13 -0700 +Subject: [PATCH] configure: Add correct system headers and prototypes to tests + +Newer compilers e.g. clang-15+ have turned stricter towards these +warnings and turned them into errors which results in subtle failures +during build, therefore make the testcases use the needed headers and +modern C + +Upstream-Status: Inactive-Upstream + +Signed-off-by: Khem Raj +--- + unix/configure | 51 +++++++++++++++++++++++++++++++++++++++----------- + 1 file changed, 40 insertions(+), 11 deletions(-) + +diff --git a/unix/configure b/unix/configure +index 49579f3..8fd82dd 100755 +--- a/unix/configure ++++ b/unix/configure +@@ -379,14 +379,37 @@ $CC $CFLAGS -c conftest.c >/dev/null 2>/dev/null + + # Check for missing functions + # add NO_'function_name' to flags if missing +-for func in fchmod fchown lchown nl_langinfo +-do +- echo Check for $func +- echo "int main(){ $func(); return 0; }" > conftest.c +- $CC $BFLAG $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null +- [ $? -ne 0 ] && CFLAGSR="${CFLAGSR} -DNO_`echo $func | tr '[a-z]' '[A-Z]'`" +-done ++echo Check for fchmod ++cat > conftest.c << _EOF_ ++#include ++int main(){ fchmod(0,0); return 0; } ++_EOF_ ++$CC $BFLAG $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null ++[ $? -ne 0 ] && CFLAGSR="${CFLAGSR} -DNO_FCHMOD" + ++echo Check for fchown ++cat > conftest.c << _EOF_ ++#include ++int main(){ fchown(0,0,0); return 0; } ++_EOF_ ++$CC $BFLAG $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null ++[ $? -ne 0 ] && CFLAGSR="${CFLAGSR} -DNO_FCHOWN" ++ ++echo Check for lchown ++cat > conftest.c << _EOF_ ++#include ++int main(){ lchown(NULL,0,0); return 0; } ++_EOF_ ++$CC $BFLAG $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null ++[ $? -ne 0 ] && CFLAGSR="${CFLAGSR} -DNO_LCHOWN" ++ ++echo Check for nl_langinfo ++cat > conftest.c << _EOF_ ++#include ++int main(){ nl_langinfo(0); return 0; } ++_EOF_ ++$CC $BFLAG $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null ++[ $? -ne 0 ] && CFLAGSR="${CFLAGSR} -DNO_NL_LANGINFO" + # Check (seriously) for a working lchmod. + echo 'Check for lchmod' + temp_file="/tmp/unzip_test_$$" +@@ -401,14 +424,17 @@ ln -s "${temp_link}" "${temp_file}" && \ + rm -f "${temp_file}" + + echo Check for memset +-echo "int main(){ char k; memset(&k,0,0); return 0; }" > conftest.c ++cat > conftest.c << _EOF_ ++#include ++int main(){ char k; memset(&k,0,0); return 0; } ++_EOF_ + $CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null + [ $? -ne 0 ] && CFLAGSR="${CFLAGSR} -DZMEM" + + echo Check for errno declaration + cat > conftest.c << _EOF_ + #include +-main() ++int main() + { + errno = 0; + return 0; +@@ -419,6 +445,8 @@ $CC $CFLAGS -c conftest.c >/dev/null 2>/dev/null + + echo Check for directory libraries + cat > conftest.c << _EOF_ ++#include ++#include + int main() { return closedir(opendir(".")); } + _EOF_ + +@@ -523,10 +551,11 @@ fi + # needed for AIX (and others ?) when mmap is used + echo Check for valloc + cat > conftest.c << _EOF_ +-main() ++#include ++int main() + { + #ifdef MMAP +- valloc(); ++ valloc(0); + #endif + } + _EOF_ +-- +2.37.1 + diff --git a/meta/recipes-extended/unzip/unzip_6.0.bb b/meta/recipes-extended/unzip/unzip_6.0.bb index f35856cf617..15235540890 100644 --- a/meta/recipes-extended/unzip/unzip_6.0.bb +++ b/meta/recipes-extended/unzip/unzip_6.0.bb @@ -31,6 +31,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/ file://CVE-2021-4217.patch \ file://CVE-2022-0529.patch \ file://CVE-2022-0530.patch \ + file://0001-configure-Add-correct-system-headers-and-prototypes-.patch \ " UPSTREAM_VERSION_UNKNOWN = "1" From patchwork Thu Aug 11 05:54:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 11270 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8FE58C3F6B0 for ; Thu, 11 Aug 2022 05:54:47 +0000 (UTC) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by mx.groups.io with SMTP id smtpd.web08.3217.1660197281386598816 for ; Wed, 10 Aug 2022 22:54:41 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=gJoKD6GO; spf=pass (domain: gmail.com, ip: 209.85.214.179, mailfrom: raj.khem@gmail.com) Received: by mail-pl1-f179.google.com with SMTP id 17so6771128pli.0 for ; Wed, 10 Aug 2022 22:54:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=Rv7o+BS0ozzYJ6RRUo/hzv/MB+nqMiPUBIZNHOQZrfk=; b=gJoKD6GOGacfzPFOAebns4T6IsKEzy0dUDM11LV6pG6drtHq194uljDDcyfPRm3pBb l4jnob7AriofDyz1u/MIQp+39l8TKA7KVXVF1P2vCm/okMmyAPojyMlMtn6BBvp+6UZP /wcRP3M3ZRpbgZc8iwkIYNTWn72b2aruANwflH47t5idym5XyBkaMNuaeXfi1AXMmssk YtWRVvDqwJ9HvKhZX/U5zOsdo5l/cQB1W2VsExgD/2+YZmh3H7LuictyOyttR2RmEoHD UWJbYtFpCG4VQxSDHB6sxE6ugu5Wq0XH0x2djQMjzpSunOmGMFBQ/aHydSAVj2BZcoDt ajtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=Rv7o+BS0ozzYJ6RRUo/hzv/MB+nqMiPUBIZNHOQZrfk=; b=vNOVp8h1K6MF7W6e2k5AcEih01xUhhDvcP87lIi9hv6t8R6ruUEeTQAcfrM9fR8m+G hYtmUsj1gFVeEf+rkwP7ImOZa4Nx3+RBLIJeI8bSDk4fof7TQypo5RB3P93Bujoiq6Oi 1mzYjikC2GvmGkaDIl+Woz1XhgAkScpZDI/tYazOgCGYiOIi1TT4BsQeK2NldbwcUrrk 9rRreR81amxUquXBTIheQpf8l2Nhst8yxIoZo6yIttcvAeKhFV49+y9jooErJfm9DqKc 2F1pm9+DGRNTYix1T/jn0uTQjR2U2b6sCyXfesohwdUvF1V4zLVjVwbgen4YDy5qyoqM G/xw== X-Gm-Message-State: ACgBeo1JxdZxjKrJExuBPJBtwpGLMcVOvEfi7/eyPc5yBOCJjZ6Udng+ Wh123A4WJ8sdySm8tj+7wjBeq96qcrY= X-Google-Smtp-Source: AA6agR72RPvG/7gJB7Y11nhUTTzHMUzM/h3g//S+eCu0gv0NRfH6o+LfmypMIAMx1k7Z5pvYCMnQPQ== X-Received: by 2002:a17:902:b214:b0:171:2e1f:6d1a with SMTP id t20-20020a170902b21400b001712e1f6d1amr8013115plr.147.1660197280261; Wed, 10 Aug 2022 22:54:40 -0700 (PDT) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9200:a0f0::9f45]) by smtp.gmail.com with ESMTPSA id e11-20020a17090301cb00b0016db6bd77f4sm14290483plh.117.2022.08.10.22.54.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Aug 2022 22:54:39 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Cc: Khem Raj Subject: [PATCH 4/5] unzip: Enable largefile support when enabled in distro Date: Wed, 10 Aug 2022 22:54:32 -0700 Message-Id: <20220811055433.819522-4-raj.khem@gmail.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220811055433.819522-1-raj.khem@gmail.com> References: <20220811055433.819522-1-raj.khem@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 11 Aug 2022 05:54:47 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/169230 The test to determine largefile support is a runtime test which wont work during cross-compile, therefore override the test result from recipe Signed-off-by: Khem Raj --- meta/recipes-extended/unzip/unzip_6.0.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/recipes-extended/unzip/unzip_6.0.bb b/meta/recipes-extended/unzip/unzip_6.0.bb index 15235540890..96068eefdd2 100644 --- a/meta/recipes-extended/unzip/unzip_6.0.bb +++ b/meta/recipes-extended/unzip/unzip_6.0.bb @@ -46,6 +46,8 @@ UPSTREAM_CHECK_REGEX = "unzip(?P(?!552).+)\.tgz" S = "${WORKDIR}/unzip60" +CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '-DLARGE_FILE_SUPPORT', '', d)}" + # Makefile uses CF_NOOPT instead of CFLAGS. We lifted the values from # Makefile and add CFLAGS. Optimization will be overriden by unzip # configure to be -O3. From patchwork Thu Aug 11 05:54:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 11271 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C40FC19F2D for ; Thu, 11 Aug 2022 05:54:47 +0000 (UTC) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mx.groups.io with SMTP id smtpd.web08.3218.1660197282636970080 for ; Wed, 10 Aug 2022 22:54:42 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=m24UGlCW; spf=pass (domain: gmail.com, ip: 209.85.214.169, mailfrom: raj.khem@gmail.com) Received: by mail-pl1-f169.google.com with SMTP id m2so16139608pls.4 for ; Wed, 10 Aug 2022 22:54:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=FmzXnVk2BmngrkL8vhI84KUhx1WbGvxrVDppfg6KaPI=; b=m24UGlCWxgVmy3brGH1WOkKU6Tak5nLBavKnF5qG3V24MLjBcyhtr/8qpc8qa7wTtr V9L5njFbpS9Qfxl6IN6Vww/KXDIGY2vgI7Aud5XcutJbWLhzh1wmXOHlcbIVPUOqxeWn PrCd4CCEEnxkPZEjSGDOzAFCINEpczrfS8snnLLtYzWnzZ0L3We+ltn/1XwHFIpiLJb4 sRpHq4Xk73olyIJsFXRLq5NapbIllUe95WXli7lO8k7PSkOuNo59fEo9YXgMzrYCpuj6 2If9mXbDQKPiQE41oOP4hAXol8/R39ZBJcAs3xFDG5k4cGRoxIGTQ8JHA0+vzDf8g0gk 1q0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=FmzXnVk2BmngrkL8vhI84KUhx1WbGvxrVDppfg6KaPI=; b=3tBNWzHkMObIOkCxx9V61I44SHamVQUCOy8f08l+qrV+hPy3XlPX2UF21+Osbx6hA/ gAVeCdfE6TGrSLUyYIT8dfMp1RlxtP3eO2mfVpxu5/L/beuCsqyim6LgP1nwkDwUocEy kHyLUErEhJq1Tg07dZtEi7mS6590P49/fyaZ3/bXzefcs7DLy3tCxXlYHOOHuAkiKbGC sp47eBOLJlM+i0xv3Es+aVpLdTmXBylEkqRO40QbazcQbSQ2VVBREqt4mTZ4fgp9w3S2 5z5xt2JxHmhpaiBxAMPD9Atikv5fDbik5o6+Ez3C8yI358J8vhBvaZ5uY3SQUvpztGK5 JbnA== X-Gm-Message-State: ACgBeo0Dk/awAXKOxjswMcPfBqFSWwOU1dlX1NymK2vbEMyUql9Yv+ak ANrFzHn6ighLPCMusU1hZ3ds7jt8NME= X-Google-Smtp-Source: AA6agR4O0LmrtsHfUYEBFn+8LQlw5PJ2es154lYODyduEqw3frG1zWAkslf7E75aFBXz8SzDbIbEYw== X-Received: by 2002:a17:903:40c4:b0:16d:d2a9:43ae with SMTP id t4-20020a17090340c400b0016dd2a943aemr30556069pld.57.1660197281571; Wed, 10 Aug 2022 22:54:41 -0700 (PDT) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9200:a0f0::9f45]) by smtp.gmail.com with ESMTPSA id e11-20020a17090301cb00b0016db6bd77f4sm14290483plh.117.2022.08.10.22.54.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Aug 2022 22:54:40 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Cc: Khem Raj Subject: [PATCH 5/5] iproute2: Fix netns check during configure Date: Wed, 10 Aug 2022 22:54:33 -0700 Message-Id: <20220811055433.819522-5-raj.khem@gmail.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220811055433.819522-1-raj.khem@gmail.com> References: <20220811055433.819522-1-raj.khem@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 11 Aug 2022 05:54:47 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/169231 Check would fail with compilers using -Werror since _GNU_SOURCE is needed for this function. Signed-off-by: Khem Raj --- ...-_GNU_SOURCE-when-checking-for-setns.patch | 28 +++++++++++++++++++ .../iproute2/iproute2_5.19.0.bb | 1 + 2 files changed, 29 insertions(+) create mode 100644 meta/recipes-connectivity/iproute2/iproute2/0001-configure-Define-_GNU_SOURCE-when-checking-for-setns.patch diff --git a/meta/recipes-connectivity/iproute2/iproute2/0001-configure-Define-_GNU_SOURCE-when-checking-for-setns.patch b/meta/recipes-connectivity/iproute2/iproute2/0001-configure-Define-_GNU_SOURCE-when-checking-for-setns.patch new file mode 100644 index 00000000000..04d44ef4442 --- /dev/null +++ b/meta/recipes-connectivity/iproute2/iproute2/0001-configure-Define-_GNU_SOURCE-when-checking-for-setns.patch @@ -0,0 +1,28 @@ +From dc837a6b4c2cad7f31cddfe56cd652e26baadc02 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 10 Aug 2022 22:31:03 -0700 +Subject: [PATCH] configure: Define _GNU_SOURCE when checking for setns + +glibc defines this function only as gnu extention + +Upstream-Status: Submitted [https://lore.kernel.org/netdev/20220811053440.778649-1-raj.khem@gmail.com/T/#u] +Signed-off-by: Khem Raj +--- + configure | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure b/configure +index 440facb..c02753b 100755 +--- a/configure ++++ b/configure +@@ -191,6 +191,7 @@ check_ipt_lib_dir() + check_setns() + { + cat >$TMPDIR/setnstest.c < + int main(int argc, char **argv) + { +-- +2.37.1 + diff --git a/meta/recipes-connectivity/iproute2/iproute2_5.19.0.bb b/meta/recipes-connectivity/iproute2/iproute2_5.19.0.bb index c45920b0158..6a007797c95 100644 --- a/meta/recipes-connectivity/iproute2/iproute2_5.19.0.bb +++ b/meta/recipes-connectivity/iproute2/iproute2_5.19.0.bb @@ -3,6 +3,7 @@ require iproute2.inc SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \ file://0001-libc-compat.h-add-musl-workaround.patch \ file://0001-ip-ipstats.c-add-an-include-where-MIN-is-defined.patch \ + file://0001-configure-Define-_GNU_SOURCE-when-checking-for-setns.patch \ " SRC_URI[sha256sum] = "26b7a34d6a7fd2f7a42e2b39c5a90cb61bac522d1096067ffeb195e5693d7791"