Bug 2254920

Summary: Review Request: perl-Net-Async-WebSocket - Use WebSockets with IO::Async
Product: [Fedora] Fedora Reporter: Chris Adams <linux>
Component: Package ReviewAssignee: Petr Pisar <ppisar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: package-review, ppisar
Target Milestone: ---Flags: ppisar: fedora-review+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-04-25 00:59:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2254934    

Description Chris Adams 2023-12-17 22:40:56 UTC
Spec URL: https://cmadams.fedorapeople.org/perl-Net-Async-WebSocket/perl-Net-Async-WebSocket.spec
SRPM URL: https://cmadams.fedorapeople.org/perl-Net-Async-WebSocket/perl-Net-Async-WebSocket-0.13-1.fc39.src.rpm
Description:
This distribution provides modules that implement the WebSocket protocol,
and allows either servers or clients to be written based on IO::Async.

Fedora Account System Username: cmadams

Comment 4 Petr Pisar 2024-04-15 08:01:55 UTC
URL and Source0 addresses are usable. Ok.
Source0 archive (SHA-512 fa9d35f98fced11c7c5f63637d7fc77d52ac5ba44e33dba2df510b470e2c9c440591f537654b9a7e49360ea207c60cae57ea9558460b91ccf4bdba34199d092b) is original. Ok.
Summary verified from lib/Net/Async/WebSocket.pm. Ok.
Documentation verified from lib/Net/Async/WebSocket.pm. Ok.
License verified from Build.PL, LICENSE, lib/Net/Async/WebSocket.pm, lib/Net/Async/WebSocket/Client.pm, lib/Net/Async/WebSocket/Protocol.pm, lib/Net/Async/WebSocket/Server.pm. Ok.
No XS code, noarch BuildArch is Ok.

FIX: Do not depend on 'perl(URI::_server)'. It is a fallback if 'perl(URI::wss)' is not available, but you already depend on 'perl(URI::wss)' (lib/Net/Async/WebSocket/Client.pm:22).
FIX: Do not build-require 'perl(IO::Async::SSL)'. It's not used at tests.

All tests pass. Ok.

$ rpmlint perl-Net-Async-WebSocket.spec ../SRPMS/perl-Net-Async-WebSocket-0.13-4.fc41.src.rpm ../RPMS/noarch/perl-Net-Async-WebSocket-0.13-4.fc41.noarch.rpm 
======================================== rpmlint session starts =======================================
rpmlint: 2.5.0
configuration:
    /usr/lib/python3.12/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 32, packages: 3

=== 2 packages and 1 specfiles checked; 0 errors, 0 warnings, 6 filtered, 0 badness; has taken 0.3 s ==
rpmlint is Ok.

$ rpm -q -lv -p ../RPMS/noarch/perl-Net-Async-WebSocket-0.13-4.fc41.noarch.rpm
drwxr-xr-x    2 root     root                        0 Mar  8 01:00 /usr/share/doc/perl-Net-Async-WebSocket
-rw-r--r--    1 root     root                     2543 Oct 11  2018 /usr/share/doc/perl-Net-Async-WebSocket/Changes
-rw-r--r--    1 root     root                      602 Oct 11  2018 /usr/share/doc/perl-Net-Async-WebSocket/README
drwxr-xr-x    2 root     root                        0 Oct 11  2018 /usr/share/doc/perl-Net-Async-WebSocket/examples
-rw-r--r--    1 root     root                      521 Oct 11  2018 /usr/share/doc/perl-Net-Async-WebSocket/examples/echo-server.pl
-rw-r--r--    1 root     root                      766 Oct 11  2018 /usr/share/doc/perl-Net-Async-WebSocket/examples/stdio-client.pl
drwxr-xr-x    2 root     root                        0 Mar  8 01:00 /usr/share/licenses/perl-Net-Async-WebSocket
-rw-r--r--    1 root     root                    18418 Oct 11  2018 /usr/share/licenses/perl-Net-Async-WebSocket/LICENSE
-rw-r--r--    1 root     root                     1117 Mar  8 01:00 /usr/share/man/man3/Net::Async::WebSocket.3pm.gz
-rw-r--r--    1 root     root                     1716 Mar  8 01:00 /usr/share/man/man3/Net::Async::WebSocket::Client.3pm.gz
-rw-r--r--    1 root     root                     2115 Mar  8 01:00 /usr/share/man/man3/Net::Async::WebSocket::Protocol.3pm.gz
-rw-r--r--    1 root     root                     1686 Mar  8 01:00 /usr/share/man/man3/Net::Async::WebSocket::Server.3pm.gz
drwxr-xr-x    2 root     root                        0 Mar  8 01:00 /usr/share/perl5/vendor_perl/Net/Async/WebSocket
-rw-r--r--    1 root     root                      926 Mar  8 01:00 /usr/share/perl5/vendor_perl/Net/Async/WebSocket.pm
-rw-r--r--    1 root     root                     4657 Mar  8 01:00 /usr/share/perl5/vendor_perl/Net/Async/WebSocket/Client.pm
-rw-r--r--    1 root     root                     5832 Mar  8 01:00 /usr/share/perl5/vendor_perl/Net/Async/WebSocket/Protocol.pm
-rw-r--r--    1 root     root                     3792 Mar  8 01:00 /usr/share/perl5/vendor_perl/Net/Async/WebSocket/Server.pm
FIX: Own %{perl_vendorlib}/Net and %{perl_vendorlib}/Net/Async directories.

