Jump to content

As a Mac OS user I like Zsh (Mac terminal shell) and tinkering around on FreeBSD makes pkg my favorite package manager. Personally I've been interested in combining the best things about FreeBSD and Linux (non-GNU distro)

 

Been coming up with an idea to create a complete Unix-Like OS from scratch in C where the only things taken are Zsh and pkg to have a very unified experience. And the Linux kernel just slots in place where everything else is one singular unified thing. My goal by tinkering around on LFS is working on a build that doesn't feel like a bunch of stuff glued together.

Link to comment
https://linustechtips.com/topic/1616415-custom-linux-setup-lfs-for-dummies/
Share on other sites

Link to post
Share on other sites

So you want to write an entire monolithic userland from scratch?

 

Good luck with that.

 

1 hour ago, MC.Morrado said:

My goal by tinkering around on LFS is working on a build that doesn't feel like a bunch of stuff glued together.

But that's what UNIX-like OSes are: a bunch of stuff glued together. The UNIX philosophy is that it's better to have a billion tiny applications that each do one thing, than it is to have one huge application that does a billion things.

 

Everything UNIX-derived (Mac OS, Darwin, *BSD) and pretend UNIX (Linux, GNU HURD) does it this way.

I sold my soul for ProSupport.

Link to post
Share on other sites

1 hour ago, Needfuldoer said:

bunch of stuff glued together

This is exactly what all Unices essentially are, including the BSDs. I will second the reply above.

 

LFS is rather pointless outside of a learning exercise or seriously looking to come up with a new distro with rather unique philosophy. It can be interesting but the novelty wears off rather quickly once you realise most of it is reinventing the wheel. But this shouldn't stop you if you're wanting to scratch an itch, of course.


If you're looking for a distro that is heavily inspired by BSD, including the notion of "ports" for packages, and you're the tinkering type then Gentoo is for you. It's as close as you can get to customisation while without going LFS. It even has a Gentoo/FreeBSD port that uses a BSD kernel but development of it appears to be slow, so I don't have high expectations of it.

Linux makes life better, breathes fresh life into older hardware and reduces e-waste. Adopt a penguin today! 🐧

OS of choice: Debian (server) | Gentoo (desktop/laptop) | Fedora (laptop)

Link to post
Share on other sites

3 hours ago, NoLeafClover said:

This is exactly what all Unices essentially are, including the BSDs. I will second the reply above.

 

LFS is rather pointless outside of a learning exercise or seriously looking to come up with a new distro with rather unique philosophy. It can be interesting but the novelty wears off rather quickly once you realise most of it is reinventing the wheel. But this shouldn't stop you if you're wanting to scratch an itch, of course.


If you're looking for a distro that is heavily inspired by BSD, including the notion of "ports" for packages, and you're the tinkering type then Gentoo is for you. It's as close as you can get to customisation while without going LFS. It even has a Gentoo/FreeBSD port that uses a BSD kernel but development of it appears to be slow, so I don't have high expectations of it.

I know. The whole of point of me wanting to use Linux From Scratch is to learn programming and understand Unix-like systems on a deeper level. Daily driving an educational tool would be pure insanity.

 

By unified I mean a ton of stuff being developed as one singular entity. My favorite part about FreeBSD is the package manager and simplicity compared to Linux. I just want to build something that I want as a bizarre personal project. I just need someone to port FreeBSD's package manager to Linux.

Link to post
Share on other sites

3 hours ago, MC.Morrado said:

The whole of point of me wanting to use Linux From Scratch is to learn programming and understand Unix-like systems on a deeper level.

Then by all means go for it, it can be an exciting journey!

 

3 hours ago, MC.Morrado said:

I just need someone to port FreeBSD's package manager to Linux.

Well... it's not a "port" of FreeBSD's pkg, but Gentoo's Portage is as close as it gets. It can work with source packages (default), binary packages, third-party overlays, you can customise global and per-package build flags, it can cross-compile packages for a different architecture, etc. etc., all [mostly] automated, to the extent possible. Packages are described as "ebuilds" which is essentially a simple and readable recipe for how the package is to be built. When a package is built by portage it can be shared as a binary "tarball", aka binpkg, and reused on another compatible system.  It's the most powerful package management tool as far as Linux goes, in part because it was modelled after the FreeBSD one. It doesn't have the exact same CLI, but the idea behind it is the same. It's awesome.

Linux makes life better, breathes fresh life into older hardware and reduces e-waste. Adopt a penguin today! 🐧

OS of choice: Debian (server) | Gentoo (desktop/laptop) | Fedora (laptop)

Link to post
Share on other sites

You honestly wont learn much more from LFS than you would from something like Arch or Gentoo, the only additional thing you would possibly learn is how to cross-compile. Working with PKGBUILD's is simple and I am sure Gentoo is simple to work with being source based.

 

Also before re-inventing the wheel maybe checkout something like Chimera, it's a non-GNU Linux Distro with a BSD userland.
Just be aware most proprietary applications and drivers wont work here, such as NVIDIA, this is true for any distro that doesn't use glibc which is GNU.
compat problems probably wont end here on your journey either, software has certain requirements and expectations usually based around whatever RedHat, Canonical, GNOME (GTK), and KDE (QT) do. The more you go against it the more work you have in the short and long term. Some things don't work without bash being at least installed on the system and GNOME is about to become more dependent on systemd and break compatibility for other init systems for two examples.

 

And even BSD is just a bunch of stuff glued together once you leave a base shell, it's more similar to a busybox setup like Alpine where everything installed on top is about the equivalent of ports. If you are unaware you can take the kernel, busybox, and a bootloader and have a bootable working system.
Not that a core linux system is that many pieces to begin with, A minimal Arch base is made up of the following https://gitlab.archlinux.org/archlinux/packaging/packages/base/-/blob/main/PKGBUILD?ref_type=heads#L12

 

15 hours ago, MC.Morrado said:

I just need someone to port FreeBSD's package manager to Linux.

No one needs to port it, you can just build it in fact its in the Arch User Repository with no patches. Do be aware that it targets glibc.
Your problem is going to be packaging everything for it.
https://aur.archlinux.org/packages/freebsd-pkg

 

I am by no means saying not to do it, just some considerations before you do.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×