Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
From 6970080b10a53d858dd444a643a2bd911de12940 Mon Sep 17 00:00:00 2001
|
||||
From: Chen Qi <Qi.Chen@windriver.com>
|
||||
Date: Thu, 29 May 2025 11:28:38 +0800
|
||||
Subject: [PATCH] s3-aws: fix build for 386
|
||||
|
||||
When building for 386, we got the following build error:
|
||||
|
||||
registry/storage/driver/s3-aws/s3.go:312:99: cannot use
|
||||
maxChunkSize (untyped int constant 5368709120) as int value
|
||||
in argument to getParameterAsInteger (overflows)
|
||||
|
||||
This is because the s3_64bit.go is used. Adjust the build tag matching
|
||||
in s3_32bit.go and s3_64bit.go to fix this issue.
|
||||
|
||||
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
|
||||
Upstream: https://github.com/distribution/distribution/commit/6970080b10a53d858dd444a643a2bd911de12940
|
||||
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
|
||||
---
|
||||
registry/storage/driver/s3-aws/s3_32bit.go | 2 +-
|
||||
registry/storage/driver/s3-aws/s3_64bit.go | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/registry/storage/driver/s3-aws/s3_32bit.go b/registry/storage/driver/s3-aws/s3_32bit.go
|
||||
index 218e3eab..84161fcb 100644
|
||||
--- a/registry/storage/driver/s3-aws/s3_32bit.go
|
||||
+++ b/registry/storage/driver/s3-aws/s3_32bit.go
|
||||
@@ -1,4 +1,4 @@
|
||||
-//go:build arm
|
||||
+//go:build arm || 386
|
||||
|
||||
package s3
|
||||
|
||||
diff --git a/registry/storage/driver/s3-aws/s3_64bit.go b/registry/storage/driver/s3-aws/s3_64bit.go
|
||||
index 55254e49..2ed1f92f 100644
|
||||
--- a/registry/storage/driver/s3-aws/s3_64bit.go
|
||||
+++ b/registry/storage/driver/s3-aws/s3_64bit.go
|
||||
@@ -1,4 +1,4 @@
|
||||
-//go:build !arm
|
||||
+//go:build !arm && !386
|
||||
|
||||
package s3
|
||||
|
||||
--
|
||||
2.51.1
|
||||
|
||||
18
package/distribution-registry/Config.in
Normal file
18
package/distribution-registry/Config.in
Normal file
@@ -0,0 +1,18 @@
|
||||
config BR2_PACKAGE_DISTRIBUTION_REGISTRY
|
||||
bool "distribution-registry"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # pthread_*_np()
|
||||
depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
|
||||
depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
|
||||
help
|
||||
The toolkit to pack, ship, store, and deliver container
|
||||
content.
|
||||
|
||||
The goal of this project is to provide a simple, secure, and
|
||||
scalable base for building a large scale registry solution or
|
||||
running a simple private registry. It is a core library for
|
||||
many registry operators including Docker Hub, GitHub Container
|
||||
Registry, GitLab Container Registry and DigitalOcean Container
|
||||
Registry, as well as the CNCF Harbor Project, and VMware
|
||||
Harbor Registry.
|
||||
|
||||
https://github.com/distribution/distribution
|
||||
13
package/distribution-registry/config.yml
Normal file
13
package/distribution-registry/config.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
version: 0.1
|
||||
storage:
|
||||
cache:
|
||||
blobdescriptor: inmemory
|
||||
filesystem:
|
||||
rootdirectory: /var/lib/docker-registry
|
||||
delete:
|
||||
enabled: true
|
||||
http:
|
||||
addr: 127.0.0.1:5000
|
||||
net: tcp
|
||||
headers:
|
||||
X-Content-Type-Options: [nosniff]
|
||||
3
package/distribution-registry/distribution-registry.hash
Normal file
3
package/distribution-registry/distribution-registry.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally computed
|
||||
sha256 6330e6b625c0232b43cee8ea32800a660a7d7a0c79f4f53e4d9a8a6707138d46 distribution-registry-v3.0.0-git4-go2.tar.gz
|
||||
sha256 cb5e8e7e5f4a3988e1063c142c60dc2df75605f4c46515e776e3aca6df976e14 LICENSE
|
||||
46
package/distribution-registry/distribution-registry.mk
Normal file
46
package/distribution-registry/distribution-registry.mk
Normal file
@@ -0,0 +1,46 @@
|
||||
################################################################################
|
||||
#
|
||||
# distribution-registry
|
||||
#
|
||||
################################################################################
|
||||
|
||||
DISTRIBUTION_REGISTRY_VERSION = v3.0.0
|
||||
DISTRIBUTION_REGISTRY_SITE = https://github.com/distribution/distribution
|
||||
DISTRIBUTION_REGISTRY_SITE_METHOD = git
|
||||
|
||||
DISTRIBUTION_REGISTRY_LICENSE = Apache-2.0
|
||||
DISTRIBUTION_REGISTRY_LICENSE_FILES = LICENSE
|
||||
|
||||
DISTRIBUTION_REGISTRY_GOMOD = github.com/distribution/distribution/v3
|
||||
|
||||
DISTRIBUTION_REGISTRY_BUILD_TARGETS = cmd/registry
|
||||
|
||||
# distribution-registry builds and installs the 'registry' executable, but
|
||||
# that name is a bit too generic. Rename it to match the package name.
|
||||
DISTRIBUTION_REGISTRY_BIN_NAME = distribution-registry
|
||||
|
||||
# Inject the version as if done by upstream's wrapper Makefile
|
||||
define DISTRIBUTION_REGISTRY_SET_VERSION
|
||||
$(SED) 's/^var version = ".*"$$/var version = "$(DISTRIBUTION_REGISTRY_VERSION)"/' \
|
||||
$(@D)/version/version.go
|
||||
endef
|
||||
DISTRIBUTION_REGISTRY_PRE_CONFIGURE_HOOKS += DISTRIBUTION_REGISTRY_SET_VERSION
|
||||
|
||||
define DISTRIBUTION_REGISTRY_CONFIG
|
||||
$(INSTALL) -m 0644 -D \
|
||||
$(DISTRIBUTION_REGISTRY_PKGDIR)/config.yml \
|
||||
$(TARGET_DIR)/etc/docker/registry/config.yml
|
||||
endef
|
||||
DISTRIBUTION_REGISTRY_POST_INSTALL_TARGET_HOOKS += DISTRIBUTION_REGISTRY_CONFIG
|
||||
|
||||
define DISTRIBUTION_REGISTRY_USERS
|
||||
distribution-registry -1 distribution-registry -1 * - - - Distribution registry
|
||||
endef
|
||||
|
||||
define DISTRIBUTION_REGISTRY_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -m 0644 -D \
|
||||
$(DISTRIBUTION_REGISTRY_PKGDIR)/distribution-registry.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/distribution-registry.service
|
||||
endef
|
||||
|
||||
$(eval $(golang-package))
|
||||
10
package/distribution-registry/distribution-registry.service
Normal file
10
package/distribution-registry/distribution-registry.service
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Distribution registry
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=distribution-registry
|
||||
ExecStart=/usr/bin/distribution-registry serve /etc/docker/registry/config.yml
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user