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