2009-10-11 22:18:58

by Sam Ravnborg

[permalink] [raw]
Subject: [GIT PULL] kbuild fixes

Hi Linus.

A few kbuild related fixes.

- revert of "save ARCH & CROSS_COMPILE ..." commit
It has caused issues for several people, and now it is better
to revert it rather than trying to fix it.
I would expext any fix to surface addition issues.

- Fix use of echo -ne. Is caused issues for ubuntu (IIRC) users

- Warn when people try to build userspace using non-exported
headers.
This is not a strict fix but is a nice way to catch when
people uses the kernel headers in the wrong way.
This patch may prevent some confusion.

- binrpm-pkg now works with KBUILD_OUTPUT set

The patches has been rebased very recently as I had to kill
a few patches that was not -fixes relevant for -rc3.

Sam

The following changes since commit f144c78e525542c94e0dcb171b41cc5ef7b341b3:
Linus Torvalds (1):
Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes.git master

Alek Du (1):
kbuild: Fix size_append issue for bzip2/lzma kernel

Amerigo Wang (1):
kbuild,scripts: use non-builtin echo for '-e'

Arnd Bergmann (1):
warn about use of uninstalled kernel headers

Felipe Contreras (2):
kbuild: fix warning when domainname is not available
kbuild: mkcompile_h: trivial cleanups

Frans Pop (1):
kbuild: fix the binrpm-pkg target to work with KBUILD_OUTPUT set

Sam Ravnborg (1):
kbuild: revert "save ARCH & CROSS_COMPILE ..."

Makefile | 46 +--------------------------------------
include/linux/kernel.h | 6 +++++
scripts/Kbuild.include | 2 +-
scripts/Makefile.lib | 2 +-
scripts/checkkconfigsymbols.sh | 4 +-
scripts/headers_install.pl | 2 +-
scripts/mkcompile_h | 12 +++++++--
scripts/package/Makefile | 11 ++++++++-
scripts/package/mkspec | 2 +-
9 files changed, 33 insertions(+), 54 deletions(-)


2009-10-12 08:42:23

by Michael Tokarev

[permalink] [raw]
Subject: Re: [GIT PULL] kbuild fixes

Sam Ravnborg wrote:
> Hi Linus.
>
> A few kbuild related fixes.
[]
> - Fix use of echo -ne. Is caused issues for ubuntu (IIRC) users

As has been discussed previously (and Sam has been CC'ed), the fix
is still incorrect. It replaces "echo -ne" with "/bin/echo -ne",
but neither of the two are guaranteed to support the necessary
arguments and necessary (hexadecimal) escape sequences. What should
be used here is printf(1). The trivial patch below (on top of these
kbuild changes) fixes this issue.

Thanks.

/mjt

Signed-Off-By: Michael Tokarev <[email protected]>


Attachments:
echo-vs-printf.diff (529.00 B)

2009-10-13 15:11:31

by Cong Wang

[permalink] [raw]
Subject: Re: [GIT PULL] kbuild fixes

On Mon, Oct 12, 2009 at 4:41 PM, Michael Tokarev <[email protected]> wrote:
> Sam Ravnborg wrote:
>>
>> Hi Linus.
>>
>> A few kbuild related fixes.
>
> []
>>
>> - Fix use of echo -ne. Is caused issues for ubuntu (IIRC) users
>
> As has been discussed previously (and Sam has been CC'ed), the fix
> is still incorrect.  It replaces "echo -ne" with "/bin/echo -ne",
> but neither of the two are guaranteed to support the necessary
> arguments and necessary (hexadecimal) escape sequences.  What should
> be used here is printf(1).  The trivial patch below (on top of these
> kbuild changes) fixes this issue.
>
> Thanks.
>
> /mjt
>
> Signed-Off-By: Michael Tokarev <[email protected]>
>

Sorry, I just saw this email.

Hmm, printf(1) should be more portable than echo(1), I checked your patch,
how about using 'printf "%b" ' instead?

Thanks!

2009-10-13 18:59:20

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [GIT PULL] kbuild fixes

On Mon, Oct 12, 2009 at 12:41:42PM +0400, Michael Tokarev wrote:
> Sam Ravnborg wrote:
>> Hi Linus.
>>
>> A few kbuild related fixes.
> []
>> - Fix use of echo -ne. Is caused issues for ubuntu (IIRC) users
>
> As has been discussed previously (and Sam has been CC'ed), the fix
> is still incorrect.

In the thread hpa asked for a patch at least twice.
Only after I submitted -fixes to Linus it shows up.

Bad timing.

And please - do not even think of asking me to do it.
You guys are the one that see the issue, who know how to fix it,
and knows how to check that the fix really works.

In other words - provide a patch next time you are asked to do so.

I'm off for much needed vacation rest of the week and
may rememeber to handle the patch when I get back...

Sam

2009-10-13 19:20:32

by Michael Tokarev

[permalink] [raw]
Subject: Re: [GIT PULL] kbuild fixes

Sam Ravnborg wrote:
> On Mon, Oct 12, 2009 at 12:41:42PM +0400, Michael Tokarev wrote:
>> Sam Ravnborg wrote:
>>> Hi Linus.
>>>
>>> A few kbuild related fixes.
>> []
>>> - Fix use of echo -ne. Is caused issues for ubuntu (IIRC) users
>> As has been discussed previously (and Sam has been CC'ed), the fix
>> is still incorrect.
>
> In the thread hpa asked for a patch at least twice.
> Only after I submitted -fixes to Linus it shows up.
>
> Bad timing.
>
> And please - do not even think of asking me to do it.

How many patches should one send? How many trees one should
compare against and send different patch for, in case such
an obvious trivial cases? If I'll provide this against
mainline, it wont apply to Sam's tree. If against Sam's
tree, it wont apply to mainline. And for such trivial
cases, it's just amusing to expect full patch.

It's not bad timing. I needed to know which damn tree
I should diff against. In Sam's pull request I found
the - hopefully - correct tree.

Please don't even think I will be submitting something like
this again. I spent half a week debugging a mysterious issue,
and I provided at least information in hope it will be useful
to someone with the same issue. And it turns out that by doing
so, *I* owe something to everyone else. It's not how things
works, or SHOULD work.

Thanks.

/mjt

> You guys are the one that see the issue, who know how to fix it,
> and knows how to check that the fix really works.
>
> In other words - provide a patch next time you are asked to do so.
>
> I'm off for much needed vacation rest of the week and
> may rememeber to handle the patch when I get back...
>
> Sam

2009-10-13 20:21:21

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [GIT PULL] kbuild fixes

On Tue, Oct 13, 2009 at 11:19:52PM +0400, Michael Tokarev wrote:
> Sam Ravnborg wrote:
>> On Mon, Oct 12, 2009 at 12:41:42PM +0400, Michael Tokarev wrote:
>>> Sam Ravnborg wrote:
>>>> Hi Linus.
>>>>
>>>> A few kbuild related fixes.
>>> []
>>>> - Fix use of echo -ne. Is caused issues for ubuntu (IIRC) users
>>> As has been discussed previously (and Sam has been CC'ed), the fix
>>> is still incorrect.
>>
>> In the thread hpa asked for a patch at least twice.
>> Only after I submitted -fixes to Linus it shows up.
>>
>> Bad timing.
>>
>> And please - do not even think of asking me to do it.
>
> How many patches should one send? How many trees one should
> compare against and send different patch for, in case such
> an obvious trivial cases? If I'll provide this against
> mainline, it wont apply to Sam's tree.
mainline - a replacement patch would have been
what I had expected to see.

I took you patch and gave it a hopefully proper
subject and applied it to kbuild-fixes.git.

Sam

2009-10-14 06:44:02

by Michael Tokarev

[permalink] [raw]
Subject: Re: [GIT PULL] kbuild fixes

Sam Ravnborg wrote:
> On Tue, Oct 13, 2009 at 11:19:52PM +0400, Michael Tokarev wrote:
>> Sam Ravnborg wrote:
[]
>>> And please - do not even think of asking me to do it.

>> How many patches should one send? How many trees one should
>> compare against and send different patch for, in case such
>> an obvious trivial cases? If I'll provide this against
>> mainline, it wont apply to Sam's tree.

> mainline - a replacement patch would have been
> what I had expected to see.

That's what I didn't think of. Due to the "trivialness" of
the whole thing (it's easier to go edit the target file
directly than to apply patches), and because.. well.. it
didn't occur to me ;)

> I took you patch and gave it a hopefully proper
> subject and applied it to kbuild-fixes.git.

Thank you Sam.

/mjt