From patchwork Mon Jul 10 13:46:53 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: 786203 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 3x5mjk18kVz9s0Z; Mon, 10 Jul 2017 23:47:22 +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="UEyvveV8"; 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 1dUZ1z-0002TE-Es; Mon, 10 Jul 2017 13:47:19 +0000 Received: from mail-qk0-f174.google.com ([209.85.220.174]) by huckleberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1dUZ1j-0002LF-Hj for kernel-team@lists.ubuntu.com; Mon, 10 Jul 2017 13:47:03 +0000 Received: by mail-qk0-f174.google.com with SMTP id 16so73703344qkg.2 for ; Mon, 10 Jul 2017 06:47:03 -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:in-reply-to:references; bh=Ekw1HWI8VAsPTLneLoLC3wpRxBkNf1WCvFI6zpd1cAM=; b=UEyvveV8RfMi+PcoCji4SGs54PENmrrVK8Z/0G12sSvCu5txVXQKrcFl0P9x1nbL78 F3w/RUE1R/ImCrxAb9DfS1zflw3Hb/slWJWZenyArIDi2f+He03QWPc8uPBXSRYHi7cm 78nhFyV+Fr28JDTWV1k9KwvJv2qL2ZiDMXXF7iC5mp5rbaVlX1891ROyD4MiIxsrkE8Q cpnRDRiD7ZXaOLNtfE5aDsduoNaNGLQxUMcqDNxCNksW+iny/KjiNgXeGuq4UmS2tmda gpkP2bNaYF795BVqx3JYMybTaocuuz4tF5jwnkceZHSde7rIeaBWr4dQSf2lD4iR05c4 Ygmg== 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:in-reply-to :references; bh=Ekw1HWI8VAsPTLneLoLC3wpRxBkNf1WCvFI6zpd1cAM=; b=sqo+zKLFT1tnLjXiD/H4gG4DhMHN6JSEJcNSnT2NSvi1vbooG7T4+6MZZmfJfwO96l 8To+xm4hSc47UdTDkXhqPJkjDgQvwYXY815Pug9FLuK8sBamYEZ6Cc/g1Ss+oHNzxoOF rvkGoSRSRyHMt39yYzrvl2tNQ5II6iW2T2EwV9mXmBeszabcj/d94Ge5xHZdO5QJtmL1 bgkfXIHmqsph+IqUjGQni8YpuM5YrQm2J5VlrKr+G12oRm6OvXJ9N6602M2PNg4UmFRI smyP8wtq/71qW4/lrX0ctfBQxwa6YNwxRvEKMcJapFS7GfftzUnGGyt0ZQn69MF26+PE 97zw== X-Gm-Message-State: AIVw1115BDxnVKDpOJVFlLBv6XFU2eyz0AS8K9bm8KQI/2hW3f9SYQi/ H13aOs3LdjueXjU4uQ8= X-Received: by 10.55.97.13 with SMTP id v13mr3916254qkb.107.1499694422355; Mon, 10 Jul 2017 06:47:02 -0700 (PDT) Received: from localhost.localdomain (189-19-127-234.dsl.telesp.net.br. [189.19.127.234]) by smtp.gmail.com with ESMTPSA id m49sm9510557qtf.32.2017.07.10.06.47.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 10 Jul 2017 06:47:01 -0700 (PDT) From: Marcelo Henrique Cerri To: kernel-team@lists.ubuntu.com Subject: [yakkety][PATCH] UBUNTU: [Debian] Support custom and lts kernels in printchanges/insertchanges Date: Mon, 10 Jul 2017 10:46:53 -0300 Message-Id: <1499694415-24310-3-git-send-email-marcelo.cerri@canonical.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499694415-24310-1-git-send-email-marcelo.cerri@canonical.com> References: <1499694415-24310-1-git-send-email-marcelo.cerri@canonical.com> 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 --- 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)