Bug#398638: w3c-markup-validator: postinst fails

2006-11-19 Thread Frederic Schutz

Hi Lucas,

I have prepared a new revision (0.7.4-1) of the w3c-markup-validator 
package, which is available at


  http://www.mathgen.ch/debian/sib/

I reported a bug against wwwconfig-common (#399115), and a new version 
has been uploaded which allowed me to (hopefully) correct this bug. On 
my machine, piuparts now works (except for the apache symlinks problems).


Would you be able to run piuparts again on the new package ? Note that 
wwwconfig-common 0.0.48 has just been uploaded to unstable, so it may 
not have hit all mirrors yet, in case you are not using the main Debian 
repository.


Cheers,

Fred.


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#398638: w3c-markup-validator: postinst fails

2006-11-17 Thread Frederic Schutz

Steve Langasek wrote:


Your postinst runs under set -e, as it should, and then it sources
/usr/share/wwwconfig-common/restart.sh (it does *not* execute it).   That
means any non-zero exit codes from restart.sh are going to propagate and
result in the shell (i.e., the postinst) exiting non-zero.

You may be able to address this by checking the return value of the source
command, e.g.:

if ! . /usr/share/wwwconfig-common/restart.sh ; then
handle_the_error
fi


Almost there...

This does not work, as far as I can tell, because the sourced file also 
runs under set -e; so if it exits at some point, postinst is doomed 
and can not do any error handling. And restart.sh actually execute 
/etc/init.d/apache2, which fails, and so postinst fails too.


The problem is probably in restart.sh, which should wrap the call with 
the if ! ... fi, and then if it fails, return an error to postinst 
(through an environment variable).


I could 1) submit a new bug against wwwconfig-common, and then 2) modify 
my postinst so that it checks for a reported error from restart.sh and 
handles it.


Is there any better solution ?

Thanks for the help,

Frédéric




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#398638: w3c-markup-validator: postinst fails

2006-11-16 Thread Steve Langasek
On Fri, Nov 17, 2006 at 01:21:39AM +0100, Frederic Schutz wrote:
 Here is where I am with this bug.

 postinst calls /usr/share/wwwconfig-common/restart.sh, which itself
 calls /etc/init.d/apache2 restart.

 If the restart fails with exit value != 0, the execution of the scripts
 stops, thus making postinst fail.

 If I replace /usr/share/wwwconfig-common/restart.sh by a single call to
 an external script which contains only a line exit 1, postinst will
 fail; with exit 0, it will work.

 I would think that if the external script exits with return value 1,
 /usr/share/wwwconfig-common/restart.sh would get this return value and
 continue its execution, but no, it never gets an opportunity to continue
 executing -- which means that postinst will not be able to continue
 executing, and it will look like it failed.

 I am maybe missing something simple here, but I have not been able to
 reproduce this behaviour outside of postinst -- everytime the external
 script exits with value 1, return.sh just continue executing normally.
 Any help ?

Your postinst runs under set -e, as it should, and then it sources
/usr/share/wwwconfig-common/restart.sh (it does *not* execute it).   That
means any non-zero exit codes from restart.sh are going to propagate and
result in the shell (i.e., the postinst) exiting non-zero.

You may be able to address this by checking the return value of the source
command, e.g.:

if ! . /usr/share/wwwconfig-common/restart.sh ; then
handle_the_error
fi

Cheers,
-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
[EMAIL PROTECTED]   http://www.debian.org/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#398638: w3c-markup-validator: postinst fails

2006-11-15 Thread Frederic Schutz
So I have installed piuparts and have done several attempts at testing
the package with a bit of debugging.

I got two kind of failures. One of them seems to happen if postinst is
not able to restart the web server; in this case, the script

  . /usr/share/wwwconfig-common/restart.sh

is called from postinst but seem to die, causing the error.

In other cases (both on my machine and on a remote piuparts service),
w3c-markup-validator works well, but the deinstallation (purge) of
apache2 does not work because of broken symlinks.

I'll try to look a bit more into it.

Frederic




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#398638: w3c-markup-validator: postinst fails

2006-11-15 Thread Lucas Nussbaum
On 15/11/06 at 09:03 +0100, Frederic Schutz wrote:
 So I have installed piuparts and have done several attempts at testing
 the package with a bit of debugging.
 
 I got two kind of failures. One of them seems to happen if postinst is
 not able to restart the web server; in this case, the script
 
   . /usr/share/wwwconfig-common/restart.sh
 
 is called from postinst but seem to die, causing the error.

Have you been able to reproduce this outside of piuparts ? I tried to,
but I really can't :-( I don't know what goes wrong inside piuparts.

I modified piuparts so that it displays the debconf values for the
package after installation:
0m22.1s DEBUG: Starting command: ['chroot', '/tmp/tmpDYXi8R',
'debconf-show', 'w3c-markup-validator']
0m22.2s DUMP: 
w3c-markup-validator/webserver: Apache2

I dunno if that helps you.


 In other cases (both on my machine and on a remote piuparts service),
 w3c-markup-validator works well, but the deinstallation (purge) of
 apache2 does not work because of broken symlinks.
 
 I'll try to look a bit more into it.

If the only error reported by piuparts is related to broken symlinks,
then I think it's safe to ignore it (and you can close this bug).

Sorry for the noise, and thank you for your time.
-- 
| Lucas Nussbaum
| [EMAIL PROTECTED]   http://www.lucas-nussbaum.net/ |
| jabber: [EMAIL PROTECTED] GPG: 1024D/023B3F4F |


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#398638: w3c-markup-validator: postinst fails

2006-11-15 Thread Frederic Schutz

Lucas Nussbaum wrote:


