WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Repo  (Read 4645 times)

Offline marcopolo1981

  • Newbie
  • *
  • Posts: 2
Repo
« on: November 03, 2009, 01:34:09 PM »
Hi all.
I was just wondering if it was possible to download the full repo so that it can be accessed without internet.
I know each package can be installed once in the live environment, but I only have wireless and TC doesn't want to connect to anything.
Is there an apt-on-cd equivelant for this distro?

TIA
Mark

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Repo
« Reply #1 on: November 03, 2009, 01:58:36 PM »
The application browser has a local install option that can install from any mounted device.

Offline perthie

  • Full Member
  • ***
  • Posts: 118
Re: Repo
« Reply #2 on: November 03, 2009, 04:34:00 PM »
I was just wondering if it was possible to download the full repo so that it can be accessed without internet.
I wanted to try this myself, but I couldn't find a list of all the extensions in the repo. So I made one as follows:

1. Point your browser to ftp://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/tcz/

2. Select all the text and copy it to a file named templist.

3. Open templist and delete the first four lines.

4. Run this command: cat templist | cut -f 1 > extlist

This will make a file named extlist containing a complete list of all the files in the repo.

5. To download them in a batch, use this little script:

#!/bin/sh
LIST=`cat extlist`
for L in $LIST; do
  wget ftp://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/tcz/$L
done

OR

If you don't need the support files (.list, .info, .md5.txt), ignore Steps 1-4 and use this script instead:

#!/bin/sh
tce-fetch.sh info.lst
LIST=`cat info.lst`
for L in $LIST; do
  wget ftp://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/tcz/$L
  wget ftp://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/tcz/$L.dep 2> /dev/null
done

« Last Edit: November 03, 2009, 10:38:20 PM by perthie »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Repo
« Reply #3 on: November 03, 2009, 04:42:41 PM »
Here is my getrepo.
Put it in the directory you want to save your repo, and run it.
Code: [Select]
#!/bin/bash
getrepo() {
  echo "getting $1$2"
  lftp -e "open $1 && mirror --delete -c $3 $2 && exit"
}

MIRROR=distro.ibiblio.org/pub/linux/distributions/tinycorelinux

mkdir 2.x 2>/dev/null
cd 2.x
getrepo "ftp://$MIRROR/2.x/" "tcz" "-x src -x temp"
getrepo "ftp://$MIRROR/2.x/" "release"
getrepo "ftp://$MIRROR/2.x/" "release_candidates"
getrepo "ftp://$MIRROR/2.x/" "archive"

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Repo
« Reply #4 on: November 03, 2009, 06:15:23 PM »
Quote
I was just wondering if it was possible to download the full repo so that it can be accessed without internet.
I know each package can be installed once in the live environment, but I only have wireless and TC doesn't want to connect to anything.

You can install Tiny Core without being connected to the internet.

[removed due to policy violation]/install.html

You can install programs without being connected to the internet.

[removed due to policy violation]/install-programs.html

If you use this method, you only need to install extension(s) you need to connect to the internet, to get it working. Then you can use the regular method for everything else.
Many people see what is. Some people see what can be, and make a difference.

Offline Kingdomcome

  • Sr. Member
  • ****
  • Posts: 286
Re: Repo
« Reply #5 on: November 03, 2009, 08:05:16 PM »
here's a little gem for downloading a list of the contents of the repo.
Code: [Select]
tce-fetch.sh info.lstThat will download the list for the default repo  (tce for TC/MC < 2.4, tcz for TC/MC >= 2.4)

You can also specify which repo by adding the repo name to the end of the command like so.
Code: [Select]
tce-fetch.sh info.lst tce
tce-fetch.sh info.lst tcz

Offline perthie

  • Full Member
  • ***
  • Posts: 118
Re: Repo
« Reply #6 on: November 03, 2009, 08:40:01 PM »
Code: [Select]
tce-fetch.sh info.lst
That's handy, but I notice that info.lst does not contain the names of the .dep files. You would probably want them too if you were making a local copy of the repo.  I believe that tce-load looks for a .dep file if you install an app locally.




Offline Kingdomcome

  • Sr. Member
  • ****
  • Posts: 286
Re: Repo
« Reply #7 on: November 03, 2009, 09:37:07 PM »
It is true that tce-load will attempt to use the dep file if found locally.  You could have your download script try to download a the dep, and continue gracefully if none found.

Offline perthie

  • Full Member
  • ***
  • Posts: 118
Re: Repo
« Reply #8 on: November 03, 2009, 10:35:26 PM »
You could have your download script try to download a  dep, and continue gracefully if none found.

Excellent idea. I will update the script in my first post.


Offline Kingdomcome

  • Sr. Member
  • ****
  • Posts: 286
Re: Repo
« Reply #9 on: November 04, 2009, 08:49:10 AM »
You should retrieve the info, list and md5 files as well (dont want appbrowser to appear broken).  And to be safe, run an md5 check to ensure the download was good, may setting a flag inside a loop to redownload if md5 check failed.

Offline marcopolo1981

  • Newbie
  • *
  • Posts: 2
Re: Repo
« Reply #10 on: November 04, 2009, 01:36:28 PM »
Thanks everyone for the advice and scripts.
I will try to do this over the weekend and post back.

Mark

Offline neonix

  • Wiki Author
  • Sr. Member
  • *****
  • Posts: 391
Re: Repo
« Reply #11 on: November 06, 2009, 02:02:53 PM »
[removed due to policy violation]/install.html
[removed due to policy violation]/install-programs.html

1. The informations from this sites should be in TCL Wiki.
2. How big is tce repository?

[^thehatsrule^: fixed quote]
« Last Edit: November 17, 2009, 08:10:43 PM by ^thehatsrule^ »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Repo
« Reply #12 on: November 06, 2009, 03:31:44 PM »
The 2.x TCZ repo is currently about 1.3gb.
The only barriers that can stop you are the ones you create yourself.

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: Repo
« Reply #13 on: November 17, 2009, 08:16:13 PM »
Users are encouraged to contribute to the wiki.  If you feel up to the task, please go right ahead! :)