Skip to content

Commit

Permalink
fish.spec: dependency on net-tools/hostname depending on platform
Browse files Browse the repository at this point in the history
Closes #2190.

[ci skip]
  • Loading branch information
zanchey committed Mar 6, 2016
1 parent 6bee85f commit ed4b789
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion fish.spec.in
Expand Up @@ -14,10 +14,16 @@ BuildRequires: ncurses-devel gettext gcc-c++ autoconf
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Requires: bc
Requires: python
Requires: python
Requires: which
Requires: man

%if 0%{?rhel_version} >= 700 || 0%{?centos_version} >= 700 || 0%{?fedora}
Requires: hostname
%else
Requires: net-tools
%endif

%description

fish is a shell geared towards interactive use. Its features are
Expand Down

7 comments on commit ed4b789

@simotek
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because SUSE people are slightly insane and don't give different versions between SUSE Enterprise and openSUSE Leap the if statement should contain the following as well || (0%{?suse_version} != 1315 || 0%{?is_opensuse})

@zanchey
Copy link
Member Author

@zanchey zanchey commented on ed4b789 Apr 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, to confirm, all versions of openSUSE except 1315 use the hostname package?

@simotek
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not quite, if its 1315 and 0%{?is_opensuse} is true then it also uses hostname, The problem is 1315 was originally SUSE Enterprise Linux, was 1315 then someone who didn't think enough decided that openSUSE Leap should have the same version, the problem is I don't know if 0%{?is_opensuse} is true for all versions of openSUSE (I am now trying to find that out) if thats the case you can just use 0%{?is_opensuse} for hostname

@simotek
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately 0%{?is_opensuse} is not true for openSUSE 13.2

@zanchey
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I'm going to need to try and be clear here if I'm going to make any headway.

What versions of openSUSE ship the hostname binary as part of the hostname package? How can these versions be specified in the RPM file?

What versions of openSUSE ship the hostname binary as part of the net-tools package? How can these versions be specified in the RPM file?

@simotek
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, this turns out quite simple as openSUSE 13.2 is still using net-tools

if 0%{?is_opensuse} is true
hostname
else
net-tools
end

That will cover every version of openSUSE and SLE

@zanchey
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I've merged that for the 2.3 branch and will merge back to master soon.

Please sign in to comment.