1 |
commit: db94bf8a3ec5214312cb4f3c5679d844014925f4 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Nov 22 20:05:35 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 28 14:31:34 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db94bf8a |
7 |
|
8 |
app-arch/cpio: Support app-alternatives/cpio |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
app-arch/cpio/cpio-2.13-r4.ebuild | 54 +++++++++++++++++++++++++++++++++++++++ |
13 |
1 file changed, 54 insertions(+) |
14 |
|
15 |
diff --git a/app-arch/cpio/cpio-2.13-r4.ebuild b/app-arch/cpio/cpio-2.13-r4.ebuild |
16 |
new file mode 100644 |
17 |
index 000000000000..3876fc2daba4 |
18 |
--- /dev/null |
19 |
+++ b/app-arch/cpio/cpio-2.13-r4.ebuild |
20 |
@@ -0,0 +1,54 @@ |
21 |
+# Copyright 1999-2022 Gentoo Authors |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=8 |
25 |
+ |
26 |
+inherit autotools |
27 |
+ |
28 |
+DESCRIPTION="A file archival tool which can also read and write tar files" |
29 |
+HOMEPAGE="https://www.gnu.org/software/cpio/cpio.html" |
30 |
+SRC_URI="mirror://gnu/cpio/${P}.tar.bz2" |
31 |
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-CVE-2021-38185.patch.xz" |
32 |
+ |
33 |
+LICENSE="GPL-3+" |
34 |
+SLOT="0" |
35 |
+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" |
36 |
+IUSE="nls" |
37 |
+ |
38 |
+PDEPEND=" |
39 |
+ app-alternatives/cpio |
40 |
+" |
41 |
+ |
42 |
+PATCHES=( |
43 |
+ "${FILESDIR}"/${PN}-2.12-non-gnu-compilers.patch #275295 |
44 |
+ "${WORKDIR}"/${P}-CVE-2021-38185.patch |
45 |
+ "${FILESDIR}"/${PN}-2.13-sysmacros-glibc-2.26.patch |
46 |
+ "${FILESDIR}"/${PN}-2.13-fix-no-absolute-filenames-revert-CVE-2015-1197-handling.patch |
47 |
+) |
48 |
+ |
49 |
+src_prepare() { |
50 |
+ default |
51 |
+ |
52 |
+ # Drop after 2.13 (only here for CVE patch) |
53 |
+ eautoreconf |
54 |
+} |
55 |
+ |
56 |
+src_configure() { |
57 |
+ local myeconfargs=( |
58 |
+ $(use_enable nls) |
59 |
+ --bindir="${EPREFIX}"/bin |
60 |
+ --with-rmt="${EPREFIX}"/usr/sbin/rmt |
61 |
+ # install as gcpio for better compatibility with non-GNU userland |
62 |
+ --program-prefix=g |
63 |
+ ) |
64 |
+ |
65 |
+ econf "${myeconfargs[@]}" |
66 |
+} |
67 |
+ |
68 |
+pkg_postinst() { |
69 |
+ # ensure to preserve the symlink before app-alternatives/cpio |
70 |
+ # is installed |
71 |
+ if [[ ! -h ${EROOT}/bin/cpio ]]; then |
72 |
+ ln -s gcpio "${EROOT}/bin/cpio" || die |
73 |
+ fi |
74 |
+} |