all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tobias Geerinckx-Rice via Guix-patches via <guix-patches@gnu.org>
To: Olivier Dion <olivier.dion@polymtl.ca>
Cc: 53238@debbugs.gnu.org
Subject: [bug#53238] [PATCH] gnu: tree: Remove stddata feature.
Date: Thu, 13 Jan 2022 23:33:29 +0100	[thread overview]
Message-ID: <87a6fzchid.fsf@nckx> (raw)
In-Reply-To: <87ee5bwdzw.fsf@laura>


[-- Attachment #1.1: Type: text/plain, Size: 1235 bytes --]

Hullo Olivier,

I was going to apply the patch below to fix the password-store 
package, but Maxime just submitted another version which I prefer. 
I'd rather not provide two trees in Guix.

Olivier Dion 写道:
> I've contacted the maintainer asking for removal of the feature 
> in its
> next release.

After some consideration, I think it's an interesting feature. 
Something like this is long overdue.

I don't know if this approach is the right one, but I'll 
begrudgingly settle for JSON if it finally catches on…

> It's more than just packages, it's also user scripts that can be 
> broken

They can be fixed, or better yet rewritten.  tree(1) is not tr(1). 
‘Some lazy idiot could parse this with bash’ != ‘frozen API which 
upstream can never improve’.  Really.

…uh, I'm describing myself there, by the way ;-)  I feel quite 
seen.

Not that they needed to, but upstream even bumped the major 
revision along with this change.

> and believe me when I say that this is not an easy bug to track 
> down ;-).

Fully agree!  I wasted too much time trying to track it down 
myself.  I blame password-store's spaghetto of redirection more 
than tree.

Kind regards,

T G-R


[-- Attachment #1.2: 0004-gnu-password-store-Fix-failing-test-suite.patch --]
[-- Type: text/x-patch, Size: 2366 bytes --]

From e100fedb52df07738c2d535928c6c9f98042e07f Mon Sep 17 00:00:00 2001
From: Tobias Geerinckx-Rice <me@tobias.gr>
Date: Thu, 13 Jan 2022 13:45:25 +0000
Subject: [PATCH 04/26] gnu: password-store: Fix failing test suite.

* gnu/packages/admin.scm (tree-1): New public variable.
* gnu/packages/password-utils.scm (password-store)[inputs]:
Use it rather than the default tree@2.

Reported by Maxim Cournoyer <maxim.cournoyer@gmail.com> and
Olivier Dion <olivier.dion@polymtl.ca>.
---
 gnu/packages/admin.scm          | 20 ++++++++++++++++++++
 gnu/packages/password-utils.scm |  3 ++-
 2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index f11374a439..c2e656db1a 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -2421,6 +2421,26 @@ (define-public tree
     (home-page "http://mama.indstate.edu/users/ice/tree/")
     (license license:gpl2+)))
 
+(define-public tree-1
+  ;; tree 2.0.0 introduced a feature called ‘stddata’ that emits JSON when
+  ;; output is directed to file descriptor 3.  At least password-store still
+  ;; requires the old version.
+  (package
+    (inherit tree)
+    (version "1.8.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://mama.indstate.edu/users/ice/tree/src/tree-"
+                    version ".tgz"))
+              (sha256
+               (base32 "1hmpz6k0mr6salv0nprvm1g0rdjva1kx03bdf1scw8a38d5mspbi"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments tree)
+       ((#:make-flags flags '())
+        #~(append #$flags
+                  (list (string-append "prefix=" #$output))))))))
+
 (define-public lr
   (package
     (name "lr")
diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 0ff8608c9c..86af0deb47 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -552,7 +552,8 @@ (define-public password-store
        ("gnupg" ,gnupg)
        ("qrencode" ,qrencode)
        ("sed" ,sed)
-       ("tree" ,tree)
+       ;; XXX v1.7.4 tests are broken with tree@2: <issues.guix.gnu.org/53238>.
+       ("tree" ,tree-1)
        ("which" ,which)
        ("wl-clipboard" ,wl-clipboard)
        ("xclip" ,xclip)
-- 
2.34.0


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

  parent reply	other threads:[~2022-01-14  0:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-13 20:33 [bug#53238] [PATCH] gnu: tree: Remove stddata feature Olivier Dion via Guix-patches via
2022-01-13 20:44 ` Tobias Geerinckx-Rice via Guix-patches via
2022-01-13 20:57   ` Olivier Dion via Guix-patches via
2022-01-13 22:26     ` Maxim Cournoyer
2022-01-16 17:04       ` bug#53238: " Marius Bakke
2022-01-16 18:06         ` Leo Famulari
2022-01-17 17:37           ` Marius Bakke
2022-01-13 22:33     ` Tobias Geerinckx-Rice via Guix-patches via [this message]
2022-01-14  1:55       ` [bug#53238] " Olivier Dion via Guix-patches via
2022-01-14  2:05         ` Tobias Geerinckx-Rice via Guix-patches via
2022-01-15 14:37       ` bug#53238: " Tobias Geerinckx-Rice via Bug reports for GNU Guix

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

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

  git send-email \
    --in-reply-to=87a6fzchid.fsf@nckx \
    --to=guix-patches@gnu.org \
    --cc=53238@debbugs.gnu.org \
    --cc=me@tobias.gr \
    --cc=olivier.dion@polymtl.ca \
    /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 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.