Bug 1395804 (python-batinfo) - Review Request: python-batinfo - A Python module to retrieve battery information
Summary: Review Request: python-batinfo - A Python module to retrieve battery information
Keywords:
Status: CLOSED ERRATA
Alias: python-batinfo
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Iryna Shcherbina
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-16 17:56 UTC by Fabian Affolter
Modified: 2016-12-27 15:47 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-27 05:18:12 UTC
Type: ---
Embargoed:
ishcherb: fedora-review+


Attachments (Terms of Use)

Description Fabian Affolter 2016-11-16 17:56:53 UTC
Spec URL: https://fab.fedorapeople.org/packages/SRPMS/python-batinfo.spec
SRPM URL: https://fab.fedorapeople.org/packages/SRPMS/python-batinfo-0.3-1.fc24.src.rpm

Project URL: https://github.com/nicolargo/batinfo

Description:
batinfo is a Python module to retrieve battery information on Linux-based
operating system.
Only the Linux kernel and its /sys/class/power_supply folder.

Koji scratch build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=16477192

rpmlint output:
[fab@laptop016 SRPMS]$ rpmlint python-batinfo-0.3-1.fc24.src.rpm 
python-batinfo.src: W: spelling-error %description -l en_US sys -> says, sis, syn
1 packages and 0 specfiles checked; 0 errors, 1 warnings.


[fab@laptop016 noarch]$ rpmlint python*-batinfo*
python2-batinfo.noarch: W: spelling-error %description -l en_US sys -> says, sis, syn
python3-batinfo.noarch: W: spelling-error %description -l en_US sys -> says, sis, syn
2 packages and 0 specfiles checked; 0 errors, 2 warnings.

Fedora Account System Username: fab

Comment 1 Iryna Shcherbina 2016-11-18 14:46:44 UTC
Hello Fabian,

the spec file looks good, but I have a couple of comments:

* there is a new version of the package 0.4.2, which was released just yesterday

* with the new release the license file is included in the tar, so please include it in %license

* please use %{srcname} macro in the URL

It is an informal review, as I'm not sponsored yet, but I can continue with the review when I am and when the updates are available.

Comment 2 Fabian Affolter 2016-11-18 17:03:05 UTC
Thanks for your feedback.

(In reply to Iryna Shcherbina from comment #1)
> * there is a new version of the package 0.4.2, which was released just
> yesterday

Yes, I know. I worked with upstream to get a couple of issues sorted out. Shebang, license, and typos.

> * with the new release the license file is included in the tar, so please
> include it in %license

That was one issue.

> * please use %{srcname} macro in the URL

No, this adds no real value and make the URL very copy-&-paste unfriendly in the spec file. I know that this is shown in the guidelines. If the project is renamed or the orga changed then the URL needs to be modified anyways.

Updated files:
Spec URL: https://fab.fedorapeople.org/packages/SRPMS/python-batinfo.spec
SRPM URL: https://fab.fedorapeople.org/packages/SRPMS/python-batinfo-0.4.2-1.fc24.src.rpm

Comment 3 Iryna Shcherbina 2016-11-21 15:41:38 UTC
Hello Fabian,

thank you for the changes.

The spec file looks good to me, but I would suggest to do another small change.
The %description is missing one sentence comparing to the one in package documentation and therefore seems incomplete.
Please change it to the original one:

A simple Python module to retrieve battery information on Linux-based operating system. No ACPI or external software is needed. Only the Linux kernel and its /sys/class/power_supply folder.

Also, could you please explain to me why you define the following:

> %if 0%{?fedora}
> %bcond_without python3
> %else
> %bcond_with python3
> %endif


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

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


===== 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]: 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.
[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]: 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

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]: 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).
[-]: 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.
[-]: 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: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: python2-batinfo-0.4.2-1.fc24.noarch.rpm
          python3-batinfo-0.4.2-1.fc24.noarch.rpm
          python-batinfo-0.4.2-1.fc24.src.rpm
python2-batinfo.noarch: W: spelling-error %description -l en_US sys -> says, sis, syn
python3-batinfo.noarch: W: spelling-error %description -l en_US sys -> says, sis, syn
python-batinfo.src: W: spelling-error %description -l en_US sys -> says, sis, syn
3 packages and 0 specfiles checked; 0 errors, 3 warnings.




Rpmlint (installed packages)
----------------------------
python3-batinfo.noarch: W: spelling-error %description -l en_US sys -> says, sis, syn
python2-batinfo.noarch: W: spelling-error %description -l en_US sys -> says, sis, syn
2 packages and 0 specfiles checked; 0 errors, 2 warnings.



Requires
--------
python3-batinfo (rpmlib, GLIBC filtered):
    python(abi)

