Bug 2254934 - Review Request: perl-WWW-Mechanize-Chrome - Automate the Chrome browser
Summary: Review Request: perl-WWW-Mechanize-Chrome - Automate the Chrome browser
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Petr Pisar
QA Contact: Fedora Extras Quality Assurance
URL: https://metacpan.org/dist/WWW-Mechani...
Whiteboard:
Depends On: 2254919 2254920 2254921 2254923 2254930 2254933
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-12-17 23:08 UTC by Chris Adams
Modified: 2024-07-11 01:22 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-07-11 01:15:17 UTC
Type: ---
Embargoed:
ppisar: fedora-review+


Attachments (Terms of Use)

Description Chris Adams 2023-12-17 23:08:09 UTC
Spec URL: https://cmadams.fedorapeople.org/perl-WWW-Mechanize-Chrome/perl-WWW-Mechanize-Chrome.spec
SRPM URL: https://cmadams.fedorapeople.org/perl-WWW-Mechanize-Chrome/perl-WWW-Mechanize-Chrome-0.72-1.fc39.src.rpm
Description:
Like WWW::Mechanize, this module automates web browsing with a Perl object.
Fetching and rendering of web pages is delegated to the Chrome (or
Chromium) browser by starting an instance of the browser and controlling it
with Chrome DevTools.

Fedora Account System Username: cmadams

Comment 1 Chris Adams 2023-12-17 23:08:38 UTC
Note: depends on
perl-Future-HTTP (review BZ 2254933)
perl-MooX-Role-EventEmitter (review BZ 2254919)
perl-Net-Async-WebSocket (review BZ 2254920)
perl-Object-Import (review BZ 2254921)
perl-Test-HTTP-LocalServer (review BZ 2254923)

Comment 6 Petr Pisar 2024-05-27 07:44:58 UTC
URL and Source0 addresses are usable. Ok.
Source0 archive (SHA-512 30edc9934c5656b29cf0c4654a2c7b67e72a0f19213c6b55aacae800e0d01e77cc9d4c9d68e2e3db9cd05564de8a590e61e99ee8db71e1e00281d981c080a99b) is original. Ok.
Summary verified from lib/WWW/Mechanize/Chrome.pm. Ok.
Description verified from lib/WWW/Mechanize/Chrome.pm. Ok.

FATAL: t/mixi_jp_index.html seems to be a proprietary file:

<p id="copyright">Copyright (C) 1999-2010 mixi, Inc. All rights reserved.</p>

Either repackage the tar ball without that file, or get a license grant from the author.

I will resume this review once the license is resolved.

Comment 7 Chris Adams 2024-05-27 15:52:08 UTC
I'm not sure if that's a real issue, as this (and also t/sophos_co_jp_index.html) appear to just be public web pages that have been downloaded for testing, and I _think_ that is probably legal to do (similar to search engines showing bits of web pages in search results). The contents can't be verified because they don't match the apparent current sources though.

I've updated with a version that strips those two pages and kills the test that checks them.

Spec URL: https://cmadams.fedorapeople.org/perl-WWW-Mechanize-Chrome/perl-WWW-Mechanize-Chrome.spec
SRPM URL: https://cmadams.fedorapeople.org/perl-WWW-Mechanize-Chrome/perl-WWW-Mechanize-Chrome-0.73-2.fc39.src.rpm

Comment 8 Petr Pisar 2024-06-07 12:05:29 UTC
Thanks. All files now have an acceptable license. Ok.

No XS code, noarch BuildArch is Ok.

FIX: Escape '%' character in a spec comment at perl-WWW-Mechanize-Chrome.spec:16.

I'm trying to build the package locally and t/03-listener-leak-test.t test does not progress. Do you have an idea how long the tests should take?

Comment 9 Chris Adams 2024-06-07 12:30:29 UTC
Oh yeah, forgot to escape the % when commenting out the original source URL. I guess that might also break upstream new source monitoring, I'll have to look at that.

The tests go pretty quickly (a few seconds per test at most I think). I've been building (in mock) for Fedora 39, but I just built for rawhide (still on an F39 system) and it worked there too. The t/03-listener-leak-test.t test was nearly instantaneous for me. I don't recall having any of the tests hang in all the building I've done, so not sure what might cause that.

That is the first test that spawns a local HTTP server for connection testing - I wonder if that's causing an issue? I have a few mock options tweaked, but nothing around networking, how it is contained (e.g. chroot vs nspawn), etc. I've got SELinux enabled and pretty much default config.

Comment 10 Chris Adams 2024-06-12 14:06:15 UTC
Okay, I was able to reproduce this... and it doesn't make any sense.

