linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] kbuild, deb-pkg: Try to determine distribution
@ 2012-04-23 22:16 Sedat Dilek
  2012-04-23 22:16 ` [PATCH 2/3] kbuild, deb-pkg: Bump year in debian/copyright file Sedat Dilek
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Sedat Dilek @ 2012-04-23 22:16 UTC (permalink / raw)
  To: Michal Marek, linux-kbuild, linux-kernel; +Cc: Sedat Dilek


Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
---
 scripts/package/builddeb |   15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index eee5f8e..f5b56ac 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -172,9 +172,22 @@ else
 fi
 maintainer="$name <$email>"
 
+# Try to determine distribution
+if [ -e $(which lsb_release) ]; then
+       codename=$(lsb_release --codename --short)
+       if [ "$codename" != "" ]; then
+		distribution=$codename
+       else
+		distribution="UNRELEASED"
+		echo "WARNING: The distribution could NOT be determined!"
+       fi
+else
+       echo "HINT: Install lsb_release binary, this helps to identify your distribution!"
+fi
+
 # Generate a simple changelog template
 cat <<EOF > debian/changelog
-linux-upstream ($packageversion) unstable; urgency=low
+linux-upstream ($packageversion) $distribution; urgency=low
 
   * Custom built Linux kernel.
 
-- 
1.7.9.5


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

* [PATCH 2/3] kbuild, deb-pkg: Bump year in debian/copyright file
  2012-04-23 22:16 [PATCH 1/3] kbuild, deb-pkg: Try to determine distribution Sedat Dilek
@ 2012-04-23 22:16 ` Sedat Dilek
  2012-04-23 22:16 ` [PATCH 3/3] kbuild, deb-pkg: Update git repository URL " Sedat Dilek
  2013-02-27 13:55 ` [PATCH 1/3] kbuild, deb-pkg: Try to determine distribution Michal Marek
  2 siblings, 0 replies; 8+ messages in thread
From: Sedat Dilek @ 2012-04-23 22:16 UTC (permalink / raw)
  To: Michal Marek, linux-kbuild, linux-kernel; +Cc: Sedat Dilek


Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
---
 scripts/package/builddeb |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index f5b56ac..62c512b 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -201,7 +201,7 @@ 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 - 2009 Linus Torvalds and others.
+Copyright: 1991 - 2012 Linus Torvalds and others.
 
 The git repository for mainline kernel development is at:
 git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
-- 
1.7.9.5


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

* [PATCH 3/3] kbuild, deb-pkg: Update git repository URL in debian/copyright file
  2012-04-23 22:16 [PATCH 1/3] kbuild, deb-pkg: Try to determine distribution Sedat Dilek
  2012-04-23 22:16 ` [PATCH 2/3] kbuild, deb-pkg: Bump year in debian/copyright file Sedat Dilek
@ 2012-04-23 22:16 ` Sedat Dilek
  2013-02-27 13:55 ` [PATCH 1/3] kbuild, deb-pkg: Try to determine distribution Michal Marek
  2 siblings, 0 replies; 8+ messages in thread
From: Sedat Dilek @ 2012-04-23 22:16 UTC (permalink / raw)
  To: Michal Marek, linux-kbuild, linux-kernel; +Cc: Sedat Dilek


Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
---
 scripts/package/builddeb |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 62c512b..aec6aee 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -204,7 +204,7 @@ ftp://ftp.kernel.org/pub/linux/kernel
 Copyright: 1991 - 2012 Linus Torvalds and others.
 
 The git repository for mainline kernel development is at:
-git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
+git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.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
-- 
1.7.9.5


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

* Re: [PATCH 1/3] kbuild, deb-pkg: Try to determine distribution
  2012-04-23 22:16 [PATCH 1/3] kbuild, deb-pkg: Try to determine distribution Sedat Dilek
  2012-04-23 22:16 ` [PATCH 2/3] kbuild, deb-pkg: Bump year in debian/copyright file Sedat Dilek
  2012-04-23 22:16 ` [PATCH 3/3] kbuild, deb-pkg: Update git repository URL " Sedat Dilek
@ 2013-02-27 13:55 ` Michal Marek
  2013-02-27 14:09   ` Sedat Dilek
  2013-02-28  7:32   ` maximilian attems
  2 siblings, 2 replies; 8+ messages in thread
From: Michal Marek @ 2013-02-27 13:55 UTC (permalink / raw)
  To: Sedat Dilek; +Cc: linux-kbuild, linux-kernel, Sedat Dilek, maximilian attems

Sorry I missed this series. Max, can you have a look? I don't know the
policies for debian package changelogs. The full series is at
http://lkml.indiana.edu/hypermail/linux/kernel/1204.2/index.html#04252,
but the remaining two patches are obvious.

Michal

On 24.4.2012 00:16, Sedat Dilek wrote:
> Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
> ---
>  scripts/package/builddeb |   15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index eee5f8e..f5b56ac 100644
> --- a/scripts/package/builddeb
> +++ b/scripts/package/builddeb
> @@ -172,9 +172,22 @@ else
>  fi
>  maintainer="$name <$email>"
>  
> +# Try to determine distribution
> +if [ -e $(which lsb_release) ]; then
> +       codename=$(lsb_release --codename --short)
> +       if [ "$codename" != "" ]; then
> +		distribution=$codename
> +       else
> +		distribution="UNRELEASED"
> +		echo "WARNING: The distribution could NOT be determined!"
> +       fi
> +else
> +       echo "HINT: Install lsb_release binary, this helps to identify your distribution!"
> +fi
> +
>  # Generate a simple changelog template
>  cat <<EOF > debian/changelog
> -linux-upstream ($packageversion) unstable; urgency=low
> +linux-upstream ($packageversion) $distribution; urgency=low
>  
>    * Custom built Linux kernel.
>  
> 



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

* Re: [PATCH 1/3] kbuild, deb-pkg: Try to determine distribution
  2013-02-27 13:55 ` [PATCH 1/3] kbuild, deb-pkg: Try to determine distribution Michal Marek
@ 2013-02-27 14:09   ` Sedat Dilek
  2013-02-27 20:58     ` Thorsten Glaser
  2013-02-28  7:32   ` maximilian attems
  1 sibling, 1 reply; 8+ messages in thread
From: Sedat Dilek @ 2013-02-27 14:09 UTC (permalink / raw)
  To: Michal Marek
  Cc: Sedat Dilek, linux-kbuild, linux-kernel, maximilian attems,
	Thorsten Glaser, Alexander Wirt

On Wed, Feb 27, 2013 at 2:55 PM, Michal Marek <mmarek@suse.cz> wrote:
> Sorry I missed this series. Max, can you have a look? I don't know the
> policies for debian package changelogs. The full series is at
> http://lkml.indiana.edu/hypermail/linux/kernel/1204.2/index.html#04252,
> but the remaining two patches are obvious.
>

[ CC mirabilos and formorer ]

[PATCH 1/3] kbuild, deb-pkg: Try to determine distribution

...was discussed in (hehe, so long ago) April 2012 on #grml IRC (a
Linux live-system based on Debian) with Thorsten Glaser and Alexander
Wirt.
Both cool guys (longterm Debian maintainers and admins) gave me
several good hints to make this a "proper" solution.
Maybe, they won't remember :-).

I switched from Debian/unstable to Ubuntu/precise these days and that
was the reason I wanted the correct $distribution in my generated
Debian kernel packages.

Might be I come back when Debian/wheezy is released... you never know :-).
Or I get an Amiga-3000 with Debian/m68k running... with DirOpus and
DPaint-IV, hahaha.

I was simply too lazy to place a rock-solid changelog.

- Sedat -

> Michal
>
> On 24.4.2012 00:16, Sedat Dilek wrote:
>> Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
>> ---
>>  scripts/package/builddeb |   15 ++++++++++++++-
>>  1 file changed, 14 insertions(+), 1 deletion(-)
>>
>> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
>> index eee5f8e..f5b56ac 100644
>> --- a/scripts/package/builddeb
>> +++ b/scripts/package/builddeb
>> @@ -172,9 +172,22 @@ else
>>  fi
>>  maintainer="$name <$email>"
>>
>> +# Try to determine distribution
>> +if [ -e $(which lsb_release) ]; then
>> +       codename=$(lsb_release --codename --short)
>> +       if [ "$codename" != "" ]; then
>> +             distribution=$codename
>> +       else
>> +             distribution="UNRELEASED"
>> +             echo "WARNING: The distribution could NOT be determined!"
>> +       fi
>> +else
>> +       echo "HINT: Install lsb_release binary, this helps to identify your distribution!"
>> +fi
>> +
>>  # Generate a simple changelog template
>>  cat <<EOF > debian/changelog
>> -linux-upstream ($packageversion) unstable; urgency=low
>> +linux-upstream ($packageversion) $distribution; urgency=low
>>
>>    * Custom built Linux kernel.
>>
>>
>
>

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

