Subject: Re: faking an older release for bulk build
To: grant beattie <grant@netbsd.org>
From: Ron Roskens <roskens@elfin.net>
List: tech-pkg
Date: 02/28/2004 21:14:49
* grant beattie <grant@netbsd.org> [2004-02-29 11:21:30 +1100]:
> On Sat, Feb 28, 2004 at 06:40:32PM -0500, Jan Schaumann wrote:
>
> > Hi,
> >
> > Just to confirm: it is possible to fake an older release for the
> > purpose of bulk builds, right? I have an O2 with -current installed,
> > and would like to use it to bulk-build for 1.6.2-sgimips. Am I correct
> > that extracting the 1.6.2-sets into a chroot (or building them into
> > there) is sufficient or do I need to tweak anything else?
> >
> > Should I expect some breakage due to different kernel versions of the
> > running system and the bulk-faked system?
>
> install pkgtools/libkver :)
>
> This package provides a shared library and a replacement for
> sysctl(1) (when needed i.e. when the original one is statically linked)
> so that the real version numbers and strings of the running NetBSD
> kernel as returned by sysctl(3) and uname(3) are overridden by
> those the library is configured to report.
>
> This is useful for -among other things- building packages in
> sandboxed/chrooted environment for a different NetBSD release than the
> system hosting the sandbox/chroot.
Very much so. I'd add one comment, in that you can do without LD_PRELOAD
if you setup /etc/ld.so.conf:
libc.so.12 machdep.fpu_present 1:/usr/pkg/lib/libkver.so.1,libc.so.12
I've tried using something other than machdep.*, but never got anything to work.
Either ld.so.conf(5) is wrong when it says you can use <sysctl_variable>, or
the source needs to be fixed to allow other sysctl entries.
Another comment would be why is libkver looking for a symlink outside of the /usr/pkg/
tree?
Ron