Bug 1586291 - Review Request: slop - Select Operation
Summary: Review Request: slop - Select Operation
Keywords:
Status: CLOSED CURRENTRELEASE
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: 2018-06-05 22:30 UTC by Alois Mahdal
Modified: 2021-06-10 09:12 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-06-10 09:12:36 UTC
Type: ---
Embargoed:
eclipseo: fedora-review+


Attachments (Terms of Use)

Description Alois Mahdal 2018-06-05 22:30:40 UTC
Spec URL: http://file.vornet.cz/tmp/fedora-submit-slop/slop.spec
SRPM URL: http://file.vornet.cz/tmp/fedora-submit-slop/slop-7.4-0.scratch.1.src.rpm
Description: slop (Select Operation) is an application that queries for a selection from the user and prints the region to stdout.
Fedora Account System Username: netvor

Hi, this is my first package, I'll appreciate your mentoring.

Here's also my first Koji scratch build:

    https://koji.fedoraproject.org/koji/taskinfo?taskID=27442987

Comment 1 Vít Ondruch 2018-06-06 10:26:51 UTC
I am not going to make a full review, but a few notes, since I already opened the .spec file:

* The Source0 is fishy. Why don't you get the sources from GitHub?
* What is the "Release" tag about? Why 0.scratch.1?
* Group tag is not needed anymore.
* Is the "Requires: libslopy" really required? This dependency should be autogenerated by RPM IMO.
* You should be following CMake guidelines [1].
* You should not need the %post/%postun sections anymore.



[1] https://fedoraproject.org/wiki/Packaging:Cmake

