NACK/Cmnt: [PATCH] UBUNTU: [Packaging] Do not allow update-version-dkms to be run on a derivative kernel

Stefan Bader stefan.bader at canonical.com
Fri Mar 5 06:50:11 UTC 2021


On 04.03.21 21:00, Tim Gardner wrote:
> It is too easy to run this script when drifting through the cranky cheat sheet
> without really thinking about what you're doing while cranking a derivative
> kernel.
> 
> Signed-off-by: Tim Gardner <tim.gardner at canonical.com>
> ---

This does not work for hirsute forward-ports where the script must be run for 
all derivatives. Also this is not how changes should be rolled out.

-Stefan

>   update-version-dkms | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/update-version-dkms b/update-version-dkms
> index d90ce2c85f65..cfff38531275 100755
> --- a/update-version-dkms
> +++ b/update-version-dkms
> @@ -19,6 +19,14 @@ esac
>   # find our changelog.
>   debian=$(awk -F= '($1 == "DEBIAN") { print $2 }' <debian/debian.env)
>   
> +# Make sure this isn't a derivative kernel
> +uconf=$debian/etc/update.conf
> +if [ -f $uconf ]
> +then
> +	echo "Do not run this script on a derivative kernel."
> +	exit 1
> +fi
> +
>   # identify the current series
>   series=$(dpkg-parsechangelog -l"$debian/changelog" -SDistribution)
>   if [ "$series" = "UNRELEASED" ]; then
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20210305/f5d618f5/attachment.sig>


More information about the kernel-team mailing list