WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Repo mirroring script  (Read 7625 times)

Offline Kingdomcome

  • Sr. Member
  • ****
  • Posts: 286
Repo mirroring script
« on: November 30, 2009, 11:13:39 PM »
I am removing this script to respect the wishes of the TC team to not overburden ibiblio.  For those that are already using it, I'll be happy to answer questions and take suggestions.
« Last Edit: January 18, 2010, 11:18:48 AM by Kingdomcome »

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: Repo mirroring script
« Reply #1 on: January 08, 2010, 04:14:43 PM »
I tried this out, got a message,
Code: [Select]
tc@box:~$ get-repo.sh
Building/Syncing private repo...
wget: invalid option -- 'm'
BusyBox v1.14.3 (2009-11-14 10:19:18 PST) multi-call binary

Usage: wget [-c|--continue] [-s|--spider] [-q|--quiet] [-O|--output-document file]
        [--header 'header: value'] [-Y|--proxy on/off] [-P DIR]
        [-U|--user-agent agent] url

Retrieve files via HTTP or FTP

Options:
        -s      Spider mode - only check file existence
        -c      Continue retrieval of aborted transfer
        -q      Quiet
        -P      Set directory prefix to DIR
        -O      Save to filename ('-' for stdout)
        -U      Adjust 'User-Agent' field
        -Y      Use proxy ('on' or 'off')

Connecting to distro.ibiblio.org (152.46.7.109:21)
header2.jpg          100% |*******************************| 28372  00:00:00 ETA
Connecting to distro.ibiblio.org (152.46.7.109:21)
tiny.css             100% |*******************************|  1782  --:--:-- ETA
Connecting to distro.ibiblio.org (152.46.7.109:21)
wget: bad response to RETR: 550 pub/linux/distributions/tinycorelinux/favicon.ico: No such file or directory
Checking for relics
No relics found
Not removing relics
Private repo is up to date

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Repo mirroring script
« Reply #2 on: January 08, 2010, 04:32:57 PM »
Seems to need GNU wget
The only barriers that can stop you are the ones you create yourself.

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: Repo mirroring script
« Reply #3 on: January 08, 2010, 05:14:33 PM »
I had it in /optional, just forgot to mount it, oops...  :P

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: Repo mirroring script
« Reply #4 on: January 09, 2010, 12:30:43 AM »
OK, there is stuff over here now.

How do I point AppBrowser to the local mirror? Is it simply a case of filling in the directory? And what do I put for prototcol?

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: Repo mirroring script
« Reply #5 on: January 09, 2010, 12:34:40 AM »
Something about a favicon.ico not found?
Code: [Select]
tc@box:~$ get-repo.sh
Building/Syncing private repo...
ln: 2.x/tcz/index.html: File exists
--2010-01-09 16:35:02--  ftp://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/favicon.ico
           => `favicon.ico'
Resolving distro.ibiblio.org... 152.46.7.109
Connecting to distro.ibiblio.org|152.46.7.109|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD /pub/linux/distributions/tinycorelinux ... done.
==> SIZE favicon.ico ... done.
==> PASV ... done.    ==> RETR favicon.ico ...
No such file `favicon.ico'.

Checking for relics
No relics found
Not removing relics
Private repo is up to date

Offline Kingdomcome

  • Sr. Member
  • ****
  • Posts: 286
Re: Repo mirroring script
« Reply #6 on: January 09, 2010, 11:56:56 AM »
OK, there is stuff over here now.

How do I point AppBrowser to the local mirror? Is it simply a case of filling in the directory? And what do I put for prototcol?

You will need to run a web server on the pc hosting the mirror and make the mirror dir accessible via the webserver. there are a few web server options in the repo, personally I use XAMPP available as a self contained package that you only need to download and run.  you can then edit /opt/.tcrc to point to your local web server.

An example: in the script MYREPO="/mnt/hda1/mirror"
Edit httpd.conf of the web server (apache style servers) and set the document root to /mnt/hda1/mirror.
After starting the server edit /opt/.tcrc and change the Mirror: to "Mirror: <ip.of.web.server>/mirror/2.x"  protocol will be http repo will be tcz
Appbrowser and tce-load will then be using your local mirror

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: Repo mirroring script
« Reply #7 on: January 09, 2010, 08:44:05 PM »
Seems to me that using 'install local' might be easier. No need for a web server.

Offline Kingdomcome

  • Sr. Member
  • ****
  • Posts: 286
Re: Repo mirroring script
« Reply #8 on: January 09, 2010, 09:27:02 PM »
"Install Local" is certainly an option, but if you go the route of a webserver then you will have full access through appbrowser to view info, list, and dep files.  Also the script is capable of mimicking the repo webpage at the official site complete with clickable links. The choice is yours of course.

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: Repo mirroring script
« Reply #9 on: January 09, 2010, 10:12:04 PM »
Sooo, what's involved in setting up this server? (Never done it.) :)

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: Repo mirroring script
« Reply #10 on: January 09, 2010, 10:47:39 PM »
@jur: Just in case if your host is a Windows system (I guess not, but that's what I'm using here at the moment) you could use HFS (http://sourceforge.net/projects/hfs/files/). It's a simple HTTP file server, with hardly any setup requirements.

Offline Kingdomcome

  • Sr. Member
  • ****
  • Posts: 286
Re: Repo mirroring script
« Reply #11 on: January 10, 2010, 12:30:43 PM »
First step would be to pick which server to use.  there already a couple in the repo (apache, monkey, lighttpd).  Monkey appears to be the smallest, and is likely the simplest to implement, although I havent used it. Use the info file, my suggestions above, and google to get it set up and running. then you can use your web browser and/or appbrowser to browse your local mirror.

Offline H-H-H

  • Newbie
  • *
  • Posts: 5
Re: Repo mirroring script
« Reply #12 on: April 15, 2012, 08:39:07 AM »
I realise this thread is old but I would be interested in doing this also
Linux is what you make it! And with Linux you can make it what you want :)