Unverified Commit 52584718 authored by Björn Esser's avatar Björn Esser
Browse files

Merge branch 'master' into epel7

parents 1784ee6e 7ac28c6c
/lightdm-1.18.3.tar.xz
/lightdm-1.22.0.tar.xz
/lightdm-1.24.0.tar.xz
/lightdm-1.25.0.tar.gz
[Seat:*]
xserver-command=X -background none
xserver-command=X -core -noreset
diff -up lightdm-1.18.0/data/lightdm.conf.fedora_config lightdm-1.18.0/data/lightdm.conf
--- lightdm-1.18.0/data/lightdm.conf.fedora_config 2015-11-02 21:26:23.000000000 -0600
+++ lightdm-1.18.0/data/lightdm.conf 2016-04-02 11:09:21.477204293 -0500
@@ -21,9 +21,9 @@
#start-default-seat=true
#greeter-user=lightdm
#minimum-display-number=0
-#minimum-vt=7
+#minimum-vt=1
#lock-memory=true
-#user-authority-in-system-dir=false
+#user-authority-in-system-dir=true
#guest-account-script=guest-account
#logind-check-graphical=false
#log-directory=/var/log/lightdm
@@ -88,7 +88,7 @@
#pam-service=lightdm
#pam-autologin-service=lightdm-autologin
#pam-greeter-service=lightdm-greeter
-#xserver-command=X
+#xserver-command=X -background none
#xmir-command=Xmir
#xserver-config=
#xserver-layout=
@@ -110,7 +110,7 @@
#allow-user-switching=true
#allow-guest=true
#guest-session=
-#session-wrapper=lightdm-session
+#session-wrapper=/etc/X11/xinit/Xsession
#greeter-wrapper=
#guest-wrapper=
#display-setup-script=
diff -up lightdm-1.18.0/data/users.conf.fedora_config lightdm-1.18.0/data/users.conf
--- lightdm-1.18.0/data/users.conf.fedora_config 2015-08-09 18:30:00.000000000 -0500
+++ lightdm-1.18.0/data/users.conf 2016-04-02 11:09:21.477204293 -0500
@@ -9,6 +9,6 @@
# hidden-shells = Shells that indicate a user cannot login
#
[UserList]
-minimum-uid=500
+minimum-uid=1000
hidden-users=nobody nobody4 noaccess
hidden-shells=/bin/false /usr/sbin/nologin
diff -up lightdm-1.18.0/src/lightdm.c.fedora_config lightdm-1.18.0/src/lightdm.c
--- lightdm-1.18.0/src/lightdm.c.fedora_config 2015-11-18 17:15:37.000000000 -0600
+++ lightdm-1.18.0/src/lightdm.c 2016-04-02 11:09:21.478204320 -0500
@@ -1372,10 +1372,12 @@ main (int argc, char **argv)
g_free (config_path);
/* Set default values */
+ if (!config_has_key (config_get_instance (), "LightDM", "user-authority-in-system-dir"))
+ config_set_boolean (config_get_instance (), "LightDM", "user-authority-in-system-dir", TRUE);
if (!config_has_key (config_get_instance (), "LightDM", "start-default-seat"))
config_set_boolean (config_get_instance (), "LightDM", "start-default-seat", TRUE);
if (!config_has_key (config_get_instance (), "LightDM", "minimum-vt"))
- config_set_integer (config_get_instance (), "LightDM", "minimum-vt", 7);
+ config_set_integer (config_get_instance (), "LightDM", "minimum-vt", 1);
if (!config_has_key (config_get_instance (), "LightDM", "guest-account-script"))
config_set_string (config_get_instance (), "LightDM", "guest-account-script", "guest-account");
if (!config_has_key (config_get_instance (), "LightDM", "greeter-user"))
@@ -1393,7 +1395,7 @@ main (int argc, char **argv)
if (!config_has_key (config_get_instance (), "Seat:*", "pam-greeter-service"))
config_set_string (config_get_instance (), "Seat:*", "pam-greeter-service", "lightdm-greeter");
if (!config_has_key (config_get_instance (), "Seat:*", "xserver-command"))
- config_set_string (config_get_instance (), "Seat:*", "xserver-command", "X");
+ config_set_string (config_get_instance (), "Seat:*", "xserver-command", "X -background none");
if (!config_has_key (config_get_instance (), "Seat:*", "xmir-command"))
config_set_string (config_get_instance (), "Seat:*", "xmir-command", "Xmir");
if (!config_has_key (config_get_instance (), "Seat:*", "xserver-share"))
@@ -1415,7 +1417,7 @@ main (int argc, char **argv)
if (!config_has_key (config_get_instance (), "Seat:*", "user-session"))
config_set_string (config_get_instance (), "Seat:*", "user-session", USER_SESSION);
if (!config_has_key (config_get_instance (), "Seat:*", "session-wrapper"))
- config_set_string (config_get_instance (), "Seat:*", "session-wrapper", "lightdm-session");
+ config_set_string (config_get_instance (), "Seat:*", "session-wrapper", "/etc/X11/xinit/Xsession");
if (!config_has_key (config_get_instance (), "LightDM", "log-directory"))
config_set_string (config_get_instance (), "LightDM", "log-directory", default_log_dir);
g_free (default_log_dir);
diff -up lightdm-1.18.0/configure.ac.qtchooser lightdm-1.18.0/configure.ac
--- lightdm-1.18.0/configure.ac.qtchooser 2016-03-22 21:12:54.000000000 -0500
+++ lightdm-1.18.0/configure.ac 2016-04-02 15:23:04.781774155 -0500
@@ -116,9 +116,9 @@ if test x"$enable_liblightdm_qt5" != "xn
Qt5Gui
],
[compile_liblightdm_qt5=yes
- AC_CHECK_TOOLS(MOC5, [moc])
+ AC_CHECK_TOOLS(MOC5, [moc-qt5 moc])
if test x"$(readlink $(which $MOC5))" = xqtchooser; then
- MOC5="$MOC5 --qt=qt5"
+ MOC5="$MOC5 --qt=5"
fi
],
[if test "x$enable_liblightdm_qt5" != xauto; then
diff -up lightdm-1.18.0/configure.qtchooser lightdm-1.18.0/configure
--- lightdm-1.18.0/configure.qtchooser 2016-03-22 21:28:47.000000000 -0500
+++ lightdm-1.18.0/configure 2016-04-02 15:24:31.062312669 -0500
@@ -17693,7 +17693,7 @@ esac
fi
if test x"$(readlink $(which $MOC4))" = xqtchooser; then
- MOC4="$MOC4 --qt=qt4"
+ MOC4="$MOC4 --qt=4"
fi
fi
@@ -17875,7 +17875,7 @@ fi
fi
if test -z "$MOC5"; then
ac_ct_MOC5=$MOC5
- for ac_prog in moc
+ for ac_prog in moc-qt5 moc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
@@ -17931,7 +17931,7 @@ esac
fi
if test x"$(readlink $(which $MOC5))" = xqtchooser; then
- MOC5="$MOC5 --qt=qt5"
+ MOC5="$MOC5 --qt=5"
fi
fi
Index: lightdm-1.25.0/Makefile.am
===================================================================
--- lightdm-1.25.0.orig/Makefile.am
+++ lightdm-1.25.0/Makefile.am
@@ -1,3 +1,4 @@
+ACLOCAL_AMFLAGS = -I m4
SUBDIRS = common liblightdm-gobject liblightdm-qt
if COMPILE_TESTS
SUBDIRS += tests
diff -up lightdm-1.9.8/common/dmrc.c.no_dmrc_save lightdm-1.9.8/common/dmrc.c
--- lightdm-1.9.8/common/dmrc.c.no_dmrc_save 2014-02-19 18:22:51.000000000 -0600
+++ lightdm-1.9.8/common/dmrc.c 2014-02-20 06:30:41.503707318 -0600
@@ -68,6 +68,7 @@ dmrc_save (GKeyFile *dmrc_file, CommonUs
Index: lightdm-1.25.0/common/dmrc.c
===================================================================
--- lightdm-1.25.0.orig/common/dmrc.c
+++ lightdm-1.25.0/common/dmrc.c
@@ -70,6 +70,7 @@ dmrc_save (GKeyFile *dmrc_file, CommonUs
data = g_key_file_to_data (dmrc_file, &length, NULL);
......@@ -10,12 +11,10 @@ diff -up lightdm-1.9.8/common/dmrc.c.no_dmrc_save lightdm-1.9.8/common/dmrc.c
path = g_build_filename (common_user_get_home_directory (user), ".dmrc", NULL);
@@ -81,6 +82,7 @@ dmrc_save (GKeyFile *dmrc_file, CommonUs
g_file_set_contents (path, data, length, NULL);
if (drop_privileges)
privileges_reclaim ();
g_free (path);
+#endif
/* Update the .dmrc cache */
cache_dir = config_get_string (config_get_instance (), "LightDM", "cache-directory");
diff -up lightdm-1.9.8/common/user-list.c.no_dmrc_save lightdm-1.9.8/common/user-list.c
diff -up lightdm-1.9.8/src/accounts.c.no_dmrc_save lightdm-1.9.8/src/accounts.c
diff -up lightdm-1.10.2/src/lightdm.c.nodaemon_option lightdm-1.10.2/src/lightdm.c
--- lightdm-1.10.2/src/lightdm.c.nodaemon_option 2014-09-17 06:42:48.681674585 -0500
+++ lightdm-1.10.2/src/lightdm.c 2014-09-17 06:44:03.021901180 -0500
@@ -1135,7 +1135,7 @@ main (int argc, char **argv)
Index: lightdm-1.25.0/src/lightdm.c
===================================================================
--- lightdm-1.25.0.orig/src/lightdm.c
+++ lightdm-1.25.0/src/lightdm.c
@@ -659,7 +659,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");
......
Index: lightdm-1.25.0/configure.ac
===================================================================
--- lightdm-1.25.0.orig/configure.ac
+++ lightdm-1.25.0/configure.ac
@@ -107,7 +107,7 @@ if test x"$enable_liblightdm_qt4" != "xn
fi
if test x"$MOC4" = xmoc; then
if test x"$(readlink $(which $MOC4))" = xqtchooser; then
- MOC4="$MOC4 --qt=qt4"
+ MOC4="$MOC4 --qt=4"
fi
fi
fi
@@ -141,7 +141,7 @@ if test x"$enable_liblightdm_qt5" != "xn
fi
if test x"$MOC5" = xmoc; then
if test x"$(readlink $(which $MOC5))" = xqtchooser; then
- MOC5="$MOC5 --qt=qt5"
+ MOC5="$MOC5 --qt=5"
fi
fi
fi
Index: lightdm-1.25.0/src/seat-local.c
===================================================================
--- lightdm-1.25.0.orig/src/seat-local.c
+++ lightdm-1.25.0/src/seat-local.c
@@ -169,6 +169,8 @@ get_vt (SeatLocal *seat, DisplayServer *
g_signal_connect (display_server, DISPLAY_SERVER_SIGNAL_READY, G_CALLBACK (display_server_ready_cb), seat);
g_signal_connect (display_server, DISPLAY_SERVER_SIGNAL_STOPPED, G_CALLBACK (display_server_transition_plymouth_cb), seat);
plymouth_deactivate ();
+
+ return vt;
}
else
l_debug (seat, "Plymouth is running on VT %d, but this is less than the configured minimum of %d so not replacing it", active_vt, vt_get_min ());
Index: lightdm-1.25.0/src/x-server-local.c
===================================================================
--- lightdm-1.25.0.orig/src/x-server-local.c
+++ lightdm-1.25.0/src/x-server-local.c
@@ -511,6 +511,9 @@ x_server_local_start (DisplayServer *dis
if (server->priv->vt >= 0)
g_string_append_printf (command, " vt%d -novtswitch", server->priv->vt);
+ if (!server->priv->background)
+ x_server_local_set_background (server, "none");
+
if (server->priv->background)
g_string_append_printf (command, " -background %s", server->priv->background);
[Unit]
Description=Light Display Manager
Documentation=man:lightdm(1)
# Replaces getty.
Conflicts=getty@tty1.service
After=systemd-user-sessions.service getty@tty1.service dbus.service plymouth-quit.service livesys-late.service
After=getty@tty1.service
# Replaces plymouth-quit since it quits plymouth on its own.
Conflicts=plymouth-quit.service
After=plymouth-quit.service
# We need all the dependencies of the services we are replacing.
# Pulled from getty@.service and plymouth-quit.service (except
# for plymouth-quit-wait.service since it waits until plymouth
# is quit, which we do).
After=rc-local.service plymouth-start.service systemd-user-sessions.service livesys-late.service
# We need DBus to be present.
Requires=dbus.service
# LighDM takes responsibility for stopping plymouth, so if it fails
# for any reason, make sure plymouth still stops.
OnFailure=plymouth-quit.service
[Service]
ExecStart=/usr/sbin/lightdm
......
# FIXME: most tests currently fail
#define tests 1
%bcond_with tests
%global glib2_version %(pkg-config --modversion glib-2.0 2>/dev/null || echo "2.10")
%global giturl https://github.com/CanonicalLtd/%{name}
Name: lightdm
Summary: A cross-desktop Display Manager
Version: 1.18.3
Release: 5%{?dist}
Name: lightdm
Summary: A cross-desktop Display Manager
Version: 1.25.0
Release: 1%{?dist}
# library/bindings are LGPLv2 or LGPLv3, the rest GPLv3+
License: (LGPLv2 or LGPLv3) and GPLv3+
URL: https://launchpad.net/lightdm/1.18
Source0: https://launchpad.net/lightdm/1.18/%{version}/+download/lightdm-%{version}.tar.xz
License: (LGPLv2 or LGPLv3) and GPLv3+
URL: https://www.freedesktop.org/wiki/Software/LightDM/
Source0: %{giturl}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: lightdm.pam
Source2: lightdm-autologin.pam
Source3: lightdm-tmpfiles.conf
Source4: lightdm.service
Source5: lightdm.logrotate
Source6: lightdm.rules
Source10: %{name}.pam
Source11: %{name}-autologin.pam
Source12: %{name}-tmpfiles.conf
Source13: %{name}.service
Source14: %{name}.logrotate
Source15: %{name}.rules
## .conf snippets
# use logrotate?
Source10: 50-backup-logs.conf
Source11: 50-minimum-vt.conf
Source12: 50-session-wrapper.conf
Source13: 50-user-authority-in-system-dir.conf
Source14: 50-xserver-command.conf
Source15: 50-disable-guest.conf
Source20: 50-backup-logs.conf
Source21: 50-minimum-vt.conf
Source22: 50-session-wrapper.conf
Source23: 50-user-authority-in-system-dir.conf
Source24: 50-xserver-command.conf
Source25: 50-disable-guest.conf
## Downstream patches:
# hack in support for --nodaemon option
Patch11: lightdm-1.10.2-nodaemon_option.patch
Patch0: %{name}-1.25.0-nodaemon_option.patch
# disable saving to ~/.dmrc (runs afoul of selinux, http://bugzilla.redhat.com/963238 )
Patch12: lightdm-1.9.8-no_dmrc_save.patch
Patch1: %{name}-1.25.0-no_dmrc_save.patch
## upstreamable patches
# search for moc-qt5, use -qt=5|4 (instead of --qt=qt4|qt5)
Patch51: lightdm-1.18-qtchooser.patch
## upstream patches
# https://bugs.launchpad.net/lightdm/+bug/1575200
Patch1: 2031_2030.diff
# patch51
BuildRequires: gettext
BuildRequires: gnome-common
BuildRequires: gtk-doc itstool
BuildRequires: intltool
BuildRequires: libgcrypt-devel
BuildRequires: pam-devel
BuildRequires: pkgconfig(audit)
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)
%global glib2_version %(pkg-config --modversion glib-2.0 2>/dev/null || echo "2.10")
BuildRequires: pkgconfig(gobject-introspection-1.0) >= 0.9.5
BuildRequires: pkgconfig(libxklavier)
BuildRequires: pkgconfig(QtCore) pkgconfig(QtDBus) pkgconfig(QtGui) pkgconfig(QtNetwork)
BuildRequires: pkgconfig(Qt5Core) pkgconfig(Qt5DBus) pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xcb)
BuildRequires: pkgconfig(xdmcp)
BuildRequires: systemd
BuildRequires: vala vala-tools
Requires: %{name}-gobject%{?_isa} = %{version}-%{release}
Requires: accountsservice
Requires: dbus-x11
%if 0%{?rhel} > 6 || 0%{?fedora} > 18
Requires: polkit-js-engine
# use -qt=5|4 (instead of --qt=qt4|qt5)
Patch2: %{name}-1.25.0-qtchooser.patch
# add ACLOCAL_AMFLAGS to Makefile.am
Patch3: %{name}-1.25.0-Automake_ACLOCAL_AMFLAGS.patch
# stop plymouth when the greeter is ready
Patch4: %{name}-1.25.0-stop_plymouth_on_greeter.patch
BuildRequires: gettext
BuildRequires: gnome-common
BuildRequires: gtk-doc itstool
BuildRequires: intltool
BuildRequires: libgcrypt-devel
BuildRequires: pam-devel
BuildRequires: pkgconfig(audit)
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) pkgconfig(QtDBus) pkgconfig(QtGui) pkgconfig(QtNetwork)
BuildRequires: pkgconfig(Qt5Core) pkgconfig(Qt5DBus) pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xcb)
BuildRequires: pkgconfig(xdmcp)
BuildRequires: systemd
BuildRequires: vala vala-tools
Requires: %{name}-gobject%{?_isa} = %{version}-%{release}
Requires: accountsservice
Requires: dbus-x11
%if 0%{?fedora} || 0%{?rhel} >= 7
Requires: polkit-js-engine
%endif
Requires: systemd
%{?systemd_requires}
Requires: xorg-x11-xinit
Requires: systemd
Requires: xorg-x11-xinit
Requires(pre): shadow-utils
Requires: %{name}-greeter = 1.2
%{?systemd_requires}
# 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 = 1.2
Requires(pre): shadow-utils
# needed for anaconda to boot into runlevel 5 after install
Provides: service(graphical-login) = lightdm
Provides: service(graphical-login) = %{name}
%description
Lightdm is a display manager that:
......@@ -93,216 +90,251 @@ Lightdm is a display manager that:
* Supports different display technologies
* Is lightweight - low memory usage and fast performance
%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}
Requires: glib2%{?_isa} >= %{glib2_version}
Summary: LightDM GObject client library
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: glib2%{?_isa} >= %{glib2_version}
%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}
Summary: Development files for %{name}-gobject
Requires: %{name}-gobject%{?_isa} = %{version}-%{release}
%description gobject-devel
%{summary}.
%package qt
Summary: LightDM Qt4 client library
# see comment in -gobject above
#Requires: %{name} = %{version}-%{release}
%{?_qt4_version:Requires: qt4%{?_isa} >= %{_qt4_version}}
Requires: %{name}%{?_isa} = %{version}-%{release}
%{?_qt4_version:Requires: qt4%{?_isa} >= %{_qt4_version}}
%description qt
This package contains a Qt4-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}
Summary: Development files for %{name}-qt
Requires: %{name}-qt%{?_isa} = %{version}-%{release}
%description qt-devel
%{summary}.
%package qt5
Summary: LightDM Qt5 client library
# see comment in -gobject above
#Requires: %{name} = %{version}-%{release}
%{?_qt5:Requires: %{?_qt5}%{?_isa} >= %{_qt5_version}}
Summary: LightDM Qt5 client library
Requires: %{name}%{?_isa} = %{version}-%{release}
%{?_qt5:Requires: %{?_qt5}%{?_isa} >= %{_qt5_version}}
%description qt5
This package contains a Qt5-based library for LightDM clients to use to interface
with LightDM.
%package qt5-devel
Summary: Development files for %{name}-qt5
Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
Summary: Development files for %{name}-qt5
Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
%description qt5-devel
%{summary}.
%prep
%setup -q
%patch11 -p1 -b .nodaemon_option
%patch12 -p1 -b .no_dmrc_save
%autosetup -p 1
%patch51 -p1 -b .qtchooser
# Make libtoolize happy.
%{__cat} %{_datadir}/aclocal/intltool.m4 > aclocal.m4
# rpath hack
sed -i -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure
# Bootstrap
NOCONFIGURE=1 ./autogen.sh
%build
%configure \
--disable-static \
--enable-gtk-doc \
--enable-libaudit \
--enable-liblightdm-qt \
--enable-liblightdm-qt5 \
--enable-introspection \
%{?tests:--enable-tests}%{!?tests:--disable-tests} \
--enable-vala \
--with-greeter-user=lightdm \
--with-greeter-session=lightdm-greeter
make %{?_smp_mflags} V=1
%configure \
--disable-silent-rules \
--disable-static \
--enable-gtk-doc \
--enable-libaudit \
--enable-lib%{name}-qt \
--enable-lib%{name}-qt5 \
--enable-introspection \
%if %{with tests}
--enable-tests \
%else
--disable-tests \
%endif
--enable-vala \
--with-greeter-user=%{name} \
--with-greeter-session=%{name}-greeter
%make_build
%install
make install DESTDIR=%{buildroot} INSTALL='install -p'
%make_install
# We need to own these
%{__mkdir_p} %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf.d/ \
%{buildroot}%{_datadir}/%{name}/%{name}.conf.d/ \
%{buildroot}%{_datadir}/%{name}/remote-sessions/ \
%{buildroot}%{_datadir}/xgreeters/ \
%{buildroot}%{_localstatedir}/cache/%{name}/ \
%{buildroot}%{_localstatedir}/run/%{name}/ \
%{buildroot}%{_localstatedir}/log/%{name}/ \
%{buildroot}%{_localstatedir}/lib/%{name}/ \
%{buildroot}%{_localstatedir}/lib/%{name}-data/
## unpackaged files
# libtool cruft
rm -fv %{buildroot}%{_libdir}/lib*.la
%{_bindir}/find %{buildroot}%{_libdir} -type f -name '*.a' -print -delete
%{_bindir}/find %{buildroot}%{_libdir} -type f -name '*.la' -print -delete
# We don't ship AppAmor
rm -rfv %{buildroot}%{_sysconfdir}/apparmor.d/
%{__rm} -rfv %{buildroot}%{_sysconfdir}/apparmor.d/
# omit upstart support
rm -rfv %{buildroot}%{_sysconfdir}/init
%{__rm} -rfv %{buildroot}%{_sysconfdir}/init
# 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}%{_sysconfdir}/lightdm/lightdm.conf.d/
mkdir -p %{buildroot}%{_datadir}/lightdm/lightdm.conf.d/
mkdir -p %{buildroot}%{_datadir}/lightdm/remote-sessions/
mkdir -p %{buildroot}%{_datadir}/xgreeters/
mkdir -p %{buildroot}%{_localstatedir}/cache/lightdm/
mkdir -p %{buildroot}%{_localstatedir}/run/lightdm/
mkdir -p %{buildroot}%{_localstatedir}/log/lightdm/
mkdir -p %{buildroot}%{_localstatedir}/lib/lightdm/
mkdir -p %{buildroot}%{_localstatedir}/lib/lightdm-data/
%{__install} -Dpm 0644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/%{name}
%{__install} -Dpm 0644 %{SOURCE11} %{buildroot}%{_sysconfdir}/pam.d/%{name}-autologin
%{__install} -Dpm 0644 %{SOURCE12} %{buildroot}%{_prefix}/lib/tmpfiles.d/%{name}.conf
%{__install} -Dpm 0644 %{SOURCE13} %{buildroot}%{_unitdir}/%{name}.service
%{__install} -Dpm 0644 %{SOURCE14} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
%{__install} -Dpm 0644 %{SOURCE15} %{buildroot}%{_datadir}/polkit-1/rules.d/%{name}.rules
%{__install} -pm 0644 %{SOURCE20} %{SOURCE21} %{SOURCE22} %{SOURCE23} \
%{SOURCE24} %{SOURCE25} %{buildroot}%{_datadir}/%{name}/%{name}.conf.d/
%find_lang %{name} --with-gnome
install -m644 -p -D %{SOURCE4} %{buildroot}%{_unitdir}/lightdm.service
install -m644 -p -D %{SOURCE5} %{buildroot}%{_sysconfdir}/logrotate.d/lightdm
install -m644 -p -D %{SOURCE6} %{buildroot}%{_datadir}/polkit-1/rules.d/lightdm.rules
install -m644 -p %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} %{SOURCE15} \
%{buildroot}%{_datadir}/lightdm/lightdm.conf.d/
%if %{with tests}
%check
# FIXME: most of these currently fail :( -- rex
%if 0%{?tests:1}
make check ||:
%make_build check ||:
%endif
%pre
getent group lightdm >/dev/null || groupadd -r lightdm
getent passwd lightdm >/dev/null || \
/usr/sbin/useradd -g lightdm -M -d /var/lib/lightdm -s /sbin/nologin -r lightdm
%{_bindir}/getent group %{name} >/dev/null || %{_sbindir}/groupadd -r %{name}
%{_bindir}/getent passwd %{name} >/dev/null || %{_sbindir}/useradd -g %{name} \
-M -d /var/lib/%{name} -s /sbin/nologin -r %{name}
exit 0
%post
%{?systemd_post:%systemd_post lightdm.service}
%{?systemd_post:%systemd_post %{name}.service}
%post gobject -p /sbin/ldconfig
%post qt -p /sbin/ldconfig
%post qt5 -p /sbin/ldconfig
%preun
%{?systemd_preun:%systemd_preun lightdm.service}
%{?systemd_preun:%systemd_preun %{name}.service}