From bf9089a8104dab44a645bdc368890d331deda0cc Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 3 Jan 2012 16:05:22 +0100 Subject: [PATCH] Merge libbaccats variants together --- bacula.spec | 324 ++++++++-------------------------------------------- 1 file changed, 48 insertions(+), 276 deletions(-) diff --git a/bacula.spec b/bacula.spec index 0cb6830..fcc6e67 100644 --- a/bacula.spec +++ b/bacula.spec @@ -3,7 +3,7 @@ Name: bacula Version: 5.2.3 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Cross platform network backup for Linux, Unix, Mac and Windows # See LICENSE for details License: GPLv2 with exceptions @@ -83,7 +83,9 @@ Bacula is a set of programs that allow you to manage the backup, recovery, and verification of computer data across a network of different computers. It is based on a client/server architecture. -This package contains basic Bacula libraries. +This package contains basic Bacula libraries, which are used by all +Bacula programs. You have to select your preferred catalog library +through the alternatives system. %package common @@ -103,12 +105,20 @@ different computers. It is based on a client/server architecture. This package contains files common to all Bacula daemons. -%package director-common -Summary: Common Bacula Director files +%package director +Summary: Bacula Director files Group: System Environment/Daemons -Requires: bacula-director = %{version}-%{release} Requires: bacula-common%{?_isa} = %{version}-%{release} Requires: logwatch +# Director backends merged into core. +Provides: bacula-director-common = %{version}-%{release} +Obsoletes: bacula-director-common < 5.2.3-5 +Provides: bacula-director-mysql = %{version}-%{release} +Obsoletes: bacula-director-mysql < 5.2.3-5 +Provides: bacula-director-sqlite = %{version}-%{release} +Obsoletes: bacula-director-sqlite < 5.2.3-5 +Provides: bacula-director-postgresql = %{version}-%{release} +Obsoletes: bacula-director-postgresql < 5.2.3-5 %if 0%{?fedora} >= 15 || 0%{?rhel} > 6 Requires(post): systemd-sysv Requires(post): systemd-units @@ -121,67 +131,12 @@ Requires(preun): /sbin/service Requires(postun): /sbin/service %endif -%description director-common +%description director Bacula is a set of programs that allow you to manage the backup, recovery, and verification of computer data across a network of different computers. It is based on a client/server architecture. -This package contains the common director files, which are shared -between all database back-ends. You have to select a possible -database back-end though, which provides the needed bacula-director -dependency. Please choose from bacula-director-mysql, -bacula-director-sqlite or bacula-director-postgresql. - - -%package director-mysql -Summary: Bacula Director with MySQL database support -Group: System Environment/Daemons -Provides: bacula-director = %{version}-%{release} -Requires: bacula-director-common%{?_isa} = %{version}-%{release} -Requires: bacula-common%{?_isa} = %{version}-%{release} - -%description director-mysql -Bacula is a set of programs that allow you to manage the backup, -recovery, and verification of computer data across a network of -different computers. It is based on a client/server architecture. - -This package contains the bacula director, the server which controls -your backup run. -This director has support for the MySQL database. - - -%package director-sqlite -Summary: Bacula Director with sqlite database support -Group: System Environment/Daemons -Provides: bacula-director = %{version}-%{release} -Requires: bacula-director-common%{?_isa} = %{version}-%{release} -Requires: bacula-common%{?_isa} = %{version}-%{release} - -%description director-sqlite -Bacula is a set of programs that allow you to manage the backup, -recovery, and verification of computer data across a network of -different computers. It is based on a client/server architecture. - -This package contains the bacula director, the server which controls -your backup run. -This director has support for the sqlite database. - - -%package director-postgresql -Summary: Bacula Director with PostgresSQL database support -Group: System Environment/Daemons -Provides: bacula-director = %{version}-%{release} -Requires: bacula-director-common%{?_isa} = %{version}-%{release} -Requires: bacula-common%{?_isa} = %{version}-%{release} - -%description director-postgresql -Bacula is a set of programs that allow you to manage the backup, -recovery, and verification of computer data across a network of -different computers. It is based on a client/server architecture. - -This package contains the bacula director, the server which controls -your backup run. -This director has support for the PostgresSQL database. +This package contains the director files. %package storage @@ -488,35 +443,19 @@ rm -f %{buildroot}%{_libdir}/*.la rm -rf %{buildroot} -%post director-mysql +%post libs /usr/sbin/alternatives --install %{_libdir}/libbaccats-%{version}.so libbaccats-%{version}.so %{_libdir}/libbaccats-mysql-%{version}.so 50 - - -%post director-sqlite /usr/sbin/alternatives --install %{_libdir}/libbaccats-%{version}.so libbaccats-%{version}.so %{_libdir}/libbaccats-sqlite3-%{version}.so 40 - - -%post director-postgresql /usr/sbin/alternatives --install %{_libdir}/libbaccats-%{version}.so libbaccats-%{version}.so %{_libdir}/libbaccats-postgresql-%{version}.so 60 +/sbin/ldconfig - -%preun director-mysql +%preun libs if [ "$1" = 0 ]; then /usr/sbin/alternatives --remove libbaccats-%{version}.so %{_libdir}/libbaccats-mysql-%{version}.so -fi - - -%preun director-sqlite -if [ "$1" = 0 ]; then /usr/sbin/alternatives --remove libbaccats-%{version}.so %{_libdir}/libbaccats-sqlite3-%{version}.so -fi - - -%preun director-postgresql -if [ "$1" = 0 ]; then /usr/sbin/alternatives --remove libbaccats-%{version}.so %{_libdir}/libbaccats-postgresql-%{version}.so fi - +/sbin/ldconfig %pre common getent group %username >/dev/null || groupadd -g %uid -r %username &>/dev/null || : @@ -565,14 +504,14 @@ fi /bin/systemctl try-restart bacula-fd.service >/dev/null 2>&1 || : -%post director-common +%post director if [ $1 -eq 1 ] ; then # Initial installation /bin/systemctl daemon-reload >/dev/null 2>&1 || : fi -%preun director-common +%preun director if [ $1 -eq 0 ] ; then # Package removal, not upgrade /bin/systemctl --no-reload disable bacula-dir.service > /dev/null 2>&1 || : @@ -580,7 +519,7 @@ if [ $1 -eq 0 ] ; then fi -%postun director-common +%postun director /bin/systemctl daemon-reload >/dev/null 2>&1 || : if [ $1 -ge 1 ] ; then # Package upgrade, not uninstall @@ -588,7 +527,7 @@ if [ $1 -ge 1 ] ; then fi -%triggerun director-common -- bacula-director-common < 5.0.3-10 +%triggerun director -- bacula-director-common < 5.0.3-10 # Save the current service runlevel info # User must manually run systemd-sysv-convert --apply bacula-dir # to migrate them to systemd targets @@ -651,18 +590,18 @@ if [ "$1" -ge "1" ]; then fi -%post director-common +%post director /sbin/chkconfig --add bacula-dir -%preun director-common +%preun director if [ "$1" = 0 ]; then /sbin/service bacula-dir stop >/dev/null 2>&1 || : /sbin/chkconfig --del bacula-dir fi -%postun director-common +%postun director if [ "$1" -ge "1" ]; then /sbin/service bacula-dir condrestart >/dev/null 2>&1 || : fi @@ -690,6 +629,16 @@ fi %defattr(-,root,root,-) %{_libdir}/libbac-%{version}.so %{_libdir}/libbac.so +%{_libdir}/libbaccats.so +%attr(755,root,root) %ghost %{_libdir}/libbaccats-%{version}.so +%{_libdir}/libbaccats-mysql-%{version}.so +%{_libdir}/libbaccats-mysql.so +%{_libdir}/libbaccats-postgresql-%{version}.so +%{_libdir}/libbaccats-postgresql.so +%{_libdir}/libbaccats-sqlite3-%{version}.so +%{_libdir}/libbaccats-sqlite3.so +%{_libdir}/libbacsql.so +%{_libdir}/libbacsql-%{version}.so %{_libdir}/libbaccfg-%{version}.so %{_libdir}/libbaccfg.so %{_libdir}/libbacfind-%{version}.so @@ -713,7 +662,7 @@ fi %dir %attr(750, bacula, bacula) %{_localstatedir}/spool/bacula %{_sbindir}/bacula-checkconf -%files director-common +%files director %defattr(-,root,root,-) %doc updatedb %attr(640,root,bacula) %config(noreplace) %{_sysconfdir}/bacula/bacula-dir.conf @@ -730,18 +679,12 @@ fi %endif %{_sbindir}/bacula-dir %{_sbindir}/bregex -%{_sbindir}/bscan %{_sbindir}/bsmtp %{_sbindir}/bwild %{_sbindir}/dbcheck -%{_libdir}/libbaccats.so -%attr(755,root,root) %ghost %{_libdir}/libbaccats-%{version}.so -%{_libdir}/libbacsql.so -%{_libdir}/libbacsql-%{version}.so %{_mandir}/man1/bsmtp.1.gz %{_mandir}/man8/bacula-dir.8.gz %{_mandir}/man8/bregex.8.gz -%{_mandir}/man8/bscan.8.gz %{_mandir}/man8/bwild.8.gz %{_mandir}/man8/dbcheck.8.gz %{_libexecdir}/%{name}/create_bacula_database @@ -753,33 +696,18 @@ fi %{_libexecdir}/%{name}/make_catalog_backup %{_libexecdir}/%{name}/make_catalog_backup.pl %{_libexecdir}/%{name}/update_bacula_tables - -%files director-mysql -%defattr(-,root,root,-) -%{_libdir}/libbaccats-mysql-%{version}.so -%{_libdir}/libbaccats-mysql.so %{_libexecdir}/%{name}/create_mysql_database %{_libexecdir}/%{name}/drop_mysql_database %{_libexecdir}/%{name}/drop_mysql_tables %{_libexecdir}/%{name}/grant_mysql_privileges %{_libexecdir}/%{name}/make_mysql_tables %{_libexecdir}/%{name}/update_mysql_tables - -%files director-sqlite -%defattr(-,root,root,-) -%{_libdir}/libbaccats-sqlite3-%{version}.so -%{_libdir}/libbaccats-sqlite3.so %{_libexecdir}/%{name}/create_sqlite3_database %{_libexecdir}/%{name}/drop_sqlite3_database %{_libexecdir}/%{name}/drop_sqlite3_tables %{_libexecdir}/%{name}/grant_sqlite3_privileges %{_libexecdir}/%{name}/make_sqlite3_tables %{_libexecdir}/%{name}/update_sqlite3_tables - -%files director-postgresql -%defattr(-,root,root,-) -%{_libdir}/libbaccats-postgresql-%{version}.so -%{_libdir}/libbaccats-postgresql.so %{_libexecdir}/%{name}/create_postgresql_database %{_libexecdir}/%{name}/drop_postgresql_database %{_libexecdir}/%{name}/drop_postgresql_tables @@ -793,6 +721,7 @@ fi %{_sbindir}/bcopy %{_sbindir}/bextract %{_sbindir}/bls +%{_sbindir}/bscan %{_sbindir}/btape %config(noreplace) %{_sysconfdir}/bacula/bacula-sd.conf %config(noreplace) %{_sysconfdir}/sysconfig/bacula-sd @@ -809,6 +738,7 @@ fi %{_mandir}/man8/bcopy.8.gz %{_mandir}/man8/bextract.8.gz %{_mandir}/man8/bls.8.gz +%{_mandir}/man8/bscan.8.gz %{_mandir}/man8/btape.8.gz %files client @@ -869,6 +799,13 @@ fi %changelog +* Tue Jan 03 2012 Simone Caronni - 5.2.3-5 +- Trim changelog. +- Merge bacula-director backends and move libbacats alternatives + to bacula-libs. +- Move bscan to bacula-storage now that is dependent only on + bacula-libs. + * Tue Dec 20 2011 Simone Caronni - 5.2.3-4 - Changing uid from 33 per previous discussion, static uid already allocated is 133: @@ -1057,168 +994,3 @@ fi * Mon Jan 25 2010 Jon Ciesla - 3.0.3-2 -- Rebuild for Qt 4.6.0 RC1 in F13 (was built against Beta 1 with unstable ABI) - -* Mon Oct 19 2009 Jon Ciesla - 3.0.2-4 -- rebuilt with new openssl - -* Mon Aug 10 2009 Jon Ciesla - 3.0.2-1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Tue Jul 21 2009 Jon Ciesla - 2.4.4-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Fri Jan 23 2009 Jon Ciesla - 2.4.3-4 -- Fixed dependency "issues" #473627 by adding the sysconfdir subpackage. - -* Mon Nov 17 2008 Jon Ciesla - 2.4.3-3 -- Added upstream orphaned jobs patch. -- Fixed logrotate file. - -* Mon Nov 10 2008 Jon Ciesla - 2.4.3-2 -- Added bat. BZ 470800. - -* Wed Oct 22 2008 Jon Ciesla - 2.4.3-1 -- Update to 2.4.3. - -* Tue Sep 09 2008 Jon Ciesla - 2.4.2-2 -- Logrotate fix. BZ 457894. -- Alternatives fix. BZ 458432. - -* Thu Jul 31 2008 Jon Ciesla - 2.4.2-1 -- Update to 2.4.2. - -* Wed Jul 30 2008 Andreas Thienemann - 2.2.8-2 -- Fixed %%{fedora} comparision, making bacula-sqlite build on rawhide - -* Fri Jul 25 2008 Jon Ciesla - 2.2.8-1 -- Update to 2.2.8. BZ 446461. -- Dropped director and storage DB-server hard Reqs. BZ 426788. -- .desktop fixes. BZ 450278, 426789. -- Updated config patch. -- Dropped wxconsole patch, applied upstream. -- Updated pamd patch. -- Dropped ampm patch, applied upstream. -- Dropped maxbyteslist patch, N/A. -- Dropped maxwaittime patch, applied upstream. -- Dropped scheduler-next-hour patch, applied upstream. -- Dropped verify patch, applied upstream. -- Dropped tls-disconnect patch, applied upstream. -- Fix for 426791. -- Introduced patch fuzz workaround, will fix. - -* Mon Jul 7 2008 Tom "spot" Callaway - 2.0.3-14 -- fix conditional comparison -- fix license tag - -* Mon Jan 07 2008 Tom "spot" Callaway - 2.0.3-13 -- add BR: dvipdfm - -* Thu Dec 06 2007 Release Engineering - 2.0.3-12 - - Rebuild for deps - -* Wed Sep 5 2007 Andreas Thienemann - 2.0.3-11 -- Remove spooldir in client, fixing #251879 -- Remove dependency on libtermcap, fixing #251158 - -* Wed Aug 29 2007 Fedora Release Engineering - 2.0.3-10 -- Rebuild for selinux ppc32 issue. - -* Wed Jul 25 2007 Andreas Thienemann 2.0.3-9 -- Corrected the %%post alternatives calls. Fixing #249560. - -* Wed Jul 19 2007 Andreas Thienemann 2.0.3-8 -- Moved some files around in the %%files section and refactored - spec parts a bit -- Fixed up the catalog-backup scripts by including them in the - alternatives system -- Applied tls patch fixing some tls disconnection issues. - -* Thu Jul 18 2007 Andreas Thienemann 2.0.3-7 -- Minor specchanges, mostly typos in the comments -- Incorporated minor changes from dgilmore's review. - -* Fri Jul 13 2007 Andreas Thienemann 2.0.3-6 -- Fixing %%preun scripts. Thx to Dan for spotting this - -* Fri Jul 13 2007 Andreas Thienemann 2.0.3-5 -- Fixed provides and requires - -* Wed Jul 11 2007 Andreas Thienemann 2.0.3-4 -- Fixed many rpmlint issues - -* Thu Apr 26 2007 Andreas Thienemann 2.0.3-3 -- Final cleanups for fedora -- Removed webgui for now. It will be back in a future release -- Added LANG=C calls to the initscripts - -* Thu Apr 26 2007 Andreas Thienemann 2.0.3-2 -- Added logdir -- Fixed up doc-creation to actually work -- Fixed up web interface -- Included docs sub-package -- Included README et al as docs where appropriate - -* Sat Mar 10 2007 Andreas Thienemann 2.0.3-1 -- Updated to 2.0.3 -- Reverted the database-check as we're not sure the db is running on the - local machine. A later revision might parse the bacula-dir.conf file - and just connect to the db to see if it's running. - -* Sat Feb 28 2007 Andreas Thienemann 2.0.2-1 -- Further updates on the spec - -* Sat Feb 18 2007 Andreas Thienemann 2.0.2-1 -- Much work on the spec -- Updated to 2.0.2 - -* Sat Feb 18 2006 Andreas Thienemann 1.38.11-1 -- Initial spec.