[opensuse-buildservice] Cannot lock group file: already locked error during build

Hello, I'm adding a group during the %prep stage of a package and the groupadd fails with the error "Cannot lock group file: already locked." when a building on OBS. This is something special I need to do to create the group during %prep? Package and the build log. https://build.opensuse.org/package/show?package=rt&project=home%3Adeadpoint https://build.opensuse.org/package/live_build_log?arch=i586&package=rt&proje... -- Later, Darin -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

Darin Perusich wrote:
I'm adding a group during the %prep stage of a package and the groupadd fails with the error "Cannot lock group file: already locked." when a building on OBS. This is something special I need to do to create the group during %prep?
You simply don't do that. rt3 required patching the Makefile to disable some chown calls IIRC. You may need that too. If you want to package rt you should better base your spec file on the Fedora one (rt3) rather than starting from scratch anyways. cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.de/ SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

On Thu, Sep 29, 2011 at 11:11 AM, Ludwig Nussel <ludwig.nussel@suse.de> wrote:
Darin Perusich wrote:
I'm adding a group during the %prep stage of a package and the groupadd fails with the error "Cannot lock group file: already locked." when a building on OBS. This is something special I need to do to create the group during %prep?
You simply don't do that. rt3 required patching the Makefile to disable some chown calls IIRC. You may need that too. If you want to package rt you should better base your spec file on the Fedora one (rt3) rather than starting from scratch anyways.
I'll take a look at the Fedora patches to see how they circumvent this. I'm not basing my package off that spec because I want RT installed under a central location /opt/rt4 which makes it much easier to maintain. I have a hard time believing that creating a user/group during the build process is something you "simply don't do". Having maintained the mailman package a long time ago for another build project, on Solaris, I needed to create the user/group to build and after reviewing the OpenSUSE mailman.spec in OBS I see that it's doing just that during %build. I'm not trying to be difficult but rather pointing out that SuSE is doing this very thing. Thanks! -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

Darin Perusich wrote:
On Thu, Sep 29, 2011 at 11:11 AM, Ludwig Nussel <ludwig.nussel@suse.de> wrote:
Darin Perusich wrote:
I'm adding a group during the %prep stage of a package and the groupadd fails with the error "Cannot lock group file: already locked." when a building on OBS. This is something special I need to do to create the group during %prep?
You simply don't do that. rt3 required patching the Makefile to disable some chown calls IIRC. You may need that too. If you want to package rt you should better base your spec file on the Fedora one (rt3) rather than starting from scratch anyways.
I'll take a look at the Fedora patches to see how they circumvent this. I'm not basing my package off that spec because I want RT installed under a central location /opt/rt4 which makes it much easier to maintain.
That's a violation of FHS that is not allowed for new openSUSE packages though.
I have a hard time believing that creating a user/group during the build process is something you "simply don't do". Having maintained the mailman package a long time ago for another build project, on Solaris, I needed to create the user/group to build and after reviewing the OpenSUSE mailman.spec in OBS I see that it's doing just that during %build. I'm not trying to be difficult but rather pointing out that SuSE is doing this very thing.
Well, noone said every single package in the distro could serve as role model for good packaging :-) You found one that needs some love. Those calls in %build fail too of course. Noone notices though due to "2>/dev/null || :" cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.de/ SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

On Do 29 Sep 2011 15:21:15 CEST Darin Perusich <darin@darins.net> wrote:
Package and the build log. https://build.opensuse.org/package/show?package=rt&project=home%3Adeadpoint https://build.opensuse.org/package/live_build_log?arch=i586&package=rt&proje...
Please have a look at: https://build.opensuse.org/package/show?package=request-tracker&project=home... (^^^one line) Which is nearly finished from my side (I'm just thinking if I should rename it to request-tracker4 to allow parallel installation of different versions and add some additional apache configs and modules). You can also see a patch there disabling the chown/chgrp and fixing install in the Makefile. Another patch allows to use Perl libs from additional packages instead of the system ones, which are sometimes too old. With kind regards, Lars -- Lars Vogdt <Lars.Vogdt@suse.com> - OPS Engineering Services Teamlead - SUSE Linux Products GmbH - GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer Maxfeldstraße 5, 90409 Nuernberg, Germany - HRB 16746 (AG Nuernberg) -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (3)
-
Darin Perusich
-
Lars Vogdt
-
Ludwig Nussel