Bug 25591 - Update list-deps for Debian 10 and Ubuntu 20.04
Summary: Update list-deps for Debian 10 and Ubuntu 20.04
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Packaging (show other bugs)
Version: master
Hardware: All All
: P5 - low blocker (vote)
Assignee: Mason James
QA Contact: Tomás Cohen Arazi
URL:
Keywords:
Depends on: 25607
Blocks: 24167 25640
  Show dependency treegraph
 
Reported: 2020-05-22 21:01 UTC by Mason James
Modified: 2020-06-18 17:13 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.01, 19.11.07


Attachments
add 5.26 and 5.30 to control (4.53 KB, patch)
2020-05-22 21:02 UTC, Mason James
Details | Diff | Splinter Review
Bug 25591 - Update debian/control for debian 10 (4.46 KB, patch)
2020-05-22 21:05 UTC, Mason James
Details | Diff | Splinter Review
update list-deps (2.46 KB, patch)
2020-05-24 03:02 UTC, Mason James
Details | Diff | Splinter Review
update list-deps (2.31 KB, patch)
2020-05-24 03:06 UTC, Mason James
Details | Diff | Splinter Review
Bug 25591 - Update list-deps for Debian 10 and Ubuntu 20.04 (2.48 KB, patch)
2020-05-24 03:17 UTC, Mason James
Details | Diff | Splinter Review
Bug 25591 - Update list-deps for Debian 10 and Ubuntu 20.04 (2.51 KB, patch)
2020-05-25 18:54 UTC, Martin Renvoize
Details | Diff | Splinter Review
list-deps-debian10-master (3.86 KB, text/plain)
2020-05-25 22:37 UTC, Victor Grousset/tuxayo
Details
list-deps-debian9-master (3.86 KB, text/plain)
2020-05-25 22:38 UTC, Victor Grousset/tuxayo
Details
list-deps-debian9-master-with-25591 (3.47 KB, text/plain)
2020-05-25 22:38 UTC, Victor Grousset/tuxayo
Details
list-deps-debian10-master (3.89 KB, text/plain)
2020-05-25 22:39 UTC, Victor Grousset/tuxayo
Details
list-deps-debian10-master-with-25591 (3.49 KB, text/plain)
2020-05-25 22:39 UTC, Victor Grousset/tuxayo
Details
list-deps-ubuntu20.04-master (3.91 KB, text/plain)
2020-05-25 22:39 UTC, Victor Grousset/tuxayo
Details
list-deps-ubuntu20.04-master-with-25591 (3.51 KB, text/plain)
2020-05-25 22:39 UTC, Victor Grousset/tuxayo
Details
Bug 25591: Update list-deps for Debian 10 and Ubuntu 20.04 (2.56 KB, patch)
2020-05-27 14:25 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 25591 - add libcpan-meta-perl to debina/control.in file (1.00 KB, patch)
2020-05-28 11:10 UTC, Mason James
Details | Diff | Splinter Review
Bug 25591: Update list-deps for Debian 10 and Ubuntu 20.04 (971 bytes, patch)
2020-06-01 03:03 UTC, Mason James
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-05-22 21:01:12 UTC
this patch updates the debian/control for koha 20.05 on debian 10
Comment 2 Mason James 2020-05-22 21:05:06 UTC
Created attachment 105282 [details] [review]
Bug 25591 - Update debian/control for debian 10

