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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6A50915A7D9 for ; Fri, 17 Mar 2023 22:04:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 304CC2BC306; Fri, 17 Mar 2023 22:04:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0D90B2BC306 for ; Fri, 17 Mar 2023 22:04:48 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 345C5341344 for ; Fri, 17 Mar 2023 22:04:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8FC7B8F5 for ; Fri, 17 Mar 2023 22:04:43 +0000 (UTC) From: "David Seifert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Seifert" Message-ID: <1679090664.fd4e88c55e349b6c18cae294aeb01e0709bc9bdb.soap@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/qmail.eclass X-VCS-Directories: eclass/ X-VCS-Committer: soap X-VCS-Committer-Name: David Seifert X-VCS-Revision: fd4e88c55e349b6c18cae294aeb01e0709bc9bdb X-VCS-Branch: master Date: Fri, 17 Mar 2023 22:04: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: 6515fc22-62c0-4aa1-8382-6787a9c17c54 X-Archives-Hash: edfe3e1c1739e8fdafb956284f0608f9 commit: fd4e88c55e349b6c18cae294aeb01e0709bc9bdb Author: David Seifert gentoo org> AuthorDate: Fri Mar 17 22:04:24 2023 +0000 Commit: David Seifert gentoo org> CommitDate: Fri Mar 17 22:04:24 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd4e88c5 qmail.eclass: remove EAPI 6 Signed-off-by: David Seifert gentoo.org> eclass/qmail.eclass | 59 ++++++++++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass index b647ac5d8e3a..149bfa0c25f3 100644 --- a/eclass/qmail.eclass +++ b/eclass/qmail.eclass @@ -1,18 +1,18 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: qmail.eclass # @MAINTAINER: # Rolf Eike Beer -# @SUPPORTED_EAPIS: 6 7 8 +# @SUPPORTED_EAPIS: 7 8 # @BLURB: common qmail functions -case ${EAPI:-0} in - [678]) ;; +case ${EAPI} in + 7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac -if [[ -z ${_QMAIL_ECLASS} ]] ; then +if [[ -z ${_QMAIL_ECLASS} ]]; then _QMAIL_ECLASS=1 inherit flag-o-matic toolchain-funcs fixheadtails @@ -58,7 +58,7 @@ is_prime() { dospp() { exeinto "${QMAIL_HOME}"/plugins/ - newexe ${1} ${2:-$(basename ${1})} + newexe ${1} ${2:-${1##*/}} } # @FUNCTION: dosupervise @@ -68,7 +68,7 @@ dospp() { dosupervise() { local service=$1 local runfile=${2:-${service}} logfile=${3:-${service}-log} - [[ -z "${service}" ]] && die "no service given" + [[ -z ${service} ]] && die "no service given" dodir ${SUPERVISE_DIR}/${service}{,/log} fperms +t ${SUPERVISE_DIR}/${service}{,/log} @@ -92,16 +92,16 @@ qmail_set_cc() { echo "${cc} ${CFLAGS} ${CPPFLAGS}" > ./conf-cc || die 'Patching conf-cc failed.' echo "${ld} ${LDFLAGS}" > ./conf-ld || die 'Patching conf-ld failed.' - sed -e "s#'ar #'$(tc-getAR) #" -e "s#'ranlib #'$(tc-getRANLIB) #" -i make-makelib.sh + sed -e "s#'ar #'$(tc-getAR) #" -e "s#'ranlib #'$(tc-getRANLIB) #" -i make-makelib.sh || die } genqmail_src_unpack() { - cd "${WORKDIR}" + cd "${WORKDIR}" || die [[ -n ${GENQMAIL_PV} ]] && unpack "${GENQMAIL_F}" } qmail_spp_src_unpack() { - cd "${WORKDIR}" + cd "${WORKDIR}" || die [[ -n ${QMAIL_SPP_PV} ]] && unpack "${QMAIL_SPP_F}" } @@ -109,23 +109,23 @@ qmail_spp_src_unpack() { # @DESCRIPTION: # Unpack common config files, and set built configuration (CFLAGS, LDFLAGS, etc) qmail_src_postunpack() { - cd "${S}" + cd "${S}" || die qmail_set_cc mysplit=${QMAIL_CONF_SPLIT:-23} is_prime ${mysplit} || die "QMAIL_CONF_SPLIT is not a prime number." einfo "Using conf-split value of ${mysplit}." - echo -n ${mysplit} > "${S}"/conf-split + echo -n ${mysplit} > "${S}"/conf-split || die } qmail_src_compile() { - cd "${S}" + cd "${S}" || die emake it man "$@" } qmail_spp_src_compile() { - cd "${GENQMAIL_S}"/spp/ + cd "${GENQMAIL_S}"/spp/ || die emake } @@ -152,6 +152,7 @@ qmail_base_install() { qreceipt sendmail tcp-env # obsolete tools, install if they are still present + local i for i in elq maildirwatch pinq qail qsmhook; do [[ -x ${i} ]] && doexe ${i} done @@ -167,7 +168,6 @@ qmail_base_install() { exeopts -o qmailq -g qmail -m 4711 doexe qmail-queue - ) } @@ -189,7 +189,7 @@ qmail_man_install() { dodoc BLURB* INSTALL* PIC* README* REMOVE* \ SENDMAIL* TEST* THANKS* VERSION* # notqmail converted the files to markdown - if [ -f CHANGES ]; then + if [[ -f CHANGES ]]; then dodoc CHANGES FAQ SECURITY THOUGHTS UPGRADE else dodoc CHANGES.md FAQ.md SECURITY.md THOUGHTS.md UPGRADE.md @@ -225,13 +225,13 @@ qmail_maildir_install() { "${MAILDIRMAKE}" "${D}${QMAIL_HOME}"/alias/.maildir keepdir "${QMAIL_HOME}"/alias/.maildir/{cur,new,tmp} + local i for i in "${QMAIL_HOME}"/alias/.qmail-{mailer-daemon,postmaster,root}; do - if [[ ! -f "${ROOT}${i}" ]]; then + if [[ ! -f ${ROOT}${i} ]]; then touch "${D}${i}" fowners alias:qmail "${i}" fi done - ) } @@ -240,7 +240,7 @@ qmail_tcprules_install() { insinto "${TCPRULES_DIR}" doins "${GENQMAIL_S}"/tcprules/Makefile.qmail doins "${GENQMAIL_S}"/tcprules/tcp.qmail-* - rm -f "${D}${TCPRULES_DIR}"/tcp.qmail-pop3sd + rm -f "${D}${TCPRULES_DIR}"/tcp.qmail-pop3sd || die } qmail_supervise_install_one() { @@ -255,8 +255,9 @@ qmail_supervise_install_one() { qmail_supervise_install() { einfo "Installing supervise scripts" - cd "${GENQMAIL_S}"/supervise + cd "${GENQMAIL_S}"/supervise || die + local i for i in qmail-{send,smtpd,qmtpd,qmqpd}; do qmail_supervise_install_one ${i} done @@ -273,6 +274,7 @@ qmail_spp_install() { einfo "Installing qmail-spp plugins" keepdir "${QMAIL_HOME}"/plugins/ + local i for i in authlog mfdnscheck ifauthnext tarpit; do dospp "${GENQMAIL_S}"/spp/${i} done @@ -330,7 +332,7 @@ qmail_queue_setup() { qmail_rootmail_fixup() { local TMPCMD="ln -sf ${QMAIL_HOME}/alias/.maildir/ ${ROOT}/root/.maildir" - if [[ -d "${ROOT}"/root/.maildir && ! -L "${ROOT}"/root/.maildir ]] ; then + if [[ -d ${ROOT}/root/.maildir && ! -L ${ROOT}/root/.maildir ]] ; then elog "Previously the qmail ebuilds created /root/.maildir/ but not" elog "every mail was delivered there. If the directory does not" elog "contain any mail, please delete it and run:" @@ -343,13 +345,14 @@ qmail_rootmail_fixup() { } qmail_tcprules_build() { + local f for f in tcp.qmail-{smtp,qmtp,qmqp,pop3}; do # please note that we don't check if it exists # as we want it to make the cdb files anyway! - src="${ROOT}${TCPRULES_DIR}/${f}" - cdb="${ROOT}${TCPRULES_DIR}/${f}.cdb" - tmp="${ROOT}${TCPRULES_DIR}/.${f}.tmp" - [[ -e "${src}" ]] && tcprules "${cdb}" "${tmp}" < "${src}" + local src="${ROOT}${TCPRULES_DIR}/${f}" + local cdb="${ROOT}${TCPRULES_DIR}/${f}.cdb" + local tmp="${ROOT}${TCPRULES_DIR}/.${f}.tmp" + [[ -e ${src} ]] && tcprules "${cdb}" "${tmp}" < "${src}" done } @@ -382,10 +385,10 @@ qmail_supervise_config_notice() { } qmail_config_fast() { - if [[ ${ROOT} = / ]]; then + if [[ -z ${ROOT} ]]; then local host=$(hostname --fqdn) - if [[ -z "${host}" ]]; then + if [[ -z ${host} ]]; then eerror eerror "Cannot determine your fully-qualified hostname" eerror "Please setup your /etc/hosts as described in" @@ -394,7 +397,7 @@ qmail_config_fast() { die "cannot determine FQDN" fi - if [[ ! -f "${ROOT}${QMAIL_HOME}"/control/me ]]; then + if [[ ! -f ${ROOT}${QMAIL_HOME}/control/me ]]; then "${ROOT}${QMAIL_HOME}"/bin/config-fast ${host} fi else