From owner-freebsd-amd64@freebsd.org Wed Mar 21 11:49:19 2018 Return-Path: Delivered-To: freebsd-amd64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF904F60B47 for ; Wed, 21 Mar 2018 11:49:19 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: from mail-wr0-x231.google.com (mail-wr0-x231.google.com [IPv6:2a00:1450:400c:c0c::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 28CE26B0F1 for ; Wed, 21 Mar 2018 11:49:19 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: by mail-wr0-x231.google.com with SMTP id l8so4878451wrg.5 for ; Wed, 21 Mar 2018 04:49:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=Ux54d2+aU1FV0XN3r3hIuF8TQA2N81hYqeRoAH8fvms=; b=Tq7oGSDUdrvHUbictg1QX8HHqDELExVxzFmRvrlQheaXSL2zshvgZc9xPO0XgKDInV G3zCrI1ZcPcA70IICZNkoJ21FhFi+KWhKrq9Cnw6oYq3ix5usT6/0Kh522F1w/nl9ssZ S+PzXPIDzZ/W47Y+aW72/pqOKHoJ0qoF/ZmMLrcEYTfkT3l/95/QlSSKWIzNkBId9vky 4ar7aoPC1InFJ2dTgO8TF4m8RrS/3s8mZLJ88GWCSfVem7m5GTedV6xDYUjl0YLZeeQj d33g4bGNpZ8r8jDU9i8D5ozd5JL3aNIdSe6DP71dkC2xEVdxNPNfqnvKapobRcqMDaeF YHZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=Ux54d2+aU1FV0XN3r3hIuF8TQA2N81hYqeRoAH8fvms=; b=M0MMeiWBoCl6I9QsMyi2cEHH4a7hsIxPTw2ewblnlfJdyekNau6xesEtVGNXkeZM0J GGRJ1OqDMLUE8e2DGxh0KH8njLxaXok8x/JDR2As5qcOTjvEJkeQKI2z5CQO7MzrBU+H 1rjINH7j3Vs1rTXC/XDyM3SpOMFJFE1aKzm5rKZHf2zo159pP9GkGxGDLyeoi0JRTdr2 ljsQ97WovBQMFKnOwqZPXr9RNuiXtmcuMG35yoIFmfHvhWDwjH1dolF4thKDdr7ALh4S e39nUgVapkIBWHYvtSJQmUGryU3iEbtwDI9nPPpZFn0sJvgW7xtb+KuieJDosc91slYd xK3Q== X-Gm-Message-State: AElRT7GPe1sXj5TMKY1Yi/laObGJw8L/RHi1Bh+gUdb6f6haSUNtWKwm MxoCRz8drqbI/QNgT/wxVFw1Rw== X-Google-Smtp-Source: AG47ELuT+UUdy1q9kcuIdOk20SrYUtsxoyISYcCi4ywlAWOYPX4Co50Qg8k32m8Y3N/7QPGUo23nZw== X-Received: by 10.223.152.138 with SMTP id w10mr5152334wrb.34.1521632957418; Wed, 21 Mar 2018 04:49:17 -0700 (PDT) Received: from ernst.home (p5B02330E.dip0.t-ipconnect.de. [91.2.51.14]) by smtp.gmail.com with ESMTPSA id f23sm5117748wra.51.2018.03.21.04.49.16 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Mar 2018 04:49:16 -0700 (PDT) Date: Wed, 21 Mar 2018 12:49:15 +0100 From: Gary Jennejohn To: freebsd-amd64@freebsd.org Subject: Re: Linux compat / changing compat path Message-ID: <20180321124915.03dfb49d@ernst.home> In-Reply-To: References: <20180321090911.4d1059c2@ernst.home> Reply-To: gljennjohn@gmail.com X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Mar 2018 11:49:19 -0000 On Wed, 21 Mar 2018 09:39:09 +0100 Stefan Esser wrote: > Am 21.03.18 um 09:09 schrieb Gary Jennejohn: > > On Tue, 20 Mar 2018 21:21:52 +0100 > > Georg Bege 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