On a couple of systems I have, the tests will sometimes hang at the end of a test (some runs complete okay, and I only seem to see hangs when running builds on one particular system). It's not consistently the same test, and what the test does doesn't appear to matter. One run hung on one of the "no network access" tests that's replaced in the spec file with:

    use Test::More skip_all => "no network access"

I got the expected output from that "test", but then the tests hung, and I see the perl process for that test is still running; it looks like it's trying to read from something.

Comment 11 Chris Adams 2024-06-30 23:34:59 UTC
After adding a bunch of debugging, it appears that the problem may be a bug in Chromium/Chrome that is intermittent (possibly a race condition somewhere?). It only happens with SELinux enforcing (if I set permissive and also disable dontaudit, I get a denied execheap, but only sometimes). Chromium will sometimes error the same "V8 process OOM" as this upstream bug with the flatpak:

https://github.com/flathub/com.google.Chrome/issues/312

At this point, I'm inclined to make all testing conditional and not run by default, as much as I don't like to do that (I've also been getting what appears to be the same type issue just running Chrome/Chromium, not related to the perl module).

Comment 12 Petr Pisar 2024-07-01 07:05:27 UTC
I'm fine with disabling the tests.

Comment 13 Chris Adams 2024-07-01 21:35:16 UTC
Okay, I've made the tests conditional (default to disabled) and reduced the BuildRequires to what the build checks for.

Spec URL: https://cmadams.fedorapeople.org/perl-WWW-Mechanize-Chrome/perl-WWW-Mechanize-Chrome.spec
SRPM URL: https://cmadams.fedorapeople.org/perl-WWW-Mechanize-Chrome/perl-WWW-Mechanize-Chrome-0.73-3.fc39.src.rpm

Comment 14 Fedora Review Service 2024-07-01 21:47:16 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/7696952
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2254934-perl-www-mechanize-chrome/fedora-rawhide-x86_64/07696952-perl-WWW-Mechanize-Chrome/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 15 Petr Pisar 2024-07-02 07:56:39 UTC
TODO: I think you would like to build-require 'perl(Data::Dumper)' if the tests are enabled (lib/WWW/Mechanize/Chrome.pm:22).


$ rpmlint perl-WWW-Mechanize-Chrome.spec ../SRPMS/perl-WWW-Mechanize-Chrome-0.73-3.fc41.src.rpm ../RPMS/noarch/perl-WWW-Mechanize-Chrome-0.73-3.fc41.noarch.rpm 
======================================== rpmlint session starts =======================================
rpmlint: 2.5.0
configuration:
    /usr/lib/python3.13/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

perl-WWW-Mechanize-Chrome.spec: W: invalid-url Source0: WWW-Mechanize-Chrome-0.73-nocopyright.tar.gz
perl-WWW-Mechanize-Chrome.spec: W: invalid-url Source0: WWW-Mechanize-Chrome-0.73-nocopyright.tar.gz
=== 2 packages and 1 specfiles checked; 0 errors, 2 warnings, 6 filtered, 0 badness; has taken 0.4 s ==
rpmlint is Ok.

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

This package is APPROVED.

Comment 16 Chris Adams 2024-07-02 13:05:42 UTC
Ah yes, looks like when I was shifting BuildRequires around, I lost Data::Dumper (and Data::Dump) from the with-tests set. I'll fix that.

Thanks for the review!

Comment 17 Fedora Admin user for bugzilla script actions 2024-07-02 13:09:29 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/perl-WWW-Mechanize-Chrome

Comment 18 Fedora Update System 2024-07-02 13:39:11 UTC
FEDORA-2024-923cc6b7d1 (perl-WWW-Mechanize-Chrome-0.73-3.fc39) has been submitted as an update to Fedora 39.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-923cc6b7d1

Comment 19 Fedora Update System 2024-07-02 13:46:32 UTC
FEDORA-2024-8131aee099 (perl-WWW-Mechanize-Chrome-0.73-3.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-8131aee099

Comment 20 Fedora Update System 2024-07-03 01:24:54 UTC
FEDORA-2024-8131aee099 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-8131aee099 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-8131aee099

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

Comment 21 Fedora Update System 2024-07-03 02:40:17 UTC
FEDORA-2024-923cc6b7d1 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-923cc6b7d1 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-923cc6b7d1

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

Comment 22 Fedora Update System 2024-07-11 01:15:17 UTC
FEDORA-2024-8131aee099 (perl-WWW-Mechanize-Chrome-0.73-3.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 23 Fedora Update System 2024-07-11 01:22:01 UTC
FEDORA-2024-923cc6b7d1 (perl-WWW-Mechanize-Chrome-0.73-3.fc39) has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.


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