Skip to content

Instantly share code, notes, and snippets.

@polachok
Created April 6, 2022 16:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save polachok/ed3597bddd946b773d165f8f5b1cf39b to your computer and use it in GitHub Desktop.
Save polachok/ed3597bddd946b773d165f8f5b1cf39b to your computer and use it in GitHub Desktop.
nix-shell on ubuntu
$ nix-shell https://github.com/NixOS/nixpkgs/archive/941b4b8f048a383366e24c12022e99c87db09db6.tar.gz -A python39Packages.twisted
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing setuptools-build-hook
Using setuptoolsBuildPhase
Using setuptoolsShellHook
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
Executing setuptoolsShellHook
Finished executing setuptoolsShellHook
[nix-shell:~/tmp]$ unpackPhase
unpacking source archive /nix/store/vjxb8j9kpcmzvlm9crrfc38vzzsxcn3k-Twisted-21.7.0.tar.gz
source root is Twisted-21.7.0
setting SOURCE_DATE_EPOCH to timestamp 1627461731 of file Twisted-21.7.0/setup.cfg
[nix-shell:~/tmp]$ ls
Twisted-21.7.0
[nix-shell:~/tmp]$ cd $sourceRoot
[nix-shell:~/tmp/Twisted-21.7.0]$ patchPhase
applying patch /nix/store/4fscdq7nf4mzb07gc2h9c9sf3z6a8w8l-CVE-2022-21712.patch
patching file src/twisted/web/client.py
Hunk #1 FAILED at 10.
Hunk #2 FAILED at 25.
Hunk #3 succeeded at 2109 (offset -1 lines).
Hunk #4 succeeded at 2132 (offset -1 lines).
Hunk #5 succeeded at 2154 (offset -1 lines).
Hunk #6 succeeded at 2207 (offset -1 lines).
2 out of 6 hunks FAILED -- saving rejects to file src/twisted/web/client.py.rej
patching file src/twisted/web/client.py
Hunk #1 FAILED at 10.
Hunk #2 FAILED at 24.
Hunk #3 succeeded at 2110 (offset 10 lines).
Hunk #4 succeeded at 2165 (offset 10 lines).
2 out of 4 hunks FAILED -- saving rejects to file src/twisted/web/client.py.rej
patching file src/twisted/web/iweb.py
patching file src/twisted/web/test/test_agent.py
Hunk #1 FAILED at 5.
Hunk #2 FAILED at 32.
Hunk #3 FAILED at 52.
Hunk #4 succeeded at 2580 (offset -7 lines).
Hunk #5 succeeded at 2622 (offset -7 lines).
Hunk #6 succeeded at 2676 (offset -7 lines).
Hunk #7 succeeded at 2686 (offset -7 lines).
Hunk #8 succeeded at 2713 (offset -7 lines).
3 out of 8 hunks FAILED -- saving rejects to file src/twisted/web/test/test_agent.py.rej
patching file src/twisted/web/test/test_agent.py
Hunk #1 succeeded at 2749 (offset -9 lines).
patching file src/twisted/web/test/test_agent.py
Hunk #1 succeeded at 2627 (offset -9 lines).
Hunk #2 succeeded at 2657 (offset -9 lines).
Hunk #3 succeeded at 2719 (offset -9 lines).
Hunk #4 succeeded at 2730 (offset -9 lines).
Hunk #5 succeeded at 2750 (offset -9 lines).
Hunk #6 succeeded at 2999 (offset -9 lines).
Hunk #7 succeeded at 3037 (offset -9 lines).
patching file src/twisted/web/test/test_agent.py
Hunk #1 FAILED at 5.
Hunk #2 FAILED at 38.
Hunk #3 FAILED at 50.
Hunk #4 succeeded at 2665 (offset -9 lines).
Hunk #5 succeeded at 2717 (offset -9 lines).
Hunk #6 succeeded at 2767 (offset -9 lines).
3 out of 6 hunks FAILED -- saving rejects to file src/twisted/web/test/test_agent.py.rej
patching file src/twisted/web/test/test_agent.py
Hunk #1 FAILED at 5.
Hunk #2 FAILED at 33.
Hunk #3 succeeded at 102 (offset -8 lines).
Hunk #4 succeeded at 2588 (offset -9 lines).
Hunk #5 succeeded at 2624 (offset -9 lines).
Hunk #6 succeeded at 2713 (offset -9 lines).
Hunk #7 succeeded at 2986 (offset -9 lines).
Hunk #8 succeeded at 3023 (offset -9 lines).
2 out of 8 hunks FAILED -- saving rejects to file src/twisted/web/test/test_agent.py.rej
patching file src/twisted/web/test/test_agent.py
Hunk #1 FAILED at 5.
Hunk #2 FAILED at 29.
Hunk #3 succeeded at 2986 (offset 20 lines).
Hunk #4 succeeded at 3026 (offset 20 lines).
2 out of 4 hunks FAILED -- saving rejects to file src/twisted/web/test/test_agent.py.rej
patching file src/twisted/web/test/test_agent.py
Hunk #1 FAILED at 8.
Hunk #2 FAILED at 70.
2 out of 2 hunks FAILED -- saving rejects to file src/twisted/web/test/test_agent.py.rej
patching file src/twisted/topfiles/10294.bugfix
[nix-shell:~/tmp/Twisted-21.7.0]$ uname -a
Linux ubuntu-s-2vcpu-4gb-amd-fra1-01 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64 GNU/Linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment