From: Mathieu Malaterre <malat@debian.org>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: malat@debian.org, Riku Voipio <riku.voipio@linaro.org>,
Michal Marek <michal.lkml@markovi.net>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2] kbuild/debian: Use KBUILD_BUILD_* when set
Date: Wed, 2 May 2018 22:01:36 +0200 [thread overview]
Message-ID: <20180502200137.6870-1-malat@debian.org> (raw)
In-Reply-To: <20180423195055.26069-1-malat@debian.org>
Be nice to the user and check env vars KBUILD_BUILD_USER &
KBUILD_BUILD_HOST when those are set.
Since DEBEMAIL accept a syntax where the full name is present, be extra
nice to user and extract email address only.
Cc: Riku Voipio <riku.voipio@linaro.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
v2: update patch since syntax of DEBEMAIL may contain full name
scripts/package/mkdebian | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index 6adb3a16ba3b..3f4e43446db3 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -73,9 +73,19 @@ fi
# Try to determine maintainer and email values
if [ -n "$DEBEMAIL" ]; then
- email=$DEBEMAIL
+ case "$DEBEMAIL" in
+ *\ * )
+ email=$(echo $DEBEMAIL | cut -d '<' -f2 | cut -d '>' -f1)
+ echo >&2 "Extracting email from DEBEMAIL. Use DEBFULLNAME instead."
+ ;;
+ *)
+ email=$DEBEMAIL
+ ;;
+ esac
elif [ -n "$EMAIL" ]; then
email=$EMAIL
+elif [ -n "$KBUILD_BUILD_USER" ] && [ -n "$KBUILD_BUILD_HOST" ]; then
+ email=$KBUILD_BUILD_USER@$KBUILD_BUILD_HOST
else
email=$(id -nu)@$(hostname -f 2>/dev/null || hostname)
fi
--
2.11.0
next prev parent reply other threads:[~2018-05-02 20:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-23 19:50 [PATCH] kbuild/debian: Use KBUILD_BUILD_* when set Mathieu Malaterre
2018-05-02 11:30 ` Riku Voipio
2018-05-02 16:13 ` Masahiro Yamada
2018-05-02 19:27 ` Mathieu Malaterre
2018-05-02 19:31 ` Mathieu Malaterre
2018-05-02 20:01 ` Mathieu Malaterre [this message]
2018-05-03 9:51 ` [PATCH v2] " Riku Voipio
2018-05-03 17:08 ` Mathieu Malaterre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180502200137.6870-1-malat@debian.org \
--to=malat@debian.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.lkml@markovi.net \
--cc=riku.voipio@linaro.org \
--cc=yamada.masahiro@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox