Bug 1192276 - [PATCH] Make /etc/os-release a relative symlink
Summary: [PATCH] Make /etc/os-release a relative symlink
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-release
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dennis Gilmore
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-13 03:03 UTC by Colin Walters
Modified: 2015-02-24 17:20 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-24 17:20:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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


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