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

Tim Gardner tim.gardner at canonical.com
Thu Mar 4 17:44:50 UTC 2021



On 3/4/21 9:21 AM, Thadeu Lima de Souza Cascardo wrote:
> On Thu, Mar 04, 2021 at 09:16:38AM -0700, 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>
>> ---
>>
>> v2 - use debian.DERIVATIVE/etc/update.conf to determine if this is a master
>>       dependent derivative.
>>
>>   update-version-dkms | 11 +++++++++++
>>   1 file changed, 11 insertions(+)
>>
>> diff --git a/update-version-dkms b/update-version-dkms
>> index d90ce2c85f65..70158d3c6127 100755
>> --- a/update-version-dkms
>> +++ b/update-version-dkms
>> @@ -19,6 +19,17 @@ 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
>> +	if egrep -q "DEBIAN_MASTER=debian\.master" $uconf
>> +	then
> 
> We have derivatives of derivatives, like xenial/linux-azure, which has
> debian.azure-4.15 as DEBIAN_MASTER.
> 

Is it sufficient to just check if DEBIAN_MASTER exists in 
$debian/etc/update.conf ?

rtg
-----------
Tim Gardner
Canonical, Inc



More information about the kernel-team mailing list