Bug 1741805 - Review Request: lolcat - a colorful version of 'cat'
Summary: Review Request: lolcat - a colorful version of 'cat'
Keywords:
Status: CLOSED RAWHIDE
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-08-16 07:11 UTC by josef radinger
Modified: 2019-09-30 15:31 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-30 15:31:02 UTC
Type: ---
Embargoed:
zebob.m: fedora-review+


Attachments (Terms of Use)

Description josef radinger 2019-08-16 07:11:51 UTC
Spec URL: <spec info here>
SRPM URL: <srpm info here>
Description: <description here>
Fedora Account System Username:

Comment 1 josef radinger 2019-08-16 08:44:03 UTC
Spec URL: http://www.nosuchhost.net/~cheese/temp/lolcat.spec
SRPM URL: http://www.nosuchhost.net/~cheese/fedora/packages/30/SRPMS/lolcat-1.0-3.fc30.src.rpm
Description: 
lolcat is a colorful version of 'cat'. It is faster than python-lolcat
and much faster than ruby-lolcat.

Fedora Account System Username: cheese

compiled version for f30 x86_64: http://www.nosuchhost.net/~cheese/fedora/packages/30/x86_64/lolcat-1.0-3.fc30.x86_64.rpm
compiled version for f30 i386:   http://www.nosuchhost.net/~cheese/fedora/packages/30/i386/lolcat-1.0-3.fc30.i386.rpm 
compiled version for f29 x86_64: http://www.nosuchhost.net/~cheese/fedora/packages/29/x86_64/lolcat-1.0-3.fc29.x86_64.rpm
compiled version for f29 i386:   http://www.nosuchhost.net/~cheese/fedora/packages/29/i386/lolcat-1.0-3.fc29.i386.rpm

Comment 2 Artur Frenszek-Iwicki 2019-08-17 08:30:58 UTC
>%build
>make %{?_smp_mflags} all
Add "%set_build_flags" before calling make.

>mkdir -p $RPM_BUILD_ROOT/usr/bin/
>make DESTDIR=$RPM_BUILD_ROOT/usr/bin/ install
Use "%{_bindir}" instead of "/usr/bin". If you want to avoid mixing bash variables and rpm variables, you can use "%{buildroot}%{_bindir}" for the whole path.

Comment 4 Robert-André Mauchin 🐧 2019-08-23 15:26:59 UTC
 - Use a better name for your archive:

Source:  https://github.com/jaseg/lolcat/archive/v%{version}/%{name}-%{version}.tar.gz

 - %setup -q lolcat-%{version} → %autosetup

 - make %{?_smp_mflags} all →  %make_build all

 - Consider patching the Makefile to keep timestamps:

install: lolcat censor
	$(INSTALL) lolcat $(DESTDIR)/bin/lolcat
	$(INSTALL) censor $(DESTDIR)/bin/censor

and then use %make_install


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]: 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: "do What The Fuck you want to Public License (v2)", "Unknown or
     generated". 6 files have unknown license. Detailed output of
     licensecheck in /home/bob/packaging/review/lolcat/review-
     lolcat/licensecheck.txt
[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.
[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 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 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).
[-]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in lolcat
[?]: 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.
[!]: 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]: Uses parallel make %{?_smp_mflags} macro.
[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: lolcat-1.0-4.fc32.x86_64.rpm
          lolcat-debuginfo-1.0-4.fc32.x86_64.rpm
          lolcat-debugsource-1.0-4.fc32.x86_64.rpm
          lolcat-1.0-4.fc32.src.rpm
lolcat.x86_64: W: name-repeated-in-summary C lolcat
lolcat.x86_64: W: no-manual-page-for-binary censor
lolcat.x86_64: W: no-manual-page-for-binary lolcat
lolcat.src: W: name-repeated-in-summary C lolcat
4 packages and 0 specfiles checked; 0 errors, 4 warnings.

Comment 6 Lukas Javorsky 2019-09-09 10:15:28 UTC
Hi, I've tried to build it in container and test the functionality, but I don't think it works right.

Example: 
lolcat /dev/urandom     # It doesn't print anything

Tried it with cat first:
cat /dev/urandom > foo  # Stop it manually (^C)
lolcat foo              # Still nothing

And a few things that I've noticed in spec:
- Use macros everywhere you can
    - Source, URL: change the lolcat to %{name}
- This is not a mistake, but I think that your Changelog doesn't need that many releases, try to make them useful, 
  IMHO your package would be great only with the "Initial package" one, but it's totally up to you how you make it.

Not diving into deep review, I will wait until your review on the functionality of the program

Comment 7 josef radinger 2019-09-11 09:18:51 UTC
lolcat /dev/urandom does not work on my side, too. it seems to stumble over some sort of "binary" characters.

but lolcat /etc/passwd does, as passwd usually has only "safe" characters.

concerning "macros everywhere": agreed, but not very important imho. it makes reading somewhat complicated. i never found a real problem when not using macros "everywhere" especially as they are a 1:1 relation.

concerning changelog: i create them in my test-envirnment, to be able to distinguish "my" versions. every change -> new version -> new changelog

thanks for your input.
will fix %{name}

Comment 8 Lukas Javorsky 2019-09-11 10:19:52 UTC
(In reply to josef radinger from comment #7)
> lolcat /dev/urandom does not work on my side, too. it seems to stumble over
> some sort of "binary" characters.

Yes it can't read that "weird" characters.
 
> but lolcat /etc/passwd does, as passwd usually has only "safe" characters.

Yep it works, but when it doesn't work on every file, than it's not cat version I think.


> concerning changelog: i create them in my test-envirnment, to be able to
> distinguish "my" versions. every change -> new version -> new changelog

One note, just for you to be correct in terminology, the number you had been increasing is RELEASE, no version.
But yes i get it when you added the "my" in-front of it.

Okay, so I can review it, but did you considered the maintaining of this package?
It's not the most needed package in Fedora, I don't even know if it will be added to it.
So it's up to you for reconsideration.

Let me know if you decided that, you will be the maintainer, and I'll get to reviewing.

Comment 9 Robert-André Mauchin 🐧 2019-09-19 17:58:34 UTC
LGTM, package approved.

Comment 10 josef radinger 2019-09-30 10:56:56 UTC
great
sorry for the late answer, i was in hospital and afk

Comment 11 Gwyn Ciesla 2019-09-30 14:26:02 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/lolcat


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