Re: Re: Bug#575938: ITP: dh-autoreconf -- debhelper add-on to call autoreconf and clean up after the build

2010-04-01 Thread Fabian Greffrath

It seems that we could also read the requested versions of automake and
autoconf from debian/control and export them automatically using:

[...]

Does this sound like a good idea?


IMHO this sounds like a very good idea.

Consequently, dh_autoreconf should become a no-op if autoconf is 
missing from the build-depends (how about automake and autopoint?). 
Similarly, the LIBTOOLIZE variable should be set to true is libtool 
is missing from the build-depends. In any case, dh-autoreconf should 
be *verbose* about what it does or does not (and maybe even call 
autoreconf with the '-v' parameter to achieve more meaningful logs).


 - Fabian


--
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/4bb461fb.4020...@leat.rub.de



Re: Bug#575938: ITP: dh-autoreconf -- debhelper add-on to call autoreconf and clean up after the build

2010-03-31 Thread Paul Wise
On Wed, Mar 31, 2010 at 1:03 AM, Julian Andres Klode j...@debian.org wrote:

   Description     : debhelper add-on to call autoreconf and clean up after 
 the build

 Package: dh-autoreconf

I'd suggest just putting this into debhelper rather than making it a
separate package.

-- 
bye,
pabs

http://wiki.debian.org/PaulWise


--
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/t2he13a36b31003302307t5202749asd2adbe6e342eb...@mail.gmail.com



Re: Bug#575938: ITP: dh-autoreconf -- debhelper add-on to call autoreconf and clean up after the build

2010-03-31 Thread Stefano Zacchiroli
On Wed, Mar 31, 2010 at 02:07:31PM +0800, Paul Wise wrote:
  Package: dh-autoreconf
 I'd suggest just putting this into debhelper rather than making it a
 separate package.

Seconded. The addons looks quite general, I don't see the point of
having it in a separate package.

Cheers.

-- 
Stefano Zacchiroli -o- PhD in Computer Science \ PostDoc @ Univ. Paris 7
z...@{upsilon.cc,pps.jussieu.fr,debian.org} -- http://upsilon.cc/zack/
Dietro un grande uomo c'è ..|  .  |. Et ne m'en veux pas si je te tutoie
sempre uno zaino ...| ..: | Je dis tu à tous ceux que j'aime


signature.asc
Description: Digital signature


Re: Bug#575938: ITP: dh-autoreconf -- debhelper add-on to call autoreconf and clean up after the build

2010-03-31 Thread Julian Andres Klode
On Wed, Mar 31, 2010 at 02:07:31PM +0800, Paul Wise wrote:
 On Wed, Mar 31, 2010 at 1:03 AM, Julian Andres Klode j...@debian.org wrote:
 
    Description     : debhelper add-on to call autoreconf and clean up after 
  the build
 
  Package: dh-autoreconf
 
 I'd suggest just putting this into debhelper rather than making it a
 separate package.

Well, Joey wrote the following:

 Regarding including these commands in debhelper, I am uncertian because
 these commands would not be included in the default dh sequences, or the
 example rules files, and that would be a first -- currently every
 command in debhelper is included in the dh sequences and all except dh_auto_*
 are included in the longer example rules files.
 
 Adding an optional command to debhelper that likely does not do the
 right thing for a fairly large percentage of packages (my experience
 with running autoreconf and having it actually work, in the real world,
 is not exactly stellar) would be a departure.

-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.


pgpDdmQXsVJhe.pgp
Description: PGP signature


Re: Bug#575938: ITP: dh-autoreconf -- debhelper add-on to call autoreconf and clean up after the build

2010-03-31 Thread Julian Andres Klode
On Wed, Mar 31, 2010 at 03:13:14PM +0200, Mehdi Dogguy wrote:
 Paul Wise wrote:
  On Wed, Mar 31, 2010 at 1:03 AM, Julian Andres Klode j...@debian.org 
  wrote:
  
Description : debhelper add-on to call autoreconf and clean up 
  after the build
 
  Package: dh-autoreconf
  
  I'd suggest just putting this into debhelper rather than making it a
  separate package.
  
 
 Is there any advantage to have it packaged?
 
 AIUI, you have to add a build-dependency anyway and change at least one
 line in the debian/rules to call dh-autoreconf. Well, that line could
 simply call autoreconf (or whatever) which even makes debian/rules clearer.

The difference is that dh_autoreconf calls autoreconf and stores a list
of the changes and the changed files are then removed in the clean
target. If you just call autoreconf, the changes end up in the diff;
and this is not what we want.

