build: the generated defaults header is written 0600, so a seat outside nevr-build cannot read it
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- cmake, cpp
- Domain
- build-system, tooling
Research direction
Read cmake/nevr_builtin_defaults.cmake around lines 87–89 and the requested static guard under tools/tests/. First run the guard against the base and confirm it fails because GROUP_READ is absent; then add GROUP_READ and verify the guard passes. A configure outside the build checkout should produce a group-readable generated/nevr_builtin_defaults.h; the issue specifies that the end-to-end worktree setup check is out of scope.
Written by the indexing model from the issue text.
Description
Evidence at 65630999e
The generator of the build-time defaults header sets the file to owner-only permissions. cmake/nevr_builtin_defaults.cmake, the
configure_file call that writes ${CMAKE_BINARY_DIR}/generated/nevr_builtin_defaults.h:
configure_file("${root}/cmake/nevr_builtin_defaults.h.in"
"${CMAKE_BINARY_DIR}/generated/nevr_builtin_defaults.h" @ONLY
FILE_PERMISSIONS OWNER_READ OWNER_WRITE)
(cmake/nevr_builtin_defaults.cmake:87-89). No group or other read bit is granted. The template cmake/nevr_builtin_defaults.h.in
is mode 664, so the explicit FILE_PERMISSIONS is what makes the output 600.
Measured on the shared build checkout (<work root>/build-checkout/nevr-runtime, read only):
stat -c '%a %U:%G %s' build/mingw-release/generated/nevr_builtin_defaults.hprints600 nevr-build:nevr-src 561.find build -perm 600in that checkout lists this one file and nothing else.
The checkout is shared by the group nevr-src. A seat whose user is not nevr-build cannot read the file, so
just worktree-setup fails while it copies the generated files into a new worktree, with cp: cannot open ... Permission denied, and the build tree is not created. That failure was reported by the merge seat; this issue does not repeat it.
Not shown
- The
worktree-setupfailure itself was not re-run from a seat whose user is notnevr-build. The claim that it is the
generator's mode rests on the mode of the file and theconfigure_fileline above. - No other generator in the tree writes
nevr_builtin_defaults.h: the onlyconfigure_filefor it is the one above (searched
withgrep -rn nevr_builtin_defaultsovercmake/,CMakeLists.txt,src/quest/CMakeLists.txtandtools/). - Whether other build trees, outside
build-checkout, hold files of mode 600 was not measured.
Falsifier
A configure of the tree at 65630999e that leaves generated/nevr_builtin_defaults.h with a mode that has no group read bit,
while the configure_file line above is unchanged, would show that this line is not the cause.
Work
- Test first: a static guard in
tools/tests/readscmake/nevr_builtin_defaults.cmakeand asserts that theconfigure_file
for the defaults header grants group read (GROUP_READin itsFILE_PERMISSIONS). Run it against the base; it must fail there. - Add
GROUP_READto theFILE_PERMISSIONSof thatconfigure_filecall, so the generated header is640. - Mutant: remove
GROUP_READagain and show the guard fails with its output; restore it and show it passes. - Check, by a configure of a worktree that is not the build checkout, that the generated header is group-readable; the
worktree-setuprun by a seat whose user is notnevr-buildis the end-to-end check, and it is not run by this issue.
- Dominant language
- C++
- Stars
- 3
- Forks
- 5
- Avg merge
- 4h 37m
- Merged PRs (30d)
- 524
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from EchoTools/nevr-runtime
-
bug
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
EchoTools/nevr-runtime#2912 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
EchoTools/nevr-runtime#2910 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
EchoTools/nevr-runtime#2909 ·
Maintainers usually reply within 1 day
-
backlog
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
EchoTools/nevr-runtime#2897 ·
Maintainers usually reply within 1 day
-
backlog bug
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
EchoTools/nevr-runtime#2896 ·
Maintainers usually reply within 1 day
All issues in EchoTools/nevr-runtime
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
category:port-update
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
bug-unconfirmed
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
libc++
Difficulty 1/5 Under an hour Newbie friendliness 88/100
llvm/llvm-project#246508 ·
Maintainers usually reply within 1 day
-
good first issue help wanted phase:0 priority:P3 type:task
Difficulty 2/5 1-3 hours Newbie friendliness 67/100