| Summary: | rpm-ostree install fails due to missing os-release | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Michael Nguyen <mnguyen> |
| Component: | rpm-ostree-client | Assignee: | Colin Walters <walters> |
| Status: | CLOSED ERRATA | QA Contact: | atomic-bugs <atomic-bugs> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.3 | CC: | lfriedma, miabbott |
| Target Milestone: | rc | Keywords: | Extras |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-12-06 21:02:15 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
Michael Nguyen
2016-11-29 17:12:44 UTC
Testing this now if anyone else wants to eyeball it:
diff --git a/redhat-release-atomic-host.spec b/redhat-release-atomic-host.spec
index 21cd874..effbd7e 100644
--- a/redhat-release-atomic-host.spec
+++ b/redhat-release-atomic-host.spec
@@ -5,7 +5,7 @@
%define variant_titlecase Atomic Host
%define variant_titlecase_concat AtomicHost
%define variant_lowercase atomic-host
-%define release_pkg_version 20160824.0
+%define release_pkg_version 20161129.0
%define base_release_version 7
%define full_release_version 7.3
%define dist_release_version 7
@@ -14,7 +14,7 @@
Name: redhat-release-atomic-host
Version: %{full_release_version}
-Release: %{release_pkg_version}.atomic%{?dist}.3
+Release: %{release_pkg_version}.atomic%{?dist}.4
Summary: %{product_family}%{?variant_titlecase: %{variant_titlecase}} release file
Group: System Environment/Base
License: GPLv2
@@ -42,17 +42,19 @@ rm -rf %{buildroot}
# create /etc
mkdir -p %{buildroot}/etc
+mkdir -p %{buildroot}/usr/lib/
mkdir -p %{buildroot}/etc/pki/product
cp %{SOURCE3} %{buildroot}/etc/pki/product/271.pem
cp %{SOURCE4} %{buildroot}/etc/pki/product/69.pem
# create /etc/system-release and /etc/redhat-release
-echo "%{product_family}%{?variant_titlecase: %{variant_titlecase}} release %{full_release_version}%{?beta: %{beta}}" > %{buildroot}/etc/redhat-release
-ln -s redhat-release %{buildroot}/etc/system-release
+echo "%{product_family}%{?variant_titlecase: %{variant_titlecase}} release %{full_release_version}%{?beta: %{beta}}" > %{buildroot}/usr/lib/redhat-release
+ln -s ../usr/lib/redhat-release %{buildroot}/etc/system-release
+ln -s ../usr/lib/redhat-release %{buildroot}/etc/redhat-release
# create /etc/os-release
-cat << EOF >>%{buildroot}/etc/os-release
+cat << EOF >>%{buildroot}/usr/lib/os-release
NAME="%{product_family}%{?variant_titlecase: %{variant_titlecase}}"
VERSION="%{full_release_version}"
ID="rhel"
@@ -71,8 +73,10 @@ REDHAT_BUGZILLA_PRODUCT_VERSION=%{full_release_version}
REDHAT_SUPPORT_PRODUCT="%{product_family}"
REDHAT_SUPPORT_PRODUCT_VERSION=%{full_release_version}
EOF
+ln -s ../usr/lib/os-release %{buildroot}/etc/os-release
# write cpe to /etc/system/release-cpe
-echo "cpe:/o:redhat:enterprise_linux:%{full_release_version}:%{?beta:beta}%{!?beta:GA}%{?variant_lowercase::%{variant_lowercase}}" | tr [A-Z] [a-z] > %{buildroot}/etc/system-release-cpe
+echo "cpe:/o:redhat:enterprise_linux:%{full_release_version}:%{?beta:beta}%{!?beta:GA}%{?variant_lowercase::%{variant_lowercase}}" | tr [A-Z] [a-z] > %{buildroot}/usr/lib/system-release-cpe
+ln -s ../usr/lib/system-release-cpe %{buildroot}/etc/system-release-cpe
# create /etc/issue and /etc/issue.net
echo '\S' > %{buildroot}/etc/issue
@@ -137,6 +141,9 @@ rm -rf %{buildroot}
%defattr(0644,root,root,0755)
/etc/redhat-release
/etc/system-release
+%{_prefix}/lib/os-release
+%{_prefix}/lib/redhat-release
+%{_prefix}/lib/system-release-cpe
%config(noreplace) /etc/os-release
%config /etc/system-release-cpe
%config(noreplace) /etc/issue
@@ -156,6 +163,11 @@ rm -rf %{buildroot}
%dir /etc/cockpit/ws-certs.d
%changelog
+* Tue Nov 29 2016 walters - 7.3-20161129.0.atomic.el7.4
+- Switch to /usr/lib/os-release to work around
+ https://github.com/rpm-software-management/libhif/pull/215
+ Resolves: #1399770
+
* Wed Aug 24 2016 Colin Walters <walters>
- Update version, add VARIANT/VARIANT_ID; see
https://github.com/CentOS/sig-atomic-buildscripts/issues/61
(In reply to Colin Walters from comment #2) > Testing this now if anyone else wants to eyeball it: My eyeballs say LGTM I tried to 'ostree admin unlock && rpm -Uhv' the new 'redhat-release-atomic-host' package to verify the fix, but that didn't seem to work. However, after making a custom compose with the new package and rebasing to it I was able to successfully 'rpm-ostree install' a package again. 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://access.redhat.com/errata/RHBA-2016:2864 |