Source2: Release_Notes-%{version}-%{release}.tar.gz
Source3: http://www.prdownloads.sourceforge.net/bacula/%{name}-docs-%{docs_version}.tar.gz
Source4: http://www.prdownloads.sourceforge.net/bacula/%{name}-rescue-%{_rescuever}.tar.gz
+Source5: bacula-2.2.7-postgresql.patch
BuildRoot: %{_tmppath}/%{name}-root
URL: http://www.bacula.org/
Vendor: The Bacula Team
%define python 0
%{?build_python:%define python 1}
+# specifically disallow build of mtx package if desired
+%define mtx 1
+%{?nobuild_mtx:%define mtx 0}
+
+# do we need to patch for old postgresql version?
+%define old_pgsql 0
+%{?build_old_pgsql:%define old_pgsql 1}
+
# Mandriva somehow forces the manpage file extension to bz2 rather than gz
%if %{mdk}
%define manpage_ext bz2
This build includes python scripting support.
%endif
-%if ! %{client_only}
+%if ! %{client_only} && %{mtx}
%package mtx
Summary: Bacula - The Network Backup Solution
Group: System Environment/Daemons
%if %{sqlite}
make sqlite3
%endif
-%if ! %{client_only}
+%if ! %{client_only} && %{mtx}
make mtx
%endif
%if %{bat}
%endif
cd ${cwd}
+%if %{wb3} || %{old_pgsql}
+patch -p3 src/cats/postgresql.c < %SOURCE5
+%endif
+
# patches for the bundled sqlite scripts
# patch the make_sqlite_tables script for installation bindir
mandir=$RPM_BUILD_ROOT%{_mandir} \
install
-%if ! %{client_only}
+%if ! %{client_only} && %{mtx}
cd %{depkgs}
make \
prefix=$RPM_BUILD_ROOT/usr \
%endif
# now clean up permissions that are left broken by the install
-%if ! %{client_only}
-chmod o-r $RPM_BUILD_ROOT%{script_dir}/query.sql
-%endif
chmod o-rwx $RPM_BUILD_ROOT%{working_dir}
%if %{gconsole} && ! %{rh8}
chmod 755 $RPM_BUILD_ROOT/usr/sbin/bacula-tray-monitor
echo "After the upgrade is complete, restore your catalog"
echo "with the following commands:"
echo "%{script_dir}/drop_sqlite3_tables"
- echo "%{sqlite_bindir}/sqlite3 $* bacula.db < %{working_dir}/bacula_backup.sql"
+ echo "cd %{working_dir}"
+ echo "%{sqlite_bindir}/sqlite3 $* bacula.db < bacula_backup.sql"
+ echo "chown bacula.bacula bacula.db"
exit 1
fi
# test for bacula database older than version 9 and sqlite3
%endif
-%if ! %{client_only}
+%if ! %{client_only} && %{mtx}
%files mtx
%defattr(-,root,root)
%attr(-, root, %{storage_daemon_group}) /usr/sbin/loaderinfo
%endif
%changelog
+* Fri Dec 28 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- add nobuild_mtx switch
+- add patch for postgresql.c for old postgresql versions
* Sat Nov 17 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
- switch to sqlite3
* Sun Nov 11 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
Source2: Release_Notes-%{version}-%{release}.tar.gz
Source3: http://www.prdownloads.sourceforge.net/bacula/%{name}-docs-%{docs_version}.tar.gz
Source4: http://www.prdownloads.sourceforge.net/bacula/%{name}-rescue-%{_rescuever}.tar.gz
+Source5: bacula-2.2.7-postgresql.patch
BuildRoot: %{_tmppath}/%{name}-root
URL: http://www.bacula.org/
Vendor: The Bacula Team
%define python 0
%{?build_python:%define python 1}
+# specifically disallow build of mtx package if desired
+%define mtx 1
+%{?nobuild_mtx:%define mtx 0}
+
+# do we need to patch for old postgresql version?
+%define old_pgsql 0
+%{?build_old_pgsql:%define old_pgsql 1}
+
# Mandriva somehow forces the manpage file extension to bz2 rather than gz
%if %{mdk}
%define manpage_ext bz2
This build includes python scripting support.
%endif
-%if ! %{client_only}
+%if ! %{client_only} && %{mtx}
%package mtx
Summary: Bacula - The Network Backup Solution
Group: System Environment/Daemons
%if %{sqlite}
make sqlite3
%endif
-%if ! %{client_only}
+%if ! %{client_only} && %{mtx}
make mtx
%endif
%if %{bat}
%endif
cd ${cwd}
+%if %{wb3} || %{old_pgsql}
+patch -p3 src/cats/postgresql.c < %SOURCE5
+%endif
+
# patches for the bundled sqlite scripts
# patch the make_sqlite_tables script for installation bindir
mandir=$RPM_BUILD_ROOT%{_mandir} \
install
-%if ! %{client_only}
+%if ! %{client_only} && %{mtx}
cd %{depkgs}
make \
prefix=$RPM_BUILD_ROOT/usr \
%endif
# now clean up permissions that are left broken by the install
-%if ! %{client_only}
-chmod o-r $RPM_BUILD_ROOT%{script_dir}/query.sql
-%endif
chmod o-rwx $RPM_BUILD_ROOT%{working_dir}
%if %{gconsole} && ! %{rh8}
chmod 755 $RPM_BUILD_ROOT/usr/sbin/bacula-tray-monitor
echo "After the upgrade is complete, restore your catalog"
echo "with the following commands:"
echo "%{script_dir}/drop_sqlite3_tables"
- echo "%{sqlite_bindir}/sqlite3 $* bacula.db < %{working_dir}/bacula_backup.sql"
+ echo "cd %{working_dir}"
+ echo "%{sqlite_bindir}/sqlite3 $* bacula.db < bacula_backup.sql"
+ echo "chown bacula.bacula bacula.db"
exit 1
fi
# test for bacula database older than version 9 and sqlite3
%endif
-%if ! %{client_only}
+%if ! %{client_only} && %{mtx}
%files mtx
%defattr(-,root,root)
%attr(-, root, %{storage_daemon_group}) /usr/sbin/loaderinfo
%endif
%changelog
+* Fri Dec 28 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- add nobuild_mtx switch
+- add patch for postgresql.c for old postgresql versions
* Sat Nov 17 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
- switch to sqlite3
* Sun Nov 11 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
Source2: Release_Notes-%{version}-%{release}.tar.gz
Source3: http://www.prdownloads.sourceforge.net/bacula/%{name}-docs-%{docs_version}.tar.gz
Source4: http://www.prdownloads.sourceforge.net/bacula/%{name}-rescue-%{_rescuever}.tar.gz
+Source5: bacula-2.2.7-postgresql.patch
BuildRoot: %{_tmppath}/%{name}-root
URL: http://www.bacula.org/
Vendor: The Bacula Team
%define python 0
%{?build_python:%define python 1}
+# specifically disallow build of mtx package if desired
+%define mtx 1
+%{?nobuild_mtx:%define mtx 0}
+
+# do we need to patch for old postgresql version?
+%define old_pgsql 0
+%{?build_old_pgsql:%define old_pgsql 1}
+
# Mandriva somehow forces the manpage file extension to bz2 rather than gz
%if %{mdk}
%define manpage_ext bz2
This build includes python scripting support.
%endif
-%if ! %{client_only}
+%if ! %{client_only} && %{mtx}
%package mtx
Summary: Bacula - The Network Backup Solution
Group: System Environment/Daemons
%if %{sqlite}
make sqlite3
%endif
-%if ! %{client_only}
+%if ! %{client_only} && %{mtx}
make mtx
%endif
%if %{bat}
%endif
cd ${cwd}
+%if %{wb3} || %{old_pgsql}
+patch -p3 src/cats/postgresql.c < %SOURCE5
+%endif
+
# patches for the bundled sqlite scripts
# patch the make_sqlite_tables script for installation bindir
mandir=$RPM_BUILD_ROOT%{_mandir} \
install
-%if ! %{client_only}
+%if ! %{client_only} && %{mtx}
cd %{depkgs}
make \
prefix=$RPM_BUILD_ROOT/usr \
%endif
# now clean up permissions that are left broken by the install
-%if ! %{client_only}
-chmod o-r $RPM_BUILD_ROOT%{script_dir}/query.sql
-%endif
chmod o-rwx $RPM_BUILD_ROOT%{working_dir}
%if %{gconsole} && ! %{rh8}
chmod 755 $RPM_BUILD_ROOT/usr/sbin/bacula-tray-monitor
echo "After the upgrade is complete, restore your catalog"
echo "with the following commands:"
echo "%{script_dir}/drop_sqlite3_tables"
- echo "%{sqlite_bindir}/sqlite3 $* bacula.db < %{working_dir}/bacula_backup.sql"
+ echo "cd %{working_dir}"
+ echo "%{sqlite_bindir}/sqlite3 $* bacula.db < bacula_backup.sql"
+ echo "chown bacula.bacula bacula.db"
exit 1
fi
# test for bacula database older than version 9 and sqlite3
%endif
-%if ! %{client_only}
+%if ! %{client_only} && %{mtx}
%files mtx
%defattr(-,root,root)
%attr(-, root, %{storage_daemon_group}) /usr/sbin/loaderinfo
%endif
%changelog
+* Fri Dec 28 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- add nobuild_mtx switch
+- add patch for postgresql.c for old postgresql versions
* Sat Nov 17 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
- switch to sqlite3
* Sun Nov 11 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>