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