From patchwork Tue Mar 31 15:19:26 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: maximilian attems X-Patchwork-Id: 15405 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n2VFJ6E2011576 for ; Tue, 31 Mar 2009 15:19:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760547AbZCaPTM (ORCPT ); Tue, 31 Mar 2009 11:19:12 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760483AbZCaPTM (ORCPT ); Tue, 31 Mar 2009 11:19:12 -0400 Received: from baikonur.stro.at ([213.239.196.228]:55753 "EHLO baikonur.stro.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759550AbZCaPTJ (ORCPT ); Tue, 31 Mar 2009 11:19:09 -0400 Received: from dual (sputnik.itp.tuwien.ac.at [128.131.48.177]) by baikonur.stro.at (Postfix) with ESMTP id 894055C010; Tue, 31 Mar 2009 17:16:09 +0200 (CEST) Received: by dual (Postfix, from userid 1000) id 139F624181; Tue, 31 Mar 2009 17:19:33 +0200 (CEST) From: maximilian attems To: linux-kbuild@vger.kernel.org Cc: sam@ravnborg.org, akpm@linux-foundation.org, maximilian attems , Andres Salomon Subject: [PATCH 1/7] deb-pkg: Beautify changelog Date: Tue, 31 Mar 2009 17:19:26 +0200 Message-Id: <1238512772-21180-1-git-send-email-max@stro.at> X-Mailer: git-send-email 1.6.2.1 X-Virus-Scanned: by Amavis (ClamAV) at stro.at Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Try harder to find email and maintainer name. Debian's own devscripts all use DEBEMAIL or DEBFULLNAME prior to an eventual EMAIL or NAME environment variable. Match their logic. "Anonymous Maintainer" sounds nicer then Kernel compiler if no name is found. As bonus add more descriptive changelog entry. Cc: Andres Salomon Signed-off-by: maximilian attems --- scripts/package/builddeb | 25 ++++++++++++++++++++----- 1 files changed, 20 insertions(+), 5 deletions(-) diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 1264b8e..dd61591 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -66,14 +66,29 @@ EOF chmod 755 "$tmpdir/DEBIAN/$script" done -name="Kernel Compiler <$(id -nu)@$(hostname -f)>" +# Try to determine maintainer and email values +if [ -n "${DEBEMAIL}" ]; then + email=${DEBEMAIL} +elif [ -n "${EMAIL}" ]; then + email=${EMAIL} +else + email=$(id -nu)@$(hostname -f) +fi +if [ -n "${DEBFULLNAME}" ]; then + name=${DEBFULLNAME} +elif [ -n "${NAME}" ]; then + name=${NAME} +else + name="Anonymous Maintainer" +fi +maintainer="${name} <${email}>" # Generate a simple changelog template cat < debian/changelog linux ($version-$revision) unstable; urgency=low - * A standard release + * New upstream release - -- $name $(date -R) + -- ${maintainer} $(date -R) EOF # Generate a control file @@ -83,7 +98,7 @@ cat < debian/control Source: linux Section: base Priority: optional -Maintainer: $name +Maintainer: $maintainer Standards-Version: 3.6.1 Package: $packagename @@ -105,7 +120,7 @@ cat < debian/control Source: linux Section: base Priority: optional -Maintainer: $name +Maintainer: $maintainer Standards-Version: 3.6.1 Package: $packagename