Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.1] CI fixes and misc backports #4241

Merged
merged 5 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ task:
env:
HOME: /root
CIRRUS_WORKING_DIR: /home/runc
GO_VERSION: "1.20"
GO_VERSION: "1.21"
BATS_VERSION: "v1.9.0"
RPMS: gcc git iptables jq glibc-static libseccomp-devel make criu fuse-sshfs
# yamllint disable rule:key-duplicates
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
- name: install go
uses: actions/setup-go@v4
with:
go-version: 1.x # Latest stable
go-version: 1.21

- name: unit test
run: sudo -E PATH="$PATH" -- make GOARCH=386 localunittest
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG GO_VERSION=1.20
ARG BATS_VERSION=v1.9.0
ARG LIBSECCOMP_VERSION=2.5.4
ARG LIBSECCOMP_VERSION=2.5.5

FROM golang:${GO_VERSION}-bullseye
ARG DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -31,6 +31,7 @@ RUN KEYFILE=/usr/share/keyrings/criu-repo-keyring.gpg; \
sshfs \
sudo \
uidmap \
iproute2 \
&& apt-get clean \
&& rm -rf /var/cache/apt /var/lib/apt/lists/* /etc/apt/sources.list.d/*.list

Expand Down
2 changes: 1 addition & 1 deletion script/release_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ set -e
## --->
# Project-specific options and functions. In *theory* you shouldn't need to
# touch anything else in this script in order to use this elsewhere.
: "${LIBSECCOMP_VERSION:=2.5.4}"
: "${LIBSECCOMP_VERSION:=2.5.5}"
project="runc"
root="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")/..")"

Expand Down
2 changes: 1 addition & 1 deletion script/seccomp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ source "$(dirname "${BASH_SOURCE[0]}")/lib.sh"

# sha256 checksums for seccomp release tarballs.
declare -A SECCOMP_SHA256=(
["2.5.4"]=d82902400405cf0068574ef3dc1fe5f5926207543ba1ae6f8e7a1576351dcbdb
["2.5.5"]=248a2c8a4d9b9858aa6baf52712c34afefcf9c9e94b76dce02c1c9aa25fb3375
)

# Due to libseccomp being LGPL we must include its sources,
Expand Down
10 changes: 5 additions & 5 deletions tests/integration/run.bats
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function teardown() {

runc run test_tmpfs
[ "$status" -eq 0 ]
[ "$output" = "$mode" ]
[ "${lines[0]}" = "$mode" ]
}

@test "runc run with tmpfs perms" {
Expand All @@ -83,13 +83,13 @@ function teardown() {
# Directory is to be created by runc.
runc run test_tmpfs
[ "$status" -eq 0 ]
[ "$output" = "444" ]
[ "${lines[0]}" = "444" ]

# Run a 2nd time with the pre-existing directory.
# Ref: https://github.com/opencontainers/runc/issues/3911
runc run test_tmpfs
[ "$status" -eq 0 ]
[ "$output" = "444" ]
[ "${lines[0]}" = "444" ]

# Existing directory, custom perms, no mode on the mount,
# so it should use the directory's perms.
Expand All @@ -98,15 +98,15 @@ function teardown() {
# shellcheck disable=SC2016
runc run test_tmpfs
[ "$status" -eq 0 ]
[ "$output" = "710" ]
[ "${lines[0]}" = "710" ]

# Add back the mode on the mount, and it should use that instead.
# Just for fun, use different perms than was used earlier.
# shellcheck disable=SC2016
update_config '.mounts[-1].options = ["mode=0410"]'
runc run test_tmpfs
[ "$status" -eq 0 ]
[ "$output" = "410" ]
[ "${lines[0]}" = "410" ]
}

@test "runc run [joining existing container namespaces]" {
Expand Down
Loading