kr/beanstalkd — Issue #99: Issue installing via Yum
Author: njt1982
Created: 2012-02-09 12:05:43+00:00
State: open

I just tried to do a clean install of beanstalk on my local CentOS 5.6 VM. I'd already installed is on an RHEL and CentOS 5.5 box fine.

I was greeted by the erorr:
```
Running Transaction
Installing : beanstalkd-1.4.6-1.el6.x86_64 1/1
Non-fatal POSTIN scriptlet failure in rpm package beanstalkd-1.4.6-1.el6.x86_64
/usr/bin/install: invalid user `beanstalkd'
warning: %post(beanstalkd-1.4.6-1.el6.x86_64) scriptlet failed, exit status 1

Installed:
beanstalkd.x86_64 0:1.4.6-1.el6

Complete!
```

As a quick fix I have had to run:
$ sudo /usr/sbin/useradd -c "beanstalk user" -s /bin/false -r -m -d /var/lib/beanstalkd/ beanstalkd

Then install it. This worked.

My current (and only thought, as a non rpm-builder) is that the spec might be wrong?
https://github.com/kr/beanstalkd/blob/master/pkg/beanstalkd.spec.in
```
%pre
%{_sbindir}/useradd -c "beanstalkd user" -s /bin/false -r -m -d %{beanstalkd_home} %{beanstalkd_user} 2>/dev/null || :
```

My UserAdd isn't in /sbin/useradd - it's in /usr/sbin/useradd. Then again, I'm not sure what _sbindir gets set to during install.

Any thoughts?