Diff google-authenticator-wrappers-2 with a google-authenticator-wrappers-3-r1

/usr/portage/sys-auth/google-authenticator-wrappers/google-authenticator-wrappers-3-r1.ebuild 2023-10-09 14:52:35.424368500 +0300
12 12
LICENSE="BSD-2"
13 13
SLOT="0"
14 14
KEYWORDS="~amd64 ~x86"
15
IUSE=""
16 15

  
17
RDEPEND="sys-auth/google-authenticator"
16
DEPEND="
17
	acct-group/gauth
18
	acct-user/gauth
19
"
20
RDEPEND="
21
	${DEPEND}
22
	sys-auth/google-authenticator
23
"
24

  
25
pkg_pretend() {
26
	if [[ ${MERGE_TYPE} != buildonly ]]; then
27
		local v
28
		for v in ${REPLACING_VERSIONS}; do
29
			if ver_test "${v}" -lt 3; then
30
				ewarn "google-authenticator-wrappers v3 switches the secret store mechanism"
31
				ewarn "from user-owned files to /var/lib/gauth.  To migrate secrets, move"
32
				ewarn "and chown, e.g.:"
33
				ewarn
34
				ewarn "  mv /home/myuser/.google_authenticator /var/lib/gauth/myuser"
35
				ewarn "  chown gauth /var/lib/gauth/myuser"
36
				ewarn
37
				ewarn "If you do not migrate or reset secrets, second step authentication"
38
				ewarn "will be disabled after the upgrade."
39
				break
40
			fi
41
		done
42
	fi
43
}
44

  
45
src_configure() {
46
	local mycmakeargs=(
47
		-DGAUTH_USERNAME=gauth
48
	)
49

  
50
	cmake_src_configure
51
}
52

  
53
pkg_preinst() {
54
	fowners gauth:gauth /var/lib/gauth /usr/bin/gauthctl /usr/bin/gauth-test
55
	fperms ug+s /usr/bin/gauthctl /usr/bin/gauth-test
56
}
Thank you!