diff mbox series

[bug#53238] gnu: tree: Remove stddata feature.

Message ID fee834af05b189e4efdf06977a2ccb8935aa1277.1642105304.git.olivier.dion@polymtl.ca
State New
Headers show
Series [bug#53238] gnu: tree: Remove stddata feature. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Olivier Dion Jan. 13, 2022, 8:33 p.m. UTC
* gnu/packages/admin.scm (tree)
[arguments]: Add 'remove-stddata-feature phase after 'unpack phase.

Since version 2.0.0, there's a new feature call `stddata`.

From the ChangeLog:
--------------------------------------------------------------------------------
Output un-indented JSON on file descriptor 3 ("stddata") automatically if file
descriptor 3 is present (currently Linux only.) Maybe switch to BSON.
--------------------------------------------------------------------------------

This feature breaks some UNIX utilities.  Fix it by disabling the feature.
---
 gnu/packages/admin.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Tobias Geerinckx-Rice Jan. 13, 2022, 8:44 p.m. UTC | #1
Olivier,

Thanks again for tracking down this weird bug!

Olivier Dion via Guix-patches via 写道:
> This feature breaks some UNIX utilities.  Fix it by disabling 
> the feature.

Hm…  How long would we have to carry this fork?  My fear is we'd 
do so indefinitely.

How about creating a (possibly hidden) tree-without-stddata 
package variant, to use as input to packages who currently break 
with this feature enabled?  That lets us refcount the need for it.

Kind regards,

T G-R
Olivier Dion Jan. 13, 2022, 8:57 p.m. UTC | #2
On Thu, 13 Jan 2022, Tobias Geerinckx-Rice <me@tobias.gr> wrote:
> Olivier,
>
> Thanks again for tracking down this weird bug!
>
> Olivier Dion via Guix-patches via 写道:
>> This feature breaks some UNIX utilities.  Fix it by disabling 
>> the feature.
>
> Hm…  How long would we have to carry this fork?  My fear is we'd 
> do so indefinitely.

I've contacted the maintainer asking for removal of the feature in its
next release.  I'm not sure if this will have some impact.  Feel free to
do the same at <ice+tree@mama.indstate.edu>, maybe adding more weight
in the balance would help.

> How about creating a (possibly hidden) tree-without-stddata 
> package variant, to use as input to packages who currently break 
> with this feature enabled?  That lets us refcount the need for it.

It's more than just packages, it's also user scripts that can be broken
and believe me when I say that this is not an easy bug to track down ;-).
diff mbox series

Patch

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index f11374a439..3d4909176a 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -2408,6 +2408,14 @@  (define-public tree
      (list
        #:phases
        #~(modify-phases %standard-phases
+           (add-after 'unpack 'remove-stddata-feature
+             (lambda _
+               (substitute* "tree.h"
+                 (("#  define STDDATA_FILENO 3")
+                  ""))
+               (substitute* "tree.c"
+                 (("#ifdef __linux__")
+                  "#ifdef STDDATA_FILENO"))))
            (delete 'configure))         ; No configure script.
        #:tests? #f                      ; No check target.
        #:make-flags