LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] kbuild/debian: Use KBUILD_BUILD_* when set
@ 2018-04-23 19:50 Mathieu Malaterre
2018-05-02 11:30 ` Riku Voipio
2018-05-02 20:01 ` [PATCH v2] " Mathieu Malaterre
0 siblings, 2 replies; 7+ messages in thread
From: Mathieu Malaterre @ 2018-04-23 19:50 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Mathieu Malaterre, Michal Marek, linux-kbuild, linux-kernel
Be nice to the user and check env vars KBUILD_BUILD_USER &
KBUILD_BUILD_HOST when those are set.
Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
scripts/package/mkdebian | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index 6adb3a16ba3b..05d58d3ae8a0 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -76,6 +76,8 @@ if [ -n "$DEBEMAIL" ]; then
email=$DEBEMAIL
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] kbuild/debian: Use KBUILD_BUILD_* when set
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 20:01 ` [PATCH v2] " Mathieu Malaterre
1 sibling, 2 replies; 7+ messages in thread
From: Riku Voipio @ 2018-05-02 11:30 UTC (permalink / raw)
To: Mathieu Malaterre; +Cc: Masahiro Yamada, Michal Marek, linux-kbuild, LKML
On 23 April 2018 at 22:50, Mathieu Malaterre <malat@debian.org> wrote:
> Be nice to the user and check env vars KBUILD_BUILD_USER &
> KBUILD_BUILD_HOST when those are set.
mkdebian sets the maintainer address as "$name <$email>", but this
patch only sets the email part. I also wonder about the precedence, I
think KBUILD_* should be considered over the generic Debian variables.
Riku
> Signed-off-by: Mathieu Malaterre <malat@debian.org>
> ---
> scripts/package/mkdebian | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
> index 6adb3a16ba3b..05d58d3ae8a0 100755
> --- a/scripts/package/mkdebian
> +++ b/scripts/package/mkdebian
> @@ -76,6 +76,8 @@ if [ -n "$DEBEMAIL" ]; then
> email=$DEBEMAIL
> 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
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] kbuild/debian: Use KBUILD_BUILD_* when set
2018-05-02 11:30 ` Riku Voipio
@ 2018-05-02 16:13 ` Masahiro Yamada
2018-05-02 19:27 ` Mathieu Malaterre
1 sibling, 0 replies; 7+ messages in thread
From: Masahiro Yamada @ 2018-05-02 16:13 UTC (permalink / raw)
To: Riku Voipio; +Cc: Mathieu Malaterre, Michal Marek, linux-kbuild, LKML
2018-05-02 20:30 GMT+09:00 Riku Voipio <riku.voipio@linaro.org>:
> On 23 April 2018 at 22:50, Mathieu Malaterre <malat@debian.org> wrote:
>> Be nice to the user and check env vars KBUILD_BUILD_USER &
>> KBUILD_BUILD_HOST when those are set.
>
> mkdebian sets the maintainer address as "$name <$email>", but this
> patch only sets the email part. I also wonder about the precedence, I
> think KBUILD_* should be considered over the generic Debian variables.
How come?
If you see scripts/mkcompile_h,
KBUILD_BUILD_USER and KBUILD_BUILD_HOST are used
for overriding 'whoami' and 'hostname', respectively.
So, I think it is reasonable to put
email=$KBUILD_BUILD_USER@$KBUILD_BUILD_HOST
over
email=$(id -nu)@$(hostname -f 2>/dev/null || hostname)
But, it is questionable to put it even over $DEBEMAIL.
I think the intention of this patch is to support
another (a bit better) fallback in case DEBEMAIL is not set.
> Riku
>
>> Signed-off-by: Mathieu Malaterre <malat@debian.org>
>> ---
>> scripts/package/mkdebian | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
>> index 6adb3a16ba3b..05d58d3ae8a0 100755
>> --- a/scripts/package/mkdebian
>> +++ b/scripts/package/mkdebian
>> @@ -76,6 +76,8 @@ if [ -n "$DEBEMAIL" ]; then
>> email=$DEBEMAIL
>> 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
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] kbuild/debian: Use KBUILD_BUILD_* when set
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
1 sibling, 1 reply; 7+ messages in thread
From: Mathieu Malaterre @ 2018-05-02 19:27 UTC (permalink / raw)
To: Riku Voipio; +Cc: Masahiro Yamada, Michal Marek, linux-kbuild, LKML
On Wed, May 2, 2018 at 1:30 PM, Riku Voipio <riku.voipio@linaro.org> wrote:
> On 23 April 2018 at 22:50, Mathieu Malaterre <malat@debian.org> wrote:
>> Be nice to the user and check env vars KBUILD_BUILD_USER &
>> KBUILD_BUILD_HOST when those are set.
>
> mkdebian sets the maintainer address as "$name <$email>", but this
> patch only sets the email part. I also wonder about the precedence, I
> think KBUILD_* should be considered over the generic Debian variables.
I simply tried to re-use the KBUILD_* env vars whenever possible. This
did made sense, since:
$ dmesg|grep debian
~
[ 0.000000] Linux version 4.14.0-0.bpo.3-amd64
(debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian
6.3.0-18)) #1 SMP Debian 4.14.13-1~bpo9+1 (2018-01-14)
and
$ apt-cache show linux-image-amd64| grep Main
~
Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
I do not believe this should take precedence over DEBEMAIL.
> Riku
>
>> Signed-off-by: Mathieu Malaterre <malat@debian.org>
>> ---
>> scripts/package/mkdebian | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
>> index 6adb3a16ba3b..05d58d3ae8a0 100755
>> --- a/scripts/package/mkdebian
>> +++ b/scripts/package/mkdebian
>> @@ -76,6 +76,8 @@ if [ -n "$DEBEMAIL" ]; then
>> email=$DEBEMAIL
>> 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
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] kbuild/debian: Use KBUILD_BUILD_* when set
2018-05-02 19:27 ` Mathieu Malaterre
@ 2018-05-02 19:31 ` Mathieu Malaterre
0 siblings, 0 replies; 7+ messages in thread
From: Mathieu Malaterre @ 2018-05-02 19:31 UTC (permalink / raw)
To: Riku Voipio; +Cc: Masahiro Yamada, Michal Marek, linux-kbuild, LKML
On Wed, May 2, 2018 at 9:27 PM, Mathieu Malaterre <malat@debian.org> wrote:
> On Wed, May 2, 2018 at 1:30 PM, Riku Voipio <riku.voipio@linaro.org> wrote:
>> On 23 April 2018 at 22:50, Mathieu Malaterre <malat@debian.org> wrote:
>>> Be nice to the user and check env vars KBUILD_BUILD_USER &
>>> KBUILD_BUILD_HOST when those are set.
>>
>> mkdebian sets the maintainer address as "$name <$email>", but this
>> patch only sets the email part. I also wonder about the precedence, I
>> think KBUILD_* should be considered over the generic Debian variables.
>
> I simply tried to re-use the KBUILD_* env vars whenever possible. This
> did made sense, since:
>
> $ dmesg|grep debian
> ~
> [ 0.000000] Linux version 4.14.0-0.bpo.3-amd64
> (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian
> 6.3.0-18)) #1 SMP Debian 4.14.13-1~bpo9+1 (2018-01-14)
>
> and
>
> $ apt-cache show linux-image-amd64| grep Main
> ~
> Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
>
> I do not believe this should take precedence over DEBEMAIL.
It seems that the env var DEBEMAIL is now accepting a new syntax (at
least I was not aware of this syntax):
https://manpages.debian.org/unstable/devscripts/dch.1.en.html
[...]If the environment variable DEBEMAIL is set, this will be used
for the email address. If this variable has the form "name <email>",
then the maintainer name will also be taken from here[...]
I'll send a v2 that check DEBEMAIL does not contains '<>'.
>> Riku
>>
>>> Signed-off-by: Mathieu Malaterre <malat@debian.org>
>>> ---
>>> scripts/package/mkdebian | 2 ++
>>> 1 file changed, 2 insertions(+)
>>>
>>> diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
>>> index 6adb3a16ba3b..05d58d3ae8a0 100755
>>> --- a/scripts/package/mkdebian
>>> +++ b/scripts/package/mkdebian
>>> @@ -76,6 +76,8 @@ if [ -n "$DEBEMAIL" ]; then
>>> email=$DEBEMAIL
>>> 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
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2] kbuild/debian: Use KBUILD_BUILD_* when set
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 20:01 ` Mathieu Malaterre
2018-05-03 17:08 ` Mathieu Malaterre
1 sibling, 1 reply; 7+ messages in thread
From: Mathieu Malaterre @ 2018-05-02 20:01 UTC (permalink / raw)
To: Masahiro Yamada
Cc: malat, Riku Voipio, Michal Marek, linux-kbuild, linux-kernel
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2] kbuild/debian: Use KBUILD_BUILD_* when set
2018-05-02 20:01 ` [PATCH v2] " Mathieu Malaterre
@ 2018-05-03 17:08 ` Mathieu Malaterre
0 siblings, 0 replies; 7+ messages in thread
From: Mathieu Malaterre @ 2018-05-03 17:08 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Malaterre, Mathieu, Riku Voipio, Michal Marek, linux-kbuild, LKML
On Wed, May 2, 2018 at 10:01 PM, Mathieu Malaterre <malat@debian.org> wrote:
> 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
Should be replaced by:
https://lists.debian.org/debian-kernel/2018/05/msg00029.html
> 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
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-05-03 17:09 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH v2] " Mathieu Malaterre
2018-05-03 17:08 ` Mathieu Malaterre
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).