Bug 1246792 - Review Request: ndctl - Manage "libnvdimm" subsystem devices (Non-volatile Memory)
Summary: Review Request: ndctl - Manage "libnvdimm" subsystem devices (Non-volatile Me...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: David Woodhouse
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1271425
TreeView+ depends on / blocked
 
Reported: 2015-07-25 20:53 UTC by Dan Williams
Modified: 2016-04-13 18:17 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-04-08 02:31:28 UTC
Type: ---
Embargoed:
dwmw2: fedora-review+


Attachments (Terms of Use)
Updated ndctl.spec in response to comment4 (1.78 KB, text/x-matlab)
2015-08-03 15:55 UTC, Dan Williams
no flags Details
Updated ndctl.spec in response to comment7 (1.78 KB, text/x-matlab)
2015-08-03 16:17 UTC, Dan Williams
no flags Details
Updated ndctl.spec in response to comment10 (1.91 KB, text/x-matlab)
2015-08-03 16:55 UTC, Dan Williams
no flags Details
Updated ndctl.spec in response to comment13 (2.26 KB, text/x-matlab)
2015-09-10 23:14 UTC, Dan Williams
no flags Details
Updated ndctl.spec in response to comment 16 (2.35 KB, text/x-matlab)
2016-02-02 04:52 UTC, Dan Williams
no flags Details
Updated ndctl.spec in response to comment 16 (2.35 KB, text/x-matlab)
2016-02-02 05:00 UTC, Dan Williams
no flags Details
Updated ndctl.spec in response to comment 19 (2.23 KB, text/plain)
2016-02-09 22:51 UTC, Dan Williams
no flags Details

Description Dan Williams 2015-07-25 20:53:04 UTC
Spec URL: https://github.com/pmem/ndctl/releases/download/v41.git791e213c3173/ndctl.spec
SRPM URL: https://github.com/pmem/ndctl/releases/download/v41.git791e213c3173/ndctl-41-1.git791e213c3173.fc21.src.rpm
Description: Utility library for managing the "libnvdimm" subsystem.  The "libnvdimm" subsystem defines a kernel device model and control message interface for platform NVDIMM resources like those defined by the ACPI 6.0 NFIT (NVDIMM Firmware Interface Table).

Fedora Account System Username: djbw

Successful build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=10479814

First package submission, and seeking a sponsor.

Comment 1 Dan Williams 2015-07-25 20:58:33 UTC
This library compliments the NVDIMM enabling that was merged into the 4.2 kernel.
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=88793e5c774e

Comment 2 Eduardo Mayorga 2015-08-02 03:36:44 UTC
The links are dead.

Comment 3 Dan Williams 2015-08-03 14:51:51 UTC
(In reply to Eduardo Mayorga from comment #2)
> The links are dead.

https://github.com/pmem/ndctl/releases/download/v41.git27792e104878/ndctl.spec
https://github.com/pmem/ndctl/releases/download/v41.git27792e104878/ndctl-41-1.git27792e104878.fc21.src.rpm

Updated, apologies for the thrash.  Note that the Koji link is still live.

Comment 4 Igor Gnatenko 2015-08-03 14:57:48 UTC
I don't think that you need separate libs subpackage.

-> %{_includedir}/*
   Will own wrong directories (systemd, for example).
-> rm -rf $RPM_BUILD_ROOT
   Is not needed
-> %doc
   No docs
-> * Wed Aug 27 2014 Dan Williams
   Changelog isn't in needed format
-> ./autogen.sh
   Not sure, but probably you want to use "NOCONFIGURE=1 ./autogen.sh" to avoid configuring twice
-> %global __requires_exclude pkg-config
   nope, you don't co-own directory. You don't need to do this.

Comment 5 Dan Williams 2015-08-03 15:54:32 UTC
(In reply to Igor Gnatenko from comment #4)
> I don't think that you need separate libs subpackage.
> 
> -> %{_includedir}/*
>    Will own wrong directories (systemd, for example).

Changed to:
%{_includedir}/ndctl/*

> -> rm -rf $RPM_BUILD_ROOT
>    Is not needed

Deleted.

> -> %doc
>    No docs

Do I need to delete this until docs are ready, or can the spec have this as a placeholder until then?

> -> * Wed Aug 27 2014 Dan Williams
>    Changelog isn't in needed format

Deleted.

> -> ./autogen.sh
>    Not sure, but probably you want to use "NOCONFIGURE=1 ./autogen.sh" to
> avoid configuring twice

Verified that configure is called only once.

> -> %global __requires_exclude pkg-config
>    nope, you don't co-own directory. You don't need to do this.

Deleted.


...will attach updated .spec

Comment 6 Dan Williams 2015-08-03 15:55:41 UTC
Created attachment 1058794 [details]
Updated ndctl.spec in response to comment4

Comment 7 Igor Gnatenko 2015-08-03 15:58:16 UTC
-> %{_includedir}/ndctl/*
   %{_includedir}/ndctl/
-> %{_libdir}/*.so
   %{_libdir}/libndctl.so
-> %{_libdir}/*.so.*
   %{_libdir}/libndctl.so.*
-> %doc
   Still nothing in %doc.
-> No license in %license

P.S. I've not checked libnames, so just talking about wrong usage of '*'.

Comment 8 Dan Williams 2015-08-03 16:16:33 UTC
(In reply to Igor Gnatenko from comment #7)
> -> %{_includedir}/ndctl/*
>    %{_includedir}/ndctl/
> -> %{_libdir}/*.so
>    %{_libdir}/libndctl.so
> -> %{_libdir}/*.so.*
>    %{_libdir}/libndctl.so.*

Fixed.

> -> %doc
>    Still nothing in %doc.

Ok, deleted.

> -> No license in %license

Can you point me to an example?  I do have "License:" entries.

> P.S. I've not checked libnames, so just talking about wrong usage of '*'.

No worries, above suggestions work.

Comment 9 Dan Williams 2015-08-03 16:17:15 UTC
Created attachment 1058797 [details]
Updated ndctl.spec in response to comment7

Comment 10 Eduardo Mayorga 2015-08-03 16:30:27 UTC
(In reply to Dan Williams from comment #8)
> (In reply to Igor Gnatenko from comment #7) 
> > -> No license in %license
> 
> Can you point me to an example?  I do have "License:" entries.

In the files section, you must use the %license macro to include the license text in the package. Use:

%files
%license COPYING
%doc README.md
...

Comment 11 Dan Williams 2015-08-03 16:54:59 UTC
(In reply to Eduardo Mayorga from comment #10)
> (In reply to Dan Williams from comment #8)
> > (In reply to Igor Gnatenko from comment #7) 
> > > -> No license in %license
> > 
> > Can you point me to an example?  I do have "License:" entries.
> 
> In the files section, you must use the %license macro to include the license
> text in the package. Use:
> 
> %files
> %license COPYING

Done.

> %doc README.md

Oh, thanks!  Yes, I forgot to include README.md.

Comment 12 Dan Williams 2015-08-03 16:55:30 UTC
Created attachment 1058812 [details]
Updated ndctl.spec in response to comment10

Comment 13 Dan Williams 2015-09-10 23:13:15 UTC
Here's an updated build based on ndctl v47 released to coincide with the kernel ABI that was finalized with the v4.2 kernel.

https://copr.fedoraproject.org/coprs/djbw/ndctl/build/114725/

Comment 14 Dan Williams 2015-09-10 23:14:24 UTC
Created attachment 1072378 [details]
Updated ndctl.spec in response to comment13

Comment 15 David Woodhouse 2015-09-11 14:16:52 UTC
> Rpmlint (installed packages)
> ----------------------------
> ndctl-libs.x86_64: W: invalid-license LGPLv2.1

See https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses — I think that should be 'LGPLv2'.

But also, why does nfit.h have a licence header therein claiming that it's under GPL and not LGPL?

> ndctl.x86_64: W: no-manual-page-for-binary ndctl

... would be nice.

Otherwise looks fine, from a brief look. You are now sponsored, and I'll do a more thorough review when you update.

Comment 16 Dan Williams 2015-09-11 16:54:22 UTC
(In reply to David Woodhouse from comment #15)
> > Rpmlint (installed packages)
> > ----------------------------
> > ndctl-libs.x86_64: W: invalid-license LGPLv2.1
> 
> See https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
> — I think that should be 'LGPLv2'.

Ok, will fix.

> But also, why does nfit.h have a licence header therein claiming that it's
> under GPL and not LGPL?

There's the library (libndctl) that is LGPL and the utility (ndctl) that is GPL.  I'm not sure what the best way is to reflect that distinction in the spec file.

> > ndctl.x86_64: W: no-manual-page-for-binary ndctl
> 
> ... would be nice.

Yeah, I should bite the bullet and get that done.

> Otherwise looks fine, from a brief look. You are now sponsored, and I'll do
> a more thorough review when you update.

Thanks again Dave!

Comment 17 Dan Williams 2016-02-02 04:52:50 UTC
Created attachment 1120314 [details]
Updated ndctl.spec in response to comment 16

Comment 18 Dan Williams 2016-02-02 05:00:49 UTC
Created attachment 1120316 [details]
Updated ndctl.spec in response to comment 16

Fix up the license names.

Comment 19 Ralf Corsepius 2016-02-02 06:04:32 UTC
Some remarks on your spec:

* I do not consider these defines useful:
%define lname ndctl-libs
%define dname ndctl-devel
IMO, all they do is to reduce readability.

* %define should not be used in new specs anymore (Use %global instead).

* Except if you want to support very outdated distros (IIRC, < rhel5), %defattr(-,root,root) is not necessary, anymore and should not be used in specs anymore.

* github supports downloading tarballs.
Consider to change Source0: into
https://github.com/pmem/ndctl/archive/v50.tar.gz#/ndctl-0.50.tar.gz
and to remove your make-git-shapshot.sh scripts.

* Append --disable-silent-rules %configure to make building verbose.

Comment 20 David Woodhouse 2016-02-02 11:54:29 UTC
Once upon a time, ISTR github generated non-reproducible tarballs (timestamps differed, or something stupid). Is that now fixed?

Comment 21 Ralf Corsepius 2016-02-03 07:11:16 UTC
I don't know if what you had say ever applied (To my knowledge, most, if not all such cases had been projects moving git-tags), but AFAICT it works for quite some time. I personally am using it in my packages with any problems.

Comment 22 Dan Williams 2016-02-09 22:51:41 UTC
Created attachment 1122550 [details]
Updated ndctl.spec in response to comment 19

Addressed Ralf's comments and verified with:

spectool -g -R ndctl.spec
rpmbuild -ba ndctl.spec

Comment 23 Dan Williams 2016-03-31 00:47:02 UTC
Setting 'fedora-review' to '+' now that Dave has sponsored me.

Comment 24 Dan Williams 2016-03-31 00:52:04 UTC
Oops, Dave needs to set the fedora-review flag to '+', not me.

Comment 26 Dan Williams 2016-04-06 18:51:38 UTC
Here's the result of a fedora-review run with the rest of the template filled out and a note about ndctl-devel rpmlint warnings.

C/C++:
[-]: Provides: bundled(gnulib) in place as required.
     Note: Sources not installed
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[x]: Header files in -devel subpackage, if present.
[x]: ldconfig called in %post and %postun if required.
[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.
[x]: License file installed when any subpackage combination is installed.
[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.
[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.
[x]: 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 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]: All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[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:
[x]: Sources can be downloaded from URI in Source: tag
[-]: 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.
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Scriptlets must be sane, if used.
[x]: SourceX tarball generation or download is documented.
[-]: 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]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[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]: Uses parallel make %{?_smp_mflags} macro.
[x]: The placement of pkgconfig(.pc) files are correct.
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Spec file according to URL is the same as in SRPM.
[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]: Package should not use obsolete m4 macros


Rpmlint
-------
Checking: ndctl-52-1.fc23.x86_64.rpm
          ndctl-devel-52-1.fc23.x86_64.rpm
          ndctl-libs-52-1.fc23.x86_64.rpm
          ndctl-debuginfo-52-1.fc23.x86_64.rpm
          ndctl-52-1.fc23.src.rpm
ndctl.x86_64: W: spelling-error Summary(en_US) libnvdimm -> libidinal
ndctl.x86_64: W: spelling-error %description -l en_US libnvdimm -> libidinal
ndctl-devel.x86_64: W: spelling-error Summary(en_US) libndctl -> libidinal
ndctl-devel.x86_64: W: only-non-binary-in-usr-lib
ndctl-devel.x86_64: W: no-documentation

Note these last 2 warnings are also reported against devicemapper-devel, so I don't plan to address them.

ndctl-libs.x86_64: W: spelling-error Summary(en_US) libnvdimm -> libidinal
ndctl.src: W: spelling-error Summary(en_US) libnvdimm -> libidinal
ndctl.src: W: spelling-error %description -l en_US libnvdimm -> libidinal
5 packages and 0 specfiles checked; 0 errors, 8 warnings.


Rpmlint (debuginfo)
-------------------
Checking: ndctl-debuginfo-52-1.fc23.x86_64.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.





Rpmlint (installed packages)
----------------------------
ndctl-devel.x86_64: W: only-non-binary-in-usr-lib
ndctl-devel.x86_64: W: no-documentation
4 packages and 0 specfiles checked; 0 errors, 2 warnings.



Requires
--------
ndctl-libs (rpmlib, GLIBC filtered):
    /sbin/ldconfig
    libc.so.6()(64bit)
    libkmod.so.2()(64bit)
    libkmod.so.2(LIBKMOD_5)(64bit)
    libudev.so.1()(64bit)
    libudev.so.1(LIBUDEV_183)(64bit)
    libuuid.so.1()(64bit)
    libuuid.so.1(UUID_1.0)(64bit)
    rtld(GNU_HASH)

ndctl-debuginfo (rpmlib, GLIBC filtered):

ndctl-devel (rpmlib, GLIBC filtered):
    /usr/bin/pkg-config
    libndctl.so.6()(64bit)
    ndctl-libs(x86-64)

ndctl (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    libjson-c.so.2()(64bit)
    libndctl.so.6()(64bit)
    libndctl.so.6(LIBNDCTL_1)(64bit)
    libndctl.so.6(LIBNDCTL_3)(64bit)
    libuuid.so.1()(64bit)
    libuuid.so.1(UUID_1.0)(64bit)
    rtld(GNU_HASH)



Provides
--------
ndctl-libs:
    libndctl.so.6()(64bit)
    libndctl.so.6(LIBNDCTL_1)(64bit)
    libndctl.so.6(LIBNDCTL_3)(64bit)
    ndctl-libs
    ndctl-libs(x86-64)

ndctl-debuginfo:
    ndctl-debuginfo
    ndctl-debuginfo(x86-64)

ndctl-devel:
    ndctl-devel
    ndctl-devel(x86-64)
    pkgconfig(libndctl)

ndctl:
    ndctl
    ndctl(x86-64)



Generated by fedora-review 0.6.0 (3c5c9d7) last change: 2015-05-20
Command line :/usr/bin/fedora-review -n ndctl
Buildroot used: fedora-23-x86_64
Active plugins: Generic, Shell-api, C/C++
Disabled plugins: Java, Python, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP, Ruby
Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH, EPEL6

Comment 27 David Woodhouse 2016-04-07 10:25:49 UTC
Looks good to me. Review+.
Thanks.

Comment 28 Gwyn Ciesla 2016-04-07 19:26:47 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/ndctl


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