You are not logged in.

#1 2009-06-18 19:59:33

yvonney
Member
Registered: 2008-06-11
Posts: 671

pacman.conf NEED tips for totally offline install with DVD repository

OBJECTIVE: after a base install with ARCHBOOT be able to install from DVD repository which contains repo-add database.

My DVD contains the folder from /var/cache/pacman/pkg.
ON the DVD I have the folder 'pkg' at the dvd root level and another folder which has my already built packages fro AUR.

The database called 'custom.db.tar.gz' created with repo-add exists IN the pkg folder on the DVD.
The built AUR packages are in a seperate folder called '_built' at the dvd's root level as well and they are not included in the repo-add database.
 

I am able to mount the dvd, cd to the pkg folder and use  pacman -Ud to install them though this requires that I type in the full name of the package and I get dependence issues and '*.so' type files not found.

IF I copy all the files from the DVD to the var/cache/pacman/pkg folder I am able to add my local repository to pacman.conf and MUCH more efficient install. I can use pacman -S xorg for example, and I think it finds dependencies even. Can't recall exactly at the moment.


SO: do I need to alter pacman.conf  cache location line and the other lines?

Would I change the 2nd and 3rd lines to get max pacman ability when using DVD repository???
Pointing them to my DVD folder after mounting the dvd

#RootDir     = /
#DBPath      = /var/lib/pacman/
#CacheDir    = /var/cache/pacman/pkg/
#LogFile     = /var/log/pacman.log

I really would like to have as much power and flexibility when using the DVD as the repo.

Can anyone tell me what I should alter in pacman.conf for this.
I am fine if I have to alter the cache location line temporarily if it will give me additional pacman ability.

I have read all the wiki stuff for sure though I'm still a bit in the dark and wanted to ask without typing the many many options.


One big one for me is I don't yet know how to set the SERVER = in pacman.com to look at the mounted DVD and the pkg folder specifically.
I do mount /dev/sr0  /mnt/cdrom

So what would I put as the SERVER for this in pacman.conf

SERVER = /dev/sr0   ?????   or   /dev/cdrom  ????    or /mnt/cdrom I think ????
dunno!

AND I really probably DO have to temporarily alter the pacman.conf  cache location line to get pacman to do dependency installs and let me type short lines instead of the full package name.

THANKS! this one is BIG for me!!!!! :---)

Last edited by yvonney (2009-06-18 20:27:14)

Offline

#2 2009-06-18 20:21:40

ogronom
Member
From: Toronto, Canada
Registered: 2008-05-06
Posts: 123

Re: pacman.conf NEED tips for totally offline install with DVD repository

I'm not sure but, have you tried to modify mirrorlist by adding the /mnt/cdrom and deleting all other repositories?

Last edited by ogronom (2009-06-18 20:22:09)

Offline

#3 2009-06-18 20:25:26

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: pacman.conf NEED tips for totally offline install with DVD repository

If you have the packages in the same directory along with a database created with repo-add. why don't you just add the database to pacman.conf?
If the database is named "custom.db.tar.gz", just add this to pacman.conf:

[custom]
Server = file:///path/to/dir

Obviously you have to replace "/path/to/dir" with the path to the database directory.

The packages need to be in the same directory as the database though so you won't be able to use the custom repo to get the AUR packages. In your case I would create a directory in /tmp, e.g. /tmp/aur, then symlink all the packages in the DVD's AUR directory and create a second database:

mkdir /tmp/aur
cd /tmp/aur
for PKG in $(ls /path/to/dvd_aur_dir); do
  ln -s $PKG
done
repo-add custom-aur.db.tar.gz *.pkg.tar.gz

then add this database to pacman.conf with

[custom-aur]
Server = file:///tmp/aur

Run "pacman -Sy" and then you should be able to install all of those packages with full dependency resolution (provided that your repos actually contain all the dependencies).


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#4 2009-06-19 00:16:23

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: pacman.conf NEED tips for totally offline install with DVD repository

NICE tips, thought and ideas! Thanks to you both.

I was successful with the pkg folder (taken from var/cach/pacman/pkg) now on the dvd by simply adding:
[custom]
Server = file:///mnt/cdrom/pkg

And of course commenting out the other 3 in there for the time being.

It was my being a bit dumb from over-thinking plus I had neglected think I needed to add the /pkg at the end.
VERY nice to have the confirmation so clearly given here.

Regarding the packages I build from AUR manaually and the helpful idea about the symlinking and a repo-add new database called 'custom-aur'.

1) Just my ignorance though I found the idea especially interesting as I thought the /tmp directory got erased every reboot?

2) Initially, I was unable to create this repository dvd with my manually administered 'aur' folder included as files in the src folder I think caused the dvd not be be burnable. SO I burnt a folder on the dvd called 'built' which resides aside the 'pkg' folder with JUST the built packages themself and no source files.

3) Using aur to manually build files is new and wonderful for me. I go to aur, save the tarball, pkgbuild and anything else like patches there. Then I obviously build it. So after building a bunch I copy just the final built package to my built folder.

4) I considered that I could just put the packahes from aur in with the regular pkg folder on the dvd though that seemed not a good idea, logically.

I am now thinking, obviously, to use a flash stick for keeping/maintaining a custom repoitory. I am also thinking the I could have ARCHBOOT on there as well. Wonding if I should maybe partition the flash stick so I can expand a /.img' of ARCHBOOT. (messy maybe) And then I would have the TWO repositories and my root/etc folder important files on it as well.

