Bug 2076836 - Review Request: bitwise - Terminal based bit manipulator in ncurses
Summary: Review Request: bitwise - Terminal based bit manipulator in ncurses
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Kadlčík
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-04-20 04:07 UTC by Gustavo Costa
Modified: 2022-09-13 01:29 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-09-05 09:06:51 UTC
Type: ---
Embargoed:
jkadlcik: fedora-review+


Attachments (Terms of Use)

Description Gustavo Costa 2022-04-20 04:07:12 UTC
Spec URL: https://xfgusta.fedorapeople.org/packages/bitwise/bitwise.spec
SRPM URL: https://xfgusta.fedorapeople.org/packages/bitwise/bitwise-0.43-1.fc36.src.rpm

Description:
Bitwise is multi base interactive calculator supporting dynamic base conversion
and bit manipulation. It's a handy tool for low level hackers, kernel
developers and device drivers developers.

Fedora Account System Username: xfgusta

Comment 1 Jakub Kadlčík 2022-08-21 16:31:50 UTC
Hello Gustavo,
thank you for the package.

I tried to install and run it, and it works for me. The spec file is
also very well written. I found just a couple of minor things.


> # The entire source code is GPLv3+ except for
> # the shunting-yard code and its test which are BSD 2-Clause

Perfect, I just wanted to say I like the explanation :-)

I also found a BSD license in inc/stack.h so we should probably
mention that in the comment as well.

> License:        GPLv3+ and BSD

Looking at the license, I think it is GPLv3, not GPLv3+ . Do you
agree? Maybe I am misreading it.

> %license COPYING

There is also LICENSE so we should IMHO install both of them

> BuildRequires:  pkgconfig(ncurses)
> BuildRequires:  pkgconfig(readline)
> BuildRequires:  pkgconfig(cunit)

TIL that there is this pkgconfig macro, thanks :-)

Comment 2 Gustavo Costa 2022-08-29 04:19:40 UTC
Hi Jakub. I hope you're doing well. Sorry for the late reply, I was away from my computer for a few weeks.

> I also found a BSD license in inc/stack.h so we should probably
> mention that in the comment as well.

This header file is also part of the "shunting-yard code" and it's by the same author. That's why I decided to not make a license breakdown like this:

inc/shunting-yard.h
inc/stack.c
src/shunting-yard.c
src/stack.c
tests/test-shunting-yard.c

> Looking at the license, I think it is GPLv3, not GPLv3+ . Do you
> agree? Maybe I am misreading it.

You're right. I fixed it and also updated the license identifiers to use SPDX.

> There is also LICENSE so we should IMHO install both of them

Both files have the same content. I think it's fine to just install one of them.

$ diff --report-identical-files COPYING LICENSE
Files COPYING and LICENSE are identical

> TIL that there is this pkgconfig macro, thanks :-)

It's a nice feature. It's also possible to use this with dnf install/remove.

$ dnf install 'pkgconfig(cunit)'

Thanks for the quick review.

Comment 3 Jakub Kadlčík 2022-09-01 00:28:26 UTC
> This header file is also part of the "shunting-yard code" and it's
> by the same author.  

Understood

> You're right. I fixed it and also updated the license identifiers to use SPDX.

+1 for SPDX

Though, I am really sorry but I think you had the correct GPL license
before I weighed in. I am reading the packaged COPYING file again and
now I can see the 'GNU General Public License "or any later version"'
line there. I don't know why I missed it before, sorry. So I think it
is GPL-3.0-or-later after all.

Also, please take a look at the licensecheck.txt here:


    *No copyright*  [generated file]
    --------------------------------
    bitwise-v0.43/bitwise.1

    BSD 2-Clause License
    --------------------
    bitwise-v0.43/inc/shunting-yard.h
    bitwise-v0.43/inc/stack.h
    bitwise-v0.43/src/shunting-yard.c
    bitwise-v0.43/src/stack.c
    bitwise-v0.43/tests/test-shunting-yard.c

    FSF All Permissive License
    --------------------------
    bitwise-v0.43/m4/ax_lib_readline.m4

    FSF Unlimited License (with License Retention) [generated file]
    ---------------------------------------------------------------
    bitwise-v0.43/aclocal.m4

    FSF Unlimited License [generated file]
    --------------------------------------
    bitwise-v0.43/configure

    GNU General Public License v2.0 or later [generated file]
    ---------------------------------------------------------
    bitwise-v0.43/compile
    bitwise-v0.43/depcomp
    bitwise-v0.43/missing
    bitwise-v0.43/test-driver

    Unknown or generated
    --------------------
    bitwise-v0.43/COPYING
    bitwise-v0.43/ChangeLog
    bitwise-v0.43/Makefile.am
    bitwise-v0.43/README
    bitwise-v0.43/configure.ac
    bitwise-v0.43/inc/bitwise.h
    bitwise-v0.43/inc/config.h.in
    bitwise-v0.43/src/cmd.c
    bitwise-v0.43/src/help.c
    bitwise-v0.43/src/interactive.c
    bitwise-v0.43/src/main.c
    bitwise-v0.43/src/misc.c

    X11 License [generated file]
    ----------------------------
    bitwise-v0.43/install-sh

    [generated file]
    ----------------
    bitwise-v0.43/Makefile.in


> Both files have the same content. I think it's fine to just install
> one of them. 

Ack, no problem. I would copy both to be extra sure but since they are
same, installing just one is reasonable.

Comment 4 Gustavo Costa 2022-09-01 01:56:31 UTC
> Though, I am really sorry but I think you had the correct GPL license
> before I weighed in. I am reading the packaged COPYING file again and
> now I can see the 'GNU General Public License "or any later version"'
> line there. I don't know why I missed it before, sorry. So I think it
> is GPL-3.0-or-later after all.

No problems. I changed it back to GPL-3.0-or-later. I always get confused about this kind of license.

> Also, please take a look at the licensecheck.txt here:

Alright. Based on [1], I don't think we should include these licenses. Most of these files are not present in the binary rpm.

1. https://docs.fedoraproject.org/en-US/legal/license-field/#_basic_policy

Comment 5 Jakub Kadlčík 2022-09-01 20:13:19 UTC
> Most of these files are not present in the binary rpm.

Are you sure that this is true even for the .m4 files? I have no idea
what they are, so in the end, it will be your call, I will not
object. I just wanted to say, that the debian package mentions
them - please see debian/copyright 

    Files: m4/ax_require_defined.m4
    Copyright: 2014 Mike Frysinger vapier
    License: GFDL

    Files: m4/ax_lib_readline.m4
    Copyright: 2008 Ville Laurikari <vl>
    License: GFDL

The m4/ax_require_defined.m4 is something different, not mentioned in
our licensecheck.txt but m4/ax_lib_readline.m4 was there.

Comment 6 Gustavo Costa 2022-09-01 23:24:06 UTC
Hi Jakub.

> Are you sure that this is true even for the .m4 files? I have no idea
> what they are, so in the end, it will be your call, I will not
> object.

