Bug 1919347 - Review Request: crash-gcore-command - Gcore extension module for the crash utility
Summary: Review Request: crash-gcore-command - Gcore extension module for the crash ut...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Nathan Scott
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: FE-NEEDSPONSOR
TreeView+ depends on / blocked
 
Reported: 2021-01-22 16:00 UTC by d.hatayama
Modified: 2022-02-21 09:53 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-02-21 09:53:10 UTC
Type: ---
Embargoed:
nathans: fedora-review+


Attachments (Terms of Use)

Description d.hatayama 2021-01-22 16:00:22 UTC
Spec URL: http://raw.githubusercontent.com/d-hatayama/crash-modules-fedora-package-review/master/crash-gcore-command.spec
SRPM URL: https://github.com/d-hatayama/crash-modules-fedora-package-review/raw/master/crash-gcore-command-1.6.2-0.fc33.src.rpm
Description: Command for creating a core dump file of a user-space task that was
running in a kernel dump file.
Fedora Account System Username: dhat180

Comment 1 d.hatayama 2021-01-22 16:11:15 UTC
This is the first package review for me along with BZ#1919349.

Note that I'm the upstream maintainer of this.

Comment 2 Vladislav Kazakov 2021-01-23 15:03:25 UTC
Hello. Thanks for bringing your package to Fedora!
I will make a couple of comments on your spec while you wait for a actual reviewer.

It's better to start versioning your libraries. As the upstream maintainer you can do that. Please, see:
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_downstream_so_name_versioning

> Release: 0%{?dist}
Release: tag starting with 1 (never 0).

> ExclusiveArch: x86_64 aarch64
What about other arches? Crash supports other arches too.
As stated in Packaging Guidlines, "Fedora packagers should make every effort to support all primary architectures".

> BuildRequires: crash-devel >= 5.1.5
All build dependencies must be listed in BuildRequires, except for any that are listed in the exceptions section of the Packaging Guidelines.
You need at least gcc.

> make -C src -f gcore.mk
Whenever possible, invocations of make should be done as %make_build.

> %defattr(-,root,root)
The %defattr directive in the %files list SHOULD ONLY be used when setting a non-default value, or to reset to the default value after having set a non-default value.

> %doc COPYING
It's more license than doc, so you can use %license here. 
You can set REAMDE as %doc for example.

Comment 3 Vladislav Kazakov 2021-01-23 15:07:41 UTC
Also you need a sponsor to become a packager.
Some potential sponsors will look at the FE-NEEDSPONSOR bug in Bugzilla to find packages to review. You can add your package to this list by editing your review request bug (which will be created once you click 'Commit' on the form) and adding FE-NEEDSPONSOR in the 'Blocks' field.

https://fedoraproject.org/wiki/Join_the_package_collection_maintainers#Create_Your_Review_Request
https://fedoraproject.org/wiki/How_to_get_sponsored_into_the_packager_group

Comment 4 d.hatayama 2021-01-27 13:29:27 UTC
Thanks for your comments, Vladislav.

