Skip to content

bundlerEnv: ignore bundler configuration file#110703

Merged
marsam merged 1 commit intoNixOS:stagingfrom
zarelit:issue_85989_ignore_bundle_path
Jul 31, 2021
Merged

bundlerEnv: ignore bundler configuration file#110703
marsam merged 1 commit intoNixOS:stagingfrom
zarelit:issue_85989_ignore_bundle_path

Conversation

@zarelit
Copy link
Copy Markdown
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 zarelit requested a review from alyssais as a code owner January 24, 2021 16:05
@zarelit
Copy link
Copy Markdown
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

@ofborg ofborg bot added 6.topic: ruby A dynamic, open source programming language with a focus on simplicity and productivity. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 2501-5000 This PR causes many rebuilds on Linux and should target the staging branches. labels Jan 24, 2021
@stale
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

@ofborg ofborg bot added 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. and removed 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 2501-5000 This PR causes many rebuilds on Linux and should target the staging branches. labels Jul 31, 2021
@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

Labels

6.topic: ruby A dynamic, open source programming language with a focus on simplicity and productivity. 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux.

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