Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: zab on June 13, 2010, 07:50:33 PM

Title: Private extensions server problem
Post by: zab on June 13, 2010, 07:50:33 PM
Hi,

I've setup a private extensions server at:
[removed]

Here's the content of my "/op/tcemirror":
$ cat /op/tcemirror
http://distro.ibiblio.org/pub/linux/distribution/tinycorelinux/
[removed]

Following the doc at "http://wiki.tinycorelinux.com/Local_appbrowser_server", I'm still unable
to get my TCL (v2.11.3) aware of this new extensions server!

Trying to install my "ruby-rake" new extension failed miserably:
$ tce-load -wi ruby-rake
Downloading: ruby-rake.tcz
wget: server returned error: HTTP/1.1 404 Not Found
Connecting to distro.ibiblio.org (152.46.7.109:80)
wget: server returned error: HTTP/1.1 404 Not Found
md5sum: ruby-rake.tcz.md5.txt: No such file or directory

What am i doing wrong?

Regards
Zab

[^thehatsrule^: removed links, extensions policy]
Title: Re: Private extensions server problem
Post by: althalus on June 13, 2010, 08:53:02 PM
Unless a change has slipped in somewhere without me noticing, TC is only ever aware of one mirror at a time, so there should only be one line in your tcemirror.
Title: Re: Private extensions server problem
Post by: zab on June 13, 2010, 09:14:44 PM
Ok. So how to solve my problem?
I'd like to have a personal extensions server. Is this impossible with TCL?
Title: Re: Private extensions server problem
Post by: ^thehatsrule^ on June 13, 2010, 09:18:40 PM
Did you try what althalus suggested?
Title: Re: Private extensions server problem
Post by: zab on June 13, 2010, 09:29:19 PM
of course it works (and thanks by the way).
But still can't understand why one mirror only in that file?

