From patchwork Mon Jul 10 13:46:55 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: 786204 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 3x5mjp2Snyz9s0Z; Mon, 10 Jul 2017 23:47:26 +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="IYOTFeJi"; 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 1dUZ23-0002Wn-LE; Mon, 10 Jul 2017 13:47:23 +0000 Received: from mail-qt0-f176.google.com ([209.85.216.176]) by huckleberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1dUZ1m-0002NY-Py for kernel-team@lists.ubuntu.com; Mon, 10 Jul 2017 13:47:06 +0000 Received: by mail-qt0-f176.google.com with SMTP id r30so72831626qtc.0 for ; Mon, 10 Jul 2017 06:47:06 -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=Xinz0HePZAVlXw6C3XSfZn6LuDv/ggkhsg1YJBL8CJI=; b=IYOTFeJifvRmCBS8LEM/G7BH0PGoEvrTCZyZnpWgyjqlMaE27y+y0bZ4YMcPCM+8U7 T2lb2Y0c+UfVy3grkoYWFhJDgLp6L/VQX+DpuvnbiMLHQeJ4QJvQSZbaWAKF2S69ls0r 3smW4MNC05blXDbA+X9fdlElbOx2gtM547tKnlunHM5eH84u7iULzfxN2kRKDBv7A2tj xBLzguR7JInwwq1wQj/oRxHKXkxQKL4EUU4OxZHyqaKzSKmyMIPm2hMcOOZ3lmBYI5j0 GlqN8123XRWgAdpQnUEyvxr97S/1ZkmK52ZBUgFbBmFj0p0HfRf/weUdcC9cBJbKx4ZZ SnRA== 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=Xinz0HePZAVlXw6C3XSfZn6LuDv/ggkhsg1YJBL8CJI=; b=NhYh93PA9nOLObtvw6eTFTbe8Ee8t1P0rLv4agMuWdChcXklh9EsjDEzZX6Yc2mAHg F/ZGCz1KLnVUEzpL7uQZ81gl0kP5+d03Ggkr4OVsHIVKnn8rucAwDPoNFSvUUsV2UGi1 kwcCNJ4Teu4hYZC15OQx8F3lBbqkwGn4MVr6p2XD4+B2C9qsXwwhXjXFqLXG7UFtuzpG qPeu2vQWOKlZCi8tQdPHCHI9/TNEtnb35Iios0JimHwbSeUmWJEMgCIL46Irk9xr6Zkl QvJvKq1cyIdmFfyh7jqry685qegb05TuP9KqYVvaX5jFiN+145zf+WCc4I25yleEcb58 BziQ== X-Gm-Message-State: AIVw110Re4CCrd2DJURYxob2QwDcj+RatUhXgk9VhU5SmPAbb8MUgypP 2t7vlRCFxvbwJds1/IE= X-Received: by 10.200.4.7 with SMTP id v7mr4392190qtg.166.1499694425612; Mon, 10 Jul 2017 06:47:05 -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.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 10 Jul 2017 06:47:04 -0700 (PDT) From: Marcelo Henrique Cerri To: kernel-team@lists.ubuntu.com Subject: [artful][PATCH] UBUNTU: [Debian] Support custom and lts kernels in printchanges/insertchanges Date: Mon, 10 Jul 2017 10:46:55 -0300 Message-Id: <1499694415-24310-5-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 4864c8e285d6..5612635f18a9 100644 --- a/debian/rules.d/1-maintainer.mk +++ b/debian/rules.d/1-maintainer.mk @@ -98,9 +98,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)