All these m4/*.m4 files are Autoconf scripts. They are used to check whether a library is installed and to define some macros. According to [1]:

> [...] there may be licenses covering files in the package source code that should not be reflected in the License: field because those files do not end up being compiled or otherwise included in the binary package. Common examples of this are Autoconf scripts and non-bundled test

I think we should just keep "GPL-3.0-or-later AND BSD-2-Clause" in the License: field.

1. https://docs.fedoraproject.org/en-US/legal/license-field/#_basic_policy

Comment 7 Jakub Kadlčík 2022-09-01 23:47:41 UTC
Thank you Gustavo,
my apologies for a tedious review. The licensing part is boring but I
wanted to make sure we don't miss anything. Don't want any legal
issues :-)


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]: 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", "[generated file]", "FSF Unlimited
     License (with License Retention) [generated file]", "*No copyright*
     [generated file]", "GNU General Public License v2.0 or later
     [generated file]", "FSF Unlimited License [generated file]", "X11
     License [generated file]", "BSD 2-Clause License", "FSF All Permissive
     License". 12 files have unknown license. Detailed output of
     licensecheck in /home/jkadlcik/2076836-bitwise/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.
[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.
[-]: 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 3 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.
[x]: Final provides and requires are sane (see attachments).
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[?]: 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.
[?]: 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: There are rpmlint messages (see attachment).
[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
-------
Cannot parse rpmlint output:


Rpmlint (debuginfo)
-------------------
Cannot parse rpmlint output:



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

bitwise.x86_64: E: zero-length /usr/share/doc/bitwise/NEWS
bitwise-debuginfo.x86_64: W: unstripped-binary-or-object /usr/lib/debug/usr/bin/bitwise-0.43-1.fc38.x86_64.debug
bitwise-debugsource.x86_64: W: no-documentation
bitwise-debuginfo.x86_64: W: no-documentation
bitwise-debuginfo.x86_64: E: ldd-failed /usr/lib/debug/usr/bin/bitwise-0.43-1.fc38.x86_64.debug /usr/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
ldd: warning: you do not have execution permission for `/usr/lib/debug/usr/bin/bitwise-0.43-1.fc38.x86_64.debug'

bitwise.x86_64: W: invalid-license GPL-3.0-only
bitwise.x86_64: W: invalid-license BSD-2-Clause
bitwise-debugsource.x86_64: W: invalid-license GPL-3.0-only
bitwise-debugsource.x86_64: W: invalid-license BSD-2-Clause
bitwise-debuginfo.x86_64: W: invalid-license GPL-3.0-only
bitwise-debuginfo.x86_64: W: invalid-license BSD-2-Clause
bitwise-debuginfo.x86_64: W: dangling-relative-symlink /usr/lib/debug/.build-id/89/952057acd0e092ba45bd3fafbf5c60651ff412 ../../../.build-id/89/952057acd0e092ba45bd3fafbf5c60651ff412
 3 packages and 0 specfiles checked; 2 errors, 10 warnings, 2 badness; has taken 0.2 s



Source checksums
----------------
https://github.com/mellowcandle/bitwise/releases/download/v0.43/bitwise-v0.43.tar.gz :
  CHECKSUM(SHA256) this package     : f524f794188a10defc4df673d8cf0b3739f93e58e93aff0cdb8a99fbdcca2ffb
  CHECKSUM(SHA256) upstream package : f524f794188a10defc4df673d8cf0b3739f93e58e93aff0cdb8a99fbdcca2ffb


Requires
--------
bitwise (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    libform.so.6()(64bit)
    libncurses.so.6()(64bit)
    libreadline.so.8()(64bit)
    libtinfo.so.6()(64bit)
    rtld(GNU_HASH)

bitwise-debuginfo (rpmlib, GLIBC filtered):

bitwise-debugsource (rpmlib, GLIBC filtered):



Provides
--------
bitwise:
    bitwise
    bitwise(x86-64)

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

bitwise-debugsource:
    bitwise-debugsource
    bitwise-debugsource(x86-64)



Generated by fedora-review 0.9.0 (6761b6c) last change: 2022-08-23
Command line :/usr/bin/fedora-review -b 2076836
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, C/C++, Shell-api
Disabled plugins: R, Python, PHP, fonts, Ocaml, SugarActivity, Perl, Java, Haskell
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 8 Gustavo Costa 2022-09-01 23:55:19 UTC
Thanks for the review!

Comment 9 Gwyn Ciesla 2022-09-02 13:49:52 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/bitwise

Comment 10 Fedora Update System 2022-09-02 23:01:12 UTC
FEDORA-2022-f80dd4eaa3 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-f80dd4eaa3

Comment 11 Fedora Update System 2022-09-02 23:03:05 UTC
FEDORA-2022-4a5deeb591 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-4a5deeb591

Comment 12 Fedora Update System 2022-09-03 13:13:10 UTC
FEDORA-2022-a76837d282 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-a76837d282

Comment 13 Fedora Update System 2022-09-03 23:44:12 UTC
FEDORA-2022-4a5deeb591 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-2022-4a5deeb591 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-4a5deeb591

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

Comment 14 Fedora Update System 2022-09-04 23:54:08 UTC
FEDORA-2022-f80dd4eaa3 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-f80dd4eaa3 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-f80dd4eaa3

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

Comment 15 Fedora Update System 2022-09-05 00:02:40 UTC
FEDORA-2022-a76837d282 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-a76837d282 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-a76837d282

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

Comment 16 Fedora Update System 2022-09-05 09:06:51 UTC
FEDORA-2022-f80dd4eaa3 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 17 Fedora Update System 2022-09-12 17:45:24 UTC
FEDORA-2022-4a5deeb591 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 18 Fedora Update System 2022-09-13 01:29:50 UTC
FEDORA-2022-a76837d282 has been pushed to the Fedora 35 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.