Skip to content

bootstrap: fix bootstrapping GnuPG from different macOS versions#28350

Merged
tgamblin merged 1 commit intospack:developfrom
alalazo:fixes/macos_bootstrap_gnupg
Jan 12, 2022
Merged

bootstrap: fix bootstrapping GnuPG from different macOS versions#28350
tgamblin merged 1 commit intospack:developfrom
alalazo:fixes/macos_bootstrap_gnupg

Conversation

@alalazo
Copy link
Copy Markdown
Member

@alalazo alalazo commented Jan 11, 2022

Due to changes in #27485, which introduced setting custom environment modifications for spec executables that are bootstrapped, using GnuPG on macOS versions which are different from the one in which it was built in CI stopped working.

The cause of the issue is that, to set variables at the package.py module level we need a compiler entry compatible with the OS used to build GnuPG (in this case Catalina). When run e.g. on a more recent OS, like Monterey we have this error:

% spack gpg list
==> Bootstrapping gnupg from pre-built binaries
==> Fetching https://mirror.spack.io/bootstrap/github-actions/v0.1/build_cache/darwin-catalina-x86_64/apple-clang-12.0.0/libgpg-error-1.42/darwin-catalina-x86_64-apple-clang-12.0.0-libgpg-error-1.42-hph66gvb7vlinpzwoytxq27ojb7gtl2j.spack
==> Installing "[email protected]%[email protected] cflags="-mmacosx-version-min=10.13"  arch=darwin-catalina-x86_64" from a buildcache
==> Fetching https://mirror.spack.io/bootstrap/github-actions/v0.1/build_cache/darwin-catalina-x86_64/apple-clang-12.0.0/libiconv-1.16/darwin-catalina-x86_64-apple-clang-12.0.0-libiconv-1.16-ckpif6rcf7mxdmceyv6sqvtnwfqi7fmc.spack
==> Installing "[email protected]%[email protected] cflags="-mmacosx-version-min=10.13"  arch=darwin-catalina-x86_64" from a buildcache
==> Fetching https://mirror.spack.io/bootstrap/github-actions/v0.1/build_cache/darwin-catalina-x86_64/apple-clang-12.0.0/npth-1.6/darwin-catalina-x86_64-apple-clang-12.0.0-npth-1.6-fjuoy73whriauk3bt6ma5fwet6iric7y.spack
==> Installing "[email protected]%[email protected] cflags="-mmacosx-version-min=10.13"  arch=darwin-catalina-x86_64" from a buildcache
==> Fetching https://mirror.spack.io/bootstrap/github-actions/v0.1/build_cache/darwin-catalina-x86_64/apple-clang-12.0.0/zlib-1.2.11/darwin-catalina-x86_64-apple-clang-12.0.0-zlib-1.2.11-qo6otxqnn6mxpw4zhqc4wdwqmgcfjdfe.spack
==> Installing "[email protected]%[email protected] cflags="-mmacosx-version-min=10.13" +optimize+pic+shared arch=darwin-catalina-x86_64" from a buildcache
==> Fetching https://mirror.spack.io/bootstrap/github-actions/v0.1/build_cache/darwin-catalina-x86_64/apple-clang-12.0.0/libassuan-2.5.5/darwin-catalina-x86_64-apple-clang-12.0.0-libassuan-2.5.5-2upi74qccouj4k6d7wultp2u5fntayi3.spack
==> Installing "[email protected]%[email protected] cflags="-mmacosx-version-min=10.13"  arch=darwin-catalina-x86_64" from a buildcache
==> Fetching https://mirror.spack.io/bootstrap/github-actions/v0.1/build_cache/darwin-catalina-x86_64/apple-clang-12.0.0/libgcrypt-1.9.3/darwin-catalina-x86_64-apple-clang-12.0.0-libgcrypt-1.9.3-xzhvvm44cfxwvgqgkpbeucpnl4dbj4p2.spack
==> Installing "[email protected]%[email protected] cflags="-mmacosx-version-min=10.13"  arch=darwin-catalina-x86_64" from a buildcache
==> Fetching https://mirror.spack.io/bootstrap/github-actions/v0.1/build_cache/darwin-catalina-x86_64/apple-clang-12.0.0/libksba-1.5.1/darwin-catalina-x86_64-apple-clang-12.0.0-libksba-1.5.1-aodyg5mzfule3vimuetmzulv5mzdx37g.spack
==> Installing "[email protected]%[email protected] cflags="-mmacosx-version-min=10.13"  arch=darwin-catalina-x86_64" from a buildcache
==> Fetching https://mirror.spack.io/bootstrap/github-actions/v0.1/build_cache/darwin-catalina-x86_64/apple-clang-12.0.0/pinentry-1.1.1/darwin-catalina-x86_64-apple-clang-12.0.0-pinentry-1.1.1-ihqcvdm5okxuvnln463l7h4flbkhrp44.spack
==> Installing "[email protected]%[email protected] cflags="-mmacosx-version-min=10.13"  gui=tty arch=darwin-catalina-x86_64" from a buildcache
==> Fetching https://mirror.spack.io/bootstrap/github-actions/v0.1/build_cache/darwin-catalina-x86_64/apple-clang-12.0.0/gnupg-2.3.1/darwin-catalina-x86_64-apple-clang-12.0.0-gnupg-2.3.1-47vilwybwuxved7jov7esiad3qlkv5rp.spack
==> Installing "[email protected]%[email protected] cflags="-mmacosx-version-min=10.13"  arch=darwin-catalina-x86_64" from a buildcache
==> Error: cannot bootstrap any of the gpg2, gpg executables from spec "[email protected]: %apple-clang target=x86_64"

This PR fixes the issue by explicitly avoid setting variables at the package.py level during bootstrapping. With this modification the GnuPG executable built on Catalina works on any version of the OS > 10.13, including later versions:

% spack gpg list
...
/Users/culpo/PycharmProjects/spack/opt/spack/gpg/pubring.kbx
------------------------------------------------------------
pub   rsa4096 2021-10-26 [SC]
...
% spack arch
darwin-monterey-cannonlake

@alalazo alalazo added bug Something isn't working bugfix Something wasn't working, here's a fix buildcache macOS labels Jan 11, 2022
@alalazo alalazo force-pushed the fixes/macos_bootstrap_gnupg branch 2 times, most recently from 1fd4b6f to c2bf6ea Compare January 11, 2022 11:48
@alalazo
Copy link
Copy Markdown
Member Author

alalazo commented Jan 11, 2022

@spackbot run pipeline

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Jan 11, 2022

I've started that pipeline for you!

@alalazo alalazo force-pushed the fixes/macos_bootstrap_gnupg branch from 63a123d to 19f1ada Compare January 12, 2022 09:20
@tgamblin tgamblin merged commit 91fc4cf into spack:develop Jan 12, 2022
@alalazo alalazo deleted the fixes/macos_bootstrap_gnupg branch January 12, 2022 16:19
@alalazo alalazo mentioned this pull request Jan 12, 2022
24 tasks
RikkiButler20 pushed a commit to RikkiButler20/spack that referenced this pull request Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working bugfix Something wasn't working, here's a fix build-environment buildcache macOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants