diff -Nru ebtables-2.0.10.4/debian/changelog ebtables-2.0.10.4/debian/changelog --- ebtables-2.0.10.4/debian/changelog 2018-05-21 17:20:15.000000000 +0000 +++ ebtables-2.0.10.4/debian/changelog 2018-06-28 16:42:04.000000000 +0000 @@ -1,3 +1,19 @@ +ebtables (2.0.10.4-3.5ubuntu2.18.04.3) bionic; urgency=medium + + * Update versions to fix in prerm to Bionic's ebtables versions + + -- Balint Reczey Thu, 28 Jun 2018 18:42:04 +0200 + +ebtables (2.0.10.4-3.5ubuntu2.18.04.2) bionic; urgency=medium + + [ Dan Streetman ] + * Never return failure during ebtables.init stop(), it can cause + errors during package upgrade (LP: #1774120) + * Add version number check to prerm script, to only ignore + failed upgrade for older versions instead of all versions. + + -- Balint Reczey Thu, 28 Jun 2018 00:13:26 +0200 + ebtables (2.0.10.4-3.5ubuntu2.18.04.1) bionic; urgency=medium * Fix check of fcntl errno value, to allow lockfile contention to work. diff -Nru ebtables-2.0.10.4/debian/ebtables.init ebtables-2.0.10.4/debian/ebtables.init --- ebtables-2.0.10.4/debian/ebtables.init 2013-03-15 14:40:53.000000000 +0000 +++ ebtables-2.0.10.4/debian/ebtables.init 2018-06-28 16:42:04.000000000 +0000 @@ -49,7 +49,7 @@ /sbin/ebtables -t filter -L 2>&1 1>/dev/null | grep -q permission if [ $? -eq 0 ]; then log_failure_msg "Error: insufficient privileges to access the ebtables rulesets." - exit 1 + return fi for table in filter nat broute; do /sbin/ebtables -t $table -L &> /dev/null @@ -140,6 +140,9 @@ stop) [ "$EBTABLES_SAVE_ON_STOP" = "yes" ] && save clear + # Never return failure for stop; it's not helpful, and causes problems + # in some cases during pkg upgrade, e.g. LP: #1774120 + RETVAL=0 ;; restart|reload|force-reload) [ "$EBTABLES_SAVE_ON_RESTART" = "yes" ] && save diff -Nru ebtables-2.0.10.4/debian/ebtables.prerm ebtables-2.0.10.4/debian/ebtables.prerm --- ebtables-2.0.10.4/debian/ebtables.prerm 1970-01-01 00:00:00.000000000 +0000 +++ ebtables-2.0.10.4/debian/ebtables.prerm 2018-06-28 16:42:04.000000000 +0000 @@ -0,0 +1,18 @@ +#!/bin/sh +# prerm script for ebtables +# +# see: dh_installdeb(1) + +set -e + +if [ "$1" = "failed-upgrade" ]; then + # Ignore failed prerm on old versions; see LP: #1774120 + dpkg --compare-versions "$2" lt "2.0.10.4-3.5ubuntu2.18.04.2" && exit 0 +fi + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0