From owner-freebsd-ports-bugs@freebsd.org Sun May 6 12:48:48 2018 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61F1BFB9306 for ; Sun, 6 May 2018 12:48:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id D83CD6D044 for ; Sun, 6 May 2018 12:48:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 945EAFB9305; Sun, 6 May 2018 12:48:47 +0000 (UTC) Delivered-To: ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 568CFFB9304 for ; Sun, 6 May 2018 12:48:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CC1026D041 for ; Sun, 6 May 2018 12:48:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 1CA97333E for ; Sun, 6 May 2018 12:48:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w46CmjCK051038 for ; Sun, 6 May 2018 12:48:45 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w46CmjsM051036 for ports-bugs@FreeBSD.org; Sun, 6 May 2018 12:48:45 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 228023] databases/ruby-bdb: Allow poudriere run with BUILD_AS_NON_ROOT=no on ZFS Date: Sun, 06 May 2018 12:48:45 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: loader@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: knu@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc flagtypes.name attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 May 2018 12:48:48 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D228023 Bug ID: 228023 Summary: databases/ruby-bdb: Allow poudriere run with BUILD_AS_NON_ROOT=3Dno on ZFS Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: knu@FreeBSD.org Reporter: loader@FreeBSD.org CC: koobs@FreeBSD.org Assignee: knu@FreeBSD.org Flags: maintainer-feedback?(knu@FreeBSD.org) Created attachment 193087 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D193087&action= =3Dedit ruby24-bdb-0.6.6_5.log I just got these errors in attached poudriere log ruby24-bdb-0.6.6_5.log: chmod: ./css/fonts.css: Operation not permitted chmod: ./css/rdoc.css: Operation not permitted chmod: ./js/jquery.js: Operation not permitted chmod: ./js/darkfish.js: Operation not permitted chmod: ./js/search.js: Operation not permitted These files are installed by lang/ruby24 and located in ${LOCALBASE}/lib/ruby/2.4/rdoc/generator/template/darkfish/ They would be copied into ${WRKSRC}/docs/doc of database/ruby-bdb=20 while running the rdoc target. Actually, rdoc creates hard links for them: https://svn.ruby-lang.org/cgi-bin/viewvc.cgi/tags/v2_4_4/lib/rdoc/generator= /darkfish.rb?revision=3D63013&view=3Dmarkup#l557 563 begin 564 FileUtils.ln source, destination, options Hard links preserve the ownership of these files, even when poudriere runs building/staging as a regular user. % stat -f '%Sp %Su:%Sg %N' docs/doc/css/ drwxr-xr-x nobody:wheel docs/doc/css/ % stat -f '%Sp %Su:%Sg %N' docs/doc/css/*.css -rw-r--r-- root:wheel docs/doc/css/fonts.css -rw-r--r-- root:wheel docs/doc/css/rdoc.css databases/ruby-bdb uses ${COPYTREE_SHARE} to copy theses files from ${WRKSRC}/docs/doc to ${STAGEDIR}${DOCSDIR}/doc https://svnweb.freebsd.org/ports/head/databases/ruby-bdb/Makefile?revision= =3D458847&view=3Dmarkup#l65 65 post-install-DOCS-on: 66 ${MKDIR} ${STAGEDIR}${DOCSDIR}/doc 67 (cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSD= IR}) 68 (cd ${WRKSRC}/docs/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/doc) The cpio -l option in ${COPYTREE_SHARE} creates links instead of copying fi= les that also preserve the ownership root:wheel https://svnweb.freebsd.org/ports/head/Mk/bsd.port.mk?revision=3D468917&view= =3Dmarkup#l2205 2205 COPYTREE_SHARE=3D ${SH} -c '(${FIND} -Ed $$1 $$3 | ${CPIO} -dumpl $= $2 >/dev/null 2>&1) && \ 2206 ${FIND} -Ed $$1 = $$3 \( -type d -exec ${SH} -c '\''cd '\''$$2'\'' && chmod 755 "$$@"'\'' . {} = + \ 2207=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20 = -o -type f -exec ${SH} -c '\''cd '\''$$2'\'' && chmod ${_SHAREMODE} "$$@"'\'' = . {} + \)' COPYTREE_SHARE It's the chmod ${_SHAREMODE} command in ${COPYTREE_SHARE} that wrote the error message in poudriere log: chmod: ./css/fonts.css: Operation not permitted chmod: ./css/rdoc.css: Operation not permitted ... On UFS, running "chmod 644 docs/doc/css/fonts.css" as a regular user "nobod= y" and that file has the identical mode (-rw-r--r--) owned by root doesn't raise an error. on ZFS, may_have_nfs4acl() returns 1 and then it runs fchmodat() https://svnweb.freebsd.org/base/head/bin/chmod/chmod.c?revision=3D326025&vi= ew=3Dmarkup#l197 197 /* 198 * With NFSv4 ACLs, it is possible that applying a = mode 199 * identical to the one computed from an ACL will change 200 * that ACL. 201 */ 202 if (may_have_nfs4acl(p, hflag) =3D=3D 0 && 203 (newmode & ALLPERMS) =3D=3D (p->fts_statp->st_m= ode & ALLPERMS)) 204 continue; 205 if (fchmodat(AT_FDCWD, p->fts_accpath, newmode, atf= lag) =3D=3D -1 databases/ruby-bdb is a RUN_DEPENDS of ports-mgmt/portupgrade, I'm not awar= e if there are other ports that also use rdoc + ${COPYTREE_SHARE} which might cause the similar problem on ZFS, so I just attached a patch to databases/ruby-bdb rather than modifying the ${COPYTREE_SHARE} in bsd.port.mk. I've searched freebsd-pkg-fallout@ lists but didn't find anything about databases/ruby-bdb, it seems poudriere.conf has BUILD_AS_NON_ROOT=3Dno enabled on the package c= luster :) % fetch -q -o - http://beefy5.nyi.freebsd.org/data/104i386-default/468751/logs/bash-4.4.19.= log | grep 'root[[:space:]]+wheel' -rwxr-xr-x 1 root wheel 1036686 May 1 01:18 bash --=20 You are receiving this mail because: You are the assignee for the bug.=