From cdfb9e4bf2706feee766cae336e31ca21a1bd73f Mon Sep 17 00:00:00 2001 From: James Meyer Date: Sun, 16 Feb 2014 17:50:45 -0600 Subject: iproute2, iptables, iputils: update binary path to /usr/bin refs #961 --- abs/core/iproute2/PKGBUILD | 41 ++++++++----- abs/core/iproute2/unwanted-link-help.patch | 17 ++++++ abs/core/iptables/PKGBUILD | 47 ++++++--------- abs/core/iptables/ip6tables | 69 ---------------------- abs/core/iptables/ip6tables.service | 3 +- abs/core/iptables/iptables | 68 --------------------- abs/core/iptables/iptables-1.4.12-fixresore.patch | 28 +++++++++ abs/core/iptables/iptables.conf.d | 12 ---- abs/core/iptables/iptables.service | 3 +- abs/core/iptables/simple_firewall.rules | 2 +- abs/core/iputils/PKGBUILD | 39 +++++------- .../iputils-20101006-ping-integer-overflow.patch | 11 ---- abs/core/iputils/iputils.install | 5 +- 13 files changed, 111 insertions(+), 234 deletions(-) create mode 100644 abs/core/iproute2/unwanted-link-help.patch delete mode 100755 abs/core/iptables/ip6tables delete mode 100755 abs/core/iptables/iptables create mode 100644 abs/core/iptables/iptables-1.4.12-fixresore.patch delete mode 100644 abs/core/iptables/iptables.conf.d delete mode 100644 abs/core/iputils/iputils-20101006-ping-integer-overflow.patch diff --git a/abs/core/iproute2/PKGBUILD b/abs/core/iproute2/PKGBUILD index 471b91e..04ca6df 100644 --- a/abs/core/iproute2/PKGBUILD +++ b/abs/core/iproute2/PKGBUILD @@ -1,36 +1,48 @@ -# $Id: PKGBUILD 162200 2012-06-23 12:13:11Z ronald $ +# $Id: PKGBUILD 199763 2013-11-15 21:24:40Z ronald $ # Maintainer: Ronald van Haren # Contributor: Judd Vinet pkgname=iproute2 -pkgver=3.4.0 -pkgrel=2 +pkgver=3.11.0 +pkgrel=1 pkgdesc="IP Routing Utilities" arch=('i686' 'x86_64') license=('GPL2') url="http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2" -depends=('glibc' 'db') +depends=('glibc' 'db' 'iptables') makedepends=('linux-atm') optdepends=('linux-atm: ATM support') +groups=('base') provides=('iproute') conflicts=('iproute') replaces=('iproute') -options=('!makeflags') +options=('staticlibs' '!makeflags') backup=('etc/iproute2/ematch_map' 'etc/iproute2/rt_dsfield' 'etc/iproute2/rt_protos' \ 'etc/iproute2/rt_realms' 'etc/iproute2/rt_scopes' 'etc/iproute2/rt_tables') source=(http://www.kernel.org/pub/linux/utils/net/$pkgname/$pkgname-$pkgver.tar.xz - iproute2-fhs.patch) -sha1sums=('fcea492dea2f3ecf9d35f279e2f1a7ea6ca0d527' - '35b8cf2dc94b73eccad427235c07596146cd6f6c') + iproute2-fhs.patch + unwanted-link-help.patch) +sha1sums=('efb5ca0688e28967ec146ac37cc728c4f53c9d8f' + '35b8cf2dc94b73eccad427235c07596146cd6f6c' + '3b1335f4025f657f388fbf4e5a740871e3129c2a') -build() { +prepare() { cd $srcdir/$pkgname-$pkgver # set correct fhs structure patch -Np1 -i "$srcdir/iproute2-fhs.patch" - ./configure + # allow operations on links called "h", "he", "hel", "help" + patch -Np1 -i "$srcdir/unwanted-link-help.patch" + + # do not treat warnings as errors + sed -i 's/-Werror//' Makefile +} + +build() { + cd $srcdir/$pkgname-$pkgver + ./configure make } @@ -39,12 +51,11 @@ package() { make DESTDIR="$pkgdir" install - # allow loopback to be started before /usr is mounted, this may not be supported in the future - mkdir -p "$pkgdir/sbin" - mv "$pkgdir/usr/sbin/ip" "$pkgdir/sbin/ip" - ln -s /sbin/ip "$pkgdir/usr/sbin/ip" - # libnetlink isn't installed, install it FS#19385 install -Dm644 include/libnetlink.h "$pkgdir/usr/include/libnetlink.h" install -Dm644 lib/libnetlink.a "$pkgdir/usr/lib/libnetlink.a" + + # usrmove + cd "$pkgdir" + mv usr/sbin usr/bin } diff --git a/abs/core/iproute2/unwanted-link-help.patch b/abs/core/iproute2/unwanted-link-help.patch new file mode 100644 index 0000000..8abe9e3 --- /dev/null +++ b/abs/core/iproute2/unwanted-link-help.patch @@ -0,0 +1,17 @@ +diff -ru iproute2-3.10.0.orig/ip/iplink.c iproute2-3.10.0/ip/iplink.c +--- iproute2-3.10.0.orig/ip/iplink.c 2013-08-08 13:53:33.000000000 -0700 ++++ iproute2-3.10.0/ip/iplink.c 2013-08-08 13:55:03.179865309 -0700 +@@ -467,11 +467,11 @@ + addattr_l(&req->n, sizeof(*req), IFLA_NUM_RX_QUEUES, + &numrxqueues, 4); + } else { ++ if (matches(*argv, "help") == 0) ++ usage(); + if (strcmp(*argv, "dev") == 0) { + NEXT_ARG(); + } +- if (matches(*argv, "help") == 0) +- usage(); + if (*dev) + duparg2("dev", *argv); + *dev = *argv; diff --git a/abs/core/iptables/PKGBUILD b/abs/core/iptables/PKGBUILD index d2c859d..0c65bd1 100644 --- a/abs/core/iptables/PKGBUILD +++ b/abs/core/iptables/PKGBUILD @@ -1,47 +1,41 @@ -# $Id: PKGBUILD 162152 2012-06-22 12:55:41Z dreisner $ +# $Id: PKGBUILD 199764 2013-11-15 21:24:41Z ronald $ # Maintainer: Ronald van Haren # Contributor: Thomas Baechler pkgname=iptables -pkgver=1.4.14 -pkgrel=2 +pkgver=1.4.20 +pkgrel=1 pkgdesc='Linux kernel packet control tool' arch=('i686' 'x86_64') license=('GPL2') url='http://www.netfilter.org/projects/iptables/index.html' depends=('glibc' 'bash') makedepends=('linux-api-headers') -options=('!libtool') -source=("http://www.iptables.org/projects/iptables/files/${pkgname}-${pkgver}.tar.bz2" - iptables - ip6tables +backup=('etc/xtables/connlabel.conf') +source=(http://www.netfilter.org/projects/iptables/files/${pkgname}-${pkgver}.tar.bz2{,.sig} empty.rules simple_firewall.rules - iptables.conf.d empty-filter.rules empty-mangle.rules empty-nat.rules empty-raw.rules empty-security.rules - 0503-extension_cppflags.patch - iptables.service - ip6tables.service - iptables-flush) -backup=(etc/conf.d/iptables) -sha1sums=('daf2972b81e52f562a644798013e946c88319ea3' - '5bb6fa526665cdd728c26f0f282f5a51f220cf88' - '2db68906b603e5268736f48c8e251f3a49da1d75' + 0503-extension_cppflags.patch + iptables.service + ip6tables.service + iptables-flush) +sha1sums=('7219b32657e9f794ff1b5a2476363c59f9c2175c' + 'SKIP' '83b3363878e3660ce23b2ad325b53cbd6c796ecf' - '9907f9e815592837abc7fa3264a401567b7606ab' - 'cdb830137192bbe002c6d01058656bd053ed0ddd' + 'f085a71f467e4d7cb2cf094d9369b0bcc4bab6ec' 'd9f9f06b46b4187648e860afa0552335aafe3ce4' 'c45b738b5ec4cfb11611b984c21a83b91a2d58f3' '1694d79b3e6e9d9d543f6a6e75fed06066c9a6c6' '7db53bb882f62f6c677cc8559cff83d8bae2ef73' 'ebbd1424a1564fd45f455a81c61ce348f0a14c2e' '44626980a52e49f345a0b1e1ca03060f3a35763c' - '5c4eb4ea88c302e8ff98f435a11dd59b00f4d8b9' - 'f1f16f44c6a5547b6f251d13007fe6585761e8b0' + '9306cba67dbeaa004af084a816f66920a6a10faf' + '38fa2ffe7965e63b494d333f69193029c1258c28' 'e7abda09c61142121b6695928d3b71ccd8fdf73a') build() { @@ -55,9 +49,8 @@ build() { ./configure --prefix=/usr \ --libexecdir=/usr/lib/iptables --sysconfdir=/etc \ --with-xtlibdir=/usr/lib/iptables \ - --enable-devel --enable-libipq \ - --enable-shared - + --enable-devel --enable-shared \ + --sbindir=/usr/bin make } @@ -67,18 +60,16 @@ package() { make DESTDIR="${pkgdir}" install cd "${srcdir}" - install -D -m755 iptables "${pkgdir}"/etc/rc.d/iptables - install -D -m755 ip6tables "${pkgdir}"/etc/rc.d/ip6tables install -D -m644 empty.rules "${pkgdir}"/etc/iptables/empty.rules install -D -m644 simple_firewall.rules "${pkgdir}"/etc/iptables/simple_firewall.rules - install -D -m644 iptables.conf.d "${pkgdir}"/etc/conf.d/iptables - mkdir -p "${pkgdir}"/var/lib/iptables + mkdir -p "${pkgdir}"/var/lib/{iptables,ip6tables} install -m644 empty-{filter,mangle,nat,raw,security}.rules "${pkgdir}"/var/lib/iptables + install -m644 empty-{filter,mangle,nat,raw,security}.rules "${pkgdir}"/var/lib/ip6tables # install systemd files install -Dm644 ${srcdir}/iptables.service ${pkgdir}/usr/lib/systemd/system/iptables.service install -Dm644 ${srcdir}/ip6tables.service ${pkgdir}/usr/lib/systemd/system/ip6tables.service - install -Dm755 ${srcdir}/iptables-flush ${pkgdir}/usr/lib/systemd/scripts/iptables-flush + install -Dm755 ${srcdir}/iptables-flush ${pkgdir}/usr/lib/systemd/scripts/iptables-flush } diff --git a/abs/core/iptables/ip6tables b/abs/core/iptables/ip6tables deleted file mode 100755 index 2d119e3..0000000 --- a/abs/core/iptables/ip6tables +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash - -# source application-specific settings -[ -f /etc/conf.d/iptables ] && . /etc/conf.d/iptables - -# Set defaults if settings are missing -[ -z "$IP6TABLES_CONF" ] && IP6TABLES_CONF=/etc/iptables/ip6tables.rules - -. /etc/rc.conf -. /etc/rc.d/functions - -case "$1" in - start) - if [ ! -f "$IP6TABLES_CONF" ]; then - echo "Cannot load ip6tables rules: $IP6TABLES_CONF is missing!" >&2 - exit 1 - fi - stat_busy "Starting IP6 Tables" - if [ "$IPTABLES_FORWARD" = "1" ]; then - echo 1 >/proc/sys/net/ipv6/conf/default/forwarding - echo 1 >/proc/sys/net/ipv6/conf/all/forwarding - fi - if ck_daemon ip6tables; then - /usr/sbin/ip6tables-restore < $IP6TABLES_CONF - if [ $? -gt 0 ]; then - stat_fail - else - add_daemon ip6tables - stat_done - fi - else - stat_fail - fi - ;; - stop) - stat_busy "Stopping IP6 Tables" - if ! ck_daemon ip6tables; then - fail=0 - for table in $(cat /proc/net/ip6_tables_names); do - ip6tables-restore < /var/lib/iptables/empty-$table.rules - [ $? -gt 0 ] && fail=1 - done - if [ $fail -gt 0 ]; then - stat_fail - else - rm_daemon ip6tables - stat_done - fi - else - stat_fail - fi - ;; - restart) - $0 stop - $0 start - ;; - save) - stat_busy "Saving IP6 Tables" - /usr/sbin/ip6tables-save >$IP6TABLES_CONF - if [ $? -gt 0 ]; then - stat_fail - else - stat_done - fi - ;; - *) - echo "usage: $0 {start|stop|restart|save}" -esac -exit 0 diff --git a/abs/core/iptables/ip6tables.service b/abs/core/iptables/ip6tables.service index 9a695f3..7a8d39c 100644 --- a/abs/core/iptables/ip6tables.service +++ b/abs/core/iptables/ip6tables.service @@ -3,7 +3,8 @@ Description=IPv6 Packet Filtering Framework [Service] Type=oneshot -ExecStart=/usr/sbin/ip6tables-restore /etc/iptables/ip6tables.rules +ExecStart=/usr/bin/ip6tables-restore /etc/iptables/ip6tables.rules +ExecReload=/usr/bin/ip6tables-restore /etc/iptables/ip6tables.rules ExecStop=/usr/lib/systemd/scripts/iptables-flush 6 RemainAfterExit=yes diff --git a/abs/core/iptables/iptables b/abs/core/iptables/iptables deleted file mode 100755 index fbb02fa..0000000 --- a/abs/core/iptables/iptables +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash - -# source application-specific settings -[ -f /etc/conf.d/iptables ] && . /etc/conf.d/iptables - -# Set defaults if settings are missing -[ -z "$IPTABLES_CONF" ] && IPTABLES_CONF=/etc/iptables/iptables.rules - -. /etc/rc.conf -. /etc/rc.d/functions - -case "$1" in - start) - if [ ! -f "$IPTABLES_CONF" ]; then - echo "Cannot load iptables rules: $IPTABLES_CONF is missing!" >&2 - exit 1 - fi - stat_busy "Starting IP Tables" - if [ "$IPTABLES_FORWARD" = "1" ]; then - echo 1 >/proc/sys/net/ipv4/ip_forward - fi - if ck_daemon iptables; then - /usr/sbin/iptables-restore < $IPTABLES_CONF - if [ $? -gt 0 ]; then - stat_fail - else - add_daemon iptables - stat_done - fi - else - stat_fail - fi - ;; - stop) - stat_busy "Stopping IP Tables" - if ! ck_daemon iptables; then - fail=0 - for table in $(cat /proc/net/ip_tables_names); do - iptables-restore < /var/lib/iptables/empty-$table.rules - [ $? -gt 0 ] && fail=1 - done - if [ $fail -gt 0 ]; then - stat_fail - else - rm_daemon iptables - stat_done - fi - else - stat_fail - fi - ;; - restart) - $0 stop - $0 start - ;; - save) - stat_busy "Saving IP Tables" - /usr/sbin/iptables-save >$IPTABLES_CONF - if [ $? -gt 0 ]; then - stat_fail - else - stat_done - fi - ;; - *) - echo "usage: $0 {start|stop|restart|save}" -esac -exit 0 diff --git a/abs/core/iptables/iptables-1.4.12-fixresore.patch b/abs/core/iptables/iptables-1.4.12-fixresore.patch new file mode 100644 index 0000000..94358f7 --- /dev/null +++ b/abs/core/iptables/iptables-1.4.12-fixresore.patch @@ -0,0 +1,28 @@ +diff -Nur iptables-1.4.12.2/iptables/ip6tables-restore.c iptables-1.4.12.2-fixrestore/iptables/ip6tables-restore.c +--- iptables-1.4.12.2/iptables/ip6tables-restore.c 2012-01-03 02:19:09.000000000 +0900 ++++ iptables-1.4.12.2-fixrestore/iptables/ip6tables-restore.c 2012-03-01 10:56:10.000000000 +0900 +@@ -380,9 +380,9 @@ + quote_open = 0; + escaped = 0; + param_len = 0; ++ char param_buffer[1024]; + + for (curchar = parsestart; *curchar; curchar++) { +- char param_buffer[1024]; + + if (quote_open) { + if (escaped) { +diff -Nur iptables-1.4.12.2/iptables/iptables-restore.c iptables-1.4.12.2-fixrestore/iptables/iptables-restore.c +--- iptables-1.4.12.2/iptables/iptables-restore.c 2012-01-03 02:19:09.000000000 +0900 ++++ iptables-1.4.12.2-fixrestore/iptables/iptables-restore.c 2012-03-01 10:56:00.000000000 +0900 +@@ -377,9 +377,9 @@ + quote_open = 0; + escaped = 0; + param_len = 0; ++ char param_buffer[1024]; + + for (curchar = parsestart; *curchar; curchar++) { +- char param_buffer[1024]; + + if (quote_open) { + if (escaped) { diff --git a/abs/core/iptables/iptables.conf.d b/abs/core/iptables/iptables.conf.d deleted file mode 100644 index 1c6cc7b..0000000 --- a/abs/core/iptables/iptables.conf.d +++ /dev/null @@ -1,12 +0,0 @@ -# Configuration for iptables rules -IPTABLES_CONF=/etc/iptables/iptables.rules -IP6TABLES_CONF=/etc/iptables/ip6tables.rules - -# Enable IP forwarding (both IPv4 and IPv6) -# NOTE: this is not the recommended way to do this, and is supported only for -# backward compatibility. Instead, use /etc/sysctl.conf and set the following -# options: -# * net.ipv4.ip_forward=1 -# * net.ipv6.conf.default.forwarding=1 -# * net.ipv6.conf.all.forwarding=1 -#IPTABLES_FORWARD=0 diff --git a/abs/core/iptables/iptables.service b/abs/core/iptables/iptables.service index 3084f53..5441e45 100644 --- a/abs/core/iptables/iptables.service +++ b/abs/core/iptables/iptables.service @@ -3,7 +3,8 @@ Description=Packet Filtering Framework [Service] Type=oneshot -ExecStart=/usr/sbin/iptables-restore /etc/iptables/iptables.rules +ExecStart=/usr/bin/iptables-restore /etc/iptables/iptables.rules +ExecReload=/usr/bin/iptables-restore /etc/iptables/iptables.rules ExecStop=/usr/lib/systemd/scripts/iptables-flush RemainAfterExit=yes diff --git a/abs/core/iptables/simple_firewall.rules b/abs/core/iptables/simple_firewall.rules index e1604cc..63426b0 100644 --- a/abs/core/iptables/simple_firewall.rules +++ b/abs/core/iptables/simple_firewall.rules @@ -3,7 +3,7 @@ :FORWARD DROP [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -p icmp -j ACCEPT --A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -p tcp -j REJECT --reject-with tcp-reset -A INPUT -p udp -j REJECT --reject-with icmp-port-unreachable diff --git a/abs/core/iputils/PKGBUILD b/abs/core/iputils/PKGBUILD index e72795d..9e017fa 100644 --- a/abs/core/iputils/PKGBUILD +++ b/abs/core/iputils/PKGBUILD @@ -1,15 +1,15 @@ -# $Id: PKGBUILD 163489 2012-07-13 11:24:04Z stephane $ +# $Id: PKGBUILD 192554 2013-08-14 06:31:20Z tpowa $ # Maintainer: Stéphane Gaudreault # Maintainer: Tobias Powalowski # Contributor: Aaron Griffin pkgname=iputils -pkgver=20101006 -pkgrel=4 -pkgdesc="IP Configuration Utilities (and Ping)" +pkgver=20121221 +pkgrel=3 +pkgdesc="Network monitoring tools, including ping" arch=('i686' 'x86_64') license=('GPL') -url="http://www.linuxfoundation.org/en/Net:Iputils" +url="http://www.skbuff.net/iputils/" groups=('base') depends=('openssl' 'sysfsutils' 'libcap') optdepends=('xinetd: for tftpd') @@ -18,22 +18,15 @@ conflicts=('netkit-base' 'arping' 'netkit-tftpd') replaces=('netkit-base') backup=(etc/xinetd.d/tftp) install=${pkgname}.install -source=(http://www.skbuff.net/${pkgname}/${pkgname}-s${pkgver}.tar.bz2 tftp.xinetd - iputils-20101006-ping-integer-overflow.patch) -sha1sums=('a08cc5423a7bf940205f2353fe3d129cd39ff242' - 'fc2ae26f5609725e3f4aeaf4ab82dfa6d2e378fd' - 'ec78574d798b53e4f8bdd37e42514fc17ed71667') +source=(http://www.skbuff.net/${pkgname}/${pkgname}-s${pkgver}.tar.bz2 + tftp.xinetd) +sha1sums=('4d56d8c75d6a5d58f052e4056e975f01ebab9ba9' + 'fc2ae26f5609725e3f4aeaf4ab82dfa6d2e378fd') build() { cd "${srcdir}/${pkgname}-s${pkgver}" - # Use our CFLAGS - sed -i -e "/^CCOPT=/s|-O2|${CFLAGS}|" Makefile - - # FS#28897 - patch -Np1 -i ../iputils-20101006-ping-integer-overflow.patch - - make + make USE_GNUTLS=no CCOPTOPT="$CFLAGS" cd doc for file in *.sgml; do @@ -47,16 +40,14 @@ build() { package() { cd "${srcdir}/${pkgname}-s${pkgver}" - install -dm755 "${pkgdir}"/usr/{bin,sbin} "${pkgdir}"/bin + install -dm755 "${pkgdir}"/usr/bin - install -m755 arping clockdiff rarpd rdisc tftpd tracepath tracepath6 \ - "${pkgdir}"/usr/sbin/ + install -m755 arping clockdiff rarpd rdisc tftpd tracepath tracepath6 "${pkgdir}"/usr/bin/ install -m755 ping{,6} "${pkgdir}"/usr/bin/ - ln -sf /usr/bin/ping{,6} "${pkgdir}"/bin/ - install -dm755 "${pkgdir}"/usr/share/man/man8 - install -m644 doc/{arping,clockdiff,ping,rarpd,rdisc,tftpd,tracepath}.8 \ + install -dm755 "${pkgdir}"/usr/share/man/man8 + install -m644 doc/{arping,clockdiff,ping,rarpd,rdisc,tftpd,tracepath}.8 \ "${pkgdir}"/usr/share/man/man8/ cd "${pkgdir}"/usr/share/man/man8 @@ -67,5 +58,3 @@ package() { install -dm755 "${pkgdir}"/etc/xinetd.d/ install -m644 "${srcdir}"/tftp.xinetd "${pkgdir}"/etc/xinetd.d/tftp } - -# vim:set ts=2 sw=2 et: diff --git a/abs/core/iputils/iputils-20101006-ping-integer-overflow.patch b/abs/core/iputils/iputils-20101006-ping-integer-overflow.patch deleted file mode 100644 index 720e5e8..0000000 --- a/abs/core/iputils/iputils-20101006-ping-integer-overflow.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- iputils-s20101006/ping_common.c 2010-10-06 13:59:20.000000000 +0200 -+++ iputils-s20101006-patched/ping_common.c 2012-03-09 16:42:46.878151032 +0100 -@@ -590,7 +590,7 @@ - - /* If we are here, recvmsg() is unable to wait for - * required timeout. */ -- if (1000*next <= 1000000/(int)HZ) { -+ if (((uint64_t)1000*next) <= (uint64_t)1000000/(int)HZ) { - /* Very short timeout... So, if we wait for - * something, we sleep for MININTERVAL. - * Otherwise, spin! */ diff --git a/abs/core/iputils/iputils.install b/abs/core/iputils/iputils.install index 2481fb3..8e5159e 100644 --- a/abs/core/iputils/iputils.install +++ b/abs/core/iputils/iputils.install @@ -1,7 +1,6 @@ post_install() { - setcap cap_net_raw=ep usr/bin/ping - setcap cap_net_raw=ep usr/bin/ping6 - echo " >> Traceroute is now provided by core/traceroute" + setcap cap_net_raw=ep usr/bin/ping 2>/dev/null || chmod +s usr/bin/ping + setcap cap_net_raw=ep usr/bin/ping6 2>/dev/null || chmod +s usr/bin/ping6 } post_upgrade() { -- cgit v0.12