• [gentoo-dev] [PATCH] ssl-cert.eclass: EAPI 8 support and add guard

    From Eray Aslan@21:1/5 to All on Tue Sep 14 15:50:02 2021
    ---
    eclass/ssl-cert.eclass | 9 +++++++--
    1 file changed, 7 insertions(+), 2 deletions(-)

    diff --git a/eclass/ssl-cert.eclass b/eclass/ssl-cert.eclass
    index 36945be3cd6..e5dfbbb141c 100644
    --- a/eclass/ssl-cert.eclass
    +++ b/eclass/ssl-cert.eclass
    @@ -6,7 +6,7 @@
    # maintainer-needed@gentoo.org
    # @AUTHOR:
    # Max Kalika <max@gentoo.org>
    -# @SUPPORTED_EAPIS: 1 2 3 4 5 6 7
    +# @SUPPORTED_EAPIS: 1 2 3 4 5 6 7 8
    # @BLURB: Eclass for SSL certificates
    # @DESCRIPTION:
    # This eclass implements a standard installation procedure for installing
    @@ -19,13 +19,15 @@ case "${EAPI:-0}" in
    0)
    die "${ECLASS}.eclass: EAPI=0 is not supported. Please upgrade to EAPI >= 1."
    ;;
    - 1|2|3|4|5|6|7)
    + 1|2|3|4|5|6|7|8)
    ;;
    *)
    die "${ECLASS}.eclass: EAPI=${EAPI} is not supported yet."
    ;;
    esac

    +if [[ ! ${_SSL_CERT_ECLASS} ]]; then
    +
    # @ECLASS-VARIABLE: SSL_CERT_MANDATORY
    # @PRE_INHERIT
    # @DESCRIPTION:
    @@ -283,3 +285,6 @@ install_cert() {
    ewarn "Some requested certificates we
  • From David Seifert@21:1/5 to Eray Aslan on Tue Sep 14 16:00:01 2021
    On Tue, 2021-09-14 at 16:47 +0300, Eray Aslan wrote:
    ---
     eclass/ssl-cert.eclass | 9 +++++++--
     1 file changed, 7 insertions(+), 2 deletions(-)

    diff --git a/eclass/ssl-cert.eclass b/eclass/ssl-cert.eclass
    index 36945be3cd6..e5dfbbb141c 100644
    --- a/eclass/ssl-cert.eclass
    +++ b/eclass/ssl-cert.eclass
    @@ -6,7 +6,7 @@
     # maintainer-needed@gentoo.org
     # @AUTHOR:
     # Max Kalika <max@gentoo.org>
    -# @SUPPORTED_EAPIS: 1 2 3 4 5 6 7
    +# @SUPPORTED_EAPIS: 1 2 3 4 5 6 7 8
     # @BLURB: Eclass for SSL certificates
     # @DESCRIPTION:
     # This eclass implements a standard installation procedure for
    installing
    @@ -19,13 +19,15 @@ case "${EAPI:-0}" in
            0)
                    die "${ECLASS}.eclass: EAPI=0 is not supported. 
    Please upgrade to EAPI >= 1."
                    ;;
    -       1|2|3|4|5|6|7)
    +       1|2|3|4|5|6|7|8)
                    ;;
            *)
                    die "${ECLASS}.eclass: EAPI=${EAPI} is not supported
    yet."
                    ;;
     esac
     
    +if [[ ! ${_SSL_CERT_ECLASS} ]]; then
    +
     # @ECLASS-VARIABLE: SSL_CERT_MANDATORY
     # @PRE_INHERIT
     # @DESCRIPTION:
    @@ -283,3 +285,6 @@ install_cert() {
                    ewarn "Some requested certificates were not generated"
            fi
     }
    +
    +_SSL_CERT_ECLASS=1
    +fi

    Please remove support for EAPIs < 6.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eray Aslan@21:1/5 to All on Tue Sep 14 19:00:02 2021
    Thank you for the comment. Dropped EAPI < 6 support.

    Signed-off-by: Eray Aslan <eras@gentoo.org>
    ---
    eclass/ssl-cert.eclass | 17 +++++------------
    1 file changed, 5 insertions(+), 12 deletions(-)

    diff --git a/eclass/ssl-cert.eclass b/eclass/ssl-cert.eclass
    index e5dfbbb141c..428956a4290 100644
    --- a/eclass/ssl-cert.eclass
    +++ b/eclass/ssl-cert.eclass
    @@ -6,7 +6,7 @@
    # maintainer-needed@gentoo.org
    # @AUTHOR:
    # Max Kalika <max@gentoo.org>
    -# @SUPPORTED_EAPIS: 1 2 3 4 5 6 7 8
    +# @SUPPORTED_EAPIS: 6 7 8
    # @BLURB: Eclass for SSL certificates
    # @DESCRIPTION:
    # This eclass implements a standard installation procedure for installing
    @@ -14,16 +14,9 @@
    # @EXAMPLE:
    # "install_cert /foo/bar" installs ${ROOT}/foo/bar.{key,csr,crt,pem}

    -# Guard against unsupported EAPIs. We need EAPI >= 1 for slot dependencies. -case "${EAPI:-0}" in
    - 0)
    - die "${ECLASS}.eclass: EAPI=0 is not supported. Please upgrade to EAPI >= 1."
    - ;;
    - 1|2|3|4|5|6|7|8)
    - ;;
    - *)
    - die "${ECLASS}.eclass: EAPI=${EAPI} is not supported yet."
    - ;;
    +case "${EAPI}" in
    + 6|7|8) ;;
    + *) die "EAPI=${EAPI
  • From Ulrich Mueller@21:1/5 to All on Tue Sep 14 21:00:02 2021
    On Tue, 14 Sep 2021, Eray Aslan wrote:

    +if [[ ! ${_SSL_CERT_ECLASS} ]]; then
    +
    # @ECLASS-VARIABLE: SSL_CERT_MANDATORY
    # @PRE_INHERIT
    # @DESCRIPTION:
    @@ -283,3 +285,6 @@ install_cert() {
    ewarn "Some requested certificates were not generated"
    fi
    }
    +
    +_SSL_CERT_ECLASS=1

    Please make this the first statement in the "if" block. (At the moment
    it doesn't matter, but it's less error prone in case another eclass will
    be inherited later.)

    -----BEGIN PGP SIGNATURE-----

    iQFDBAEBCAAtFiEEtDnZ1O9xIP68rzDbUYgzUIhBXi4FAmFA8L0PHHVsbUBnZW50 b28ub3JnAAoJEFGIM1CIQV4udVQH/1n3bl9v+zhlFy9icM+g2CKAgTs9w1trwJTL HwOPkpqxiS+mNjGsLI7J2AU9JM/RzBlcCkA8atH9Pjy8w7fcAU18hukAQ3IUgq7N ETfNUFzQ6iu1fUbX98vKmZlIZNznAXJiaNDJK5x4QbEPLXnpcKFz+h/etzrhkt7f kpKwluiHFq4wZiIBoo02WI2LbH7ulrhz9mIBstaMqgYtdfHE+jzBTA1RiyAuA30q oyfnajhpA1m/qer0ueYSURpCn66WIljRoAKh1a2kcxaTbRLLRzArnEI8WdYVM79z H/Xn9BDWjjZwTKL5jjV5BVp070hMibH4DWxzFjnyKY1HiAW8sVE=
    =3cPL
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)