1.1 --- a/bacula/bacula.spec Tue Aug 28 18:36:20 2012 +0200 1.2 +++ b/bacula/bacula.spec Tue Aug 28 18:36:30 2012 +0200 1.3 @@ -1,6 +1,6 @@ 1.4 ## 1.5 ## bacula.spec -- OpenPKG RPM Package Specification 1.6 -## Copyright (c) 2000-2010 OpenPKG Foundation e.V. <http://openpkg.net/> 1.7 +## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/> 1.8 ## 1.9 ## Permission to use, copy, modify, and distribute this software for 1.10 ## any purpose with or without fee is hereby granted, provided that 1.11 @@ -21,15 +21,6 @@ 1.12 ## SUCH DAMAGE. 1.13 ## 1.14 1.15 -# MSvB: 1.16 -# MSvB: Note, see http://www.bacula.org/en/?page=news 1.17 -# MSvB: for information on new configuration options. 1.18 -# MSvB: Warning! -L /pfx/lib is placed before locally 1.19 -# MSvB: built libraries (bacula-<ver>/src/cats...) 1.20 -# MSvB: which causes the old version of bacula to 1.21 -# MSvB: supply logic to the new version build! 1.22 -# MSvB: 1.23 - 1.24 # package information 1.25 Name: bacula 1.26 Summary: Network Backup Tool 1.27 @@ -40,8 +31,8 @@ 1.28 Class: PLUS 1.29 Group: System 1.30 License: GPL 1.31 -Version: 5.0.3 1.32 -Release: 20120208 1.33 +Version: 5.2.10 1.34 +Release: 20120629 1.35 1.36 # package options 1.37 %option with_server yes 1.38 @@ -67,15 +58,13 @@ 1.39 Patch0: bacula.patch 1.40 1.41 # build information 1.42 -Prefix: %{l_prefix} 1.43 -BuildRoot: %{l_buildroot} 1.44 -BuildPreReq: OpenPKG, openpkg >= 20060823, make, gcc, gcc::with_cxx = yes 1.45 -PreReq: OpenPKG, openpkg >= 20060823 1.46 -BuildPreReq: ncurses, readline, zlib 1.47 -PreReq: ncurses, readline, zlib 1.48 +BuildPreReq: OpenPKG, openpkg >= 20100101, make, gcc, gcc::with_cxx = yes 1.49 +PreReq: OpenPKG, openpkg >= 20100101 1.50 +BuildPreReq: readline, zlib 1.51 +PreReq: readline, zlib 1.52 %if "%{with_ssl}" == "yes" 1.53 -BuildPreReq: openssl >= 0.9.8, openssl::with_threads = yes 1.54 -PreReq: openssl >= 0.9.8, openssl::with_threads = yes 1.55 +BuildPreReq: openssl >= 0.9.8 1.56 +PreReq: openssl >= 0.9.8 1.57 %endif 1.58 %if "%{with_wrap}" == "yes" 1.59 BuildPreReq: tcpwrappers 1.60 @@ -105,8 +94,6 @@ 1.61 BuildPreReq: python 1.62 PreReq: python 1.63 %endif 1.64 -AutoReq: no 1.65 -AutoReqProv: no 1.66 1.67 %description 1.68 Bacula is a set of computer programs that permit you (or the system 1.69 @@ -138,30 +125,20 @@ 1.70 -e "s;For Bacula release @VERSION@ .*;;" \ 1.71 `find . -name "*.conf.in"` 1.72 1.73 - # help specific platforms find fdatasync(3) 1.74 - libs="" 1.75 - case "%{l_platform -t}" in 1.76 - *-sunos* ) libs="-lrt" ;; 1.77 - esac 1.78 - 1.79 # use localhost as default host 1.80 %{l_shtool} subst \ 1.81 -e 's;hostname=.*;hostname=localhost;g' \ 1.82 - -e 's;\(CONS_LIBS="-lreadline.*\)-ltermcap;\1-lncurses;g' \ 1.83 configure 1.84 1.85 # configure 1.86 LIBS= 1.87 case "%{l_platform -t}" in 1.88 - *-linux*) ldfl="-L/usr/lib/termcap" ;; 1.89 - *-sunos*) ldfl="-ldl" ;; 1.90 + *-linux*) LIBS="-L/usr/lib/termcap";; 1.91 esac 1.92 CC="%{l_cc}" \ 1.93 CFLAGS="%{l_cflags -O}" \ 1.94 - CPPFLAGS="%{l_cppflags ncurses}" \ 1.95 - LDFLAGS="%{l_ldflags} $ldfl" \ 1.96 - LIBS="$libs -lz" \ 1.97 - GREP="grep" \ 1.98 + CPPFLAGS="%{l_cppflags}" \ 1.99 + LDFLAGS="%{l_ldflags} $LIBS" \ 1.100 ./configure \ 1.101 --prefix=%{l_prefix} \ 1.102 --with-dir-user=%{l_rusr} \ 1.103 @@ -202,24 +179,17 @@ 1.104 %endif 1.105 --enable-wx-console=no \ 1.106 --sysconfdir=%{l_prefix}/etc/bacula \ 1.107 - --libexecdir=%{l_prefix}/libexec/bacula \ 1.108 --mandir=%{l_prefix}/man \ 1.109 --with-scriptdir=%{l_prefix}/libexec/bacula \ 1.110 --with-working-dir=%{l_prefix}/var/bacula \ 1.111 --with-pid-dir=%{l_prefix}/var/bacula/run \ 1.112 --with-subsys-dir=%{l_prefix}/var/bacula/run/subsys \ 1.113 - --with-archivedir=/tmp \ 1.114 - --with-sbin-perm=0755 \ 1.115 - --disable-shared \ 1.116 - --disable-libtool \ 1.117 --disable-nls 1.118 1.119 # build 1.120 %{l_make} %{l_mflags -O} 1.121 1.122 %install 1.123 - # clean up build cruft 1.124 - rm -rf $RPM_BUILD_ROOT 1.125 1.126 # create installation hierarchy 1.127 %{l_shtool} mkdir -f -p -m 755 \ 1.128 @@ -234,15 +204,18 @@ 1.129 $RPM_BUILD_ROOT%{l_prefix}/var/bacula/run \ 1.130 $RPM_BUILD_ROOT%{l_prefix}/var/bacula/run/subsys \ 1.131 $RPM_BUILD_ROOT%{l_prefix}/man/man1 \ 1.132 - $RPM_BUILD_ROOT%{l_prefix}/man/man8 1.133 + $RPM_BUILD_ROOT%{l_prefix}/man/man8 \ 1.134 + $RPM_BUILD_ROOT%{l_prefix}/share/bacula/examples \ 1.135 + $RPM_BUILD_ROOT%{l_prefix}/share/bacula/examples/default-config 1.136 1.137 # install 1.138 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT 1.139 1.140 # strip down installation 1.141 - strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* 2>/dev/null || true 1.142 + # do not strip binaries, to make it easier to diagnose problems 1.143 + # strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* 2>/dev/null || true 1.144 ( cd $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula && 1.145 - for unwanted in startmysql stopmysql; do 1.146 + for unwanted in bconsole startmysql stopmysql; do 1.147 rm -f $unwanted 1.148 done 1.149 ) || exit $? 1.150 @@ -250,22 +223,20 @@ 1.151 # install additional files 1.152 %{l_shtool} install -c -m 754 %{l_value -s -a} \ 1.153 %{SOURCE bexec.sh} $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula/bexec 1.154 - %{l_shtool} install -c -m 640 \ 1.155 - src/console/bconsole.conf $RPM_BUILD_ROOT%{l_prefix}/etc/bacula/ 1.156 1.157 - ## wrap binaries to avoid to specify "-c" for each run 1.158 - #( cd $RPM_BUILD_ROOT%{l_prefix}/sbin 1.159 - # for bin in bacula-dir bacula-fd bacula-sd \ 1.160 - # bconsole bcopy bextract bls bscan dbcheck \ 1.161 - # tray-monitor wx-console; do 1.162 - # if [ -x $bin ]; then 1.163 - # mv $bin $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula 1.164 - # ln $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula/bexec ./$bin 1.165 - # fi 1.166 - # done 1.167 - #) || exit $? 1.168 + # wrap binaries to avoid to specify "-c" for each run 1.169 + ( cd $RPM_BUILD_ROOT%{l_prefix}/sbin 1.170 + for bin in bacula-dir bacula-fd bacula-sd \ 1.171 + bconsole bcopy bextract bls bscan dbcheck \ 1.172 + tray-monitor wx-console; do 1.173 + if [ -x $bin ]; then 1.174 + mv $bin $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula 1.175 + ln $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula/bexec ./$bin 1.176 + fi 1.177 + done 1.178 + ) || exit $? 1.179 1.180 - # install runcommand script 1.181 + # install run-command script 1.182 %{l_shtool} install -c -m 755 %{l_value -s -a} \ 1.183 -e 's,@with_server@,%{with_server},g' \ 1.184 %{SOURCE rc.bacula} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ 1.185 @@ -273,23 +244,27 @@ 1.186 # determine installation files 1.187 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ 1.188 %{l_files_std} \ 1.189 - '%config(noreplace) %{l_prefix}/etc/bacula/*.conf' \ 1.190 -%if "%{with_server}" == "yes" 1.191 - '%attr(-,%{l_musr},%{l_rgrp}) %config(noreplace) %{l_prefix}/etc/bacula/bacula-dir.conf' \ 1.192 - '%attr(-,%{l_musr},%{l_rgrp}) %config(noreplace) %{l_prefix}/etc/bacula/bacula-sd.conf' \ 1.193 - '%attr(-,%{l_musr},%{l_rgrp}) %{l_prefix}/libexec/bacula/delete_catalog_backup' \ 1.194 - '%attr(-,%{l_musr},%{l_rgrp}) %{l_prefix}/libexec/bacula/make_catalog_backup' \ 1.195 -%endif 1.196 + '%attr(700,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/bacula' \ 1.197 + '%attr(700,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/bacula/run' \ 1.198 + '%attr(700,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/bacula/run/subsys' \ 1.199 '%attr(-,%{l_musr},%{l_rgrp}) %{l_prefix}/libexec/bacula/dvd-handler' \ 1.200 '%attr(-,%{l_musr},%{l_rgrp}) %{l_prefix}/libexec/bacula/mtx-changer' \ 1.201 - '%attr(700,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/bacula/run/subsys' \ 1.202 - '%attr(700,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/bacula/run' \ 1.203 - '%attr(700,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/bacula' 1.204 +%if "%{with_server}" == "yes" 1.205 + '%attr(-,%{l_musr},%{l_rgrp}) %{l_prefix}/libexec/bacula/make_catalog_backup' \ 1.206 + '%attr(-,%{l_musr},%{l_rgrp}) %{l_prefix}/libexec/bacula/delete_catalog_backup'\ 1.207 + '%config(noreplace) %{l_prefix}/etc/bacula/bacula-dir.conf' \ 1.208 + '%config(noreplace) %{l_prefix}/etc/bacula/bacula-sd.conf' \ 1.209 +%endif 1.210 + '%config(noreplace) %{l_prefix}/etc/bacula/bacula-fd.conf' \ 1.211 +%if "%{with_server}" == "yes" 1.212 + '%attr(640,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/bacula/bacula-dir.conf' \ 1.213 + '%attr(640,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/bacula/bacula-sd.conf' \ 1.214 +%endif 1.215 + '%attr(640,%{l_musr},%{l_mgrp}) %{l_prefix}/etc/bacula/bacula-fd.conf' 1.216 1.217 %files -f files 1.218 1.219 %clean 1.220 - rm -rf $RPM_BUILD_ROOT 1.221 1.222 %post 1.223 # create initial database