copr icon indicating copy to clipboard operation
copr copied to clipboard

ExclusiveArch skipping something it shouldn't

Open FrostyX opened this issue 1 year ago • 6 comments

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

FrostyX avatar May 02 '24 20:05 FrostyX

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

praiskup avatar May 03 '24 05:05 praiskup

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.

penguinpee avatar May 04 '24 11:05 penguinpee

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

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

praiskup avatar May 06 '24 10:05 praiskup

triage: moving builders to fedora 40 will resolve this

nikromen avatar May 06 '24 11:05 nikromen

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.

penguinpee avatar May 06 '24 11:05 penguinpee

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).

praiskup avatar May 06 '24 14:05 praiskup