public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] deb-pkg: Beautify changelog
@ 2008-09-17 20:09 maximilian attems
  2008-09-17 20:09 ` [PATCH] deb-pkg: Fix Provides field maximilian attems
  0 siblings, 1 reply; 10+ messages in thread
From: maximilian attems @ 2008-09-17 20:09 UTC (permalink / raw)
  To: sam; +Cc: linux-kbuild, dilinger, maximilian attems

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 Maintainer" sounds nicer then Kernel compiler
if no name is found. As bonus add more descriptive changelog
entry.

Cc: Andres Salomon <dilinger@debian.org>
Signed-off-by: maximilian attems <max@stro.at>
---
 scripts/package/builddeb |   25 ++++++++++++++++++++-----
 1 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index ba6bf5d..9889a73 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -63,14 +63,29 @@ EOF
 	chmod 755 "$tmpdir/DEBIAN/$script"
 done
 
-name="Kernel Compiler <$(id -nu)@$(hostname -f)>"
+# Try to determine maintainer and email values
+if [ -n "${DEBEMAIL}" ]; then
+	email=${DEBEMAIL}
+elif [ -n "${EMAIL}" ]; then
+	email=${EMAIL}
+else
+	email=$(id -nu)@$(hostname -f)
+fi
+if [ -n "${DEBFULLNAME}" ]; then
+	name=${DEBFULLNAME}
+elif [ -n "${NAME}" ]; then
+	name=${NAME}
+else
+	name="Anonymous Maintainer"
+fi
+maintainer="${name} <${email}>"
 # Generate a simple changelog template
 cat <<EOF > debian/changelog
 linux ($version-$revision) unstable; urgency=low
 
-  * A standard release
+  * New upstream release
 
- -- $name  $(date -R)
+ -- ${maintainer}  $(date -R)
 EOF
 
 # Generate a control file
@@ -80,7 +95,7 @@ cat <<EOF > debian/control
 Source: linux
 Section: base
 Priority: optional
-Maintainer: $name
+Maintainer: $maintainer
 Standards-Version: 3.6.1
 
 Package: $packagename
@@ -102,7 +117,7 @@ cat <<EOF > debian/control
 Source: linux
 Section: base
 Priority: optional
-Maintainer: $name
+Maintainer: $maintainer
 Standards-Version: 3.6.1
 
 Package: $packagename
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] deb-pkg: Fix Provides field
  2008-09-17 20:09 [PATCH] deb-pkg: Beautify changelog maximilian attems
@ 2008-09-17 20:09 ` maximilian attems
  2008-09-17 20:09   ` [PATCH] deb-pkg: bump standards version maximilian attems
  2008-09-26 21:31   ` [PATCH] deb-pkg: Fix Provides field Andres Salomon
  0 siblings, 2 replies; 10+ messages in thread
From: maximilian attems @ 2008-09-17 20:09 UTC (permalink / raw)
  To: sam; +Cc: linux-kbuild, dilinger, maximilian attems

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

Cc: Andres Salomon <dilinger@debian.org>
Signed-off-by: maximilian attems <max@stro.at>
---
 scripts/package/builddeb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 9889a73..8c69b9e 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -99,7 +99,7 @@ Maintainer: $maintainer
 Standards-Version: 3.6.1
 
 Package: $packagename
-Provides: kernel-image-$version, linux-image-$version
+Provides: linux-image, linux-image-2.6, linux-modules-$version
 Architecture: any
 Description: User Mode Linux kernel, version $version
  User-mode Linux is a port of the Linux kernel to its own system call
@@ -121,7 +121,7 @@ Maintainer: $maintainer
 Standards-Version: 3.6.1
 
 Package: $packagename
-Provides: kernel-image-$version, linux-image-$version
+Provides: linux-image, linux-image-2.6, linux-modules-$version
 Architecture: any
 Description: Linux kernel, version $version
  This package contains the Linux kernel, modules and corresponding other
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] deb-pkg: bump standards version
  2008-09-17 20:09 ` [PATCH] deb-pkg: Fix Provides field maximilian attems
@ 2008-09-17 20:09   ` maximilian attems
  2008-09-17 20:09     ` [PATCH] deb-pkg: Fix Section and Source field maximilian attems
  2008-09-26 21:31   ` [PATCH] deb-pkg: Fix Provides field Andres Salomon
  1 sibling, 1 reply; 10+ messages in thread
From: maximilian attems @ 2008-09-17 20:09 UTC (permalink / raw)
  To: sam; +Cc: linux-kbuild, dilinger, maximilian attems

Latest Debian policy is 3.8.0.
Even if we are not yet compliant to it strive for the latest.

Acked-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: maximilian attems <max@stro.at>
---
 scripts/package/builddeb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 8c69b9e..19d933e 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -96,7 +96,7 @@ Source: linux
 Section: base
 Priority: optional
 Maintainer: $maintainer
-Standards-Version: 3.6.1
+Standards-Version: 3.8.0
 
 Package: $packagename
 Provides: linux-image, linux-image-2.6, linux-modules-$version
@@ -118,7 +118,7 @@ Source: linux
 Section: base
 Priority: optional
 Maintainer: $maintainer
-Standards-Version: 3.6.1
+Standards-Version: 3.8.0
 
 Package: $packagename
 Provides: linux-image, linux-image-2.6, linux-modules-$version
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] deb-pkg: Fix Section and Source field
  2008-09-17 20:09   ` [PATCH] deb-pkg: bump standards version maximilian attems
@ 2008-09-17 20:09     ` maximilian attems
  2008-09-17 20:09       ` [PATCH] deb-pkg: Generate a debian/copyright maximilian attems
  0 siblings, 1 reply; 10+ messages in thread
From: maximilian attems @ 2008-09-17 20:09 UTC (permalink / raw)
  To: sam; +Cc: linux-kbuild, dilinger, maximilian attems

Base section has been removed, the base is defined by Priority field.
Source is linux-2.6.

Cc: Andres Salomon <dilinger@debian.org>
Signed-off-by: maximilian attems <max@stro.at>
---
 scripts/package/builddeb |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 19d933e..757206f 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -81,7 +81,7 @@ fi
 maintainer="${name} <${email}>"
 # Generate a simple changelog template
 cat <<EOF > debian/changelog
-linux ($version-$revision) unstable; urgency=low
+linux-2.6 ($version-$revision) unstable; urgency=low
 
   * New upstream release
 
@@ -92,8 +92,8 @@ EOF
 if [ "$ARCH" == "um" ]; then
 
 cat <<EOF > debian/control
-Source: linux
-Section: base
+Source: linux-2.6
+Section: admin
 Priority: optional
 Maintainer: $maintainer
 Standards-Version: 3.8.0
@@ -114,8 +114,8 @@ EOF
 
 else
 cat <<EOF > debian/control
-Source: linux
-Section: base
+Source: linux-2.6
+Section: admin
 Priority: optional
 Maintainer: $maintainer
 Standards-Version: 3.8.0
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] deb-pkg: Generate a debian/copyright
  2008-09-17 20:09     ` [PATCH] deb-pkg: Fix Section and Source field maximilian attems
@ 2008-09-17 20:09       ` maximilian attems
  2008-09-17 20:09         ` [PATCH] deb-pkg: Fix generated packagename maximilian attems
  2008-09-18  6:44         ` [PATCH] deb-pkg: Generate a debian/copyright Adrian Bunk
  0 siblings, 2 replies; 10+ messages in thread
From: maximilian attems @ 2008-09-17 20:09 UTC (permalink / raw)
  To: sam; +Cc: linux-kbuild, dilinger, maximilian attems

add a basic debian/copyright to the binary package.

Cc: Andres Salomon <dilinger@debian.org>
Signed-off-by: maximilian attems <max@stro.at>
---
 scripts/package/builddeb |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 757206f..ed33624 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -88,6 +88,26 @@ linux-2.6 ($version-$revision) unstable; urgency=low
  -- ${maintainer}  $(date -R)
 EOF
 
+# Generate copyright file
+cat <<EOF > debian/copyright
+This is a packacked upstream version of the Linux kernel.
+
+The sources may be found at most Linux ftp sites, including
+ftp://ftp.kernel.org/pub/linux/kernel
+
+Copyright: 1991 - 2008 Linus Torvalds and others.
+
+see git history
+git://git.eu.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; version 2 dated June, 1991.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License can be found in \`/usr/share/common-licenses/GPL'.
+EOF
+
 # Generate a control file
 if [ "$ARCH" == "um" ]; then
 
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] deb-pkg: Fix generated packagename
  2008-09-17 20:09       ` [PATCH] deb-pkg: Generate a debian/copyright maximilian attems
