all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#33896: libblockdev inputs are not used correctly
@ 2018-12-28 13:32 Danny Milosavljevic
  2018-12-29 18:50 ` Efraim Flashner
  2021-09-25 21:28 ` bug#33896: [PATCH 1/2] gnu: libblockdev: Embed executable paths Sarah Morgensen
  0 siblings, 2 replies; 5+ messages in thread
From: Danny Milosavljevic @ 2018-12-28 13:32 UTC (permalink / raw)
  To: 33896

[-- Attachment #1: Type: text/plain, Size: 544 bytes --]

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.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#33896: libblockdev inputs are not used correctly
  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 ` bug#33896: [PATCH 1/2] gnu: libblockdev: Embed executable paths Sarah Morgensen
  1 sibling, 1 reply; 5+ messages in thread
From: Efraim Flashner @ 2018-12-29 18:50 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: 33896

[-- Attachment #1: Type: text/plain, Size: 1052 bytes --]

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@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#33896: libblockdev inputs are not used correctly
  2018-12-29 18:50 ` Efraim Flashner
@ 2019-01-05 17:55   ` Ludovic Courtès
  0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2019-01-05 17:55 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: 33896

Hello,

Efraim Flashner <efraim@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’.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#33896: [PATCH 1/2] gnu: libblockdev: Embed executable paths.
  2018-12-28 13:32 bug#33896: libblockdev inputs are not used correctly Danny Milosavljevic
  2018-12-29 18:50 ` Efraim Flashner
@ 2021-09-25 21:28 ` Sarah Morgensen
  2021-09-25 21:46   ` bug#33896: [PATCH 2/2] gnu: libblockdev: Fix inputs Sarah Morgensen
  1 sibling, 1 reply; 5+ messages in thread
From: Sarah Morgensen @ 2021-09-25 21:28 UTC (permalink / raw)
  To: 33896

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





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#33896: [PATCH 2/2] gnu: libblockdev: Fix inputs.
  2021-09-25 21:28 ` bug#33896: [PATCH 1/2] gnu: libblockdev: Embed executable paths Sarah Morgensen
@ 2021-09-25 21:46   ` Sarah Morgensen
  0 siblings, 0 replies; 5+ messages in thread
From: Sarah Morgensen @ 2021-09-25 21:46 UTC (permalink / raw)
  To: 33896

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





^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-09-25 21:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` bug#33896: [PATCH 1/2] gnu: libblockdev: Embed executable paths Sarah Morgensen
2021-09-25 21:46   ` bug#33896: [PATCH 2/2] gnu: libblockdev: Fix inputs Sarah Morgensen

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.