packages: bacula/bacula.spec - restore make_catalog_backup and make_catalog...

glen glen at pld-linux.org
Fri Oct 22 13:53:42 CEST 2010


Author: glen                         Date: Fri Oct 22 11:53:42 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- restore make_catalog_backup and make_catalog_backup,
  they were not installed due broken makefile & disabled sqlite backend (r1.166 fixes the install error)

---- Files affected:
packages/bacula:
   bacula.spec (1.166 -> 1.167) 

---- Diffs:

================================================================
Index: packages/bacula/bacula.spec
diff -u packages/bacula/bacula.spec:1.166 packages/bacula/bacula.spec:1.167
--- packages/bacula/bacula.spec:1.166	Fri Oct 22 13:17:04 2010
+++ packages/bacula/bacula.spec	Fri Oct 22 13:53:37 2010
@@ -538,8 +538,8 @@
 	%{__make} -C src/cats
 
 	# install the database library in a temporary location
-	install -d libbacsql/$database%{_libdir}
-	%{__make} -C src/cats libtool-install DESTDIR=$PWD/libbacsql/$database
+	install -d libbacsql/$database%{_libdir}/%{name}
+	%{__make} -C src/cats install DESTDIR=$PWD/libbacsql/$database
 done
 
 %if %{with bat}
@@ -583,8 +583,22 @@
 		install -p $libfile $RPM_BUILD_ROOT%{_libdir}/$file_name
 		touch $RPM_BUILD_ROOT%{_libdir}/$orig_name
 	done
+
+	install -p libbacsql/$database%{_libdir}/%{name}/make_catalog_backup \
+		$RPM_BUILD_ROOT%{_libdir}/%{name}/make_${database}_catalog_backup
 done
 
+# placeholders for the symlinks set in %%post db-*
+for f in create_bacula_database drop_bacula_database drop_bacula_tables \
+	grant_bacula_privileges make_bacula_tables update_bacula_tables; do
+	touch $RPM_BUILD_ROOT%{_libexecdir}/%{name}/$f
+done
+
+# we use db dependant (at compile time) shell script only
+rm -f $RPM_BUILD_ROOT%{_libexecdir}/%{name}/make_catalog_backup.pl
+# dbi is not actual dbtype
+rm -f $RPM_BUILD_ROOT%{_libexecdir}/%{name}/make_dbi_catalog_backup
+
 # replace with empty file, replaced by ldconfig from each db-* package on intsall
 rm -f $RPM_BUILD_ROOT%{_libdir}/libbacsql-%{version}.so
 touch $RPM_BUILD_ROOT%{_libdir}/libbacsql-%{version}.so
@@ -634,7 +648,7 @@
 touch $RPM_BUILD_ROOT%{_sysconfdir}/{dir-password,fd-password,sd-password}
 touch $RPM_BUILD_ROOT%{_sysconfdir}/{mon-dir-password,mon-fd-password,mon-sd-password}
 
-mv $RPM_BUILD_ROOT%{_libdir}/bacula/mtx-changer.conf $RPM_BUILD_ROOT/etc/bacula/mtx-changer.conf
+mv $RPM_BUILD_ROOT%{_libexecdir}/%{name}/mtx-changer.conf $RPM_BUILD_ROOT%{_sysconfdir}/mtx-changer.conf
 
 # some file changes
 rm -f $RPM_BUILD_ROOT%{_libexecdir}/%{name}/{gconsole,startmysql,stopmysql,bacula,bconsole,fd}
@@ -665,13 +679,6 @@
 # no -devel files packaged, so this is also useless
 rm $RPM_BUILD_ROOT%{_libdir}/libbac{,cfg,find,py,sql}.{so,la}
 
-# placeholders for the symlinks set in %%post db-*
-for f in create_bacula_database drop_bacula_database drop_bacula_tables \
-	grant_bacula_privileges make_bacula_tables update_bacula_tables ; do
-
-	touch $RPM_BUILD_ROOT%{_libexecdir}/%{name}/$f
-done
-
 %if %{with nagios}
 install -d $RPM_BUILD_ROOT%{nagiosplugindir}
 %{__make} -C examples/nagios/check_bacula install \
@@ -689,7 +696,7 @@
 
 %define update_configs \
 echo "Updating bacula passwords and names..." | %banner -a %{name} \
-cd /etc/bacula \
+cd %{_sysconfdir} \
 for f in *-password; do \
 	if [ ! -s $f ]; then \
 		openssl rand -base64 33 > $f \
@@ -767,7 +774,7 @@
 %update_configs
 
 %triggerpostun common -- %{name}-common < 5.0.1-2
-find /etc/bacula/bat.conf* -perm /007 -print0 | xargs -0 -r chmod 600 || :
+find %{_sysconfdir}/bat.conf* -perm /007 -print0 | xargs -0 -r chmod 600 || :
 
 %post console-qt4
 %update_configs
@@ -803,6 +810,7 @@
 	suffix="${name#* }" \
 	ln -sf "${prefix}_%{1}_${suffix}" %{_libexecdir}/%{name}/"${prefix}_bacula_${suffix}" || : \
 done \
+ln -sf "make_%{1}_catalog_backup" %{_libexecdir}/%{name}/make_catalog_backup || : \
 %service bacula-dir restart "Bacula Director daemon"
 
 %define db_postun() \
@@ -879,17 +887,18 @@
 %{_mandir}/man8/bacula-dir.8*
 %{_mandir}/man8/bacula-dbcheck.8*
 %{_libexecdir}/%{name}/query.sql
