Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spec: add ExcludeArch to exlude building on ppc64le and s390x #61

Merged
merged 2 commits into from
Jun 20, 2024

Conversation

anjannath
Copy link
Member

No description provided.

@@ -32,6 +32,7 @@ License: MIT
ExclusiveArch: x86_64 aarch64
URL: %{gourl}
Source0: %{gosource}
ExcludeArch: ppc64le s390x
Copy link
Contributor

Choose a reason for hiding this comment

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

In my opinion it's better to use ExclusiveArch to list the arches we want to build on.

Copy link
Member

Choose a reason for hiding this comment

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

looks like ExclusiveArch is not working internal brew taskID=62069957 (reference) and it still build for all arch.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is caused by gometa, which sets ExclusiveArch to all the architectures supported by golang.
This should work even though it's not very nice.

diff --git a/crc-admin-helper.spec.in b/crc-admin-helper.spec.in
index 87250d9..29954a6 100644
--- a/crc-admin-helper.spec.in
+++ b/crc-admin-helper.spec.in
@@ -3,6 +3,8 @@
 %global goname          crc-admin-helper
 Version:                0.5.3
 
+# %gometa sets ExclusiveArch to %{golang_arches}, and we only want to build on x86_64 and aarch64
+%global golang_arches x86_64 aarch64
 %gometa
 
 %global gobuilddir %{_builddir}/%{archivename}/_build

Copy link
Contributor

Choose a reason for hiding this comment

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

On my fedora, ExclusiveArch is set to i386 i486 i586 i686 pentium3 pentium4 athlon geode x86_64 armv3l armv4b armv4l armv4tl armv5tl armv5tel armv5tejl armv6l armv6hl armv7l armv7hl armv7hnl armv8l armv8hl armv8hnl armv8hcnl aarch64 ppc64le s390x riscv64 when using gometa, if we use ExcludeArch, in my opinion we would need to list all of these...

gometa sets ExclusiveArch to golang_arches which is all the architectures
supported by golang, we redefine it to only build for x86 and aarch64

%global golang_arches x86_64 aarch64
Copy link
Member

Choose a reason for hiding this comment

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

👍🏼

@praveenkumar praveenkumar merged commit ec8d66d into crc-org:master Jun 20, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants