Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 4 product line. The current stable release is 4.9. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 518785

Summary: restorecon: command not found after upgrade - leaves two samba-common versions
Product: Red Hat Enterprise Linux 4 Reporter: Gavin <gweight>
Component: sambaAssignee: Guenther Deschner <gdeschner>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: urgent    
Version: 4.7CC: azelinka, borgan, charlieb-fedora-bugzilla, dpal, gdeschner, jamundso, jwest, milan.kerslager, mpaesold, plyons, rbiba, slords, ssorce, tao, vincew
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: 518785
Fixed In Version: samba-3.0.33-0.29.el4 Doc Type: Bug Fix
Doc Text:
The 'restorecon' utility was required during the installation of the samba-common package. As a result, attempting to update samba without this utility installed may have failed with the following error message: /var/tmp/rpm-tmp.89611: line 7: restorecon: command not found The utility is now used when it is already present in the system only, and the package is now always updated as expected.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-16 14:22:26 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:
Bug Depends On:    
Bug Blocks: 629602    
Attachments:
Description Flags
error post samba-common scriptlet failed none

Description Gavin 2009-08-22 19:04:53 UTC
Created attachment 358324 [details]
error post samba-common scriptlet failed

Description of problem:
When upgrading my server which is SME Server based on RHEL 4.7 noting the yum transaction log shows scriptlet error (see attached)

Version-Release number of selected component (if applicable):

Below is the results of rpm -qa samba* which shows two samba-common -28 and -33 packages:

[root@example ~]# rpm -qa samba*
samba-common-3.0.33-0.17.el4
samba-client-3.0.33-0.17.el4
samba-common-3.0.28-0.el4.9
samba-3.0.33-0.17.el4
[root@example ~]#


How reproducible:

Upgrade server to update the samba packages

Additional info:

It seems the restorecon is related to selinux.

Please advise if you require more information.

Comment 1 Charlie Brady 2009-08-26 13:44:33 UTC
The script should only attempt to execute restorecon if it exists. selinux is optional.

Comment 2 Milan Kerslager 2009-10-28 13:08:56 UTC
The "%post common" sectin shuld use "restorecon" with path and with error-catching syntax:

if [ -x /sbin/restorecon ]; then
  /sbin/restorecon %{_sysconfdir}/samba/secrets.tdb || :
fi

Comment 4 Simo Sorce 2009-11-03 16:10:37 UTC
*** Bug 532469 has been marked as a duplicate of this bug. ***

Comment 7 Jerry Amundson 2009-12-04 16:15:38 UTC
This bug is still present in 3.0.33-0.18.

# rpm -qa samba\*
samba-client-3.0.33-0.18.el4_8
samba-common-3.0.28-0.el4.9
samba-common-3.0.33-0.18.el4_8
samba-common-3.0.33-0.17.el4
samba-3.0.33-0.18.el4_8

The suggestion in Comment #2 seems simple enough.

Comment 9 Michael Paesold 2010-02-16 20:22:59 UTC
What is the problem fixing this? Lack of motivation? It is affecting all default installs of RHEL 4 (or CentOS) on OpenVZ or Virtuozzo, because they include samba but not policycoreutils by default.

Please be so kind to fix this, it's really simple.

Comment 26 Martin Prpič 2011-02-16 13:21:36 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
The 'restorecon' utility was required during the installation of the samba-common package. As a result, attempting to update samba without this utility installed may have failed with the following error message: /var/tmp/rpm-tmp.89611: line 7: restorecon: command not found The utility is now used when it is already present in the system only, and the package is now always updated as expected.

Comment 27 errata-xmlrpc 2011-02-16 14:22:26 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0242.html