Skip to contentSkip to conversation

package/ebtables: install symlink to ebtables-legacy

PATCH New Thomas De Schampheleire 3 participants 4 messages Feb 16, 2021 – Feb 17, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/ebtables: install symlink to ebtables-legacy

From: Thomas De Schampheleire <[email protected]>

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

---
 package/ebtables/ebtables.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/ebtables/ebtables.mk +7 -0
index 998f06f5f6..54932334c2 100644
@@ -33,4 +33,11 @@ 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))
Signature · 1 line
2.26.2
#1 lore raw

PATCH 1/1 package/ebtables: install symlink to ebtables-legacy

Hi Thomas,

Quoted 12 lines · Thomas De Schampheleire

From: Thomas De Schampheleire <[email protected]>

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'.

Quoted 7 lines

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

Thanks,
baruch

Quoted 20 lines
---
 package/ebtables/ebtables.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/ebtables/ebtables.mk +7 -0
index 998f06f5f6..54932334c2 100644
@@ -33,4 +33,11 @@ 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))
Signature · 3 lines
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
#2 lore raw

PATCH 1/1 package/ebtables: install symlink to ebtables-legacy

In reply to Thomas De Schampheleire
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas De Schampheleire <[email protected]> writes:

From: Thomas De Schampheleire <[email protected]> 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'.

Quoted 7 lines

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

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 1/1 package/ebtables: install symlink to ebtables-legacy

In reply to Thomas De Schampheleire
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas De Schampheleire <[email protected]> writes:

From: Thomas De Schampheleire <[email protected]> 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'.

Quoted 7 lines

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

Committed to 2020.11.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard