Skip to content

Comments

treewide: freebsd13 -> freebsd#308032

Merged
Ericson2314 merged 1 commit intoNixOS:masterfrom
obsidiansystems:freebsd-no-suffix-version
May 1, 2024
Merged

treewide: freebsd13 -> freebsd#308032
Ericson2314 merged 1 commit intoNixOS:masterfrom
obsidiansystems:freebsd-no-suffix-version

Conversation

@Ericson2314
Copy link
Member

Description of changes

@rhelmot and @artemist think this is correct. @alyssais was once quite convinced it was not correct. I have no idea, but we should decide soon so we can all be happy for 24.05.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@Ericson2314 Ericson2314 requested a review from alyssais April 30, 2024 15:47
@github-actions github-actions bot added 6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. 6.topic: lib The Nixpkgs function library labels Apr 30, 2024
@rhelmot
Copy link
Contributor

rhelmot commented Apr 30, 2024

Some references in favor of dropping the version number

https://wiki.freebsd.org/BinaryCompatibility
https://wiki.freebsd.org/KernelModulePackages (just the first paragraph)
https://wiki.freebsd.org/AddingSyscalls (edited to add this; this actually discusses some limited applications where forward compat is policy)
#254801 (comment)

tl;dr FreeBSD provides syscall abi backwards compatibility. We can convert that to forwards compatibility by running our buildbots on the oldest supported (wrt nixpkgs) version of FreeBSD. This can be further converted to forwards compatibility for everyone once the jail code is merged, nix can simply be configured to build in a jail claiming to be the lowest supported version.

@Aleksanaa
Copy link
Member

tl;dr FreeBSD provides syscall abi backwards compatibility. We can convert that to forwards compatibility by running our buildbots on the oldest supported (wrt nixpkgs) version of FreeBSD. This can be further converted to forwards compatibility for everyone once the NixOS/nix#9968 is merged, nix can simply be configured to build in a jail claiming to be the lowest supported version.

Thanks for pointing it out! When NixBSD chose to use freebsd (instead of netbsd), and removed the version number from the code (similar to this PR), I once doubted the correctness of what they did.

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Apr 30, 2024
@artemist
Copy link
Member

The decision to use FreeBSD and to remove the version number were very practical.

Removing the version number removes a lot of manual work adding new platforms, and it's not even that useful: if you're worried about forward compatibility than a binary built for 13.2-RELEASE isn't guaranteed to run on 13.0-RELEASE.

NetBSD can't easily support sandboxed builders, so if we wanted pure native builds we'd have to figure out how to do something weird (maybe boot a vm for each derivation off virtio-9p of that's possible?). FreeBSD makes this relatively easy with jails.

@Ericson2314
Copy link
Member Author

So the ABI can grow but not changing in a breaking away from 13.0 -> 13.2 and also from 13.03 -> 14? Are the ABI guarantees more or less the same regardless of whether it a difference in the major or minor number?

Copy link
Member

@alyssais alyssais left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me.

Co-authored-by: Alyssa Ross <hi@alyssa.is>
@Ericson2314 Ericson2314 force-pushed the freebsd-no-suffix-version branch from 036270d to 266cdd7 Compare April 30, 2024 22:20
@Ericson2314
Copy link
Member Author

@alyssais that's an approval, with the indentation fixed?

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one person. label May 1, 2024
@Ericson2314 Ericson2314 merged commit c38dd73 into NixOS:master May 1, 2024
@Ericson2314 Ericson2314 deleted the freebsd-no-suffix-version branch May 1, 2024 14:03
sternenseemann added a commit to NixOS/cabal2nix that referenced this pull request May 7, 2024
- Nixpkgs stopped using versioned FreeBSD OS parts:
  NixOS/nixpkgs@266cdd7d3795263
  NixOS/nixpkgs#308032
- mipsi*r* tuples were removed:
  NixOS/nixpkgs@94d9a6ce177b3a6
- mips-none and mips64-none were added.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: lib The Nixpkgs function library 6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants