Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/docker-credential-helpers/
Date: Fri, 03 May 2019 07:15:58
Message-Id: 1556867739.00581305676b1b485a95d24af7d9a656c8c74f65.mgorny@gentoo
1 commit: 00581305676b1b485a95d24af7d9a656c8c74f65
2 Author: Rafael Kitover <rkitover <AT> gmail <DOT> com>
3 AuthorDate: Thu May 2 22:20:48 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri May 3 07:15:39 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00581305
7
8 app-emulation/docker-credential-helpers: new package
9
10 New ebuild for docker-credential-helpers, which has helper programs for
11 docker to store your password and other sensitive information.
12
13 This ebuild builds either docker-credential-secretservice, which uses
14 the D-Bus secret service API to talk to either kwallet or gnome-keyring;
15 or docker-credential-pass which relies on the pass utility; or both
16 depending on USE flags.
17
18 The supported USE flags are:
19
20 - 'gnome-keyring': build secretservice helper
21
22 - 'pass': build pass helper
23
24 A message is printed via elog() upon successful merge about how to use
25 the helper with docker.
26
27 Signed-off-by: Rafael Kitover <rkitover <AT> gmail.com>
28 Closes: https://github.com/gentoo/gentoo/pull/9805
29 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
30
31 app-emulation/docker-credential-helpers/Manifest | 1 +
32 .../docker-credential-helpers-0.6.0.ebuild | 58 ++++++++++++++++++++++
33 .../docker-credential-helpers/metadata.xml | 27 ++++++++++
34 3 files changed, 86 insertions(+)
35
36 diff --git a/app-emulation/docker-credential-helpers/Manifest b/app-emulation/docker-credential-helpers/Manifest
37 new file mode 100644
38 index 00000000000..487217d743a
39 --- /dev/null
40 +++ b/app-emulation/docker-credential-helpers/Manifest
41 @@ -0,0 +1 @@
42 +DIST docker-credential-helpers-0.6.0.tar.gz 27441 BLAKE2B 6517f069782d5a496d3f140d86e5b1f32f197e9209ed61f75bfb9ba29cf0e1fa509bdbbbce2defc14ad0abe316632683cfad25e7ac9a6a1d70c3289e0ad489f5 SHA512 359e8ec700f423ce0687f13ce02946007f90456abe86659a87c59419ebde5e79adb4d28ee5e6a9762a44cfd65648c247629a5273326abf18a8880bee637e74d8
43
44 diff --git a/app-emulation/docker-credential-helpers/docker-credential-helpers-0.6.0.ebuild b/app-emulation/docker-credential-helpers/docker-credential-helpers-0.6.0.ebuild
45 new file mode 100644
46 index 00000000000..d1223733ba0
47 --- /dev/null
48 +++ b/app-emulation/docker-credential-helpers/docker-credential-helpers-0.6.0.ebuild
49 @@ -0,0 +1,58 @@
50 +# Copyright 2001-2018 Gentoo Foundation
51 +# Distributed under the terms of the GNU General Public License v2
52 +
53 +EAPI=7
54 +
55 +DESCRIPTION="A suite of programs to use native stores to keep Docker credentials safe"
56 +HOMEPAGE="https://github.com/docker/docker-credential-helpers"
57 +EGO_PN=github.com/docker/docker-credential-helpers
58 +
59 +LICENSE="MIT"
60 +SLOT="0"
61 +
62 +if [[ ${PV} = *9999* ]]; then
63 + inherit golang-vcs
64 +else
65 + KEYWORDS="~amd64"
66 + EGIT_COMMIT="v${PV}"
67 + SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
68 + inherit golang-vcs-snapshot
69 +fi
70 +inherit golang-build
71 +
72 +IUSE="gnome-keyring pass"
73 +REQUIRED_USE="|| ( gnome-keyring pass )"
74 +RESTRICT="test"
75 +
76 +DEPEND="gnome-keyring? ( app-crypt/libsecret )"
77 +
78 +RDEPEND="(
79 + ${DEPEND}
80 + pass? ( app-admin/pass )
81 +)
82 +"
83 +
84 +S=${WORKDIR}/${P}/src/${EGO_PN}
85 +
86 +src_compile() {
87 + local -x GOPATH="${WORKDIR}/${P}"
88 + use gnome-keyring && emake secretservice
89 + use pass && emake pass
90 +}
91 +
92 +src_install() {
93 + dobin bin/*
94 + dodoc CHANGELOG.md MAINTAINERS README.md
95 +}
96 +
97 +pkg_postinst() {
98 + if use gnome-keyring; then
99 + elog "For gnome-keyring/kwallet add:\n"
100 + elog ' "credStore": "secretservice"'"\n"
101 + fi
102 + if use pass; then
103 + elog "For 'pass' add:\n"
104 + elog ' "credStore": "pass"'"\n"
105 + fi
106 + elog "to your ~/.docker/config.json"
107 +}
108
109 diff --git a/app-emulation/docker-credential-helpers/metadata.xml b/app-emulation/docker-credential-helpers/metadata.xml
110 new file mode 100644
111 index 00000000000..1e58ef54d4d
112 --- /dev/null
113 +++ b/app-emulation/docker-credential-helpers/metadata.xml
114 @@ -0,0 +1,27 @@
115 +<?xml version="1.0" encoding="UTF-8"?>
116 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
117 +<pkgmetadata>
118 + <longdescription>
119 + A suite of programs to use native stores to keep Docker credentials
120 + safe. Currently provides docker-credential-secretservice to use the
121 + D-Bus secret service APIs, and docker-credential-pass to use the
122 + pass framework.
123 + </longdescription>
124 + <maintainer type="person">
125 + <email>rkitover@×××××.com</email>
126 + <name>Rafael Kitover</name>
127 + </maintainer>
128 + <maintainer type="project">
129 + <email>proxy-maint@g.o</email>
130 + <name>Proxy Maintainers</name>
131 + </maintainer>
132 + <use>
133 + <flag name="gnome-keyring">
134 + Build secretservice helper which works with gnome-keyring or kwallet
135 + using D-Bus.
136 + </flag>
137 + <flag name="pass">
138 + Build pass helper for the pass utility.
139 + </flag>
140 + </use>
141 +</pkgmetadata>