From patchwork Tue Mar 8 14:36:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 37649 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9BB7027BBEA; Tue, 8 Mar 2022 14:37:12 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 01D7A27BBE9 for ; Tue, 8 Mar 2022 14:37:12 +0000 (GMT) Received: from localhost ([::1]:34190 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRaxb-00060d-5T for patchwork@mira.cbaines.net; Tue, 08 Mar 2022 09:37:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59092) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRaxS-0005zg-Op for guix-patches@gnu.org; Tue, 08 Mar 2022 09:37:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:33501) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRaxS-0005Nj-G5 for guix-patches@gnu.org; Tue, 08 Mar 2022 09:37:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nRaxS-0001rc-A6 for guix-patches@gnu.org; Tue, 08 Mar 2022 09:37:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54235] [PATCH v3 1/4] gnu: docbook-xml-4.1.2: Install an XML catalog file. References: <20220303135326.28867-1-maxim.cournoyer@gmail.com> In-Reply-To: <20220303135326.28867-1-maxim.cournoyer@gmail.com> Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 08 Mar 2022 14:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54235 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54235@debbugs.gnu.org Cc: maximedevos@telenet.be, Maxim Cournoyer Received: via spool by 54235-submit@debbugs.gnu.org id=B54235.16467501847070 (code B ref 54235); Tue, 08 Mar 2022 14:37:02 +0000 Received: (at 54235) by debbugs.gnu.org; 8 Mar 2022 14:36:24 +0000 Received: from localhost ([127.0.0.1]:55622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRawq-0001py-GE for submit@debbugs.gnu.org; Tue, 08 Mar 2022 09:36:24 -0500 Received: from mail-qv1-f52.google.com ([209.85.219.52]:36774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRawo-0001ph-8A for 54235@debbugs.gnu.org; Tue, 08 Mar 2022 09:36:23 -0500 Received: by mail-qv1-f52.google.com with SMTP id eq14so8805093qvb.3 for <54235@debbugs.gnu.org>; Tue, 08 Mar 2022 06:36:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=P0iUHZcyzaGrE6mqI1mcLkmFPkpFJBn+Z4UC+oDsf6k=; b=AmjUJkJ7Hb3wUxjNLmpO54NmXTNLSdUnWJTwkR7wSrHr2WKYkTKGXe7U5H4Cnc/ai0 uVOiyCLoR3gTva88TZXRy5DRz9/R/fEoE793HMJGLK9sgIGXdOEtXGzMPorW/4snX6tY EQinYkNpdFKb0E6yg7hrl5EHds2IhSfPUGKQzP6PohVqJTzkt2cjEgj1tbDJjcAYgBQj jVl4bYbmXI7HMLnLhSVZrU3t27S2P/4gzVxJyZuhOppQ6Re2YKOYxxMbvJEEhwSLvsTu +cWgb+T1dO4v2zOqAcVZFkC0i+WXbXIjGw3biZH9rdL8LsT38++In3JVK0AmcqsHpj94 lmFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=P0iUHZcyzaGrE6mqI1mcLkmFPkpFJBn+Z4UC+oDsf6k=; b=4p6bU5CEFfo64VeMhPd5uO0+gu0VS0OrJ9b6XaT3GznNbGnNOJxbgFmubeavPZNeGh bZPN5dwNjRhPYF4Ul92jZMERr1lYR5P1Zd03SyLOcf6r4zbYLTr9np4xHowjS9xI2y0k ulCXKdf6mdt+kpxEI8k4QCS2B29RHgkzl4XJ/rkg53eYSKi2p5L8vgr265iROyJ+CeD9 6nBMLZkuSCzsKC93IZIhMyX2tdlvIsgD8kIcim99RuhoxsMQ97cTsbemuUxny3IdciMt Vx6QmicqUzRrfeuyCvJWdo/SgMn5SPYUu60Nk57q7Ja/GLTPQtQcRd6lyFgPa4d+goE4 uCtw== X-Gm-Message-State: AOAM53218BqGvRPuA+Jj4TEMPSDkkYqdiijWFdbQ6O6V9NriInRN47Fj OB2A8N+uPQo+nFjlGgxmjtC3g9arWYY= X-Google-Smtp-Source: ABdhPJzY45kV49VadwfJavO/0BMlUaBaIZWv+zKtwrVZHdJcHggJ8BmRL/vbJq2BBdPR1/i0FRf8IQ== X-Received: by 2002:a05:6214:248b:b0:435:3fa1:5a82 with SMTP id gi11-20020a056214248b00b004353fa15a82mr12088674qvb.25.1646750176229; Tue, 08 Mar 2022 06:36:16 -0800 (PST) Received: from localhost.localdomain (dsl-205-151-56-54.b2b2c.ca. [205.151.56.54]) by smtp.gmail.com with ESMTPSA id e9-20020ac85989000000b002de2bfc8f94sm10338847qte.88.2022.03.08.06.36.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 06:36:15 -0800 (PST) From: Maxim Cournoyer Date: Tue, 8 Mar 2022 09:36:04 -0500 Message-Id: <20220308143607.7449-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/docbook.scm (docbook-xml-4.1.2)[builder]: Generate a catalog file. [native-inputs]: Add libxml2. --- gnu/packages/docbook.scm | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index 6575bf2d75..0a8d2e2aed 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -4,7 +4,7 @@ ;;; Copyright © 2016 Mathieu Lirzin ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2020 Marius Bakke -;;; Copyright © 2021 Maxim Cournoyer +;;; Copyright © 2021, 2022 Maxim Cournoyer ;;; Copyright © 2021 Mark H Weaver ;;; Copyright © 2021 Efraim Flashner ;;; Copyright © 2021 Andrew Whatson @@ -153,7 +153,8 @@ (define-public docbook-xml-4.2 "18hgwvmywh6a5jh38szjmg3hg2r4v5lb6r3ydc3rd8cp9wg61i5c")))))) (define-public docbook-xml-4.1.2 - (package (inherit docbook-xml) + (package + (inherit docbook-xml) (version "4.1.2") (source (origin (method url-fetch) @@ -167,13 +168,22 @@ (define-public docbook-xml-4.1.2 #:builder (begin (use-modules (guix build utils)) - (let ((source (assoc-ref %build-inputs "source")) - (unzip (string-append (assoc-ref %build-inputs "unzip") - "/bin/unzip")) - (dtd (string-append (assoc-ref %outputs "out") - "/xml/dtd/docbook"))) + (let* ((source (assoc-ref %build-inputs "source")) + (unzip (string-append (assoc-ref %build-inputs "unzip") + "/bin/unzip")) + (xmlcatalog (string-append (assoc-ref %build-inputs "libxml2") + "/bin/xmlcatalog")) + (dtd (string-append (assoc-ref %outputs "out") + "/xml/dtd/docbook")) + (catalog.xml (string-append dtd "/catalog.xml"))) (mkdir-p dtd) - (invoke unzip source "-d" dtd))))))) + (invoke unzip source "-d" dtd) + ;; Create a minimal XML catalog, to use with libxml2 tools. + (invoke xmlcatalog "--noout" "--create" catalog.xml) + (invoke xmlcatalog "--noout" "--add" "public" + "-//OASIS//DTD DocBook XML V4.1.2//EN" + (string-append dtd "/docbookx.dtd") catalog.xml))))) + (native-inputs (list libxml2 unzip)))) (define-public docbook-xsl (package From patchwork Tue Mar 8 14:36:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 37648 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 92C7527BBEB; Tue, 8 Mar 2022 14:37:11 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5174027BBE9 for ; Tue, 8 Mar 2022 14:37:11 +0000 (GMT) Received: from localhost ([::1]:34186 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRaxa-000608-DF for patchwork@mira.cbaines.net; Tue, 08 Mar 2022 09:37:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59094) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRaxT-0005zo-3m for guix-patches@gnu.org; Tue, 08 Mar 2022 09:37:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:33502) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRaxS-0005Nu-Pl for guix-patches@gnu.org; Tue, 08 Mar 2022 09:37:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nRaxS-0001rj-NE for guix-patches@gnu.org; Tue, 08 Mar 2022 09:37:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54235] [PATCH v3 2/4] utils: Add ar-for-target and ld-for-target procedures. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 08 Mar 2022 14:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54235 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54235@debbugs.gnu.org Cc: maximedevos@telenet.be, Maxim Cournoyer Received: via spool by 54235-submit@debbugs.gnu.org id=B54235.16467501917093 (code B ref 54235); Tue, 08 Mar 2022 14:37:02 +0000 Received: (at 54235) by debbugs.gnu.org; 8 Mar 2022 14:36:31 +0000 Received: from localhost ([127.0.0.1]:55625 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRaww-0001qK-QP for submit@debbugs.gnu.org; Tue, 08 Mar 2022 09:36:30 -0500 Received: from mail-qt1-f182.google.com ([209.85.160.182]:38521) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRawv-0001px-Ik for 54235@debbugs.gnu.org; Tue, 08 Mar 2022 09:36:29 -0500 Received: by mail-qt1-f182.google.com with SMTP id bc10so16253556qtb.5 for <54235@debbugs.gnu.org>; Tue, 08 Mar 2022 06:36:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=X6Kz0Z4PZDyvFsAuoyyFT0UfuJFn0eLvClhkVbyPOIE=; b=Um6TkgTIBBTKdLXqYI1Y8NoZ/ofc/s3N/rgzJqIBWucHi1oPEPacy3gig++NCQkfnU Cb/egq+DWbjJJrnrjDO/24UZ7mqDqIojAWiwZmyINC/FKJ4eAA2SSBUz/C094QfsR85n nXO79S7UctmvaVarGduBNSp99g1k53WXQ1Ki8QXyGAFbdK83K+1dtQK/RNH3n/4/nqIw w64PMpJKxt6eaeviC9ASfBwB8/6h0iaSNmhfTLwpLR8dChpzwC0rCmylhUHrWL4KAlfS fC46wrp68cJIVT9aD5czhO4tJcRjh0EovEKU3upD3WS3HIgoQMR+xrbE4gkhdK362agS NzDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=X6Kz0Z4PZDyvFsAuoyyFT0UfuJFn0eLvClhkVbyPOIE=; b=e5ltcLthnnv683SLDpUmLG2X5SDjcnOC/42/A1hKTpU4k8+4yiOwPYQ/vJVv78dK5U Yc53KzpG18gfwmqnBMUrBS45HGcAo6umzVi5/sIsMHGi3qOq5NtN07IjZqnVI9ovjD/J IXogD9E69JfgVhaKEK5CLJ/OvdSOjeTkKcdlAqvJuFsCJuUTdEWYlt8M7Dtkhf2kGW6U e42eNcakzl9m6R9GhifzG9JzmND7Pmn4c7EbIKgjs/VkwUuX5jS8QE+TqYuwf6MD1UJd zRg7COBLX2cmkwDuctJYfhnX+iN0JIzpA2T9PIC3E1qUqDyvAaMtWeNYsobMq8SCxGXI KgRw== X-Gm-Message-State: AOAM533orowUElK0rD9IT1HkrLjQcJaQFfzHcVKfI2uxL2Wsk9ucRIwT j53HflWpgWoqp5+re4J7nv4jI/CnWt4= X-Google-Smtp-Source: ABdhPJyJw8byGTMGSwb5sb3MakuSasd75GhOh2yiTTiM3gNtTnGZeBr/8wKSvQqAfWKNO13eMyILPQ== X-Received: by 2002:ac8:7c4b:0:b0:2d1:bff6:e9ef with SMTP id o11-20020ac87c4b000000b002d1bff6e9efmr13822321qtv.22.1646750183602; Tue, 08 Mar 2022 06:36:23 -0800 (PST) Received: from localhost.localdomain (dsl-205-151-56-54.b2b2c.ca. [205.151.56.54]) by smtp.gmail.com with ESMTPSA id e9-20020ac85989000000b002de2bfc8f94sm10338847qte.88.2022.03.08.06.36.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 06:36:23 -0800 (PST) From: Maxim Cournoyer Date: Tue, 8 Mar 2022 09:36:05 -0500 Message-Id: <20220308143607.7449-2-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220308143607.7449-1-maxim.cournoyer@gmail.com> References: <20220308143607.7449-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * guix/utils.scm (ar-for-target, ld-for-target): New procedures. --- guix/utils.scm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/guix/utils.scm b/guix/utils.scm index a0ca9b9070..44c46cb4a9 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -99,8 +99,10 @@ (define-module (guix utils) target-powerpc? target-riscv64? target-64bit? + ar-for-target cc-for-target cxx-for-target + ld-for-target pkg-config-for-target version-compare @@ -715,6 +717,11 @@ (define* (target-64bit? #:optional (system (or (%current-target-system) (any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64" "powerpc64" "riscv64"))) +(define* (ar-for-target #:optional (target (%current-target-system))) + (if target + (string-append target "-ar") + "ar")) + (define* (cc-for-target #:optional (target (%current-target-system))) (if target (string-append target "-gcc") @@ -725,6 +732,11 @@ (define* (cxx-for-target #:optional (target (%current-target-system))) (string-append target "-g++") "g++")) +(define* (ld-for-target #:optional (target (%current-target-system))) + (if target + (string-append target "-ld") + "ld")) + (define* (pkg-config-for-target #:optional (target (%current-target-system))) (if target (string-append target "-pkg-config") From patchwork Tue Mar 8 14:36:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 37651 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 20B9227BBE9; Tue, 8 Mar 2022 14:37:19 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9A99E27BBEA for ; Tue, 8 Mar 2022 14:37:18 +0000 (GMT) Received: from localhost ([::1]:34742 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRaxh-0006Mx-QH for patchwork@mira.cbaines.net; Tue, 08 Mar 2022 09:37:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59100) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRaxT-0005zx-Es for guix-patches@gnu.org; Tue, 08 Mar 2022 09:37:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:33503) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRaxT-0005O1-6B for guix-patches@gnu.org; Tue, 08 Mar 2022 09:37:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nRaxT-0001rr-3f for guix-patches@gnu.org; Tue, 08 Mar 2022 09:37:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54235] [PATCH v3 3/4] gnu: Add ck. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 08 Mar 2022 14:37:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54235 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54235@debbugs.gnu.org Cc: maximedevos@telenet.be, Maxim Cournoyer Received: via spool by 54235-submit@debbugs.gnu.org id=B54235.16467501937110 (code B ref 54235); Tue, 08 Mar 2022 14:37:03 +0000 Received: (at 54235) by debbugs.gnu.org; 8 Mar 2022 14:36:33 +0000 Received: from localhost ([127.0.0.1]:55628 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRawz-0001qc-11 for submit@debbugs.gnu.org; Tue, 08 Mar 2022 09:36:33 -0500 Received: from mail-qt1-f180.google.com ([209.85.160.180]:44619) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRawx-0001q7-BF for 54235@debbugs.gnu.org; Tue, 08 Mar 2022 09:36:31 -0500 Received: by mail-qt1-f180.google.com with SMTP id v3so16208258qta.11 for <54235@debbugs.gnu.org>; Tue, 08 Mar 2022 06:36:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cEKZgvfdFyMt1a9T96wy+psDNn26efCAZ0hyxB/RN1M=; b=IBfPhRZaQKYceF7PRve0oZJDTz3YnZ45dLzl/9F6qmvJZtHXDdlVLVFKCym9ye6SGJ yQ5pg51APElya6xKkfMNce9lMaeMnWJV7DKtAWmMbpFlbhwJb7ex4UtxFshB+xx4lWBG Z9yTQkbhO7vRG+IQ/ks5M89bDPUpEJ3OQ0rYt57FAlFbZBpa59DwHZdZpGQlEU5UddA5 py0xnOb+HHtcJztKOOLPYNOPyhkb3Mw2A9ScxyDvUC88x1o/06Zw+m2v+qdPQuUsqKeU WKj10Gx7V7sCZdo59USiEsGn4WoU5V0AraNOhtcZoUgTeF+eQJUQxvvEUi5zvqNQuUOh 2T+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cEKZgvfdFyMt1a9T96wy+psDNn26efCAZ0hyxB/RN1M=; b=GX9Bv0ECu6x6PSE+OSkW+6MM0oxko7vvIlM90hLhxwKy8IF9MJcwRsisTq/nxOSikM hWeU/nBxAnTTqZpFAUco8MTPEcGZ7GQWrOKE8AfHGiZDNlEwWCgfRTQQSxXrGuRd3xyY o6tQ3nFtRbPmUSp8W+g0mPA9qG2ii2/0IbQaslGJ5EdquNe4HzAmdIf9SYOKaXfncz3a zzMplwO/dsltvVuV4BAns9uENkpxPudoDbFbT+7nFRNxeJ1VeX/qrlVrWeGM4nApPOyU zETEViLdBAhOvBcxw3MaTOH5zdlpNp63s83CQpDlnSUhmeVK1y6CVXtrK3/vchJZvLw+ JgeA== X-Gm-Message-State: AOAM530WWxSidI1A2e+CXRxbwl3WSwvsdAgilLb47yX0XddNv4/aEhjU zqISeR2LSUt3dMwwiaQyzJJGV0e18js= X-Google-Smtp-Source: ABdhPJxCxIYs2hMjeUARJgxCq5crpcLG+AS0KzdZC+A/N9NzAFKPFQOdGTIbOFIFeIi9xj1+cgRC/A== X-Received: by 2002:a05:622a:1985:b0:2de:b88:4673 with SMTP id u5-20020a05622a198500b002de0b884673mr13887572qtc.230.1646750185697; Tue, 08 Mar 2022 06:36:25 -0800 (PST) Received: from localhost.localdomain (dsl-205-151-56-54.b2b2c.ca. [205.151.56.54]) by smtp.gmail.com with ESMTPSA id e9-20020ac85989000000b002de2bfc8f94sm10338847qte.88.2022.03.08.06.36.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 06:36:25 -0800 (PST) From: Maxim Cournoyer Date: Tue, 8 Mar 2022 09:36:06 -0500 Message-Id: <20220308143607.7449-3-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220308143607.7449-1-maxim.cournoyer@gmail.com> References: <20220308143607.7449-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/c.scm (ck): New variable. --- gnu/packages/c.scm | 78 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm index e53a7c865f..d545d98938 100644 --- a/gnu/packages/c.scm +++ b/gnu/packages/c.scm @@ -38,6 +38,7 @@ (define-module (gnu packages c) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) + #:use-module (guix store) #:use-module (gnu packages) #:use-module (gnu packages bash) #:use-module (gnu packages bootstrap) @@ -896,6 +897,83 @@ (define-public aws-c-mqtt (home-page "https://github.com/awslabs/aws-c-mqtt") (license license:asl2.0))) +;;; Factored out of the ck package so that it can be adjusted and called on +;;; the host side easily, without impacting the package definition. +(define (gnu-triplet->ck-machine target) + (letrec-syntax + ((matches (syntax-rules (=>) + ((_ (target-prefix => machine) rest ...) + (if (string-prefix? target-prefix target) + machine + (matches rest ...))) + ((_) + (error "unsupported target" target))))) + ;; This basically reproduces the logic handling the + ;; PLATFORM variable in the configure script of ck. + (matches ("x86_64" => "x86_64") + ("i586" => "x86") + ("i686" => "x86") + ("aarch64" => "aarch64") + ("arm" => "arm") + ("ppc64" => "ppc64") + ("ppc" => "ppc") + ("s390x" => "s390x") + ("sparc64" => "sparcv9")))) + +(define-public ck + (package + (name "ck") + (version "0.7.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/concurrencykit/ck") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "020yzfpvymdc8lc44znlnxmxb8mvp42g4nb4p8k814klazqvwh0x")))) + (build-system gnu-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (replace 'configure + ;; ck uses a custom configure script that stumbles on + ;; '--enable-fast-install', among other things. + (lambda* (#:key parallel-build? #:allow-other-keys) + (define target-machine #$(and=> (%current-target-system) + gnu-triplet->ck-machine)) + (when target-machine + ;; The configure script doesn't currently work for + ;; cross-compiling (see: + ;; https://github.com/concurrencykit/ck/issues/191). + (error "ck cannot currently be cross-compiled")) + ;; The custom configure script doesn't make cross-compilation + ;; adjustments itself, so manually set the archiver, compiler + ;; and linker. + (setenv "AR" #$(ar-for-target)) + (setenv "CC" #$(cc-for-target)) + (setenv "LD" #$(ld-for-target)) + (apply invoke "./configure" + `(,@(if target-machine + (list (string-append "--profile=" target-machine)) + '()) + ,(string-append "--prefix=" #$output) + ,(string-append "--mandir=" #$output "/share/man") + ,(string-append "--cores=" + (if parallel-build? + (number->string (parallel-job-count)) + "1"))))))))) + (home-page "https://github.com/concurrencykit/ck") + (synopsis "C library for concurrent systems") + (description "Concurrency Kit (@code{ck}) provides concurrency primitives, +safe memory reclamation mechanisms and non-blocking (including lock-free) data +structures designed to aid in the research, design and implementation of high +performance concurrent systems developed in C99+.") + (license (list license:bsd-2 ;everything except... + license:asl2.0)))) ;src/ck_hp.c + (define-public utf8-h ;; The latest tag is used as there is no release. (let ((commit "500d4ea9f4c3449e5243c088d8af8700f7189734") From patchwork Tue Mar 8 14:36:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 37650 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9FA7F27BBE9; Tue, 8 Mar 2022 14:37:18 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4AE8027BBE9 for ; Tue, 8 Mar 2022 14:37:14 +0000 (GMT) Received: from localhost ([::1]:34316 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRaxd-00065u-Eq for patchwork@mira.cbaines.net; Tue, 08 Mar 2022 09:37:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59108) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRaxT-000606-QB for guix-patches@gnu.org; Tue, 08 Mar 2022 09:37:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:33504) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRaxT-0005OA-I3 for guix-patches@gnu.org; Tue, 08 Mar 2022 09:37:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nRaxT-0001ry-Fq for guix-patches@gnu.org; Tue, 08 Mar 2022 09:37:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54235] [PATCH v3 4/4] gnu: Add sysbench. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 08 Mar 2022 14:37:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54235 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54235@debbugs.gnu.org Cc: maximedevos@telenet.be, Maxim Cournoyer Received: via spool by 54235-submit@debbugs.gnu.org id=B54235.16467501987127 (code B ref 54235); Tue, 08 Mar 2022 14:37:03 +0000 Received: (at 54235) by debbugs.gnu.org; 8 Mar 2022 14:36:38 +0000 Received: from localhost ([127.0.0.1]:55631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRax4-0001qt-CF for submit@debbugs.gnu.org; Tue, 08 Mar 2022 09:36:38 -0500 Received: from mail-qv1-f44.google.com ([209.85.219.44]:37727) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRawz-0001qA-9s for 54235@debbugs.gnu.org; Tue, 08 Mar 2022 09:36:36 -0500 Received: by mail-qv1-f44.google.com with SMTP id im7so8183167qvb.4 for <54235@debbugs.gnu.org>; Tue, 08 Mar 2022 06:36:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=re67dxhETCR6SAFeUom7DNOjzCjASgwObpqXOzq1CZ0=; b=cIO5f/vJfdjXXBayxfvSzk9dTc7HunSUIujrmOeSvy1GzpUErao4HgoJeoT6t6iD9W oasD2pFzGpkdR1OY7MT/fMS4AF6vwrR4z/OYXzmas+74in5LS4LnX9habnuoJfuCtt+z 5QdzyewIqudJyErPTnh6u2zW+ZJoJeW0w2U0VenJZ+RBBmTOeVztQevrooiFGS0ikfYF 3x4UEpLD2NKa7cKTC1u0L0WddEuGc65dhxx/Lj2dCTQ39itvWYQKNritFjCZZMOJ2h2s YigV/zd1iZbJBM8g1s7tcBRjmXSs+SWs1647ee/27zW52uZU/hKAQlFhBAiUxZ3DGYBJ GX8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=re67dxhETCR6SAFeUom7DNOjzCjASgwObpqXOzq1CZ0=; b=lJ846G4mzOaJXj2GGJGUfWL6eCXe9RAtOqQjdr7MEy/aSyEOyGBCICz2dogomEtfAG H6Z2gdc//8qj8Ys0YaCx+CG0WC+fPLnX+5XKgMe62qCTjaes5xaVYOywmA+ZWqi2mVZS msQXryc5SWmnOdhcLB1/MRikuj+JQ9zFas4GNXReqe+4afpe8TZ5lLujMUOXPWz6mym8 OCxvuMQrw+FIz3+iqaEIUEskMttbQGlJbwfEXnXEjcvQpvnfZajaMYOIVkOUFSbftosf 3T4t4xOJaHEvbE64JzoyVSAUPKSu33b+Yivhvi4BzoOcNW/YDR1UXdNyxw2126A73Ywk /80A== X-Gm-Message-State: AOAM5300UfV3fAyqn7D04bj/4b3Z4rgeqa/SN3iyJak9pIxgZjm+Rw2l KNrSeydIJjHZgrbfkwVNb2MlWTgTZqo= X-Google-Smtp-Source: ABdhPJwbVr5M959mm7L2dpSTCo9uNw7XqshI7Z/j3NQ7vFjlbBE+JzjtGf1MkBMK8zz2TPWjKTLAUw== X-Received: by 2002:ad4:4ee7:0:b0:432:5707:8120 with SMTP id dv7-20020ad44ee7000000b0043257078120mr12276257qvb.101.1646750187524; Tue, 08 Mar 2022 06:36:27 -0800 (PST) Received: from localhost.localdomain (dsl-205-151-56-54.b2b2c.ca. [205.151.56.54]) by smtp.gmail.com with ESMTPSA id e9-20020ac85989000000b002de2bfc8f94sm10338847qte.88.2022.03.08.06.36.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 06:36:27 -0800 (PST) From: Maxim Cournoyer Date: Tue, 8 Mar 2022 09:36:07 -0500 Message-Id: <20220308143607.7449-4-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220308143607.7449-1-maxim.cournoyer@gmail.com> References: <20220308143607.7449-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/benchmark.scm (sysbench): New variable. --- gnu/packages/benchmark.scm | 139 +++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) diff --git a/gnu/packages/benchmark.scm b/gnu/packages/benchmark.scm index eb5df3d4c3..0277c9e7b9 100644 --- a/gnu/packages/benchmark.scm +++ b/gnu/packages/benchmark.scm @@ -37,19 +37,27 @@ (define-module (gnu packages benchmark) #:use-module (guix build-system gnu) #:use-module (guix build-system python) #:use-module (gnu packages) + #:use-module (gnu packages autotools) + #:use-module (gnu packages base) + #:use-module (gnu packages c) #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages kde-frameworks) + #:use-module (gnu packages databases) + #:use-module (gnu packages docbook) #:use-module (gnu packages linux) + #:use-module (gnu packages lua) #:use-module (gnu packages maths) #:use-module (gnu packages mpi) #:use-module (gnu packages opencl) #:use-module (gnu packages perl) + #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages python-science) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) + #:use-module (gnu packages xml) #:use-module (ice-9 match)) (define-public fio @@ -430,3 +438,134 @@ (define-public kdiskmark @item Report generation. @end itemize") (license license:gpl3+))) + +(define-public sysbench + (package + (name "sysbench") + (version "1.0.20") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/akopytov/sysbench") + (commit version))) + (file-name (git-file-name name version)) + (modules '((guix build utils))) + (snippet '(begin + ;; Ensure no bundled libraries get used. + (delete-file-recursively "third_party") + (substitute* "configure.ac" + (("^third_party/.*") + "")) + (substitute* "Makefile.am" + ((".*(LUAJIT|CK)_DIR =.*") + "")))) + (sha256 + (base32 + "1sanvl2a52ff4shj62nw395zzgdgywplqvwip74ky8q7s6qjf5qy")))) + (build-system gnu-build-system) + (arguments + (list + #:configure-flags #~(list "--with-pgsql" + ;; Explicitly specify the library directory of + ;; MySQL, otherwise `mysql_config` gets + ;; consulted and adds unnecessary link + ;; directives. + (string-append "--with-mysql-libs=" + #$(this-package-input "mysql") + "/lib") + "--with-system-luajit" + "--with-system-ck" + ;; If we let the build tool select the most + ;; optimal compiler architecture flag, the + ;; build is not reproducible. + "--without-gcc-arch") + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'patch-test-runner + (lambda _ + (substitute* "tests/test_run.sh" + (("/bin/bash") + (which "bash")) + ;; Do not attempt to invoke the cram command via + ;; Python, as on Guix it is a shell script (wrapper). + (("\\$\\(command -v cram\\)") + "-m cram")))) + (add-after 'unpack 'disable-test-installation + (lambda _ + (substitute* "tests/Makefile.am" + (("install-data-local") + "do-not-install-data-local") + (("^test_SCRIPTS.*") + "")))) + (add-after 'unpack 'fix-docbook + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (substitute* "m4/ax_check_docbook.m4" + (("DOCBOOK_ROOT=.*" all) + (string-append + all "XML_CATALOG=" + (search-input-file (or native-inputs inputs) + "xml/dtd/docbook/catalog.xml") + "\n"))) + (substitute* "doc/xsl/xhtml.xsl" + (("http://docbook.sourceforge.net/release/xsl\ +/current/xhtml/docbook.xsl") + (search-input-file + (or native-inputs inputs) + (string-append "xml/xsl/docbook-xsl-" + #$(package-version docbook-xsl) + "/xhtml/docbook.xsl")))) + (substitute* "doc/xsl/xhtml-chunk.xsl" + (("http://docbook.sourceforge.net/release/xsl\ +/current/xhtml/chunk.xsl") + (search-input-file + (or native-inputs inputs) + (string-append "xml/xsl/docbook-xsl-" + #$(package-version docbook-xsl) + "/xhtml/chunk.xsl"))))))))) + (native-inputs (list autoconf + automake + libtool + pkg-config + python-cram + python-wrapper + which + ;; For documentation + libxml2 ;for XML_CATALOG_FILES + libxslt + docbook-xml-4.1.2 + docbook-xsl)) + (inputs (list ck libaio luajit mysql postgresql)) + (home-page "https://github.com/akopytov/sysbench/") + (synopsis "Scriptable database and system performance benchmark") + (description "@command{sysbench} is a scriptable multi-threaded benchmark +tool based on LuaJIT. It is most frequently used for database benchmarks, but +can also be used to create arbitrarily complex workloads that do not involve a +database server. @command{sysbench} comes with the following bundled +benchmarks: +@table @file +@item oltp_*.lua +A collection of OLTP-like database benchmarks. +@item fileio +A filesystem-level benchmark. +@item cpu +A simple CPU benchmark. +@item memory +A memory access benchmark. +@item threads +A thread-based scheduler benchmark. +@item mutex +A POSIX mutex benchmark. +@end table +It includes features such as: +@itemize +@item +Extensive statistics about rate and latency is available, including latency +percentiles and histograms. +@item +Low overhead even with thousands of concurrent threads. @command{sysbench} is +capable of generating and tracking hundreds of millions of events per second. +@item +New benchmarks can be easily created by implementing pre-defined hooks in +user-provided Lua scripts. +@item +@end itemize") + (license license:gpl2+)))