Compare commits

..

35 commits

Author SHA1 Message Date
Packit
cd8d0c1f84 [packit] 1.12 upstream release
Upstream tag: 1.12
Upstream commit: ce429cb2
2023-11-23 17:12:41 +00:00
Packit
c2983488d0 [packit] 1.11.2 upstream release
Upstream tag: 1.11.2
Upstream commit: ab0edeef
2023-11-07 12:55:45 +00:00
Packit
f8a4eb9ae0 [packit] 1.11.1 upstream release
Upstream tag: 1.11.1
Upstream commit: 1084f952
2023-10-30 20:26:26 +00:00
Packit
cc5f8605b2 [packit] 1.11 upstream release
Upstream tag: 1.11
Upstream commit: 11f8d3dc
2023-10-26 20:21:10 +00:00
Packit
9ead93eaec [packit] 1.10 upstream release
Upstream tag: 1.10
Upstream commit: c053c83c
2023-10-19 10:13:34 +00:00
Packit
5bd582e6a8 [packit] 1.9.2 upstream release
Upstream tag: 1.9.2
Upstream commit: 35274d34
2023-09-27 21:05:50 +00:00
Lokesh Mandvekar
188deaff84
remove krun manpage if krun not supported
(cherry picked from commit 612a96918e)
2023-09-26 13:55:34 -04:00
Lokesh Mandvekar
68c54ab588
fix manpage installation
(cherry picked from commit 8de06754f3)
2023-09-26 13:34:00 -04:00
Packit
f3898ba098 [packit] 1.9.1 upstream release
Upstream tag: 1.9.1
Upstream commit: 1f2769e1
2023-09-26 15:30:34 +00:00
Packit
6bbcccecc5 [packit] 1.9 upstream release
Upstream tag: 1.9
Upstream commit: a538ac4e

If you need to do any change in this pull request, you need to locally fetch the source branch of it and push it (with a fix) to your fork (as it is not possible to push to the branch created in the Packit’s fork):
```
git fetch https://src.fedoraproject.org/forks/packit/rpms/crun.git refs/heads/*:refs/remotes/packit/*
git checkout packit/1.9-f37-update-propose_downstream
```
2023-09-07 14:03:49 +00:00
Packit
ea5220c5ab [packit] 1.8.7 upstream release
Upstream tag: 1.8.7
Upstream commit: 53a9996c

If you need to do any change in this pull request, you need to locally fetch the source branch of it and push it (with a fix) to your fork (as it is not possible to push to the branch created in the Packit’s fork):
```
git fetch https://src.fedoraproject.org/forks/packit/rpms/crun.git refs/heads/*:refs/remotes/packit/*
git checkout packit/1.8.7-f37-update-propose_downstream
```
2023-08-21 14:00:04 +00:00
Giuseppe Scrivano
35db33347b
bump to 1.8.6
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
(cherry picked from commit af069bdab7)
2023-07-27 09:53:32 +02:00
Giuseppe Scrivano
aaab0efcb9
bump to 1.8.5
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
(cherry picked from commit c636b7586e)
2023-05-20 21:30:03 +02:00
Giuseppe Scrivano
7df4a584a8
bump to 1.8.4
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-04-13 21:24:40 +02:00
Giuseppe Scrivano
b082a941ea
update sources
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
(cherry picked from commit 85c3a19695)
2023-03-25 08:48:33 +01:00
Giuseppe Scrivano
48bc72c3ed
bump to 1.8.3
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
(cherry picked from commit bca7bed766)
2023-03-25 08:41:33 +01:00
Giuseppe Scrivano
3ae8b85386
update source for 1.8.2
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
(cherry picked from commit 4f279e7a34)
2023-03-21 16:04:14 +01:00
Giuseppe Scrivano
7090aa6b44
bump to 1.8.2
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
(cherry picked from commit 5dc658ac42)
2023-03-21 15:28:36 +01:00
Lokesh Mandvekar
43eea8d9c8 migrated to SPDX license
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
(cherry picked from commit 4f9a5d69a2)
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-03-06 16:42:55 +05:30
Giuseppe Scrivano
b551b31c0b
bump to 1.8.1
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
(cherry picked from commit 42d7001ab4)
2023-02-27 11:59:20 +01:00
Lokesh Mandvekar
714740deeb use arch: golang_arches_future
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
(cherry picked from commit 68e76ac992)
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-02-09 17:29:40 +05:30
Lokesh Mandvekar
120f7691e6 bump to v1.8
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
(cherry picked from commit 885030c8ca)
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-02-02 18:55:06 +05:30
Giuseppe Scrivano
4cbf490edc
crun: add gcrypt dependency
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
(cherry picked from commit c81e179cdc)
2023-01-03 15:04:09 +01:00
Giuseppe Scrivano
a820c545c4
make criu a weak dependency
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
(cherry picked from commit c14e1218f5)
2022-12-13 11:18:48 +01:00
Giuseppe Scrivano
6a52cbab9b
bump to 1.7.2
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
(cherry picked from commit 8434a3b7bc)
2022-11-29 20:52:44 +01:00
Giuseppe Scrivano
d464919c00
bump to 1.7.1
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
(cherry picked from commit 07a7ba9e01)
2022-11-25 12:59:19 +01:00
Lokesh Mandvekar
12baa225fd wasmedge present on all active Fedoras
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
(cherry picked from commit bdd508b2f6)
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-11-22 09:35:39 +05:30
Lokesh Mandvekar
bf0c67aa66 use correct macro
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
(cherry picked from commit d68ce50deb)
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-11-17 19:27:42 +05:30
Daniel J Walsh
601c0c8103
local build 2022-11-07 07:14:20 -05:00
Lokesh Mandvekar
6ba3adc3a3 enable wasm support
Currently, wasmedge is the only wasm provider in Fedora. That may change
with time. All wasm providers will include a `Provides: wasm-library`
which will be a hard dependency for crun along with a weak dependency
that the user can change per need.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
(cherry picked from commit f0e158812d)
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-11-04 15:57:54 +05:30
Troy Dawson
ee562b2c5f Add ExclusiveArch
If using golang, then you needs to use ExclusiveArch for those arches that do not have golang.

(cherry picked from commit db6cce4e02)
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-11-04 15:57:50 +05:30
Lokesh Mandvekar
9cf267ae7b Revert "auto bump to 1.6"
This reverts commit aac762a55d by
autobuilder.

(cherry picked from commit 76df75985f)
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-10-07 13:29:10 -04:00
RH Container Bot
e31c1d92dc auto bump to 1.6
(cherry picked from commit aac762a55d)
2022-10-07 15:23:27 +00:00
Lokesh Mandvekar
13af637c99 remove debbuild macros to comply with fedora guidelines
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
(cherry picked from commit 263de70111)
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-10-04 15:02:52 -04:00
Daniel J Walsh
06669ea343
local build 2022-09-28 14:41:13 -04:00
15 changed files with 48 additions and 540 deletions

View file

@ -1 +0,0 @@
1

22
.gitignore vendored
View file

@ -80,25 +80,3 @@ crun-0.1.1.tar.gz
/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
/crun-1.17.tar.zst
/crun-1.18.tar.zst
/crun-1.18.1.tar.zst
/crun-1.18.2.tar.zst
/crun-1.19.tar.zst
/crun-1.19.1.tar.zst
/crun-1.20.tar.zst
/crun-1.21.tar.zst
/crun-1.22.tar.zst
/crun-1.23.tar.zst
/crun-1.23.1.tar.zst
/crun-1.24.tar.zst
/crun-1.25.tar.zst
/crun-1.25.1.tar.zst
/crun-1.26.tar.zst

View file

