Skip to contentSkip to conversation

kbuild fixes

GIT PULL Sam Ravnborg 3 participants 7 messages Oct 11, 2009 – Oct 14, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

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(-)
#1 lore raw
Quoted 3 lines · Sam Ravnborg

Hi Linus.

A few kbuild related fixes.

[]

Quoted 1 line

- 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

scripts/Makefile.lib +1 -1
index ffdafb2..d9f0cb8 100644
@@ -208,7 +208,7 @@ cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -f -9 > $@) || \
 
 # Bzip2 and LZMA do not include size in file... so we have to fake that;
 # append the size as a 32-bit littleendian number as gzip does.
-size_append = /bin/echo -ne $(shell					\
+size_append = printf $(shell						\
 dec_size=0;								\
 for F in $1; do								\
 	fsize=$$(stat -c "%s" $$F);					\
#2 lore raw
Quoted 17 lines · Michael Tokarev
Quoted 4 lines · Sam Ravnborg

Hi Linus.

A few kbuild related fixes.

[]

Quoted 2 lines

- 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.

Quoted 6 lines

Thanks.

/mjt

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!

#3 lore raw
In reply to Michael Tokarev
Quoted 9 lines · Michael Tokarev
Quoted 3 lines · Sam Ravnborg

Hi Linus.

A few kbuild related fixes.

[]

Quoted 1 line

- 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

#4 lore raw
Quoted 10 lines · Sam Ravnborg
Quoted 8 lines · Michael Tokarev
Quoted 3 lines · Sam Ravnborg

Hi Linus.

A few kbuild related fixes.

[]

Quoted 1 line

- 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.

Quoted 6 lines

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

Quoted 9 lines

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

#5 lore raw
Quoted 14 lines · Michael Tokarev
Quoted 13 lines · Sam Ravnborg
Quoted 8 lines · Michael Tokarev
Quoted 3 lines · Sam Ravnborg

Hi Linus.

A few kbuild related fixes.

[]

Quoted 1 line

- 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.

Quoted 8 lines
Quoted 3 lines

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

#6 lore raw
Quoted 2 lines · Sam Ravnborg
Quoted 1 line · Michael Tokarev

Sam Ravnborg wrote:

[]

Quoted 9 lines
Quoted 6 lines
Quoted 1 line

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 ;)

Quoted 2 lines

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

Thank you Sam.

/mjt