WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: mirrors choise option for tce-ab?  (Read 2071 times)

Offline nick65go

  • Hero Member
  • *****
  • Posts: 833
mirrors choise option for tce-ab?
« on: March 08, 2023, 11:58:26 AM »
Hi, I saw that tce-ab is a step brother versus the privileged apps-GUI.
Few functions are missing from tce-ab to compete, like no option to choose/change the tcz mirrors.
Could we have something similar? My naive / incipient code:
Code: [Select]
. /etc/init.d/tc-functions
a="/tmp/select.ans" ; b="/opt/tcemirror"

echo "Your internet source for TCZ extensions is: " `cat "$b"` "
echo "Chose other by pressing key 1 now, or else continue"; read -ns ANS
if [ "$ANS" eq 1 ] then
    [ ! -f /opt/mirror.lst ] && tce-fetch.sh mirrors.lst 2>/dev/null
    select "Chose a mirror from the list" mirrors.lst
    cat $a > /opt/mirrors.lst ; rm -f "$a" ; clear ; echo "Your internet source is now:" "$a"; sleep 1
if
# Main
Could be some syntax errors in the code above, I did not read the apps-GUI code neither its strings.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11594
Re: mirrors choise option for tce-ab?
« Reply #1 on: March 08, 2023, 12:20:47 PM »
Hi nick65go
If you run  mirrorpicker  (part of Xprogs.tcz) it will download and install  mirrors.tcz
and find which one is the fastest for you. You can then select OK or Cancel.

If you install  mirrors.tcz , you can run  tcemirror.sh  and it will present you with a
list to choose from.

Offline nick65go

  • Hero Member
  • *****
  • Posts: 833
Re: mirrors choise option for tce-ab?
« Reply #2 on: March 08, 2023, 12:35:33 PM »
I see. Can be done in tinycore but not in core (without Xprogs). I will  test in core.
The fltk is used for flwm, dillo, tce-apps and wbar. I use them all. I have no problems.

The idea is what happens IF none of FLTK apps are used, like use jwm, Xvesa, can tce-ab compete?
« Last Edit: March 08, 2023, 12:37:25 PM by nick65go »

Offline nick65go

  • Hero Member
  • *****
  • Posts: 833
Re: mirrors choise option for tce-ab?
« Reply #3 on: March 08, 2023, 01:17:12 PM »
from strings in  \VM\tc14\sda1.qcow2\tce\optional\Xprogs.tcz\usr\local\bin\apps 
it seems that only a small / negligible size file "/opt/localmirrors" is need by default to simply the script.
(few bytes!, and default rootfs.gz is compressed); plus a small (few bytes) script-option added in /usr/bin/tce[-ab].
Then the boot-strap of a virgin core can be done from any mirrors.

PS: We talk about few bytes in a rootfs.gz of 3440 KB.
Or, to be more real, in a core.gz (11,936 KB) + vmlinuz (5643 KB) for a minimal TC14.
« Last Edit: March 08, 2023, 01:21:52 PM by nick65go »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11594
Re: mirrors choise option for tce-ab?
« Reply #4 on: March 08, 2023, 03:09:33 PM »
Hi nick65go
mirrorpicker  will work with any GUI.
tcemirror.sh  will work from the console.
Both depend on  mirrors.tcz.

Offline nick65go

  • Hero Member
  • *****
  • Posts: 833
Re: mirrors choise option for tce-ab?
« Reply #5 on: March 09, 2023, 03:41:15 AM »
Hi Rich, thanks for the additional info; "tcemirror.sh" + "/opt/localmirrors" is all that we need.

The goal is boot-strapping  core from mirrors (do not contact tinycore server). Maybe not useful for all, because almost all users will use (at lest one time) the original server.

ex: Is similar with firefox. We have a /etc/firefox/ file-settings (to not allow firefox update) AND THEN download firefox.tcz, from a distro. So technically we never contacted firefox web-site to download it, and (if firefox do not spy on us) we could never visit firefox web-site.

From Xprogs.tcz we use just mirror-picker, a GUI app; mirrors.tcz has just one file, the servers list [1180 bytes].
Now for Tinycore we have the choices:

1. Use Tinycore (which has Xprogs.tcz, so we have mirrorpicker GUI) and also download mirrors.tcz (from original tc server -> purpose defeated).

2. use core + mirrors.tcz -> purpose defeated again.

3. use core+vmlinuz (from mirrors) and have by default in rootfs.gz a file in /opt/localmirrors.
I was talking about option no.3, no GUI involved, all scripts/functions are already present in core. So as long as we can obtain the files core.gz (rootfs.gz) and vmlinuz, from any mirror web-site, then technically we boot-strapping without contacting the original server.

But if the original server (http://repo.tinycorelinux.net) wants to count /aggregate data / monitor its access, then I have no problem to let it do it.

Summary: proposal is for /opt/localmirrors [1180 bytes] to be by default in rootfs.gz. To avoid a remaster and to lower the server downloads of many future tczs.
« Last Edit: March 09, 2023, 03:59:33 AM by nick65go »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: mirrors choise option for tce-ab?
« Reply #6 on: March 09, 2023, 11:54:13 AM »
The mirror list is an extension precisely because it would get out of date. Someone using a couple years old iso may find an included list not very useful.

If you want to avoid ever contacting the primary mirror, you presumably have your mirror's URL already, and can write it to to /opt/tcemirror.
The only barriers that can stop you are the ones you create yourself.

Offline nick65go

  • Hero Member
  • *****
  • Posts: 833
Re: mirrors choise option for tce-ab?
« Reply #7 on: March 09, 2023, 01:56:55 PM »
Everything gets out of date, eventually. It is named evolution.
The idea was to allow options from the beginning. Even when someone is using an old ISO, still would have a list of 10 mirrors servers and more than 7 still online I guess [if the user cares about boot-strapping]; this means max 3 out of 10 miss hit (aka few seconds).

[rant ] Plus that in average TC issues a new version every year (so updates of mirrors included). Why use an old ISO [ it has forced /outdated mirrors.tcz for that version on the original server], when the purpose of a new TC is to bring a new kernel with bugs corrected. I think that 90% of the goal for a new TC version is about kernel / security. Because 486 CPU compatibility will not help old devices with more bloated software demands. (gtk1 -> gtk2 -> gtk3, lang C -> rust). [/rant]

The proposal was not about my usage, I can remaster / mix, it was a general proposal.
Anyway this does not prevent a normal mirrors.tcz usage as usually, for in a hurry user.
« Last Edit: March 09, 2023, 02:23:35 PM by nick65go »