Bug#604855: unblock: shibboleth-sp2/2.3.1+dfsg-3

2010-11-26 Thread Ferenc Wagner
Russ Allbery r...@debian.org writes:

 Ferenc Wagner wf...@niif.hu writes:

 Russ Allbery r...@debian.org writes:

 Ferenc Wagner wf...@niif.hu writes:

 Maybe invoke-rc.d --quiet apache2 restart || [ $? -eq 100 ] ?

 Ah, that's a good idea.  I didn't realize invoke-rc.d had a special
 exit status for a missing script.

 But anyway, can the Shibboleth module be enabled when Apache isn't
 installed?  The restart is already protected by this check:

 if [ -f /etc/apache2/mods-enabled/shib2.load ] ; then
 invoke-rc.d apache2 restart
 fi

 I think it can if Apache is then removed (but not purged)

Sure, but this isn't a problem, because if /etc/apache2/mods-enabled is
present, then /etc/init.d/apache2 is also present[1], and quietly
returns success if the actual daemon is not installed.

[1] Well, at least they belong to the same package, but they are under
/etc, so may be freely changed by the system administrator.  I don't
think we should care for such pathologic cases.

Michael Biebl bi...@debian.org writes:

 the apache init script already has a status method, why don't you use

 invoke-rc.d apache2 status /dev/null 21  invoke-rc.d apache2 restart

I like this idea.  Any objections against the following code?

if [ -f /etc/apache2/mods-enabled/shib2.load ] ; then
if invoke-rc.d apache2 status /dev/null ; then
invoke-rc.d apache2 restart
fi
fi

I decided to swap s for readability and || true for keeping the exit
status of the restart operation should we decide to actually try that.
-- 
Thanks,
Feri.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#604855: unblock: shibboleth-sp2/2.3.1+dfsg-3

2010-11-26 Thread Mehdi Dogguy

On 26/11/2010 16:57, Ferenc Wagner wrote:


Michael Bieblbi...@debian.org  writes:


the apache init script already has a status method, why don't you use

invoke-rc.d apache2 status/dev/null 21  invoke-rc.d apache2 restart


I like this idea.  Any objections against the following code?

 if [ -f /etc/apache2/mods-enabled/shib2.load ] ; then
 if invoke-rc.d apache2 status/dev/null ; then
 invoke-rc.d apache2 restart
 fi
 fi



It's fine for me (if it matters).

Regards,

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



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#604855: unblock: shibboleth-sp2/2.3.1+dfsg-3

2010-11-25 Thread Ferenc Wagner
Russ Allbery r...@debian.org writes:

 Ferenc Wagner wf...@niif.hu writes:

 Maybe invoke-rc.d --quiet apache2 restart || [ $? -eq 100 ] ?

 Ah, that's a good idea.  I didn't realize invoke-rc.d had a special
 exit status for a missing script.

But anyway, can the Shibboleth module be enabled when Apache isn't
installed?  The restart is already protected by this check:

if [ -f /etc/apache2/mods-enabled/shib2.load ] ; then
invoke-rc.d apache2 restart
fi
-- 
Thanks,
Feri.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#604855: unblock: shibboleth-sp2/2.3.1+dfsg-3

2010-11-25 Thread Teodor MICU
Hi,

2010/11/25 Russ Allbery r...@debian.org:
 Ah, hm, that's a good point.  I hadn't thought about that, since the old
 Shibboleth modules depended on Apache.  But the current packages only
 recommend.

 I'm not sure the best way to do this.  Check for whether apache2.2-common
 is installed, since it contains the init script?  (Checking for the
 existence of the init script may be a lurking bug later for upstart
 systems, file-rc, systemd, etc.)  Alternately, we could just ignore
 failures on the invoke-rc.d command to restart Apache.

 Does anyone have any suggestions about the best approach?

The intended behavior is to restart Apache only if is running. It must
not be started if it is stopped or not even available. It does matter
if the module is enabled, but only if Apache is also running.

I see at least two possible implementations:
1) use the 'status_of_proc' LSB function (there are many init scripts
doing this for the status command);
2) check if there is any Apache process running:
  # pidof apache2  /dev/null  invoke-rc.d apache2 restart

Thanks



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#604855: unblock: shibboleth-sp2/2.3.1+dfsg-3

