diff --git a/skopeo/Makefile b/skopeo/Makefile new file mode 100644 index 000000000..cf699100f --- /dev/null +++ b/skopeo/Makefile @@ -0,0 +1,77 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=skopeo +PKG_VERSION:=1.9.2 +PKG_RELEASE:=$(AUTORELEASE) + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_NAME:=skopeo +PKG_SOURCE_URL:=https://github.com/containers/skopeo.git +PKG_SOURCE_VERSION:=v$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz +PKG_MIRROR_HASH:=skip + +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE + +HOST_BUILD_DEPENDS:=golang/host +HOST_BUILD_PARALLEL:=1 +PKG_USE_MIPS16:=0 + +GO_PKG:=github.com/containers/skopeo +GO_PKG_BUILD_PKG:=github.com/containers/skopeo/cmd/skopeo + +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/package.mk + +GOLANG_PACKAGE_MK:=$(wildcard $(TOPDIR)/feeds/*/lang/golang/golang-package.mk) +GOLANG_HOST_PACKAGE_MK:=$(wildcard $(TOPDIR)/feeds/*/lang/golang/golang-host-build.mk) + +# verify that there is only one single file returned +ifneq (1,$(words $(GOLANG_PACKAGE_MK))) +ifeq (0,$(words $(GOLANG_PACKAGE_MK))) +$(error did not find golang-package.mk in any feed) +else +$(error found multiple golang-package.mk files in the feeds) +endif +else +$(info found golang-package.mk at $(GOLANG_PACKAGE_MK)) +endif + +include $(GOLANG_PACKAGE_MK) +include $(GOLANG_HOST_PACKAGE_MK) + +define Package/skopeo + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Command line utility for container image management + URL:=https://github.com/containers/skopeo + DEPENDS:=$(GO_ARCH_DEPENDS) +endef + +define Package/skopeo/description + skopeo is a command line utility that performs various operations on container images and image repositories. +endef + +define Package/skopeo/conffiles +/etc/containers/policy.json +endef + +GO_PKG_TAGS=exclude_graphdriver_devicemapper,exclude_graphdriver_btrfs,containers_image_openpgp +GO_PKG_BUILD_VARS += GO111MODULE=auto + +define Build/Compile + $(call GoPackage/Build/Compile) + $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR)) +endef + +define Package/skopeo/install + $(call GoPackage/Package/Install/Bin,$(1)) + $(INSTALL_DIR) $(1)/etc/containers + $(INSTALL_DATA) ./files/etc/containers/policy.json $(1)/etc/containers/policy.json +endef + +$(eval $(call GoBinHostBuild)) +$(eval $(call HostBuild)) +$(eval $(call GoBinPackage,skopeo)) +$(eval $(call BuildPackage,skopeo)) diff --git a/skopeo/files/etc/containers/policy.json b/skopeo/files/etc/containers/policy.json new file mode 100644 index 000000000..ba5fd4a96 --- /dev/null +++ b/skopeo/files/etc/containers/policy.json @@ -0,0 +1,15 @@ +{ + "default": [ + { + "type": "insecureAcceptAnything" + } + ], + "transports": + { + "docker-daemon": + { + "": [{"type":"insecureAcceptAnything"}] + } + } +} +