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

Fix OpenSSL version conflict + decouple Ruby & dependencies entirely from Apple base OS libraries #226

Open
wants to merge 36 commits into
base: master
Choose a base branch
from

Conversation

trinitronx
Copy link
Collaborator

No description provided.

trinitronx and others added 29 commits April 21, 2022 01:35
Error was:

    git branch -f HEAD 86c1e3c04379266d47dff8104bc9eef12c72c8a2
    fatal: 'HEAD' is not a valid branch name.
…f, chef-cli, rspec, rspec-mocks

Chef downgraded to 16.7.61
…rubygems-3.3.4-chef-16.7.61

upgrade ruby version to 3.1.0 rubygems 3.3.4 chef 16.7.61
Note: From current chef-workstation manifest, they use 3.0.12.  Homebrew uses: 3.3.1

We may need to adjust... but it should be ABI compatible 🤷

Depends on: rvm/rvm#5480

If RVM is insistent on using [email protected], you need to:

    rvm get master
Current chef-workstation version manifest:

    chef-workstation 24.6.1066

    Component                Installed Version                          Version GUID                                                                 Overridden From
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
    bzip2                    1.0.8                                      sha256:ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269
    c_rehash_ruby            main                                       path:/Users/anka/buildkite-workspace/omnibus/files/../../components/rehash
    cacerts                  2022-10-11                                 sha256:2cff03f9efdaf52626bd1b451d700605dc1ea000c5da56bd0fc59f8f43071040
    chef-analyze             0.1.186                                    git:e1a9d15d95fcaa307343f227a5c165d3b1b16c83                                 main
    chef-workstation-app     0.2.191
    config_guess             master                                     git:84f04b02a7e2fc8eaa9d52deee5f6d57b06fe447
    curl                     8.4.0                                      sha256:816e41809c043ff285e8c0f06a75a1fa250211bbfb2dc0a037eeef39f1a9e427
    expat                    2.5.0                                      sha256:6b902ab103843592be5e99504f846ec109c1abb692e85347587f237a4ffa1033
    gem-permissions          0.0.1
    gem-version-manifest     24.6.1066
    gems                     24.6.1066
    git-custom-bindir        2.39.3                                     sha256:2f9aa93c548941cc5aff641cedc24add15b912ad8c9b36ff5a41b1a9dcad783e
    go                       1.21.5                                     sha256:a2e1d5743e896e5fe1e7d96479c0a769254aed18cf216cf8f4c3a2300a9b3923      1.19.5
    go-uninstall             0.0.1
    google-protobuf          v3.21.12                                   git:f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c
    habitat                  1.6.1041                                   sha256:2dbde6139a47341d63e696014262b37958461fdaed7cfafe5e72f534bc66e40e
    libarchive               3.6.2                                      sha256:ba6d02f15ba04aba9c23fd5f236bb234eab9d5209e95d1c4df85c44d5f19b9b3
    libedit                  20120601-3.0                               sha256:51f0f4b4a97b7ebab26e7b5c2564c47628cdb3042fd8ba8d0605c719d2541918
    libffi                   3.4.2                                      sha256:540fb721619a6aba3bdeef7d940d8e9e0e6d2c193595bc243241b77ff9e93620      3.4.4
    libiconv                 1.16                                       sha256:e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04      1.17
    liblzma                  5.2.5                                      sha256:f6f4910fd033078738bd82bfba4f49219d03b17eb0794eb91efbae419f4aba10      5.2.10
    libnghttp2               1.58.0                                     sha256:9ebdfbfbca164ef72bdf5fd2a94a4e6dfb54ec39d2ef249aeb750a91ae361dfb
    libxml2                  2.12.5                                     sha256:a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21      2.11.7
    libxslt                  1.1.39                                     sha256:2a20ad621148339b0759c4d4e96719362dee64c9a096dbba625ba053846349f0
    libyaml                  0.1.7                                      sha256:8088e457264a98ba451a90b8661fcb4f9d6f478f7265d48322a196cec2480729      0.2.5
    main-chef-wrapper        24.6.1066
    more-ruby-cleanup        24.6.1066
    ncurses                  6.4                                        sha256:6931283d9ac87c5073f30b6290c4c75f21632bb4fc3603ac8100812bed248159
    openssl                  3.0.12                                     sha256:f93c9e8edde5e9166119de31755fc87b4aa34863662f67ddfcba14d0b6b69b61
    openssl-customization    24.6.1066
    pcre                     8.45                                       sha256:4e6ce03e0336e8b4a3d6c2b70b1c5e18590a5673a98186da90d4f33c23defc09
    preparation              1.0.0
    rb-fsevent-gem           623f64a7edfd2505e64aa2125f01a54ffd6166ba   git:623f64a7edfd2505e64aa2125f01a54ffd6166ba
    ruby                     3.1.2                                      sha256:61843112389f02b735428b53bb64cf988ad9fb81858b8248e22e57336f24a83e      3.1.3
    ruby-cleanup             1.0.0
    ruby-env-script          24.6.1066
    rubygems-customization   24.6.1066
    shebang-cleanup          0.0.2
    uninstall-scripts        24.6.1066
    version-manifest         0.0.1
    zlib                     1.3.1                                      sha256:9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23      1.2.13
