Bug 919468 - File based requires in Fedora 19 change
Summary: File based requires in Fedora 19 change
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 1.10
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space20
TreeView+ depends on / blocked
 
Reported: 2013-03-08 15:03 UTC by Miroslav Suchý
Modified: 2013-08-02 12:56 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-02 12:56:18 UTC
Embargoed:


Attachments (Terms of Use)

Description Miroslav Suchý 2013-03-08 15:03:01 UTC
Spacewalk use file based requires on several place. And since /sbin path was not provided by any macro, it is hardcoded in spec files.
But in Fedora 17 was moved /sbin to /usr/sbin.
Two releases were left for transition and in Fedora 17 and 18 was this path provided by rpm.
But in Fedora 17 is this path not provided.

Therefore all requires in form:

Requires: /sbin/foo

need to be rewriten to:

%if 0%{?fedora} > 17
Requires: %{_sbindir}/foo
%else
Requires: /sbin/foo
%endif

I made this change for package which are in Fedora and which I maintain. But my grep shows other occurences:

See:
$ git grep Requires |grep sbin
in root of Spacewalk.git

$ git grep Requires |grep sbin |wc -l
40

Comment 1 Jan Pazdziora 2013-03-08 19:27:31 UTC
Couldn't we just ship the

/sbin -> /usr/sbin

symlink in Spacewalk?

Comment 2 Miroslav Suchý 2013-03-11 09:10:31 UTC
No. Because this will not change "Provides" of affected packages.

I.e. if coreutils.fc19 provides:
  /usr/sbin/runuser
And Spacewalk require:
  Requires: /sbin/runuser

and if you will provides 
  /sbin -> /usr/sbin
in one of spacewalk packages, it will have no effect on provides of package coreutils.
And yum will not be able to resolve
  Requires: /sbin/runuser
even if you will be able run
  /sbin/runuser
with coreutils installed and symlink on place.

Comment 3 Jan Pazdziora 2013-03-12 14:49:41 UTC
Wouldn't

%{!?_sbindir: %define _sbindir /sbin}
Requires: %{_sbindir}/foo

be cleared than having that

%if 0%{?fedora} > 17

branching there?

Comment 4 Miroslav Suchý 2013-03-13 08:55:53 UTC
No. Because _sbindir exist in all distribution (at least F16+, RHEL6+) and always pointed to /usr/sbin

Do not confuse /usr/sbin for which always existed %{_sbindir} and /sbin which is used for some binaries in RHEL6 and F16.

Comment 5 Michael Mráka 2013-03-22 15:45:31 UTC
Fixed in Spacewalk master by
commit 20460363e95e901897c313088d40020bbde2e5a2
       919468 - fixed path in file based Requires

Comment 6 Tomáš Kašpárek 2013-08-02 12:56:18 UTC
Fix for this bug is present in Spacewalk 2.0, closing this bug as CURRENTRELEASE.


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