My Alternative Package Tool and Ports System for FreeBSD

I don't see how that general quote affects the fact that you're developing a replacement/alternative for a system component while not being in sync or affiliated with FreeBSD Foundation and not taking into the account the base design of FreeBSD, and the cooperation with the existing ports and packages system. This here :

args = ["--prefix=/usr",

If this results in what I think it does, package installation under /usr, it's a total fkin haram as far as I'm concerned.

As I already wrote I have a positive view of your project but due to what I've practically explained it will never be a prospect for pkg/ports alternative or possible next-gen replacement; pkg is a next gen replacement, I don't see that as set in stone, but your project as you're outlining it, is not it. Witty out of context quotes from some relevant people are not going to change that. Logging off from thread, good luck in your endeavor.
 
I don't see how that general quote affects the fact that you're developing a replacement/alternative for a system component while not being in sync or affiliated with FreeBSD Foundation and not taking into the account the base design of FreeBSD, and the cooperation with the existing ports and packages system. This here :



If this results in what I think it does, package installation under /usr, it's a total fkin haram as far as I'm concerned.

As I already wrote I have a positive view of your project but due to what I've practically explained it will never be a prospect for pkg/ports alternative or possible next-gen replacement; pkg is a next gen replacement, I don't see that as set in stone, but your project as you're outlining it, is not it. Witty out of context quotes from some relevant people are not going to change that. Logging off from thread, good luck in your endeavor.


You’re still arguing from a premise I don’t accept. I am not required to be affiliated with the FreeBSD Foundation, nor to design around the historical constraints of ports/pkg, in order to build an alternative system. That premise alone is false. As for the /usr example: that is a configuration detail, not a design mandate, and it’s already been stated elsewhere that the system can live entirely outside the base system. Treating an illustrative snippet as proof of architectural intent is simply incorrect. More importantly, I am not claiming this is the next-generation replacement for ports/pkg, nor seeking that endorsement that framing is yours, not mine. This is an alternative built around different invariants and tradeoffs. If you’ve already decided that only systems that evolve within the existing ports/pkg model qualify as “legitimate,” then we’re not having a technical disagreement, we’re having a philosophical one and I’m fine leaving it there.
 
The only slightly annoying thing about this type of system is that changing anything even adding a single "." produces a different hash. That’s a good from a security standpoint, but it becomes annoying when you’re creating ports and need to make adjustments just to get something to compile, or when one port requires an option that another doesn’t, so you have to enable it and rebuild.

You end up with several different versions of the same port. It really just comes down to adding a cleanup step to the port manager: keep the version linked in profile/current/ and discard the other duplicates.

I am really interested to see how well this works in reproducing old builds or those grinch ports that break from release to release.

1770774035482.png
 
At this point, the package tool and ports system are working, and I have around 35 functional ports so far, with more in progress.
Before I wipe /usr/local and replace it with a link pointing to /usr/ports/profile/current, I want to make sure I have all the packaging tools I’ll need to continue building additional ports.
The project is nearly ready to be open-sourced and released to the community.

1770774767580.png
 
Here is the new ports.toml spec. Almost everything is optional. And I currently have 104 ports file including Qt5, Qt6, Gtk3, Gtk4, All the supported Build Sytems(cmake, meson, waf, b2, autotools, ...), Wayland, Mesa, Python and I am working on Go and Rust now.

when you see ..

Code:
script = "files/post-install.sh"
commands = [
  "echo post-install commands run here",
]

You can use one or the other, both or none, they are ran in order so you can swap the order.

Code:
name = "template"
version = "0"
summary = "Template port with all available fields"
description = "Demonstrates every supported port metadata and hook section."
home = "https://example.com/template"
maintainer = "ports@example.com"
catagory = "misc"
tags = ["template", "example"]
license = ["UNLICENSED"]

deps = []
runtime_deps = []

[src]
type = "url"
url = "https://example.com/template-0.tar.gz"
sha256 = ""

patches = ["fix.patch"]

[patch]
commands = [
  "echo patch commands run here",
]

[configure]
commands = [
  "echo configure commands run here",
]
script = "files/configure.sh"

[build]
commands = [
  "echo build commands run here",
]
system = "custom"
make = "gmake"
env = ["EXAMPLE=1"]
args = ["EXAMPLE_ARG=1"]
script = "files/build.sh"

[pre-build]
script = "files/pre-build.sh"
commands = [
  "echo pre-build commands run here",
]

[post-build]
script = "files/post-build.sh"
commands = [
  "echo post-build commands run here",
]

[install]
args = ["DESTDIR=$out", "install"]
script = "files/install.sh"
commands = [
  "echo install commands run here",
]

[pre-install]
script = "files/pre-install.sh"
commands = [
  "echo pre-install commands run here",
]

[post-install]
script = "files/post-install.sh"
commands = [
  "echo post-install commands run here",
]
 
The pkg tool and ports system are now fully functional, its just a matter of adding more ports, and fixing any edge cases or bugs that show up. FreeBSD can now become a fully immutable
operating system if someone wanted that option. I have some cleaning up to do on the src code and do some more testing and will release this to the public soon.

In this image you see our ports system now lives in /usr/ports and that /usr/local is a link to /usr/ports/profile/current
and you are also seeing that python3 a installed port is working.
1770844647804.png


Here pkg tool is showing its command line options, we have it named to npkg for now case we need pkg for something.
1770844705226.png


1770844806623.png
 
Back
Top