[lightdm] - check if lightdm user exists, before creating him - reset patch numbering - use standard dir perm

brummbq brummbq at fedoraproject.org
Thu Jun 14 13:38:49 UTC 2012


commit f275cf88ede2d198094d3e7693fdbbfce51e7e44
Author: Gregor Tätzner <gregor at freenet.de>
Date:   Thu Jun 14 15:38:28 2012 +0200

    - check if lightdm user exists, before creating him
    - reset patch numbering
    - use standard dir perm

 lightdm.spec |   42 +++++++++++++++++++++++++-----------------
 1 files changed, 25 insertions(+), 17 deletions(-)
---
diff --git a/lightdm.spec b/lightdm.spec
index 80a3e59..fe9c432 100644
--- a/lightdm.spec
+++ b/lightdm.spec
@@ -1,22 +1,22 @@
 Name:    lightdm
 Summary: Lightweight Display Manager
 Version: 1.2.2
-Release: 13%{?dist}
+Release: 14%{?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 
+Source0: https://launchpad.net/%{name}/1.2/%{version}/+download/%{name}-%{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
+Patch0: lightdm-lock-screen-before-switch.patch
 ## Downstream patches:
-Patch11: lightdm-1.2.2-fedora_config.patch 
+Patch10: lightdm-1.2.2-fedora_config.patch
 # hack in support for --nodaemon option
-Patch12: lightdm-1.2.2-nodaemon_option.patch
+Patch11: lightdm-1.2.2-nodaemon_option.patch
 
 BuildRequires: automake libtool
 BuildRequires: gettext
@@ -53,6 +53,8 @@ Requires: dbus-x11
 Requires: systemd
 Requires: xorg-x11-xinit
 
+Requires(pre): shadow-utils
+
 # 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
@@ -76,7 +78,7 @@ Summary: LightDM GObject client library
 # Requires: lightdm
 #Requires: %{name} = %{version}-%{release}
 %description gobject
-This package contains a GObject based library for LightDM clients to use to 
+This package contains a GObject based library for LightDM clients to use to
 interface with LightDM.
 
 %package gobject-devel
@@ -103,9 +105,9 @@ Requires: %{name}-qt%{?_isa} = %{version}-%{release}
 %prep
 %setup -q
 
-%patch2 -p1 -b .lock-screen
-%patch11 -p1 -b .fedora_config
-%patch12 -p1 -b .nodaemon_option
+%patch0 -p1 -b .lock-screen
+%patch10 -p1 -b .fedora_config
+%patch11 -p1 -b .nodaemon_option
 
 # AUTHORS is (mostly) empty, let's fix this
 echo "Robert Ancell <robert.ancell at canonical.com>" >> AUTHORS
@@ -120,7 +122,7 @@ autoreconf -f -i
   --enable-gtk-doc \
   --enable-introspection \
   --with-greeter-user=lightdm \
-  --with-greeter-session=lightdm-gtk-greeter 
+  --with-greeter-session=lightdm-gtk-greeter
 
 make %{?_smp_mflags} V=1
 
@@ -150,12 +152,13 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/%{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
+getent passwd lightdm >/dev/null || \
+  /usr/sbin/useradd -M -u 43 -d /var/log/lightdm -s /sbin/nologin -r 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
@@ -170,14 +173,14 @@ exit 0
 %{_libexecdir}/lightdm/
 %{_libdir}/girepository-1.0/LightDM-1.typelib
 %{_mandir}/man*/lightdm.*.*
-%dir %attr(1775,lightdm,lightdm) %{_localstatedir}/cache/lightdm/
+%dir %attr(-,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/
+%dir %attr(-,lightdm,lightdm) %{_localstatedir}/lib/lightdm/
+%dir %attr(-,lightdm,lightdm) %{_localstatedir}/log/lightdm/
 
 %post gobject -p /sbin/ldconfig
 %postun gobject -p /sbin/ldconfig
@@ -208,6 +211,11 @@ exit 0
 
 
 %changelog
+* Thu Jun 14 2012 Gregor Tätzner <brummbq at fedoraproject.org> - 1.2.2-14
+- check if lightdm user exists, before creating him
+- reset patch numbering
+- use standard dir perm
+
 * Tue Jun 12 2012 Rex Dieter <rdieter at fedoraproject.org> 1.2.2-13
 - Requires: lightdm-greeter = 1.2
 
@@ -238,7 +246,7 @@ exit 0
 
 * Wed Apr 25 2012 Rex Dieter <rdieter at fedoraproject.org> 1.2.2-5
 - make sane default lightdm.conf for fedora
-- nodaemon_option.patch 
+- nodaemon_option.patch
 - Requires: xorg-x11-xinit
 
 * Wed Apr 25 2012 Rex Dieter <rdieter at fedoraproject.org> 1.2.2-4


More information about the scm-commits mailing list