938c085109
Since the upgrade of ebtables from 2.0.10-4 to 2.0.11, there no longer is an 'ebtables' binary. It has been renamed to 'ebtables-legacy' and moved from '/sbin' to '/usr/sbin'. This change is part of the upstream change to integrate the functionality of ebtables (and arptables) in the iptables package, using the nf_tables kernel backend [1]. Unfortunately, the renaming (and move) of the original 'ebtables' binary breaks existing scripts that are calling 'ebtables' or '/sbin/ebtables'. Therefore, add a symlink from the original path to 'ebtables-legacy'. However, do not provide this symlink if BR2_PACKAGE_IPTABLES_NFTABLES is enabled. In this case, the iptables package will build the new equivalent of ebtables -- a symlink to ebtables-legacy would cause conflicts. [1] https://wiki.nftables.org/wiki-nftables/index.php/Legacy_xtables_tools Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> Acked-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
44 lines
1.4 KiB
Makefile
44 lines
1.4 KiB
Makefile
################################################################################
|
|
#
|
|
# ebtables
|
|
#
|
|
################################################################################
|
|
|
|
EBTABLES_VERSION = 2.0.11
|
|
EBTABLES_SITE = http://ftp.netfilter.org/pub/ebtables
|
|
EBTABLES_LICENSE = GPL-2.0+
|
|
EBTABLES_LICENSE_FILES = COPYING
|
|
EBTABLES_CPE_ID_VENDOR = netfilter
|
|
EBTABLES_SELINUX_MODULES = iptables
|
|
|
|
ifeq ($(BR2_PACKAGE_EBTABLES_UTILS_SAVE),y)
|
|
define EBTABLES_INSTALL_TARGET_UTILS_SAVE
|
|
$(INSTALL) -m 0755 -D $(@D)/ebtables-save.sh $(TARGET_DIR)/usr/sbin/ebtables-legacy-save
|
|
endef
|
|
EBTABLES_POST_INSTALL_TARGET_HOOKS += EBTABLES_INSTALL_TARGET_UTILS_SAVE
|
|
else
|
|
# ebtables-legacy-save is installed by default, thus remove it from target
|
|
define EBTABLES_REMOVE_UTILS_SAVE
|
|
$(RM) -f $(TARGET_DIR)/usr/sbin/ebtables-legacy-save
|
|
endef
|
|
EBTABLES_POST_INSTALL_TARGET_HOOKS += EBTABLES_REMOVE_UTILS_SAVE
|
|
endif
|
|
|
|
# ebtables-legacy-restore is installed by default, thus remove it if not
|
|
# selected
|
|
ifeq ($(BR2_PACKAGE_EBTABLES_UTILS_RESTORE),)
|
|
define EBTABLES_REMOVE_UTILS_RESTORE
|
|
$(RM) -f $(TARGET_DIR)/usr/sbin/ebtables-legacy-restore
|
|
endef
|
|
EBTABLES_POST_INSTALL_TARGET_HOOKS += EBTABLES_REMOVE_UTILS_RESTORE
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_IPTABLES_NFTABLES),)
|
|
define EBTABLES_INSTALL_LEGACY_SYMLINK
|
|
ln -sf /usr/sbin/ebtables-legacy $(TARGET_DIR)/sbin/ebtables
|
|
endef
|
|
EBTABLES_POST_INSTALL_TARGET_HOOKS += EBTABLES_INSTALL_LEGACY_SYMLINK
|
|
endif
|
|
|
|
$(eval $(autotools-package))
|