I will write back after I redo the entire process, right now... hehehe

Last edited by yvonney (2009-06-19 00:16:53)

Offline

#5 2009-06-19 00:38:30

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: pacman.conf NEED tips for totally offline install with DVD repository

You don't need to comment out the other repos. Just place the custom repo section before the other repos in pacman.conf and pacman will check it first. The order of the repos in pacman.conf is important.

As for the custom AUR repo:
1) I only suggested "/tmp" because I thought it was a one-time installation. If you want AUR dependency resolution in general, you'll should take a look at yaourt. It's a wrapper for pacman that enables you to use the same commands to automatically build packages from the AUR. Using a custom repo will not really work for general use because you would need to manually populate the database with the dependencies anyway.

2) Did you include the database created with repo-add?

4) Why not? The end up in the same place and once they're installed, it doesn't make any difference where they came from. The real question is why are you doing it this way? Do you need a portable repo due to bandwidth limitation? Are you installing on machines in different locations or on the same LAN?

Depending on what you're actually doing, you might find a few useful tools on my site (in my sig), e.g. pkgd if you want to save bandwidth on a LAN, powerpill if you're just trying to avoid download time, pbget if you want to easily get PKGBUILDs etc from the AUR and official repos, etc.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#6 2009-06-19 02:46:25

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: pacman.conf NEED tips for totally offline install with DVD repository

COMMENT WRITTEN LAST: I was about to delete a lot of stuff here though thought to just say sorry for not taking the brain-time to slim it. The bold and white boxed part is the main related quest-ion.



you might find a few useful tools on my site (in my sig), e.g. pkgd if you want to save bandwidth on a LAN --- pbget if you want to easily get PKGBUILDs etc from the AUR and official repos, etc.

WOW Xyne !!!! thanks.  pbget etc. sound very cool.

I used yaourt until very recently. Then went ....hmmmm... should learn about manual building and local repo. Where I'm at now is trying to do as much manually as possible. I think I kinda know what packages I want and there will only be some changes from that in the future. There's maybe 20 packages from AUR for me. [PLUS their dependencies]

Of course: I am doing the repo-add local repositories thing for speed, learning, and as part of my whole 'best practices' growth. Plus it will come in very handy when helping other decide quickly if a barbones mainly wm/ncurses lightweight system is for them.

You certainly spark a question or two!

[AUR and dependencies via yaourt affecting my plans to now go manually]
As these have all ALREADY been installed via yaourt my BIG concern is that I've never found much of a yaourt/cache folder. You see, as you'd know many many times upon installing vai yaourt there's some dependency that may, or I guess, may not be in the standard repos.

After installing these packages via yaourt do the dependencies go into /var/cache/pacman.pkg and is pacman aware of it when I do a repo-add for thecustom database. If so, then all if fairly cool for my plans. I bet there's a few idiosyncrasies about AUR and dependencies maybe.

-AUR dependency resolution-
Using a custom repo will not really work for general use because you would need to manually populate the database with the dependencies anyway.

I'm fine with manually doing dependencies - though need to know if my yaourt usage ALREADY put the latest dependencies in the pacman cache for AUR unsupported packages AND is there a way with the whole repo-add, local repositry, pacman and aur concpt I'm planning to fine tune to have the dependencies update when I go back to the online repositries? I don't think so based on my usage with yaourt, though can't quite recall.

As I will be enjoying makepkg building the group of packages I nee to get from AUR for the forseeable future (that are not in the main 3 repos of course)

I'm still wondering about the inter-relationships. So: I already have installed and/or built the packages for everything I expect to need mostly.   I never became beyone mediocre with yaourt.  and that fine, though I now have to consider that in a new install I DO have the latest AUR built packages, though will there be the right dependencies ALREADY in my /var/cache/pacman/pkg ?

There's a few things that I'd love to really understand about this. Even if it ends up that dependencies for the AUR packages is always a bit trickier.

QUESTION: right now I am uable to try custom repo from flash stick as it's read only. I'll be googling this one out and am really looking forward to having a flash stick with ARCHBOOT and I gues ONE repo pkg folder and database on it.

NOTE: I will put the custom repo above the stock ones in pacman.conf. I just commented out the others as I was doing all this offline.

I've dumped the dvd as a repo and have switched to a flash stick.  I've extracted the archboot out to a 4 gig flash stick.
dd if=/root/Desktop/archlinux-2009.05-2-archboot.iso of=/dev/sdb  Its read-only at the moment and no matter what I've tried it stays that way. Maybe I need to use the HPutil on it. It definitely isn't writeable so I won't ponder or note observations here save to say that 'm stumped as to how to get files copied to it.

And now what may be the way I'd like to work:    Keep my folder for building packages from aur which is /root/aur. Then after doing the fun makepkg --asroot   or even makepg -i as root to install. Though I'll probably after the build THEN just copy the built packages from my /root/aur to /var/cache/pacman/pkg   and install from there as I DO plan to use the online repos.
I will ALSO copy the file to my USB stick or maybe just sync to it and do a the repo-add thing in   /var/cache/pacman/pkg   and keep the stick as both backup and 'in the ready' reinstaller.


Um, now  could spend an hour editing down the above!!!

wondrous thanks!

Last edited by yvonney (2009-06-19 07:38:25)

Offline

Board footer

Powered by FluxBB