[lxdm] Move tmpfiles configuration to new location (#840186)
Christoph Wickert
cwickert at fedoraproject.org
Tue Aug 7 15:27:41 UTC 2012
commit cf3b2e658fee7cd1a46806bde9ec10341f38dd2e
Author: Christoph Wickert <cwickert at fedoraproject.org>
Date: Tue Aug 7 17:27:35 2012 +0200
Move tmpfiles configuration to new location (#840186)
- Ship systemd service file for Fedora >= 18 (#846148)
lxdm.service | 15 +++++++++++++++
lxdm.spec | 46 +++++++++++++++++++++++++++++++++++++++-------
2 files changed, 54 insertions(+), 7 deletions(-)
---
diff --git a/lxdm.service b/lxdm.service
new file mode 100644
index 0000000..9a89ffd
--- /dev/null
+++ b/lxdm.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=LXDM (Lightweight X11 Display Manager)
+#Documentation=man:lxdm(8)
+Conflicts=getty at tty1.service
+After=systemd-user-sessions.service getty at tty1.service plymouth-quit.service
+#Conflicts=plymouth-quit.service
+
+[Service]
+ExecStart=/usr/sbin/lxdm
+Restart=always
+IgnoreSIGPIPE=no
+#BusName=org.freedesktop.lxdm
+
+[Install]
+Alias=display-manager.service
diff --git a/lxdm.spec b/lxdm.spec
index dd826a9..0aa2c67 100644
--- a/lxdm.spec
+++ b/lxdm.spec
@@ -1,5 +1,7 @@
# Review at https://bugzilla.redhat.com/show_bug.cgi?id=540034
+%{!?_unitdir: %global _unitdir %{_prefix}/lib/systemd/system/}
+
%global git_snapshot 0
%if 0%{?git_snapshot}
@@ -16,7 +18,7 @@
Name: lxdm
Version: 0.4.1
-Release: 2%{?git_version:.%{?git_version}}%{?dist}
+Release: 3%{?git_version:.%{?git_version}}%{?dist}
Summary: Lightweight X11 Display Manager
Group: User Interface/Desktops
@@ -29,6 +31,9 @@ Source0: %{name}-%{?git_version}.tar.bz2
Source0: http://downloads.sourceforge.net/sourceforge/lxde/%{name}-%{version}.tar.gz
%endif
+# systemd service file
+Source1: lxdm.service
+
# http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxdm;a=commit;h=19f82a20
Patch0: lxdm-0.4.1-null-pointer.patch
@@ -82,11 +87,15 @@ BuildRequires: iso-codes-devel
BuildRequires: ConsoleKit-devel
BuildRequires: pam-devel
BuildRequires: intltool >= 0.40.0
+BuildRequires: systemd
Requires: pam
Requires: /sbin/shutdown
Requires: desktop-backgrounds-compat
# needed for anaconda to boot into runlevel 5 after install
Provides: service(graphical-login) = lxdm
+Requires(post): systemd
+Requires(preun): systemd
+Requires(postun): systemd
%description
@@ -123,7 +132,6 @@ EOF
%configure
make %{?_smp_mflags} V=1
-
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot} INSTALL='install -p'
@@ -136,7 +144,11 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}
touch %{buildroot}%{_localstatedir}/lib/%{name}.conf
%if 0%{?fedora} >= 15
-install -Dpm 644 tempfiles.lxdm.conf %{buildroot}%{_sysconfdir}/tmpfiles.d/lxdm.conf
+install -Dpm 644 tempfiles.lxdm.conf %{buildroot}%{_prefix}/lib/tmpfiles.d/lxdm.conf
+%endif
+
+%if 0%{?fedora} >= 18
+install -Dpm 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
%endif
@@ -144,6 +156,18 @@ install -Dpm 644 tempfiles.lxdm.conf %{buildroot}%{_sysconfdir}/tmpfiles.d/lxdm.
rm -rf %{buildroot}
+%post
+%systemd_post %{name}.service
+
+
+%preun
+%systemd_preun %{name}.service
+
+
+%postun
+%systemd_postun
+
+
%files -f %{name}.lang
%defattr(-,root,root,-)
# FIXME add ChangeLog and NEWS if not empty
@@ -160,10 +184,6 @@ rm -rf %{buildroot}
%config %{_sysconfdir}/%{name}/lxdm.conf
%config(noreplace) %{_sysconfdir}/pam.d/%{name}
-%if 0%{?fedora} >= 15
-%config(noreplace) %{_sysconfdir}/tmpfiles.d/lxdm.conf
-%endif
-
%{_bindir}/%{name}-config
%{_sbindir}/%{name}
%{_sbindir}/lxdm-binary
@@ -173,6 +193,14 @@ rm -rf %{buildroot}
%{_datadir}/%{name}/
%if 0%{?fedora} >= 15
+%config(noreplace) %{_prefix}/lib/tmpfiles.d/lxdm.conf
+%endif
+
+%if 0%{?fedora} >= 18
+%{_unitdir}/lxdm.service
+%endif
+
+%if 0%{?fedora} >= 15
%ghost %dir %{_localstatedir}/run/%{name}
%else
%dir %{_localstatedir}/run/%{name}
@@ -183,6 +211,10 @@ rm -rf %{buildroot}
%changelog
+* Tue Aug 07 2012 Christoph Wickert <cwickert at fedoraproject.org> - 0.4.1-3
+- Move tmpfiles configuration to new location (#840186)
+- Ship systemd service file for Fedora >= 18 (#846148)
+
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.4.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
More information about the scm-commits
mailing list