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

Remove useless dont_clobber_environment.patch for Godot #66349

Closed
wants to merge 1 commit into from

Conversation

NilsIrl
Copy link
Member

@NilsIrl NilsIrl commented Aug 8, 2019

Motivation for this change
  • It will break and prevent building
  • If this patch is really necessary it should be done upstream

Partly reverts #34971.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nix-review --run "nix-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.
Notify maintainers

cc @Twey

Reasons for:
* It will break and prevent building
* If this patch is really necessary it should be done upstream
@Twey
Copy link
Contributor

Twey commented Oct 19, 2019

The patch exists to unbreak building. This effectively prevents Godot from adding a bunch of global paths to the environment, which breaks non-sandboxed builds.

Not in disagreement that it should be upstreamed, though!

@NilsIrl
Copy link
Member Author

NilsIrl commented Oct 19, 2019

How does it do it though?

I'm no python expert but from what I can tell the patch effectively does nothing, it just changes the way environment variables are passed through.

The patch adds env vars in a loop when before it does it sequentially.

@Twey
Copy link
Contributor

Twey commented Oct 19, 2019

The looping thing is a trivial refactor… the important part is that the patch assigns where the original appends. Environment comes with a PATH and PKG_CONFIG_PATH that include global paths, so using an append here effectively prepends global paths to the user's path before proceeding with the build. This patch ensures that the user's paths are passed through verbatim.

I'm curious as to why you think it breaks the build. This package has of course passed tests!

@NilsIrl
Copy link
Member Author

NilsIrl commented Oct 19, 2019

I'm curious as to why you think it breaks the build. This package has of course passed tests!

What I mean by "break", is that like any patch, if the original file is changed upstream, the patch might fail to be applied which is the case with the master branch of godot.

@NilsIrl
Copy link
Member Author

NilsIrl commented Oct 19, 2019

Actually the patch does fail which is the reason I did this PR. Sorry, I did this 2 months ago, I totally forgot about it:

$ patchPhase
applying patch /nix/store/apfyhds62va8l0ddabdrzfhflfvhjk0a-pkg_config_additions.patch
patching file platform/x11/detect.py
Hunk #1 succeeded at 201 with fuzz 2 (offset 26 lines).
Hunk #2 succeeded at 295 with fuzz 2 (offset 26 lines).
applying patch /nix/store/ja5b801bk42vyrdydv92hh6bcg48y5y0-dont_clobber_environment.patch
patching file SConstruct
Hunk #1 FAILED at 63.
1 out of 1 hunk FAILED -- saving rejects to file SConstruct.rej
$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   platform/x11/detect.py

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	SConstruct.orig
	SConstruct.rej
	platform/x11/detect.py.orig

no changes added to commit (use "git add" and/or "git commit -a")

@stale
Copy link

stale bot commented Jun 1, 2020

Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the
    related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on
    irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 1, 2020
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Oct 3, 2020
@stale
Copy link

stale bot commented Jun 5, 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 Jun 5, 2021
@SuperSandro2000
Copy link
Member

Closing due to inactivity from author.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: merge conflict 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 10.rebuild-darwin: 0 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants