summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRahil Bhimjiani <me@rahil.rocks>2024-01-25 20:55:22 +0530
committerZac Medico <zmedico@gentoo.org>2024-02-01 22:37:25 -0800
commit3ce5be3e30a8d60756b3685d1069788ec801f7f8 (patch)
tree33391fc088f4b3b3f2b93520d2a26c7791c0eb00 /app-containers/containers-image
parentapp-containers/podman: add 4.9.1 (diff)
downloadgentoo-3ce5be3e30a8d60756b3685d1069788ec801f7f8.tar.gz
gentoo-3ce5be3e30a8d60756b3685d1069788ec801f7f8.tar.bz2
gentoo-3ce5be3e30a8d60756b3685d1069788ec801f7f8.zip
app-containers/containers-image: add 5.29.2
Cherry pick https://github.com/containers/image/commit/45441676e34e6410ae8af6dbb46b6161c5c81a7c because default.yaml and policy.json are moving from containers-common-0.57.3 to containers-image-5.29.2 Signed-off-by: Rahil Bhimjiani <me@rahil.rocks> Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'app-containers/containers-image')
-rw-r--r--app-containers/containers-image/Manifest1
-rw-r--r--app-containers/containers-image/containers-image-5.29.2.ebuild37
-rw-r--r--app-containers/containers-image/containers-image-9999.ebuild13
-rw-r--r--app-containers/containers-image/files/moving-policy-json-default-yaml.patch100
4 files changed, 143 insertions, 8 deletions
diff --git a/app-containers/containers-image/Manifest b/app-containers/containers-image/Manifest
index ac4252cf4d1f..bd62dff68391 100644
--- a/app-containers/containers-image/Manifest
+++ b/app-containers/containers-image/Manifest
@@ -1,2 +1,3 @@
DIST containers-image-5.28.0.tar.gz 688100 BLAKE2B 0cee8be579bd11eb0524590d8afe16b6ef863d7adfd74db51b68385142804c8096fec3f2a492e0d5a5021eba9edc91219b327138635aaa329c6ef7d0c01129c8 SHA512 0b76539e04016f5f1067c576a877ace475f25d0f0840fc969606601105a8a7f0e242cc054b0a2cfb6f1b751d850734360a524c78563fdf2330c8ae8c11bba1cf
DIST containers-image-5.29.0.tar.gz 706774 BLAKE2B 0af5c7c43e8b75df591cbd291d0865ac19322bf62ad98b4f36cfb51b006ced088f91f0b3f582ce29ae80582e72087467cfe589683216eeb50ad3762152853dc0 SHA512 5e670f85fe0b43769667f1a3e710434ab65c4ec2d8c60b0cad4b0ed41c35f84677528f9dfecb0b946de556ebbdd56f4949760432ec49b1b3c691120a323af869
+DIST containers-image-5.29.2.tar.gz 707618 BLAKE2B f1556cbb26ceedd74a338355caf8b557c43286726f4be63544cebc9a8f4b92be78d7a0cddbedaba7352d13e9fc399f62ee114caba6c8b1ecc334dab1379e523b SHA512 f3f6e09670dc393067992a78303f01e2584dabe79ba156973a50d7a460c011e5a27d0ccdf0ff6b399099a9a3a4c57f3badf24fb5d0704efd645ab7196a544d8f
diff --git a/app-containers/containers-image/containers-image-5.29.2.ebuild b/app-containers/containers-image/containers-image-5.29.2.ebuild
new file mode 100644
index 000000000000..0a3bb536ab4f
--- /dev/null
+++ b/app-containers/containers-image/containers-image-5.29.2.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Default config and docs related to Containers' images"
+HOMEPAGE="https://github.com/containers/image"
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/containers/image.git"
+else
+ SRC_URI="https://github.com/containers/image/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}/${P#containers-}"
+ KEYWORDS="~amd64 ~arm64 ~riscv"
+fi
+
+LICENSE="Apache-2.0"
+SLOT="0"
+
+# https://github.com/gentoo/gentoo/pull/35012#discussion_r1473740969
+RESTRICT='test'
+BDEPEND=">=dev-go/go-md2man-2.0.3"
+PATCHES=(
+ "${FILESDIR}"/moving-policy-json-default-yaml.patch
+)
+
+src_compile() {
+ emake docs
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install
+
+ insinto /etc/containers
+ doins registries.conf
+}
diff --git a/app-containers/containers-image/containers-image-9999.ebuild b/app-containers/containers-image/containers-image-9999.ebuild
index 7e9e9b9dad81..4fb96c1222c3 100644
--- a/app-containers/containers-image/containers-image-9999.ebuild
+++ b/app-containers/containers-image/containers-image-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -12,18 +12,15 @@ if [[ ${PV} == 9999* ]]; then
else
SRC_URI="https://github.com/containers/image/archive/v${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${P#containers-}"
- KEYWORDS="~amd64"
+ KEYWORDS="~amd64 ~arm64 ~riscv"
fi
LICENSE="Apache-2.0"
SLOT="0"
-BDEPEND=">=dev-go/go-md2man-2.0.2"
-
-src_prepare() {
- default
- eapply "${FILESDIR}/fix-warnings.patch"
-}
+# https://github.com/gentoo/gentoo/pull/35012#discussion_r1473740969
+RESTRICT='test'
+BDEPEND=">=dev-go/go-md2man-2.0.3"
src_compile() {
emake docs
diff --git a/app-containers/containers-image/files/moving-policy-json-default-yaml.patch b/app-containers/containers-image/files/moving-policy-json-default-yaml.patch
new file mode 100644
index 000000000000..1713839371a5
--- /dev/null
+++ b/app-containers/containers-image/files/moving-policy-json-default-yaml.patch
@@ -0,0 +1,100 @@
+From 45441676e34e6410ae8af6dbb46b6161c5c81a7c Mon Sep 17 00:00:00 2001
+From: Rahil Bhimjiani <me@rahil.website>
+Date: Thu, 7 Dec 2023 14:12:26 +0530
+Subject: [PATCH] Moving policy.json and default.yaml from containers/skopeo
+
+It makes more sense to keep these 2 files along with their man
+pages...in c/image
+https://github.com/containers/common/pull/1757
+
+Signed-off-by: Rahil Bhimjiani <me@rahil.website>
+---
+ Makefile | 11 +++++++++++
+ default-policy.json | 14 ++++++++++++++
+ default.yaml | 27 +++++++++++++++++++++++++++
+ 3 files changed, 52 insertions(+)
+ create mode 100644 default-policy.json
+ create mode 100644 default.yaml
+
+diff --git a/Makefile b/Makefile
+index f329ef083..5e9799b19 100644
+--- a/Makefile
++++ b/Makefile
+@@ -24,6 +24,13 @@ GOMD2MAN ?= $(shell command -v go-md2man || echo '$(GOBIN)/go-md2man')
+ MANPAGES_MD = $(wildcard docs/*.5.md)
+ MANPAGES ?= $(MANPAGES_MD:%.md=%)
+
++ifeq ($(shell uname -s),FreeBSD)
++CONTAINERSCONFDIR ?= /usr/local/etc/containers
++else
++CONTAINERSCONFDIR ?= /etc/containers
++endif
++REGISTRIESDDIR ?= ${CONTAINERSCONFDIR}/registries.d
++
+ # N/B: This value is managed by Renovate, manual changes are
+ # possible, as long as they don't disturb the formatting
+ # (i.e. DO NOT ADD A 'v' prefix!)
+@@ -46,6 +53,10 @@ install-docs: docs
+ install -m 644 docs/*.5 ${MANINSTALLDIR}/man5/
+
+ install: install-docs
++ install -d -m 755 ${DESTDIR}${CONTAINERSCONFDIR}
++ install -m 644 default-policy.json ${DESTDIR}${CONTAINERSCONFDIR}/policy.json
++ install -d -m 755 ${DESTDIR}${REGISTRIESDDIR}
++ install -m 644 default.yaml ${DESTDIR}${REGISTRIESDDIR}/default.yaml
+
+ cross:
+ GOOS=windows $(MAKE) build BUILDTAGS="$(BUILDTAGS) $(BUILD_TAGS_WINDOWS_CROSS)"
+diff --git a/default-policy.json b/default-policy.json
+new file mode 100644
+index 000000000..dffc54a62
+--- /dev/null
++++ b/default-policy.json
+@@ -0,0 +1,14 @@
++{
++ "default": [
++ {
++ "type": "insecureAcceptAnything"
++ }
++ ],
++ "transports":
++ {
++ "docker-daemon":
++ {
++ "": [{"type":"insecureAcceptAnything"}]
++ }
++ }
++}
+diff --git a/default.yaml b/default.yaml
+new file mode 100644
+index 000000000..9e892d760
+--- /dev/null
++++ b/default.yaml
+@@ -0,0 +1,27 @@
++# This is a default registries.d configuration file. You may
++# add to this file or create additional files in registries.d/.
++#
++# lookaside: for reading/writing simple signing signatures
++# lookaside-staging: for writing simple signing signatures, preferred over lookaside
++#
++# lookaside and lookaside-staging take a value of the following:
++# lookaside: {schema}://location
++#
++# For reading signatures, schema may be http, https, or file.
++# For writing signatures, schema may only be file.
++
++# The default locations are built-in, for both reading and writing:
++# /var/lib/containers/sigstore for root, or
++# ~/.local/share/containers/sigstore for non-root users.
++default-docker:
++# lookaside: https://…
++# lookaside-staging: file:///…
++
++# The 'docker' indicator here is the start of the configuration
++# for docker registries.
++#
++# docker:
++#
++# privateregistry.com:
++# lookaside: https://privateregistry.com/sigstore/
++# lookaside-staging: /mnt/nfs/privateregistry/sigstore