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