opkg: Add upstream fixes
PATCH 1/3 opkg: Add upstream fixes
--- .../opkg/opkg/open_inner.patch | 150 ++++++++++++++++ .../opkg/opkg/opkg_archive.patch | 160 ++++++++++++++++++ meta/recipes-devtools/opkg/opkg_0.4.1.bb | 2 + 3 files changed, 312 insertions(+) create mode 100644 meta/recipes-devtools/opkg/opkg/open_inner.patch create mode 100644 meta/recipes-devtools/opkg/opkg/opkg_archive.patch
meta/recipes-devtools/opkg/opkg/open_inner.patch new file +150 -0
@@ -0,0 +1,150 @@ +From [email protected] Wed Nov 20 22:35:02 2019 +Return-Path: <[email protected]> +X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dan.rpsys.net +X-Spam-Level: +X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, + HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, + SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 +Received: from mail-vs1-f54.google.com (mail-vs1-f54.google.com + [209.85.217.54]) by dan.rpsys.net (8.15.2/8.15.2/Debian-10) with ESMTPS id + xAKMZ0Lh008396 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 + verify=NOT) for <[email protected]>; Wed, 20 Nov 2019 22:35:02 GMT +Received: by mail-vs1-f54.google.com with SMTP id a143so842733vsd.9 + for <[email protected]>; Wed, 20 Nov 2019 14:35:02 -0800 (PST) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; + s=20161025; + h=x-original-authentication-results:x-gm-message-state:delivered-to + :from:to:cc:subject:date:message-id:in-reply-to:references + :mime-version:content-transfer-encoding; + bh=KhZ2BZSLg854tEjeyRybBtwjcbtPiM0dOPJA6ODniyc=; + b=gWeCNByEKyLw0dgzMAzHowAbjPywF8aHCjjjDOeFB/48Lr/e3A42S47HsxON9j+BoP + Ai2HT0MOqAIRWqz3tQM/1Q9mXOy0PNU2Dqpzu5u7QCZeoFX1XpXH0hbVn+JOdg3bcPwn + Nm+A/vS1By4S8c0EGQ+JQ6EBMc4xtpG8rOKiPuAtj5FlRVIQ1/AM8fEMrtQfFemBbIoO + KhGQVSmXg9CQKzPBoFR+IgiiKuUJjKBAcz7gzvQjJ6y/sCKUtk3FE8QUNeGqMGQXkD1/ + XEWZq2qLjkEezUbqW+ixeaWUlN7EqTn0YT+g5sO9tEL4xoUR3w9KwCkdwOvUlgEftbUB aPCA== +X-Original-Authentication-Results: mx.google.com; spf=pass + (google.com: domain of [email protected] + designates 148.163.156.75 as permitted sender) + smtp.mailfrom="[email protected]"; + dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ni.com +X-Gm-Message-State: + APjAAAWPWaQQBF8I9vWh3dmrrR3q+FLW/OiQFoIv220MYnIHfdNqqufD + I54SM2ZkAI8VGILL5cnno25yyFO4MmqyzLBlkBkUHPoMGpk1l8U6Gg== +X-Received: by 2002:a67:f649:: with SMTP id + u9mr3437665vso.20.1574289295541; Wed, 20 Nov 2019 14:34:55 -0800 (PST) +X-Forwarded-To: [email protected] +X-Forwarded-For: [email protected] [email protected] +Delivered-To: [email protected] +Received: by 2002:a67:ca9b:0:0:0:0:0 with SMTP id a27csp2232978vsl; + Wed, 20 Nov 2019 14:34:53 -0800 (PST) +X-Google-Smtp-Source: + APXvYqzu0124T/A2v8nyGwvi00K3wFZx5WfkgZyaqKf27zfmydLbudST3y3wGviqkEtUN4fkFdsl +X-Received: by 2002:a17:902:d901:: with SMTP id + c1mr5251580plz.93.1574289293448; Wed, 20 Nov 2019 14:34:53 -0800 (PST) +ARC-Seal: i=1; a=rsa-sha256; t=1574289293; cv=none; d=google.com; + s=arc-20160816; + b=wICD7meblSbVcD2gv1eC5y6GdeaaEHOHrP5D7it3PNtBwqNTqRmU1F8UJWdOdmsbKu + JSKc9assSlXVI9F7Bu+ZsczsEbA9MqWxKmgPLS5YHVTCMU3QRwTX1uLMtdeEUmCDo2+N + edCAO1bdrNbsM1Yhu/7nur8mBRrmcP/2uq4cgvfV03/1i1x3YiRiLmEj/WaU1V2oGzjL + F8lQpfIQIcIbX0dlq28GnJKntNSDe++OMLBwlhxY5FR+lCaXhf91kw/WndILbB99U0yf + 6FkzOxwcTbLLahDdHDgVmtk+grUVcz0N7HnRM5Wj8FqAmbtetw/NnWovsUMUlbQRvQm5 /xKA== +ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; + s=arc-20160816; + h=content-transfer-encoding:mime-version:references:in-reply-to + :message-id:date:subject:cc:to:from; + bh=KhZ2BZSLg854tEjeyRybBtwjcbtPiM0dOPJA6ODniyc=; + b=MIgWm3wUiLmTZuhjNXKsih84SdE0NfFoXpMJqshToFqGG8ElxCzyorlvK+0PGjN428 + O/vMXpqOqd1iR6IZ9/wEb3JsHOrOxNWFwA1MVp/QkSKQwhjvRNl62i5C7fl7idVwuUl/ + 7EZJZ4ZYTXEGUv+wIUuij+MAffGrqQDg0Ubd9ccVymjPA6nDLryHEbWrUepJVnKPd3nQ + iJxxkYgBP8QP3Aq/a3QNxqxXdMilrGeMljx0wpWwKqkBEvC913vISPJZ0nLbxglYzebM + K3B2Ksf4Ct7C/dXPAUjkt5mtLDYT6mZ7v8oFesgsbxvIHlKe6CCry0a5wYUqaSvfElfY V6kA== +ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: + domain of [email protected] designates + 148.163.156.75 as permitted sender) + smtp.mailfrom="[email protected]"; dmarc=pass + (p=NONE sp=NONE dis=NONE) header.from=ni.com +Received: from mx0b-00010702.pphosted.com (mx0a-00010702.pphosted.com. + [148.163.156.75]) by mx.google.com with ESMTPS id + 4si680517plb.245.2019.11.20.14.34.53 for + <[email protected]> (version=TLS1_2 + cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Nov 2019 14:34:53 + -0800 (PST) +Received-SPF: pass (google.com: domain of + [email protected] designates 148.163.156.75 as + permitted sender) client-ip=148.163.156.75; +Authentication-Results: mx.google.com; spf=pass (google.com: domain of + [email protected] designates 148.163.156.75 as + permitted sender) + smtp.mailfrom="[email protected]"; dmarc=pass + (p=NONE sp=NONE dis=NONE) header.from=ni.com +Received: from pps.filterd (m0098781.ppops.net [127.0.0.1]) by + mx0a-00010702.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id + xAKMRxBj018942; Wed, 20 Nov 2019 16:34:52 -0600 +Received: from ni.com (skprod3.natinst.com [130.164.80.24]) + by mx0a-00010702.pphosted.com with ESMTP id 2wae13ps20-1 + (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); + Wed, 20 Nov 2019 16:34:52 -0600 +Received: from us-aus-exch2.ni.corp.natinst.com + (us-aus-exch2.ni.corp.natinst.com [130.164.68.12]) by + us-aus-skprod3.natinst.com (8.16.0.27/8.16.0.27) with ESMTPS id + xAKMYpHv003993 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 + verify=NOT); Wed, 20 Nov 2019 16:34:51 -0600 +Received: from us-aus-exhub1.ni.corp.natinst.com (130.164.68.41) by + us-aus-exch2.ni.corp.natinst.com (130.164.68.12) with Microsoft SMTP Server + (TLS) id 15.0.1395.4; Wed, 20 Nov 2019 16:34:51 -0600 +Received: from delcastillo3.natinst.com (172.18.68.32) by + us-aus-exhub1.ni.corp.natinst.com (130.164.68.41) with Microsoft SMTP + Server id 15.0.1395.4 via Frontend Transport; Wed, 20 Nov 2019 16:34:51 + -0600 +From: Alejandro del Castillo <[email protected]> +To: <[email protected]>, <[email protected]> +CC: Alejandro del Castillo <[email protected]> +Subject: [opkg][PATCH 2/2] open_inner: add support for empty payloads +Date: Wed, 20 Nov 2019 16:34:48 -0600 +Message-ID: <[email protected]> +X-Mailer: git-send-email 2.22.0 +In-Reply-To: <[email protected]> +References: <[email protected]> +MIME-Version: 1.0 +Content-Type: text/plain +X-Proofpoint-Virus-Version: vendor=fsecure + engine=2.50.10434:6.0.95,18.0.572 + definitions=2019-11-20_07:2019-11-20,2019-11-20 signatures=0 +X-Proofpoint-Spam-Reason: safe +X-Virus-Scanned: clamav-milter 0.101.4 at dan +X-Virus-Status: Clean +X-Evolution-Source: 1525863794.3857.16@hex +Content-Transfer-Encoding: 8bit + +Support for empty compressed payloads need to be explicitly enabled on +libarchive. + +Signed-off-by: Alejandro del Castillo <[email protected]> + +Upstream-Status: Backport +--- + libopkg/opkg_archive.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/libopkg/opkg_archive.c b/libopkg/opkg_archive.c +index 0e9ccea..f19cece 100644 +--- a/libopkg/opkg_archive.c ++++ b/libopkg/opkg_archive.c +@@ -618,6 +618,13 @@ static struct archive *open_inner(struct archive *outer) + goto err_cleanup; + } + ++ r = archive_read_support_format_empty(inner); ++ if (r != ARCHIVE_OK) { ++ opkg_msg(ERROR, "Empty format not supported: %s\n", ++ archive_error_string(inner)); ++ goto err_cleanup; ++ } ++ + r = archive_read_open(inner, data, NULL, inner_read, inner_close); + if (r != ARCHIVE_OK) { + opkg_msg(ERROR, "Failed to open inner archive: %s\n", +-- +2.22.0 + +
meta/recipes-devtools/opkg/opkg/opkg_archive.patch new file +160 -0
160 lines not on this page · raw message
meta/recipes-devtools/opkg/opkg_0.4.1.bb +2 -0
@@ -14,6 +14,8 @@ PE = "1" SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \ file://opkg.conf \ file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \ + file://opkg_archive.patch \ + file://open_inner.patch \ file://run-ptest \ "
Signature · 1 line
2.20.1
PATCH 2/3 opkg-utils: Fix silent empty/broken opkg package creation
--- .../opkg-utils/opkg-utils/pipefail.patch | 31 +++++++++++++++++++ .../opkg-utils/opkg-utils_0.4.1.bb | 1 + 2 files changed, 32 insertions(+) create mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/pipefail.patch
meta/recipes-devtools/opkg-utils/opkg-utils/pipefail.patch new file +31 -0
@@ -0,0 +1,31 @@ +We need opkg-build to fail if for example the tar command is passed invalid +options. Without this, we see silently created empty packaged where data.tar +is zero bytes in size. This creates hard to debug problems. + +An example is when reproducible builds are enabled and run on old hosts like +centos7 which has tar < 1.28: + +Subprocess output:tar: unrecognized option '--clamp-mtime' +Try `tar --help' or `tar --usage' for more information. + +Upstream-Status: Pending +Signed-off-by: Richard Purdie <[email protected]> + +Index: opkg-utils-0.4.1/opkg-build +=================================================================== +--- opkg-utils-0.4.1.orig/opkg-build ++++ opkg-utils-0.4.1/opkg-build +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + + : <<=cut + =head1 NAME +@@ -12,6 +12,7 @@ opkg-build - construct an .opk from a di + # Updated to work on Familiar Pre0.7rc1, with busybox tar. + # Note it Requires: binutils-ar (since the busybox ar can't create) + set -e ++set -o pipefail + + version=1.0 +
meta/recipes-devtools/opkg-utils/opkg-utils_0.4.1.bb +1 -0
@@ -10,6 +10,7 @@ PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtu SRC_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/${BPN}/snapshot/${BPN}-${PV}.tar.gz \ file://0001-Switch-all-scripts-to-use-Python-3.x.patch \ file://0001-opkg-build-clamp-mtimes-to-SOURCE_DATE_EPOCH.patch \ + file://pipefail.patch \ " UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/"
Signature · 1 line
2.20.1
PATCH 3/3 sanity: Add check for tar older than 1.28
In reply to Richard PurdieOlder versions break opkg-build when reproducible builds are enabled. Rather than trying to be selective based on which features are enabled, lets just make this a minimum version.
--- meta/classes/sanity.bbclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
meta/classes/sanity.bbclass +4 -1
@@ -523,6 +523,7 @@ def check_wsl(d): # Tar version 1.24 and onwards handle overwriting symlinks correctly # but earlier versions do not; this needs to work properly for sstate +# Version 1.28 is needed so opkg-build works correctly when reproducibile builds are enabled def check_tar_version(sanity_data): from distutils.version import LooseVersion import subprocess
@@ -532,7 +533,9 @@ def check_tar_version(sanity_data): return "Unable to execute tar --version, exit code %d\n%s\n" % (e.returncode, e.output) version = result.split()[3] if LooseVersion(version) < LooseVersion("1.24"): - return "Your version of tar is older than 1.24 and has bugs which will break builds. Please install a newer version of tar.\n" + return "Your version of tar is older than 1.24 and has bugs which will break builds. Please install a newer version of tar (1.28+).\n" + if LooseVersion(version) < LooseVersion("1.28"): + return "Your version of tar is older than 1.28 and does not have the support needed to enable reproducible builds. Please install a newer version of tar.\n" return None # We use git parameters and functionality only found in 1.7.8 or later
Signature · 1 line
2.20.1
Re: [PATCH 3/3] sanity: Add check for tar older than 1.28
meta/classes/sanity.bbclass def check_tar_version(sanity_data): · line 538
Quoted 7 lines · Richard Purdie
Older versions break opkg-build when reproducible builds are enabled. Rather than trying to be selective based on which features are enabled, lets just make this a minimum version.
...meta/classes/sanity.bbclass +2
-0+ if LooseVersion(version) < LooseVersion("1.28"): + return "Your version of tar is older than 1.28 and does not have the support needed to enable reproducible builds. Please install a newer version of tar.\n"
How does "Please install a newer version of tar" work in practice on a supported host distribution like CentOS 7 ?
As user I would expect such things to just work when using a distribution that is documented as supported.
cu
Adrian
Re: [PATCH 3/3] sanity: Add check for tar older than 1.28
Quoted 13 lines · Adrian Bunk
Quoted 11 lines · Richard Purdie
Older versions break opkg-build when reproducible builds are enabled.
Rather than trying to be selective based on which features are enabled,
lets just make this a minimum version.
...(quoted diff) +2
-0+ if LooseVersion(version) < LooseVersion("1.28"): + return "Your version of tar is older than 1.28 and doesnot have the support needed to enable reproducible builds. Please install a newer version of tar.\n"
...
Quoted 5 lines
How does "Please install a newer version of tar" work in practice on a supported host distribution like CentOS 7 ?
As user I would expect such things to just work when using a distribution that is documented as supported.
We're going to have to solve this issue on our autobuilder. Centos7 already causes problems and there is documetation in the manual about it:
https://www.yoctoproject.org/docs/3.0/ref-manual/ref-manual.html#centos-packages
(and the need to use EPEL)
Unfortunately a newer tar isn't in EPEL.
I don't have a solution yet, I do know that silently creating empty packages is much worst than telling a user something won't work though.
Any suggestions on how we fix it?
(We could make opkg-utils-native depend on tar-native but for most people that isn't necessary so it seems a shame).
Cheers,
Richard
Re: [PATCH 3/3] sanity: Add check for tar older than 1.28
Quoted 8 lines · Richard Purdie
Unfortunately a newer tar isn't in EPEL.
I don't have a solution yet, I do know that silently creating empty packages is much worst than telling a user something won't work though.
Any suggestions on how we fix it?
Centos 8 is now out, and it does have 1.30 version of tar, so maybe we
should retire centos 7 from the autobuilder and update the list of supported distros?
Alex
Re: [PATCH 3/3] sanity: Add check for tar older than 1.28
In reply to Richard PurdieQuoted 24 lines · Richard Purdie
Quoted 13 lines · Adrian Bunk
Quoted 11 lines · Richard Purdie
Older versions break opkg-build when reproducible builds are enabled.
Rather than trying to be selective based on which features are enabled,
lets just make this a minimum version.
...(quoted diff) +2
-0+ if LooseVersion(version) < LooseVersion("1.28"): + return "Your version of tar is older than 1.28 and doesnot have the support needed to enable reproducible builds. Please install a newer version of tar.\n"
...Quoted 5 lines
How does "Please install a newer version of tar" work in practice on a supported host distribution like CentOS 7 ?
As user I would expect such things to just work when using a distribution that is documented as supported.
We're going to have to solve this issue on our autobuilder. Centos7 already causes problems and there is documetation in the manual about it:
Quoted 5 lines
https://www.yoctoproject.org/docs/3.0/ref-manual/ref-manual.html#centos-packages
(and the need to use EPEL)
Unfortunately a newer tar isn't in EPEL.
EPEL does not contain more recent versions of packages already in RHEL/CentOS.
Quoted 4 lines
I don't have a solution yet, I do know that silently creating empty packages is much worst than telling a user something won't work though.
Any suggestions on how we fix it?
My preferred solution would be to replace CentOS 7 with CentOS 8 as supported distribution, which would also allow to drop hacks for two major releases of gcc in various places.
If all other supported distribution already ship 1.28 this would solve your problem.
Quoted 2 lines
(We could make opkg-utils-native depend on tar-native but for most people that isn't necessary so it seems a shame).
Building tar-native is not something that would strike me as problematic.
Add a comment why it was added, and that it can be removed again whenever the oldest supported distribution is recent enough.
Quoted 3 lines
Cheers,
Richard
cu
Adrian
Re: [PATCH 3/3] sanity: Add check for tar older than 1.28
Quoted 28 lines · Adrian Bunk
Quoted 27 lines · Richard Purdie
Quoted 15 lines · Adrian Bunk
Quoted 8 lines · Richard Purdie
Older versions break opkg-build when reproducible builds are enabled.
Rather than trying to be selective based on which features are enabled,
lets just make this a minimum version.
...(quoted diff) +2
-0+ if LooseVersion(version) < LooseVersion("1.28"): + return "Your version of tar is older than 1.28 andQuoted 5 lines
does
not have the support needed to enable reproducible builds. Please
install a newer version of tar.\n"
...Quoted 5 lines
How does "Please install a newer version of tar" work in practice on a supported host distribution like CentOS 7 ?
As user I would expect such things to just work when using a distribution that is documented as supported.
We're going to have to solve this issue on our autobuilder. Centos7 already causes problems and there is documetation in the manual about
it:
Quoted 8 lines
Quoted 5 lines
https://www.yoctoproject.org/docs/3.0/ref-manual/ref-manual.html#centos-packages
(and the need to use EPEL)
Unfortunately a newer tar isn't in EPEL.
EPEL does not contain more recent versions of packages already in RHEL/CentOS.
Sorry, I had thought Centos7 had python3 already and we needed EPEL to obtain python 3.6.
Quoted 10 lines
Quoted 6 lines
I don't have a solution yet, I do know that silently creating empty packages is much worst than telling a user something won't work though.
Any suggestions on how we fix it?
My preferred solution would be to replace CentOS 7 with CentOS 8 as supported distribution, which would also allow to drop hacks for two major releases of gcc in various places.
We are working towards that, equally the older version support is useful to a significant portion of our userbase so its a balancing act.
Quoted 2 lines
If all other supported distribution already ship 1.28 this would solve your problem.
I believe that is now the case, yes.
Quoted 5 lines
Quoted 2 lines
(We could make opkg-utils-native depend on tar-native but for most people that isn't necessary so it seems a shame).
Building tar-native is not something that would strike me as problematic.
Its an extra build dependency and extra build time, just complicates things. "tar-native" is in ASSUME_PROVIDED and gives bootstrap issues although we have the "tar-replacement-native" mechanism to account for this already. So possible but not entirely straightforward.
Cheers,
Richard
Re: [PATCH 3/3] sanity: Add check for tar older than 1.28
Quoted 46 lines · Richard Purdie
Quoted 28 lines · Adrian Bunk
Quoted 27 lines · Richard Purdie
Quoted 15 lines · Adrian Bunk
Quoted 8 lines · Richard Purdie
Older versions break opkg-build when reproducible builds are enabled.
Rather than trying to be selective based on which features are enabled,
lets just make this a minimum version.
...(quoted diff) +2
-0+ if LooseVersion(version) < LooseVersion("1.28"): + return "Your version of tar is older than 1.28 andQuoted 5 lines
does
not have the support needed to enable reproducible builds. Please
install a newer version of tar.\n"
...Quoted 5 lines
How does "Please install a newer version of tar" work in practice on a supported host distribution like CentOS 7 ?
As user I would expect such things to just work when using a distribution that is documented as supported.
We're going to have to solve this issue on our autobuilder. Centos7 already causes problems and there is documetation in the manual about
it:Quoted 8 lines
Quoted 5 lines
https://www.yoctoproject.org/docs/3.0/ref-manual/ref-manual.html#centos-packages
(and the need to use EPEL)
Unfortunately a newer tar isn't in EPEL.
EPEL does not contain more recent versions of packages already in RHEL/CentOS.
Sorry, I had thought Centos7 had python3 already and we needed EPEL to obtain python 3.6.
Quoted 5 lines
Quoted 5 lines
I don't have a solution yet, I do know that silently creating empty packages is much worst than telling a user something won't work though.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Any suggestions on how we fix it?
My preferred solution would be to replace CentOS 7 with CentOS 8 as supported distribution, which would also allow to drop hacks for two major releases of gcc in various places.
We are working towards that, equally the older version support is useful to a significant portion of our userbase so its a balancing act.
RHEL 7 is still heavily used. But if we can provide a buildtools-tarball that includes a new enough tar, that should be able to workaround the issue.
Quoted 8 lines
Quoted 2 lines
If all other supported distribution already ship 1.28 this would solve your problem.
I believe that is now the case, yes.
Quoted 3 lines
Quoted 2 lines
(We could make opkg-utils-native depend on tar-native but for most people that isn't necessary so it seems a shame).
Quoted 7 lines
Quoted 2 lines
Building tar-native is not something that would strike me as problematic.
Its an extra build dependency and extra build time, just complicates things. "tar-native" is in
ASSUME_PROVIDEDand gives bootstrap issues although we have the "tar-replacement-native" mechanism to account for this already. So possible but not entirely straightforward.
Requiring a newer version, and suggesting to the user to use a buildtools-tarball (SDK) I think is a reasonable compromise.
Quoted 4 lines
Cheers,
Richard
Re: [PATCH 3/3] sanity: Add check for tar older than 1.28
Quoted 9 lines · Mark Hatle
Quoted 8 lines · Richard Purdie
Quoted 6 lines · Adrian Bunk
Quoted 1 line · Richard Purdie
Any suggestions on how we fix it?
My preferred solution would be to replace CentOS 7 with CentOS 8 as supported distribution, which would also allow to drop hacks for two major releases of gcc in various places.
Quoted 7 lines
Quoted 3 lines
We are working towards that, equally the older version support is useful to a significant portion of our userbase so its a balancing act.
RHEL 7 is still heavily used. But if we can provide a buildtools- tarball that includes a new enough tar, that should be able to workaround the issue.
After some discussion, this is the direction we've gone. Debian 8 also has the issue. On the autobuilder we've installed buildtools-tarball on that and the Centos7 workers.
Quoted 12 lines
Quoted 12 lines
Quoted 2 lines
If all other supported distribution already ship 1.28 this would solve your problem.
I believe that is now the case, yes.
Quoted 6 lines
Quoted 3 lines
(We could make opkg-utils-native depend on tar-native but for most
people that isn't necessary so it seems a shame).Building tar-native is not something that would strike me as problematic.
Quoted 7 lines
Quoted 7 lines
Its an extra build dependency and extra build time, just complicates
things. "tar-native" is inASSUME_PROVIDEDand gives bootstrap issues
although we have the "tar-replacement-native" mechanism to account for
this already. So possible but not entirely straightforward.
For fun I tried this. It exploded in circular dependency problems :(.
Quoted 2 lines
Requiring a newer version, and suggesting to the user to use a buildtools-tarball (SDK) I think is a reasonable compromise.
Agreed, we reached the same conclusion. I'll tweak the patch to improve the error message to the user.
Cheers,
Richard
Quoted 136 lines · Richard Purdie
Signed-off-by Richard Purdie <[email protected]>--- .../opkg/opkg/open_inner.patch | 150 ++++++++++++++++ .../opkg/opkg/opkg_archive.patch | 160 ++++++++++++++++++ meta/recipes-devtools/opkg/opkg_0.4.1.bb | 2 + 3 files changed, 312 insertions(+) create mode 100644 meta/recipes-devtools/opkg/opkg/open_inner.patch create mode 100644 meta/recipes-devtools/opkg/opkg/opkg_archive.patchmeta/recipes-devtools/opkg/opkg/open_inner.patch new file +7
-0@@ -0,0 +1,150 @@ +From [email protected] Wed Nov 20 22:35:02 2019 +Return-Path: <[email protected]> +X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dan.rpsys.net +X-Spam-Level: +X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, + HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, + SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=noversion=3.4.2
+Received: from mail-vs1-f54.google.com (mail-vs1-f54.google.com
+ [209.85.217.54]) by dan.rpsys.net (8.15.2/8.15.2/Debian-10) with ESMTPS id
+ xAKMZ0Lh008396 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128
+ verify=NOT) for <[email protected]>; Wed, 20 Nov 2019 22:35:02 GMTmeta/recipes-devtools/opkg/opkg/open_inner.patch new file +3
-0+Received: by mail-vs1-f54.google.com with SMTP id a143so842733vsd.9 + for <[email protected]>; Wed, 20 Nov 2019 14:35:02 -0800 (PST) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net;
+ s=20161025;
+ h=x-original-authentication-results:x-gm-message-state:delivered-to
+ :from:to:cc:subject:date:message-id:in-reply-to:references
+ :mime-version:content-transfer-encoding;
+ bh=KhZ2BZSLg854tEjeyRybBtwjcbtPiM0dOPJA6ODniyc=;
+ b=gWeCNByEKyLw0dgzMAzHowAbjPywF8aHCjjjDOeFB/48Lr/e3A42S47HsxON9j+BoP
+ Ai2HT0MOqAIRWqz3tQM/1Q9mXOy0PNU2Dqpzu5u7QCZeoFX1XpXH0hbVn+JOdg3bcPwn
+ Nm+A/vS1By4S8c0EGQ+JQ6EBMc4xtpG8rOKiPuAtj5FlRVIQ1/AM8fEMrtQfFemBbIoO
+ KhGQVSmXg9CQKzPBoFR+IgiiKuUJjKBAcz7gzvQjJ6y/sCKUtk3FE8QUNeGqMGQXkD1/
+ XEWZq2qLjkEezUbqW+ixeaWUlN7EqTn0YT+g5sO9tEL4xoUR3w9KwCkdwOvUlgEftbUB aPCA==meta/recipes-devtools/opkg/opkg/open_inner.patch new file +17
-0+X-Original-Authentication-Results: mx.google.com; spf=pass + (google.com: domain of [email protected] + designates 148.163.156.75 as permitted sender) + smtp.mailfrom="[email protected]"; + dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ni.com +X-Gm-Message-State: + APjAAAWPWaQQBF8I9vWh3dmrrR3q+FLW/OiQFoIv220MYnIHfdNqqufD + I54SM2ZkAI8VGILL5cnno25yyFO4MmqyzLBlkBkUHPoMGpk1l8U6Gg== +X-Received: by 2002:a67:f649:: with SMTP id + u9mr3437665vso.20.1574289295541; Wed, 20 Nov 2019 14:34:55 -0800 (PST) +X-Forwarded-To: [email protected] +X-Forwarded-For: [email protected] [email protected] +Delivered-To: [email protected] +Received: by 2002:a67:ca9b:0:0:0:0:0 with SMTP id a27csp2232978vsl; + Wed, 20 Nov 2019 14:34:53 -0800 (PST) +X-Google-Smtp-Source: +APXvYqzu0124T/A2v8nyGwvi00K3wFZx5WfkgZyaqKf27zfmydLbudST3y3wGviqkEtUN4fkFdsl
meta/recipes-devtools/opkg/opkg/open_inner.patch new file +9
-0+X-Received: by 2002:a17:902:d901:: with SMTP id + c1mr5251580plz.93.1574289293448; Wed, 20 Nov 2019 14:34:53 -0800 (PST) +ARC-Seal: i=1; a=rsa-sha256; t=1574289293; cv=none; d=google.com; + s=arc-20160816; + b=wICD7meblSbVcD2gv1eC5y6GdeaaEHOHrP5D7it3PNtBwqNTqRmU1F8UJWdOdmsbKu + JSKc9assSlXVI9F7Bu+ZsczsEbA9MqWxKmgPLS5YHVTCMU3QRwTX1uLMtdeEUmCDo2+N + edCAO1bdrNbsM1Yhu/7nur8mBRrmcP/2uq4cgvfV03/1i1x3YiRiLmEj/WaU1V2oGzjL + F8lQpfIQIcIbX0dlq28GnJKntNSDe++OMLBwlhxY5FR+lCaXhf91kw/WndILbB99U0yf + 6FkzOxwcTbLLahDdHDgVmtk+grUVcz0N7HnRM5Wj8FqAmbtetw/NnWovsUMUlbQRvQm5/xKA==
+ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com ;
+ s=arc-20160816;
+ h=content-transfer-encoding:mime-version:references:in-reply-to
+ :message-id:date:subject:cc:to:from;
+ bh=KhZ2BZSLg854tEjeyRybBtwjcbtPiM0dOPJA6ODniyc=;
+ b=MIgWm3wUiLmTZuhjNXKsih84SdE0NfFoXpMJqshToFqGG8ElxCzyorlvK+0PGjN428
+ O/vMXpqOqd1iR6IZ9/wEb3JsHOrOxNWFwA1MVp/QkSKQwhjvRNl62i5C7fl7idVwuUl/
+ 7EZJZ4ZYTXEGUv+wIUuij+MAffGrqQDg0Ubd9ccVymjPA6nDLryHEbWrUepJVnKPd3nQ
+ iJxxkYgBP8QP3Aq/a3QNxqxXdMilrGeMljx0wpWwKqkBEvC913vISPJZ0nLbxglYzebM
+ K3B2Ksf4Ct7C/dXPAUjkt5mtLDYT6mZ7v8oFesgsbxvIHlKe6CCry0a5wYUqaSvfElfY V6kA==meta/recipes-devtools/opkg/opkg/open_inner.patch new file +10
-0+ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: + domain of [email protected] designates + 148.163.156.75 as permitted sender) + smtp.mailfrom="[email protected]"; dmarc=pass + (p=NONE sp=NONE dis=NONE) header.from=ni.com +Received: from mx0b-00010702.pphosted.com (mx0a-00010702.pphosted.com. + [148.163.156.75]) by mx.google.com with ESMTPS id + 4si680517plb.245.2019.11.20.14.34.53 for + <[email protected]> (version=TLS1_2 + cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Nov 201914:34:53
+ -0800 (PST)
+Received-SPF: pass (google.com: domain of
+ [email protected] designates 148.163.156.75 as
+ permitted sender) client-ip=148.163.156.75; +Authentication-Results: mx.google.com; spf=pass (google.com: domain of
+ [email protected] designates 148.163.156.75 as
+ permitted sender)
+ smtp.mailfrom="[email protected]"; dmarc=pass
+ (p=NONE sp=NONE dis=NONE) header.from=ni.commeta/recipes-devtools/opkg/opkg/open_inner.patch new file +6
-0+Received: from pps.filterd (m0098781.ppops.net [127.0.0.1]) by + mx0a-00010702.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id + xAKMRxBj018942; Wed, 20 Nov 2019 16:34:52 -0600 +Received: from ni.com (skprod3.natinst.com [130.164.80.24]) + by mx0a-00010702.pphosted.com with ESMTP id 2wae13ps20-1 + (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256verify=NOT);
meta/recipes-devtools/opkg/opkg/open_inner.patch new file +8
-0+ Wed, 20 Nov 2019 16:34:52 -0600 +Received: from us-aus-exch2.ni.corp.natinst.com + (us-aus-exch2.ni.corp.natinst.com [130.164.68.12]) by + us-aus-skprod3.natinst.com (8.16.0.27/8.16.0.27) with ESMTPS id + xAKMYpHv003993 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 + verify=NOT); Wed, 20 Nov 2019 16:34:51 -0600 +Received: from us-aus-exhub1.ni.corp.natinst.com (130.164.68.41) by + us-aus-exch2.ni.corp.natinst.com (130.164.68.12) with Microsoft SMTPServer
+ (TLS) id 15.0.1395.4; Wed, 20 Nov 2019 16:34:51 -0600meta/recipes-devtools/opkg/opkg/open_inner.patch new file +13
-0+Received: from delcastillo3.natinst.com (172.18.68.32) by + us-aus-exhub1.ni.corp.natinst.com (130.164.68.41) with Microsoft SMTP + Server id 15.0.1395.4 via Frontend Transport; Wed, 20 Nov 2019 16:34:51 + -0600 +From: Alejandro del Castillo <[email protected]> +To: <[email protected]>, <[email protected]> +CC: Alejandro del Castillo <[email protected]> +Subject: [opkg][PATCH 2/2] open_inner: add support for empty payloads +Date: Wed, 20 Nov 2019 16:34:48 -0600 +Message-ID: <[email protected]> +X-Mailer: git-send-email 2.22.0 +In-Reply-To: <[email protected]> +References: <[email protected]>
meta/recipes-devtools/opkg/opkg/open_inner.patch line 117
Quoted 10 lines
meta/recipes-devtools/opkg/opkg/open_inner.patch new file +10
-0+MIME-Version: 1.0 +Content-Type: text/plain +X-Proofpoint-Virus-Version: vendor=fsecure + engine=2.50.10434:6.0.95,18.0.572 + definitions=2019-11-20_07:2019-11-20,2019-11-20 signatures=0 +X-Proofpoint-Spam-Reason: safe +X-Virus-Scanned: clamav-milter 0.101.4 at dan +X-Virus-Status: Clean +X-Evolution-Source: 1525863794.3857.16@hex +Content-Transfer-Encoding: 8bit
Perhaps this raw mail header can be removed it seems to add no value moreover is distracting
Quoted 242 lines
meta/recipes-devtools/opkg/opkg/open_inner.patch new file +16
-0+ +Support for empty compressed payloads need to be explicitly enabled on +libarchive. + +Signed-off-by: Alejandro del Castillo <[email protected]> + +Upstream-Status: Backport +--- + libopkg/opkg_archive.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/libopkg/opkg_archive.c b/libopkg/opkg_archive.c +index 0e9ccea..f19cece 100644 +--- a/libopkg/opkg_archive.c ++++ b/libopkg/opkg_archive.c +@@ -618,6 +618,13 @@ static struct archive *open_inner(struct archive*outer)
meta/recipes-devtools/opkg/opkg/open_inner.patch new file +17
-0+ goto err_cleanup; + } + ++ r = archive_read_support_format_empty(inner); ++ if (r != ARCHIVE_OK) { ++ opkg_msg(ERROR, "Empty format not supported: %s\n", ++ archive_error_string(inner)); ++ goto err_cleanup; ++ } ++ + r = archive_read_open(inner, data, NULL, inner_read, inner_close); + if (r != ARCHIVE_OK) { + opkg_msg(ERROR, "Failed to open inner archive: %s\n", +-- +2.22.0 + +meta/recipes-devtools/opkg/opkg/opkg_archive.patch new file +7
-0@@ -0,0 +1,160 @@ +From [email protected] Wed Nov 20 22:35:01 2019 +Return-Path: <[email protected]> +X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dan.rpsys.net +X-Spam-Level: +X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, + HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, + SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=noversion=3.4.2
+Received: from mail-ua1-f41.google.com (mail-ua1-f41.google.com
+ [209.85.222.41]) by dan.rpsys.net (8.15.2/8.15.2/Debian-10) with ESMTPS id
+ xAKMZ0gk008395 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128
+ verify=NOT) for <[email protected]>; Wed, 20 Nov 2019 22:35:01 GMTmeta/recipes-devtools/opkg/opkg/opkg_archive.patch new file +3
-0+Received: by mail-ua1-f41.google.com with SMTP id p18so339793uar.7 + for <[email protected]>; Wed, 20 Nov 2019 14:35:01 -0800 (PST) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net;
+ s=20161025;
+ h=x-original-authentication-results:x-gm-message-state:delivered-to
+ :from:to:cc:subject:date:message-id:in-reply-to:references
+ :mime-version:content-transfer-encoding;
+ bh=Y9OOjY7NCD3Wm+XzvK+9TzmDhgbtPVQl7aMAusdzDho=;
+ b=XjoAkiz0bsIvromNySMA4g4jfIJopfXAr8WYyCO5/I74DxBvUelc2e/2DyZYt5VYuW
+ NaMD9rSCOk9gn+ld+INdJmH3ceuPGZm1Y4kgLVCTL7IknlPWjuJtWL599/8lrn4uhVWD
+ cOwFsyu09EPjYvGzwjqxqf8Wca+HgymmDV/vor92kqu2trl8CsWC835pFG0a8/B4rAYH
+ hOMhvqeU+UrkMe5iyIzB4L6nBX3Gwwgt8EI+W2mgWh6W8HwLfdrv9IOKWj00V98xU9Nn
+ gUEGsCeQa1/bo5qYY1Z/w/lotR0vVJu6B+w/V/d/cniuciVnsEyfEQmBjebT8746mzz+ dTnw==meta/recipes-devtools/opkg/opkg/opkg_archive.patch new file +17
-0+X-Original-Authentication-Results: mx.google.com; spf=pass + (google.com: domain of [email protected] + designates 148.163.156.75 as permitted sender) + smtp.mailfrom="[email protected]"; + dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ni.com +X-Gm-Message-State: + APjAAAX1zcx9B1j4E7KLRgNh2OtNUmWztKYgWCXumfNL62Clsc75k1g+ + 8eUvzPiRBh6riiNx3HKjZJOp30ExyEMZgztnyB9JpBxhwfzt2ttNog== +X-Received: by 2002:ab0:2618:: with SMTP id + c24mr3345925uao.75.1574289294734; Wed, 20 Nov 2019 14:34:54 -0800 (PST) +X-Forwarded-To: [email protected] +X-Forwarded-For: [email protected] [email protected] +Delivered-To: [email protected] +Received: by 2002:a67:ca9b:0:0:0:0:0 with SMTP id a27csp2232973vsl; + Wed, 20 Nov 2019 14:34:53 -0800 (PST) +X-Google-Smtp-Source: +APXvYqyxMeKT9TRfjbvSZeBERtCkHKj+Y0dywybZSRWjh2KpKGAS3ujTon8MetFDJPz/XaV9C4CN
meta/recipes-devtools/opkg/opkg/opkg_archive.patch new file +9
-0+X-Received: by 2002:a17:902:8bc9:: with SMTP id + r9mr4994639plo.319.1574289293016; Wed, 20 Nov 2019 14:34:53 -0800 (PST) +ARC-Seal: i=1; a=rsa-sha256; t=1574289293; cv=none; d=google.com; + s=arc-20160816; + b=04u3YSzfPN0+WkK0LLFKW07PbOQyk5T2b4rCKit5CG/Ec1pY+E6UTqRdu/fbhIJ2Xo + qmpdqhcieKhtvY5kx+S28NLXszEPZcAIjNnXepU1qvTZXnCkNfXyJFSPGLDmLTGLEdUB + TktdoM4IjNjOx4qwRnqdTdLV66cWGB7ojNTAih6qYb0t+2fgv70uiElgjxiTfhNTke22 + GaSyUo4vnzAekGOVPJwLqqS7gkElQro7NM2rlW2J3UEWyrMy0Gj4BuVFszxzAu8mazqT + XtrsWLuzSGRjYA2EtNj8+62lABsaWuxPy5x/9VX8bblNZIu2GqaHC/AO0nQkDqf8cX9qTmiA==
+ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com ;
+ s=arc-20160816;
+ h=content-transfer-encoding:mime-version:references:in-reply-to
+ :message-id:date:subject:cc:to:from;
+ bh=Y9OOjY7NCD3Wm+XzvK+9TzmDhgbtPVQl7aMAusdzDho=;
+ b=mRussZx0Qx8Lxch1ZO1ZDWs4BKZNLsgzwIdr1z6rVp7/cI+CPBebzvrEPoqBji+ta6
+ m1gpgsPum3Vg3JHHvFCNz/Pon4ygv4KIVSphBcgjti+2qnoRn48H4YvCirHZ4mDR6h3u
+ rhl6Ojls0KI0YIiidpTRphIbS0vpBbkI/PUGkfVJzxQaEYuJa4TIQq2bmsrCImVwuBZs
+ t2ktebY1vt+ZBKPVq43CsAiMl1Srr/50sBhOk5NFkiaBVDJQzIj1kI7bnU3zktBaGdOK
+ 1jDpOoOnBV3SVe2M8eb38+Ge8AdL4jdMVGbdXfzXUWvF1eNgZRmkQVe1mRw4SwBnPsgs f64g==meta/recipes-devtools/opkg/opkg/opkg_archive.patch new file +10
-0+ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: + domain of [email protected] designates + 148.163.156.75 as permitted sender) + smtp.mailfrom="[email protected]"; dmarc=pass + (p=NONE sp=NONE dis=NONE) header.from=ni.com +Received: from mx0b-00010702.pphosted.com (mx0a-00010702.pphosted.com. + [148.163.156.75]) by mx.google.com with ESMTPS id + 21si715567pgq.469.2019.11.20.14.34.52 for + <[email protected]> (version=TLS1_2 + cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Nov 201914:34:53
+ -0800 (PST)
+Received-SPF: pass (google.com: domain of
+ [email protected] designates 148.163.156.75 as
+ permitted sender) client-ip=148.163.156.75; +Authentication-Results: mx.google.com; spf=pass (google.com: domain of
+ [email protected] designates 148.163.156.75 as
+ permitted sender)
+ smtp.mailfrom="[email protected]"; dmarc=pass
+ (p=NONE sp=NONE dis=NONE) header.from=ni.commeta/recipes-devtools/opkg/opkg/opkg_archive.patch new file +6
-0+Received: from pps.filterd (m0098780.ppops.net [127.0.0.1]) by + mx0a-00010702.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id + xAKMSIJ5016740; Wed, 20 Nov 2019 16:34:52 -0600 +Received: from ni.com (skprod3.natinst.com [130.164.80.24]) + by mx0a-00010702.pphosted.com with ESMTP id 2wafh16muy-1 + (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256verify=NOT);
meta/recipes-devtools/opkg/opkg/opkg_archive.patch new file +8
-0+ Wed, 20 Nov 2019 16:34:52 -0600 +Received: from us-aus-exch2.ni.corp.natinst.com + (us-aus-exch2.ni.corp.natinst.com [130.164.68.12]) by + us-aus-skprod3.natinst.com (8.16.0.27/8.16.0.27) with ESMTPS id + xAKMYpHw003993 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 + verify=NOT); Wed, 20 Nov 2019 16:34:51 -0600 +Received: from us-aus-exch5.ni.corp.natinst.com (130.164.68.15) by + us-aus-exch2.ni.corp.natinst.com (130.164.68.12) with Microsoft SMTPServer
+ (TLS) id 15.0.1395.4; Wed, 20 Nov 2019 16:34:51 -0600 +Received: from us-aus-exhub1.ni.corp.natinst.com (130.164.68.41) by
+ us-aus-exch5.ni.corp.natinst.com (130.164.68.15) with Microsoft SMTP Server
+ (TLS) id 15.0.1395.4; Wed, 20 Nov 2019 16:34:50 -0600meta/recipes-devtools/opkg/opkg/opkg_archive.patch new file +42
-0+Received: from delcastillo3.natinst.com (172.18.68.32) by + us-aus-exhub1.ni.corp.natinst.com (130.164.68.41) with Microsoft SMTP + Server id 15.0.1395.4 via Frontend Transport; Wed, 20 Nov 2019 16:34:50 + -0600 +From: Alejandro del Castillo <[email protected]> +To: <[email protected]>, <[email protected]> +CC: Alejandro del Castillo <[email protected]> +Subject: [opkg][PATCH 1/2] opkg_archive.c: avoid double free on uncompress + error +Date: Wed, 20 Nov 2019 16:34:47 -0600 +Message-ID: <[email protected]> +X-Mailer: git-send-email 2.22.0 +In-Reply-To: <[email protected]> +References: <[email protected]> +MIME-Version: 1.0 +Content-Type: text/plain +X-Proofpoint-Virus-Version: vendor=fsecure + engine=2.50.10434:6.0.95,18.0.572 + definitions=2019-11-20_07:2019-11-20,2019-11-20 signatures=0 +X-Proofpoint-Spam-Reason: safe +X-Virus-Scanned: clamav-milter 0.101.4 at dan +X-Virus-Status: Clean +X-Evolution-Source: 1525863794.3857.16@hex +Content-Transfer-Encoding: 8bit + +The open-inner function calls archive_read_open. On error, +archive_read_open calls inner_close, which also closes the outter +archive. On error, return NULL directly to avoid double free. + + +Upstream-Status: Backport + +Signed-off-by: Alejandro del Castillo <[email protected]> +--- + libopkg/opkg_archive.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libopkg/opkg_archive.c b/libopkg/opkg_archive.c +index 3d87db1..0e9ccea 100644 +--- a/libopkg/opkg_archive.c ++++ b/libopkg/opkg_archive.c +@@ -622,7 +622,7 @@ static struct archive *open_inner(struct archive*outer)
meta/recipes-devtools/opkg/opkg/opkg_archive.patch new file +9
-0+ if (r != ARCHIVE_OK) { + opkg_msg(ERROR, "Failed to open inner archive: %s\n", + archive_error_string(inner)); +- goto err_cleanup; ++ return NULL; + } + + return inner; +@@ -683,7 +683,7 @@ static struct archive *extract_outer(const char*filename, const char *arname)
meta/recipes-devtools/opkg/opkg/opkg_archive.patch new file +12
-0+ + inner = open_inner(outer); + if (!inner) +- goto err_cleanup; ++ return NULL; + + return inner; + +-- +2.22.0 + +meta/recipes-devtools/opkg/opkg_0.4.1.bb +2
-0@@ -14,6 +14,8 @@ PE = "1" SRC_URI = " http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \ file://opkg.conf \ file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \ + file://opkg_archive.patch \ + file://open_inner.patch \ file://run-ptest \"
--
2.20.1--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Quoted 9 lines · Khem Raj
Quoted 7 lines · Richard Purdie
Signed-off-by Richard Purdie <[email protected]>--- .../opkg/opkg/open_inner.patch | 150 ++++++++++++++++ .../opkg/opkg/opkg_archive.patch | 160++++++++++++++++++
Quoted 5 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+X-Evolution-Source: 1525863794.3857.16@hex +Content-Transfer-Encoding: 8bitPerhaps this raw mail header can be removed it seems to add no value moreover is distracting
Yes, I realised and it was gone in the second version.
Cheers,
Richard