mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-16 17:36:59 +02:00
app-arch/cpio: Sync with Gentoo
It's from Gentoo commit 7b3b13e2b23c0df42ee8b478c2506e2ca6d99184.
This commit is contained in:
parent
fc75d61e2f
commit
96ad354541
@ -1,3 +1,2 @@
|
|||||||
DIST cpio-2.12.tar.bz2 1258605 BLAKE2B 4b6d42a1d8aaeaa980cab5894b2e264451e96a108f2c3aa89d3e6fde0bff338e026ee233ebd7c8cf41f3c926d42d38b866778244db774055736ca8792889e160 SHA512 0cd4da5f2fbca179ab4e666a5f878414c086a5f98bce4c76273f21d9b2a6fe422d901b5d453826c5f81bbe363aa015047a1e99779ad1a451c8feca6205c63120
|
|
||||||
DIST cpio-2.13-CVE-2021-38185.patch.xz 7844 BLAKE2B e338950e03c3eed3b4288435c9c75af8f0c3497b43680be4ee347e628db7cfac616b437a848094bf82cfc2c7f29d59b388bf0f6368b3b99770022e3f9533be11 SHA512 4d2cafefcd1ae9d86cb5171de2896799713490dfd9ed27d3dce0886fa4588c8df2b16ad8508a5dbb9155c9de6e40b6d1083bdb4774d967193a270a1dcbe37a33
|
DIST cpio-2.13-CVE-2021-38185.patch.xz 7844 BLAKE2B e338950e03c3eed3b4288435c9c75af8f0c3497b43680be4ee347e628db7cfac616b437a848094bf82cfc2c7f29d59b388bf0f6368b3b99770022e3f9533be11 SHA512 4d2cafefcd1ae9d86cb5171de2896799713490dfd9ed27d3dce0886fa4588c8df2b16ad8508a5dbb9155c9de6e40b6d1083bdb4774d967193a270a1dcbe37a33
|
||||||
DIST cpio-2.13.tar.bz2 1354559 BLAKE2B 45d77723acb55f15c8574ab5a2fdff6fb1767629d177dd3416b0268e9f82ee6bdd11b4fa591ef020efccbdc3f4918cf77263169da1a0f6422dfe1a9712295778 SHA512 459398e69f7f48201c04d1080218c50f75edcf114ffcbb236644ff6fcade5fcc566929bdab2ebe9be5314828d6902e43b348a8adf28351df978c8989590e93a3
|
DIST cpio-2.13.tar.bz2 1354559 BLAKE2B 45d77723acb55f15c8574ab5a2fdff6fb1767629d177dd3416b0268e9f82ee6bdd11b4fa591ef020efccbdc3f4918cf77263169da1a0f6422dfe1a9712295778 SHA512 459398e69f7f48201c04d1080218c50f75edcf114ffcbb236644ff6fcade5fcc566929bdab2ebe9be5314828d6902e43b348a8adf28351df978c8989590e93a3
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
# Copyright 1999-2022 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=7
|
|
||||||
|
|
||||||
DESCRIPTION="A file archival tool which can also read and write tar files"
|
|
||||||
HOMEPAGE="https://www.gnu.org/software/cpio/cpio.html"
|
|
||||||
SRC_URI="mirror://gnu/cpio/${P}.tar.bz2"
|
|
||||||
|
|
||||||
LICENSE="GPL-3+"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
|
||||||
IUSE="nls"
|
|
||||||
|
|
||||||
PATCHES=(
|
|
||||||
"${FILESDIR}"/${PN}-2.12-non-gnu-compilers.patch #275295
|
|
||||||
"${FILESDIR}"/${PN}-2.12-name-overflow.patch #572428
|
|
||||||
"${FILESDIR}"/${PN}-2.12-gcc-10.patch #705900
|
|
||||||
)
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
econf \
|
|
||||||
$(use_enable nls) \
|
|
||||||
--bindir="${EPREFIX}"/bin \
|
|
||||||
--with-rmt="${EPREFIX}"/usr/sbin/rmt
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
# Copyright 1999-2022 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=8
|
|
||||||
|
|
||||||
inherit autotools
|
|
||||||
|
|
||||||
DESCRIPTION="A file archival tool which can also read and write tar files"
|
|
||||||
HOMEPAGE="https://www.gnu.org/software/cpio/cpio.html"
|
|
||||||
SRC_URI="mirror://gnu/cpio/${P}.tar.bz2"
|
|
||||||
SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-CVE-2021-38185.patch.xz"
|
|
||||||
|
|
||||||
LICENSE="GPL-3+"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
|
||||||
IUSE="nls"
|
|
||||||
|
|
||||||
PATCHES=(
|
|
||||||
"${FILESDIR}"/${PN}-2.12-non-gnu-compilers.patch #275295
|
|
||||||
"${WORKDIR}"/${P}-CVE-2021-38185.patch
|
|
||||||
"${FILESDIR}"/${PN}-2.13-sysmacros-glibc-2.26.patch
|
|
||||||
"${FILESDIR}"/${PN}-2.13-fix-no-absolute-filenames-revert-CVE-2015-1197-handling.patch
|
|
||||||
)
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
default
|
|
||||||
|
|
||||||
# Drop after 2.13 (only here for CVE patch)
|
|
||||||
eautoreconf
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
local myeconfargs=(
|
|
||||||
$(use_enable nls)
|
|
||||||
--bindir="${EPREFIX}"/bin
|
|
||||||
--with-rmt="${EPREFIX}"/usr/sbin/rmt
|
|
||||||
# install as gcpio for better compatibility with non-GNU userland
|
|
||||||
--program-prefix=g
|
|
||||||
)
|
|
||||||
|
|
||||||
econf "${myeconfargs[@]}"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
default
|
|
||||||
|
|
||||||
# make cpio a symlink
|
|
||||||
dosym gcpio /bin/cpio
|
|
||||||
dosym gcpio.1 /usr/share/man/man1/cpio.1
|
|
||||||
}
|
|
@ -12,7 +12,7 @@ SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-CVE-2021
|
|||||||
|
|
||||||
LICENSE="GPL-3+"
|
LICENSE="GPL-3+"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||||
IUSE="nls"
|
IUSE="nls"
|
||||||
|
|
||||||
PDEPEND="
|
PDEPEND="
|
||||||
|
@ -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
|
|
||||||
|
|
@ -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);
|
|
||||||
|
|
@ -1,12 +1,42 @@
|
|||||||
--- a/am/ax_compile_check_rettype.m4
|
--- a/am/ax_compile_check_rettype.m4
|
||||||
+++ b/am/ax_compile_check_rettype.m4
|
+++ b/am/ax_compile_check_rettype.m4
|
||||||
@@ -70,6 +70,7 @@ AC_CACHE_VAL(AC_CV_NAME,
|
@@ -70,6 +70,9 @@ AC_CACHE_VAL(AC_CV_NAME,
|
||||||
[for ac_type in char short int long "long long" $4
|
[for ac_type in char short int long "long long" $4
|
||||||
do
|
do
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||||
|
+#ifdef HAVE_SYS_SYSMACROS_H
|
||||||
+#include <sys/sysmacros.h>
|
+#include <sys/sysmacros.h>
|
||||||
|
+#endif
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
$3
|
$3
|
||||||
]], [[switch (0) case 0: case (sizeof ($1($2)) == sizeof ($ac_type)):;]])], [AC_CV_NAME=$ac_type])
|
]], [[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>
|
||||||
|
Loading…
Reference in New Issue
Block a user