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 dpkg

 
 
LinkBack Thread Tools
 
Old 06-14-2010, 05:58 AM
Raphael Hertzog
 
Default dpkg-buildpackage question

On Mon, 14 Jun 2010, Harald Jenny wrote:
> Dear Guillem Jover and RaphaŽl Hertzog,
>
> sorry to mail you in private but I have a rather "obscure" question
> regarding dpkg-buildpackage

There's no question obscure enough to justify a private question, just use
debian-dpkg@lists.debian.org (or check the sources). Let's continue the
discussion there.

> is it possible to specify in debian/rules
> how dpkg-buildpackage names the .changes file?

No.

> The background: For a upstream package which I test very often I
> modified the standard debian/rules to dynamically create a version entry
> in changelog so that tester can do a quick compile and install. The
> packages itself get named correctly but the .changes files is namend
> unknown.

You don't have a single changelog entry at the start of the build?

It should be possible to parse debian/changelog later in the process but
I'm not convinced that it's a good idea.

In which target of debian/rules are you updating the changelog file?

What set of commands do you want your users to have to type and where do
they get the sources from?

> I know that this usage of dpkg-buildpackage is not really supported but
> as upstream developers tend to suggest people to try the latest version
> it seems the best possibility for keeping systems clean for Debian
> users...

Is the debian directory provided by upstream?

Cheers,
--
RaphaŽl Hertzog

Like what I do? Sponsor me: http://ouaza.com/wp/2010/01/05/5-years-of-freexian/
My Debian goals: http://ouaza.com/wp/2010/01/09/debian-related-goals-for-2010/


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100614055858.GA22783@rivendell">http://lists.debian.org/20100614055858.GA22783@rivendell
 
Old 06-14-2010, 08:43 AM
Harald Jenny
 
Default dpkg-buildpackage question

On Mon, Jun 14, 2010 at 07:58:58AM +0200, Raphael Hertzog wrote:
> On Mon, 14 Jun 2010, Harald Jenny wrote:
> > Dear Guillem Jover and RaphaŽl Hertzog,
> >
> > sorry to mail you in private but I have a rather "obscure" question
> > regarding dpkg-buildpackage
>
> There's no question obscure enough to justify a private question, just use
> debian-dpkg@lists.debian.org (or check the sources). Let's continue the
> discussion there.
>
> > is it possible to specify in debian/rules
> > how dpkg-buildpackage names the .changes file?
>
> No.

Ok

>
> > The background: For a upstream package which I test very often I
> > modified the standard debian/rules to dynamically create a version entry
> > in changelog so that tester can do a quick compile and install. The
> > packages itself get named correctly but the .changes files is namend
> > unknown.
>
> You don't have a single changelog entry at the start of the build?

I have a dummy changelog entry without a version number.

>
> It should be possible to parse debian/changelog later in the process but
> I'm not convinced that it's a good idea.

Well to be honest I don't know the script enough to guess what problem a later
parsing would imply :-/.

>
> In which target of debian/rules are you updating the changelog file?

in patch - runs like this:

binary: binary-indep binary-arch
binary-indep: install-openswan-doc install-openswan-modules-source install-openswan-modules-dkms
install-openswan-doc: build
build: build-stamp
build-stamp: patch

patch:
dh_testdir
dpatch apply-all
sed -e "$(SED_SCRIPT)" debian/changelog.in > debian/changelog
sed -e "$(SED_SCRIPT)" debian/NEWS.in > debian/NEWS

>
> What set of commands do you want your users to have to type and where do
> they get the sources from?

I want to keep it as simple as possible - dpkg-buildpackage -rfakeroot -b.
The source can be downloaded as tar or via git checkout.

>
> > I know that this usage of dpkg-buildpackage is not really supported but
> > as upstream developers tend to suggest people to try the latest version
> > it seems the best possibility for keeping systems clean for Debian
> > users...
>
> Is the debian directory provided by upstream?

Well I'm uploader for the Debian package and commiter for upstream (and
permanently changing the changelog is not really feasable as I'm not
responsible for release management). I guess the best "solution" would be to
add the fact with the .changes file to README.Debian as these packages are not
official ones.

>
> Cheers,
> --
> RaphaŽl Hertzog

Kind regards and thanks for your help
Harald Jenny

>
> Like what I do? Sponsor me: http://ouaza.com/wp/2010/01/05/5-years-of-freexian/
> My Debian goals: http://ouaza.com/wp/2010/01/09/debian-related-goals-for-2010/


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100614084347.GB6015@harald-has.a-little-linux-box.at">http://lists.debian.org/20100614084347.GB6015@harald-has.a-little-linux-box.at
 
Old 06-14-2010, 09:52 AM
Raphael Hertzog
 
Default dpkg-buildpackage question

On Mon, 14 Jun 2010, Harald Jenny wrote:
> > It should be possible to parse debian/changelog later in the process but
> > I'm not convinced that it's a good idea.
>
> Well to be honest I don't know the script enough to guess what problem a later
> parsing would imply :-/.

The problem is not really in dpkg-buildpackage, but having the version
number changes between the various steps (clean, build, binary) is not a
good idea IMO.

> patch:
> dh_testdir
> dpatch apply-all
> sed -e "$(SED_SCRIPT)" debian/changelog.in > debian/changelog
> sed -e "$(SED_SCRIPT)" debian/NEWS.in > debian/NEWS

How do you decide of the version number ?

> > What set of commands do you want your users to have to type and where do
> > they get the sources from?
>
> I want to keep it as simple as possible - dpkg-buildpackage -rfakeroot -b.
> The source can be downloaded as tar or via git checkout.

You could write a "build-snapshot" target in debian/rules that does:
1/ generate the changelog/NEWS file
2/ call dpkg-buildpackage -b

And you tell the users to call "debian/rules build-snapshot" instead.

Wouldn't that suit your needs?

BTW, I guess most end users do not need the .changes file anyway.

Cheers,
--
RaphaŽl Hertzog

Like what I do? Sponsor me: http://ouaza.com/wp/2010/01/05/5-years-of-freexian/
My Debian goals: http://ouaza.com/wp/2010/01/09/debian-related-goals-for-2010/


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100614095205.GA26563@rivendell">http://lists.debian.org/20100614095205.GA26563@rivendell
 
Old 06-14-2010, 10:24 AM
Harald Jenny
 
Default dpkg-buildpackage question

On Mon, Jun 14, 2010 at 11:52:05AM +0200, Raphael Hertzog wrote:
> On Mon, 14 Jun 2010, Harald Jenny wrote:
> > > It should be possible to parse debian/changelog later in the process but
> > > I'm not convinced that it's a good idea.
> >
> > Well to be honest I don't know the script enough to guess what problem a later
> > parsing would imply :-/.
>
> The problem is not really in dpkg-buildpackage, but having the version
> number changes between the various steps (clean, build, binary) is not a
> good idea IMO.

I could also call a target directly from binary, would that be better?

>
> > patch:
> > dh_testdir
> > dpatch apply-all
> > sed -e "$(SED_SCRIPT)" debian/changelog.in > debian/changelog
> > sed -e "$(SED_SCRIPT)" debian/NEWS.in > debian/NEWS
>
> How do you decide of the version number ?

VERSION=$(shell if [ "`which git`" ] && [ "`git describe 2>/dev/null`" ]; then git describe | sed 's/^v//' ; else basename `pwd` | sed 's/^openswan-//' ; fi)
SED_SCRIPT=s!$$VERSION!$(VERSION)!

>
> > > What set of commands do you want your users to have to type and where do
> > > they get the sources from?
> >
> > I want to keep it as simple as possible - dpkg-buildpackage -rfakeroot -b.
> > The source can be downloaded as tar or via git checkout.
>
> You could write a "build-snapshot" target in debian/rules that does:
> 1/ generate the changelog/NEWS file
> 2/ call dpkg-buildpackage -b

That is an interesting idea...

>
> And you tell the users to call "debian/rules build-snapshot" instead.

Well I somehow thought I could avoid this as "special threatment" is normally
exactly the kind of threatment that causes problems (users not reading README
etc...).

>
> Wouldn't that suit your needs?

It is for sure a good solution but more "things to think about" for the user
which was exactly what I wanted to omit ;-).

>
> BTW, I guess most end users do not need the .changes file anyway.

Ok maybe here the best technical solution is not the easiest solution for the
user - above all, as this packaged is not even supposed to build a completely
clean Debian paket I guess I will just change the when and not the how.

>
> Cheers,
> --
> RaphaŽl Hertzog

So thanks for your help and the ideas you gave me and I wish you a nice day
Harald

>
> Like what I do? Sponsor me: http://ouaza.com/wp/2010/01/05/5-years-of-freexian/
> My Debian goals: http://ouaza.com/wp/2010/01/09/debian-related-goals-for-2010/


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100614102441.GB7047@harald-has.a-little-linux-box.at">http://lists.debian.org/20100614102441.GB7047@harald-has.a-little-linux-box.at
 

Thread Tools




All times are GMT. The time now is 07:19 AM.

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