Skip to contentSkip to conversation

cpio: upgrade to 2.14

PATCH New [email protected] 1 participant 1 message May 11, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpio: upgrade to 2.14

From: Ross Burton <[email protected]>

Specifically this includes the commit "Fix appending to archives bigger than 2G".

Drop all submitted patches.

Apply a patch from git to fix the build with clang.

[ YOCTO #11674 ]

---
 ...charset_alias-when-building-for-musl.patch |  30 -
 .../0001-Use-__alignof__-with-clang.patch     |  42 --
 ...g-CRC-with-ASCII-CRC-for-large-files.patch |  39 --
 .../0001-obstack-Fix-a-clang-warning.patch    |  27 -
 ...ove-superfluous-declaration-of-progr.patch |  28 -
 .../cpio/cpio-2.13/CVE-2021-38185.patch       | 581 ------------------
 .../cpio/{cpio_2.13.bb => cpio_2.14.bb}       |  10 +-
 ...e-needed-header-for-major-minor-macr.patch |  48 ++
 .../cpio/{cpio-2.13 => files}/run-ptest       |   0
 .../cpio/{cpio-2.13 => files}/test.sh         |   0
 10 files changed, 50 insertions(+), 755 deletions(-)
 delete mode 100644 meta/recipes-extended/cpio/cpio-2.13/0001-Unset-need_charset_alias-when-building-for-musl.patch
 delete mode 100644 meta/recipes-extended/cpio/cpio-2.13/0001-Use-__alignof__-with-clang.patch
 delete mode 100644 meta/recipes-extended/cpio/cpio-2.13/0001-Wrong-CRC-with-ASCII-CRC-for-large-files.patch
 delete mode 100644 meta/recipes-extended/cpio/cpio-2.13/0001-obstack-Fix-a-clang-warning.patch
 delete mode 100644 meta/recipes-extended/cpio/cpio-2.13/0002-src-global.c-Remove-superfluous-declaration-of-progr.patch
 delete mode 100644 meta/recipes-extended/cpio/cpio-2.13/CVE-2021-38185.patch
 rename meta/recipes-extended/cpio/{cpio_2.13.bb => cpio_2.14.bb} (84%)
 create mode 100644 meta/recipes-extended/cpio/files/0001-configure-Include-needed-header-for-major-minor-macr.patch
 rename meta/recipes-extended/cpio/{cpio-2.13 => files}/run-ptest (100%)
 rename meta/recipes-extended/cpio/{cpio-2.13 => files}/test.sh (100%)
meta/recipes-extended/cpio/cpio-2.13/0001-Unset-need_charset_alias-when-building-for-musl.patch deleted +0 -30
deleted file mode 100644
index 6ae213942c2..00000000000
@@ -1,30 +0,0 @@
-From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Mon, 13 Apr 2015 17:02:13 -0700
-Subject: [PATCH] Unset need_charset_alias when building for musl
-
-localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
-which actually shoudl be fixed in gnulib and then all downstream
-projects will get it eventually. For now we apply the fix to
-coreutils
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <[email protected]>
----
- lib/gnulib.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: cpio-2.11/gnu/Makefile.am
-===================================================================
---- cpio-2.11.orig/gnu/Makefile.am
-+++ cpio-2.11/gnu/Makefile.am
-@@ -734,7 +734,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 ;; \
meta/recipes-extended/cpio/cpio-2.13/0001-Use-__alignof__-with-clang.patch deleted +0 -42

42 lines not on this page · raw message

meta/recipes-extended/cpio/cpio-2.13/0001-Wrong-CRC-with-ASCII-CRC-for-large-files.patch deleted +0 -39
deleted file mode 100644
index 4b96e4316c2..00000000000
@@ -1,39 +0,0 @@
-From 77ff5f1be394eb2c786df561ff37dde7f982ec76 Mon Sep 17 00:00:00 2001
-From: Stefano Babic <[email protected]>
-Date: Fri, 28 Jul 2017 13:20:52 +0200
-Subject: [PATCH] Wrong CRC with ASCII CRC for large files
-
-Due to signedness, the checksum is not computed when filesize is bigger
-a 2GB.
-
-Upstream-Status: Submitted [https://lists.gnu.org/archive/html/bug-cpio/2017-07/msg00004.html]
-Signed-off-by: Stefano Babic <[email protected]>
----
- src/copyout.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/copyout.c b/src/copyout.c
-index 1f0987a..727aeca 100644
---- a/src/copyout.c
-+++ b/src/copyout.c
-@@ -34,13 +34,13 @@
-    compute and return a checksum for them.  */
- 
- static uint32_t
--read_for_checksum (int in_file_des, int file_size, char *file_name)
-+read_for_checksum (int in_file_des, unsigned int file_size, char *file_name)
- {
-   uint32_t crc;
-   char buf[BUFSIZ];
--  int bytes_left;
--  int bytes_read;
--  int i;
-+  unsigned int bytes_left;
-+  unsigned int bytes_read;
-+  unsigned int i;
- 
-   crc = 0;
- 
--- 
-2.7.4
-
meta/recipes-extended/cpio/cpio-2.13/0001-obstack-Fix-a-clang-warning.patch deleted +0 -27
deleted file mode 100644
index 6f6e396ef38..00000000000
@@ -1,27 +0,0 @@
-From 02f1f63d3ff58f3473f1689a0322a234ce10b659 Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Fri, 13 Jan 2023 22:13:45 -0800
-Subject: [PATCH] obstack: Fix a clang warning
-
-Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=0cc39712803ade7b2d4b89c36b143dad72404063]
-Signed-off-by: Khem Raj <[email protected]>
----
- gnu/obstack.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gnu/obstack.c b/gnu/obstack.c
-index 54b675d..4d6a1d5 100644
---- a/gnu/obstack.c
-+++ b/gnu/obstack.c
-@@ -326,7 +326,7 @@ int obstack_exit_failure = EXIT_FAILURE;
- #   include <libio/iolibio.h>
- #  endif
- 
--static _Noreturn void
-+static __attribute_noreturn__ void
- print_and_abort (void)
- {
-   /* Don't change any of these strings.  Yes, it would be possible to add
--- 
-2.39.0
-
meta/recipes-extended/cpio/cpio-2.13/0002-src-global.c-Remove-superfluous-declaration-of-progr.patch deleted +0 -28
deleted file mode 100644
index 478324c1c48..00000000000
@@ -1,28 +0,0 @@
-From 33e6cb5a28fab3d99bd6818f8c01e6f33805390f Mon Sep 17 00:00:00 2001
-From: Sergey Poznyakoff <[email protected]>
-Date: Mon, 20 Jan 2020 07:45:39 +0200
-Subject: [PATCH] src/global.c: Remove superfluous declaration of program_name
-
-Upstream-Status: Backport (commit 641d3f4)
-Signed-off-by: Richard Leitner <[email protected]>
----
- src/global.c | 3 ---
- 1 file changed, 3 deletions(-)
-
-diff --git a/src/global.c b/src/global.c
-index fb3abe9..acf92bc 100644
---- a/src/global.c
-+++ b/src/global.c
-@@ -184,9 +184,6 @@ unsigned int warn_option = 0;
- /* Extract to standard output? */
- bool to_stdout_option = false;
- 
--/* The name this program was run with.  */
--char *program_name;
--
- /* A pointer to either lstat or stat, depending on whether
-    dereferencing of symlinks is done for input files.  */
- int (*xstat) ();
--- 
-2.26.2
-
meta/recipes-extended/cpio/cpio-2.13/CVE-2021-38185.patch deleted +0 -581

581 lines not on this page · raw message

meta/recipes-extended/cpio/cpio_2.14.bb renamed from meta/recipes-extended/cpio/cpio_2.13.bb +2 -8
similarity index 84%
rename from meta/recipes-extended/cpio/cpio_2.13.bb
rename to meta/recipes-extended/cpio/cpio_2.14.bb
index 55bcc606b37..e55fb70cb1c 100644
@@ -7,18 +7,12 @@ LICENSE = "GPL-3.0-only"
 LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
 
 SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \
-           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
-           file://0002-src-global.c-Remove-superfluous-declaration-of-progr.patch \
-           file://0001-obstack-Fix-a-clang-warning.patch \
-           file://CVE-2021-38185.patch \
-           file://0001-Use-__alignof__-with-clang.patch \
-           file://0001-Wrong-CRC-with-ASCII-CRC-for-large-files.patch \
+           file://0001-configure-Include-needed-header-for-major-minor-macr.patch \
            file://run-ptest \
            file://test.sh \
            "
 
-SRC_URI[md5sum] = "389c5452d667c23b5eceb206f5000810"
-SRC_URI[sha256sum] = "e87470d9c984317f658567c03bfefb6b0c829ff17dbf6b0de48d71a4c8f3db88"
+SRC_URI[sha256sum] = "145a340fd9d55f0b84779a44a12d5f79d77c99663967f8cfa168d7905ca52454"
 
 inherit autotools gettext texinfo ptest
 
meta/recipes-extended/cpio/files/0001-configure-Include-needed-header-for-major-minor-macr.patch new file +48 -0

48 lines not on this page · raw message

meta/recipes-extended/cpio/files/run-ptest renamed from meta/recipes-extended/cpio/cpio-2.13/run-ptest +0 -0
similarity index 100%
rename from meta/recipes-extended/cpio/cpio-2.13/run-ptest
rename to meta/recipes-extended/cpio/files/run-ptest
meta/recipes-extended/cpio/files/test.sh renamed from meta/recipes-extended/cpio/cpio-2.13/test.sh +0 -0
similarity index 100%
rename from meta/recipes-extended/cpio/cpio-2.13/test.sh
rename to meta/recipes-extended/cpio/files/test.sh
Signature · 1 line
2.34.1