Re: Test suite best practices ?

2013-06-03 Thread Neil Williams
On Sun, 02 Jun 2013 20:59:13 +0200
Xavier Roche  wrote:

> Hi folks,
> 
> Are there any "best practices" on how to handle test suite in Debian ?

One thing which hasn't been mentioned so far, always ensure that your
test suite only runs if DEB_BUILD_OPTIONS="nocheck" is *not* set.

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
# Code to run the package test suite.
endif

It's recommended in Policy but if a package has a test suite, there is
no good reason not to allow for nocheck.

-- 


Neil Williams
=
http://www.linux.codehelp.co.uk/



pgplijkkRuX9x.pgp
Description: PGP signature


question about build a package

2013-06-03 Thread Pol Hallen
Hi all! This is my first post :-)

I try to patch postfix and I want be sure that my procedure is correct :-)

apt-get source postfix and I see:

f 215552 Jun  3 13:35 postfix_2.7.1-1+squeeze1.diff.gz
f 1754 Jun  3 13:35 postfix_2.7.1-1+squeeze1.dsc
d 4096 Jun  3 13:35 postfix-2.7.1
f 3418747 Jun  3 13:35 postfix_2.7.1.orig.tar.gz

I go to postfix-2.7.1 dir and I patch:

patch -p1 < patch.x.y.z

everything ok

to rebuild I do:

dpkg-buildpackage -rfakeroot -uc -us

and I've a new postfix package

A question: the dir of postfix (created by system after apt-get source
postfix), is already patched with debian patches? or I need compile debian
patches to that dir?

Thanks and sorry for banal question :-/

Pol


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/358bd8db9825ac6e95a024a83316569e.squir...@fuckaround.org



Re: question about build a package

2013-06-03 Thread Rodolfo García Peñas (kix)


Pol Hallen  escribió:


Hi all! This is my first post :-)

I try to patch postfix and I want be sure that my procedure is correct :-)

apt-get source postfix and I see:

f 215552 Jun  3 13:35 postfix_2.7.1-1+squeeze1.diff.gz
f 1754 Jun  3 13:35 postfix_2.7.1-1+squeeze1.dsc
d 4096 Jun  3 13:35 postfix-2.7.1
f 3418747 Jun  3 13:35 postfix_2.7.1.orig.tar.gz

I go to postfix-2.7.1 dir and I patch:

patch -p1 < patch.x.y.z

everything ok

to rebuild I do:

dpkg-buildpackage -rfakeroot -uc -us

and I've a new postfix package

A question: the dir of postfix (created by system after apt-get source
postfix), is already patched with debian patches? or I need compile debian
patches to that dir?

Thanks and sorry for banal question :-/

Pol


Hi Pol,

probably you should patch the package using "quilt". You have more
info here: http://wiki.debian.org/UsingQuilt and here
http://www.debian.org/doc/manuals/maint-guide/modify.en.html

Cheers,
kix

Rodolfo García Peñas (kix)
http://www.kix.es/


--
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/20130603135506.horde.q4iwh2qoh4u_cunf7xbq...@mail.kix.es



Re: question about build a package

2013-06-03 Thread Pol Hallen
> probably you should patch the package using "quilt". You have more
> info here: http://wiki.debian.org/UsingQuilt and here
> http://www.debian.org/doc/manuals/maint-guide/modify.en.html

hello and thanks for your reply :-)

I read about quilt. Do you know if there is some problem compile the
package like my previous post?

thanks

Pol


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/408d2bc5c0727f5386e93155d1e107d1.squir...@fuckaround.org



Re: question about build a package

2013-06-03 Thread Pol Hallen
> Your question is more on-topic for the debian-mentors list. You might get
> more help there.

ok! I'll subscribe, thanks!

Pol


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/87ff8a38c1a18bffdb5cf93df15ec2ae.squir...@fuckaround.org



Re: question about build a package

2013-06-03 Thread Jonathan Dowland
Hi Pol,

Your question is more on-topic for the debian-mentors list. You might get
more help there.


Thanks


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130603161422.GB20767@debian



Re: Test suite best practices ?

2013-06-03 Thread Xavier Roche
Le 03/06/2013 10:58, Neil Williams a écrit :
> One thing which hasn't been mentioned so far, always ensure that your
> test suite only runs if DEB_BUILD_OPTIONS="nocheck" is *not* set.
> ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
>   # Code to run the package test suite.
> endif

Note that dh_auto_test (which seems to be the canonical way to call
tests during build) actually already checks that:

(...)
if (defined $ENV{DEB_BUILD_OPTIONS} && $ENV{DEB_BUILD_OPTIONS} =~
/nocheck/) {
exit 0;
}


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/51acce52.3040...@httrack.com



Re: question about build a package

