Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add rpm dependency on /bin/ps from procps[-ng] packages #1995

Merged
merged 1 commit into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions build/rpm/pcp.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ ExcludeArch: %{ix86}
%global __python2 python
%endif

# UsrMerge was completed in EL 7, however the latest 'hostname' package in EL 7 contains "Provides: /bin/hostname"
# UsrMerge was completed in EL 7, however the latest 'hostname' package in EL 7 contains "Provides: /bin/hostname". Likewise for /bin/ps from procps[-ng] packages.
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 17
%global _hostname_executable /usr/bin/hostname
%global _ps_executable /usr/bin/ps
%else
%global _hostname_executable /bin/hostname
%global _ps_executable /bin/ps
%endif

# prevent conflicting binary and man page install for pcp(1)
Expand Down Expand Up @@ -113,7 +115,7 @@ BuildRequires: qt5-qtsvg-devel
%endif
%endif
%if "%{_vendor}" == "redhat"
BuildRequires: %{_hostname_executable}
BuildRequires: %{_hostname_executable} %{_ps_executable}
%if "@enable_systemd@" == "false"
BuildRequires: initscripts
%endif
Expand All @@ -138,7 +140,7 @@ BuildRequires: readline-devel
# Utilities used indirectly e.g. by scripts we install
Requires: bash xz gawk sed grep coreutils diffutils findutils
%if "%{_vendor}" == "redhat"
Requires: %{_hostname_executable}
Requires: %{_hostname_executable} %{_ps_executable}
%endif
# which(1) comes from different places
%if 0%{?suse_version} >= 1100
Expand Down
7 changes: 5 additions & 2 deletions build/rpm/redhat.spec
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ ExcludeArch: %{ix86}
%global __python2 python
%endif

# UsrMerge was completed in EL 7, however the latest 'hostname' package in EL 7 contains "Provides: /bin/hostname"
# UsrMerge was completed in EL 7, however the latest 'hostname' package in EL 7 contains "Provides: /bin/hostname". Likewise for /bin/ps from procps[-ng] packages.
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 17
%global _hostname_executable /usr/bin/hostname
%global _ps_executable /usr/bin/ps
%else
%global _hostname_executable /bin/hostname
%global _ps_executable /bin/ps
%endif

%global disable_perl 0
Expand Down Expand Up @@ -300,6 +302,7 @@ BuildRequires: perl(ExtUtils::MakeMaker) perl(LWP::UserAgent) perl(JSON)
BuildRequires: perl(Time::HiRes) perl(Digest::MD5)
BuildRequires: perl(XML::LibXML) perl(File::Slurp)
BuildRequires: %{_hostname_executable}
BuildRequires: %{_ps_executable}
%if !%{disable_systemd}
BuildRequires: systemd-devel
%endif
Expand All @@ -316,7 +319,7 @@ BuildRequires: qt5-qtsvg-devel

# Utilities used indirectly e.g. by scripts we install
Requires: bash xz gawk sed grep coreutils diffutils findutils
Requires: which %{_hostname_executable}
Requires: which %{_hostname_executable} %{_ps_executable}
Requires: pcp-libs = %{version}-%{release}

%if !%{disable_selinux}
Expand Down
Loading