@ 2008-09-17 20:09         ` maximilian attems
  2008-09-17 20:09           ` [PATCH] deb-pkg: generate changelog, copyright and control on demand maximilian attems
  2008-09-18  6:44         ` [PATCH] deb-pkg: Generate a debian/copyright Adrian Bunk
  1 sibling, 1 reply; 10+ messages in thread
From: maximilian attems @ 2008-09-17 20:09 UTC (permalink / raw)
  To: sam; +Cc: linux-kbuild, dilinger, maximilian attems

The binary package that make deb-pkg creates is a linux-image.
To be fixed may also be the addition of $DEB_ARCH.

Cc: Andres Salomon <dilinger@debian.org>
Signed-off-by: maximilian attems <max@stro.at>
---
 scripts/package/builddeb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index ed33624..01964f4 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -15,7 +15,7 @@ set -e
 version=$KERNELRELEASE
 revision=`cat .version`
 tmpdir="$objtree/debian/tmp"
-packagename=linux-$version
+packagename=linux-image-$version
 
 if [ "$ARCH" == "um" ] ; then
 	packagename=user-mode-linux-$version
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] deb-pkg: generate changelog, copyright and control on demand
  2008-09-17 20:09         ` [PATCH] deb-pkg: Fix generated packagename maximilian attems
@ 2008-09-17 20:09           ` maximilian attems
  0 siblings, 0 replies; 10+ messages in thread
From: maximilian attems @ 2008-09-17 20:09 UTC (permalink / raw)
  To: sam; +Cc: linux-kbuild, dilinger, maximilian attems

if one those files are already in place don't overwrite it.

Cc: Andres Salomon <dilinger@debian.org>
Signed-off-by: maximilian attems <max@stro.at>
---
 scripts/package/builddeb |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 01964f4..b690a91 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -63,6 +63,10 @@ EOF
 	chmod 755 "$tmpdir/DEBIAN/$script"
 done
 
+[ -f debian/changelog ] || gen_changelog
+[ -f debian/copyright ] || gen_copyright
+[ -f debian/control ] || gen_control
+
 # Try to determine maintainer and email values
 if [ -n "${DEBEMAIL}" ]; then
 	email=${DEBEMAIL}
@@ -79,7 +83,10 @@ else
 	name="Anonymous Maintainer"
 fi
 maintainer="${name} <${email}>"
+
 # Generate a simple changelog template
+gen_changelog()
+{
 cat <<EOF > debian/changelog
 linux-2.6 ($version-$revision) unstable; urgency=low
 
@@ -87,8 +94,11 @@ linux-2.6 ($version-$revision) unstable; urgency=low
 
  -- ${maintainer}  $(date -R)
 EOF
+}
 
 # Generate copyright file
+gen_copyright()
+{
 cat <<EOF > debian/copyright
 This is a packacked upstream version of the Linux kernel.
 
@@ -107,8 +117,11 @@ git://git.eu.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
 On Debian GNU/Linux systems, the complete text of the GNU General
 Public License can be found in \`/usr/share/common-licenses/GPL'.
 EOF
+}
 
 # Generate a control file
+gen_control()
+{
 if [ "$ARCH" == "um" ]; then
 
 cat <<EOF > debian/control
@@ -148,6 +161,7 @@ Description: Linux kernel, version $version
  files version $version
 EOF
 fi
+}
 
 # Fix some ownership and permissions
 chown -R root:root "$tmpdir"
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] deb-pkg: Generate a debian/copyright
  2008-09-17 20:09       ` [PATCH] deb-pkg: Generate a debian/copyright maximilian attems
  2008-09-17 20:09         ` [PATCH] deb-pkg: Fix generated packagename maximilian attems
@ 2008-09-18  6:44         ` Adrian Bunk
  2008-09-18  9:20           ` maximilian attems
  1 sibling, 1 reply; 10+ messages in thread
From: Adrian Bunk @ 2008-09-18  6:44 UTC (permalink / raw)
  To: maximilian attems; +Cc: sam, linux-kbuild, dilinger

On Wed, Sep 17, 2008 at 10:09:53PM +0200, maximilian attems wrote:
>...
> --- a/scripts/package/builddeb
> +++ b/scripts/package/builddeb
>...
> +Copyright: 1991 - 2008 Linus Torvalds and others.
> +
> +see git history
> +git://git.eu.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
>...

I'm wondering why you are not using git.kernel.org.

Also note that if you are interested in all copyright holders then the 
git history does not contain the older information.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] deb-pkg: Generate a debian/copyright
  2008-09-18  6:44         ` [PATCH] deb-pkg: Generate a debian/copyright Adrian Bunk
