unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* bug#26730: [PATCH] Fix bzip2 utilities
@ 2017-05-01  9:49 Christopher Baines
  2017-05-01 10:10 ` bug#26730: [PATCH 1/2] gnu: bzip2: Use 'modify-phases' syntax Christopher Baines
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Christopher Baines @ 2017-05-01  9:49 UTC (permalink / raw)
  To: 26730


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

The bzip2 package includes wrappers around diff, grep and less/more.
These shell scripts currently include /usr/bin (and sometimes /bin) on
the PATH, and therefore fail if any of the commands that they rely on
cannot be found.

By substituting /usr/bin (and /bin) for the appropriate package paths,
these scripts work much more reliably.

I had some issues with bzmore which uses more from util-linux, I think
there might be a circular dependency in the Guix package tree, as I get
a VM stack overflow when including util-linux as a input to bzip2.

Note that as the bzip2 package is used by so many other packages, any
non-superficial change to it probably means rebuilding the world.

Below is a script, and two invocations of it, showing first what happens
with the unaltered package, and then the package with the modifications
I describe above.


#!/bin/sh
set -x
bzip2 < /etc/shells > shells.bz2

bzcmp shells.bz2 shells.bz2
bzdiff shells.bz2 shells.bz2
bzegrep bash shells.bz2
bzfgrep bash shells.bz2
bzgrep bash shells.bz2
bzless shells.bz2
bzmore shells.bz2


→ PATH=/gnu/store/s3c442d075fc8a0q0nspc9jjsgjq613p-bzip2-1.0.6/bin
./test.sh
+ bzip2
+ bzcmp shells.bz2 shells.bz2
/gnu/store/s3c442d075fc8a0q0nspc9jjsgjq613p-bzip2-1.0.6/bin/bzcmp: line
16: sed: command not found
/gnu/store/s3c442d075fc8a0q0nspc9jjsgjq613p-bzip2-1.0.6/bin/bzcmp: line
40: mktemp: command not found
cannot create a temporary file
+ bzdiff shells.bz2 shells.bz2
/gnu/store/s3c442d075fc8a0q0nspc9jjsgjq613p-bzip2-1.0.6/bin/bzdiff: line
16: sed: command not found
/gnu/store/s3c442d075fc8a0q0nspc9jjsgjq613p-bzip2-1.0.6/bin/bzdiff: line
40: mktemp: command not found
cannot create a temporary file
+ bzegrep bash shells.bz2
/gnu/store/s3c442d075fc8a0q0nspc9jjsgjq613p-bzip2-1.0.6/bin/bzegrep:
line 11: sed: command not found
/gnu/store/s3c442d075fc8a0q0nspc9jjsgjq613p-bzip2-1.0.6/bin/bzegrep:
line 43: sed: command not found
/gnu/store/s3c442d075fc8a0q0nspc9jjsgjq613p-bzip2-1.0.6/bin/bzegrep:
line 63: grep: command not found
+ bzfgrep bash shells.bz2
/gnu/store/s3c442d075fc8a0q0nspc9jjsgjq613p-bzip2-1.0.6/bin/bzfgrep:
line 11: sed: command not found
/gnu/store/s3c442d075fc8a0q0nspc9jjsgjq613p-bzip2-1.0.6/bin/bzfgrep:
line 43: sed: command not found
/gnu/store/s3c442d075fc8a0q0nspc9jjsgjq613p-bzip2-1.0.6/bin/bzfgrep:
line 63: grep: command not found
+ bzgrep bash shells.bz2
/gnu/store/s3c442d075fc8a0q0nspc9jjsgjq613p-bzip2-1.0.6/bin/bzgrep: line
11: sed: command not found
/gnu/store/s3c442d075fc8a0q0nspc9jjsgjq613p-bzip2-1.0.6/bin/bzgrep: line
43: sed: command not found
/gnu/store/s3c442d075fc8a0q0nspc9jjsgjq613p-bzip2-1.0.6/bin/bzgrep: line
63: grep: command not found
+ bzless shells.bz2
/gnu/store/s3c442d075fc8a0q0nspc9jjsgjq613p-bzip2-1.0.6/bin/bzless: line
8: sed: command not found
------> shells.bz2 <------
/gnu/store/s3c442d075fc8a0q0nspc9jjsgjq613p-bzip2-1.0.6/bin/bzless: line
55: more: command not found
+ bzmore shells.bz2
/gnu/store/s3c442d075fc8a0q0nspc9jjsgjq613p-bzip2-1.0.6/bin/bzmore: line
8: sed: command not found
------> shells.bz2 <------
/gnu/store/s3c442d075fc8a0q0nspc9jjsgjq613p-bzip2-1.0.6/bin/bzmore: line
55: more: command not found


→ PATH=/gnu/store/i3zkljbz6ryqdlfc9gnpcjg964inp9l3-bzip2-1.0.6/bin
./test.sh
+ bzip2
+ bzcmp shells.bz2 shells.bz2
+ bzdiff shells.bz2 shells.bz2
+ bzegrep bash shells.bz2
/run/current-system/profile/bin/bash
/gnu/store/nylrl843mkfdwzz8cd5iabsib37vqc1j-bash-4.4.A/bin/bash
+ bzfgrep bash shells.bz2
/run/current-system/profile/bin/bash
/gnu/store/nylrl843mkfdwzz8cd5iabsib37vqc1j-bash-4.4.A/bin/bash
+ bzgrep bash shells.bz2
/run/current-system/profile/bin/bash
/gnu/store/nylrl843mkfdwzz8cd5iabsib37vqc1j-bash-4.4.A/bin/bash
+ bzless shells.bz2
------> shells.bz2 <------
+ bzmore shells.bz2
------> shells.bz2 <------
/gnu/store/i3zkljbz6ryqdlfc9gnpcjg964inp9l3-bzip2-1.0.6/bin/bzmore: line
55: more: command not found



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

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

end of thread, other threads:[~2017-05-18 18:47 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-01  9:49 bug#26730: [PATCH] Fix bzip2 utilities Christopher Baines
2017-05-01 10:10 ` bug#26730: [PATCH 1/2] gnu: bzip2: Use 'modify-phases' syntax Christopher Baines
2017-05-01 10:10   ` bug#26730: [PATCH 2/2] gnu: bzip2: Patch bzip2 utilities Christopher Baines
2017-05-15 15:43   ` bug#26730: [PATCH 1/2] gnu: bzip2: Use 'modify-phases' syntax Marius Bakke
2017-05-06 15:38 ` bug#26730: [PATCH] Fix bzip2 utilities Marius Bakke
2017-05-09 10:18   ` Ludovic Courtès
2017-05-15  6:08     ` Christopher Baines
2017-05-15  6:04 ` bug#26730: [PATCH] gnu: bzip2: Patch " Christopher Baines
2017-05-15  6:07 ` Christopher Baines
2017-05-15 15:46   ` Marius Bakke
2017-05-16 20:41     ` Christopher Baines
2017-05-17 14:58       ` Marius Bakke
2017-05-18 18:46         ` Christopher Baines
2017-05-16 20:36 ` bug#26730: [PATCH 1/3] gnu: bzip2: Use 'modify-phases' syntax Christopher Baines
2017-05-16 20:36   ` bug#26730: [PATCH 2/3] gnu: bzip2: Add explicit return value for 2 phases Christopher Baines
2017-05-16 20:36   ` bug#26730: [PATCH 3/3] gnu: bzip2: Patch bzip2 utilities Christopher Baines

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).