Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1978515 - Review Request: dropwatch - monitor for dropped network packets in the kernel
Summary: Review Request: dropwatch - monitor for dropped network packets in the kernel
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mikel Olasagasti Uranga
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: FE-NEEDSPONSOR
TreeView+ depends on / blocked
 
Reported: 2021-07-02 04:06 UTC by Hangbin Liu
Modified: 2021-08-23 23:36 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:
mikel: fedora-review+


Attachments (Terms of Use)

Description Hangbin Liu 2021-07-02 04:06:34 UTC
Spec URL: 
https://src.fedoraproject.org/rpms/dropwatch/blob/f34/f/dropwatch.spec

SRPM URL: 
https://kojipkgs.fedoraproject.org/packages/dropwatch/1.5.3/4.fc34/src/dropwatch-1.5.3-4.fc34.src.rpm

Description: 
Dropwatch is the user space utility that interfaces to a new kernel netlink protocol for the purposes of monitoring the linux network stack for dropped packets.

This package was get retired as the previous owner Neil Horman left RedHat.
But the upstream status[1] is still active. Since this is still a useful feature
for networking debugging. And there is no replacement yet. I would like to make it keep building for Fedora.

Fedora Account System Username: liuhangbin

[1] https://github.com/nhorman/dropwatch

Comment 1 Hangbin Liu 2021-07-02 04:22:18 UTC
Oh, BTW, this will be the first package I own in Fedora. So looks like I need a sponsor (what this used for?) based on the wiki[1].

In RedHat I maintain packet libndp[2] and wireguard-tools[3].

[1] https://fedoraproject.org/wiki/Package_Review_Process#Contributor
[2] https://bugzilla.stage.redhat.com/show_bug.cgi?id=1983767
[3] https://bugzilla.stage.redhat.com/show_bug.cgi?id=1948893