Due to macOS stock libs being so outdated, and the general hostility of Apple's
OS-level changes to installing Ruby + dependencies over **many** years... we
must now go down the path of installing everything we need from Homebrew.

This will come with its own breakages due to Homebrew's history of formula
deprecations, renames, etc... C'est la vie

Currently including:

- libffi
- libreadline
- libxslt
- libyaml
Part of the effort to decouple our Ruby installation as much as possible from
macOS, to insulate against the incessant changes pushed by Apple.

Similar to postmodern/ruby-install#484, we will also install `ncurses` from
Homebrew.  Avoiding Apple's system-installed version for any Ruby versions
installed using RVM.
@trinitronx trinitronx added the bug label Jul 16, 2024
@trinitronx trinitronx added enhancement dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code labels Jul 16, 2024
@trinitronx trinitronx added this to the macOS Monterey 12.7.1 milestone Jul 16, 2024
@trinitronx trinitronx self-assigned this Jul 16, 2024
pre-commit-ci bot and others added 7 commits July 16, 2024 20:57
Shellcheck warnings were:

    In bootstrap-scripts/bootstrap.sh line 188:
        export CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-jemalloc-dir=$(pkg-config --variable=prefix jemalloc)"
               ^------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.

    In bootstrap-scripts/bootstrap.sh line 191:
        export CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-openssl-dir=$(brew --prefix openssl@3)"
               ^------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.

    In bootstrap-scripts/bootstrap.sh line 224:
        export CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-readline-dir=$(pkg-config --variable=prefix readline)"
               ^------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.

    In bootstrap-scripts/bootstrap.sh line 230:
        export CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-ncurses-dir=$(pkg-config --variable=prefix ncurses)"
               ^------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.

    In bootstrap-scripts/bootstrap.sh line 237:
        export CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-libyaml-dir=$(pkg-config --variable=prefix yaml-0.1)"
               ^------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.

    In bootstrap-scripts/bootstrap.sh line 243:
        export CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-libksba-dir=$(pkg-config --variable=prefix ksba)"
               ^------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.
Shellcheck warnings were:

    In bootstrap-scripts/bootstrap.sh line 125:
      echo "Killing $timeout_loop_PID due to trap"
      ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).

    In bootstrap-scripts/bootstrap.sh line 126:
      kill -TERM $timeout_loop_PID
      ^--------------------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).
                 ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

    Did you mean:
      kill -TERM "$timeout_loop_PID"

    In bootstrap-scripts/bootstrap.sh line 127:
      sudo -K
      ^-----^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).
This parameter expansion, `${foo?}`, will return error if `${_var}` is null or
unset... but we already check that before exporting the variable name contained
in `${_var}`. Shellcheck is trying to be helpful, but we actually want to export
the variable contained in `$_var`, not just `$_var` itself.

Shellcheck warning was:

    In bootstrap-scripts/bootstrap.sh line 266:
        [ -n "$(eval echo -n \$$_var)" ] && export ${_var}
                                                   ^-----^ SC2163 (warning): This does not export '_var'. Remove $/${} for that, or use ${var?} to quiet.
Shellcheck warnings were:

    In bootstrap-scripts/bootstrap.sh line 544:
        lsof -p  $clt_pid +r 1 &>/dev/null
                 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

    Did you mean:
        lsof -p  "$clt_pid" +r 1 &>/dev/null
We want to split on spaces, because we are building a command line
Just quote the things

Shellcheck warnings were:

    In bootstrap-scripts/bootstrap.sh line 128:
      kill -TERM $timeout_loop_PID
                 ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

    Did you mean:
      kill -TERM "$timeout_loop_PID"

    In bootstrap-scripts/bootstrap.sh line 185:
        rustup default stable-${machine}-apple-darwin
                              ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

    Did you mean:
        rustup default stable-"${machine}"-apple-darwin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug dependencies Pull requests that update a dependency file enhancement ruby Pull requests that update Ruby code
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

1 participant