diff -r e3c6a8f912f4 -r ac1eb2cd38a8 bacula/bacula.spec --- a/bacula/bacula.spec Tue Aug 28 18:36:20 2012 +0200 +++ b/bacula/bacula.spec Tue Aug 28 18:36:30 2012 +0200 @@ -1,6 +1,6 @@ ## ## bacula.spec -- OpenPKG RPM Package Specification -## Copyright (c) 2000-2010 OpenPKG Foundation e.V. +## Copyright (c) 2000-2012 OpenPKG Foundation e.V. ## ## Permission to use, copy, modify, and distribute this software for ## any purpose with or without fee is hereby granted, provided that @@ -21,15 +21,6 @@ ## SUCH DAMAGE. ## -# MSvB: -# MSvB: Note, see http://www.bacula.org/en/?page=news -# MSvB: for information on new configuration options. -# MSvB: Warning! -L /pfx/lib is placed before locally -# MSvB: built libraries (bacula-/src/cats...) -# MSvB: which causes the old version of bacula to -# MSvB: supply logic to the new version build! -# MSvB: - # package information Name: bacula Summary: Network Backup Tool @@ -40,8 +31,8 @@ Class: PLUS Group: System License: GPL -Version: 5.0.3 -Release: 20120208 +Version: 5.2.10 +Release: 20120629 # package options %option with_server yes @@ -67,15 +58,13 @@ Patch0: bacula.patch # build information -Prefix: %{l_prefix} -BuildRoot: %{l_buildroot} -BuildPreReq: OpenPKG, openpkg >= 20060823, make, gcc, gcc::with_cxx = yes -PreReq: OpenPKG, openpkg >= 20060823 -BuildPreReq: ncurses, readline, zlib -PreReq: ncurses, readline, zlib +BuildPreReq: OpenPKG, openpkg >= 20100101, make, gcc, gcc::with_cxx = yes +PreReq: OpenPKG, openpkg >= 20100101 +BuildPreReq: readline, zlib +PreReq: readline, zlib %if "%{with_ssl}" == "yes" -BuildPreReq: openssl >= 0.9.8, openssl::with_threads = yes -PreReq: openssl >= 0.9.8, openssl::with_threads = yes +BuildPreReq: openssl >= 0.9.8 +PreReq: openssl >= 0.9.8 %endif %if "%{with_wrap}" == "yes" BuildPreReq: tcpwrappers @@ -105,8 +94,6 @@ BuildPreReq: python PreReq: python %endif -AutoReq: no -AutoReqProv: no %description Bacula is a set of computer programs that permit you (or the system @@ -138,30 +125,20 @@ -e "s;For Bacula release @VERSION@ .*;;" \ `find . -name "*.conf.in"` - # help specific platforms find fdatasync(3) - libs="" - case "%{l_platform -t}" in - *-sunos* ) libs="-lrt" ;; - esac - # use localhost as default host %{l_shtool} subst \ -e 's;hostname=.*;hostname=localhost;g' \ - -e 's;\(CONS_LIBS="-lreadline.*\)-ltermcap;\1-lncurses;g' \ configure # configure LIBS= case "%{l_platform -t}" in - *-linux*) ldfl="-L/usr/lib/termcap" ;; - *-sunos*) ldfl="-ldl" ;; + *-linux*) LIBS="-L/usr/lib/termcap";; esac CC="%{l_cc}" \ CFLAGS="%{l_cflags -O}" \ - CPPFLAGS="%{l_cppflags ncurses}" \ - LDFLAGS="%{l_ldflags} $ldfl" \ - LIBS="$libs -lz" \ - GREP="grep" \ + CPPFLAGS="%{l_cppflags}" \ + LDFLAGS="%{l_ldflags} $LIBS" \ ./configure \ --prefix=%{l_prefix} \ --with-dir-user=%{l_rusr} \ @@ -202,24 +179,17 @@ %endif --enable-wx-console=no \ --sysconfdir=%{l_prefix}/etc/bacula \ - --libexecdir=%{l_prefix}/libexec/bacula \ --mandir=%{l_prefix}/man \ --with-scriptdir=%{l_prefix}/libexec/bacula \ --with-working-dir=%{l_prefix}/var/bacula \ --with-pid-dir=%{l_prefix}/var/bacula/run \ --with-subsys-dir=%{l_prefix}/var/bacula/run/subsys \ - --with-archivedir=/tmp \ - --with-sbin-perm=0755 \ - --disable-shared \ - --disable-libtool \ --disable-nls # build %{l_make} %{l_mflags -O} %install - # clean up build cruft - rm -rf $RPM_BUILD_ROOT # create installation hierarchy %{l_shtool} mkdir -f -p -m 755 \ @@ -234,15 +204,18 @@ $RPM_BUILD_ROOT%{l_prefix}/var/bacula/run \ $RPM_BUILD_ROOT%{l_prefix}/var/bacula/run/subsys \ $RPM_BUILD_ROOT%{l_prefix}/man/man1 \ - $RPM_BUILD_ROOT%{l_prefix}/man/man8 + $RPM_BUILD_ROOT%{l_prefix}/man/man8 \ + $RPM_BUILD_ROOT%{l_prefix}/share/bacula/examples \ + $RPM_BUILD_ROOT%{l_prefix}/share/bacula/examples/default-config # install %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT # strip down installation - strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* 2>/dev/null || true + # do not strip binaries, to make it easier to diagnose problems + # strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* 2>/dev/null || true ( cd $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula && - for unwanted in startmysql stopmysql; do + for unwanted in bconsole startmysql stopmysql; do rm -f $unwanted done ) || exit $? @@ -250,22 +223,20 @@ # install additional files %{l_shtool} install -c -m 754 %{l_value -s -a} \ %{SOURCE bexec.sh} $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula/bexec - %{l_shtool} install -c -m 640 \ - src/console/bconsole.conf $RPM_BUILD_ROOT%{l_prefix}/etc/bacula/ - ## wrap binaries to avoid to specify "-c" for each run - #( cd $RPM_BUILD_ROOT%{l_prefix}/sbin - # for bin in bacula-dir bacula-fd bacula-sd \ - # bconsole bcopy bextract bls bscan dbcheck \ - # tray-monitor wx-console; do - # if [ -x $bin ]; then - # mv $bin $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula - # ln $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula/bexec ./$bin - # fi - # done - #) || exit $? + # wrap binaries to avoid to specify "-c" for each run + ( cd $RPM_BUILD_ROOT%{l_prefix}/sbin + for bin in bacula-dir bacula-fd bacula-sd \ + bconsole bcopy bextract bls bscan dbcheck \ + tray-monitor wx-console; do + if [ -x $bin ]; then + mv $bin $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula + ln $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula/bexec ./$bin + fi + done + ) || exit $? - # install runcommand script + # install run-command script %{l_shtool} install -c -m 755 %{l_value -s -a} \ -e 's,@with_server@,%{with_server},g' \ %{SOURCE rc.bacula} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ @@ -273,23 +244,27 @@ # determine installation files %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ %{l_files_std} \ - '%config(noreplace) %{l_prefix}/etc/bacula/*.conf' \ -%if "%{with_server}" == "yes" - '%attr(-,%{l_musr},%{l_rgrp}) %config(noreplace) %{l_prefix}/etc/bacula/bacula-dir.conf' \ - '%attr(-,%{l_musr},%{l_rgrp}) %config(noreplace) %{l_prefix}/etc/bacula/bacula-sd.conf' \ - '%attr(-,%{l_musr},%{l_rgrp}) %{l_prefix}/libexec/bacula/delete_catalog_backup' \ - '%attr(-,%{l_musr},%{l_rgrp}) %{l_prefix}/libexec/bacula/make_catalog_backup' \ -%endif + '%attr(700,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/bacula' \ + '%attr(700,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/bacula/run' \ + '%attr(700,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/bacula/run/subsys' \ '%attr(-,%{l_musr},%{l_rgrp}) %{l_prefix}/libexec/bacula/dvd-handler' \ '%attr(-,%{l_musr},%{l_rgrp}) %{l_prefix}/libexec/bacula/mtx-changer' \ - '%attr(700,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/bacula/run/subsys' \ - '%attr(700,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/bacula/run' \ - '%attr(700,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/bacula' +%if "%{with_server}" == "yes" + '%attr(-,%{l_musr},%{l_rgrp}) %{l_prefix}/libexec/bacula/make_catalog_backup' \ + '%attr(-,%{l_musr},%{l_rgrp}) %{l_prefix}/libexec/bacula/delete_catalog_backup'\ + '%config(noreplace) %{l_prefix}/etc/bacula/bacula-dir.conf' \ + '%config(noreplace) %{l_prefix}/etc/bacula/bacula-sd.conf' \ +%endif + '%config(noreplace) %{l_prefix}/etc/bacula/bacula-fd.conf' \ +%if "%{with_server}" == "yes" + '%attr(640,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/bacula/bacula-dir.conf' \ + '%attr(640,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/bacula/bacula-sd.conf' \ +%endif + '%attr(640,%{l_musr},%{l_mgrp}) %{l_prefix}/etc/bacula/bacula-fd.conf' %files -f files %clean - rm -rf $RPM_BUILD_ROOT %post # create initial database