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

bundlerEnv: ignore bundler configuration file #110703

Merged
merged 1 commit into from Jul 31, 2021

Conversation

zarelit
Copy link
Member

@zarelit zarelit commented Jan 24, 2021

Change will make packaged ruby application ignore the user-wide bundle
configuration.

Fix #85989

Motivation for this change

The presence of BUNDLE_PATH set via configuration file breaks some packaged ruby application such as solargraph, mailcatcher, metasploit. BUNDLE_PATH should be ignored as shown in #81612 and #81442

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Change will make packaged ruby application ignore the user-wide bundle
configuration.

Fix NixOS#85989
@zarelit
Copy link
Member Author

zarelit commented Jan 24, 2021

@thefloweringash @manveru What do you think about adding ENV['BUNDLE_IGNORE_CONFIG'] = '1' in gen-bin-stubs.rb? It will fix #85989 (and probably a couple of others, too) and it looks like it might add isolation of the packaged applications from the user environment but I don't know if this will break other things

Many thanks to @alypeng who debugged the issue and also proposed the fix

@stale
Copy link

stale bot commented Jul 23, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 23, 2021
@zarelit
Copy link
Member Author

zarelit commented Jul 29, 2021

Still applies... probably should target a staging branch?

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 29, 2021
@SuperSandro2000
Copy link
Member

yes, it should.

@zarelit zarelit changed the base branch from master to staging July 31, 2021 21:20
@zarelit zarelit requested a review from marsam as a code owner July 31, 2021 21:20
@zarelit
Copy link
Member Author

zarelit commented Jul 31, 2021

Directly changed target branch of the PR since gen-bin-stubs.rb hasn't changed in a while, the PR will apply correctly

@marsam marsam merged commit 8cd1711 into NixOS:staging Jul 31, 2021
@zarelit zarelit deleted the issue_85989_ignore_bundle_path branch June 25, 2022 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mailcatcher: Could not find daemons-1.3.1 in any of the sources (Bundler::GemNotFound)
3 participants