summaryrefslogtreecommitdiff
path: root/source/n/bridge-utils
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2016-06-30 20:26:57 +0000
committerEric Hameleers <alien@slackware.com>2018-05-31 23:31:18 +0200
commitd31c50870d0bee042ce660e445c9294a59a3a65b (patch)
tree6bfc0de3c95267b401b620c2c67859557dc60f97 /source/n/bridge-utils
parent76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 (diff)
downloadcurrent-d31c50870d0bee042ce660e445c9294a59a3a65b.tar.gz
Slackware 14.2slackware-14.2
Thu Jun 30 20:26:57 UTC 2016 Slackware 14.2 x86_64 stable is released! The long development cycle (the Linux community has lately been living in "interesting times", as they say) is finally behind us, and we're proud to announce the release of Slackware 14.2. The new release brings many updates and modern tools, has switched from udev to eudev (no systemd), and adds well over a hundred new packages to the system. Thanks to the team, the upstream developers, the dedicated Slackware community, and everyone else who pitched in to help make this release a reality. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Have fun! :-)
Diffstat (limited to 'source/n/bridge-utils')
-rw-r--r--source/n/bridge-utils/bridge-utils-1.5-linux_3.8.x.patch30
-rwxr-xr-xsource/n/bridge-utils/bridge-utils.SlackBuild46
-rw-r--r--source/n/bridge-utils/bridge-utils.isbridge.diff12
3 files changed, 57 insertions, 31 deletions
diff --git a/source/n/bridge-utils/bridge-utils-1.5-linux_3.8.x.patch b/source/n/bridge-utils/bridge-utils-1.5-linux_3.8.x.patch
new file mode 100644
index 00000000..0455a908
--- /dev/null
+++ b/source/n/bridge-utils/bridge-utils-1.5-linux_3.8.x.patch
@@ -0,0 +1,30 @@
+commit 5eebb7f9288b7881ffb929b1fd494fe3ac3be27d
+Author: Russell Senior <russell@personaltelco.net>
+Date: Wed Mar 6 12:49:42 2013 -0800
+
+ bridge-utils: Fix compile against linux-3.8.x
+
+ Linux 3.8 has a header, include/uapi/linux/if_bridge.h that uses a
+ struct in6_addr but doesn't define it. The trivial seeming fix of
+ including the header that does define it causes more problems. The
+ problem was discussed on mailing lists in January 2013. The final
+ suggestion I found was here:
+
+ http://www.redhat.com/archives/libvir-list/2013-January/msg01253.html
+
+ This is intended to implement that suggestion.
+
+ Signed-off-by: Russell Senior <russell@personaltelco.net>
+
+diff --git a/libbridge/libbridge.h b/libbridge/libbridge.h
+index 39964f2..dd14bae 100644
+--- a/libbridge/libbridge.h
++++ b/libbridge/libbridge.h
+@@ -20,6 +20,7 @@
+ #define _LIBBRIDGE_H
+
+ #include <sys/socket.h>
++#include <netinet/in.h>
+ #include <linux/if.h>
+ #include <linux/if_bridge.h>
+
diff --git a/source/n/bridge-utils/bridge-utils.SlackBuild b/source/n/bridge-utils/bridge-utils.SlackBuild
index eb31d6ef..4431da20 100755
--- a/source/n/bridge-utils/bridge-utils.SlackBuild
+++ b/source/n/bridge-utils/bridge-utils.SlackBuild
@@ -24,23 +24,25 @@ PKGNAM=bridge-utils
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-1}
-# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
- arm*) export ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$( uname -m ) ;;
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
esac
fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
@@ -50,20 +52,16 @@ else
LIBDIRSUFFIX=""
fi
-CWD=$(pwd)
-TMP=${TMP:-/tmp}
-PKG=$TMP/package-bridge-utils
+NUMJOBS=${NUMJOBS:-" -j7 "}
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf bridge-utils-$VERSION
-tar xzf $CWD/bridge-utils-$VERSION.tar.gz || exit 1
+tar xf $CWD/bridge-utils-$VERSION.tar.xz || exit 1
cd bridge-utils-$VERSION || exit 1
-zcat $CWD/bridge-utils.isbridge.diff.gz | patch -p1 --verbose || exit 1
-
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -71,17 +69,27 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# This is bad form, but what can you do...
-autoconf
+# Apply patches:
+zcat $CWD/bridge-utils-1.5-linux_3.8.x.patch.gz | patch -p1 --verbose || exit 1
-CFLAGS="$SLKCFLAGS" \
+# Configure:
+autoconf
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man
+ --includedir=/usr/include \
+ --with-linux-headers=/usr/include \
+ --mandir=/usr/man || exit 1
+# Build:
make $NUMJOBS || make || exit 1
+
+# Install into package:
make install DESTDIR=$PKG || exit 1
+mkdir -p $PKG/usr/include
+install -m 644 libbridge/libbridge.h $PKG/usr/include
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}
+install -m 644 libbridge/libbridge.a $PKG/usr/lib${LIBDIRSUFFIX}
mkdir -p $PKG/sbin
mv $PKG/usr/sbin/brctl $PKG/sbin/brctl
diff --git a/source/n/bridge-utils/bridge-utils.isbridge.diff b/source/n/bridge-utils/bridge-utils.isbridge.diff
deleted file mode 100644
index b40e4879..00000000
--- a/source/n/bridge-utils/bridge-utils.isbridge.diff
+++ /dev/null
@@ -1,12 +0,0 @@
---- ./libbridge/libbridge_init.c.orig 2008-01-08 17:20:35.000000000 +0100
-+++ ./libbridge/libbridge_init.c 2008-10-23 06:59:58.000000000 +0200
-@@ -49,6 +49,9 @@
- char path[SYSFS_PATH_MAX];
- struct stat st;
-
-+ if(entry->d_name[0] == '.')
-+ return 0;
-+
- snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/bridge", entry->d_name);
- return stat(path, &st) == 0 && S_ISDIR(st.st_mode);
- }