Date: Wed, 4 Dec 2024 11:36:23 +0900 From: Koichiro Iwao <meta@freebsd.org> To: ports@freebsd.org Cc: go@freebsd.org Subject: go: exec go1.22.6: permission denied Message-ID: <zlkvoroky3ytxgvzdtbdmq75fv7h6pxwzpijvsmptj5x4j7rja@crfppwz756kq>
next in thread | raw e-mail | index | archive | help
Hello folks, I got the following error when trying to build some go packages. I found the cause so I'd like to share it if this help someone. # portmaster www/gohugo ===> License APACHE20 accepted by the user ===> gohugo-0.139.3,1 depends on file: /usr/local/sbin/pkg - found ===> gohugo-0.139.3,1 depends on file: /usr/local/bin/go121 - found ===> gohugo-0.139.3,1 depends on package: ca_root_nss>0 - found ===> Fetching all distfiles required by gohugo-0.139.3,1 for building ===> Fetching github.com/gohugoio/hugo dependencies go: exec go1.22.6: permission denied *** Error code 1 Stop. make[1]: stopped in /usr/ports/www/gohugo It turns out this was because I had dropped exec bit on zroot/usr/ports/distfiles a decade ago according to the previously recommended filesystem layout. > zfs create -o exec=off -o setuid=off zroot/usr/ports/distfiles https://wiki.freebsd.org/RootOnZFS/PoolLayout After I turn on exec bit unser distfiles directory, it works perfectly. > zfs set exec=on zroot/usr/ports/distfiles I don't know if it was an intended design for the go framework to require the exec bit on the distfiles directory, but it is true that it does require the exec bit at the moment. Anyway, this situation is likely encountered by very few people, like me, who have been using ZFS on root for over 10 years, before bsdinstall added support for ZFS on root. Thanks, -- meta <meta@FreeBSD.org>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?zlkvoroky3ytxgvzdtbdmq75fv7h6pxwzpijvsmptj5x4j7rja>