Bug 550447

Summary: Drop dependency on policycoreutils
Product: [Fedora] Fedora Reporter: Ville Skyttä <ville.skytta>
Component: yum-cronAssignee: Habig, Alec <ahabig>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: ahabig, james.antill
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: yum-cron-0.9.2-1.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-11 07:18:54 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:
Attachments:
Description Flags
Use /bin/mail only if available
none
Test for restorecon before invoking it none

Description Ville Skyttä 2009-12-25 08:52:21 UTC
Created attachment 380291 [details]
Use /bin/mail only if available

yum-cron depends on mailx, which will pull in a tree of SELinux related dependencies which is annoying in small non-SELinux setups.

I can think of two easy ways to fix it:

1) Drop dependency on mailx, test for existence of /bin/mail before trying to use it.  See attached (untested) patch - also needs removal of Requires: mailx.

2) Use /usr/sbin/sendmail instead of "mail" to send the mail; drop dependency on mailx, add one on /usr/sbin/sendmail.  (There are small /usr/sbin/sendmail implementations in Fedora that have a very small dependency tree.)

Comment 1 Ville Skyttä 2009-12-25 09:01:10 UTC
Created attachment 380292 [details]
Test for restorecon before invoking it

Wow, I'm speechless... just... ignore the previous comment, please ;)

This one should make it possible to drop the dependency on policycoreutils.

Comment 2 Ville Skyttä 2009-12-25 09:28:00 UTC
Comment on attachment 380291 [details]
Use /bin/mail only if available

...but then again getting rid of the dependency on mailx wouldn't hurt either.

Comment 3 Habig, Alec 2009-12-30 17:26:23 UTC
Ok, makes sense.  Only thing to consider is if we need to warn the user somehow that all the mailing functionality isn't there.  Perhaps not, as one really has to try to set up a system without it, so such a person would already know.

Comment 4 Ville Skyttä 2009-12-30 19:13:23 UTC
Well, mailing functionality is still there if cron mails stuff, so I wouldn't personally bother with adding additional warnings, comments in config files are just fine.  Personally I would be just mildly annoyed if yum-cron warned me about it - I want only the regular cron mails, I don't want yet another config file to configure the target address for such mails.

It is actually very easy to come up with a setup that doesn't have mailx.  Just install Fedora in text mode (which equals minimal install) and you have one.  On the other hand sendmail is there also in those minimal installs.

Comment 5 Fedora Update System 2010-02-10 21:50:02 UTC
yum-cron-0.9.2-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/yum-cron-0.9.2-1.fc12

Comment 6 Habig, Alec 2010-02-10 21:51:24 UTC
Ville - your simple changes are in the above testing update.  If you're happy with it I'll push it to updates.

Comment 7 Ville Skyttä 2010-02-11 22:38:58 UTC
Yes, those look fine to me (ditto bug 550449).

Comment 8 Fedora Update System 2010-02-12 04:45:17 UTC
yum-cron-0.9.2-1.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update yum-cron'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-1794

Comment 9 Fedora Update System 2010-03-11 07:18:45 UTC
yum-cron-0.9.2-1.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.