$ rpm -q --requires -p ../RPMS/noarch/perl-Net-Async-WebSocket-0.13-4.fc41.noarch.rpm | sort -f | uniq -c
      1 perl(:VERSION) >= 5.10.0
      1 perl(base)
      1 perl(Carp)
      1 perl(IO::Async::Listener)
      1 perl(IO::Async::Stream)
      1 perl(Net::Async::WebSocket::Protocol)
      1 perl(Protocol::WebSocket::Frame)
      1 perl(Protocol::WebSocket::Handshake::Client)
      1 perl(Protocol::WebSocket::Handshake::Server)
      1 perl(Scalar::Util)
      1 perl(strict)
      1 perl(Sub::Util) >= 1.40
      1 perl(URI)
      1 perl(URI::wss)
      1 perl(warnings)
      1 perl-libs
      1 rpmlib(CompressedFileNames) <= 3.0.4-1
      1 rpmlib(FileDigests) <= 4.6.0-1
      1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
      1 rpmlib(PayloadIsZstd) <= 5.4.18-1
TODO: Constrain 'perl(IO::Async::Listener)' with '>= 0.61' (Build.PL:12).
TODO: Constrain 'perl(IO::Async::Stream)' with '>= 0.34' (Build.PL:14).
TODO: Run-require 'perl(Protocol::WebSocket) >= 0.22' or 'perl-Protocol-WebSocket >= 0.22' (Build.PL:15). It's not directly used, but it's the only versioned module from perl-Protocol-WebSocket package which provides used perl(Protocol::WebSocket::Frame).

$ rpm -q --recommends -p ../RPMS/noarch/perl-Net-Async-WebSocket-0.13-4.fc41.noarch.rpm | sort -f | uniq -c
      1 perl(IO::Async::SSL)
Binary recommends are Ok.

$ rpm -q --provides -p ../RPMS/noarch/perl-Net-Async-WebSocket-0.13-4.fc41.noarch.rpm | sort -f | uniq -c
      1 perl(Net::Async::WebSocket) = 0.13
      1 perl(Net::Async::WebSocket::Client) = 0.13
      1 perl(Net::Async::WebSocket::Protocol) = 0.13
      1 perl(Net::Async::WebSocket::Server) = 0.13
      1 perl-Net-Async-WebSocket = 0.13-4.fc41
Binary provides are Ok.

$ resolvedeps rawhide ../RPMS/noarch/perl-Net-Async-WebSocket-0.13-4.fc41.noarch.rpm 
Binary dependencies are resolvable. Ok.

The package builds in Fedora 41 (https://koji.fedoraproject.org/koji/taskinfo?taskID=116392900). Ok.

Otherwise, the package is in line with Fedora and Perl packaging guidelines.
Please correct all FIX items, consider fixing TODO items and provide an updates spec file.

Comment 5 Chris Adams 2024-04-16 00:21:36 UTC
Bumped release for spec file cleanups:
Spec URL: https://cmadams.fedorapeople.org/perl-Net-Async-WebSocket/perl-Net-Async-WebSocket.spec
SRPM URL: https://cmadams.fedorapeople.org/perl-Net-Async-WebSocket/perl-Net-Async-WebSocket-0.13-5.fc39.src.rpm

I am trying to learn from what you find so you don't have to keep finding it - I guess I'm still not quite there. :) Thanks for all your help!

Comment 6 Petr Pisar 2024-04-16 11:02:59 UTC
> I am trying to learn from what you find so you don't have to keep finding it - I guess I'm still not quite there. :)

Not a problem. You are getting better.

