Bug 2223901 - Review Request: powerstat - Measures the power consumption of a machine
Summary: Review Request: powerstat - Measures the power consumption of a machine
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Maxwell G
QA Contact: Fedora Extras Quality Assurance
URL: https://github.com/ColinIanKing/power...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-19 08:38 UTC by Benson Muite
Modified: 2023-09-03 01:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-03 01:15:26 UTC
Type: ---
Embargoed:
maxwell: fedora-review+


Attachments (Terms of Use)
Indent specfile to 17 columns (1.39 KB, patch)
2023-08-24 16:12 UTC, Maxwell G
no flags Details | Diff

Description Benson Muite 2023-07-19 08:38:56 UTC
spec: https://download.copr.fedorainfracloud.org/results/fed500/powerstat/fedora-rawhide-x86_64/06184831-powerstat/powerstat.spec
srpm: https://download.copr.fedorainfracloud.org/results/fed500/powerstat/fedora-rawhide-x86_64/06184831-powerstat/powerstat-0.03.03-1.fc39.src.rpm

description:
Powerstat measures the power consumption of a machine using the
battery stats or the Intel RAPL interface. The output is like
vmstat but also shows power consumption statistics. At the end
of a run, powerstat will calculate the average, standard
deviation and min/max of the gathered data.

fas: fed500

Reproducible: Always

Comment 1 Fedora Review Service 2023-07-19 08:45:03 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6184835
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2223901-powerstat/fedora-rawhide-x86_64/06184835-powerstat/fedora-review/review.txt

Please take a look if any issues were found.

---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 2 Maxwell G 2023-08-18 03:50:10 UTC
[fedora-review-service-build]

Comment 3 Fedora Review Service 2023-08-18 03:56:39 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6314958
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2223901-powerstat/fedora-rawhide-x86_64/06314958-powerstat/fedora-review/review.txt

Please take a look if any issues were found.

---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 4 Maxwell G 2023-08-18 04:43:49 UTC
Notes
=========

- You shouldn't need manual dependencies on bash-completion. The directories are owned by the filesystem package.

Change

%files
[...]
%{_datadir}/bash-completion/completions/powerstat

to

%files
[...]
%{bash_completions_dir}/powerstat

and you should be good to go.

- You don't need to number Sources and Patches anymore. I'd change Source0 to Source and Patch01 to Patch.

- Your Makefile patch changes one plain `cp` to `cp -p`, but not the other. Why not fix both `cp` invocations? 

- I would use %{buildroot}%{_bindir}/powerstat for the smoke test instead of calling it from the build directory.

- Search for `NOTE::` for other issues interspersed in the checklist below.

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

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




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

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]: If your application is a C or C++ application you must list a
     BuildRequires against gcc, gcc-c++ or clang.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

Generic:
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
     Note: Using prebuilt packages
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.

[!]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. No licenses
     found. Please check the source files for licenses manually.

NOTE:: The License should be GPL-2.0-or-later as opposed to GPL-2.0-only. The file headers have the "or later" clause and the license is listed as GPL-2+ (as opposed to plain GPL-2) in debian/copyright.