I mean, how can I do to get my repository visible in "AppBrowser -> Mirrors" list?
Title: Re: Private extensions server problem
Post by: ^thehatsrule^ on June 14, 2010, 01:29:43 AM
Currently, it gets grabbed from our main mirror.  You may want to check out the source code (see src/fltk_projects/appbrowser).
Title: Re: Private extensions server problem
Post by: zab on June 14, 2010, 05:36:49 AM
Found the code:
Quote
command = "busybox wget -cq ftp://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/tcz/mirrors.lst";
int results = system(command.c_str());
window->cursor(FL_CURSOR_DEFAULT);
Fl::flush();
if ( results == 0)
{
   brw_select->load("mirrors.lst");
   box_select->label("Select Mirror");
   box_select->activate();
   system("rm mirrors.lst");

As you can see, the last expression removes the file "system("rm mirrors.lst")" after loading it.

I  can easily patch "appbrowser" and add my private repo before "mirrors.lst" gets removed.
But this isn't elegant in my opinion! I'll have to maintain this custom "appbrowser" after each change from TCL team!

What you could suggest guys (the clean way to do it) to get my private repo in this list?
Title: Re: Private extensions server problem
Post by: batnas on June 14, 2010, 09:40:57 AM
Based on althalus' answer:
couldn't you add
Code: [Select]
echo "http://1.2.3.4/tcemirror/" > /opt/tcemirrorto bootlocal.sh??

1.2.3.4 is the ip of your server

\\Batnas
Title: Re: Private extensions server problem
Post by: zab on June 14, 2010, 11:58:36 AM
Quote
Based on althalus' answer:
couldn't you add
Code:
echo "http://1.2.3.4/tcemirror/" > /opt/tcemirror
to bootlocal.sh??

1.2.3.4 is the ip of your server

As I said ... it works, but temporarily. As soon as I change the mirror in AppBrowser,
the content of "/opt/tcemirror" is overwrited.

Moreover, could you please clarify something!
Suppose one of my extension depends, lets say on "compiletc" (which is provided in the main TCL repo).
Could this dependency on "compiletc" be resolved by AppBrowser (and other tce-load)?
Title: Re: Private extensions server problem
Post by: batnas on June 14, 2010, 12:15:02 PM
Quote
Based on althalus' answer:
couldn't you add
Code:
echo "http://1.2.3.4/tcemirror/" > /opt/tcemirror
to bootlocal.sh??

1.2.3.4 is the ip of your server

As I said ... it works, but temporarily. As soon as I change the mirror in AppBrowser,
the content of "/opt/tcemirror" is overwrited.
My idea was to write the new mirror to the mirror-file at boot (using bootlocal.sh).
That way you would never have to change it manually in appbrowser.

Moreover, could you please clarify something!
Suppose one of my extension depends, lets say on "compiletc" (which is provided in the main TCL repo).
Could this dependency on "compiletc" be resolved by AppBrowser (and other tce-load)?
I am not quite sure I know, what you mean. I understand your question this way:
You are not sure whether deps are downloaded from your mirror.
If that is the question, the answer will be: They are downloaded from your mirror as well as the "main"-axtension

\\Batnas
Title: Re: Private extensions server problem
Post by: zab on June 14, 2010, 03:02:56 PM
Quote
My idea was to write the new mirror to the mirror-file at boot (using bootlocal.sh).
That way you would never have to change it manually in appbrowser.

Excatly what I did, thanks again!
"althalus" explained that "/etc/tcemirror" should contains only one entry(in my case, my private extensions server address).
But this solve half of my problem. As soon as you change the mirror in AppBrowser, it overrides the actual content of "/etc/tcemirror". In this case, I should reboot my box to get back "/etc/tcemirror" with my private repo address.
Am I right?

Quote
I am not quite sure I know, what you mean. I understand your question this way:
Sorry about not being clear.

Quote
You are not sure whether deps are downloaded from your mirror.
If that is the question, the answer will be: They are downloaded from your mirror as well as the "main"-extension

This is the behaviour I've expected.
Title: Re: Private extensions server problem
Post by: batnas on June 14, 2010, 03:06:37 PM
If you have the correct mirror written to /opt/tcemirror by bootlocal.sh, why would you change it in appbrowser??

When i try to write a new mirror to /opt/tcemirror, appbrowser starts with the mirror specified.
Title: Re: Private extensions server problem
Post by: zab on June 14, 2010, 03:23:53 PM
Quote
If you have the correct mirror written to /opt/tcemirror by bootlocal.sh, why would you change it in appbrowser??

For a simple reason. Imagine you're looking for an extension in the main repo. You open Appbrowser and change to the main mirror to start your search. And thus, you immediatly loose your private repo.

Quote
When i try to write a new mirror to /opt/tcemirror, appbrowser starts with the mirror specified.

Yes, no problem with that.
Title: Re: Private extensions server problem
Post by: gerald_clark on June 14, 2010, 03:36:46 PM
Appbrowser works with one, and only one mirror at a time.
It does not start with one mirror, and then fall back to another.
If you want to use a local mirror, and want to browse all packages,
then you need to be sure the local mirror is complete.
Title: Re: Private extensions server problem
Post by: zab on June 14, 2010, 04:03:34 PM
Quote
Appbrowser works with one, and only one mirror at a time.
It does not start with one mirror, and then fall back to another.
If you want to use a local mirror, and want to browse all packages,
then you need to be sure the local mirror is complete.

Much clear. Thanks!
Title: Re: Private extensions server problem
Post by: buts77 on November 22, 2012, 02:26:32 AM
Search in AppBrowser don't work.

If set extension in frame "Select Extention" and put "Go" all installing fine. But if write extension name in "Search" and press Enter, frame "Select Extention" clear and that's it.

What's the problem?
Title: Re: Private extensions server problem
Post by: Rich on November 22, 2012, 09:42:00 AM
Hi buts77
If the extension does not exist in the repository, then there is nothing to list in the frame.
What did you enter in the search field?
Title: Re: Private extensions server problem
Post by: buts77 on November 23, 2012, 04:02:02 AM
Quote
What did you enter in the search field?

In search field i enter: "mc", "firefox", "fluff", ...
mc.tcz found in frame "Select Extention". If select mc.tcz and click "Go", Midnight Commander begins to download, install, and works well. Other programs too.
But if i enter "mc.tcz" in search field and press Enter, frame "Select Extention" clear and then need click "Connect" to show tcz list again.
Title: Re: Private extensions server problem
Post by: buts77 on November 23, 2012, 05:04:30 AM
After connecting to the Internet search starts normally.
Code: [Select]
tc@box:~$ cat /opt/tcemirror
http://192.168.1.10/tinycorelinux/

Why the search does not work without Internet?
Title: Re: Private extensions server problem
Post by: curaga on November 23, 2012, 10:13:33 AM
The search is not done on the local mirror unfortunately, but on the master.
Title: Re: Private extensions server problem
Post by: Rich on November 23, 2012, 10:21:32 AM
Hi buts77
Quote
In search field i enter: "mc", "firefox", "fluff", ...
You can only search for one extension at a time.
Quote
But if i enter "mc.tcz" in search field and press Enter, frame "Select Extention" clear and then need click "Connect" to show tcz list again.
I just tried that under TC4.1 and it works as expected. Maybe someone else running the current version can
verify that the behavior of AppBrowsers search function has not changed.
Title: Re: Private extensions server problem
Post by: buts77 on November 26, 2012, 04:43:41 AM
The search is not done on the local mirror unfortunately, but on the master.

In last version tynycore 4.7 too?
Title: Re: Private extensions server problem
Post by: buts77 on November 26, 2012, 04:49:37 AM
I just tried that under TC4.1 and it works as expected.

Under TC4.1 search works from local mirror without Internet connection?
Title: Re: Private extensions server problem
Post by: Rich on November 26, 2012, 10:28:30 AM
Hi buts77
Sorry, no. I didn't realize that AppBrowser defaults to using the master.