Have you been able to reproduce this outside of piuparts ? I tried to,
but I really can't :-( I don't know what goes wrong inside piuparts.


Yes: for example, if I stop apache2, and start another process that 
binds to port 80 (thus preventing the start of apache2), then postinst 
fails when calling the script I mentioned in my previous email. I have 
to look in more details at how the script is called and what it returns 
(or does not return).


I am not sure what is the correct way for the script to run; 
intuitively, posting should _try_ to call the apache2 restart script; if 
this fails, then postinst should notice it but maybe not return an error 
-- after all, the installation of the package itself went ok, and it 
cannot be held responsible for other programs' failure. But maybe there 
is a smarter way to handle this.



I modified piuparts so that it displays the debconf values for the
package after installation:
0m22.1s DEBUG: Starting command: ['chroot', '/tmp/tmpDYXi8R',
'debconf-show', 'w3c-markup-validator']
0m22.2s DUMP: 
w3c-markup-validator/webserver: Apache2


I dunno if that helps you.


It looks correct.


If the only error reported by piuparts is related to broken symlinks,
then I think it's safe to ignore it (and you can close this bug).


If the restart of the server works ok, then indeed, this is the only error.

Frédéric


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#398638: w3c-markup-validator: postinst fails

2006-11-14 Thread Lucas Nussbaum
Package: w3c-markup-validator
Version: 0.7.3-1
Severity: serious
Usertags: grid5000

Hi,

During a piuparts run over all the packages in etch, I ran into a
problem with your package:
  Setting up w3c-markup-validator (0.7.3-1) ...
  dpkg: error processing w3c-markup-validator (--configure):
   subprocess post-installation script returned error exit status 1

It's reproducible within piuparts, but I couldn't reproduce it inside a
chroot. Needs more investigation.

The full log is available from 
http://ox.blop.info/bazaar/buildlogs/20061114/

The piuparts run was done on about 40 AMD64 nodes of the Grid'5000
platform, using a clean chroot containing an etch i386 environment
(not unstable).  Internet was not accessible from the build systems.

About Grid'5000:
Grid'5000 is an highly reconfigurable experimental Grid platform
gathering 9 sites and featuring a total of 5000 CPUs. It serves as a
testbed for research in Grid Computing. See https://www.grid5000.fr/
-- 
| Lucas Nussbaum
| [EMAIL PROTECTED]   http://www.lucas-nussbaum.net/ |
| jabber: [EMAIL PROTECTED] GPG: 1024D/023B3F4F |


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#398638: w3c-markup-validator: postinst fails

2006-11-14 Thread Lucas Nussbaum
On 14/11/06 at 18:53 +0100, Frederic Schutz wrote:
 Lucas Nussbaum wrote:
 
 Hi,
 
 During a piuparts run over all the packages in etch, I ran into a
 problem with your package:
   Setting up w3c-markup-validator (0.7.3-1) ...
   dpkg: error processing w3c-markup-validator (--configure):
subprocess post-installation script returned error exit status 1
 
 It's reproducible within piuparts, but I couldn't reproduce it inside a
 chroot. Needs more investigation.
 
 I will try to investigate, although I have not much experience with 
 piuparts, and so have no idea what could make a difference.
 
 However, given that the package can be built inside a chroot, indicating 
 that the bug is really some kind of strange interaction between piuparts 
 and the package, I think that the severity can be lowered to 
 important, if you agree -- especially given how close we are to 
 releasing Etch, and the fact that a normal build works so that this 
 bug is not a practical problem for Etch.

Hi,

Please note that piuparts tests packages installation, not building.

The bug is likely to be caused by a missing depend/pre-depend. I'll try
to investigate it: please don't lower the priority for now, since it's
likely that somebody else will find some time to work on it.

If the bug stays open for 4 or 5 days, and the release team agrees, I
have nothing against downgrading it.

Lucas


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#398638: w3c-markup-validator: postinst fails

2006-11-14 Thread Frederic Schutz

Lucas Nussbaum wrote:

Hi,


During a piuparts run over all the packages in etch, I ran into a
problem with your package:
  Setting up w3c-markup-validator (0.7.3-1) ...
  dpkg: error processing w3c-markup-validator (--configure):
   subprocess post-installation script returned error exit status 1

It's reproducible within piuparts, but I couldn't reproduce it inside a
chroot. Needs more investigation.


I will try to investigate, although I have not much experience with 
piuparts, and so have no idea what could make a difference.


However, given that the package can be built inside a chroot, indicating 
that the bug is really some kind of strange interaction between piuparts 
and the package, I think that the severity can be lowered to 
important, if you agree -- especially given how close we are to 
releasing Etch, and the fact that a normal build works so that this 
bug is not a practical problem for Etch.


Frédéric


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#398638: w3c-markup-validator: postinst fails

2006-11-14 Thread Frederic Schutz
Lucas Nussbaum wrote:

 Please note that piuparts tests packages installation, not building.

Sorry, I knew that but completely mixed everything.


 The bug is likely to be caused by a missing depend/pre-depend. I'll try
 to investigate it: please don't lower the priority for now, since it's
 likely that somebody else will find some time to work on it.

 If the bug stays open for 4 or 5 days, and the release team agrees, I
 have nothing against downgrading it.

Ok.

Cheers,

Frederic



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#398638: w3c-markup-validator: postinst fails

2006-11-14 Thread Frederic Schutz
Lucas Nussbaum wrote:

 The bug is likely to be caused by a missing depend/pre-depend. I'll try
 to investigate it: please don't lower the priority for now, since it's
 likely that somebody else will find some time to work on it.

I am installing piuparts and will look into it.

Thanks,

Frederic


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]