commit: eb54f89963dce714b9c137b1600bf1c49c8e23af Author: Dave Hughes <davidhughes205 <AT> gmail <DOT> com> AuthorDate: Sat Mar 13 07:12:59 2021 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat Mar 13 21:02:39 2021 +0000 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=eb54f899
net-firewall/ebtables: remove from overlay Package-Manager: Portage-3.0.17, Repoman-3.0.2 RepoMan-Options: --force Manifest-Sign-Key: 0xA1919C830E9498E0 Signed-off-by: Dave Hughes <davidhughes205 <AT> gmail.com> Closes: https://github.com/gentoo/musl/pull/403 Signed-off-by: Sam James <sam <AT> gentoo.org> net-firewall/ebtables/Manifest | 1 - net-firewall/ebtables/ebtables-2.0.10.4-r2.ebuild | 77 ----------- net-firewall/ebtables/ebtables-2.0.10.4.ebuild | 68 ---------- .../ebtables/files/ebtables-2.0.8.1-ebt-save.diff | 31 ----- net-firewall/ebtables/files/ebtables.confd-r1 | 11 -- net-firewall/ebtables/files/ebtables.initd-r1 | 101 --------------- net-firewall/ebtables/files/musl-fixes.patch | 141 --------------------- net-firewall/ebtables/metadata.xml | 14 -- 8 files changed, 444 deletions(-) diff --git a/net-firewall/ebtables/Manifest b/net-firewall/ebtables/Manifest deleted file mode 100644 index 73219a0..0000000 --- a/net-firewall/ebtables/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST ebtables-v2.0.10-4.tar.gz 103764 BLAKE2B 01995c701c6dbc7495bdf1f0fce61dce51a379dd1a304d2a5174e0190c040ee958833c65be9fd9d6a7601a2f81461ce1f2e9db989081b4fe7dabc5bfcecd57d6 SHA512 a6832453812eaede3fcbb5b4cab5902ea1ea752a80a259eed276a01b61e2afaa6cf07d3d023d86a883f9a02505aecc44a1c6e0d27b3a61f341002e4c051cd60a diff --git a/net-firewall/ebtables/ebtables-2.0.10.4-r2.ebuild b/net-firewall/ebtables/ebtables-2.0.10.4-r2.ebuild deleted file mode 100644 index 78a3c20..0000000 --- a/net-firewall/ebtables/ebtables-2.0.10.4-r2.ebuild +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit versionator toolchain-funcs flag-o-matic - -MY_PV=$(replace_version_separator 3 '-' ) -MY_P=${PN}-v${MY_PV} - -DESCRIPTION="Utility that enables basic Ethernet frame filtering on a Linux bridge, MAC NAT and brouting" -HOMEPAGE="http://ebtables.sourceforge.net/" -SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86" -IUSE="+perl static" - -# The ebtables-save script is written in perl. -RDEPEND="perl? ( dev-lang/perl ) - net-misc/ethertypes" - -S=${WORKDIR}/${MY_P} - -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() { - # Enhance ebtables-save to take table names as parameters bug #189315 - local PATCHES=( "${FILESDIR}/${PN}-2.0.8.1-ebt-save.diff" ) - - default - - # Musl fixes - epatch "${FILESDIR}/musl-fixes.patch" - sed -i 's,<linux/if_ether.h>,,netinet/if_ether.h>,g; /<linux\/if_pppox.h>/d' include/linux/netfilter_bridge.h include/linux/netfilter_bridge/ebtables.h extensions/ebt_*.c - rm -f include/linux/if_ether.h - - sed -i -e "s,^MANDIR:=.*,MANDIR:=/usr/share/man," \ - -e "s,^BINDIR:=.*,BINDIR:=/sbin," \ - -e "s,^INITDIR:=.*,INITDIR:=/usr/share/doc/${PF}," \ - -e "s,^SYSCONFIGDIR:=.*,SYSCONFIGDIR:=/usr/share/doc/${PF}," \ - -e "s,^LIBDIR:=.*,LIBDIR:=/$(get_libdir)/\$(PROGNAME)," Makefile -} - -src_compile() { - # This package uses _init functions to initialise extensions. With - # --as-needed this will not work. - append-ldflags $(no-as-needed) - emake \ - CC="$(tc-getCC)" \ - CFLAGS="${CFLAGS}" \ - $(use static && echo static) -} - -src_install() { - if ! use static; then - emake DESTDIR="${D}" install - keepdir /var/lib/ebtables/ - newinitd "${FILESDIR}"/ebtables.initd-r1 ebtables - newconfd "${FILESDIR}"/ebtables.confd-r1 ebtables - if ! use perl; then - rm "${ED}"/sbin/ebtables-save || die - fi - # Bug 647458 - rm "${ED%/}"/etc/ethertypes || die - else - into / - newsbin static ebtables - fi - dodoc ChangeLog THANKS -} diff --git a/net-firewall/ebtables/ebtables-2.0.10.4.ebuild b/net-firewall/ebtables/ebtables-2.0.10.4.ebuild deleted file mode 100644 index c7b50d4..0000000 --- a/net-firewall/ebtables/ebtables-2.0.10.4.ebuild +++ /dev/null @@ -1,68 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="4" - -inherit versionator eutils toolchain-funcs multilib flag-o-matic - -MY_PV=$(replace_version_separator 3 '-' ) -MY_P=${PN}-v${MY_PV} - -DESCRIPTION="Utility that enables basic Ethernet frame filtering on a Linux bridge, MAC NAT and brouting" -HOMEPAGE="http://ebtables.sourceforge.net/" -SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" - -KEYWORDS="amd64 ppc x86" -IUSE="static" -LICENSE="GPL-2" -SLOT="0" - -S=${WORKDIR}/${MY_P} - -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() { - # Enhance ebtables-save to take table names as parameters bug #189315 - epatch "${FILESDIR}/${PN}-2.0.8.1-ebt-save.diff" - - # Musl fixes - epatch "${FILESDIR}/musl-fixes.patch" - sed -i 's,<linux/if_ether.h>,,netinet/if_ether.h>,g; /<linux\/if_pppox.h>/d' include/linux/netfilter_bridge.h include/linux/netfilter_bridge/ebtables.h extensions/ebt_*.c - rm -f include/linux/if_ether.h - - sed -i -e "s,^MANDIR:=.*,MANDIR:=/usr/share/man," \ - -e "s,^BINDIR:=.*,BINDIR:=/sbin," \ - -e "s,^INITDIR:=.*,INITDIR:=/usr/share/doc/${PF}," \ - -e "s,^SYSCONFIGDIR:=.*,SYSCONFIGDIR:=/usr/share/doc/${PF}," \ - -e "s,^LIBDIR:=.*,LIBDIR:=/$(get_libdir)/\$(PROGNAME)," Makefile -} - -src_compile() { - # This package uses _init functions to initialise extensions. With - # --as-needed this will not work. - append-ldflags $(no-as-needed) - emake \ - CC="$(tc-getCC)" \ - CFLAGS="${CFLAGS}" \ - $(use static && echo static) -} - -src_install() { - if ! use static; then - make DESTDIR="${D}" install - keepdir /var/lib/ebtables/ - newinitd "${FILESDIR}"/ebtables.initd-r1 ebtables - newconfd "${FILESDIR}"/ebtables.confd-r1 ebtables - else - into / - newsbin static ebtables - insinto /etc - doins ethertypes - fi - dodoc ChangeLog THANKS -} diff --git a/net-firewall/ebtables/files/ebtables-2.0.8.1-ebt-save.diff b/net-firewall/ebtables/files/ebtables-2.0.8.1-ebt-save.diff deleted file mode 100644 index cdfd823..0000000 --- a/net-firewall/ebtables/files/ebtables-2.0.8.1-ebt-save.diff +++ /dev/null @@ -1,31 +0,0 @@ ---- ./ebtables-save.orig 2007-09-28 22:50:35.000000000 +0400 -+++ ./ebtables-save 2007-09-28 22:51:22.000000000 +0400 -@@ -12,6 +12,7 @@ - my $cnt = ""; - my $version = "1.0"; - my $table_name; -+my @table_names; - - # ======================================================== - # Process filter table -@@ -49,12 +50,19 @@ - } - # ======================================================== - -+if ($#ARGV + 1 == 0) { -+ @table_names =split("\n", `grep -E '^ebtable_' /proc/modules | cut -f1 -d' ' | sed s/ebtable_//`); -+} -+else { -+ @table_names = @ARGV; -+} -+# ======================================================== - unless (-x $ebtables) { exit -1 }; - print "# Generated by ebtables-save v$version on " . `date`; - if (defined($ENV{'EBTABLES_SAVE_COUNTER'}) && $ENV{'EBTABLES_SAVE_COUNTER'} eq "yes") { - $cnt = "--Lc"; - } --foreach $table_name (split("\n", `grep -E '^ebtable_' /proc/modules | cut -f1 -d' ' | sed s/ebtable_//`)) { -+foreach $table_name (@table_names) { - $table =`$ebtables -t $table_name -L $cnt`; - unless ($? == 0) { print $table; exit -1 }; - &process_table($table); diff --git a/net-firewall/ebtables/files/ebtables.confd-r1 b/net-firewall/ebtables/files/ebtables.confd-r1 deleted file mode 100644 index 645b26e..0000000 --- a/net-firewall/ebtables/files/ebtables.confd-r1 +++ /dev/null @@ -1,11 +0,0 @@ -# /etc/conf.d/ebtables - -# Location in which ebtables initscript will save set rules on -# service shutdown -EBTABLES_SAVE="/var/lib/ebtables/rules-save" - -# Options to pass to ebtables-save and ebtables-restore -SAVE_RESTORE_OPTIONS="" - -# Save state on stopping ebtables -SAVE_ON_STOP="yes" diff --git a/net-firewall/ebtables/files/ebtables.initd-r1 b/net-firewall/ebtables/files/ebtables.initd-r1 deleted file mode 100644 index 9c78e9b..0000000 --- a/net-firewall/ebtables/files/ebtables.initd-r1 +++ /dev/null @@ -1,101 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -extra_commands="save panic" -extra_started_commands="reload" - -ebtables_bin="/sbin/ebtables" -ebtables_save=${EBTABLES_SAVE} - -depend() { - before net - use logger -} - -ebtables_tables() { - for table in filter nat broute; do - if ${ebtables_bin} -t ${table} -L > /dev/null 2>&1; then - echo -n "${table} " - fi - done -} - -set_table_policy() { - local chains table=$1 policy=$2 - case ${table} in - nat) chains="PREROUTING POSTROUTING OUTPUT";; - broute) chains="BROUTING";; - filter) chains="INPUT FORWARD OUTPUT";; - *) chains="";; - esac - local chain - for chain in ${chains} ; do - ${ebtables_bin} -t ${table} -P ${chain} ${policy} - done -} - -checkconfig() { - if [ ! -f ${ebtables_save} ] ; then - eerror "Not starting ebtables. First create some rules then run:" - eerror "/etc/init.d/ebtables save" - return 1 - fi - return 0 -} - -start() { - checkconfig || return 1 - ebegin "Loading ebtables state and starting bridge firewall" - ${ebtables_bin}-restore ${SAVE_RESTORE_OPTIONS} < "${ebtables_save}" - eend $? -} - -stop() { - if [ "${SAVE_ON_STOP}" = "yes" ] ; then - save || return 1 - fi - ebegin "Stopping bridge firewall" - local a - for a in $(ebtables_tables); do - set_table_policy $a ACCEPT - - ${ebtables_bin} -t $a -F - ${ebtables_bin} -t $a -X - done - eend $? -} - -reload() { - ebegin "Flushing bridge firewall" - local a - for a in $(ebtables_tables); do - ${ebtables_bin} -t $a -F - ${ebtables_bin} -t $a -X - done - eend $? - - start -} - -save() { - ebegin "Saving ebtables state" - touch "${ebtables_save}" - chmod 0600 "${ebtables_save}" - ${ebtables_bin}-save $(ebtables_tables) ${SAVE_RESTORE_OPTIONS} > "${ebtables_save}" - eend $? -} - -panic() { - service_started ebtables && svc_stop - - local a - ebegin "Dropping all packets forwarded on bridges" - for a in $(ebtables_tables); do - ${ebtables_bin} -t $a -F - ${ebtables_bin} -t $a -X - - set_table_policy $a DROP - done - eend $? -} diff --git a/net-firewall/ebtables/files/musl-fixes.patch b/net-firewall/ebtables/files/musl-fixes.patch deleted file mode 100644 index 46ee83a..0000000 --- a/net-firewall/ebtables/files/musl-fixes.patch +++ /dev/null @@ -1,141 +0,0 @@ -This patch was made by Natanael Copa of the Alpine Linux project. -http://git.alpinelinux.org/cgit/aports/commit/?id=0f5076024a9700644ac9d542d2ca643fa38e77da - ---- Makefile.orig -+++ Makefile -@@ -17,7 +17,7 @@ - SYSCONFIGDIR:=/etc/sysconfig - DESTDIR:= - --CFLAGS:=-Wall -Wunused -Werror -+CFLAGS:=-Wall -Wunused - CFLAGS_SH_LIB:=-fPIC -O3 - CC:=gcc - ---- extensions/ebt_among.c.orig -+++ extensions/ebt_among.c -@@ -12,14 +12,14 @@ - #include <getopt.h> - #include <ctype.h> - #include <unistd.h> --#include "../include/ebtables_u.h" -+#include <sys/mman.h> -+#include <sys/stat.h> -+#include <fcntl.h> - #include <netinet/ether.h> -+#include "../include/ebtables_u.h" - #include "../include/ethernetdb.h" - #include <linux/if_ether.h> - #include <linux/netfilter_bridge/ebt_among.h> --#include <sys/mman.h> --#include <sys/stat.h> --#include <fcntl.h> - - #define AMONG_DST '1' - #define AMONG_SRC '2' ---- extensions/ebt_arpreply.c.orig -+++ extensions/ebt_arpreply.c -@@ -11,8 +11,8 @@ - #include <stdlib.h> - #include <string.h> - #include <getopt.h> --#include "../include/ebtables_u.h" - #include <netinet/ether.h> -+#include "../include/ebtables_u.h" - #include <linux/netfilter_bridge/ebt_arpreply.h> - - static int mac_supplied; ---- extensions/ebt_ip6.c.orig -+++ extensions/ebt_ip6.c -@@ -53,8 +53,8 @@ - - struct icmpv6_names { - const char *name; -- u_int8_t type; -- u_int8_t code_min, code_max; -+ uint8_t type; -+ uint8_t code_min, code_max; - }; - - static const struct icmpv6_names icmpv6_codes[] = { ---- extensions/ebt_limit.c.orig -+++ extensions/ebt_limit.c -@@ -59,11 +59,11 @@ - " default %u\n", EBT_LIMIT_BURST); - } - --static int parse_rate(const char *rate, u_int32_t *val) -+static int parse_rate(const char *rate, uint32_t *val) - { - const char *delim; -- u_int32_t r; -- u_int32_t mult = 1; /* Seconds by default. */ -+ uint32_t r; -+ uint32_t mult = 1; /* Seconds by default. */ - - delim = strchr(rate, '/'); - if (delim) { -@@ -151,7 +151,7 @@ - struct rates - { - const char *name; -- u_int32_t mult; -+ uint32_t mult; - }; - - static struct rates g_rates[] = -@@ -162,7 +162,7 @@ - { "sec", EBT_LIMIT_SCALE } - }; - --static void print_rate(u_int32_t period) -+static void print_rate(uint32_t period) - { - unsigned int i; - ---- extensions/ebt_nat.c.orig -+++ extensions/ebt_nat.c -@@ -10,8 +10,8 @@ - #include <stdlib.h> - #include <string.h> - #include <getopt.h> --#include "../include/ebtables_u.h" - #include <netinet/ether.h> -+#include "../include/ebtables_u.h" - #include <linux/netfilter_bridge/ebt_nat.h> - - static int to_source_supplied, to_dest_supplied; ---- include/ethernetdb.h.orig -+++ include/ethernetdb.h -@@ -30,6 +30,10 @@ - #define _PATH_ETHERTYPES "/etc/ethertypes" - #endif /* _PATH_ETHERTYPES */ - -+#ifndef __THROW -+#define __THROW -+#endif -+ - struct ethertypeent { - char *e_name; /* Official ethernet type name. */ - char **e_aliases; /* Alias list. */ ---- useful_functions.c.orig -+++ useful_functions.c -@@ -22,8 +22,7 @@ - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ --#include "include/ebtables_u.h" --#include "include/ethernetdb.h" -+#define _GNU_SOURCE - #include <stdio.h> - #include <netinet/ether.h> - #include <string.h> -@@ -33,6 +32,8 @@ - #include <sys/types.h> - #include <sys/socket.h> - #include <arpa/inet.h> -+#include "include/ebtables_u.h" -+#include "include/ethernetdb.h" - - const unsigned char mac_type_unicast[ETH_ALEN] = {0,0,0,0,0,0}; - const unsigned char msk_type_unicast[ETH_ALEN] = {1,0,0,0,0,0}; diff --git a/net-firewall/ebtables/metadata.xml b/net-firewall/ebtables/metadata.xml deleted file mode 100644 index 16ad142..0000000 --- a/net-firewall/ebtables/metadata.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="project"> - <email>base-sys...@gentoo.org</email> - <name>Gentoo Base System</name> - </maintainer> - <use> - <flag name="perl">Install the ebtables-save script which uses perl</flag> - </use> - <upstream> - <remote-id type="sourceforge">ebtables</remote-id> - </upstream> -</pkgmetadata>