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 +}