Skip to content

Commit

Permalink
Merge pull request #1465 from giuseppe/sync-libocispec-7-5-2024
Browse files Browse the repository at this point in the history
libocispec: sync from upstream
  • Loading branch information
rhatdan committed May 8, 2024
2 parents 504dc65 + d795081 commit 3074e0b
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ jobs:
- test: alpine-build
- test: centos8-build
- test: centos9-build
- test: centos10-build
- test: clang-format
- test: clang-check
- test: checkpoint-restore
Expand Down Expand Up @@ -150,6 +151,10 @@ jobs:
sudo docker build -t crun-centos9-build tests/centos9-build
sudo docker run --cgroupns=host --privileged --rm -v /sys/fs/cgroup:/sys/fs/cgroup:rw,rslave -v ${PWD}:/crun crun-centos9-build
;;
centos10-build)
sudo docker build -t crun-centos10-build tests/centos10-build
sudo docker run --cgroupns=host --privileged --rm -v /sys/fs/cgroup:/sys/fs/cgroup:rw,rslave -v ${PWD}:/crun crun-centos10-build
;;
clang-format)
sudo docker build -t crun-clang-format tests/clang-format
sudo docker run --rm -w /crun -v ${PWD}:/crun crun-clang-format
Expand Down
2 changes: 1 addition & 1 deletion libocispec
2 changes: 1 addition & 1 deletion src/libcrun/blake3/blake3.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ INLINE size_t compress_chunks_parallel(const uint8_t *input, size_t input_len,
assert(input_len <= MAX_SIMD_DEGREE * BLAKE3_CHUNK_LEN);
#endif

const uint8_t *chunks_array[MAX_SIMD_DEGREE];
const uint8_t *chunks_array[MAX_SIMD_DEGREE] = {0, };
size_t input_position = 0;
size_t chunks_array_len = 0;
while (input_len - input_position >= BLAKE3_CHUNK_LEN) {
Expand Down
2 changes: 1 addition & 1 deletion src/libcrun/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ read_all_fd_with_size_hint (int fd, const char *description, char **out, size_t
int
read_all_file_at (int dirfd, const char *path, char **out, size_t *len, libcrun_error_t *err)
{
cleanup_close int fd;
cleanup_close int fd = -1;

fd = TEMP_FAILURE_RETRY (openat (dirfd, path, O_RDONLY | O_CLOEXEC));
if (UNLIKELY (fd < 0))
Expand Down
9 changes: 9 additions & 0 deletions tests/centos10-build/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM quay.io/centos/centos:stream10-development

RUN yum --enablerepo='appstream' --enablerepo='baseos' --enablerepo='crb' install -y make \
automake autoconf gettext criu-devel libtool gcc libcap-devel systemd-devel \
libseccomp-devel python3 libtool git protobuf-c protobuf-c-devel xz

COPY run-tests.sh /usr/local/bin

ENTRYPOINT /usr/local/bin/run-tests.sh
20 changes: 20 additions & 0 deletions tests/centos10-build/run-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh

set -e
cd /crun

git config --global --add safe.directory /crun

git clean -fdx
./autogen.sh
./configure --enable-embedded-yajl CFLAGS='-Wall -Wextra -Werror'
make -j "$(nproc)"

make -j "$(nproc)" distcheck DISTCHECK_CONFIGURE_FLAGS="--enable-embedded-yajl"

git clean -fdx
./autogen.sh
./configure --enable-embedded-yajl CFLAGS='-Wall -Wextra -Werror' --disable-systemd
make -j "$(nproc)"

make -j "$(nproc)" distcheck DISTCHECK_CONFIGURE_FLAGS="--enable-embedded-yajl"

1 comment on commit 3074e0b

@packit-as-a-service
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

podman-next COPR build failed. @containers/packit-build please check.

Please sign in to comment.