diff --git a/containers-common.yaml b/containers-common.yaml new file mode 100644 index 00000000000..1b095db9a6a --- /dev/null +++ b/containers-common.yaml @@ -0,0 +1,81 @@ +package: + name: containers-common + # NOTES: WHEN UPDATING ALSO UPDATE CONTAINERS-{COMMON,STORAGE,SHORTNAMES,SKOPEO-CONFIG} + version: "0.64.1" # ref: https://src.fedoraproject.org/rpms/containers-common/blob/rawhide/f/containers-common.spec + epoch: 0 + description: "Common configuration and documentation for container tools ecosystem" + copyright: + - license: Apache-2.0 + dependencies: + runtime: + - ca-certificates-bundle + - containers-image + - containers-shortnames + - containers-skopeo-config + - containers-storage + +environment: + contents: + packages: + - busybox + - ca-certificates-bundle + - git + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/containers/common + tag: v${{package.version}} + expected-commit: ffacc4610d2281511f6875f3cf73e81d4a32a865 + + - runs: | + # Create necessary directories + mkdir -p "${{targets.destdir}}/etc/containers" + mkdir -p "${{targets.destdir}}/etc/containers/certs.d" + mkdir -p "${{targets.destdir}}/etc/containers/networks" + mkdir -p "${{targets.destdir}}/etc/containers/oci" + mkdir -p "${{targets.destdir}}/etc/containers/oci/hooks.d" + mkdir -p "${{targets.destdir}}/etc/containers/registries.conf.d" + mkdir -p "${{targets.destdir}}/etc/containers/registries.d" + mkdir -p "${{targets.destdir}}/etc/containers/systemd" + mkdir -p "${{targets.destdir}}/usr/share/containers" + mkdir -p "${{targets.destdir}}/usr/share/containers/systemd" + mkdir -p "${{targets.destdir}}/var/lib/containers/sigstore" + mkdir -p "${{targets.destdir}}/usr/lib/containers/storage" + mkdir -p "${{targets.destdir}}/usr/lib/containers/storage/overlay-images" + mkdir -p "${{targets.destdir}}/usr/lib/containers/storage/overlay-layers" + + - runs: | + # Install configuration files + install -m 644 pkg/config/containers.conf "${{targets.destdir}}/usr/share/containers/containers.conf" + install -m 644 pkg/seccomp/seccomp.json "${{targets.destdir}}/usr/share/containers/seccomp.json" + install -m 644 pkg/subscriptions/mounts.conf "${{targets.destdir}}/usr/share/containers/mounts.conf" + + - runs: | + # Create lock files for storage + touch "${{targets.destdir}}/usr/lib/containers/storage/overlay-images/images.lock" + touch "${{targets.destdir}}/usr/lib/containers/storage/overlay-layers/layers.lock" + + - uses: strip + +update: + enabled: false + # ref: https://src.fedoraproject.org/rpms/containers-common/blob/rawhide/f/containers-common.spec + exclude-reason: "the reason it's disabled because we want to update containers-{common,storage,shortnames,skopeo-config} all together" + +test: + pipeline: + - name: Verify containers-common installation + runs: | + # Check configuration files exist + stat /usr/share/containers/containers.conf + stat /usr/share/containers/seccomp.json + stat /usr/share/containers/mounts.conf + + # Check directories exist + stat /etc/containers + stat /etc/containers/certs.d + stat /etc/containers/oci/hooks.d + stat /usr/lib/containers/storage + + echo "containers-common installation verified" diff --git a/containers-image.yaml b/containers-image.yaml new file mode 100644 index 00000000000..199a3a71ccf --- /dev/null +++ b/containers-image.yaml @@ -0,0 +1,44 @@ +package: + name: containers-image + version: "5.36.1" + epoch: 0 + description: "Registry configuration for container tools" + copyright: + - license: Apache-2.0 + +environment: + contents: + packages: + - busybox + - ca-certificates-bundle + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/containers/image + tag: v${{package.version}} + expected-commit: f6ca2da2ec9e4b86231ea7a27499e2a0b35b0d8c + + - runs: | + # Set unqualified-search-registries + sed -E 's/# (unqualified-search-registries =).*/\1 ["docker.io"]/' -i registries.conf + + # Create necessary directories + mkdir -p "${{targets.destdir}}/etc/containers" + mkdir -p "${{targets.destdir}}/usr/share/containers" + + # Install registries configuration + install -m 644 registries.conf "${{targets.destdir}}/etc/containers/registries.conf" + +# Note: This package should be updated in coordination with containers-common +# to maintain version synchronization across the container ecosystem +update: + enabled: false + manual: true + exclude-reason: Package updates are coordinated with containers-common to maintain ecosystem synchronization + +test: + pipeline: + - name: Verify storage configuration + runs: |- + stat /etc/containers/registries.conf diff --git a/containers-shortnames.yaml b/containers-shortnames.yaml new file mode 100644 index 00000000000..a2010c87ffd --- /dev/null +++ b/containers-shortnames.yaml @@ -0,0 +1,41 @@ +#nolint:valid-pipeline-git-checkout-commit,valid-pipeline-git-checkout-tag +package: + name: containers-shortnames + version: 0_git20250724 + epoch: 0 + description: "Registry shortnames configuration for container tools" + copyright: + - license: Apache-2.0 + +environment: + contents: + packages: + - busybox + - ca-certificates-bundle + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/containers/shortnames + branch: main + + - runs: | + # Create necessary directories + mkdir -p "${{targets.destdir}}/etc/containers/registries.conf.d" + + # Install shortnames configuration as 000-shortnames.conf to match Fedora + install -m 644 shortnames.conf "${{targets.destdir}}/etc/containers/registries.conf.d/000-shortnames.conf" + +# Note: This package should be updated in coordination with containers-common +# to maintain version synchronization across the container ecosystem +update: + enabled: false + manual: true + exclude-reason: Package updates are coordinated with containers-common to maintain ecosystem synchronization + +test: + pipeline: + - name: Verify shortnames configuration + runs: | + stat /etc/containers/registries.conf.d/000-shortnames.conf + echo "containers-shortnames configuration verified" diff --git a/containers-skopeo-config.yaml b/containers-skopeo-config.yaml new file mode 100644 index 00000000000..dd703c6a4da --- /dev/null +++ b/containers-skopeo-config.yaml @@ -0,0 +1,44 @@ +package: + name: containers-skopeo-config + version: "1.19.0" + epoch: 0 + description: "Default policy and registry configuration from skopeo" + copyright: + - license: Apache-2.0 + +environment: + contents: + packages: + - busybox + - ca-certificates-bundle + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/containers/skopeo + tag: v${{package.version}} + expected-commit: feeaeff9c8573875580d5793c6f9a2cab81a3f76 + + - runs: | + # Create necessary directories + mkdir -p "${{targets.destdir}}/etc/containers" + mkdir -p "${{targets.destdir}}/etc/containers/registries.d" + + # Install policy and registries configuration + install -m 644 default-policy.json "${{targets.destdir}}/etc/containers/policy.json" + install -m 644 default.yaml "${{targets.destdir}}/etc/containers/registries.d/default.yaml" + +# Note: This package should be updated in coordination with containers-common +# to maintain version synchronization across the container ecosystem +update: + enabled: false + manual: true + exclude-reason: Package updates are coordinated with containers-common to maintain ecosystem synchronization + +test: + pipeline: + - name: Verify skopeo configuration + runs: | + stat /etc/containers/policy.json + stat /etc/containers/registries.d/default.yaml + echo "containers-skopeo-config verified" diff --git a/containers-storage.yaml b/containers-storage.yaml new file mode 100644 index 00000000000..6947529637d --- /dev/null +++ b/containers-storage.yaml @@ -0,0 +1,48 @@ +package: + name: containers-storage + version: "1.59.1" + epoch: 0 + description: "Storage configuration for container tools" + copyright: + - license: Apache-2.0 + +environment: + contents: + packages: + - busybox + - ca-certificates-bundle + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/containers/storage + tag: v${{package.version}} + expected-commit: 41839ee723fe3e35ff5a6fd2e19340e041b261f3 + + - runs: | + # Set default storage driver to overlay + sed -E 's/(driver =) ""/\1 "overlay"/' -i storage.conf + + # Create necessary directories + mkdir -p "${{targets.destdir}}/etc/containers" + mkdir -p "${{targets.destdir}}/usr/share/containers" + + # Install storage configuration + install -m 644 storage.conf "${{targets.destdir}}/etc/containers/storage.conf" + install -m 644 storage.conf "${{targets.destdir}}/usr/share/containers/storage.conf" + +# Note: This package should be updated in coordination with containers-common +# to maintain version synchronization across the container ecosystem +update: + enabled: false + manual: true + exclude-reason: Package updates are coordinated with containers-common to maintain ecosystem synchronization + +test: + pipeline: + - name: Verify storage configuration + runs: |- + stat /etc/containers/storage.conf + stat /usr/share/containers/storage.conf + grep -q 'driver = "overlay"' /etc/containers/storage.conf + echo "containers-storage configuration verified"