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

Cannot build chef from source using omnibus #14106

Open
dyatlov opened this issue Nov 28, 2023 · 1 comment
Open

Cannot build chef from source using omnibus #14106

dyatlov opened this issue Nov 28, 2023 · 1 comment
Labels
Status: Untriaged An issue that has yet to be triaged.

Comments

@dyatlov
Copy link

dyatlov commented Nov 28, 2023

Description

Since 18th version chef cannot be built from source using Omnibus.
It complains that chef-foundation cannot be found:

# /tmp/sre-ruby/bin/bundle exec omnibus build chef
                    [CLI] I | 2023-11-28T14:15:15+00:00 | Using config from 'omnibus.rb'
Building chef 18.3.58-20231128141515...
[Software: chef-foundation] I | 2023-11-28T14:15:15+00:00 | Resolving manifest entry for chef-foundation
         [Software: chef] I | 2023-11-28T14:15:15+00:00 | Resolving manifest entry for chef
[PathFetcher: chef-foundation] I | 2023-11-28T14:15:15+00:00 | Digesting /var/cache/omnibus/src/chef-foundation/chef-foundation with sha256
      [PathFetcher: chef] I | 2023-11-28T14:15:15+00:00 | Digesting /var/cache/omnibus/src/chef/chef with sha256
[PathFetcher: chef-foundation] I | 2023-11-28T14:15:15+00:00 | Digesting /opt/chef with sha256
      [PathFetcher: chef] I | 2023-11-28T14:15:15+00:00 | Digesting /root/chef/omnibus/files/../.. with sha256
[Software: shebang-cleanup] I | 2023-11-28T14:15:15+00:00 | Resolving manifest entry for shebang-cleanup
[NullFetcher: shebang-cleanup] I | 2023-11-28T14:15:15+00:00 | Fetching `shebang-cleanup' (nothing to fetch)
 [Software: ruby-cleanup] I | 2023-11-28T14:15:15+00:00 | Resolving manifest entry for ruby-cleanup
[NullFetcher: ruby-cleanup] I | 2023-11-28T14:15:15+00:00 | Fetching `ruby-cleanup' (nothing to fetch)
[Software: more-ruby-cleanup] I | 2023-11-28T14:15:15+00:00 | Resolving manifest entry for more-ruby-cleanup
[PathFetcher: more-ruby-cleanup] I | 2023-11-28T14:15:15+00:00 | Digesting /var/cache/omnibus/src/more-ruby-cleanup with sha256
[PathFetcher: more-ruby-cleanup] I | 2023-11-28T14:15:15+00:00 | Digesting /root/chef/omnibus/files/more-ruby-cleanup with sha256
         [Software: zlib] I | 2023-11-28T14:15:15+00:00 | Resolving manifest entry for zlib
       [NetFetcher: zlib] I | 2023-11-28T14:15:15+00:00 | Downloading from `https://zlib.net/fossils/zlib-1.2.13.tar.gz'
      [PathFetcher: chef] I | 2023-11-28T14:15:16+00:00 | Copying from `/root/chef/omnibus/files/../..'
      [PathFetcher: chef] I | 2023-11-28T14:15:17+00:00 | Digesting /var/cache/omnibus/src/chef/chef with sha256
Time: 00:00:01 ================================================================= 100% (1462 KB/sec)
       [NetFetcher: zlib] I | 2023-11-28T14:15:17+00:00 | Verifying checksum
              [Licensing] I | 2023-11-28T14:15:18+00:00 | Project 'chef' is using 'Chef EULA' which is not one of the standard licenses identified in https://opensource.org/licenses/alphabetical. Consider using one of the standard licenses.
[Software: chef-foundation] I | 2023-11-28T14:15:18+00:00 | Could not restore from cache
[Builder: chef-foundation] I | 2023-11-28T14:15:18+00:00 | Starting build
[Builder: chef-foundation] I | 2023-11-28T14:15:18+00:00 | sync `/var/cache/omnibus/src/chef-foundation/chef-foundation' to `/opt/chef': 0.0001s
[Builder: chef-foundation] I | 2023-11-28T14:15:18+00:00 | Build chef-foundation: 0.0004s
bundler: failed to load command: omnibus (/tmp/sre-ruby/lib/ruby/gems/3.1.0/bin/omnibus)
/tmp/sre-ruby/lib/ruby/gems/3.1.0/bundler/gems/omnibus-82dae896a066/lib/omnibus/builder.rb:753:in `chdir': No such file or directory @ dir_chdir - /var/cache/omnibus/src/chef-foundation/chef-foundation (Errno::ENOENT)
	from /tmp/sre-ruby/lib/ruby/gems/3.1.0/bundler/gems/omnibus-82dae896a066/lib/omnibus/builder.rb:753:in `block in sync'
	from /tmp/sre-ruby/lib/ruby/gems/3.1.0/bundler/gems/omnibus-82dae896a066/lib/omnibus/builder.rb:1101:in `instance_eval'
	from /tmp/sre-ruby/lib/ruby/gems/3.1.0/bundler/gems/omnibus-82dae896a066/lib/omnibus/builder.rb:1101:in `run'

Chef Version

18.3.0 (and also master branch)

Platform Version

latest Ubuntu, also CentOS

Replication Case

Simply following steps from https://github.com/chef/chef/tree/main/omnibus
Executing bundle exec omnibus build chef produces the trace above.

@dyatlov dyatlov added the Status: Untriaged An issue that has yet to be triaged. label Nov 28, 2023
@dyatlov
Copy link
Author

dyatlov commented Nov 28, 2023

Answering myself,
according to this script we have to install chef-foundation and omnibus-toolchain as in https://github.com/chef/chef/blob/main/.expeditor/scripts/omnibus_chef_build.sh
before the actual build.
Actual versions of packages to be installed can be found in https://github.com/chef/chef/blob/main/.buildkite-platform.json
I believe that has to be included in https://github.com/chef/chef/blob/main/omnibus/README.md docs.
e.g.

curl -fsSL https://omnitruck.chef.io/chef/install.sh | bash -s -- -c "current" -P "chef-foundation" -v 3.1.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Untriaged An issue that has yet to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant