You are not logged in.

#1 2007-04-11 14:35:28

KerowynM
Member
Registered: 2006-06-04
Posts: 78

Somewhat noob questions about ABS and package management

Hello, all

I've been using Arch for some time now, and while what brought me to it was the promise of a fast OS that I didn't need to wait on 16 hours of emerge to upgrade, what kept me around was the masterful way that pacman, abs, and aur handle packages.  Simply the best implementation of package management I've come across.

I've read the wiki articles on ABS, and some threads I managed to find, both giving me great information, but without putting all the pieces together quite like I have, and I wonder if there are any hidden pitfalls in my method, or if there are more proper ways of accomplishing the same thing that I just managed to miss.

First, from an old post google turned up ages ago ( http://bbs.archlinux.org/viewtopic.php?id=1590 ), I sync the abs tree:

# sudo abs

Then, I add a group for ABS, so I can make packages in the /var/abs/local directory as a user instead of root:

# sudo groupadd abs

# sudo gpasswd -a janedoe abs

# sudo chown root:abs /var/abs/local

# sudo chmod 775 /var/abs/local

Yay, now that I can work in this directory as a normal user, I can populate it with my packages.  For example, I add framebuffer support to links:

# cd /var/abs/local

# cp -r /var/abs/network/links .

# cd links

# nano PKGBUILD   /* make your changes here */

# makepkg -c

# mv *.pkg.* ..

Yay, now we have a package.  I do similar with mplayer.  I also add my aur packages, for example lzma

# cd /var/abs/local

# mkdir lzma

# tar -xzvf lzma.tar.gz   /* After getting it from the AUR, or you can write your own PKGBUILD, or what have you...*/

# cd lzma

# makepkg -c

# mv *.pkg.* ..

Now the funky part I'm not sure is going to conflict with anything in the long run.

After I rebuild links and mplayer, next time they are upgraded in current, pacman -Suy will replace my carefully built packages.  To remedy this, I create a local package repository:

# gensync /var/abs/local /var/abs/local/localpkg.db.tar.gz

# sudo nano /etc/pacman.conf

Now, as the fist repository, before current (and the testing that is commented out in mine) I add:

[localpkg]
Server = file:///var/abs/local

And then:

# sudo pacman -Sy

And installing the actual packages becomes as simple as

# sudo pacman -S links

Putting the local repository ahead of the standard ones ensures that local packages aren't upgraded, and saves me from losing framebuffer support in my aps whenever a change is made in the official repos.

When it comes time to upgrade a local package, it becomes as simple as moving the old package and PKGBUILD somewhere ( ~/oldpkg for me ), resyncing abs, copy over the new PKGBUILD, build the package, move it to /var/abs/local, and re-run gensync and pacman -Sy.

What I am unsure of is actually using /var/abs/local as my repository directory.  It seems to me the natural place, as spreading it all over the file system seems less then simple.  I'm not fully aware if I'm going to run into a conflict down the line.  I'm always extra careful when working in directories outside of ~/, and am always worried I'm going to bork something major.  The other things I'm unsure about is if pacman already has a way of handling local packages so they don't get overwritten (I am aware of IgnorePkg, but find it to be a less then optimal way of handling things, as every time you change which packages are local you need to re-edit /etc/pacman.conf.)

Last edited by KerowynM (2007-04-11 14:42:11)

Offline

#2 2007-04-11 14:51:31

klixon
Member
From: Nederland
Registered: 2007-01-17
Posts: 525

Re: Somewhat noob questions about ABS and package management

That almost axactly what i do, but I also put

export PKGDEST=/var/abs/local

in /etc/makepkg.conf

This saves you from having to copy all those pkg's there, with the added benefit that if you forgot to up some pkgver or release number, makepkg warns you about an already existing package

Last edited by klixon (2007-04-11 14:53:11)


Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!

Offline

#3 2007-04-12 09:45:20

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Somewhat noob questions about ABS and package management

smart! I never thought of doing that.

James

Offline

#4 2007-04-12 09:56:23

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Somewhat noob questions about ABS and package management

I do all my package work under $HOME, instead of /var/abs. Solves the permission issue straight away - just install fakeroot and enable it in makepkg.conf.

Another way to avoid conflict between your customised packages and the official ones is to rename yours e.g. links-fb instead of links.

Offline

#5 2007-04-12 10:07:40

klixon
Member
From: Nederland
Registered: 2007-01-17
Posts: 525

Re: Somewhat noob questions about ABS and package management

that would save you if you weren't cautious, but having the same name as the official package does give you the benefit of automaticaly seeing the updated official package and beind able to immediately customize the official package for your local repo...
that's just me being to lazy to check the "updated packages" list wink


Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!

Offline

#6 2007-04-12 10:21:20

wain
Member
From: France
Registered: 2005-05-01
Posts: 289
Website

Re: Somewhat noob questions about ABS and package management

Try customizepkg, it works great with yaourt (for pacman3 only).

Offline

#7 2007-04-12 14:09:08

KerowynM
Member
Registered: 2006-06-04
Posts: 78

Re: Somewhat noob questions about ABS and package management

PKGDEST is great!  Thanks for the tip!

I had considered using another directory entirely, but I've seen many post where /var/abs/local is declared as the 'proper' place to work.  I'm not certain entirely why, but it seemed as good a place as any.  I had also considered building my packages in /var/abs/local, but storing them in another directory (I see /home/pkg thrown about as well.)  but in the interest of simplicity I was hoping to keep my files together.  Things have been working great as I have them, but am always on the lookout for problems I can solve before they happen, and stuffing files into places I'm not entirely sure about is a little scary to me.

So far as changing the package name, that is an option but I don't feel it as clean as the way I manage it now.  I then would have to change the blocks and provides lines in every package every update.  Now I simply need to change the compile options and my local packages seamlessly integrate into the system.

Is there any documentation on exactly what happens in /var/abs/local? As I understand it the abs command creates it, but then ignores it ever after.  So long as nothing else is going to try and use it, then I can't see any issues.  I originally had thought that packages in /var/abs/local would be managed by pacman and I wouldn't have to worry about anything, but soon noticed that pacman doesn't seem to care what is in there, and will dutifully upgrade my packages as tho they were never changed.

I suppose my real issue is wanting to do things correctly.  With lack of an 'official' way of handling things my spidy sense goes up and I start second-guessing my choices.  Also, with pacman3 on the horizon I am afraid that since I'm no longer 'stock' things are going to go berzerk when it goes live.

Offline

Board footer

Powered by FluxBB