GNU bug report logs - #33896
libblockdev inputs are not used correctly

Previous Next

Package: guix;

Reported by: Danny Milosavljevic <dannym <at> scratchpost.org>

Date: Fri, 28 Dec 2018 13:47:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 33896 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#33896; Package guix. (Fri, 28 Dec 2018 13:47:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Danny Milosavljevic <dannym <at> scratchpost.org>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Fri, 28 Dec 2018 13:47:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: <bug-guix <at> gnu.org>
Subject: libblockdev inputs are not used correctly
Date: Fri, 28 Dec 2018 14:32:55 +0100
[Message part 1 (text/plain, inline)]
Currently, libblockdev has inputs which aren't used.

These SHOULD be used, but the source files are not patched
so the executables in the inputs are not found or used.

Example:

* libblockdev depends on dosfstools because src/plugins/fs/vfat.c would use
"mkfs.vfat" etc, but src/plugins/fs/vfat.c is not patched to actually refer
to the inputs.

This problem is valid for everything in src/plugins/fs .

Do we proceed to patch it to use the inputs or do we move dosfstools etc
to propagated-inputs ?

I'd suggest the former.
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#33896; Package guix. (Sat, 29 Dec 2018 18:51:01 GMT) Full text and rfc822 format available.

Message #8 received at 33896 <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: 33896 <at> debbugs.gnu.org
Subject: Re: bug#33896: libblockdev inputs are not used correctly
Date: Sat, 29 Dec 2018 20:50:36 +0200
[Message part 1 (text/plain, inline)]
On Fri, Dec 28, 2018 at 02:32:55PM +0100, Danny Milosavljevic wrote:
> Currently, libblockdev has inputs which aren't used.
> 
> These SHOULD be used, but the source files are not patched
> so the executables in the inputs are not found or used.
> 
> Example:
> 
> * libblockdev depends on dosfstools because src/plugins/fs/vfat.c would use
> "mkfs.vfat" etc, but src/plugins/fs/vfat.c is not patched to actually refer
> to the inputs.
> 
> This problem is valid for everything in src/plugins/fs .
> 
> Do we proceed to patch it to use the inputs or do we move dosfstools etc
> to propagated-inputs ?
> 
> I'd suggest the former.

Similar to the enlightenment package getting more 'substitute*'s to
improve functionality, I agree that patching libblockdev to actually
find all the inputs/executables is preferable.


-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#33896; Package guix. (Sat, 05 Jan 2019 17:56:02 GMT) Full text and rfc822 format available.

Message #11 received at 33896 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 33896 <at> debbugs.gnu.org, Danny Milosavljevic <dannym <at> scratchpost.org>
Subject: Re: bug#33896: libblockdev inputs are not used correctly
Date: Sat, 05 Jan 2019 18:55:52 +0100
Hello,

Efraim Flashner <efraim <at> flashner.co.il> skribis:

> On Fri, Dec 28, 2018 at 02:32:55PM +0100, Danny Milosavljevic wrote:
>> Currently, libblockdev has inputs which aren't used.
>> 
>> These SHOULD be used, but the source files are not patched
>> so the executables in the inputs are not found or used.
>> 
>> Example:
>> 
>> * libblockdev depends on dosfstools because src/plugins/fs/vfat.c would use
>> "mkfs.vfat" etc, but src/plugins/fs/vfat.c is not patched to actually refer
>> to the inputs.
>> 
>> This problem is valid for everything in src/plugins/fs .
>> 
>> Do we proceed to patch it to use the inputs or do we move dosfstools etc
>> to propagated-inputs ?
>> 
>> I'd suggest the former.
>
> Similar to the enlightenment package getting more 'substitute*'s to
> improve functionality, I agree that patching libblockdev to actually
> find all the inputs/executables is preferable.

I agree; using ‘substitute*’ is more appropriate than propagation here.

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#33896; Package guix. (Sat, 25 Sep 2021 21:29:02 GMT) Full text and rfc822 format available.

Message #14 received at 33896 <at> debbugs.gnu.org (full text, mbox):

From: Sarah Morgensen <iskarian <at> mgsn.dev>
To: 33896 <at> debbugs.gnu.org
Subject: [PATCH 1/2] gnu: libblockdev: Embed executable paths.
Date: Sat, 25 Sep 2021 14:28:01 -0700
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 <at> rohleder.de>
 ;;; Copyright © 2021 Mathieu Othacehe <othacehe <at> gnu.org>
 ;;; Copyright © 2021 Brice Waegeneire <brice <at> waegenei.re>
+;;; Copyright © 2021 Sarah Morgensen <iskarian <at> 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





Information forwarded to bug-guix <at> gnu.org:
bug#33896; Package guix. (Sat, 25 Sep 2021 21:47:01 GMT) Full text and rfc822 format available.

Message #17 received at 33896 <at> debbugs.gnu.org (full text, mbox):

From: Sarah Morgensen <iskarian <at> mgsn.dev>
To: 33896 <at> debbugs.gnu.org
Subject: [PATCH 2/2] gnu: libblockdev: Fix inputs.
Date: Sat, 25 Sep 2021 14:46:13 -0700
Add missing inputs; make util-linux a regular input since libblockdev
retains references to it.

* gnu/packages/disk.scm (libblockdev):
[inputs]: Add bcache-tools, e2fsprogs, gptfdisk, multipath-tools, ntfs-3g,
util-linux, and xfsprogs.
[native-inputs]: Remove util-linux.
---
 gnu/packages/disk.scm | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm
index f3a7eb7617..a233db9433 100644
--- a/gnu/packages/disk.scm
+++ b/gnu/packages/disk.scm
@@ -951,26 +951,30 @@ to create devices with respective mappings for the ATARAID sets discovered.")
     (native-inputs
      `(("gobject-introspection" ,gobject-introspection)
        ("pkg-config" ,pkg-config)
-       ("python" ,python-wrapper)
-       ("util-linux" ,util-linux)))
+       ("python" ,python-wrapper)))
     (inputs
-     `(("btrfs-progs" ,btrfs-progs)
+     `(("bcache-tools" ,bcache-tools)
+       ("btrfs-progs" ,btrfs-progs)
        ("cryptsetup" ,cryptsetup)
        ("dosfstools" ,dosfstools)
        ("dmraid" ,dmraid)
+       ("e2fsprogs" ,e2fsprogs)
        ("eudev" ,eudev)
        ("glib" ,glib)
+       ("gptfdisk" ,gptfdisk)
        ("kmod" ,kmod)
        ("libbytesize" ,libbytesize)
        ("libyaml" ,libyaml)
        ("lvm2" ,lvm2)
        ("mdadm" ,mdadm)
+       ("multipath-tools" ,multipath-tools)
        ("ndctl" ,ndctl)
        ("nss" ,nss)
+       ("ntfs-3g" ,ntfs-3g)
        ("parted" ,parted)
+       ("util-linux" ,util-linux)
        ("volume-key" ,volume-key)
-       ;; ("xfsprogs" ,xfsprogs) ; TODO: Package?
-       ))
+       ("xfsprogs" ,xfsprogs)))
     (home-page "https://github.com/storaged-project/libblockdev")
     (synopsis "Library for manipulating block devices")
     (description
-- 
2.33.0





Added tag(s) patch. Request was from Sarah Morgensen <iskarian <at> mgsn.dev> to control <at> debbugs.gnu.org. (Sun, 26 Sep 2021 04:10:01 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 210 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.