Commit Graph

14 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
eb2ce68829 update xx to v1.6.1 for compatibility with alpine 3.21 and file 5.46+
This fixes compatibility with alpine 3.21 and file 5.46+

- Fix additional possible `xx-cc`/`xx-cargo` compatibility issue with Alpine 3.21
- Support for Alpine 3.21
- Fix `xx-verify` with `file` 5.46+
- Fix possible error taking lock in `xx-apk` in latest Alpine without `coreutils`

full diff: https://github.com/tonistiigi/xx/compare/v1.2.1...v1.6.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-12 19:12:49 +00:00
Sebastiaan van Stijn
596ada3ac0
release: add .dockerignore to fix repeated builds
Ignore previous release-artifacts so that repeated builds rebuild them. Before
this patch, building the dockerfile multiple times would rebuild the binaries,
but would not produce a new release-artifact (`.tar.gz`), because the make
target would not trigger if the file was already present.

With this patch, existing release-artifacts are no longer copied into the
Dockerfile, which prevents this, as well as saving some time copying files
that won't be used.

In addition to the above, other excludes were copied from the .gitignore,
to prevent cache-busts.

I also added `.DS_Store` files to the ignore-file. These files are generated
on macOS when navigating the filesystem, and would cause the build to fail if
present, as well as invalidating the build-cache;

    docker buildx build --build-arg RELEASE_VER=main --build-arg UBUNTU_VERSION=22.04 --build-arg GO_VERSION=1.21.5 -f .github/workflows/release/Dockerfile -o releases/ .
    ...
     > [target 4/4] RUN     export GIT_STATUS_OUTPUT=$(git status --porcelain) &&   test -z $GIT_STATUS_OUTPUT || (echo $GIT_STATUS_OUTPUT && exit 1):
    0.118 ++ git status --porcelain
    1.405 + export 'GIT_STATUS_OUTPUT=?? .DS_Store
    1.405 ?? .github/.DS_Store
    ...
    1.407 + test -z gc .DS_Store gc .github/.DS_Store gc api/.DS_Store gc api/api/ gc api/runtime/.DS_Store gc api/services/.DS_Store gc api/types/.DS_Store gc archive/.DS_Store gc cmd/.DS_Store gc cmd/containerd-shim-runc-v2/.DS_Store gc cmd/containerd-shim-runc-v2/vendor/ gc cmd/containerd/.DS_Store gc cmd/ctr/.DS_Store gc content/.DS_Store gc contrib/.DS_Store gc contrib/ansible/.DS_Store gc contrib/seccomp/.DS_Store gc diff/.DS_Store gc docs/.DS_Store gc docs/historical/.DS_Store gc events/.DS_Store gc gc/.DS_Store gc images/.DS_Store gc images/converter/.DS_Store gc integration/.DS_Store gc integration/cri-api/.DS_Store gc integration/failpoint/.DS_Store gc integration/images/.DS_Store gc integration/remote/.DS_Store gc leases/.DS_Store gc metadata/.DS_Store gc metrics/.DS_Store gc metrics/cgroups/.DS_Store gc metrics/types/.DS_Store gc pkg/.DS_Store gc pkg/cri/.DS_Store gc pkg/oom/.DS_Store gc pkg/transfer/.DS_Store gc plugins/.DS_Store gc protobuf/.DS_Store gc releases/.DS_Store
    1.407 /bin/bash: line 1: test: too many arguments
    1.408 + echo gc .DS_Store gc .github/.DS_Store gc api/.DS_Store gc api/api/ gc api/runtime/.DS_Store gc api/services/.DS_Store gc api/types/.DS_Store gc archive/.DS_Store gc cmd/.DS_Store gc cmd/containerd-shim-runc-v2/.DS_Store gc cmd/containerd-shim-runc-v2/vendor/ gc cmd/containerd/.DS_Store gc cmd/ctr/.DS_Store gc content/.DS_Store gc contrib/.DS_Store gc contrib/ansible/.DS_Store gc contrib/seccomp/.DS_Store gc diff/.DS_Store gc docs/.DS_Store gc docs/historical/.DS_Store gc events/.DS_Store gc gc/.DS_Store gc images/.DS_Store gc images/converter/.DS_Store gc integration/.DS_Store gc integration/cri-api/.DS_Store gc integration/failpoint/.DS_Store gc integration/images/.DS_Store gc integration/remote/.DS_Store gc leases/.DS_Store gc metadata/.DS_Store gc metrics/.DS_Store gc metrics/cgroups/.DS_Store gc metrics/types/.DS_Store gc pkg/.DS_Store gc pkg/cri/.DS_Store gc pkg/oom/.DS_Store gc pkg/transfer/.DS_Store gc plugins/.DS_Store gc protobuf/.DS_Store gc releases/.DS_Store
    1.408 + exit 1
    1.408 gc .DS_Store gc .github/.DS_Store gc api/.DS_Store gc api/api/ gc api/runtime/.DS_Store gc api/services/.DS_Store gc api/types/.DS_Store gc archive/.DS_Store gc cmd/.DS_Store gc cmd/containerd-shim-runc-v2/.DS_Store gc cmd/containerd-shim-runc-v2/vendor/ gc cmd/containerd/.DS_Store gc cmd/ctr/.DS_Store gc content/.DS_Store gc contrib/.DS_Store gc contrib/ansible/.DS_Store gc contrib/seccomp/.DS_Store gc diff/.DS_Store gc docs/.DS_Store gc docs/historical/.DS_Store gc events/.DS_Store gc gc/.DS_Store gc images/.DS_Store gc images/converter/.DS_Store gc integration/.DS_Store gc integration/cri-api/.DS_Store gc integration/failpoint/.DS_Store gc integration/images/.DS_Store gc integration/remote/.DS_Store gc leases/.DS_Store gc metadata/.DS_Store gc metrics/.DS_Store gc metrics/cgroups/.DS_Store gc metrics/types/.DS_Store gc pkg/.DS_Store gc pkg/cri/.DS_Store gc pkg/oom/.DS_Store gc pkg/transfer/.DS_Store gc plugins/.DS_Store gc protobuf/.DS_Store gc releases/.DS_Store

Finally, I removed a redundant "echo", which causes (as seen above) the list
of uncommitted files to be printed twice (or three times even). We already print
the list of files, as well as print the `test -z` command that is executed, which
includes the list of files (`$GIT_STATUS_OUTPUT`). With this patch applied;

    6.307 + test -z gc .DS_Store gc .github/.DS_Store gc api/.DS_Store gc api/api/ gc api/runtime/.DS_Store gc api/services/.DS_Store gc api/types/.DS_Store gc archive/.DS_Store gc cmd/.DS_Store gc cmd/containerd-shim-runc-v2/.DS_Store gc cmd/containerd-shim-runc-v2/vendor/ gc cmd/containerd/.DS_Store gc cmd/ctr/.DS_Store gc content/.DS_Store gc contrib/.DS_Store gc contrib/ansible/.DS_Store gc contrib/seccomp/.DS_Store gc diff/.DS_Store gc docs/.DS_Store gc docs/historical/.DS_Store gc events/.DS_Store gc gc/.DS_Store gc images/.DS_Store gc images/converter/.DS_Store gc integration/.DS_Store gc integration/cri-api/.DS_Store gc integration/failpoint/.DS_Store gc integration/images/.DS_Store gc integration/remote/.DS_Store gc leases/.DS_Store gc metadata/.DS_Store gc metrics/.DS_Store gc metrics/cgroups/.DS_Store gc metrics/types/.DS_Store gc pkg/.DS_Store gc pkg/cri/.DS_Store gc pkg/oom/.DS_Store gc pkg/transfer/.DS_Store gc plugins/.DS_Store gc protobuf/.DS_Store gc releases/.DS_Store
    6.307 /bin/bash: line 1: test: too many arguments
    6.308 + echo 'git repository contains uncommitted changes'
    6.308 + exit 1
    6.308 git repository contains uncommitted changes

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-12-07 15:03:34 +01:00
Akihiro Suda
b42bdd125d
release: remove cri-containerd-*.tar.gz release bundles
The `cri-containerd-*.tar.gz` release bundles have been deprecated
since containerd v1.6.

These bundles are no longer created in the CI, however, the
corresponding Makefile targets are still kept, as they are still used by
external CIs.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-09-13 23:22:32 +09:00
Akihiro Suda
9c82e929fd
release: xx v1.2.1
https://github.com/tonistiigi/xx/compare/v1.1.0...v1.2.1

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-02-14 14:25:59 +09:00
Akihiro Suda
52f82acb7b
btrfs: depend on kernel UAPI instead of libbtrfs
See containerd/btrfs PR 40 and moby/moby PR 44761. (Thanks to [@]neersighted.)

The containerd/btrfs library now requires headers from kernel 4.12 or newer:
- https://github.com/torvalds/linux/blob/master/include/uapi/linux/btrfs.h
- https://github.com/torvalds/linux/blob/master/include/uapi/linux/btrfs_tree.h

These files are licensed under the GPL-2.0 WITH Linux-syscall-note, so it should be compatible with the Apache License 2.0.
https://spdx.org/licenses/Linux-syscall-note.html

The dependency on the kernel headers only affects users building from source.
Users on older kernels may opt to not compile this library (`BUILDTAGS=no_btfs`),
or to provide headers from a newer kernel.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-02-10 10:07:34 +09:00
Akihiro Suda
7eb6528302
release: Ubuntu 18.04 -> 20.04 (glibc 2.27 -> 2.31)
Ubuntu 18.04 will reach its End of Standard Support in April 2023:
https://wiki.ubuntu.com/Releases

By updating Ubuntu from 18.04 to 20.04, the dynamically-linked glibc
version is bumped up from 2.27 to 2.31.
The dynamically linked containerd binary still seems to be compatible with
CentOS 7 (glibc 2.17).

The runc binary in the `cri-containerd(-cni)-<VERSION>-linux-<ARCH>.tar.gz`
bundle no longer works on CentOS 7, though, but this is acceptable, as the
`cri-containerd(-cni)` bundle has been deprecated since containerd 1.6.

```
$ ldd /usr/local/sbin/runc
        linux-vdso.so.1 =>  (0x00007fffee9c4000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007eff48721000)
        libseccomp.so.2 => /lib64/libseccomp.so.2 (0x00007eff484e0000)
        libc.so.6 => /lib64/libc.so.6 (0x00007eff48112000)
        /lib64/ld-linux-x86-64.so.2 (0x00007eff492cb000)
$ /usr/local/sbin/runc
/usr/local/sbin/runc: symbol lookup error: /usr/local/sbin/runc: undefined symbol: seccomp_notify_respond
```

Fix issue 7961

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-01-29 07:42:13 +09:00
Akihiro Suda
d1e1a16460
release/Dockerfile: set DEBIAN_FRONTEND=noninteractive
A build was hanging with `UBUNTU_VERSION=20.04`
```
...
 => [base 3/5] RUN APT-GET update &&  apt-get install -y dpkg-dev git make pkg-config                                                                            73.2s
 => => # questions will narrow this down by presenting a list of cities, representing
 => => # the time zones in which they are located.
 => => #   1. Africa      4. Australia  7. Atlantic  10. Pacific  13. Etc
 => => #   2. America     5. Arctic     8. Europe    11. SystemV
 => => #   3. Antarctica  6. Asia       9. Indian    12. US
 => => # Geographic area:
...

```

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-01-17 14:37:43 +09:00
Akihiro Suda
3fca677c19
Release: add static binaries
Fix issue 7296

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-11-12 03:52:37 +09:00
Akihiro Suda
4818610207
release: rollback Ubuntu to 18.04 (except for riscv64)
Partially revert 0e56e4f9ff

Rollback the build environment from Ubuntu 22.04 to 18.04, except for riscv64 that isn't supported by Ubuntu 18.04.

Fix issue 7255 (`1.6.7 can't be run on Ubuntu LTS 20.04 (GLIBC_2.34 not found)`)

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-08-06 01:00:49 +09:00
Akihiro Suda
0e56e4f9ff
release/Dockerfile: update Ubuntu to 22.04 for supporting riscv64
Also update xx to 1.1.0

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-05-01 03:12:38 +09:00
Wei Fu
7e821fb618 fix: .dockerignore makes git working tree dirty
The .github/workflows/release/Dockerfile will use working dir as docker
build context. But the .dockerignore will ignore the .github/release/...
and cause dirty. We should remove it and verify git working tree after
build.

Fix: #6484

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-02-08 00:15:50 +08:00
Brian Goff
be84932e11 Rename release dockerfile to omit distro name
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-11-11 20:06:49 +00:00
Tonis Tiigi
28126fd605 release: improve dockerfile
Removes amd64 specifics and hardcoded arm64 package pulls.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-11-11 20:06:47 +00:00
Brian Goff
27d7c50384 Add arm64 to releases
This moves all the release builds into a Dockerfile which is a bit
cleaner for setting up our build environment.

Non-linux/amd64 builds are cross-compiled.
Currently onlinux linux/amd64, linux/arm64, and windows/amd64 are
supported, but is easy to add more, provided their is a cross-compile
toolchain available for it.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-11-11 20:00:34 +00:00