Comment 2 Alois Mahdal 2018-06-06 12:21:48 UTC
(In reply to Vít Ondruch from comment #1)
> I am not going to make a full review, but a few notes, since I already
> opened the .spec file:
> 
> * The Source0 is fishy. Why don't you get the sources from GitHub?
> * What is the "Release" tag about? Why 0.scratch.1?

Both issues are caused by the fact that I used my experimental "scratch" version of the SPEC where I use this silly Release and own fork.

> * Group tag is not needed anymore.
> * Is the "Requires: libslopy" really required? This dependency should be
> autogenerated by RPM IMO.
> * You should be following CMake guidelines [1].

Thanks!


> * You should not need the %post/%postun sections anymore.

I swear I saw it yesterday somewhere, but indeed, it's not in official PG so I must have been looking at wrong doc.



Anyway, thanks a lot for your notes, Vít, I'll post an updated version soon!

Comment 4 Vít Ondruch 2018-06-06 13:16:45 UTC
(In reply to Alois Mahdal from comment #2)
> (In reply to Vít Ondruch from comment #1)
> > * You should not need the %post/%postun sections anymore.
> 
> I swear I saw it yesterday somewhere, but indeed, it's not in official PG so
> I must have been looking at wrong doc.

It used to be needed:

https://fedoraproject.org/wiki/Changes/Removing_ldconfig_scriptlets

Comment 5 Vít Ondruch 2018-06-06 13:18:34 UTC
Actually, if you want to build your package for stable Fedoras and EPEL, you might consider to use these macros instead:

https://fedoraproject.org/wiki/Changes/Removing_ldconfig_scriptlets#Upgrade.2Fcompatibility_impact

They are likely documented somewhere in guidelines.

Comment 6 Alois Mahdal 2018-06-06 14:10:46 UTC
The linked page says:

> Packagers who want to support only Fedora 28+ in their spec files can
> remove scriptlets entirely. For the rest, they should switch to use newly
> created macros.

I removed them already (based on your feedback) without replacement it seems to have worked fine for F27 (I could install + use slop on F27 -- not sure if that is enough as a test).

Comment 7 Robert-André Mauchin 🐧 2018-06-25 14:04:26 UTC
 - Use a more meaningful name for your archive:

Source0:    https://github.com/naelstrof/slop/archive/v%{version}/%{name}-%{version}.tar.gz

 - The summary is too vague. Please be more descriptive about what this program do.

 - libslopy-devel should Requires libslopy:

%package -n libslopy-devel
Summary:    Select Operation
Requires:   libslopy%{?_isa} = %{version}-%{release}

 - If you package for F27, do use:

%ldconfig_scriptlets

 - Use a * instead of .gz as the compression can change in the future:
 
%{_mandir}/man1/slop.1.*

 - You must install the COPYING license file amd should install the README

%license COPYING license.txt
%doc README.md

Comment 8 Robert-André Mauchin 🐧 2018-06-25 14:36:48 UTC
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]: 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.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Apache (v2.0)", "MIT/X11 (BSD like)", "GPL (v3 or later)",
     "Unknown or generated". 34 files have unknown license. Detailed output
     of licensecheck in /home/bob/packaging/review/slop/review-
     slop/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.
[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 2 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 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 libslopy
     , libslopy-devel
[?]: 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 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: slop-7.4-1.fc29.x86_64.rpm
          libslopy-7.4-1.fc29.x86_64.rpm
          libslopy-devel-7.4-1.fc29.x86_64.rpm
          slop-debuginfo-7.4-1.fc29.x86_64.rpm
          slop-debugsource-7.4-1.fc29.x86_64.rpm
          slop-7.4-1.fc29.src.rpm
slop.x86_64: W: spelling-error %description -l en_US stdout -> stout, std out, std-out
libslopy.x86_64: W: spelling-error %description -l en_US stdout -> stout, std out, std-out
libslopy-devel.x86_64: W: spelling-error %description -l en_US stdout -> stout, std out, std-out
libslopy-devel.x86_64: W: no-documentation
slop.src: W: spelling-error %description -l en_US stdout -> stout, std out, std-out
6 packages and 0 specfiles checked; 0 errors, 5 warnings.

Comment 9 Alois Mahdal 2018-06-25 20:21:33 UTC
(In reply to Robert-André Mauchin from comment #7)
>  - Use a more meaningful name for your archive:
> 
> Source0:   
> https://github.com/naelstrof/slop/archive/v%{version}/%{name}-%{version}.tar.
> gz

Well I don't see how I can control that.  Upstream only provides this link, which I assume is auto-generated by GiitHub release scripting.


>  - The summary is too vague. Please be more descriptive about what this
> program do.

DONE.


>  - libslopy-devel should Requires libslopy:
> 
> %package -n libslopy-devel
> Summary:    Select Operation
> Requires:   libslopy%{?_isa} = %{version}-%{release}

I've added them back, although note that IIUC Vít's comment 1 seems to suggest that they should be generated by cmake, and with previous builds I could observe that was the case.


>  - If you package for F27, do use:
> 
> %ldconfig_scriptlets

DONE.

I was not sure if you meant that exact syntax, so I looked for examples and come to conclusion that it should be `%ldconfig_scriptlets -n libslopy`.


>  - Use a * instead of .gz as the compression can change in the future:
>  
> %{_mandir}/man1/slop.1.*

DONE.


>  - You must install the COPYING license file amd should install the README
> 
> %license COPYING license.txt
> %doc README.md

DONE.


~


Thanks, Robert-André, I'll provide updated files in few minutes.


(Note that I've updated my workstation to F28 in the meantime, so new examples will show that.)

Comment 10 Alois Mahdal 2018-06-25 20:29:28 UTC
Spec URL: http://file.vornet.cz/tmp/fedora-submit-slop/r7/slop.spec
SRPM URL: http://file.vornet.cz/tmp/fedora-submit-slop/r7/slop-7.4-1.fc28.src.rpm

Description: slop (Select Operation) is an application that queries for a selection from the user and prints the region to stdout.
Fedora Account System Username: netvor

Hi, this is my first package, I'll appreciate your mentoring.

Here's also my third Koji scratch build:

    https://koji.fedoraproject.org/koji/taskinfo?taskID=27863914

Comment 11 Robert-André Mauchin 🐧 2018-06-25 20:40:29 UTC
(In reply to Alois Mahdal from comment #9)
> (In reply to Robert-André Mauchin from comment #7)
> >  - Use a more meaningful name for your archive:
> > 
> > Source0:   
> > https://github.com/naelstrof/slop/archive/v%{version}/%{name}-%{version}.tar.
> > gz
> 
> Well I don't see how I can control that.  Upstream only provides this link,
> which I assume is auto-generated by GiitHub release scripting.
> 
> 

Github handles this kind of renaming, use the link I gave you.

Package is approved.

However I can't sponsor, you still need to find one. Try introducing youself to the devel mailing list and do some informal reviews to show that you understand the guideline.

Comment 12 Alois Mahdal 2018-06-25 22:15:26 UTC
(In reply to Robert-André Mauchin from comment #11)
> (In reply to Alois Mahdal from comment #9)
> > (In reply to Robert-André Mauchin from comment #7)
> > >  - Use a more meaningful name for your archive:
> > > 
> > > Source0:   
> > > https://github.com/naelstrof/slop/archive/v%{version}/%{name}-%{version}.tar.
> > > gz
> > 
> > Well I don't see how I can control that.  Upstream only provides this link,
> > which I assume is auto-generated by GiitHub release scripting.
> > 
> > 
> 
> Github handles this kind of renaming, use the link I gave you.

Oh, I see, there's redirect :-)

I've fixed that as well and will post the new version.


> Package is approved.
> 
> However I can't sponsor, you still need to find one. Try introducing youself
> to the devel mailing list and do some informal reviews to show that you
> understand the guideline.

I'll follow your advice; thanks for the review!

Comment 13 Alois Mahdal 2018-06-25 22:17:49 UTC
Spec URL: http://file.vornet.cz/tmp/fedora-submit-slop/r11/slop.spec
SRPM URL: http://file.vornet.cz/tmp/fedora-submit-slop/r11/slop-7.4-1.fc28.src.rpm

Description: slop (Select Operation) is an application that queries for a selection from the user and prints the region to stdout.
Fedora Account System Username: netvor

Hi, this is my first package, I'll appreciate your mentoring.

Here's also my fourth Koji scratch build:

    https://koji.fedoraproject.org/koji/taskinfo?taskID=27864676

Comment 14 Vít Ondruch 2018-06-26 07:53:24 UTC
(In reply to Alois Mahdal from comment #9)
> (In reply to Robert-André Mauchin from comment #7)
> >  - libslopy-devel should Requires libslopy:
> > 
> > %package -n libslopy-devel
> > Summary:    Select Operation
> > Requires:   libslopy%{?_isa} = %{version}-%{release}
> 
> I've added them back, although note that IIUC Vít's comment 1 seems to
> suggest that they should be generated by cmake, and with previous builds I
> could observe that was the case.

Sorry, my remark was quite brief without enough context. I was definitely referring to the main package only and I was not 100 % sure, because I have not checked it. This is how it looks in your last build:

~~~
$ rpm -qpR https://kojipkgs.fedoraproject.org//work/tasks/4677/27864677/libslopy-devel-7.4-1.fc28.x86_64.rpm | grep slop
libslopy.so.7.4()(64bit)
slop(x86-64) = 7.4-1.fc28
~~~

As you can see, there is autogenerated dependency on the library.

The -devel subpackage is a bit different case and it is explicitly mentioned in these chapters of guildeines:

https://fedoraproject.org/wiki/Packaging:Guidelines#Devel_Packages
https://fedoraproject.org/wiki/Packaging:Guidelines#Requiring_Base_Package

However, there is also the dependency autogenerated:

~~~
$ rpm -qpR https://kojipkgs.fedoraproject.org//work/tasks/4677/27864677/libslopy-devel-7.4-1.fc28.x86_64.rpm | grep slop
libslopy.so.7.4()(64bit)
slop(x86-64) = 7.4-1.fc28
~~~

So strictly speaking, it should not be required to specify the dependency explicitly. But it depends case by case, what is contained in which package.

Comment 15 Robert-André Mauchin 🐧 2018-06-28 18:14:00 UTC
Welcome to the packager group!

Comment 16 Alois Mahdal 2018-06-28 18:23:45 UTC
> 20:20 <+mboddu> netvor: Okay, here's what we can do, can you comment on both of the tickets that with you RH account saying that you want to give them to "netvor", that way we can verify/confirm it is you

Hi, I'd like to transfer this to my other identity, ie. @netvor under FAS.

Comment 17 Mohan Boddu 2018-06-28 19:38:05 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/slop

Comment 18 Mattia Verga 2021-06-10 09:12:36 UTC
Package imported, closing ticket.


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