Bug 1756331 - Review Request: tmt - Test Metadata Tool
Summary: Review Request: tmt - Test Metadata Tool
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Robert-André Mauchin 🐧
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-27 12:16 UTC by Petr Šplíchal
Modified: 2019-09-30 15:32 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-09-30 15:32:13 UTC
Type: ---
Embargoed:
eclipseo: fedora-review+


Attachments (Terms of Use)

Description Petr Šplíchal 2019-09-27 12:16:01 UTC
Spec URL: https://raw.githubusercontent.com/psss/tmt/master/tmt.spec
SRPM URL: https://github.com/psss/tmt/releases/download/0.1/tmt-0.1-1.fc29.src.rpm
Description: Test Metadata Tool
Fedora Account System Username: psss

Comment 1 Robert-André Mauchin 🐧 2019-09-27 15:41:56 UTC
 - Remove hidden files in %prep:

tmt.noarch: W: hidden-file-or-dir /usr/share/doc/tmt/examples/convert/.fmf
tmt.noarch: W: hidden-file-or-dir /usr/share/doc/tmt/examples/convert/.fmf
tmt.noarch: W: hidden-file-or-dir /usr/share/doc/tmt/examples/httpd/.fmf
tmt.noarch: W: hidden-file-or-dir /usr/share/doc/tmt/examples/httpd/.fmf
tmt.noarch: W: hidden-file-or-dir /usr/share/doc/tmt/examples/mini/.fmf
tmt.noarch: W: hidden-file-or-dir /usr/share/doc/tmt/examples/mini/.fmf
tmt.noarch: W: hidden-file-or-dir /usr/share/doc/tmt/examples/systemd/.fmf
tmt.noarch: W: hidden-file-or-dir /usr/share/doc/tmt/examples/systemd/.fmf


Package approved, please fix the aforementioned issue before import.


Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed



===== 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: "Expat License", "Unknown or generated". 26 files have unknown
     license. Detailed output of licensecheck in
     /home/bob/packaging/review/tmt/review-tmt/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[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.
[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 30720 bytes in 12 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 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 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]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     python3-tmt
[?]: 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.
[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: tmt-0.1-1.fc32.noarch.rpm
          python3-tmt-0.1-1.fc32.noarch.rpm
          tmt-0.1-1.fc32.src.rpm
tmt.noarch: W: hidden-file-or-dir /usr/share/doc/tmt/examples/convert/.fmf
tmt.noarch: W: hidden-file-or-dir /usr/share/doc/tmt/examples/convert/.fmf
tmt.noarch: W: hidden-file-or-dir /usr/share/doc/tmt/examples/httpd/.fmf
tmt.noarch: W: hidden-file-or-dir /usr/share/doc/tmt/examples/httpd/.fmf
tmt.noarch: W: hidden-file-or-dir /usr/share/doc/tmt/examples/mini/.fmf
tmt.noarch: W: hidden-file-or-dir /usr/share/doc/tmt/examples/mini/.fmf
tmt.noarch: W: hidden-file-or-dir /usr/share/doc/tmt/examples/systemd/.fmf
tmt.noarch: W: hidden-file-or-dir /usr/share/doc/tmt/examples/systemd/.fmf
python3-tmt.noarch: W: no-documentation

Comment 2 Miro Hrončok 2019-09-27 19:40:23 UTC
I'm surprised by the complexity of the %bcond options.

What's the point of the Python 2 subpackage on Fedora 29?

What's the point of using %{python3_pkgversion} if your are not shipping Python 3 subpackage in EL < 8?

Comment 3 Petr Šplíchal 2019-09-30 06:09:31 UTC
(In reply to Robert-André Mauchin from comment #1)
>  - Remove hidden files in %prep:
> 
> tmt.noarch: W: hidden-file-or-dir /usr/share/doc/tmt/examples/convert/.fmf
> tmt.noarch: W: hidden-file-or-dir /usr/share/doc/tmt/examples/convert/.fmf
> tmt.noarch: W: hidden-file-or-dir /usr/share/doc/tmt/examples/httpd/.fmf
> tmt.noarch: W: hidden-file-or-dir /usr/share/doc/tmt/examples/httpd/.fmf
> tmt.noarch: W: hidden-file-or-dir /usr/share/doc/tmt/examples/mini/.fmf
> tmt.noarch: W: hidden-file-or-dir /usr/share/doc/tmt/examples/mini/.fmf
> tmt.noarch: W: hidden-file-or-dir /usr/share/doc/tmt/examples/systemd/.fmf
> tmt.noarch: W: hidden-file-or-dir /usr/share/doc/tmt/examples/systemd/.fmf

Thanks for the quick review, Robert-André. Regarding the hidden
files mentioned above: They are necessary for the examples to
work. The special ".fmf" directory is used to identify the root
of the metadata tree (similarly as ".git" does for repositories):

    https://fmf.readthedocs.io/en/latest/concept.html#tree

So they need to be included in the package as well.

Comment 4 Petr Šplíchal 2019-09-30 06:33:04 UTC
(In reply to Miro Hrončok from comment #2)
> I'm surprised by the complexity of the %bcond options.
>
> What's the point of the Python 2 subpackage on Fedora 29?

Unfortunately we still have a couple of tools in process of
migration to Python 3 so the Python 2 subpackage is necessary.
Hopefully soon we'll have everything Python 3 only and the spec
file will become much more simple.

> What's the point of using %{python3_pkgversion} if your are not
> shipping Python 3 subpackage in EL < 8?

Well, this spec is basically an updated copy of the spec we've put
together for fmf:

    https://github.com/psss/fmf/commit/2d35fe5

So the %{python3_pkgversion} is not needed any more? If you see
anything which can be simplified I'm definitely open to make it
more readable.

Comment 5 Miro Hrončok 2019-09-30 07:40:50 UTC
(In reply to Petr Šplíchal from comment #4)
> (In reply to Miro Hrončok from comment #2)
> > I'm surprised by the complexity of the %bcond options.
> >
> > What's the point of the Python 2 subpackage on Fedora 29?
> 
> Unfortunately we still have a couple of tools in process of
> migration to Python 3 so the Python 2 subpackage is necessary.
> Hopefully soon we'll have everything Python 3 only and the spec
> file will become much more simple.

What tools? I don't understand why the Python 2 package is only needed in Fedora 29, but not Fedora 30.

> > What's the point of using %{python3_pkgversion} if your are not
> > shipping Python 3 subpackage in EL < 8?
> 
> So the %{python3_pkgversion} is not needed any more? If you see
> anything which can be simplified I'm definitely open to make it
> more readable.

%{python3_pkgversion} is only needed for Python 3 on EPEL 6 and 7. Clearly, the spec is designed to not build Python 3 on EPEL 6 and 7.
%{python3_pkgversion} is not needed in Fedora or EPEL 8.

Comment 6 Petr Šplíchal 2019-09-30 08:03:27 UTC
> > Unfortunately we still have a couple of tools in process of
> > migration to Python 3 so the Python 2 subpackage is necessary.
> > Hopefully soon we'll have everything Python 3 only and the spec
> > file will become much more simple.
>
> What tools? I don't understand why the Python 2 package is only
> needed in Fedora 29, but not Fedora 30.

python-nitrate is still on the way: BZ#1727936
But hopefully to migration will soon be finished.

> > So the %{python3_pkgversion} is not needed any more? If you see
> > anything which can be simplified I'm definitely open to make it
> > more readable.
>
> %{python3_pkgversion} is only needed for Python 3 on EPEL 6 and 7. Clearly,
> the spec is designed to not build Python 3 on EPEL 6 and 7.
> %{python3_pkgversion} is not needed in Fedora or EPEL 8.

I see, thanks for clarification.

Thinking about it a little bit more, we could probably just go
with Python 3. Only RHEL7 would be Python 2. What do you think?

Comment 7 Miro Hrončok 2019-09-30 08:23:26 UTC
(In reply to Petr Šplíchal from comment #6)
> Thinking about it a little bit more, we could probably just go
> with Python 3. Only RHEL7 would be Python 2. What do you think?

I recommend enabling python3 in fmf and switching to Python 3 only everywhere.


------


You might also want to see this:

/usr/lib/python3.8/site-packages/fmf/utils.py:205
  /usr/lib/python3.8/site-packages/fmf/utils.py:205: DeprecationWarning: invalid escape sequence \s
    for atom in re.split("\s*,\s*", value):

/usr/lib/python3.8/site-packages/fmf/utils.py:240
  /usr/lib/python3.8/site-packages/fmf/utils.py:240: DeprecationWarning: invalid escape sequence \s
    for literal in re.split("\s*&\s*", clause):

/usr/lib/python3.8/site-packages/fmf/utils.py:243
  /usr/lib/python3.8/site-packages/fmf/utils.py:243: DeprecationWarning: invalid escape sequence \s
    matched = re.match("^(.*)\s*:\s*(.*)$", literal)

/usr/lib/python3.8/site-packages/fmf/utils.py:283
  /usr/lib/python3.8/site-packages/fmf/utils.py:283: DeprecationWarning: invalid escape sequence \s
    for clause in re.split("\s*\|\s*", filter)])

tmt/convert.py:75
  /builddir/build/BUILD/tmt-0.1/tmt/convert.py:75: DeprecationWarning: invalid escape sequence \s
    'echo "Description:\s*(.*)"', content).group(1)

tmt/convert.py:79
  /builddir/build/BUILD/tmt-0.1/tmt/convert.py:79: DeprecationWarning: invalid escape sequence \s
    'echo "RunFor:\s*(.*)"', content).group(1)

tmt/convert.py:83
  /builddir/build/BUILD/tmt-0.1/tmt/convert.py:83: DeprecationWarning: invalid escape sequence \s
    'echo "TestTime:\s*(.*)"', content).group(1)

Comment 8 Petr Šplíchal 2019-09-30 13:33:13 UTC
Thanks for the feedback. I've updated the spec to build python3 packages only. Warnings have been fixed as well. Waiting for the repo and branches.

Comment 9 Gwyn Ciesla 2019-09-30 14:36:47 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/tmt

Comment 10 Petr Šplíchal 2019-09-30 15:32:13 UTC
Package has been built successfully, closing.
https://koji.fedoraproject.org/koji/buildinfo?buildID=1392637


Note You need to log in before you can comment on or make changes to this bug.