From 026859d293f30858d9f4d368587cfad8955a6845 Mon Sep 17 00:00:00 2001 From: Igor Rzegocki Date: Mon, 7 Oct 2024 12:09:28 +0200 Subject: [PATCH] feat: remove spegel hack --- README.md | 3 +- apps/spegel/Dockerfile | 36 ------------------ apps/spegel/fix-containerd.patch | 63 -------------------------------- apps/spegel/metadata.json | 17 --------- 4 files changed, 1 insertion(+), 118 deletions(-) delete mode 100644 apps/spegel/Dockerfile delete mode 100644 apps/spegel/fix-containerd.patch delete mode 100644 apps/spegel/metadata.json diff --git a/README.md b/README.md index 3de55904..f8de1780 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,6 @@ Container | Root/RW | Channel | Image | Latest Tags [script-exporter](https://github.com/deedee-ops/containers/pkgs/container/script-exporter) | | stable | ghcr.io/deedee-ops/script-exporter |![2](https://img.shields.io/badge/2-blue?style=flat-square) ![2.22](https://img.shields.io/badge/2.22-blue?style=flat-square) ![2.22.0](https://img.shields.io/badge/2.22.0-blue?style=flat-square) ![latest](https://img.shields.io/badge/latest-green?style=flat-square) [sonarr](https://github.com/deedee-ops/containers/pkgs/container/sonarr) | | stable | ghcr.io/deedee-ops/sonarr |![4](https://img.shields.io/badge/4-blue?style=flat-square) ![4.0](https://img.shields.io/badge/4.0-blue?style=flat-square) ![4.0.9](https://img.shields.io/badge/4.0.9-blue?style=flat-square) ![4.0.9.2244](https://img.shields.io/badge/4.0.9.2244-blue?style=flat-square) ![latest](https://img.shields.io/badge/latest-green?style=flat-square) [sonarr-devel](https://github.com/deedee-ops/containers/pkgs/container/sonarr-devel) | | devel | ghcr.io/deedee-ops/sonarr-devel |![4](https://img.shields.io/badge/4-blue?style=flat-square) ![4.0](https://img.shields.io/badge/4.0-blue?style=flat-square) ![4.0.9](https://img.shields.io/badge/4.0.9-blue?style=flat-square) ![4.0.9.2457](https://img.shields.io/badge/4.0.9.2457-blue?style=flat-square) ![latest](https://img.shields.io/badge/latest-green?style=flat-square) -[spegel](https://github.com/deedee-ops/containers/pkgs/container/spegel) | | stable | ghcr.io/deedee-ops/spegel |![0](https://img.shields.io/badge/0-blue?style=flat-square) ![0.0](https://img.shields.io/badge/0.0-blue?style=flat-square) ![0.0.25](https://img.shields.io/badge/0.0.25-blue?style=flat-square) ![latest](https://img.shields.io/badge/latest-green?style=flat-square) [syncthing](https://github.com/deedee-ops/containers/pkgs/container/syncthing) | | stable | ghcr.io/deedee-ops/syncthing |![1](https://img.shields.io/badge/1-blue?style=flat-square) ![1.27](https://img.shields.io/badge/1.27-blue?style=flat-square) ![1.27.12](https://img.shields.io/badge/1.27.12-blue?style=flat-square) ![latest](https://img.shields.io/badge/latest-green?style=flat-square) [talosctl](https://github.com/deedee-ops/containers/pkgs/container/talosctl) | | stable | ghcr.io/deedee-ops/talosctl |![1](https://img.shields.io/badge/1-blue?style=flat-square) ![1.8](https://img.shields.io/badge/1.8-blue?style=flat-square) ![1.8.0](https://img.shields.io/badge/1.8.0-blue?style=flat-square) ![latest](https://img.shields.io/badge/latest-green?style=flat-square) [tika](https://github.com/deedee-ops/containers/pkgs/container/tika) | | stable | ghcr.io/deedee-ops/tika |![2](https://img.shields.io/badge/2-blue?style=flat-square) ![2.9](https://img.shields.io/badge/2.9-blue?style=flat-square) ![2.9.2](https://img.shields.io/badge/2.9.2-blue?style=flat-square) ![latest](https://img.shields.io/badge/latest-green?style=flat-square) @@ -118,4 +117,4 @@ A lot of inspiration (and a lot of copy-pasting to be honest) are thanks to the \ No newline at end of file +--> diff --git a/apps/spegel/Dockerfile b/apps/spegel/Dockerfile deleted file mode 100644 index 0d552544..00000000 --- a/apps/spegel/Dockerfile +++ /dev/null @@ -1,36 +0,0 @@ -ARG TARGETPLATFORM -ARG VERSION - -FROM ghcr.io/deedee-ops/ubuntu:22.04 AS builder - -WORKDIR /usr/src - -ENV CGO_ENABLED=0 - -#hadolint ignore=DL3008 -RUN apt-get update \ - && apt-get install --yes --no-install-recommends bash build-essential git gnupg2 software-properties-common \ - && add-apt-repository ppa:longsleep/golang-backports -y \ - && apt-get update \ - && apt-get install --yes --no-install-recommends golang-go \ - && git clone --depth 1 --branch v0.0.24 https://github.com/spegel-org/spegel/ - -WORKDIR /usr/src/spegel - -COPY fix-containerd.patch /usr/src/spegel/ - -RUN patch -p1 < fix-containerd.patch \ - && go build -installsuffix 'static' -o spegel . - -FROM gcr.io/distroless/static:nonroot - -COPY --from=builder /usr/src/spegel/spegel /app/ - -WORKDIR /app - -#hadolint ignore=DL3002 -USER root:root - -ENTRYPOINT ["./spegel"] - -LABEL org.opencontainers.image.source="https://github.com/spegel-org/spegel/" diff --git a/apps/spegel/fix-containerd.patch b/apps/spegel/fix-containerd.patch deleted file mode 100644 index bae30f94..00000000 --- a/apps/spegel/fix-containerd.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 47f94b7abf0ab200a8cc6937053f30e4f4892071 Mon Sep 17 00:00:00 2001 -From: Jean-Francois Roy -Date: Tue, 10 Sep 2024 10:14:12 -0700 -Subject: [PATCH] fix: skip status response verification for containerd v2 - ---- - pkg/oci/containerd.go | 25 +++++++++++++++++++++++-- - 1 file changed, 23 insertions(+), 2 deletions(-) - -diff --git a/pkg/oci/containerd.go b/pkg/oci/containerd.go -index fb32a95a..76885fed 100644 ---- a/pkg/oci/containerd.go -+++ b/pkg/oci/containerd.go -@@ -12,6 +12,7 @@ import ( - "path/filepath" - "strings" - -+ semver "github.com/Masterminds/semver/v3" - "github.com/containerd/containerd" - eventtypes "github.com/containerd/containerd/api/events" - "github.com/containerd/containerd/content" -@@ -79,6 +80,7 @@ func (c *Containerd) Name() string { - } - - func (c *Containerd) Verify(ctx context.Context) error { -+ log := logr.FromContextOrDiscard(ctx) - client, err := c.Client() - if err != nil { - return err -@@ -90,11 +92,30 @@ func (c *Containerd) Verify(ctx context.Context) error { - if !ok { - return errors.New("could not reach Containerd service") - } -- resp, err := runtimeapi.NewRuntimeServiceClient(client.Conn()).Status(ctx, &runtimeapi.StatusRequest{Verbose: true}) -+ srv := runtimeapi.NewRuntimeServiceClient(client.Conn()) -+ -+ versionResp, err := srv.Version(ctx, &runtimeapi.VersionRequest{}) -+ if err != nil { -+ return err -+ } -+ version, err := semver.NewVersion(versionResp.GetRuntimeVersion()) -+ if err != nil { -+ return err -+ } -+ constraint, err := semver.NewConstraint(">1-0") -+ if err != nil { -+ return err -+ } -+ if constraint.Check(version) { -+ log.Info("unable to verify status response", "runtime_version", version.String()) -+ return nil -+ } -+ -+ statusResp, err := srv.Status(ctx, &runtimeapi.StatusRequest{Verbose: true}) - if err != nil { - return err - } -- err = verifyStatusResponse(resp, c.registryConfigPath) -+ err = verifyStatusResponse(statusResp, c.registryConfigPath) - if err != nil { - return err - } - diff --git a/apps/spegel/metadata.json b/apps/spegel/metadata.json deleted file mode 100644 index 294269da..00000000 --- a/apps/spegel/metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "app": "spegel", - "base": false, - "testMuteCmd": true, - "channels": [ - { - "name": "stable", - "renovate::dataSource": "docker", - "renovate::depName": "ghcr.io/spegel-org/spegel", - "version": "0.0.25", - "platforms": [ - "linux/amd64", - "linux/arm64" - ] - } - ] -}