* Re: [PATCH 1/3] kbuild, deb-pkg: Try to determine distribution
  2013-02-27 14:09   ` Sedat Dilek
@ 2013-02-27 20:58     ` Thorsten Glaser
  0 siblings, 0 replies; 8+ messages in thread
From: Thorsten Glaser @ 2013-02-27 20:58 UTC (permalink / raw)
  To: Sedat Dilek
  Cc: Michal Marek, Sedat Dilek, linux-kbuild, linux-kernel,
	maximilian attems, Alexander Wirt

I’d personally use -cs because I detest --gnu-long-options, but LGTM.

Signed-off-by: Thorsten Glaser <tg@debian.org>

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

* Re: [PATCH 1/3] kbuild, deb-pkg: Try to determine distribution
  2013-02-27 13:55 ` [PATCH 1/3] kbuild, deb-pkg: Try to determine distribution Michal Marek
  2013-02-27 14:09   ` Sedat Dilek
@ 2013-02-28  7:32   ` maximilian attems
  2013-02-28  9:45     ` Sedat Dilek
  1 sibling, 1 reply; 8+ messages in thread
From: maximilian attems @ 2013-02-28  7:32 UTC (permalink / raw)
  To: Michal Marek; +Cc: Sedat Dilek, linux-kbuild, linux-kernel, Sedat Dilek

On Wed, Feb 27, 2013 at 02:55:45PM +0100, Michal Marek wrote:
> Sorry I missed this series. Max, can you have a look? I don't know the
> policies for debian package changelogs. The full series is at
> http://lkml.indiana.edu/hypermail/linux/kernel/1204.2/index.html#04252,
> but the remaining two patches are obvious.

the two remaining ones are trivial, should have pushed them a long time
ago and will do so this weekend in a combined version going up to 2013
(sitting in my queue to send).
 
> On 24.4.2012 00:16, Sedat Dilek wrote:
> > Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
> > ---
> >  scripts/package/builddeb |   15 ++++++++++++++-
> >  1 file changed, 14 insertions(+), 1 deletion(-)
> > 
> > diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> > index eee5f8e..f5b56ac 100644
> > --- a/scripts/package/builddeb
> > +++ b/scripts/package/builddeb
> > @@ -172,9 +172,22 @@ else
> >  fi
> >  maintainer="$name <$email>"
> >  
> > +# Try to determine distribution
> > +if [ -e $(which lsb_release) ]; then
> > +       codename=$(lsb_release --codename --short)
> > +       if [ "$codename" != "" ]; then
> > +		distribution=$codename
> > +       else
> > +		distribution="UNRELEASED"
> > +		echo "WARNING: The distribution could NOT be determined!"
> > +       fi
> > +else
> > +       echo "HINT: Install lsb_release binary, this helps to identify your distribution!"
> > +fi
> > +
> >  # Generate a simple changelog template
> >  cat <<EOF > debian/changelog
> > -linux-upstream ($packageversion) unstable; urgency=low
> > +linux-upstream ($packageversion) $distribution; urgency=low
> >  
> >    * Custom built Linux kernel.

this is pretty useless. 
Nack, in adding a this additional lsb dep.
I know it should be installed by default, but in practise it is often not.

If you'd really care about the changelog you'd generate it out of your
git repo with Debian's git dch in order to have something meaningful.


-- 
maks

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

* Re: [PATCH 1/3] kbuild, deb-pkg: Try to determine distribution
  2013-02-28  7:32   ` maximilian attems
@ 2013-02-28  9:45     ` Sedat Dilek
  0 siblings, 0 replies; 8+ messages in thread
From: Sedat Dilek @ 2013-02-28  9:45 UTC (permalink / raw)
  To: maximilian attems
  Cc: Michal Marek, Sedat Dilek, linux-kbuild, linux-kernel,
	Alexander Wirt, Thorsten Glaser

