[pkg-netfilter-team] Bug#919583: ebtables: broken symlinks: /sbin/ebtables{, -restore, -save} -> /usr/sbin/ebtables{, -restore, -save}

Laurent Bigonville bigon at debian.org
Sun Jan 27 08:54:32 GMT 2019


On Thu, 17 Jan 2019 15:35:54 +0100 Andreas Beckmann <anbe at debian.org> wrote:
 >
 > Hi,

Hello

 >
 > 0m33.7s ERROR: FAIL: Broken symlinks:
 > /sbin/ebtables-restore -> /usr/sbin/ebtables-restore
 > /sbin/ebtables-save -> /usr/sbin/ebtables-save
 > /sbin/ebtables -> /usr/sbin/ebtables

I can confirm this.

These symlinks are created by the postinst script of ebtables but are 
not properly removed by theĀ  pre/postrm one.

The prerm script is doing the following:

if [ "$1" = "remove" ] ; then
     iptables_version=$(dpkg-query -W -f='${Version;3}\n' iptables)
     if [[ "$iptables_version" < 1.8 ]]; then
         LIST="/sbin/ebtables /sbin/ebtables-save /sbin/ebtables-restore"

         for i in $LIST ; do
             if [ -L "$i" ] ; then
                 rm $i
             fi
         done
     fi
fi

First remark, shouldn't dpkg --compare-versions be used instead of just 
the < sign?

Then, these symlinks must also be created/removed in the iptables 
package itself for this to work, this is not the case ATM. Otherwise, if 
ebtables is removed and then iptables package is removed, the symlinks 
will stay on the filesystem forever.

Again all of this needs to be coordinated between ip/eb/arptables 
packages, could all of this be fixed in a consistent way?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-netfilter-team/attachments/20190127/03491138/attachment.html>


More information about the pkg-netfilter-team mailing list