Skip to content

sigtool: 0.1.0 -> 0.1.2#139272

Merged
happysalada merged 1 commit intoNixOS:masterfrom
thefloweringash:sigtool-update
Sep 25, 2021
Merged

sigtool: 0.1.0 -> 0.1.2#139272
happysalada merged 1 commit intoNixOS:masterfrom
thefloweringash:sigtool-update

Conversation

@thefloweringash
Copy link
Member

@thefloweringash thefloweringash commented Sep 24, 2021

Fixes build on x86_64-darwin.

See also alternative fix #139271, and (my) upstream changes.

Motivation for this change

Fix channel blocking build stdenvBootstrapTools.aarch64-darwin.

#138453 (comment)

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes (or backporting 21.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.

@ofborg ofborg bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Sep 24, 2021
@r-burns r-burns mentioned this pull request Sep 24, 2021
12 tasks
Copy link
Contributor

@r-burns r-burns left a comment

Choose a reason for hiding this comment

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

Works for me. Thanks for the quick fix!

@r-burns r-burns added the 1.severity: channel blocker Blocks a channel label Sep 24, 2021
@r-rmcgibbo
Copy link

Result of nixpkgs-review pr 139272 at f341d0b1 run on x86_64-linux 1

2 packages failed to build:
2 packages built successfully:
  • darwin.postLinkSignHook
  • darwin.sigtool

Note that build failures may predate this PR, and could be nondeterministic or hardware dependent.
Please exercise your independent judgement. Does something look off? Please file an issue or reach out on IRC.

@r-burns
Copy link
Contributor

r-burns commented Sep 24, 2021

Hmm, all of the dependencies of stdenvBootstrapTools.aarch64-darwin built, but it fell down at the end:

Adding @executable_path to rpath in /nix/store/hxzxaf5xsx57aypabak1gv985mv8wdxl-stdenv-bootstrap-tools-aarch64-apple-darwin/bin/xz
Adding @executable_path to rpath in /nix/store/hxzxaf5xsx57aypabak1gv985mv8wdxl-stdenv-bootstrap-tools-aarch64-apple-darwin/bin/yes
/nix/store/x6l53zq05jw3na1310h5p2f2j9ghjri3-aarch64-apple-darwin-cctools-binutils-darwin-949.0.1/bin/aarch64-apple-darwin-strip: changes being made to the file will invalidate the code signature in: /nix/store/hxzxaf5xsx57aypabak1gv985mv8wdxl-stdenv-bootstrap-tools-aarch64-apple-darwin/on-server/bzip2
/nix/store/x6l53zq05jw3na1310h5p2f2j9ghjri3-aarch64-apple-darwin-cctools-binutils-darwin-949.0.1/bin/aarch64-apple-darwin-strip: changes being made to the file will invalidate the code signature in: /nix/store/hxzxaf5xsx57aypabak1gv985mv8wdxl-stdenv-bootstrap-tools-aarch64-apple-darwin/on-server/cpio
/nix/store/x6l53zq05jw3na1310h5p2f2j9ghjri3-aarch64-apple-darwin-cctools-binutils-darwin-949.0.1/bin/aarch64-apple-darwin-strip: changes being made to the file will invalidate the code signature in: /nix/store/hxzxaf5xsx57aypabak1gv985mv8wdxl-stdenv-bootstrap-tools-aarch64-apple-darwin/on-server/mkdir
fatal error: codesign_allocate: input file: /private/tmp/nix-build-stdenv-bootstrap-tools-aarch64-apple-darwin.drv-0/tmp.grkHCMmh1B/sh does not contain a matching architecture for specified '-a x86_64 6848' option
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: codesign_failed: 1
/nix/store/9wzxl68k1fh3szrs1v2vflpjibr29aqr-signing-utils: line 11: 31274 Abort trap: 6           CODESIGN_ALLOCATE=/nix/store/6byzjwwmv9mchxbyjdhvwp4hl81rjsdc-aarch64-apple-darwin-cctools-port-949.0.1/bin/aarch64-apple-darwin-codesign_allocate /nix/store/xd4q4045h0q39474mn53ng877bp0fzhk-sigtool-0.1.1/bin/codesign -f -s - "$tmpdir/$(basename "$1")"
builder for '/nix/store/4nwjn9zimjwp72n81kfx67c2mhdwhwx4-stdenv-bootstrap-tools-aarch64-apple-darwin.drv' failed with exit code 134
cannot build derivation '/nix/store/bpp8lnqx783qmakkh9ym88q61bmph7zk-stdenv-bootstrap-tools-aarch64-apple-darwin.drv': 1 dependencies couldn't be built
error: build of '/nix/store/bpp8lnqx783qmakkh9ym88q61bmph7zk-stdenv-bootstrap-tools-aarch64-apple-darwin.drv' failed

Fixes build on x86_64-darwin
@thefloweringash
Copy link
Member Author

thefloweringash commented Sep 24, 2021

This seems to be a combination of two bugs.

The first, is that the bootstrap tools contain x86_64 for sh, which must be coming from from stdenv.shell. Unfortunately this is also part of the current bootstrap tools. Either the aarch64-darwin builders have rosetta installed, or there's an impurity which means this shell isn't used.

❯ curl -sL http://tarballs.nixos.org/stdenv-darwin/aarch64/20acd4c4f14040485f40e55c0a76c186aa8ca4f3/sh | file -
/dev/stdin: Mach-O 64-bit x86_64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|PIE>

The second was a bug in the cpu subtype handling from thefloweringash/sigtool#6. There seems to be some metadata in the top byte that must not be passed to codesign_allocate. Fixed in v0.1.2.

@thefloweringash thefloweringash changed the title sigtool: 0.1.0 -> 0.1.1 sigtool: 0.1.0 -> 0.1.2 Sep 24, 2021
@happysalada
Copy link
Contributor

Just saying I'm now running the nixpkgs-review on x86_64-darwin
The change looks good to me, it fixes one thing that makes another failure apparent.
The review shouldn't take more than an hour.

@r-burns
Copy link
Contributor

r-burns commented Sep 24, 2021

stdenvBootstrapTools.aarch64-darwin builds with 0.1.2. Excellent work!

@happysalada
Copy link
Contributor

happysalada commented Sep 25, 2021

There are a couple of errors on darwin-x86_64 those seem unrelated though

error: builder for '/nix/store/c5ha99chbxbz23r52kxy01bpz091vxcp-ocaml4.10.2-cairo2-0.6.2.drv' failed with
exit code 1;
       last 10 log lines:
       > ld: warning: building for macOS, but linking in object file (/nix/store/wxic85l63rrwrmsm7j4mdn21p
wviyqg4-ocaml-4.10.2/lib/ocaml/str.a(str.o)) built for free standing
       > ld: warning: building for macOS, but linking in object file (/nix/store/wxic85l63rrwrmsm7j4mdn21p
wviyqg4-ocaml-4.10.2/lib/ocaml/unix.a(unixLabels.o)) built for free standing
       > ld: warning: building for macOS, but linking in object file (/nix/store/wxic85l63rrwrmsm7j4mdn21p
wviyqg4-ocaml-4.10.2/lib/ocaml/unix.a(unix.o)) built for free standing
       >        clang src/cairo_stubs.o
       > clang-7: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-li
ne-argument]
       >   ocamlmklib src/dllcairo_stubs.so,src/libcairo_stubs.a (exit 2)
       > (cd _build/default && /nix/store/wxic85l63rrwrmsm7j4mdn21pwviyqg4-ocaml-4.10.2/bin/ocamlmklib.opt
 -g -o src/cairo_stubs src/cairo_stubs.o -L/nix/store/87zdmq8zzfa5ziwk3rpd3zcfvnvkkhc2-freetype-2.11.0/lib
 -lfreetype -L/nix/store/4xm5n60w0pjkmyfq0xgx529i8vmss1p4-fontconfig-2.13.94-lib/lib -L/nix/store/87zdmq8z
zfa5ziwk3rpd3zcfvnvkkhc2-freetype-2.11.0/lib -lfontconfig -lfreetype -L/nix/store/bk0gd6aqcdv69zj31j2z4a80
wing4z72-cairo-1.16.0/lib -lcairo)
       > ld: file not found: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Applicati
onServices for architecture x86_64
       > clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
       >
       For full logs, run 'nix log /nix/store/c5ha99chbxbz23r52kxy01bpz091vxcp-ocaml4.10.2-cairo2-0.6.2.dr
v'.

this one just seems like a straightforward missing application framework.

and

error: builder for '/nix/store/nb6dj5yq7gr74kwzsadhf1yhki7lcwjx-python3.9-beautifulsoup4-4.10.0.drv' faile
d with exit code 1;
       last 10 log lines:
       >         soup = self.soup(markup)
       > >       self.assertEqual('Sacr\xe9 bleu!', soup.root.string)
       > E       AttributeError: 'NoneType' object has no attribute 'string'
       >
       > bs4/testing.py:1002: AttributeError
       > =========================== short test summary info ============================
       > FAILED bs4/tests/test_lxml.py::LXMLTreeBuilderSmokeTest::test_real_hebrew_document
       > FAILED bs4/tests/test_lxml.py::LXMLTreeBuilderSmokeTest::test_smart_quotes_converted_on_the_way_i
n
       > FAILED bs4/tests/test_lxml.py::LXMLXMLTreeBuilderSmokeTest::test_can_parse_unicode_document
       > ======================== 3 failed, 514 passed in 8.02s =========================
       For full logs, run 'nix log /nix/store/nb6dj5yq7gr74kwzsadhf1yhki7lcwjx-python3.9-beautifulsoup4-4.
10.0.drv'.

@happysalada
Copy link
Contributor

I think we are good to merge here.
The darwin evaluation took a lot longer than expected (and is still not finished, but 80/82 there)

@happysalada happysalada merged commit e456e9b into NixOS:master Sep 25, 2021
@happysalada
Copy link
Contributor

Thanks a lot for the quick response to this!

@thefloweringash thefloweringash deleted the sigtool-update branch September 25, 2021 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.severity: channel blocker Blocks a channel 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants