WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Private extensions server problem  (Read 6759 times)

Offline zab

  • Jr. Member
  • **
  • Posts: 51
Private extensions server problem
« 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]
« Last Edit: June 13, 2010, 09:18:02 PM by ^thehatsrule^ »

Offline althalus

  • Sr. Member
  • ****
  • Posts: 351
Re: Private extensions server problem
« Reply #1 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.

Offline zab

  • Jr. Member
  • **
  • Posts: 51
Re: Private extensions server problem
« Reply #2 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?

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: Private extensions server problem
« Reply #3 on: June 13, 2010, 09:18:40 PM »
Did you try what althalus suggested?

Offline zab

  • Jr. Member
  • **
  • Posts: 51
Re: Private extensions server problem
« Reply #4 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?
« Last Edit: June 13, 2010, 09:57:42 PM by zab »

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: Private extensions server problem
« Reply #5 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).

Offline zab

  • Jr. Member
  • **
  • Posts: 51
Re: Private extensions server problem
« Reply #6 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?

Offline batnas

  • Full Member
  • ***
  • Posts: 122
Re: Private extensions server problem
« Reply #7 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

Offline zab

  • Jr. Member
  • **
  • Posts: 51
Re: Private extensions server problem
« Reply #8 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)?
« Last Edit: June 14, 2010, 12:04:15 PM by zab »

Offline batnas

  • Full Member
  • ***
  • Posts: 122
Re: Private extensions server problem
« Reply #9 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

Offline zab

  • Jr. Member
  • **
  • Posts: 51
Re: Private extensions server problem
« Reply #10 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.

Offline batnas

  • Full Member
  • ***
  • Posts: 122
Re: Private extensions server problem
« Reply #11 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.
« Last Edit: June 14, 2010, 03:08:46 PM by batnas »

Offline zab

  • Jr. Member
  • **
  • Posts: 51
Re: Private extensions server problem
« Reply #12 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.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Private extensions server problem
« Reply #13 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.

Offline zab

  • Jr. Member
  • **
  • Posts: 51
Re: Private extensions server problem
« Reply #14 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!