2013-06-03 Thread Chris Knadle
On Monday, June 03, 2013 09:55:06, Rodolfo García Peñas (kix) wrote:
> Pol Hallen  escribió:
> > Hi all! This is my first post :-)
> > 
> > I try to patch postfix and I want be sure that my procedure is correct
> > :-)
> > 
> > apt-get source postfix and I see:
> > 
> > f 215552 Jun  3 13:35 postfix_2.7.1-1+squeeze1.diff.gz
> > f 1754 Jun  3 13:35 postfix_2.7.1-1+squeeze1.dsc
> > d 4096 Jun  3 13:35 postfix-2.7.1
> > f 3418747 Jun  3 13:35 postfix_2.7.1.orig.tar.gz
> > 
> > I go to postfix-2.7.1 dir and I patch:
> > 
> > patch -p1 < patch.x.y.z
> > 
> > everything ok
> > 
> > to rebuild I do:
> > 
> > dpkg-buildpackage -rfakeroot -uc -us
> > 
> > and I've a new postfix package
> > 
> > A question: the dir of postfix (created by system after apt-get source
> > postfix), is already patched with debian patches? or I need compile
> > debian patches to that dir?
> > 
> > Thanks and sorry for banal question :-/
> > 
> > Pol
> 
> Hi Pol,
> 
> probably you should patch the package using "quilt".

Unfortunately no: the Postfix source package looks like it's in 1.0 format, so 
there aren't any quilt patches.

  -- Chris

--
Chris Knadle
chris.kna...@coredump.us
GPG Key: 4096R/0x1E759A726A9FDD74


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/201306032248.56937.chris.kna...@coredump.us



Re: question about build a package

2013-06-03 Thread Chris Knadle
On Monday, June 03, 2013 09:11:46, Pol Hallen wrote:
> Hi all! This is my first post :-)
> 
> I try to patch postfix and I want be sure that my procedure is correct :-)

I'd say yes.

> apt-get source postfix and I see:
> 
> f 215552 Jun  3 13:35 postfix_2.7.1-1+squeeze1.diff.gz
> f 1754 Jun  3 13:35 postfix_2.7.1-1+squeeze1.dsc
> d 4096 Jun  3 13:35 postfix-2.7.1
> f 3418747 Jun  3 13:35 postfix_2.7.1.orig.tar.gz
> 
> I go to postfix-2.7.1 dir and I patch:
> 
> patch -p1 < patch.x.y.z
> 
> everything ok
> 
> to rebuild I do:
> 
> dpkg-buildpackage -rfakeroot -uc -us
> 
> and I've a new postfix package

One thing you should seriously consider doing is installing the 'devscripts'
package and adding a changelog entry with 'dch -i' to give your modified
package a newer/different package version number, which will make your
modifed package more easy to distinguish from the postfix package in the
standard Debian archive.

Likewise after installing your package you might want to put the package on
'hold' so that a newer package in the Debian archive won't install over your
version.  Another way to deal with this problem is to make your own personal
Debian repository (I suggest looking at the 'reprepro' package for this),
which gives you an opportunity to set a 'pin priority' for the packages in
your personal repsitory, giving them priority.  (See the apt-preferences(5)
man page for details on this.)

> A question: the dir of postfix (created by system after apt-get source
> postfix), is already patched with debian patches?

Yes in this case (it isn't _always_ the case unfortunately, but the
exceptions are rare).

'apt-get source postfix' patches the source with the package's .diff.gz
(below I'm showing the the version in Debian Sid, rather than Squeeze):

$ apt-get source postfix
Reading package lists... Done
Building dependency tree   
Reading state information... Done
NOTICE: 'postfix' packaging is maintained in the 'Git' version control system 
at:
git://git.debian.org/~lamont/postfix.git
Need to get 4,081 kB of source archives.
Get:1 http://ftp.us.debian.org/debian/ sid/main postfix 2.10.0-3 (dsc) [1,737 B]
Get:2 http://ftp.us.debian.org/debian/ sid/main postfix 2.10.0-3 (tar) [3,827 
kB]
Get:3 http://ftp.us.debian.org/debian/ sid/main postfix 2.10.0-3 (diff) [253 kB]
Fetched 4,081 kB in 1s (2,235 kB/s)
dpkg-source: info: extracting postfix in postfix-2.10.0
dpkg-source: info: unpacking postfix_2.10.0.orig.tar.gz
dpkg-source: info: applying postfix_2.10.0-3.diff.gz
dpkg-source: info: upstream files that have been modified: 
 postfix-2.10.0/Makefile.in
 postfix-2.10.0/conf/main.cf
 postfix-2.10.0/conf/main.cf.tls
 postfix-2.10.0/conf/master.cf
 postfix-2.10.0/conf/postfix-files
 ...  [many other files patched]


The last set of lines above list the upstream postfix files that got patched.

  -- Chris

--
Chris Knadle
chris.kna...@coredump.us
GPG Key: 4096R/0x1E759A726A9FDD74


signature.asc
Description: This is a digitally signed message part.