ublue-os / ucore

An OCI base image of Fedora CoreOS with batteries included
https://projectucore.io
Apache License 2.0
115 stars 23 forks source link

zfs kmod build fails due to tar Operation not permitted on testing/F40 #160

Closed bsherman closed 2 months ago

bsherman commented 2 months ago

The zfs kmod has been failing testing builds for about a week.

https://github.com/ublue-os/ucore-kmods/actions/runs/8808481635/job/24177626174

The problem isn't new, as we've seen other ublue F40 builds failing with the same issue, which can be seen here: https://github.com/ublue-os/ucore-kmods/actions/runs/8808481635/job/24177626174#step:7:1033

A snippet:

getting zfs-2.2.3.tar.gz
+ echo 'getting zfs-2.2.3.tar.gz'
+ curl -L -O https://github.com/openzfs/zfs/releases/download/zfs-2.2.3/zfs-2.2.3.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100 32.2M  100 32.2M    0     0   137M      0 --:--:-- --:--:-- --:--:--  137M
+ tar xzf zfs-2.2.3.tar.gz
tar: zfs-2.2.3/cmd/raidz_test: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: zfs-2.2.3/cmd/zdb: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: zfs-2.2.3/cmd/zed/agents: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: zfs-2.2.3/cmd/zed/zed.d: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: zfs-2.2.3/cmd/zed: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: zfs-2.2.3/cmd/zfs: Cannot change mode to rwxr-xr-x: Operation not permitted
---snip---

So, this needs to get fixed, else we will soon not have stable builds either.

bsherman commented 2 months ago

This is challenging, because I've been unable to reproduce the issue locally.

I've tried using podman build on a Fedora 40 host (podman 5.0.2), as well as a Debian 12.5 host (podman 4.3.1) and can't reproduce.

We use an Ubuntu 22.04 build runner so I will try installing that distro in a VM to attempt to reproduce, and will probably even try a self-hosted github runner if I need.

But I'm really not sure what is the root cause of this issue.

bsherman commented 2 months ago

Excellent news! I can reproduce this issue locally using an Ubuntu 22.04 server VM which has the following:

$ podman -v
podman version 3.4.4
$ buildah -v
buildah version 1.23.1 (image-spec 1.0.1, runtime-spec 1.0.2-dev)
m2Giles commented 2 months ago

Reviewing bluefin's build scripts right now. I'm noticing that bluefin uses tar -xvf as well and hasn't triggered the bug.

The difference is that we use the -C flag to specify the output directory while the current akmods script does a cd into /tmp