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

Remove pkg-config-lite from omnibus-toolchain binary path #32

Merged
merged 1 commit into from
Jan 6, 2025
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ This file is used to list changes made in each version of the cinc-omnibus cookb

## Unreleased

- Remove pkg-config-lite from omnibus-toolchain binary path
- Install pkgconf from distro as a replacement

## 1.2.1 - *2024-12-26*

- Use cinc omnibus-toolchain for RHEL-10
Expand Down
13 changes: 13 additions & 0 deletions libraries/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def omnibus_packages
libtool
ncurses-devel
openssh-clients
pkgconf
perl-Digest-SHA
perl-IPC-Cmd
perl-bignum
Expand All @@ -41,6 +42,7 @@ def omnibus_packages
libffi-devel
libtool
openssh-clients
pkgconf
perl-Digest-SHA
perl-IPC-Cmd
perl-bignum
Expand Down Expand Up @@ -75,6 +77,7 @@ def omnibus_packages
locales
locales-all
openssh-client
pkgconf
rsync
tar
tzdata
Expand All @@ -97,6 +100,7 @@ def omnibus_packages
libtool
ncurses-devel
openssh
pkgconf
rpm-build
rsync
tar
Expand Down Expand Up @@ -152,6 +156,15 @@ def omnibus_unsafe_deps
end
end

def omnibus_pkgconfig_files
%w(
/opt/omnibus-toolchain/bin/pkg-config
/opt/omnibus-toolchain/embedded/bin/pkg-config
/opt/omnibus-toolchain/LICENSES/pkg-config-lite-COPYING
/opt/omnibus-toolchain/embedded/share/aclocal/pkg.m4
)
end

def omnibus_env
node.run_state[:omnibus_env] ||= Hash.new { |hash, key| hash[key] = [] }
end
Expand Down
8 changes: 8 additions & 0 deletions recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@
action(windows? ? :install : :upgrade)
end

# TODO: Remove installed pkg-config-lite from omnibus-toolchain to prefer distro version
omnibus_pkgconfig_files.each do |f|
file f do
manage_symlink_source true
action :delete
end
end

group 'omnibus' do
append true
end
Expand Down
8 changes: 8 additions & 0 deletions test/integration/cinc-omnibus/controls/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
iproute
libtool
openssh-clients
pkgconf
perl-Digest-SHA
perl-IPC-Cmd
perl-bignum
Expand All @@ -30,6 +31,7 @@
libffi-devel
libtool
openssh-clients
pkgconf
perl-Digest-SHA
perl-IPC-Cmd
perl-bignum
Expand Down Expand Up @@ -62,6 +64,7 @@
locales
locales-all
openssh-client
pkgconf
rsync
tar
tzdata
Expand All @@ -84,6 +87,7 @@
iproute2
libtool
openssh
pkgconf
rpm-build
rsync
tar
Expand Down Expand Up @@ -115,6 +119,10 @@
it { should be_installed }
end

describe file '/opt/omnibus-toolchain/bin/pkg-config' do
it { should_not exist }
end

describe command '/opt/omnibus-toolchain/bin/ruby --version' do
its('exit_status') { should eq 0 }
end
Expand Down
Loading