Bug 740422

Summary: broken postinstall and postuninstall scriptlets in selinux-policy and selinux-policy-targeted
Product: [Fedora] Fedora Reporter: Andre Robatino <robatino>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 16CC: dominick.grift, dwalsh, mgrepl, ricardo.arguello
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: 2011-09-22 08:21:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Andre Robatino 2011-09-22 01:34:05 UTC
Description of problem:
In selinux-policy-3.10.0-32.fc16.noarch's postuninstall scriptlet:

if [ $1 = 0 ]; then

In selinux-policy-targeted-3.10.0-32.fc16.noarch's postinstall scriptlet:

if [ $? = 0  -a "${SELINUXTYPE}" = targeted -a -f ${FILE_CONTEXT}.pre ]; then

Version-Release number of selected component (if applicable):
selinux-policy-3.10.0-32.fc16.noarch

Comment 1 Andre Robatino 2011-09-22 02:11:34 UTC
Same problem in selinux-policy-3.10.0-31.fc17.noarch and selinux-policy-targeted-3.10.0-31.fc17.noarch in Rawhide.

Comment 2 Andre Robatino 2011-09-22 02:24:01 UTC
Actually, I'm not sure this is a bug anymore (bash syntax isn't the same as C regarding the use of the = sign, it appears to be legitimate when doing string comparisons). Can someone check if this is a bug?

Comment 3 Andre Robatino 2011-09-22 02:38:49 UTC
Looking more like a false alarm as the same syntax occurs in F15's selinux-policy* packages. But I'll wait for someone to confirm before closing.

Comment 4 Miroslav Grepl 2011-09-22 08:21:24 UTC
Yes, this is ok. Closing this bug.

Comment 5 Daniel Walsh 2011-09-22 12:30:00 UTC
This is the equivalent of doing the test command

man test 
...
       STRING1 = STRING2
              the strings are equal