[gdm] Clean up PAM build/install rules; move to pam-redhat



commit f42e685e271015d5cc5d52342a8832010f65c5d2
Author: Colin Walters <walters verbum org>
Date:   Sun Jul 8 16:58:41 2012 -0400

    Clean up PAM build/install rules; move to pam-redhat
    
    The build system was inconsistent in its handling of pam files.  The
    multistack files had names ending in .pam, which we copied to an
    unsuffixed file, and installed via pam_DATA.  The non-multistack files
    had unsuffixed filenames in the source, which we installed manually
    via install-data-local.
    
    Let's clean this up by naming every file with ".pam", and do the
    rename when we put them in the install root.  This is faster and
    requires less makefile boilerplate to copy the files during the build
    process.
    
    Note: This also drops the previous crappy implementation of a
    configuration management scheme where we only installed the files if
    they didn't already exist.  I'm not aware of anyone who actually uses
    'make install' for gdm and cares about that semantic.
    
    Finally, because all of these pam files are Red Hat specific, move
    them to a separate pam-redhat directory, to ease the addition of a
    future patch which adds PAM files for different systems.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=675085

 data/Makefile.am                                   |   50 ++++++--------------
 .../gdm-autologin.pam}                             |    0
 data/{ => pam-redhat}/gdm-fingerprint.pam          |    0
 data/{ => pam-redhat}/gdm-password.pam             |    0
 data/{ => pam-redhat}/gdm-smartcard.pam            |    0
 data/{gdm-welcome => pam-redhat/gdm-welcome.pam}   |    0
 data/{gdm => pam-redhat/gdm.pam}                   |    0
 7 files changed, 15 insertions(+), 35 deletions(-)
---
diff --git a/data/Makefile.am b/data/Makefile.am
index 536d1a1..dc0301b 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,4 +1,5 @@
 NULL =
+EXTRA_DIST =
 
 SUBDIRS =			\
 	applications		\
@@ -88,19 +89,16 @@ localealias_DATA = locale.alias
 sessiondir = $(datadir)/gnome-session/sessions
 session_DATA = gdm-fallback.session gdm-shell.session
 
-gdm-password: gdm-password.pam
-	cp $(srcdir)/gdm-password.pam $(builddir)/gdm-password
-
-gdm-fingerprint: gdm-fingerprint.pam
-	cp $(srcdir)/gdm-fingerprint.pam $(builddir)/gdm-fingerprint
-
-gdm-smartcard: gdm-smartcard.pam
-	cp $(srcdir)/gdm-smartcard.pam $(builddir)/gdm-smartcard
-
-pamdir = $(PAM_PREFIX)/pam.d
-pam_DATA = gdm-fingerprint gdm-smartcard gdm-password
+pam_redhat_files = pam-redhat/gdm.pam		\
+	pam-redhat/gdm-autologin.pam		\
+	pam-redhat/gdm-welcome.pam		\
+	pam-redhat/gdm-fingerprint.pam		\
+	pam-redhat/gdm-smartcard.pam		\
+	pam-redhat/gdm-password.pam		\
+	$(NULL)
+EXTRA_DIST += $(pam_redhat_files)
 
-EXTRA_DIST =			\
+EXTRA_DIST +=			\
 	$(schemas_in_files)	\
 	$(schemas_DATA)		\
 	$(dbusconf_in_files)	\
@@ -108,12 +106,6 @@ EXTRA_DIST =			\
 	gdm.schemas.in.in	\
 	gdm.conf-custom.in 	\
 	Xsession.in 		\
-	gdm 			\
-	gdm-autologin 		\
-	gdm-welcome 		\
-	gdm-password.pam	\
-	gdm-fingerprint.pam	\
-	gdm-smartcard.pam	\
 	gdm-fallback.session	\
 	Init.in 		\
 	PreSession.in 		\
@@ -133,9 +125,6 @@ CLEANFILES = 				\
 	PreSession			\
 	PostSession			\
 	$(gsettings_SCHEMAS)		\
-	gdm-password			\
-	gdm-fingerprint			\
-	gdm-smartcard			\
 	$(NULL)
 
 DISTCLEANFILES =			\
@@ -146,9 +135,6 @@ DISTCLEANFILES =			\
 
 MAINTAINERCLEANFILES =			\
 	*~				\
-	gdm-password			\
-	gdm-fingerprint			\
-	gdm-smartcard			\
 	Makefile.in
 
 uninstall-hook:
@@ -159,9 +145,6 @@ uninstall-hook:
 	$(DESTDIR)$(postlogindir)/Default.sample \
 	$(DESTDIR)$(predir)/Default \
 	$(DESTDIR)$(postdir)/Default \
-	$(DESTDIR)$(PAM_PREFIX)/pam.d/gdm \
-	$(DESTDIR)$(PAM_PREFIX)/pam.d/gdm-autologin \
-	$(DESTDIR)$(PAM_PREFIX)/pam.d/gdm-welcome \
 	$(DESTDIR)$(sysconfdir)/dconf/db/gdm \
 	$(DESTDIR)$(sysconfdir)/dconf/profile/gdm \
 	-rf \
@@ -239,14 +222,11 @@ install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession 00-upstr
 		$(mkinstalldirs) $(DESTDIR)$(PAM_PREFIX)/pam.d; \
 		chmod 755 $(DESTDIR)$(PAM_PREFIX)/pam.d; \
 	   fi; \
-	   if test $$system = Linux && test '!' -f $(DESTDIR)$(PAM_PREFIX)/pam.d/gdm; then \
-		$(INSTALL_DATA) $(srcdir)/gdm $(DESTDIR)$(PAM_PREFIX)/pam.d/gdm; \
-	   fi; \
-	   if test $$system = Linux && test '!' -f $(DESTDIR)$(PAM_PREFIX)/pam.d/gdm-autologin; then \
-		$(INSTALL_DATA) $(srcdir)/gdm-autologin $(DESTDIR)$(PAM_PREFIX)/pam.d/gdm-autologin; \
-	   fi; \
-	   if test $$system = Linux && test '!' -f $(DESTDIR)$(PAM_PREFIX)/pam.d/gdm-welcome; then \
-		$(INSTALL_DATA) $(srcdir)/gdm-welcome $(DESTDIR)$(PAM_PREFIX)/pam.d/gdm-welcome; \
+	   if test $$system = Linux; then \
+	     for pamfile in $(pam_redhat_files); do \
+	       bn=$$(basename $$pamfile .pam); \
+	       $(INSTALL_DATA) $(srcdir)/$$pamfile $(DESTDIR)$(PAM_PREFIX)/pam.d/$$bn; \
+	     done; \
 	   fi; \
 	   if test $$system = SunOS; then \
 		echo "Please add PAM authentication for gdm, gdm-autologin and gdm-welcome in $(PAM_PREFIX)/pam.conf!"; \
diff --git a/data/gdm-autologin b/data/pam-redhat/gdm-autologin.pam
similarity index 100%
rename from data/gdm-autologin
rename to data/pam-redhat/gdm-autologin.pam
diff --git a/data/gdm-fingerprint.pam b/data/pam-redhat/gdm-fingerprint.pam
similarity index 100%
rename from data/gdm-fingerprint.pam
rename to data/pam-redhat/gdm-fingerprint.pam
diff --git a/data/gdm-password.pam b/data/pam-redhat/gdm-password.pam
similarity index 100%
rename from data/gdm-password.pam
rename to data/pam-redhat/gdm-password.pam
diff --git a/data/gdm-smartcard.pam b/data/pam-redhat/gdm-smartcard.pam
similarity index 100%
rename from data/gdm-smartcard.pam
rename to data/pam-redhat/gdm-smartcard.pam
diff --git a/data/gdm-welcome b/data/pam-redhat/gdm-welcome.pam
similarity index 100%
rename from data/gdm-welcome
rename to data/pam-redhat/gdm-welcome.pam
diff --git a/data/gdm b/data/pam-redhat/gdm.pam
similarity index 100%
rename from data/gdm
rename to data/pam-redhat/gdm.pam



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]