From patchwork Tue Sep 21 06:35:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Tournier X-Patchwork-Id: 33228 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 BF7FD27BBE1; Tue, 21 Sep 2021 07:41:36 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 25EEA27BBE3 for ; Tue, 21 Sep 2021 07:41:35 +0100 (BST) Received: from localhost ([::1]:57308 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mSZTC-0006ye-6S for patchwork@mira.cbaines.net; Tue, 21 Sep 2021 02:41:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50234) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSZOo-0003uM-QN for guix-patches@gnu.org; Tue, 21 Sep 2021 02:37:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33178) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mSZOo-0005X9-J1 for guix-patches@gnu.org; Tue, 21 Sep 2021 02:37:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mSZOo-0003eC-Am for guix-patches@gnu.org; Tue, 21 Sep 2021 02:37:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50586] [PATCH v3] gnu: mysql: Add wrapper around mysql_config. References: <20210914161025.2511106-1-zimon.toutoune@gmail.com> In-Reply-To: <20210914161025.2511106-1-zimon.toutoune@gmail.com> Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 21 Sep 2021 06:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50586 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50586@debbugs.gnu.org Cc: zimoun Received: via spool by 50586-submit@debbugs.gnu.org id=B50586.163220617513943 (code B ref 50586); Tue, 21 Sep 2021 06:37:02 +0000 Received: (at 50586) by debbugs.gnu.org; 21 Sep 2021 06:36:15 +0000 Received: from localhost ([127.0.0.1]:44721 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSZNz-0003ci-Vb for submit@debbugs.gnu.org; Tue, 21 Sep 2021 02:36:15 -0400 Received: from mail-wr1-f53.google.com ([209.85.221.53]:41545) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSZNx-0003cU-Vh for 50586@debbugs.gnu.org; Tue, 21 Sep 2021 02:36:11 -0400 Received: by mail-wr1-f53.google.com with SMTP id w29so35981203wra.8 for <50586@debbugs.gnu.org>; Mon, 20 Sep 2021 23:36:09 -0700 (PDT) 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=na+dQzph8IZwTxiAzxY8DcuUVgX5wJF2nG/Tb0+YWAI=; b=qgPnHg7IYTzT+pqhhrMCOjpCrnIQV+voIgR6h/tkbZGvjfgWeG6vAcy8vsoXLERN2R PmeFtPjCQRgTp5lWvasry+7U6z2e0sOxHVIH7DBIFATCaPUjRHxA7XApTxhXsCELibbv eOaJpN6J3p4klGphRl221L7XjXufaaw3RReZBXEmtohYKn30/hwbcAduBK4wmx1IXg1W KW+X69SqLNX4iUFM9dsHcGAWeY8nbURipLVMVn1NG8Y+Wy8/panfHkXNdar2DLNrrc1S jmVvLbeknluyVgy8h4dHW8fSBpMfNegmDQdAvcA9HILjCM2anh8Aiq1WaS1hFydCro44 4e0g== 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=na+dQzph8IZwTxiAzxY8DcuUVgX5wJF2nG/Tb0+YWAI=; b=Drr79LSe5mUfyn4eMw8SFmQcE+JwiMj6wTF+hIAuSYF22ScqzxqHEMJxApkBKUxRRU oXppRFU5K9RLIOWHQUn2eyT3EBHga5hRrZg19q3N+RUMDQEYrsZYA6/ar9Jmq31Fzvbq LYU+Ko72qFm8CqoppOJCA8pGncbkHqDul1dLHQYdGawc8IctFMe7N9DW7retYidXR02R Q7ddTTThj8dpql8NEqBmsn+mzCyBcgE5ykzlAi6OQPqZCKWCw2A29RaoRZxwAeAWEZS+ 9DDbPg+waCQBgn1by6IeVzMCH6TAfIAHy2KpkaYyoz1jWKMgwZhJUlEEl31AinGCKz3P 0+mA== X-Gm-Message-State: AOAM533U5UlBHekLvmJAx0W4A7+3gNkCqh9ssGpS3tcd5IiBvQ6RjA2H GpPEf8TTAu43TCpc+RAGeQIcR6ISX5o= X-Google-Smtp-Source: ABdhPJzwetCjJPd4jTzS679ShjlthuQn7GxpL2ObQAouZnjvdjB7/3DyFN2Y59igJmU7Sn4s7z3ywQ== X-Received: by 2002:a7b:c20f:: with SMTP id x15mr2691445wmi.143.1632206164070; Mon, 20 Sep 2021 23:36:04 -0700 (PDT) Received: from localhost.localdomain ([193.48.40.117]) by smtp.gmail.com with ESMTPSA id n186sm1655391wme.31.2021.09.20.23.36.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Sep 2021 23:36:03 -0700 (PDT) From: zimoun Date: Tue, 21 Sep 2021 08:35:56 +0200 Message-Id: <20210921063556.2837579-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.32.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 Fixes . * gnu/packages/databases.scm (mysql): Add phase to wrap 'mysql_config'. [inputs]: Add 'coreutils', 'gawk', 'procps' and 'sed' --- gnu/packages/databases.scm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index c75e1421d5..58e3d7175b 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -53,6 +53,7 @@ ;;; Copyright © 2021 Bonface Munyoki Kilyungi ;;; Copyright © 2021 Simon Streit ;;; Copyright © 2021 Alexandre Hannud Abdo +;;; Copyright © 2021 Simon Tournier ;;; ;;; This file is part of GNU Guix. ;;; @@ -90,6 +91,7 @@ #:use-module (gnu packages emacs) #:use-module (gnu packages flex) #:use-module (gnu packages freedesktop) + #:use-module (gnu packages gawk) #:use-module (gnu packages gcc) #:use-module (gnu packages gettext) #:use-module (gnu packages glib) @@ -695,6 +697,29 @@ auto-completion and syntax highlighting.") (for-each delete-file (find-files (string-append out "/bin") "_embedded$")) + #t))) + (add-after + 'install 'wrap-mysql_helpers + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (awk (assoc-ref inputs "gawk")) + (coreutils (assoc-ref inputs "coreutils")) + (grep (assoc-ref inputs "grep")) + (ps (assoc-ref inputs "procps")) + (sed (assoc-ref inputs "sed"))) + (wrap-program (string-append bin "/mysql_config") + `("PATH" ":" suffix + (,(string-append awk "/bin") + ,(string-append coreutils "/bin") + ,(string-append sed "/bin")))) + (wrap-program (string-append bin "/mysqld_safe") + `("PATH" ":" suffix + (,(string-append awk "/bin") + ,(string-append coreutils "/bin") + ,(string-append grep "/bin") + ,(string-append ps "/bin") + ,(string-append sed "/bin")))) #t)))))) (native-inputs `(("bison" ,bison) @@ -702,11 +727,16 @@ auto-completion and syntax highlighting.") ("pkg-config" ,pkg-config))) (inputs `(("boost" ,boost-for-mysql) + ("coreutils" ,coreutils) ;ls,cat required by mysql_config, mysqld_safe + ("gawk" ,gawk) ;required by mysql_config, mysqld_safe + ("grep" ,grep) ;required by mysqld_safe ("libaio" ,libaio) ("libtirpc" ,libtirpc) ("ncurses" ,ncurses) ("openssl" ,openssl) + ("procps" ,procps) ;required by mysqld_safe ("rpcsvc-proto" ,rpcsvc-proto) ; rpcgen + ("sed" ,sed) ;required by mysql_config, mysqld_safe ("zlib" ,zlib))) (home-page "https://www.mysql.com/") (synopsis "Fast, easy to use, and popular database")