Bug#830881: shorewall: fails to upgrade: No such method 'GetUnit', 'RestartUnit'

2016-07-12 Thread Andreas Beckmann
Package: shorewall
Version: 5.0.10-1
Severity: important

Hi,

the recent shorewall upgrade did not work out on a long grown machine
tracking testing (with probably some remaining parts of stable). It is
still using SysV.

Setting up shorewall (5.0.10-1) ...
Checking using Shorewall 5.0.10...
Processing /etc/shorewall/params ...
Processing /etc/shorewall/shorewall.conf...
Loading Modules...
Checking /etc/shorewall/zones...
Checking /etc/shorewall/interfaces...
Checking /etc/shorewall/hosts...
Determining Hosts in Zones...
Locating Action Files...
Checking /etc/shorewall/policy...
Adding Anti-smurf Rules
Adding rules for DHCP
Checking TCP Flags filtering...
Checking Kernel Route Filtering...
Checking Martian Logging...
Checking MAC Filtration -- Phase 1...
Checking /etc/shorewall/rules...
Checking /etc/shorewall/conntrack...
Checking MAC Filtration -- Phase 2...
Applying Policies...
Checking /usr/share/shorewall/action.Reject for chain Reject...
Checking /usr/share/shorewall/action.Broadcast for chain Broadcast...
Checking /usr/share/shorewall/action.Drop for chain Drop...
Shorewall configuration verified
Failed to retrieve unit: No such method 'GetUnit'
Failed to restart shorewall.service: No such method 'RestartUnit'
See system logs and 'systemctl status shorewall.service' for details.
shorewall.service couldn't restart.
dpkg: error processing package shorewall (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 shorewall


Andreas



Bug#830881: shorewall: fails to upgrade: No such method 'GetUnit', 'RestartUnit'

2016-07-12 Thread Roberto C . Sánchez
On Tue, Jul 12, 2016 at 06:03:38PM +0200, Andreas Beckmann wrote:
> Failed to retrieve unit: No such method 'GetUnit'
> Failed to restart shorewall.service: No such method 'RestartUnit'
> See system logs and 'systemctl status shorewall.service' for details.
> shorewall.service couldn't restart.
> dpkg: error processing package shorewall (--configure):
>  subprocess installed post-installation script returned error exit status 1
> Errors were encountered while processing:
>  shorewall
> 
Andreas,

Could you open up /var/lib/dpkg/info/shorewall.postinst in an editor,
add "set -x" just below the #! line and then execute it as root?

/var/lib/dpkg/info/shorewall.postinst configure 5.0.10-1

If you could please send back the resulting output, that would be very
helpful.

Regards,

-Roberto

-- 
Roberto C. Sánchez
http://people.connexer.com/~roberto
http://www.connexer.com


signature.asc
Description: Digital signature


Bug#830881: shorewall: fails to upgrade: No such method 'GetUnit', 'RestartUnit'

2016-07-12 Thread Andreas Beckmann
On 2016-07-12 18:31, Roberto C. Sánchez wrote:
> Could you open up /var/lib/dpkg/info/shorewall.postinst in an editor,
> add "set -x" just below the #! line and then execute it as root?

The maintainer script incorrectly uses '#!/bin/sh -e',
that should rather have 'set -e' as a separate command.

> If you could please send back the resulting output, that would be very
> helpful.

here we go ...

To me this looks like it is a bit too systemd-specific, but I might be wrong 
here ...
Or a problem in the helpers ...

# dpkg --configure --pending
Setting up shorewall (5.0.10-1) ...
+ set -e
+ . /usr/share/debconf/confmodule
+ [ !  ]
+ PERL_DL_NONLAZY=1
+ export PERL_DL_NONLAZY
+ [  ]
+ exec /usr/share/debconf/frontend /var/lib/dpkg/info/shorewall.postinst 
configure 5.0.7.2-1
+ set -e
+ . /usr/share/debconf/confmodule
+ [ ! 1 ]
+ [ -z  ]
+ exec
+ [  ]
+ exec
+ DEBCONF_REDIR=1
+ export DEBCONF_REDIR
+ db_reset shorewall/dont_restart
+ _db_cmd RESET shorewall/dont_restart
+ _db_internal_IFS= 

+ IFS= 
+ printf %s\n RESET shorewall/dont_restart
+ IFS=  

+ IFS=
 read -r _db_internal_line
+ RET=0
+ return 0
+ db_reset shorewall/major_release
+ _db_cmd RESET shorewall/major_release
+ _db_internal_IFS= 

+ IFS= 
+ printf %s\n RESET shorewall/major_release
+ IFS=  

+ IFS=
 read -r _db_internal_line
+ RET=0
+ return 0
+ db_go
+ _db_cmd GO 
+ _db_internal_IFS= 

+ IFS= 
+ printf %s\n GO 
+ IFS=  

+ IFS=
 read -r _db_internal_line
+ RET=ok
+ return 0
+ [ ! -d /var/lib/shorewall ]
+ [ -f /var/lib/dpkg/info/shorewall-common.postrm ]
+ restart=true
+ [ -f /etc/default/shorewall ]
+ . /etc/default/shorewall
+ startup=1
+ OPTIONS=
+ STARTOPTIONS=
+ RESTARTOPTIONS=
+ INITLOG=/dev/null
+ SAFESTOP=0
+ [ true = true ]
+ [ 1 = 1 ]
+ /sbin/shorewall check
Checking using Shorewall 5.0.10...
Processing /etc/shorewall/params ...
Processing /etc/shorewall/shorewall.conf...
Loading Modules...
Checking /etc/shorewall/zones...
Checking /etc/shorewall/interfaces...
Checking /etc/shorewall/hosts...
Determining Hosts in Zones...
Locating Action Files...
Checking /etc/shorewall/policy...
Adding Anti-smurf Rules
Adding rules for DHCP
Checking TCP Flags filtering...
Checking Kernel Route Filtering...
Checking Martian Logging...
Checking MAC Filtration -- Phase 1...
Checking /etc/shorewall/rules...
Checking /etc/shorewall/conntrack...
Checking MAC Filtration -- Phase 2...
Applying Policies...
Checking /usr/share/shorewall/action.Reject for chain Reject...
Checking /usr/share/shorewall/action.Broadcast for chain Broadcast...
Checking /usr/share/shorewall/action.Drop for chain Drop...
Shorewall configuration verified
+ [ -x /usr/bin/deb-systemd-invoke ]
+ [ -f /lib/systemd/system/shorewall.service ]
+ deb-systemd-helper enable shorewall.service
+ deb-systemd-invoke restart shorewall.service
Failed to retrieve unit: No such method 'GetUnit'
Failed to restart shorewall.service: No such method 'RestartUnit'
See system logs and 'systemctl status shorewall.service' for details.
shorewall.service couldn't restart.
dpkg: error processing package shorewall (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 shorewall

Andreas



Bug#830881: shorewall: fails to upgrade: No such method 'GetUnit', 'RestartUnit'

2016-07-12 Thread Roberto C . Sánchez
On Tue, Jul 12, 2016 at 07:24:23PM +0200, Andreas Beckmann wrote:
> Shorewall configuration verified
> + [ -x /usr/bin/deb-systemd-invoke ]
> + [ -f /lib/systemd/system/shorewall.service ]
> + deb-systemd-helper enable shorewall.service
> + deb-systemd-invoke restart shorewall.service
> Failed to retrieve unit: No such method 'GetUnit'
> Failed to restart shorewall.service: No such method 'RestartUnit'
> See system logs and 'systemctl status shorewall.service' for details.
> shorewall.service couldn't restart.
> dpkg: error processing package shorewall (--configure):
>  subprocess installed post-installation script returned error exit status 1
> Errors were encountered while processing:
>  shorewall
> 
That certainly looks like a bug.  I am surprised that deb-systemd-invoke
is present when systemd isn't the init system.

I'll take a look at this and get an update out in the coming days.

In the meantime, you can remove /lib/systemd/system/shorewall.service
and then reconfigure the package.

Regards,

-Roberto

-- 
Roberto C. Sánchez
http://people.connexer.com/~roberto
http://www.connexer.com


signature.asc
Description: Digital signature