From 6c7e00a297a0e48a5d4d8a1991510ac070c81e21 Mon Sep 17 00:00:00 2001 From: Radostin Stoyanov Date: Thu, 14 Oct 2021 14:18:01 +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 --- criu.pc.patch | 27 +++++++++++++++++++++++++++ criu.spec | 8 ++++++++ 2 files changed, 35 insertions(+) create mode 100644 criu.pc.patch diff --git a/criu.pc.patch b/criu.pc.patch new file mode 100644 index 0000000..623c446 --- /dev/null +++ b/criu.pc.patch @@ -0,0 +1,27 @@ +From 341ef149ee259d9432ea4c01507eefab2ef8b83c Mon Sep 17 00:00:00 2001 +From: Radostin Stoyanov +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 +--- + 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: protobuf-c + Libs: -L${libdir} -lcriu + Cflags: -I${includedir} +-- +2.31.1 + diff --git a/criu.spec b/criu.spec index 2a27a3b..8fb0c61 100644 --- a/criu.spec +++ b/criu.spec @@ -18,6 +18,11 @@ License: GPLv2 URL: http://criu.org/ Source0: https://github.com/checkpoint-restore/criu/archive/v%{version}/criu-%{version}.tar.gz +# Add protobuf-c as a dependency. +# We use this patch because the protobuf-c package name +# in RPM and DEB is different. +Patch99: criu.pc.patch + %if 0%{?rhel} && 0%{?rhel} <= 7 BuildRequires: perl # RHEL has no asciidoc; take man-page from Fedora 26 @@ -26,6 +31,7 @@ Source1: criu.8 Source2: crit.1 Source3: compel.1 Source4: criu-ns.1 + # The patch aio-fix.patch is needed as RHEL7 # doesn't do "nr_events *= 2" in ioctx_alloc(). Patch100: aio-fix.patch @@ -111,6 +117,8 @@ This script can help to workaround the so called "PID mismatch" problem. %prep %setup -q +%patch99 -p1 + %if 0%{?rhel} && 0%{?rhel} <= 7 %patch100 -p1 %endif