Date: Wed, 21 Mar 2018 12:49:15 +0100 From: Gary Jennejohn <gljennjohn@gmail.com> To: freebsd-amd64@freebsd.org Subject: Re: Linux compat / changing compat path Message-ID: <20180321124915.03dfb49d@ernst.home> In-Reply-To: <e046a463-6463-b36c-3f16-1047abed7393@freebsd.org> References: <fd061767-0b5b-d8f4-6c90-5ae6ff500ef9@bege.email> <20180321090911.4d1059c2@ernst.home> <e046a463-6463-b36c-3f16-1047abed7393@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 21 Mar 2018 09:39:09 +0100 Stefan Esser <se@freebsd.org> wrote: > Am 21.03.18 um 09:09 schrieb Gary Jennejohn: > > On Tue, 20 Mar 2018 21:21:52 +0100 > > Georg Bege <georg@bege.email> wrote: > > > >> Hello users, > >> > >> Im not sure if this is actually the right mailing list for my question. > >> I was looking for something non-amd64 related - but somehow I didnt find that the other topics would be a better match too. > >> > >> Im looking for a way to change the `default` linux compatibility userspace path /compat/linux to something else. > >> Basically right now, I've different jails (also Linux ones) where I keep software which is not compatible with my main system. > >> > >> Also the pkg available linux-c* packages cant suit every thing I need, so I'd like to run programs I've installed (or compiled) from my jails. > >> It works if I change the above mentioned path with a symlink... however this is very unflexible. > >> What would be good is if I could change it per environment - is there a way? Any environment variable perhaps? > >> (And no LD_LIBRARY_PATH isnt cutting it in any cases) > >> > > > > emulation would be the correct mailing list. > > > > This is defined in /usr/ports/Mk/bsd.port.mk as > > LINUXBASE?= /compat/linux > > so theoretically it could be overridden in /etc/make.conf. > > > > But you would have to recompile all your Linux ports. > > And you want to change occurances of /compat/linux in the kernel (and possibly > some libraries and user programs), e.g. in /sys/amd64/linux/linux_sysvec.c ... > > There is some magic that makes an exec of /bin/sh look up /compat/linux/bin/sh > first, if performed from within a program running under Linux emulation, and > if you need that behavior, you have to adjust at least the kernel sources. > > Maybe the hard-coded "/compat/linux" should be replaced by a macro, to allow > easy modification without loss of functionality ... > Thanks, Stefan. I completely forgot about the kernel stuff. Makes me wonder why LINUXBASE is even overrideable in the ports tree. -- Gary Jennejohn
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180321124915.03dfb49d>