Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp5369244pxv; Wed, 7 Jul 2021 02:01:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCC5PW+frU+9uG5h4SLGH/IZlX94IwMuf2WnkS5UQ+NlRjeqvAaOSiXTo1TcxA1W5zakmD X-Received: by 2002:a05:6402:3581:: with SMTP id y1mr28389384edc.31.1625648518553; Wed, 07 Jul 2021 02:01:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625648518; cv=none; d=google.com; s=arc-20160816; b=nJSph3JapQ0Iq+pzv0BrWLbxwsOqhZlk6cw3E8VlJG+cZDvzmx9KEAKzmyC7hbbYhy nEZ3n2PsYLi9EcLvSVjV2MWuFvy18dUNdE3t3g0qUr5WUjX6TCtx3QsVIpazyCAWJwep e8H9ePUP465TAeve0IpHpuXRsoOWrgfTndQHXntbI2KckY/comGx93+uWSzJUtFXffAs TksJCDDtZPHQgf1sARCDDfF+0fnY4WSD6hsokGqBnkCo8B3xx0e+ptyXFZgSf+20UDw6 PtKfjN6qB7xoKQ7ccWcQ64v1mnSFcR3NGLfaMoehlYxuLbYPMaivUJbMVrMKdKI285+a So1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=zKAn8Dx3Y/L0pbsgSbA9OgZ7rDKTbASTW3EYoEIIFa4=; b=uCPmYgnhuIiTN3+3uhPRO9WE12TL3EenBrL5ce+F3yot4WU9hgbRy0d3pLZKP0gVAM QTCtcxS0carqtML5FNWBbGylD1f8z+0bYL8NAWsoWCLjsHoHy2YTDrW13alSXkfYpY1y z3hmdISB5/bAHXkrXygv9DZ/YWWe2tzVDJuZD97u95768JP7loDnmzUBC5dsLifzjuXw nbtMXnpr1XOEMIee1Ni9QlgYydDj8zAN2o7rTdV206kLgSGW6Ci7eItkgu0GC1Qh4wmO i8ipHyL0Ww+JFPxyEKGJwbQZLreAhRIuK9JHFGWb7IL+p1r+NaKhJahTGTu2VcUJ5cq9 kU5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=eVr6Wnxy; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=vBsHwFIF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 5si8700556ejq.621.2021.07.07.02.01.34; Wed, 07 Jul 2021 02:01:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=eVr6Wnxy; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=vBsHwFIF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231190AbhGGJDP (ORCPT + 99 others); Wed, 7 Jul 2021 05:03:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230219AbhGGJDO (ORCPT ); Wed, 7 Jul 2021 05:03:14 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD414C061574; Wed, 7 Jul 2021 02:00:34 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1625648431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=zKAn8Dx3Y/L0pbsgSbA9OgZ7rDKTbASTW3EYoEIIFa4=; b=eVr6Wnxy0OoN8+QuLtOOjr5eycSwcNsbgtTOEt9WMEm++cvWdSqI2DomT3G7kyigmjlgrp py0yctsCiprDmgVh8091lkKgKuGVB/9wdWmdo2zD3T/vwgujci1sNkO3KEMdegpViu1OAg uL1r6xwPWLjK/95h/cowe2maqz6Lr1GaAbGfkagMl7hRKvn0f2G4LFO3zC90awe8nJ+eLJ lgrU/CHi92cS+/caaP9WKzFVLkFvWt/K5vyMUSwA1oJxGqH/N8FhidwHLvIZaKkVDM//Gy xfK8sWK/IFTL3LhEA+KvUrAckql/13hccm96ajjkxhH4O7SN6OIM7RcefdIuXg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1625648431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=zKAn8Dx3Y/L0pbsgSbA9OgZ7rDKTbASTW3EYoEIIFa4=; b=vBsHwFIFbn+3aL5gtPuo/Wfkpr4xNFykm75s3sPA7dIw8WqgHFiPnM7P7zWt5AWRcUcfNv cad8rWx5i5MRrbBQ== To: Nishanth Menon , Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, linux-spdx@vger.kernel.org, Rahul T R , Nishanth Menon Subject: Re: [PATCH] scripts/spdxcheck.py: Lets strictly read license files in utf-8 In-Reply-To: <20210703012128.27946-1-nm@ti.com> References: <20210703012128.27946-1-nm@ti.com> Date: Wed, 07 Jul 2021 11:00:31 +0200 Message-ID: <87h7h6qz0w.ffs@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Nishanth, On Fri, Jul 02 2021 at 20:21, Nishanth Menon wrote: > Commit bc41a7f36469 ("LICENSES: Add the CC-BY-4.0 license") > unfortunately introduced LICENSES/dual/CC-BY-4.0 in UTF-8 Unicode text Sigh. Why are people adding such things w/o running this script in the first place. > While python will barf at it with: > > FAIL: 'ascii' codec can't decode byte 0xe2 in position 2109: ordinal not in range(128) > Traceback (most recent call last): > File "scripts/spdxcheck.py", line 244, in > spdx = read_spdxdata(repo) > File "scripts/spdxcheck.py", line 47, in read_spdxdata > for l in open(el.path).readlines(): > File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode > return codecs.ascii_decode(input, self.errors)[0] > UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 2109: ordinal not in range(128) > > While it is indeed debatable if 'Licensor.' used in the license file > needs unicode quotes, instead, let us force spdxcheck to read utf-8 > instead. s/let us// Ditto for the $subject. See Documentation/process/ for further enlightment. > Reported-by: Rahul T R > Signed-off-by: Nishanth Menon With that fixed: Reviewed-by: Thomas Gleixner