Hi, a build of openntpd-6.0p1_2,2 fails in poudriere. The problem appears to be related to inability to chmod files in configure phase due to permissions. I have attached poudriere log. Thank you in advance,
Created attachment 177796 [details] poudriere log for failed openntpd build Sorry I didn't check max attachment size, original log is more than 3Mb. I have deleted lots of lines in the middle.
This is very odd. The errors are from ${COPYTREE_SHARE} in pre-configure. This macro first copies a directory tree and then fixes up the permissions with chmod. But if it just created those files, why can't it change their permissions? Those commands run as the same user. Can you look at the actual directory trees and determine why the chmod fails?
I'm fairly new to troubleshooting build issues, maybe I'm gonna need a little more guidance. So far, I've done testport with: `sudo poudriere testport -j 11:x86:64 -w -z server net/openntpd' I don't have DEFAULT_VERSIONS+= ssl=libressl in jail's make conf - it used to be mandatory but if I'm not mistaken that's not the case anymore. I also have 'BUILD_AS_NON_ROOT=yes' in poudriere.conf Build failed, this time I got the message on console: chmod: ./share/licenses/libressl-2.4.4/LICENSE: Operation not permitted *** Error code 1 Stop. make: stopped in /usr/ports/net/openntpd [00:01:27] ====>> Saved openntpd-6.0p1_2,2 wrkdir to: /home/poudriere/data/wrkdirs/11:x86:64-default-server/default/openntpd-6.0p1_2,2.tbz I have extracted openntpd-6.0p1_2,2.tbz, and noticed that dirs are owned by nobody:wheel, but files are owned by root:wheel, eg.: pacija@efreet:~/Desktop/work/libressl/share/licenses/libressl-2.4.4 % ls -alh total 24 drwxr-xr-x 2 nobody wheel 512B 13 dec 12:23 . drwxr-xr-x 3 nobody wheel 512B 13 dec 12:23 .. -rw-r--r-- 1 root wheel 6,3K 13 dec 12:23 BSD4CLAUSE -rw-r--r-- 1 root wheel 201B 13 dec 12:23 catalog.mk -rw-r--r-- 1 root wheel 86B 13 dec 12:23 LICENSE Perhaps this will give some more hints. Do not hesitate to contact me for further testing, but take into account I'm just a sysadmin using this stuff, not writing it, so please give as detailed instruction as possible :)
Is your build area on an NFS partition by any chance? poudriere does run as root for parts of the build process so that it can manipulate file ownership and permissions. This is defeated by the standard mapping of 'root' to 'nobody' on an NFS mount.
I see what the problem is, I'll try and see if I can fix it.
(Note that what the port is doing in order to be built when libressl is not the default was a bad idea to begin with)
The problem is that poudriere does all the builds as a regular user, except for installing dependencies, which are done as root. So, it runs make stage in security/libressl as root, and then it complains it has trouble copying files that are owned by root as a regular user.
And because COPYTREE_SHARE uses cpio -dump*l* so it hard links files to save time and space, so the files in WRKDIR/libressl end up being owned by root.
A commit references this bug: Author: mat Date: Wed Dec 14 16:38:27 UTC 2016 New revision: 428572 URL: https://svnweb.freebsd.org/changeset/ports/428572 Log: Fix building when libressl is not the default. PR: 215150 Sponsored by: Absolight Changes: head/net/openntpd/Makefile