Re: Cross compiling user applications for armv7
Mark Millard <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.arm |
|---|---|
| Message-ID | <[email protected]> |
On Sep 20, 2025, at 09:43, Mark Millard <[email protected]> wrote: [Just adding an additional note about what directory the message is likely about and what may be a reason you might need a separate poudriere jail world directory tree.] > On Sep 20, 2025, at 08:39, Michał Kruszewski <[email protected]> wrote: > >> I believe I have tried all possible combinations of BUILD_AS_NON_ROOT, PORTBUILD_USER, PORTBUILD_GROUP, PORTBUILD_UID, PORTBUILD_GID. > > That leads me to the below conclusion . . . > >> All of them fail with the same message: >> pkg-static: . wrong user or group ownership (expected 0/0 versus actual 1001/0) > > I'll note that the "actual 1001/0" indicates that the file system > actually has a directory or file with such an ownership. Given the > lack of updates when you change things, it is probably not a > directory or file that is being recreated or having its ownership > changed: just a persistent old ownership staying in place. > > Note: The ". wrong" indicates that the specific message > is for a directory. Looking in my environment, local.sqlite (mentioned in prior messages) is in paths that have: var/db/pkg/local.sqlite in the various such that I have around. So "." in the message is likely the "pkg" directory above and the related later test would be for the local.sqlite file if it existed. # ls -lodT /usr/obj/DESTDIRs/main-ZNV4-chroot-ports-local/var/db/pkg drwxr-xr-x 3 root wheel uarch 4 Jun 27 20:56:25 2025 /usr/obj/DESTDIRs/main-ZNV4-chroot-ports-local/var/db/pkg # ls -lodT /usr/obj/DESTDIRs/main-ZNV4-chroot-ports-local/var/db/pkg/local.sqlite -rw-r--r-- 1 root wheel uarch 34533376 Jun 27 20:56:25 2025 /usr/obj/DESTDIRs/main-ZNV4-chroot-ports-local/var/db/pkg/local.sqlite [The below ignores poudriere(-devel) jails that are created by the "pkgbase" method.] But note that is not for a poudriere jail world. The ones that are for such instead have a status like: # ls -loaT /usr/obj/DESTDIRs/main-ZNV4-poud/var/db/pkg/ total 9 drwxr-xr-x 2 root wheel uarch 2 Aug 27 14:59:10 2021 . drwxr-xr-x 11 root wheel uarch 13 Jun 28 23:04:26 2025 .. In other words: no local.sqlite or repos/ directory is present in that pkg directory when poudriere is not in operation. Related Side Notes: It is not valid to have any port packages installed in the poudriere jail world's directory tree. That includes the port package pkg itself not being installed. poudriere deals with installing and uninstalling pkg and other packages as it needs to as part of its operation --but it is not designed to deal with such from other than its own internal activity. This would mean keeping the poudriere jail world's directory tree separate from any world directory tree that might have pkg or other port packages installed. >> The configuration does not even change the error message. >> The actual is always 1001/0. > > That is because, the "actual 1001/0" message is about a preexisting > file with the ownership indicated --as far as I can tell. > > The ownership of that directory or file needs to be changed. (There > may be others with similar issues.) > > Note: The ". wrong" indicates that the specific message > is for a directory. > >> Even though, poudriere bulk info differs. >> For example, this is my current poudriere.conf: https://pastebin.com/cE7afZuP >> The poudriere message is: >> [00:00:01] Will build as nobody:nobody (65534:65534) >> I don't understand why, because BUILD_AS_NON_ROOT is set to NO. >> I guess it should build as root. > > BUILD_AS_NON_ROOT does not control the ownerships of the > preexisting files and directories involved. > >> Mark, can you send my your poudriere.conf that successfully compiles some packages? > > My various poudirere.conf are heavily tailored to supporting > my rare "poudriere bulk -Ca" tests that try to build all > 30000+ port packages. And things are split up across multiple > such files that are used together, in order to deal with > handling different jails somewhat differently. The large > .conf is like 32504 bytes long, most of it from a large > TMPFS_BLACKLIST definition. > > Plus, given what I report above about the "actual 1001/0" > message, I doubt that my files would make any difference > (before or after you had tailored things not matching your > context). > > Your poudriere.conf looks to only define non-default > or explicit values for: > > ZPOOL (explicit zroot) > DISTFILE_CACHE (non-default /tmp/cache) > BUILD_AS_NON_ROOT (explicit NO [instead of no]) > > You have some other changes that are commented out > --so everything other than the above 3 are using the > defaults as far as what you posted goes. > > I doubt that such is contributing to the specific > "actual 1001/0" message. > > I recommend finding the directory(s) and/or file(s) > owned by 1001 (user) and 0 (group) and changing > the ownership to the 0 (user) and 0 (group) that is > being reported as what is expected. I do not > know if permissions might also be at issue. This is > about the directory tree used to hold the poudriere > jail's world. > > If you use that outside poduriere as well, you might > well instead want a separate directory tree for the > poudriere jail world that can have its own ownerships > and/or permissions independent of the other activities. === Mark Millard marklmi at yahoo.com