- fix compilation for factory add include-linux-if.patch 0001-fix-compilation-warning.patch OBS-URL: https://build.opensuse.org/request/show/327847 OBS-URL: https://build.opensuse.org/package/show/security:netfilter/ebtables?expand=0&rev=37
119 lines
3.6 KiB
RPMSpec
119 lines
3.6 KiB
RPMSpec
#
|
||
# spec file for package ebtables
|
||
#
|
||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||
#
|
||
# All modifications and additions to the file contributed by third parties
|
||
# remain the property of their copyright owners, unless otherwise agreed
|
||
# upon. The license for this file, and modifications and additions to the
|
||
# file, is the same license as for the pristine package itself (unless the
|
||
# license for the pristine package is not an Open Source License, in which
|
||
# case the license is the MIT License). An "Open Source License" is a
|
||
# license that conforms to the Open Source Definition (Version 1.9)
|
||
# published by the Open Source Initiative.
|
||
|
||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||
#
|
||
|
||
|
||
Name: ebtables
|
||
Version: 2.0.10.4
|
||
Release: 0
|
||
Summary: Ethernet Bridge Tables
|
||
License: GPL-2.0+
|
||
Group: Productivity/Networking/Security
|
||
Url: http://ebtables.sf.net/
|
||
|
||
#Git-Clone: git://git.netfilter.org/ebtables
|
||
Source: %name-v2.0.10-4.tar.xz
|
||
Patch0: %name-v2.0.8-makefile.diff
|
||
Patch1: %name-v2.0.8-initscript.diff
|
||
# PATCH-FIX-UPSTREAM bnc#934680 kstreitova@suse.com -- audit patch for CC certification
|
||
Patch2: ebtables-v2.0.10-4-audit.patch
|
||
# PATCH-FIX-UPSTREAM
|
||
Patch3: 0001-fix-compilation-warning.patch
|
||
# PATCH-FIX-SUSE-ONLY
|
||
Patch4: include-linux-if.patch
|
||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||
BuildRequires: linux-glibc-devel >= 2.6.20
|
||
BuildRequires: sed
|
||
BuildRequires: xz
|
||
|
||
%description
|
||
A firewalling tool to transparently filter network traffic passing a
|
||
bridge. The filtering possibilities are limited to link layer filtering
|
||
and some basic filtering on higher network layers. The ebtables tool
|
||
can be used together with the other Linux filtering tools, like
|
||
iptables. There are no incompatibility issues.
|
||
|
||
%prep
|
||
%setup -q -n %name-v2.0.10-4
|
||
%patch -P 0 -P 1 -p0
|
||
%patch2 -p1
|
||
%patch3 -p1
|
||
%patch4 -p1
|
||
# delete all kernel headers, but keep ebt_ip6.h and ebt_nflog.h
|
||
mv include/linux/netfilter_bridge/ebt_ip6.{h,h.save}
|
||
mv include/linux/netfilter_bridge/ebt_nflog.{h,h.save}
|
||
mv include/linux/netfilter_bridge/ebt_ulog.{h,h.save}
|
||
rm -f include/linux/*.h
|
||
rm -f include/linux/netfilter_bridge/*.h
|
||
mv include/linux/netfilter_bridge/ebt_ip6.{h.save,h}
|
||
mv include/linux/netfilter_bridge/ebt_nflog.{h.save,h}
|
||
mv include/linux/netfilter_bridge/ebt_ulog.{h.save,h}
|
||
|
||
%build
|
||
# The way ebtables is built requires ASNEEDED=0 forever [bnc#567267]
|
||
export SUSE_ASNEEDED=0
|
||
make \
|
||
CFLAGS="%optflags" \
|
||
CXXFLAGS="%optflags" \
|
||
LIBDIR="%_libdir/%name" \
|
||
MANDIR="%_mandir" \
|
||
BINDIR="%_sbindir" \
|
||
ETCDIR="%_sysconfdir" \
|
||
INITDIR="%_sysconfdir/init.d" \
|
||
SYSCONFIGDIR="%_sysconfdir"
|
||
|
||
%install
|
||
# The way ebtables is built requires ASNEEDED=0 forever [bnc#567267]
|
||
export SUSE_ASNEEDED=0
|
||
mkdir -p "%buildroot/%_sysconfdir/init.d"
|
||
make \
|
||
DESTDIR="%buildroot" \
|
||
LIBDIR="%_libdir/%name" \
|
||
MANDIR="%_mandir" \
|
||
BINDIR="%_sbindir" \
|
||
ETCDIR="%_sysconfdir" \
|
||
INITDIR="%_sysconfdir/init.d" \
|
||
SYSCONFIGDIR="%_sysconfdir" \
|
||
install
|
||
ln -sf "%_initddir/ebtables" "%buildroot/%_sbindir/rcebtables"
|
||
# not used
|
||
rm -f "%buildroot/%_sysconfdir/ebtables-config"
|
||
|
||
%post
|
||
%fillup_and_insserv ebtables
|
||
|
||
%preun
|
||
%stop_on_removal ebtables
|
||
|
||
%postun
|
||
%restart_on_update ebtables
|
||
%insserv_cleanup
|
||
|
||
%files
|
||
%defattr(-,root,root)
|
||
%doc COPYING ChangeLog
|
||
%doc %_mandir/man8/ebtables.8*
|
||
%config(noreplace) %_sysconfdir/ethertypes
|
||
%_initddir/ebtables
|
||
%dir %_libdir/%name
|
||
%_libdir/%name/*.so
|
||
%_sbindir/ebtables
|
||
%_sbindir/ebtables-restore
|
||
%_sbindir/ebtables-save
|
||
%_sbindir/rcebtables
|
||
|
||
%changelog
|