Skip to content

Drop FFI pin, plus a bunch of assorted other bits#14911

Merged
tpowell-progress merged 1 commit intochef:mainfrom
jaymzh:ffi-ver
Jun 2, 2025
Merged

Drop FFI pin, plus a bunch of assorted other bits#14911
tpowell-progress merged 1 commit intochef:mainfrom
jaymzh:ffi-ver

Conversation

@jaymzh
Copy link
Collaborator

@jaymzh jaymzh commented Mar 18, 2025

  • Add some post-bundle-install hacks for appbunder for ffi 1.17.x
  • Sort words in cspell config after adding 'autoreconf'
  • Removed git/core from the habitat windows build deps because @mwrock figured out that this dep was installing an additional bash which was causing build failures in Windows. Git was already included as part of msys2, so this isn't necessary, and breaks things.

See ffi/ffi#1139 (comment)
for details

$ bundle update ffi ohai mixlib-log --conservative
Fetching https://github.com/stanhu/mixlib-log.git
Fetching https://github.com/jaymzh/ohai.git
Fetching gem metadata from https://rubygems.org/.......
Resolving dependencies...
Resolving dependencies...
Using mixlib-log 3.2.2 (was 3.0.9) from https://github.com/stanhu/mixlib-log.git (at sh-relax-ffi@6aff216)
Using ohai 19.0.9 (was 19.0.5) from https://github.com/jaymzh/ohai.git (at ffi-ver@1c34928)
Bundler attempted to update ffi but its version stayed the same
Bundle updated!

Signed-off-by: Phil Dibowitz phil@ipom.com

@jaymzh jaymzh requested review from a team as code owners March 18, 2025 18:30
@jaymzh
Copy link
Collaborator Author

jaymzh commented Mar 18, 2025

This requires the fix in ohai from chef/ohai#1866

Tested this with:

-gem "ohai", git: "https://github.com/chef/ohai.git", branch: "main"
+gem "ohai", git: "https://github.com/jaymzh/ohai.git", branch: "ffi-ver"

and it builds.

@jaymzh
Copy link
Collaborator Author

jaymzh commented Mar 18, 2025

Looks like there's a lot more sticking us to 1.15

  • rest-client - we're pinned to some very specific branch which is pinned to ffi ~> 1.15.
  • chef-powershell - same

@jaymzh
Copy link
Collaborator Author

jaymzh commented Mar 18, 2025

rest-client isn't pinned, that inherited the pin from us... so just chef-powershell.

@jaymzh
Copy link
Collaborator Author

jaymzh commented Mar 18, 2025

OK chef/chef-powershell-shim#288 is for chef-powershell. There's no direct dep, but it's pulled in from somewhere.

@jaymzh jaymzh force-pushed the ffi-ver branch 2 times, most recently from 0e1a97c to 40439eb Compare March 25, 2025 21:57
@jaymzh jaymzh force-pushed the ffi-ver branch 9 times, most recently from 5e9e1f0 to 243dc8c Compare March 30, 2025 01:43
@jaymzh
Copy link
Collaborator Author

jaymzh commented Mar 30, 2025

@tpowell-progress - as discussed in Slack, this needs a release of mixlib-log to rubygems, then another bundle update.

HOWEVER - any idea why fips is failing to find ruby?

@jaymzh jaymzh force-pushed the ffi-ver branch 10 times, most recently from edaaa49 to 0a41cc1 Compare April 2, 2025 01:00
@jaymzh jaymzh force-pushed the ffi-ver branch 2 times, most recently from d562cca to 62b2bde Compare May 14, 2025 00:29
@jaymzh jaymzh force-pushed the ffi-ver branch 6 times, most recently from 5539b89 to 527d5b2 Compare May 31, 2025 06:19
@jaymzh
Copy link
Collaborator Author

jaymzh commented May 31, 2025

@stanhu - can you repro it now? It still seems reliably-reproducible on the macos vms.

@tpowell-progress and @johnmccrae - @mwrock got this all working in habitat, so we're almost ready to merge this other than that weird MacOSX thing.

@jaymzh
Copy link
Collaborator Author

jaymzh commented May 31, 2025

On macOS 13, the seg fault doesn't happen if I use the precompiled ffi gem or install ffi via

Hmmm, if we drop force_ruby_platform: true for Mac, I wonder if that'll work, I"ll give that a shot.

@jaymzh jaymzh force-pushed the ffi-ver branch 2 times, most recently from 3df365f to c6705a2 Compare May 31, 2025 21:01
@jaymzh
Copy link
Collaborator Author

jaymzh commented May 31, 2025

Yup, that fixes Darwin!

* Add msys2 build-dep to windows hab so we can build libffi
  which is required in ffi 1.17.x
* Add some post-bundle-install hacks for appbunder for ffi 1.17.x
* Sort words in cspell config after adding 'autoreconf'

See ffi/ffi#1139 (comment)
for details

```
$ bundle update ffi ohai mixlib-log --conservative
Fetching https://github.com/stanhu/mixlib-log.git
Fetching https://github.com/jaymzh/ohai.git
Fetching gem metadata from https://rubygems.org/.......
Resolving dependencies...
Resolving dependencies...
Using mixlib-log 3.2.2 (was 3.0.9) from https://github.com/stanhu/mixlib-log.git (at sh-relax-ffi@6aff216)
Using ohai 19.0.9 (was 19.0.5) from https://github.com/jaymzh/ohai.git (at ffi-ver@1c34928)
Bundler attempted to update ffi but its version stayed the same
Bundle updated!
```

Signed-off-by: Phil Dibowitz <phil@ipom.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 2, 2025

@tpowell-progress tpowell-progress merged commit 4e989a5 into chef:main Jun 2, 2025
53 checks passed
@jaymzh jaymzh deleted the ffi-ver branch December 30, 2025 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants