Bug 261396 - lang/zig: Fails to stage: /bin/rm -f /wrkdirs/usr/ports/lang/zig/work/stage/lib/zig/std/zig-cache) error: AccessDenied
Summary: lang/zig: Fails to stage: /bin/rm -f /wrkdirs/usr/ports/lang/zig/work/stage/l...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Dave Cottlehuber
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2022-01-21 21:52 UTC by Lev A. Serebryakov
Modified: 2022-05-17 14:26 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (dch)
koobs: merge-quarterly?


Attachments
Full build log (12.19 KB, application/x-gzip)
2022-01-21 23:39 UTC, Lev A. Serebryakov
no flags Details
poudriere.conf (11.06 KB, text/plain)
2022-01-21 23:41 UTC, Lev A. Serebryakov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lev A. Serebryakov freebsd_committer freebsd_triage 2022-01-21 21:52:54 UTC
lang/zig 0.9.0 try to build documentation at local install phase (`make stage`) and fails, if build is managed by poudriere

Relevant part of the log:

=======================<phase: stage          >============================
===>  Staging for zig-0.9.0
===>   Generating temporary packing list
[  0% 1/1] cd /wrkdirs/usr/ports/lang/zig/work/.build && /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
-- Install configuration: "Release"
-- Installing: /wrkdirs/usr/ports/lang/zig/work/stage/usr/local/bin/zig
-- Installing: /usr/local/lib
/bin/mkdir -p /wrkdirs/usr/ports/lang/zig/work/stage/usr/local/share/doc/zig/std
(cd /wrkdirs/usr/ports/lang/zig/work/zig-0.9.0 && /wrkdirs/usr/ports/lang/zig/work/stage/usr/local/bin/zig run  ./doc/docgen.zig -- /wrkdirs/usr/ports/lang/zig/work/stage/usr/local/bin/zig  ./doc/langref.html.in /wrkdirs/usr/ports/lang/zig/work/stage/usr/local/share/doc/zig/langref.html  && /bin/rm -f /wrkdirs/usr/ports/lang/zig/work/stage/lib/zig/std/zig-cache)
error: AccessDenied
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/zig
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2022-01-21 23:04:38 UTC
@Reporter Can you include a full build log compressed if necessary and poudriere.conf for the environment. Is poudriere set to use BUILD_AS_ROOT=no?
Comment 2 Lev A. Serebryakov freebsd_committer freebsd_triage 2022-01-21 23:39:31 UTC
Created attachment 231230 [details]
Full build log
Comment 3 Lev A. Serebryakov freebsd_committer freebsd_triage 2022-01-21 23:41:19 UTC
Created attachment 231231 [details]
poudriere.conf

Yes, I have BUILD_AS_NON_ROOT commented out (default) so it is effectively BUILD_AS_ROOT=no
Comment 4 commit-hook freebsd_committer freebsd_triage 2022-05-17 14:08:43 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=23f56fe6fc7761a5fccc0d3ec4d1121d6d107667

commit 23f56fe6fc7761a5fccc0d3ec4d1121d6d107667
Author:     Dave Cottlehuber <dch@FreeBSD.org>
AuthorDate: 2022-05-17 14:07:51 +0000
Commit:     Dave Cottlehuber <dch@FreeBSD.org>
CommitDate: 2022-05-17 14:07:51 +0000

    lang/zig: update to 0.9.1

    Switch to pre-built docs, as this more than halves the build time and
    also enables BUILD_AS_NON_ROOT with poudriere.

    PR:             261396
    Reported by:    kib
    Sponsored by:   SkunkWerks, GmbH

 lang/zig/Makefile  | 40 +++++++++++++-----------------------
 lang/zig/distinfo  |  8 +++++---
 lang/zig/pkg-plist | 60 +++++++++++++++++++++++++++++++++++++-----------------
 3 files changed, 60 insertions(+), 48 deletions(-)
Comment 5 Dave Cottlehuber freebsd_committer freebsd_triage 2022-05-17 14:26:45 UTC
Lev thanks for the PR this should be fixed. We use a prebuilt tarball
which is significantly faster and simpler now.