@ -2,42 +2,12 @@
# See the documentation for more information:
# https://packit.dev/docs/configuration/
downstream_package_name: crun
# Ref: https://packit.dev/docs/configuration#files_to_sync
files_to_sync:
- src: rpm/gating.yaml
dest: gating.yaml
- src: plans/
dest: plans/
delete: true
mkpath: true
- src: tests/tmt/
dest: tests/tmt/
delete: true
mkpath: true
- src: .fmf/
dest: .fmf/
delete: true
mkpath: true
- .packit.yaml
packages:
crun-fedora:
pkg_tool: fedpkg
specfile_path: rpm/crun.spec
crun-centos:
pkg_tool: centpkg
specfile_path: rpm/crun.spec
crun-eln:
specfile_path: rpm/crun.spec
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"
@ -45,36 +15,24 @@ actions:
jobs:
- job: copr_build
trigger: pull_request
packages: [crun-fedora]
notifications: &copr_build_failure_notification
notifications:
failure_comment:
message: "Ephemeral COPR build failed. @containers/packit-build please check."
targets: &fedora_copr_targets
targets:
- fedora-all-x86_64
- fedora-all-aarch64
- job: copr_build
trigger: pull_request
packages: [crun-eln]
notifications: *copr_build_failure_notification
targets:
- fedora-eln-x86_64
- fedora-eln-aarch64
- job: copr_build
trigger: pull_request
packages: [crun-centos]
notifications: *copr_build_failure_notification
targets: &centos_copr_targets
- centos-stream-9-x86_64
- centos-stream-9-aarch64
- centos-stream-10-x86_64
- centos-stream-10-aarch64
- centos-stream+epel-next-8-x86_64
- centos-stream+epel-next-8-aarch64
- centos-stream+epel-next-9-x86_64
- centos-stream+epel-next-9-aarch64
additional_repos:
- "copr://rhcontainerbot/podman-next"
# Run on commit to main branch
- job: copr_build
trigger: commit
packages: [crun-fedora]
notifications:
failure_comment:
message: "podman-next COPR build failed. @containers/packit-build please check."
@ -82,59 +40,18 @@ jobs:
owner: rhcontainerbot
project: podman-next
# Podman system tests for Fedora and CentOS Stream
- job: tests
trigger: pull_request
packages: [crun-fedora]
notifications: &test_failure_notification
failure_comment:
message: "TMT tests failed. @containers/packit-build please check."
targets: *fedora_copr_targets
tf_extra_params:
environments:
- artifacts:
- type: repository-file
id: https://copr.fedorainfracloud.org/coprs/rhcontainerbot/podman-next/repo/fedora-$releasever/rhcontainerbot-podman-next-fedora-$releasever.repo
# Podman system tests for CentOS Stream
- job: tests
trigger: pull_request
packages: [crun-centos]
notifications: *test_failure_notification
# TODO: Re-enable centos-stream-10-x86_64 once criu issues are solved
# Ref: https://github.com/containers/crun/pull/1758#issuecomment-2901772392
# Issue filed: https://github.com/containers/crun/issues/1759
#targets: *centos_copr_targets
targets:
- centos-stream-9-x86_64
- centos-stream-9-aarch64
- centos-stream-10-aarch64
tf_extra_params:
environments:
- artifacts:
- type: repository-file
id: https://copr.fedorainfracloud.org/coprs/rhcontainerbot/podman-next/repo/centos-stream-$releasever/rhcontainerbot-podman-next-centos-stream-$releasever.repo
- job: propose_downstream
trigger: release
packages: [crun-fedora]
dist_git_branches: &fedora_targets
- fedora-all
# Disabled until we're switching to Packit for CentOS Stream
- job: propose_downstream
trigger: ignore
packages: [crun-centos]
update_release: false
dist_git_branches:
- c10s
- fedora-all
- job: koji_build
trigger: commit
packages: [crun-fedora]
dist_git_branches: *fedora_targets
dist_git_branches:
- fedora-all
- job: bodhi_update
trigger: commit
packages: [crun-fedora]
dist_git_branches:
- fedora-branched # rawhide updates are created automatically

