Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1364546 - bzip2 is not installed, so any build that tries to download phantomjs fails
Summary: bzip2 is not installed, so any build that tries to download phantomjs fails
Alias: None
Product: Red Hat Software Collections
Classification: Red Hat
Component: rh-nodejs4-container
Version: rh-nodejs4
Hardware: Unspecified
OS: Unspecified
Target Milestone: alpha
: 2.2
Assignee: Zuzana Svetlikova
QA Contact: BaseOS QE - Apps
Depends On:
TreeView+ depends on / blocked
Reported: 2016-08-05 16:37 UTC by Gerard Ryan
Modified: 2016-12-13 19:56 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2016-12-13 19:56:25 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Gerard Ryan 2016-08-05 16:37:32 UTC
Description of problem:
Lots of projects use phantomjs as a devDependency (or it is pulled in by other devDependencies). As part of that, a .tar.bz2 file is downloaded and extracted.

In the "rhscl/nodejs-4-rhel7" image from the Red Hat image registry, the extraction fails, as tar fails to find bzip2 (it seems to exec it).

Version-Release number of selected component (if applicable):
Image id: e6bc445bbb9c

How reproducible:

Steps to Reproduce:
1. s2i build bzreproducer
2. Notice that it fails (but the output is not that readable)
3. s2i build bzreproducer -e NODE_ENV=production
4. Notice that it passes (but that has just installed production deps)
5. docker run -ti bzreproducer npm i grunt-mocha-phantomjs@^2.0.0
6. Notice that this fails, with the critical section of failure shown below under "Actual results".

Actual results:
The following failure is seen in the output:

> Extracting tar contents (via spawned process)
> Error extracting archive
> Phantom installation failed { [Error: Command failed: tar jxf /tmp/phantomjs/phantomjs-1.9.7-linux-x86_64.tar.bz2
> tar (child): bzip2: Cannot exec: No such file or directory
> tar (child): Error is not recoverable: exiting now
> tar: Child returned status 2
> tar: Error is not recoverable: exiting now

Expected results:
It doesn't fail.

Additional info:
1. The at [1] suggests that the default value of the NODE_ENV env var is "production", but this only seems to be true for the outputted container, not during its creation.
2. I feel like the solution to this is maybe for tar to actually have an RPM Requires on bzip2 if it needs it to be present.


Comment 1 Honza Horak 2016-12-13 19:56:25 UTC
I believe this is already fixed and delivered. Please, re-open if there is still some issue.

Note You need to log in before you can comment on or make changes to this bug.