Bug 1701070 - Review Request: ibsim - InfiniBand fabric simulator for management
Summary: Review Request: ibsim - InfiniBand fabric simulator for management
Keywords:
Status: CLOSED NEXTRELEASE
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-04-17 23:45 UTC by Honggang LI
Modified: 2019-04-22 23:18 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-04-22 23:17:25 UTC
Type: ---
Embargoed:
eclipseo: fedora-review+


Attachments (Terms of Use)

Description Honggang LI 2019-04-17 23:45:20 UTC
Spec URL: http://people.redhat.com/honli/ibsim/ibsim.spec
SRPM URL: http://people.redhat.com/honli/ibsim/ibsim-0.8-1.fc31.src.rpm
Description: ibsim provides simulation of infiniband fabric for using with
OFA OpenSM, diagnostic and management tools.
Fedora Account System Username: honli

Comment 1 Robert-André Mauchin 🐧 2019-04-21 06:36:02 UTC
 - You include patches but they are not applied

 %setup -q → %autosetup -p1 will apply them


 - %build
export CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}"
export LDFLAGS="${LDFLAGS:-${RPM_OPT_FLAGS}}"

  Use %set_build_flags instead

 - make %{?_smp_mflags} → %make_build

 - make DESTDIR=${RPM_BUILD_ROOT} prefix=%_prefix libpath=%_libdir binpath=%_bindir install

→

 %make install prefix=%{_prefix} libpath=%{_libdir} binpath=%{_bindir}

 - Add your own %changelog entry

%changelog
* Sun Apr 21 2019 Honggang LI <honli> - 0.8-1
- Initial package

 - Use macros here:

Source: https://github.com/linux-rdma/ibsim/releases/download/%{version}/%{name}-%{version}.tar.gz

 - Please include comments above each of the patch to explain why they are needed.



It seems there is a problem in Rawhide with a dependency:

DEBUG util.py:556:  Last metadata expiration check: 0:00:02 ago on Sun Apr 21 08:26:35 2019.
DEBUG util.py:554:  BUILDSTDERR: Error: 
DEBUG util.py:554:  BUILDSTDERR:  Problem: package infiniband-diags-devel-2.1.0-2.fc30.x86_64 requires libibmad.so.5()(64bit), but none of the providers can be installed
DEBUG util.py:554:  BUILDSTDERR:   - package infiniband-diags-devel-2.1.0-2.fc30.x86_64 requires libibnetdisc.so.5()(64bit), but none of the providers can be installed
DEBUG util.py:554:  BUILDSTDERR:   - package infiniband-diags-devel-2.1.0-2.fc30.x86_64 requires infiniband-diags(x86-64) = 2.1.0-2.fc30, but none of the providers can be installed
DEBUG util.py:554:  BUILDSTDERR:   - conflicting requests
DEBUG util.py:554:  BUILDSTDERR:   - nothing provides libosmcomp.so.4()(64bit) needed by infiniband-diags-2.1.0-2.fc30.x86_64
DEBUG util.py:554:  BUILDSTDERR:   - nothing provides libosmcomp.so.4(OSMCOMP_2.3)(64bit) needed by infiniband-diags-2.1.0-2.fc30.x86_64



It seems *you* did an oopsie here: you updated https://src.fedoraproject.org/rpms/opensm to 3.3.22 and that include a soname bump from 4 to 5, which you should have announced to the devel mailing list, and rebuild all the dependant packages, including infiniband-diags.

To avoid such situation we now forbid globbing the major soname version in libraries:

%files libs
%{_libdir}/lib*.so.* ← forbidden now

Comment 2 Robert-André Mauchin 🐧 2019-04-21 06:40:19 UTC
You need to rebuild the following packages:

ibutils-0:1.5.7-29.fc30.x86_64
ibutils-libs-0:1.5.7-29.fc30.x86_64
infiniband-diags-0:2.1.0-2.fc30.x86_64
libnodeupdown-backend-openib-0:1.14-21.fc27.x86_64
openmpi-0:3.1.3-4.fc31.x86_64
opensm-0:3.3.22-1.fc31.x86_64
opensm-devel-0:3.3.22-1.fc31.x86_64

Comment 3 Honggang LI 2019-04-22 04:22:54 UTC
(In reply to Robert-André Mauchin from comment #1)
>  - You include patches but they are not applied

0001-umad2sim-Do-not-use-umad.h-deprecated-functions.patch
0002-run_opensm.sh-remove-opensm-c-option.patch

Patch #0001 applied in upstream repo. It was generated from upstream repo.
Patch #0002 is under reviewing, see https://patchwork.kernel.org/patch/10746335/

#0002 is necessary, because opensm will exit after dump the default configuration.
After remove the '-c' parameter, you can run opensm with ibsim without any extra parameters.

>  %setup -q → %autosetup -p1 will apply them

Yes, applied.

-%setup -q
+%autosetup -v -p1

> 
>  - %build
> export CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}"
> export LDFLAGS="${LDFLAGS:-${RPM_OPT_FLAGS}}"
> 
>   Use %set_build_flags instead
> 
>  - make %{?_smp_mflags} → %make_build

Yes, applied.

 %build
-export CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}"
-export LDFLAGS="${LDFLAGS:-${RPM_OPT_FLAGS}}"
-make %{?_smp_mflags}
+%set_build_flags
+%make_build

>  - make DESTDIR=${RPM_BUILD_ROOT} prefix=%_prefix libpath=%_libdir
> binpath=%_bindir install
> 
> →
> 
>  %make install prefix=%{_prefix} libpath=%{_libdir} binpath=%{_bindir}

No, because rpm building failed with this change.

>  - Add your own %changelog entry
> 
> %changelog
> * Sun Apr 21 2019 Honggang LI <honli> - 0.8-1
> - Initial package

I see, but I want to add such %changelog entry in last minute. I will add that when
this package get fedora review approve.

>  - Use macros here:
> 
> Source:
> https://github.com/linux-rdma/ibsim/releases/download/%{version}/%{name}-
> %{version}.tar.gz

Well, I see. But the problem is that. Not all tarball released in github has
consistent URL format. Let's take ibsim as an example:
https://github.com/linux-rdma/ibsim/archive/ibsim-0.6.tar.gz
https://github.com/linux-rdma/ibsim/archive/ibsim-0.7.tar.gz
https://github.com/linux-rdma/ibsim/releases/download/0.8/ibsim-0.8.tar.gz

As you see, URL format changed.

I noticed a few packages have outdated SOURCE tag, because the URL format changed.
That is why I use the hardcoded URL for ibsim.

Anyway, I can change the URL, if you want.


>  - Please include comments above each of the patch to explain why they are
> needed.

Please see previous comment.

> 
> 
> 
> It seems there is a problem in Rawhide with a dependency:
> 
> DEBUG util.py:556:  Last metadata expiration check: 0:00:02 ago on Sun Apr
> 21 08:26:35 2019.
> DEBUG util.py:554:  BUILDSTDERR: Error: 
> DEBUG util.py:554:  BUILDSTDERR:  Problem: package
> infiniband-diags-devel-2.1.0-2.fc30.x86_64 requires libibmad.so.5()(64bit),
> but none of the providers can be installed
> DEBUG util.py:554:  BUILDSTDERR:   - package
> infiniband-diags-devel-2.1.0-2.fc30.x86_64 requires
> libibnetdisc.so.5()(64bit), but none of the providers can be installed
> DEBUG util.py:554:  BUILDSTDERR:   - package
> infiniband-diags-devel-2.1.0-2.fc30.x86_64 requires infiniband-diags(x86-64)
> = 2.1.0-2.fc30, but none of the providers can be installed
> DEBUG util.py:554:  BUILDSTDERR:   - conflicting requests
> DEBUG util.py:554:  BUILDSTDERR:   - nothing provides
> libosmcomp.so.4()(64bit) needed by infiniband-diags-2.1.0-2.fc30.x86_64
> DEBUG util.py:554:  BUILDSTDERR:   - nothing provides
> libosmcomp.so.4(OSMCOMP_2.3)(64bit) needed by
> infiniband-diags-2.1.0-2.fc30.x86_64
> 
> 
> 
> It seems *you* did an oopsie here: you updated
> https://src.fedoraproject.org/rpms/opensm to 3.3.22 and that include a
> soname bump from 4 to 5, which you should have announced to the devel
> mailing list, and rebuild all the dependant packages, including
> infiniband-diags.

Well, I sent a notice to the devel mailing list. I also rebuilt infiniband-diags-2.1.0-3.fc31
against the latest opensm-3.3.22 for rawhide. But it seems need sometime for infiniband-diags-2.1.0-3.fc31
to get in fedora rawhide repo.

I uploaded updated spec and srpm to the http server:
Spec URL: http://people.redhat.com/honli/ibsim/ibsim.spec
SRPM URL: http://people.redhat.com/honli/ibsim/ibsim-0.8-1.fc31.src.rpm

> To avoid such situation we now forbid globbing the major soname version in
> libraries:
> 
> %files libs
> %{_libdir}/lib*.so.* ← forbidden now

thanks

Comment 4 Honggang LI 2019-04-22 04:25:45 UTC
(In reply to Robert-André Mauchin from comment #2)
> You need to rebuild the following packages:
> 
> ibutils-0:1.5.7-29.fc30.x86_64
> ibutils-libs-0:1.5.7-29.fc30.x86_64
> libnodeupdown-backend-openib-0:1.14-21.fc27.x86_64
> openmpi-0:3.1.3-4.fc31.x86_64

Sent notice to devel mailing list, waiting for the maintainers to rebuild them.

> infiniband-diags-0:2.1.0-2.fc30.x86_64
infiniband-diags rebuilt. Done.

> opensm-0:3.3.22-1.fc31.x86_64
> opensm-devel-0:3.3.22-1.fc31.x86_64
No needed, as those packages are sub-packages for opensm itself.

thanks

Comment 5 Robert-André Mauchin 🐧 2019-04-22 12:18:59 UTC
 - Should work

https://github.com/linux-rdma/ibsim/archive/%{version}/%{name}-%{version}.tar.gz


 - Should work too, it is strictly equivalent to the one you were using:

%make_install prefix=%{_prefix} libpath=%{_libdir} binpath=%{_bindir}

(I forgot a _ previously)


(In reply to Honggang LI from comment #3)
> (In reply to Robert-André Mauchin from comment #1)
> >  - You include patches but they are not applied
> 
> 0001-umad2sim-Do-not-use-umad.h-deprecated-functions.patch
> 0002-run_opensm.sh-remove-opensm-c-option.patch
> 
> Patch #0001 applied in upstream repo. It was generated from upstream repo.
> Patch #0002 is under reviewing, see
> https://patchwork.kernel.org/patch/10746335/
> 
> #0002 is necessary, because opensm will exit after dump the default
> configuration.
> After remove the '-c' parameter, you can run opensm with ibsim without any
> extra parameters.

> 
Add these comments to the SPEC itself, a third party needs to be able to understand what are these for, also if they are upstreamed.


Package approved. Please fix the aforementioned issue before import.




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]: Development (unversioned) .so files in -devel subpackage, if present.
     Note: Unversioned so-files in private %_libdir subdirectory (see
     attachment). Verify they are not in ld path.
[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]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

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", "GNU General Public License (v2)", "GPL
     (v2 or later)". 18 files have unknown license. Detailed output of
     licensecheck in /home/bob/packaging/review/ibsim/review-
     ibsim/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[x]: 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.
[-]: 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]: Useful -debuginfo package or justification otherwise.
[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 20480 bytes in 9 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

===== 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).
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[!]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[-]: 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]: Fully versioned dependency in subpackages if applicable.
[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 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: ibsim-0.8-1.fc31.x86_64.rpm
          ibsim-debuginfo-0.8-1.fc31.x86_64.rpm
          ibsim-debugsource-0.8-1.fc31.x86_64.rpm
          ibsim-0.8-1.fc31.src.rpm
ibsim.x86_64: W: spelling-error %description -l en_US infiniband -> infinitude
ibsim.x86_64: W: no-manual-page-for-binary ibsim
ibsim.src: W: spelling-error %description -l en_US infiniband -> infinitude
4 packages and 0 specfiles checked; 0 errors, 3 warnings.

Comment 6 Honggang LI 2019-04-22 13:54:26 UTC
(In reply to Robert-André Mauchin from comment #5)
>  - Should work
> 
> https://github.com/linux-rdma/ibsim/archive/%{version}/%{name}-%{version}.
> tar.gz
> 

Done.

> 
>  - Should work too, it is strictly equivalent to the one you were using:
> 
> %make_install prefix=%{_prefix} libpath=%{_libdir} binpath=%{_bindir}
> 
> (I forgot a _ previously)

Confirmed this works. Done.

> 
> (In reply to Honggang LI from comment #3)
> > (In reply to Robert-André Mauchin from comment #1)
> > >  - You include patches but they are not applied
> > 
> > 0001-umad2sim-Do-not-use-umad.h-deprecated-functions.patch
> > 0002-run_opensm.sh-remove-opensm-c-option.patch
> > 
> > Patch #0001 applied in upstream repo. It was generated from upstream repo.
> > Patch #0002 is under reviewing, see
> > https://patchwork.kernel.org/patch/10746335/
> > 
> > #0002 is necessary, because opensm will exit after dump the default
> > configuration.
> > After remove the '-c' parameter, you can run opensm with ibsim without any
> > extra parameters.
> 
> > 
> Add these comments to the SPEC itself, a third party needs to be able to
> understand what are these for, also if they are upstreamed.

Done.

> Package approved. Please fix the aforementioned issue before import.

diff  -Nurp ibsim.spec.v2 ibsim.spec
--- ibsim.spec.v2       2019-04-22 09:07:32.048976920 -0400
+++ ibsim.spec  2019-04-22 09:24:02.245335766 -0400
@@ -3,8 +3,10 @@ Name: ibsim
 Version: 0.8
 Release: 1%{?dist}
 License: GPLv2 or BSD
-Source: https://github.com/linux-rdma/ibsim/releases/download/0.8/ibsim-0.8.tar.gz
+Source: https://github.com/linux-rdma/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz
+# Patch #0001 applied in upstream repo. It was generated from upstream repo.
 Patch1: 0001-umad2sim-Do-not-use-umad.h-deprecated-functions.patch
+# Patch #0002 is under reviewing. https://patchwork.kernel.org/patch/10746335/
 Patch2: 0002-run_opensm.sh-remove-opensm-c-option.patch
 
 Url: https://github.com/linux-rdma/ibsim
@@ -22,7 +24,7 @@ OFA OpenSM, diagnostic and management to
 %make_build
 
 %install
-make DESTDIR=${RPM_BUILD_ROOT} prefix=%_prefix libpath=%_libdir binpath=%_bindir install
+%make_install prefix=%{_prefix} libpath=%{_libdir} binpath=%{_bindir}
 
 %files
 %{_libdir}/umad2sim/
@@ -31,3 +33,5 @@ make DESTDIR=${RPM_BUILD_ROOT} prefix=%_
 %license COPYING
 
 %changelog
+* Mon Apr 22 2019 Honggang Li <honli> - 0.8-1
+- Import ibsim for fedora


I uploaded updated spec and srpm to the http server:
Spec URL: http://people.redhat.com/honli/ibsim/ibsim.spec
SRPM URL: http://people.redhat.com/honli/ibsim/ibsim-0.8-1.fc31.src.rpm

I will request a git repository for ibsim.

Thanks

Comment 7 Honggang LI 2019-04-22 14:06:03 UTC
https://pagure.io/releng/fedora-scm-requests/issue/11166

opened this ticket to request a git repository for ibsim.

Comment 8 Gwyn Ciesla 2019-04-22 14:33:54 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/ibsim

Comment 9 Honggang LI 2019-04-22 23:17:25 UTC
build ibsim-0.8-1.fc31 is completed.

https://koji.fedoraproject.org/koji/buildinfo?buildID=1253257


Added the project ibsim to anitya: https://release-monitoring.org/project/20204/


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