GNU bug report logs - #26730
[PATCH] Fix bzip2 utilities

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Mon, 1 May 2017 09:51:02 UTC

Severity: normal

Tags: patch

Done: Marius Bakke <mbakke <at> fastmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#26730: closed ([PATCH] Fix bzip2 utilities)
Date: Wed, 17 May 2017 14:59:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 17 May 2017 16:58:46 +0200
with message-id <87lgpvcyxl.fsf <at> fastmail.com>
and subject line Re: bug#26730: [PATCH] gnu: bzip2: Patch bzip2 utilities.
has caused the debbugs.gnu.org bug report #26730,
regarding [PATCH] Fix bzip2 utilities
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
26730: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=26730
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Christopher Baines <mail <at> cbaines.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] Fix bzip2 utilities
Date: Mon, 1 May 2017 10:49:50 +0100
[Message part 3 (text/plain, inline)]
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


[signature.asc (application/pgp-signature, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Marius Bakke <mbakke <at> fastmail.com>
To: Christopher Baines <mail <at> cbaines.net>, 26730-done <at> debbugs.gnu.org
Subject: Re: bug#26730: [PATCH] gnu: bzip2: Patch bzip2 utilities.
Date: Wed, 17 May 2017 16:58:46 +0200
[Message part 6 (text/plain, inline)]
Christopher Baines <mail <at> cbaines.net> writes:

> On 15/05/17 16:46, Marius Bakke wrote:
>> Christopher Baines <mail <at> cbaines.net> writes:
>> 
>>> * gnu/packages/compression.scm (bzip2)[arguments]: Add patch-script phase to
>>>   remove absolute reference to /bin/rm.
>> 
>> Thanks for catching this! (substitute* ...) has an unspecified return
>> value, so I'll add a #t at the end of this new phase before pushing.
>> 
>> Waiting for feedback on the modify-phases patch first. We still have
>> ~two weeks until core-updates starts rolling again, so no rush ;-)
>
> I've resent the patches with these changes, just in case that helps.

Pushed to 'core-updates', thank you! Note: I squashed the first two.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 8 years and 1 day ago.

Previous Next


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