1 |
commit: fe84e9cbdff075dcd146ddb4fef0cf37e7777765 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 29 11:26:05 2017 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 29 13:15:58 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe84e9cb |
7 |
|
8 |
app-arch/unarj: Port to EAPI 6 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/520478 |
11 |
Package-Manager: Portage-2.3.19, Repoman-2.3.6 |
12 |
|
13 |
.../unarj/files/unarj-2.65-Wformat-security.patch | 66 ++++++++++++++++++++++ |
14 |
app-arch/unarj/files/unarj-2.65-gentoo-fbsd.patch | 4 +- |
15 |
app-arch/unarj/unarj-2.65.ebuild | 25 ++++---- |
16 |
3 files changed, 80 insertions(+), 15 deletions(-) |
17 |
|
18 |
diff --git a/app-arch/unarj/files/unarj-2.65-Wformat-security.patch b/app-arch/unarj/files/unarj-2.65-Wformat-security.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..a076dd91f13 |
21 |
--- /dev/null |
22 |
+++ b/app-arch/unarj/files/unarj-2.65-Wformat-security.patch |
23 |
@@ -0,0 +1,66 @@ |
24 |
+Bug: https://bugs.gentoo.org/520478 |
25 |
+ |
26 |
+--- a/unarj.c |
27 |
++++ b/unarj.c |
28 |
+@@ -699,7 +699,7 @@ |
29 |
+ } |
30 |
+ if ((arj_flags & GARBLE_FLAG) != 0) |
31 |
+ { |
32 |
+- printf(M_ENCRYPT); |
33 |
++ puts(M_ENCRYPT); |
34 |
+ printf(M_SKIPPED, filename); |
35 |
+ skip(); |
36 |
+ return -1; |
37 |
+@@ -763,7 +763,7 @@ |
38 |
+ } |
39 |
+ printf(M_EXTRACT, name); |
40 |
+ if (host_os != OS && file_type == BINARY_TYPE) |
41 |
+- printf(M_DIFFHOST); |
42 |
++ puts(M_DIFFHOST); |
43 |
+ printf(" "); |
44 |
+ |
45 |
+ crc = CRC_MASK; |
46 |
+@@ -779,10 +779,10 @@ |
47 |
+ set_ftime_mode(name, time_stamp, file_mode, (uint) host_os); |
48 |
+ |
49 |
+ if ((crc ^ CRC_MASK) == file_crc) |
50 |
+- printf(M_CRCOK); |
51 |
++ puts(M_CRCOK); |
52 |
+ else |
53 |
+ { |
54 |
+- printf(M_CRCERROR); |
55 |
++ puts(M_CRCERROR); |
56 |
+ error_count++; |
57 |
+ } |
58 |
+ return 1; |
59 |
+@@ -808,10 +808,10 @@ |
60 |
+ decode_f(); |
61 |
+ |
62 |
+ if ((crc ^ CRC_MASK) == file_crc) |
63 |
+- printf(M_CRCOK); |
64 |
++ puts(M_CRCOK); |
65 |
+ else |
66 |
+ { |
67 |
+- printf(M_CRCERROR); |
68 |
++ puts(M_CRCERROR); |
69 |
+ error_count++; |
70 |
+ } |
71 |
+ return 1; |
72 |
+@@ -958,7 +958,7 @@ |
73 |
+ int i; |
74 |
+ |
75 |
+ for (i = 0; M_USAGE[i] != NULL; i++) |
76 |
+- printf(M_USAGE[i]); |
77 |
++ puts(M_USAGE[i]); |
78 |
+ } |
79 |
+ |
80 |
+ int |
81 |
+@@ -973,7 +973,7 @@ |
82 |
+ argc = ccommand(&argv); |
83 |
+ #endif |
84 |
+ |
85 |
+- printf(M_VERSION); |
86 |
++ puts(M_VERSION); |
87 |
+ |
88 |
+ if (argc == 1) |
89 |
+ { |
90 |
|
91 |
diff --git a/app-arch/unarj/files/unarj-2.65-gentoo-fbsd.patch b/app-arch/unarj/files/unarj-2.65-gentoo-fbsd.patch |
92 |
index 755b9b696cc..2091f091e2d 100644 |
93 |
--- a/app-arch/unarj/files/unarj-2.65-gentoo-fbsd.patch |
94 |
+++ b/app-arch/unarj/files/unarj-2.65-gentoo-fbsd.patch |
95 |
@@ -1,5 +1,5 @@ |
96 |
---- environ.c 2007-06-19 12:44:09 +0200 |
97 |
-+++ environ.c.new 2007-06-19 12:44:37 +0200 |
98 |
+--- a/environ.c |
99 |
++++ b/environ.c |
100 |
@@ -437,7 +437,6 @@ |
101 |
#endif |
102 |
|
103 |
|
104 |
diff --git a/app-arch/unarj/unarj-2.65.ebuild b/app-arch/unarj/unarj-2.65.ebuild |
105 |
index d579027e1d3..ec1cba73be8 100644 |
106 |
--- a/app-arch/unarj/unarj-2.65.ebuild |
107 |
+++ b/app-arch/unarj/unarj-2.65.ebuild |
108 |
@@ -1,7 +1,9 @@ |
109 |
# Copyright 1999-2017 Gentoo Foundation |
110 |
# Distributed under the terms of the GNU General Public License v2 |
111 |
|
112 |
-inherit eutils toolchain-funcs |
113 |
+EAPI=6 |
114 |
+ |
115 |
+inherit toolchain-funcs |
116 |
|
117 |
DESCRIPTION="Utility for opening arj archives" |
118 |
HOMEPAGE="http://www.arjsoftware.com/" |
119 |
@@ -12,21 +14,18 @@ SLOT="0" |
120 |
KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris" |
121 |
IUSE="" |
122 |
|
123 |
-src_unpack() { |
124 |
- unpack ${A} |
125 |
- cd "${S}" |
126 |
- |
127 |
- epatch "${FILESDIR}"/${P}-CAN-2004-0947.patch |
128 |
- epatch "${FILESDIR}"/${P}-sanitation.patch |
129 |
- epatch "${FILESDIR}"/${P}-gentoo-fbsd.patch |
130 |
-} |
131 |
+PATCHES=( |
132 |
+ "${FILESDIR}"/${P}-CAN-2004-0947.patch |
133 |
+ "${FILESDIR}"/${P}-sanitation.patch |
134 |
+ "${FILESDIR}"/${P}-gentoo-fbsd.patch |
135 |
+ "${FILESDIR}"/${PN}-2.65-Wformat-security.patch |
136 |
+) |
137 |
|
138 |
-src_compile() { |
139 |
+src_configure() { |
140 |
tc-export CC |
141 |
- emake || die |
142 |
} |
143 |
|
144 |
src_install() { |
145 |
- dobin unarj || die 'dobin failed' |
146 |
- dodoc unarj.txt technote.txt || die 'dodoc failed' |
147 |
+ dobin unarj |
148 |
+ dodoc unarj.txt technote.txt |
149 |
} |