Accepting request 1007348 from Virtualization:containers

- add include-fixes.patch
- reenable FORTIFY_SOURCE=3 

- fix build by using FORTIFY_SOURCE=2
- fix Supplements syntax

OBS-URL: https://build.opensuse.org/request/show/1007348
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/lxcfs?expand=0&rev=18
This commit is contained in:
Richard Brown 2022-10-01 15:42:50 +00:00 committed by Git OBS Bridge
commit 7d1aaf87c4
3 changed files with 31 additions and 1 deletions

13
include-fixes.patch Normal file
View File

@ -0,0 +1,13 @@
Index: lxcfs-4.0.12/src/utils.h
===================================================================
--- lxcfs-4.0.12.orig/src/utils.h
+++ lxcfs-4.0.12/src/utils.h
@@ -46,6 +46,8 @@ static inline int pidfd_open(pid_t pid,
{
return syscall(__NR_pidfd_open, pid, flags);
}
+#else
+#include <sys/pidfd.h>
#endif
#if !HAVE_PIDFD_SEND_SIGNAL

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Fri Sep 30 20:50:08 UTC 2022 - Dirk Müller <dmueller@suse.com>
- add include-fixes.patch
- reenable FORTIFY_SOURCE=3
-------------------------------------------------------------------
Sun Sep 25 17:00:54 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- fix build by using FORTIFY_SOURCE=2
- fix Supplements syntax
-------------------------------------------------------------------
Tue Feb 22 08:02:32 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>

View File

@ -31,6 +31,7 @@ URL: https://linuxcontainers.org/lxcfs
Source: https://linuxcontainers.org/downloads/%{name}/%{name}-%{version}.tar.gz
Source1: https://linuxcontainers.org/downloads/%{name}/%{name}-%{version}.tar.gz.asc
Source2: %{name}.keyring
Patch1: include-fixes.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: fdupes
@ -51,7 +52,11 @@ LXC but is usable by any runtime.
Summary: LXC hooks for %{name}
Group: System/Management
Requires: %{name} = %{version}
%if 0%{?sle_version} < 150000
Supplements: packageand(%{name}:liblxc1)
%else
Supplements: (%{name} and liblxc1)
%endif
BuildArch: noarch
%description hooks-lxc
@ -59,7 +64,7 @@ Configuration to add hooks for %{name} so that it automatically interoperates
with LXC for all containers.
%prep
%setup
%autosetup -p1
%build
autoreconf -vif