Message ID | 20230925145835.60044-2-cascardo@canonical.com |
---|---|
State | New |
Headers | show |
Series | Allow dashes in meta version when computing ABI | expand |
SOB by me and applied. On Mon, 25 Sept 2023 at 15:59, Thadeu Lima de Souza Cascardo <cascardo@canonical.com> wrote: > > Meta packages have been provided as native packages for some time. That has > been one source of confusion amongst users once in a while. Though meta > packages can be seen as native packages, there is no strong reason to do so > today that would prevent us from shipping them as non-native, just like it > is done for signed and lrm. > > Given that dashes sort out before dots, it is possible to ship meta > packages with a dash in the version (that is, not as native packages > anymore), and move back to dots, if necessary. > > The other way around, that is, providing a newer version using dashes > instead of dots is not possible. > > So, taking the chance that unstable will be moving upstream version soon, > this is the first step to get it ready to do so. > > When computing the ABI given the meta package source version, it is assumed > that uses only dots. If that is not true anymore, we must allow for either > a dash or a dot. This still assumes that there are 3 digit-only components > in the upstream version all separated by dots, and that the next ABI > component is also only digits and everything else after that in the version > is not part of the ABI. That may also change in the future. > > Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> > --- > debian/rules | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/debian/rules b/debian/rules > index e20511f3aa17..77d52afa9265 100755 > --- a/debian/rules > +++ b/debian/rules > @@ -16,11 +16,9 @@ SERIES=$(shell dpkg-parsechangelog -SDistribution | sed -e 's/-\(security\|updat > SOURCE=$(shell dpkg-parsechangelog -SSource) > KERNEL_SOURCE=$(shell echo "$(SOURCE)" | sed -e 's/-meta//') > > -# 5 digit versions (2.6.38.<abi>.<upload>, 3 digit kernel base versions (2.6.38) > -KERNEL_VERSION=$(shell dpkg-parsechangelog -SVersion | cut -d. -f1-3) > -KERNEL_ABI=$(shell dpkg-parsechangelog -SVersion | cut -d. -f4) > - > -KERNEL_ABI_VERSION=$(KERNEL_VERSION)-$(KERNEL_ABI) > +# 5 digit versions (2.6.38[.-]<abi>.<upload>, 3 digit kernel base versions (2.6.38) > +KERNEL_ABI_VERSION=$(shell dpkg-parsechangelog -SVersion | sed -ne 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)[\.\-]\([0-9]*\)\..*/\1.\2.\3-\4/p') > +KERNEL_VERSION=$(shell echo "$(KERNEL_ABI_VERSION)" | sed -ne 's/[\.\-][0-9]*$$//p') > > # Get variants, assuming primary if debian/variants is not present > variants = -- > -- > 2.34.1 > > > -- > kernel-team mailing list > kernel-team@lists.ubuntu.com > https://lists.ubuntu.com/mailman/listinfo/kernel-team
diff --git a/debian/rules b/debian/rules index e20511f3aa17..77d52afa9265 100755 --- a/debian/rules +++ b/debian/rules @@ -16,11 +16,9 @@ SERIES=$(shell dpkg-parsechangelog -SDistribution | sed -e 's/-\(security\|updat SOURCE=$(shell dpkg-parsechangelog -SSource) KERNEL_SOURCE=$(shell echo "$(SOURCE)" | sed -e 's/-meta//') -# 5 digit versions (2.6.38.<abi>.<upload>, 3 digit kernel base versions (2.6.38) -KERNEL_VERSION=$(shell dpkg-parsechangelog -SVersion | cut -d. -f1-3) -KERNEL_ABI=$(shell dpkg-parsechangelog -SVersion | cut -d. -f4) - -KERNEL_ABI_VERSION=$(KERNEL_VERSION)-$(KERNEL_ABI) +# 5 digit versions (2.6.38[.-]<abi>.<upload>, 3 digit kernel base versions (2.6.38) +KERNEL_ABI_VERSION=$(shell dpkg-parsechangelog -SVersion | sed -ne 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)[\.\-]\([0-9]*\)\..*/\1.\2.\3-\4/p') +KERNEL_VERSION=$(shell echo "$(KERNEL_ABI_VERSION)" | sed -ne 's/[\.\-][0-9]*$$//p') # Get variants, assuming primary if debian/variants is not present variants = --
Meta packages have been provided as native packages for some time. That has been one source of confusion amongst users once in a while. Though meta packages can be seen as native packages, there is no strong reason to do so today that would prevent us from shipping them as non-native, just like it is done for signed and lrm. Given that dashes sort out before dots, it is possible to ship meta packages with a dash in the version (that is, not as native packages anymore), and move back to dots, if necessary. The other way around, that is, providing a newer version using dashes instead of dots is not possible. So, taking the chance that unstable will be moving upstream version soon, this is the first step to get it ready to do so. When computing the ABI given the meta package source version, it is assumed that uses only dots. If that is not true anymore, we must allow for either a dash or a dot. This still assumes that there are 3 digit-only components in the upstream version all separated by dots, and that the next ABI component is also only digits and everything else after that in the version is not part of the ABI. That may also change in the future. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> --- debian/rules | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)