Observing error such as:

~~~
... snip ...

Processing files: rubygem-selenium-webdriver-4.27.0-3.fc43.noarch
Provides: rubygem(selenium-webdriver) = 4.27.0 rubygem-selenium-webdriver = 
4.27.0-3.fc43
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 
4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: (rubygem(base64) >= 0.2 with rubygem(base64) < 1) (rubygem(logger) >= 
1.4 with rubygem(logger) < 2) (rubygem(rexml) >= 3.2 with rubygem(rexml) < 4 
with rubygem(rexml) >= 3.2.5) (rubygem(rubyzip) >= 1.2.2 with rubygem(rubyzip) 
< 3.0) (rubygem(websocket) >= 1.0 with rubygem(websocket) < 2) ruby(rubygems) > 
1.3.1
Recommends: chromedriver chromium chromium-headless
error: Arch dependent binaries in noarch package
    Arch dependent binaries in noarch package
~~~

It does not provide enough detail what binary actually caused this. It would be 
nice to provide reference to it making it easier to debug the issue.

The following .spec file can trigger such error:

<details>

~~~spec
%global gem_name selenium-webdriver

%bcond_without spec_integration

Name: rubygem-%{gem_name}
Version: 4.27.0
Release: 3%{?dist}
Summary: Selenium is a browser automation tool for automated testing of webapps 
and more
License: Apache-2.0
URL: https://selenium.dev
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
# git clone https://github.com/SeleniumHQ/selenium
# git -C selenium archive -v -o selenium-webdriver-4.27.0-spec.tar.gz 
selenium-4.27.0 rb/spec
Source1: %{gem_name}-%{version}-spec.tar.gz
# Needed for integration `spec/integration`
# git -C selenium archive -v -o selenium-webdriver-4.27.0-web.tar.gz 
selenium-4.27.0 common/src/web
Source2: %{gem_name}-%{version}-web.tar.gz
# `selenium-manager` stub replacing the bundled binary blobs.
Source3: selenium-manager
# Ruby 3.4 `Hash#inspect` compatibility.
# https://github.com/SeleniumHQ/selenium/issues/14934
Patch0: 
rubygem-selenium-webdriver-4.27.0-Hash-inspect-formatting-for-Ruby-3.4-compatibili.patch

# There is no other driver in Fedora, therefore suggest what we have. This also
# reflescts the `selenium-manager` stub above.
Recommends: chromedriver
Recommends: chromium chromium-headless

Requires: selenium-manager
BuildRequires: selenium-manager
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby
BuildRequires: rubygem(curb)
BuildRequires: rubygem(rspec)
BuildRequires: rubygem(rubyzip)
BuildRequires: rubygem(webmock)
BuildRequires: rubygem(websocket)
%if %{with spec_integration}
BuildRequires: rubygem(rack)
BuildRequires: rubygem(webrick)
BuildRequires: chromedriver
BuildRequires: chromium chromium-headless
# Chromium is not available for i686 / s390x
# 
https://src.fedoraproject.org/rpms/chromium/blob/fcd074b9c31411f795ab402fe88e4513a68c843e/f/chromium.spec#_803
# and on ppc64le
# 
https://src.fedoraproject.org/rpms/chromium/blob/fcd074b9c31411f795ab402fe88e4513a68c843e/f/chromium.spec#_43-45
ExclusiveArch: x86_64 aarch64
%endif
BuildArch: noarch

%description
Selenium implements the W3C WebDriver protocol to automate popular browsers.
It aims to mimic the behaviour of a real user as it interacts with the
application's HTML. It's primarily intended for web application testing,
but any web-based task can automated.

%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch

%description doc
Documentation for %{name}.

%prep
%setup -q -n %{gem_name}-%{version} -b1 -b2

(
cd %{builddir}
%patch 0 -p1
)

# Drop the original selenium-manager binaries as long as we cannot recreate
# them from source. Their purpose is described here:
# https://www.selenium.dev/documentation/selenium_manager/
# and they are included from this repo:
# https://github.com/SeleniumHQ/selenium_manager_artifacts
# TODO: Try to build them from source:
# https://github.com/SeleniumHQ/selenium/tree/trunk/rust
# 
https://www.selenium.dev/documentation/selenium_manager/#building-a-custom-selenium-manager
# BTW: python-selenium package is struggling with the same issue:
# https://bugzilla.redhat.com/show_bug.cgi?id=2278096#c13
%gemspec_remove_file Dir.glob('bin/{windows,macos}/selenium-manager{,.exe}')
%build
gem build ../%{gem_name}-%{version}.gemspec
%gem_install

%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
        %{buildroot}%{gem_dir}/
#Remove temporary selenium wrapper
#and create a link to selenium-manager binary
rm .%{gem_instdir}/bin/linux/selenium-manager
ln -s %{_bindir}/selenium-manager .%{gem_instdir}/bin/linux/

%check
pushd .%{gem_instdir}
ln -s %{_builddir}/rb/spec .

# `DevTools` are part of separate `selenium-devtools` gem.
mv spec/unit/selenium/devtools_spec.rb{,.disable}
mv spec/unit/selenium/devtools/cdp_client_generator_spec.rb{,.disable}
mv spec/integration/selenium/webdriver/devtools_spec.rb{,.disable}

# Require Firefox extensions included in thirdparty directory, available on GH
# not included in gem
sed -i spec/unit/selenium/webdriver/firefox/profile_spec.rb \
    -e '/can install extension/a\          skip' \
    -e '/can install web extension/a\          skip'

# There seems to be wrong stub and when `bin/linux/selenium-manager` exists,
# the test fails.
# https://github.com/SeleniumHQ/selenium/issues/14925
sed -i "/it 'errors if cannot find' do/a\          skip" \
  spec/unit/selenium/webdriver/common/selenium_manager_spec.rb

rspec spec/unit

%if %{with spec_integration}
# Ignore `spec/integration/selenium/server_spec.rb`, which downloads some
# content from internet.
mv spec/integration/selenium/server_spec.rb{,.disable}

# These test are passing when they are expected to fail. Maybe chromium
# supports these actions now?
sed -i -r \
  -e "/it 'can make window full screen'/ s/(^\s*)it/\1skip/" \
  -e "/it 'can minimize the window'/ s/(^\s*)it/\1skip/" \
  spec/integration/selenium/webdriver/window_spec.rb

HEADLESS=true SE_CHROMEDRIVER=chromedriver rspec spec/integration
%endif
popd

%files
%dir %{gem_instdir}
%license %{gem_instdir}/LICENSE
%{gem_instdir}/bin
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}

%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/CHANGES
%doc %{gem_instdir}/NOTICE
%{gem_instdir}/Gemfile
%doc %{gem_instdir}/README.md
%{gem_instdir}/selenium-webdriver.gemspec

%changelog
* Sun Jan 19 2025 Fedora Release Engineering <rel...@fedoraproject.org> - 
4.27.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
~~~
</details>


-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/3587
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/repo-discussions/3...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to