Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1293513

Summary: The /etc/yum/yum-cron.conf file should be marked as a configuration file instead of a normal payload file
Product: Red Hat Enterprise Linux 7 Reporter: Nick <info>
Component: yumAssignee: Valentina Mukhamedzhanova <vmukhame>
Status: CLOSED ERRATA QA Contact: Eva Mrakova <emrakova>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.4CC: ajanorka, ajb, carlwgeorge, emrakova, fedora, frank.enderle, hajek, james.antill, klangga, martin.chlumsky, meli, mkalyat, redhatbugs, riehecky, tonysk8, toracat
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: yum-3.4.3-140.el7 Doc Type: Bug Fix
Doc Text:
Cause: Dues to a mistake, yum's spec file listed '/etc' directory. Consequence: Users encountered various issues mostly due to yum-cron's config files being owned by yum as well as yum-cron. Fix: Yum's spec file has been patched to list files properly. Result: Issues are resolved.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 05:31:01 UTC Type: Bug
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: 1326195    
Attachments:
Description Flags
Don't add /etc to the %files section of the cron package
none
explicitly list the bash completions directory none

Description Nick 2015-12-22 01:37:39 UTC
Description of problem:

The last CentOS upgrade from December 3, 2015 rpmsaved the /etc/yum/yum-cron.conf file and replaced it with the new one on bunch of the servers I manage, which had previously been configured with the following settings in the file:

update_messages = no
apply_updates = yes

to let all the systems auto-upgrade without sending notification messages. Unfortunately, both settings have been reversed by the last upgrade and my e-mail box is full of annoying notifications.

http://serverfault.com/questions/744531/secure-yum-cron-conf-configuration-and-prevent-them-from-getting-auto-updated

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Georg Sauthoff 2015-12-30 13:14:52 UTC
I can confirm this issue.

But is the component 'yum-utils' correct, though?

I would expect just 'yum'.

See also

https://bugs.centos.org/view.php?id=9938

and

http://unix.stackexchange.com/questions/252314/why-does-a-yum-package-update-replaces-my-yum-cron-config-files/

for more details.

Comment 3 Georg Sauthoff 2015-12-31 00:04:26 UTC
Created attachment 1110669 [details]
Don't add /etc to the %files section of the cron package

For a detailed explanation cf. http://unix.stackexchange.com/a/252424/1131

Comment 4 Carl George 2016-02-05 20:17:11 UTC
The bash-completion package is in RHEL7 now.

Additionally, the proposed fix is wrong.  It would result in comdir being set to /usr/share/bash-completion when bash-completion is installed.  Files from there aren't loaded, they have to be in /usr/share/bash-completion/completions.  That would break being able to consistently use %{compdir} as an install path for completion files, which is the whole point of the macro.

The safest way to fix this is be explicit:

%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
%global compdir %{_datadir}/bash-completion/completions
%else
%global compdir %{_sysconfdir}/bash_completion.d
%endif

Then later in the %files section:

%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
%(dirname %{compdir})
%else
%{compdir}
%endif

Comment 5 Carl George 2016-02-05 21:07:30 UTC
Created attachment 1121521 [details]
explicitly list the bash completions directory

Comment 6 Valentina Mukhamedzhanova 2016-02-19 16:24:09 UTC
*** Bug 1293713 has been marked as a duplicate of this bug. ***

Comment 9 Valentina Mukhamedzhanova 2016-05-10 15:45:24 UTC
(In reply to Carl George from comment #4)
> The bash-completion package is in RHEL7 now.
> 
> Additionally, the proposed fix is wrong.  It would result in comdir being
> set to /usr/share/bash-completion when bash-completion is installed.  Files
> from there aren't loaded, they have to be in
> /usr/share/bash-completion/completions.  That would break being able to
> consistently use %{compdir} as an install path for completion files, which
> is the whole point of the macro.
> 
> The safest way to fix this is be explicit:
> 
> %if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
> %global compdir %{_datadir}/bash-completion/completions
> %else
> %global compdir %{_sysconfdir}/bash_completion.d
> %endif
> 
> Then later in the %files section:
> 
> %if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
> %(dirname %{compdir})
> %else
> %{compdir}
> %endif

Thank you for the patch!

Comment 10 Valentina Mukhamedzhanova 2016-05-11 13:17:19 UTC
Had to make some changes to the Makefile as well, should be fixed now.

Comment 12 Valentina Mukhamedzhanova 2016-07-07 09:44:44 UTC
*** Bug 1353172 has been marked as a duplicate of this bug. ***

Comment 15 errata-xmlrpc 2016-11-04 05:31:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2397.html