Accepting request 714166 from GNOME:Factory

OBS-URL: https://build.opensuse.org/request/show/714166
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/flatpak?expand=0&rev=34
This commit is contained in:
Dominique Leuenberger 2019-07-17 11:12:59 +00:00 committed by Git OBS Bridge
commit 3838e15fdd
3 changed files with 32 additions and 1 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jul 8 12:53:30 UTC 2019 - Dominique Leuenberger <dimstar@opensuse.org>
- Add system-user-flatpak.conf: generate a flatpak user for the
system helper (boo#1137537).
-------------------------------------------------------------------
Wed Jul 3 08:27:20 UTC 2019 - Antonio Larrosa <alarrosa@suse.com>

View File

@ -38,7 +38,8 @@ Summary: OSTree based application bundles management
License: LGPL-2.1-or-later
Group: System/Packages
URL: https://flatpak.github.io/
Source: %{name}-%{version}.tar.xz
Source0: %{name}-%{version}.tar.xz
Source1: system-user-flatpak.conf
Patch0: polkit_rules_usability.patch
BuildRequires: bison
BuildRequires: bubblewrap >= 0.2.1
@ -50,6 +51,7 @@ BuildRequires: libdwarf-devel
BuildRequires: libgpgme-devel >= 1.1.8
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: sysuser-tools
BuildRequires: xsltproc
BuildRequires: pkgconfig(appstream-glib)
BuildRequires: pkgconfig(dconf)
@ -72,6 +74,7 @@ Requires: %{libname} = %{version}
Requires: bubblewrap >= 0.2.1
Requires: ostree >= 2018.7
Requires: xdg-desktop-portal >= 0.10
Requires: user(flatpak)
Recommends: %{name}-lang = %{version}
# Remove after openSUSE Leap 42 is out of scope
Provides: xdg-app = %{version}
@ -83,6 +86,15 @@ flatpak is a system for building, distributing and running sandboxed desktop
applications on Linux. See https://wiki.gnome.org/Projects/SandboxedApps for
more information.
%package -n system-user-flatpak
Summary: System user for the flatpak system helper
Group: System/Base
%sysusers_requires
%description -n system-user-flatpak
System user for the flatpak system helper.
%package -n %{libname}
Summary: OSTree based application bundle management library
Group: System/Libraries
@ -146,6 +158,7 @@ NOCONFIGURE=1 ./autogen.sh
--with-priv-mode=none \
--with-dbus-config-dir=%{_dbusconfigdir}
make %{?_smp_mflags}
%sysusers_generate_pre %{SOURCE1} system-user-flatpak
%install
%make_install
@ -159,12 +172,17 @@ ln -s service %{buildroot}%{_sbindir}/rcflatpak-system-helper
# w/o password entry.
mv %{buildroot}/%{_datadir}/polkit-1/rules.d/{,60-}org.freedesktop.Flatpak.rules
mkdir -p %{buildroot}%{_sysusersdir}
install -m 644 %{SOURCE1} %{buildroot}%{_sysusersdir}/system-user-flatpak.conf
%if !%{support_environment_generators}
rm -Rf %{buildroot}%{_libexecdir}/systemd/user-environment-generators/
%endif
%find_lang %{name}
%pre -n system-user-flatpak -f system-user-flatpak.pre
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%pre
@ -225,6 +243,9 @@ rm -Rf %{buildroot}%{_libexecdir}/systemd/user-environment-generators/
%{_libexecdir}/systemd/user-environment-generators/60-flatpak
%endif
%files -n system-user-flatpak
%{_sysusersdir}/system-user-flatpak.conf
%files -n %{libname}
%{_libdir}/libflatpak.so.*

4
system-user-flatpak.conf Normal file
View File

@ -0,0 +1,4 @@
# Type Name ID GECOS [HOME]
u flatpak - "User for flatpak system helper"