You are not logged in.

#1 2004-04-09 16:45:01

Mis'
Member
From: London
Registered: 2004-04-05
Posts: 10

/opt or /usr and pre_install

I have two questions:

1. when we should put a package in /opt instead of /usr tree
2. is there a pre_install function, so we can do something before installing package.  I tried install Leafnode on my fresh installed Arch Linux and I realised there is no user news (no group news either). If we have pre_install  pacman could make this user and group or at least informs admin that a package needs them... I'm sure there are more things that coud be done by this function.


"Real Men Use Telnet on port 80"    (el bid)

Offline

#2 2004-04-09 19:29:45

jon
Member
Registered: 2002-11-28
Posts: 87

Re: /opt or /usr and pre_install

I dont know if we have a specific rule, but usally it would only apply to a rather large package, like if we packaged America's Army (a game), it is rather large so that would most likely go in /opt but a program like nmap or abiword would go in /usr.

Good Luck

Offline

#3 2004-04-10 01:58:02

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: /opt or /usr and pre_install

...but large doesn't mean in this case lots of kb but lots of files so the application files can be "groupped" in some place (/opt/subdir) which makes them easier to be found. I think that's the idea (right? :-))

Offline

#4 2004-04-10 02:00:48

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: /opt or /usr and pre_install

oh and about pre_install - just read man makepkg - post_install should be what you are looking for.
EDIT: an alternative is to put pre installation commands inside build function in PKGBUILD just before make install.

Offline

#5 2004-06-20 13:15:12

bogomipz
Member
From: Oslo, Norway
Registered: 2003-11-23
Posts: 169

Re: /opt or /usr and pre_install

Putting commands in PKGBUILD is not an alternative to pre_install because a) it won't be running on the machines that you install the package on and b) it messes with things outside of $startdir when building. The latter should never be the case.

Pacman currently doesn't have a pre_install function, but that's proabably because you shouldn't need it. I can't think of anything you would do in pre_install that you can't do in post_install, and it would be dangerous because things would be performed even if the package install was aborted later.

You can add groups using post_install. The files in the package will have user and group set to fixed numbers anyway - the tar.gz archive doesn't use names for the ownerships.


All of your mips are belong to us!!

Offline

Board footer

Powered by FluxBB