commit: 4e101bb9887a0700d289bd40ef754b9a54be24a1 Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> AuthorDate: Tue Jul 20 18:59:33 2021 +0000 Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> 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 <conikost <AT> 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 +}
