1 |
patrick 11/09/01 10:43:45 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: backuppc-3.2.1-r2.ebuild |
5 |
Removed: backuppc-3.2.1-r1.ebuild |
6 |
Log: |
7 |
Fixing init script warning |
8 |
|
9 |
(Portage version: 2.2.0_alpha51/cvs/Linux x86_64) |
10 |
|
11 |
Revision Changes Path |
12 |
1.12 app-backup/backuppc/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/backuppc/ChangeLog?rev=1.12&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/backuppc/ChangeLog?rev=1.12&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/backuppc/ChangeLog?r1=1.11&r2=1.12 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/app-backup/backuppc/ChangeLog,v |
21 |
retrieving revision 1.11 |
22 |
retrieving revision 1.12 |
23 |
diff -u -r1.11 -r1.12 |
24 |
--- ChangeLog 1 Sep 2011 10:28:46 -0000 1.11 |
25 |
+++ ChangeLog 1 Sep 2011 10:43:45 -0000 1.12 |
26 |
@@ -1,6 +1,12 @@ |
27 |
# ChangeLog for app-backup/backuppc |
28 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/app-backup/backuppc/ChangeLog,v 1.11 2011/09/01 10:28:46 patrick Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/app-backup/backuppc/ChangeLog,v 1.12 2011/09/01 10:43:45 patrick Exp $ |
31 |
+ |
32 |
+*backuppc-3.2.1-r2 (01 Sep 2011) |
33 |
+ |
34 |
+ 01 Sep 2011; Patrick Lauer <patrick@g.o> -backuppc-3.2.1-r1.ebuild, |
35 |
+ +backuppc-3.2.1-r2.ebuild: |
36 |
+ Fixing init script warning |
37 |
|
38 |
*backuppc-3.2.1-r1 (01 Sep 2011) |
39 |
|
40 |
|
41 |
|
42 |
|
43 |
1.1 app-backup/backuppc/backuppc-3.2.1-r2.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/backuppc/backuppc-3.2.1-r2.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/backuppc/backuppc-3.2.1-r2.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: backuppc-3.2.1-r2.ebuild |
49 |
=================================================================== |
50 |
# Copyright 1999-2011 Gentoo Foundation |
51 |
# Distributed under the terms of the GNU General Public License v2 |
52 |
# $Header: /var/cvsroot/gentoo-x86/app-backup/backuppc/backuppc-3.2.1-r2.ebuild,v 1.1 2011/09/01 10:43:45 patrick Exp $ |
53 |
|
54 |
EAPI="2" |
55 |
|
56 |
inherit eutils webapp |
57 |
|
58 |
MY_P="BackupPC-${PV}" |
59 |
|
60 |
DESCRIPTION="A high-performance system for backing up computers to a server's disk." |
61 |
HOMEPAGE="http://backuppc.sourceforge.net/" |
62 |
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz |
63 |
http://dev.gentooexperimental.org/~dreeevil/02-fix-config.pl-formatting.patch" |
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 |
perl-core/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_unpack() { |
105 |
unpack ${A} |
106 |
cd "${S}" |
107 |
} |
108 |
|
109 |
src_prepare() { |
110 |
epatch "${FILESDIR}/3.2.0/01-fix-configure.pl.patch" |
111 |
epatch "${DISTDIR}/02-fix-config.pl-formatting.patch" |
112 |
epatch "${FILESDIR}/3.2.0/03-reasonable-config.pl-defaults.patch" |
113 |
|
114 |
# Fix the documentation location in the CGI interface |
115 |
epatch "${FILESDIR}/3.2.0/04-add-docdir-marker.patch" |
116 |
sed -i "s+__DOCDIR__+/usr/share/doc/${PF}+" "lib/BackupPC/CGI/View.pm" |
117 |
|
118 |
epatch "${FILESDIR}/3.2.0/05-nicelevel.patch" |
119 |
sed -i -e 's/--chuid/--user/' "${S}"/init.d/src/gentoo-backuppc || die "Failed to fix the init script" |
120 |
} |
121 |
|
122 |
src_test() { |
123 |
true |
124 |
} |
125 |
|
126 |
src_install() { |
127 |
webapp_src_preinst |
128 |
|
129 |
local myconf |
130 |
myconf="" |
131 |
if use samba ; then |
132 |
myconf="--bin-path smbclient=$(type -p smbclient)" |
133 |
myconf="${myconf} --bin-path nmblookup=$(type -p nmblookup)" |
134 |
fi |
135 |
|
136 |
./configure.pl \ |
137 |
--batch \ |
138 |
--bin-path perl=$(type -p perl) \ |
139 |
--bin-path tar=$(type -p tar) \ |
140 |
--bin-path rsync=$(type -p rsync) \ |
141 |
--bin-path ping=$(type -p ping) \ |
142 |
--bin-path df=$(type -p df) \ |
143 |
--bin-path ssh=$(type -p ssh) \ |
144 |
--bin-path sendmail=$(type -p sendmail) \ |
145 |
--bin-path hostname=$(type -p hostname) \ |
146 |
--bin-path gzip=$(type -p gzip) \ |
147 |
--bin-path bzip2=$(type -p bzip2) \ |
148 |
--config-dir ${CONFDIR} \ |
149 |
--install-dir /usr \ |
150 |
--data-dir ${DATADIR} \ |
151 |
--hostname $(hostname) \ |
152 |
--uid-ignore \ |
153 |
--dest-dir "${D%/}" \ |
154 |
--html-dir ${MY_HTDOCSDIR}/image \ |
155 |
--html-dir-url /image \ |
156 |
--cgi-dir ${MY_HTDOCSDIR} \ |
157 |
--fhs \ |
158 |
${myconf} || die "failed the configure.pl script" |
159 |
|
160 |
ebegin "Installing documentation" |
161 |
|
162 |
pod2man \ |
163 |
--section=8 \ |
164 |
--center="BackupPC manual" \ |
165 |
"${S}"/doc/BackupPC.pod backuppc.8 || die "failed to generate man page" |
166 |
|
167 |
doman backuppc.8 |
168 |
|
169 |
# Place the documentation in the correct location |
170 |
dodoc "${D}/usr/doc/BackupPC.html" |
171 |
dodoc "${D}/usr/doc/BackupPC.pod" |
172 |
rm -rf "${D}/usr/doc" |
173 |
|
174 |
eend 0 |
175 |
|
176 |
# Setup directories |
177 |
dodir ${CONFDIR}/pc |
178 |
|
179 |
keepdir ${CONFDIR} |
180 |
keepdir ${CONFDIR}/pc |
181 |
keepdir ${DATADIR}/{trash,pool,pc,cpool} |
182 |
keepdir ${LOGDIR} |
183 |
|
184 |
ebegin "Setting up init.d/conf.d scripts" |
185 |
newinitd "${S}"/init.d/gentoo-backuppc backuppc |
186 |
newconfd "${S}"/init.d/gentoo-backuppc.conf backuppc |
187 |
eend 0 |
188 |
|
189 |
ebegin "Setting up an apache instance for backuppc" |
190 |
|
191 |
cp "${FILESDIR}/apache2-backuppc."{conf,init} "${WORKDIR}/" |
192 |
cp "${FILESDIR}/httpd.conf" "${WORKDIR}/httpd.conf" |
193 |
sed -i -e "s+HTDOCSDIR+${MY_HTDOCSDIR}+g" "${WORKDIR}/httpd.conf" |
194 |
sed -i -e "s+AUTHFILE+${CONFDIR}/users.htpasswd+g" "${WORKDIR}/httpd.conf" |
195 |
|
196 |
moduledir="/usr/lib/apache2/modules" |
197 |
|
198 |
# Check if the Apache ServerRoot is real. |
199 |
# This is sometimes broken on older amd64 systems. |
200 |
# In this case we just patch our config file appropriately. |
201 |
if [[ ! -d "/usr/lib/apache2" ]]; then |
202 |
if [[ -d "/usr/lib64/apache2" ]]; then |
203 |
sed -i -e "s+/usr/lib/apache2+/usr/lib64/apache2+g" "${WORKDIR}/httpd.conf" |
204 |
sed -i -e "s+/usr/lib/apache2+/usr/lib64/apache2+g" "${WORKDIR}/apache2-backuppc.conf" |
205 |
moduledir="/usr/lib64/apache2/modules" |
206 |
fi |
207 |
fi |
208 |
|
209 |
# Check if we're using mod_cgid instead of mod_cgi |
210 |
# This happens if you install apache with USE="threads" |
211 |
if [[ -f "${moduledir}/mod_cgid.so" ]]; then |
212 |
sed -i -e "s+mod_cgi+mod_cgid+g" "${WORKDIR}/httpd.conf" |
213 |
sed -i -e "s+cgi_module+cgid_module+g" "${WORKDIR}/httpd.conf" |
214 |
fi |
215 |
|
216 |
# Install conf.d/init.d files for apache2-backuppc |
217 |
if [ -e /etc/init.d/apache2 ]; then |
218 |
newconfd "${WORKDIR}/apache2-backuppc.conf" apache2-backuppc |
219 |
newinitd /etc/init.d/apache2 apache2-backuppc |
220 |
else |
221 |
newconfd "${WORKDIR}/apache2-backuppc.conf" apache2-backuppc |
222 |
newinitd "${WORKDIR}/apache2-backuppc.init" apache2-backuppc |
223 |
fi |
224 |
|
225 |
insopts -m 0644 |
226 |
insinto ${CONFDIR} |
227 |
doins "${WORKDIR}/httpd.conf" |
228 |
|
229 |
eend $? |
230 |
|
231 |
webapp_src_install || die "webapp_src_install" |
232 |
|
233 |
# Make sure that the ownership is correct |
234 |
chown -R backuppc:backuppc "${D}${CONFDIR}" |
235 |
chown -R backuppc:backuppc "${D}${DATADIR}" |
236 |
chown -R backuppc:backuppc "${D}${LOGDIR}" |
237 |
} |
238 |
|
239 |
pkg_postinst() { |
240 |
# This is disabled since BackupPC doesn't need it |
241 |
# webapp_pkg_postinst |
242 |
|
243 |
elog "Installation finished, now may now start using BackupPC." |
244 |
elog "" |
245 |
elog "- Read the documentation in /usr/share/doc/${PF}/BackupPC.html" |
246 |
elog " Please pay special attention to the security section." |
247 |
elog "" |
248 |
elog "- You can launch backuppc and it's apache web interface by running:" |
249 |
elog " # /etc/init.d/backuppc start" |
250 |
elog " # /etc/init.d/apache2-backuppc start" |
251 |
|
252 |
if [[ ! -e /etc/runlevels/default/backuppc ]]; then |
253 |
elog "" |
254 |
elog "- You also might want to add these scripts to your default runlevel:" |
255 |
elog " # rc-update add backuppc default" |
256 |
elog " # rc-update add apache2-backuppc default" |
257 |
fi |
258 |
|
259 |
# Generate a new password if there's no auth file |
260 |
if [[ ! -f "${CONFDIR}/users.htpasswd" ]]; then |
261 |
adminuser="backuppc" |
262 |
adminpass=$( makepasswd --chars=12 ) |
263 |
htpasswd -bc "${CONFDIR}/users.htpasswd" $adminuser $adminpass |
264 |
|
265 |
elog "" |
266 |
elog "- Created admin user $adminuser with password $adminpass" |
267 |
elog " To add new users, run: " |
268 |
elog " # htpasswd ${CONFDIR}/users.htpasswd newUser" |
269 |
fi |
270 |
|
271 |
if [[ -d "/etc/backuppc" ]]; then |
272 |
ewarn "" |
273 |
ewarn "Detected old config directory in /etc/backuppc" |
274 |
ewarn "Please migrate relevant config files to ${CONFDIR} before starting backuppc" |
275 |
fi |
276 |
elog "Warning: The default path changed from /var/lib/backuppc to /var/lib/BackupPC" |
277 |
elog "To continue using the old path the config files need to contain something like this:" |
278 |
elog "\$Conf{TopDir} = '/var/lib/backuppc/';" |
279 |
} |