public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-emulation/reg/files/, app-emulation/reg/
@ 2018-07-18 11:23 Manuel Rüger
  0 siblings, 0 replies; 3+ messages in thread
From: Manuel Rüger @ 2018-07-18 11:23 UTC (permalink / raw
  To: gentoo-commits

commit:     d6eb28908e41163393a2214e91b6ef6e581bf2bf
Author:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 18 11:23:17 2018 +0000
Commit:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
CommitDate: Wed Jul 18 11:23:17 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d6eb2890

app-emulation/reg: Add init scripts for webUI

Package-Manager: Portage-2.3.43, Repoman-2.3.10

 app-emulation/reg/files/reg.confd      |  2 ++
 app-emulation/reg/files/reg.initd      | 19 +++++++++++++++
 app-emulation/reg/reg-0.15.4-r1.ebuild | 42 ++++++++++++++++++++++++++++++++++
 3 files changed, 63 insertions(+)

diff --git a/app-emulation/reg/files/reg.confd b/app-emulation/reg/files/reg.confd
new file mode 100644
index 00000000000..1bd2475decc
--- /dev/null
+++ b/app-emulation/reg/files/reg.confd
@@ -0,0 +1,2 @@
+# arguments for reg server
+command_args="--asset-path=/var/lib/reg"

diff --git a/app-emulation/reg/files/reg.initd b/app-emulation/reg/files/reg.initd
new file mode 100644
index 00000000000..7759f44f376
--- /dev/null
+++ b/app-emulation/reg/files/reg.initd
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+# Copyright 2016-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="Reg server - providing a UI for Docker Registry"
+pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
+user=${user:-${RC_SVCNAME}}
+group=${group:-${RC_SVCNAME}}
+
+command="/usr/bin/reg server"
+command_args="${command_args:---asset-path=/var/lib/reg}"
+command_background="true"
+start_stop_daemon_args="--user ${user} --group ${group} \
+	--stdout /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log \
+	--stderr /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log"
+
+depend() {
+	after net
+}

diff --git a/app-emulation/reg/reg-0.15.4-r1.ebuild b/app-emulation/reg/reg-0.15.4-r1.ebuild
new file mode 100644
index 00000000000..fe202f00256
--- /dev/null
+++ b/app-emulation/reg/reg-0.15.4-r1.ebuild
@@ -0,0 +1,42 @@
+# 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"
+
+pkg_setup() {
+	enewgroup reg
+	enewuser reg -1 -1 /var/lib/reg reg
+}
+
+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
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/reg/files/, app-emulation/reg/
@ 2018-08-06 17:40 Manuel Rüger
  0 siblings, 0 replies; 3+ messages in thread
From: Manuel Rüger @ 2018-08-06 17:40 UTC (permalink / raw
  To: gentoo-commits

commit:     50e6b0f5b4bcc233723fb8a24de376dbda7b10cb
Author:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
AuthorDate: Mon Aug  6 14:27:22 2018 +0000
Commit:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
CommitDate: Mon Aug  6 17:40:11 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50e6b0f5

app-emulation/reg: Include patch to set listen addr

Package-Manager: Portage-2.3.44, Repoman-2.3.10

 .../reg/files/reg-0.15.4-listen-addr.patch         | 47 ++++++++++++++++++++
 app-emulation/reg/reg-0.15.4-r2.ebuild             | 50 ++++++++++++++++++++++
 2 files changed, 97 insertions(+)

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 00000000000..21f2759e5b8
--- /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 00000000000..1bebb08c1e9
--- /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
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/reg/files/, app-emulation/reg/
@ 2019-01-28 10:54 Manuel Rüger
  0 siblings, 0 replies; 3+ messages in thread
From: Manuel Rüger @ 2019-01-28 10:54 UTC (permalink / raw
  To: gentoo-commits

commit:     b3019dfb52716448680a5ba080b61cba6a28dc26
Author:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 28 10:53:05 2019 +0000
Commit:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
CommitDate: Mon Jan 28 10:53:05 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3019dfb

app-emulation/reg: Add new snapshot

Package-Manager: Portage-2.3.58, Repoman-2.3.12
Signed-off-by: Manuel Rüger <mrueg <AT> gentoo.org>

 app-emulation/reg/Manifest                      |   2 +
 app-emulation/reg/files/reg-0.16.0-config.patch | 254 ++++++++++++++++++++++++
 app-emulation/reg/reg-0.16.0_p20180102.ebuild   |  53 +++++
 3 files changed, 309 insertions(+)

diff --git a/app-emulation/reg/Manifest b/app-emulation/reg/Manifest
index b92b4fb0169..9d2d1bb904a 100644
--- a/app-emulation/reg/Manifest
+++ b/app-emulation/reg/Manifest
@@ -1,3 +1,5 @@
+DIST github.com-go-yaml-yaml-a3f3340b5840cee44f372bddb5880fcbc419b46a.tar.gz 60814 BLAKE2B a77b7d72e2937af71a0734c21bee7a1d7770157c27f1ddfa164c66fd5461f86a2ef46e002087092ef011caae572838bcc9537a8290cd54dfafb7f54423e47c48 SHA512 184a0e658a4eac3b867533cd0e494bd84db94fbe10e8df0d0b755c7ffc95bc99e2f84c0157183ca74cdc79289a85dcf7f1dea8a4c89a253565baf473b3627eae
 DIST reg-0.15.7.tar.gz 4300839 BLAKE2B 67c9ca344e0a2984559c210cbdb4f5fc42f588f0c50a171c145bc63953b7540cbc166b51a5c209a2ece0c3b5647a34ffc1ac6b439b4e5a243e505c223a1a6fe5 SHA512 4c26aa0a438ac87208c4e269e16a994587ccdab38399a664638dd8c7407cf06f00c43a9c3c71cf4c88fa47a6e4466c8143ee7ee8130a8133518f5017ca34cc2d
 DIST reg-0.15.8.tar.gz 4300575 BLAKE2B 554a6afebf0c662fa4e4076019b25aa600f327cc6d3fbd9aff3462b8d1faf0b790724bb9d66725766087f6e4a2ccf55a61f41e7aba936ed386d97cf52c54afab SHA512 23d45d061e2914818787e6837fd02ba7b4fcf5c96a511d5e6ee66689bfd925870780d7a9fcfe6ee98f2b74ce68f05eecfa9d00852ff79965f59c88684113e0d5
 DIST reg-0.16.0.tar.gz 2991496 BLAKE2B e94a53c79ff062013e091d4c558870ef5c25af181cba201a44fa38b9dfe8816d6f3fd581f4e9a3dafe5b3753a3755c31f8b2f4a347da134a969fc93ac296897c SHA512 1e4d936e406998ffaa176e7834b28970b594f88a339fd8447bef2f944efa9b51c1d35bf71b384b3ed1b3e84be08db6d7fd487f4a3c65aa2de0308d6128cf0070
+DIST reg-0.16.0_p20180102.tar.gz 2994965 BLAKE2B c7cb8a0eaa1599a5464b7a98c3df0b146dbbfea884260b7c8cbf5393a9384c8875e38ea4e45c5f888c65b9bb8c326cf9934d9b3c32a4809fe8e3b23239e8f2a8 SHA512 90e92c15b7ca4f2a5f943cb80096af0eba50acd7691963609c25f15a6795f886843776180754ab7d28477f1fc3a4b8d916bc9ac99b768368471b31564d14769c

diff --git a/app-emulation/reg/files/reg-0.16.0-config.patch b/app-emulation/reg/files/reg-0.16.0-config.patch
new file mode 100644
index 00000000000..3ec1bf44d03
--- /dev/null
+++ b/app-emulation/reg/files/reg-0.16.0-config.patch
@@ -0,0 +1,254 @@
+From 0ab86b565f437b9dede5d3a7cef56690d8d19bbb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Manuel=20R=C3=BCger?= <manuel@rueg.eu>
+Date: Tue, 18 Sep 2018 15:42:24 +0200
+Subject: [PATCH 2/2] server: Read config from file
+
+---
+ README.md          |   4 ++
+ config.yml.example |  37 ++++++++++++++++
+ server.go          | 107 +++++++++++++++++++++++++++++++--------------
+ 3 files changed, 114 insertions(+), 34 deletions(-)
+ create mode 100644 config.yml.example
+
+diff --git a/README.md b/README.md
+index 3b1b661f..5e0f0175 100644
+--- a/README.md
++++ b/README.md
+@@ -228,6 +228,7 @@ Flags:
+   -u, --username       username for the registry (default: <none>)
+   --listen-address     address to listen on (default: <none>)
+   --asset-path         Path to assets and templates (default: <none>)
++  --config             Path to config file (default: <none>)
+   -f, --force-non-ssl  force allow use of non-ssl (default: false)
+   --once               generate the templates once and then exit (default: false)
+   --skip-ping          skip pinging the registry while establishing connection (default: false)
+@@ -243,6 +244,9 @@ Flags:
+   -p, --password       password for the registry (default: <none>)
+ ```
+ 
++Alternatively you can provide configuration to `reg server` via a file passed to
++`reg server` via as `--config`. See also config.yml.example in this repository.
++
+ **Screenshots:**
+ 
+ ![home.png](server/home.png)
+diff --git a/config.yml.example b/config.yml.example
+new file mode 100644
+index 00000000..9d4be25f
+--- /dev/null
++++ b/config.yml.example
+@@ -0,0 +1,37 @@
++### Reg Server Settings
++
++## Path to server TLS certificate:
++# cert:
++## Path to server TLS key:
++# key:
++## Address to listen on:
++# listen-address: 0.0.0.0
++## Port to listen on:
++# port: 8080
++## Path Assets are stored under:
++# asset-path: /var/lib/reg
++## Generate static website and exit:
++# once: false
++## Refresh interval:
++# interval: 1h0m0s
++## Debug output
++# debug: false
++## Skip initial ping
++# skip-ping: false
++## Timeout
++# timeout: 1m0s
++
++
++### Registry and Clair Server Settings
++## Registry Server:
++# registry: r.j3ss.co
++## Username to authenticate against registry server
++# username:
++## Password to authenticate against registry server
++# password:
++## If true, do not verify TLS certificates
++# insecure: false
++## Force allow use of non-TLS connections
++# force-nonssl: false
++## Clair Server:
++# clair:
+diff --git a/server.go b/server.go
+index fcd4cd71..0c84d85d 100644
+--- a/server.go
++++ b/server.go
+@@ -4,7 +4,9 @@ import (
+ 	"context"
+ 	"flag"
+ 	"fmt"
++	"gopkg.in/yaml.v2"
+ 	"html/template"
++	"io/ioutil"
+ 	"net/http"
+ 	"os"
+ 	"path/filepath"
+@@ -29,39 +31,76 @@ func (cmd *serverCommand) LongHelp() string  { return serverHelp }
+ func (cmd *serverCommand) Hidden() bool      { return false }
+ 
+ func (cmd *serverCommand) Register(fs *flag.FlagSet) {
+-	fs.DurationVar(&cmd.interval, "interval", time.Hour, "interval to generate new index.html's at")
++	fs.DurationVar(&cmd.Interval, "interval", time.Hour, "interval to generate new index.html's at")
+ 
+-	fs.StringVar(&cmd.registryServer, "registry", "", "URL to the private registry (ex. r.j3ss.co)")
+-	fs.StringVar(&cmd.registryServer, "r", "", "URL to the private registry (ex. r.j3ss.co)")
++	fs.StringVar(&cmd.RegistryServer, "registry", "", "URL to the private registry (ex. r.j3ss.co)")
++	fs.StringVar(&cmd.RegistryServer, "r", "", "URL to the private registry (ex. r.j3ss.co)")
+ 
+-	fs.StringVar(&cmd.clairServer, "clair", "", "url to clair instance")
++	fs.StringVar(&cmd.ClairServer, "clair", "", "url to clair instance")
+ 
+-	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")
++	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.BoolVar(&cmd.generateAndExit, "once", false, "generate the templates once and then exit")
++	fs.StringVar(&cmd.AssetPath, "asset-path", "", "Path to assets and templates")
++	fs.StringVar(&cmd.configPath, "config", "", "Path to config file")
++
++	fs.BoolVar(&cmd.GenerateAndExit, "once", false, "generate the templates once and then exit")
+ }
+ 
+ type serverCommand struct {
+-	interval       time.Duration
+-	registryServer string
+-	clairServer    string
+-
+-	generateAndExit bool
+-
+-	cert          string
+-	key           string
+-	listenAddress string
+-	port          string
+-	assetPath     string
++	Interval        time.Duration `yaml:"interval"`
++	RegistryServer  string        `yaml:"registry"`
++	ClairServer     string        `yaml:"clair"`
++	GenerateAndExit bool          `yaml:"once"`
++	Cert            string        `yaml:"cert"`
++	Key             string        `yaml:"key"`
++	ListenAddress   string        `yaml:"listen-address"`
++	Port            string        `yaml:"port"`
++	AssetPath       string        `yaml:"asset-path"`
++	configPath      string
++
++	Password    string        `yaml:"password"`
++	Username    string        `yaml:"username"`
++	Insecure    bool          `yaml:"insecure"`
++	Debug       bool          `yaml:"debug"`
++	SkipPing    bool          `yaml:"skip-ping"`
++	ForceNonSSL bool          `yaml:"force-nonssl"`
++	Timeout     time.Duration `yaml:"timeout"`
+ }
+ 
+ func (cmd *serverCommand) Run(ctx context.Context, args []string) error {
+ 	// Create the registry client.
+-	r, err := createRegistryClient(ctx, cmd.registryServer)
++	if len(cmd.configPath) > 0 {
++		config, err := ioutil.ReadFile(cmd.configPath)
++		if err != nil {
++			return err
++		}
++		yaml.Unmarshal(config, cmd)
++		if err != nil {
++			return err
++		}
++		if len(cmd.Username) > 0 {
++			username = cmd.Username
++		}
++		if len(cmd.Password) > 0 {
++			password = cmd.Password
++		}
++		if cmd.Debug {
++			debug = cmd.Debug
++		}
++		if cmd.Insecure {
++			insecure = cmd.Insecure
++		}
++		if cmd.SkipPing {
++			skipPing = cmd.SkipPing
++		}
++		if cmd.Timeout != 0 {
++			timeout = cmd.Timeout
++		}
++	}
++	r, err := createRegistryClient(ctx, cmd.RegistryServer)
+ 	if err != nil {
+ 		return err
+ 	}
+@@ -69,25 +108,25 @@ func (cmd *serverCommand) Run(ctx context.Context, args []string) error {
+ 	// Create the registry controller for the handlers.
+ 	rc := registryController{
+ 		reg:          r,
+-		generateOnly: cmd.generateAndExit,
++		generateOnly: cmd.GenerateAndExit,
+ 	}
+ 
+ 	// Create a clair client if the user passed in a server address.
+-	if len(cmd.clairServer) > 0 {
+-		rc.cl, err = clair.New(cmd.clairServer, clair.Opt{
++	if len(cmd.ClairServer) > 0 {
++		rc.cl, err = clair.New(cmd.ClairServer, clair.Opt{
+ 			Insecure: insecure,
+ 			Debug:    debug,
+ 			Timeout:  timeout,
+ 		})
+ 		if err != nil {
+-			return fmt.Errorf("creation of clair client at %s failed: %v", cmd.clairServer, err)
++			return fmt.Errorf("creation of clair client at %s failed: %v", cmd.ClairServer, err)
+ 		}
+ 	} else {
+ 		rc.cl = nil
+ 	}
+ 	// Get the path to the asset directory.
+-	assetDir := cmd.assetPath
+-	if len(cmd.assetPath) <= 0 {
++	assetDir := cmd.AssetPath
++	if len(cmd.AssetPath) <= 0 {
+ 		assetDir, err = os.Getwd()
+ 		if err != nil {
+ 			return err
+@@ -131,12 +170,12 @@ func (cmd *serverCommand) Run(ctx context.Context, args []string) error {
+ 		return fmt.Errorf("creating index failed: %v", err)
+ 	}
+ 
+-	if cmd.generateAndExit {
++	if cmd.GenerateAndExit {
+ 		logrus.Info("output generated, exiting...")
+ 		return nil
+ 	}
+ 
+-	rc.interval = cmd.interval
++	rc.interval = cmd.Interval
+ 	ticker := time.NewTicker(rc.interval)
+ 	go func() {
+ 		// Create more indexes every X minutes based off interval.
+@@ -174,12 +213,12 @@ func (cmd *serverCommand) Run(ctx context.Context, args []string) error {
+ 
+ 	// Set up the server.
+ 	server := &http.Server{
+-		Addr:    cmd.listenAddress + ":" + cmd.port,
++		Addr:    cmd.ListenAddress + ":" + cmd.Port,
+ 		Handler: mux,
+ 	}
+-	logrus.Infof("Starting server on port %q", cmd.port)
+-	if len(cmd.cert) > 0 && len(cmd.key) > 0 {
+-		return server.ListenAndServeTLS(cmd.cert, cmd.key)
++	logrus.Infof("Starting server on port %q", cmd.Port)
++	if len(cmd.Cert) > 0 && len(cmd.Key) > 0 {
++		return server.ListenAndServeTLS(cmd.Cert, cmd.Key)
+ 	}
+ 	return server.ListenAndServe()
+ }

diff --git a/app-emulation/reg/reg-0.16.0_p20180102.ebuild b/app-emulation/reg/reg-0.16.0_p20180102.ebuild
new file mode 100644
index 00000000000..3d7a774209c
--- /dev/null
+++ b/app-emulation/reg/reg-0.16.0_p20180102.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGO_VENDOR=( "gopkg.in/yaml.v2 a3f3340b5840cee44f372bddb5880fcbc419b46a github.com/go-yaml/yaml" )
+
+inherit golang-build golang-vcs-snapshot user
+
+EGO_PN="github.com/genuinetools/reg"
+GIT_COMMIT="d959057b30da67d5f162790f9d5b5160686901fd"
+ARCHIVE_URI="https://${EGO_PN}/archive/${GIT_COMMIT}.tar.gz -> ${P}.tar.gz
+	${EGO_VENDOR_URI}"
+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"
+
+pkg_setup() {
+	enewgroup reg
+	enewuser reg -1 -1 /var/lib/reg reg
+}
+
+src_prepare() {
+	pushd src/${EGO_PN} || die
+	eapply "${FILESDIR}"/reg-0.16.0-config.patch
+	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
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-28 19:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-18 11:23 [gentoo-commits] repo/gentoo:master commit in: app-emulation/reg/files/, app-emulation/reg/ Manuel Rüger
  -- strict thread matches above, loose matches on Subject: below --
2018-08-06 17:40 Manuel Rüger
2019-01-28 10:54 Manuel Rüger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox