guix: add --no-same-owner to codesign.sh TAR_OPTIONS #36615

Manually merged
marcofleon merged 1 commit from codesign-tar-options into master 2026-11-04 12:11:15 +00:00 AGit
marcofleon commented 2026-10-22 20:11:44 +00:00 (Migrated from github.com)

Just ran guix-codesign for v32.0 as root, in fanquake's container image (option 3 in INSTALL.md) and got this error while unpacking the codesigning tarball:

tar: ./detached-sig-create.sh: Cannot change ownership to uid 0, gid 0: Invalid argument
tar: ./unsigned/bitcoin-32.0: Cannot change ownership to uid 0, gid 0: Invalid argument
tar: ./unsigned/bitcoin-32.0-win64-setup-unsigned.exe: Cannot change ownership to uid 0, gid 0: Invalid argument
...
tar: Exiting with failure status due to previous errors

Same happens for the macOS files.

When updating guix in https://github.com/bitcoin/bitcoin/pull/34550, --no-same-owner was added in build.sh (now in setup.sh) in 0f323e1075, but not in codesign.sh. This PR adds it to TAR_OPTIONS in codesign.sh. This fixed the issue for me and my hashes match the other attestations for v32.0.

Just ran `guix-codesign` for v32.0 as root, in fanquake's container image ([option 3](https://github.com/bitcoin/bitcoin/blob/master/contrib/guix/INSTALL.md#option-3-using-fanquakes-container-image) in INSTALL.md) and got this error while unpacking the codesigning tarball: ```bash tar: ./detached-sig-create.sh: Cannot change ownership to uid 0, gid 0: Invalid argument tar: ./unsigned/bitcoin-32.0: Cannot change ownership to uid 0, gid 0: Invalid argument tar: ./unsigned/bitcoin-32.0-win64-setup-unsigned.exe: Cannot change ownership to uid 0, gid 0: Invalid argument ... tar: Exiting with failure status due to previous errors ``` Same happens for the macOS files. When updating guix in https://github.com/bitcoin/bitcoin/pull/34550, `--no-same-owner` was added in `build.sh` (now in `setup.sh`) in 0f323e10759aba4429677d0e1e202bf575b6d664, but not in `codesign.sh`. This PR adds it to `TAR_OPTIONS` in `codesign.sh`. This fixed the issue for me and my hashes match the other attestations for v32.0.
DrahtBot commented 2026-10-22 20:11:53 +00:00 (Migrated from github.com)

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

External sites

Reviews

See the guideline and AI policy for information on the review process.

Type Reviewers
ACK fanquake, willcl-ark

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

<!--e57a25ab6845829454e8d69fc972939a--> The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. <!--006a51241073e994b41acfe9ec718e94--> ### External sites * Code coverage & benchmarks: https://corecheck.dev/bitcoin/bitcoin/pulls/36615 * Ralph review <img src=https://review.fish.foo/assets/bitcoin/bitcoin/36615.png alt="Ralph review status"> https://git.fish.foo/bitcoin/bitcoin/pulls/36615#author-ralph <!--021abf342d371248e50ceaed478a90ca--> ### Reviews See [the guideline](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#code-review) and [AI policy](https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md) for information on the review process. | Type | Reviewers | | ---- | --------- | | ACK | [fanquake](https://github.com/bitcoin/bitcoin/pull/36615#issuecomment-6629622082), [willcl-ark](https://github.com/bitcoin/bitcoin/pull/36615#pullrequestreview-5767918942) | If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore. <!--5faf32d7da4f0f540f40219e4f7537a3-->
marcofleon commented 2026-10-22 20:13:03 +00:00 (Migrated from github.com)

Bit out of my depth here, so if there's a reason to not add this option for codesigning or I just shouldn't be doing this as root or something, let me know.

Bit out of my depth here, so if there's a reason to not add this option for codesigning or I just shouldn't be doing this as root or something, let me know.
First-time contributor

No verified findings are available from this review.

Review coverage was incomplete.


Reviewed: d2e5108ea2dd · Full review report · Previous reports

permalink

<!-- forgejo-review-bot:bitcoin/bitcoin --> <!-- ralph-engine:current:7ba49ca38b129bc35f71e566efbd136b17ae87b582376d9eebd04f18959e8274:9b5e0237a3fe9e1d05225291551198f07780ddb92e41e55ade9e98c2687fc127 --> <!-- ralph-base:43a33e513c4044dc01d92e77da76f2e98faaedb5 --> <!-- ralph-head:d2e5108ea2ddce1952d4db8b42d39a40e3d9f521 --> <!-- ralph-case:6c2455399f26bec0755732cba09f7042822c7fcb92b1bd1bf3f102c2f6e459de --> No verified findings are available from this review. Review coverage was incomplete. <!-- Review tier: sensitive --> --- Reviewed: [`d2e5108ea2dd`](<https://git.fish.foo/bitcoin/bitcoin/commit/d2e5108ea2ddce1952d4db8b42d39a40e3d9f521>) · [Full review report](<https://review.fish.foo/traces/36615-d2e5108ea2ddce1952d4db8b42d39a40e3d9f521-1819-5.html>) · [Previous reports](<https://review.fish.foo/traces/36615/>) [permalink](<https://review.fish.foo/traces/36615-d2e5108ea2ddce1952d4db8b42d39a40e3d9f521-1819-5.html>)
fanquake commented 2026-10-23 11:41:40 +00:00 (Migrated from github.com)

Concept ACK

Concept ACK
willcl-ark commented 2026-10-26 21:08:11 +00:00 (Migrated from github.com)

Could that var be extracted into libexec/prelude.sh to avoid repeats?

Could that var be extracted into libexec/prelude.sh to avoid repeats?
fanquake commented 2026-10-30 14:58:41 +00:00 (Migrated from github.com)

Could that var be extracted

Yes I think so.

> Could that var be extracted Yes I think so.
marcofleon commented 2026-11-03 14:07:34 +00:00 (Migrated from github.com)

extracted into libexec/prelude.sh

I'm assuming you mean prelude.bash? Doesn't that only run outside of the guix container, so would tar options set in preclude.bash work?

Regardless, I believe @fanquake has another PR in mind that would include this fix, so closing for now.

> extracted into libexec/prelude.sh I'm assuming you mean prelude.bash? Doesn't that only run outside of the guix container, so would tar options set in preclude.bash work? Regardless, I believe @fanquake has another PR in mind that would include this fix, so closing for now.
fanquake commented 2026-11-03 16:21:08 +00:00 (Migrated from github.com)

You're right. We'll need to pass the values in if we want to deduplicate. In any case, I'll open a PR with the other change.

You're right. We'll need to pass the values in if we want to deduplicate. In any case, I'll open a PR with the other change.
fanquake commented 2026-11-04 11:27:09 +00:00 (Migrated from github.com)

I think we should actually just move ahead with the change here. Left as-is so it's trivial to backport.

I think we should actually just move ahead with the change here. Left as-is so it's trivial to backport.
fanquake commented 2026-11-04 11:38:57 +00:00 (Migrated from github.com)
ACK d2e5108ea2ddce1952d4db8b42d39a40e3d9f521
willcl-ark (Migrated from github.com) approved these changes 2026-11-04 12:05:05 +00:00
willcl-ark (Migrated from github.com) left a comment

utACK d2e5108ea2

I've not bumped into this myself ever but the fix seems correct to me, and I'm fine with it being left simpler/non-deduplicated/easier to backport.

Not running a guix build.

utACK d2e5108ea2ddce1952d4db8b42d39a40e3d9f521 I've not bumped into this myself ever but the fix seems correct to me, and I'm fine with it being left simpler/non-deduplicated/easier to backport. Not running a guix build.
fanquake commented 2026-11-04 12:14:23 +00:00 (Migrated from github.com)

Backported to 32.x in #36727.

Backported to `32.x` in #36727.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bitcoin/bitcoin!36615
No description provided.