BTW; The code is now available at
  http://git.debian.org/?p=collab-maint/dh-autoreconf.git
and also features a CDBS rule for those maintainers still
using it and a --mode parameter with a 'timesize' mode to
use size+timestamp instead of an md5sum to detect changes.

-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.


pgpVgB1XevI8j.pgp
Description: PGP signature


Re: Bug#575938: ITP: dh-autoreconf -- debhelper add-on to call autoreconf and clean up after the build

2010-03-31 Thread Mehdi Dogguy
Paul Wise wrote:
 On Wed, Mar 31, 2010 at 1:03 AM, Julian Andres Klode j...@debian.org wrote:
 
   Description : debhelper add-on to call autoreconf and clean up after 
 the build

 Package: dh-autoreconf
 
 I'd suggest just putting this into debhelper rather than making it a
 separate package.
 

Is there any advantage to have it packaged?

AIUI, you have to add a build-dependency anyway and change at least one
line in the debian/rules to call dh-autoreconf. Well, that line could
simply call autoreconf (or whatever) which even makes debian/rules clearer.

Cheers,

-- 
Mehdi Dogguy مهدي الدڤي
me...@{dogguy.org,debian.org}


-- 
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/4bb34a6a.3050...@debian.org



Re: Bug#575938: ITP: dh-autoreconf -- debhelper add-on to call autoreconf and clean up after the build

2010-03-31 Thread Mehdi Dogguy
Julian Andres Klode wrote:
 On Wed, Mar 31, 2010 at 03:13:14PM +0200, Mehdi Dogguy wrote:
 Paul Wise wrote:
 On Wed, Mar 31, 2010 at 1:03 AM, Julian Andres Klode j...@debian.org 
 wrote:

   Description : debhelper add-on to call autoreconf and clean up 
 after the build

 Package: dh-autoreconf
 I'd suggest just putting this into debhelper rather than making it a
 separate package.

 Is there any advantage to have it packaged?

 AIUI, you have to add a build-dependency anyway and change at least one
 line in the debian/rules to call dh-autoreconf. Well, that line could
 simply call autoreconf (or whatever) which even makes debian/rules clearer.
 
 The difference is that dh_autoreconf calls autoreconf and stores a list
 of the changes and the changed files are then removed in the clean
 target. If you just call autoreconf, the changes end up in the diff;
 and this is not what we want.
 

I do use autoreconf and I don't have these changes in my diff.

IMO, a backup/restore script (where you specify the list of files to
backup) may be more useful. It would be called before build and when cleaning.

Cheers,

-- 
Mehdi Dogguy مهدي الدڤي
http://dogguy.org/


-- 
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/4bb351ea.3000...@dogguy.org



Re: Bug#575938: ITP: dh-autoreconf -- debhelper add-on to call autoreconf and clean up after the build

2010-03-31 Thread Benjamin Drung
Am Mittwoch, den 31.03.2010, 15:45 +0200 schrieb Mehdi Dogguy:
 Julian Andres Klode wrote:
  On Wed, Mar 31, 2010 at 03:13:14PM +0200, Mehdi Dogguy wrote:
  Paul Wise wrote:
  On Wed, Mar 31, 2010 at 1:03 AM, Julian Andres Klode j...@debian.org 
  wrote:
 
Description : debhelper add-on to call autoreconf and clean up 
  after the build
 
  Package: dh-autoreconf
  I'd suggest just putting this into debhelper rather than making it a
  separate package.
 
  Is there any advantage to have it packaged?
 
  AIUI, you have to add a build-dependency anyway and change at least one
  line in the debian/rules to call dh-autoreconf. Well, that line could
  simply call autoreconf (or whatever) which even makes debian/rules clearer.
  
  The difference is that dh_autoreconf calls autoreconf and stores a list
  of the changes and the changed files are then removed in the clean
  target. If you just call autoreconf, the changes end up in the diff;
  and this is not what we want.
  
 
 I do use autoreconf and I don't have these changes in my diff.
 
 IMO, a backup/restore script (where you specify the list of files to
 backup) may be more useful. It would be called before build and when cleaning.

I prefer the removal over the restoring the old files. You remove .o
files on clean, so why not remove the other auto-generated files on
clean?

-- 
Benjamin Drung
Ubuntu Developer (www.ubuntu.com) | Debian Maintainer (www.debian.org)


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: Bug#575938: ITP: dh-autoreconf -- debhelper add-on to call autoreconf and clean up after the build

