Gentoo Archives: gentoo-commits

From: "Manuel Rüger" <mrueg@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/reg/files/, app-emulation/reg/
Date: Wed, 18 Jul 2018 11:23:46
Message-Id: 1531912997.d6eb28908e41163393a2214e91b6ef6e581bf2bf.mrueg@gentoo
1 commit: d6eb28908e41163393a2214e91b6ef6e581bf2bf
2 Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jul 18 11:23:17 2018 +0000
4 Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
5 CommitDate: Wed Jul 18 11:23:17 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d6eb2890
7
8 app-emulation/reg: Add init scripts for webUI
9
10 Package-Manager: Portage-2.3.43, Repoman-2.3.10
11
12 app-emulation/reg/files/reg.confd | 2 ++
13 app-emulation/reg/files/reg.initd | 19 +++++++++++++++
14 app-emulation/reg/reg-0.15.4-r1.ebuild | 42 ++++++++++++++++++++++++++++++++++
15 3 files changed, 63 insertions(+)
16
17 diff --git a/app-emulation/reg/files/reg.confd b/app-emulation/reg/files/reg.confd
18 new file mode 100644
19 index 00000000000..1bd2475decc
20 --- /dev/null
21 +++ b/app-emulation/reg/files/reg.confd
22 @@ -0,0 +1,2 @@
23 +# arguments for reg server
24 +command_args="--asset-path=/var/lib/reg"
25
26 diff --git a/app-emulation/reg/files/reg.initd b/app-emulation/reg/files/reg.initd
27 new file mode 100644
28 index 00000000000..7759f44f376
29 --- /dev/null
30 +++ b/app-emulation/reg/files/reg.initd
31 @@ -0,0 +1,19 @@
32 +#!/sbin/openrc-run
33 +# Copyright 2016-2018 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +description="Reg server - providing a UI for Docker Registry"
37 +pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
38 +user=${user:-${RC_SVCNAME}}
39 +group=${group:-${RC_SVCNAME}}
40 +
41 +command="/usr/bin/reg server"
42 +command_args="${command_args:---asset-path=/var/lib/reg}"
43 +command_background="true"
44 +start_stop_daemon_args="--user ${user} --group ${group} \
45 + --stdout /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log \
46 + --stderr /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log"
47 +
48 +depend() {
49 + after net
50 +}
51
52 diff --git a/app-emulation/reg/reg-0.15.4-r1.ebuild b/app-emulation/reg/reg-0.15.4-r1.ebuild
53 new file mode 100644
54 index 00000000000..fe202f00256
55 --- /dev/null
56 +++ b/app-emulation/reg/reg-0.15.4-r1.ebuild
57 @@ -0,0 +1,42 @@
58 +# Copyright 1999-2018 Gentoo Foundation
59 +# Distributed under the terms of the GNU General Public License v2
60 +
61 +EAPI=6
62 +inherit golang-build golang-vcs-snapshot user
63 +
64 +EGO_PN="github.com/genuinetools/reg"
65 +GIT_COMMIT="8c930c585418564a4ce472fbbfccb8c5741c2520"
66 +ARCHIVE_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
67 +KEYWORDS="~amd64"
68 +
69 +DESCRIPTION="Docker registry v2 command line client"
70 +HOMEPAGE="https://github.com/genuinetools/reg"
71 +SRC_URI="${ARCHIVE_URI}"
72 +LICENSE="MIT"
73 +SLOT="0"
74 +IUSE=""
75 +
76 +RESTRICT="test"
77 +
78 +pkg_setup() {
79 + enewgroup reg
80 + enewuser reg -1 -1 /var/lib/reg reg
81 +}
82 +
83 +src_compile() {
84 + pushd src/${EGO_PN} || die
85 + GOPATH="${S}" go build -v -ldflags "-X ${EGO_PN}/version.GITCOMMIT=${GIT_COMMIT} -X ${EGO_PN}/version.VERSION=${PV}" -o "${S}"/bin/reg . || die
86 + popd || die
87 +}
88 +
89 +src_install() {
90 + dobin bin/*
91 + dodoc src/${EGO_PN}/README.md
92 + insinto /var/lib/${PN}
93 + doins -r src/${EGO_PN}/server/*
94 + newinitd "${FILESDIR}"/reg.initd reg
95 + newconfd "${FILESDIR}"/reg.confd reg
96 +
97 + keepdir /var/log/reg
98 + fowners -R reg:reg /var/log/reg /var/lib/reg/static
99 +}