Bug 40663

Summary: Package GD::Barcode::QRcode@2.01
Product: Koha Reporter: Tomás Cohen Arazi (tcohen) <tomascohen>
Component: Architecture, internals, and plumbingAssignee: Tomás Cohen Arazi (tcohen) <tomascohen>
Status: Pushed to main --- QA Contact: Mason James <mtj>
Severity: normal    
Priority: P5 - low CC: david, jonathan.druart, lucas, m.de.rooy, santoshpavan.666, tomascohen
Version: MainKeywords: no-sandbox, RM_priority
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40490
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.11.00
Circulation function:
Attachments: Bug 40663: Update GD::Barcode::QRcode to v2.01
Bug 40663: Update GD::Barcode::QRcode to v2.01
Bug 40663: Revert "Bug 40490: Remove warnings from GD::Barcode::QRcode - U24"
Bug 40663: Update GD::Barcode::QRcode to v2.01
Bug 40663: Revert "Bug 40490: Remove warnings from GD::Barcode::QRcode - U24"

Description Tomás Cohen Arazi (tcohen) 2025-08-18 13:31:20 UTC
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
Comment 1 Tomás Cohen Arazi (tcohen) 2025-08-18 13:32:21 UTC
I would like to add that Debian Trixie also ships the 'faulty' v2.00.
Comment 2 Tomás Cohen Arazi (tcohen) 2025-08-18 13:37:03 UTC
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>
Comment 3 David Nind 2025-08-29 19:36:54 UTC
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
Comment 4 Mason James 2025-09-01 01:58:59 UTC
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>
Comment 5 Mason James 2025-09-01 09:33:42 UTC
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
Comment 6 Mason James 2025-09-01 09:36:01 UTC
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!
Comment 7 Jonathan Druart 2025-09-01 14:03:17 UTC
This should revert bug 40490.
Comment 8 Marcel de Rooy 2025-09-04 09:40:44 UTC
(In reply to Jonathan Druart from comment #7)
> This should revert bug 40490.

If you want to fail Qa, please change status too.
Comment 9 Jonathan Druart 2025-09-04 09:55:23 UTC
Created attachment 186138 [details] [review]
Bug 40663: Revert "Bug 40490: Remove warnings from GD::Barcode::QRcode - U24"

This reverts commit fd6ceb6b244bf65d8cf0c1144a9a903490fdaadf.
Comment 10 Alla Santosh Pavan Kumar 2025-09-04 11:45:12 UTC Comment hidden (obsolete)
Comment 11 Tomás Cohen Arazi (tcohen) 2025-09-05 17:04:58 UTC
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>
Comment 12 Tomás Cohen Arazi (tcohen) 2025-09-05 17:05:02 UTC
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>
Comment 13 Tomás Cohen Arazi (tcohen) 2025-09-05 17:12:26 UTC
With Mason's blessing on the packaging side and Jonathan's follow-up for completeness, this is PQA. Thanks Jonathan and Mason!
Comment 14 Lucas Gass (lukeg) 2025-09-05 21:18:18 UTC
Nice work everyone!

Pushed to main for 25.11