Skip to content

xen: code quality updates and generic patch deduplication#333948

Merged
emilazy merged 15 commits into
NixOS:masterfrom
SigmaSquadron:xen-drop-figs
Aug 21, 2024
Merged

xen: code quality updates and generic patch deduplication#333948
emilazy merged 15 commits into
NixOS:masterfrom
SigmaSquadron:xen-drop-figs

Conversation

@SigmaSquadron

@SigmaSquadron SigmaSquadron commented Aug 11, 2024

Copy link
Copy Markdown
Contributor

Description of changes

  • Hopefully increases code quality for pkgs.xen.
  • Deduplicates identical patches.
  • Moves generic.nix and other generic files and patches to their own directory, to not clutter the root directory.

See individual commits for a more detailed changelog.

There are many commits in this PR, and they were separated so they could be reviewed more easily. Let me know which ones should be squashed.

Things done

  • Built on platform(s)
    • x86_64-linux
  • Tested, as applicable:
    • pkg-config test passes.
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review pr 333948". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Effectively reverts #333764 and partially reverts #331867.

Add a 👍 reaction to pull requests you find important.

@SigmaSquadron SigmaSquadron force-pushed the xen-drop-figs branch 3 times, most recently from 079c890 to 0d0cf4d Compare August 11, 2024 17:36
@SigmaSquadron SigmaSquadron added 2.status: work-in-progress 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. and removed 2.status: work-in-progress labels Aug 11, 2024
@SigmaSquadron SigmaSquadron marked this pull request as ready for review August 11, 2024 18:02
@SigmaSquadron

This comment was marked as outdated.

@ofborg ofborg Bot added 8.has: clean-up This PR removes packages or removes other cruft 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Aug 11, 2024

@emilazy emilazy 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.

Haven’t done a proper review yet, just a drive‐by suggestion.

Comment thread pkgs/applications/virtualization/xen/4.18/0000-xen-remove-figs-4.18.patch Outdated
@SigmaSquadron SigmaSquadron requested a review from emilazy August 16, 2024 03:29
@SigmaSquadron SigmaSquadron force-pushed the xen-drop-figs branch 2 times, most recently from a8facbd to 05f5708 Compare August 16, 2024 04:56
@SigmaSquadron

Copy link
Copy Markdown
Contributor Author

Once more, do let me know which commits should be squashed.

@SigmaSquadron SigmaSquadron force-pushed the xen-drop-figs branch 3 times, most recently from 35e10e5 to 93c8587 Compare August 16, 2024 07:25

@emilazy emilazy 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.

Great stuff as always! As ever, I don’t have the means to test this myself, but have read over the commits and checked the build. I have left some comments, but most are merely informative and none are at all blocking, so please do ping me in a day or so if I haven’t merged this regardless of any action on or response to them.

I don’t really feel any of these commits would be better squashed. Thank you for making well‐factored PRs that are easy to review commit‐by‐commit.

Result of nixpkgs-review pr 333948 run on x86_64-linux 1

2 packages marked as broken and skipped:
  • libvmi
  • qubes-core-vchan-xen
53 packages built:
  • qemu_xen (qemu_xen_4_19)
  • qemu_xen.debug (qemu_xen_4_19.debug)
  • qemu_xen.ga (qemu_xen_4_19.ga)
  • qemu_xen_4_16
  • qemu_xen_4_16.debug
  • qemu_xen_4_16.ga
  • qemu_xen_4_17
  • qemu_xen_4_17.debug
  • qemu_xen_4_17.ga
  • qemu_xen_4_18
  • qemu_xen_4_18.debug
  • qemu_xen_4_18.ga
  • xen (xenPackages.xen_4_19)
  • xen-guest-agent
  • xen-slim (xenPackages.xen_4_19-slim)
  • xen-slim.boot (xenPackages.xen_4_19-slim.boot)
  • xen-slim.dev (xenPackages.xen_4_19-slim.dev)
  • xen-slim.doc (xenPackages.xen_4_19-slim.doc)
  • xen-slim.man (xenPackages.xen_4_19-slim.man)
  • xen.boot (xenPackages.xen_4_19.boot)
  • xen.dev (xenPackages.xen_4_19.dev)
  • xen.doc (xenPackages.xen_4_19.doc)
  • xen.man (xenPackages.xen_4_19.man)
  • xenPackages.xen_4_16
  • xenPackages.xen_4_16-slim
  • xenPackages.xen_4_16-slim.boot
  • xenPackages.xen_4_16-slim.dev
  • xenPackages.xen_4_16-slim.doc
  • xenPackages.xen_4_16-slim.man
  • xenPackages.xen_4_16.boot
  • xenPackages.xen_4_16.dev
  • xenPackages.xen_4_16.doc
  • xenPackages.xen_4_16.man
  • xenPackages.xen_4_17
  • xenPackages.xen_4_17-slim
  • xenPackages.xen_4_17-slim.boot
  • xenPackages.xen_4_17-slim.dev
  • xenPackages.xen_4_17-slim.doc
  • xenPackages.xen_4_17-slim.man
  • xenPackages.xen_4_17.boot
  • xenPackages.xen_4_17.dev
  • xenPackages.xen_4_17.doc
  • xenPackages.xen_4_17.man
  • xenPackages.xen_4_18
  • xenPackages.xen_4_18-slim
  • xenPackages.xen_4_18-slim.boot
  • xenPackages.xen_4_18-slim.dev
  • xenPackages.xen_4_18-slim.doc
  • xenPackages.xen_4_18-slim.man
  • xenPackages.xen_4_18.boot
  • xenPackages.xen_4_18.dev
  • xenPackages.xen_4_18.doc
  • xenPackages.xen_4_18.man

