diff --git a/.gitignore b/.gitignore index 00f243a..573ee2f 100644 --- a/.gitignore +++ b/.gitignore @@ -66,3 +66,24 @@ crun-0.1.1.tar.gz /crun-1.7.2.tar.xz /crun-1.8.tar.xz /crun-1.8.1.tar.xz +/crun-1.8.2.tar.xz +/crun-1.8.3.tar.xz +/crun-1.8.4.tar.xz +/crun-1.8.5.tar.xz +/crun-1.8.6.tar.xz +/crun-1.8.7.tar.xz +/crun-1.9.tar.xz +/crun-1.9.1.tar.xz +/crun-1.9.2.tar.xz +/crun-1.10.tar.xz +/crun-1.11.tar.xz +/crun-1.11.1.tar.xz +/crun-1.11.2.tar.xz +/crun-1.12.tar.xz +/crun-1.13.tar.xz +/crun-1.14.tar.xz +/crun-1.14.1.tar.xz +/crun-1.14.2.tar.xz +/crun-1.14.3.tar.xz +/crun-1.14.4.tar.xz +/crun-1.15.tar.zst diff --git a/.packit.yaml b/.packit.yaml new file mode 100644 index 0000000..734d5a6 --- /dev/null +++ b/.packit.yaml @@ -0,0 +1,130 @@ +--- +# See the documentation for more information: +# https://packit.dev/docs/configuration/ + +downstream_package_name: crun + +packages: + crun-fedora: + pkg_tool: fedpkg + specfile_path: rpm/crun.spec + crun-centos: + pkg_tool: centpkg + specfile_path: rpm/crun.spec + +srpm_build_deps: + - git-archive-all + - make + +actions: + # This action runs only on copr build jobs + create-archive: + - "git-archive-all -v --force-submodules rpm/crun-HEAD.tar.xz" + - bash -c "ls -1 rpm/crun-HEAD.tar.xz" + +jobs: + - job: copr_build + trigger: pull_request + packages: [crun-fedora] + notifications: &copr_build_failure_notification + failure_comment: + message: "Ephemeral COPR build failed. @containers/packit-build please check." + targets: + - fedora-all-x86_64 + - fedora-all-aarch64 + - fedora-eln-x86_64 + - fedora-eln-aarch64 + + - job: copr_build + trigger: pull_request + packages: [crun-centos] + notifications: *copr_build_failure_notification + targets: + - epel-9-x86_64 + - epel-9-aarch64 + - centos-stream-9-x86_64 + - centos-stream-9-aarch64 + - centos-stream-10-x86_64 + - centos-stream-10-aarch64 + + # Run on commit to main branch + - job: copr_build + trigger: commit + notifications: + failure_comment: + message: "podman-next COPR build failed. @containers/packit-build please check." + branch: main + owner: rhcontainerbot + project: podman-next + + # Podman system tests for Fedora and CentOS Stream + - job: tests + trigger: pull_request + packages: [crun-fedora] + notifications: &podman_system_test_fail_notification + failure_comment: + message: "podman system tests failed. @containers/packit-build please check." + targets: + - fedora-all-x86_64 + - fedora-all-aarch64 + identifier: podman_system_test_fedora + tmt_plan: "/plans/podman_system_test" + + # Podman system tests for Fedora and CentOS Stream + - job: tests + trigger: pull_request + packages: [crun-centos] + notifications: *podman_system_test_fail_notification + targets: + - centos-stream-9-x86_64 + - centos-stream-9-aarch64 + # TODO: Enable cs10 tests after netavark has finished defaulting to + # nftables + #- centos-stream-10-x86_64 + #- centos-stream-10-aarch64 + identifier: podman_system_test_centos + tmt_plan: "/plans/podman_system_test" + + # Podman system tests for RHEL + - job: tests + trigger: pull_request + packages: [crun-centos] + use_internal_tf: true + notifications: *podman_system_test_fail_notification + targets: + epel-9-x86_64: + distros: [RHEL-9.4.0-Nightly,RHEL-9-Nightly] + epel-9-aarch64: + distros: [RHEL-9.4.0-Nightly,RHEL-9-Nightly] + # TODO: Enable cs10 tests after netavark has finished defaulting to + # nftables + #centos-stream-10-x86_64: + # distros: [RHEL-10-Beta-Nightly] + #centos-stream-10-aarch64: + # distros: [RHEL-10-Beta-Nightly] + identifier: podman_system_test_internal + tmt_plan: "/plans/podman_system_test" + + - job: propose_downstream + trigger: release + packages: [crun-fedora] + update_release: false + dist_git_branches: + - fedora-all + + - job: propose_downstream + trigger: release + packages: [crun-centos] + update_release: false + dist_git_branches: + - c10s + + - job: koji_build + trigger: commit + dist_git_branches: + - fedora-all + + - job: bodhi_update + trigger: commit + dist_git_branches: + - fedora-branched # rawhide updates are created automatically diff --git a/README.packit b/README.packit new file mode 100644 index 0000000..066b312 --- /dev/null +++ b/README.packit @@ -0,0 +1,3 @@ +This repository is maintained by packit. +https://packit.dev/ +The file was generated using packit 0.95.0.post1.dev8+gce6bd577. diff --git a/crun.spec b/crun.spec index f704275..f8f06c4 100644 --- a/crun.spec +++ b/crun.spec @@ -1,112 +1,148 @@ %global krun_opts %{nil} +%global wasmedge_opts %{nil} +%global wasmtime_opts %{nil} -%if 0%{?fedora} >= 37 +# krun and wasm[edge,time] support only on aarch64 and x86_64 %ifarch aarch64 || x86_64 -%global krun_support enabled +%global wasm_support 1 + +%if %{defined copr_project} +%define copr_build 1 +%endif + +%if %{defined fedora} || %{defined copr_build} +%global wasmedge_support 1 +%global wasmedge_opts --with-wasmedge +%endif + +# krun only exists on fedora +%if %{defined fedora} +%global krun_support 1 %global krun_opts --with-libkrun %endif + +# wasmtime exists only on podman-next copr for now +%if %{defined copr_project} && "%{?copr_project}" == "podman-next" +%global wasmtime_support 1 +%global wasmtime_opts --with-wasmtime %endif -# wasmedge built only for aarch64 and x86_64 -%ifarch aarch64 || x86_64 -%global wasm_support enabled -%global wasm_opts --with-wasmedge %endif -%global built_tag 1.8.1 -%global gen_version %(b=%{built_tag}; echo ${b/-/"~"}) - Summary: OCI runtime written in C Name: crun -Version: %{gen_version} -URL: https://github.com/containers/%{name} -# Fetched from upstream -Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.xz -License: GPL-2.0-only +%if %{defined copr_build} +Epoch: 102 +%endif +# DO NOT TOUCH the Version string! +# The TRUE source of this specfile is: +# https://github.com/containers/crun/blob/main/rpm/crun.spec +# If that's what you're reading, Version must be 0, and will be updated by Packit for +# copr and koji builds. +# If you're reading this on dist-git, the version is automatically filled in by Packit. +Version: 1.15 Release: %autorelease +URL: https://github.com/containers/%{name} +Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.zst +License: GPL-2.0-only +%if %{defined golang_arches_future} ExclusiveArch: %{golang_arches_future} +%else +ExclusiveArch: aarch64 ppc64le riscv64 s390x x86_64 +%endif BuildRequires: autoconf BuildRequires: automake -BuildRequires: go-md2man -BuildRequires: libtool BuildRequires: gcc BuildRequires: git-core -BuildRequires: python3 +BuildRequires: gperf BuildRequires: libcap-devel -BuildRequires: systemd-devel -BuildRequires: yajl-devel -BuildRequires: libgcrypt-devel -%if "%{krun_support}" == "enabled" +%if %{defined krun_support} BuildRequires: libkrun-devel %endif -%if "%{wasm_support}" == "enabled" -BuildRequires: wasmedge-devel -%endif +BuildRequires: systemd-devel +BuildRequires: yajl-devel BuildRequires: libseccomp-devel -BuildRequires: libselinux-devel BuildRequires: python3-libmount -BuildRequires: make -BuildRequires: glibc-static +BuildRequires: libtool BuildRequires: protobuf-c-devel -%ifnarch %ix86 BuildRequires: criu-devel >= 3.17.1-2 -%endif Recommends: criu >= 3.17.1 Recommends: criu-libs +%if %{defined wasmedge_support} +BuildRequires: wasmedge-devel +%endif +%if %{defined wasmtime_support} +BuildRequires: wasmtime-c-api-devel +%endif +BuildRequires: python Provides: oci-runtime %description -%{name} is a runtime for running OCI containers +%{name} is a OCI runtime + +%if %{defined krun_support} +%package krun +Summary: %{name} with libkrun support +Requires: libkrun +Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} +Provides: krun = %{?epoch:%{epoch}:}%{version}-%{release} + +%description krun +krun is a symlink to the %{name} binary, with libkrun as an additional dependency. +%endif + +%if %{defined wasm_support} +%package wasm +Summary: %{name} with wasm support +Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} +# The hard dep on wasm-library is causing trouble in internal testing farm +# with RHEL. +%if %{defined fedora} +Requires: wasm-library +%else +Recommends: wasm-library +%endif +Recommends: wasmedge + +%description wasm +%{name}-wasm is a symlink to the %{name} binary, with wasm as an additional dependency. +%endif %prep -%autosetup -Sgit %{name}-%{built_tag} +%autosetup -Sgit -n %{name}-%{version} %build ./autogen.sh -%configure --disable-silent-rules %{krun_opts} %{wasm_opts} +./configure --disable-silent-rules %{krun_opts} %{wasmedge_opts} %{wasmtime_opts} %make_build %install -%make_install +%make_install prefix=%{_prefix} rm -rf %{buildroot}%{_prefix}/lib* -%if "%{krun_support}" == "enabled" -ln -s ../bin/%{name} %{buildroot}%{_bindir}/krun + +%if %{defined krun_support} +ln -s %{name} %{buildroot}%{_bindir}/krun %endif -%if "%{wasm_support}" == "enabled" -ln -s ../bin/%{name} %{buildroot}%{_bindir}/%{name}-wasm +%if %{defined wasm_support} +ln -s %{name} %{buildroot}%{_bindir}/%{name}-wasm %endif %files %license COPYING %{_bindir}/%{name} -%{_mandir}/man1/* - -%if "%{krun_support}" == "enabled" -%package krun -Summary: OCI Runtime providing Virtualization-based process isolation capabilities. -Provides: krun -Requires: %{name} = %{version}-%{release} -Requires: libkrun - -%description krun -%{name}-krun OCI Runtime providing Virtualization-based process isolation capabilities. +%{_mandir}/man1/%{name}.1.gz +%if %{defined krun_support} %files krun +%license COPYING %{_bindir}/krun +%{_mandir}/man1/krun.1.gz %endif -%if "%{wasm_support}" == "enabled" -%package wasm -Summary: wasm support for %{name} -Requires: wasm-library -Recommends: wasmedge -Requires: %{name} = %{version}-%{release} - -%description wasm -%{name}-wasm provides %{name} built with wasm support - +%if %{defined wasm_support} %files wasm +%license COPYING %{_bindir}/%{name}-wasm %endif diff --git a/sources b/sources index cf842bd..7bf880b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (crun-1.8.1.tar.xz) = 6230b378f4746aff1d53f3ed797229b2056ece76e8e5b22d6f5f7b42e6042c6aff5294298f3cfd1293b4a87371dfa58cc69e57455e20948abd7269059ad39042 +SHA512 (crun-1.15.tar.zst) = a6e141f372817ed8ad1776c3ee272f68fa69680ef4d51b56643c0e4985016a5a6a415cc8623aa211c511916f2c61a417864c24c8d35fde594b624c666a9cca32