Skip to content

musl: refactor#328327

Closed
AndersonTorres wants to merge 5 commits intoNixOS:masterfrom
atorres1985-contrib:musl-master
Closed

musl: refactor#328327
AndersonTorres wants to merge 5 commits intoNixOS:masterfrom
atorres1985-contrib:musl-master

Conversation

@AndersonTorres
Copy link
Member

Description of changes

Picking from #328072, since it does not mass-rebuild.

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.11 Release Notes (or backporting 23.11 and 24.05 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.

@AndersonTorres AndersonTorres marked this pull request as ready for review July 19, 2024 02:41
@AndersonTorres AndersonTorres marked this pull request as draft July 19, 2024 11:46
@AndersonTorres
Copy link
Member Author

AndersonTorres commented Jul 19, 2024

  1. Why is this failing on Master?
  2. Why doesn't it can be built by using fetchFromGitHub?

@ofborg ofborg bot requested a review from thoughtpolice July 19, 2024 17:11
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. labels Jul 19, 2024
@AndersonTorres AndersonTorres marked this pull request as ready for review July 19, 2024 20:09
@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Jul 19, 2024
@AndersonTorres
Copy link
Member Author

Result of nixpkgs-review run on x86_64-linux 1

2 packages marked as broken and skipped:
  • lixStatic
  • lixStatic.dev
1 package blacklisted:
  • nixos-install-tools
177 packages built:
  • appvm
  • attic-client
  • attic-server
  • bundix
  • busybox-sandbox-shell
  • busybox-sandbox-shell.debug
  • cabal2nix
  • cached-nix-shell
  • cachix (cachix.bin ,cachix.doc)
  • colmena
  • common-updater-scripts
  • crate2nix
  • crystal2nix
  • dep2nix
  • devenv
  • disko
  • dub-to-nix
  • dydisnix
  • fusionInventory
  • getoptions
  • gns3-server
  • gns3-server.dist
  • harmonia
  • hci
  • hercules-ci-agent
  • home-manager
  • hydra_unstable
  • jetbrains.clion
  • jetbrains.idea-ultimate
  • jetbrains.phpstorm
  • jetbrains.pycharm-professional
  • jetbrains.rider
  • jetbrains.ruby-mine
  • jetbrains.webstorm
  • jetbrains.writerside
  • libnixxml
  • lix
  • lix.debug
  • lix.dev
  • lix.doc
  • lix.man
  • lua51Packages.luarocks-nix
  • lua52Packages.luarocks-nix
  • lua53Packages.luarocks-nix
  • lua54Packages.luarocks-nix
  • luajitPackages.luarocks-nix
  • luarocks-packages-updater
  • musl
  • musl.bin
  • musl.debug
  • musl.dev
  • nil
  • nim_lk
  • niv (niv.bin ,niv.data)
  • nix (nixVersions.nix_2_18)
  • nix-binary-cache
  • nix-bundle
  • nix-direnv
  • nix-doc
  • nix-du
  • nix-eval-jobs
  • nix-fast-build
  • nix-fast-build.dist
  • nix-index
  • nix-init
  • nix-inspect
  • nix-pin
  • nix-plugins
  • nix-prefetch
  • nix-prefetch-bzr
  • nix-prefetch-cvs
  • nix-prefetch-docker
  • nix-prefetch-git
  • nix-prefetch-hg
  • nix-prefetch-scripts
  • nix-prefetch-svn
  • nix-required-mounts
  • nix-required-mounts.dist
  • nix-serve
  • nix-serve-ng
  • nix-simple-deploy
  • nix-template
  • nix-unit
  • nix-update
  • nix-update-source
  • nix-update-source.dist
  • nix-update.dist
  • nix-visualize
  • nix-visualize.dist
  • nix-web
  • nix.debug (nixVersions.nix_2_18.debug)
  • nix.dev (nixVersions.nix_2_18.dev)
  • nix.doc (nixVersions.nix_2_18.doc)
  • nix.man (nixVersions.nix_2_18.man)
  • nixStatic
  • nixStatic.dev
  • nixVersions.git
  • nixVersions.git.debug
  • nixVersions.git.dev
  • nixVersions.git.doc
  • nixVersions.git.man
  • nixVersions.latest
  • nixVersions.latest.debug
  • nixVersions.latest.dev
  • nixVersions.latest.doc
  • nixVersions.latest.man
  • nixVersions.minimum
  • nixVersions.minimum.debug
  • nixVersions.minimum.dev
  • nixVersions.minimum.doc
  • nixVersions.minimum.man
  • nixVersions.nix_2_19
  • nixVersions.nix_2_19.debug
  • nixVersions.nix_2_19.dev
  • nixVersions.nix_2_19.doc
  • nixVersions.nix_2_19.man
  • nixVersions.nix_2_20
  • nixVersions.nix_2_20.debug
  • nixVersions.nix_2_20.dev
  • nixVersions.nix_2_20.doc
  • nixVersions.nix_2_20.man
  • nixVersions.nix_2_21
  • nixVersions.nix_2_21.debug
  • nixVersions.nix_2_21.dev
  • nixVersions.nix_2_21.doc
  • nixVersions.nix_2_21.man
  • nixVersions.nix_2_22
  • nixVersions.nix_2_22.debug
  • nixVersions.nix_2_22.dev
  • nixVersions.nix_2_22.doc
  • nixVersions.nix_2_22.man
  • nixd
  • nixos-anywhere
  • nixos-generators
  • nixos-option
  • nixos-rebuild
  • nixos-shell
  • nixpkgs-hammering
  • nixpkgs-review
  • nixpkgs-review.dist
  • nixt
  • nixt.dev
  • nixtract
  • node2nix
  • npins
  • nuget-to-nix
  • nurl
  • nvfetcher
  • outline
  • prefetch-yarn-deps
  • python311Packages.nix-kernel
  • python311Packages.nix-kernel.dist
  • python311Packages.nixpkgs
  • python311Packages.nixpkgs.dist
  • python311Packages.pythonix
  • python312Packages.nix-kernel
  • python312Packages.nix-kernel.dist
  • python312Packages.nixpkgs
  • python312Packages.nixpkgs.dist
  • python312Packages.pythonix
  • sbomnix
  • sbomnix.dist
  • sonarr
  • swiftPackages.swiftpm2nix
  • terranix
  • typescript-language-server
  • update-nix-fetchgit
  • update-python-libraries
  • vimPluginsUpdater
  • vulnix
  • vulnix.dist
  • vulnix.doc
  • vulnix.man
  • wp4nix
  • wrangler
  • yarn2nix
  • zon2nix

@AndersonTorres
Copy link
Member Author

Well, the effort on updating NetBSD's compat files will be done another day.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/4290

Copy link
Contributor

@superherointj superherointj left a comment

Choose a reason for hiding this comment

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

I'm not a big fan of splitting sources. Still, code-wise I don't think this is creating problems.

@AndersonTorres
Copy link
Member Author

I will draft this a little bit because the compat package changed its name in Alpine.

@AndersonTorres AndersonTorres marked this pull request as draft July 21, 2024 03:50
@alyssais
Copy link
Member

This is duplicating effort from the very long running effort in #229439. Please help with broken packages, which is the reason this hasn't been finished yet, and if you want to refactor, please do that in a separate PR to not interfere with the upgrade work.

Since theey is not active in a long span of time.

Also, add AndersonTorres.
@AndersonTorres AndersonTorres changed the title musl: 1.2.3 -> 1.2.5 musl: just refactor Jul 21, 2024
@AndersonTorres AndersonTorres changed the title musl: just refactor musl: refactor Jul 21, 2024
Well, let's go:

- The sources were detached to a separated file, so that we can track them more
  easily.
  - Indeed some files came from Alpine Linux aports repo, however they borrowed
    from NetBSD; ideally we should pick them from their origins.
- The sources are treated as packages, with pname, version and src well-defined.

- The usage of null as default is too error-prone, as demonstrated by an old
  Emacs refactor we did.
  - I have grepped the Nixpkgs and I have not found references that nullified
    linuxHeaders.
- finalAttrs design pattern
- SRI hashes
- Use `output*` variables
- strictDeps
  - set as false so we can track it later when true
- env vars inside env
- Remove comments from Bash code
  - Bash is to assembly as Nix is to Haskell.
    Bash is plumbing, and comments inside it has few to no value; indeed they
    have negative value, given that they are no-ops *and* cause mass rebuilds.
  - A more or less elegant solution employed by our Emacs expression is to
    concatenate strings.
- use pushd/popd instead of subshell
- passthru
- meta:
  - get rid of nested with
  - longDescription

Phew!
@AndersonTorres
Copy link
Member Author

@alyssais that being said, I removed the version upgrade from this PR.

Further, I created an entry for a musl team. What do you think?

@AndersonTorres
Copy link
Member Author

I will reopen this in a new repo later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments