Skip to content

Comments

tpm2-tss: remove shadow dependency#317786

Merged
vcunat merged 1 commit intoNixOS:stagingfrom
tie:tmp2-tss-fake-shadow
Aug 22, 2024
Merged

tpm2-tss: remove shadow dependency#317786
vcunat merged 1 commit intoNixOS:stagingfrom
tie:tmp2-tss-fake-shadow

Conversation

@tie
Copy link
Member

@tie tie commented Jun 6, 2024

Description of changes

Fixes tpm2-tss (cross-)build on macOS since shadow package is Linux-specific and therefore cannot be used in nativeBuildInputs.

Split from #317651

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin → x86_64-linux
  • 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.

@tie tie requested a review from baloo June 6, 2024 16:36
@tie tie marked this pull request as ready for review June 6, 2024 16:49
@ofborg ofborg bot added 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 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. labels Jun 6, 2024
@tie
Copy link
Member Author

tie commented Jul 1, 2024

@baloo, gentle ping. You’ve approved these changes on the original PR (#317651 (review)), are you still OK with them?

@baloo
Copy link
Member

baloo commented Jul 1, 2024

Ha, I missed that notification sorry. Thanks for the ping.

@baloo
Copy link
Member

baloo commented Jul 1, 2024

Would you mind changing the meta.platforms as well?

@tie
Copy link
Member Author

tie commented Jul 1, 2024

Would you mind changing the meta.platforms as well?

This PR is for building tmp2-tss for Linux on macOS, e.g.

(import <nixpkgs> {
  localSystem = "aarch64-darwin";
  crossSystem = "x86_64-linux";
}).tpm2-tss

I’m not really sure if it builds for macOS as-is after this change, I’ll try building tpm2-tss once my macOS builder finishes building another PR.

@baloo
Copy link
Member

baloo commented Jul 1, 2024

Ha good point. Sorry I got a bit too excited haha.
I had the need to compile tpm2-tss on macos (not to interact with a TPM directly but because it's required for makecredentials) for coworkers to be able to help, but I don't have access to a macos myself.

@tie
Copy link
Member Author

tie commented Jul 1, 2024

Yes, I don’t think tpm2-tss supports macOS. It’s trivial to convince build system to actually build for macOS, but the code uses uchar.h header (that is not available on macOS) in a few places and I gave up at that point.

There seems to be an upstream issue for macOS support, tpm2-software/tpm2-tss#2629

@tie tie added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Jul 1, 2024
@tie tie requested a review from JohnRTitor July 24, 2024 08:13
@tie
Copy link
Member Author

tie commented Jul 24, 2024

@JohnRTitor, hi, can you take a look at this please (and hopefully merge if everything is OK)?

@JohnRTitor
Copy link
Member

Thanks for the review request, however as I am not knowledgeable in this topic, I am not confident that replacing this with a dummy package won't cause any issues.

If in future the package ends up relying more on this dependency, this change would break the package then.

I'll let others handle this.

@JohnRTitor JohnRTitor removed their request for review July 28, 2024 17:23
@tie tie force-pushed the tmp2-tss-fake-shadow branch from da476e0 to 447698e Compare August 2, 2024 14:51
Fixes `tpm2-tss (cross-)build on macOS since shadow package is
Linux-specific and therefore cannot be used in nativeBuildInputs.
@tie tie force-pushed the tmp2-tss-fake-shadow branch from 447698e to 79581b8 Compare August 2, 2024 15:03
@tie tie requested a review from jtojnar August 2, 2024 15:04
@tie
Copy link
Member Author

tie commented Aug 2, 2024

I’ve removed the need for dummy package by converting relevant AC_MSG_ERROR to AC_MSG_WARN in configure.ac (see #317786 (comment)). As pointed out in #317786 (comment), this is already a warning instead of an error at install phase, so it shouldn’t be an error at configure phase.

@ofborg ofborg bot requested a review from baloo August 2, 2024 17:48
@wegank wegank added 12.approvals: 3+ This PR was reviewed and approved by three or more persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Aug 10, 2024
@vcunat vcunat merged commit d8548de into NixOS:staging Aug 22, 2024
@vcunat
Copy link
Member

vcunat commented Aug 22, 2024

At a glance the patch looks like something worth trying to upstream.

@tie tie deleted the tmp2-tss-fake-shadow branch August 22, 2024 09:32
@numinit
Copy link
Contributor

numinit commented Aug 24, 2024

Totally agreed, it somewhat seems like a bug.

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

Labels

10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 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. 12.approvals: 3+ This PR was reviewed and approved by three or more persons. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants