Skip to contentSkip to conversation

deb-pkg: Make deb-pkg generate a seperate linux-libc-dev deb

PATCH In review maximilian attems 2 participants 5 messages Nov 4, 2009 – Nov 5, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 deb-pkg: Make deb-pkg generate a seperate linux-libc-dev deb

userland dev likes latest incarnation of that userland API. make it easy to also build it on make deb-pkg invocation:

dpkg-deb: building package linux-libc-dev' in ../linux-libc-dev_2.6.32-rc6-4_amd64.deb'.

---
 scripts/package/builddeb |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)
scripts/package/builddeb +19 -1
index 8b357b0..fbd1994 100644
@@ -38,17 +38,20 @@ else
 fi
 tmpdir="$objtree/debian/tmp"
 fwdir="$objtree/debian/fwtmp"
+headerdir="$objtree/debian/headertmp"
 packagename=linux-image-$version
 fwpackagename=linux-firmware-image
+headerpackagename=linux-libc-dev
 
 if [ "$ARCH" = "um" ] ; then
 	packagename=user-mode-linux-$version
 fi
 
 # Setup the directory structure
-rm -rf "$tmpdir" "$fwdir"
+rm -rf "$tmpdir" "$fwdir" "$headerdir"
 mkdir -p "$tmpdir/DEBIAN" "$tmpdir/lib" "$tmpdir/boot" "$tmpdir/usr/share/doc/$packagename"
 mkdir -p "$fwdir/DEBIAN" "$fwdir/lib" "$fwdir/usr/share/doc/$fwpackagename"
+mkdir -p "$headerdir/DEBIAN" "$headerdir/usr" "$headerdir/usr/share/doc/$headerpackagename"
 if [ "$ARCH" = "um" ] ; then
 	mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/bin"
 fi
@@ -77,6 +80,9 @@ if grep -q '^CONFIG_MODULES=y' .config ; then
 	fi
 fi
 
+make headers_check
+make headers_install INSTALL_HDR_PATH="$headerdir/usr" 
+
 # Install the maintainer scripts
 # Note: hook scripts under /etc/kernel are also executed by official Debian
 # kernel packages, as well as kernel packages built using make-kpkg
@@ -198,6 +204,18 @@ EOF
 	create_package "$fwpackagename" "$fwdir"
 fi
 
+cat <<EOF >> debian/control
+
+Package: $headerpackagename
+Section: devel
+Provides: linux-kernel-headers
+Architecture: any
+Description: Linux support headers for userspace development
+ This package provides userspaces headers from the Linux kernel.  These headers
+ are used by the installed headers for GNU glibc and other system libraries.
+EOF
+
+create_package "$headerpackagename" "$headerdir"
 create_package "$packagename" "$tmpdir"
 
 exit 0
Signature · 1 line
1.5.6.5
#1 lore raw
Quoted 1 line

+make headers_install INSTALL_HDR_PATH="$headerdir/usr"

one nitpick on that target is that it adds strange files too:
./usr/include/.install
./usr/include/..install.cmd

in allmost any dir.

#2 lore raw
In reply to maximilian attems
Quoted 5 lines · maximilian attems

userland dev likes latest incarnation of that userland API. make it easy to also build it on make deb-pkg invocation:

dpkg-deb: building package `linux-libc-dev' in
`../linux-libc-dev_2.6.32-rc6-4_amd64.deb'.

I would very much prefer it if this was either optional or a separate target. I have personally never had any need for such a package and would like to be able to not build it.

I agree it should be possible, just not forced.

Cheers,
FJP

#3 lore raw
Quoted 4 lines · Frans Pop
Quoted 3 lines · maximilian attems

userland dev likes latest incarnation of that userland API. make it easy to also build it on make deb-pkg invocation:

Quoted 8 lines
Quoted 2 lines

dpkg-deb: building package `linux-libc-dev' in
`../linux-libc-dev_2.6.32-rc6-4_amd64.deb'.

I would very much prefer it if this was either optional or a separate target. I have personally never had any need for such a package and would like to be able to not build it.

I agree it should be possible, just not forced.

so what you propose a bindeb-pkg target for the linux-image only?

there is clearly demand for linux-source and linux-headers packages build out of deb-pkg.

#4 lore raw
Quoted 5 lines · maximilian attems
Quoted 4 lines · Frans Pop
Quoted 2 lines · maximilian attems

userland dev likes latest incarnation of that userland API. make it easy to also build it on make deb-pkg invocation:

Quoted 7 lines
Quoted 5 lines

I would very much prefer it if this was either optional or a separate target. I have personally never had any need for such a package and would like to be able to not build it.

I agree it should be possible, just not forced.

so what you propose a bindeb-pkg target for the linux-image only?

Yep, that would be fine as a solution and consistent with the targets for rpm. Probably bindeb-pkg should do image + firmware though?

Quoted 2 lines

there is clearly demand for linux-source and linux-headers packages build out of deb-pkg.

No disagreement with that.

Cheers,
FJP