View file

@ -1,3 +1,3 @@
This repository is maintained by packit.
https://packit.dev/
The file was generated using packit 1.13.0.post1.dev2+g84134016c.
The file was generated using packit 0.86.2.post1.dev2+g209847d1.

View file

@ -1,36 +1,34 @@
%global krun_opts %{nil}
%global wasmedge_opts %{nil}
%global yajl_opts %{nil}
%global wasmtime_opts %{nil}
%if %{defined copr_username}
%define copr_build 1
%endif
# krun and wasm support only on aarch64 and x86_64
# krun and wasm[edge,time] support only on aarch64 and x86_64
%ifarch aarch64 || x86_64
%if %{defined fedora}
# krun only exists on fedora
%global krun_support 1
%global krun_opts --with-libkrun
# Keep wasmedge enabled only on Fedora. It breaks a lot on EPEL.
%global wasm_support 1
# wasmedge not present on Fedora ELN environments
%if !0%{?eln}
%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
%if %{defined fedora} || (%{defined rhel} && 0%{?rhel} < 10)
%global system_yajl 1
%else
%global yajl_opts --enable-embedded-yajl
%endif
Summary: OCI runtime written in C
Name: crun
%if %{defined copr_build}
%if %{defined copr_username}
Epoch: 102
%endif
# DO NOT TOUCH the Version string!
@ -39,10 +37,10 @@ Epoch: 102
# 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.26
Version: 1.12
Release: %autorelease
URL: https://github.com/containers/%{name}
Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.zst
Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.xz
License: GPL-2.0-only
%if %{defined golang_arches_future}
ExclusiveArch: %{golang_arches_future}
@ -59,9 +57,7 @@ BuildRequires: libcap-devel
BuildRequires: libkrun-devel
%endif
BuildRequires: systemd-devel
%if %{defined system_yajl}
BuildRequires: yajl-devel
%endif
BuildRequires: libseccomp-devel
BuildRequires: python3-libmount
BuildRequires: libtool
@ -72,8 +68,14 @@ Recommends: criu-libs
%if %{defined wasmedge_support}
BuildRequires: wasmedge-devel
%endif
%if %{defined wasmtime_support}
BuildRequires: wasmtime-c-api-devel
%endif
%if %{defined rhel} && 0%{?rhel} == 8
BuildRequires: python3
%else
BuildRequires: python
BuildRequires: glibc-static
%endif
Provides: oci-runtime
%description
@ -94,11 +96,7 @@ krun is a symlink to the %{name} binary, with libkrun as an additional dependenc
%package wasm
Summary: %{name} with wasm support
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
# wasm packages are not present on RHEL yet and are currently a PITA to test
# Best to only include wasmedge as weak dep on rhel
%if %{defined fedora}
Requires: wasm-library
%endif
Recommends: wasmedge
%description wasm
@ -110,15 +108,20 @@ Recommends: wasmedge
%build
./autogen.sh
./configure --disable-silent-rules %{krun_opts} %{wasmedge_opts} %{yajl_opts}
./configure --disable-silent-rules %{krun_opts} %{wasmedge_opts} %{wasmtime_opts}
%make_build
%install
%make_install prefix=%{_prefix}
rm -rf %{buildroot}%{_prefix}/lib*
# Placeholder check to silence rpmlint
%check
%if %{defined krun_support}
ln -s %{_bindir}/%{name} %{buildroot}%{_bindir}/krun
%endif
%if %{defined wasm_support}
ln -s %{_bindir}/%{name} %{buildroot}%{_bindir}/%{name}-wasm
%endif
%files
%license COPYING

View file

@ -1,15 +0,0 @@
--- !Policy
product_versions:
- fedora-*
decision_contexts:
- bodhi_update_push_stable
- bodhi_update_push_testing
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
--- !Policy
product_versions:
- rhel-*
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View file

