First time porter seeks guidance on 'make package' (as user)

James E Keenan jkeenan at pobox.com
Mon Jan 8 20:46:15 UTC 2018


I am making my first attempt at constructing a FreeBSD port.  The port 
in question is for Perl extension Devel-Platform_Info 
(http://search.cpan.org/dist/Devel-Platform-Info/). 
Devel-Platform-Info, AFAICT, has not yet been ported and has no 
prerequisites outside the Perl 5 core distribution.  Hence, it should 
not be difficult to port.  I have constructed and submitted a port for 
this CPAN distribution to OpenBSD; now I would like to do so as well for 
FreeBSD.

I have tried to follow the guidance in the Porters Handbook starting here:

https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/index.html

... particularly the discussion in Chapter 3, "Quick Porting":

https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/quick-porting.html

I have successfully tested the port with both 'portlint' 
(https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/testing-portlint.html) 
and 'port test' 
(https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/testing-porttools.html).

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:

"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.

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?

Makefile for this port attached for reference.

Thank you very much.
Jim Keenan
-------------- next part --------------
# Created by: James E Keenan <jkeenan at cpan.org>
# $FreeBSD$

PORTNAME=	Devel-Platform-Info
PORTVERSION=	0.16
CATEGORIES=	devel perl5
MASTER_SITES=	CPAN
PKGNAMEPREFIX=	p5-

MAINTAINER=	jkeenan at cpan.org
COMMENT=	Unified framework for obtaining common platform metadata

LICENSE=	ART20

USES=		perl5
USE_PERL5=	configure

OPTIONS_DEFINE=	DOCS

PORTDOCS=	Changes README

.include <bsd.port.options.mk>

post-install:
	${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>


More information about the freebsd-ports mailing list