Subject: Re: pkg/28510
To: Robert Elz <kre@munnari.OZ.AU>
From: Johnny C. Lam <jlam@NetBSD.org>
List: pkgsrc-bugs
Date: 06/08/2005 21:48:02
On Tue, Mar 29, 2005 at 01:45:42PM +0700, Robert Elz wrote:
>     Date:        Tue, 29 Mar 2005 11:10:07 +0700
>     From:        Robert Elz <kre@munnari.oz.au>
>     Message-ID:  <733.1112069407@munnari.OZ.AU>
> 
> This...
> 
>   | If you want to implement a solution like that for X app-defaults files,
>   | go for it - but the way to be like this would be to add something new
>   | in /etc/X11/XF86Config (and then work out how to get something similar
>   | for those other X servers that don't have a config file).
> 
> was, of course, nonsense, as it is the applications, not the server, that
> need the app-defaults files.   But a config file in some well known place
> (probably in /etc/X11, since it exists) that could set system-wide application
> defaults would be a (non-trivial) reasonable solution.

This problem has been around for about a year, and there have been
several solutions presented in the addendum to pkg/28510, but they
are all unsatisfactory in some way: union mounts are NetBSD-specific,
modifying the X11 sources is non-trivial or not even possible for some
platforms, telling users to set XUSERFILESEARCHPATH is hit-and-miss,
and telling admins to build their packages with USE_XPKGWEDGE=no writes
new files into /usr/X11R6 all over the place.

Rather than dealing with purely "read-only" /usr/X11R6 and trying to
make pkgsrc work with this setup, which seems to take quite a lot of
work, I propose an alternative solution: just symlink the app-defaults
files from /usr/pkg to /usr/X11R6.  If that's not allowed on your
system, then "too bad" -- you're stuck with needing to do some sort
of union-mount or with telling your users to set XUSERFILESEARCHPATH.
You're also not forced to use this solution, as it's used only if the
helper package that manages the symlinks is installed on the system.

This proposal involves creating a helper package, i.e.
pkgtools/x11-pkg-manager, that would manage the symlinks of the
app-defaults files between /usr/pkg and /usr/X11R6 in some smart way.
In addition, we also add an install script fragment that will invoke
the helper script (if it exists) at both POST-INSTALL and DEINSTALL
time.

This proposal does have the drawback of not working with pkgviews
since only one version of a package can have symlinks in /usr/X11R6.
However, it provides a simply and yet completely optional way for
people not using pkgviews to manage their X11 packages without resorting
to telling their users to properly set XUSERFILESEARCHPATH or using
union mounts.

Comments?

	Cheers,

	-- Johnny Lam <jlam@NetBSD.org>