@ -1,40 +0,0 @@
discover:
how: fmf
execute:
how: tmt
prepare:
- when: distro == centos-stream or distro == rhel
how: shell
script: |
dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm --eval '%{?rhel}').noarch.rpm
dnf -y config-manager --set-enabled epel
order: 10
- when: initiator == packit
how: shell
script: |
COPR_REPO_FILE="/etc/yum.repos.d/*podman-next*.repo"
if compgen -G $COPR_REPO_FILE > /dev/null; then
sed -i -n '/^priority=/!p;$apriority=1' $COPR_REPO_FILE
fi
dnf -y upgrade --allowerasing
order: 20
- how: install
package:
- bats
- crun
- podman-tests
/shellcheck:
discover+:
filter: 'tag:shellcheck'
enabled: true
adjust:
enabled: false
when: distro == centos-stream-10 or distro == rhel-10
prepare+:
- how: install
package: ShellCheck
/tests:
discover+:
filter: 'tag:podman | tag:sanity'

View file

@ -1,9 +0,0 @@
/:
inherit: false
summary: Run tmt's integration tests
plan:
import:
url: https://github.com/teemtee/tmt
path: /plans/friends
name: /podman

View file

@ -1 +1 @@
SHA512 (crun-1.26.tar.zst) = 0785af6095a26290f433c5739bea5d98a029c3f0e8efbeed420481849ebddd70acde6c1105133c392abf26bca90d232cced5e5994da7506d66a020a02c129fb3
SHA512 (crun-1.12.tar.xz) = 3ed4d2c2b27ea1b9c0c68762e2eff0f18ee9efcd401a9f7fc984459f1b593def2a353484c8c0c5967fb2aae11df446aca4353346f843e3a0298d2400721ee488

View file

@ -1,7 +0,0 @@
adjust:
duration: 10m
when: arch == aarch64
summary: Run crun specific Podman tests
test: bash ./system-test.sh
tag: [ podman ]

View file

@ -1,17 +0,0 @@
#!/usr/bin/env bash
set -exo pipefail
if [[ "$(id -u)" -ne 0 ]];then
echo "Please run this script as superuser"
exit 1
fi
cat /etc/redhat-release
rpm -q conmon containers-common crun podman podman-tests
# Run crun specific podman tests
bats -t /usr/share/podman/test/system/030-run.bats
bats -t /usr/share/podman/test/system/075-exec.bats
bats -t /usr/share/podman/test/system/280-update.bats
bats -t /usr/share/podman/test/system/520-checkpoint.bats

View file

