1 |
commit: c8cc93c604b410649d703e5cfec9d54d30db6886 |
2 |
Author: Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr> |
3 |
AuthorDate: Mon Dec 28 14:47:47 2020 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Dec 28 14:47:47 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8cc93c6 |
7 |
|
8 |
app-backup/amanda: Port to EAPI 7 and GLEP 81 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/707236 |
11 |
Package-Manager: Portage-3.0.9, Repoman-3.0.1 |
12 |
Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr> |
13 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
14 |
|
15 |
...anda-3.5.1-r1.ebuild => amanda-3.5.1-r2.ebuild} | 94 +++++++++++----------- |
16 |
.../amanda/files/amanda-3.5.1-fno-common.patch | 13 +++ |
17 |
2 files changed, 59 insertions(+), 48 deletions(-) |
18 |
|
19 |
diff --git a/app-backup/amanda/amanda-3.5.1-r1.ebuild b/app-backup/amanda/amanda-3.5.1-r2.ebuild |
20 |
similarity index 89% |
21 |
rename from app-backup/amanda/amanda-3.5.1-r1.ebuild |
22 |
rename to app-backup/amanda/amanda-3.5.1-r2.ebuild |
23 |
index 24ae22aa02c..98bcf0c20ae 100644 |
24 |
--- a/app-backup/amanda/amanda-3.5.1-r1.ebuild |
25 |
+++ b/app-backup/amanda/amanda-3.5.1-r2.ebuild |
26 |
@@ -1,8 +1,9 @@ |
27 |
# Copyright 1999-2020 Gentoo Authors |
28 |
# Distributed under the terms of the GNU General Public License v2 |
29 |
|
30 |
-EAPI=6 |
31 |
-inherit autotools perl-module user systemd toolchain-funcs |
32 |
+EAPI=7 |
33 |
+ |
34 |
+inherit autotools perl-module systemd toolchain-funcs |
35 |
|
36 |
DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver" |
37 |
HOMEPAGE="http://www.amanda.org/" |
38 |
@@ -13,39 +14,43 @@ SLOT="0" |
39 |
IUSE="curl gnuplot ipv6 kerberos minimal ndmp nls readline s3 samba systemd xfs" |
40 |
|
41 |
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" |
42 |
-RDEPEND="sys-libs/readline:= |
43 |
- virtual/awk |
44 |
+DEPEND=" |
45 |
+ acct-group/amanda |
46 |
+ acct-user/amanda |
47 |
+ app-arch/dump |
48 |
app-arch/tar |
49 |
+ dev-libs/glib:2 |
50 |
dev-lang/perl:= |
51 |
- app-arch/dump |
52 |
- net-misc/openssh |
53 |
- >=dev-libs/glib-2.26.0 |
54 |
- dev-perl/JSON |
55 |
dev-perl/Encode-Locale |
56 |
+ dev-perl/JSON |
57 |
+ net-misc/openssh |
58 |
+ sys-libs/readline:= |
59 |
+ virtual/awk |
60 |
+ kerberos? ( app-crypt/mit-krb5 ) |
61 |
nls? ( virtual/libintl ) |
62 |
- s3? ( >=net-misc/curl-7.10.0 ) |
63 |
- !s3? ( curl? ( >=net-misc/curl-7.10.0 ) ) |
64 |
samba? ( net-fs/samba:= ) |
65 |
- kerberos? ( app-crypt/mit-krb5 ) |
66 |
+ s3? ( net-misc/curl ) |
67 |
+ !s3? ( curl? ( net-misc/curl ) ) |
68 |
xfs? ( sys-fs/xfsdump ) |
69 |
!minimal? ( |
70 |
- dev-perl/XML-Simple |
71 |
- virtual/mailx |
72 |
app-arch/mt-st:= |
73 |
- sys-block/mtx |
74 |
- gnuplot? ( sci-visualization/gnuplot ) |
75 |
app-crypt/aespipe |
76 |
app-crypt/gnupg |
77 |
+ dev-perl/XML-Simple |
78 |
+ sys-block/mtx |
79 |
+ virtual/mailx |
80 |
+ gnuplot? ( sci-visualization/gnuplot ) |
81 |
)" |
82 |
- |
83 |
-DEPEND="${RDEPEND} |
84 |
- virtual/pkgconfig |
85 |
- nls? ( sys-devel/gettext ) |
86 |
- >=app-text/docbook-xsl-stylesheets-1.72.0 |
87 |
+RDEPEND="${DEPEND}" |
88 |
+BDEPEND=" |
89 |
+ app-text/docbook-xsl-stylesheets |
90 |
app-text/docbook-xml-dtd |
91 |
- dev-libs/libxslt |
92 |
dev-lang/swig |
93 |
- " |
94 |
+ dev-libs/libxslt |
95 |
+ virtual/pkgconfig |
96 |
+ nls? ( sys-devel/gettext )" |
97 |
+ |
98 |
+PATCHES=( "${FILESDIR}"/${P}-fno-common.patch ) |
99 |
|
100 |
MYFILESDIR="${T}/files" |
101 |
ENVDIR="/etc/env.d" |
102 |
@@ -59,8 +64,8 @@ TMPENVFILE="${T}/${ENVDFILE}" |
103 |
# installed. This variable name must not start with AMANDA_, as we do not want |
104 |
# it captured into the env file. |
105 |
ENV_SETTINGS_AMANDA=" |
106 |
-AMANDA_GROUP_GID AMANDA_GROUP_NAME |
107 |
-AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS |
108 |
+AMANDA_GROUP_NAME |
109 |
+AMANDA_USER_NAME AMANDA_USER_HOMEDIR |
110 |
AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_TAPE_DEVICE AMANDA_SERVER_INDEX |
111 |
AMANDA_TAR_LISTDIR AMANDA_TAR |
112 |
AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS |
113 |
@@ -75,13 +80,9 @@ amanda_variable_setup() { |
114 |
currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)" |
115 |
|
116 |
# First we set the defaults |
117 |
- [[ -z "${AMANDA_GROUP_GID}" ]] && AMANDA_GROUP_GID=87 |
118 |
- [[ -z "${AMANDA_GROUP_NAME}" ]] && AMANDA_GROUP_NAME=amanda |
119 |
- [[ -z "${AMANDA_USER_NAME}" ]] && AMANDA_USER_NAME=amanda |
120 |
- [[ -z "${AMANDA_USER_UID}" ]] && AMANDA_USER_UID=87 |
121 |
- [[ -z "${AMANDA_USER_SH}" ]] && AMANDA_USER_SH=/bin/bash |
122 |
- [[ -z "${AMANDA_USER_HOMEDIR}" ]] && AMANDA_USER_HOMEDIR=/var/spool/amanda |
123 |
- [[ -z "${AMANDA_USER_GROUPS}" ]] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}" |
124 |
+ AMANDA_GROUP_NAME=amanda |
125 |
+ AMANDA_USER_NAME=amanda |
126 |
+ AMANDA_USER_HOMEDIR=/var/spool/amanda |
127 |
|
128 |
# This installs Amanda, with the server. However, it could be a client, |
129 |
# just specify an alternate server name in AMANDA_SERVER. |
130 |
@@ -127,9 +128,6 @@ pkg_setup() { |
131 |
elog "AMANDA_SERVER=\"myserver\" emerge amanda" |
132 |
elog |
133 |
fi |
134 |
- |
135 |
- enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}" |
136 |
- enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}" |
137 |
} |
138 |
|
139 |
src_unpack() { |
140 |
@@ -138,15 +136,16 @@ src_unpack() { |
141 |
} |
142 |
|
143 |
src_prepare() { |
144 |
+ default |
145 |
# gentoo bug #331111 |
146 |
- sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am || die |
147 |
- sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am || die |
148 |
+ sed -i '/^check-local: check-perl$/d' config/automake/scripts.am || die |
149 |
+ sed -i '/^check-local:/s,syntax-check,,g' perl/Makefile.am || die |
150 |
|
151 |
# bug with glibc-2.16.0 |
152 |
- sed -i -e '/gets is a security/d' "${S}"/gnulib/stdio.in.h || die |
153 |
+ sed -i -e '/gets is a security/d' gnulib/stdio.in.h || die |
154 |
|
155 |
# https://bugs.gentoo.org/701416 sandbox violation |
156 |
- sed -i -e 's/case `"$SAMBA_CLIENT.*/case "Connection to nosuchhost.amanda.org failed" in/' "${S}"/config/amanda/dumpers.m4 || die |
157 |
+ sed -i -e 's/case `"$SAMBA_CLIENT.*/case "Connection to nosuchhost.amanda.org failed" in/' config/amanda/dumpers.m4 || die |
158 |
|
159 |
eautoreconf |
160 |
|
161 |
@@ -347,7 +346,7 @@ src_install() { |
162 |
if ! use minimal; then |
163 |
einfo "Installing Sample Daily Cron Job for Amanda" |
164 |
insinto /etc/cron.daily |
165 |
- newins "${MYFILESDIR}/amanda-cron" amanda |
166 |
+ newins "${MYFILESDIR}"/amanda-cron amanda |
167 |
fi |
168 |
|
169 |
insinto /etc/amanda |
170 |
@@ -355,10 +354,10 @@ src_install() { |
171 |
doins "${T}/amandahosts" |
172 |
fperms 600 /etc/amanda/amandahosts |
173 |
|
174 |
- dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts" |
175 |
+ dosym "${AMANDA_USER_HOMEDIR}/.amandahosts" /etc/amanda/amandahosts |
176 |
insinto "${AMANDA_USER_HOMEDIR}" |
177 |
einfo "Installing .profile for ${AMANDA_USER_NAME} user" |
178 |
- newins "${MYFILESDIR}/amanda-profile" .profile |
179 |
+ newins "${MYFILESDIR}"/amanda-profile .profile |
180 |
|
181 |
insinto /etc/amanda |
182 |
doins "${S}/example/amanda-client.conf" |
183 |
@@ -376,8 +375,7 @@ src_install() { |
184 |
use xfs && keepdir /var/xfsdump/inventory |
185 |
|
186 |
local i |
187 |
- for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \ |
188 |
- "${AMANDA_TMPDIR}" /etc/amanda; do |
189 |
+ for i in "${AMANDA_TMPDIR}" /etc/amanda; do |
190 |
einfo "Securing directory (${i})" |
191 |
fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i} |
192 |
done |
193 |
@@ -385,8 +383,8 @@ src_install() { |
194 |
fperms 0700 \ |
195 |
"${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \ |
196 |
"${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \ |
197 |
- "${AMANDA_USER_HOMEDIR}/amanda" \ |
198 |
- /etc/amanda |
199 |
+ "${AMANDA_USER_HOMEDIR}/amanda" \ |
200 |
+ /etc/amanda |
201 |
|
202 |
if ! use minimal ; then |
203 |
fperms 0700 \ |
204 |
@@ -411,9 +409,9 @@ src_install() { |
205 |
rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes} || die |
206 |
mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/" || die |
207 |
docinto example1 |
208 |
- newdoc "${FILESDIR}/example_amanda.conf" amanda.conf |
209 |
- newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist |
210 |
- newdoc "${FILESDIR}/example_global.conf" global.conf |
211 |
+ newdoc "${FILESDIR}"/example_amanda.conf amanda.conf |
212 |
+ newdoc "${FILESDIR}"/example_disklist-2.5.1_p3-r1 disklist |
213 |
+ newdoc "${FILESDIR}"/example_global.conf global.conf |
214 |
|
215 |
einfo "Cleaning up dud .la files" |
216 |
perl_set_version |
217 |
|
218 |
diff --git a/app-backup/amanda/files/amanda-3.5.1-fno-common.patch b/app-backup/amanda/files/amanda-3.5.1-fno-common.patch |
219 |
new file mode 100644 |
220 |
index 00000000000..3f77c3a709c |
221 |
--- /dev/null |
222 |
+++ b/app-backup/amanda/files/amanda-3.5.1-fno-common.patch |
223 |
@@ -0,0 +1,13 @@ |
224 |
+diff --git a/common-src/testutils.h b/common-src/testutils.h |
225 |
+index 31f8973..3bb376f 100644 |
226 |
+--- a/common-src/testutils.h |
227 |
++++ b/common-src/testutils.h |
228 |
+@@ -75,7 +75,7 @@ typedef struct TestUtilsTest { |
229 |
+ #define tu_dbg(...) if (tu_debugging_enabled) { g_fprintf(stderr, __VA_ARGS__); } |
230 |
+ |
231 |
+ /* Is debugging enabled for this test run? (set internally) */ |
232 |
+-int tu_debugging_enabled; |
233 |
++extern int tu_debugging_enabled; |
234 |
+ |
235 |
+ /* |
236 |
+ * Main loop |