2010-03-31 Thread Julian Andres Klode
On Wed, Mar 31, 2010 at 03:45:14PM +0200, Mehdi Dogguy wrote:
 Julian Andres Klode wrote:
  On Wed, Mar 31, 2010 at 03:13:14PM +0200, Mehdi Dogguy wrote:
  Paul Wise wrote:
  On Wed, Mar 31, 2010 at 1:03 AM, Julian Andres Klode j...@debian.org 
  wrote:
 
Description : debhelper add-on to call autoreconf and clean up 
  after the build
 
  Package: dh-autoreconf
  I'd suggest just putting this into debhelper rather than making it a
  separate package.
 
  Is there any advantage to have it packaged?
 
  AIUI, you have to add a build-dependency anyway and change at least one
  line in the debian/rules to call dh-autoreconf. Well, that line could
  simply call autoreconf (or whatever) which even makes debian/rules clearer.
  
  The difference is that dh_autoreconf calls autoreconf and stores a list
  of the changes and the changed files are then removed in the clean
  target. If you just call autoreconf, the changes end up in the diff;
  and this is not what we want.
  
 
 I do use autoreconf and I don't have these changes in my diff.
A 'debuild; debuild' should have a different result than a single
debuild then. If you build from a clean directory, the first build
will contain no changes. But after the build, the directory is not
clean anymore and debian/rules clean does not do enough to keep the
changes from appearing in the source package if you build again.

 
 IMO, a backup/restore script (where you specify the list of files to
 backup) may be more useful. It would be called before build and when cleaning.
I don't think so, it requires you to keep track of the files
and you may miss some.

-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.


pgpmgpo89uZbA.pgp
Description: PGP signature


Re: Bug#575938: ITP: dh-autoreconf -- debhelper add-on to call autoreconf and clean up after the build

2010-03-31 Thread Vincent Danjean
On 31/03/2010 15:45, Mehdi Dogguy wrote:
 I do use autoreconf and I don't have these changes in my diff.

  Do you remove the modified files in your clean target ? (removed files will be
ignored when creating the diff but you need to list them explicitely in
debian/rules: this is what I do currently)
  Or do you never build your package twice in a row (ie called dpkg-buildpackage
twice in the same directory) ?

 IMO, a backup/restore script (where you specify the list of files to
 backup) may be more useful. It would be called before build and when cleaning.

  The proposed solution avoid to explicitely list the modified files and
avoid a backup of the full source tree.

  Regards,
Vincent

 Cheers,
 


-- 
Vincent Danjean   GPG key ID 0x9D025E87 vdanj...@debian.org
GPG key fingerprint: FC95 08A6 854D DB48 4B9A  8A94 0BF7 7867 9D02 5E87
Unofficial packages: http://moais.imag.fr/membres/vincent.danjean/deb.html
APT repo:  deb http://perso.debian.org/~vdanjean/debian unstable main


-- 
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/4bb35553.7030...@free.fr



Re: Bug#575938: ITP: dh-autoreconf -- debhelper add-on to call autoreconf and clean up after the build

2010-03-31 Thread Raphael Hertzog
On Wed, 31 Mar 2010, Julian Andres Klode wrote:
  IMO, a backup/restore script (where you specify the list of files to
  backup) may be more useful. It would be called before build and when 
  cleaning.
 I don't think so, it requires you to keep track of the files
 and you may miss some.

OTOH, such a dh_backup could be integrated in debhelper since it would be
a no-op unless you provide a list of files to backup/restore (and hence
could be integrated in the default sequence without creating problems).

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-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20100331142841.gb2...@rivendell



Re: Bug#575938: ITP: dh-autoreconf -- debhelper add-on to call autoreconf and clean up after the build

2010-03-31 Thread Mehdi Dogguy
Julian Andres Klode wrote:
 A 'debuild; debuild' should have a different result than a single
 debuild then. If you build from a clean directory, the first build
 will contain no changes. But after the build, the directory is not
 clean anymore and debian/rules clean does not do enough to keep the
 changes from appearing in the source package if you build again.
 