On Thu, Feb 28, 2013 at 8:32 AM, maximilian attems <max@stro.at> wrote:
> On Wed, Feb 27, 2013 at 02:55:45PM +0100, Michal Marek wrote:
>> Sorry I missed this series. Max, can you have a look? I don't know the
>> policies for debian package changelogs. The full series is at
>> http://lkml.indiana.edu/hypermail/linux/kernel/1204.2/index.html#04252,
>> but the remaining two patches are obvious.
>
> the two remaining ones are trivial, should have pushed them a long time
> ago and will do so this weekend in a combined version going up to 2013
> (sitting in my queue to send).
>
>> On 24.4.2012 00:16, Sedat Dilek wrote:
>> > Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
>> > ---
>> >  scripts/package/builddeb |   15 ++++++++++++++-
>> >  1 file changed, 14 insertions(+), 1 deletion(-)
>> >
>> > diff --git a/scripts/package/builddeb b/scripts/package/builddeb
>> > index eee5f8e..f5b56ac 100644
>> > --- a/scripts/package/builddeb
>> > +++ b/scripts/package/builddeb
>> > @@ -172,9 +172,22 @@ else
>> >  fi
>> >  maintainer="$name <$email>"
>> >
>> > +# Try to determine distribution
>> > +if [ -e $(which lsb_release) ]; then
>> > +       codename=$(lsb_release --codename --short)
>> > +       if [ "$codename" != "" ]; then
>> > +           distribution=$codename
>> > +       else
>> > +           distribution="UNRELEASED"
>> > +           echo "WARNING: The distribution could NOT be determined!"
>> > +       fi
>> > +else
>> > +       echo "HINT: Install lsb_release binary, this helps to identify your distribution!"
>> > +fi
>> > +
>> >  # Generate a simple changelog template
>> >  cat <<EOF > debian/changelog
>> > -linux-upstream ($packageversion) unstable; urgency=low
>> > +linux-upstream ($packageversion) $distribution; urgency=low
>> >
>> >    * Custom built Linux kernel.
>
> this is pretty useless.
> Nack, in adding a this additional lsb dep.
> I know it should be installed by default, but in practise it is often not.
>
> If you'd really care about the changelog you'd generate it out of your
> git repo with Debian's git dch in order to have something meaningful.
>

[ CCing Thorsten and Alexander ]

Thank you for your response.

This was a compromise for Debian and Ubuntu systems and as said
discussed with two longterm Debian maintainers.
Thorsten Glaser uses same mechanisms in his Debian build-environments
(he prefers -cs as parameters than long-format).
FYI: Ubuntu/precise ships lsb(-release) stuff by default!
Can't say if it is a "essential" package on Debian these days or not
(in my patch there is a warning if it's not available).

Personally, I think lsb-release binary is a good compromise in a
non-Debian-world, too.
I don't know of a real distro not shipping it - not thinking of
distros like LFS (Linux From Scratch) in first place (and did not
verify even if LSB stuff is done or not, I might be wrong).

What's your proposal to check for $codename/$distribution (just curious)?

Last question:
Should people CC you always on patches for deb-pkg?
For me it looks like you are "maintaining" it, so why not place you as
a maintainer in MAINTAINERS file?
( Didn't check what checkpatch.pl throws out. )
So, you do the work - get the credits :-)!

- Sedat -

P.S.: Ubuntu/precise beta1 ships lsb-release.

# grep lsb packages_01_precise-beta1.txt
ii  lsb-base                               4.0-0ubuntu20
                 Linux Standard Base 4.0 init script functionality
ii  lsb-release                            4.0-0ubuntu20
                 Linux Standard Base version reporting utility

>
> --
> maks

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

end of thread, other threads:[~2013-02-28  9:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-23 22:16 [PATCH 1/3] kbuild, deb-pkg: Try to determine distribution Sedat Dilek
2012-04-23 22:16 ` [PATCH 2/3] kbuild, deb-pkg: Bump year in debian/copyright file Sedat Dilek
2012-04-23 22:16 ` [PATCH 3/3] kbuild, deb-pkg: Update git repository URL " Sedat Dilek
2013-02-27 13:55 ` [PATCH 1/3] kbuild, deb-pkg: Try to determine distribution Michal Marek
2013-02-27 14:09   ` Sedat Dilek
2013-02-27 20:58     ` Thorsten Glaser
2013-02-28  7:32   ` maximilian attems
2013-02-28  9:45     ` Sedat Dilek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).