Subject: pkgtools/x11-links permissions
To: None <>
From: Ian D. Leroux <>
List: tech-pkg
Date: 01/30/2005 09:17:50
Synopsis: The permissions of the pkgtools/x11-links link-farm depend
on the umask of the user doing the build.

Details: The do-build target of x11-links assembles the tree of links
under work/ and uses "pax -rwpp" to copy it over to its final
location under /usr/pkg/share (or the equivalent on your machine).
The tree is built using ${MKDIR} and ${CREATE_X11LINK} (the latter
is just a wrapped call to "ln -sf").  This means that the tree-building
procedure respects the umask of the user doing the build, and the
install preserves the resulting permissions. In my case, the umask
of the non-root user doing the build is 077, so the resulting tree
(once installed), is readable only by its owner (root), which
prevents ordinary users from building x11-related packages.

Now I'm a relative newcomer to both NetBSD and pkgsrc, and I gather
that the buildlink system has had a lot of work put into it [1],
so I don't want to cry wolf too early.  Is my usage of the system
(building packages under a non-root user with a restrictive umask)
incorrect? Are there any configuration parameters I should be looking
at? Is there a reason why it has to be this way?  Otherwise I'll file a
PR recommending that the calls to "mkdir" and "ln" be replaced by calls
to ... (${INSTALL_DATA_DIR} and ${INSTALL} -l ? ... I don't know the
pkgsrc internals well enough to be sure).


Ian Leroux

[1] which I appreciate: having a clear separation between base,
pkg, and local makes me a happier person.