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

ExclusiveArch skipping something it shouldn't #3244

Closed
FrostyX opened this issue May 2, 2024 · 6 comments · Fixed by #3513
Closed

ExclusiveArch skipping something it shouldn't #3244

FrostyX opened this issue May 2, 2024 · 6 comments · Fixed by #3513
Assignees

Comments

@FrostyX
Copy link
Member

FrostyX commented May 2, 2024

We have for example this build which was skipped because of an ExclusiveArch
https://copr.fedorainfracloud.org/coprs/sentry/zig-tools/build/7399386/

It uses ExclusiveArch: %{zig_arches} which on my laptop evaluates as

[jkadlcik@zeratul ~]$ rpm --eval "%{zig_arches}"
x86_64 aarch64 riscv64 mips64 mips64el mips64r6 mips64r6el

so it IMHO should be built for x86_64 chroots - but it was skipped.

Full spec file as a backup:
%global         debug_package   %{nil}

Name:           zls
Version:        0.11.0
Release:        1%{?dist}
Summary:        A Zig language server with features like autocomplete and goto definition 

License:        MIT
URL:            https://github.com/zigtools/zls
Source0:        %{url}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz

ExclusiveArch:  %{zig_arches}

BuildRequires:  zig >= %{version}
BuildRequires:  zig-rpm-macros

%description
The Zig Language Server (ZLS) is a tool that implements Microsoft's Language
Server Protocol for Zig in Zig. In simpler terms: it'll provide you with
completions, go-to definition, etc. when you write Zig code!

%prep
%setup -q

%build
%zig_build

%install
%zig_install

%check
%zig_test

%files
%license LICENSE
%doc README.md
%{_bindir}/zls

%changelog
* Thu May 02 2024 Jan200101 <[email protected]> - 0.11.0-1
- Update to 0.11

* Sat Mar 26 2022 Jan Drögehoff <[email protected]> - 0.9.0-1
- Update to 0.9.0

* Tue Sep 14 2021 Jan Drögehoff <[email protected]> - 0.1.0-1
- Bump release
@praiskup
Copy link
Member

praiskup commented May 3, 2024

This would be OK after moving to F40 builders where zig-srpm-macros package exists; but on our builders, %zig_arches is undefined.

@penguinpee
Copy link

I believe the reverse also holds. For a package that has ExcludeArch: %{ix86} in a Copr with x86_64 and i386 chroots, Copr attempts the build and fails, weheras previously the result would be skipped.

In the build log I see error: Architecture is excluded: i686 and the last entry is:

ERROR: Command failed: 
 # ['bash', '--login', '-c', '/usr/bin/rpmbuild -br  --target i686 --nodeps /builddir/build/originals/python-pandas.spec']

Copr build error: Build failed

I've seen skipped results before for excluded arches. Albeit, that was when a package excluded s390x and ppc64le. But I think the behavior for excluding i686 should be the same.

If this is a different issue, I can open a new ticket.

@praiskup
Copy link
Member

praiskup commented May 6, 2024

If this is a different issue, I can open a new ticket.

Not sure. ix86 => 32bit only. Is that #3061 or #3114?

@nikromen
Copy link
Member

nikromen commented May 6, 2024

triage: moving builders to fedora 40 will resolve this

@nikromen nikromen moved this from Needs triage to In Progress in CPT Kanban May 6, 2024
@nikromen nikromen moved this from In Progress to In 3 months in CPT Kanban May 6, 2024
@penguinpee
Copy link

If this is a different issue, I can open a new ticket.

Not sure. ix86 => 32bit only. Is that #3061 or #3114?

I think #3061 fits my use case. I'll continue over in the other ticket.

@praiskup
Copy link
Member

praiskup commented May 6, 2024

Running SRPMResults tool
Package info: {
    "name": "zls",
    "epoch": null,
    "version": "0.11.0",
    "release": "1",
    "exclusivearch": [
        "%{zig_arches}"
    ],
    "excludearch": []
}

One of the workarounds that we discussed today is to detect unexpanded macros in exclusivearch ('%' in info["exclusivearch"]), and avoid skipping (some architectures will fail, but that's still better than skipping them all).

@nikromen nikromen moved this from In 3 months to In Progress in CPT Kanban Nov 11, 2024
FrostyX added a commit to FrostyX/copr that referenced this issue Nov 13, 2024
…aluated

Fix fedora-copr#3244

It can happen that our builder doesn't understand some architecture macro,
e.g. `%{zig_arches}`. In such a case when it is used in `ExclusiveArch`, we
shouldn't skip all chroots like we do now. A better approach is to be safe and
avoid any skipping. Builds will fail in some chroots that should have been
skipped but that can be workarounded by the user by manually submitting the
build only for a subset of chroots.
FrostyX added a commit to FrostyX/copr that referenced this issue Nov 16, 2024
…udeArch evaluated

Fix fedora-copr#3244

It can happen that our builder doesn't understand some architecture macro,
e.g. `%{zig_arches}`. In such a case when it is used in `ExclusiveArch`, we
shouldn't skip all chroots like we do now. A better approach is to be safe and
avoid any skipping. Builds will fail in some chroots that should have been
skipped but that can be workarounded by the user by manually submitting the
build only for a subset of chroots.
FrostyX added a commit to FrostyX/copr that referenced this issue Nov 16, 2024
…udeArch evaluated

Fix fedora-copr#3244

It can happen that our builder doesn't understand some architecture macro,
e.g. `%{zig_arches}`. In such a case when it is used in `ExclusiveArch`, we
shouldn't skip all chroots like we do now. A better approach is to be safe and
avoid any skipping. Builds will fail in some chroots that should have been
skipped but that can be workarounded by the user by manually submitting the
build only for a subset of chroots.
FrostyX added a commit to FrostyX/copr that referenced this issue Nov 18, 2024
@nikromen nikromen moved this from In Progress to Done in CPT Kanban Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants