Nixpkgs: re2c failing to compile citing "suspicious ownership or permission"

Created on 12 Mar 2020  路  9Comments  路  Source: NixOS/nixpkgs

Just ran into this and didn't see a duplicate. Thought I'd report it. Note: This is on macOS and the builder runs as 'root' (I know...) .

Describe the bug
Trying to build re2c ends in a failure citing "suspicious ownership or permission"

To Reproduce
Steps to reproduce the behavior:

nix-env -i re2c --option substitute false

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots

building '/nix/store/b3jl9j766yxagzfkzlqgh5g76zm986nn-source.drv'...

trying https://github.com/skvadrik/re2c/archive/1.2.1.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   120  100   120    0     0    120      0  0:00:01 --:--:--  0:00:01   281
100 5196k  100 5196k    0     0  5196k      0  0:00:01  0:00:01 --:--:-- 42.6M
unpacking source archive /private/tmp/nix-build-source.drv-0/1.2.1.tar.gz
suspicious ownership or permission on '/nix/store/30b0m0kz1kqffsb6qh9y3835q764nzzv-source'; rejecting this build output

Metadata

  • system: "x86_64-darwin"
  • host os: Darwin 18.7.0, macOS 10.14.6
  • multi-user?: no
  • sandbox: no
  • version: nix-env (Nix) 2.3.3
  • channels(root): "nixpkgs-20.09pre216412.04d6123309f"
  • nixpkgs: /var/root/.nix-defexpr/channels/nixpkgs
bug stale

All 9 comments

ping @etu @Ma27 purely as a FYI because impact this could have on php ecosystem on darwin.

I'm still trying things out, but there might be some odd chance that this only happens if the user running the build is "root"

What's the output of this?

nix show-config | grep build-users-group

It's a single user install, set up via

echo "build-users-group =" > /etc/nix/nix.conf

so:

# nix show-config | grep build-users-group
build-users-group = 
# 

Otherwise it errors out via error: "the group 'nixbld' specified in 'build-users-group' does not exist"

Oddly, everything else works

@grahamc @edolstra I really think this should be fixed.

I don't have the hardware around to test this, but this comes from https://github.com/NixOS/nix/blob/master/src/libstore/build.cc#L3612..L3618 - how does the tree at /nix/store/30b0m0kz1kqffsb6qh9y3835q764nzzv-source look like, and how does that align with the conditions checked there?

nix-env -i re2c --option substitute false

For the record, I can't reproduce this with a single-user Nix 2.3.1 on macOS.

I don't have the hardware around to test this, but this comes from https://github.com/NixOS/nix/blob/master/src/libstore/build.cc#L3612..L3618 - how does the tree at /nix/store/30b0m0kz1kqffsb6qh9y3835q764nzzv-source look like, and how does that align with the conditions checked there?

Sorry for the delayed answer, busy day.

[root@machine ~]# ls -lash /nix/store/30b0m0kz1kqffsb6qh9y3835q764nzzv-source
total 360
 0 dr-xr-xr-x    43 root  wheel   1.3K Dec 31  1969 .
 0 drwxrwxr-t  5089 root  wheel   159K Mar 12 16:21 ..
 8 -r--r--r--     1 root  wheel   146B Dec 31  1969 .gitignore
 8 -r--r--r--     1 root  wheel   533B Dec 31  1969 .travis.yml
80 -r--r--r--     1 root  wheel    37K Dec 31  1969 CHANGELOG
 8 -r--r--r--     1 root  wheel   713B Dec 31  1969 LICENSE
24 -r--r--r--     1 root  wheel   9.5K Dec 31  1969 Makefile.am
16 -r--r--r--     1 root  wheel   4.4K Dec 31  1969 Makefile.lib.am
 8 -r--r--r--     1 root  wheel   141B Dec 31  1969 NO_WARRANTY
 8 -r--r--r--     1 root  wheel   2.0K Dec 31  1969 README.md
 8 -r-xr-xr-x     1 root  wheel   711B Dec 31  1969 __alltest.sh
 8 -r-xr-xr-x     1 root  wheel   160B Dec 31  1969 __build.sh
 8 -r-xr-xr-x     1 root  wheel   236B Dec 31  1969 __build_asan.sh
 8 -r-xr-xr-x     1 root  wheel   310B Dec 31  1969 __build_check_headers.sh
 8 -r-xr-xr-x     1 root  wheel   199B Dec 31  1969 __build_clang.sh
 8 -r-xr-xr-x     1 root  wheel   408B Dec 31  1969 __build_clang_msan.sh
 8 -r-xr-xr-x     1 root  wheel   234B Dec 31  1969 __build_glibcxx_debug.sh
 8 -r-xr-xr-x     1 root  wheel   285B Dec 31  1969 __build_iwyu.sh
 8 -r-xr-xr-x     1 root  wheel   230B Dec 31  1969 __build_lsan.sh
 8 -r-xr-xr-x     1 root  wheel   207B Dec 31  1969 __build_m32.sh
 8 -r-xr-xr-x     1 root  wheel   445B Dec 31  1969 __build_mingw.sh
 8 -r-xr-xr-x     1 root  wheel   651B Dec 31  1969 __build_mingw_slibtool.sh
 8 -r-xr-xr-x     1 root  wheel   147B Dec 31  1969 __build_nodebug.sh
 8 -r-xr-xr-x     1 root  wheel   287B Dec 31  1969 __build_redundant_exports.sh
 8 -r-xr-xr-x     1 root  wheel   241B Dec 31  1969 __build_ubsan.sh
 8 -r-xr-xr-x     1 root  wheel   573B Dec 31  1969 __distcheck.sh
 8 -r--r--r--     1 root  wheel   345B Dec 31  1969 add-release.txt
 8 -r-xr-xr-x     1 root  wheel    46B Dec 31  1969 autogen.sh
 0 dr-xr-xr-x     7 root  wheel   224B Dec 31  1969 benchmarks
 0 dr-xr-xr-x     5 root  wheel   160B Dec 31  1969 bootstrap
16 -r--r--r--     1 root  wheel   4.5K Dec 31  1969 configure.ac
 0 dr-xr-xr-x     7 root  wheel   224B Dec 31  1969 doc
 0 dr-xr-xr-x    36 root  wheel   1.1K Dec 31  1969 examples
 0 dr-xr-xr-x     5 root  wheel   160B Dec 31  1969 fuzz
 8 -r-xr-xr-x     1 root  wheel   299B Dec 31  1969 genhelp.sh
 0 dr-xr-xr-x     3 root  wheel    96B Dec 31  1969 include
 0 dr-xr-xr-x    22 root  wheel   704B Dec 31  1969 lib
 0 dr-xr-xr-x    12 root  wheel   384B Dec 31  1969 libre2c_old
 8 -r-xr-xr-x     1 root  wheel   1.0K Dec 31  1969 release.sh
16 -r--r--r--     1 root  wheel   7.1K Dec 31  1969 run_tests.sh.in
 8 -r--r--r--     1 root  wheel   156B Dec 31  1969 sf-cheatsheet
 0 dr-xr-xr-x    19 root  wheel   608B Dec 31  1969 src
 0 dr-xr-xr-x   481 root  wheel    15K Dec 31  1969 test

I couldn't reproduce it on my laptop (non-root user), just on a build machine I tested (user = 'root').
Not sure if I should close this or if there's some underlying issue with running as root and building from source (which is discouraged I guess)

Hello, I'm a bot and I thank you in the name of the community for opening this issue.

To help our human contributors focus on the most-relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human.

The community would appreciate your effort in checking if the issue is still valid. If it isn't, please close it.

If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me". If you'd like it to get more attention, you can ask for help by searching for maintainers and people that previously touched related code and @ mention them in a comment. You can use Git blame or GitHub's web interface on the relevant files to find them.

Lastly, you can always ask for help at our Discourse Forum or at #nixos' IRC channel.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

langston-barrett picture langston-barrett  路  3Comments

matthiasbeyer picture matthiasbeyer  路  3Comments

teto picture teto  路  3Comments

vaibhavsagar picture vaibhavsagar  路  3Comments

copumpkin picture copumpkin  路  3Comments