SPECS: rpm-test_scripts_triggers.spec - what's going with %config ...

twittner twittner at pld-linux.org
Fri Jun 24 18:40:05 CEST 2005


Author: twittner                     Date: Fri Jun 24 16:40:05 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- what's going with %config files

---- Files affected:
SPECS:
   rpm-test_scripts_triggers.spec (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SPECS/rpm-test_scripts_triggers.spec
diff -u SPECS/rpm-test_scripts_triggers.spec:1.1 SPECS/rpm-test_scripts_triggers.spec:1.2
--- SPECS/rpm-test_scripts_triggers.spec:1.1	Fri Jun 24 18:09:01 2005
+++ SPECS/rpm-test_scripts_triggers.spec	Fri Jun 24 18:40:00 2005
@@ -57,6 +57,12 @@
 %install
 rm -rf $RPM_BUILD_ROOT
 
+echo nothing interesting here > config.conf
+
+install -D config.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/config.conf
+install -D config.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-first/config.conf
+install -D config.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-second/config.conf
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -66,6 +72,7 @@
 
 %post
 echo '#MAIN PACKAGE#' post: \$1: ${1}, \$2: $2
+echo 'config changed' | tee -a %{_sysconfdir}/%{name}/config.conf
 
 %preun
 echo '#MAIN PACKAGE#' preun: \$1: ${1}, \$2: $2
@@ -79,6 +86,7 @@
 
 %post first
 echo '#FIRST SUBPACKAGE#' post: \$1: ${1}, \$2: $2
+echo 'config changed' | tee -a %{_sysconfdir}/%{name}-first/config.conf
 
 %preun first
 echo '#FIRST SUBPACKAGE#' preun: \$1: ${1}, \$2: $2
@@ -92,6 +100,7 @@
 
 %post second
 echo '#SECOND SUBPACKAGE#' post: \$1: ${1}, \$2: $2
+echo 'config changed' | tee -a %{_sysconfdir}/%{name}-second/config.conf
 
 %preun second
 echo '#SECOND SUBPACKAGE#' preun: \$1: ${1}, \$2: $2
@@ -134,14 +143,17 @@
 %files
 %defattr(644,root,root,755)
 %doc README
+%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/config.conf
 
 %files first
 %defattr(644,root,root,755)
 %doc README
+%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}-first/config.conf
 
 %files second
 %defattr(644,root,root,755)
 %doc README
+%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}-second/config.conf
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -149,6 +161,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.2  2005/06/24 16:40:00  twittner
+- what's going with %config files
+
 Revision 1.1  2005/06/24 16:09:01  twittner
 - skeleton for testing rpm's scripts and triggers sequence, $1 $2 values,
   etc. I hope that will be helpful.
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/rpm-test_scripts_triggers.spec?r1=1.1&r2=1.2&f=u




More information about the pld-cvs-commit mailing list