Description
Mason James
2020-05-22 21:01:12 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 (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 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. Nice work everyone! Pushed to master for 20.05 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 What is the test plan? Just having the packages install successfully? 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> 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 :) Created attachment 105334 [details]
list-deps-debian10-master
Created attachment 105335 [details]
list-deps-debian9-master
Created attachment 105336 [details]
list-deps-debian9-master-with-25591
Created attachment 105337 [details]
list-deps-debian10-master
Created attachment 105338 [details]
list-deps-debian10-master-with-25591
Created attachment 105339 [details]
list-deps-ubuntu20.04-master
Created attachment 105340 [details]
list-deps-ubuntu20.04-master-with-25591
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. (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. 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). 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. (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 (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. 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> 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 Pushed to master for 20.11, thanks to everybody involved! assuming this is for 20.05 only, not backporting to 19.11.x Should it be backported to 20.05? Because it seems to be only in master. (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 backported to 20.05.x for 20.05.01 backported to 19.11.x for 19.11.07, as recommended for Bug 22522 IIUC Debian 10 support and Ubuntu 20.04 isn't for 19.05.x so not backporting this patch. (In reply to Aleisha Amohia from comment #34) > backported to 19.11.x for 19.11.07, as recommended for Bug 22522 this has been resolved now, closing (In reply to Victor Grousset/tuxayo from comment #35) > IIUC Debian 10 support and Ubuntu 20.04 isn't for 19.05.x so not backporting > this patch. hi Victor. can you add this patch to 19.05.x branch it will fix 19.05 installation errors on... deb 8, 10, 11 ubuntu 16.04, 18.04, 20.04, 20.10 the current 19.05 branch only installs on deb ps: i have applied this patch to the last 3 19.05.x package releases > the current 19.05 branch only installs on deb
oops, typo...
the current 19.05 branch only installs on deb9
(In reply to Mason James from comment #37) > it will fix 19.05 installation errors on... > deb 8, 10, 11 > ubuntu 16.04, 18.04, 20.04, 20.10 [U+1F631][U+1F631][U+1F631] okay that's a big deal. > ps: i have applied this patch to the last 3 19.05.x package releases Thanks a lot! Ok backporting. Rats! Conflict which I can't resolve: Next is the conflict part in the diff3 conflict style. Here is the structure: <<<<<<< HEAD here is the code in 19.05.x before the cherry-pick ||||||| parent of 248978bc62... Bug 25591: Update list-deps for Debian 10 and Ubuntu 20.04 here is the code in 19.11.x before the patch ======= here is the code in 19.11.x after the patch >>>>>>> 248978bc62... Bug 25591: Update list-deps for Debian 10 and Ubuntu 20.04 <<<<<<< HEAD my $modules = C4::Installer::PerlModules->new(); my $prereqs = $modules->prereqs; foreach my $phase ($prereqs->phases) { foreach my $type ($prereqs->types_in($phase)) { my $reqs = $prereqs->requirements_for($phase, $type); ||||||| parent of 248978bc62... Bug 25591: Update list-deps for Debian 10 and Ubuntu 20.04 # Remove packages that are required/essential and always installed on # a Debian system. Debian packages should not have unversioned # dependencies on such packages. foreach my $line (@temp) { if ( $line ne "perl-base" ) { @lines = ( @lines, $line ); } } if ( exists $overrides{$module} ) { print "$overrides{$module}\n"; } elsif ( scalar(@lines) == 1 && $lines[0] ne "" ) { my $pkg = $lines[0]; print "$pkg\n"; } elsif ( scalar(@lines) > 1 ) { foreach my $pkg (@lines) { print " | " if ( $pkg ne $lines[0] ); print "$pkg"; print " | $pkg" . "-5.22" if ( $pkg eq "perl-modules" ); print " | $pkg" . "-5.24" if ( $pkg eq "perl-modules" ); } print "\n"; } elsif ( scalar(@temp) != 0 ) { ======= # Remove packages that are required/essential and always installed on # a Debian system. Debian packages should not have unversioned # dependencies on such packages. # skip perl-base and problematic version specific libperl* and # perl-module* packages (they get installed as deps. anyway) foreach my $line (@temp) { if ( $line ne "perl-base" and $line !~ /^libperl5\./ and $line !~ /^perl-modules-5\./ ) { @lines = ( @lines, $line ); } } if ( exists $overrides{$module} ) { print "$overrides{$module}\n"; } elsif ( scalar(@lines) == 1 && $lines[0] ne "" ) { my $pkg = $lines[0]; print "$pkg\n"; } elsif ( scalar(@lines) > 1 ) { foreach my $pkg (@lines) { print " | " if ( $pkg ne $lines[0] ); print "$pkg"; } print "\n"; } elsif ( scalar(@temp) != 0 ) { >>>>>>> 248978bc62... Bug 25591: Update list-deps for Debian 10 and Ubuntu 20.04 > Rats! Conflict which I can't resolve:
It was a mistake on my side.
Backported to 19.05.x branch for 19.05.15
*** Bug 26109 has been marked as a duplicate of this bug. *** |