summaryrefslogtreecommitdiff
path: root/app-emulation/reg
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-08-08 20:11:47 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-08-08 20:11:47 +0100
commitf625b9919a60a30f1bd860f7d1b2eac183ced593 (patch)
tree7543f00925ff7277e31881de0a87801681f6f92f /app-emulation/reg
parente3872864be25f7421015bef2732fa57c0c9fb726 (diff)
gentoo resync : 08.08.2018
Diffstat (limited to 'app-emulation/reg')
-rw-r--r--app-emulation/reg/Manifest2
-rw-r--r--app-emulation/reg/files/reg-0.15.4-listen-addr.patch47
-rw-r--r--app-emulation/reg/reg-0.15.4-r2.ebuild50
3 files changed, 99 insertions, 0 deletions
diff --git a/app-emulation/reg/Manifest b/app-emulation/reg/Manifest
index ae60d2fb68cc..0f3530bdf452 100644
--- a/app-emulation/reg/Manifest
+++ b/app-emulation/reg/Manifest
@@ -1,6 +1,8 @@
+AUX reg-0.15.4-listen-addr.patch 1519 BLAKE2B f25399e776125d433cfbc15b4e48167b7606e1c2e23604d3e68fe1e262b4c1304f12d7e3b9f3cb17de77a485a4be483f17dc3627ba7a19b350e2752ed2c23e68 SHA512 d1d3303ccdf272d8526184a5be1f28107762681cf796a568ff01249b0ff6dc5c9c5c9d6a9f47bb244cdadd42f3b24e9b21fbe3d6cdc8bc410a681d4b606f48d8
AUX reg.confd 68 BLAKE2B 90fbc7677653b2e1389a0a0dd4c06f8a108fc70f6ae8d53fb94a5ef4669296679cf0f15bf985594837b0d455206f1b928df8a65596e81c0c717c5908c1987b0c SHA512 c0e7e68e8fd09cd46af3a01dc3507ef55dc25016b00e425e673734c864f05c63fcf3dc10b7ca987f166b33cfbfea62ca6c3458b73e28d3683d5bc81cbda84c4e
AUX reg.initd 595 BLAKE2B 36a5fd61c46810c1924c86c00392348e0907501f896114c3c523daebfd110e5ea292d4087fc4a41ba91ccd952c1c6b27fe1b1db60364575352a9eb9e4b207258 SHA512 96919a0d2f29631c4296bcf8adfb78d63f5d732ed350491f7df14f45744c945559110454a0c24726962da7519dd790a37a6c6a2e0d3586599dc7231743fbe03a
DIST reg-0.15.4.tar.gz 4052737 BLAKE2B 34bc68d3cb161bbea02bfc0ed142cb764f2db64610ac7b2b92130cfc838cfa4fde4794da9fd2d38a9bb73e994cf386ac9f50beaa4435b88cf034a4f4d0b648cc SHA512 d5948b095c310c2697a2f7b80a342af6949e4cb66c521cdb370a6fbead7424d729057fe71952291ee1ed82717cd7bb29141f6a2f85c946e33fd96da1c17912dd
EBUILD reg-0.15.4-r1.ebuild 1060 BLAKE2B 769a395dd1cfa2cbcdd691dc66a2e94f8b9efbbf24347dd9ebf56da7a6a705d6e057efaac9a227d9e22e52b679dda38ef3bbebab31c8f33b0989d5cd43f13e8b SHA512 8fc065165a355d2a8cdccd05b94fd49bf0513878f668a0123379adabe5b37a2b5e337bccd9906667ebce2f116837c1eca6923acbc57e017d9bb588e5ab40807d
+EBUILD reg-0.15.4-r2.ebuild 1179 BLAKE2B afce38e0d6c9bc23af77eb7b995f0514b9b8d02d08c5f7c6a139b7643bcb3aad420d61a62deadb318e9ed0dca0d00e71407f4af914a435fbf75db1c6b0cf22d9 SHA512 18640a5b6fb4bb170dfa2ae7d6b9824e5bae12861cb8c699f31beb8bf8e183244840dfd4807d1703383fdd934e0dd621e2e24c55b95345f96724d08828166fa0
EBUILD reg-0.15.4.ebuild 836 BLAKE2B 5f6e3dcef97cdf67fbcc9d07b02ee66a611396fb98831f192e25e5af90fd8c01b9c15f4462008eae7f87174111a1e1f6902237380d7ffe49d151e5525698e0f3 SHA512 6e63c4018a663d0b65a35ea71cefc7dd4d62e3e16c2bc4c79cf38c25a5a2c9f07345f70f3267a356d46214a3092373651692d337798be8facca2b52f028c3405
MISC metadata.xml 326 BLAKE2B 82f2440e792104c0c9e1afe4d95b9972efc7b233524637e32f11c2b5746aba7990d88f01a542e25f7a5c9c52aac0c5c1e25bc5703d3e855ea8e8ef4ffe87929c SHA512 9fea1224db7eb9316eff5bd89ebf748cbf35160516b33a9c9a3a07d1db6a2fa64dafcf8623a24af09429f7b76cc94ee02a39145162d0b039cb9d0137bc51a20e
diff --git a/app-emulation/reg/files/reg-0.15.4-listen-addr.patch b/app-emulation/reg/files/reg-0.15.4-listen-addr.patch
new file mode 100644
index 000000000000..21f2759e5b8c
--- /dev/null
+++ b/app-emulation/reg/files/reg-0.15.4-listen-addr.patch
@@ -0,0 +1,47 @@
+From b3c826e2e48108d832cbe9fc3b630e7ff207915a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Manuel=20R=C3=BCger?= <manuel@rueg.eu>
+Date: Wed, 18 Jul 2018 19:47:12 +0200
+Subject: [PATCH] server: Allow to restrict listen address (#115)
+
+e.g. limit to listen on localhost only
+---
+ server.go | 12 +++++++-----
+ 2 files changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/server.go b/server.go
+index 8866efed..a7cc2048 100644
+--- a/server.go
++++ b/server.go
+@@ -35,6 +35,7 @@ func (cmd *serverCommand) Register(fs *flag.FlagSet) {
+
+ fs.StringVar(&cmd.cert, "cert", "", "path to ssl cert")
+ fs.StringVar(&cmd.key, "key", "", "path to ssl key")
++ fs.StringVar(&cmd.listenAddress, "listen-address", "", "address to listen on")
+ fs.StringVar(&cmd.port, "port", "8080", "port for server to run on")
+ fs.StringVar(&cmd.assetPath, "asset-path", "", "Path to assets and templates")
+
+@@ -48,10 +49,11 @@ type serverCommand struct {
+
+ generateAndExit bool
+
+- cert string
+- key string
+- port string
+- assetPath string
++ cert string
++ key string
++ listenAddress string
++ port string
++ assetPath string
+ }
+
+ func (cmd *serverCommand) Run(ctx context.Context, args []string) error {
+@@ -180,7 +182,7 @@ func (cmd *serverCommand) Run(ctx context.Context, args []string) error {
+
+ // Set up the server.
+ server := &http.Server{
+- Addr: ":" + cmd.port,
++ Addr: cmd.listenAddress + ":" + cmd.port,
+ Handler: mux,
+ }
+ logrus.Infof("Starting server on port %q", cmd.port)
diff --git a/app-emulation/reg/reg-0.15.4-r2.ebuild b/app-emulation/reg/reg-0.15.4-r2.ebuild
new file mode 100644
index 000000000000..1bebb08c1e9d
--- /dev/null
+++ b/app-emulation/reg/reg-0.15.4-r2.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit golang-build golang-vcs-snapshot user
+
+EGO_PN="github.com/genuinetools/reg"
+GIT_COMMIT="8c930c585418564a4ce472fbbfccb8c5741c2520"
+ARCHIVE_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64"
+
+DESCRIPTION="Docker registry v2 command line client"
+HOMEPAGE="https://github.com/genuinetools/reg"
+SRC_URI="${ARCHIVE_URI}"
+LICENSE="MIT"
+SLOT="0"
+IUSE=""
+
+RESTRICT="test"
+
+PATCHES=( "${FILESDIR}"/${P}-listen-addr.patch )
+
+pkg_setup() {
+ enewgroup reg
+ enewuser reg -1 -1 /var/lib/reg reg
+}
+
+src_prepare() {
+ pushd src/${EGO_PN} || die
+ default
+ popd || die
+}
+
+src_compile() {
+ pushd src/${EGO_PN} || die
+ GOPATH="${S}" go build -v -ldflags "-X ${EGO_PN}/version.GITCOMMIT=${GIT_COMMIT} -X ${EGO_PN}/version.VERSION=${PV}" -o "${S}"/bin/reg . || die
+ popd || die
+}
+
+src_install() {
+ dobin bin/*
+ dodoc src/${EGO_PN}/README.md
+ insinto /var/lib/${PN}
+ doins -r src/${EGO_PN}/server/*
+ newinitd "${FILESDIR}"/reg.initd reg
+ newconfd "${FILESDIR}"/reg.confd reg
+
+ keepdir /var/log/reg
+ fowners -R reg:reg /var/log/reg /var/lib/reg/static
+}