Add libprotobuf-c requirement

Adds a patch to express the CRIU dependency on protobuf-c-devel in
pkgconfig that is auto-detected when building a package.

Resolves: rhbz#2100639

Signed-off-by: Radostin Stoyanov <radostin@redhat.com>
This commit is contained in:
Radostin Stoyanov 2022-07-04 13:05:49 +01:00
parent d329a25a16
commit d32286cdd0
2 changed files with 33 additions and 1 deletions

27
criu.pc.patch Normal file
View File

@ -0,0 +1,27 @@
From 341ef149ee259d9432ea4c01507eefab2ef8b83c Mon Sep 17 00:00:00 2001
From: Radostin Stoyanov <radostin@redhat.com>
Date: Thu, 14 Oct 2021 12:58:56 +0100
Subject: [PATCH] criu.pc: Add libprotobuf-c as a dependency
CRIU has a dependency on protobuf-c-devel. We express this dependency
in pkgconfig to be auto-detected when building a package.
Signed-off-by: Radostin Stoyanov <radostin@redhat.com>
---
lib/c/criu.pc.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/c/criu.pc.in b/lib/c/criu.pc.in
index 33986d10d..bcced5033 100644
--- a/lib/c/criu.pc.in
+++ b/lib/c/criu.pc.in
@@ -4,5 +4,6 @@ includedir=@includedir@
Name: CRIU
Description: RPC library for userspace checkpoint and restore
Version: @version@
+Requires.private: libprotobuf-c
Libs: -L${libdir} -lcriu
Cflags: -I${includedir}
--
2.31.1

View File

@ -7,7 +7,7 @@
Name: criu Name: criu
Version: 3.17 Version: 3.17
Release: 2%{?dist} Release: 3%{?dist}
Provides: crtools = %{version}-%{release} Provides: crtools = %{version}-%{release}
Obsoletes: crtools <= 1.0-2 Obsoletes: crtools <= 1.0-2
Summary: Tool for Checkpoint/Restore in User-space Summary: Tool for Checkpoint/Restore in User-space
@ -28,6 +28,7 @@ BuildRequires: make
Recommends: tar Recommends: tar
Patch0: 0001-Fix-building-with-annobin.patch Patch0: 0001-Fix-building-with-annobin.patch
Patch1: criu.pc.patch
# user-space and kernel changes are only available for x86_64, arm, # user-space and kernel changes are only available for x86_64, arm,
# ppc64le, aarch64 and s390x # ppc64le, aarch64 and s390x
@ -74,6 +75,7 @@ their content in human-readable form.
%prep %prep
%setup -q %setup -q
%patch0 -p1 %patch0 -p1
%patch1 -p1
%build %build
# %{?_smp_mflags} does not work # %{?_smp_mflags} does not work
@ -124,6 +126,9 @@ rm $RPM_BUILD_ROOT%{_mandir}/man1/criu-ns.1*
%doc %{_mandir}/man1/crit.1* %doc %{_mandir}/man1/crit.1*
%changelog %changelog
* Mon Jul 04 2022 Radostin Stoyanov <radostin@redhat.com> - 3.17-3
- Add libprotobuf-c dependency requirement
* Mon May 09 2022 Adrian Reber <areber@redhat.com> - 3.17-2 * Mon May 09 2022 Adrian Reber <areber@redhat.com> - 3.17-2
- Update to 3.17 - Update to 3.17
- Drop upstreamed patch - Drop upstreamed patch