[lightdm] import

Rex Dieter rdieter at fedoraproject.org
Tue Jun 12 18:46:03 UTC 2012


commit c7539a0779024840c03828fb5cc896cf6231b956
Author: Rex Dieter <rdieter at fedoraproject.org>
Date:   Tue Jun 12 13:48:47 2012 -0500

    import

 .gitignore                              |    1 +
 lightdm-1.2.2-fedora_config.patch       |   42 +++++
 lightdm-1.2.2-nodaemon_option.patch     |   12 ++
 lightdm-autologin.pam                   |   11 ++
 lightdm-lock-screen-before-switch.patch |   55 ++++++
 lightdm-tmpfiles.conf                   |    1 +
 lightdm.pam                             |   18 ++
 lightdm.spec                            |  286 +++++++++++++++++++++++++++++++
 sources                                 |    1 +
 9 files changed, 427 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..5a95a63 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/lightdm-1.2.2.tar.gz
diff --git a/lightdm-1.2.2-fedora_config.patch b/lightdm-1.2.2-fedora_config.patch
new file mode 100644
index 0000000..12913de
--- /dev/null
+++ b/lightdm-1.2.2-fedora_config.patch
@@ -0,0 +1,42 @@
+diff -up lightdm-1.2.2/data/lightdm.conf.fedora-config lightdm-1.2.2/data/lightdm.conf
+--- lightdm-1.2.2/data/lightdm.conf.fedora-config	2012-04-18 18:29:23.000000000 -0500
++++ lightdm-1.2.2/data/lightdm.conf	2012-04-25 12:04:46.611821900 -0500
+@@ -18,7 +18,7 @@
+ #greeter-user=lightdm
+ #minimum-display-number=0
+ #minimum-vt=7
+-#user-authority-in-system-dir=false
++user-authority-in-system-dir=true
+ #guest-account-script=guest-account
+ #log-directory=/var/log/lightdm
+ #run-directory=/var/run/lightdm
+@@ -62,14 +62,14 @@
+ #xdmcp-manager=
+ #xdmcp-port=177
+ #xdmcp-key=
+-#greeter-session=example-gtk-gnome
++greeter-session=lightdm-gtk-greeter
+ #greeter-hide-users=false
+ #greeter-allow-guest=true
+ #greeter-show-manual-login=false
+ #user-session=default
+ #allow-guest=true
+ #guest-session=UNIMPLEMENTED
+-#session-wrapper=lightdm-session
++session-wrapper=/etc/X11/xinit/Xsession
+ #display-setup-script=
+ #greeter-setup-script=
+ #session-setup-script=
+diff -up lightdm-1.2.2/data/users.conf.fedora-config lightdm-1.2.2/data/users.conf
+--- lightdm-1.2.2/data/users.conf.fedora-config	2012-04-18 18:29:23.000000000 -0500
++++ lightdm-1.2.2/data/users.conf	2012-04-25 11:58:44.459349541 -0500
+@@ -9,6 +9,6 @@
+ # hidden-shells = Shells that indicate a user cannot login
+ #
+ [UserAccounts]
+-minimum-uid=500
+-hidden-users=nobody nobody4 noaccess
+-hidden-shells=/bin/false /usr/sbin/nologin
++minimum-uid=1000
++hidden-users=nfsnobody nobody nobody4 noaccess
++hidden-shells=/bin/false /sbin/nologin
diff --git a/lightdm-1.2.2-nodaemon_option.patch b/lightdm-1.2.2-nodaemon_option.patch
new file mode 100644
index 0000000..f921896
--- /dev/null
+++ b/lightdm-1.2.2-nodaemon_option.patch
@@ -0,0 +1,12 @@
+diff -up lightdm-1.2.2/src/lightdm.c.nodaemon_option lightdm-1.2.2/src/lightdm.c
+--- lightdm-1.2.2/src/lightdm.c.nodaemon_option	2012-04-18 18:29:23.000000000 -0500
++++ lightdm-1.2.2/src/lightdm.c	2012-04-25 14:58:20.947571800 -0500
+@@ -883,7 +883,7 @@ main (int argc, char **argv)
+         g_printerr (/* Text printed out when an unknown command-line argument provided */
+                     _("Run '%s --help' to see a full list of available command line options."), argv[0]);
+         g_printerr ("\n");
+-        return EXIT_FAILURE;
++    /*  return EXIT_FAILURE; */
+     }
+ 
+     if (show_version)
diff --git a/lightdm-autologin.pam b/lightdm-autologin.pam
new file mode 100644
index 0000000..bde3d30
--- /dev/null
+++ b/lightdm-autologin.pam
@@ -0,0 +1,11 @@
+#%PAM-1.0
+auth    requisite       pam_nologin.so
+auth    required        pam_env.so readenv=1
+auth    required        pam_env.so readenv=1 envfile=/etc/default/locale
+auth    required        pam_permit.so
+ at include common-account
+session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so close
+session required        pam_limits.so
+ at include common-session
+session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so open
+ at include common-password
diff --git a/lightdm-lock-screen-before-switch.patch b/lightdm-lock-screen-before-switch.patch
new file mode 100644
index 0000000..b8b1d55
--- /dev/null
+++ b/lightdm-lock-screen-before-switch.patch
@@ -0,0 +1,55 @@
+# HG changeset patch
+# Parent b329fa1badaa454239690c3feb93d53324134915
+try to lock the screen before switching users
+
+diff --git a/utils/gdmflexiserver b/utils/gdmflexiserver
+--- a/utils/gdmflexiserver
++++ b/utils/gdmflexiserver
+@@ -9,9 +9,47 @@
+ #
+ # See http://www.gnu.org/copyleft/gpl.html for the full text of the license.
+ 
++PATH=/usr/local/bin:/bin:/usr/bin
++export PATH
++
+ if [ -z "$XDG_SEAT_PATH" ]; then
+   # something went wrong
+   exit 1
+ fi
+ 
++find_command () {
++    cmd="$1"
++    oIFS="${IFS}"; IFS=:
++    set -- ${PATH}
++    IFS="${oIFS}"
++
++    for part; do
++        [ -x "${part}/${cmd}" ] && return 0
++    done
++    return 1
++}
++
++lock_screen () {
++    for lock_cmd in \
++        "xscreensaver-command -lock" \
++        "gnome-screensaver-command --lock" \
++        "dbus-send --session --dest=org.freedesktop.ScreenSaver --type=method_call /ScreenSaver org.freedesktop.ScreenSaver.Lock"
++    do
++        ${lock_cmd} >/dev/null 2>&1 && return
++    done
++
++    for lock_cmd in \
++        "slock" \
++        "xlock -mode blank"
++    do
++        set -- ${lock_cmd}
++        if find_command "$1"; then
++            ${lock_cmd} >/dev/null 2>&1 &
++            return
++        fi
++    done
++}
++
++lock_screen
++
+ dbus-send --system --type=method_call --print-reply --dest=org.freedesktop.DisplayManager $XDG_SEAT_PATH org.freedesktop.DisplayManager.Seat.SwitchToGreeter
diff --git a/lightdm-tmpfiles.conf b/lightdm-tmpfiles.conf
new file mode 100644
index 0000000..dafb935
--- /dev/null
+++ b/lightdm-tmpfiles.conf
@@ -0,0 +1 @@
+d /var/run/lightdm 0775 lightdm lightdm
diff --git a/lightdm.pam b/lightdm.pam
new file mode 100644
index 0000000..ff7b155
--- /dev/null
+++ b/lightdm.pam
@@ -0,0 +1,18 @@
+#%PAM-1.0
+auth     [success=done ignore=ignore default=bad] pam_selinux_permit.so
+auth       required    pam_env.so
+auth       substack    system-auth
+-auth       optional    pam_gnome_keyring.so
+auth       include     postlogin
+account    required    pam_nologin.so
+account    include     system-auth
+password   include     system-auth
+session    required    pam_selinux.so close
+session    required    pam_loginuid.so
+session    optional    pam_console.so
+session    required    pam_selinux.so open
+session    optional    pam_keyinit.so force revoke
+session    required    pam_namespace.so
+-session    optional    pam_gnome_keyring.so auto_start
+session    include     system-auth
+session    include     postlogin
diff --git a/lightdm.spec b/lightdm.spec
new file mode 100644
index 0000000..9f344f2
--- /dev/null
+++ b/lightdm.spec
@@ -0,0 +1,286 @@
+Name:    lightdm
+Summary: Lightweight Display Manager
+Version: 1.2.2
+Release: 12%{?dist}
+
+# library/bindings are LGPLv3, the rest GPLv3+
+License: LGPLv3+ and GPLv3+
+URL:     http://www.freedesktop.org/wiki/Software/LightDM
+Source0: https://launchpad.net/lightdm/1.2/%{version}/+download/lightdm-%{version}.tar.gz
+Source1: lightdm.pam 
+# this one probably needs love -- rex
+Source2: lightdm-autologin.pam
+Source3: lightdm-tmpfiles.conf
+
+Patch2: lightdm-lock-screen-before-switch.patch
+## Downstream patches:
+Patch11: lightdm-1.2.2-fedora_config.patch 
+# hack in support for --nodaemon option
+Patch12: lightdm-1.2.2-nodaemon_option.patch
+
+BuildRequires: automake libtool
+BuildRequires: gettext
+BuildRequires: gnome-common
+BuildRequires: gtk-doc
+BuildRequires: intltool
+BuildRequires: pam-devel
+BuildRequires: pkgconfig(dbus-glib-1)
+BuildRequires: pkgconfig(gio-2.0) >= 2.26
+BuildRequires: pkgconfig(gio-unix-2.0)
+BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(gmodule-export-2.0)
+BuildRequires: pkgconfig(gobject-2.0)
+BuildRequires: pkgconfig(gobject-introspection-1.0) >= 0.9.5
+BuildRequires: pkgconfig(libxklavier)
+BuildRequires: pkgconfig(QtCore)
+BuildRequires: pkgconfig(QtDBus)
+BuildRequires: pkgconfig(QtGui)
+BuildRequires: pkgconfig(QtNetwork)
+BuildRequires: pkgconfig(x11)
+BuildRequires: pkgconfig(xcb)
+BuildRequires: pkgconfig(xdmcp)
+BuildRequires: vala
+
+Requires: %{name}-gobject%{?_isa} = %{version}-%{release}
+Requires: accountsservice
+## this seems to still be a hard-requirement for now, at least
+## until support for systemd restart/shutdown is implemented
+#if 0%{?fedora} < 17
+Requires: ConsoleKit
+#endif
+Requires: dbus-x11
+# aka /sbin/shutdown, and friends
+Requires: systemd
+Requires: xorg-x11-xinit
+
+# beware of bootstrapping -- rex
+# leaving this here, means greeters will have to require lightdm too,
+# instead of relying on -gobject, -qt to pull it in
+Requires: lightdm-greeter
+
+# needed for anaconda to boot into runlevel 5 after install
+Provides: service(graphical-login) = lightdm
+
+%description
+LightDM is an X display manager that:
+* Has a lightweight codebase
+* Is standards compliant (PAM, ConsoleKit, etc)
+* Has a well defined interface between the server and user interface
+* Fully themeable (easiest with the webkit interface)
+* Cross-desktop (greeters can be written in any toolkit)
+
+%package gobject
+Summary: LightDM GObject client library
+# omit base package, to allow for easier bootstrapping
+# requires greeters to manually
+# Requires: lightdm
+#Requires: %{name} = %{version}-%{release}
+%description gobject
+This package contains a GObject based library for LightDM clients to use to 
+interface with LightDM.
+
+%package gobject-devel
+Summary: Development files for %{name}-gobject
+Requires: %{name}-gobject%{?_isa} = %{version}-%{release}
+%description gobject-devel
+%{summary}.
+
+%package qt
+Summary: LightDM QT client library
+# see comment in -gobject above
+#Requires: %{name} = %{version}-%{release}
+%description qt
+This package contains a QT based library for LightDM clients to use to interface
+with LightDM.
+
+%package qt-devel
+Summary: Development files for %{name}-qt
+Requires: %{name}-qt%{?_isa} = %{version}-%{release}
+%description qt-devel
+%{summary}.
+
+
+%prep
+%setup -q
+
+%patch2 -p1 -b .lock-screen
+%patch11 -p1 -b .fedora_config
+%patch12 -p1 -b .nodaemon_option
+
+# AUTHORS is (mostly) empty, let's fix this
+echo "Robert Ancell <robert.ancell at canonical.com>" >> AUTHORS
+
+# nuke rpath, among other things
+autoreconf -f -i
+
+
+%build
+%configure \
+  --disable-static \
+  --enable-gtk-doc \
+  --enable-introspection \
+  --with-greeter-user=lightdm \
+  --with-greeter-session=lightdm-gtk-greeter 
+
+make %{?_smp_mflags} V=1
+
+
+%install
+make install DESTDIR=%{buildroot} INSTALL='install -p'
+
+find %{buildroot} -name 'lib*.la' -exec rm -fv {} ';'
+
+# We don't ship AppAmor
+rm -rfv %{buildroot}%{_sysconfdir}/apparmor.d/
+
+# install pam file
+install -Dpm 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/pam.d/lightdm
+install -Dpm 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/pam.d/lightdm-autologin
+
+install -Dpm 644 %{SOURCE3} %{buildroot}%{_prefix}/lib/tmpfiles.d/lightdm.conf
+
+# We need to own these
+#mkdir -p %{buildroot}%{_localstatedir}/cache/%{name}/{authority,dmrc}
+mkdir -p %{buildroot}%{_localstatedir}/cache/%{name}/
+mkdir -p %{buildroot}%{_localstatedir}/run/%{name}/authority
+mkdir -p %{buildroot}%{_localstatedir}/log/%{name}
+mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}
+
+%find_lang %{name}
+
+
+%pre
+/usr/sbin/useradd -M -u 43 -d /var/log/lightdm -s /sbin/nologin -r lightdm > /dev/null 2>&1
+#/usr/sbin/usermod -d /var/log/lightdm -s /sbin/nologin lightdm >/dev/null 2>&1
+## ignore errors, as we can't disambiguate between lightdm already existed
+## and couldn't create account with the current adduser.
+exit 0
+
+%files -f %{name}.lang
+%doc AUTHORS ChangeLog  COPYING NEWS README
+%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.DisplayManager.conf
+%config(noreplace) %{_sysconfdir}/init/lightdm.conf
+%config(noreplace) %{_sysconfdir}/pam.d/lightdm*
+%dir %{_sysconfdir}/lightdm/
+%config(noreplace) %{_sysconfdir}/lightdm/keys.conf
+%config(noreplace) %{_sysconfdir}/lightdm/lightdm.conf
+%config(noreplace) %{_sysconfdir}/lightdm/users.conf
+%{_bindir}/dm-tool
+%{_sbindir}/lightdm
+%{_libexecdir}/lightdm/
+%{_libdir}/girepository-1.0/LightDM-1.typelib
+%{_mandir}/man*/lightdm.*.*
+%dir %attr(1775,lightdm,lightdm) %{_localstatedir}/cache/lightdm/
+
+# because of systemd
+%{_prefix}/lib/tmpfiles.d/lightdm.conf
+%ghost %dir %{_localstatedir}/run/lightdm
+
+%dir %attr(1770,lightdm,lightdm) %{_localstatedir}/lib/lightdm/
+%dir %attr(1770,lightdm,lightdm) %{_localstatedir}/log/lightdm/
+
+%post gobject -p /sbin/ldconfig
+%postun gobject -p /sbin/ldconfig
+
+%files gobject
+# no LGPLv3+ license file included
+%{_libdir}/liblightdm-gobject-1.so.0*
+
+%files gobject-devel
+%doc %{_datadir}/gtk-doc/html/lightdm-gobject-1/
+%{_includedir}/lightdm-gobject-1/
+%{_libdir}/liblightdm-gobject-1.so
+%{_libdir}/pkgconfig/liblightdm-gobject-1.pc
+%{_datadir}/gir-1.0/LightDM-1.gir
+%{_datadir}/vala/vapi/liblightdm-gobject-1.vapi
+
+%post qt -p /sbin/ldconfig
+%postun qt -p /sbin/ldconfig
+
+%files qt
+# no LGPLv3+ license file included
+%{_libdir}/liblightdm-qt-2.so.0*
+
+%files qt-devel
+%{_includedir}/lightdm-qt-2/
+%{_libdir}/liblightdm-qt-2.so
+%{_libdir}/pkgconfig/liblightdm-qt-2.pc
+
+
+%changelog
+* Tue Jun 12 2012 Rex Dieter <rdieter at fedoraproject.org> 1.2.2-12
+- move headers into -qt-devel pkg
+
+* Mon Jun 11 2012 Rex Dieter <rdieter at fedoraproject.org> 1.2.2-11
+- License: LGPLv3+ and GPLv3+
+- make dbus files %%config
+- gobject-devel, qt-devel subpkgs
+
+* Mon May 14 2012 Rex Dieter <rdieter at fedoraproject.org> 1.2.2-10
+- move /etc/tmpfiles.d/* => /usr/lib/tempfiles.d/
+
+* Wed May 09 2012 Rex Dieter <rdieter at fedoraproject.org> 1.2.2-9
+- fix typo, Requires: accountsservice
+
+* Thu Apr 26 2012 Rex Dieter <rdieter at fedoraproject.org> 1.2.2-8
+- Requires: accountservice ConsoleKit systemd
+
+* Wed Apr 25 2012 Rex Dieter <rdieter at fedoraproject.org> 1.2.2-7
+- respin nodaemon_option patch
+
+* Wed Apr 25 2012 Rex Dieter <rdieter at fedoraproject.org> 1.2.2-6
+- Requires: xorg-x11-xinit
+- Requires: lightdm-greeter
+- -gobject,-qt: drop dep on base pkg (easier for bootstrapping)
+
+* Wed Apr 25 2012 Rex Dieter <rdieter at fedoraproject.org> 1.2.2-5
+- make sane default lightdm.conf for fedora
+- nodaemon_option.patch 
+- Requires: xorg-x11-xinit
+
+* Wed Apr 25 2012 Rex Dieter <rdieter at fedoraproject.org> 1.2.2-4
+- update lightdm.pam
+- make /var/log/lightdm /var/lib/lightdm group-writable too
+
+* Wed Apr 25 2012 Rex Dieter <rdieter at fedoraproject.org> 1.2.2-3
+- omit useless %%post(un) scriptlets
+- %%pre: add lightdm user/group
+- BR: gnome-common
+- %%build: --with-greeter-session=lightdm-gtk-greeter (for now)
+
+* Tue Apr 24 2012 Rex Dieter <rdieter at fedoraproject.org> 1.2.2-2
+- pkgconfig-style deps
+
+* Tue Apr 24 2012 Rex Dieter <rdieter at fedoraproject.org> 1.2.2-1
+- 1.2.2
+
+* Fri Feb 17 2012 Christoph Wickert <cwickert at fedoraproject.org> - 1.1.3-1
+- Update to 1.1.3
+
+* Fri Feb 17 2012 Christoph Wickert <cwickert at fedoraproject.org> - 1.0.6-1
+- Update to 1.0.6
+- Make build verbose
+
+* Sun Oct 02 2011 Christoph Wickert <cwickert at fedoraproject.org> - 1.0.0-1
+- Update to 1.0.0
+
+* Wed Aug 17 2011 Christoph Wickert <cwickert at fedoraproject.org> - 0.9.3-1
+- Update to 0.9.3
+
+* Fri Jul 08 2011 Christoph Wickert <cwickert at fedoraproject.org> - 0.4.2-1
+- Update to 0.4.2
+
+* Sat Jul 02 2011 Christoph Wickert <cwickert at fedoraproject.org> - 0.4.1-1
+- Update to 0.4.1
+
+* Sat Jun 25 2011 Christoph Wickert <cwickert at fedoraproject.org> - 0.4.0-1
+- Update to 0.4.0
+
+* Fri Apr 22 2011 Christoph Wickert <cwickert at fedoraproject.org> - 0.3.2-1
+- Update to 0.3.2
+
+* Sun Jan 23 2011 Christoph Wickert <cwickert at fedoraproject.org> - 0.2.3-1
+- Update to 0.2.3
+
+* Sat Oct 23 2010 Christoph Wickert <cwickert at fedoraproject.org> - 0.1.2-1
+- Initial package
diff --git a/sources b/sources
index e69de29..116083b 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+671c194ee214f14f00c8ccc0f3aacabc  lightdm-1.2.2.tar.gz


More information about the scm-commits mailing list