ly2en, to FreeBSD
@ly2en@chaos.social avatar

#Podman has been ported to #FreeBSD. And it can run Arch Linux for me.

Linux containers in FreeBSD can start through the old good #Linuxulator - which does not support complex features like cgroups or namespaces, which means I probably can't run a container inside a container. Yet.

But this Linux layer is actively supported in FreeBSD for almost 20 years and is rock-solid! It started in 2006 at Google, based on Linux kernel 2.6 and today it shows up as 5.15-compatible!

image/png
image/png

zirias, to FreeBSD

Today's progress on "userland from source" project: We have build systems! 🥳

Supported now (apart of plain ): GNU (including ), , and !

They're all supported with their original "USES", by some trickery in my new "USES=linuxsrc", fixing up just the parts that are different when building from/for the Linuxulator (like adjusting dependencies and commands to use the -native versions).

Ok, no yet, didn't need it so far 🙈

zirias,

Did some minor fixes and overall improvements in the new USES=linuxsrc today ... it already grew quite large 🤔
https://github.com/Zirias/zfbsd-ports/blob/linux/Mk/Uses/linuxsrc.mk

BTW, a while ago, I couldn't resist to add some to the toolchain, currently in line 119.

I mean, the field in these target triplets is there for a reason, right? To be used by vendors? 😏

zirias,

I'm about to force-push my #Linuxulator userland branch now, removing all hacks to disable xattr usage.

TL;DR is: If you want to test it on #FreeBSD 14 and newer right now, you'll have to apply this patch: https://people.freebsd.org/~dchagin/xattr.patch -- I hope it will be committed to main and stable/14 soon 😎

The (weird) background is: Support for #Linux xattr syscalls was added quite recently, and it correctly maps the Linux syscalls to the FreeBSD ones. So far, so good. BUT: Access to the "system" namespace for extended attributes is typically restricted to root (and, on FreeBSD, also restricted in #jails). Now, FreeBSD returns EPERM on rejected attempts, which IMHO makes perfect sense. But, Linux returns ENOTSUP in these cases instead. And: GNU tools and other Linux software using extended attributes consider EPERM a fatal error as a consequence. This means things like "install" from GNU coreutils are now broken in jails and as non-root. 🤯

The patch above fixes this.

zirias,

Minor news from my #FreeBSD #Linuxulator userland project: I now succeeded to build a first "dependency monster" (in order to have all features consumers might expect): #cairo. Among other things, required porting all the #Xorg libs first 😉

zirias,

And now, the real dependency monster in my #FreeBSD #Linuxulator userland: #ffmpeg 🙈

That's #Linux port #151 I added, it has almost everything enabled that's in the default options of the FreeBSD port. I left out a few things that seemed (too) complex like vulkan ... 🙈

I guess now it's time to double-check the branch on other architectures and other FreeBSD versions first. And then, finally, check whether #MakeMKV will work fine with this!

image/png

zirias,

Double-checking still in progress. So far, fixed an issues on 13.2/aarch64, another one on 14-CURRENT/amd64 (yep, didn't upgrade my #FreeBSD test builders to 15-CURRENT yet 🙈) and yet another one on 14-CURRENT/i386.

Now, test builds for 13.2/i386 are running. We will see. Once I'm sure the #Linuxulator version of #ffmpeg builds fine everywhere, I'll finally check #MakeMKV 😎

zirias,

Did all these tests, did some fixes, "#Linuxulator userland from source" branch builds fine on #FreeBSD 14-CURRENT/13.2-RELEASE, aarch64/amd64/i386 🥳

Now doing test builds with 15-CURRENT, which already has a fix for the #Linux #xattr issue. Unfortunately, it's still incomplete. Neverending story 😞

JFTR, not blaming dchagin at all. It seems Linux has some very weird design decisions, and semantics of the xattr syscall return codes -- EPERM is considered fatal by GNU/Linux tools, because Linux returns ENOATTR or ENOTSUP when access to e.g. the system namespace is restricted 🤯

zirias, to linux

Finally, my #Linux-native #GNU toolchain for #FreeBSD's #Linuxulator works for C and C++ on #aarch64, #amd64 and #i386 🥳

I guess that's a good time to actually announce the ongoing project!
https://lists.freebsd.org/archives/freebsd-ports/2023-August/004263.html

  • All
  • Subscribed
  • Moderated
  • Favorites
  • anitta
  • InstantRegret
  • mdbf
  • ngwrru68w68
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • osvaldo12
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • JUstTest
  • tacticalgear
  • ethstaker
  • provamag3
  • cisconetworking
  • tester
  • GTA5RPClips
  • cubers
  • everett
  • modclub
  • megavids
  • normalnudes
  • Leos
  • lostlight
  • All magazines