WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Extensions repo question  (Read 2585 times)

Offline ashfame

  • Full Member
  • ***
  • Posts: 112
Extensions repo question
« on: August 05, 2020, 01:22:01 PM »
Hi,

While downloading extensions from repo for remaster in my script using fetchExt.sh (https://github.com/ashfame/air-gapped-raspberry-pi-custom-linux-os/blob/master/fetchExt.sh) script I obtained from this forum, I realized a couple of dependencies that have kernel value in the name are not present at the expected url.

Eg: Downloading `v4l2-utils.tcz`, dependencies are listed at url http://tinycorelinux.net/11.x/armv7/tcz/libv4l2.tcz.dep or http://tinycorelinux.net/11.x/armv7/tcz/libv4l2.tcz.tree

and then url for `v4l-dvb-KERNEL.tcz` comes out as http://tinycorelinux.net/11.x/armv7/tcz/v4l-dvb-4.9.22-piCore-v7.tcz which is a 404, yet tce-load or apps GUI are able to load this correctly.

What's the url its fetching from? I would like to make the script adapt this edge case and be able to fetch extensions correctly.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1243
Re: Extensions repo question
« Reply #1 on: August 05, 2020, 04:00:09 PM »
Because the kernel number is wrong.

tce-load replaces the word KERNEL by the value of `uname -r`

piCore11 is based on a 4.19.81-piCore-v7 kernel name.

Offline ashfame

  • Full Member
  • ***
  • Posts: 112
Re: Extensions repo question
« Reply #2 on: August 05, 2020, 04:51:51 PM »
Thank you!

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11594
Re: Extensions repo question
« Reply #3 on: August 05, 2020, 09:35:27 PM »
Hi ashfame
When I wrote FetchExt.sh the goal was to allow one to download extensions and their dependencies independent of which version
of Linux they were running. This meant avoiding the use of commands that depend on you running Tinycore. Therefore, running:
Code: [Select]
uname -rto resolve a  KERNEL  variable was not an option. As a result, it uses the  .tcz.tree  file. Some piCore releases have had multiple
kernel versions, so if you require extensions matching a certain kernel, it pays to check the log. The script does not know what
kernel version you are downloading for. It only knows what kernel version the  .tcz.tree  file reports. The script keeps a running
log called  Log.txt  that tells you what was downloaded, what was already present, and what could not be downloaded.

Offline ashfame

  • Full Member
  • ***
  • Posts: 112
Re: Extensions repo question
« Reply #4 on: August 06, 2020, 08:15:06 AM »
Hi Rich, your script has been greatly helpful so far as my primary means of putting together my remaster is running that script since I started out on Raspberry Pi Zero.

I will be providing the script to others who are interested in the idea of my project i.e. setting up an air-gapped crypto vault so I need the script to be able to generate an img file to simply write to the sd card.

So, I will be making amends in the script, may be rewrite it cuz I will have to parse the .dep urls now as opposed to .tree urls, I think. Open to any suggestions :)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11594
Re: Extensions repo question
« Reply #5 on: August 06, 2020, 08:40:06 AM »
Hi ashfame
I think the  tcz.dep  files are more likely to contain the variable  KERNEL  in their list of extension names than the tree files. Either
way, you will need to resolve it manually if you are not running it on the target system. If you are running it on the target system,
then you can modify it to substitute the kernel version you are running when it encounters  KERNEL.  Or you can setup your own
variable that contains the target kernel string and scan each extension name to see if it needs to be modified.
The other reason I didn't use the  tcz.dep  files is because I didn't feel like writing a routine to parse all of the dependencies.

Offline ashfame

  • Full Member
  • ***
  • Posts: 112
Re: Extensions repo question
« Reply #6 on: August 06, 2020, 08:51:41 AM »
Rich, right! I think I will just use recursion to take care of downloading dependencies of every package being downloaded :)