diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-02-13 21:41:11 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-02-13 21:41:11 +0000 |
commit | c8d60dada2ec8eb48b2d2b290cd6683ccec40e39 (patch) | |
tree | c44943ee0563a3fa957716de909fed683117fcb9 /net-firewall/ebtables | |
parent | 69051588e2f955485fe5d45d45e616bc60a2de57 (diff) |
gentoo (valentine's day) resync : 14.02.2021
Diffstat (limited to 'net-firewall/ebtables')
-rw-r--r-- | net-firewall/ebtables/Manifest | 7 | ||||
-rw-r--r-- | net-firewall/ebtables/ebtables-2.0.11-r2.ebuild | 9 | ||||
-rw-r--r-- | net-firewall/ebtables/ebtables-2.0.11-r3.ebuild | 106 | ||||
-rw-r--r-- | net-firewall/ebtables/files/ebtables.confd-r1 | 8 | ||||
-rw-r--r-- | net-firewall/ebtables/files/ebtables.initd-r1 | 8 |
5 files changed, 126 insertions, 12 deletions
diff --git a/net-firewall/ebtables/Manifest b/net-firewall/ebtables/Manifest index 0dd86b1c76fb..ba6ec9ca398c 100644 --- a/net-firewall/ebtables/Manifest +++ b/net-firewall/ebtables/Manifest @@ -1,8 +1,9 @@ AUX ebtables-2.0.11-ebt-save.patch 865 BLAKE2B 39ba29e026ad8f7fa825546cbb106b120a018c7763018ef588968238b09c30040d1d1b11e33fddcfc1e4ff425c4c3928dee0f5a1061e97cc1142c18ce08763e8 SHA512 b059fa5c67e4ec36537e361f0924153fadec482604039f6fd09ab5c1dbd518da0f8e0fd4ccba00d1952cf66136377e357f06a5669746ff42d031f32a211457b5 AUX ebtables-2.0.11-makefile.patch 495 BLAKE2B 213fe84dcdb82b55e074ba7015b8cf20213fe4ece62a493acf0533c46b70369165d0dd1974a1e14f82e8ce946450e9a3d8968886c93f7c3f9cbcf1386602b52e SHA512 f61d8f07e3276aa6a8d4ae9bb91b4bc227390d25b9822ed3e70e9a07f4da60b7c5262617f291d602c6bb55f5869f090ebe5ee41ba23c19d860260afd1d95d9b2 AUX ebtables-2.0.11-remove-stray-atsign.patch 1120 BLAKE2B 14bac4aec87d44e5ca166418abf39368f7b7e45922d8371f6dd469a2d1963fef7c9f8d960c78d72153d9b4f307491f8498a0460b4d150468f8848c3dd4b973bf SHA512 8094f6aee009880c79e8476d29dcb90c1682922f27ed7ab0a4ae7175e7efc46f035d228586895f4e6793876f944010abd72ee7102be31962bd832070be7db14e -AUX ebtables.confd-r1 288 BLAKE2B 72e0ad40f53058f1ede8a4d049badde04e69e307e9c24ffe5cdc7f61d918b0e1b3296f793c4dd46389b2dee69ad4730f563bd3891569612d7f9f8c7b39641a84 SHA512 088308eba077fcec35299c8aaad0492024173504a361c2ba7e29dce106888a78c72818a791f3d3655aed3f6df26a3319c42e2b2c54760cdbad036d46b89b97f3 -AUX ebtables.initd-r1 1991 BLAKE2B d044278249406982a7f1b83edab498ecad6368462451890d137bb3f03a404334b8e1f77bb4eef49375090b7499010dc4a4318caf53c9edd78b0fda73c8620c29 SHA512 82fa6298595ffdf0c286940f7a77b8246e274c3dc3f8c7448c1b36114cb9c8725b0466ba9feb34bd521bc3f7d9ae049ceae557a059d23acf2a2a97a167647b73 +AUX ebtables.confd-r1 685 BLAKE2B 647eeb26f9c046341c79d450fa5771480cbd9047b063b2e6c32aedeaa669f8c6f73dd317731eac86bfb85f352aec23969af505a461e7f307cf6538cb9c6b21ff SHA512 5bb7ac7aa1a723a7b71f26fbc0337f3cb5b4efd700b95695ab47ac7edc9de7ab0190591d0f56db8e461be93a79cb3ce534335c8ce13a6a6773ff5229c0959033 +AUX ebtables.initd-r1 2020 BLAKE2B f73f5904690c5c6344f0668c8327de5605b41ca5a699b3076f3b30545bbea19ff125c5c21d18a73e3bb2cc2986fbf74e7cad5757ced38887551ff59f2ca81dda SHA512 8d4c56102a2a4771e7a0d3a62ddbc4c82eba640ea6d5cba2e55ae2c2d7d0fe2621bcb81a4fa6aebdd1674ac55bb88beb964a89b521d8e684fc02f4b9da555823 DIST ebtables-2.0.11.tar.gz 428411 BLAKE2B 62af4c38ad21498e43f41ef96c8abb5704e8d8a48f1327c587b664f36fdfa9849a9a37e59958db56d38019465d8bf1775914f7387fde99a441615913702cf504 SHA512 43a04c6174c8028c501591ef260526297e0f018016f226e2a3bcf80766fddf53d4605c347554d6da7c4ab5e2131584a18da20916ffddcbf2d26ac93b00c5777f -EBUILD ebtables-2.0.11-r2.ebuild 2516 BLAKE2B 4191cbaef5d9728a31d69af5ee9b5023f5ad7e93eaf7e633392ce3fa7f3c8870f7c25a5cbb9fcfb55b92b1d52d8f86cc0323049953b4d35c0350c6cef2bf815b SHA512 722620358c898567cc0286d2cecdf72a05542861197bd2721185eb205414708e4d20da9e15b21834be9b6d56d1e4687c090299245ed40f2d41286a0ca8bf9ad1 +EBUILD ebtables-2.0.11-r2.ebuild 2539 BLAKE2B a4f30ce91013488ba7ec7355bb862df614edef50b7a731e8dce4af5ef3a3ec1c86c7373acbf77935560b65deffb9b2be48400a4dd8c824fd1c6be4c7cd6db045 SHA512 08ebda29d93efc3ab9110841379c2a75f07d17cc152f63feacb1e488c68fe72f42bb6d0d4eb4374be147998f0439bfc8f9092326c5367ac770e8e22571c3e296 +EBUILD ebtables-2.0.11-r3.ebuild 2493 BLAKE2B cafbd261f146bc85da470b6eec2a228adbf5a97da43ffb1d29efa5a6e465c8a4493a6d5add52662eecd67f311b1a256f58a84671a7f68c525637dad9111636f6 SHA512 f92e97f0951432551dc61a146a924566f2b160f9c49b14e2f309231d6c56850d48663c67b80d76f206c22cdb17f45a5760109bf78da014addff779e3e83f3fe3 MISC metadata.xml 488 BLAKE2B 683d7552083e64daf3e41f9c1e7c53033ac4059a1f3ae248e666001424725f21efb1ec0d35c28492ac80c19998692c00e795818501b0c9f0df1037175b8bda93 SHA512 88d08269d25c3f4a22d89b5774e21c4af048c2e39beba41514780d3dac72494cb39e993becd49b0a73cb9c2d0b2e7e46c7bbe1b3a40fe6d7094431a9fb384f35 diff --git a/net-firewall/ebtables/ebtables-2.0.11-r2.ebuild b/net-firewall/ebtables/ebtables-2.0.11-r2.ebuild index b4d908e63ccc..2e2c4a000704 100644 --- a/net-firewall/ebtables/ebtables-2.0.11-r2.ebuild +++ b/net-firewall/ebtables/ebtables-2.0.11-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -9,7 +9,7 @@ MY_PV="$(ver_rs 3 '-' )" MY_P="${PN}-${MY_PV}" DESCRIPTION="Controls Ethernet frame filtering on a Linux bridge, MAC NAT and brouting" -HOMEPAGE="http://ebtables.sourceforge.net/" +HOMEPAGE="https://ebtables.netfilter.org/" SRC_URI="http://ftp.netfilter.org/pub/${PN}/${MY_P}.tar.gz" S="${WORKDIR}/${MY_P}" @@ -44,11 +44,12 @@ pkg_setup() { src_prepare() { default - # don't install perl scripts if USE=perl is disabled + # Don't install perl scripts if USE=perl is disabled. if ! use perl; then sed -e '/sbin_SCRIPTS/ d' -i Makefile.am || die fi + # The bundled autotools are borked, so force a rebuild. eautoreconf } @@ -78,8 +79,6 @@ src_install() { else into / newsbin static ebtables - insinto /etc - doins ethertypes fi newman ebtables-legacy.8 ebtables.8 diff --git a/net-firewall/ebtables/ebtables-2.0.11-r3.ebuild b/net-firewall/ebtables/ebtables-2.0.11-r3.ebuild new file mode 100644 index 000000000000..467b9d7f3fdb --- /dev/null +++ b/net-firewall/ebtables/ebtables-2.0.11-r3.ebuild @@ -0,0 +1,106 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit autotools + +MY_PV="$(ver_rs 3 '-' )" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="Controls Ethernet frame filtering on a Linux bridge, MAC NAT and brouting" +HOMEPAGE="https://ebtables.netfilter.org/" +SRC_URI="http://ftp.netfilter.org/pub/${PN}/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" +IUSE="+perl static" + +BDEPEND=">=app-eselect/eselect-iptables-20200508" +# The ebtables-save script is written in perl. +RDEPEND="${BDEPEND} + perl? ( dev-lang/perl ) + net-misc/ethertypes" + +PATCHES=( + "${FILESDIR}/${PN}-2.0.11-makefile.patch" + + # Enhance ebtables-save to take table names as parameters bug #189315 + "${FILESDIR}/${PN}-2.0.11-ebt-save.patch" + + # from upstream git + "${FILESDIR}/ebtables-2.0.11-remove-stray-atsign.patch" +) + +pkg_setup() { + if use static; then + ewarn "You've chosen static build which is useful for embedded devices." + ewarn "It has no init script. Make sure that's really what you want." + fi +} + +src_prepare() { + default + + # Don't install perl scripts if USE=perl is disabled. + if ! use perl; then + sed -i -e '/^sbin_SCRIPTS/ d' Makefile.am || die + fi + + # The bundled autotools are borked, so force a rebuild. + eautoreconf +} + +src_configure() { + econf \ + --bindir="/bin" \ + --sbindir="/sbin" \ + --libdir="/$(get_libdir)/${PN}" \ + $(use_enable static) +} + +src_compile() { + emake $(usex static 'static ebtables-legacy.8' '') +} + +src_install() { + local -a DOCS=( ChangeLog THANKS ) + + if ! use static; then + emake DESTDIR="${D}" install + newinitd "${FILESDIR}"/ebtables.initd-r1 ebtables + newconfd "${FILESDIR}"/ebtables.confd-r1 ebtables + + find "${D}" -name '*.la' -type f -delete || die + + # The ethertypes package installs this for us. + rm "${ED}"/etc/ethertypes || die + else + into / + newsbin static ebtables + fi + + newman ebtables-legacy.8 ebtables.8 + einstalldocs +} + +pkg_postinst() { + if ! eselect ebtables show &>/dev/null; then + elog "Current ebtables implementation is unset, setting to ebtables-legacy" + eselect ebtables set ebtables-legacy + fi + + eselect ebtables show +} + +pkg_prerm() { + if [[ -z ${REPLACED_BY_VERSION} ]] && has_version 'net-firewall/iptables[nftables]'; then + elog "Resetting ebtables symlinks to xtables-nft-multi before removal" + eselect ebtables set xtables-nft-multi + else + elog "Unsetting ebtables symlinks before removal" + eselect ebtables unset + fi +} diff --git a/net-firewall/ebtables/files/ebtables.confd-r1 b/net-firewall/ebtables/files/ebtables.confd-r1 index 645b26edae99..8e83c81b9f84 100644 --- a/net-firewall/ebtables/files/ebtables.confd-r1 +++ b/net-firewall/ebtables/files/ebtables.confd-r1 @@ -9,3 +9,11 @@ SAVE_RESTORE_OPTIONS="" # Save state on stopping ebtables SAVE_ON_STOP="yes" + +# If you need to log iptables messages as soon as iptables starts, +# AND your logger does NOT depend on the network, then you may wish +# to uncomment the next line. +# If your logger depends on the network, and you uncomment this line +# you will create an unresolvable circular dependency during startup. +# After commenting or uncommenting this line, you must run 'rc-update -u'. +#rc_use="logger" diff --git a/net-firewall/ebtables/files/ebtables.initd-r1 b/net-firewall/ebtables/files/ebtables.initd-r1 index 6608760110be..bdc0987b1b2b 100644 --- a/net-firewall/ebtables/files/ebtables.initd-r1 +++ b/net-firewall/ebtables/files/ebtables.initd-r1 @@ -1,5 +1,5 @@ #!/sbin/openrc-run -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 extra_commands="save panic" @@ -10,10 +10,10 @@ ebtables_save=${EBTABLES_SAVE} depend() { before net - use logger } ebtables_tables() { + local table for table in filter nat broute; do if ${ebtables_bin} -t ${table} -L > /dev/null 2>&1; then printf '%s' "${table} " @@ -80,8 +80,8 @@ reload() { save() { ebegin "Saving ebtables state" - touch "${ebtables_save}" - chmod 0600 "${ebtables_save}" + checkpath -d -m 0755 "${ebtables_save%/*}" + checkpath -f -m 0600 "${ebtables_save}" ${ebtables_bin}-save $(ebtables_tables) ${SAVE_RESTORE_OPTIONS} > "${ebtables_save}" eend $? } |