Subject: Re: [PATCH] pkginstall framework modifications
To: Todd Vierling <>
From: Johnny Lam <>
List: tech-pkg
Date: 04/21/2006 15:51:41
Todd Vierling wrote:
> BTW, I've been meaning to ask... I do want to convert the Interix user
> support to the new framework, and doing that should be possible.  Where
> should I look first to get started on this?

The bits related to users and groups that may be platform-specific are 
supposed to be placed in pkgsrc/mk/install/usergroupfuncs.${OPSYS}, so 
in your case, you would create usergroupfuncs.Interix.  After my 
pkginstall patch is committed, there will be four shell functions you 
will need to define: group_exists, user_exists, addgroup and adduser. 
Those functions are expected to call the correct locally-available 
utilities to perform the necessary queries or tasks.

> As an aside, Interix has one very odd quirk regarding users/groups that I
> have to find a solution for "someday".  In short, you can't have a user and
> group with the same name -- but you *can* have a user or a group own a file
> and provide access control.
> For the most part, this can be emulated by creating only the userid (as the
> purpose of foo:foo ownership is usually to partition it to a single user
> with its own single-user group).  That assumption doesn't always hold,
> however, and sometimes you really want a group rather than a user, or
> perhaps have a group with a differing name after all.  I have to figure out
> how best to mark the latter situation, which may involve putting
> Interix-specific PKG_USERS overrides in some places, or introducing new,
> divergent group names in those cases.  Hrmpf.

One idea that might work for Interix is to have some common suffix that 
is added to each user or group name.  Then pkginstall could append this 
to the names of all users and groups listed in PKG_USERS and PKG_GROUPS. 
  For example, the postfix Makefile might have:

	PKG_GROUP=	postfix
	PKG_USERS=	postfix:postfix

On Interix, we put PKG_USER_SUFFIX=_user and PKG_GROUP_SUFFIX=_group in 
mk/platform/, and the names of the postfix user and group 
would automatically become "postfix_user" and "postfix_group" when the 
names are recorded in the +INSTALL script.  I think this would minimize 
the need for additional special-handling for Interix.


	-- Johnny Lam <>