https://bugzilla.redhat.com/show_bug.cgi?id=2012986
Ben Beasley <code(a)musicinmybrain.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Flags|fedora-review? |fedora-review+
| |needinfo?(mhayden(a)redhat.co
| |m)
--- Comment #2 from Ben Beasley <code(a)musicinmybrain.net> ---
Package Review
==============
Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
===== Issues =====
- There are missing Python extras metapackages
(
https://fedoraproject.org/wiki/Changes/PythonExtras#Extras_metapackages).
Normally I would say please add
#
https://pypi.org/project/pyarrow not yet packaged
%bcond_with pyarrow
%pyproject_extras_subpkg -n python3-%{srcname} pandas fastavro
%{?with_pyarrow:pyarrow}
but there is a wrinkle: python-fastavro is ExcludeArch: i686 armv7hl (32-bit
architectures). So now you have a noarch package with unported dependencies
(
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_noarch_with_u...,
honestly, you were BR’ing fastavro for the tests, so you already had a noarch
package that wouldn’t build on 32-bit builders. However, the suggested
solution in the guidelines is too big a hammer, because we don’t want to
exclude the package from 32-bit arches, just switch off the *optional*
fastavro dependency.
See
https://src.fedoraproject.org/rpms/python-hdfs for a package with
*exactly* the same problem, right down to the extra requiring fastavro. It
was on-and-off FTBFS in Koschei until I dealt with it.
The technique looks like this:
Still start by adding
#
https://pypi.org/project/pyarrow not yet packaged
%bcond_with pyarrow
then drop
BuildArch: noarch
from the *base* package. We are making the package arched so that we can
promptly detect issues with builder architecture and so that we can use
architecture-dependent conditionals in the spec, but all of the binary
RPMs—except the conditionally-built
python3-google-cloud-bigquery-storage+fastavro metapackage—are still going to
be noarch.
Now replace it with:
# The base package is arched because extras metapackages requiring fastavro
are
# not available on 32-bit architectures
# (
https://bugzilla.redhat.com/show_bug.cgi?id=1943932).
%ifnarch %{arm32} %{ix86}
%global fastavro_arch 1
%endif
# Of the binary RPMs, only the conditionally-enabled extras metapackage
# python3-google-cloud-bigquery-storage+fastavro is arched.
#
# Since there is no compiled code, there are no debugging symbols.
%global debug_package %{nil}
Add
BuildArch: noarch
to the python3-%{srcname} (python3-google-cloud-bigquery-storage) package.
Now handle the unconditional metapackages. Unfortunately, if you want them to
be noarch, you have to go through the trouble of writing them out by hand:
# We manually write out the python3-%%{srcname}+pandas and
# python3-%%{srcname}+pyarrow metapackages so that they (like
# python3-%%{srcname} can be noarch even though the base package is arched.
The
# definition is based on:
#
# rpm -E '%%pyproject_extras_subpkg -n python3-%%{srcname} pandas pyarrow
%package -n python3-%{srcname}+pandas
Summary: Metapackage for python3-%{srcname}: pandas extras
BuildArch: noarch
Requires: python3-%{srcname} = %{version}-%{release}
%description -n python3-%{srcname}+pandas
This is a metapackage bringing in pandas extras requires for
python3-%{srcname}.
It makes sure the dependencies are installed.
%files -n python3-%{srcname}+pandas -f %{_pyproject_ghost_distinfo}
%if %{with pyarrow}
%package -n python3-%{srcname}+pyarrow
Summary: Metapackage for python3-%{srcname}: pyarrow extras
BuildArch: noarch
Requires: python3-%{srcname} = %{version}-%{release}
%description -n python3-%{srcname}+pyarrow
This is a metapackage bringing in pyarrow extras requires for
python3-%{srcname}.
It makes sure the dependencies are installed.
%files -n python3-%{srcname}+pyarrow -f %{_pyproject_ghost_distinfo}
%endif
If you’re willing to give this up and have arched metapackages, you could
just write:
# We would have to write out the extras metapackage definitions manually if
# we wanted them to be noarch, since the base package is arched.
%pyproject_extras_subpkg -n python3-%{srcname} pandas
%{?with_pyarrow:pyarrow}
Now, conditionally add the metapackage for the fastavro extra:
%if 0%{?fastavro_arch}
# Note that this metapackage is arched because it is not available on
32-bit
# architectures.
%pyproject_extras_subpkg -n python3-%{srcname} fastavro
%endif
(I guess you could try manually defining this subpackage with both BuildArch:
noarch
and ExcludeArch: %{arm32} %{ix86} noarch, but I wouldn’t be surprised if
something
went wrong doing that on a subpackage.)
You can use the extras to bring in BR’s rather than listing them manually.
Change
%pyproject_buildrequires -r
to
%pyproject_buildrequires -x
pandas%{?with_pyarrow:,pyarrow}%{?fastavro_arch:,fastavro},tests
and remove:
BuildRequires: python3dist(fastavro)
BuildRequires: python3dist(freezegun)
BuildRequires: python3dist(pandas)
Finally, ignore the test files that import fastavro as needed. Change
%pytest --disable-warnings tests/unit
to
%pytest %{?!fastavro_arch:--ignore=tests/unit/test_reader_v1.py} \
--disable-warnings tests/unit
Of course, let me know if you can see a way to improve any of this!
===== MUST items =====
Generic:
[x]: Package is licensed with an open-source compatible license and meets
other legal requirements as defined in the legal section of Packaging
Guidelines.
[x]: License field in the package spec file matches the actual license.
Note: Checking patched sources after %prep for licenses. Licenses
found: "Unknown or generated", "Apache License 2.0", "*No
copyright*
Apache License 2.0", "Apache License 2.0 [generated file]", "*No
copyright* [generated file]". 89 files have unknown license. Detailed
output of licensecheck in /home/reviewer/2012986-python-google-cloud-
bigquery-storage/licensecheck.txt
[-]: Package does not own files or directories owned by other packages.
Note: Dirs in package are owned also by: /usr/lib/python3.10/site-
packages/google(python3-google-cloud-redis, python3-google-cloud-
access-context-manager, python3-google-cloud-bigquery, python3-google-
cloud-billing, python3-google-cloud-bigtable, python3-google-cloud-
storage, python3-google-cloud-billing-budgets, python3-google-cloud-
private-ca, python3-google-cloud-automl, python3-google-cloud-os-
config, python3-google-cloud-build, python3-google-cloud-iam,
python3-google-cloud-asset, python3-google-cloud-apigee-connect,
python3-google-cloud-spanner, python3-google-cloud-api-gateway,
python3-google-cloud-access-approval, python3-grpc-google-iam-v1,
python3-google-cloud-firestore, python3-google-cloud-kms,
python3-google-cloud-core, python3-google-cloud-org-policy,
python3-googleapis-common-protos, python3-google-cloud-appengine-
admin, python3-google-cloud-container, python3-google-api-core,
python3-google-cloud-functions, python3-google-resumable-media,
python3-protobuf), /usr/lib/python3.10/site-
packages/google/cloud(python3-google-cloud-redis, python3-google-
cloud-bigquery, python3-google-cloud-billing, python3-google-cloud-
bigtable, python3-google-cloud-storage, python3-google-cloud-billing-
budgets, python3-google-cloud-private-ca, python3-google-cloud-automl,
python3-google-cloud-os-config, python3-google-cloud-build,
python3-google-cloud-iam, python3-google-cloud-asset, python3-google-
cloud-apigee-connect, python3-google-cloud-spanner, python3-google-
cloud-api-gateway, python3-google-cloud-access-approval,
python3-google-cloud-firestore, python3-google-cloud-kms,
python3-google-cloud-core, python3-google-cloud-org-policy,
python3-google-cloud-appengine-admin, python3-google-cloud-container,
python3-google-cloud-functions)
Sharing namespace package directories is correct.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[-]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
(~1MB) or number of files.
Note: Documentation size is 184320 bytes in 42 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
license(s) in its own file, then that file, containing the text of the
license(s) for the package is included in %license.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
%{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local
Python:
[x]: Python eggs must not download any dependencies during the build
process.
[x]: A package which is used by another package via an egg interface should
provide egg info.
[x]: Package meets the Packaging Guidelines::Python
[x]: Package contains BR: python2-devel or python3-devel
[x]: Packages MUST NOT have dependencies (either build-time or runtime) on
packages named with the unversioned python- prefix unless no properly
versioned package exists. Dependencies on Python packages instead MUST
use names beginning with python2- or python3- as appropriate.
[x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files
[x]: Binary eggs must be removed in %prep
===== SHOULD items =====
Generic:
[-]: If the source package does not include license text(s) as a separate
file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[x]: Package functions as described.
(tests pass)
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
justified.
[-]: Sources are verified with gpgverify first in %prep if upstream
publishes signatures.
Note: gpgverify is not used.
[-]: Description and summary sections in the package spec file contains
translations for supported Non-English languages, if available.
[!]: Package should compile and build into binary rpms on all supported
architectures.
FTBFS on 32-bit architectures due to ExcludeArch in python-fastavro
dependency.
[x]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
$RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.
===== EXTRA items =====
Generic:
[x]: Rpmlint is run on all installed packages.
Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.
Rpmlint
-------
Checking: python3-google-cloud-bigquery-storage-2.9.1-1.fc36.noarch.rpm
python-google-cloud-bigquery-storage-2.9.1-1.fc36.src.rpm
python-google-cloud-bigquery-storage.src: W: patch-not-applied Patch0:
python-google-cloud-bigquery-storage-mock.patch
2 packages and 0 specfiles checked; 0 errors, 1 warnings.
Rpmlint (installed packages)
----------------------------
Cannot parse rpmlint output:
Source checksums
----------------
https://github.com/googleapis/python-bigquery-storage/archive/v2.9.1/pyth...
:
CHECKSUM(SHA256) this package :
32c011784e91d8f7729fdd824c74a1555eaaffe722403e32e2960133a51d181e
CHECKSUM(SHA256) upstream package :
32c011784e91d8f7729fdd824c74a1555eaaffe722403e32e2960133a51d181e
Requires
--------
python3-google-cloud-bigquery-storage (rpmlib, GLIBC filtered):
(python3.10dist(google-api-core) < 3~~dev0 with
python3.10dist(google-api-core) >= 1.26)
(python3.10dist(google-api-core[grpc]) < 3~~dev0 with
python3.10dist(google-api-core[grpc]) >= 1.26)
python(abi)
python3.10dist(libcst)
python3.10dist(packaging)
python3.10dist(proto-plus)
Provides
--------
python3-google-cloud-bigquery-storage:
python-google-cloud-bigquery-storage
python3-google-cloud-bigquery-storage
python3.10-google-cloud-bigquery-storage
python3.10dist(google-cloud-bigquery-storage)
python3dist(google-cloud-bigquery-storage)
Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10
Command line :/usr/bin/fedora-review -b 2012986
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Shell-api, Python
Disabled plugins: SugarActivity, PHP, Perl, fonts, C/C++, Haskell, R, Java,
Ocaml
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH
--
You are receiving this mail because:
You are always notified about changes to this product and component
You are on the CC list for the bug.
https://bugzilla.redhat.com/show_bug.cgi?id=2012986