summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Rüger <mrueg@gentoo.org>2018-07-18 13:23:17 +0200
committerManuel Rüger <mrueg@gentoo.org>2018-07-18 13:23:17 +0200
commitd6eb28908e41163393a2214e91b6ef6e581bf2bf (patch)
tree2cb29cef747694bb64adacea4583c027912b7ebe /app-emulation
parentapp-emulation/virtualbox-guest-additions: Fixed minor issue with new patchset (diff)
downloadgentoo-d6eb28908e41163393a2214e91b6ef6e581bf2bf.tar.gz
gentoo-d6eb28908e41163393a2214e91b6ef6e581bf2bf.tar.bz2
gentoo-d6eb28908e41163393a2214e91b6ef6e581bf2bf.zip
app-emulation/reg: Add init scripts for webUI
Package-Manager: Portage-2.3.43, Repoman-2.3.10
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/reg/files/reg.confd2
-rw-r--r--app-emulation/reg/files/reg.initd19
-rw-r--r--app-emulation/reg/reg-0.15.4-r1.ebuild42
3 files changed, 63 insertions, 0 deletions
diff --git a/app-emulation/reg/files/reg.confd b/app-emulation/reg/files/reg.confd
new file mode 100644
index 000000000000..1bd2475decc4
--- /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 000000000000..7759f44f376c
--- /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 000000000000..fe202f002568
--- /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
+}