SHA256
1
0
forked from pool/gdm
gdm/gdm.spec

467 lines
18 KiB
RPMSpec

#
# spec file for package gdm
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# FIXME: need to check what should be done to enable this (at least adapt the pam files). See bnc#699999
%define enable_split_authentication 0
Name: gdm
License: GPLv2+
Group: System/GUI/GNOME
Version: 3.1.91
Release: 1
Summary: The GNOME Display Manager
Url: http://projects.gnome.org/gdm/
Source: http://download.gnome.org/sources/gdm/3.1/%{name}-%{version}.tar.bz2
Source1: gdm.pamd
Source2: gdm-autologin.pamd
Source3: gdm-welcome.pamd
# gdmflexiserver wrapper, to enable other display managers to abuse the gdmflexiserver namespace (like lightdm)
Source4: gdmflexiserver-wrapper
# /etc/xinit.d/xdm integration script
Source5: X11-displaymanager-gdm
# PATCH-FEATURE-UPSTREAM gdm-plymouth.patch vuntz@opensuse.org -- Get a nice transition from plymouth; taken from Fedora
Patch0: gdm-plymouth.patch
# PATCH-FIX-UPSTREAM gdm-plymouth-X-nr.patch vuntz@opensuse.org -- Patch on top of the previous patch (we keep it separate so it's easy to sync with Fedora) to use -nr when starting X
Patch1: gdm-plymouth-X-nr.patch
# PATCH-FIX-UPSTREAM gdm-helper-directory.patch bgo582320 vuntz@novell.com -- Add --with-consolekit-directory, --with-check-accelerated-directory
Patch2: gdm-helper-directory.patch
# PATCH-FIX-OPENSUSE gdm-is-not-unstable-unless.patch vuntz@opensuse.org -- Make gdm think it's never running a development version unless SUSE_ENABLE_UNSTABLE_CHECK is set. This disables fatal warnings as well as abusive log
Patch3: gdm-is-not-unstable-unless.patch
# PATCH-FIX-UPSTREAM gdm-vt-allocation-hack.patch bgo511168 hpj@novell.com -- Needed for user switching
Patch4: gdm-vt-allocation-hack.patch
# PATCH-FIX-OPENSUSE gdm-desktop-session-env-pam.patch bnc427744 vuntz@novell.com -- Sets a PAM environment variable to let the pam gnome-keyring module know which session is started
Patch6: gdm-desktop-session-env-pam.patch
# PATCH-FIX-OPENSUSE gdm-suse-xsession.patch vuntz@novell.com -- Use the /etc/X11/xdm/* scripts
Patch7: gdm-suse-xsession.patch
# WARNING: do not remove/significantly change patch8 without updating the relevant patch in accountsservice too
# PATCH-FIX-OPENSUSE gdm-sysconfig-settings.patch bnc432360 hpj@novell.com -- Read autologin options from /etc/sysconfig/displaymanager; note that accountsservice has a similar patch (accountsservice-sysconfig.patch)
Patch8: gdm-sysconfig-settings.patch
# PATCH-FEATURE-OPENSUSE gdm-passwordless-login.patch vuntz@opensuse.org -- Support DISPLAYMANAGER_PASSWORD_LESS_LOGIN sysconfig option
Patch9: gdm-passwordless-login.patch
# PATCH-NEEDS-REBASE gdm-domain-logon.patch hpj@novell.com -- Add UI to log in a specific domain (was: PATCH_FEATURE-SLED bnc#627575)
Patch10: gdm-domain-logon.patch
# PATCH-NEEDS-REBASE PATCH-FIX-UPSTREAM gdm-greeter-greater-ui.patch bnc436431 bgo560508 vuntz@novell.com -- Improve the layout of the greeter. Note: the patch contains a patched glade file *and* the result glade file (for reference only, in case we need to rebase the patch)
Patch15: gdm-greeter-greater-ui.patch
# PATCH-FIX-UPSTREAM gdm-always-reflect-keyboard-layout.patch bnc438159 bgo561771 hpj@novell.com -- Make keyboard selector not neglect to apply the selected keyboard in some situations.
Patch18: gdm-always-reflect-keyboard-layout.patch
# PATCH-FIX-OPENSUSE gdm-gconf-path.patch vuntz@novell.com -- Fix gconf paths to be consistent with the ones used in openSUSE
Patch31: gdm-gconf-path.patch
# PATCH-FIX-OPENSUSE gdm-default-wm.patch vuntz@novell.com -- Use sysconfig to know to which desktop to use by default
Patch34: gdm-default-wm.patch
# PATCH-FIX-OPENSUSE gdm-xauthlocalhostname.patch bgo555464 vuntz@novell.com -- Set XAUTHLOCALHOSTNAME to localhost for local logins to avoid issues in the session in case the hostname changes
Patch35: gdm-xauthlocalhostname.patch
# PATCH-FIX-UPSTREAM gdm-look-at-runlevel.patch bnc540482 bgo599180 vuntz@opensuse.org -- Look at the current runlevel before managing the display again, so we don't do this when shutting down or rebooting
Patch40: gdm-look-at-runlevel.patch
# PATCH-FIX-OPENSUSE gdm-selinux.patch -- Small changes to make it compile fine with SELinux
Patch60: gdm-selinux.patch
BuildRequires: check-devel
BuildRequires: dbus-1-glib-devel
# needed for directory ownership
BuildRequires: dconf
BuildRequires: gconf2-devel
BuildRequires: gnome-doc-utils-devel
BuildRequires: gnome-patch-translation
# needed for directory ownership
BuildRequires: gnome-session-core
BuildRequires: gobject-introspection-devel >= 0.9.12
BuildRequires: intltool
BuildRequires: iso-codes-devel
BuildRequires: libattr-devel
BuildRequires: libcanberra-devel
BuildRequires: libselinux-devel
BuildRequires: libupower-glib-devel
BuildRequires: libxklavier-devel
BuildRequires: pam-devel
BuildRequires: pwdutils
BuildRequires: tcpd-devel
BuildRequires: translation-update-upstream
BuildRequires: update-desktop-files
BuildRequires: xorg-x11-server
BuildRequires: xorg-x11-server-extra
BuildRequires: pkgconfig(accountsservice)
BuildRequires: pkgconfig(nss)
Requires: %{name}-branding = %{version}
Requires: ConsoleKit-x11
Requires: gdmflexiserver
Requires: gnome-session-core
Requires: klogd
Requires: xorg-x11-server-extra
### Packages for the gdm session (see /usr/share/gnome-session/sessions/{gdm,gdm-fallback}.session and /usr/share/gdm/greeter/applications)
## Fallback
Requires: metacity
Requires: polkit-gnome
## Non-fallback
# Use Recommends, since we do not want to force people to install gnome-shell, and if it's not there, the fallback session will be used
Recommends: gnome-shell
## All sessions
Requires: gnome-settings-daemon
# Those accessibility features rely on deprecated modules that we don't ship :/ See bgo#658429.
#Recommends: gnome-mag
#Recommends: gok
Recommends: orca
# For groupadd, useradd, usermod
PreReq: pwdutils
PreReq: %insserv_prereq
Recommends: %{name}-lang
Recommends: iso-codes
Provides: gdm2 = %{version}
Obsoletes: gdm2 < %{version}
Provides: gnome-applets-gdm = %{version}
Obsoletes: gnome-applets-gdm < %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
DocDir: %{_defaultdocdir}
%gconf_schemas_prereq
%description
The GNOME Display Manager is a system service that is responsible for
providing graphical log-ins and managing local and remote displays.
%package -n libgdmgreeter1
License: GPLv2+
Summary: Client Library for Communicating with GDM Greeter Server
Group: System/Libraries
Recommends: gdm
%description -n libgdmgreeter1
The GNOME Display Manager is a system service that is responsible for
providing graphical log-ins and managing local and remote displays.
%package -n libgdmsimplegreeter1
License: GPLv2+
Summary: Library for GDM Simple Greeter Extensions
Group: System/Libraries
Recommends: gdm
%description -n libgdmsimplegreeter1
The GNOME Display Manager is a system service that is responsible for
providing graphical log-ins and managing local and remote displays.
%if %{enable_split_authentication}
%package simple-greeter-extensions
License: GPLv2+
Summary: GDM Simple Greeter Extensions -- Fingerprint and Smartcard Support
Group: System/Libraries
Supplements: gdm
%glib2_gsettings_schema_requires
%description simple-greeter-extensions
The GNOME Display Manager is a system service that is responsible for
providing graphical log-ins and managing local and remote displays.
%endif
%package devel
License: GPLv2+
Summary: Libraries for GDM -- Development Files
Group: Development/Libraries/GNOME
Requires: libgdmgreeter1 = %{version}
Requires: libgdmsimplegreeter1 = %{version}
Provides: libgdmsimplegreeter-devel = %{version}
Obsoletes: libgdmsimplegreeter-devel < %{version}
%description devel
The GNOME Display Manager is a system service that is responsible for
providing graphical log-ins and managing local and remote displays.
%package branding-upstream
License: GPLv2+
Summary: The GNOME Display Manager -- Upstream default configuration
Group: System/GUI/GNOME
Requires: %{name} = %{version}
Provides: %{name}-branding = %{version}
Conflicts: otherproviders(%{name}-branding)
Supplements: packageand(%{name}:branding-upstream)
BuildArch: noarch
#BRAND: Provide one file:
#BRAND: /etc/gdm/custom.conf
#BRAND: Default configuration of gdm
%description branding-upstream
The GNOME Display Manager is a system service that is responsible for
providing graphical log-ins and managing local and remote displays.
This package provides the upstream default configuration for gdm.
%package -n gdmflexiserver
License: GPLv2+
Summary: Gdmflexiserver Compatibility Wrapper for Display Managers
Group: System/GUI/GNOME
Suggests: gdm
BuildArch: noarch
%description -n gdmflexiserver
The gdmflexiserver tool interacts with the display manager to
enable fast user switching. This package contains a wrapper that
selects the correct gdmflexiserver implementatoin, based on the
running display manager.
%lang_package
%prep
%setup -q
translation-update-upstream
#disabled, needed for patch15
#gnome-patch-translation-prepare
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
#%%patch10 -p1
# needs rebase (bnc#689552)
#%%patch15 -p1
%patch18 -p1
%patch31 -p1
%patch34 -p1
%patch35 -p0
%patch40 -p1
%patch60
#gnome-patch-translation-update
%build
libtoolize -f -i
autoreconf -f -i
%configure\
--disable-static \
--libexecdir=%{_prefix}/lib/gdm \
--localstatedir=%{_localstatedir} \
--with-at-spi-registryd-directory=%{_libexecdir}/at-spi \
--with-consolekit-directory=%{_libexecdir}/ConsoleKit \
--with-check-accelerated-directory=%{_libexecdir} \
--with-selinux \
--enable-ipv6 \
%if %{enable_split_authentication}
--enable-split-authentication \
%else
--disable-split-authentication \
%endif
--disable-scrollkeeper
%__make %{?jobs:-j%jobs} V=1
%install
%make_install
%if 0%{?suse_version} <= 1120
%{__rm} %{buildroot}%{_datadir}/locale/en@shaw/LC_MESSAGES/*
%endif
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
%find_gconf_schemas
%if ! %{enable_split_authentication}
# Create extensions directory if it's not there yet, so we can package it
test ! -d %{buildroot}%{_libdir}/gdm/simple-greeter/extensions
mkdir -p %{buildroot}%{_libdir}/gdm/simple-greeter/extensions
%endif
# Remove wrapper, it is not needed.
mv $RPM_BUILD_ROOT%{_sbindir}/gdm-binary $RPM_BUILD_ROOT%{_sbindir}/gdm
## Install PAM files.
mkdir -p $RPM_BUILD_ROOT/etc/pam.d
# Generic pam config
cp %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/gdm
# Pam config for autologin
cp %{SOURCE2} $RPM_BUILD_ROOT/etc/pam.d/gdm-autologin
# Pam config for the greeter session
cp %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/gdm-welcome
# The default gdm pam configuration is the one to be used as pam-password too
%if %{enable_split_authentication}
rm $RPM_BUILD_ROOT/etc/pam.d/gdm-password
echo "We are not ready for this, we need to know what to put in gdm-fingerprint and gdm-smartcard pam config files."
false
%endif
ln -s gdm $RPM_BUILD_ROOT/etc/pam.d/gdm-password
## Install other files
# Install PostLogin script.
mv $RPM_BUILD_ROOT%{_sysconfdir}/gdm/PostLogin/Default.sample $RPM_BUILD_ROOT%{_sysconfdir}/gdm/PostLogin/Default
# Move gdmflexiserver to libexecdir and replace it with the compatibility wrapper
mv $RPM_BUILD_ROOT%{_bindir}/gdmflexiserver $RPM_BUILD_ROOT%{_libexecdir}/gdm/gdmflexiserver
install -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{_bindir}/gdmflexiserver
# Install /etc/xinit.d/xdm integration script
install -D -m 644 %{SOURCE5} %{buildroot}%{_libdir}/X11/displaymanagers/gdm
# Install other files
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/gdm
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/gdm
mkdir -p $RPM_BUILD_ROOT%{_bindir}
ln -s ../sbin/gdm $RPM_BUILD_ROOT%{_bindir}/gdm
%find_lang %{name} %{?no_lang_C}
%clean
rm -rf $RPM_BUILD_ROOT
%pre -f %{name}.schemas_pre
/usr/sbin/groupadd -r gdm 2> /dev/null || :
/usr/sbin/useradd -r -o -g gdm -s /bin/false \
-c "Gnome Display Manager daemon" -d /var/lib/gdm gdm 2> /dev/null || :
/usr/sbin/usermod -g gdm -G gdm -s /bin/false gdm 2> /dev/null
# Fix incorrect interpretation of DISPLAYMANAGER_PASSWORD_LESS_LOGIN (#307566).
# Last done in SLED10&10.1, first fixed in 10.3.
# Can be removed after SLES12:
if test -f sbin/conf.d/SuSEconfig.gdm && grep -q gdm-autologin sbin/conf.d/SuSEconfig.gdm ; then
if grep -q '^DISPLAYMANAGER_PASSWORD_LESS_LOGIN="no"' etc/sysconfig/displaymanager ; then
sed 's/^\(auth[[:space:]][[:space:]]*\)include[[:space:]]\([[:space:]]*\)common-auth/\1required\2pam_permit.so/' <etc/pam.d/gdm-autologin >etc/pam.d/gdm-autologin.new
if cmp -s etc/pam.d/gdm-autologin etc/pam.d/gdm-autologin.new ; then
rm etc/pam.d/gdm-autologin.new
else
mv etc/pam.d/gdm-autologin.new etc/pam.d/gdm-autologin
fi
fi
fi
# Fix how DISPLAYMANAGER_PASSWORD_LESS_LOGIN is used. Before 11.4,
# /etc/pam.d/gdm was changed to use pam_permit. We don't want this anymore.
if test -f /sbin/conf.d/SuSEconfig.gdm; then
grep -q pam_permit.so /etc/pam.d/gdm
if test $? -eq 0; then
# We'll just use the file from the new package
mv /etc/pam.d/gdm /etc/pam.d/gdm.rpmold
fi
fi
%post
%icon_theme_cache_post
%preun -f %{name}.schemas_preun
%posttrans -f %{name}.schemas_posttrans
%postun
%insserv_cleanup
%icon_theme_cache_postun
%post -n libgdmgreeter1 -p /sbin/ldconfig
%postun -n libgdmgreeter1 -p /sbin/ldconfig
%post -n libgdmsimplegreeter1 -p /sbin/ldconfig
%postun -n libgdmsimplegreeter1 -p /sbin/ldconfig
%if %{enable_split_authentication}
%post simple-greeter-extensions
%glib2_gsettings_schema_post
%postun simple-greeter-extensions
%glib2_gsettings_schema_postun
%endif
%files -f %{name}.schemas_list
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README
%dir %{_datadir}/gnome/
%dir %{_datadir}/gnome/help/
%dir %{_datadir}/gnome/help/%{name}/
%doc %{_datadir}/gnome/help/%{name}/C/
%dir %{_datadir}/omf/
%dir %{_datadir}/omf/%{name}/
%doc %{_datadir}/omf/%{name}/%{name}-C.omf
%dir %config %{_sysconfdir}/gdm
%config %{_sysconfdir}/gdm/[IPXl]*
%{_sbindir}/gdm
%{_bindir}/gdm
%{_bindir}/gdm-screenshot
%{_datadir}/gdm/
%{_datadir}/gnome-session/sessions/gdm-fallback.session
%{_datadir}/gnome-session/sessions/gdm-shell.session
%{_datadir}/icons/*/*/*/*.*
%{_datadir}/pixmaps/*.png
%dir %{_libexecdir}/gdm
%{_libexecdir}/gdm/gdm-*
%{_libexecdir}/gdm/gdmflexiserver
%attr(750,gdm,gdm) %dir %{_localstatedir}/lib/gdm
%ghost %attr(751,gdm,gdm) %dir %{_localstatedir}/run/gdm
%attr(750,gdm,gdm) %dir %{_localstatedir}/log/gdm
%attr(750,gdm,gdm) %dir %{_localstatedir}/lib/gdm/.gconf.mandatory
%attr(640,gdm,gdm) %{_localstatedir}/lib/gdm/.gconf.mandatory/%gconf-tree.xml
%attr(640,gdm,gdm) %{_localstatedir}/lib/gdm/.gconf.path
%dir %{_localstatedir}/cache/gdm
%config /etc/pam.d/gdm
%config /etc/pam.d/gdm-autologin
%config /etc/pam.d/gdm-password
%config /etc/pam.d/gdm-welcome
%if %{enable_split_authentication}
%config /etc/pam.d/gdm-fingerprint
%config /etc/pam.d/gdm-smartcart
%endif
%config %{_sysconfdir}/dbus-1/system.d/gdm.conf
%{_sysconfdir}/dconf/db/gdm
%{_sysconfdir}/dconf/profile/gdm
# /etc/xinit.d/xdm integration
%dir %{_libdir}/X11/displaymanagers
%{_libdir}/X11/displaymanagers/gdm
# Exclude simple-greeter extensions
%exclude %{_datadir}/gdm/simple-greeter/extensions
%files -n libgdmgreeter1
%defattr(-,root,root)
%{_libdir}/libgdmgreeter.so.*
%{_libdir}/girepository-1.0/GdmGreeter-1.0.typelib
%files -n libgdmsimplegreeter1
%defattr(-,root,root)
%{_libdir}/libgdmsimplegreeter.so.*
# Own directory where extensions are put
%dir %{_datadir}/gdm
%dir %{_datadir}/gdm/simple-greeter
%dir %{_datadir}/gdm/simple-greeter/extensions
%dir %{_libdir}/gdm
%dir %{_libdir}/gdm/simple-greeter
%dir %{_libdir}/gdm/simple-greeter/extensions
# The extension for non-split authentication
%{_datadir}/gdm/simple-greeter/extensions/unified/
%if %{enable_split_authentication}
%{_datadir}/gdm/simple-greeter/extensions/password/
%{_libdir}/gdm/simple-greeter/extensions/libpassword.so
%endif
%if %{enable_split_authentication}
%files simple-greeter-extensions
%defattr(-,root,root)
# fingerprint
%{_datadir}/gdm/simple-greeter/extensions/fingerprint/
%{_libdir}/gdm/simple-greeter/extensions/libfingerprint.so
%{_datadir}/glib-2.0/schemas/org.gnome.display-manager.extensions.fingerprint.gschema.xml
# smartcard
%{_datadir}/gdm/simple-greeter/extensions/smartcard/
%{_libdir}/gdm/simple-greeter/extensions/libsmartcard.so
%{_datadir}/glib-2.0/schemas/org.gnome.display-manager.extensions.smartcard.gschema.xml
%endif
%files devel
%defattr(-,root,root)
%{_includedir}/gdm/
%{_libdir}/libgdmgreeter.so
%{_libdir}/libgdmsimplegreeter.so
%{_libdir}/pkgconfig/gdmgreeter.pc
%{_libdir}/pkgconfig/gdmsimplegreeter.pc
%{_datadir}/gir-1.0/GdmGreeter-1.0.gir
%files branding-upstream
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/gdm/custom.conf
%files -n gdmflexiserver
%defattr(-,root,root)
%{_bindir}/gdmflexiserver
%files lang -f %{name}.lang
%changelog