Gentoo Archives: gentoo-commits

From: Eray Aslan <eras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Thu, 16 Sep 2021 06:33:59
Message-Id: 1631773998.9d7833fd1183835c4bb39bfa208e9a21b464ae82.eras@gentoo
1 commit: 9d7833fd1183835c4bb39bfa208e9a21b464ae82
2 Author: Eray Aslan <eras <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 15 06:23:43 2021 +0000
4 Commit: Eray Aslan <eras <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 16 06:33:18 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d7833fd
7
8 ssl-cert.eclass: add EAPI 8 support
9
10 - drop support for EAPI < 6
11 - add guard
12
13 Signed-off-by: Eray Aslan <eras <AT> gentoo.org>
14
15 eclass/ssl-cert.eclass | 22 ++++++++++------------
16 1 file changed, 10 insertions(+), 12 deletions(-)
17
18 diff --git a/eclass/ssl-cert.eclass b/eclass/ssl-cert.eclass
19 index 36945be3cd6..9d01fd10f50 100644
20 --- a/eclass/ssl-cert.eclass
21 +++ b/eclass/ssl-cert.eclass
22 @@ -6,7 +6,7 @@
23 # maintainer-needed@g.o
24 # @AUTHOR:
25 # Max Kalika <max@g.o>
26 -# @SUPPORTED_EAPIS: 1 2 3 4 5 6 7
27 +# @SUPPORTED_EAPIS: 6 7 8
28 # @BLURB: Eclass for SSL certificates
29 # @DESCRIPTION:
30 # This eclass implements a standard installation procedure for installing
31 @@ -14,18 +14,14 @@
32 # @EXAMPLE:
33 # "install_cert /foo/bar" installs ${ROOT}/foo/bar.{key,csr,crt,pem}
34
35 -# Guard against unsupported EAPIs. We need EAPI >= 1 for slot dependencies.
36 -case "${EAPI:-0}" in
37 - 0)
38 - die "${ECLASS}.eclass: EAPI=0 is not supported. Please upgrade to EAPI >= 1."
39 - ;;
40 - 1|2|3|4|5|6|7)
41 - ;;
42 - *)
43 - die "${ECLASS}.eclass: EAPI=${EAPI} is not supported yet."
44 - ;;
45 +case "${EAPI}" in
46 + 6|7|8) ;;
47 + *) die "EAPI=${EAPI:-0} is not supported" ;;
48 esac
49
50 +if [[ ! ${_SSL_CERT_ECLASS} ]]; then
51 +_SSL_CERT_ECLASS=1
52 +
53 # @ECLASS-VARIABLE: SSL_CERT_MANDATORY
54 # @PRE_INHERIT
55 # @DESCRIPTION:
56 @@ -53,7 +49,7 @@ if [[ "${SSL_DEPS_SKIP}" == "0" ]]; then
57 fi
58
59 case "${EAPI}" in
60 - 1|2|3|4|5|6)
61 + 6)
62 DEPEND="${SSL_DEPEND}"
63 ;;
64 *)
65 @@ -283,3 +279,5 @@ install_cert() {
66 ewarn "Some requested certificates were not generated"
67 fi
68 }
69 +
70 +fi