Bug 540354

Summary: clamav-filesystem preinstall scriptlet fails to create clamupdate user,group
Product: [Fedora] Fedora Reporter: Bruce Jerrick <bmj001>
Component: clamavAssignee: Enrico Scholz <rh-bugzilla>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: nb, redhat-bugzilla, rh-bugzilla, steve
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-01-17 10:08:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bruce Jerrick 2009-11-23 06:16:07 UTC
Description of problem:
NOTE: The cause of this problem is not in clamav-filesystem itself -- I am
submitting this report just to document the effects of a problem in
fedora-usermgmt-core .
I am also submitting a bug report for fedora-usermgmt-core which explains
the cause and gives a fix.
The problem reorted here should go away once fedora-usermgmt-core is fixed.

The maifestation of the problem is:
At installation of Fedora 12, the preinstall scriptlet of clamav-filesystem
fails to create user clamupdate and group clamupdate .  As a consequence,
some files installed by clamav-filesystem, clamav-data, and clamav-update
do not get installed with the correct user and group.

Version-Release number of selected component (if applicable):
Problem actually lies in fedora-usermgmt-core-0.10-4.fc12.noarch .

How reproducible:
It will depend on the order of package installation.  However, I see it with
both a large (2500+ package) install and a small (~700 package) install.

Steps to Reproduce:
1. Install Fedora 12, including packages clamav-filesystem, clamav-data, and
    clamav-update .
Check results:
2. grep -B1 -v "Installing" /root/install.log		# check for error msgs
3. rpm -V clamav-filesystem clamav-data clamav-update	# check user,group
4. grep clamupdate /etc/{passwd,group}			# check for existence
  
Actual results:
Installing clamav-filesystem-0.95.2-5.fc12.noarch
warning: user clamupdate does not exist - using root
warning: group clamupdate does not exist - using root
Installing clamav-data-0.95.2-5.fc12.noarch
warning: user clamupdate does not exist - using root
warning: group clamupdate does not exist - using root
warning: user clamupdate does not exist - using rootAnd indeed, the user and group of some files in these packages are not set
correctly to clamupdate, as show by 'rpm -V ...':
.....UG..    /var/lib/clamav			# package clamav-filesystem
.....UG..  c /var/lib/clamav/daily.cvd		# package clamav-data
.....UG..  c /var/lib/clamav/main.cvd		# package clamav-data

And there are no clamupdate entries in /etc/{passwd,group} .

Expected results:
No warnings, correct user and group.
No problems reported by 'rpm -V ...' .
/etc/{passwd,group} should have clamupdate entries.

Additional info:
As noted above, the cause of the problem is in fedora-usermgmt-core .
The manifestation occurs with the installation of clamav-filesystem --
/usr/sbin/{fedora-useradd,fedora-groupadd} both fail (silently, because
stdout and stderr are discarded).  The cause may be seen if those 
redirections (&>/dev/null) are removed from the preinstall scriptlet of
clamav-filesystem .
The cause is that prerequisites for /usr/share/fedora-usermgmt/wrapper
(to which fedora-useradd and fedora-groupadd are symlinked) are not being
installed when needed.
For the reason and a fix, see my bz #540352 for package fedora-usermgmt-core .

warning: group clamupdate does not exist - using root
Installing clamav-update-0.95.2-5.fc12.i686
/bin/chown: invalid group: `root:clamupdate'
warning: %post(clamav-update-0.95.2-5.fc12.i686) scriptlet failed, exit status 1

Comment 1 Enrico Scholz 2010-01-17 10:08:03 UTC
should be solved by recent fedora-usermgmt; please reopen when problem persists.