diff options
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r-- | meta/recipes-devtools/opkg/opkg/open_inner.patch | 46 | ||||
-rw-r--r-- | meta/recipes-devtools/opkg/opkg/opkg_archive.patch | 54 | ||||
-rw-r--r-- | meta/recipes-devtools/opkg/opkg_0.4.2.bb (renamed from meta/recipes-devtools/opkg/opkg_0.4.1.bb) | 18 |
3 files changed, 3 insertions, 115 deletions
diff --git a/meta/recipes-devtools/opkg/opkg/open_inner.patch b/meta/recipes-devtools/opkg/opkg/open_inner.patch deleted file mode 100644 index 278e099e3a..0000000000 --- a/meta/recipes-devtools/opkg/opkg/open_inner.patch +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | From alejandro.delcastillo@ni.com Wed Nov 20 22:35:02 2019 | ||
2 | From: Alejandro del Castillo <alejandro.delcastillo@ni.com> | ||
3 | To: <opkg-devel@googlegroups.com>, <richard.purdie@linuxfoundation.org> | ||
4 | CC: Alejandro del Castillo <alejandro.delcastillo@ni.com> | ||
5 | Subject: [opkg][PATCH 2/2] open_inner: add support for empty payloads | ||
6 | Date: Wed, 20 Nov 2019 16:34:48 -0600 | ||
7 | Message-ID: <20191120223448.26522-3-alejandro.delcastillo@ni.com> | ||
8 | X-Mailer: git-send-email 2.22.0 | ||
9 | In-Reply-To: <20191120223448.26522-1-alejandro.delcastillo@ni.com> | ||
10 | References: <20191120223448.26522-1-alejandro.delcastillo@ni.com> | ||
11 | MIME-Version: 1.0 | ||
12 | Content-Type: text/plain | ||
13 | Content-Transfer-Encoding: 8bit | ||
14 | |||
15 | Support for empty compressed payloads need to be explicitly enabled on | ||
16 | libarchive. | ||
17 | |||
18 | Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com> | ||
19 | |||
20 | Upstream-Status: Backport | ||
21 | --- | ||
22 | libopkg/opkg_archive.c | 7 +++++++ | ||
23 | 1 file changed, 7 insertions(+) | ||
24 | |||
25 | diff --git a/libopkg/opkg_archive.c b/libopkg/opkg_archive.c | ||
26 | index 0e9ccea..f19cece 100644 | ||
27 | --- a/libopkg/opkg_archive.c | ||
28 | +++ b/libopkg/opkg_archive.c | ||
29 | @@ -618,6 +618,13 @@ static struct archive *open_inner(struct archive *outer) | ||
30 | goto err_cleanup; | ||
31 | } | ||
32 | |||
33 | + r = archive_read_support_format_empty(inner); | ||
34 | + if (r != ARCHIVE_OK) { | ||
35 | + opkg_msg(ERROR, "Empty format not supported: %s\n", | ||
36 | + archive_error_string(inner)); | ||
37 | + goto err_cleanup; | ||
38 | + } | ||
39 | + | ||
40 | r = archive_read_open(inner, data, NULL, inner_read, inner_close); | ||
41 | if (r != ARCHIVE_OK) { | ||
42 | opkg_msg(ERROR, "Failed to open inner archive: %s\n", | ||
43 | -- | ||
44 | 2.22.0 | ||
45 | |||
46 | |||
diff --git a/meta/recipes-devtools/opkg/opkg/opkg_archive.patch b/meta/recipes-devtools/opkg/opkg/opkg_archive.patch deleted file mode 100644 index 3e1ebae953..0000000000 --- a/meta/recipes-devtools/opkg/opkg/opkg_archive.patch +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | From alejandro.delcastillo@ni.com Wed Nov 20 22:35:01 2019 | ||
2 | Return-Path: <richard.purdie+caf_=rpurdie=rpsys.net@linuxfoundation.org> | ||
3 | From: Alejandro del Castillo <alejandro.delcastillo@ni.com> | ||
4 | To: <opkg-devel@googlegroups.com>, <richard.purdie@linuxfoundation.org> | ||
5 | CC: Alejandro del Castillo <alejandro.delcastillo@ni.com> | ||
6 | Subject: [opkg][PATCH 1/2] opkg_archive.c: avoid double free on uncompress | ||
7 | error | ||
8 | Date: Wed, 20 Nov 2019 16:34:47 -0600 | ||
9 | Message-ID: <20191120223448.26522-2-alejandro.delcastillo@ni.com> | ||
10 | X-Mailer: git-send-email 2.22.0 | ||
11 | In-Reply-To: <20191120223448.26522-1-alejandro.delcastillo@ni.com> | ||
12 | References: <20191120223448.26522-1-alejandro.delcastillo@ni.com> | ||
13 | MIME-Version: 1.0 | ||
14 | Content-Type: text/plain | ||
15 | Content-Transfer-Encoding: 8bit | ||
16 | |||
17 | The open-inner function calls archive_read_open. On error, | ||
18 | archive_read_open calls inner_close, which also closes the outter | ||
19 | archive. On error, return NULL directly to avoid double free. | ||
20 | |||
21 | |||
22 | Upstream-Status: Backport | ||
23 | |||
24 | Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com> | ||
25 | --- | ||
26 | libopkg/opkg_archive.c | 4 ++-- | ||
27 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
28 | |||
29 | diff --git a/libopkg/opkg_archive.c b/libopkg/opkg_archive.c | ||
30 | index 3d87db1..0e9ccea 100644 | ||
31 | --- a/libopkg/opkg_archive.c | ||
32 | +++ b/libopkg/opkg_archive.c | ||
33 | @@ -622,7 +622,7 @@ static struct archive *open_inner(struct archive *outer) | ||
34 | if (r != ARCHIVE_OK) { | ||
35 | opkg_msg(ERROR, "Failed to open inner archive: %s\n", | ||
36 | archive_error_string(inner)); | ||
37 | - goto err_cleanup; | ||
38 | + return NULL; | ||
39 | } | ||
40 | |||
41 | return inner; | ||
42 | @@ -683,7 +683,7 @@ static struct archive *extract_outer(const char *filename, const char *arname) | ||
43 | |||
44 | inner = open_inner(outer); | ||
45 | if (!inner) | ||
46 | - goto err_cleanup; | ||
47 | + return NULL; | ||
48 | |||
49 | return inner; | ||
50 | |||
51 | -- | ||
52 | 2.22.0 | ||
53 | |||
54 | |||
diff --git a/meta/recipes-devtools/opkg/opkg_0.4.1.bb b/meta/recipes-devtools/opkg/opkg_0.4.2.bb index 00ae9c74c2..66a74dc5ed 100644 --- a/meta/recipes-devtools/opkg/opkg_0.4.1.bb +++ b/meta/recipes-devtools/opkg/opkg_0.4.2.bb | |||
@@ -5,7 +5,7 @@ HOMEPAGE = "http://code.google.com/p/opkg/" | |||
5 | BUGTRACKER = "http://code.google.com/p/opkg/issues/list" | 5 | BUGTRACKER = "http://code.google.com/p/opkg/issues/list" |
6 | LICENSE = "GPLv2+" | 6 | LICENSE = "GPLv2+" |
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ | 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ |
8 | file://src/opkg.c;beginline=4;endline=18;md5=9f5a1ad5395378a807d6d591e2f92d25" | 8 | file://src/opkg.c;beginline=4;endline=18;md5=d6200b0f2b41dee278aa5fad333eecae" |
9 | 9 | ||
10 | DEPENDS = "libarchive" | 10 | DEPENDS = "libarchive" |
11 | 11 | ||
@@ -14,13 +14,11 @@ PE = "1" | |||
14 | SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \ | 14 | SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \ |
15 | file://opkg.conf \ | 15 | file://opkg.conf \ |
16 | file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \ | 16 | file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \ |
17 | file://opkg_archive.patch \ | ||
18 | file://open_inner.patch \ | ||
19 | file://run-ptest \ | 17 | file://run-ptest \ |
20 | " | 18 | " |
21 | 19 | ||
22 | SRC_URI[md5sum] = "ba0c21305fc93b26e844981ef100dc85" | 20 | SRC_URI[md5sum] = "bd13e5dfc1c2536f0c7b2e15f795278e" |
23 | SRC_URI[sha256sum] = "45ac1e037d3877f635d883f8a555e172883a25d3eeb7986c75890fdd31250a43" | 21 | SRC_URI[sha256sum] = "86887852c43457edfff9d8b6d9520f3f1cdd55f25eb600a6eb31e1c4e151e106" |
24 | 22 | ||
25 | # This needs to be before ptest inherit, otherwise all ptest files end packaged | 23 | # This needs to be before ptest inherit, otherwise all ptest files end packaged |
26 | # in libopkg package if OPKGLIBDIR == libdir, because default | 24 | # in libopkg package if OPKGLIBDIR == libdir, because default |
@@ -47,16 +45,6 @@ PACKAGECONFIG[libsolv] = "--with-libsolv,--without-libsolv,libsolv" | |||
47 | EXTRA_OECONF += " --disable-pathfinder" | 45 | EXTRA_OECONF += " --disable-pathfinder" |
48 | EXTRA_OECONF_class-native = "--localstatedir=/${@os.path.relpath('${localstatedir}', '${STAGING_DIR_NATIVE}')} --sysconfdir=/${@os.path.relpath('${sysconfdir}', '${STAGING_DIR_NATIVE}')}" | 46 | EXTRA_OECONF_class-native = "--localstatedir=/${@os.path.relpath('${localstatedir}', '${STAGING_DIR_NATIVE}')} --sysconfdir=/${@os.path.relpath('${sysconfdir}', '${STAGING_DIR_NATIVE}')}" |
49 | 47 | ||
50 | # Release tarball has unused binaries on the tests folder, automatically created by automake. | ||
51 | # For now, delete them to avoid packaging errors (wrong architecture) | ||
52 | do_unpack_append () { | ||
53 | bb.build.exec_func('remove_test_binaries', d) | ||
54 | } | ||
55 | |||
56 | remove_test_binaries () { | ||
57 | rm ${WORKDIR}/opkg-${PV}/tests/libopkg_test* | ||
58 | } | ||
59 | |||
60 | do_install_append () { | 48 | do_install_append () { |
61 | install -d ${D}${sysconfdir}/opkg | 49 | install -d ${D}${sysconfdir}/opkg |
62 | install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf | 50 | install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf |