summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Rüger <mrueg@gentoo.org>2017-09-19 18:15:21 +0200
committerManuel Rüger <mrueg@gentoo.org>2017-09-19 18:15:21 +0200
commit6f4dd6b9fba7d6951317298878eef5754e8ec882 (patch)
treece90122dcc75e4e4fe7e3ad2d62a875cbcc66e94 /dev-util/clair
parentwww-client/phantomjs: Version bump to 2.1.1 (diff)
downloadgentoo-6f4dd6b9fba7d6951317298878eef5754e8ec882.tar.gz
gentoo-6f4dd6b9fba7d6951317298878eef5754e8ec882.tar.bz2
gentoo-6f4dd6b9fba7d6951317298878eef5754e8ec882.zip
dev-util/clair: Version bump to 2.0.1
Package-Manager: Portage-2.3.8, Repoman-2.3.3
Diffstat (limited to 'dev-util/clair')
-rw-r--r--dev-util/clair/Manifest1
-rw-r--r--dev-util/clair/clair-2.0.1.ebuild46
-rw-r--r--dev-util/clair/files/clair.initd15
3 files changed, 52 insertions, 10 deletions
diff --git a/dev-util/clair/Manifest b/dev-util/clair/Manifest
index 997660b29d11..5826086fc869 100644
--- a/dev-util/clair/Manifest
+++ b/dev-util/clair/Manifest
@@ -1 +1,2 @@
DIST clair-2.0.0.tar.gz 5194402 SHA256 c255e4855929304617884720360bd7f58b8e9c11b608b50879329ca5725a122b SHA512 ee6fc3d15a6f2937bc6c25ebcd279982a220c60b7dc79db7e2fd127a810fdea9aff92a9546cec69e075a8cf0617dfd4605db846eeea456fc82bee14febc2f841 WHIRLPOOL ec76553be1fba1ffc2bab4bba1eebe9f21c7ad25714ce53df5026733fe701ba9cee3adfeb0eac578de583dbe3a5017d898f32da54f8d21e85cdbb47622c7d323
+DIST clair-2.0.1.tar.gz 5194465 SHA256 dd4d608a763cbde2d8fba98aadeadee4c8baa900467b5e8b10f94629439540f7 SHA512 03293829426d81157860effd893b72164679b4ec40c19294e321d489ced67dfea72415cdd9b1005ae590367c68f746664a76f63a29c7d714b22917f2323c4937 WHIRLPOOL f728ff4028ef54dd4351e00ed6ed58230c96476c5bfce74ded867d879ea85f88570476d66fd8d35ca02c4182f7c33e0133d077cb657cbe34f1684f97ee475614
diff --git a/dev-util/clair/clair-2.0.1.ebuild b/dev-util/clair/clair-2.0.1.ebuild
new file mode 100644
index 000000000000..2ee9185f3f21
--- /dev/null
+++ b/dev-util/clair/clair-2.0.1.ebuild
@@ -0,0 +1,46 @@
+# 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=""
+
+RDEPEND="app-arch/rpm
+ app-arch/xz-utils
+ dev-vcs/bzr
+ dev-vcs/git
+ !!sci-visualization/xd3d" # File collision (Bug #621044)
+
+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.initd b/dev-util/clair/files/clair.initd
index b98d295c46b9..53518fea6320 100644
--- a/dev-util/clair/files/clair.initd
+++ b/dev-util/clair/files/clair.initd
@@ -3,22 +3,17 @@
# 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}}
+pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
+user=${user:-${RC_SVCNAME}}
+group=${group:-${RC_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"
+ --stdout /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log \
+ --stderr /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log"
depend() {
- need net
after net
}
-
-start_pre() {
- checkpath -d -m 0755 -o "${user}":"${group}" "${pidfile%/*}"
-}