Subject: Re: Preliminary patch for Linux emulation
To: None <>
From: None <>
List: tech-pkg
Date: 12/10/2005 14:34:29
On Sat, Dec 10, 2005 at 09:24:00AM +0100, Hubert Feyrer wrote:
> On Fri, 9 Dec 2005 wrote:
> >attached is a preliminary patch to rework the OS handling in the Linux
> >packages. It does change the platform list in some cases, which needs
> >review. Esp. the x86_64 and ppc would need testing.
>                    ^^^^^^
> does NetBSD/amd64 support/have compat_linux32 these days?

I'm not sure. I tried to collect what was already (inconsistently)
there. One aim is to be able to correct such mistakes :-)
I don't know which Linux emulation NetBSD has on x86_64 at all.

> >But before I invest more time, I'd ask whether this is considered a good
> >idea and improvement or not. One thing about the use of USE_NATIVE_LINUX
> >vs. OPSYS matching. At least under FreeBSD and DragonFly it is possible
> >to chroot and jail a Linux root, so allowing direct dependencies can be
> >a bit nicer instead of having to fake uname.
> If you ask if something is a good idea, outlining the change in a (more or 
> less) few words would be useful (for those that understand the current 
> situation, i.e. probably not me :)

Sorry, I should have been more clear. The current tree has a lot of
scattered ONLY_FOR_PLATFORMs over the tree for Linux emulation, often
consisting of Linux, NetBSD and FreeBSD, sometimes only NetBSD. This is
clearly suboptimal, since it adds unnecessary maintainance overhead
(adding Linux emulation support for another OS like DragonFly) and is
often incorrect.

The patch tries to uniformly handle this by keeping the platform masks
in one of three forms:
(a) For applications, include emulators/suse_linux/Makefile.application
    and specify ONLY_FOR_PLATFORM as architecture list (*-*-i386).
(b) For Linux packages the dependencies have to be rechecked, sometimes
    it is done based on OPSYS (now replaced with USE_NATIVE_LINUX),
    sometimes not.
(c) For the emulators/suse* packages, keep the masks in Makefile.common.