Mic92 / nixpkgs-review

Review pull-requests on https://github.com/NixOS/nixpkgs
MIT License
353 stars 59 forks source link

`--sandbox` flag is broken #326

Closed thiagokokada closed 1 year ago

thiagokokada commented 1 year ago

For the version 2.9.0 of nixpkgs-review, --sandbox flag is broken:

$ nixpkgs-review pr 223324 --sandbox
$ git -c fetch.prune=false fetch --no-tags --force https://github.com/NixOS/nixpkgs master:refs/nixpkgs-review/0 pull/223324/head:refs/nixpkgs-review/1
$ git worktree add /home/thiagoko/.cache/nixpkgs-review/pr-223324-2/nixpkgs 101bc33b43fc36ca5fc831f09b74270a8f0ad63a
Preparing worktree (detached HEAD 101bc33b43f)
Updating files: 100% (34361/34361), done.
HEAD is now at 101bc33b43f Merge pull request #223324 from StepBroBD/osu-lazer
$ git merge --no-commit --no-ff e65107868e619ed62e2e065aa2054dbd87dbe427
Already up to date.
$ nom build --extra-experimental-features nix-command no-url-literals --no-link --keep-going --no-allow-import-from-derivation --option build-use-sandbox relaxed -f /home/thiagoko/.cache/nixpkgs-review/pr-223324-2/build.nix
Finished at 13:02:23 after 4s

Link to currently reviewing PR:
https://github.com/NixOS/nixpkgs/pull/223324

2 packages built:
osu-lazer osu-lazer-bin

Using sandbox mode. Some things may break!
$ /nix/store/fann10rkra84rw3q3higd9wsxjn6pkij-bubblewrap-0.8.0/bin/bwrap --die-with-parent --unshare-cgroup --unshare-ipc --unshare-uts --ro-bind / / --dev-bind /dev /dev --dir /tmp --tmpfs /tmp --dev-bind-try /run/user/1000 /run/user/1000 --dir /home/thiagoko --tmpfs /home/thiagoko --bind /home/thiagoko/Projects/nixpkgs /home/thiagoko/Projects/nixpkgs --bind /home/thiagoko/.cache/nixpkgs-review/pr-223324-2 /home/thiagoko/.cache/nixpkgs-review/pr-223324-2 --ro-bind-try /home/thiagoko/.config/nixpkgs /home/thiagoko/.config/nixpkgs --ro-bind-try /tmp/.X11-unix /tmp/.X11-unix --ro-bind-try /home/thiagoko/.local/share/sx/xauthority /home/thiagoko/.local/share/sx/xauthority --ro-bind-try /home/thiagoko/.config/hub /home/thiagoko/.config/hub --ro-bind-try /home/thiagoko/.config/gh /home/thiagoko/.config/gh -- /nix/store/8md9lz2cmyja6y86dm0xfn5y070h4m1y-nix-output-monitor-2.0.0.5/bin/nom-shell /home/thiagoko/.cache/nixpkgs-review/pr-223324-2/shell.nix
error: getting status of '/tmp/tmpi47_0k_g.nix': No such file or directory

$ git worktree prune

If you ommit the --sandbox flag, everything works fine:

$ nixpkgs-review pr 223324
$ git -c fetch.prune=false fetch --no-tags --force https://github.com/NixOS/nixpkgs master:refs/nixpkgs-review/0 pull/223324/head:refs/nixpkgs-review/1
remote: Enumerating objects: 11, done.
remote: Counting objects: 100% (8/8), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 11 (delta 5), reused 5 (delta 5), pack-reused 3
Unpacking objects: 100% (11/11), 3.87 KiB | 791.00 KiB/s, done.
From https://github.com/NixOS/nixpkgs
   101bc33b43f..936c0f659dd  master     -> refs/nixpkgs-review/0
$ git worktree add /home/thiagoko/.cache/nixpkgs-review/pr-223324-3/nixpkgs 936c0f659dd5fdb14cc8f12e12e845e75c3e13e2
Preparing worktree (detached HEAD 936c0f659dd)
Updating files: 100% (34361/34361), done.
HEAD is now at 936c0f659dd Merge pull request #224922 from bobby285271/upd/budgie
$ git merge --no-commit --no-ff e65107868e619ed62e2e065aa2054dbd87dbe427
Already up to date.
$ nom build --extra-experimental-features nix-command no-url-literals --no-link --keep-going --no-allow-import-from-derivation --option build-use-sandbox relaxed -f /home/thiagoko/.cache/nixpkgs-review/pr-223324-3/build.nix
Finished at 13:03:43 after 4s

Link to currently reviewing PR:
https://github.com/NixOS/nixpkgs/pull/223324

2 packages built:
osu-lazer osu-lazer-bin

$ /nix/store/8md9lz2cmyja6y86dm0xfn5y070h4m1y-nix-output-monitor-2.0.0.5/bin/nom-shell /home/thiagoko/.cache/nixpkgs-review/pr-223324-3/shell.nix

[nix-shell:~/.cache/nixpkgs-review/pr-223324-3]$
figsoda commented 1 year ago

duplicate of #324? should be fixed in master

Mic92 commented 1 year ago

https://github.com/Mic92/nixpkgs-review/releases/tag/2.9.1