2010-11-25 Thread Russ Allbery
Ferenc Wagner wf...@niif.hu writes:
 Russ Allbery r...@debian.org writes:
 Ferenc Wagner wf...@niif.hu writes:

 Maybe invoke-rc.d --quiet apache2 restart || [ $? -eq 100 ] ?

 Ah, that's a good idea.  I didn't realize invoke-rc.d had a special
 exit status for a missing script.

 But anyway, can the Shibboleth module be enabled when Apache isn't
 installed?  The restart is already protected by this check:

 if [ -f /etc/apache2/mods-enabled/shib2.load ] ; then
 invoke-rc.d apache2 restart
 fi

I think it can if Apache is then removed (but not purged), but someone
else also pointed out that we don't want to restart Apache if it's not
running, which would also take care of the problem of ensuring Apache is
installed.  I'll forward that message along.

-- 
Russ Allbery (r...@debian.org)   http://www.eyrie.org/~eagle/



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#604855: unblock: shibboleth-sp2/2.3.1+dfsg-3

2010-11-25 Thread Michael Biebl
On 25.11.2010 13:13, Teodor MICU wrote:
 
 I see at least two possible implementations:
 1) use the 'status_of_proc' LSB function (there are many init scripts
 doing this for the status command);
 2) check if there is any Apache process running:
   # pidof apache2  /dev/null  invoke-rc.d apache2 restart

the apache init script already has a status method, why don't you use

invoke-rc.d apache2 status /dev/null 21  invoke-rc.d apache2 restart

(and possibly ignoring any errors by appending || true)

pidof has the downside that it will check for all processes named apache2.
This means you don't necessarily get the correct result.

Michael
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#604855: unblock: shibboleth-sp2/2.3.1+dfsg-3

2010-11-24 Thread Russ Allbery
Package: release.debian.org
Severity: normal
User: release.debian@packages.debian.org
Usertags: unblock

Please unblock package shibboleth-sp2.  This package includes both a
daemon and an Apache module, and those need to be in sync following an
upgrade or strange problems can result.  This version adds code to
postinst to restart Apache after upgrading the Apache module so that
the newly restarted shibd daemon will match the Apache module.

Changelog:

  [ Ferenc Wagner ]
  * Restart Apache from the postinst script if the shib2 module is enabled
to avoid communication errors with the upgraded shibd.  (Closes: #602328)

  [ Faidon Liambotis ]
  * Add myself to Uploaders.

unblock shibboleth-sp2/2.3.1+dfsg-3

Thanks!

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686-bigmem (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#604855: unblock: shibboleth-sp2/2.3.1+dfsg-3

2010-11-24 Thread Mehdi Dogguy
On 11/24/2010 10:02 PM, Russ Allbery wrote:
 
 Please unblock package shibboleth-sp2.  This package includes both a
 daemon and an Apache module, and those need to be in sync following an
 upgrade or strange problems can result.  This version adds code to
 postinst to restart Apache after upgrading the Apache module so that
 the newly restarted shibd daemon will match the Apache module.
 

Shouln't you check that apache2 is installed before trying to restart it?

Regards,

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



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#604855: unblock: shibboleth-sp2/2.3.1+dfsg-3

2010-11-24 Thread Russ Allbery
Mehdi Dogguy me...@dogguy.org writes:
 On 11/24/2010 10:02 PM, Russ Allbery wrote:

 Please unblock package shibboleth-sp2.  This package includes both a
 daemon and an Apache module, and those need to be in sync following an
 upgrade or strange problems can result.  This version adds code to
 postinst to restart Apache after upgrading the Apache module so that
 the newly restarted shibd daemon will match the Apache module.

 Shouln't you check that apache2 is installed before trying to restart
 it?

Ah, hm, that's a good point.  I hadn't thought about that, since the old
Shibboleth modules depended on Apache.  But the current packages only
recommend.

I'm not sure the best way to do this.  Check for whether apache2.2-common
is installed, since it contains the init script?  (Checking for the
existence of the init script may be a lurking bug later for upstart
systems, file-rc, systemd, etc.)  Alternately, we could just ignore
failures on the invoke-rc.d command to restart Apache.

Does anyone have any suggestions about the best approach?

-- 
Russ Allbery (r...@debian.org)   http://www.eyrie.org/~eagle/



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org