- moved ebtables modules to /lib[64]/ebtables (rhbz#558886)
- fixed init script to be lsb conform (rhbz#536828) - fixed download link according to package review
This commit is contained in:
parent
e6165e3cd1
commit
409c505094
|
@ -0,0 +1,106 @@
|
||||||
|
diff -up ebtables-v2.0.9-1/ebtables.sysv.lsb ebtables-v2.0.9-1/ebtables.sysv
|
||||||
|
--- ebtables-v2.0.9-1/ebtables.sysv.lsb 2010-01-15 11:39:31.000000000 +0100
|
||||||
|
+++ ebtables-v2.0.9-1/ebtables.sysv 2010-01-15 12:52:24.000000000 +0100
|
||||||
|
@@ -18,9 +18,9 @@ source /etc/sysconfig/network
|
||||||
|
# Check that networking is up.
|
||||||
|
[ ${NETWORKING} = "no" ] && exit 0
|
||||||
|
|
||||||
|
-[ -x __EXEC_PATH__/ebtables ] || exit 1
|
||||||
|
-[ -x __EXEC_PATH__/ebtables-save ] || exit 1
|
||||||
|
-[ -x __EXEC_PATH__/ebtables-restore ] || exit 1
|
||||||
|
+[ -x __EXEC_PATH__/ebtables ] || exit 5
|
||||||
|
+[ -x __EXEC_PATH__/ebtables-save ] || exit 5
|
||||||
|
+[ -x __EXEC_PATH__/ebtables-restore ] || exit 5
|
||||||
|
|
||||||
|
RETVAL=0
|
||||||
|
prog="ebtables"
|
||||||
|
@@ -39,6 +39,7 @@ config=__SYSCONFIG__/$prog-config
|
||||||
|
[ -f "$config" ] && . "$config"
|
||||||
|
|
||||||
|
start() {
|
||||||
|
+ [ "$EUID" != "0" ] && exit 4
|
||||||
|
echo -n $"Starting $desc ($prog): "
|
||||||
|
if [ "$EBTABLES_BINARY_FORMAT" = "yes" ]; then
|
||||||
|
for table in $(ls __SYSCONFIG__/ebtables.* 2>/dev/null | sed -e 's/.*ebtables\.//' -e '/save/d' ); do
|
||||||
|
@@ -50,7 +51,7 @@ start() {
|
||||||
|
|
||||||
|
if [ $RETVAL -eq 0 ]; then
|
||||||
|
success "$prog startup"
|
||||||
|
- rm -f /var/lock/subsys/$prog
|
||||||
|
+ touch "/var/lock/subsys/$prog"
|
||||||
|
else
|
||||||
|
failure "$prog startup"
|
||||||
|
fi
|
||||||
|
@@ -58,6 +59,7 @@ start() {
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
+ [ "$EUID" != "0" ] && exit 4
|
||||||
|
echo -n $"Stopping $desc ($prog): "
|
||||||
|
for table in $(grep '^ebtable_' /proc/modules | sed -e 's/ebtable_\([^ ]*\).*/\1/'); do
|
||||||
|
__EXEC_PATH__/ebtables -t $table --init-table || RETVAL=1
|
||||||
|
@@ -71,7 +73,7 @@ stop() {
|
||||||
|
|
||||||
|
if [ $RETVAL -eq 0 ]; then
|
||||||
|
success "$prog shutdown"
|
||||||
|
- rm -f /var/lock/subsys/$prog
|
||||||
|
+ rm -f "/var/lock/subsys/$prog"
|
||||||
|
else
|
||||||
|
failure "$prog shutdown"
|
||||||
|
fi
|
||||||
|
@@ -79,11 +81,13 @@ stop() {
|
||||||
|
}
|
||||||
|
|
||||||
|
restart() {
|
||||||
|
+ [ "$EBTABLES_SAVE_ON_RESTART" = "yes" ] && save
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
}
|
||||||
|
|
||||||
|
save() {
|
||||||
|
+ [ "$EUID" != "0" ] && exit 4
|
||||||
|
echo -n $"Saving $desc ($prog): "
|
||||||
|
if [ "$EBTABLES_TEXT_FORMAT" = "yes" ]; then
|
||||||
|
if [ -e __SYSCONFIG__/ebtables ]; then
|
||||||
|
@@ -116,30 +120,34 @@ save() {
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
+ [ -f "/var/lock/subsys/$prog" ] && exit 0
|
||||||
|
start
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
[ "$EBTABLES_SAVE_ON_STOP" = "yes" ] && save
|
||||||
|
stop
|
||||||
|
;;
|
||||||
|
- restart|reload)
|
||||||
|
- [ "$EBTABLES_SAVE_ON_RESTART" = "yes" ] && save
|
||||||
|
+ restart|force-reload)
|
||||||
|
restart
|
||||||
|
;;
|
||||||
|
- condrestart)
|
||||||
|
- [ -e /var/lock/subsys/$prog ] && restart
|
||||||
|
- RETVAL=$?
|
||||||
|
+ reload)
|
||||||
|
+ [ ! -f "/var/lock/subsys/$prog" ] && exit 7
|
||||||
|
+ restart
|
||||||
|
+ ;;
|
||||||
|
+ condrestart|try-restart)
|
||||||
|
+ [ ! -e "/var/lock/subsys/$prog" ] && exit 0
|
||||||
|
+ restart
|
||||||
|
;;
|
||||||
|
save)
|
||||||
|
save
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
+ [ -f "/var/lock/subsys/$prog" ] && RETVAL=0 || RETVAL=3
|
||||||
|
__EXEC_PATH__/ebtables-save
|
||||||
|
- RETVAL=$?
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo $"Usage $0 {start|stop|restart|condrestart|save|status}"
|
||||||
|
- RETVAL=1
|
||||||
|
+ RETVAL=2
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit $RETVAL
|
|
@ -1,17 +1,18 @@
|
||||||
Name: ebtables
|
Name: ebtables
|
||||||
Version: 2.0.9
|
Version: 2.0.9
|
||||||
Release: 2%{?dist}
|
Release: 4%{?dist}
|
||||||
Summary: Ethernet Bridge frame table administration tool
|
Summary: Ethernet Bridge frame table administration tool
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
URL: http://ebtables.sourceforge.net/
|
URL: http://ebtables.sourceforge.net/
|
||||||
Source0: http://dl.sourceforge.net/ebtables/ebtables-v%{version}-1.tar.gz
|
Source0: http://downloads.sourceforge.net/ebtables/ebtables-v%{version}-1.tar.gz
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
Requires(pre): /sbin/chkconfig
|
Requires(pre): /sbin/chkconfig
|
||||||
Requires(postun): /sbin/service
|
Requires(postun): /sbin/service
|
||||||
Patch0: ebtables-2.0.8-norootinst.patch
|
Patch0: ebtables-2.0.8-norootinst.patch
|
||||||
Patch1: ebtables-2.0.8-cflags.patch
|
Patch1: ebtables-2.0.8-cflags.patch
|
||||||
Patch2: ebtables-2.0.8-buildid.patch
|
Patch2: ebtables-2.0.8-buildid.patch
|
||||||
|
Patch3: ebtables-2.0.9-lsb.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Ethernet bridge tables is a firewalling tool to transparently filter network
|
Ethernet bridge tables is a firewalling tool to transparently filter network
|
||||||
|
@ -29,19 +30,20 @@ like iptables. There are no known incompatibility issues.
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
|
%patch3 -p1 -b .lsb
|
||||||
|
|
||||||
# Convert to UTF-8
|
# Convert to UTF-8
|
||||||
f=THANKS; iconv -f iso-8859-1 -t utf-8 $f -o $f.utf8 ; mv $f.utf8 $f
|
f=THANKS; iconv -f iso-8859-1 -t utf-8 $f -o $f.utf8 ; mv $f.utf8 $f
|
||||||
|
|
||||||
%build
|
%build
|
||||||
MY_CFLAGS=`echo $RPM_OPT_FLAGS -fPIC | sed -e 's/-fstack-protector//g'`
|
MY_CFLAGS=`echo $RPM_OPT_FLAGS -fPIC | sed -e 's/-fstack-protector//g'`
|
||||||
make %{?_smp_mflags} CFLAGS="$MY_CFLAGS" LIBDIR="%{_libdir}/ebtables" BINDIR="/sbin" MANDIR="%{_mandir}"
|
make %{?_smp_mflags} CFLAGS="$MY_CFLAGS" LIBDIR="/%{_lib}/ebtables" BINDIR="/sbin" MANDIR="%{_mandir}"
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
|
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
|
||||||
make DESTDIR="$RPM_BUILD_ROOT" LIBDIR="%{_libdir}/ebtables" BINDIR="/sbin" MANDIR="%{_mandir}" install
|
make DESTDIR="$RPM_BUILD_ROOT" LIBDIR="/%{_lib}/ebtables" BINDIR="/sbin" MANDIR="%{_mandir}" install
|
||||||
touch $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ebtables.filter
|
touch $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ebtables.filter
|
||||||
touch $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ebtables.nat
|
touch $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ebtables.nat
|
||||||
touch $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ebtables.broute
|
touch $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ebtables.broute
|
||||||
|
@ -72,13 +74,20 @@ fi
|
||||||
%config(noreplace) %{_sysconfdir}/ethertypes
|
%config(noreplace) %{_sysconfdir}/ethertypes
|
||||||
%config(noreplace) %{_sysconfdir}/sysconfig/ebtables-config
|
%config(noreplace) %{_sysconfdir}/sysconfig/ebtables-config
|
||||||
%{_initrddir}/ebtables
|
%{_initrddir}/ebtables
|
||||||
%{_libdir}/ebtables/
|
/%{_lib}/ebtables/
|
||||||
/sbin/ebtables*
|
/sbin/ebtables*
|
||||||
%ghost %{_sysconfdir}/sysconfig/ebtables.filter
|
%ghost %{_sysconfdir}/sysconfig/ebtables.filter
|
||||||
%ghost %{_sysconfdir}/sysconfig/ebtables.nat
|
%ghost %{_sysconfdir}/sysconfig/ebtables.nat
|
||||||
%ghost %{_sysconfdir}/sysconfig/ebtables.broute
|
%ghost %{_sysconfdir}/sysconfig/ebtables.broute
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jan 29 2010 Thomas Woerner <twoerner@redhat.com> - 2.0.9-4
|
||||||
|
- moved ebtables modules to /lib[64]/ebtables (rhbz#558886)
|
||||||
|
|
||||||
|
* Fri Jan 15 2010 Thomas Woerner <twoerner@redhat.com> - 2.0.9-3
|
||||||
|
- fixed init script to be lsb conform (rhbz#536828)
|
||||||
|
- fixed download link according to package review
|
||||||
|
|
||||||
* Wed Aug 19 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 2.0.9-2
|
* Wed Aug 19 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 2.0.9-2
|
||||||
- fix source0 url
|
- fix source0 url
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue