From 969871b98dd37968a1ea1617012aaf2610ccdff3 Mon Sep 17 00:00:00 2001 From: Pavel Solovev Date: Fri, 28 Apr 2023 17:17:19 +0300 Subject: [PATCH] FTBFS fix (rhbz#2171746) - Convert licence tag to SPDX --- uresourced-remove-unneeded-directive.patch | 26 ++++++++++++++++++++++ uresourced.spec | 17 +++++++------- 2 files changed, 35 insertions(+), 8 deletions(-) create mode 100644 uresourced-remove-unneeded-directive.patch diff --git a/uresourced-remove-unneeded-directive.patch b/uresourced-remove-unneeded-directive.patch new file mode 100644 index 0000000..e32c4b9 --- /dev/null +++ b/uresourced-remove-unneeded-directive.patch @@ -0,0 +1,26 @@ +From af9cac5b78507c58f72ab6e389583755f50cdc5f Mon Sep 17 00:00:00 2001 +From: Luca Boccassi +Date: Wed, 16 Nov 2022 12:03:56 +0000 +Subject: [PATCH] user unit: remove ProtectSystem= + +In a user unit ProtectSystem= cannot work without PrivateUsers=yes, +as mounts can only be done in a user namespace when not running as root. +In the future this will be implicit, so remove it to avoid unintended +sandboxing from being enabled. +--- + data/user/uresourced.service.in | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/data/user/uresourced.service.in b/data/user/uresourced.service.in +index 09212a2..0be14e8 100644 +--- a/data/user/uresourced.service.in ++++ b/data/user/uresourced.service.in +@@ -20,5 +20,4 @@ ExecStart=@libexecdir@/uresourced --user + TimeoutStopSec=5s + + +-ProtectSystem=strict + RestrictAddressFamilies=AF_UNIX +-- +GitLab + diff --git a/uresourced.spec b/uresourced.spec index f44af3a..6d0be40 100644 --- a/uresourced.spec +++ b/uresourced.spec @@ -3,17 +3,18 @@ Version: 0.5.3 Release: %autorelease Summary: Dynamically allocate resources to the active user -License: LGPLv2+ +License: LGPL-2.1-or-later URL: https://gitlab.freedesktop.org/benzea/uresourced -Source0: https://gitlab.freedesktop.org/benzea/uresourced/-/archive/v%{version}/%{name}-v%{version}.tar.bz2 +Source0: %{url}/-/archive/v%{version}/%{name}-v%{version}.tar.bz2 +Patch0: %{url}/-/commit/af9cac5b78507c58f72ab6e389583755f50cdc5f.patch#/uresourced-remove-unneeded-directive.patch -BuildRequires: git -BuildRequires: pipewire-devel -BuildRequires: systemd-devel -BuildRequires: systemd-rpm-macros -BuildRequires: meson BuildRequires: gcc +BuildRequires: meson BuildRequires: pkgconfig(gio-2.0) +BuildRequires: pkgconfig(libpipewire-0.3) +BuildRequires: pkgconfig(libsystemd) +BuildRequires: pkgconfig(systemd) +BuildRequires: systemd-rpm-macros %description This daemon dynamically assigns a resource allocation to the active @@ -22,7 +23,7 @@ using systemd (e.g. GNOME), then the memory allocation will be used to protect the sessions core processes (session.slice). %prep -%autosetup -S git -n %{name}-v%{version} +%autosetup -n %{name}-v%{version} -p1 %build %meson -Dappmanagement=true