-
Notifications
You must be signed in to change notification settings - Fork 115
nikhil/fixing-resolv-windows: Upgrade resolv gem with cross-platform support #3472
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
Conversation
Signed-off-by: nikhil2611 <nikhilgupta2102@gmail.com>
- Remove resolv 0.2.1 default gemspec from all gem paths before installing 0.2.3 - Handles Windows multiple Ruby gem locations (user + embedded) - Cross-platform compatible (Linux, macOS, Windows) - Prevents gem conflict issues in final chef-workstation package Signed-off-by: nikhil2611 <nikhilgupta2102@gmail.com>
- Use chef's simpler regex pattern to extract default gem path - Remove platform-specific Windows/Linux branches - Remove explicit --install-dir flag (relies on gem_home) - Keep resolv 0.2.3 installation as specified - Add CVE-2025-24294 documentation comment - Proven to work on Windows per chef PR #15459 Signed-off-by: nikhil2611 <nikhilgupta2102@gmail.com>
Signed-off-by: nikhil2611 <nikhilgupta2102@gmail.com>
…atform support - Add platform-specific handling for Windows vs Linux/macOS - Windows: Check all gem paths (omnibus-toolchain and embedded) for removal - Linux/macOS: Extract default gem path from gem info output via regex - Remove resolv 0.2.1 default gemspec from all locations - Install resolv 0.2.3 to embedded path with --install-dir flag - Add --no-document flag to optimize build time - Fixes CVE-2025-24294 security vulnerability in resolv 0.2.1 Signed-off-by: nikhil2611 <nikhilgupta2102@gmail.com>
👷 Deploy Preview for chef-workstation processing.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR upgrades the resolv gem from version 0.2.1 to 0.2.3 to address CVE-2025-24294 by implementing a cross-platform solution that removes the default gemspec and installs the newer version during the omnibus build process.
Key changes:
- Refactored hardcoded resolv gem handling into a configurable hash structure for managing default gem conflicts
- Implemented platform-specific gemspec removal logic (Windows uses Gem.path iteration, Linux/macOS uses regex extraction)
- Added --install-dir and --no-document flags to optimize installation
Signed-off-by: nikhil2611 <nikhilgupta2102@gmail.com>
- Remove trailing whitespace - Replace 'or' with '||' operator - Use raise() method call instead of raise string Signed-off-by: nikhil2611 <nikhilgupta2102@gmail.com>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.



Summary
This PR implements a cross-platform solution to upgrade the resolv gem from version 0.2.1 to 0.2.3 during the omnibus build process by removing the default gemspec and installing the newer version.
Changes Made
Testing
Files Modified