c007315764
Upversioning docker-distribution to v2.8.2+ds1-1 to be able to block TLS1.0, TLS1.1 in registry-distribution. Test Plan: PASS: $downloader. PASS: $build-pkgs docker-distribution --clean. PASS: $build-image. PASS: List docker-distribution package installed with apt list | grep docker. PASS: Verify if ports 9001 and 9002 are blocking tls1.0, 1.1 and 1.2 with nmap. Closes-Bug: 2043217 Change-Id: Id0fc5f8794af54fc4b87b9cab6cec8b454775410 Signed-off-by: Karla Felix <karla.karolinenogueirafelix@windriver.com>
75 lines
2.6 KiB
Diff
75 lines
2.6 KiB
Diff
From d59ec80b26c352416d84eb22e8dc8c743eb9a8e6 Mon Sep 17 00:00:00 2001
|
|
From: Karla Felix <karla.karolinenogueirafelix@windriver.com>
|
|
Date: Wed, 18 Oct 2023 19:05:21 -0300
|
|
Subject: [PATCH] debian-patches
|
|
|
|
---
|
|
debian/docker-registry.init | 2 +-
|
|
debian/docker-registry.postinst | 2 +-
|
|
debian/docker-registry.service | 7 ++++++-
|
|
debian/rules | 4 ++--
|
|
4 files changed, 10 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/debian/docker-registry.init b/debian/docker-registry.init
|
|
index c225130..c03a67a 100644
|
|
--- a/debian/docker-registry.init
|
|
+++ b/debian/docker-registry.init
|
|
@@ -13,7 +13,7 @@ set -e
|
|
BASE=docker-registry
|
|
|
|
BINARY=/usr/bin/$BASE
|
|
-CONFIG=/etc/docker/registry/config.yml
|
|
+CONFIG=/etc/docker-distribution/registry/config.yml
|
|
EXECUSER=docker-registry
|
|
PIDFILE=/var/run/$BASE.pid
|
|
LOGFILE=/var/log/$BASE.log
|
|
diff --git a/debian/docker-registry.postinst b/debian/docker-registry.postinst
|
|
index 96ded3c..d179197 100755
|
|
--- a/debian/docker-registry.postinst
|
|
+++ b/debian/docker-registry.postinst
|
|
@@ -15,7 +15,7 @@ if [ "$1" = 'configure' ]; then
|
|
# On a fresh install, $2 = '' and dpkg treat that as a
|
|
# lower version, so the permissions get fixed too.
|
|
if dpkg --compare-versions "$2" le '2.4.1~ds1-1'; then
|
|
- chmod 0755 /etc/docker
|
|
+ chmod 0755 /etc/docker-distribution
|
|
fi
|
|
|
|
# ensure home directory ownership (logic borrowed from postgresql-common)
|
|
diff --git a/debian/docker-registry.service b/debian/docker-registry.service
|
|
index 066e38a..a2feaa6 100644
|
|
--- a/debian/docker-registry.service
|
|
+++ b/debian/docker-registry.service
|
|
@@ -4,7 +4,12 @@ After=network.target
|
|
|
|
[Service]
|
|
User=docker-registry
|
|
-ExecStart=/usr/bin/docker-registry serve /etc/docker/registry/config.yml
|
|
+Type=simple
|
|
+Environment=REGISTRY_STORAGE_DELETE_ENABLED=true
|
|
+ExecStart=/usr/bin/docker-registry serve /etc/docker-distribution/registry/config.yml
|
|
+Restart=on-failure
|
|
+ExecStartPost=/bin/bash -c 'echo $MAINPID > /var/run/docker-distribution.pid'
|
|
+ExecStopPost=/bin/rm -f /var/run/docker-distribution.pid
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
diff --git a/debian/rules b/debian/rules
|
|
index 8f0ea9f..ec4fa26 100755
|
|
--- a/debian/rules
|
|
+++ b/debian/rules
|
|
@@ -15,8 +15,8 @@ override_dh_auto_build:
|
|
|
|
execute_after_dh_auto_install:
|
|
mv debian/tmp/usr/bin/registry debian/tmp/usr/bin/docker-registry
|
|
- mkdir -p debian/tmp/etc/docker/registry
|
|
- cp cmd/registry/config-example.yml debian/tmp/etc/docker/registry/config.yml
|
|
+ mkdir -p debian/tmp/etc/docker-distribution/registry
|
|
+ cp cmd/registry/config-example.yml debian/tmp/etc/docker-distribution/registry/config.yml
|
|
|
|
override_dh_auto_test:
|
|
dh_auto_test -- -test.short -test.timeout=1h
|
|
--
|
|
2.25.1
|
|
|