openwrt / openwrt/packages

RUST fails to extract because libdeflate-gzip -dc | tar -xf is being used, instead of just tar -zxf

Open
#26,314 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Makefile
Stars
4.6k
Forks
4k
Avg merge
3d 12h
Merged PRs (30d)
134

Description

I draw your attention to the:

~/openwrt/staging_dir/host/bin/libdeflate-gzip -dc ~/openwrt/dl/rustc-1.85.0-src.tar.gz | tar -C ~/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/host/rustc-1.85.0-src/.. -xf -

command, below:

`mkdir -p ~/openwrt/dl
SHELL= flock ~/openwrt/tmp/.rustc-1.85.0-src.tar.gz.flock -c ' /openwrt/scripts/download.pl "/openwrt/dl" "rustc-1.85.0-src.tar.gz" "2f4f3142ffb7c8402139cfa0796e24baaac8b9fd3f96b2deec3b94b4045c6a8a" "" "https://static.rust-lang.org/dist/" '

  • curl -f --connect-timeout 20 --retry 5 --location https://static.rust-lang.org/dist/rustc-1.85.0-src.tar.gz
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 565M 100 565M 0 0 10.8M 0 0:00:52 0:00:52 --:--:-- 10.9M
    . ~/openwrt/include/shell.sh; ~/openwrt/staging_dir/host/bin/libdeflate-gzip -dc ~/openwrt/dl/rustc-1.85.0-src.tar.gz | tar -C /openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/host/rustc-1.85.0-src/.. -xf -
    tar: This does not look like a tar archive
    tar: Exiting with failure status due to previous errors...make: *** [
    /openwrt/include/toplevel.mk:233: world] Error 2`

I can
curl https://static.rust-lang.org/dist/rustc-1.85.0-src.tar.gz --output rustc-1.85.0-src.tar.gz mkdir rustctest cd rustctest tar -zxf ../rustc-1.85.0-src.tar.gz

and it extracts normally.

Is there a way to have the build process use tar -xzf directly, instead of the Rube Goldberg method?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported extraction command and trace how scripts/download.pl and the build path ending at include/toplevel.mk:233 invoke it. Compare the libdeflate-gzip pipeline with direct tar gzip extraction, then verify that the Rust source archive unpacks successfully and the affected world build completes.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, shell
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.