Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1929992
Summary: | Review Request: python-wcmatch - Wildcard/glob file name matcher | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Parag Nemade <pnemade> |
Component: | Package Review | Assignee: | Miro Hrončok <mhroncok> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | lbalhar, mhroncok, package-review |
Target Milestone: | --- | Flags: | mhroncok:
fedora-review+
|
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-04-13 09:34:12 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1929990, 1929991 | ||
Bug Blocks: | 1913796, 1930968 |
Description
Parag Nemade
2021-02-18 06:25:54 UTC
Spec URL: https://pnemade.fedorapeople.org/fedora-work/SPECS/python-wcmatch.spec SRPM URL: https://pnemade.fedorapeople.org/fedora-work/SRPMS/python-wcmatch-8.1.1-3.fc34.src.rpm Hi Parag, When using mock to build the package, one of the tests fails, resulting in failing the build. The test will fail each time user name is different than their home directory, which is case both mock and koji. The problematic test: https://github.com/facelessuser/wcmatch/blob/master/tests/test_glob.py#L1475 The koji failed build: https://koji.fedoraproject.org/koji/taskinfo?taskID=63406570 See the %check traceback in build.log: Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.09HkyO + umask 022 + cd /builddir/build/BUILD + cd wcmatch-8.1.1 + /usr/bin/python3 setup.py test /builddir/build/BUILD/wcmatch-8.1.1/setup.py:6: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp running test WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox. running egg_info writing wcmatch.egg-info/PKG-INFO writing dependency_links to wcmatch.egg-info/dependency_links.txt writing requirements to wcmatch.egg-info/requires.txt writing top-level names to wcmatch.egg-info/top_level.txt reading manifest file 'wcmatch.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching '*.png' under directory 'docs/src/markdown' warning: no files found matching '*.gif' under directory 'docs/src/markdown' warning: no files found matching '*.html' under directory 'docs/src/markdown' warning: no files found matching '*.js' under directory 'docs/theme' warning: no files found matching '*.css' under directory 'docs/theme' warning: no previously-included files matching '*' found under directory 'site' writing manifest file 'wcmatch.egg-info/SOURCES.txt' running build_ext test_limit_filter (tests.test_fnmatch.TestExpansionLimit) Test expansion limit of `filter`. ... ok test_limit_fnmatch (tests.test_fnmatch.TestExpansionLimit) Test expansion limit of `fnmatch`. ... ok test_limit_translate (tests.test_fnmatch.TestExpansionLimit) Test expansion limit of `translate`. ... ok test_escape (tests.test_fnmatch.TestFnMatchEscapes) Test path escapes. ... ok test_escape_forced_unix (tests.test_fnmatch.TestFnMatchEscapes) Test forced windows Unix. ... ok ... test_tilde_user (tests.test_glob.TestTilde) Test tilde user cases. ... ERROR ====================================================================== ERROR: test_tilde_user (tests.test_glob.TestTilde) Test tilde user cases. ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/wcmatch-8.1.1/tests/test_glob.py", line 1449, in test_tilde_user files = os.listdir(os.path.expanduser('~{}'.format(user))) FileNotFoundError: [Errno 2] No such file or directory: '~builddir' ---------------------------------------------------------------------- Ran 164 tests in 0.113s FAILED (errors=1, skipped=6) Test failed: <unittest.runner.TextTestResult run=164 errors=1 failures=0> error: Test failed: <unittest.runner.TextTestResult run=164 errors=1 failures=0> RPM build errors: error: Bad exit status from /var/tmp/rpm-tmp.09HkyO (%check) Bad exit status from /var/tmp/rpm-tmp.09HkyO (%check) Finish: rpmbuild python-wcmatch-8.1.1-3.fc34.src.rpm Finish: build phase for python-wcmatch-8.1.1-3.fc34.src.rpm ERROR: Exception(python-wcmatch-8.1.1-3.fc34.src.rpm) Config(fedora-rawhide-x86_64) 0 minutes 9 seconds INFO: Results and/or logs in: /var/lib/mock/fedora-rawhide-x86_64/result ERROR: Command failed: # /usr/bin/systemd-nspawn -q -M b556ebe77fe3400796fae2e22b7041f1 -D /var/lib/mock/fedora-rawhide-x86_64/root -a -u mockbuild --capability=cap_ipc_lock --bind=/tmp/mock-resolv.clfu3yyk:/etc/resolv.conf --bind=/dev/btrfs-control --bind=/dev/loop-control --bind=/dev/loop0 --bind=/dev/loop1 --bind=/dev/loop2 --bind=/dev/loop3 --bind=/dev/loop4 --bind=/dev/loop5 --bind=/dev/loop6 --bind=/dev/loop7 --bind=/dev/loop8 --bind=/dev/loop9 --bind=/dev/loop10 --bind=/dev/loop11 --console=pipe --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin --setenv=PROMPT_COMMAND=printf "\033]0;<mock-chroot>\007" --setenv=PS1=<mock-chroot> \s-\v\$ --setenv=LANG=C.UTF-8 --resolv-conf=off bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/python-wcmatch.spec It seems to me that the tests in TestTilde class are not ready for kinda specific settings in mock. >>> os.path.expanduser('~') '/builddir' >>> os.path.basename(os.path.expanduser('~')) 'builddir' >>> os.path.expanduser('~{}'.format(user)) '~builddir' I believe that this one failing test can be skipped. This test has wrong assumptions (that username == basename(homedir)). It can be skipped temporarily, but it should be reported to upstream. Replacing os.path.basename(os.path.expanduser('~')) with getpass.getuser() should fix the test. Reported upstream https://github.com/facelessuser/wcmatch/issues/171 Updated package which now skip the failed result of test run. Spec URL: https://pnemade.fedorapeople.org/fedora-work/SPECS/python-wcmatch.spec SRPM URL: https://pnemade.fedorapeople.org/fedora-work/SRPMS/python-wcmatch-8.1.2-1.fc34.src.rpm Quick comment related to the failing test: Upstream uses pytest so you can use %pytest macro to run tests and then you should not ignore the results of the tests by ` ||:` - better would be to skip just the one failing test. See https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_macros But feel free to wait for a more complete review and fix all possible issues at once. As Lumir mentioned above, %check should not ignore all test results. No other issues were found. Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable ===== 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. [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 [-]: 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. [x]: 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 10240 bytes in 1 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. [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 does not own files or directories owned by other packages. [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. [x]: Latest version is packaged. [x]: Package does not include license text files separate from upstream. [-]: 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. [x]: Package should compile and build into binary rpms on all supported architectures. [!]: %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: Rpmlint complains only about the names of packages - ignoring. [x]: Spec file according to URL is the same as in SRPM. Requires -------- python3-wcmatch (rpmlib, GLIBC filtered): python(abi) python3.9dist(bracex) python3dist(bracex) Provides -------- python3-wcmatch: python-wcmatch python3-wcmatch python3.9-wcmatch python3.9dist(wcmatch) python3dist(wcmatch) Updated to only skip failing test Spec URL: https://pnemade.fedorapeople.org/fedora-work/SPECS/python-wcmatch.spec SRPM URL: https://pnemade.fedorapeople.org/fedora-work/SRPMS/python-wcmatch-8.1.2-2.fc34.src.rpm The package can be approved. Suggestions: 1) Explicit Requires is not necessary, it is generated automatically. You can remove the line: Requires: python3dist(bracex) >= 2.1.1 2) You can use %pytest macro (replace "%python3 -m pytest") It is maintained and ensures that future updates will work as expected. It also provides some additional features, eg. tests everything that is installed, while direct call tests current working directory. 3) It is better to skip the one failing test instead of the whole test file. Current results of check: ======================= 859 passed, 64 skipped in 2.77s ======================== If used command: %pytest -vv -k "not test_tilde_user" =============== 1141 passed, 148 skipped, 1 deselected in 2.65s ================ > The package can be approved.
I'm doing that on behalf of Karolina.
I agree with all the 3 suggestions, but there are not blockers.
Thank you all for your suggestions and approving this package. Spec URL: https://pnemade.fedorapeople.org/fedora-work/SPECS/python-wcmatch.spec SRPM URL: https://pnemade.fedorapeople.org/fedora-work/SRPMS/python-wcmatch-8.1.2-3.fc34.src.rpm (In reply to Karolina Surma from comment #10) > 1) Explicit Requires is not necessary, it is generated automatically. You > can remove the line: > Requires: python3dist(bracex) >= 2.1.1 This one is still there ^ The other 2 suggestions have been fixed: > 2) You can use %pytest macro (replace "%python3 -m pytest") > ... > > 3) It is better to skip the one failing test instead of the whole test file. > ... I think I have fixed that as well. I can see SPEC is already fixed. I also downloaded SRPM, extracted still no "2.1.1" in spec file. Can you please check again? Oh. I haven't noticed this at first, but it appears that you have changed: Requires: python3dist(bracex) >= 2.1.1 To: Requires: python3dist(bracex) But the suggestion was to *remove* the line entirely. The upstream metadata already generate the requirement instead. ah sorry. Missed that. Corrected in same release. Spec URL: https://pnemade.fedorapeople.org/fedora-work/SPECS/python-wcmatch.spec SRPM URL: https://pnemade.fedorapeople.org/fedora-work/SRPMS/python-wcmatch-8.1.2-3.fc34.src.rpm (fedscm-admin): The Pagure repository was created at https://src.fedoraproject.org/rpms/python-wcmatch |