summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2012-07-08 16:58:41 -0400
committerColin Walters <walters@verbum.org>2012-07-10 10:26:53 -0400
commitf42e685e271015d5cc5d52342a8832010f65c5d2 (patch)
tree9efa2aa2e54b332baa6420ac8f7c5fa3c55c3a46
parenta325fcbc8f6fc138057fb2812c4f2d32ecc1346c (diff)
downloadgdm-f42e685e271015d5cc5d52342a8832010f65c5d2.tar.gz
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
-rw-r--r--data/Makefile.am50
-rw-r--r--data/pam-redhat/gdm-autologin.pam (renamed from data/gdm-autologin)0
-rw-r--r--data/pam-redhat/gdm-fingerprint.pam (renamed from data/gdm-fingerprint.pam)0
-rw-r--r--data/pam-redhat/gdm-password.pam (renamed from data/gdm-password.pam)0
-rw-r--r--data/pam-redhat/gdm-smartcard.pam (renamed from data/gdm-smartcard.pam)0
-rw-r--r--data/pam-redhat/gdm-welcome.pam (renamed from data/gdm-welcome)0
-rw-r--r--data/pam-redhat/gdm.pam (renamed from data/gdm)0
7 files changed, 15 insertions, 35 deletions
diff --git a/data/Makefile.am b/data/Makefile.am
index 536d1a12..dc0301b8 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
index c4e598af..c4e598af 100644
--- a/data/gdm-autologin
+++ b/data/pam-redhat/gdm-autologin.pam
diff --git a/data/gdm-fingerprint.pam b/data/pam-redhat/gdm-fingerprint.pam
index 1a1c7772..1a1c7772 100644
--- a/data/gdm-fingerprint.pam
+++ b/data/pam-redhat/gdm-fingerprint.pam
diff --git a/data/gdm-password.pam b/data/pam-redhat/gdm-password.pam
index bac431d3..bac431d3 100644
--- a/data/gdm-password.pam
+++ b/data/pam-redhat/gdm-password.pam
diff --git a/data/gdm-smartcard.pam b/data/pam-redhat/gdm-smartcard.pam
index d5ac1fab..d5ac1fab 100644
--- a/data/gdm-smartcard.pam
+++ b/data/pam-redhat/gdm-smartcard.pam
diff --git a/data/gdm-welcome b/data/pam-redhat/gdm-welcome.pam
index b301f4f9..b301f4f9 100644
--- a/data/gdm-welcome
+++ b/data/pam-redhat/gdm-welcome.pam
diff --git a/data/gdm b/data/pam-redhat/gdm.pam
index 58c397d9..58c397d9 100644
--- a/data/gdm
+++ b/data/pam-redhat/gdm.pam