Comment thread pkgs/applications/virtualization/xen/generic/default.nix Outdated
Comment thread pkgs/applications/virtualization/xen/generic/default.nix Outdated
Comment thread pkgs/applications/virtualization/xen/update.sh Outdated
Comment thread pkgs/applications/virtualization/xen/generic/default.nix Outdated
Comment thread pkgs/applications/virtualization/xen/generic/default.nix Outdated
@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one person. label Aug 21, 2024
Most patches used in the Xen build are generic, so let's keep everything
that applies to all versions in one folder.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
There is no point in having both. The top-level package now points
directly to the latest version.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
This is useful for the future when we begin building custom versions of
Xen, such as `qubes-vmm-xen`.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
…of going through withTools

withTools and withPrefetchedSources are pretty complicated functions
meant to generalise per-version calls to build phases by each
pre-fetched source. This is step 1 in deprecating them.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
From the 4.19 release notes:

When building with Systemd support (./configure --enable-systemd),
remove libsystemd as a build dependency. Systemd Notify support is
retained, now using a standalone library implementation.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
We were still building some minor parts of qemu-traditional by not
disabling it explicitly.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
Flask is disabled by default, but this will save someone an
overrideAttrs overlay if they're using FLASK.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
From Peder Sundt:
> I read maintainers = with lib.maintainers; [ ]; as a friendly open
> invitation, while maintainers = [ ]; as a sad state of reality.
> I want people to join the project hence I very much prefer the former.

I don't plan on leaving anytime soon, but let's not make it
more difficult for new maintainers to step up.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
We now use easier to understand functions that are properly documented
and aren't as generic.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
XEN_EXTFILES_URL wasn't working back when this override did anything,
and now we bypass it entirely. The LD variable was rewritten to use
lib.meta.getExe.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
The IPXE patch is the same across all versions.
Let us put generic patches in the new generic/ directory.

We also disable figs, as they were broken.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
For the update script and the one-liner in the README, use flags that do
what we want to do instead of piping the output to different commands or
using environment variables.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
We use a lot of pipes, so it's good to exit if any of the dependent
commands fail.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
Use `with upstreamPatches;` instead.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
This prevents users browsing the package in search.nixos.org from
messaging maintainers about an EOL Xen.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
@SigmaSquadron

Copy link
Copy Markdown
Contributor Author

Gotta love that git rewrites all commits despite the changes only being on like two of those.

Fixed the wording in some code comments, and added more documentation for those updating the Xen files.

@emilazy

emilazy commented Aug 21, 2024

Copy link
Copy Markdown
Member

LGTM; let’s land this, any further improvements can be separate PRs. Cross your fingers for Hydra managing to build everything this time!

@emilazy emilazy merged commit 42afc9d into NixOS:master Aug 21, 2024
@SigmaSquadron SigmaSquadron deleted the xen-drop-figs branch August 21, 2024 17:37
@SigmaSquadron

Copy link
Copy Markdown
Contributor Author

All builds succeeded! Thank you again for your help, emily.

@emilazy

emilazy commented Aug 21, 2024

Copy link
Copy Markdown
Member

Any time :) Really happy to see the Xen stuff come together, feel free to ping me for reviews at your leisure.

@SigmaSquadron SigmaSquadron added the 6.topic: xen-project Issues and PRs related to the Xen Project Hypervisor. label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: xen-project Issues and PRs related to the Xen Project Hypervisor. 8.has: clean-up This PR removes packages or removes other cruft 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 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.

3 participants