freebsd: various improvements and new packages#315176
freebsd: various improvements and new packages#315176Ericson2314 merged 21 commits intoNixOS:masterfrom
Conversation
|
Oh lol, I was just making this too. LGTM! Since this is isn't touching non-FreeBSD packages / existing things outside FreeBSD land so much, I don't care so much that it's big. |
7c0a0d3 to
d16dbe9
Compare
2766f34 to
ca62531
Compare
|
The eval failure looks legit |
There was a problem hiding this comment.
Complicates things in what way?
There was a problem hiding this comment.
Looks like I misremembered where this patch came from. This patch actually dates back to 0afe9d1, and is just being added back now after an accidental deletion. I'll update the commit message.
There was a problem hiding this comment.
/nix/store/wf6yhi6c33dv5n18vj68pj8cim7k4bqa-binutils/bin/ld: cannot find -ltermcapw: No such file or directory
freebsd's ncurses provides different libraries from normal ncurses.
There was a problem hiding this comment.
I am fine dealing with this later, but I think termcapw is a wide char thing that is in fact buildable from upstream? I recall seeing such things when updating the pkg config metadata for that package.
There was a problem hiding this comment.
Is this different from all the libedit variants we have packaged at the top level?
There was a problem hiding this comment.
Yes. Various packages depend on filecomplete.h, which is not provided by the standard libedit. It is provided by netbsd.libedit, but I would rather not mix freebsd and netbsd libs.
There was a problem hiding this comment.
We removed libcasper before, and now we're adding it back?
There was a problem hiding this comment.
You're referring to the earlier diff in this PR? that's for the compat generation, which is separate from the actual package (this) which is a dependency of various things. Compat is just for building packages for the build machine.
There was a problem hiding this comment.
I updated the commit message for the compat patch indicating this.
There was a problem hiding this comment.
What's going on with all these additions?
There was a problem hiding this comment.
Based on my investigation, this doesn't actually impact the building of locales as we currently have it configured, and only adjusts the default charmap, which is used if you don't specify any charmap file at generation time. Diff indicates that there's no actual difference between the locales derivation with or without this patch, so I'm removing it.
There was a problem hiding this comment.
Do we really need to use 11 derivations for this, rather than 1?
There was a problem hiding this comment.
I like more derivations! :)
I want people to write fine-grained things, so we fix the overhead per derivation, so this is good to me :).
There was a problem hiding this comment.
This is without a doubt the most elegant way to tackle this build using the infrastructure we have set up for building packages out of the FreeBSD source tree. Each derivation is invoking a separate makefile in a separate directory and has a separate set of build inputs to ensure no cross-contamination.
The alternative would be basically overriding buildPhase and installPhase to build and install with several makefiles.
What is the downside of many small derivations, even if they're not user-facing?
There was a problem hiding this comment.
I indeed want to have a libc0 so we can stop doing all the extra libs in postInstall for that too (future work I am planning on).
There was a problem hiding this comment.
Why are other utilities independently packaged but these are not?
There was a problem hiding this comment.
build fails unless these cflags are supplied, but only for these utilities. They end up being packaged together, they just can't be built with the same code.
There was a problem hiding this comment.
Why do we need a single derivation with every binary that FreeBSD has? It seems weird that we need both sh and csh, for example, when every build environment will already have bash. Also that groff and mandoc are included, when anywhere else they'd be separately specified inputs.
There was a problem hiding this comment.
This is not every binary that FreeBSD has - this is just /bin, distinct from /usr/bin, /sbin, and /usr/sbin. This set is fairly small and is useful to bundle together a lot of fairly critical stuff. It's approximately equivalent in size and utility to coreutils or util-linux.
There was a problem hiding this comment.
libiconv in all-packages.nix should be updated to use this. Is that coming later?
There was a problem hiding this comment.
a10ab37 to
36d15ad
Compare
a858a76 to
938a192
Compare
This patch was applied to 14.0 but not 13.1. It is necessary for 13.1 as well.
netbsd can no longer compile under FreeBSD native early bootstrap stdenv, so switch to coreutils. This only involves discarding the -l flag. The -l flag causes a symlink instead of a copy to be installed, so it is safe to discard during bootstrap.
By adding fewer dependencies, the FreeBSD native bootstrap tarball becomes lighter.
The diff parsing was pretty hardcoded for diff -u. Now it should handle git diff/show as well.
Previously, an attribute named isStatic did this, but this was lost in a refactor. Revive it and rename it to noLibc to be more clear about its intended use.
These packages are preferred over libncurses proper for some in-tree FreeBSD packages.
938a192 to
41c2bba
Compare
The parameters to control which locales are built are placeholders.
This is a single derivation containing everything in /bin on a normal FreeBSD machine, which is an incredibly compact set of core utilities.
While cp is part of freebsd.bin, this particular package is critical for early stdenv boot and has its own derivation to require fewer dependencies
|
the nix-store --query --tree $(nix-build -A pkgsCross.x86_64-freebsd.freebsd.libcxxrt) |
|
Looks like this problem traces to the debug symbols. This seems moderately intentional, so I'm not sure what to do about this besides patching, but this seems like it might affect other derivations as well. |
|
separateDebugInfo? |
it is already separate. i just added |
|
I hope we can get this merged soon, any final review thoughts @alyssais? |
78e6764 to
5109a31
Compare
- add option to build without libcxx - don't build with libcxx - distribute headers
5109a31 to
ae7c4ca
Compare
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release-24.05
git worktree add -d .worktree/backport-315176-to-release-24.05 origin/release-24.05
cd .worktree/backport-315176-to-release-24.05
git switch --create backport-315176-to-release-24.05
git cherry-pick -x bcaca23529cd7d51dc432ca661076a54036e1143 295c645d807e4754b7d1f89ffdb65263cae9f042 2785d4f4aea77ac220eb329bc7c028f9819e9bff ba5f1b4400d3180563fc0822bb529eaf3239875c 61202561d92cf1cd74532fcbd8b9d6662c5bc57b d78f853f7e3bf84924d54c0280f4bca2e0665d57 95fa436fbe232a7da493775eeef9a794d249de15 d792ea2d412b9229bbb265d08e3b07a669d696d2 98587064a0d688f9fbfc4437571734b77dde6601 a753d385dad0a3603ac9ddb378da1727bad9ebe3 ae993bd1e345cf4bb822bda3fce12f688cd523c4 78536028670181b6e1c78b6bbbb50724dcd7cd02 892f600edd9608ee277cf8c5cb4bf31f1a677a3e ce0a5ce3400e952c9e400a5785dd9539dba1c2d2 2c41534d75174f30e770ac58363242cce9cfaeef fe0a405397cf84861b4b866f40142f3a2c362b54 2bf350788ce698b1f9bd8c73bb74a53bfbce65b9 1bc374d91d74d0f0a4736196998ed2f280c3457b 8d5db1db1619a5b0963a3abb49600ff71ee96405 41c2bba81ec7c3c03b5841ad8c981b6f98a261be ae7c4ca17ff8afe9a8bc771cb68d78e6186295a5 |
Description of changes
part of #296581
This is a big one, but all its individual pieces would be too small on their own for my taste; if you like I can break it up further. There are a lot of commits, but each one has a detailed message and usually only touches one file. I would recommend reviewing by opening all commits in new tabs and then going one at a time.
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.