Gentoo Archives: gentoo-commits

From: "Thomas Beierlein (tomjbe)" <tomjbe@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-backup/bacula: ChangeLog bacula-5.2.3-r1.ebuild
Date: Wed, 04 Jan 2012 09:02:32
Message-Id: 20120104090220.2082F2004B@flycatcher.gentoo.org
1 tomjbe 12/01/04 09:02:20
2
3 Modified: ChangeLog
4 Added: bacula-5.2.3-r1.ebuild
5 Log:
6 Change REQUIRED_USE (see bug #397555). Thanks for reporting waa-gentoo@××××××.com
7
8 (Portage version: 2.1.10.44/cvs/Linux i686)
9
10 Revision Changes Path
11 1.117 app-backup/bacula/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/bacula/ChangeLog?rev=1.117&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/bacula/ChangeLog?rev=1.117&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/bacula/ChangeLog?r1=1.116&r2=1.117
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-backup/bacula/ChangeLog,v
20 retrieving revision 1.116
21 retrieving revision 1.117
22 diff -u -r1.116 -r1.117
23 --- ChangeLog 2 Jan 2012 13:17:47 -0000 1.116
24 +++ ChangeLog 4 Jan 2012 09:02:20 -0000 1.117
25 @@ -1,6 +1,12 @@
26 # ChangeLog for app-backup/bacula
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/app-backup/bacula/ChangeLog,v 1.116 2012/01/02 13:17:47 tomjbe Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-backup/bacula/ChangeLog,v 1.117 2012/01/04 09:02:20 tomjbe Exp $
30 +
31 +*bacula-5.2.3-r1 (04 Jan 2012)
32 +
33 + 04 Jan 2012; Thomas Beierlein <tomjbe@g.o> +bacula-5.2.3-r1.ebuild:
34 + Change REQUIRED_USE (see bug #397555). Thanks for reporting
35 + waa-gentoo@××××××.com
36
37 *bacula-5.2.3 (02 Jan 2012)
38
39
40
41
42 1.1 app-backup/bacula/bacula-5.2.3-r1.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/bacula/bacula-5.2.3-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/bacula/bacula-5.2.3-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: bacula-5.2.3-r1.ebuild
48 ===================================================================
49 # Copyright 1999-2012 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/app-backup/bacula/bacula-5.2.3-r1.ebuild,v 1.1 2012/01/04 09:02:20 tomjbe Exp $
52
53 EAPI="4"
54 PYTHON_DEPEND="python? 2"
55 PYTHON_USE_WITH="threads"
56 PYTHON_USE_WITH_OPT="python"
57
58 inherit eutils multilib python
59
60 MY_PV=${PV/_beta/-b}
61 MY_P=${PN}-${MY_PV}
62
63 DESCRIPTION="Featureful client/server network backup suite"
64 HOMEPAGE="http://www.bacula.org/"
65 SRC_URI="mirror://sourceforge/bacula/${MY_P}.tar.gz"
66
67 LICENSE="AGPL-3"
68 SLOT="0"
69 KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86"
70 IUSE="bacula-clientonly bacula-nodir bacula-nosd ipv6 logwatch mysql postgres python qt4 readline +sqlite3 ssl static tcpd vim-syntax X"
71
72 DEPEND="
73 >=sys-libs/zlib-1.1.4
74 dev-libs/gmp
75 !bacula-clientonly? (
76 postgres? ( dev-db/postgresql-base[threads] )
77 mysql? ( virtual/mysql )
78 sqlite3? ( dev-db/sqlite:3 )
79 !bacula-nodir? ( virtual/mta )
80 )
81 qt4? (
82 x11-libs/qt-svg:4
83 x11-libs/qwt:5
84 )
85 ssl? ( dev-libs/openssl )
86 logwatch? ( sys-apps/logwatch )
87 tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
88 readline? ( >=sys-libs/readline-4.1 )
89 dev-libs/lzo
90 sys-libs/ncurses"
91 RDEPEND="${DEPEND}
92 !bacula-clientonly? (
93 !bacula-nosd? (
94 sys-block/mtx
95 app-arch/mt-st
96 )
97 )
98 vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
99
100 REQUIRED_USE="|| ( ^^ ( mysql postgres sqlite3 ) bacula-clientonly )"
101
102 S=${WORKDIR}/${MY_P}
103
104 pkg_setup() {
105 # create the daemon group and user
106 if [ -z "$(egetent group bacula 2>/dev/null)" ]; then
107 enewgroup bacula
108 einfo
109 einfo "The group 'bacula' has been created. Any users you add to this"
110 einfo "group have access to files created by the daemons."
111 einfo
112 fi
113
114 if use bacula-clientonly && use static && use qt4; then
115 ewarn
116 ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt4' useflag."
117 ewarn
118 fi
119
120 if ! use bacula-clientonly; then
121 # USE=static only supported for bacula-clientonly
122 if use static; then
123 ewarn
124 ewarn "USE=static only supported together with USE=bacula-clientonly."
125 ewarn "Ignoring 'static' useflag."
126 ewarn
127 fi
128 if [ -z "$(egetent passwd bacula 2>/dev/null)" ]; then
129 enewuser bacula -1 -1 /var/lib/bacula bacula,disk,tape,cdrom,cdrw
130 einfo
131 einfo "The user 'bacula' has been created. Please see the bacula manual"
132 einfo "for information about running bacula as a non-root user."
133 einfo
134 fi
135 fi
136
137 if use python; then
138 python_set_active_version 2
139 python_pkg_setup
140 fi
141 }
142
143 src_prepare() {
144 # adjusts default configuration files for several binaries
145 # to /etc/bacula/<config> instead of ./<config>
146 pushd src >&/dev/null || die
147 for f in console/console.c dird/dird.c filed/filed.c \
148 stored/bcopy.c stored/bextract.c stored/bls.c \
149 stored/bscan.c stored/btape.c stored/stored.c \
150 qt-console/main.cpp; do
151 sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bacula/|g' "${f}" \
152 || die "sed on ${f} failed"
153 done
154 popd >&/dev/null || die
155
156 # drop automatic install of unneeded documentation (for bug 356499)
157 epatch "${FILESDIR}"/${PV}/${P}-doc.patch
158
159 # bug #310087
160 epatch "${FILESDIR}"/${PV}/${P}-as-needed.patch
161
162 # bug #311161
163 epatch "${FILESDIR}"/${PV}/${P}-lib-search-path.patch
164
165 # stop build for errors in subdirs
166 epatch "${FILESDIR}"/${PV}/${P}-Makefile.patch
167
168 # bat needs to respect LDFLAGS
169 epatch "${FILESDIR}"/${PV}/${P}-ldflags.patch
170
171 # bug #328701
172 epatch "${FILESDIR}"/${PV}/${P}-openssl-1.patch
173
174 epatch "${FILESDIR}"/${PV}/${P}-fix-static.patch
175 }
176
177 src_configure() {
178 local myconf=''
179
180 if use bacula-clientonly; then
181 myconf="${myconf} \
182 $(use_enable bacula-clientonly client-only) \
183 $(use_enable !static libtool) \
184 $(use_enable static static-cons) \
185 $(use_enable static static-fd)"
186 else
187 myconf="${myconf} \
188 $(use_enable !bacula-nodir build-dird) \
189 $(use_enable !bacula-nosd build-stored)"
190 # bug #311099
191 # database support needed by dir-only *and* sd-only
192 # build as well (for building bscan, btape, etc.)
193 myconf="${myconf} \
194 $(use_with mysql) \
195 $(use_with sqlite3) \
196 $(use_with postgres postgresql) \
197 --enable-batch-insert"
198 fi
199
200 # do not build bat if 'static' clientonly
201 if ! use bacula-clientonly || ! use static; then
202 myconf="${myconf} \
203 $(use_enable qt4 bat)"
204 fi
205
206 myconf="${myconf} \
207 --disable-tray-monitor \
208 $(use_with X x) \
209 $(use_with python) \
210 $(use_enable !readline conio) \
211 $(use_enable readline) \
212 $(use_with readline readline /usr) \
213 $(use_with ssl openssl) \
214 $(use_enable ipv6) \
215 $(use_with tcpd tcp-wrappers)"
216
217 econf \
218 --libdir=/usr/$(get_libdir) \
219 --docdir=/usr/share/doc/${PF} \
220 --htmldir=/usr/share/doc/${PF}/html \
221 --with-pid-dir=/var/run \
222 --sysconfdir=/etc/bacula \
223 --with-subsys-dir=/var/lock/subsys \
224 --with-working-dir=/var/lib/bacula \
225 --with-scriptdir=/usr/libexec/bacula \
226 --with-dir-user=bacula \
227 --with-dir-group=bacula \
228 --with-sd-user=root \
229 --with-sd-group=bacula \
230 --with-fd-user=root \
231 --with-fd-group=bacula \
232 --enable-smartalloc \
233 --host=${CHOST} \
234 ${myconf}
235 }
236
237 src_install() {
238 emake DESTDIR="${D}" install
239 insinto /usr/share/pixmaps
240 doins scripts/bacula.png
241
242 # install bat icon and desktop file when enabled
243 # (for some reason ./configure doesn't pick this up)
244 if use qt4 && ! use static ; then
245 insinto /usr/share/pixmaps
246 doins src/qt-console/images/bat_icon.png
247 insinto /usr/share/applications
248 doins scripts/bat.desktop
249 fi
250
251 # remove some scripts we don't need at all
252 rm -f "${D}"/usr/libexec/bacula/{bacula,bacula-ctl-dir,bacula-ctl-fd,bacula-ctl-sd,startmysql,stopmysql}
253
254 # rename statically linked apps
255 if use bacula-clientonly && use static ; then
256 pushd "${D}"/usr/sbin || die
257 mv static-bacula-fd bacula-fd || die
258 mv static-bconsole bconsole || die
259 popd || die
260 fi
261
262 # extra files which 'make install' doesn't cover
263 if ! use bacula-clientonly; then
264 # the database update scripts
265 diropts -m0750
266 insinto /usr/libexec/bacula/updatedb
267 insopts -m0754
268 doins "${S}"/updatedb/*
269 fperms 0640 /usr/libexec/bacula/updatedb/README
270
271 # the logrotate configuration
272 # (now unconditional wrt bug #258187)
273 diropts -m0755
274 insinto /etc/logrotate.d
275 insopts -m0644
276 newins "${S}"/scripts/logrotate bacula
277
278 # the logwatch scripts
279 if use logwatch; then
280 diropts -m0750
281 dodir /etc/log.d/scripts/services
282 dodir /etc/log.d/scripts/shared
283 dodir /etc/log.d/conf/logfiles
284 dodir /etc/log.d/conf/services
285 pushd "${S}"/scripts/logwatch >&/dev/null || die
286 emake DESTDIR="${D}" install
287 popd >&/dev/null || die
288 fi
289 fi
290
291 rm -vf "${D}"/usr/share/man/man1/bacula-bwxconsole.1*
292 if ! use qt4; then
293 rm -vf "${D}"/usr/share/man/man1/bat.1*
294 fi
295 rm -vf "${D}"/usr/share/man/man1/bacula-tray-monitor.1*
296 if use bacula-clientonly || use bacula-nodir; then
297 rm -vf "${D}"/usr/share/man/man8/bacula-dir.8*
298 rm -vf "${D}"/usr/share/man/man8/dbcheck.8*
299 rm -vf "${D}"/usr/share/man/man1/bsmtp.1*
300 rm -vf "${D}"/usr/libexec/bacula/create_*_database
301 rm -vf "${D}"/usr/libexec/bacula/drop_*_database
302 rm -vf "${D}"/usr/libexec/bacula/make_*_tables
303 rm -vf "${D}"/usr/libexec/bacula/update_*_tables
304 rm -vf "${D}"/usr/libexec/bacula/drop_*_tables
305 rm -vf "${D}"/usr/libexec/bacula/grant_*_privileges
306 rm -vf "${D}"/usr/libexec/bacula/*_catalog_backup
307 fi
308 if use bacula-clientonly || use bacula-nosd; then
309 rm -vf "${D}"/usr/share/man/man8/bacula-sd.8*
310 rm -vf "${D}"/usr/share/man/man8/bcopy.8*
311 rm -vf "${D}"/usr/share/man/man8/bextract.8*
312 rm -vf "${D}"/usr/share/man/man8/bls.8*
313 rm -vf "${D}"/usr/share/man/man8/bscan.8*
314 rm -vf "${D}"/usr/share/man/man8/btape.8*
315 rm -vf "${D}"/usr/libexec/bacula/disk-changer
316 rm -vf "${D}"/usr/libexec/bacula/mtx-changer
317 rm -vf "${D}"/usr/libexec/bacula/dvd-handler
318 fi
319
320 # documentation
321 dodoc ChangeLog LICENSE ReleaseNotes SUPPORT technotes
322
323 # vim-files
324 if use vim-syntax; then
325 insinto /usr/share/vim/vimfiles/syntax
326 doins scripts/bacula.vim
327 insinto /usr/share/vim/vimfiles/ftdetect
328 newins scripts/filetype.vim bacula_ft.vim
329 fi
330
331 # setup init scripts
332 myscripts="bacula-fd"
333 if ! use bacula-clientonly; then
334 if ! use bacula-nodir; then
335 myscripts="${myscripts} bacula-dir"
336 fi
337 if ! use bacula-nosd; then
338 myscripts="${myscripts} bacula-sd"
339 fi
340 fi
341 for script in ${myscripts}; do
342 # copy over init script and config to a temporary location
343 # so we can modify them as needed
344 cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd"
345 cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd"
346 # set database dependancy for the director init script
347 case "${script}" in
348 bacula-dir)
349 case "${mydbtype}" in
350 sqlite3)
351 # sqlite3 databases don't have a daemon
352 sed -i -e 's/need "%database%"/:/g' "${T}/${script}".initd || die
353 ;;
354 *)
355 # all other databases have daemons
356 sed -i -e "s:%database%:${mydbtype}:" "${T}/${script}".initd || die
357 ;;
358 esac
359 ;;
360 *)
361 ;;
362 esac
363 # install init script and config
364 newinitd "${T}/${script}".initd "${script}"
365 newconfd "${T}/${script}".confd "${script}"
366 done
367
368 # make sure the working directory exists
369 diropts -m0750
370 keepdir /var/lib/bacula
371
372 # make sure bacula group can execute bacula libexec scripts
373 fowners -R root:bacula /usr/libexec/bacula
374 }
375
376 pkg_postinst() {
377 if use bacula-clientonly; then
378 fowners root:bacula /var/lib/bacula
379 else
380 fowners bacula:bacula /var/lib/bacula
381 fi
382
383 if ! use bacula-clientonly && ! use bacula-nodir; then
384 einfo
385 einfo "If this is a new install, you must create the ${mydbtype} databases with:"
386 einfo " /usr/libexec/bacula/create_${mydbtype}_database"
387 einfo " /usr/libexec/bacula/make_${mydbtype}_tables"
388 einfo " /usr/libexec/bacula/grant_${mydbtype}_privileges"
389 einfo
390 fi
391
392 einfo "Please note that 'bconsole' will always be installed. To compile 'bat'"
393 einfo "you have to enable 'USE=qt4'."
394 einfo
395 }