unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Sarah Morgensen <iskarian@mgsn.dev>
To: 33896@debbugs.gnu.org
Subject: bug#33896: [PATCH 1/2] gnu: libblockdev: Embed executable paths.
Date: Sat, 25 Sep 2021 14:28:01 -0700	[thread overview]
Message-ID: <8a50a917c91792e8d5b9f69a31485a3909559ef5.1632604842.git.iskarian@mgsn.dev> (raw)
In-Reply-To: <20181228143255.78bf15b1@scratchpost.org>

Fixes <https://bugs.gnu.org/33896>.

* gnu/packages/disk.scm (libblockdev)[arguments]<#:phases>: Add
'patch-plugin-paths' phase.
---
 gnu/packages/disk.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm
index 7d6f3811dd..f3a7eb7617 100644
--- a/gnu/packages/disk.scm
+++ b/gnu/packages/disk.scm
@@ -21,6 +21,7 @@
 ;;; Copyright © 2021 Michael Rohleder <mike@rohleder.de>
 ;;; Copyright © 2021 Mathieu Othacehe <othacehe@gnu.org>
 ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -940,7 +941,13 @@ to create devices with respective mappings for the ATARAID sets discovered.")
            (lambda* (#:key outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
               (substitute* "src/lib/blockdev.c"
-               (("/etc/libblockdev/conf.d/" path) (string-append out path)))))))))
+                (("/etc/libblockdev/conf.d/" path) (string-append out path))))))
+         (add-after 'unpack 'patch-plugin-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* (find-files "src/plugins" "\\.c$")
+               (("(gchar \\*arg.+\\{\")([^\"]+)" all start program)
+                ;; XXX: Use 'search-input-file' when available.
+                (string-append start (or (which program) program)))))))))
     (native-inputs
      `(("gobject-introspection" ,gobject-introspection)
        ("pkg-config" ,pkg-config)

base-commit: 69f37702dfcda776a190d5c40fad8518469ce3c4
-- 
2.33.0





  parent reply	other threads:[~2021-09-25 21:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-28 13:32 bug#33896: libblockdev inputs are not used correctly Danny Milosavljevic
2018-12-29 18:50 ` Efraim Flashner
2019-01-05 17:55   ` Ludovic Courtès
2021-09-25 21:28 ` Sarah Morgensen [this message]
2021-09-25 21:46   ` bug#33896: [PATCH 2/2] gnu: libblockdev: Fix inputs Sarah Morgensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8a50a917c91792e8d5b9f69a31485a3909559ef5.1632604842.git.iskarian@mgsn.dev \
    --to=iskarian@mgsn.dev \
    --cc=33896@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).