Subject: Re: XF3 vs XF4 PLIST and binary packages
To: None <mcmahill@mtl.mit.edu>
From: Johnny C. Lam <jlam@netbsd.org>
List: tech-pkg
Date: 07/04/2002 13:07:30
On Tue, Jul 02, 2002 at 05:32:34AM -0400, mcmahill@mtl.mit.edu wrote:
>
> We are in a situation now with the migration to Xfree-4 that causes 2
> problems.
>
> 1) PLIST issues. I recently noticed that for a particular package I got
> a different PLIST depending on if I was on a Xfree-3 machine (all non-i386
> and some i386) vs. a Xfree-4 machine. In this case it was the Xft and
> Xrender libraries which come with Xfree-4 which caused extra stuff to be
> built and installed. I wonder if we need a bsd.lib.mk check for Xfree-4
> that would set some variable that a package should check for to add a
> PLIST.XF4 to PLIST_SRC?
Currently, several packages have independent hacks to deal with this
situation, which I think we should continue to do. I'm not in favor of a
variable that checks for "XFree86-4.x" because the set of libraries that it
comprises simply grows in each release. Rather, I believe individual
packages should add tests like:
.if exists(${X11BASE}/lib/libXrender.a)
# relevant stuff here
.endif
so that the correct prerequisite (in this case, "libXrender.a" and not just
"XFree86-4.x") is made explicit.
> 2) Binary package incompatibility. Binary packages built on XFree-4
> boxes are not compatible with binary packages built on XFree-3 boxes.
> This is partly due to different dependencies, for example Xpm is builtin
> for Xfree-4 but not for Xfree-3, and partially due to different shared
> library version numbers in Xfree-4 vs Xfree-3. Perhaps we need to store
> the bit of info that a package was built on an XFree-4 box vs XFree-3 box
> and do some error checking in pkg_install? This would be similar to the
> test which should be added to prevent accidental installation of a vax
> binary package on a sparc.
I think we should use the REQUIRE script to do this type of checking.
We've purged all instances of its use from pkgsrc already, so we can
co-opt it for private pkgsrc use. Then for packages that set USE_X11,
USE_X11BASE, or USE_IMAKE, we can automatically create a REQUIRE script
that checks that the version of XFree86 during installation matches the
one used to build the package.
Cheers,
-- Johnny Lam <jlam@netbsd.org>