@ 2008-09-18  9:20           ` maximilian attems
  0 siblings, 0 replies; 10+ messages in thread
From: maximilian attems @ 2008-09-18  9:20 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: sam, linux-kbuild, dilinger

On Thu, 18 Sep 2008, Adrian Bunk wrote:

> On Wed, Sep 17, 2008 at 10:09:53PM +0200, maximilian attems wrote:
> >...
> > --- a/scripts/package/builddeb
> > +++ b/scripts/package/builddeb
> >...
> > +Copyright: 1991 - 2008 Linus Torvalds and others.
> > +
> > +see git history
> > +git://git.eu.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
> >...
> 
> I'm wondering why you are not using git.kernel.org.

right bad c&p.
faster here, will resend this one.
 
> Also note that if you are interested in all copyright holders then the 
> git history does not contain the older information.

sure, never stated to want to list all copyright holder as some guys,
which like to overinflate debian/copyright.
 
thanks

-- 
maks

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] deb-pkg: Fix Provides field
  2008-09-17 20:09 ` [PATCH] deb-pkg: Fix Provides field maximilian attems
  2008-09-17 20:09   ` [PATCH] deb-pkg: bump standards version maximilian attems
@ 2008-09-26 21:31   ` Andres Salomon
  1 sibling, 0 replies; 10+ messages in thread
From: Andres Salomon @ 2008-09-26 21:31 UTC (permalink / raw)
  To: maximilian attems; +Cc: sam, linux-kbuild

On Wed, 17 Sep 2008 22:09:50 +0200
maximilian attems <max@stro.at> wrote:

> 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
> 
> Cc: Andres Salomon <dilinger@debian.org>
> Signed-off-by: maximilian attems <max@stro.at>
> ---
>  scripts/package/builddeb |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index 9889a73..8c69b9e 100644
> --- a/scripts/package/builddeb
> +++ b/scripts/package/builddeb
> @@ -99,7 +99,7 @@ Maintainer: $maintainer
>  Standards-Version: 3.6.1
>  
>  Package: $packagename
> -Provides: kernel-image-$version, linux-image-$version
> +Provides: linux-image, linux-image-2.6, linux-modules-$version

Hm, I'd recommend making the linux-modules* stuff configurable.  Ubuntu's
kernel provides look like the following:

Provides: fuse-module, ivtv-modules, kvm-api-4, linux-image, linux-image-2.6, redhat-cluster-modules



>  Architecture: any
>  Description: User Mode Linux kernel, version $version
>   User-mode Linux is a port of the Linux kernel to its own system call
> @@ -121,7 +121,7 @@ Maintainer: $maintainer
>  Standards-Version: 3.6.1
>  
>  Package: $packagename
> -Provides: kernel-image-$version, linux-image-$version
> +Provides: linux-image, linux-image-2.6, linux-modules-$version

Ditto.

>  Architecture: any
>  Description: Linux kernel, version $version
>   This package contains the Linux kernel, modules and corresponding
> other

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-09-26 21:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-17 20:09 [PATCH] deb-pkg: Beautify changelog maximilian attems
2008-09-17 20:09 ` [PATCH] deb-pkg: Fix Provides field maximilian attems
2008-09-17 20:09   ` [PATCH] deb-pkg: bump standards version maximilian attems
2008-09-17 20:09     ` [PATCH] deb-pkg: Fix Section and Source field maximilian attems
2008-09-17 20:09       ` [PATCH] deb-pkg: Generate a debian/copyright maximilian attems
2008-09-17 20:09         ` [PATCH] deb-pkg: Fix generated packagename maximilian attems
2008-09-17 20:09           ` [PATCH] deb-pkg: generate changelog, copyright and control on demand maximilian attems
2008-09-18  6:44         ` [PATCH] deb-pkg: Generate a debian/copyright Adrian Bunk
2008-09-18  9:20           ` maximilian attems
2008-09-26 21:31   ` [PATCH] deb-pkg: Fix Provides field Andres Salomon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox