Wed, 07 Jan 2009 00:31:22 +0100
Complete package spec and correct various build problems.
bacula/bacula.patch | file | annotate | diff | comparison | revisions | |
bacula/bacula.spec | file | annotate | diff | comparison | revisions |
1.1 --- a/bacula/bacula.patch Wed Jan 07 00:25:41 2009 +0100 1.2 +++ b/bacula/bacula.patch Wed Jan 07 00:31:22 2009 +0100 1.3 @@ -1,6 +1,7 @@ 1.4 Index: manpages/Makefile.in 1.5 ---- manpages/Makefile.in.orig 2007-04-24 17:47:01 +0200 1.6 -+++ manpages/Makefile.in 2008-07-09 07:45:59 +0200 1.7 +diff -Nau manpages/Makefile.in.orig manpages/Makefile.in 1.8 +--- manpages/Makefile.in.orig 2007-04-24 17:47:01.000000000 +0200 1.9 ++++ manpages/Makefile.in 2008-11-19 22:55:01.066689027 +0100 1.10 @@ -20,23 +20,21 @@ 1.11 install: 1.12 $(MKDIR) $(DESTDIR)/$(mandir)/man8 1.13 @@ -32,25 +33,30 @@ 1.14 1.15 clean: dummy 1.16 Index: scripts/bacula.in 1.17 ---- scripts/bacula.in.orig 2008-07-06 15:06:15 +0200 1.18 -+++ scripts/bacula.in 2008-07-09 07:53:22 +0200 1.19 -@@ -15,30 +15,36 @@ 1.20 +diff -Nau scripts/bacula.in.orig scripts/bacula.in 1.21 +--- scripts/bacula.in.orig 2008-07-06 15:06:15.000000000 +0200 1.22 ++++ scripts/bacula.in 2008-11-19 23:08:15.438347068 +0100 1.23 +@@ -13,32 +13,38 @@ 1.24 + # easier to "steal" this code for the development 1.25 + # environment where they are different. 1.26 # 1.27 - SCRIPTDIR=@scriptdir@ 1.28 +-SCRIPTDIR=@scriptdir@ 1.29 ++SCRIPTDIR=@libexecdir@ 1.30 1.31 +-case "$1" in 1.32 +action=$1 1.33 +debug=$2 1.34 +[ -n "$3" ] && enable_dir=$3 || enable_dir=yes 1.35 +[ -n "$4" ] && enable_sd=$4 || enable_sd=yes 1.36 +[ -n "$5" ] && enable_fd=$5 || enable_fd=yes 1.37 -+ 1.38 - case "$1" in 1.39 ++ 1.40 ++case "$action" in 1.41 start) 1.42 - [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd $1 $2 1.43 - [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd $1 $2 1.44 - [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir $1 $2 1.45 -+ [ "$enable_sd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd $1 $2 1.46 -+ [ "$enable_fd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd $1 $2 1.47 ++ [ "$enable_sd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd $1 $2 1.48 ++ [ "$enable_fd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd $1 $2 1.49 + [ "$enable_dir" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir $1 $2 1.50 ;; 1.51 1.52 @@ -59,8 +65,8 @@ 1.53 - [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd $1 $2 1.54 - [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd $1 $2 1.55 - [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir $1 $2 1.56 -+ [ "$enable_fd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd $1 $2 1.57 -+ [ "$enable_sd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd $1 $2 1.58 ++ [ "$enable_sd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd $1 $2 1.59 ++ [ "$enable_fd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd $1 $2 1.60 + [ "$enable_dir" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir $1 $2 1.61 ;; 1.62 1.63 @@ -76,15 +82,16 @@ 1.64 - [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd status 1.65 - [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd status 1.66 - [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir status 1.67 -+ [ "$enable_sd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd status 1.68 -+ [ "$enable_fd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd status 1.69 ++ [ "$enable_sd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd status 1.70 ++ [ "$enable_fd" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd status 1.71 + [ "$enable_dir" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir status 1.72 ;; 1.73 1.74 *) 1.75 Index: scripts/btraceback.in 1.76 ---- scripts/btraceback.in.orig 2008-06-01 10:49:00 +0200 1.77 -+++ scripts/btraceback.in 2008-07-09 07:45:59 +0200 1.78 +diff -Nau scripts/btraceback.in.orig scripts/btraceback.in 1.79 +--- scripts/btraceback.in.orig 2008-06-01 10:49:00.000000000 +0200 1.80 ++++ scripts/btraceback.in 2008-11-19 23:09:44.305993544 +0100 1.81 @@ -12,6 +12,9 @@ 1.82 PNAME="${PNAME} on `hostname`" 1.83 if test `uname -s` = SunOS ; then 1.84 @@ -96,8 +103,9 @@ 1.85 | @sbindir@/bsmtp -h @smtp_host@ -f @dump_email@ -s "Bacula DBX traceback of ${PNAME}" @dump_email@ 1.86 else 1.87 Index: src/dird/bacula-dir.conf.in 1.88 ---- src/dird/bacula-dir.conf.in.orig 2008-06-19 21:44:34 +0200 1.89 -+++ src/dird/bacula-dir.conf.in 2008-07-09 07:45:59 +0200 1.90 +diff -Nau src/dird/bacula-dir.conf.in.orig src/dird/bacula-dir.conf.in 1.91 +--- src/dird/bacula-dir.conf.in.orig 2008-06-19 21:44:34.000000000 +0200 1.92 ++++ src/dird/bacula-dir.conf.in 2008-11-19 23:10:11.001069502 +0100 1.93 @@ -29,7 +29,8 @@ 1.94 Level = Incremental 1.95 Client = @hostname@-fd
2.1 --- a/bacula/bacula.spec Wed Jan 07 00:25:41 2009 +0100 2.2 +++ b/bacula/bacula.spec Wed Jan 07 00:31:22 2009 +0100 2.3 @@ -32,7 +32,7 @@ 2.4 Group: System 2.5 License: GPL 2.6 Version: 2.4.3 2.7 -Release: 20081013 2.8 +Release: 20081118 2.9 2.10 # package options 2.11 %option with_server yes 2.12 @@ -62,8 +62,8 @@ 2.13 BuildRoot: %{l_buildroot} 2.14 BuildPreReq: OpenPKG, openpkg >= 20060823, make, gcc, gcc::with_cxx = yes 2.15 PreReq: OpenPKG, openpkg >= 20060823 2.16 -BuildPreReq: readline, zlib 2.17 -PreReq: readline, zlib 2.18 +BuildPreReq: ncurses, readline, zlib 2.19 +PreReq: ncurses, readline, zlib 2.20 %if "%{with_ssl}" == "yes" 2.21 BuildPreReq: openssl >= 0.9.8 2.22 PreReq: openssl >= 0.9.8 2.23 @@ -129,9 +129,16 @@ 2.24 -e "s;For Bacula release @VERSION@ .*;;" \ 2.25 `find . -name "*.conf.in"` 2.26 2.27 + # help specific platforms find fdatasync(3) 2.28 + libs="" 2.29 + case "%{l_platform -t}" in 2.30 + *-sunos* ) libs="-lrt" ;; 2.31 + esac 2.32 + 2.33 # use localhost as default host 2.34 %{l_shtool} subst \ 2.35 -e 's;hostname=.*;hostname=localhost;g' \ 2.36 + -e 's;\(CONS_LIBS="-lreadline.*\)-ltermcap;\1-lncurses;g' \ 2.37 configure 2.38 2.39 # configure 2.40 @@ -141,8 +148,9 @@ 2.41 esac 2.42 CC="%{l_cc}" \ 2.43 CFLAGS="%{l_cflags -O}" \ 2.44 - CPPFLAGS="%{l_cppflags}" \ 2.45 + CPPFLAGS="%{l_cppflags ncurses}" \ 2.46 LDFLAGS="%{l_ldflags} $LIBS" \ 2.47 + LIBS="$libs" \ 2.48 ./configure \ 2.49 --prefix=%{l_prefix} \ 2.50 --with-dir-user=%{l_rusr} \ 2.51 @@ -183,11 +191,14 @@ 2.52 %endif 2.53 --enable-wx-console=no \ 2.54 --sysconfdir=%{l_prefix}/etc/bacula \ 2.55 + --libexecdir=%{l_prefix}/libexec/bacula \ 2.56 --mandir=%{l_prefix}/man \ 2.57 --with-scriptdir=%{l_prefix}/libexec/bacula \ 2.58 --with-working-dir=%{l_prefix}/var/bacula \ 2.59 --with-pid-dir=%{l_prefix}/var/bacula/run \ 2.60 --with-subsys-dir=%{l_prefix}/var/bacula/run/subsys \ 2.61 + --with-archivedir=/tmp \ 2.62 + --with-sbin-perm=0755 \ 2.63 --disable-nls 2.64 2.65 # build 2.66 @@ -217,10 +228,9 @@ 2.67 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT 2.68 2.69 # strip down installation 2.70 - # do not strip binaries, to make it easier to diagnose problems 2.71 - # strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* 2>/dev/null || true 2.72 + strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* 2>/dev/null || true 2.73 ( cd $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula && 2.74 - for unwanted in bconsole startmysql stopmysql; do 2.75 + for unwanted in startmysql stopmysql; do 2.76 rm -f $unwanted 2.77 done 2.78 ) || exit $? 2.79 @@ -228,18 +238,20 @@ 2.80 # install additional files 2.81 %{l_shtool} install -c -m 754 %{l_value -s -a} \ 2.82 %{SOURCE bexec.sh} $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula/bexec 2.83 + %{l_shtool} install -c -m 640 \ 2.84 + src/console/bconsole.conf $RPM_BUILD_ROOT%{l_prefix}/etc/bacula/ 2.85 2.86 - # wrap binaries to avoid to specify "-c" for each run 2.87 - ( cd $RPM_BUILD_ROOT%{l_prefix}/sbin 2.88 - for bin in bacula-dir bacula-fd bacula-sd \ 2.89 - bconsole bcopy bextract bls bscan dbcheck \ 2.90 - tray-monitor wx-console; do 2.91 - if [ -x $bin ]; then 2.92 - mv $bin $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula 2.93 - ln $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula/bexec ./$bin 2.94 - fi 2.95 - done 2.96 - ) || exit $? 2.97 + ## wrap binaries to avoid to specify "-c" for each run 2.98 + #( cd $RPM_BUILD_ROOT%{l_prefix}/sbin 2.99 + # for bin in bacula-dir bacula-fd bacula-sd \ 2.100 + # bconsole bcopy bextract bls bscan dbcheck \ 2.101 + # tray-monitor wx-console; do 2.102 + # if [ -x $bin ]; then 2.103 + # mv $bin $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula 2.104 + # ln $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula/bexec ./$bin 2.105 + # fi 2.106 + # done 2.107 + #) || exit $? 2.108 2.109 # install run-command script 2.110 %{l_shtool} install -c -m 755 %{l_value -s -a} \