fsquillace / junest

The lightweight Arch Linux based distro that runs, without root privileges, on top of any other Linux distro.
GNU General Public License v3.0
2.07k stars 110 forks source link

Busybox: tar error when installing JuNest #340

Open TeddyCuoreDolce opened 8 months ago

TeddyCuoreDolce commented 8 months ago

I'm facing some tar related issue

# junest setup
Downloading JuNest...
[...]
Installing JuNest...
tar: invalid option -- 'z'
BusyBox v1.35.0 (2023-03-05 21:13:04 Europe) multi-call binary.

Usage: tar c|x|t [-ahvokO] [-f TARFILE] [-C DIR] [-T FILE] [-X FILE] [LONGOPT]... [FILE]...

Create, extract, or list files from a tar file

    c   Create
    x   Extract
    t   List
    -f FILE Name of TARFILE ('-' for stdin/out)
    -C DIR  Change to DIR before operation
    -v  Verbose
    -O  Extract to stdout
    -o  Don't restore user:group
    -k  Don't replace existing files
    -a  (De)compress based on extension
    -h  Follow symlinks
    -T FILE File with names to include
    -X FILE File with glob patterns to exclude
    --exclude PATTERN   Glob pattern to exclude
    --overwrite     Replace existing files
    --strip-components NUM  NUM of leading components to strip
    --no-recursion      Don't descend in directories
    --numeric-owner     Use numeric user:group
    --no-same-permissions   Don't restore access permissions
    --to-command COMMAND    Pipe files to COMMAND
Error occurred when installing JuNest

So looks like my tar is missing the z option which you're using to extract a .tar.gz One workaround would be to replace the -z with an equivalent gzip command, which is available to me. Is it an option to try that in case straight tar fails?

fsquillace commented 8 months ago

Hi,

can you check whether gzip is installed in busy box? an alternative could be to run gzip and then tar commands. This would be more generic approach, I guess.

Also, does junest runs well in busybox can you try it?

TeddyCuoreDolce commented 8 months ago

I'm trying to install JuNest on a Batocera machine. It was a method recommended in this reddit post I made about adding packages.

Not sure why, but others seem to have the -z option, while for some reason mine does not seem to.

gzip is available though with the following options

Usage: gzip [-cfkdt] [FILE]...

Compress FILEs (or stdin)

    -d  Decompress
    -c  Write to stdout
    -f  Force
    -k  Keep input files
    -t  Test integrity

and BusyBox is v1.35.0, but I can't confirm JuNest works well until I complete the install

fsquillace commented 7 months ago

I will change the script to include gzip command. In the meantime you can try it by changing this line here: https://github.com/fsquillace/junest/blob/master/lib/core/setup.sh#L55

fsquillace commented 7 months ago

Given I do not have busybox, can you try modify that line and tell what is the working commands? Also, I am afraid that constructing general commands might be hard given that tar in busybox accepts a x to extract file whereas in other linux systems is -x.