python2-batinfo (rpmlib, GLIBC filtered):
    python(abi)



Provides
--------
python3-batinfo:
    python3-batinfo

python2-batinfo:
    python-batinfo
    python2-batinfo



Source checksums
----------------
https://files.pythonhosted.org/packages/source/b/batinfo/batinfo-0.4.2.tar.gz :
  CHECKSUM(SHA256) this package     : 497e29efc9353ec52e71d43bd040bdfb6d685137ddc2b9143cded4583af572f5
  CHECKSUM(SHA256) upstream package : 497e29efc9353ec52e71d43bd040bdfb6d685137ddc2b9143cded4583af572f5


Generated by fedora-review 0.6.1 (f03e4e7) last change: 2016-05-02
Command line :/usr/bin/fedora-review -b 1395804
Buildroot used: fedora-24-x86_64
Active plugins: Python, Generic, Shell-api
Disabled plugins: Java, C/C++, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP
Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH, EPEL6

Comment 4 Iryna Shcherbina 2016-11-22 09:48:46 UTC
Hi Fabian,

Another thing is that batinfo contains tests, they are just 
not included into the tarball:

https://github.com/nicolargo/batinfo/blob/master/test_batinfo.py

You should either get the tests from github or create an issue to include them, and run them in %check section.

Comment 5 Fabian Affolter 2016-11-22 13:10:49 UTC
(In reply to Iryna Shcherbina from comment #3)
> The spec file looks good to me, but I would suggest to do another small
> change.
> The %description is missing one sentence comparing to the one in package
> documentation and therefore seems incomplete.
> Please change it to the original one:
> 
> A simple Python module to retrieve battery information on Linux-based
> operating system. No ACPI or external software is needed. Only the Linux
> kernel and its /sys/class/power_supply folder.

Changed

> Also, could you please explain to me why you define the following:
> 
> > %if 0%{?fedora}
> > %bcond_without python3
> > %else
> > %bcond_with python3
> > %endif

Needed to build the package for EPEL as there is Py3. 

(In reply to Iryna Shcherbina from comment #4)
> Another thing is that batinfo contains tests, they are just 
> not included into the tarball:
> 
> https://github.com/nicolargo/batinfo/blob/master/test_batinfo.py
> 
> You should either get the tests from github or create an issue to include
> them, and run them in %check section.

https://github.com/nicolargo/batinfo/issues/12

Comment 6 Fabian Affolter 2016-11-22 13:11:48 UTC
i meant: No Py3 on EPEL.

Comment 7 Iryna Shcherbina 2016-11-22 15:34:16 UTC
Hi Fabian,

Thank you for creating the issue and for your responses.

Please make sure to add the %check section with the next release when the issue is resolved.

Also the spec file [0] does not reflect the %description change yet, so please push the change. Other than that, I approve the package.

[0] https://fab.fedorapeople.org/packages/SRPMS/python-batinfo.spec

Comment 8 Iryna Shcherbina 2016-11-22 16:58:32 UTC
I would like to add, that I have been sponsored and now I can approve packages.

Comment 9 Fabian Affolter 2016-11-23 23:18:13 UTC
(In reply to Iryna Shcherbina from comment #7)
> Please make sure to add the %check section with the next release when the
> issue is resolved.

Upstream is pretty responsive. I guess that with the PR for the tests in place it will not take long.

> Also the spec file [0] does not reflect the %description change yet, so
> please push the change. Other than that, I approve the package.

Sorry, didn't publish the new stuff.

Updated files:
Spec URL: https://fab.fedorapeople.org/packages/SRPMS/python-batinfo.spec
SRPM URL: https://fab.fedorapeople.org/packages/SRPMS/python-batinfo-0.4.2-2.fc24.src.rpm

(In reply to Iryna Shcherbina from comment #8)
> I would like to add, that I have been sponsored and now I can approve
> packages.

Congratulations :-)

Comment 10 Iryna Shcherbina 2016-11-24 09:10:17 UTC
(In reply to Fabian Affolter from comment #9)

> Sorry, didn't publish the new stuff.

Thank you for the update.

Package approved.

Comment 11 Gwyn Ciesla 2016-11-28 13:54:12 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/python-batinfo

Comment 12 Fedora Update System 2016-11-28 15:42:49 UTC
python-batinfo-0.4.2-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-6374c6c6ce

Comment 13 Fedora Update System 2016-12-02 18:54:27 UTC
python-batinfo-0.4.2-2.fc25 has been pushed to the Fedora 25 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-2016-6374c6c6ce

Comment 14 Fedora Update System 2016-12-27 05:18:12 UTC
python-batinfo-0.4.2-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2016-12-27 15:47:44 UTC
python-batinfo-0.4.2-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.


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