From 6b731654ee4bc93a604c197ace58f24247f4ae40 Mon Sep 17 00:00:00 2001 From: Rahil Bhimjiani Date: Sat, 2 Dec 2023 00:54:35 +0530 Subject: [PATCH] Migrating default-policy.json and default.yaml to containers/common All major distros (Fedora, debian, archlinux, gentoo, alpine, opensuse) are placing these 2 files in containers-common package. Why not fix it upstream? 1st step towards addressing https://github.com/containers/skopeo/issues/2170 Signed-off-by: Rahil Bhimjiani --- .cirrus.yml | 1 + Makefile | 10 ---------- default-policy.json | 14 -------------- default.yaml | 28 ---------------------------- 4 files changed, 1 insertion(+), 52 deletions(-) delete mode 100644 default-policy.json delete mode 100644 default.yaml diff --git a/.cirrus.yml b/.cirrus.yml index 1094df7a80..20e5cddc09 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -160,6 +160,7 @@ ostree-rs-ext_task: - dnf builddep -y skopeo - make - make install + - echo '{"default":[{"type":"insecureAcceptAnything"}],"transports":{"docker-daemon":{"":[{"type":"insecureAcceptAnything"}]}}}' > /etc/containers/policy.json proxy_ostree_ext_build_script: - git clone --depth 1 $EXT_REPO $EXT_REPO_HOME - cd $EXT_REPO_HOME diff --git a/Makefile b/Makefile index e25c4cfbef..c6cf1cbcfc 100644 --- a/Makefile +++ b/Makefile @@ -5,12 +5,6 @@ export GOPROXY=https://proxy.golang.org # The following variables very roughly follow https://www.gnu.org/prep/standards/standards.html#Makefile-Conventions . DESTDIR ?= PREFIX ?= /usr/local -ifeq ($(shell uname -s),FreeBSD) -CONTAINERSCONFDIR ?= /usr/local/etc/containers -else -CONTAINERSCONFDIR ?= /etc/containers -endif -REGISTRIESDDIR ?= ${CONTAINERSCONFDIR}/registries.d LOOKASIDEDIR ?= /var/lib/containers/sigstore BINDIR ?= ${PREFIX}/bin MANDIR ?= ${PREFIX}/share/man @@ -159,10 +153,6 @@ clean: install: install-binary install-docs install-completions install -d -m 755 ${DESTDIR}${LOOKASIDEDIR} - 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 install-binary: bin/skopeo install -d -m 755 ${DESTDIR}${BINDIR} diff --git a/default-policy.json b/default-policy.json deleted file mode 100644 index dffc54a626..0000000000 --- a/default-policy.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "default": [ - { - "type": "insecureAcceptAnything" - } - ], - "transports": - { - "docker-daemon": - { - "": [{"type":"insecureAcceptAnything"}] - } - } -} diff --git a/default.yaml b/default.yaml deleted file mode 100644 index a7f3d28231..0000000000 --- a/default.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# 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 -