You are not logged in.

#1 2007-08-28 03:53:13

illuminati11_13
Member
Registered: 2007-05-28
Posts: 5

Custom repo on non-arch distro.

My desktop boots Arch and my lappy boots Ubuntu. For a while this was fine, but I've moved back onto campus and my school doesn't provide (or allow for that matter) an internet connection in the dorms. I've found that I'm short a few programs that I need to use at school, (OpenOffice, Maxima.) So, I need a way to transfer Arch packages from the school lab to my room using my laptop.

I found instructions in the wiki that suggested that I use a custom repo to transfer files to a computer with a slow or non-existent internet connection, but that would require an intermediate machine that also booted Arch. So, what I really need is, either a way to download the packages I need, straight (wget?,) or a way to install certain Arch tools (pacman, gensync, repo-add?) on my Ubuntu laptop so that I can host a very small custom repo on it. If all else fails, I can just download the tarballs I need and be done with it... but I'd rather not as it doesn't seem like the most clean solution.

So, if anyone would help or point me in the right direction here, I would appreciate it.

Offline

#2 2007-08-28 09:11:17

radumash
Member
From: Bucharest & Brasov / Romania
Registered: 2007-02-25
Posts: 26

Re: Custom repo on non-arch distro.

Well i don't know if it's the cleanest solution or easiest to implement but you could install virtualbox or qemu on your laptop and run an Arch Linux virtual machine and use that to download what packages you need.
But in my opinion, if you don't require many packages from the repository it would be quicker just to download
the packages and dependencies and install the manually. But if you know the packages will give you dependency hell on manual install then you shold try something else.
Or you could rsync the repository you want from Ubuntu, copy the files to your Arch desktop and set up a local repository there.
Good luck.

Offline

#3 2007-08-28 12:48:17

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: Custom repo on non-arch distro.

On your arch box, run

pacman -Sp package1 package2 package3

where packageX is the packages you want to get (open office for example.)

That will print out a list of URLs to the packages - just use them + wget on the machine with internet.

Note:  If your pacman sync database is out of date, you may get a few URLs that, when you try to fetch them, will say "file does not exist" - this is likely because a newer version of that package exists.  You can browse the FTP site in a web browser to find it, although that's not ideal.

Last edited by Cerebral (2007-08-28 12:50:06)

Offline

#4 2007-08-29 00:15:09

illuminati11_13
Member
Registered: 2007-05-28
Posts: 5

Re: Custom repo on non-arch distro.

Thanks. It hasn't been long since I moved in so my sync shouldn't be too out of date. For future reference though, is there a way to download it and update it manually? I'm going to look at the manual in a minute, but I still thought I'd ask.

Offline

#5 2007-08-29 00:46:44

MrWeatherbee
Member
Registered: 2007-08-01
Posts: 277

Re: Custom repo on non-arch distro.

Cerebral wrote:

On your arch box, run

pacman -Sp package1 package2 package3

where packageX is the packages you want to get (open office for example.)

That will print out a list of URLs to the packages - just use them + wget on the machine with internet.

Note:  If your pacman sync database is out of date, you may get a few URLs that, when you try to fetch them, will say "file does not exist" - this is likely because a newer version of that package exists.  You can browse the FTP site in a web browser to find it, although that's not ideal.

Couldn't he untar pacman on the Ubuntu box and use pacman.static like this:

pacman.static --cachedir /myubuntu/archcache/dir -Syw

The "w" is the download-only option. After getting the files, then the cache on the Ubuntu machine could be copied / synced to the Arch machine.

I thought about this solution shortly after the original post was made, but I hesitated to offer it because I don't know if manually copying files into the Arch cache has potential to mess up the pacman databases or has other unwanted consequences. But since you (Cerebral) are here, I trust you may know the answer to this.

Offline

#6 2007-08-29 03:57:59

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: Custom repo on non-arch distro.

MrWeatherbee wrote:

pacman.static --cachedir /myubuntu/archcache/dir -Syw

The "w" is the download-only option. After getting the files, then the cache on the Ubuntu machine could be copied / synced to the Arch machine.

I thought about this solution shortly after the original post was made, but I hesitated to offer it because I don't know if manually copying files into the Arch cache has potential to mess up the pacman databases or has other unwanted consequences. But since you (Cerebral) are here, I trust you may know the answer to this.

Copying packages into the cache dir won't hurt anything.  pacman.static will also need pacman.conf, the files in /etc/pacman.d, and /var/lib/pacman/local on the ubuntu machine to work as expected though.

Offline

#7 2007-08-29 04:58:14

MrWeatherbee
Member
Registered: 2007-08-01
Posts: 277

Re: Custom repo on non-arch distro.

Cerebral wrote:

Copying packages into the cache dir won't hurt anything.  pacman.static will also need pacman.conf, the files in /etc/pacman.d, and /var/lib/pacman/local on the ubuntu machine to work as expected though.

Unpacking the contents of the pacman tar file into the proper locations on the Ubuntu system will provide pacman.conf and /etc/pacman.d/. Basic pacman configuration in this environment is the same as setting it up on Arch, i.e.:

- you may edit the pacman.conf file and the files in /etc/pacman.d, or
- you may copy these files from an existing Arch system

Those are straight-forward enough requirements without much thought of what they will accomplish.

However, the /var/lib/pacman/local directory situation is much different. The directory and its contents are not provided in the pacman package (obviously), thus:

- /var/lib/pacman/local must be copied from the existing Arch system   

The requirement for an exact duplicate from the existing Arch system is so that when pacman.static is run with the appropriate options (see previous post), it will know which dependencies are required for the existing system as that is the system which will be the ultimate recipient of the downloaded packages.

@Cerebral: do you agree with my understanding of the /var/lib/pacman/local business?

I have used pacman.static a few times setting base Arch systems up on a chroot in Ubuntu, but those were virgin set-ups with no need to concern myself about the contents of an existing Arch system's /var/lib/pacman/local and existing dependencies, so I wanted a little clarification on that.

Thanks.

edit:

For convenience, here's where the pacman package can be obtained:

ftp://ftp.archlinux.org/current/os/i686/
ftp://ftp.archlinux.org/current/os/x86_64

Last edited by MrWeatherbee (2007-08-29 05:04:10)

Offline

Board footer

Powered by FluxBB