FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 11-23-2011, 05:39 PM
Hector Oron
 
Default Bug#649748: linux-2.6: fixes upstream packaging when cross-compiling

Package: linux-2.6
Severity: wishlist
Tags: upstream

Hello,

I was not sure where to send this patch, better here to Debian community for review.
I found a bit annoying that using upstream deb-pkg target does not allow me to create
proper Debian packages when cross compiling, so I have created the following patch
which attempts to address this issue.


Index: linux-2.6.39.4/scripts/package/builddeb
================================================== =================
--- linux-2.6.39.4.orig/scripts/package/builddeb 2011-08-03 20:43:28.000000000 +0100
+++ linux-2.6.39.4/scripts/package/builddeb 2011-11-23 14:02:24.029139514 +0000
@@ -12,21 +12,9 @@

set -e

-create_package() {
- local pname="$1" pdir="$2"
-
- cp debian/copyright "$pdir/usr/share/doc/$pname/"
- cp debian/changelog "$pdir/usr/share/doc/$pname/changelog.Debian"
- gzip -9 "$pdir/usr/share/doc/$pname/changelog.Debian"
- sh -c "cd '$pdir'; find . -type f ! -path './DEBIAN/*' -printf '%P'
- | xargs -r0 md5sum > DEBIAN/md5sums"
-
- # Fix ownership and permissions
- chown -R root:root "$pdir"
- chmod -R go-w "$pdir"
-
+find_debarch() {
# Attempt to find the correct Debian architecture
- local forcearch="" debarch=""
+ forcearch="" debarch=""
case "$UTS_MACHINE" in
i386|ia64|alpha)
debarch="$UTS_MACHINE" ;;
@@ -54,6 +42,23 @@
echo "Please add support for $UTS_MACHINE to ${0} ..." >&2
echo "" >&2
esac
+}
+
+create_package() {
+ local pname="$1" pdir="$2"
+
+ cp debian/copyright "$pdir/usr/share/doc/$pname/"
+ cp debian/changelog "$pdir/usr/share/doc/$pname/changelog.Debian"
+ gzip -9 "$pdir/usr/share/doc/$pname/changelog.Debian"
+ sh -c "cd '$pdir'; find . -type f ! -path './DEBIAN/*' -printf '%P'
+ | xargs -r0 md5sum > DEBIAN/md5sums"
+
+ # Fix ownership and permissions
+ chown -R root:root "$pdir"
+ chmod -R go-w "$pdir"
+
+ find_debarch
+
if [ -n "$KBUILD_DEBARCH" ] ; then
debarch="$KBUILD_DEBARCH"
fi
@@ -246,7 +251,8 @@
(cd $srctree; tar -c -f - -T /tmp/files$$) | (cd $destdir; tar -xf -)
(cd $objtree; tar -c -f - -T /tmp/objfiles$$) | (cd $destdir; tar -xf -)
rm -f /tmp/files$$ /tmp/objfiles$$
-arch=$(dpkg --print-architecture)
+find_debarch
+arch=$debarch

cat <<EOF >> debian/control


Do you think is sane to send this patch to upstream? In that case, which would be the appropiate
place to get the proper attention?

-- System Information:
Debian Release: wheezy/sid
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.39-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20111123183939.8268.53070.reportbug@enorme.tcldoma in.office">http://lists.debian.org/20111123183939.8268.53070.reportbug@enorme.tcldoma in.office
 
Old 11-24-2011, 01:18 AM
Jonathan Nieder
 
Default Bug#649748: linux-2.6: fixes upstream packaging when cross-compiling

found 649748 linux-2.6/2.6.39-3
tags 649748 + upstream
quit

Hi Hector,

Hector Oron wrote:

> Do you think is sane to send this patch to upstream?

Yep, sounds like the sane thing to do. Based on MAINTAINERS (ok, I
already knew, but let's pretend for a moment), the mailing list to
write to is linux-kbuild@vger.kernel.org (no subscription needed, and
the convention is to always reply-to-all there).

>From "git log scripts/package/builddeb", I see that the people to cc
are maximilian attems <max@stro.at> and Asbjoern Sloth Toennesen
<asbjorn@asbjorn.biz> to get comments on the first version of a patch
and Michal Marek <mmarek@suse.cz> once the final version is ready.

Administrivia: kernel hackers tend to prefer to review diffs produced
with the -p / --show-c-function option. Patches should include a
sign-off --- see the "Developer's Certificate of Origin 1.1" in
Documentation/SubmittingPatches for details on that.

Thanks, and good luck.

Ciao,
Jonathan



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20111124021816.GJ11614@elie.hsd1.il.comcast.net">h ttp://lists.debian.org/20111124021816.GJ11614@elie.hsd1.il.comcast.net
 

Thread Tools




All times are GMT. The time now is 03:08 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org