packages: xorg-app-xdm/xorg-app-xdm.spec - mask sysv service for systemd, s...

glen glen at pld-linux.org
Sat Apr 21 01:06:21 CEST 2012


Author: glen                         Date: Fri Apr 20 23:06:21 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- mask sysv service for systemd, should be started via prefdm like the rest of DM

---- Files affected:
packages/xorg-app-xdm:
   xorg-app-xdm.spec (1.44 -> 1.45) 

---- Diffs:

================================================================
Index: packages/xorg-app-xdm/xorg-app-xdm.spec
diff -u packages/xorg-app-xdm/xorg-app-xdm.spec:1.44 packages/xorg-app-xdm/xorg-app-xdm.spec:1.45
--- packages/xorg-app-xdm/xorg-app-xdm.spec:1.44	Mon Sep 26 17:05:14 2011
+++ packages/xorg-app-xdm/xorg-app-xdm.spec	Sat Apr 21 01:06:16 2012
@@ -8,7 +8,7 @@
 Summary(uk.UTF-8):	Менеджер дисплею X
 Name:		xorg-app-xdm
 Version:	1.1.11
-Release:	1
+Release:	2
 License:	MIT
 Group:		X11/Applications
 Source0:	http://xorg.freedesktop.org/releases/individual/app/xdm-%{version}.tar.bz2
@@ -31,6 +31,7 @@
 BuildRequires:	libtool
 BuildRequires:	pam-devel
 BuildRequires:	pkgconfig >= 1:0.19
+BuildRequires:	rpmbuild(macros) >= 1.627
 BuildRequires:	xorg-lib-libX11-devel
 BuildRequires:	xorg-lib-libXau-devel
 BuildRequires:	xorg-lib-libXaw-devel
@@ -47,11 +48,13 @@
 Requires:	mktemp
 Requires:	pam >= 0.99.7.1
 Requires:	rc-scripts
+Requires:	xorg-app-sessreg
 Requires:	xorg-app-xconsole
 Requires:	xorg-app-xrdb
 Requires:	xorg-app-xsetroot
-Requires:	xorg-app-sessreg
 Requires:	xorg-lib-libXt >= 1.0.0
+Requires(post,preun,postun):	systemd-units >= 38
+Requires:	systemd-units >= 38
 Requires:	xterm
 Provides:	XDM
 Provides:	xdm = %{version}-%{release}
@@ -109,7 +112,8 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/var/lib/xdm
+install -d $RPM_BUILD_ROOT/var/lib/xdm \
+	$RPM_BUILD_ROOT%{systemdunitdir}
 
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT \
@@ -122,9 +126,10 @@
 install xdm-xinitrc-*/pixmaps/* $RPM_BUILD_ROOT%{_sysconfdir}/X11/xdm/pixmaps
 install xdm-xinitrc-*/{*Console,Xaccess,Xsession,Xsetup*} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xdm
 
-install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/pam.d/xdm
-install -D %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/xdm
-install -D %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/xdm
+install -Dp %{SOURCE2} $RPM_BUILD_ROOT/etc/pam.d/xdm
+install -Dp %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/xdm
+install -Dp %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/xdm
+ln -s /dev/null $RPM_BUILD_ROOT%{systemdunitdir}/gdm.service
 install -d $RPM_BUILD_ROOT/etc/security
 :> $RPM_BUILD_ROOT/etc/security/blacklist.xdm
 
@@ -133,12 +138,9 @@
 
 %post
 /sbin/chkconfig --add xdm
-if [ -f /var/lock/subsys/xdm ]; then
-	echo "Run \"/sbin/service xdm restart\" to restart xdm." >&2
-	echo "WARNING: it will terminate all sessions opened from xdm!" >&2
-else
-	echo "Run \"/sbin/service xdm start\" to start xdm." >&2
-fi
+# -n skips restarting as it would otherise terminate all sessions opened from xdm!
+%service -n xdm restart
+%systemd_reload
 
 %preun
 if [ "$1" = "0" ]; then
@@ -146,6 +148,9 @@
 	%service xdm stop
 fi
 
+%postun
+%systemd_reload
+
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS COPYING ChangeLog README
@@ -185,6 +190,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.45  2012/04/20 23:06:16  glen
+- mask sysv service for systemd, should be started via prefdm like the rest of DM
+
 Revision 1.44  2011/09/26 15:05:14  qboosh
 - updated to 1.1.11
 - fixed and updated pam_tty patch
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/packages/xorg-app-xdm/xorg-app-xdm.spec?r1=1.44&r2=1.45



More information about the pld-cvs-commit mailing list