On Ubuntu 24.04, the shipped version of the library is v2.00. Debian 12 has v0.01. The feature it self works fine on either, but v2.00 introduced a warning that is making our test suite to fail [1]. On version v2.01 the author fixed the warning [2] To reproduce: 1. Start an Ubuntu 24.04 KTD: $ KOHA_IMAGE=main-noble ktd --name noble up -d 2. Run: $ ktd --name noble --shell k$ pmvers GD::Barcode::QRcode => 2.00 3. Run: k$ prove t/db_dependent/Koha/Auth/TwoFactorAuth.t => FAIL: Tests fail! 4. Run: k$ sudo cpanm -i GD::Barcode::QRcode@2.01 5. Repeat 3 => SUCCESS: Tests pass! 6. Exit the 24.04 KTD and stop it: k$ exit $ ktd --name noble down 7. Start a Debian 12 KTD: $ KOHA_IMAGE=main-bookworm ktd --name bookworm up -d 8. Run: $ ktd --name bookworm --shell k$ pmvers GD::Barcode::QRcode => 0.01 9. Run: k$ prove t/db_dependent/Koha/Auth/TwoFactorAuth.t => SUCCESS: Tests pass! 10. Run: k$ sudo cpanm -i GD::Barcode::QRcode@2.01 11. Repeat 9 => SUCCESS: Tests still pass! [1] https://jenkins.koha-community.org/job/Koha_Main_U24/lastCompletedBuild/consoleFull [2] https://github.com/mbeijen/GD-Barcode/commit/85e7911e65bf1c4746d9ce2e743580bbf51da793
I would like to add that Debian Trixie also ships the 'faulty' v2.00.
Created attachment 185513 [details] [review] Bug 40663: Update GD::Barcode::QRcode to v2.01 1. Start an Ubuntu 24.04 KTD: $ KOHA_IMAGE=main-noble ktd --name noble up -d 2. Run: $ ktd --name noble --shell k$ pmvers GD::Barcode::QRcode => 2.00 3. Run: k$ prove t/db_dependent/Koha/Auth/TwoFactorAuth.t => FAIL: Tests fail! 4. Run: k$ sudo cpanm -i GD::Barcode::QRcode@2.01 5. Repeat 3 => SUCCESS: Tests pass! 6. Exit the 24.04 KTD and stop it: k$ exit $ ktd --name noble down 7. Start a Debian 12 KTD: $ KOHA_IMAGE=main-bookworm ktd --name bookworm up -d 8. Run: $ ktd --name bookworm --shell k$ pmvers GD::Barcode::QRcode => 0.01 9. Run: k$ prove t/db_dependent/Koha/Auth/TwoFactorAuth.t => SUCCESS: Tests pass! 10. Run: k$ sudo cpanm -i GD::Barcode::QRcode@2.01 11. Repeat 9 => SUCCESS: Tests still pass! Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
I had a go at testing, but something is stopping ktd starting up for me when using main-noble (everything is up-to-date, I also removed all images and started fresh, as well as re-cloning Koha). "Normal" Koha starts fine and is working as expected. This is what a get in the startup script where Koha exits: .... koha-1 | Install Koha-how-to koha-1 | [cypress] Make the pre-built cypress available to the instance user [HACK] koha-1 | [*] Created cache dir /var/lib/koha/kohadev/.cache/ koha-1 | [*] Chowning /var/lib/koha/kohadev/.cache/ koha-1 | [*] Cypress dir linked to /var/lib/koha/kohadev/.cache/ koha-1 | [koha-l10n] Handling koha-l10n as requested koha-1 | [*] Cloning koha-l10n into misc/translator/po koha-1 | fatal: could not create work tree dir '/kohadevbox/koha/misc/translator/po': Permission denied koha-1 | [API logging] Set TRACE to API log4perl config koha-1 | [*] TRACE set for the API log4perl configuration koha-1 | [git] Setting up Git on the instance user koha-1 | [*] Generating /var/lib/koha/kohadev/.gitconfig koha-1 | [*] General setup koha-1 | error: could not lock config file .git/config: Permission denied koha-1 | error: could not lock config file .git/config: Permission denied koha-1 | [*] Installing and setting hooks (/kohadevbox/koha) koha-1 | mkdir: cannot create directory ‘/kohadevbox/koha/.git/hooks/ktd’: Permission denied koha-1 | cp: target '/kohadevbox/koha/.git/hooks/ktd': No such file or directory koha-1 | error: could not lock config file .git/config: Permission denied koha-1 exited with code 255
Created attachment 185999 [details] [review] Bug 40663: Update GD::Barcode::QRcode to v2.01 1. Start an Ubuntu 24.04 KTD: $ KOHA_IMAGE=main-noble ktd --name noble up -d 2. Run: $ ktd --name noble --shell k$ pmvers GD::Barcode::QRcode => 2.00 3. Run: k$ prove t/db_dependent/Koha/Auth/TwoFactorAuth.t => FAIL: Tests fail! 4. Run: k$ sudo cpanm -i GD::Barcode::QRcode@2.01 5. Repeat 3 => SUCCESS: Tests pass! 6. Exit the 24.04 KTD and stop it: k$ exit $ ktd --name noble down 7. Start a Debian 12 KTD: $ KOHA_IMAGE=main-bookworm ktd --name bookworm up -d 8. Run: $ ktd --name bookworm --shell k$ pmvers GD::Barcode::QRcode => 0.01 9. Run: k$ prove t/db_dependent/Koha/Auth/TwoFactorAuth.t => SUCCESS: Tests pass! 10. Run: k$ sudo cpanm -i GD::Barcode::QRcode@2.01 11. Repeat 9 => SUCCESS: Tests still pass! Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: mason james <mtj@kohaaloha.com>
i've added libgd-barcode-perl (2.01-1) to the koha-staging apt repo, for testing https://packages.debian.org/forky/libgd-barcode-perl once jenkins is passing, we can add to koha prod apt repo kohadev-koha@kohadevbox:koha(main)$ apt policy libgd-barcode-perl libgd-barcode-perl: Installed: 2.01-1 Candidate: 2.01-1 Version table: *** 2.01-1 500 500 http://debian.koha-community.org/koha-staging dev/main amd64 Packages 100 /var/lib/dpkg/status 1.15-8 500 500 http://deb.debian.org/debian bookworm/main amd64 Packages kohadev-koha@kohadevbox:koha(main)$ prove t/db_dependent/Koha/Auth/TwoFactorAuth.t t/db_dependent/Koha/Auth/TwoFactorAuth.t .. ok All tests successful. Files=1, Tests=4, 3 wallclock secs ( 0.01 usr 0.02 sys + 2.02 cusr 0.72 csys = 2.77 CPU) Result: PASS
kohadev-koha@kohadevbox:koha(main)$ pmvers GD::Barcode::QRcode 2.01 kohadev-koha@kohadevbox:koha(main)$ pmpath GD::Barcode::QRcode /usr/share/perl5/GD/Barcode/QRcode.pm many thanks Tomás!
This should revert bug 40490.
(In reply to Jonathan Druart from comment #7) > This should revert bug 40490. If you want to fail Qa, please change status too.
Created attachment 186138 [details] [review] Bug 40663: Revert "Bug 40490: Remove warnings from GD::Barcode::QRcode - U24" This reverts commit fd6ceb6b244bf65d8cf0c1144a9a903490fdaadf.
Comment on attachment 186138 [details] [review] Bug 40663: Revert "Bug 40490: Remove warnings from GD::Barcode::QRcode - U24" Based on the Git diff you provided, here's a summary of the changes and what they do. ### Summary The commit `fd6ceb6b244bf65d8cf0c1144a9a903490fdaadf` introduced a bug related to QR barcodes, and the provided patch **reverts** those changes. This specific change removes a block of code that was added to a Perl test file, `t/db_dependent/api/v1/two_factor_auth.t`. This code was a workaround for a known bug in the `GD::Barcode::QRcode` module. The bug caused a specific warning to be thrown during the QR code generation process. ### Breakdown of the Changes The diff shows that two identical blocks of code were removed from the test file. Each block did the following: * `local $SIG{__WARN__} = sub { };`: This line temporarily overrides the default warning handler in Perl. It sets the handler to an empty subroutine, which effectively **silences all warnings** for the duration of the code block. * `my $dup_err; local *STDERR; open STDERR, ">>", \$dup_err;`: This redirects the standard error output (`STDERR`) to a local variable named `$dup_err`. * `$t->request_ok($tx)->status_is(201);`: This line is the actual test assertion. It sends a request to the API and checks if the response is successful (`HTTP 201 Created`). * `close STDERR;`: This closes the redirected standard error output, restoring it to the default. By reverting these changes, the code is restored to its original state, which simply performs the API request and asserts the status code without trying to handle or suppress the warning. In essence, the reversion removes a temporary fix that was likely causing more problems or was no longer necessary, possibly due to a fix in the underlying `GD::Barcode` module itself.
Created attachment 186241 [details] [review] Bug 40663: Update GD::Barcode::QRcode to v2.01 1. Start an Ubuntu 24.04 KTD: $ KOHA_IMAGE=main-noble ktd --name noble up -d 2. Run: $ ktd --name noble --shell k$ pmvers GD::Barcode::QRcode => 2.00 3. Run: k$ prove t/db_dependent/Koha/Auth/TwoFactorAuth.t => FAIL: Tests fail! 4. Run: k$ sudo cpanm -i GD::Barcode::QRcode@2.01 5. Repeat 3 => SUCCESS: Tests pass! 6. Exit the 24.04 KTD and stop it: k$ exit $ ktd --name noble down 7. Start a Debian 12 KTD: $ KOHA_IMAGE=main-bookworm ktd --name bookworm up -d 8. Run: $ ktd --name bookworm --shell k$ pmvers GD::Barcode::QRcode => 0.01 9. Run: k$ prove t/db_dependent/Koha/Auth/TwoFactorAuth.t => SUCCESS: Tests pass! 10. Run: k$ sudo cpanm -i GD::Barcode::QRcode@2.01 11. Repeat 9 => SUCCESS: Tests still pass! Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: mason james <mtj@kohaaloha.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 186242 [details] [review] Bug 40663: Revert "Bug 40490: Remove warnings from GD::Barcode::QRcode - U24" This reverts commit fd6ceb6b244bf65d8cf0c1144a9a903490fdaadf. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
With Mason's blessing on the packaging side and Jonathan's follow-up for completeness, this is PQA. Thanks Jonathan and Mason!
Nice work everyone! Pushed to main for 25.11