From patchwork Tue Mar 8 04:38:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 37643 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 BA0FC27BBEA; Tue, 8 Mar 2022 04:39:14 +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 524EE27BBE9 for ; Tue, 8 Mar 2022 04:39:14 +0000 (GMT) Received: from localhost ([::1]:37798 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRRcv-0005J7-FQ for patchwork@mira.cbaines.net; Mon, 07 Mar 2022 23:39:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49256) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRRck-0005Ih-3B for guix-patches@gnu.org; Mon, 07 Mar 2022 23:39:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:32874) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRRcj-0007Cn-RI for guix-patches@gnu.org; Mon, 07 Mar 2022 23:39:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nRRcj-00079A-MY for guix-patches@gnu.org; Mon, 07 Mar 2022 23:39:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54235] [PATCH v2 1/3] 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 04:39:01 +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.164671430927402 (code B ref 54235); Tue, 08 Mar 2022 04:39:01 +0000 Received: (at 54235) by debbugs.gnu.org; 8 Mar 2022 04:38:29 +0000 Received: from localhost ([127.0.0.1]:54998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRRcD-00077t-AH for submit@debbugs.gnu.org; Mon, 07 Mar 2022 23:38:29 -0500 Received: from mail-qt1-f176.google.com ([209.85.160.176]:42953) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRRcB-00077c-7I for 54235@debbugs.gnu.org; Mon, 07 Mar 2022 23:38:28 -0500 Received: by mail-qt1-f176.google.com with SMTP id 11so15188113qtt.9 for <54235@debbugs.gnu.org>; Mon, 07 Mar 2022 20:38:27 -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=QKgZikSJBlD+hjOnvkqPoW3FHJQPBpG3WzHpY4Zo4hPV1DpVogphceh7Dz6/rxXp2X RMVyTAHm6H4W9m+npCeODaovBR1vfXOIfPzIIROo953AAQbOMJUewA4oNxnIcL+ECfc5 J0OzRwTJi0xQo78ajuzo1tSHpMTnXHc1eqLXiUf9KYp9IHHaKyZD50L18TT6KfAZBpur 7CeHL+tizy1huMEXfgJP9jVfKHSAYcveYdWBxAtcUEHc65pzfV9680HThXrAlTGHPbqS +0iCerP91l2ilPaZgfx0SbQohOTpfZusUuIWrEdHQzjp3IMAQO0/FIk+Li57ior2HKmS XA2w== 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=xiyvQOHicyDXwOzJSlhazcVhSatzVogNYsG8DQFeyiwAsBvwr0GOzlZyrWcdRSAbvA uOLEWOnrjfEtMdQeQ7aMu7wKHeli/n7n3A6uB3JP4prXsrYZApiciuqUorjsSY2aWwkK 1XJPqrmVB6uw8VjtPvB0qxj90IwwptdKKwVjZBsHughwZ5Ewn5hkbg5sEGhOWhP3lr1r /fTUqw05C5lpcgHAeRzwhHKe7DF81PkP3AYMCuspSTHTTg51FPwd/E/IZ5NvNIoaVBMw cPleAECNs0Jlu5Ltd3mzB3shToYRLlhYP8g6PtSCGmRAvCtf6LEvLgDjoLo82SgOdxTf /RQw== X-Gm-Message-State: AOAM533X4v9GqMAHgn3aYWeegbDmkZwGKFHND3Le3c1xYQXGwn8pRS6G bbGBoH2VtHDD0Wi8C0T7Wy8QUAxqtrI= X-Google-Smtp-Source: ABdhPJwvhcnsB+pSmBRjk04fT42E2WR1ye5CnJguogv+Z5ffPjlj54ZCBfaL+jit0G/pmn6I+Nq8ng== X-Received: by 2002:a05:622a:d0:b0:2de:2bf1:dd2d with SMTP id p16-20020a05622a00d000b002de2bf1dd2dmr12343531qtw.676.1646714301506; Mon, 07 Mar 2022 20:38:21 -0800 (PST) Received: from localhost.localdomain (dsl-205-151-56-54.b2b2c.ca. [205.151.56.54]) by smtp.gmail.com with ESMTPSA id y11-20020ac85f4b000000b002de4b0a015asm10369332qta.5.2022.03.07.20.38.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Mar 2022 20:38:21 -0800 (PST) From: Maxim Cournoyer Date: Mon, 7 Mar 2022 23:38:07 -0500 Message-Id: <20220308043809.31394-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 04:38:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 37644 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 5D74127BBEA; Tue, 8 Mar 2022 04:39:17 +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 C297427BBE9 for ; Tue, 8 Mar 2022 04:39:16 +0000 (GMT) Received: from localhost ([::1]:37818 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRRcw-0005KB-D6 for patchwork@mira.cbaines.net; Mon, 07 Mar 2022 23:39:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49258) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRRck-0005Io-E4 for guix-patches@gnu.org; Mon, 07 Mar 2022 23:39:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:32875) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRRck-0007Cs-5f for guix-patches@gnu.org; Mon, 07 Mar 2022 23:39:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nRRck-00079I-2l for guix-patches@gnu.org; Mon, 07 Mar 2022 23:39:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54235] [PATCH v2 2/3] gnu: Add ck. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 08 Mar 2022 04:39: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.164671431427418 (code B ref 54235); Tue, 08 Mar 2022 04:39:02 +0000 Received: (at 54235) by debbugs.gnu.org; 8 Mar 2022 04:38:34 +0000 Received: from localhost ([127.0.0.1]:55002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRRcH-000789-L6 for submit@debbugs.gnu.org; Mon, 07 Mar 2022 23:38:33 -0500 Received: from mail-qk1-f182.google.com ([209.85.222.182]:45049) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRRcG-00077k-8r for 54235@debbugs.gnu.org; Mon, 07 Mar 2022 23:38:32 -0500 Received: by mail-qk1-f182.google.com with SMTP id q4so13880553qki.11 for <54235@debbugs.gnu.org>; Mon, 07 Mar 2022 20:38:32 -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=pWq+19mcY1h5xzQOj+ZoZBFf5GxUd1Fi+gq5gUZWNGs=; b=UlDjJkET9HLf4XjR+7d3Z7hLn0sa3d7WuKme38Jm6ZP5PdGRAISejqyKMdpLRe1LGv cN/RHAshf1JccjgAmk0vBBQ8wkb8RpKRj1XIAWmqBmog0T9c+rc0W88ANeXu/1cTQUID 9g03CLDRXW5g6oM9zqJSXtSeJtqXtfwcLRpgXTfj3ZMQARq5W/8FrlZg8ICNT7VhB/FE 5PfYeUmcXGA8FumcsRFdFoego5nH5DD2gXttupobWEhji1upVL8zGh+DY6TYM1A0Kpga snu3sSiCgt0AUDCB7d421kw2M5kk0urN9pN69lX/asvREpnld1rHHk03TDl/3btLuuzr 3qNA== 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=pWq+19mcY1h5xzQOj+ZoZBFf5GxUd1Fi+gq5gUZWNGs=; b=ETKpJM2TAapF8EIE3jBZeevwdUUKCndA6HmTZ4yveA9ikXmSAK83gkiQr1Eya1iZEs v5GJK9gKcdmWm56H9pgOF/tEKNiggf8yp5NczWk75A2ry/y1aCl/TzArXpIr05V4Lhm7 lE9LDP5tfAO9LAl7tCvSvy8unvOJhh31RfgHlN9MVjKJj4uMQApdqQtAWcFM0kTfG1SR cG7P1YHBsNmAff0mQMLK4Otpdd32fGw/1SVxVzfFOSpwtdAnZO/GyA+Oc4/MmtMoKNPW NN2nMXYuhJQxYGHL3jwm3KIX4BltMJjJN4tZyOcL6R4rdB6ztM7gEzRsSbuc6B8gwXQw W58Q== X-Gm-Message-State: AOAM530LLjycfaVVg4JQvW32tM5EsMki4731ufRMyW/q2FZ0CV3wrZcc VZlIuc0JQl0L9l36Kp8zR0UgmR9JSm4= X-Google-Smtp-Source: ABdhPJzePARftyubK31yG1ZKaqW17hfZGrOsbTHzrTknS9b7HZHmKnIPyQXTCEm9i0pgiLu2Hc/EVw== X-Received: by 2002:a05:620a:2810:b0:663:124a:816b with SMTP id f16-20020a05620a281000b00663124a816bmr9089513qkp.785.1646714306520; Mon, 07 Mar 2022 20:38:26 -0800 (PST) Received: from localhost.localdomain (dsl-205-151-56-54.b2b2c.ca. [205.151.56.54]) by smtp.gmail.com with ESMTPSA id y11-20020ac85f4b000000b002de4b0a015asm10369332qta.5.2022.03.07.20.38.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Mar 2022 20:38:26 -0800 (PST) From: Maxim Cournoyer Date: Mon, 7 Mar 2022 23:38:08 -0500 Message-Id: <20220308043809.31394-2-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220308043809.31394-1-maxim.cournoyer@gmail.com> References: <20220308043809.31394-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 | 81 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm index e53a7c865f..5fc923790a 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,86 @@ (define-public aws-c-mqtt (home-page "https://github.com/awslabs/aws-c-mqtt") (license license:asl2.0))) +(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) + ;; TODO: Move AR-FOR-TARGET and LD-FOR-TARGET to (guix utils). + (define* (ar-for-target #:optional (target #$(%current-target-system))) + (if target + (string-append target "-ar") + "ar")) + (define* (ld-for-target #:optional (target #$(%current-target-system))) + (if target + (string-append target "-ld") + "ld")) + (define (gnu-triplet->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. + (matches ("x86_64" => "x86_64") + ("i586" => "x86") + ("i686" => "x86") + ("aarch64" => "aarch64") + ("arm" => "arm") + ("ppc64" => "ppc64") + ("ppc" => "ppc") + ("s390x" => "s390x") + ("sparc64" => "sparcv9")))) + (define target-machine (and=> #$(%current-target-system) + gnu-triplet->machine)) + ;; The custom configure script doesn't make cross-compilation + ;; adjustments itself, so manually set the archiver, compiler + ;; and linker. Even then, it is still broken and doesn't + ;; actually build any binary (see: + ;; https://github.com/concurrencykit/ck/issues/191). + (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 04:38:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 37645 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 0013827BBEA; Tue, 8 Mar 2022 04:39:28 +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 A56A927BBE9 for ; Tue, 8 Mar 2022 04:39:24 +0000 (GMT) Received: from localhost ([::1]:37918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRRd5-0005Ns-Ra for patchwork@mira.cbaines.net; Mon, 07 Mar 2022 23:39:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49260) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRRck-0005Iw-RJ for guix-patches@gnu.org; Mon, 07 Mar 2022 23:39:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:32876) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRRck-0007Cz-Iq for guix-patches@gnu.org; Mon, 07 Mar 2022 23:39:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nRRck-00079P-Gs for guix-patches@gnu.org; Mon, 07 Mar 2022 23:39:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54235] [PATCH v2 3/3] gnu: Add sysbench. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 08 Mar 2022 04:39: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.164671431827435 (code B ref 54235); Tue, 08 Mar 2022 04:39:02 +0000 Received: (at 54235) by debbugs.gnu.org; 8 Mar 2022 04:38:38 +0000 Received: from localhost ([127.0.0.1]:55004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRRcM-00078Q-0X for submit@debbugs.gnu.org; Mon, 07 Mar 2022 23:38:38 -0500 Received: from mail-qv1-f43.google.com ([209.85.219.43]:37820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRRcG-00077m-V9 for 54235@debbugs.gnu.org; Mon, 07 Mar 2022 23:38:36 -0500 Received: by mail-qv1-f43.google.com with SMTP id im7so7220717qvb.4 for <54235@debbugs.gnu.org>; Mon, 07 Mar 2022 20:38:32 -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=cKkseaeuyJojZyckDwDT3HjCoPDQ/I9stLfbUmh7IxI=; b=bX0Y2tPgMl/0tSQrA0A9psTeFZPSvGuzkxfQZQ4sNrPvnXFOy7za5DF1TCf0M0yciV 6h3nBCRHCrVusDN2+bu1bpOusxqxrioAfp0qLKsQEmev4kvP3coUhB0OwZx5fzMZzsvG fFf9ql/zvFpRclqeFB8Zx1dfEsakgkrAKhrUFe96ipfkc2HIATTsf/xmpVBWZ5aMemKa TZPnKP8WWo77WN3AVkVmnWdQINgJDvHZ5t+O73nFMMpkZ3MoEACfmo113k9vlADszndo lGdrlPeWjas9MC2B9K/uLGASfzSfefZ0QlxgLYQnmnfskh8iTAikerQruwQKPOEYei54 1GQA== 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=cKkseaeuyJojZyckDwDT3HjCoPDQ/I9stLfbUmh7IxI=; b=h5VeUvDXk5bvQTZD5pwykys2slUDC12ixWMirTqMPckIJY1KjcBswzerODMvXq52EB M8b8V4QaR/MGYNvRGQI1fEdcteVlkEZFlEfF4vq5FE6V35XRWiA10TW+jfNuGG6OTptX rSbRINnf54Ow5JZk06ZPnvpRcpg7xq7BogtnrBBZ61FbSUMgUcAraHPVlrwodD33ZvN8 lMwrVeDKOZmk7Gcg+rs6P5q7UNU6s+VLGxzrtMq3rIRyBj79rtLYG23VfCJn702KGGg5 1C1QmQejTeWQ/mtHGkkJlKbWHp9x5LIsBXQjeKbdH6NQVr/otWLXxwzKq2kzVQd6UfJL 3RTA== X-Gm-Message-State: AOAM5322N/iP/rMV7U6yKB7aH8uW92yq85SNuT1xcVBD5wFN8Emhw71Y CkHPA8Z1upVBkJt08jggwdaeKr4Rz4c= X-Google-Smtp-Source: ABdhPJyXGr22Upe5H9W5exJVNerb7ut779zQ2jM5u5P5ptAj2elMFett5V9LAKv9nJCmka2cV+JEhg== X-Received: by 2002:a05:6214:762:b0:435:9eac:e343 with SMTP id f2-20020a056214076200b004359eace343mr3901341qvz.21.1646714307223; Mon, 07 Mar 2022 20:38: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 y11-20020ac85f4b000000b002de4b0a015asm10369332qta.5.2022.03.07.20.38.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Mar 2022 20:38:26 -0800 (PST) From: Maxim Cournoyer Date: Mon, 7 Mar 2022 23:38:09 -0500 Message-Id: <20220308043809.31394-3-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220308043809.31394-1-maxim.cournoyer@gmail.com> References: <20220308043809.31394-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 | 137 +++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) diff --git a/gnu/packages/benchmark.scm b/gnu/packages/benchmark.scm index eb5df3d4c3..87c39aac8c 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,132 @@ (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 inputs #:allow-other-keys) + (substitute* "m4/ax_check_docbook.m4" + (("DOCBOOK_ROOT=.*" all) + (string-append + all "XML_CATALOG=" + (search-input-file 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 + 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 + 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+)))