1 |
commit: 8598811910005502ffbec76c4199d75af41d0bf6 |
2 |
Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jun 5 22:21:21 2017 +0000 |
4 |
Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 5 22:21:36 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85988119 |
7 |
|
8 |
dev-util/clair: Initial version |
9 |
|
10 |
Package-Manager: Portage-2.3.6, Repoman-2.3.2 |
11 |
|
12 |
dev-util/clair/Manifest | 1 + |
13 |
dev-util/clair/clair-2.0.0.ebuild | 42 +++++++++++++++++++++++++++++++++++++++ |
14 |
dev-util/clair/files/clair.confd | 2 ++ |
15 |
dev-util/clair/files/clair.initd | 24 ++++++++++++++++++++++ |
16 |
dev-util/clair/metadata.xml | 13 ++++++++++++ |
17 |
5 files changed, 82 insertions(+) |
18 |
|
19 |
diff --git a/dev-util/clair/Manifest b/dev-util/clair/Manifest |
20 |
new file mode 100644 |
21 |
index 00000000000..997660b29d1 |
22 |
--- /dev/null |
23 |
+++ b/dev-util/clair/Manifest |
24 |
@@ -0,0 +1 @@ |
25 |
+DIST clair-2.0.0.tar.gz 5194402 SHA256 c255e4855929304617884720360bd7f58b8e9c11b608b50879329ca5725a122b SHA512 ee6fc3d15a6f2937bc6c25ebcd279982a220c60b7dc79db7e2fd127a810fdea9aff92a9546cec69e075a8cf0617dfd4605db846eeea456fc82bee14febc2f841 WHIRLPOOL ec76553be1fba1ffc2bab4bba1eebe9f21c7ad25714ce53df5026733fe701ba9cee3adfeb0eac578de583dbe3a5017d898f32da54f8d21e85cdbb47622c7d323 |
26 |
|
27 |
diff --git a/dev-util/clair/clair-2.0.0.ebuild b/dev-util/clair/clair-2.0.0.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..a795f829c9e |
30 |
--- /dev/null |
31 |
+++ b/dev-util/clair/clair-2.0.0.ebuild |
32 |
@@ -0,0 +1,42 @@ |
33 |
+# Copyright 1999-2017 Gentoo Foundation |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=6 |
37 |
+inherit user golang-build golang-vcs-snapshot |
38 |
+ |
39 |
+EGO_PN="github.com/coreos/clair" |
40 |
+EGIT_COMMIT="v${PV}" |
41 |
+ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" |
42 |
+KEYWORDS="~amd64" |
43 |
+ |
44 |
+DESCRIPTION="Vulnerability Static Analysis for Containers" |
45 |
+HOMEPAGE="https://github.com/coreos/clair" |
46 |
+SRC_URI="${ARCHIVE_URI}" |
47 |
+LICENSE="Apache-2.0" |
48 |
+SLOT="0" |
49 |
+IUSE="" |
50 |
+ |
51 |
+#RESTRICT="test" |
52 |
+ |
53 |
+pkg_setup() { |
54 |
+ enewgroup ${PN} |
55 |
+ enewuser ${PN} -1 -1 -1 ${PN} |
56 |
+} |
57 |
+ |
58 |
+src_compile() { |
59 |
+ GOPATH="${S}" go build -o bin/${PN} -v ${EGO_PN}/cmd/${PN} || die |
60 |
+} |
61 |
+ |
62 |
+src_install() { |
63 |
+ dobin bin/${PN} |
64 |
+ pushd src/${EGO_PN} || die |
65 |
+ dodoc {README,ROADMAP,CONTRIBUTING}.md |
66 |
+ insinto /etc/${PN} |
67 |
+ doins config.example.yaml |
68 |
+ popd || die |
69 |
+ |
70 |
+ newinitd "${FILESDIR}"/${PN}.initd ${PN} |
71 |
+ newconfd "${FILESDIR}"/${PN}.confd ${PN} |
72 |
+ keepdir /var/log/${PN} |
73 |
+ fowners ${PN}:${PN} /var/log/${PN} |
74 |
+} |
75 |
|
76 |
diff --git a/dev-util/clair/files/clair.confd b/dev-util/clair/files/clair.confd |
77 |
new file mode 100644 |
78 |
index 00000000000..e66675311de |
79 |
--- /dev/null |
80 |
+++ b/dev-util/clair/files/clair.confd |
81 |
@@ -0,0 +1,2 @@ |
82 |
+# arguments for clair config |
83 |
+command_args="-config=/etc/clair/config.yaml" |
84 |
|
85 |
diff --git a/dev-util/clair/files/clair.initd b/dev-util/clair/files/clair.initd |
86 |
new file mode 100644 |
87 |
index 00000000000..b98d295c46b |
88 |
--- /dev/null |
89 |
+++ b/dev-util/clair/files/clair.initd |
90 |
@@ -0,0 +1,24 @@ |
91 |
+#!/sbin/openrc-run |
92 |
+# Copyright 2017 Gentoo Foundation |
93 |
+# Distributed under the terms of the GNU General Public License v2 |
94 |
+ |
95 |
+description="Clair Vulnerability Static Analysis for Containers" |
96 |
+pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"} |
97 |
+user=${user:-${SVCNAME}} |
98 |
+group=${group:-${SVCNAME}} |
99 |
+ |
100 |
+command="/usr/bin/clair" |
101 |
+command_args="${command_args:--config=/etc/clair/config.yaml}" |
102 |
+command_background="true" |
103 |
+start_stop_daemon_args="--user ${user} --group ${group} \ |
104 |
+ --stdout /var/log/${SVCNAME}/${SVCNAME}.log \ |
105 |
+ --stderr /var/log/${SVCNAME}/${SVCNAME}.log" |
106 |
+ |
107 |
+depend() { |
108 |
+ need net |
109 |
+ after net |
110 |
+} |
111 |
+ |
112 |
+start_pre() { |
113 |
+ checkpath -d -m 0755 -o "${user}":"${group}" "${pidfile%/*}" |
114 |
+} |
115 |
|
116 |
diff --git a/dev-util/clair/metadata.xml b/dev-util/clair/metadata.xml |
117 |
new file mode 100644 |
118 |
index 00000000000..aa59e10bd3e |
119 |
--- /dev/null |
120 |
+++ b/dev-util/clair/metadata.xml |
121 |
@@ -0,0 +1,13 @@ |
122 |
+<?xml version="1.0" encoding="UTF-8"?> |
123 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
124 |
+<pkgmetadata> |
125 |
+ <longdescription> |
126 |
+ </longdescription> |
127 |
+ <maintainer type="person"> |
128 |
+ <email>mrueg@g.o</email> |
129 |
+ <name>Manuel Rüger</name> |
130 |
+ </maintainer> |
131 |
+ <upstream> |
132 |
+ <remote-id type="github">coreos/clair</remote-id> |
133 |
+ </upstream> |
134 |
+</pkgmetadata> |