Bug 25792 - Rename 'ttf-dejavu' package to 'fonts-dejavu' for Debian 11
Summary: Rename 'ttf-dejavu' package to 'fonts-dejavu' for Debian 11
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Packaging (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Mason James
QA Contact: Testopia
URL: https://bugs.debian.org/cgi-bin/bugre...
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-18 00:27 UTC by Mason James
Modified: 2021-06-14 21:31 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.03, 19.11.10, 19.05.15


Attachments
Bug 25792: Rename 'ttf-dejavu' package to 'fonts-dejavu' for Debian 11 (6.44 KB, patch)
2020-06-18 10:30 UTC, Mason James
Details | Diff | Splinter Review
Bug 25792: Rename 'ttf-dejavu' package to 'fonts-dejavu' for Debian 11 (6.50 KB, patch)
2020-06-24 11:15 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Mason James 2020-06-18 00:27:00 UTC
This patch renames the 'ttf-dejavu' package to 'fonts-dejavu' so Koha will install on Debian 11
Comment 1 Mason James 2020-06-18 01:36:34 UTC
here's the error on deb11...


$ docker run  -ti debian:bullseye  bash
$ echo 'deb [trusted=yes] http://debian.koha-community.org/koha stable main'  >  /etc/apt/sources.list.d/koha.list
$ apt-get update; apt-get -y upgrade
$ apt-cache policy koha-common
koha-common:
  Installed: (none)
  Candidate: 20.05.00-1
  Version table:
     20.05.00-1 500
        500 http://debian.koha-community.org/koha stable/main amd64 Packages


$ apt-get -q -y -s install koha-common
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 koha-common : Depends: ttf-dejavu but it is not installable
E: Unable to correct problems, you have held broken packages.
Comment 2 Mason James 2020-06-18 10:30:25 UTC
Created attachment 106000 [details] [review]
Bug 25792: Rename 'ttf-dejavu' package to 'fonts-dejavu' for Debian 11

to test...
 1/ attempt to install koha 20.05 package on deb11, fail :'(
 2/ apply patch and build new koha package
 3/ attempt to install new koha package on deb11, succeed!
Comment 3 Tomás Cohen Arazi 2020-06-18 13:02:26 UTC
(In reply to Mason James from comment #2)
> Created attachment 106000 [details] [review] [review]
> Bug 25792: Rename 'ttf-dejavu' package to 'fonts-dejavu' for Debian 11
> 
> to test...
>  1/ attempt to install koha 20.05 package on deb11, fail :'(
>  2/ apply patch and build new koha package
>  3/ attempt to install new koha package on deb11, succeed!

Isn't this change going to break non bullseye OSs?
Comment 4 Mason James 2020-06-20 02:53:48 UTC
(In reply to Tomás Cohen Arazi from comment #3)
> (In reply to Mason James from comment #2)
> > Created attachment 106000 [details] [review] [review] [review]
> > Bug 25792: Rename 'ttf-dejavu' package to 'fonts-dejavu' for Debian 11
> > 
> > to test...
> >  1/ attempt to install koha 20.05 package on deb11, fail :'(
> >  2/ apply patch and build new koha package
> >  3/ attempt to install new koha package on deb11, succeed!
> 
> Isn't this change going to break non bullseye OSs?

hmm, i think no breakage will happen

the 'fonts-dejavu' package has been backported to older OSs

the 'ttf-dejavu' package will provide symlinks to handle current Koha installations that upgrade
Comment 5 Tomás Cohen Arazi 2020-06-24 11:15:10 UTC
Created attachment 106243 [details] [review]
Bug 25792: Rename 'ttf-dejavu' package to 'fonts-dejavu' for Debian 11

to test...
 1/ attempt to install koha 20.05 package on deb11, fail :'(
 2/ apply patch and build new koha package
 3/ attempt to install new koha package on deb11, succeed!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 6 Tomás Cohen Arazi 2020-06-24 11:16:42 UTC
The fonts-dejavu package is available back to Jessie and the plan is to drop the transitional ttf-dejavu package in bullseye:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=872809

So this is ok.
Comment 7 Julian Maurice 2020-06-26 07:57:31 UTC
(In reply to Tomás Cohen Arazi from comment #6)
> The fonts-dejavu package is available back to Jessie and the plan is to drop
> the transitional ttf-dejavu package in bullseye:
> 
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=872809
> 
> So this is ok.

Can we remove reference to ttf-dejavu ? In ubuntu fonts-dejavu is available since trusty.
Comment 8 Mason James 2020-07-02 05:14:05 UTC
(In reply to Julian Maurice from comment #7)
> (In reply to Tomás Cohen Arazi from comment #6)
> > The fonts-dejavu package is available back to Jessie and the plan is to drop
> > the transitional ttf-dejavu package in bullseye:
> > 
> > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=872809
> > 
> > So this is ok.
> 
> Can we remove reference to ttf-dejavu ? In ubuntu fonts-dejavu is available
> since trusty.

hmm, yes, i think so...

but, there is a problem for current koha installs, that the font path in koha-conf.xml will be incorrect


 <ttf>
    <font type="TR" >/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf</font>
...
 </ttf>


when the unrequired ttf-dejavu package's symlinks are removed (eg: apt autoremove) the paths will need to be manually corrected

keeping the ttf-dejavu reference in debian/control would postpone this problem until the system is upgraded to deb11/bullseye (which is probably a good thing?)


any thoughts?
Comment 9 Julian Maurice 2020-07-02 07:35:30 UTC
(In reply to Mason James from comment #8) > (In reply to Julian Maurice from comment #7)
> > (In reply to Tomás Cohen Arazi from comment #6)
> > > The fonts-dejavu package is available back to Jessie and the plan is to drop
> > > the transitional ttf-dejavu package in bullseye:
> > > 
> > > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=872809
> > > 
> > > So this is ok.
> > 
> > Can we remove reference to ttf-dejavu ? In ubuntu fonts-dejavu is available
> > since trusty.
> 
> hmm, yes, i think so...
> 
> but, there is a problem for current koha installs, that the font path in
> koha-conf.xml will be incorrect
> 
> 
>  <ttf>
>     <font type="TR"
> >/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf</font>
> ...
>  </ttf>
> 
> 
> when the unrequired ttf-dejavu package's symlinks are removed (eg: apt
> autoremove) the paths will need to be manually corrected
> keeping the ttf-dejavu reference in debian/control would postpone this
> problem until the system is upgraded to deb11/bullseye (which is probably a
> good thing?)
> 
> 
> any thoughts?

Ok, it is probably better this way then.
Comment 10 Mason James 2020-07-07 08:28:38 UTC
 
> > when the unrequired ttf-dejavu package's symlinks are removed (eg: apt
> > autoremove) the paths will need to be manually corrected
> > keeping the ttf-dejavu reference in debian/control would postpone this
> > problem until the system is upgraded to deb11/bullseye (which is probably a
> > good thing?)
> > 
> >
good news, i tested my theory and found it to be incorrect :)
there does not seem to be any problem when upgrading on bullseye.

bullseye will allow both packages to be installed together

'apt autoremove' does not remove the ttf-dejavu* packages
Comment 11 Martin Renvoize 2020-07-15 12:16:11 UTC
Are you still on the cases her Julian?
Comment 12 Julian Maurice 2020-07-15 12:21:02 UTC
(In reply to Martin Renvoize from comment #11)
> Are you still on the cases her Julian?

I wasn't. I only asked a question and it has been answered. Case is yours if you want it ;)
Comment 13 Jonathan Druart 2020-07-21 12:34:28 UTC
I am about to push this patch and see how things are going.
Comment 14 Jonathan Druart 2020-07-21 12:37:26 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 15 Jonathan Druart 2020-07-22 15:07:10 UTC
Looks like we have something wrong

17:03:51 koha_1       | ERROR in koha-conf.xml -- missing <font type="H">/path/to/font.ttf</font> at /kohadevbox/koha/C4/Creators/PDF.pm line 120.
17:03:51 koha_1       | ERROR in koha-conf.xml -- missing <font type="H">/path/to/font.ttf</font> at /kohadevbox/koha/C4/Creators/PDF.pm line 120.
17:03:51 koha_1       | 
17:03:51 koha_1       | #   Failed test 'testing StrWidth() returns correct point width'
17:03:51 koha_1       | #   at t/Creators.t line 55.
17:03:51 koha_1       | #          got: '19.344'
17:03:51 koha_1       | #     expected: '23.044921875'
17:03:51 koha_1       | 
17:03:51 koha_1       | #   Failed test 'testing Text() writes to the correct x-value'
17:03:51 koha_1       | #   at t/Creators.t line 59.
17:03:51 koha_1       | #          got: '29.344'
17:03:51 koha_1       | #     expected: '33.044921875'
17:03:51 koha_1       | ERROR in koha-conf.xml -- missing <font type="TR">/path/to/font.ttf</font> at /kohadevbox/koha/C4/Creators/PDF.pm line 120.
17:03:51 koha_1       | ERROR in koha-conf.xml -- missing <font type="TB">/path/to/font.ttf</font> at /kohadevbox/koha/C4/Creators/PDF.pm line 120.
17:03:51 koha_1       | ERROR in koha-conf.xml -- missing <font type="TI">/path/to/font.ttf</font> at /kohadevbox/koha/C4/Creators/PDF.pm line 120.
17:03:51 koha_1       | ERROR in koha-conf.xml -- missing <font type="TBI">/path/to/font.ttf</font> at /kohadevbox/koha/C4/Creators/PDF.pm line 120.
17:03:51 koha_1       | ERROR in koha-conf.xml -- missing <font type="C">/path/to/font.ttf</font> at /kohadevbox/koha/C4/Creators/PDF.pm line 120.
17:03:51 koha_1       | ERROR in koha-conf.xml -- missing <font type="CB">/path/to/font.ttf</font> at /kohadevbox/koha/C4/Creators/PDF.pm line 120.
17:03:51 koha_1       | ERROR in koha-conf.xml -- missing <font type="CO">/path/to/font.ttf</font> at /kohadevbox/koha/C4/Creators/PDF.pm line 120.
17:03:51 koha_1       | ERROR in koha-conf.xml -- missing <font type="CBO">/path/to/font.ttf</font> at /kohadevbox/koha/C4/Creators/PDF.pm line 120.
17:03:51 koha_1       | ERROR in koha-conf.xml -- missing <font type="H">/path/to/font.ttf</font> at /kohadevbox/koha/C4/Creators/PDF.pm line 120.
17:03:51 koha_1       | ERROR in koha-conf.xml -- missing <font type="HO">/path/to/font.ttf</font> at /kohadevbox/koha/C4/Creators/PDF.pm line 120.
17:03:51 koha_1       | ERROR in koha-conf.xml -- missing <font type="HB">/path/to/font.ttf</font> at /kohadevbox/koha/C4/Creators/PDF.pm line 120.
17:03:51 koha_1       | ERROR in koha-conf.xml -- missing <font type="HBO">/path/to/font.ttf</font> at /kohadevbox/koha/C4/Creators/PDF.pm line 120.
17:03:51 koha_1       | Wide character in compress at /usr/share/perl5/PDF/Reuse.pm line 823.
Comment 16 Lucas Gass 2020-07-28 14:50:51 UTC
backported to 20.05.x for 20.05.03
Comment 17 Jonathan Druart 2020-07-29 15:05:22 UTC
(In reply to Jonathan Druart from comment #15)
> Looks like we have something wrong


May have been fixed by https://gitlab.com/koha-community/koha-testing-docker/-/merge_requests/143
Comment 18 Aleisha Amohia 2020-08-03 23:29:55 UTC
does this need to be backported to 19.11.x?
Comment 19 Jonathan Druart 2020-08-07 11:23:36 UTC
We have a problem with D11 and koha-conf.xml, the paths are wrong:

328     <font type="TR" >/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf</font>

% locate DejaVuSerif.tt
/usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf
Comment 20 Mason James 2020-08-08 17:33:02 UTC
(In reply to Aleisha Amohia from comment #18)
> does this need to be backported to 19.11.x?

let's consider this patch for 19.11.10, after its been released for 20.05
Comment 21 Mason James 2020-08-08 17:36:08 UTC
(In reply to Jonathan Druart from comment #19)
> We have a problem with D11 and koha-conf.xml, the paths are wrong:
> 
> 328     <font type="TR"
> >/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf</font>
> 
> % locate DejaVuSerif.tt
> /usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf

can you provide link to a failed build log?
Comment 22 Jonathan Druart 2020-08-10 07:48:45 UTC
(In reply to Mason James from comment #21)
> (In reply to Jonathan Druart from comment #19)
> > We have a problem with D11 and koha-conf.xml, the paths are wrong:
> > 
> > 328     <font type="TR"
> > >/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf</font>
> > 
> > % locate DejaVuSerif.tt
> > /usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf
> 
> can you provide link to a failed build log?

The build is not failing. I saw errors when trying to generate patron cards.

The problem is obvious, the paths are wrong. I thought we confirmed at some point there was a symling?

% grep TR koha-conf.xml
    <font type="TR" >/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf</font>

% ls /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf
ls: cannot access '/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf': No such file or directory
% ls /usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf
Comment 23 Mason James 2020-08-19 10:18:57 UTC
(In reply to Jonathan Druart from comment #22)
> (In reply to Mason James from comment #21)
> > (In reply to Jonathan Druart from comment #19)
> > > We have a problem with D11 and koha-conf.xml, the paths are wrong:
> > > 
> > > 328     <font type="TR"
> > > >/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf</font>
> > > 
> > > % locate DejaVuSerif.tt
> > > /usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf
> > 
> > can you provide link to a failed build log?
> 
> The build is not failing. I saw errors when trying to generate patron cards.
> 
> The problem is obvious, the paths are wrong. I thought we confirmed at some
> point there was a symling?
> 
> % grep TR koha-conf.xml
>     <font type="TR"
> >/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf</font>
> 
> % ls /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf
> ls: cannot access '/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf': No
> such file or directory
> % ls /usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf
> /usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf

the path in the koha-conf.xml file is looks correct, (testing via KTD on master-bullseye)

mason@xen1$ docker-compose pull
mason@xen1$ ku
mason@xen1$ docker exec -it koha_koha_1 bash
root@kohadevbox:/kohadevbox# dpkg -l | grep koha-common
ii  koha-common                            20.06.00-25~git+20200819211444.9708bbe2-1 all  
root@kohadevbox:/kohadevbox#  grep TR /etc/koha/sites/kohadev/koha-conf.xml
    <font type="TR" >/usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf</font>
root@kohadevbox:/kohadevbox# ls  /usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf


fyi, there is no symlink from the old to new files, (that info was incorrect).
but apt allows the two font packages to co-exist when upgrading to d11, which prevents older installs from failing on upgrade
Comment 24 Jonathan Druart 2020-08-19 10:41:58 UTC
Hum indeed, it's correct now. Maybe the ktd images were not up-to-date.
Comment 25 Mason James 2020-09-09 10:43:50 UTC
(In reply to Mason James from comment #20)
> (In reply to Aleisha Amohia from comment #18)
> > does this need to be backported to 19.11.x?
> 
> let's consider this patch for 19.11.10, after its been released for 20.05

(In reply to Lucas Gass from comment #16)
> backported to 20.05.x for 20.05.03

hi Aleisha, can you push this patch to 19.11.x
Comment 26 Aleisha Amohia 2020-09-10 05:01:35 UTC
backported to 19.11.x for 19.11.10
Comment 27 Victor Grousset/tuxayo 2020-09-20 19:16:53 UTC
Backported to 19.05.x branch for 19.05.15