1 |
pacho 14/12/02 10:35:09 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: backuppc-3.3.0-r1.ebuild |
5 |
Removed: backuppc-3.3.0.ebuild |
6 |
Log: |
7 |
Install unit file again as looks like was dropped by error (#513850#c4 by Erik Zeek) |
8 |
|
9 |
(Portage version: 2.2.14/cvs/Linux x86_64, RepoMan options: --force, signed Manifest commit with key A188FBD4) |
10 |
|
11 |
Revision Changes Path |
12 |
1.26 app-backup/backuppc/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/backuppc/ChangeLog?rev=1.26&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/backuppc/ChangeLog?rev=1.26&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/backuppc/ChangeLog?r1=1.25&r2=1.26 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/app-backup/backuppc/ChangeLog,v |
21 |
retrieving revision 1.25 |
22 |
retrieving revision 1.26 |
23 |
diff -u -r1.25 -r1.26 |
24 |
--- ChangeLog 18 Sep 2014 08:35:14 -0000 1.25 |
25 |
+++ ChangeLog 2 Dec 2014 10:35:09 -0000 1.26 |
26 |
@@ -1,6 +1,13 @@ |
27 |
# ChangeLog for app-backup/backuppc |
28 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/app-backup/backuppc/ChangeLog,v 1.25 2014/09/18 08:35:14 chainsaw Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/app-backup/backuppc/ChangeLog,v 1.26 2014/12/02 10:35:09 pacho Exp $ |
31 |
+ |
32 |
+*backuppc-3.3.0-r1 (02 Dec 2014) |
33 |
+ |
34 |
+ 02 Dec 2014; Pacho Ramos <pacho@g.o> +backuppc-3.3.0-r1.ebuild, |
35 |
+ -backuppc-3.3.0.ebuild: |
36 |
+ Install unit file again as looks like was dropped by error (#513850#c4 by Erik |
37 |
+ Zeek) |
38 |
|
39 |
18 Sep 2014; Tony Vroon <chainsaw@g.o> -backuppc-2.1.2-r1.ebuild, |
40 |
-backuppc-3.2.1-r2.ebuild, -backuppc-3.2.1-r3.ebuild: |
41 |
|
42 |
|
43 |
|
44 |
1.1 app-backup/backuppc/backuppc-3.3.0-r1.ebuild |
45 |
|
46 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/backuppc/backuppc-3.3.0-r1.ebuild?rev=1.1&view=markup |
47 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/backuppc/backuppc-3.3.0-r1.ebuild?rev=1.1&content-type=text/plain |
48 |
|
49 |
Index: backuppc-3.3.0-r1.ebuild |
50 |
=================================================================== |
51 |
# Copyright 1999-2014 Gentoo Foundation |
52 |
# Distributed under the terms of the GNU General Public License v2 |
53 |
# $Header: /var/cvsroot/gentoo-x86/app-backup/backuppc/backuppc-3.3.0-r1.ebuild,v 1.1 2014/12/02 10:35:09 pacho Exp $ |
54 |
|
55 |
EAPI="5" |
56 |
|
57 |
inherit eutils systemd webapp user |
58 |
|
59 |
MY_P="BackupPC-${PV}" |
60 |
|
61 |
DESCRIPTION="A high-performance system for backing up computers to a server's disk" |
62 |
HOMEPAGE="http://backuppc.sourceforge.net/" |
63 |
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" |
64 |
|
65 |
LICENSE="GPL-2" |
66 |
KEYWORDS="amd64 x86" |
67 |
|
68 |
IUSE="rss samba" |
69 |
|
70 |
DEPEND="dev-lang/perl |
71 |
app-admin/apache-tools |
72 |
app-admin/makepasswd" |
73 |
RDEPEND="${DEPEND} |
74 |
virtual/perl-IO-Compress |
75 |
dev-perl/Archive-Zip |
76 |
dev-perl/libwww-perl |
77 |
>=app-arch/tar-1.13.20 |
78 |
app-arch/par2cmdline |
79 |
app-arch/gzip |
80 |
app-arch/bzip2 |
81 |
virtual/mta |
82 |
www-apache/mod_perl |
83 |
www-servers/apache |
84 |
net-misc/rsync |
85 |
>=dev-perl/File-RsyncP-0.68 |
86 |
rss? ( dev-perl/XML-RSS ) |
87 |
samba? ( net-fs/samba )" |
88 |
|
89 |
WEBAPP_MANUAL_SLOT="yes" |
90 |
SLOT="0" |
91 |
|
92 |
S=${WORKDIR}/${MY_P} |
93 |
|
94 |
CONFDIR="/etc/BackupPC" |
95 |
DATADIR="/var/lib/backuppc" |
96 |
LOGDIR="/var/log/BackupPC" |
97 |
|
98 |
pkg_setup() { |
99 |
webapp_pkg_setup |
100 |
enewgroup backuppc |
101 |
enewuser backuppc -1 /bin/bash /var/lib/backuppc backuppc |
102 |
} |
103 |
|
104 |
src_prepare() { |
105 |
epatch "${FILESDIR}/3.3.0/01-fix-configure.pl.patch" |
106 |
epatch "${FILESDIR}/3.3.0/02-fix-config.pl-formatting.patch" |
107 |
epatch "${FILESDIR}/3.3.0/03-reasonable-config.pl-defaults.patch" |
108 |
|
109 |
# Fix the documentation location in the CGI interface |
110 |
epatch "${FILESDIR}/3.2.0/04-add-docdir-marker.patch" |
111 |
sed -i "s+__DOCDIR__+/usr/share/doc/${PF}+" "lib/BackupPC/CGI/View.pm" |
112 |
|
113 |
epatch "${FILESDIR}/3.2.0/05-nicelevel.patch" |
114 |
sed -i -e 's/--chuid ${USER}//' "${S}"/init.d/src/gentoo-backuppc || die "Failed to fix the init script" |
115 |
} |
116 |
|
117 |
src_test() { |
118 |
true |
119 |
} |
120 |
|
121 |
src_install() { |
122 |
webapp_src_preinst |
123 |
|
124 |
local myconf |
125 |
myconf="" |
126 |
if use samba ; then |
127 |
myconf="--bin-path smbclient=$(type -p smbclient)" |
128 |
myconf="${myconf} --bin-path nmblookup=$(type -p nmblookup)" |
129 |
fi |
130 |
|
131 |
/usr/bin/env perl ./configure.pl \ |
132 |
--batch \ |
133 |
--bin-path perl=$(type -p perl) \ |
134 |
--bin-path tar=$(type -p tar) \ |
135 |
--bin-path rsync=$(type -p rsync) \ |
136 |
--bin-path ping=$(type -p ping) \ |
137 |
--bin-path df=$(type -p df) \ |
138 |
--bin-path ssh=$(type -p ssh) \ |
139 |
--bin-path sendmail=$(type -p sendmail) \ |
140 |
--bin-path hostname=$(type -p hostname) \ |
141 |
--bin-path gzip=$(type -p gzip) \ |
142 |
--bin-path bzip2=$(type -p bzip2) \ |
143 |
--config-dir ${CONFDIR} \ |
144 |
--install-dir /usr \ |
145 |
--data-dir ${DATADIR} \ |
146 |
--hostname $(hostname) \ |
147 |
--uid-ignore \ |
148 |
--dest-dir "${D%/}" \ |
149 |
--html-dir ${MY_HTDOCSDIR}/image \ |
150 |
--html-dir-url /image \ |
151 |
--cgi-dir ${MY_HTDOCSDIR} \ |
152 |
--fhs \ |
153 |
${myconf} || die "failed the configure.pl script" |
154 |
|
155 |
ebegin "Installing documentation" |
156 |
|
157 |
pod2man \ |
158 |
-errors=none \ |
159 |
--section=8 \ |
160 |
--center="BackupPC manual" \ |
161 |
"${S}"/doc/BackupPC.pod backuppc.8 || die "failed to generate man page" |
162 |
|
163 |
doman backuppc.8 |
164 |
|
165 |
# Place the documentation in the correct location |
166 |
dodoc "${D}/usr/doc/BackupPC.html" |
167 |
dodoc "${D}/usr/doc/BackupPC.pod" |
168 |
rm -rf "${D}/usr/doc" |
169 |
|
170 |
eend 0 |
171 |
|
172 |
# Setup directories |
173 |
dodir ${CONFDIR}/pc |
174 |
|
175 |
keepdir ${CONFDIR} |
176 |
keepdir ${CONFDIR}/pc |
177 |
keepdir ${DATADIR}/{trash,pool,pc,cpool} |
178 |
keepdir ${LOGDIR} |
179 |
|
180 |
ebegin "Setting up init.d/conf.d/systemd scripts" |
181 |
newinitd "${S}"/init.d/gentoo-backuppc backuppc |
182 |
newconfd "${S}"/init.d/gentoo-backuppc.conf backuppc |
183 |
systemd_dounit "${FILESDIR}/${PN}.service" |
184 |
eend 0 |
185 |
|
186 |
ebegin "Setting up an apache instance for backuppc" |
187 |
|
188 |
cp "${FILESDIR}/apache2-backuppc."{conf,init} "${WORKDIR}/" |
189 |
cp "${FILESDIR}/httpd.conf" "${WORKDIR}/httpd.conf" |
190 |
sed -i -e "s+HTDOCSDIR+${MY_HTDOCSDIR}+g" "${WORKDIR}/httpd.conf" |
191 |
sed -i -e "s+AUTHFILE+${CONFDIR}/users.htpasswd+g" "${WORKDIR}/httpd.conf" |
192 |
|
193 |
moduledir="/usr/lib/apache2/modules" |
194 |
|
195 |
# Check if the Apache ServerRoot is real. |
196 |
# This is sometimes broken on older amd64 systems. |
197 |
# In this case we just patch our config file appropriately. |
198 |
if [[ ! -d "/usr/lib/apache2" ]]; then |
199 |
if [[ -d "/usr/lib64/apache2" ]]; then |
200 |
sed -i -e "s+/usr/lib/apache2+/usr/lib64/apache2+g" "${WORKDIR}/httpd.conf" |
201 |
sed -i -e "s+/usr/lib/apache2+/usr/lib64/apache2+g" "${WORKDIR}/apache2-backuppc.conf" |
202 |
moduledir="/usr/lib64/apache2/modules" |
203 |
fi |
204 |
fi |
205 |
|
206 |
# Check if we're using mod_cgid instead of mod_cgi |
207 |
# This happens if you install apache with USE="threads" |
208 |
if [[ -f "${moduledir}/mod_cgid.so" ]]; then |
209 |
sed -i -e "s+mod_cgi+mod_cgid+g" "${WORKDIR}/httpd.conf" |
210 |
sed -i -e "s+cgi_module+cgid_module+g" "${WORKDIR}/httpd.conf" |
211 |
fi |
212 |
|
213 |
# Install conf.d/init.d files for apache2-backuppc |
214 |
if [ -e /etc/init.d/apache2 ]; then |
215 |
newconfd "${WORKDIR}/apache2-backuppc.conf" apache2-backuppc |
216 |
newinitd /etc/init.d/apache2 apache2-backuppc |
217 |
else |
218 |
newconfd "${WORKDIR}/apache2-backuppc.conf" apache2-backuppc |
219 |
newinitd "${WORKDIR}/apache2-backuppc.init" apache2-backuppc |
220 |
fi |
221 |
|
222 |
insopts -m 0644 |
223 |
insinto ${CONFDIR} |
224 |
doins "${WORKDIR}/httpd.conf" |
225 |
|
226 |
eend $? |
227 |
|
228 |
webapp_src_install || die "webapp_src_install" |
229 |
|
230 |
# Make sure that the ownership is correct |
231 |
chown -R backuppc:backuppc "${D}${CONFDIR}" |
232 |
chown -R backuppc:backuppc "${D}${DATADIR}" |
233 |
chown -R backuppc:backuppc "${D}${LOGDIR}" |
234 |
} |
235 |
|
236 |
pkg_postinst() { |
237 |
# This is disabled since BackupPC doesn't need it |
238 |
# webapp_pkg_postinst |
239 |
|
240 |
elog "Installation finished, now may now start using BackupPC." |
241 |
elog "" |
242 |
elog "- Read the documentation in /usr/share/doc/${PF}/BackupPC.html" |
243 |
elog " Please pay special attention to the security section." |
244 |
elog "" |
245 |
elog "- You can launch backuppc and it's apache web interface by running:" |
246 |
elog " # /etc/init.d/backuppc start" |
247 |
elog " # /etc/init.d/apache2-backuppc start" |
248 |
|
249 |
if [[ ! -e /etc/runlevels/default/backuppc ]]; then |
250 |
elog "" |
251 |
elog "- You also might want to add these scripts to your default runlevel:" |
252 |
elog " # rc-update add backuppc default" |
253 |
elog " # rc-update add apache2-backuppc default" |
254 |
fi |
255 |
|
256 |
# Generate a new password if there's no auth file |
257 |
if [[ ! -f "${CONFDIR}/users.htpasswd" ]]; then |
258 |
adminuser="backuppc" |
259 |
adminpass=$( makepasswd --chars=12 ) |
260 |
htpasswd -bc "${CONFDIR}/users.htpasswd" $adminuser $adminpass |
261 |
|
262 |
elog "" |
263 |
elog "- Created admin user $adminuser with password $adminpass" |
264 |
elog " To add new users, run: " |
265 |
elog " # htpasswd ${CONFDIR}/users.htpasswd newUser" |
266 |
fi |
267 |
|
268 |
if [[ -d "/etc/backuppc" ]]; then |
269 |
ewarn "" |
270 |
ewarn "Detected old config directory in /etc/backuppc" |
271 |
ewarn "Please migrate relevant config files to ${CONFDIR} before starting backuppc" |
272 |
fi |
273 |
} |