I should have done that earlier (but didn't see the git repo, only now). I
had a look at dh-autoreconf's code and the difference between what I do
and what your script does is that I manually specify a list of files to
monitor while you monitor all files.

IMO, dh-autoreconf may be not specific to autoreconf but all same kind of
tools and thus, can be enhanced by making, for example, the command to
execute an argument which could be the command true (and keep
autoreconf as a default) because, sometimes, it may be needed to make
debian/autoreconf.after a bit later than just after executing
autoreconf. Hopefully, we can do that by overriding the file.

If you have these options, dh-autoreconf becomes nothing more than a call
to autoreconf if we have dh_backup (name proposed by buxy in the same
thread). dh_backup can be integrated to debhelper and all that remains to
be done is a call to autoreconf (depending on the implementation of
dh_backup).

-- 
Mehdi Dogguy مهدي الدڤي
http://dogguy.org/


-- 
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/4bb36028.7020...@dogguy.org



Re: Bug#575938: ITP: dh-autoreconf -- debhelper add-on to call autoreconf and clean up after the build

2010-03-31 Thread Julian Andres Klode
On Wed, Mar 31, 2010 at 04:46:00PM +0200, Mehdi Dogguy wrote:
 Julian Andres Klode wrote:
  A 'debuild; debuild' should have a different result than a single
  debuild then. If you build from a clean directory, the first build
  will contain no changes. But after the build, the directory is not
  clean anymore and debian/rules clean does not do enough to keep the
  changes from appearing in the source package if you build again.
  
 
 I should have done that earlier (but didn't see the git repo, only now). I
 had a look at dh-autoreconf's code and the difference between what I do
 and what your script does is that I manually specify a list of files to
 monitor while you monitor all files.
 
 IMO, dh-autoreconf may be not specific to autoreconf but all same kind of
 tools and thus, can be enhanced by making, for example, the command to
 execute an argument which could be the command true (and keep
 autoreconf as a default) because, sometimes, it may be needed to make
 debian/autoreconf.after a bit later than just after executing
 autoreconf. Hopefully, we can do that by overriding the file.

The idea is that I want to keep debian/autoreconf.{before,after}
only related to the autoreconf run.


 If you have these options, dh-autoreconf becomes nothing more than a call
 to autoreconf if we have dh_backup (name proposed by buxy in the same
 thread). dh_backup can be integrated to debhelper and all that remains to
 be done is a call to autoreconf (depending on the implementation of
 dh_backup).
A backup and restore approach is a completely different and more
complicated (in I/O sense) way than just deleting the files; e.g.
for a single file:

  dh_backup:
   1. mkdir()  - Create the backup directory
   2. read()   - Read the original source
   3. write()  - Write the backup file
   4. rename() - Rename backup to source

  dh_autoreconf:
   1. read()   - Create md5sum before (unneeded if --mode=timesize)
   2. read()   - Create md5sum after (unneded if --mode=timesize)
   3. unlink() - Unlink the changed file

Furthermore, the second read() in dh_autoreconf could also be in
the cache already.

-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.


pgpIEcWQ493Ey.pgp
Description: PGP signature


Re: Bug#575938: ITP: dh-autoreconf -- debhelper add-on to call autoreconf and clean up after the build

2010-03-31 Thread Mehdi Dogguy
Julian Andres Klode wrote:
 A backup and restore approach is a completely different and more
 complicated (in I/O sense) way than just deleting the files; e.g.
 for a single file:
 

… except that they do not operate on the same set of files. dh_backup's
list would be a lot smaller than dh_autoreconf's one. Besides, dh_backup
(or whatever its name is) could also delete files upon request (dh_backup
--remove would then be dh_autoreconf minus autoreconf).

   dh_backup:
1. mkdir()  - Create the backup directory

you can use then debian/ directory here (provided you add a suffix to
backup's name). And, dh_autoreconf also creates a directory for excluded
files (if any). So, I don't think that this part is really relevant for
the comparison.

I think that all arguments in favour or against have been mentioned. I
don't have anything to add. If it really makes you happy to have this
package, then so be it :)

Cheers,

-- 
Mehdi Dogguy مهدي الدڤي
http://dogguy.org/


-- 
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/4bb37759.3070...@dogguy.org



Re: Bug#575938: ITP: dh-autoreconf -- debhelper add-on to call autoreconf and clean up after the build

2010-03-31 Thread Axel Beckert
Julian Andres Klode wrote:
  Is there any advantage to have it packaged?
  
  AIUI, you have to add a build-dependency anyway and change at least one
  line in the debian/rules to call dh-autoreconf. Well, that line could
  simply call autoreconf (or whatever) which even makes debian/rules clearer.
 
 The difference is that dh_autoreconf calls autoreconf and stores a list
 of the changes and the changed files are then removed in the clean
 target. If you just call autoreconf, the changes end up in the diff;
 and this is not what we want.

Indeed.

I recently just implemented a similar but less sophisticated feature
for one of my packages by more or less copying away all relevant files
and restoring them in the clean target.

I'd really like to see such a feature in Debian!

Regards, Axel
-- 
 ,''`.  |  Axel Beckert a...@debian.org, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE
  `-|  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5


-- 
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/20100331195526.gy3...@sym.noone.org



Bug#575938: ITP: dh-autoreconf -- debhelper add-on to call autoreconf and clean up after the build

2010-03-30 Thread Julian Andres Klode
Package: wnpp
Severity: wishlist
Owner: Julian Andres Klode j...@debian.org

* Package name: dh-autoreconf
  Version : 1
  Upstream Author : Julian Andres Klode j...@debian.org
* License : GPL-2
  Programming Lang: Perl
  Description : debhelper add-on to call autoreconf and clean up after the 
build

Package: dh-autoreconf
Architecture: all
Depends: ${misc:Depends}, autoconf, automake | automaken, libtool
Description: debhelper add-on to call autoreconf and clean up after the build
 dh-autoreconf provides a debhelper sequence addon named 'autoreconf' and two
 commands, dh_autoreconf and dh_autoreconf_clean.
 .
 The dh_autoreconf command creates a list of the files and their checksums,
 calls autoreconf and then creates a second list for the new files.
 .
 The dh_autoreconf_clean command compares these two lists and removes all
 files which have been added or changed (files may be excluded if needed).

I am using this inside the gnome-main-menu package and it works perfectly,
although a bit slow because it creates md5sums of the whole source tree
two times (I may add an option to use timestamp+size instead for larger
source packages).

(Please note that I'm not subscribed to debian-devel, so please keep the
 bug report or me in To/CC)
-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.


pgpiCkN7pPfBk.pgp
Description: PGP signature


Re: Bug#575938: ITP: dh-autoreconf -- debhelper add-on to call autoreconf and clean up after the build

2010-03-30 Thread Julian Andres Klode
On Tue, Mar 30, 2010 at 06:15:26PM +0200, Julian Andres Klode wrote:
 Package: wnpp
 Severity: wishlist
 Owner: Julian Andres Klode j...@debian.org
 
 * Package name: dh-autoreconf
   Version : 1
   Upstream Author : Julian Andres Klode j...@debian.org
 * License : GPL-2
   Programming Lang: Perl
   Description : debhelper add-on to call autoreconf and clean up after 
 the build
 
 Package: dh-autoreconf
 Architecture: all
 Depends: ${misc:Depends}, autoconf, automake | automaken, libtool
 Description: debhelper add-on to call autoreconf and clean up after the build
  dh-autoreconf provides a debhelper sequence addon named 'autoreconf' and two
  commands, dh_autoreconf and dh_autoreconf_clean.
  .
  The dh_autoreconf command creates a list of the files and their checksums,
  calls autoreconf and then creates a second list for the new files.
  .
  The dh_autoreconf_clean command compares these two lists and removes all
  files which have been added or changed (files may be excluded if needed).
 
 I am using this inside the gnome-main-menu package and it works perfectly,
 although a bit slow because it creates md5sums of the whole source tree
 two times (I may add an option to use timestamp+size instead for larger
 source packages).
 

It seems that we could also read the requested versions of automake and
autoconf from debian/control and export them automatically using:

 # Setup the environment for autoreconf to run the correct versions
 sub program {
 my $program=shift;
 my $version=;
 open (CONTROL, 'debian/control') ||
 error(cannot read debian/control: $!\n);

 foreach my $builddeps (join('', CONTROL) =~ 
 /^Build-Depends[^:]*:.*\n(?:^[^\w\n].*\n)*/gmi) {
 while ($builddeps =~ /$program([0-9.]+)/g) {
 error(Multiple versions of $program requested ($version, $1)) if
  ($version ne );
 $version=$1;
 }
 }
 close CONTROL;
 return $version eq  ? $program : $program.-.$version;
 }

 $ENV{AUTOCONF} = program(autoconf) if not defined $ENV{AUTOCONF};
 $ENV{AUTOHEADER} = program(autoconf) if not defined $ENV{AUTOHEADER};
 $ENV{ACLOCAL} = program(automake) if not defined $ENV{ACLOCAL};
 $ENV{AUTOMAKE} = program(automake) if not defined $ENV{AUTOMAKE};

Does this sound like a good idea?

-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.


pgpMrSZitMydV.pgp
Description: PGP signature