(In reply to Vladislav Kazakov from comment #2)
> Hello. Thanks for bringing your package to Fedora!
> I will make a couple of comments on your spec while you wait for a actual
> reviewer.
> 
> It's better to start versioning your libraries. As the upstream maintainer
> you can do that. Please, see:
> https://docs.fedoraproject.org/en-US/packaging-guidelines/
> #_downstream_so_name_versioning

I'll do this in the upstream. But I have one question. Is it acceptable in
this package review to compose the source rpm with the tar file that has not
been released yet? The question is because I want to avoid repeating releasing
new versions during this review. Of course, I'll use a released version
after I could complete this package review.

> 
> > Release: 0%{?dist}
> Release: tag starting with 1 (never 0).
> 
> > ExclusiveArch: x86_64 aarch64
> What about other arches? Crash supports other arches too.
> As stated in Packaging Guidlines, "Fedora packagers should make every effort
> to support all primary architectures".

The archs crash gcore command supports differ from the ones crash does,
but reconsidering futher, crash gcore command needs to support ppc64le also.
I'll add ppc64le in the next version.

> 
> > BuildRequires: crash-devel >= 5.1.5
> All build dependencies must be listed in BuildRequires, except for any that
> are listed in the exceptions section of the Packaging Guidelines.
> You need at least gcc.

I see. I'll add gcc and test whether mock build succeeds.

> 
> > make -C src -f gcore.mk
> Whenever possible, invocations of make should be done as %make_build.
> 
> > %defattr(-,root,root)
> The %defattr directive in the %files list SHOULD ONLY be used when setting a
> non-default value, or to reset to the default value after having set a
> non-default value.
> 
> > %doc COPYING
> It's more license than doc, so you can use %license here. 
> You can set REAMDE as %doc for example.

And I see the remaining comments.

Thanks.
HATAYAMA, Daisuke

Comment 5 d.hatayama 2021-01-28 04:06:38 UTC
Vladislav,

(In reply to d.hatayama from comment #4)
> Thanks for your comments, Vladislav.
> 
> (In reply to Vladislav Kazakov from comment #2)
> > Hello. Thanks for bringing your package to Fedora!
> > I will make a couple of comments on your spec while you wait for a actual
> > reviewer.
> > 
> > It's better to start versioning your libraries. As the upstream maintainer
> > you can do that. Please, see:
> > https://docs.fedoraproject.org/en-US/packaging-guidelines/
> > #_downstream_so_name_versioning
> 
> I'll do this in the upstream. But I have one question. Is it acceptable in
> this package review to compose the source rpm with the tar file that has not
> been released yet? The question is because I want to avoid repeating
> releasing
> new versions during this review. Of course, I'll use a released version
> after I could complete this package review.

I overlooked the following sentence saying the version is not needed for plugins.

    In cases where upstream ships unversioned .so library (so this is not needed for plugins, drivers, etc.), the packager MUST try to convince upstream to start versioning it.
                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
That is, gcore.so provided by crash-gcore-command is a plugin, so I think there is no need to do this here.

This is same for trace.so provided by crash-trace-command in BZ#1919349.

On the other hand, rpmlint shows warning if solib has no soname, so I'll add soname in the upstream.

Thanks.
HATAYAMA, Daisuke

Comment 6 d.hatayama 2021-01-28 05:47:20 UTC
I'll reflect the comments from Vladislav.

Please refer to the latest versions from the following URLs:

Spec URL: http://raw.githubusercontent.com/d-hatayama/crash-modules-fedora-package-review/master/crash-gcore-command.spec
SRPM URL:  https://github.com/d-hatayama/crash-modules-fedora-package-review/raw/master/crash-gcore-command-1.6.2-1.fc33.src.rpm

I didn't do SONAME versioning because gcore.so is a plugin but did mark trace.so with DT_SOLIB at https://github.com/fujitsu/crash-gcore/commit/ea725fc4247db9464f1391a339e16fb6f2d2cf78.
If it's necessary to include this, I'll do it at the end of this package review.

Thanks.
HATAYAMA, Daisuke

Comment 7 Dominik 'Rathann' Mierzejewski 2021-01-30 20:19:11 UTC
Please use %make_build instead of plain `make' in %build unless you have a good reason.

Please use install -dm755 instead of `mkdir -p' in %install.

Comment 8 lijiang 2021-02-01 06:54:30 UTC
Hi, Hatayama

Maybe it might look like this according to Dominik's comment#7.

%build
%make_build -C src -f gcore.mk

%install
install -dm755 %{buildroot}%{_libdir}/crash/extensions/
install -m 0755 -t %{buildroot}%{_libdir}/crash/extensions/ %{_builddir}/%{reponame}-%{version}/src/gcore.so


In addition, I also noticed that some content should be updated in the README, because we have planned to support on the x86_64/aarch64/ppc64le architectures, for example:

Support Range
~~~~~~~~~~~~~
 | ARCH           | X86, X86_64                                  |
 | Kernel Version | RHEL4.8, RHEL5.5, RHEL6.0 and Vanilla 2.6.36 |


BTW: would you mind checking that the following dependencies of packages should be added to the build requires?

BuildRequires: zlib-devel lzo-devel snappy-devel

Anyway, I saw that the above dependencies are in RHEL, but not sure if this is also necessary in Fedora.


Thanks.

Comment 9 d.hatayama 2021-02-02 12:29:38 UTC
Dominik, Lianbo,

Thanks for your comments.

I've updated the spec file and source rpm file.

Spec URL: http://raw.githubusercontent.com/d-hatayama/crash-modules-fedora-package-review/master/crash-gcore-command.spec
SRPM URL:  https://github.com/d-hatayama/crash-modules-fedora-package-review/raw/master/crash-gcore-command-1.6.2-1.fc33.src.rpm

(In reply to Dominik 'Rathann' Mierzejewski from comment #7)
> Please use %make_build instead of plain `make' in %build unless you have a
> good reason.
> 
> Please use install -dm755 instead of `mkdir -p' in %install.

As Lianbo mentioned, I didn't update the spec file. Sorry.

I confirmed this time I've updated both.

(In reply to lijiang from comment #8)
> Hi, Hatayama
> 
> Maybe it might look like this according to Dominik's comment#7.
> 
> %build
> %make_build -C src -f gcore.mk
> 
> %install
> install -dm755 %{buildroot}%{_libdir}/crash/extensions/
> install -m 0755 -t %{buildroot}%{_libdir}/crash/extensions/
> %{_builddir}/%{reponame}-%{version}/src/gcore.so
> 
> 
> In addition, I also noticed that some content should be updated in the
> README, because we have planned to support on the x86_64/aarch64/ppc64le
> architectures, for example:
> 
> Support Range
> ~~~~~~~~~~~~~
>  | ARCH           | X86, X86_64                                  |
>  | Kernel Version | RHEL4.8, RHEL5.5, RHEL6.0 and Vanilla 2.6.36 |

I'm aware of this. This README is very old. I had not intended to put
this in public. I think I'll update this soon in the upstream but not
during this review because the README is not shipped with the rpm package.

> BTW: would you mind checking that the following dependencies of packages
> should be added to the build requires?
> 
> BuildRequires: zlib-devel lzo-devel snappy-devel

I intentionally dropped these dependencies because gcore.so doesn't need
these packages; actually not linked with these compression libraries
corresponding to each package at runtime.

I think the current configuration that only crash and crash-devel has build
dependencies for zlib-devel, lzo-devel and snappy-devel is correct.

Thanks.
HATAYAMA, Daisuke

Comment 10 Nathan Scott 2021-02-04 04:06:26 UTC
Hi Hatayama,

I've completed the first round of 'formal' review now.  In addition to the
docs topic discussed earlier (mentioned below in the review re %doc files,
up to you whether you want to include that README) there's one other small
issue worth fixing, i.e.

No package seems to own the crash/extensions directory?

$ rpm -qf /usr/lib64/crash
file /usr/lib64/crash is not owned by any package

You can add ownership of these to your new package (it is OK if multiple
packages own these directories too BTW - although ideally 'crash' itself
would have provided them I guess) - by adding the following to %files ..

%dir %{_libdir}/crash
%dir %{_libdir}/crash/extensions



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.
[-]: Development (unversioned) .so files in -devel subpackage, if present.
     Note: Unversioned so-files in private %_libdir subdirectory (see
     attachment). Verify they are not in ld path.
(gcore.so is a crash plugin, not intended for general developers use)
[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 successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[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 requires other packages for directories it uses.
     Note: No known owner of /usr/lib64/crash/extensions, /usr/lib64/crash
[!]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/lib64/crash,
     /usr/lib64/crash/extensions
[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.
[x]: Package complies to the Packaging Guidelines
[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 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]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 0 bytes in 0 files.
[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).
[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.
[-]: 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]: 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: 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: crash-gcore-command-1.6.2-1.fc33.x86_64.rpm
          crash-gcore-command-debuginfo-1.6.2-1.fc33.x86_64.rpm
          crash-gcore-command-debugsource-1.6.2-1.fc33.x86_64.rpm
          crash-gcore-command-1.6.2-1.fc33.src.rpm
crash-gcore-command.x86_64: W: no-documentation
4 packages and 0 specfiles checked; 0 errors, 1 warnings.




Rpmlint (debuginfo)
-------------------
Checking: crash-gcore-command-debuginfo-1.6.2-1.fc33.x86_64.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.





Rpmlint (installed packages)
----------------------------
crash-gcore-command.x86_64: W: no-documentation
3 packages and 0 specfiles checked; 0 errors, 1 warnings.



Unversioned so-files
--------------------
crash-gcore-command: /usr/lib64/crash/extensions/gcore.so

Source checksums
----------------
https://github.com/fujitsu/crash-gcore/archive/v1.6.2/crash-gcore-command-1.6.2.tar.gz :
  CHECKSUM(SHA256) this package     : 11a804b64c7161859ac81e5d157dc5f6075255a4cc761064a8d84b96fefe1b8e
  CHECKSUM(SHA256) upstream package : 11a804b64c7161859ac81e5d157dc5f6075255a4cc761064a8d84b96fefe1b8e


Requires
--------
crash-gcore-command (rpmlib, GLIBC filtered):
    crash
    libc.so.6()(64bit)
    rtld(GNU_HASH)

crash-gcore-command-debuginfo (rpmlib, GLIBC filtered):

crash-gcore-command-debugsource (rpmlib, GLIBC filtered):



Provides
--------
crash-gcore-command:
    crash-gcore-command
    crash-gcore-command(x86-64)

crash-gcore-command-debuginfo:
    crash-gcore-command-debuginfo
    crash-gcore-command-debuginfo(x86-64)
    debuginfo(build-id)

crash-gcore-command-debugsource:
    crash-gcore-command-debugsource
    crash-gcore-command-debugsource(x86-64)



Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10
Command line :/usr/bin/fedora-review -c -p -n crash-gcore-command
Buildroot used: fedora-rawhide-x86_64
Active plugins: C/C++, Shell-api, Generic
Disabled plugins: PHP, Perl, Python, Java, Ocaml, R, SugarActivity, fonts, Haskell
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 11 d.hatayama 2021-02-04 09:27:51 UTC
Nathan,

Thanks for your reviewing.

(In reply to Nathan Scott from comment #10)
> Hi Hatayama,
> 
> I've completed the first round of 'formal' review now.  In addition to the
> docs topic discussed earlier (mentioned below in the review re %doc files,

As I mentioned before, I don't think I add README in the rpm package
for the time being.

> up to you whether you want to include that README) there's one other small
> issue worth fixing, i.e.
> 
> No package seems to own the crash/extensions directory?
> 
> $ rpm -qf /usr/lib64/crash
> file /usr/lib64/crash is not owned by any package
> 
> You can add ownership of these to your new package (it is OK if multiple
> packages own these directories too BTW - although ideally 'crash' itself
> would have provided them I guess) - by adding the following to %files ..
> 
> %dir %{_libdir}/crash
> %dir %{_libdir}/crash/extensions

I've added these lines just as indicated.

Here's the update:

Spec URL: http://raw.githubusercontent.com/d-hatayama/crash-modules-fedora-package-review/master/crash-gcore-command.spec
SRPM URL:  https://github.com/d-hatayama/crash-modules-fedora-package-review/raw/master/crash-gcore-command-1.6.2-1.fc33.src.rpm

Thanks.
HATAYAMA, Daisuke

Comment 12 Nathan Scott 2021-02-05 05:30:34 UTC
Looks good!

Comment 13 Mohan Boddu 2021-02-17 14:38:09 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/crash-gcore-command

Comment 14 Mattia Verga 2022-02-21 09:53:10 UTC
Package is available in repositories, closing.


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