On 08/01/2018 20:46, James E Keenan wrote:
The one place where I have not gotten the desired results is found at "Procedure 3.1: Recommended Test Ordering" (https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/porting-testing.html).  Step 6 of that process is to invoke 'make package' as a regular, non-root user.  When I attempted to do so, I was told that I lacked permission to create a directory.  That didn't surprise me, since the '/usr/ports/' tree has permissions 'drwxr-xr-x' and I, as a member of group 'wheel', lack 'write' permission for that tree.  Hence, I'm puzzled by this advice:

The non-root user that runs 'make package' needs to have write access to the ports tree. Most developers will check out a copy of the ports under their own userid. Alternatively, poudriere has configuration settings to allow generating a package repository as a non-root user.

"Make sure that make package can be run as a normal user (that is, not as root). If that fails, the software may need to be patched. See also Section 17.18, “fakeroot” and Section 17.84, “uidfix”."  I installed the 'fakeroot' package but had no better luck when I ran 'fakeroot make package' as a non-root user.

For a perl port, you probably don't need fakeroot or uidfix -- try compiling your port with the ports tree made writable by the user you're compiling as.

Generally, ports tend to need root level access when the installation of the port to staging involves changing ownership of files. As file ownership in staging is generally immaterial to the ultimate package, just tweaking install(1) command lines to avoid setting ownership on what goes into staging will remove the need for rootly powers.

1. Can someone offer guidance as to how to proceed?

2. I found that to create/edit the Makefile and pkg-descr I had to become root.  That's a style of work that is contrary to my regular software development practices.  With some guidance from an experienced OpenBSD committer I was able to learn how to prepare ports on that platform without becoming root.  Is there any way to do that in FreeBSD?

Yeah -- start by checking out a copy of the ports under your own username. There still can be root-access required, for instance if you're downloading files into /usr/ports/distfiles rather than a custom distfiles location. This will only affect a small number of commands, like 'make makesum' or 'make fetch'. Similarly you will need root powers to actually install the port, but you don't need to go as far as installing anything when developing the port: being able to run 'make package' successfully is a sufficient and practical test during the heat of development.


_______________________________________________
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to