Mailinglist Archive: opensuse-buildservice (312 mails)

< Previous Next >
[opensuse-buildservice] Query re 'useradd' and 'userdel' commands.
  • From: <doiggl@xxxxxxxxxxxxxxxxxx>
  • Date: Wed, 22 Jul 2009 21:39:41 +1000
  • Message-id: <b325841f965331d8a072cc8725ea1c13@xxxxxxxxxxxxxxxxxxxxxxx>
Another application I'm interested in building is called Cricket v1.0.5
Home url:

So far its unpacked and it fails on command useradd and I suspect the
userdel command will fail too.

The build log so far says:

Checking for unpackaged file(s): /usr/lib/rpm/check-files
Checking for unpackaged file(s): /usr/lib/rpm/check-files
Wrote: /usr/src/packages/SRPMS/cricket-1.0.5-11.1.src.rpm
Wrote: /usr/src/packages/RPMS/x86_64/cricket-1.0.5-11.1.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.11461
+ umask 022
+ cd /usr/src/packages/BUILD
+ cd cricket-1.0.5
+ /bin/rm -rf /var/tmp/cricket-1.0.5-11.1-root
+ exit 0
... checking for files with abuild user/group
... running 00-check-install-rpms
... installing all built rpms
Preparing packages for installation...
/var/tmp/rpm-tmp.11461: line 3: useradd: command not found
error: %pre(cricket-1.0.5-11.1.x86_64) scriptlet failed, exit status 127
error: install: %pre scriptlet failed (2), skipping cricket-1.0.5-11.1
failed to install rpms, aborting build
System halted.

The spec file (cricket.spec&) has in it:

id cricket >/dev/null 2>&1
if [ $? -ne 0 ]; then
useradd -r -d %{_libdir}/%{name} -c "Cricket SNMP Monitor" cricket

if [ $1 -eq 0 ]; then
userdel cricket

Other info:
# which useradd
# which userdel

Build log ->
cricket.spec ->

Question: How can I ensure the 'useradd' and 'userdel' routines in the %pre
and %postun sections run without error and do I get those commands enabled

Thanks Glenn

To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >