Skip to content

git: reorder and tidy build process - #370888

Merged
philiptaron merged 3 commits into
NixOS:stagingfrom
me-and:git-rc
Jun 19, 2025
Merged

philiptaron merged 3 commits into
NixOS:stagingfrom
me-and:git-rc

Conversation

@me-and

@me-and me-and commented Jan 4, 2025 •

Copy link
Copy Markdown
Member

I've been testing Git builds against the v2.48.0 release candidates, hit some problems, and made some fixes.

The key fix is to build the Documentation directory before building documentation for contrib/subtree. This is partly just good practice -- without this fix, the documentation doesn't get built until the install stage -- but it's also necessary as of v2.48.0, when Documentation/asciidoc.conf is required for the contrib/subtree documentation to build successfully, and that file is only built in the main documentation build stage.

Edit: The part of this PR that was critical to Git building from v2.48.0 onwards was merged as part of #372784, but the rest of the tidying is – I think – still useful. I've also now added myself as a package maintainer.

This is a big collection of small enhancements and maintainability fixes to the Git packaging code; I've lumped several commits into a single PR for ease of reviewing and merging, but I'm happy to split it into multiple PRs if that's preferable.

Things done

  • Built at commit 0d8d106434a35ed03198428f107a0819f2a146bc:
    • x86_64-linux
      • git
      • git.passthru.tests.withInstallCheck
      • gitMinimal
      • gitMinimal.passthru.tests.withInstallCheck
      • gitFull
      • gitFull.passthru.tests.withInstallCheck
      • gitSVN
      • gitSVN.passthru.tests.withInstallCheck
      • git-doc
      • nixosTests.gitdaemon
      • nixosTests.buildbot
      • tests.fetchgit
    • aarch64-linux
      • git
      • git.passthru.tests.withInstallCheck
      • gitMinimal
      • gitMinimal.passthru.tests.withInstallCheck
      • gitFull
      • gitFull.passthru.tests.withInstallCheck
      • gitSVN
      • gitSVN.passthru.tests.withInstallCheck
      • git-doc
      • nixosTests.gitdaemon
      • nixosTests.buildbot (appears to be broken prior to my fix)
      • tests.fetchgit
    • x86_64-darwin
    • aarch64-darwin
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions Bot added 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Jan 4, 2025
This was referenced Jan 10, 2025
@me-and me-and changed the title Git: reorder build stages in preparation for v2.48.0 Git: reorder and tidy build process Feb 13, 2025
@github-actions github-actions Bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. labels Feb 13, 2025
@me-and me-and added 6.topic: best practices Documentation and discussion around best practices for Nixpkgs development and removed 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. labels Feb 13, 2025
@github-actions github-actions Bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. labels Feb 13, 2025
@me-and

me-and commented Feb 14, 2025

Copy link
Copy Markdown
Member Author

I'm just watching a build now, and at least for gitSVN it seems some of the documentation is still being built during the build phase, which implies something isn't working as expected for this fix just yet.

@me-and
me-and marked this pull request as draft February 14, 2025 16:59
@me-and
me-and marked this pull request as ready for review February 14, 2025 18:57
@me-and

me-and commented Feb 14, 2025

Copy link
Copy Markdown
Member Author

Fixed that. Turns out my previous fix in 2b58993 / #372784 was enough to get Git to build, but didn't actually fix the thing I thought it fixed.

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Apr 2, 2025
@me-and me-and removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Jun 18, 2025

@SuperSandro2000 SuperSandro2000 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Lgtm

@github-actions github-actions Bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jun 18, 2025
me-and added 3 commits June 18, 2025 17:06
This doesn't seem to make any difference to the build results, so
specifying it explicitly is unnecessary and confusing.
Remove comments about notification scripts, as these were removed in
a68c12d (git: Remove phony not-supported wrappers., 2014-04-05), as
well as the `notSupported` function which is now a pointless wrapper for
deleting a file.

Also changes the deletion behaviour such that, if the file being deleted
doesn't exist, the build will fail to highlight this unexpected event,
rather than silently carrying on with the build process.
To save a small amount of time during builds, don't patch shebangs in
test scripts when the test scripts won't be used.
@me-and me-and added the 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. label Jun 18, 2025
@nix-owners
nix-owners Bot requested a review from philiptaron June 18, 2025 16:15
@philiptaron philiptaron changed the title Git: reorder and tidy build process git: reorder and tidy build process Jun 18, 2025
@philiptaron

Copy link
Copy Markdown
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 370888 --package gitSVN --package nixosTests.gitdaemon --package git.passthru.tests.withInstallCheck --package git --package gitFull --package gitMinimal.passthru.tests.withInstallCheck --package gitSVN.passthru.tests.withInstallCheck --package tests.fetchgit --package git-doc --package gitMinimal --package gitFull.passthru.tests.withInstallCheck --package nixosTests.buildbot
Commit: ec85d0a7c9522a4627b327706788660445521875


x86_64-linux

✅ 2 tests built:
  • nixosTests.buildbot
  • nixosTests.gitdaemon
✅ 21 packages built:
  • git
  • git-doc (git-doc.debug, git-doc.doc, gitFull.doc)
  • git.debug (git.debug.debug, git.debug.doc)
  • git.doc (git.doc.debug, git.doc.doc)
  • gitFull
  • gitFull.debug (gitFull.debug.debug, gitFull.debug.doc)
  • gitMinimal
  • gitMinimal.debug (gitMinimal.debug.debug)
  • gitSVN
  • gitSVN.debug (gitSVN.debug.debug, gitSVN.debug.doc)
  • gitSVN.doc (gitSVN.doc.debug, gitSVN.doc.doc)
  • tests.fetchgit.dumb-http-signed-tag
  • tests.fetchgit.fetchTags
  • tests.fetchgit.leave-git
  • tests.fetchgit.simple
  • tests.fetchgit.sparseCheckout
  • tests.fetchgit.sparseCheckoutNonConeMode
  • tests.fetchgit.submodule-deep
  • tests.fetchgit.submodule-leave-git
  • tests.fetchgit.submodule-leave-git-deep
  • tests.fetchgit.submodule-simple

@philiptaron
philiptaron merged commit 82417e4 into NixOS:staging Jun 19, 2025
@me-and
me-and deleted the git-rc branch January 27, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: best practices Documentation and discussion around best practices for Nixpkgs development 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 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.

4 participants