public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-util/clair/files/, dev-util/clair/
@ 2017-06-05 22:22 Manuel Rüger
  0 siblings, 0 replies; only message in thread
From: Manuel Rüger @ 2017-06-05 22:22 UTC (permalink / raw
  To: gentoo-commits

commit:     8598811910005502ffbec76c4199d75af41d0bf6
Author:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  5 22:21:21 2017 +0000
Commit:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
CommitDate: Mon Jun  5 22:21:36 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85988119

dev-util/clair: Initial version

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 dev-util/clair/Manifest           |  1 +
 dev-util/clair/clair-2.0.0.ebuild | 42 +++++++++++++++++++++++++++++++++++++++
 dev-util/clair/files/clair.confd  |  2 ++
 dev-util/clair/files/clair.initd  | 24 ++++++++++++++++++++++
 dev-util/clair/metadata.xml       | 13 ++++++++++++
 5 files changed, 82 insertions(+)

diff --git a/dev-util/clair/Manifest b/dev-util/clair/Manifest
new file mode 100644
index 00000000000..997660b29d1
--- /dev/null
+++ b/dev-util/clair/Manifest
@@ -0,0 +1 @@
+DIST clair-2.0.0.tar.gz 5194402 SHA256 c255e4855929304617884720360bd7f58b8e9c11b608b50879329ca5725a122b SHA512 ee6fc3d15a6f2937bc6c25ebcd279982a220c60b7dc79db7e2fd127a810fdea9aff92a9546cec69e075a8cf0617dfd4605db846eeea456fc82bee14febc2f841 WHIRLPOOL ec76553be1fba1ffc2bab4bba1eebe9f21c7ad25714ce53df5026733fe701ba9cee3adfeb0eac578de583dbe3a5017d898f32da54f8d21e85cdbb47622c7d323

diff --git a/dev-util/clair/clair-2.0.0.ebuild b/dev-util/clair/clair-2.0.0.ebuild
new file mode 100644
index 00000000000..a795f829c9e
--- /dev/null
+++ b/dev-util/clair/clair-2.0.0.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit user golang-build golang-vcs-snapshot
+
+EGO_PN="github.com/coreos/clair"
+EGIT_COMMIT="v${PV}"
+ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64"
+
+DESCRIPTION="Vulnerability Static Analysis for Containers"
+HOMEPAGE="https://github.com/coreos/clair"
+SRC_URI="${ARCHIVE_URI}"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE=""
+
+#RESTRICT="test"
+
+pkg_setup() {
+	enewgroup ${PN}
+	enewuser ${PN} -1 -1 -1 ${PN}
+}
+
+src_compile() {
+	GOPATH="${S}" go build -o bin/${PN} -v ${EGO_PN}/cmd/${PN}  || die
+}
+
+src_install() {
+	dobin bin/${PN}
+	pushd src/${EGO_PN} || die
+	dodoc {README,ROADMAP,CONTRIBUTING}.md
+	insinto /etc/${PN}
+	doins config.example.yaml
+	popd || die
+
+	newinitd "${FILESDIR}"/${PN}.initd ${PN}
+	newconfd "${FILESDIR}"/${PN}.confd ${PN}
+	keepdir /var/log/${PN}
+	fowners ${PN}:${PN} /var/log/${PN}
+}

diff --git a/dev-util/clair/files/clair.confd b/dev-util/clair/files/clair.confd
new file mode 100644
index 00000000000..e66675311de
--- /dev/null
+++ b/dev-util/clair/files/clair.confd
@@ -0,0 +1,2 @@
+# arguments for clair config
+command_args="-config=/etc/clair/config.yaml"

diff --git a/dev-util/clair/files/clair.initd b/dev-util/clair/files/clair.initd
new file mode 100644
index 00000000000..b98d295c46b
--- /dev/null
+++ b/dev-util/clair/files/clair.initd
@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+# Copyright 2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="Clair Vulnerability Static Analysis for Containers"
+pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"}
+user=${user:-${SVCNAME}}
+group=${group:-${SVCNAME}}
+
+command="/usr/bin/clair"
+command_args="${command_args:--config=/etc/clair/config.yaml}"
+command_background="true"
+start_stop_daemon_args="--user ${user} --group ${group} \
+	--stdout /var/log/${SVCNAME}/${SVCNAME}.log \
+	--stderr /var/log/${SVCNAME}/${SVCNAME}.log"
+
+depend() {
+	need net
+	after net
+}
+
+start_pre() {
+	checkpath -d -m 0755 -o "${user}":"${group}" "${pidfile%/*}"
+}

diff --git a/dev-util/clair/metadata.xml b/dev-util/clair/metadata.xml
new file mode 100644
index 00000000000..aa59e10bd3e
--- /dev/null
+++ b/dev-util/clair/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<longdescription>
+	</longdescription>
+	<maintainer type="person">
+		<email>mrueg@gentoo.org</email>
+		<name>Manuel Rüger</name>
+	</maintainer>
+	<upstream>
+		<remote-id type="github">coreos/clair</remote-id>
+	</upstream>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-05 22:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-05 22:22 [gentoo-commits] repo/gentoo:master commit in: dev-util/clair/files/, dev-util/clair/ 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