Message ID | 20230330125739.876314-2-tjaalton@ubuntu.com |
---|---|
State | New |
Headers | show |
Series | Add lrm autogenerated transitional independent of variants | expand |
On 23/03/30 03:57PM, Timo Aaltonen wrote: > From: Kleber Sacilotto de Souza <kleber.souza@canonical.com> > > BugLink: https://bugs.launchpad.net/bugs/1991130 > > Add a new "migrate" command to be used by 'debian/package.config' which > contrary to "transitional" doesn't have the autogenerated contents > filtered out by 'debian/rules.in' depending on the source's variants. > > v2: rebased, and added Provides which is needed to replace the old driver I would drop this when applying (it should have resided in the cover letter). > > Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com> > Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com> > --- > debian/scripts/generate-rules | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > > diff --git a/debian/scripts/generate-rules b/debian/scripts/generate-rules > index d9a2a10..90dc570 100755 > --- a/debian/scripts/generate-rules > +++ b/debian/scripts/generate-rules > @@ -38,6 +38,7 @@ mkdir -p "debian/control.d" > : >"debian/control.d/nvidia" > : >"debian/control.d/migrate-nvidia" > : >"debian/control.d/transitionals-local" > +: >"debian/control.d/migrate-local" > : >"debian/control.d/signatures" > > cat - "debian/rules.in" >"debian/rules.gen" <<EOL > @@ -279,3 +280,24 @@ Description: Extra drivers for nvidia-${from} (dummy transitional package) > Transitional package for upgrades of ${from} to ${to}. > EOL > done <"debian/package.config" > + > +while read command from to archs > +do > + case "$command" in > + migrate) from_minus=$(echo "$from" | sed -e 's/-.*//');; > + *) continue ;; > + esac > + > + # debian/control.d/migrate-local > + echo "II: manual migrate linux-modules-nvidia-$from -> linux-modules-nvidia-$to" > + cat - >>"debian/control.d/migrate-local" <<EOL > + > +Package: linux-modules-nvidia-${from} > +Architecture: ${archs} > +Section: oldlibs > +Provides: \${dkms:nvidia-${from_minus}-modules}, nvidia-prebuilt-kernel > +Depends: linux-modules-nvidia-${to} > +Description: Extra drivers for nvidia-${from} (dummy transitional package) > + Transitional package for upgrades of ${from} to ${to}. > +EOL > +done <"debian/package.config" > -- > 2.39.2 Acked-by: Andrei Gherzan <andrei.gherzan@canonical.com>
On 30.03.23 14:57, Timo Aaltonen wrote: > From: Kleber Sacilotto de Souza <kleber.souza@canonical.com> > > BugLink: https://bugs.launchpad.net/bugs/1991130 > > Add a new "migrate" command to be used by 'debian/package.config' which > contrary to "transitional" doesn't have the autogenerated contents > filtered out by 'debian/rules.in' depending on the source's variants. > > v2: rebased, and added Provides which is needed to replace the old driver > > Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com> > Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> > --- I think this is basically the base so one can half-way sanely define which things should migrate to where. As is this should not change anything. So would go into LRM first... > debian/scripts/generate-rules | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > > diff --git a/debian/scripts/generate-rules b/debian/scripts/generate-rules > index d9a2a10..90dc570 100755 > --- a/debian/scripts/generate-rules > +++ b/debian/scripts/generate-rules > @@ -38,6 +38,7 @@ mkdir -p "debian/control.d" > : >"debian/control.d/nvidia" > : >"debian/control.d/migrate-nvidia" > : >"debian/control.d/transitionals-local" > +: >"debian/control.d/migrate-local" > : >"debian/control.d/signatures" > > cat - "debian/rules.in" >"debian/rules.gen" <<EOL > @@ -279,3 +280,24 @@ Description: Extra drivers for nvidia-${from} (dummy transitional package) > Transitional package for upgrades of ${from} to ${to}. > EOL > done <"debian/package.config" > + > +while read command from to archs > +do > + case "$command" in > + migrate) from_minus=$(echo "$from" | sed -e 's/-.*//');; > + *) continue ;; > + esac > + > + # debian/control.d/migrate-local > + echo "II: manual migrate linux-modules-nvidia-$from -> linux-modules-nvidia-$to" > + cat - >>"debian/control.d/migrate-local" <<EOL > + > +Package: linux-modules-nvidia-${from} > +Architecture: ${archs} > +Section: oldlibs > +Provides: \${dkms:nvidia-${from_minus}-modules}, nvidia-prebuilt-kernel > +Depends: linux-modules-nvidia-${to} > +Description: Extra drivers for nvidia-${from} (dummy transitional package) > + Transitional package for upgrades of ${from} to ${to}. > +EOL > +done <"debian/package.config"
diff --git a/debian/scripts/generate-rules b/debian/scripts/generate-rules index d9a2a10..90dc570 100755 --- a/debian/scripts/generate-rules +++ b/debian/scripts/generate-rules @@ -38,6 +38,7 @@ mkdir -p "debian/control.d" : >"debian/control.d/nvidia" : >"debian/control.d/migrate-nvidia" : >"debian/control.d/transitionals-local" +: >"debian/control.d/migrate-local" : >"debian/control.d/signatures" cat - "debian/rules.in" >"debian/rules.gen" <<EOL @@ -279,3 +280,24 @@ Description: Extra drivers for nvidia-${from} (dummy transitional package) Transitional package for upgrades of ${from} to ${to}. EOL done <"debian/package.config" + +while read command from to archs +do + case "$command" in + migrate) from_minus=$(echo "$from" | sed -e 's/-.*//');; + *) continue ;; + esac + + # debian/control.d/migrate-local + echo "II: manual migrate linux-modules-nvidia-$from -> linux-modules-nvidia-$to" + cat - >>"debian/control.d/migrate-local" <<EOL + +Package: linux-modules-nvidia-${from} +Architecture: ${archs} +Section: oldlibs +Provides: \${dkms:nvidia-${from_minus}-modules}, nvidia-prebuilt-kernel +Depends: linux-modules-nvidia-${to} +Description: Extra drivers for nvidia-${from} (dummy transitional package) + Transitional package for upgrades of ${from} to ${to}. +EOL +done <"debian/package.config"