From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A9C9613933E for ; Tue, 20 Jul 2021 19:03:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E6D7DE0AC5; Tue, 20 Jul 2021 19:03:48 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C5EABE0AC6 for ; Tue, 20 Jul 2021 19:03:48 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E4553342BF2 for ; Tue, 20 Jul 2021 19:03:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9BDC884C for ; Tue, 20 Jul 2021 19:03:43 +0000 (UTC) From: "Conrad Kostecki" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Conrad Kostecki" Message-ID: <1626807795.4e101bb9887a0700d289bd40ef754b9a54be24a1.conikost@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-auth/google-authenticator-wrappers/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-auth/google-authenticator-wrappers/google-authenticator-wrappers-3-r1.ebuild X-VCS-Directories: sys-auth/google-authenticator-wrappers/ X-VCS-Committer: conikost X-VCS-Committer-Name: Conrad Kostecki X-VCS-Revision: 4e101bb9887a0700d289bd40ef754b9a54be24a1 X-VCS-Branch: master Date: Tue, 20 Jul 2021 19:03:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 4a65abad-6af9-4381-a992-8164b3448940 X-Archives-Hash: de6acb5152668160dd20e85f36d801c5 commit: 4e101bb9887a0700d289bd40ef754b9a54be24a1 Author: Conrad Kostecki gentoo org> AuthorDate: Tue Jul 20 18:59:33 2021 +0000 Commit: Conrad Kostecki gentoo org> CommitDate: Tue Jul 20 19:03:15 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4e101bb9 sys-auth/google-authenticator-wrappers: migrate to GLEP 81 Bug: https://bugs.gentoo.org/781488 Closes: https://github.com/gentoo/gentoo/pull/21706 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Conrad Kostecki gentoo.org> .../google-authenticator-wrappers-3-r1.ebuild | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/sys-auth/google-authenticator-wrappers/google-authenticator-wrappers-3-r1.ebuild b/sys-auth/google-authenticator-wrappers/google-authenticator-wrappers-3-r1.ebuild new file mode 100644 index 00000000000..6a1d10c36f6 --- /dev/null +++ b/sys-auth/google-authenticator-wrappers/google-authenticator-wrappers-3-r1.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake + +DESCRIPTION="Set of scripts to manage google-auth setup on Gentoo Infra" +HOMEPAGE="https://github.com/mgorny/google-authenticator-wrappers" +SRC_URI="https://github.com/mgorny/google-authenticator-wrappers/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND=" + acct-group/gauth + acct-user/gauth +" +RDEPEND=" + ${DEPEND} + sys-auth/google-authenticator +" + +pkg_pretend() { + if [[ ${MERGE_TYPE} != buildonly ]]; then + local v + for v in ${REPLACING_VERSIONS}; do + if ver_test "${v}" -lt 3; then + ewarn "google-authenticator-wrappers v3 switches the secret store mechanism" + ewarn "from user-owned files to /var/lib/gauth. To migrate secrets, move" + ewarn "and chown, e.g.:" + ewarn + ewarn " mv /home/myuser/.google_authenticator /var/lib/gauth/myuser" + ewarn " chown gauth /var/lib/gauth/myuser" + ewarn + ewarn "If you do not migrate or reset secrets, second step authentication" + ewarn "will be disabled after the upgrade." + break + fi + done + fi +} + +src_configure() { + local mycmakeargs=( + -DGAUTH_USERNAME=gauth + ) + + cmake_src_configure +} + +pkg_preinst() { + fowners gauth:gauth /var/lib/gauth /usr/bin/gauthctl /usr/bin/gauth-test + fperms ug+s /usr/bin/gauthctl /usr/bin/gauth-test +}