Bug 1039878

Summary: /etc/os-release should be marked as a config file
Product: Red Hat Enterprise Linux 7 Reporter: Lukáš Nykrýn <lnykryn>
Component: redhat-releaseAssignee: Daniel Mach <dmach>
Status: CLOSED CURRENTRELEASE QA Contact: Release Test Team <release-test-team>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: alikins, mganisin, pholica, riehecky
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 09:56:17 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:

Description Lukáš Nykrýn 2013-12-10 08:53:29 UTC
Description of problem:
In rhel7 we have a tool name brandbot which modifies pretty_name in /etc/os-release to correspond to the actual product name customers bought to
the user.

Unfortunately /etc/os-release is not marked as a configuration file, so this change will be overwritten by the next update of redhat-release.

Please note that this change should be done in all redhat-release-* packages.


diff --git a/redhat-release-server.spec b/redhat-release-server.spec
index 152abc9..fbddf1a 100644
--- a/redhat-release-server.spec
+++ b/redhat-release-server.spec
@@ -100,7 +100,7 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(0644,root,root,0755)
 /etc/redhat-release
 /etc/system-release
-/etc/os-release
+%config(noreplace) /etc/os-release
 %config /etc/system-release-cpe
 %config(noreplace) /etc/issue
 %config(noreplace) /etc/issue.net

Comment 4 Ludek Smid 2014-06-13 09:56:17 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

Comment 6 Adrian Likins 2015-09-30 17:33:49 UTC
This is closed already, but related to https://bugzilla.redhat.com/show_bug.cgi?id=1257142 I think this is could be NOTABUG.

A redhat-release-* update overwriting /etc/os-release is ok. If the system is using subscriptions with branding info, subscriptions-manager and brandbot will update it to the branded name at the first opportunity (which is typically the next time entitlement certs are updated, either via subscription-manager user interaction or automatically via rhsmcertd). 

So PRETTY_NAME could stay unbranded for some time period, but I think that's acceptable. If needed more immediately redhat-release-* could poke brandbot.service in post (or updated /var/lib/rhsm/branded_name so brandbot.path triggers, etc).