Bug 1712980 - Review Request: libslirp - A general purpose TCP-IP emulator
Summary: Review Request: libslirp - A general purpose TCP-IP emulator
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Elliott Sales de Andrade
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-22 15:41 UTC by Marc-Andre Lureau
Modified: 2019-06-21 00:52 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-06-06 01:06:19 UTC
Type: ---
Embargoed:
quantum.analyst: fedora-review+


Attachments (Terms of Use)

Description Marc-Andre Lureau 2019-05-22 15:41:48 UTC
Spec URL: https://elmarco.fedorapeople.org/libslirp.spec
SRPM URL: https://elmarco.fedorapeople.org/libslirp-4.0.0-1.fc30.src.rpm
Description: 

A general purpose TCP-IP emulator used by virtual machine hypervisors to provide virtual networking services.

Fedora Account System Username: elmarco

Comment 1 Petr Pisar 2019-05-23 09:15:48 UTC
Just a quick glance at the spec file:

Could you replace libslirp with %{name} in the URL tag? The same as you do in Source0?
Since URL is a prefix of Source0 you can shorted Source0 with %{url} macro.
The %files section uses globs for listing dynamic libraries. It is recommend to write down a soname explicitly <https://docs.fedoraproject.org/en-US/packaging-guidelines/#_listing_shared_library_files>. Please do so.
The %ldconfig_scriptlets is not needed anymore.

Comment 2 Marc-Andre Lureau 2019-05-23 12:28:49 UTC
(In reply to Petr Pisar from comment #1)
> Just a quick glance at the spec file:
> 
> Could you replace libslirp with %{name} in the URL tag? The same as you do
> in Source0?
> Since URL is a prefix of Source0 you can shorted Source0 with %{url} macro.
> The %files section uses globs for listing dynamic libraries. It is recommend
> to write down a soname explicitly
> <https://docs.fedoraproject.org/en-US/packaging-guidelines/
> #_listing_shared_library_files>. Please do so.
> The %ldconfig_scriptlets is not needed anymore.

thanks, done

Comment 3 Elliott Sales de Andrade 2019-05-25 09:24:12 UTC
- As noted, you should specify an explicit soversion in %files.
- For a multi-license package, the breakdown should be specified in a comment
  in the spec.
- You don't need Requires on pkgconfig or glib-devel as they are automatically
  added by the .pc file.
- Are there any tests that could be run in %check?


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

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



===== MUST items =====

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[x]: If your application is a C or C++ application you must list a
     BuildRequires against gcc, gcc-c++ or clang.
[x]: Header files in -devel subpackage, if present.
[x]: ldconfig not called in %post and %postun for Fedora 28 and later.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.
[x]: Development (unversioned) .so files in -devel subpackage, if present.

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", "BSD 3-clause "New" or "Revised"
     License", "*No copyright* BSD 3-clause "New" or "Revised" License",
     "Expat License". 30 files have unknown license. Detailed output of
     licensecheck in 1712980-libslirp/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[!]: If the package is under multiple licenses, the licensing breakdown
     must be documented in the spec.
[x]: %build honors applicable compiler flags or justifies otherwise.
[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.
[x]: 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.
[?]: 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.
[!]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[x]: 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.
     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 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

===== 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.
[!]: Final provides and requires are sane (see attachments).
[x]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in libslirp
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: 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.
[!]: %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]: The placement of pkgconfig(.pc) files are correct.
[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 debuginfo package(s).
     Note: No rpmlint messages.
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: libslirp-4.0.0-1.fc31.x86_64.rpm
          libslirp-devel-4.0.0-1.fc31.x86_64.rpm
          libslirp-debuginfo-4.0.0-1.fc31.x86_64.rpm
          libslirp-debugsource-4.0.0-1.fc31.x86_64.rpm
          libslirp-4.0.0-1.fc31.src.rpm
libslirp.x86_64: W: spelling-error %description -l en_US hypervisors -> hyper visors, hyper-visors, supervisors
libslirp-devel.x86_64: W: no-documentation
libslirp.src: W: spelling-error %description -l en_US hypervisors -> hyper visors, hyper-visors, supervisors
5 packages and 0 specfiles checked; 0 errors, 3 warnings.




Rpmlint (debuginfo)
-------------------
Checking: libslirp-debuginfo-4.0.0-1.fc31.x86_64.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.





Rpmlint (installed packages)
----------------------------
libslirp.x86_64: W: spelling-error %description -l en_US hypervisors -> hyper visors, hyper-visors, supervisors
libslirp.x86_64: W: invalid-url URL: https://gitlab.freedesktop.org/slirp/libslirp <urlopen error [Errno -2] Name or service not known>
libslirp-devel.x86_64: W: invalid-url URL: https://gitlab.freedesktop.org/slirp/libslirp <urlopen error [Errno -2] Name or service not known>
libslirp-devel.x86_64: W: no-documentation
libslirp-debugsource.x86_64: W: invalid-url URL: https://gitlab.freedesktop.org/slirp/libslirp <urlopen error [Errno -2] Name or service not known>
libslirp-debuginfo.x86_64: W: invalid-url URL: https://gitlab.freedesktop.org/slirp/libslirp <urlopen error [Errno -2] Name or service not known>
4 packages and 0 specfiles checked; 0 errors, 6 warnings.



Source checksums
----------------
https://gitlab.freedesktop.org/slirp/libslirp/-/archive/v4.0.0/libslirp-v4.0.0.tar.gz :
  CHECKSUM(SHA256) this package     : 25c5f60ecd1e4fd34c7558f11511c46d7662cf88143b69aa8c7260aec7c0c621
  CHECKSUM(SHA256) upstream package : 25c5f60ecd1e4fd34c7558f11511c46d7662cf88143b69aa8c7260aec7c0c621


Requires
--------
libslirp (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    libglib-2.0.so.0()(64bit)
    rtld(GNU_HASH)

libslirp-devel (rpmlib, GLIBC filtered):
    /usr/bin/pkg-config
    glib2-devel
    libslirp(x86-64)
    libslirp.so.0()(64bit)
    pkgconfig
    pkgconfig(glib-2.0)

libslirp-debuginfo (rpmlib, GLIBC filtered):

libslirp-debugsource (rpmlib, GLIBC filtered):



Provides
--------
libslirp:
    libslirp
    libslirp(x86-64)
    libslirp.so.0()(64bit)
    libslirp.so.0(SLIRP_4.0)(64bit)

libslirp-devel:
    libslirp-devel
    libslirp-devel(x86-64)
    pkgconfig(slirp)

libslirp-debuginfo:
    debuginfo(build-id)
    libslirp-debuginfo
    libslirp-debuginfo(x86-64)

libslirp-debugsource:
    libslirp-debugsource
    libslirp-debugsource(x86-64)



Generated by fedora-review 0.7.2 (65d36bb) last change: 2019-04-09
Command line :/usr/bin/fedora-review -b 1712980 -m fedora-rawhide-x86_64
Buildroot used: fedora-rawhide-x86_64
Active plugins: C/C++, Shell-api, Generic
Disabled plugins: Perl, Java, PHP, fonts, Ocaml, R, Haskell, SugarActivity, Python
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 4 Marc-Andre Lureau 2019-05-25 10:01:33 UTC
(In reply to Elliott Sales de Andrade from comment #3)
> - As noted, you should specify an explicit soversion in %files.

changed to
%{_libdir}/%{name}.so.0*

> - For a multi-license package, the breakdown should be specified in a comment
>   in the spec.

Like many other projects, libslirp has a main license, BSD-3. But MIT is quite prominent too. If you look into details, you have to go in the source code. I added SPDX tags on each files. How would you break things down in the spec?

> - You don't need Requires on pkgconfig or glib-devel as they are
> automatically
>   added by the .pc file.

What magic does that? any pointer to doc?

> - Are there any tests that could be run in %check?

Sadly, not at this point.

thanks for the review and your help!

Comment 5 Elliott Sales de Andrade 2019-05-27 04:30:42 UTC
(In reply to Marc-Andre Lureau from comment #4)
> (In reply to Elliott Sales de Andrade from comment #3)
> > - As noted, you should specify an explicit soversion in %files.
> 
> changed to
> %{_libdir}/%{name}.so.0*
> 
> > - For a multi-license package, the breakdown should be specified in a comment
> >   in the spec.
> 
> Like many other projects, libslirp has a main license, BSD-3. But MIT is
> quite prominent too. If you look into details, you have to go in the source
> code. I added SPDX tags on each files. How would you break things down in
> the spec?
>

Just add a comment saying to look at the SPDX tags; no need to overcomplicate things then.

(In reply to Marc-Andre Lureau from comment #4)
> (In reply to Elliott Sales de Andrade from comment #3)
> > - You don't need Requires on pkgconfig or glib-devel as they are
> > automatically
> >   added by the .pc file.
> 
> What magic does that? any pointer to doc?
>

https://docs.fedoraproject.org/en-US/packaging-guidelines/#_package_dependencies

> RPM can automatically determine dependencies for most compiled libraries and for some scripting languages such as Perl. Automatically determined dependencies MUST NOT be duplicated by manual dependencies.

You can check these with rpm -q --provides -p libslirp-4.0.0-1.fc31.x86_64.rpm

Comment 6 Marc-Andre Lureau 2019-05-27 11:04:44 UTC
(In reply to Elliott Sales de Andrade from comment #5)
> (In reply to Marc-Andre Lureau from comment #4)
> > (In reply to Elliott Sales de Andrade from comment #3)
> > > - As noted, you should specify an explicit soversion in %files.
> > 
> > changed to
> > %{_libdir}/%{name}.so.0*
> > 
> > > - For a multi-license package, the breakdown should be specified in a comment
> > >   in the spec.
> > 
> > Like many other projects, libslirp has a main license, BSD-3. But MIT is
> > quite prominent too. If you look into details, you have to go in the source
> > code. I added SPDX tags on each files. How would you break things down in
> > the spec?
> >
> 
> Just add a comment saying to look at the SPDX tags; no need to
> overcomplicate things then.

ok

> 
> (In reply to Marc-Andre Lureau from comment #4)
> > (In reply to Elliott Sales de Andrade from comment #3)
> > > - You don't need Requires on pkgconfig or glib-devel as they are
> > > automatically
> > >   added by the .pc file.
> > 
> > What magic does that? any pointer to doc?
> >
> 
> https://docs.fedoraproject.org/en-US/packaging-guidelines/
> #_package_dependencies
> 
> > RPM can automatically determine dependencies for most compiled libraries and for some scripting languages such as Perl. Automatically determined dependencies MUST NOT be duplicated by manual dependencies.
> 
> You can check these with rpm -q --provides -p
> libslirp-4.0.0-1.fc31.x86_64.rpm

I knew it was able to do that for shared libraries (and I didn't add requires for libslirp manually), I didn't know it was able to do it from .pc files as well for libslirp-devel. Removed requires lines. thanks!

Comment 7 Elliott Sales de Andrade 2019-05-27 19:39:47 UTC
OK LGTM.

Comment 8 Gwyn Ciesla 2019-05-27 20:01:44 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/libslirp

Comment 9 Marc-Andre Lureau 2019-05-27 20:06:36 UTC
thanks, closing

Comment 10 Petr Pisar 2019-05-28 06:01:38 UTC
You also have to build it for all newer Fedoras. That means for Fedora 31.
Also it would be great to register this packages into <https://release-monitoring.org/> so that you get a notification about a new release when it's available.

Comment 11 Petr Pisar 2019-05-28 06:04:54 UTC
And building the package for Fedora 30 does not make the build available to users. You also need to submit the build into an update system <https://bodhi.fedoraproject.org/updates/> where it undergoes a testing period and then it's pushed into updates repository.

Comment 12 Fedora Update System 2019-05-28 11:03:15 UTC
libslirp-4.0.0-1.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-1219fa01e8

Comment 13 Fedora Update System 2019-05-29 01:35:47 UTC
libslirp-4.0.0-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-1219fa01e8

Comment 14 Fedora Update System 2019-06-06 01:06:19 UTC
libslirp-4.0.0-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Cole Robinson 2019-06-21 00:19:48 UTC
Fixed in qemu-4.0.0-4.fc31

Comment 16 Cole Robinson 2019-06-21 00:52:44 UTC
Fixed in qemu-4.0.0-4.fc31


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