From f9395f97518128f1f920e291ef76971c7ae796f58d6bbf9579a059abb4c9a1fa Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Fri, 6 Aug 2021 12:46:50 +0000 Subject: [PATCH] Accepting request 910491 from home:fcrozat:branches:Virtualization:containers - Add libkrun-dlopen.patch: use soname when dlopening libkrun. OBS-URL: https://build.opensuse.org/request/show/910491 OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/crun?expand=0&rev=6 --- crun.changes | 5 +++++ crun.spec | 6 ++++-- libkrun-dlopen.patch | 16 ++++++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 libkrun-dlopen.patch diff --git a/crun.changes b/crun.changes index 8446f26..22c6908 100644 --- a/crun.changes +++ b/crun.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Aug 6 09:55:53 UTC 2021 - Frederic Crozat + +- Add libkrun-dlopen.patch: use soname when dlopening libkrun. + ------------------------------------------------------------------- Wed Jul 28 11:56:01 UTC 2021 - Paolo Stivanin diff --git a/crun.spec b/crun.spec index bf246ad..467eb70 100644 --- a/crun.spec +++ b/crun.spec @@ -17,12 +17,14 @@ Summary: OCI runtime written in C +License: GPL-2.0-or-later Name: crun Version: 0.21 Release: 0 Source0: https://github.com/containers/crun/releases/download/%{version}/%{name}-%{version}.tar.gz Source1: crun-rpmlintrc -License: GPL-2.0-or-later +# PATCH-FIX-OPENSUSE libkrun-dlopen.patch fcrozat@suse.com -- use soname when dlopening libkrun +Patch0: libkrun-dlopen.patch URL: https://github.com/containers/crun ExclusiveArch: x86_64 aarch64 # We always run autogen.sh @@ -50,7 +52,7 @@ Requires: libkrun0 >= 0.1.4 crun is a runtime for running OCI containers. It is built with libkrun support %prep -%autosetup +%autosetup -p1 %build ./autogen.sh diff --git a/libkrun-dlopen.patch b/libkrun-dlopen.patch new file mode 100644 index 0000000..ae8838b --- /dev/null +++ b/libkrun-dlopen.patch @@ -0,0 +1,16 @@ +Index: crun-0.18/src/libcrun/container.c +=================================================================== +--- crun-0.18.orig/src/libcrun/container.c 2021-02-18 16:25:28.000000000 +0100 ++++ crun-0.18/src/libcrun/container.c 2021-08-06 11:54:48.798850933 +0200 +@@ -712,9 +712,9 @@ + #endif + + #if HAVE_DLOPEN && HAVE_LIBKRUN +- handle = dlopen ("libkrun.so", RTLD_NOW); ++ handle = dlopen ("libkrun.so.0", RTLD_NOW); + if (handle == NULL) +- return crun_make_error (err, 0, "could not load `libkrun.so`: %s", dlerror ()); ++ return crun_make_error (err, 0, "could not load `libkrun.so.0`: %s", dlerror ()); + + args->exec_func = libkrun_do_exec; + args->exec_func_arg = handle;