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: sys-auth/google-authenticator-wrappers/
Date: Sun, 19 Aug 2018 08:38:14
Message-Id: 1534667880.36fee0a0b502c1a69b52112f7c61734cc3718505.mgorny@gentoo
1 commit: 36fee0a0b502c1a69b52112f7c61734cc3718505
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 19 08:25:11 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 19 08:38:00 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36fee0a0
7
8 sys-auth/google-authenticator-wrappers: Bump to v3
9
10 sys-auth/google-authenticator-wrappers/Manifest | 1 +
11 .../google-authenticator-wrappers-3.ebuild | 52 ++++++++++++++++++++++
12 2 files changed, 53 insertions(+)
13
14 diff --git a/sys-auth/google-authenticator-wrappers/Manifest b/sys-auth/google-authenticator-wrappers/Manifest
15 index 945f15e26e5..f2260304bad 100644
16 --- a/sys-auth/google-authenticator-wrappers/Manifest
17 +++ b/sys-auth/google-authenticator-wrappers/Manifest
18 @@ -1,2 +1,3 @@
19 DIST google-authenticator-wrappers-1.tar.gz 1379 BLAKE2B b8566281ade004a6b8996b18138754bab0f8ad2c4c23f4481b8a4f511a779a661fa7f1d68d22f43d0a077b9cef6dc5979d6ec522736d66e969db25c38a89062c SHA512 28d85206486c7aef9c1aee6e97e99950dd152c2114ae72c96c0af53debb1108e3d021766349d175cc6e402948f0ecd51a289575ebaa86680010ac50316e0146b
20 DIST google-authenticator-wrappers-2.tar.gz 1615 BLAKE2B 313283bf2672e36883aa21d1520595afab90120ea106ef79e1dd7f2561d4a13f9ccb767ff3496f54eb2943b4a8fb55edce21e9b7f4ba9acb2845a97afbbbabde SHA512 5edcd57a1494fb6750a45396c9c5746dc952a9c7935c15bbae5e9ffce9175c9e1db92ee136ffe9cf513828425ab3dca0d976d1cc82737375b139f646717519cb
21 +DIST google-authenticator-wrappers-3.tar.gz 6128 BLAKE2B a2c2b35a0c780213a6ba2940c05a205a8ccb043b6ff0808eb47a45c7d52da215293ca785c968f26ec99b7a97e770b127b391fb104b85db6c09efd6af31531786 SHA512 471beb9fdc0225d59efef5c24cbfe1beec5fc4916521c4205c8aec5c4b3dfb473e53fbc5ada337cf0118a715aee9f5e045411b6d43c301d94fc08cccdbc889da
22
23 diff --git a/sys-auth/google-authenticator-wrappers/google-authenticator-wrappers-3.ebuild b/sys-auth/google-authenticator-wrappers/google-authenticator-wrappers-3.ebuild
24 new file mode 100644
25 index 00000000000..f1d2f1cb4b3
26 --- /dev/null
27 +++ b/sys-auth/google-authenticator-wrappers/google-authenticator-wrappers-3.ebuild
28 @@ -0,0 +1,52 @@
29 +# Copyright 1999-2018 Gentoo Foundation
30 +# Distributed under the terms of the GNU General Public License v2
31 +
32 +EAPI=6
33 +
34 +inherit cmake-utils eapi7-ver user
35 +
36 +DESCRIPTION="Set of scripts to manage google-auth setup on Gentoo Infra"
37 +HOMEPAGE="https://github.com/mgorny/google-authenticator-wrappers"
38 +SRC_URI="https://github.com/mgorny/google-authenticator-wrappers/archive/v${PV}.tar.gz -> ${P}.tar.gz"
39 +
40 +LICENSE="BSD-2"
41 +SLOT="0"
42 +KEYWORDS="~amd64 ~x86"
43 +IUSE=""
44 +
45 +RDEPEND="sys-auth/google-authenticator"
46 +
47 +pkg_pretend() {
48 + if [[ ${MERGE_TYPE} != buildonly ]]; then
49 + local v
50 + for v in ${REPLACING_VERSIONS}; do
51 + if ver_test "${v}" -lt 3; then
52 + ewarn "google-authenticator-wrappers v3 switches the secret store mechanism"
53 + ewarn "from user-owned files to /var/lib/gauth. To migrate secrets, move"
54 + ewarn "and chown, e.g.:"
55 + ewarn
56 + ewarn " mv /home/myuser/.google_authenticator /var/lib/gauth/myuser"
57 + ewarn " chown gauth /var/lib/gauth/myuser"
58 + ewarn
59 + ewarn "If you do not migrate or reset secrets, second step authentication"
60 + ewarn "will be disabled after the upgrade."
61 + break
62 + fi
63 + done
64 + fi
65 +}
66 +
67 +src_configure() {
68 + local mycmakeargs=(
69 + -DGAUTH_USERNAME=gauth
70 + )
71 +
72 + cmake-utils_src_configure
73 +}
74 +
75 +pkg_preinst() {
76 + enewgroup gauth
77 + enewuser gauth -1 -1 -1 gauth
78 + fowners gauth:gauth /var/lib/gauth /usr/bin/gauthctl /usr/bin/gauth-test
79 + fperms ug+s /usr/bin/gauthctl /usr/bin/gauth-test
80 +}