From patchwork Fri Jun 30 13:03:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Henrique Cerri X-Patchwork-Id: 782850 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3wzcD62j3Yz9sPN; Fri, 30 Jun 2017 23:03:50 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical-com.20150623.gappssmtp.com header.i=@canonical-com.20150623.gappssmtp.com header.b="yCowoqpH"; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1dQvaL-0008Ki-9i; Fri, 30 Jun 2017 13:03:45 +0000 Received: from mail-qt0-f173.google.com ([209.85.216.173]) by huckleberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1dQvaG-0008Kb-Ve for kernel-team@lists.ubuntu.com; Fri, 30 Jun 2017 13:03:41 +0000 Received: by mail-qt0-f173.google.com with SMTP id r30so98028694qtc.0 for ; Fri, 30 Jun 2017 06:03:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=Ekw1HWI8VAsPTLneLoLC3wpRxBkNf1WCvFI6zpd1cAM=; b=yCowoqpHY8Zu9jKgeU7/6r+YCY/LkhHHybPRfm+tQEc+odXRpKU0KZ+N8xuiNvfzrd LxAaNVN66joPDz1/vzKcYm4t7a6XPRgFwZmhTvtjScmMoiGOQJX8oiInm2uiYTs/2Szy Z03nOfPgFMdeuRPLgb6E2ZSvviRSvfBmGmL749Rq1oMziAO4lpdX6w6p7CpiIvitwQze YMtEP4rQtRQXR802NeuIVsyyZQZalSbfjWnF6k+4SRTwBKVt2enlJ/XhQSf72RAsMeC5 Eiqd7k1UyyDvtdLjhAR88ylbOY2yGoTLegrZ3dmj+6cUNs5z7Mu9XL35U5HBVX6GOCwQ 8Hdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=Ekw1HWI8VAsPTLneLoLC3wpRxBkNf1WCvFI6zpd1cAM=; b=VmQhvifonjV3619I1e+wFjMTnmHXDUD3WBRMGuSBRcJkcvV43ue8cDQArxKukKRqnV Xv1rXspKEgfo4ojpXFd01fvTBjJMX4aWL4379fVREzWIWlScWyOrUSou/mxAgH//6AMI 6pE/pLrJ8kNFqpODOWmj3lj+jeP5oQJnQ7i30eOg/7m3Ku7swSlwCRED8gFc6j6hHQeR sU8Q1zjJ89NQJrNS1hZwf0+mcdzjkP6pEcQWOobxiFYJTCAB/Kj0fRQeFxv3W9AJdtoF b2H12p4VjoFv0cMg6s3cf/LTc4CnkzS7XVxCzpaQXtC0OFECnQsYtB0Kn9FAFtRn0fC7 1i/g== X-Gm-Message-State: AKS2vOytC3uxAfRCneYVQdCHqrY2etBwFyh7mYKnBTBaI0c9IsnSaFy/ A91biwZ2eLQ3wB5rMVY= X-Received: by 10.200.53.243 with SMTP id l48mr27277759qtb.7.1498827819495; Fri, 30 Jun 2017 06:03:39 -0700 (PDT) Received: from localhost.localdomain ([191.8.93.72]) by smtp.gmail.com with ESMTPSA id b13sm6870615qta.25.2017.06.30.06.03.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Jun 2017 06:03:38 -0700 (PDT) From: Marcelo Henrique Cerri To: kernel-team@lists.ubuntu.com Subject: [xenial][PATCH] UBUNTU: [Debian] Support custom and lts kernels in printchanges/insertchanges Date: Fri, 30 Jun 2017 10:03:31 -0300 Message-Id: <1498827811-26675-1-git-send-email-marcelo.cerri@canonical.com> X-Mailer: git-send-email 2.7.4 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com Ignore: yes Currently printchanges/insertchanges do not work for custom kernels because commit messages for each release follow the format "UBUNTU: Ubuntu-${flavour}-${prev_fullver}" instead of "UBUNTU: Ubuntu-${prev_fullver}". Also, for the first release, the previous version in the changelog does not match the version in the previous release commit. This patch makes the base commit selection more flexible, allowing commit messages in the format "UBUNTU: Ubuntu-*${prev_fullver}" and it fallbacks to the latest release commit when a exact match is not found in order to support the custom kernels in their initial releases. Signed-off-by: Marcelo Henrique Cerri Acked-by: Kleber Sacilotto de Souza --- debian/rules.d/1-maintainer.mk | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/debian/rules.d/1-maintainer.mk b/debian/rules.d/1-maintainer.mk index 0c579c85195e..d469fc2331b7 100644 --- a/debian/rules.d/1-maintainer.mk +++ b/debian/rules.d/1-maintainer.mk @@ -97,9 +97,14 @@ printenv: printchanges: @baseCommit=$$(git log --pretty=format:'%H %s' | \ - gawk '/UBUNTU: '".*Ubuntu-`echo $(prev_fullver) | sed 's/+/\\\\+/'`"'$$/ { print $$1; exit }'); \ - git log "$$baseCommit"..HEAD | \ - $(DROOT)/scripts/misc/git-ubuntu-log $(ubuntu_log_opts) + gawk '/UBUNTU: '".*Ubuntu-.*`echo $(prev_fullver) | sed 's/+/\\\\+/'`"'(~.*)?$$/ { print $$1; exit }'); \ + if [ -z "$$baseCommit" ]; then \ + echo "WARNING: couldn't find a commit for the previous version. Using the lastest one." >&2; \ + baseCommit=$$(git log --pretty=format:'%H %s' | \ + gawk '/UBUNTU:\s*Ubuntu-.*$$/ { print $$1; exit }'); \ + fi; \ + git log "$$baseCommit"..HEAD | \ + $(DROOT)/scripts/misc/git-ubuntu-log $(ubuntu_log_opts) insertchanges: autoreconstruct @perl -w -f $(DROOT)/scripts/misc/insert-changes.pl $(DROOT) $(DEBIAN)