[shibboleth-sp2] 95/100: Merging config protection changes.

Ferenc Wágner wferi-guest at moszumanska.debian.org
Tue Jan 26 21:29:21 UTC 2016


This is an automated email from the git hooks/post-receive script.

wferi-guest pushed a commit to annotated tag 1.2.1
in repository shibboleth-sp2.

commit 07860306b849b10eaf824cdd8c1dcda3ae387ba2
Author: Scott Cantor <cantor.2 at osu.edu>
Date:   Tue Nov 2 20:10:57 2004 +0000

    Merging config protection changes.
---
 configs/Makefile.am | 25 ++++++++++++++++++++-----
 shibboleth.spec.in  |  1 +
 2 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/configs/Makefile.am b/configs/Makefile.am
index e5acfd0..abd9e40 100644
--- a/configs/Makefile.am
+++ b/configs/Makefile.am
@@ -5,21 +5,27 @@ AUTOMAKE_OPTIONS = foreign
 logdir=${localstatedir}/log/shibboleth
 pkgsysconfdir = $(sysconfdir)/@PACKAGE@
 pkgsysconf_DATA = \
+	apache.config \
+	apache2.config \
+	inqueue.pem
+
+# The config files are installed "special".  Unlike the entries in
+# pkgsysconf_DATA, these files are installed as "foo.dist" and only
+# installed as "foo" if "foo" does not already exist.  In other words,
+# the config files will not overwrite existing versions.
+CONFIGFILES = \
 	shibboleth.xml \
 	shibboleth.logger \
 	shire.logger \
 	shar.logger \
-	shar.key \
-	shar.crt \
-	apache.config \
-	apache2.config \
 	accessError.html \
 	rmError.html \
 	shireError.html \
 	AAP.xml \
 	IQ-sites.xml \
 	IQ-trust.xml \
-	inqueue.pem
+	shar.key \
+	shar.crt
 
 #
 # Some of these need building
@@ -49,9 +55,18 @@ shire.logger: ${srcdir}/shire.logger.in Makefile ${top_builddir}/config.status
 shibboleth.xml: ${srcdir}/shibboleth.xml.in Makefile ${top_builddir}/config.status
 	$(MAKE) do-build-file FILE=$@
 
+all-data-local: $(CONFIGFILES)
+
 install-data-local:
 	$(mkinstalldirs) $(DESTDIR)$(logdir)
 	$(mkinstalldirs) $(DESTDIR)$(prefix)/data
+	$(mkinstalldirs) $(DESTDIR)$(pkgsysconfdir)
+	for f in $(CONFIGFILES); do \
+		if test ! -f $(DESTDIR)${pkgsysconfdir}/$$f; then \
+			$(INSTALL_DATA) $$f $(DESTDIR)${pkgsysconfdir}; \
+		fi; \
+		$(INSTALL_DATA) $$f $(DESTDIR)${pkgsysconfdir}/$$f.dist; \
+        done
 
 CLEANFILES = \
 	apache.config \
diff --git a/shibboleth.spec.in b/shibboleth.spec.in
index 3f685bd..ee8e4af 100644
--- a/shibboleth.spec.in
+++ b/shibboleth.spec.in
@@ -86,6 +86,7 @@ make check
 %config %{_sysconfdir}/shibboleth/inqueue.pem
 %config %{_sysconfdir}/shibboleth/shar.crt
 %config %{_sysconfdir}/shibboleth/shar.key
+%{_sysconfdir}/shibboleth/*.dist
 %{_sysconfdir}/shibboleth/apache*.config
 
 %exclude %{_bindir}/shibtest

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shibboleth/shibboleth-sp2.git



More information about the Pkg-shibboleth-devel mailing list