Comment 2 Hangbin Liu 2021-07-02 04:29:02 UTC
(In reply to Hangbin Liu from comment #1)
> So looks like I need a sponsor (what this used for?) based on the wiki[1].

I just a little confused with the word "sponsor". From the wiki context, I think it means guarantor?

testing

https://bugzilla.stage.redhat.com/show_bug.cgi?id=1983767

Comment 3 Mikel Olasagasti Uranga 2021-07-02 09:19:21 UTC
Hi Hangbin,

The spec needs some updates and tweaks. I propose the following changes:

- Source0 returns 404

  -Source0: https://github.com/nhorman/dropwatch/archive/dropwatch-%{version}.tar.gz
  +Source0: https://github.com/nhorman/dropwatch/archive/v%{version}/%{name}-%{version}.tar.gz

- Split and order BuildRequires and Requires

- Add missing BuildRequires for gcc

- You can simplify using autosetup rather than setup

   %prep
  -%setup 
  -%patch0 -p1
  +%autosetup -p1

- Use make_build rather than make

  -make %{?_smp_mflags}
  +%make_build

- No need to remove buildroot

  -rm -rf $RPM_BUILD_ROOT
  
- Change $RPM_BUILD_ROOT variable to %{buildroot} macro to avoid mixing styles

- Use %license macro for license file

  -%doc COPYING
  +%license COPYING

- For next review link the raw spec file so fedora-review can directly fetch it

Comment 4 Artur Frenszek-Iwicki 2021-07-02 09:51:19 UTC
Looking at upstream sources, apart from "dropwatch", it is also possible to build the "dwdump" helper program.
That utility was added sometime between v1.5.1 and v1.5.2. Wonder why Neil didn't add it to the package.

Comment 5 Hangbin Liu 2021-07-02 10:36:36 UTC
(In reply to Artur Frenszek-Iwicki from comment #4)
> Looking at upstream sources, apart from "dropwatch", it is also possible to
> build the "dwdump" helper program.
> That utility was added sometime between v1.5.1 and v1.5.2. Wonder why Neil
> didn't add it to the package.

I also not sure about the reason, let me try to build it in.

Comment 6 Hangbin Liu 2021-07-02 10:41:42 UTC
BTW, I have a question about the account.

I already have an account at https://accounts.fedoraproject.org/user/liuhangbin/.
And I have signed the FPCA in the setting page. But when I try to fork the dropwatch
code in https://src.fedoraproject.org/rpms/dropwatch. It said I need to sign the PFCA
again with address https://admin.fedoraproject.org/accounts/. But I can't log in to this
site with my fedora account/passwd. Should I re-create a new account there?

Thanks
Hangbin

Comment 7 Hangbin Liu 2021-07-02 13:44:07 UTC
Hi Mikel,

Here are the updated spec file and SRPM:

SPEC URL: https://people.redhat.com/haliu/dropwatch/dropwatch.spec

SRPM URL: https://kojipkgs.fedoraproject.org//work/tasks/9845/71189845/dropwatch-1.5.3-5.fc34.src.rpm

Thanks
Hangbin

Comment 8 Mattia Verga 2021-07-02 16:23:03 UTC
(In reply to Hangbin Liu from comment #6)
> BTW, I have a question about the account.
> 
> I already have an account at
> https://accounts.fedoraproject.org/user/liuhangbin/.
> And I have signed the FPCA in the setting page. But when I try to fork the
> dropwatch
> code in https://src.fedoraproject.org/rpms/dropwatch. It said I need to sign
> the PFCA
> again with address https://admin.fedoraproject.org/accounts/. But I can't
> log in to this
> site with my fedora account/passwd. Should I re-create a new account there?
> 
> Thanks
> Hangbin

We recently switched the account system from admin.fedoraproject.org to accounts.fedoraproject.org so you don't need to create an account on the old system (you can't, the old system is also read only).

This is probably a bug in src.fpo.org looking for the FPCA agreement in the old place rather then in the new. Can you open a bug in https://pagure.io/fedora-infrastructure/issues for this?

Comment 9 Mikel Olasagasti Uranga 2021-07-02 20:24:36 UTC
Hi Hangbin,

One last thing and this should be complete.

- Use make_install macro

  -mkdir -p $RPM_BUILD_ROOT%{_bindir}
  -mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
  -install -m0755 src/dropwatch $RPM_BUILD_ROOT%{_bindir}
  -install -m0644 doc/dropwatch.1 $RPM_BUILD_ROOT%{_mandir}/man1
  -
  +%{make_install}

And then in %files you can change from * to binaries

  -%{_bindir}/*
  +%{_bindir}/dropwatch
  +%{_bindir}/dwdump

Same with man pages, but you'll need to patch doc/Makefile.am to include dwdump's man page with

  https://github.com/nhorman/dropwatch/commit/a6a152f111766afefcdf3a3ba271cdeb3f387553

You can use directly:

  Patch1: https://github.com/nhorman/dropwatch/pull/33.patch

Comment 10 Mikel Olasagasti Uranga 2021-07-02 20:30:12 UTC
And also remember to split and order BuildRequires and Requires so it's easier to read

Comment 11 Hangbin Liu 2021-07-05 03:39:04 UTC
(In reply to Mattia Verga from comment #8)
> We recently switched the account system from admin.fedoraproject.org to
> accounts.fedoraproject.org so you don't need to create an account on the old
> system (you can't, the old system is also read only).
> 
> This is probably a bug in src.fpo.org looking for the FPCA agreement in the
> old place rather then in the new. Can you open a bug in
> https://pagure.io/fedora-infrastructure/issues for this?

Thanks, I just opened https://pagure.io/fedora-infrastructure/issue/10069

Comment 12 Hangbin Liu 2021-07-05 04:00:55 UTC
(In reply to Mikel Olasagasti Uranga from comment #10)
> And also remember to split and order BuildRequires and Requires so it's
> easier to read

Do you have any suggestions about how to split and order the BuildRequires?
I just split them by functional. e.g.

BuildRequires: autoconf automake make gcc pkgconfig
BuildRequires: kernel-headers
BuildRequires: libtool
BuildRequires: binutils-devel readline-devel libpcap-devel libnl3-devel

Requires: libnl3
Requires: readline

Comment 13 Hangbin Liu 2021-07-05 06:11:11 UTC
(In reply to Mikel Olasagasti Uranga from comment #9)
> Hi Hangbin,
> 
> One last thing and this should be complete.
> 
> - Use make_install macro
> 
>   -mkdir -p $RPM_BUILD_ROOT%{_bindir}
>   -mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
>   -install -m0755 src/dropwatch $RPM_BUILD_ROOT%{_bindir}
>   -install -m0644 doc/dropwatch.1 $RPM_BUILD_ROOT%{_mandir}/man1
>   -
>   +%{make_install}
> 
> And then in %files you can change from * to binaries
> 
>   -%{_bindir}/*
>   +%{_bindir}/dropwatch
>   +%{_bindir}/dwdump
> 
> Same with man pages, but you'll need to patch doc/Makefile.am to include
> dwdump's man page with
> 
>  
> https://github.com/nhorman/dropwatch/commit/
> a6a152f111766afefcdf3a3ba271cdeb3f387553
> 
> You can use directly:
> 
>   Patch1: https://github.com/nhorman/dropwatch/pull/33.patch

Hi Mikel,

With the new spec file like

%install
%{make_install}

%files
%{_bindir}/dropwatch
%{_bindir}/dwdump
%{_mandir}/man1/dropwatch.1
%{_mandir}/man1/dwdump.1
%doc README.md
%license COPYING

I got failures [1]

"""
Making install in doc
make[1]: Entering directory '/builddir/build/BUILD/dropwatch-1.5.3/doc'
make[2]: Entering directory '/builddir/build/BUILD/dropwatch-1.5.3/doc'
make[2]: Nothing to be done for 'install-exec-am'.
 /usr/bin/mkdir -p '/builddir/build/BUILDROOT/dropwatch-1.5.3-5.fc34.x86_64/usr/share/man/man1'
 /usr/bin/install -p -m 644 dropwatch.1 dwdump.1 '/builddir/build/BUILDROOT/dropwatch-1.5.3-5.fc34.x86_64/usr/share/man/man1'
make[2]: Leaving directory '/builddir/build/BUILD/dropwatch-1.5.3/doc'
make[1]: Leaving directory '/builddir/build/BUILD/dropwatch-1.5.3/doc'

[...]

Processing files: dropwatch-1.5.3-5.fc34.x86_64
error: File not found: /builddir/build/BUILDROOT/dropwatch-1.5.3-5.fc34.x86_64/usr/share/man/man1/dropwatch.1
error: File not found: /builddir/build/BUILDROOT/dropwatch-1.5.3-5.fc34.x86_64/usr/share/man/man1/dwdump.1
"""

Do you know what I missed?

[1] https://kojipkgs.fedoraproject.org//work/tasks/3309/71323309/build.log

Thanks
Hangbin

Comment 14 Mikel Olasagasti Uranga 2021-07-05 08:44:38 UTC
Hi Hangbin,

> Do you have any suggestions about how to split and order the BuildRequires?

A *Require per line and you can order them alphabetically or using some logic like build tools first, needed libs after for example.

> Do you know what I missed?

Man files are installed as .gz files, so in that case you should add 

%{_mandir}/man1/dropwatch.1.gz
%{_mandir}/man1/dwdump.1.gz

Comment 15 Hangbin Liu 2021-07-05 09:37:38 UTC
(In reply to Mikel Olasagasti Uranga from comment #14)
> Hi Hangbin,
> 
> > Do you have any suggestions about how to split and order the BuildRequires?
> 
> A *Require per line and you can order them alphabetically or using some
> logic like build tools first, needed libs after for example.
> 
> > Do you know what I missed?
> 
> Man files are installed as .gz files, so in that case you should add 
> 
> %{_mandir}/man1/dropwatch.1.gz
> %{_mandir}/man1/dwdump.1.gz

Ah, thanks for this reminder.

Here are the updated spec file and SRPM:

SPEC URL: https://people.redhat.com/haliu/dropwatch/dropwatch.spec

SRPM URL: https://kojipkgs.fedoraproject.org//work/tasks/5733/71335733/dropwatch-1.5.3-5.fc34.src.rpm

Scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=71335728

Comment 16 Mikel Olasagasti Uranga 2021-07-05 10:30:19 UTC
Hi Hangbin,

- Two obsoleted m4 macros are used, you may want to report that upstream.
- As Makefile.am is LGPLv2, you should add that license also in the spec or ask upstream to change to GPLv2 to match the rest of the code. Fix this before pushing the new spec to git.

Adding fedora-review+

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", "GNU General Public License, Version
     2", "GNU Lesser General Public License v2.1 or later [obsolete FSF
     postal address (Temple Place)]". 18 files have unknown license.
     Detailed output of licensecheck in
     /tmp/dropwatch/1978515-dropwatch/licensecheck.txt
[-]: 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.
[x]: 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.
[-]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[x]: 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 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 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]: 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.
[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.
[x]: 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]: 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:
[!]: Package should not use obsolete m4 macros
     Note: Some obsoleted macros found, see the attachment.
     See: https://fedorahosted.org/FedoraReview/wiki/AutoTools
[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: dropwatch-1.5.3-5.fc35.x86_64.rpm
          dropwatch-debuginfo-1.5.3-5.fc35.x86_64.rpm
          dropwatch-debugsource-1.5.3-5.fc35.x86_64.rpm
          dropwatch-1.5.3-5.fc35.src.rpm
dropwatch.x86_64: E: explicit-lib-dependency libnl3
4 packages and 0 specfiles checked; 1 errors, 0 warnings.




Rpmlint (debuginfo)
-------------------
Checking: dropwatch-debuginfo-1.5.3-5.fc35.x86_64.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.





Rpmlint (installed packages)
----------------------------
Cannot parse rpmlint output:


Source checksums
----------------
https://github.com/nhorman/dropwatch/archive/v1.5.3/dropwatch-1.5.3.tar.gz :
  CHECKSUM(SHA256) this package     : b748b66a816c1f94531446c0451da5461a4a31b0949244bb867d741c6ac0148b
  CHECKSUM(SHA256) upstream package : b748b66a816c1f94531446c0451da5461a4a31b0949244bb867d741c6ac0148b


Requires
--------
dropwatch (rpmlib, GLIBC filtered):
    glibc
    libc.so.6()(64bit)
    libnl-3.so.200()(64bit)
    libnl-3.so.200(libnl_3)(64bit)
    libnl-genl-3.so.200()(64bit)
    libnl-genl-3.so.200(libnl_3)(64bit)
    libnl3
    libpcap.so.1()(64bit)
    libreadline.so.8()(64bit)
    readline
    rtld(GNU_HASH)

dropwatch-debuginfo (rpmlib, GLIBC filtered):

dropwatch-debugsource (rpmlib, GLIBC filtered):



Provides
--------
dropwatch:
    dropwatch
    dropwatch(x86-64)

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

dropwatch-debugsource:
    dropwatch-debugsource
    dropwatch-debugsource(x86-64)



AutoTools: Obsoleted m4s found
------------------------------
  AM_CONFIG_HEADER found in: dropwatch-1.5.3/configure.ac:3
  AM_PROG_LIBTOOL found in: dropwatch-1.5.3/configure.ac:7


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

Comment 17 Artur Frenszek-Iwicki 2021-07-05 10:35:01 UTC
> Man files are installed as .gz files, so in that case you should add 
> 
> %{_mandir}/man1/dropwatch.1.gz
> %{_mandir}/man1/dwdump.1.gz

Sorry, but no.
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_manpages

> When installing man pages, note that RPM will re-compress them into its preferred format.
> So the %files section MUST reference manpages with a pattern that takes this into account:
>
>%files
>%{_mandir}/man1/foo.1*

Comment 18 Mikel Olasagasti Uranga 2021-07-05 10:41:22 UTC
Good catch Artur! My fault.

Hangbin, as Artur commented, change the manpages from 1.gz to 1*

Comment 19 Hangbin Liu 2021-07-06 09:28:48 UTC
(In reply to Mikel Olasagasti Uranga from comment #16)
> Hi Hangbin,
> 
> - Two obsoleted m4 macros are used, you may want to report that upstream.

Thanks, I will see how to fix it and post to upstream

> - As Makefile.am is LGPLv2, you should add that license also in the spec or
> ask upstream to change to GPLv2 to match the rest of the code. Fix this
> before pushing the new spec to git.

I'd prefer to update the license to spec file first and open an issue upstream to see if Neil would like to update the license.

Here are the updated spec file(update license to LGPLv2, fixes the manpage to 1*) and SRPM:

SPEC URL: https://people.redhat.com/haliu/dropwatch/dropwatch.spec

SRPM URL: https://kojipkgs.fedoraproject.org//work/tasks/323/71390323/dropwatch-1.5.3-5.fc34.src.rpm

Scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=71390322

Comment 20 Mikel Olasagasti Uranga 2021-07-06 10:15:08 UTC
Thanks for fixing those Hangbin. 

Adding fedora-review+

Comment 21 Hangbin Liu 2021-07-09 09:30:21 UTC
(In reply to Mikel Olasagasti Uranga from comment #20)
> Thanks for fixing those Hangbin. 
> 
> Adding fedora-review+

Thanks Mikel for the review. Is there anything else I should do for the next step?

Comment 22 Artur Frenszek-Iwicki 2021-07-09 10:07:27 UTC
Since this a re-review for unretiring a package, instead of a new package submission, the next step is to file a ticket with releng.
https://pagure.io/releng/new_issue?template=package_unretirement&title=Unretire%20dropwatch

Comment 23 Hangbin Liu 2021-07-12 09:54:49 UTC
(In reply to Artur Frenszek-Iwicki from comment #22)
> Since this a re-review for unretiring a package, instead of a new package
> submission, the next step is to file a ticket with releng.
> https://pagure.io/releng/
> new_issue?template=package_unretirement&title=Unretire%20dropwatch

Thanks Artur and Mikel. My ticket[1] has been resolved.

[1] https://pagure.io/releng/issue/10207

Hangbin

Comment 24 Jeff Fearn 🐞 2021-08-23 22:30:42 UTC
Bug 1983767


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