-#%attr(755,root,root) %{_libexecdir}/%{name}/make_catalog_backup
-#%attr(755,root,root) %{_libexecdir}/%{name}/delete_catalog_backup
+%attr(755,root,root) %{_libexecdir}/%{name}/delete_catalog_backup
 
 %files db-postgresql
 %defattr(644,root,root,755)
+%attr(755,root,root) %{_libexecdir}/%{name}/fix_postgresql_tables
 %attr(755,root,root) %{_libexecdir}/%{name}/create_postgresql_database
 %attr(755,root,root) %{_libexecdir}/%{name}/drop_postgresql_database
 %attr(755,root,root) %{_libexecdir}/%{name}/drop_postgresql_tables
 %attr(755,root,root) %{_libexecdir}/%{name}/grant_postgresql_privileges
 %attr(755,root,root) %{_libexecdir}/%{name}/make_postgresql_tables
 %attr(755,root,root) %{_libexecdir}/%{name}/update_postgresql_*
+%attr(755,root,root) %{_libexecdir}/%{name}/make_postgresql_catalog_backup
 %attr(755,root,root) %{_libdir}/libbacsql-postgresql-5*.so
 
 %ghost %attr(755,root,root) %{_libdir}/libbacsql-5*.so
@@ -899,6 +908,7 @@
 %ghost %{_libexecdir}/%{name}/grant_bacula_privileges
 %ghost %{_libexecdir}/%{name}/make_bacula_tables
 %ghost %{_libexecdir}/%{name}/update_bacula_tables
+%ghost %{_libexecdir}/%{name}/make_catalog_backup
 
 %files db-mysql
 %defattr(644,root,root,755)
@@ -908,6 +918,7 @@
 %attr(755,root,root) %{_libexecdir}/%{name}/grant_mysql_privileges
 %attr(755,root,root) %{_libexecdir}/%{name}/make_mysql_tables
 %attr(755,root,root) %{_libexecdir}/%{name}/update_mysql_*
+%attr(755,root,root) %{_libexecdir}/%{name}/make_mysql_catalog_backup
 %attr(755,root,root) %{_libdir}/libbacsql-mysql-5*.so
 
 %ghost %attr(755,root,root) %{_libdir}/libbacsql-5*.so
@@ -917,6 +928,7 @@
 %ghost %{_libexecdir}/%{name}/grant_bacula_privileges
 %ghost %{_libexecdir}/%{name}/make_bacula_tables
 %ghost %{_libexecdir}/%{name}/update_bacula_tables
+%ghost %{_libexecdir}/%{name}/make_catalog_backup
 
 %files db-sqlite3
 %defattr(644,root,root,755)
@@ -926,6 +938,7 @@
 %attr(755,root,root) %{_libexecdir}/%{name}/grant_sqlite3_privileges
 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite3_tables
 %attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite3_*
+%attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite3_catalog_backup
 %attr(755,root,root) %{_libdir}/libbacsql-sqlite3-5*.so
 
 %ghost %attr(755,root,root) %{_libdir}/libbacsql-5*.so
@@ -935,6 +948,7 @@
 %ghost %{_libexecdir}/%{name}/grant_bacula_privileges
 %ghost %{_libexecdir}/%{name}/make_bacula_tables
 %ghost %{_libexecdir}/%{name}/update_bacula_tables
+%ghost %{_libexecdir}/%{name}/make_catalog_backup
 
 %if %{with dbi}
 %files db-dbi
@@ -944,12 +958,14 @@
 %attr(755,root,root) %{_libexecdir}/%{name}/drop_postgresql_tables
 %attr(755,root,root) %{_libexecdir}/%{name}/grant_postgresql_privileges
 %attr(755,root,root) %{_libexecdir}/%{name}/make_postgresql_tables
+%attr(755,root,root) %{_libexecdir}/%{name}/make_postgresql_catalog_backup
 %attr(755,root,root) %{_libexecdir}/%{name}/update_postgresql_*
 %attr(755,root,root) %{_libexecdir}/%{name}/create_mysql_database
 %attr(755,root,root) %{_libexecdir}/%{name}/drop_mysql_database
 %attr(755,root,root) %{_libexecdir}/%{name}/drop_mysql_tables
 %attr(755,root,root) %{_libexecdir}/%{name}/grant_mysql_privileges
 %attr(755,root,root) %{_libexecdir}/%{name}/make_mysql_tables
+%attr(755,root,root) %{_libexecdir}/%{name}/make_mysql_catalog_backup
 %attr(755,root,root) %{_libexecdir}/%{name}/update_mysql_*
 %attr(755,root,root) %{_libexecdir}/%{name}/create_sqlite3_database
 %attr(755,root,root) %{_libexecdir}/%{name}/drop_sqlite3_database
@@ -957,6 +973,7 @@
 %attr(755,root,root) %{_libexecdir}/%{name}/grant_sqlite3_privileges
 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite3_tables
 %attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite3_*
+%attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite3_catalog_backup
 %attr(755,root,root) %{_libdir}/libbacsql-dbi-5*.so
 
 %ghost %attr(755,root,root) %{_libdir}/libbacsql-5*.so
@@ -1067,6 +1084,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.167  2010/10/22 11:53:37  glen
+- restore make_catalog_backup and make_catalog_backup,
+  they were not installed due broken makefile & disabled sqlite backend (r1.166 fixes the install error)
+
 Revision 1.166  2010/10/22 11:17:04  glen
 - do not install fail because last dbtype is not built
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/bacula/bacula.spec?r1=1.166&r2=1.167&f=u



More information about the pld-cvs-commit mailing list