@ -1,180 +0,0 @@
{
"ociVersion": "1.0.0",
"process": {
"terminal": false,
"user": {
"uid": 0,
"gid": 0
},
"args": [
"sleep", "10"
],
"env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"TERM=xterm"
],
"cwd": "/",
"capabilities": {
"bounding": [
"CAP_AUDIT_WRITE",
"CAP_KILL",
"CAP_NET_BIND_SERVICE"
],
"effective": [
"CAP_AUDIT_WRITE",
"CAP_KILL",
"CAP_NET_BIND_SERVICE"
],
"inheritable": [
],
"permitted": [
"CAP_AUDIT_WRITE",
"CAP_KILL",
"CAP_NET_BIND_SERVICE"
],
"ambient": [
"CAP_AUDIT_WRITE",
"CAP_KILL",
"CAP_NET_BIND_SERVICE"
]
},
"rlimits": [
{
"type": "RLIMIT_NOFILE",
"hard": 1024,
"soft": 1024
}
],
"noNewPrivileges": true
},
"root": {
"path": "rootfs",
"readonly": true
},
"hostname": "crun",
"mounts": [
{
"destination": "/proc",
"type": "proc",
"source": "proc"
},
{
"destination": "/dev",
"type": "tmpfs",
"source": "tmpfs",
"options": [
"nosuid",
"strictatime",
"mode=755",
"size=65536k"
]
},
{
"destination": "/dev/pts",
"type": "devpts",
"source": "devpts",
"options": [
"nosuid",
"noexec",
"newinstance",
"ptmxmode=0666",
"mode=0620",
"gid=5"
]
},
{
"destination": "/dev/shm",
"type": "tmpfs",
"source": "shm",
"options": [
"nosuid",
"noexec",
"nodev",
"mode=1777",
"size=65536k"
]
},
{
"destination": "/dev/mqueue",
"type": "mqueue",
"source": "mqueue",
"options": [
"nosuid",
"noexec",
"nodev"
]
},
{
"destination": "/sys",
"type": "sysfs",
"source": "sysfs",
"options": [
"nosuid",
"noexec",
"nodev",
"ro"
]
},
{
"destination": "/sys/fs/cgroup",
"type": "cgroup",
"source": "cgroup",
"options": [
"nosuid",
"noexec",
"nodev",
"relatime",
"ro"
]
}
],
"linux": {
"resources": {
"devices": [
{
"allow": false,
"access": "rwm"
}
]
},
"namespaces": [
{
"type": "pid"
},
{
"type": "network"
},
{
"type": "ipc"
},
{
"type": "uts"
},
{
"type": "cgroup"
},
{
"type": "mount"
}
],
"maskedPaths": [
"/proc/acpi",
"/proc/asound",
"/proc/kcore",
"/proc/keys",
"/proc/latency_stats",
"/proc/timer_list",
"/proc/timer_stats",
"/proc/sched_debug",
"/sys/firmware",
"/proc/scsi"
],
"readonlyPaths": [
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger"
]
}
}

View file

@ -1,4 +0,0 @@
summary: Sanity test for crun
test: bash ./runtest.sh
duration: 10m
tag: [ sanity ]

View file

@ -1,113 +0,0 @@
#!/usr/bin/env bash
set -exo pipefail
TEMPDIR=$(mktemp -d)
TESTIMG="quay.io/libpod/busybox"
CNAME="mycont-$RANDOM"
cat /etc/redhat-release
uname -r
rpm -q crun criu
if ! crun --version; then
exit 1
fi
if ! crun features; then
exit 1
fi
if ! crun list; then
exit 1
fi
# create the top most bundle and rootfs directory
mkdir -p "$TEMPDIR"/rootfs
# export busybox via podman into the rootfs directory
if ! (podman export "$(podman create $TESTIMG)" | tar -C "$TEMPDIR"/rootfs -xvf -); then
exit 1
fi
# use existing spec
cp ./config.json "$TEMPDIR"
ls "$TEMPDIR"
cd "$TEMPDIR"
if ! crun create $CNAME; then
exit 1
fi
if ! crun list; then
exit 1
fi
if ! crun start $CNAME; then
exit 1
fi
if ! crun list; then
exit 1
fi
if ! crun state $CNAME; then
exit 1
fi
if ! crun ps $CNAME; then
exit 1
fi
if ! ret=$(crun exec $CNAME pwd) || [[ "$ret" != '/' ]]; then
exit 1
fi
if ! crun pause $CNAME; then
exit 1
fi
if ! crun state $CNAME; then
exit 1
fi
if ! crun resume $CNAME; then
exit 1
fi
if ! crun state $CNAME; then
exit 1
fi
if ! ret=$(crun exec $CNAME pwd) || [[ "$ret" != '/' ]]; then
exit 1
fi
if ! crun delete --force $CNAME; then
exit 1
fi
if ! crun list; then
exit 1
fi
if ! (crun run $CNAME &); then
exit 1
fi
if ! crun list; then
exit 1
fi
# make sure the container is running state
sleep 2
if ! ret=$(crun exec $CNAME echo 'ok') || [[ "$ret" != 'ok' ]]; then
exit 1
fi
if ! crun kill $CNAME; then
exit 1
fi
exit 0

View file

@ -1,4 +0,0 @@
summary: Shellcheck tests
test: find ../ -type f -name "*.sh" -exec shellcheck {} +
duration: 10m
tag: [ shellcheck ]