Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

musl: refactor #328327

Closed
wants to merge 5 commits into from
Closed

musl: refactor #328327

wants to merge 5 commits into from

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 the maintainer of the package it changes 10.rebuild-darwin: 1-10 10.rebuild-linux: 101-500 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.

@alyssais alyssais added the 2.status: duplicate This is a duplicate of another issue or PR label Jul 21, 2024
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 AndersonTorres added 2.status: work-in-progress This PR isn't done and removed 2.status: duplicate This is a duplicate of another issue or PR labels Jul 21, 2024
@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
2.status: work-in-progress This PR isn't done 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-linux: 101-500 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants