WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Local mirror, Private extensions server  (Read 128 times)

Offline rhermsen

  • Jr. Member
  • **
  • Posts: 60
Local mirror, Private extensions server
« on: October 17, 2020, 01:12:53 PM »
I would like to setup a local mirror for the extensions I always use and some private extensions.
A second use-case is an isolated network where I would like to use TCL with a local mirror.

With the wiki site down, I have not found an alternative for the page http://wiki.tinycorelinux.com/Local_appbrowser_server
I'm looking for the server-side requirements. I understand it should be a webserver (e.g. apache), but missing the requirements.
Is there another place I can find this info?

Also understood from some 10 year old threads that it is not possible to have a private extension server on top of the main selected extension server. (only one server can be used)
Is that still the case?



Offline Greg Erskine

  • Sr. Member
  • ****
  • Posts: 326
Re: Local mirror, Private extensions server
« Reply #1 on: October 17, 2020, 02:28:37 PM »
hi rhermsen,

Unless you have a reasonable numbers of users I think the effort involved will be too great to be worthwhile.

The existing TCL software really expects the repositories to be mirrors.

Once an extension is downloaded there is no mechanism to determine which repository it originally came from. This is not a problem is the repositories are up-to-date mirrors. So for your unique extensions you need to manually change TCL to point to the appropriate repository. That is ok if its for just for yourself but its complicated for users.

If you go ahead, the repository needs to follow a specific directory structure and there are files and scripts, in addition to the extensions, that are required and are not generally available.

regards
Greg

Offline rhermsen

  • Jr. Member
  • **
  • Posts: 60
Re: Local mirror, Private extensions server
« Reply #2 on: October 17, 2020, 02:57:54 PM »
Hi Greg,

Thanks for your reply.

It is indeed the 'directory structure' and required 'files' that I'm looking for.
My first use-case is just for me which require like 30-50 extension to be present, and more a test-case of the second use-case.
For this setup I would like to use a server that has already a web-server running on port 80, so I have to use an alternative port.

For the second use-case there is no Internet access available with about 20-30 extensions needed.
This will be a server where I can use port 80.


Offline Greg Erskine

  • Sr. Member
  • ****
  • Posts: 326
Re: Local mirror, Private extensions server
« Reply #3 on: October 17, 2020, 11:59:00 PM »
hi rhermsen,

I only play with piCore. Here are a few of my notes that could apply.

Code: [Select]
repo directory structure

                                        3.x
                                        4.x   
                                        5.x
http://distro.ibiblio.org/tinycorelinux/6.x/armv6/tcz/
                                            armv7
                                            armv8  <-- future

http://repo.tinycorelinux.net/10.x/arm6/tcz/

A couple of important files.

sizelist
tags.db
info.lst


Looking at some of these URLs may point you in right direction.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10289
Re: Local mirror, Private extensions server
« Reply #4 on: October 18, 2020, 12:31:24 AM »
There's a mirror of the wiki here: https://www.linuxsecrets.com/tinycorelinux-wiki/wiki:local_appbrowser_server.html

The web server can be anything that serves static files, no server-side scripting like php is needed. You may not need all the auxiliary files for your own use, for example tags if you never search by tag.
The only barriers that can stop you are the ones you create yourself.

Offline andyj

  • Hero Member
  • *****
  • Posts: 874
Re: Local mirror, Private extensions server
« Reply #5 on: October 18, 2020, 05:39:06 AM »
You can make your mirror files using these one-liners: http://forum.tinycorelinux.net/index.php/topic,23975.msg151032.html#msg151032

Offline rhermsen

  • Jr. Member
  • **
  • Posts: 60
Re: Local mirror, Private extensions server
« Reply #6 on: October 18, 2020, 07:22:19 AM »
Hi All,

Thanks a lot for all info.

Yesterday I did get something working (not fully tested):
Code: [Select]
ls -1 *.tcz | sudo tee -a info.lst
sudo gzip info.lst
cat *.txt | sudo tee -a md5.db
sudo gzip md5.db
sudo gunzip -k info.lst.gz
while read files; do
    echo "$files" | sudo tee -a provides.db
    cat "$files".list | sudo tee -a provides.db
    echo -e "\n" | sudo tee -a provides.db
    ls -1la "$files" | awk '{print $9, $5}' | sudo tee -a sizelist
    tags=`cat "$files".info | grep Tags | awk '{$1=""; print}'`
    echo "$files" "$tags"  | sudo tee -a tags.db
done <  info.lst
echo $NOW | sudo tee lastchange.txt
sudo gzip provides.db
sudo gzip sizelist
sudo gzip tags.db

And see from the info on the wiki and Andy's 'one-lines' I better sort the list also.

From here I should be able to work it out for both my use-cases.
What Greg already pointed out, most of the effort will be to get the repo filled with all needed extensions.