File accountsservice.spec of Package accountsservice.9919

#
# spec file for package accountsservice
#
# Copyright (c) 2017 SUSE LINUX 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/
#


Name:           accountsservice
Version:        0.6.45
Release:        0
Summary:        D-Bus Service to Manipulate User Account Information
License:        GPL-3.0+
Group:          System/Daemons
Url:            http://www.freedesktop.org/wiki/Software/AccountsService/
Source:         http://www.freedesktop.org/software/accountsservice/%{name}-%{version}.tar.xz
# WARNING: do not remove/significantly change patch0 without updating the relevant patch in gdm too
# PATCH-FIX-OPENSUSE accountsservice-sysconfig.patch bnc#688071 vuntz@opensuse.org -- Read/write autologin configuration from sysconfig, like gdm (see gdm-sysconfig-settings.patch)
Patch0:         accountsservice-sysconfig.patch
# PATCH-FIX-OPENSUSE accountsservice-filter-suse-accounts.patch vuntz@opensuse.org -- Filter out some system users that are specific to openSUSE
Patch1:         accountsservice-filter-suse-accounts.patch
# PATCH-FEATURE-SLE as-fate318433-prevent-same-account-multi-logins.patch fate#318433 cxiong@suse.com -- prevent multiple simultaneous login.
Patch2:         as-fate318433-prevent-same-account-multi-logins.patch
# PATCH-FIX-UPSTREAM remove-no-longer-used-system-accounts.patch bsc#1063794 fdo#103879 qzheng@suse.com -- drop operator, nobody4 and noaccess from the blacklist.
Patch3:         remove-no-longer-used-system-accounts.patch
# PATCH-FIX-UPSTREAM accountsservice-missing-users-on-gdm-login.patch boo#1090003 fdo#106904 fezhang@suse.com -- Don't abort loading users when an /etc/shadow entry found missing
Patch4:         accountsservice-missing-users-on-gdm-login.patch
# PATCH-FIX-UPSTREAM accountsservice-lib-treat-session-type-wayland-as-graphical-session.patch boo#1095918 fdo#106855 xwang@suse.com -- Treat session type wayland as graphical mode
Patch5:         accountsservice-lib-treat-session-type-wayland-as-graphical-session.patch
# PATCH-FIX-UPSTREAM CVE-2018-14036.patch bsc#1099699 CVE-2018-14036 qzheng@suse.com -- To fix this situation this patch canonicalized the input path for the prefix comparison.
Patch6:         CVE-2018-14036.patch
# PATCH-FIX-UPSTREAM accountsservice-read-root-user-cache.patch bsc#1114292 glfo#accountsservice/accountsservice#65 xwang@suse.com-- read root user cache file.
Patch7:         accountsservice-read-root-user-cache.patch
# needed for patch0
BuildRequires:  gnome-common
BuildRequires:  gobject-introspection-devel
BuildRequires:  intltool
# needed for patch0
BuildRequires:  vala
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(libsystemd) >= 186
BuildRequires:  pkgconfig(polkit-gobject-1)
BuildRequires:  pkgconfig(systemd)
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%{?systemd_requires}

%description
The accountsservice server provides a set of D-Bus interfaces for
querying and manipulating user account information.

The implementation is based on the useradd, usermod and userdel
commands.

%package -n libaccountsservice0
Summary:        D-Bus Service to Manipulate User Account Information -- Client Library
# Clients do need the server to do something useful
Group:          System/Libraries
Requires:       %{name}

%description -n libaccountsservice0
The accountsservice server provides a set of D-Bus interfaces for
querying and manipulating user account information.

This package provides a client library for the service.

%package -n typelib-1_0-AccountsService-1_0
Summary:        D-Bus Service to Manipulate User Account Information -- Introspection bindings
Group:          System/Libraries

%description -n typelib-1_0-AccountsService-1_0
The accountsservice server provides a set of D-Bus interfaces for
querying and manipulating user account information.

This package provides the GObject Introspection bindings for the
client library.

%package devel
Summary:        D-Bus Service to Manipulate User Account Information -- Development Files
Group:          Development/Libraries/C and C++
Requires:       libaccountsservice0 = %{version}
Requires:       typelib-1_0-AccountsService-1_0 = %{version}

%description devel
The accountsservice server provides a set of D-Bus interfaces for
querying and manipulating user account information.

%lang_package
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%if !0%{?is_opensuse}
%patch2 -p1
%endif

%build
# needed for patch0
NOCONFIGURE=1 gnome-autogen.sh
%configure \
        --disable-static \
        --enable-user-heuristics
make %{?_smp_mflags}

%install
%make_install
%find_lang accounts-service
rm -f %{buildroot}%{_libdir}/*.la

%pre
%service_add_pre accounts-daemon.service

%post
%service_add_post accounts-daemon.service

%preun
%service_del_preun accounts-daemon.service

%postun
%service_del_postun accounts-daemon.service

%post -n libaccountsservice0 -p /sbin/ldconfig

%postun -n libaccountsservice0 -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING NEWS README
%{_unitdir}/accounts-daemon.service
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.Accounts.conf
%{_libexecdir}/accounts-daemon
%{_datadir}/dbus-1/interfaces/org.freedesktop.Accounts.xml
%{_datadir}/dbus-1/interfaces/org.freedesktop.Accounts.User.xml
%{_datadir}/dbus-1/system-services/org.freedesktop.Accounts.service
%{_datadir}/polkit-1/actions/org.freedesktop.accounts.policy
# Directories where the server stores user data
%dir %{_localstatedir}/lib/AccountsService
%dir %{_localstatedir}/lib/AccountsService/users
%dir %{_localstatedir}/lib/AccountsService/icons

%files -n libaccountsservice0
%defattr(-,root,root,-)
%{_libdir}/*.so.0*

%files -n typelib-1_0-AccountsService-1_0
%defattr(-,root,root)
%{_libdir}/girepository-1.0/AccountsService-1.0.typelib

%files devel
%defattr(-,root,root,-)
%doc %{_datadir}/gtk-doc/html/lib%{name}/
%{_libdir}/*.so
%{_libdir}/pkgconfig/accountsservice.pc
%{_includedir}/accountsservice-1.0/
%{_datadir}/gir-1.0/AccountsService-1.0.gir

%files lang -f accounts-service.lang

%changelog