[arch-commits] Commit in ebtables/repos (5 files)
Felix Yan
felixonmars at archlinux.org
Sat May 16 12:00:14 UTC 2020
Date: Saturday, May 16, 2020 @ 12:00:13
Author: felixonmars
Revision: 384403
archrelease: copy trunk to staging-x86_64
Added:
ebtables/repos/staging-x86_64/
ebtables/repos/staging-x86_64/PKGBUILD
(from rev 384401, ebtables/trunk/PKGBUILD)
ebtables/repos/staging-x86_64/ebtables.install
(from rev 384401, ebtables/trunk/ebtables.install)
ebtables/repos/staging-x86_64/ebtables.service
(from rev 384401, ebtables/trunk/ebtables.service)
ebtables/repos/staging-x86_64/ebtables.systemd
(from rev 384401, ebtables/trunk/ebtables.systemd)
------------------+
PKGBUILD | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
ebtables.install | 9 +++++++++
ebtables.service | 13 +++++++++++++
ebtables.systemd | 21 +++++++++++++++++++++
4 files changed, 96 insertions(+)
Copied: ebtables/repos/staging-x86_64/PKGBUILD (from rev 384401, ebtables/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD (rev 0)
+++ staging-x86_64/PKGBUILD 2020-05-16 12:00:13 UTC (rev 384403)
@@ -0,0 +1,53 @@
+# Maintainer: Sébastien Luttringer
+# Contributor: Michal Soltys <soltys at ziu.info>
+
+pkgname=ebtables
+pkgver=2.0.10_4
+pkgrel=8
+pkgdesc='Ethernet bridge filtering utilities'
+arch=('x86_64')
+url='http://ebtables.sourceforge.net/'
+depends=('perl' 'bash' 'iptables')
+license=('GPL2')
+backup=("etc/$pkgname.conf")
+# ebtables segfault with --as-needed
+options=('!buildflags')
+install=$pkgname.install
+source=("https://downloads.sourceforge.net/${pkgname}/${pkgname}-v${pkgver/_/-}.tar.gz"
+ "$pkgname.systemd"
+ "$pkgname.service")
+md5sums=('506742a3d44b9925955425a659c1a8d0'
+ 'b4c329060809e5b290ae49fbd0ad61f2'
+ '5fc546b232c8e4d66058031ddde71b2f')
+
+build() {
+ cd $pkgname-v${pkgver/_/-}
+ make CFLAGS='-Wunused -Wall -Werror -Wno-error=unused-but-set-variable'
+}
+
+package() {
+ pushd $pkgname-v${pkgver/_/-}
+ make install \
+ DESTDIR="$pkgdir" \
+ LIBDIR=/usr/lib \
+ MANDIR=/usr/share/man \
+ BINDIR=/usr/bin \
+ INITDIR=/etc/rc.d \
+ SYSCONFIGDIR=/etc
+ popd
+ # rm package ebtables rc.d scripts
+ rm "$pkgdir/etc/ebtables-config"
+ rm -r "$pkgdir/etc/rc.d"
+ # systemd
+ install -Dm 755 $pkgname.systemd \
+ "$pkgdir/usr/lib/systemd/scripts/$pkgname"
+ install -Dm 644 $pkgname.service \
+ "$pkgdir/usr/lib/systemd/system/$pkgname.service"
+ # default config file
+ install -Dm 644 /dev/null "$pkgdir/etc/$pkgname.conf"
+ # since iptables 1.6.0 /etc/ethertype is provided by iptables
+ # see https://bugs.archlinux.org/task/48648
+ rm "$pkgdir/etc/ethertypes"
+}
+
+# vim:set ts=2 sw=2 et:
Copied: ebtables/repos/staging-x86_64/ebtables.install (from rev 384401, ebtables/trunk/ebtables.install)
===================================================================
--- staging-x86_64/ebtables.install (rev 0)
+++ staging-x86_64/ebtables.install 2020-05-16 12:00:13 UTC (rev 384403)
@@ -0,0 +1,9 @@
+## arg 1: the new package version
+## arg 2: the old package version
+post_upgrade() {
+ (( $(vercmp "$2" '2.0.10_4-1') > 0 )) || cat <<EOF
+Config file have been moved to /etc/ebtables.conf and only support text format.
+EOF
+}
+
+# vim:set ts=2 sw=2 ft=sh et:
Copied: ebtables/repos/staging-x86_64/ebtables.service (from rev 384401, ebtables/trunk/ebtables.service)
===================================================================
--- staging-x86_64/ebtables.service (rev 0)
+++ staging-x86_64/ebtables.service 2020-05-16 12:00:13 UTC (rev 384403)
@@ -0,0 +1,13 @@
+[Unit]
+Description=Ethernet bridge table
+Before=network-pre.target
+Wants=network-pre.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/lib/systemd/scripts/ebtables start
+ExecStop=/usr/lib/systemd/scripts/ebtables stop
+
+[Install]
+WantedBy=multi-user.target
Copied: ebtables/repos/staging-x86_64/ebtables.systemd (from rev 384401, ebtables/trunk/ebtables.systemd)
===================================================================
--- staging-x86_64/ebtables.systemd (rev 0)
+++ staging-x86_64/ebtables.systemd 2020-05-16 12:00:13 UTC (rev 384403)
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+CONFIG_FILE='/etc/ebtables.conf'
+
+case $1 in
+ start)
+ ebtables-restore < "$CONFIG_FILE"
+ ;;
+ stop)
+ ebtables -F
+ ;;
+ save)
+ ebtables-save > "$CONFIG_FILE"
+ ;;
+ *)
+ echo "usage: ${0##*/} {start|stop|save}" >&2
+ exit 1
+ ;;
+esac
+
+# vim:set ts=2 sw=2 ft=sh et:
More information about the arch-commits
mailing list