From nobody Fri Aug 18 09:26:32 2023 X-Original-To: ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RRxMd4Q2fz4qybL; Fri, 18 Aug 2023 09:26:37 +0000 (UTC) (envelope-from felix@palmen-it.de) Received: from stef.palmen-it.de (stef.palmen-it.de [IPv6:2001:470:1f0b:bbb:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RRxMb4frCz3WQS; Fri, 18 Aug 2023 09:26:35 +0000 (UTC) (envelope-from felix@palmen-it.de) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=palmen-it.de header.s=20200414 header.b=kOhj7nqE; spf=pass (mx1.freebsd.org: domain of felix@palmen-it.de designates 2001:470:1f0b:bbb:1::1 as permitted sender) smtp.mailfrom=felix@palmen-it.de; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=palmen-it.de; s=20200414; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:To:From:Date:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=A39VWMcCW8PTQhynh6gh8CojANTSSX0EGP9GqirZ3+8=; b=kOhj7nqEcJXHaVHH6Wdn/nFzVw bGupxyvfsVL4VGT5amdaPlAbwm17gMAh09wPrMR2Lu9+Cuo0xT1nNNi5ZwirG17N5MMm/pB31p/SN KOkMDqVZWXqwOADjzXiaz6KGRzNYhxsrZtMAG4/HFGWChgQnhZtnnpre/uC8EHwfL1L6jhg5Q8pYr UdHx6sDCwRXTDBhU5Y6mLeymoUo92EwgEAR2rtf03LhjfFYJU31SXyDj3dbbLChIHLsDzGeU0PjaJ f9Lc7W2YzDoYGC1nMFa5mWjnDeb+2xrr+XVOC8RDRQ+33oqE3afiThUYPiExG44nkWXbTiEvRFvek +CTXf5pQ==; Received: from [192.168.71.101] (helo=mail.home.palmen-it.de) by stef.palmen-it.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qWvkX-00A2wK-Co; Fri, 18 Aug 2023 11:26:33 +0200 Received: from nexus.home.palmen-it.de ([192.168.99.2]) by mail.home.palmen-it.de with esmtpsa (TLS1.3) tls TLS_CHACHA20_POLY1305_SHA256 (Exim 4.96 (FreeBSD)) (envelope-from ) id 1qWvkX-0005Xh-0e; Fri, 18 Aug 2023 09:26:33 +0000 Date: Fri, 18 Aug 2023 11:26:32 +0200 From: Felix Palmen To: ports@freebsd.org, emulation@freebsd.org Subject: Re: Building a Linuxulator userland from source Message-ID: Mail-Followup-To: ports@freebsd.org, emulation@freebsd.org X-Face: /1K@t"h.}e~pR@]c7HorQ!T`F^RJCa'BCr#e>IKA{>C/9OTGB4|xh"y2{?1Z5M i2w"AH^pN_LlHR^{+f',_Np~;.B;!M/bL}*qk]p5*r7F5vW};{:@4u5S?T&f0$7BJ-71Q5SV]:v$`5 A0[DZ:=?S52x8HJ~5@^P_\T@MsjG{R( Organization: FreeBSD.org References: List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="c7u3piobwowdasdm" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20230517 X-Spamd-Result: default: False [-7.50 / 15.00]; SIGNED_PGP(-2.00)[]; DWL_DNSWL_MED(-2.00)[palmen-it.de:dkim]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-0.999]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; FORGED_SENDER(0.30)[zirias@freebsd.org,felix@palmen-it.de]; R_DKIM_ALLOW(-0.20)[palmen-it.de:s=20200414]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; R_SPF_ALLOW(-0.20)[+ip6:2001:470:1f0b:bbb:1::1:c]; RCVD_IN_DNSWL_MED(-0.20)[2001:470:1f0b:bbb:1::1:from]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[freebsd.org]; MLMMJ_DEST(0.00)[ports@freebsd.org,emulation@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_NEQ_ENVFROM(0.00)[zirias@freebsd.org,felix@palmen-it.de]; RCVD_COUNT_TWO(0.00)[2]; HAS_ORG_HEADER(0.00)[]; TO_DN_NONE(0.00)[]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[palmen-it.de:+]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCPT_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_TLS_ALL(0.00)[] X-Spamd-Bar: ------- X-Rspamd-Queue-Id: 4RRxMb4frCz3WQS --c7u3piobwowdasdm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Alexander, thanks for commenting! * Alexander Leidinger [20230818 11:02]: > As the person who switched the linuxulator from redhat 4 or 5 to fedora a= nd > mentored the people which moved forward to linux-c6 I have some info about > the design principles of the linux_base ports which you may or may not kn= ow > already: > https://www.leidinger.net/blog/2011/08/29/howto-create-a-new-linux_base-p= ort/ > https://www.leidinger.net/blog/2011/09/01/howto-add-linux-infrastructure-= ports-for-a-new-linux_base-port/ This might certainly be useful to check against. I think I do have some understanding, but so far only from looking at what existing ports are doing. > If it shall not be much of a moving target, I associate "not much work" w= ith > it. This is somehow contradicting your approach with building from source= in > my opinion. It also opens up the question if any issue is because of what= we > do with it, or because of upstream. And this additionally to the complexi= ty > if the issue is in our linuxulator (kernel side). This doesn't sound much > like "not much work". Yes, I see how "bug hunting" could be an issue. So far, I could stay *very* close to upstream in my ports, but yep, it's only the GNU toolchain, I will have to see where it leads. > > - Provide the newest GNU libs (glibc, libstdc++, ...) built against > > exactly the Linux version emulated by the FreeBSD version this will > > run on. This should make it possible to run a lot more Linux binaries > > without relying on e.g. Linux jails. >=20 > I see a mismatch here. You want to have the newest ones, while the > distribution itself shall not be a much of a moving target. This seems to be a misunderstanding though. IMHO, for repackaging some distribution, this should not be a moving target, because otherwise you could have some unpleasant surprise like some glibc update suddenly requiring a newer Linux version that the FreeBSD kernel offers. With building from source, at least *this* can't be a problem, because the base libs will always be built with the "correct" version of the Linux headers. > > - When binaries don't work for missing Linux libraries, make it somewhat > > easy to add them, maybe based on already existing FreeBSD ports. >=20 > This may be harder than you think. Or more easy than I think. The FreeBSD > ports will have stuff specific to FreeBSD which may not be needed for the > linux-on-FreeBSD-build. The building part may involve more hackery than t= he > FreeBSD port. Yes, I'm aware of that. It might require quite some work on the framework to make it actually easy. TBH, this is just an idea so far, I didn't really think about come concrete concept yet. > USE=3Dlinux is suited for the needs of a linux_base port. A linux_base po= rt is > designed to integrate with the FreeBSD system (=3D fallthrough so FreeBSD > config if the config is a drop-in replacement for the linux config, e.g. > krb5.conf or hosts and such). What you need for building is on the other > hand a "pure" linux system without any fallthrough to FreeBSD, to make su= re > you don't pollute the linux-build with FreeBSD stuff. This means at least= a > chroot into some linux_dist-style port instead of a linux_base style port. 1.) Of course, Uses/linux.mk would need quite some switching to handle c7 as well as something new that works completely differently (maybe call it src). All still open issues. 2.) Could you please elaborate how e.g. some config file "visible" to the Linux processes could "pollute" a Linux build? Besides, this could only affect files from base /etc I think... Cheers, Felix --=20 Felix Palmen {private} felix@palmen-it.de -- ports committer -- {web} http://palmen-it.de {pgp public key} http://palmen-it.de/pub.txt {pgp fingerprint} 6936 13D5 5BBF 4837 B212 3ACC 54AD E006 9879 F231 --c7u3piobwowdasdm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iNUEABYKAH0WIQRpNhPVW79IN7ISOsxUreAGmHnyMQUCZN85Ql8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0Njkz NjEzRDU1QkJGNDgzN0IyMTIzQUNDNTRBREUwMDY5ODc5RjIzMQAKCRBUreAGmHny MeaaAP9KEek7KceZDDoTdPybvhE4YD8Q5zGudWY4aynbighgTgEAhCkG598fy6SH Im6u9YlZI2Oogs8JDY7X4Y1rR9rpSQs= =Q8GN -----END PGP SIGNATURE----- --c7u3piobwowdasdm--