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 - The /etc/yum/yum-cron.conf file should be marked as a configuration file instead of a normal payload file
Summary: The /etc/yum/yum-cron.conf file should be marked as a configuration file inst...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: yum
Version: 7.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Valentina Mukhamedzhanova
QA Contact: Eva Mrakova
URL:
Whiteboard:
: 1293713 1353172 (view as bug list)
Depends On:
Blocks: 1326195
TreeView+ depends on / blocked
 
Reported: 2015-12-22 01:37 UTC by Nick
Modified: 2019-12-16 05:13 UTC (History)
16 users (show)

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.
Clone Of:
Environment:
Last Closed: 2016-11-04 05:31:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Don't add /etc to the %files section of the cron package (777 bytes, patch)
2015-12-31 00:04 UTC, Georg Sauthoff
no flags Details | Diff
explicitly list the bash completions directory (1.23 KB, patch)
2016-02-05 21:07 UTC, Carl George
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2397 0 normal SHIPPED_LIVE yum bug fix and enhancement update 2016-11-03 13:55:12 UTC

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


Note You need to log in before you can comment on or make changes to this bug.