Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
Tom Callaway | 8f4d451c57 | |
Tom Callaway | 73cb680e1e | |
Tom "spot" Callaway | 30b438b08a |
|
@ -0,0 +1,16 @@
|
|||
diff -up ebtables-v2.0.10-4/extensions/Makefile.linkfix ebtables-v2.0.10-4/extensions/Makefile
|
||||
--- ebtables-v2.0.10-4/extensions/Makefile.linkfix 2011-12-15 15:02:47.000000000 -0500
|
||||
+++ ebtables-v2.0.10-4/extensions/Makefile 2012-04-05 15:52:09.563511746 -0400
|
||||
@@ -9,9 +9,10 @@ EXT_LIBS+=$(foreach T,$(EXT_FUNC), exten
|
||||
EXT_LIBS+=$(foreach T,$(EXT_TABLES), extensions/libebtable_$(T).so)
|
||||
EXT_LIBSI+=$(foreach T,$(EXT_FUNC), -lebt_$(T))
|
||||
EXT_LIBSI+=$(foreach T,$(EXT_TABLES), -lebtable_$(T))
|
||||
+EXT_LDFLAGS+=-L. -lebtc
|
||||
|
||||
-extensions/ebt_%.so: extensions/ebt_%.o
|
||||
- $(CC) $(LDFLAGS) -shared -o $@ -lc $< -nostartfiles
|
||||
+extensions/ebt_%.so: extensions/ebt_%.o libebtc.so
|
||||
+ $(CC) $(LDFLAGS) $(EXT_LDFLAGS) -shared -o $@ -lc $< -nostartfiles
|
||||
|
||||
extensions/libebt_%.so: extensions/ebt_%.so
|
||||
mv $< $@
|
|
@ -0,0 +1,43 @@
|
|||
#!/bin/bash
|
||||
|
||||
EBTABLES="/sbin/ebtables"
|
||||
|
||||
[ -x "$EBTABLES" ] || exit 1
|
||||
|
||||
echo "# Generated by ebtables-save v1.0 on $(date)"
|
||||
|
||||
cnt=""
|
||||
[ "x$EBTABLES_SAVE_COUNTER" = "xyes" ] && cnt="--Lc"
|
||||
|
||||
for table_name in $(grep -E '^ebtable_' /proc/modules | cut -f1 -d' ' | sed s/ebtable_//); do
|
||||
table=$($EBTABLES -t $table_name -L $cnt)
|
||||
[ $? -eq 0 ] || { echo "$table"; exit -1; }
|
||||
|
||||
chain=""
|
||||
rules=""
|
||||
while read line; do
|
||||
[ -z "$line" ] && continue
|
||||
|
||||
case "$line" in
|
||||
Bridge\ table:\ *)
|
||||
echo "*${line:14}"
|
||||
;;
|
||||
Bridge\ chain:\ *)
|
||||
chain="${line:14}"
|
||||
chain="${chain%%,*}"
|
||||
policy="${line##*policy: }"
|
||||
echo ":$chain $policy"
|
||||
;;
|
||||
*)
|
||||
if [ "$cnt" = "--Lc" ]; then
|
||||
line=${line/, pcnt \=/ -c}
|
||||
line=${line/-- bcnt \=/}
|
||||
fi
|
||||
rules="$rules-A $chain $line\n"
|
||||
;;
|
||||
esac
|
||||
done <<EOF
|
||||
$table
|
||||
EOF
|
||||
echo -e $rules
|
||||
done
|
|
@ -1,16 +1,19 @@
|
|||
%global ebminor 4
|
||||
|
||||
Name: ebtables
|
||||
Version: 2.0.10
|
||||
Release: 1%{?dist}
|
||||
Release: 5%{?dist}
|
||||
Summary: Ethernet Bridge frame table administration tool
|
||||
License: GPLv2+
|
||||
Group: System Environment/Base
|
||||
URL: http://ebtables.sourceforge.net/
|
||||
Source0: http://downloads.sourceforge.net/ebtables/ebtables-v%{version}-1.tar.gz
|
||||
Source0: http://downloads.sourceforge.net/ebtables/ebtables-v%{version}-%{ebminor}.tar.gz
|
||||
Source1: ebtables-save
|
||||
Requires(pre): /sbin/chkconfig
|
||||
Requires(postun): /sbin/service
|
||||
Patch0: ebtables-2.0.10-norootinst.patch
|
||||
Patch1: ebtables-2.0.10-ldflags.patch
|
||||
Patch3: ebtables-2.0.9-lsb.patch
|
||||
Patch4: ebtables-2.0.10-linkfix.patch
|
||||
|
||||
%description
|
||||
Ethernet bridge tables is a firewalling tool to transparently filter network
|
||||
|
@ -24,10 +27,11 @@ The ebtables tool can be used together with the other Linux filtering tools,
|
|||
like iptables. There are no known incompatibility issues.
|
||||
|
||||
%prep
|
||||
%setup -q -n ebtables-v%{version}-1
|
||||
%setup -q -n ebtables-v%{version}-%{ebminor}
|
||||
%patch0 -p1 -b .norootinst
|
||||
%patch1 -p1 -b .ldflags
|
||||
%patch3 -p1 -b .lsb
|
||||
# extension modules need to link to libebtc.so for ebt_errormsg
|
||||
%patch4 -p1 -b .linkfix
|
||||
|
||||
# Convert to UTF-8
|
||||
f=THANKS; iconv -f iso-8859-1 -t utf-8 $f -o $f.utf8 ; mv $f.utf8 $f
|
||||
|
@ -44,6 +48,13 @@ touch $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ebtables.filter
|
|||
touch $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ebtables.nat
|
||||
touch $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ebtables.broute
|
||||
|
||||
# install ebtables-save bash script
|
||||
rm -f $RPM_BUILD_ROOT/sbin/ebtables-save
|
||||
install %{SOURCE1} $RPM_BUILD_ROOT/sbin/ebtables-save
|
||||
|
||||
# move libebtc.so into the ldpath
|
||||
mv %{buildroot}/%{_lib}/ebtables/libebtc.so %{buildroot}/%{_lib}/
|
||||
|
||||
%post
|
||||
/sbin/chkconfig --add ebtables
|
||||
/sbin/ldconfig
|
||||
|
@ -67,6 +78,7 @@ fi
|
|||
%config(noreplace) %{_sysconfdir}/ethertypes
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/ebtables-config
|
||||
%{_initrddir}/ebtables
|
||||
/%{_lib}/libebtc.so
|
||||
/%{_lib}/ebtables/
|
||||
/sbin/ebtables*
|
||||
%ghost %{_sysconfdir}/sysconfig/ebtables.filter
|
||||
|
@ -74,6 +86,20 @@ fi
|
|||
%ghost %{_sysconfdir}/sysconfig/ebtables.broute
|
||||
|
||||
%changelog
|
||||
* Thu Apr 5 2012 Tom Callaway <spot@fedoraproject.org> - 2.0.10-5
|
||||
- update to 2.0.10-4 (upstream numbering is goofy)
|
||||
- fix missing symbol issue with extension modules (bz810006)
|
||||
|
||||
* Thu Feb 16 2012 Thomas Woerner <twoerner@redhat.com> - 2.0.10-4
|
||||
- replaced ebtables-save perl script by bash script to get rid of the perl
|
||||
requirement
|
||||
|
||||
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.10-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||
|
||||
* Thu Aug 11 2011 Tom Callaway <spot@fedoraproject.org> - 2.0.10-2
|
||||
- update to 2.0.10-2
|
||||
|
||||
* Mon Jul 11 2011 Tom Callaway <spot@fedoraproject.org> - 2.0.10-1
|
||||
- update to 2.0.10-1
|
||||
|
||||
|
|
Loading…
Reference in New Issue