Bug 2101691 - Enable libkrun support in rawhide
Summary: Enable libkrun support in rawhide
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: crun
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lokesh Mandvekar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-28 07:15 UTC by Sergio Lopez
Modified: 2022-07-21 23:05 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-07-21 13:03:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Sergio Lopez 2022-06-28 07:15:39 UTC
Now that libkrun has landed in rawhide, please consider enabling libkrun support in the Fedora package for newer releases (releases produced after merging PR#946, PR#955 and PR#956) of crun.

In addition to the "configure" option and the additional "BuildRequires", the package would need to ship a symbolic link from "krun" to "crun".

Comment 1 Lokesh Mandvekar 2022-06-28 13:04:15 UTC
Is this rawhide only? What's the ETA for f36 and f35?

Comment 2 Sergio Lopez 2022-06-28 15:03:06 UTC
(In reply to Lokesh Mandvekar from comment #1)
> Is this rawhide only? What's the ETA for f36 and f35?

Yes, the idea is to keep it in rawhide, with f37 being the first release featuring libkrun-enabled programs.

Comment 3 Lokesh Mandvekar 2022-06-28 18:00:32 UTC
Sergio, Giuseppe, PTAL @ diff.

I can commit this change whenever we're about to cut a new release.


diff --git a/crun.spec b/crun.spec
index 9a9976a..a46f30a 100644
--- a/crun.spec
+++ b/crun.spec
@@ -1,3 +1,9 @@
+%if 0%{?fedora} >= 37
+%global krun_enabled 1
+%else
+%global krun_enabled 0
+%endif
+
 %global built_tag 1.4.5

 Summary: OCI runtime written in C
@@ -31,6 +37,10 @@ BuildRequires: python3
 BuildRequires: libcap-devel
 BuildRequires: systemd-devel
 BuildRequires: yajl-devel
+%if %{krun_enabled}
+BuildRequires: libkrun-devel
+Provides: krun
+%endif
 BuildRequires: libseccomp-devel
 BuildRequires: libselinux-devel
 BuildRequires: python3-libmount
@@ -51,7 +61,12 @@ Provides: oci-runtime

 %build
 ./autogen.sh
+
+%if %{krun_enabled}
+%configure --disable-silent-rules --with-libkrun
+%else
 %configure --disable-silent-rules
+%endif

 %make_build

@@ -59,9 +74,16 @@ Provides: oci-runtime
 %make_install
 rm -rf %{buildroot}%{_prefix}/lib*

+%if %{krun_enabled}
+ln -s %{_bindir}/%{name} %{buildroot}%{_bindir}/krun
+%endif
+
 %files
 %license COPYING
 %{_bindir}/%{name}
+%if %{krun_enabled}
+%{_bindir}/krun
+%endif
 %{_mandir}/man1/*

 %changelog

Comment 4 Sergio Lopez 2022-07-04 09:24:22 UTC
LGTM, thanks Lokesh!

Comment 5 Lokesh Mandvekar 2022-07-05 12:36:31 UTC
Thanks Sergio.

Giuseppe, please let me know when you're about to cut a new crun. I'll push this patch along with the rpm version update.

Comment 6 Giuseppe Scrivano 2022-07-20 14:56:12 UTC
Lokesh, I've just cut 1.5 upstream

Comment 7 Fedora Update System 2022-07-20 20:12:12 UTC
FEDORA-2022-8593b9ea9c has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-8593b9ea9c

Comment 8 Fedora Update System 2022-07-20 20:12:17 UTC
FEDORA-2022-8593b9ea9c has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-8593b9ea9c

Comment 9 Fedora Update System 2022-07-20 20:12:21 UTC
FEDORA-2022-8593b9ea9c has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-8593b9ea9c

Comment 10 Fedora Update System 2022-07-20 20:12:29 UTC
FEDORA-2022-8593b9ea9c has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-8593b9ea9c

Comment 11 Fedora Update System 2022-07-20 20:12:43 UTC
FEDORA-2022-8593b9ea9c has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-8593b9ea9c

Comment 12 Fedora Update System 2022-07-20 20:12:55 UTC
FEDORA-2022-8593b9ea9c has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-8593b9ea9c

Comment 13 Fedora Update System 2022-07-21 23:05:27 UTC
FEDORA-2022-8593b9ea9c has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-8593b9ea9c`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-8593b9ea9c

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.


Note You need to log in before you can comment on or make changes to this bug.