Bug 94161 - snort ebuild snort-2.3.3-r1 problem
Bug#: 94161 Product:  Gentoo Linux Version: 2005.0 Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: netmon@gentoo.org Reported By: kakou@kakou.org
Component: Applications
URL: 
Summary: snort ebuild snort-2.3.3-r1 problem
Keywords:  
Status Whiteboard: 
Opened: 2005-05-27 03:44 0000
Description:   Opened: 2005-05-27 03:44 0000
when I try to install snort 

emerge -pv =net-analyzer/snort-2.3.3-r1

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild     U ] net-analyzer/snort-2.3.3-r1 [2.3.2-r1] -debug -flexresp -inline
+mysql -odbc -postgres +prelude (-selinux) -sguil +snortsam +ssl 0 kB 

Total size of downloads: 0 kB


____________________
> Completed installing snort-2.3.3-r1 into /var/tmp/portage/snort-2.3.3-r1/image/

>>> Merging net-analyzer/snort-2.3.3-r1 to /
/usr/portage/net-analyzer/snort/snort-2.3.3-r1.ebuild: line 96: 14826 Broken
pipe             usermod -d "/var/log/snort" snort

!!! ERROR: net-analyzer/snort-2.3.3-r1 failed.
!!! Function pkg_preinst, Line 99, Exitcode 141
!!! usermod problem
!!! If you need support, post the topmost build error, NOT this status message.

!!! FAILED preinst: 1
______________________

the error is  the line

    usermod -g "snort" snort || die "usermod problem"

from 

pkg_preinst() {
    enewgroup snort
    enewuser snort -1 /bin/false /var/log/snort snort
    usermod -d "/var/log/snort" snort || die "usermod problem"
    usermod -g "snort" snort || die "usermod problem"
    usermod -s "/bin/false" snort || die "usermod problem"
    echo "ignore any message about CREATE_HOME above..."
}


Reproducible: Always
Steps to Reproduce:
1.  emerge -pv =net-analyzer/snort-2.3.3-r1
2.
3.

------- Comment #1 From Marcelo Goes 2005-06-19 13:55:10 0000 -------
I can't reproduce your problem and that portion of the ebuild is present in
older ebuilds, can you still reproduce it?

------- Comment #2 From Marco Morales 2005-07-16 22:05:41 0000 -------
Created an attachment (id=63586) [details]
snort-2.3.3-r1.ebuild.diff

Maybe a fix like this could help ;)

------- Comment #3 From Marco Morales 2005-07-16 22:35:09 0000 -------
Created an attachment (id=63587) [details]
snort-2.3.3-r1.ebuild.diff

Sorry previous one had an error coz i still used /var/log/snort as home... is
it really necessary? i just made /dev/null as home in this one...

------- Comment #4 From Marcelo Goes 2005-07-25 13:09:16 0000 -------
In fact, I don't think it is necessary. And indeed, that stuff should be in
pkg_setup() and not pkg_preinst(). Fixed in cvs.
Thanks for reporting.