Changes in the spec file:

--- perl-Net-Async-WebSocket.spec.old   2024-03-08 01:00:00.000000000 +0100
+++ perl-Net-Async-WebSocket.spec       2024-04-15 02:00:00.000000000 +0200
@@ -1,6 +1,6 @@
 Name:           perl-Net-Async-WebSocket
 Version:        0.13
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Use WebSockets with IO::Async
 License:        GPL-1.0-or-later OR Artistic-1.0-Perl
 URL:            https://metacpan.org/dist/Net-Async-WebSocket
@@ -13,7 +13,6 @@
 BuildRequires:  perl(IO::Async::Loop)
 BuildRequires:  perl(IO::Async::Notifier) >= 0.63
 BuildRequires:  perl(IO::Async::OS)
-BuildRequires:  perl(IO::Async::SSL)
 BuildRequires:  perl(IO::Async::Stream) >= 0.34
 BuildRequires:  perl(IO::Async::Test)
 BuildRequires:  perl(IO::Socket::INET)
@@ -27,14 +26,18 @@
 BuildRequires:  perl(Test::More) >= 0.88
 BuildRequires:  perl(Test::Pod) >= 1.00
 BuildRequires:  perl(URI)
-BuildRequires:  perl(URI::_server)
 BuildRequires:  perl(URI::wss)
 BuildRequires:  perl(base)
 BuildRequires:  perl(strict)
 BuildRequires:  perl(warnings)
 # some runtime deps are missed/are optional
 Recommends:     perl(IO::Async::SSL)
+Requires:       perl(Protocol::WebSocket) >= 0.22
 Requires:       perl(URI::wss)
+# version some deps
+Requires:       perl(IO::Async::Listener) >= 0.61
+Requires:       perl(IO::Async::Stream) >= 0.34
+%global __requires_exclude ^perl\\(IO::Async::(Listener|Stream)\\)$
 
 %description
 This distribution provides modules that implement the WebSocket protocol,
@@ -57,10 +60,13 @@
 %files
 %doc Changes examples README
 %license LICENSE
-%{perl_vendorlib}/Net/Async/WebSocket*
+%{perl_vendorlib}/Net
 %{_mandir}/man3/Net::Async::WebSocket*
 
 %changelog
+* Mon Apr 15 2024 Chris Adams <linux> 0.13-5
+- additional spec file cleanups
+
 * Fri Mar 08 2024 Chris Adams <linux> 0.13-4
 - additional spec file cleanups


> +%global __requires_exclude ^perl\\(IO::Async::(Listener|Stream)\\)$
TODO: I recommend appending the regular expression with "%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\(..." because it does not discards excludes defined in system-wide macros.

$ rpmlint perl-Net-Async-WebSocket.spec ../SRPMS/perl-Net-Async-WebSocket-0.13-5.fc41.src.rpm ../RPMS/noarch/perl-Net-Async-WebSocket-0.13-5.fc41.noarch.rpm 
======================================== rpmlint session starts =======================================
rpmlint: 2.5.0
configuration:
    /usr/lib/python3.12/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 32, packages: 3

=== 2 packages and 1 specfiles checked; 0 errors, 0 warnings, 6 filtered, 0 badness; has taken 0.3 s ==
rpmlint is Ok.

$ rpm -q -lv -p ../RPMS/noarch/perl-Net-Async-WebSocket-0.13-5.fc41.noarch.rpm
drwxr-xr-x    2 root     root                        0 Apr 15 02:00 /usr/share/doc/perl-Net-Async-WebSocket
-rw-r--r--    1 root     root                     2543 Oct 11  2018 /usr/share/doc/perl-Net-Async-WebSocket/Changes
-rw-r--r--    1 root     root                      602 Oct 11  2018 /usr/share/doc/perl-Net-Async-WebSocket/README
drwxr-xr-x    2 root     root                        0 Oct 11  2018 /usr/share/doc/perl-Net-Async-WebSocket/examples
-rw-r--r--    1 root     root                      521 Oct 11  2018 /usr/share/doc/perl-Net-Async-WebSocket/examples/echo-server.pl
-rw-r--r--    1 root     root                      766 Oct 11  2018 /usr/share/doc/perl-Net-Async-WebSocket/examples/stdio-client.pl
drwxr-xr-x    2 root     root                        0 Apr 15 02:00 /usr/share/licenses/perl-Net-Async-WebSocket
-rw-r--r--    1 root     root                    18418 Oct 11  2018 /usr/share/licenses/perl-Net-Async-WebSocket/LICENSE
-rw-r--r--    1 root     root                     1117 Apr 15 02:00 /usr/share/man/man3/Net::Async::WebSocket.3pm.gz
-rw-r--r--    1 root     root                     1714 Apr 15 02:00 /usr/share/man/man3/Net::Async::WebSocket::Client.3pm.gz
-rw-r--r--    1 root     root                     2114 Apr 15 02:00 /usr/share/man/man3/Net::Async::WebSocket::Protocol.3pm.gz
-rw-r--r--    1 root     root                     1688 Apr 15 02:00 /usr/share/man/man3/Net::Async::WebSocket::Server.3pm.gz
drwxr-xr-x    2 root     root                        0 Apr 15 02:00 /usr/share/perl5/vendor_perl/Net
drwxr-xr-x    2 root     root                        0 Apr 15 02:00 /usr/share/perl5/vendor_perl/Net/Async
drwxr-xr-x    2 root     root                        0 Apr 15 02:00 /usr/share/perl5/vendor_perl/Net/Async/WebSocket
-rw-r--r--    1 root     root                      926 Apr 15 02:00 /usr/share/perl5/vendor_perl/Net/Async/WebSocket.pm
-rw-r--r--    1 root     root                     4657 Apr 15 02:00 /usr/share/perl5/vendor_perl/Net/Async/WebSocket/Client.pm
-rw-r--r--    1 root     root                     5832 Apr 15 02:00 /usr/share/perl5/vendor_perl/Net/Async/WebSocket/Protocol.pm
-rw-r--r--    1 root     root                     3792 Apr 15 02:00 /usr/share/perl5/vendor_perl/Net/Async/WebSocket/Server.pm
File layout and permissions are Ok.

$ rpm -q --requires -p ../RPMS/noarch/perl-Net-Async-WebSocket-0.13-5.fc41.noarch.rpm | sort -f | uniq -c
      1 perl(:VERSION) >= 5.10.0
      1 perl(base)
      1 perl(Carp)
      1 perl(IO::Async::Listener) >= 0.61
      1 perl(IO::Async::Stream) >= 0.34
      1 perl(Net::Async::WebSocket::Protocol)
      1 perl(Protocol::WebSocket) >= 0.22
      1 perl(Protocol::WebSocket::Frame)
      1 perl(Protocol::WebSocket::Handshake::Client)
      1 perl(Protocol::WebSocket::Handshake::Server)
      1 perl(Scalar::Util)
      1 perl(strict)
      1 perl(Sub::Util) >= 1.40
      1 perl(URI)
      1 perl(URI::wss)
      1 perl(warnings)
      1 perl-libs
      1 rpmlib(CompressedFileNames) <= 3.0.4-1
      1 rpmlib(FileDigests) <= 4.6.0-1
      1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
      1 rpmlib(PayloadIsZstd) <= 5.4.18-1
Binary requires are Ok.

$ resolvedeps rawhide ../RPMS/noarch/perl-Net-Async-WebSocket-0.13-5.fc41.noarch.rpm 
Binary dependencies are resolvable. Ok.

The package builds in Rawhide (https://koji.fedoraproject.org/koji/taskinfo?taskID=116447104). OK.

Please consider fixing the TODO item before building this package.
This package is APPROVED.

Comment 7 Fedora Admin user for bugzilla script actions 2024-04-16 13:02:57 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/perl-Net-Async-WebSocket

Comment 8 Fedora Update System 2024-04-16 13:32:06 UTC
FEDORA-2024-e47cb959e6 (perl-Net-Async-WebSocket-0.13-5.fc39) has been submitted as an update to Fedora 39.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-e47cb959e6

Comment 9 Fedora Update System 2024-04-16 13:39:12 UTC
FEDORA-2024-26d794d111 (perl-Net-Async-WebSocket-0.13-5.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-26d794d111

Comment 10 Fedora Update System 2024-04-17 01:09:56 UTC
FEDORA-2024-e47cb959e6 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-e47cb959e6 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-e47cb959e6

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

Comment 11 Fedora Update System 2024-04-17 01:55:54 UTC
FEDORA-2024-26d794d111 has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-26d794d111 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-26d794d111

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

Comment 12 Fedora Update System 2024-04-25 00:59:45 UTC
FEDORA-2024-26d794d111 (perl-Net-Async-WebSocket-0.13-5.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Fedora Update System 2024-04-25 01:19:39 UTC
FEDORA-2024-e47cb959e6 (perl-Net-Async-WebSocket-0.13-5.fc39) has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.