diff options
Diffstat (limited to 'app-arch/cpio/files')
6 files changed, 154 insertions, 42 deletions
diff --git a/app-arch/cpio/files/cpio-2.12-gcc-10.patch b/app-arch/cpio/files/cpio-2.12-gcc-10.patch deleted file mode 100644 index 9c7d7edd88f5..000000000000 --- a/app-arch/cpio/files/cpio-2.12-gcc-10.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 641d3f489cf6238bb916368d4ba0d9325a235afb Mon Sep 17 00:00:00 2001 -From: Sergey Poznyakoff <gray@gnu.org> -Date: Mon, 20 Jan 2020 07:45:39 +0200 -Subject: Minor fix * src/global.c: Remove superfluous declaration of - program_name - ---- - 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) (); --- -cgit v1.2.1 - diff --git a/app-arch/cpio/files/cpio-2.12-name-overflow.patch b/app-arch/cpio/files/cpio-2.12-name-overflow.patch deleted file mode 100644 index f85246884c39..000000000000 --- a/app-arch/cpio/files/cpio-2.12-name-overflow.patch +++ /dev/null @@ -1,15 +0,0 @@ -https://bugs.gentoo.org/572428 -https://lists.gnu.org/archive/html/bug-cpio/2016-01/msg00002.html -http://seclists.org/oss-sec/2016/q1/136 - ---- a/src/copyin.c -+++ b/src/copyin.c -@@ -1385,6 +1385,8 @@ - break; - } - -+ if (file_hdr.c_namesize <= 1) -+ file_hdr.c_name = xrealloc (file_hdr.c_name, 2); - cpio_safer_name_suffix (file_hdr.c_name, false, !no_abs_paths_flag, - false); - diff --git a/app-arch/cpio/files/cpio-2.13-fix-no-absolute-filenames-revert-CVE-2015-1197-handling.patch b/app-arch/cpio/files/cpio-2.13-fix-no-absolute-filenames-revert-CVE-2015-1197-handling.patch new file mode 100644 index 000000000000..326489a54943 --- /dev/null +++ b/app-arch/cpio/files/cpio-2.13-fix-no-absolute-filenames-revert-CVE-2015-1197-handling.patch @@ -0,0 +1,47 @@ +https://sources.debian.org/patches/cpio/2.13%2Bdfsg-7.1/revert-CVE-2015-1197-handling.patch/ +https://bugs.gentoo.org/700020 + +From: Chris Lamb <lamby@debian.org> +Date: Sat, 1 Feb 2020 13:36:37 +0100 +Subject: Fix a regression in handling of CVE-2015-1197 & + --no-absolute-filenames. + +See: + + * https://bugs.debian.org/946267 + * https://bugs.debian.org/946469 + +This reverts (most of): https://git.savannah.gnu.org/cgit/cpio.git/diff/?id=45b0ee2b407913c533f7ded8d6f8cbeec16ff6ca&id2=3177d660a4c62a6acb538b0f7c54ba423698889a +--- a/src/copyin.c ++++ b/src/copyin.c +@@ -646,8 +646,6 @@ copyin_link (struct cpio_file_stat *file_hdr, int in_file_des) + link_name = xstrdup (file_hdr->c_tar_linkname); + } + +- cpio_safer_name_suffix (link_name, true, !no_abs_paths_flag, false); +- + res = UMASKED_SYMLINK (link_name, file_hdr->c_name, + file_hdr->c_mode); + if (res < 0 && create_dir_flag) +--- a/tests/testsuite ++++ b/tests/testsuite +@@ -2787,7 +2787,7 @@ read at_status <"$at_status_file" + #AT_START_14 + at_fn_group_banner 14 'CVE-2015-1197.at:17' \ + "CVE-2015-1197 (--no-absolute-filenames for symlinks)" "" +-at_xfail=no ++at_xfail=yes + ( + $as_echo "14. $at_setup_line: testing $at_desc ..." + $at_traceon + +--- a/tests/CVE-2015-1197.at ++++ b/tests/CVE-2015-1197.at +@@ -15,6 +15,7 @@ + # along with this program. If not, see <http://www.gnu.org/licenses/>. + + AT_SETUP([CVE-2015-1197 (--no-absolute-filenames for symlinks)]) ++AT_XFAIL_IF([true]) + AT_CHECK([ + tempdir=$(pwd)/tmp + mkdir $tempdir diff --git a/app-arch/cpio/files/cpio-2.13-sysmacros-glibc-2.26.patch b/app-arch/cpio/files/cpio-2.13-sysmacros-glibc-2.26.patch new file mode 100644 index 000000000000..90e7bc77bd9b --- /dev/null +++ b/app-arch/cpio/files/cpio-2.13-sysmacros-glibc-2.26.patch @@ -0,0 +1,42 @@ +--- a/am/ax_compile_check_rettype.m4 ++++ b/am/ax_compile_check_rettype.m4 +@@ -70,6 +70,9 @@ AC_CACHE_VAL(AC_CV_NAME, + [for ac_type in char short int long "long long" $4 + do + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ++#ifdef HAVE_SYS_SYSMACROS_H ++#include <sys/sysmacros.h> ++#endif + #include <sys/types.h> + $3 + ]], [[switch (0) case 0: case (sizeof ($1($2)) == sizeof ($ac_type)):;]])], [AC_CV_NAME=$ac_type]) +--- a/configure.ac ++++ b/configure.ac +@@ -39,14 +39,11 @@ AC_C_PROTOTYPES + AC_SYS_LARGEFILE + + AC_TYPE_SIGNAL +-AC_HEADER_MAJOR + AC_C_CONST + AC_TYPE_UID_T + AC_CHECK_TYPE(gid_t, int) + AC_HEADER_STDC + AC_HEADER_DIRENT +-AC_COMPILE_CHECK_RETTYPE([major], [0]) +-AC_COMPILE_CHECK_RETTYPE([minor], [0]) + + AC_CHECK_FUNCS([fchmod fchown]) + # This is needed for mingw build +@@ -67,7 +64,11 @@ AC_ARG_ENABLE(mt, + + AM_CONDITIONAL([CPIO_MT_COND], [test "$enable_mt" = yes]) + +-AC_CHECK_HEADERS([unistd.h stdlib.h string.h fcntl.h pwd.h grp.h sys/io/trioctl.h utmp.h getopt.h locale.h libintl.h sys/wait.h utime.h locale.h process.h sys/ioctl.h]) ++AC_CHECK_HEADERS([unistd.h stdlib.h string.h fcntl.h pwd.h grp.h sys/io/trioctl.h utmp.h getopt.h locale.h libintl.h sys/wait.h utime.h locale.h process.h sys/ioctl.h sys/sysmacros.h]) ++ ++AC_HEADER_MAJOR ++AC_COMPILE_CHECK_RETTYPE([major], [0]) ++AC_COMPILE_CHECK_RETTYPE([minor], [0]) + + AC_CHECK_DECLS([errno, getpwnam, getgrnam, getgrgid, strdup, strerror, getenv, atoi, exit], , , [ + #include <stdio.h> diff --git a/app-arch/cpio/files/cpio-2.13-wincompatible-function-pointer-types.patch b/app-arch/cpio/files/cpio-2.13-wincompatible-function-pointer-types.patch new file mode 100644 index 000000000000..4f2dc3153656 --- /dev/null +++ b/app-arch/cpio/files/cpio-2.13-wincompatible-function-pointer-types.patch @@ -0,0 +1,23 @@ +https://bugs.gentoo.org/880373 +https://savannah.gnu.org/bugs/index.php?63349 +https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=0cc39712803ade7b2d4b89c36b143dad72404063 + +From 0cc39712803ade7b2d4b89c36b143dad72404063 Mon Sep 17 00:00:00 2001 +From: Bruno Haible <bruno@clisp.org> +Date: Sun, 18 Oct 2020 14:37:13 +0200 +Subject: obstack: Fix a clang warning. + +* lib/obstack.c (print_and_abort): Mark as __attribute_noreturn__. +--- 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 +-- +cgit v1.1 diff --git a/app-arch/cpio/files/cpio-2.14-sysmacros-glibc-2.26.patch b/app-arch/cpio/files/cpio-2.14-sysmacros-glibc-2.26.patch new file mode 100644 index 000000000000..e6b187c8f5c6 --- /dev/null +++ b/app-arch/cpio/files/cpio-2.14-sysmacros-glibc-2.26.patch @@ -0,0 +1,42 @@ +--- a/am/ax_compile_check_rettype.m4 ++++ b/am/ax_compile_check_rettype.m4 +@@ -70,6 +70,9 @@ AC_CACHE_VAL(AC_CV_NAME, + [for ac_type in char short int long "long long" $4 + do + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ++#ifdef HAVE_SYS_SYSMACROS_H ++#include <sys/sysmacros.h> ++#endif + #include <sys/types.h> + $3 + ]], [[switch (0) case 0: case (sizeof ($1($2)) == sizeof ($ac_type)):;]])], [AC_CV_NAME=$ac_type]) +--- a/configure.ac ++++ b/configure.ac +@@ -37,14 +37,11 @@ gl_EARLY + AC_C_PROTOTYPES + + AC_SYS_LARGEFILE +-AC_HEADER_MAJOR + AC_C_CONST + AC_TYPE_UID_T + AC_CHECK_TYPE(gid_t, int) + + AC_HEADER_DIRENT +-AX_COMPILE_CHECK_RETTYPE([major], [0]) +-AX_COMPILE_CHECK_RETTYPE([minor], [0]) + + AC_CHECK_FUNCS([fchmod fchown]) + # This is needed for mingw build +@@ -65,7 +62,11 @@ AC_ARG_ENABLE(mt, + + AM_CONDITIONAL([CPIO_MT_COND], [test "$enable_mt" = yes]) + +-AC_CHECK_HEADERS([unistd.h stdlib.h string.h fcntl.h pwd.h grp.h sys/io/trioctl.h utmp.h getopt.h locale.h libintl.h sys/wait.h utime.h locale.h process.h sys/ioctl.h]) ++AC_CHECK_HEADERS([unistd.h stdlib.h string.h fcntl.h pwd.h grp.h sys/io/trioctl.h utmp.h getopt.h locale.h libintl.h sys/wait.h utime.h locale.h process.h sys/ioctl.h sys/sysmacros.h]) ++ ++AC_HEADER_MAJOR ++AC_COMPILE_CHECK_RETTYPE([major], [0]) ++AC_COMPILE_CHECK_RETTYPE([minor], [0]) + + AC_CHECK_DECLS([errno, getpwnam, getgrnam, getgrgid, strdup, strerror, getenv, atoi, exit], , , [ + #include <stdio.h> |