From cf5c43e213e1fee7f1e070e4486a336b61383c2a Mon Sep 17 00:00:00 2001 From: beefcurtains Date: Sun, 31 May 2015 17:32:20 +0000 Subject: [PATCH 1/3] ebtables: include patch from Alpine to fix *-musl Closes #1700 --- srcpkgs/ebtables/patches/musl-fixes.patch | 141 ++++++++++++++++++++++ srcpkgs/ebtables/template | 15 ++- 2 files changed, 150 insertions(+), 6 deletions(-) create mode 100644 srcpkgs/ebtables/patches/musl-fixes.patch diff --git a/srcpkgs/ebtables/patches/musl-fixes.patch b/srcpkgs/ebtables/patches/musl-fixes.patch new file mode 100644 index 00000000000..46ee83a44af --- /dev/null +++ b/srcpkgs/ebtables/patches/musl-fixes.patch @@ -0,0 +1,141 @@ +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 + #include + #include +-#include "../include/ebtables_u.h" ++#include ++#include ++#include + #include ++#include "../include/ebtables_u.h" + #include "../include/ethernetdb.h" + #include + #include +-#include +-#include +-#include + + #define AMONG_DST '1' + #define AMONG_SRC '2' +--- extensions/ebt_arpreply.c.orig ++++ extensions/ebt_arpreply.c +@@ -11,8 +11,8 @@ + #include + #include + #include +-#include "../include/ebtables_u.h" + #include ++#include "../include/ebtables_u.h" + #include + + 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 + #include + #include +-#include "../include/ebtables_u.h" + #include ++#include "../include/ebtables_u.h" + #include + + 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 + #include + #include +@@ -33,6 +32,8 @@ + #include + #include + #include ++#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/srcpkgs/ebtables/template b/srcpkgs/ebtables/template index 91472b19b57..b2a43e1419b 100644 --- a/srcpkgs/ebtables/template +++ b/srcpkgs/ebtables/template @@ -2,28 +2,31 @@ pkgname=ebtables version=2.0.10.4 _version=${version%.*}-${version##*.} -revision=2 +revision=3 build_style=gnu-makefile +conf_files="/etc/ebtables.conf" short_desc="Filtering tool for a Linux-based bridging firewall" -maintainer="Enno Boland " +maintainer="beefcurtains " license="GPL-2" homepage="http://ebtables.netfilter.org/" depends="perl" distfiles="http://ftp.netfilter.org/pub/ebtables/${pkgname}-v${_version}.tar.gz" checksum=dc6f7b484f207dc712bfca81645f45120cb6aee3380e77a1771e9c34a9a4455d wrksrc=${pkgname}-v${_version} -make_build_args="CFLAGS+=-Wno-error=unused-but-set-variable" make_install_args=" - LIBDIR=/usr/lib \ MANDIR=/usr/share/man \ - BINDIR=/usr/sbin \ + BINDIR=/usr/bin \ INITDIR=/etc/rc.d \ SYSCONFIGDIR=/etc " broken_as_needed=yes +pre_build() { + rm include/linux/if_ether.h +} + post_install() { rm -r $DESTDIR/etc/rc.d $DESTDIR/etc/ebtables-config - touch /etc/ebtables.conf + touch $DESTDIR/etc/ebtables.conf vsv ebtables } From 7ff9c46fbd58fb962b9c87a051f9f91c7a4f4259 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Tue, 2 Jun 2015 09:25:17 +0200 Subject: [PATCH 2/3] ebtables: change maintainer back. --- srcpkgs/ebtables/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/ebtables/template b/srcpkgs/ebtables/template index b2a43e1419b..47284c812f8 100644 --- a/srcpkgs/ebtables/template +++ b/srcpkgs/ebtables/template @@ -6,7 +6,7 @@ revision=3 build_style=gnu-makefile conf_files="/etc/ebtables.conf" short_desc="Filtering tool for a Linux-based bridging firewall" -maintainer="beefcurtains " +maintainer="Enno Boland " license="GPL-2" homepage="http://ebtables.netfilter.org/" depends="perl" From f3cf99fe12d236615c78328b830ec3b5fde10436 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Tue, 2 Jun 2015 09:35:49 +0200 Subject: [PATCH 3/3] libvirt: ebtables is in /usr/bin now. --- srcpkgs/libvirt/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/libvirt/template b/srcpkgs/libvirt/template index 54d42545642..6da25f1150b 100644 --- a/srcpkgs/libvirt/template +++ b/srcpkgs/libvirt/template @@ -1,7 +1,7 @@ # Template file for 'libvirt' pkgname=libvirt version=1.2.15 -revision=1 +revision=2 build_style=gnu-configure build_options="systemd" configure_args="--without-hal --with-storage-lvm --with-qemu-user=nobody @@ -9,7 +9,7 @@ configure_args="--without-hal --with-storage-lvm --with-qemu-user=nobody --with-qemu-group=kvm --without-netcf --with-interface --sbindir=/usr/bin ac_cv_path_MOUNT=/bin/mount ac_cv_path_UMOUNT=/bin/umount ac_cv_path_MKFS=/sbin/mkfs ac_cv_path_SHOWMOUNT=/sbin/showmount - ac_cv_path_DNSMASQ=/sbin/dnsmasq" + ac_cv_path_DNSMASQ=/sbin/dnsmasq ac_cv_path_EBTABLES=/usr/bin/ebtables" short_desc="The virtualization API for controlling virtualization engines" maintainer="Juan RP " homepage="http://libvirt.org"