Bug 1500336

Summary: redhat-release-7.5-0.7 ships systemd preset file in wrong directory
Product: Red Hat Enterprise Linux 7 Reporter: Lukas Slebodnik <lslebodn>
Component: redhat-releaseAssignee: Lubos Kocman <lkocman>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 7.5CC: azelinka, bhsharma, dtodorov, fweimer, jbastian, jpazdziora, jstodola, jvavra, mcermak, mcsontos, msekleta, tschelle
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: redhat-release-7.5-0.8.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1506384 (view as bug list) Environment:
Last Closed: 2018-04-10 10:17:23 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 Lukas Slebodnik 2017-10-10 12:08:51 UTC
Description of problem:
The latest upgrade the package redhat-release broke many tests because it changed location of systemd preset files and therefore many daemons are not started after booting machine

Version-Release number of selected component (if applicable):
sh$ rpm -q redhat-release
redhat-release-7.5-0.7.el7.x86_64

How reproducible:
Deterministic

Steps to Reproduce:
1. rpm -ql redhat-release | grep "/usr/lib/systemd/system-preset"

Actual results:
sh$ rpm -ql redhat-release | grep "/usr/lib/systemd/system-preset"
sh$ echo $?
1

Expected results:
sh$ rpm -ql redhat-release | grep "/usr/lib/systemd/system-preset"
/usr/lib/systemd/system-preset
/usr/lib/systemd/system-preset/85-display-manager.preset
/usr/lib/systemd/system-preset/90-default.preset

Additional info:
https://www.freedesktop.org/software/systemd/man/systemd.preset.html

Comment 3 Marian Csontos 2017-10-12 07:33:49 UTC
*** Bug 1500839 has been marked as a duplicate of this bug. ***

Comment 4 Marian Csontos 2017-10-12 07:40:25 UTC
...and sshd is not started among others so this breaks access to machine (unless one has remote console.)

Comment 5 Lukáš Nykrýn 2017-10-12 07:52:18 UTC
THis was caused by:
http://pkgs.devel.redhat.com/cgit/rpms/redhat-release/commit/?h=rhel-7.5&id=0dff430977d4da1215246d88b4732e1d84e35d90

/usr/lib/ should be replaced with %{_prefix}/lib and not by %{_libdir}

Comment 6 Martin Cermak 2017-10-12 08:07:15 UTC
*** Bug 1500850 has been marked as a duplicate of this bug. ***

Comment 7 Marian Csontos 2017-10-12 08:08:11 UTC
The following in kickstart's %post helps a bit:

    if [[ -f /usr/lib64/systemd/system-preset/90-default.preset ]]; then
      echo "Looks like we have an incorrect redhat-release '$(rpm -q redhat-release)'. Fixing..."
      ln -s -t /usr/lib/systemd/system-preset/ /usr/lib64/systemd/system-preset/*
      systemctl preset-all
    fi

Comment 8 Lubos Kocman 2017-10-13 06:05:52 UTC
I did exchange all of  _libdir back to prefix/lib. Seems like fedora-release uses hardcoded /usr/lib anyway.

Sorry for any inconvenience.

Comment 11 Michal Sekletar 2017-10-13 11:12:06 UTC
(In reply to Lubos Kocman from comment #8)
> I did exchange all of  _libdir back to prefix/lib. Seems like fedora-release
> uses hardcoded /usr/lib anyway.

That is because there is no macro for /usr/lib. /usr part of the path can be replaced with %{_prefix} which makes possible to build rpms for systems that didn't do usr-move (not relevant for RHEL or Fedora).

Comment 17 errata-xmlrpc 2018-04-10 10:17:23 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://access.redhat.com/errata/RHEA-2018:0700