Skip to content

Commit a23e443

Browse files
authored
Update goharbor/distribution GIT_TAG to latest commit on branch (#5162)
* Update goharbor/distribution GIT_TAG to latest commit on branch release/2.8 * change README version
1 parent 84fa7d8 commit a23e443

12 files changed

+782
-1528
lines changed

UPSTREAM_PROJECTS.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ projects:
127127
repos:
128128
- name: distribution
129129
versions:
130-
- tag: v2.8.3
130+
- commit: 086d3c33b3981cf598d0d82336a907fcf5c4c848
131131
go_version: "1.24"
132132
- name: harbor
133133
versions:

projects/goharbor/distribution/ATTRIBUTION.txt

Lines changed: 170 additions & 123 deletions
Large diffs are not rendered by default.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
0d588d02354de2474f4da0b2641a476331495f661e66d21f5d98992986f92055 _output/bin/distribution/linux-amd64/registry
2-
3f0d18e854209f29338fa37d4d571f28be5c2313e421edc82ed428a17ca756a8 _output/bin/distribution/linux-arm64/registry
1+
af386e2a1a438b12ca749dfd8bfd90b6db7d23cbedeaad6f8ac386c6a021f25f _output/bin/distribution/linux-amd64/registry
2+
3828c0911198a6e98febfba320f54c72aaa15e4f37fd079a4b3b72309736bba8 _output/bin/distribution/linux-arm64/registry
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2.8.3
1+
086d3c33b3981cf598d0d82336a907fcf5c4c848

projects/goharbor/distribution/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## **distribution**
2-
![Version](https://img.shields.io/badge/version-v2.8.3-blue)
2+
![Version](https://img.shields.io/badge/version-086d3c33b3981cf598d0d82336a907fcf5c4c848-blue)
33
![Build Status](https://codebuild.us-west-2.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoieGduSTVGQXp1STQ1b2VjY0tiZnJOVStJa1pja2pjbDJYQTdMS2V5R0lyWFJ0R1lya1lYREhuYy9xRE5sMlc2SmZVWXlNRGRJdGhwZXl5V0cwMXB2ck5nPSIsIml2UGFyYW1ldGVyU3BlYyI6IlQwNHZleTBzMzZQMjZ1VCsiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=main)
44

55
This [distribution project](https://github.com/goharbor/distribution)'s main product is the Open Source Registry implementation for storing and distributing container images using the [OCI Distribution Specification](https://github.com/opencontainers/distribution-spec). 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.

projects/goharbor/distribution/patches/0001-harbor-patch.patch

Lines changed: 0 additions & 904 deletions
This file was deleted.

projects/goharbor/distribution/patches/0001-migrate-to-go-module.patch

Lines changed: 504 additions & 0 deletions
Large diffs are not rendered by default.

projects/goharbor/distribution/patches/0002-migrate-to-go-module.patch

Lines changed: 0 additions & 281 deletions
This file was deleted.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
From 8318e082623a26c094057aaa3b9947901ec615d9 Mon Sep 17 00:00:00 2001
2+
From: Jhaanvi Golani <jhaanvi4.golani@gmail.com>
3+
Date: Wed, 19 Jun 2024 10:13:46 -0700
4+
Subject: [PATCH] migrate to go module
5+
6+
---
7+
registry/handlers/app.go | 3 ++-
8+
registry/registry.go | 20 ++++++++------------
9+
2 files changed, 10 insertions(+), 13 deletions(-)
10+
11+
diff --git a/registry/handlers/app.go b/registry/handlers/app.go
12+
index 72fd62e2..14aef24e 100644
13+
--- a/registry/handlers/app.go
14+
+++ b/registry/handlers/app.go
15+
@@ -42,6 +42,7 @@ import (
16+
"github.com/docker/go-metrics"
17+
"github.com/docker/libtrust"
18+
"github.com/gomodule/redigo/redis"
19+
+ gomoduleredis "github.com/gomodule/redigo/redis"
20+
"github.com/gorilla/mux"
21+
"github.com/sirupsen/logrus"
22+
)
23+
@@ -522,7 +523,7 @@ func (app *App) configureRedis(configuration *configuration.Configuration) {
24+
sntnl := &sentinel.Sentinel{
25+
Addrs: strings.Split(configuration.Redis.Addr, ","),
26+
MasterName: configuration.Redis.SentinelMasterSet,
27+
- Dial: func(addr string) (redis.Conn, error) {
28+
+ Dial: func(addr string) (gomoduleredis.Conn, error) {
29+
c, err := redis.Dial("tcp", addr,
30+
redisOptions...)
31+
if err != nil {
32+
diff --git a/registry/registry.go b/registry/registry.go
33+
index 9486d8bb..4b81e4d9 100644
34+
--- a/registry/registry.go
35+
+++ b/registry/registry.go
36+
@@ -13,7 +13,8 @@ import (
37+
"syscall"
38+
"time"
39+
40+
- "rsc.io/letsencrypt"
41+
+ "golang.org/x/crypto/acme"
42+
+ "golang.org/x/crypto/acme/autocert"
43+
44+
logrus_bugsnag "github.com/Shopify/logrus-bugsnag"
45+
46+
@@ -246,19 +247,14 @@ func (registry *Registry) ListenAndServe() error {
47+
if config.HTTP.TLS.Certificate != "" {
48+
return fmt.Errorf("cannot specify both certificate and Let's Encrypt")
49+
}
50+
- var m letsencrypt.Manager
51+
- if err := m.CacheFile(config.HTTP.TLS.LetsEncrypt.CacheFile); err != nil {
52+
- return err
53+
- }
54+
- if !m.Registered() {
55+
- if err := m.Register(config.HTTP.TLS.LetsEncrypt.Email, nil); err != nil {
56+
- return err
57+
- }
58+
- }
59+
- if len(config.HTTP.TLS.LetsEncrypt.Hosts) > 0 {
60+
- m.SetHosts(config.HTTP.TLS.LetsEncrypt.Hosts)
61+
+ m := &autocert.Manager{
62+
+ HostPolicy: autocert.HostWhitelist(config.HTTP.TLS.LetsEncrypt.Hosts...),
63+
+ Cache: autocert.DirCache(config.HTTP.TLS.LetsEncrypt.CacheFile),
64+
+ Email: config.HTTP.TLS.LetsEncrypt.Email,
65+
+ Prompt: autocert.AcceptTOS,
66+
}
67+
tlsConf.GetCertificate = m.GetCertificate
68+
+ tlsConf.NextProtos = append(tlsConf.NextProtos, acme.ALPNProto)
69+
} else {
70+
tlsConf.Certificates = make([]tls.Certificate, 1)
71+
tlsConf.Certificates[0], err = tls.LoadX509KeyPair(config.HTTP.TLS.Certificate, config.HTTP.TLS.Key)
72+
--
73+
2.34.1
74+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
From 49491bf5da7327925bbdafd94a2b04ddd99797f2 Mon Sep 17 00:00:00 2001
2+
From: Amelia Lu <peirulu@amazonaws.com>
3+
Date: Wed, 4 Feb 2026 22:29:58 +0000
4+
Subject: [PATCH] replace logstash formatter to default
5+
6+
The logrus-logstash-hook does not have LogstashFormatter in version v1.0.0,
7+
replace it with the default formatter.s
8+
---
9+
registry/registry.go | 4 +---
10+
1 file changed, 1 insertion(+), 3 deletions(-)
11+
12+
diff --git a/registry/registry.go b/registry/registry.go
13+
index 4b81e4d9..a946ba17 100644
14+
--- a/registry/registry.go
15+
+++ b/registry/registry.go
16+
@@ -359,9 +359,7 @@ func configureLogging(ctx context.Context, config *configuration.Configuration)
17+
TimestampFormat: time.RFC3339Nano,
18+
})
19+
case "logstash":
20+
- log.SetFormatter(&logstash.LogstashFormatter{
21+
- TimestampFormat: time.RFC3339Nano,
22+
- })
23+
+ log.SetFormatter(logstash.DefaultFormatter(log.Fields{}))
24+
default:
25+
// just let the library use default on empty string.
26+
if config.Log.Formatter != "" {
27+
--
28+
2.34.1
29+

0 commit comments

Comments
 (0)