Bug 12536 - Linux-Headers extracting failure
Summary: Linux-Headers extracting failure
Status: RESOLVED INVALID
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2019.11.1
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-04 03:51 UTC by Melanie
Modified: 2020-02-04 09:14 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Melanie 2020-02-04 03:51:47 UTC
Buildroot fails with the following error message:

>>> linux-headers custom Extracting
/home/user/pi/my/dl/linux/tarball | tar --strip-components=1 -C /home/user/pi/my/output/build/linux-headers-custom   -xf -
/bin/sh: /home/user/pi/my/dl/linux/tarball: Permission denied
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
make[1]: *** [package/pkg-generic.mk:172: /home/user/pi/my/output/build/linux-headers-custom/.stamp_extracted] Error 2
make: *** [Makefile:84: _all] Error 2



The failure is caused by this command-line:

/home/user/pi/my/dl/linux/tarball | tar --strip-components=1 -C /home/user/pi/my/output/build/linux-headers-custom   -xf -



To fix this issue, the following command works for me:

tar --strip-components=1 -C /home/user/pi/my/output/build/linux-headers-custom   -xf /home/user/pi/my/dl/linux/tarball
Comment 1 Peter Seiderer 2020-02-04 07:01:43 UTC
The extract command for e.g. RaspberryPi looks like the following:

gzip -d -c <custom_path>/dl/linux/linux-64d0a9870ac14d5eb5253f67d984ae348eec1393.tar.gz | <custom_path>/host/bin/tar --strip-components=1 -C <custom_path>/build/linux-headers-custom   -xf -

Maybe try to re-name your tarball a little bit more meaningful.e.g.

/home/user/pi/my/dl/linux/tarball.tar

or (after compression)

/home/user/pi/my/dl/linux/tarball.tar.gz
Comment 2 Thomas Petazzoni 2020-02-04 09:14:47 UTC
We use the tarball filename extension to decide how to uncompress it, so if it doesn't have any extension, we don't know what to do with it.

As Peter explained, it should have a .tar, .tar.gz, .tar.xz, tar.bz2, etc. extension depending on the compression scheme being used.