From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 20 21:01:41 2021 Received: (at 49672) by debbugs.gnu.org; 21 Jul 2021 01:01:41 +0000 Received: from localhost ([127.0.0.1]:35765 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m60cH-00007j-00 for submit@debbugs.gnu.org; Tue, 20 Jul 2021 21:01:41 -0400 Received: from mx.kolabnow.com ([95.128.36.42]:46654) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m60cF-00007A-Qs for 49672@debbugs.gnu.org; Tue, 20 Jul 2021 21:01:40 -0400 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out002.mykolab.com (Postfix) with ESMTP id 489B8998 for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :references:in-reply-to:message-id:date:date:subject:subject :from:from:received:received:received; s=dkim20160331; t= 1626829293; x=1628643694; bh=Eon/idi5y3gj5ZKZmx/KKYPfEF2gcOTgCg+ 5H0aBNQA=; b=0K7QI+CeNCULGsv7cn86mdH0T7Jj9GKr6Yc2hmZ0GdPTjtt7StV aCPw/EFui6cKcSvbygFVBeQNwHDlWgniodw2osbPnc4kG9pB3rrC6cTP1qRsh2TX XQtvj1kyXshmV4nSzF/VtbmV44T5w0lFA4RBEdXv1MZFCWIaE1kyPrRlwy0tFt9K ZVaLlIPQuD7OTxvMimhUQQFkw+D5mcY466HWvuW0ZaOxF9N9DLNW2rHcB0GMksgp ONw26J/iq9SsbRCuiF7GmppcbTjHBjryPjZdXRXahQHJSStBr+4oxxAPnf6RMVSa g/1LD+ze14coDgiL40G9vn+2LyBFD7L00XXzQ/Q3FdSFban+OFrTOIbdb7slLAMk F6AnuWCeIQ3pmc7CsCPA8OPRg0+TXKOiBrL+isjx3D/6/QDha98gDcdtz9lF8i0H k00GVH3BZMnWKzu7RIsdfNbxDMoT8REs1oZRXL5qaDbEvJjChIygUxfsA2ujyaJm a92m8+OTlFlC5ceiQuvFbEt6pem9v7qLak9S7oSwh0XIU+uolN5G4Xa5Nl89WIB6 rh/ZCmc7W+hgrLa/xTh6dx7OBtYY/bTbO0QCareChCS7FDKeRA38vDCXD6xUaEIs 14dKAunZZhpAZIJEGi4Ub3NsbMyxZpZ1f3mqRfEUPjBRArNHz1qxF+C4= X-Virus-Scanned: amavisd-new at mykolab.com X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-10 required=5 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out002.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RzWlPdRIhTAS for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:33 +0200 (CEST) Received: from int-mx002.mykolab.com (unknown [10.9.13.2]) by ext-mx-out002.mykolab.com (Postfix) with ESMTPS id A657FD3 for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:33 +0200 (CEST) Received: from ext-subm003.mykolab.com (unknown [10.9.6.3]) by int-mx002.mykolab.com (Postfix) with ESMTPS id BB40E4337; Wed, 21 Jul 2021 03:01:32 +0200 (CEST) From: Thiago Jung Bauermann To: 49672@debbugs.gnu.org Subject: [PATCH 6/9] gnu: Fix GNU/Linux system detection Date: Tue, 20 Jul 2021 22:00:40 -0300 Message-Id: <20210721010043.632012-6-bauermann@kolabnow.com> In-Reply-To: <20210721010043.632012-1-bauermann@kolabnow.com> References: <20210721010043.632012-1-bauermann@kolabnow.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 49672 Cc: Thiago Jung Bauermann X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) The current code isn’t strictly correct because the GNU triplet in ‘%current-target-system’ could end in “linux-gnu”. Instead, check whether either of the system identifiers contain the string “-linux”. * gnu/packages/messaging.scm (ngircd)[inputs]: Use ‘string-contains’. [arguments]<#:configure-flags>: Likewise. * gnu/packages/ntp.scm (ntp)[inputs]: Likewise --- gnu/packages/messaging.scm | 12 ++++++------ gnu/packages/ntp.scm | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index e5ecdb889441..f18de2a1295d 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -781,17 +781,17 @@ dictionaries. HexChat can be extended with multiple addons.") (inputs `(("zlib" ,zlib) ("libwrap" ,tcp-wrappers) ("gnutls" ,gnutls) - ,@(if (string-suffix? "-linux" - (or (%current-target-system) - (%current-system))) + ,@(if (string-contains (or (%current-target-system) + (%current-system)) + "-linux") `(("linux-pam" ,linux-pam)) '()))) (arguments `(#:configure-flags '("--with-gnutls" "--with-iconv" "--enable-ipv6" "--with-tcp-wrappers" - ,@(if (string-suffix? "-linux" - (or (%current-target-system) - (%current-system))) + ,@(if (string-contains (or (%current-target-system) + (%current-system)) + "-linux") '("--with-pam") '())) #:phases diff --git a/gnu/packages/ntp.scm b/gnu/packages/ntp.scm index 191eedd15875..de501199596c 100644 --- a/gnu/packages/ntp.scm +++ b/gnu/packages/ntp.scm @@ -154,8 +154,8 @@ time-stamping or reference clock, sub-microsecond accuracy is possible.") ("libevent" ,libevent) ;; Build with POSIX capabilities support on GNU/Linux. This allows 'ntpd' ;; to run as non-root (when invoked with '-u'.) - ,@(if (string-suffix? "-linux" - (or (%current-target-system) (%current-system))) + ,@(if (string-contains (or (%current-target-system) (%current-system)) + "-linux") `(("libcap" ,libcap)) '()))) (arguments