Skip to contentSkip to conversation

Fix for scripts/builddeb (non-x86, and with output option)

PATCH Michal Marek 2 participants 3 messages Jan 17, 2011 – Jan 18, 2011 1 message not in the archive Kbuild

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 2 lines · Livio Soares

Hi Michal and Ted,

Hi,

please do not send patches privately, CC at least the linux-kbuild mailing list. I'll have a look at your patch tomorrow.

Michal

Quoted 55 lines

I've just tried to build Debian packages on the git version of the
Linux kernel, and the build failed while trying to generate the headers package. The problem seems to come from 2 issues: (1) I use the 'O=' option to place build files out of the source tree, and (2) I build using both x86 and powerpc architectures.

The build seems to have been broken by commit:
cd8d60a20a4516016c117ac0f1ac7b06ff606f7e

I'm attaching a patch that fixes both issues on my system. Feel
free to tweak/adapt if you see any problems with it.

Cheers,

Livio

From 24aa58ab53b9adfa1a6f8269e470d5f554627be9 Mon Sep 17 00:00:00 2001
From: Livio Soares <[email protected]>
Date: Mon, 17 Jan 2011 15:29:06 -0500
Subject: [PATCH] Two fixes to builddeb script, regarding the built of header package:

1) Previous behavior assumed the build was executed inside the source tree (no 'O=' option).

2) Previous behavior assumed 'x86' architecture.

---
 scripts/package/builddeb |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
scripts/package/builddeb +5 -5
index b0b2357..418d3fa 100644
@@ -238,13 +238,13 @@ EOF
 fi
 
 # Build header package
-find . -name Makefile -o -name Kconfig\* -o -name \*.pl > /tmp/files$$
-find arch/x86/include include scripts -type f >> /tmp/files$$
-(cd $objtree; find .config Module.symvers include scripts -type f >> /tmp/objfiles$$)
 destdir=$kernel_headers_dir/usr/src/linux-headers-$version
 mkdir -p "$destdir"
-tar -c -f - -T /tmp/files$$ | (cd $destdir; tar -xf -)
-(cd $objtree; tar -c -f - -T /tmp/objfiles$$) | (cd $destdir; tar -xf -)
+(cd $srctree; find . -name Makefile -o -name Kconfig\* -o -name \*.pl > /tmp/files$$;
+    find arch/${SRCARCH}/include include scripts -type f >> /tmp/files$$;
+    tar -c -f - -T /tmp/files$$ | (cd $destdir; tar -xf -) )
+(cd $objtree; find .config Module.symvers include scripts -type f >> /tmp/objfiles$$; 
+    tar -c -f - -T /tmp/objfiles$$ | (cd $destdir; tar -xf -) )
 rm -f /tmp/files$$ /tmp/objfiles$$
 arch=$(dpkg --print-architecture)
 
#2 lore raw
Quoted 5 lines · Michal Marek
Quoted 5 lines

Date: Mon, 17 Jan 2011 15:29:06 -0500
Subject: [PATCH] Two fixes to builddeb script, regarding the built of header package:

1) Previous behavior assumed the build was executed inside the source tree (no 'O=' option).

this seems worthwile, but didn't check the implementation detail.

Quoted 1 line
Quoted 1 line

2) Previous behavior assumed 'x86' architecture.

this is fixed in linux-kbuild.git

could you please repost on top of latest, thank you.

Signature · 1 line
maks
#3 lore raw
Quoted 8 lines · maximilian attems
Quoted 5 lines · Michal Marek
Quoted 5 lines

Date: Mon, 17 Jan 2011 15:29:06 -0500
Subject: [PATCH] Two fixes to builddeb script, regarding the built of header package:

1) Previous behavior assumed the build was executed inside the source tree (no 'O=' option).

Quoted 7 lines

this seems worthwile, but didn't check the implementation detail.

Quoted 1 line
Quoted 1 line

2) Previous behavior assumed 'x86' architecture.

this is fixed in linux-kbuild.git

could you please repost on top of latest, thank you.

of course this question was directed to Livio, sorry for the bad mail headers.