From patchwork Mon Jul 10 13:46:52 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: 786201 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 3x5mjW6lMpz9s74; Mon, 10 Jul 2017 23:47:11 +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="JxlnuCE8"; 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 1dUZ1p-0002O8-0c; Mon, 10 Jul 2017 13:47:09 +0000 Received: from mail-qk0-f176.google.com ([209.85.220.176]) by huckleberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1dUZ1i-0002KB-17 for kernel-team@lists.ubuntu.com; Mon, 10 Jul 2017 13:47:02 +0000 Received: by mail-qk0-f176.google.com with SMTP id 16so73702675qkg.2 for ; Mon, 10 Jul 2017 06:47:01 -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=Cdpw7TzZA+p0stHpkynpan9tXDos6oggmoQlvLXaDmU=; b=JxlnuCE8gmQEtFQsqaxzs3P9o26CRM8fSkuEaN+kQ360q5stBI06mCLB9OnJ4cnzvj M6O+znAottVxtz+KjjpBRfPxSoZsHq7G01OHgPxO/0NminTrAl0SP9XbDyIhyVdFuWL+ JPx+u3HR7tOGYPyT0/iyOxCnjvd33U2zJZRI3j+p6pCZ1YMMSTqkXT0XumYMWPHR5+T9 TaZug5kUDuWDsfDtCowTMiv9CWd/jJWiTzAe+AzRbaJg9xtwUKeOiMCGPPibUwyJ5tlz PXtyV2y5bQ5cpgzxVkauTBtX2NaPRY85KHyyUR7sPo8cXBhpWKCGRjXxhHKrYGCTSrMU /Gmw== 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=Cdpw7TzZA+p0stHpkynpan9tXDos6oggmoQlvLXaDmU=; b=Z4uOGx74Z3DSF1Z3lXyvLTSwK1O17n8aQsmYeAC1EPlUEDTHEeF6cvlM9cEcIChXx3 sZEgAE1EGzNB1d/+6WdFj6saQ1SKH2TuulTE+dYxcvG7E0BcKh+/Rd9uDkqIEtrJyBHL Ah/VZiRVviQ5QP396+YWEZDSN+rnXiPHFpcY+aHrH5UzPyHbH6r0SJDnOQdTFS1NrUMf +xYrezy+eNyB7gNORvFMUAy4/ElthybDNeor1GWf9RZPiflw6G84DU5BnIpG5qL7PYXA vToT+IjiCMSrvO+ZirSG/ISsz5jDMUVFq093n9shg4iuSA4QxStLwNZ1WOUH7z/AjXOd 9fYQ== X-Gm-Message-State: AIVw1133ZQhVrddX65jqxvRfF60mauqKpz4vFK6YjqKC286VkO3aOjGT aqGXhF7wPrm5u1E3ks4= X-Received: by 10.55.82.139 with SMTP id g133mr4241648qkb.2.1499694420781; Mon, 10 Jul 2017 06:47:00 -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.46.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 10 Jul 2017 06:47:00 -0700 (PDT) From: Marcelo Henrique Cerri To: kernel-team@lists.ubuntu.com Subject: [trusty][PATCH] UBUNTU: [Debian] Support custom and lts kernels in printchanges/insertchanges Date: Mon, 10 Jul 2017 10:46:52 -0300 Message-Id: <1499694415-24310-2-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 98c7182557c4..222180241101 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: @perl -w -f $(DROOT)/scripts/misc/insert-changes.pl $(DROOT) $(DEBIAN)