Bug 1192276

Summary: [PATCH] Make /etc/os-release a relative symlink
Product: [Fedora] Fedora Reporter: Colin Walters <walters>
Component: fedora-releaseAssignee: Dennis Gilmore <dennis>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dennis, jdisnard, pbrobinson
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-24 17:20:43 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:

Description Colin Walters 2015-02-13 03:03:37 UTC
From f1fb3f2a3a1bef34def842d2a0d56ac8be1d2ce9 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters>
Date: Thu, 12 Feb 2015 22:02:41 -0500
Subject: [PATCH] Make /etc/os-release a relative symlink, so processes
 accessing

  it from outside a running system can find the result.  For example,
  OSTree reads it from the *new* root when doing an upgrade, to compute
  a bootloader entry.
---
 fedora-release.spec | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/fedora-release.spec b/fedora-release.spec
index 77286fb..a9d8ec4 100644
--- a/fedora-release.spec
+++ b/fedora-release.spec
@@ -5,7 +5,7 @@
 Summary:        Fedora release files
 Name:           fedora-release
 Version:        23
-Release:        0.2
+Release:        0.3
 License:        MIT
 Group:          System Environment/Base
 URL:            http://fedoraproject.org
@@ -123,7 +123,7 @@ REDHAT_SUPPORT_PRODUCT_VERSION=%{bug_version}
 PRIVACY_POLICY=https://fedoraproject.org/wiki/Legal:PrivacyPolicy
 EOF
 
-ln -s /usr/lib/os-release $RPM_BUILD_ROOT/etc/os-release
+ln -s ../usr/lib/os-release $RPM_BUILD_ROOT/etc/os-release
 
 # Set up the dist tag macros
 install -d -m 755 $RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d
@@ -195,6 +195,12 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
 %{_datadir}/glib-2.0/schemas/org.gnome.shell.gschema.override
 
 %changelog
+* Fri Feb 13 2015 Colin Walters <walters> - 23-0.3
+- Make /etc/os-release a relative symlink, so processes accessing
+  it from outside a running system can find the result.  For example,
+  OSTree reads it from the *new* root when doing an upgrade, to compute
+  a bootloader entry.
+
 * Tue Feb 10 2015 Dennis Gilmore <dennis> 23-0.2
 - bump
 
-- 
1.8.3.1

Comment 1 Dennis Gilmore 2015-02-24 17:20:43 UTC
This has been fixed on F22 and rawhide