Commit Graph

36 Commits

Author SHA1 Message Date
Nicolas de Pesloüan 9b4ce7bce5 deb-pkg: Fix building outside of source tree (O=...).
When building linux-headers package using deb-pkg, builddeb erroneously assume
current directory is the source tree. This is not true if building in another
directory, using make O=... deb-pkg.

This patch fix this problem.

Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Tested-by: Nikolai Kondrashov <spbnick@gmail.com>
Acked-by: maximilian attems <max@stro.at>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-02-04 14:53:45 +01:00
maximilian attems 1b9a50d931 deb-pkg: Use $SRCARCH for include path
Fix x86 centric path to allow building kernel-header packages for
other architecture.

Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-01-15 00:42:44 +01:00
maximilian attems ee81b786a0 deb-pkg: s/hdr/kernel_headers_/ && s/header/libc_headers_/
hdrpackage and headerpackage are not intuitive names,
use proposed alternatives by Michel Marek.

While touching them move the mkdir of the kernel_headers dir up
and fix it for paranoid umask.

CC: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-01-07 22:45:25 +01:00
maximilian attems e68077856e 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'.

Last year patch rebased on top of latest deb-pkg changes.

Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-01-07 16:16:48 +01:00
Theodore Ts'o cd8d60a20a kbuild: create linux-headers package in deb-pkg
Create a linux-headers-$KVER.deb package which can be used to build
external modules without having the source tree around.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-29 13:54:49 +01:00
Asbjoern Sloth Toennesen 55f88eccf9 kbuild, deb-pkg: support overriding userland architecture
Usefull if building for sparc64 userland, because the
sparc and sparc64 userlands use the same 64-bit kernel,
making it impossible to always select the correct userland
architecture for the resulting debian package.

Might also be usefull, if you want a i386 userland with a amd64 kernel.

Example usage:
	make KBUILD_DEBARCH=i386 deb-pkg

LKML-reference: <alpine.DEB.2.02.1011051437500.13287@aurora.sdinet.de>
Signed-off-by: Asbjoern Sloth Toennesen <asbjorn@asbjorn.biz>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Acked-by: maximilian attems <max@stro.at>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-20 16:52:31 +01:00
Asbjoern Sloth Toennesen 10f26fa642 kbuild, deb-pkg: select userland architecture based on UTS_MACHINE
Instead of creating the debian package for the compiling userland,
create it for a userland matching the kernel thats being compiled.

This patch supports all Lenny release architectures,
and Linux-based architecture candidates for Squeeze.

If it can't find a proper Debian userspace it displays a warning,
and fallback to let deb-gencontrol use the host's userspace arch.

Eg. with this patch the following make command:

	make ARCH=i386 deb-pkg

will output an i386 Debian package instead of an amd64 one,
when run on an amd64 machine.

Signed-off-by: Asbjoern Sloth Toennesen <asbjorn@asbjorn.biz>
Acked-by: maximilian attems <max@stro.at>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-11-25 15:32:05 +01:00
maximilian attems e86c2412c8 kbuild, deb-pkg: Fix build with paranoid umask
umask 077
make deb-pkg
<snipp ..>
dpkg-deb: building package `linux-image-2.6.36+' in `../linux-image-2.6.36+_2.6.36+-4_amd64.deb'.
dpkg-deb: control directory has bad permissions 700 (must be >=0755 and <=0775)
make[1]: *** [deb-pkg] Error 2

Reported-by: Bastian Blank <waldi@debian.org>
Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-11-11 16:32:43 +01:00
Guillem Jover 242c5ab08c kbuild, deb-pkg: Check if KBUILD_IMAGE exists before copying it
Avoid an error when doing cp over the image when it does not contain
the full path to the file.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-09-06 13:29:02 +02:00
Rogério Brito aa42abedc3 kbuild: Change section of generated debian packages to kernel
To follow the way that Official Debian kernel packages are made, put the
generated packages in the right section, the kernel section.  This also
avoids polluting the admin section.

Signed-off-by: Rogério Brito <rbrito@ime.usp.br>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-03 13:17:53 +02:00
Rogério Brito 2d7204ac60 kbuild: Mark that the packages generated conform to Standards-Version 3.8.4
The packages generated by the builddeb script conform to the Debian
Policy version 3.8.4. Make this explicit in the generated packages.

Signed-off-by: Rogério Brito <rbrito@ime.usp.br>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-03 13:17:52 +02:00
Rogério Brito ee6eed803d kbuild: Add homepage field to debian/control file
This helps when the user sees information of the packages on package
managers like aptitude.

Signed-off-by: Rogério Brito <rbrito@ime.usp.br>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-03 13:17:52 +02:00
FEJES Jozsef b59a122584 kbuild: deb-pkg md5sums
This patch creates the standard md5sums file for 'make deb-pkg' just
like the dh_md5sums debhelper script.

Signed-off-by: Jozsef Fejes <fejes@joco.name>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-03-07 13:33:00 +01:00
maximilian attems 241ad11f2d kbuild, deb-pkg: fix install scripts for posix sh
bash versus dash and posh disagree on expanding $@ within double quotes:
export x="$@"
see http://bugs.debian.org/381091 for details
just use the arglist with $*.

dpkg: error processing linux-image-2.6.31-rc1_2.6.31-rc1-18_i386.deb (--install):
 subprocess pre-installation script returned error exit status 2
export: 6: 2.6.31-rc1-18: bad variable name
fixes http://bugzilla.kernel.org/show_bug.cgi?id=13567

seen on Ubuntu as there dash is the default sh,
versus bash on Debian.

Reported-by: Pauli <suokkos@gmail.com>
Cc: Frans Pop <elendil@planet.nl>
Signed-off-by: maximilian attems <max@stro.at>
Acked-By: Andres Salomon <dilinger@collabora.co.uk>
2009-07-17 23:02:57 +02:00
maximilian attems 1ab18486e4 kbuild: deb-pkg ship changelog
In the series for 2.6.31 it was noticed to ship the copyright,
but the generated changelog got lost somehow.

As bonus the generated linux-image deb packages are Lenny lintian clean.

Cc: Frans Pop <elendil@planet.nl>
Cc: Andres Salomon <dilinger@debian.org>
Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-27 00:07:27 +02:00
maximilian attems 6d9923219c kbuild, deb-pkg: bump standards version
Latest Debian policy is 3.8.1.
Even if we are not yet compliant to it strive for the latest.

Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Frans Pop <elendil@planet.nl>
Acked-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-09 22:37:42 +02:00
maximilian attems 54c3355658 kbuild, deb-pkg: fix Section field
Section "base" has been removed, the base is defined by Priority field.

For Squeeze the section should be "kernel", but as that's not yet
supported for Sarge and Etch we stay with admin for now.

Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Frans Pop <elendil@planet.nl>
Cc: Andres Salomon <dilinger@debian.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-09 22:37:42 +02:00
maximilian attems 8ebc2fe9c5 kbuild, deb-pkg: fix Provides field
kernel-image naming has been dropped for the Lenny release
and was only transitional for Etch.

As it builds modules it provides linux-modules-$version.

Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Frans Pop <elendil@planet.nl>
Cc: Andres Salomon <dilinger@debian.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-09 22:37:41 +02:00
maximilian attems f7a2c31f1e kbuild, deb-pkg: fix generated package name
The binary package that make deb-pkg creates is a linux-image.
To be fixed may also be the addition of $DEB_ARCH.

Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Frans Pop <elendil@planet.nl>
Cc: Andres Salomon <dilinger@debian.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-09 22:37:41 +02:00
Frans Pop 4bf4cd4939 kbuild, deb-pkg: improve Source field
The Source: field is defined as the source package in the package
archive from which a binary packages are built. As deb-pkg does not
generate a source package, we should avoid to use any existing source
packages here.

Signed-off-by: Frans Pop <elendil@planet.nl>
Acked-by: maximilian attems <max@stro.at>
Cc: Andres Salomon <dilinger@debian.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-09 22:37:40 +02:00
maximilian attems edec611db0 kbuild, deb-pkg: improve maintainer identification
Try harder to find email and maintainer name.
Debian's own devscripts all use DEBEMAIL or DEBFULLNAME prior to an
eventual EMAIL or NAME environment variable. Match their logic.

"Anonymous" sounds nicer then "Kernel Compiler" if no name is found.

Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Frans Pop <elendil@planet.nl>
Cc: Andres Salomon <dilinger@debian.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-09 22:37:39 +02:00
Frans Pop 9461f666e4 kbuild, deb-pkg: generate debian/copyright file
On Thursday 23 April 2009, Frans Pop wrote:
Add a basic debian/copyright to the binary packages.

Based on an earlier patch from Maximilian Attems.

Signed-off-by: Frans Pop <elendil@planet.nl>
Acked-by: maximilian attems <max@stro.at>
Cc: Andres Salomon <dilinger@debian.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-09 22:37:39 +02:00
Frans Pop a83ca2777f kbuild, deb-pkg: improve changelog entry and package descriptions
Signed-off-by: Frans Pop <elendil@planet.nl>
Acked-by: maximilian attems <max@stro.at>
Cc: Andres Salomon <dilinger@debian.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-09 22:37:38 +02:00
Frans Pop fe233cb6bf kbuild, deb-pkg: allow alternative hook scripts directory in .deb packages
Hook scripts in the default directory /etc/kernel are also executed by
official Debian kernel packages as well as kernel packages created using
make-kpkg. Allow to specify an alternative hook scripts directory by
exporting the environment variable KDEB_HOOKDIR.

Signed-off-by: Frans Pop <elendil@planet.nl>
Acked-by: maximilian attems <max@stro.at>
Cc: Andres Salomon <dilinger@debian.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-09 22:37:37 +02:00
Frans Pop c72c75db86 kbuild, deb-pkg: allow to specify a custom revision for .deb packages
Allow to specify a custom revision for the generated .deb by
exporting the environment variable KDEB_PKGVERSION.

Signed-off-by: Frans Pop <elendil@planet.nl>
Acked-by: maximilian attems <max@stro.at>
Cc: Andres Salomon <dilinger@debian.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-09 22:37:37 +02:00
Frans Pop 4964451a32 kbuild, deb-pkg: pass Debian maintainer script parameters to packaging hook scripts
The Debian packaging scripts created by the deb-pkg target do not pass
on the standard Debian maintainer script parameters to hook scripts,
which means that those scripts cannot tell whether they are being called
during e.g. install vs. upgrade, or removal vs. purge of the package.

As there are several variantions in how hook scripts are called from
kernel packages, we pass the parameters in the environment variable
DEB_MAINT_PARAMS rather than as extra arguments.

Bump version of builddep script to 1.3.

Signed-off-by: Frans Pop <elendil@planet.nl>
Acked-by: maximilian attems <max@stro.at>
Cc: Andres Salomon <dilinger@debian.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-09 22:37:36 +02:00
Frans Pop a89b433bdd kbuild, deb-pkg: fix 'file not found' error when building .deb package for arm
Not all architectures prepend the $(boot) path in $(KBUILD_IMAGE).
Allow for that fact in the builddeb script. Example is arm.

Signed-off-by: Frans Pop <elendil@planet.nl>
Acked-by: maximilian attems <max@stro.at>
Cc: Andres Salomon <dilinger@debian.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-09 22:37:36 +02:00
Frans Pop 3e2ab2563a kbuild, deb-pkg: refactor code to reduce duplication
Factor out code to build package into separate function and
only write "source" section for the debian/control file once.

Signed-off-by: Frans Pop <elendil@planet.nl>
Acked-by: maximilian attems <max@stro.at>
Cc: Andres Salomon <dilinger@debian.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-09 22:37:35 +02:00
Frans Pop 4f66199b4b kbuild, deb-pkg: minor general improvements in builddeb script
Minor coding style improvements and typo fix in leading comment.

Signed-off-by: Frans Pop <elendil@planet.nl>
Cc: Andres Salomon <dilinger@debian.org>
Acked-by: maximilian attems <max@stro.at>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-09 22:37:35 +02:00
Jonathan McDowell bf1b36445d kbuild: Fixup deb-pkg target to generate separate firmware deb
The below is a simplistic fix for "make deb-pkg"; it splits the
firmware out to a linux-firmware-image package and adds an
(unversioned) Suggests to the linux package for this firmware.

Signed-Off-By: Jonathan McDowell <noodles@earth.li>
Acked-by: Frans Pop <elendil@planet.nl>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-11-09 23:02:58 +01:00
Michal Sojka ed2c9fa53b Kbuild: Fix deb-pkg target to work with kernel versions ending with -<text-without-digit>
If CONIFIG_LOCALVERSION is set for example to -loop, the following error
message was generated.

dpkg-deb - error: Debian revision (`loop') doesn't contain any digits
dpkg-deb: 1 errors in control file

The patch solves this by adding a numeric revision to package version.

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-02-09 10:51:47 +01:00
bugme-daemon@bugzilla.kernel.org 6f67a00498 kbuild: make deb-pkg - add 'Provides:' line
http://bugzilla.kernel.org/show_bug.cgi?id=8941

Current Debian's kernel-modules depend on matching linux-image-$version, though
Linux's make deb-pkg build a .deb that 'Provides: kernel-image-$version' only.
The following patch adds the Debian-compliant 'Provides', leaving the default
one; hopely this will make way all happy.

Signed-off-by: paolo <oopla@users.sf.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-18 15:15:53 +02:00
Sam Ravnborg a91f98a284 kbuild: Fix bug in make deb-pkg when using seperate source and output directories
From: Ryan Anderson <ryan@michonline.com>

When running "make O=something deb-pkg", I get a failure that claims I
haven't configured my kernel (I have).  Running it a second time tells
me to run "make mrproper"  (include/linux/version.h got built on the
first run)

Original patch from:
From: Ajay Patel <patela@gmail.com>

With modifications from:
Signed-off-By: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-14 20:26:09 +00:00
Sam Ravnborg dc5962fdf1 uml: Restore proper descriptions in make deb-pkg target
From: Ryan Anderson <ryan@michonline.com>

This pulls the description from the Debian user-mode-linux package, and
puts $version back in the appropriate places for both descriptions.

Signed-off-by: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-14 20:24:56 +00:00
Sam Ravnborg 687c3dac59 uml: Make deb-pkg build target build a Debian-style user-mode-linux package
From: Ryan Anderson <ryan@michonline.com>

Make the deb-pkg build target understand the "um" arch and set up the
package and directory structure to match a mainline-Debian style
user-mode-linux package.

This is primarily so that it stops matching, exactly, the naming
convention used by normal, non-UML kernels generated by this command.

Installing "linux-2.6.11" and "linux-2.6.11", where one is a UML kernel
doesn't do the right thing.  This fixes that.

Signed-off-by: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-14 20:24:00 +00:00
Linus Torvalds 1da177e4c3 Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
2005-04-16 15:20:36 -07:00