You are not logged in.

#1 2006-09-13 23:22:07

ralsina
Member
Registered: 2006-09-13
Posts: 7

User creation in PKGBUILD

I am packaging munin, and it requires a munin user and group before "make install".

The same thing is true, for example, for qmail (it actually requires about 5 users).

Is there any policy about how to handle these? I can't find a way to tell useradd to create an account with a low ID. And anyway, since mysql and named expects to have a certain fixed UID in their startup scripts, that would be dangerous.

So: do I create a regular user? Suggestions?

Offline

#2 2006-09-14 01:27:42

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

Re: User creation in PKGBUILD

There are plenty of packages in both the official repos and the AUR that create their own user, but standard practice is to do it in the install script, which wouldn't be before make install. It doesn't make sense to me to create users in the PKGBUILD - firstly, it won't work if you're building as user, and secondly, if you install the package on a different machine, the required user won't be there.

Are you sure you need it before make install?

Offline

#3 2006-09-14 02:05:59

ralsina
Member
Registered: 2006-09-13
Posts: 7

Re: User creation in PKGBUILD

tomk wrote:

Are you sure you need it before make install?

Yes, because the Makefile's install target checks that the user exists :-(

So, I decided to create the user on the install script, but you need a munin user in your system to build the package.

Offline

#4 2006-09-14 02:45:15

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: User creation in PKGBUILD

ralsina wrote:

Yes, because the Makefile's install target checks that the user exists :-(

You could comment those lines out of the makefile using sed or a patch, assuming the PKGBUILD will create the user for it later and the binary won't choke.

Dusty

Offline

#5 2006-09-14 03:45:23

ralsina
Member
Registered: 2006-09-13
Posts: 7

Re: User creation in PKGBUILD

Dusty wrote:

You could comment those lines out of the makefile using sed or a patch, assuming the PKGBUILD will create the user for it later and the binary won't choke.

Dusty

Will try that.

Offline

Board footer

Powered by FluxBB