[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.
[-]: 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.
[x]: Requires correct, justified where necessary.


[!]: Spec file is legible and written in American English.

NOTE:: A specfile's preamble is conventionally ordered in a certain way and indented to 17 columns. Also, there are usually two newlines between specfile sections. You can look at `rpmdev-newspec`'s template to see what I mean. It's personal preference (IOW, this is not a blocker), but I prefer to follow these conventions when writing specfiles.


[-]: Package contains systemd file(s) if in need.
[x]: Useful -debuginfo package or justification otherwise.
[!]: 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 installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: No rpmlint messages.
[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:
[x]: Reviewer should test that the package builds in mock.
[-]: 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.
[ ]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[?]: 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]: 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: No rpmlint messages.
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.


Rpmlint
-------
Checking: powerstat-0.03.03-1.fc40.x86_64.rpm
          powerstat-debuginfo-0.03.03-1.fc40.x86_64.rpm
          powerstat-debugsource-0.03.03-1.fc40.x86_64.rpm
          powerstat-0.03.03-1.fc40.src.rpm
============================ rpmlint session starts ============================
rpmlint: 2.4.0
configuration:
    /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
rpmlintrc: [PosixPath('/tmp/tmpk8xdyt8q')]
checks: 31, packages: 4

 4 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken 0.2 s 




Rpmlint (debuginfo)
-------------------
Checking: powerstat-debuginfo-0.03.03-1.fc40.x86_64.rpm
============================ rpmlint session starts ============================
rpmlint: 2.4.0
configuration:
    /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
rpmlintrc: [PosixPath('/tmp/tmpyg4usng3')]
checks: 31, packages: 1

 1 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken 0.1 s 





Rpmlint (installed packages)
----------------------------
============================ rpmlint session starts ============================
rpmlint: 2.4.0
configuration:
    /usr/lib/python3.12/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 31, packages: 3

 3 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken 0.3 s 



Source checksums
----------------
https://github.com/ColinIanKing/powerstat/archive/V0.03.03/powerstat-V0.03.03.tar.gz :
  CHECKSUM(SHA256) this package     : 4d57b119896b777adccaacdf53db32b5b45426a3182adac84f96a64b671a79ee
  CHECKSUM(SHA256) upstream package : 4d57b119896b777adccaacdf53db32b5b45426a3182adac84f96a64b671a79ee


Requires
--------
powerstat (rpmlib, GLIBC filtered):
    bash-completion
    libc.so.6()(64bit)
    libm.so.6()(64bit)
    rtld(GNU_HASH)

powerstat-debuginfo (rpmlib, GLIBC filtered):

powerstat-debugsource (rpmlib, GLIBC filtered):



Provides
--------
powerstat:
    powerstat
    powerstat(x86-64)

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

powerstat-debugsource:
    powerstat-debugsource
    powerstat-debugsource(x86-64)



Generated by fedora-review 0.9.0 (6761b6c) last change: 2022-08-23
Command line :/usr/bin/fedora-review --no-colors --prebuilt --rpm-spec --name powerstat --mock-config /var/lib/copr-rpmbuild/results/configs/child.cfg
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Shell-api, C/C++
Disabled plugins: PHP, Perl, fonts, Python, SugarActivity, R, Haskell, Ocaml, Java
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 6 Maxwell G 2023-08-24 16:12:07 UTC
Okay, sorry for taking a little while to get back to this. I attached a patch of how I would format the specfile, but otherwise, this LGTM. Package approved! Remember to add the upstream project to Anitya (release-monitoring.org) and to close the Bugzilla after importing the package. Also, the Release should start at 1, so please remove the second  changelog entry and reset the Release.

Comment 7 Maxwell G 2023-08-24 16:12:48 UTC
Created attachment 1985095 [details]
Indent specfile to 17 columns

Comment 8 Fedora Admin user for bugzilla script actions 2023-08-25 06:56:30 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/powerstat

Comment 9 Fedora Update System 2023-08-25 08:15:19 UTC
FEDORA-2023-76b51a2a2c has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-76b51a2a2c

Comment 10 Fedora Update System 2023-08-25 08:52:10 UTC
FEDORA-2023-9d8f798760 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-9d8f798760

Comment 11 Benson Muite 2023-08-25 10:08:38 UTC
Thanks. Updated formatting. Bug will close automatically once imported into Fedora 38/37.

Comment 12 Fedora Update System 2023-08-26 01:59:59 UTC
FEDORA-2023-76b51a2a2c has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-76b51a2a2c \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-76b51a2a2c

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2023-08-26 02:57:45 UTC
FEDORA-2023-9d8f798760 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-9d8f798760 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-9d8f798760

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 14 Fedora Update System 2023-09-03 01:15:26 UTC
FEDORA-2023-76b51a2a2c has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 15 Fedora Update System 2023-09-03 01:27:27 UTC
FEDORA-2023-9d8f798760 has been pushed to the Fedora 37 stable repository.
If problem still persists, 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.