question

Kevin Windrem avatar image
Kevin Windrem asked

unzip problem

I'm trying to figure out a generic way to transfer files from GitHub to a Venus device and preserve file execute bits as well as symbolic links. I'm looking for a generic solution I can recommend for installation of packages I'm publishing for Venus OS enhancements.

So far, the the only mechanism that works is to download a zip file to another computer and unzip it there, then use rsync -Wa to copy the files over to the Venus device.

This works for me because my main computer is a Mac, but will Windows users have the rsync tool? I think most Windows users use putty for transfers

scp does not support symbolic links. (I have a way around this by including a utility to restore the symlinks but it's a kludge.)

I can copy the GitHub zip file from another computer, BUT the version of unzip included with Venus OS (BusyBox) does not restore file execution bits.

There are no git tools included with Venus OS either.

Also no apt tools that could be used to install git or other tools.

I have verified that the zip file created by GitHub DOES include file permissions (unzip -Z on my Mac computer).

I've also tried wget and curl to download the repo but the result of both is a .git file that I can't do anything with on Venus due to lack of git tools.

Is there a better, more generic way?

Venus OS
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

3 Answers
mvader (Victron Energy) avatar image
mvader (Victron Energy) answered ·

Hey Kevin, did you see the feature that auto unzips (or untars or something :-) ) a file when provided on a usb stick? Its documented in the root access document.

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Kevin Windrem avatar image Kevin Windrem commented ·

Thanks Matthijs. Looked at the script and it uses unzip so that won't help, but will look at tar.

0 Likes 0 ·
jeroen avatar image
jeroen answered ·

opkg install git

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Kevin Windrem avatar image
Kevin Windrem answered ·

I did come up with a way to use the existing tools


wget -qO - https://github.com/kwindrem/TankRepeater/archive/current.tar.gz | tar -xzf - -C /data
This will end up with the package installed in /data with no additional work.

The Venus device of course needs internet access. If not use:

wget https://github.com/kwindrem/TankRepeater/archive/current.tar.gz

then copy the .tar.gz file to a USB stick, put it in the Venus device and reboot.

Thanks to Matthijs for the pointer to the install stuff already built into Venus OS.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Related Resources