[{"id":22454,"web_url":"https://patchwork.libcamera.org/comment/22454/","msgid":"<164833473112.15275.1089954058162462317@Monstersaurus>","date":"2022-03-26T22:45:31","subject":"Re: [libcamera-devel] [PATCH] utils: hooks: pre-push: Catch commits\n\twithout author's SoB","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart via libcamera-devel (2022-03-26 17:46:39)\n> The pre-push git hook script catches commits without a SoB line\n> corresponding to the committer, but doesn't perform the same check on\n> the author. Fix it.\n\nDoes this check and validate/prevent the mailing list name issue? I.e.\nis this matching the entire of the 'From:' against the Author: to match\nthe full name and e-mail precisely? or is it only checking the name? (In\nfact, that's sufficient to prevent last weeks mishap anyway so:\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  utils/hooks/pre-push | 12 ++++++++++--\n>  1 file changed, 10 insertions(+), 2 deletions(-)\n> \n> diff --git a/utils/hooks/pre-push b/utils/hooks/pre-push\n> index e4187f381a43..90ffdf6f1755 100755\n> --- a/utils/hooks/pre-push\n> +++ b/utils/hooks/pre-push\n> @@ -67,8 +67,8 @@ do\n>                         errors=$((errors+1))\n>                 fi\n>  \n> -               # 2. The commit message shall have a Signed-off-by line\n> -               # corresponding the committer.\n> +               # 2. The commit message shall have Signed-off-by lines\n> +               # corresponding the committer and the author.\n>                 committer=$(echo \"$msg\" | grep '^committer ' | head -1 | \\\n>                                 cut -d ' ' -f 2- | rev | cut -d ' ' -f 3- | rev)\n>                 if ! echo \"$msg\" | grep -F -q \"Signed-off-by: ${committer}\"\n> @@ -77,6 +77,14 @@ do\n>                         errors=$((errors+1))\n>                 fi\n>  \n> +               author=$(echo \"$msg\" | grep '^author ' | head -1 | \\\n> +                               cut -d ' ' -f 2- | rev | cut -d ' ' -f 3- | rev)\n> +               if ! echo \"$msg\" | grep -F -q \"Signed-off-by: ${author}\"\n> +               then\n> +                       echo >&2 \"Missing author Signed-off-by in commit $commit\"\n> +                       errors=$((errors+1))\n> +               fi\n> +\n>                 # 3. A Reviewed-by or Acked-by is required.\n>                 if ! echo \"$msg\" | grep -q '^\\(Reviewed\\|Acked\\)-by: '\n>                 then\n> -- \n> Regards,\n> \n> Laurent Pinchart\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 2C4CDC0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 26 Mar 2022 22:45:35 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8E08C604C7;\n\tSat, 26 Mar 2022 23:45:34 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C11E1604C4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 26 Mar 2022 23:45:33 +0100 (CET)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5A018332;\n\tSat, 26 Mar 2022 23:45:33 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1648334734;\n\tbh=2Q22I7+PL9LYZYt7vtBiIEDS/L/DsIwEgwy4cnWB3yA=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=zVTkhzA209DOy7bdE0JNG1nBlsaejBTmC5FlH10enZ5O4tHuc40I0vlXu2K5EQa0Y\n\tDL5b9lQgGmORb+iSNJvoJtOSB0suTve/EDKNpBAJyqzf+zKqc8eWfR5ybSSkTGap/n\n\tzPGSUKgW+gaAJlaEzjnIFbeF1nPQsiedIPSTp8dmLbOHvPhToyk42bgKodJYPWhn/o\n\t2WYNTmmkTM0QPyV+x7DFgZKeQwzgz9HgnII9x7pFcnUZuHswYOT8JBACP40b9wNw+o\n\t4D3nvgR47Xq2uDPbNS/CGsjv3lcqDdRB6KTxxwUJohp4h7SWr1lmqH5GRb1nbzr8lw\n\tWfnMcAtp7o+jA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1648334733;\n\tbh=2Q22I7+PL9LYZYt7vtBiIEDS/L/DsIwEgwy4cnWB3yA=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=W3LllMLDjC7Yir1JpmIJR+deiNNFZqSZo3u2+aRHhtiWYmXYRdwtya19vrV2ZYPTD\n\t5gkiq0UkiwDcl6g5LqLq4ZzlbXVeMdh3Mu+mWctfffVhNJJx2AEVMPwe8IdVK3Uj3c\n\to+brJps7Iom4H2bquc9nBpixAU25ZeMj2kQZGSos="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"W3LllMLD\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20220326174639.32199-1-laurent.pinchart@ideasonboard.com>","References":"<20220326174639.32199-1-laurent.pinchart@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Sat, 26 Mar 2022 22:45:31 +0000","Message-ID":"<164833473112.15275.1089954058162462317@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH] utils: hooks: pre-push: Catch commits\n\twithout author's SoB","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":22456,"web_url":"https://patchwork.libcamera.org/comment/22456/","msgid":"<Yj+/xMiw+zniIHq1@pendragon.ideasonboard.com>","date":"2022-03-27T01:37:08","subject":"Re: [libcamera-devel] [PATCH] utils: hooks: pre-push: Catch commits\n\twithout author's SoB","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Sat, Mar 26, 2022 at 10:45:31PM +0000, Kieran Bingham wrote:\n> Quoting Laurent Pinchart via libcamera-devel (2022-03-26 17:46:39)\n> > The pre-push git hook script catches commits without a SoB line\n> > corresponding to the committer, but doesn't perform the same check on\n> > the author. Fix it.\n> \n> Does this check and validate/prevent the mailing list name issue? I.e.\n> is this matching the entire of the 'From:' against the Author: to match\n> the full name and e-mail precisely? or is it only checking the name? (In\n> fact, that's sufficient to prevent last weeks mishap anyway so:\n\nYes, it matches the name and e-mail address, and will thus prevent the\n\"via libcamera-devel\" authorship issue.\n\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> >  utils/hooks/pre-push | 12 ++++++++++--\n> >  1 file changed, 10 insertions(+), 2 deletions(-)\n> > \n> > diff --git a/utils/hooks/pre-push b/utils/hooks/pre-push\n> > index e4187f381a43..90ffdf6f1755 100755\n> > --- a/utils/hooks/pre-push\n> > +++ b/utils/hooks/pre-push\n> > @@ -67,8 +67,8 @@ do\n> >                         errors=$((errors+1))\n> >                 fi\n> >  \n> > -               # 2. The commit message shall have a Signed-off-by line\n> > -               # corresponding the committer.\n> > +               # 2. The commit message shall have Signed-off-by lines\n> > +               # corresponding the committer and the author.\n> >                 committer=$(echo \"$msg\" | grep '^committer ' | head -1 | \\\n> >                                 cut -d ' ' -f 2- | rev | cut -d ' ' -f 3- | rev)\n> >                 if ! echo \"$msg\" | grep -F -q \"Signed-off-by: ${committer}\"\n> > @@ -77,6 +77,14 @@ do\n> >                         errors=$((errors+1))\n> >                 fi\n> >  \n> > +               author=$(echo \"$msg\" | grep '^author ' | head -1 | \\\n> > +                               cut -d ' ' -f 2- | rev | cut -d ' ' -f 3- | rev)\n> > +               if ! echo \"$msg\" | grep -F -q \"Signed-off-by: ${author}\"\n> > +               then\n> > +                       echo >&2 \"Missing author Signed-off-by in commit $commit\"\n> > +                       errors=$((errors+1))\n> > +               fi\n> > +\n> >                 # 3. A Reviewed-by or Acked-by is required.\n> >                 if ! echo \"$msg\" | grep -q '^\\(Reviewed\\|Acked\\)-by: '\n> >                 then","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 14BFAC0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 27 Mar 2022 01:37:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BD0C4604C5;\n\tSun, 27 Mar 2022 03:37:12 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D999A601F8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 27 Mar 2022 03:37:10 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4E529FA;\n\tSun, 27 Mar 2022 03:37:10 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1648345032;\n\tbh=R6t8XBglsIErE82GKZ2mYeyYfjKI1Z3Vto5enUSnwJM=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=don0w34+O0ygMtw+QWE2PtUV8J9nRwZxdbllJI+A7N1L9Dv1mgiKLOMAksnt/w9GQ\n\tu7ZkC21q0SlJD9RW3cX7Co41Cz9aohyXhQswNOjWSkzkd8n0IzILO+HooavC259djm\n\tVhITYiidhlD4PClg3O6TWxMsnJr7OZzMutfh3/I9sAS/FDIGo7nonsJS49CqaLAY7H\n\tEri8tK8PLLyrgPvGwSTY6/45zxA7Fi7czHroBgRmWMYyzG+GovwofrjvtX+6DRn8Fp\n\tS+uN3Q4DheePAhUt5M3ijHmJkKP30JiTTZ8zIxONRpnZzBzuyiBCqq2DNyeu+mMxz2\n\tZYxhkUg+yhOTA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1648345030;\n\tbh=R6t8XBglsIErE82GKZ2mYeyYfjKI1Z3Vto5enUSnwJM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=TZhCdcoO1kl/ViI3HxZZeb4lFLi2mCFcRMOHrpi5x36ASli3CC832m+w494eT5bv7\n\t2Ly22RQbJLa0Ur6s4EwUB+uOUodzVWrjNoK7+9kfQAZDXs1foiBfn99BDzeaYPkGeW\n\tSD8m1cDpH3niF71qL7wulGiaJPF08MDEoXDJnpro="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"TZhCdcoO\"; dkim-atps=neutral","Date":"Sun, 27 Mar 2022 04:37:08 +0300","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<Yj+/xMiw+zniIHq1@pendragon.ideasonboard.com>","References":"<20220326174639.32199-1-laurent.pinchart@ideasonboard.com>\n\t<164833473112.15275.1089954058162462317@Monstersaurus>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<164833473112.15275.1089954058162462317@Monstersaurus>","Subject":"Re: [libcamera-devel] [PATCH] utils: hooks: pre-push: Catch commits\n\twithout author's SoB","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]