Bug 586513

Summary: pure-ftpd-selinux %preun invokes pure-ftpd
Product: [Fedora] Fedora Reporter: Jerry James <loganjerry>
Component: pure-ftpdAssignee: Aurelien Bompard <gauret>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: gauret
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: pure-ftpd-1.0.29-2.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-04-28 22:45:50 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 Jerry James 2010-04-27 19:13:31 UTC
Description of problem:
I installed pure-ftpd and pure-ftpd-selinux on my desktop machine temporarily in order to diagnose an FTP-related problem we were having in our internal company network.  When I tried to uninstall, I got this:

# rpm -e pure-ftpd pure-ftpd-selinux
warning: /etc/pure-ftpd/pure-ftpd.conf saved as /etc/pure-ftpd/pure-ftpd.conf.rpmsave
pure-ftpd not found
error: %preun(pure-ftpd-selinux-1.0.29-1.fc12.x86_64) scriptlet failed, exit status 1

and now pure-ftpd is uninstalled, but pure-ftpd-selinux is not.  In the spec file, I see this:

%preun selinux
if [ "$1" -lt "1" ]; then # Final removal
    semodule -r pureftpd 2>/dev/null || :
    fixfiles -R pure-ftpd restore
    /sbin/service pure-ftpd condrestart > /dev/null 2>&1 
fi

The "service" line fails if the main package has already been uninstalled.  This line should either be allowed to fail, or else the dependency of that script on the main package should be made explicit.

Version-Release number of selected component (if applicable):
pure-ftpd-1.0.29-1.fc12.x86_64

How reproducible:
Always

Steps to Reproduce:
1. yum install pure-ftpd pure-ftpd-selinux
2. rpm -e pure-ftpd pure-ftpd-selinux
  
Actual results:
The uninstallation fails while processing the %preun script of pure-ftpd-selinux.

Expected results:
Complete uninstallation.

Additional info:

Comment 1 Aurelien Bompard 2010-04-28 06:20:37 UTC
Thanks for reporting this ! I've fixed the bug in CVS, the update is building right now.

Comment 2 Fedora Update System 2010-04-28 06:24:12 UTC
pure-ftpd-1.0.29-2.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/pure-ftpd-1.0.29-2.fc12

Comment 3 Fedora Update System 2010-04-28 22:45:46 UTC
pure-ftpd-1.0.29-2.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 4 Fedora Update System 2010-05-13 18:07:29 UTC
pure-ftpd-1.0.29-1.el5.1 has been submitted as an update for Fedora EPEL 5.
http://admin.fedoraproject.org/updates/pure-ftpd-1.0.29-1.el5.1

Comment 5 Fedora Update System 2010-06-03 15:01:44 UTC
pure-ftpd-1.0.29-1.el5.1 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.