this patch updates the debian/control for koha 20.05 on debian 10
Comment 3 Mason James 2020-05-22 21:06:27 UTC
(In reply to Mason James from comment #2)
> Created attachment 105282 [details] [review] [review]
> Bug 25591 - Update debian/control for debian 10
> 
> this patch updates the debian/control for koha 20.05 on debian 10

..adds support perl-5.30 support for ubuntu focal too
Comment 4 Martin Renvoize 2020-05-22 21:32:58 UTC
Happy to include this and it makes total sense.. but, I'd really like to have a reminder if how this relates to bug 17084 and friends.
Comment 5 Martin Renvoize 2020-05-23 07:26:56 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 8 Mason James 2020-05-24 03:17:36 UTC
Created attachment 105312 [details] [review]
Bug 25591 - Update list-deps for Debian 10 and Ubuntu 20.04

this patch removes version-specific packages from the debian/control file, which fixes a bug where koha-common can only be installed on the debian version that the package was built on
Comment 9 Victor Grousset/tuxayo 2020-05-25 00:47:01 UTC
What is the test plan? Just having the packages install successfully?
Comment 10 Martin Renvoize 2020-05-25 18:54:53 UTC
Created attachment 105326 [details] [review]
Bug 25591 - Update list-deps for Debian 10 and Ubuntu 20.04

This patch removes version-specific packages from the debian/control file,
which fixes a bug where koha-common can only be installed on the debian
version that the package was built on

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 11 Martin Renvoize 2020-05-25 18:56:59 UTC
This scans reasonably to me, but I must admit it's somewhat outside my area's of expertise. It would be great to have verification from Tomas too :)
Comment 12 Victor Grousset/tuxayo 2020-05-25 22:37:20 UTC
Created attachment 105334 [details]
list-deps-debian10-master
Comment 13 Victor Grousset/tuxayo 2020-05-25 22:38:34 UTC
Created attachment 105335 [details]
list-deps-debian9-master
Comment 14 Victor Grousset/tuxayo 2020-05-25 22:38:51 UTC
Created attachment 105336 [details]
list-deps-debian9-master-with-25591
Comment 15 Victor Grousset/tuxayo 2020-05-25 22:39:09 UTC
Created attachment 105337 [details]
list-deps-debian10-master
Comment 16 Victor Grousset/tuxayo 2020-05-25 22:39:20 UTC
Created attachment 105338 [details]
list-deps-debian10-master-with-25591
Comment 17 Victor Grousset/tuxayo 2020-05-25 22:39:32 UTC
Created attachment 105339 [details]
list-deps-ubuntu20.04-master
Comment 18 Victor Grousset/tuxayo 2020-05-25 22:39:51 UTC
Created attachment 105340 [details]
list-deps-ubuntu20.04-master-with-25591
Comment 19 Victor Grousset/tuxayo 2020-05-25 22:45:04 UTC
In case that helps reviewing, here attached are the results of my attempt to sign off. The list-deps was generated with and without the patch on Debian 9, Debian 10, Ubuntu 20.04.

There are sorted and trailing space was removed to clean the diffs.

As expected, packages perl-modules-5.XX and libperl5.XX aren't in the list anymore.

That's the only difference, no sign of collateral damage.
Comment 20 Tomás Cohen Arazi 2020-05-26 13:32:52 UTC
(In reply to Victor Grousset/tuxayo from comment #19)
> In case that helps reviewing, here attached are the results of my attempt to
> sign off. The list-deps was generated with and without the patch on Debian
> 9, Debian 10, Ubuntu 20.04.
> 
> There are sorted and trailing space was removed to clean the diffs.
> 
> As expected, packages perl-modules-5.XX and libperl5.XX aren't in the list
> anymore.
> 
> That's the only difference, no sign of collateral damage.

Thanks, Victor. I think the patch is incorrect, in the sense that what we need is to map perl dependencies to Debian package providing it. So in order to support more Debian versions, the generated output should have pipe-separated values for those libraries that map into perl-modules or perl-modules-<version>.

so we *should* expect a line containing:

perl-modules | perl-modules-5.22 | perl-modules-5.24 | perl-modules-5.28 | perl-modules-5.30

unless there's syntax for specifying regexps in module names, I belive we should stick with the current approach for this release, and clean things next.
Comment 21 Tomás Cohen Arazi 2020-05-26 13:53:01 UTC
I write this down so everyone knows how to check this (posterity):


`
docker run --volume=/home/tcohen/git/koha:/koha -ti debian:stretch bash
apt update
apt install apt-file wget gnupg
wget -q -O- https://debian.koha-community.org/koha/gpg.asc | apt-key add -
echo 'deb http://deb.debian.org/debian stretch-backports main' > /etc/apt/sources.list.d/stretch-backports.list
echo 'deb http://debian.koha-community.org/koha stable main' > /etc/apt/sources.list.d/koha.list
apt update
apt-install libmodern-perl-perl libcpan-meta-perl libmodule-cpanfile-perl
apt-file update
cd /koha
PERL5LIB=. perl debian/update-control
`

In order to support newer Debian/Ubuntu, the problem is perl-modules-<version> needs to cover their Perl version (5.28 and 5.30 respectively).
Comment 22 Tomás Cohen Arazi 2020-05-26 13:54:46 UTC
This needs to be run in the lowest supported Debian version. So stretch stuffs are to be pulled in this case. Then we patch for higher versions. This is what we are doing in list-deps. And sometimes the resulting control file might be patched for simplicity.
Comment 23 Mason James 2020-05-27 01:08:01 UTC
(In reply to Tomás Cohen Arazi from comment #20)
> 
> so we *should* expect a line containing:
> 
> perl-modules | perl-modules-5.22 | perl-modules-5.24 | perl-modules-5.28 |
> perl-modules-5.30
> 

hi Tomas, 
i did some experimenting and discovered that while explicitly listing all versions of perl-modules-5.XX in the control file, does work
...the control file can be simplified to just listing the 'perl-modules' virtual package


debian will correctly pull the correct perl-modules-5.XX package, when installing perl-modules

i've tested the simplified control file by building a package with it (on deb9), and successfully installing the package on deb9, deb10, deb11 and ubuntu 1804, 1910, 2004, 2010


you can test the package by running...

# docker run  -ti debian:testing bash
echo 'deb [trusted=yes] http://apt.kohaaloha.com/koha-nightly dev main' >  /etc/apt/sources.list.d/koha.list
apt update
apt install koha-common
dpkg -l | grep koha-common
 ii  koha-common  20.05.00.000~git+d9.20200523231519.38b762ea-1 all integrated (physical) library management system
Comment 24 Tomás Cohen Arazi 2020-05-27 03:05:24 UTC
(In reply to Mason James from comment #23)
> (In reply to Tomás Cohen Arazi from comment #20)
> > 
> > so we *should* expect a line containing:
> > 
> > perl-modules | perl-modules-5.22 | perl-modules-5.24 | perl-modules-5.28 |
> > perl-modules-5.30
> > 
> 
> hi Tomas, 
> i did some experimenting and discovered that while explicitly listing all
> versions of perl-modules-5.XX in the control file, does work
> ...the control file can be simplified to just listing the 'perl-modules'
> virtual package
> 
> 
> debian will correctly pull the correct perl-modules-5.XX package, when
> installing perl-modules
> 
> i've tested the simplified control file by building a package with it (on
> deb9), and successfully installing the package on deb9, deb10, deb11 and
> ubuntu 1804, 1910, 2004, 2010
> 
> 
> you can test the package by running...
> 
> # docker run  -ti debian:testing bash
> echo 'deb [trusted=yes] http://apt.kohaaloha.com/koha-nightly dev main' > 
> /etc/apt/sources.list.d/koha.list
> apt update
> apt install koha-common
> dpkg -l | grep koha-common
>  ii  koha-common  20.05.00.000~git+d9.20200523231519.38b762ea-1 all
> integrated (physical) library management system

Great job, Mason.
Comment 25 Tomás Cohen Arazi 2020-05-27 14:25:40 UTC
Created attachment 105397 [details] [review]
Bug 25591: Update list-deps for Debian 10 and Ubuntu 20.04

This patch removes version-specific packages from the debian/control file,
which fixes a bug where koha-common can only be installed on the debian
version that the package was built on

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 28 Mason James 2020-06-01 03:03:29 UTC
Created attachment 105450 [details] [review]
Bug 25591: Update list-deps for Debian 10 and Ubuntu 20.04

update list-deps for libcpan-meta-perl package
Comment 29 Jonathan Druart 2020-06-02 13:22:30 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 30 Aleisha Amohia 2020-06-12 01:18:06 UTC
assuming this is for 20.05 only, not backporting to 19.11.x
Comment 31 Victor Grousset/tuxayo 2020-06-15 16:24:07 UTC
Should it be backported to 20.05? Because it seems to be only in master.
Comment 32 Mason James 2020-06-16 21:33:09 UTC
(In reply to Victor Grousset/tuxayo from comment #31)
> Should it be backported to 20.05? Because it seems to be only in master.

yes, please apply to 20.05.x branch
Comment 33 Lucas Gass 2020-06-17 20:43:29 UTC
backported to 20.05.x for 20.05.01
Comment 34 Aleisha Amohia 2020-06-17 21:50:20 UTC
backported to 19.11.x for 19.11.07, as recommended for Bug 22522
Comment 35 Victor Grousset/tuxayo 2020-06-18 17:13:49 UTC
IIUC Debian 10 support and Ubuntu 20.04 isn't for 19.05.x so not backporting this patch.