Skip to content

Commit

Permalink
Bug appneta#430 libopts version hell (appneta#518)
Browse files Browse the repository at this point in the history
* Bug appneta#430 Upgrade libopts to 5.18.12

Original bug was attempting to build on machine with
libopts 5.18.7 while the tarball contained version
5.18.4.  This caused a conflict that is internal
to libopts.

Originally I was building release tarballs on Debian 8
Jessie, which has libopts 5.18.4. Now I plan to build
on Debian 9 Stretch which uses libopts 5.18.12.

This commit upgrades libopts to 5.18.12, but also
includes some updates (some found in GnuTLS package):

* add AC_LANG_SOURCE to libopts.m4 to make autogen.sh less noisy
* fix build failure due to verify.h include in intprops.h
* add support for libdumbnet in place of libdnet on Ubuntu/Debian
* test for SIZEOF_LONG instead of SIZEOF_CHARP to fix 32-bit PPC builds

* Bug appneta#430 update CHANGELOG

* Bug appneta#430 travis enable local libopts
  • Loading branch information
fklassen authored Oct 26, 2018
1 parent d057c06 commit 1fd4d09
Show file tree
Hide file tree
Showing 65 changed files with 1,128 additions and 952 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ matrix:

script:
- autoreconf -iv > build.log 2>&1 || (cat build.log && exit 1)
- ${CI_BUILD_PREFIX} ./configure --disable-local-libopts > build.log 2>&1 || (cat build.log && exit 1)
- ${CI_BUILD_PREFIX} ./configure --enable-local-libopts > build.log 2>&1 || (cat build.log && exit 1)
- ${CI_BUILD_PREFIX} make > build.log 2>&1 || (cat build.log && exit 1)
- make dist > build.log 2>&1 || (cat build.log && exit 1)
- sudo make test || (cat test/test.log && exit 1)
53 changes: 38 additions & 15 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ AC_INIT([tcpreplay],[4.3.0-beta2],
AC_CONFIG_SRCDIR([src/tcpreplay.c])
AM_CONFIG_HEADER([src/config.h])
AC_CONFIG_AUX_DIR(config)
AM_MAINTAINER_MODE
AX_CODE_COVERAGE
AM_MAINTAINER_MODE([enable])
AM_WITH_DMALLOC

dnl People building from GitHub need the same version of Autogen as I'm using
dnl or specify --disable-local-libopts to force using the locally-installed
dnl copy of libopts rather than the source in the `./liopts/` directory.
MAINTAINER_AUTOGEN_VERSION=5.18.4
MAINTAINER_AUTOGEN_VERSION=5.18.12

AC_CONFIG_MACRO_DIR([m4])

Expand Down Expand Up @@ -144,10 +145,11 @@ else
fi


AM_INIT_AUTOMAKE([foreign])
AM_SILENT_RULES([yes])
AM_INIT_AUTOMAKE([foreign subdir-objects no-dist-gzip dist-xz -Wall -Wno-override])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

dnl Checks for programs.
AM_PROG_AR
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AC_PROG_CC
Expand Down Expand Up @@ -193,6 +195,9 @@ if test -n "${AUTOGEN}" ; then
AUTOGEN_MAJOR=$(echo ${AUTOGEN_VERSION} | ${CUT} -d '.' -f 1)
AUTOGEN_MINOR=$(echo ${AUTOGEN_VERSION} | ${CUT} -d '.' -f 2)
AUTOGEN_BUILD=$(echo ${AUTOGEN_VERSION} | ${CUT} -d '.' -f 3)
if test -z "$AUTOGEN_BUILD"; then
AUTOGEN_BUILD=0
fi
if (test ${AUTOGEN_MAJOR} -eq 5 && test ${AUTOGEN_MINOR} -eq 18 && test ${AUTOGEN_BUILD} -lt 4) ||
(test ${AUTOGEN_MAJOR} -eq 5 && test ${AUTOGEN_MINOR} -lt 18) ||
test ${AUTOGEN_MAJOR} -lt 5 ; then
Expand Down Expand Up @@ -369,7 +374,6 @@ AM_CONDITIONAL(SYSTEM_STRLCPY, [test x$have_strlcpy = xtrue])
AC_C_BIGENDIAN
AM_CONDITIONAL([WORDS_BIGENDIAN], [ test x$ac_cv_c_bigendian = xyes ])


dnl Enable debugging in code/compiler options
debug=no
debug_flag=NDEBUG
Expand Down Expand Up @@ -1437,6 +1441,8 @@ dnl # getting it from ...
dnl # http://libdnet.sourceforge.net/
dnl # ... or ...
dnl # https://github.com/jncornett/libdnet
dnl # ... or ...
dnl # on Linux try 'apt-get install libdumbnet-dev'
dnl ##################################################
founddnet=no
have_libdnet=no
Expand All @@ -1450,14 +1456,31 @@ if test $have_cygwin = no ; then
AC_HELP_STRING([--with-libdnet=DIR], [Use libdnet in DIR]),
[trydnetdir=$withval])

for testdir in $trydnetdir /usr/local /opt/local $MACOSX_SDK_PATH/usr /usr ; do
if test -x ${testdir}/bin/dnet-config -a $founddnet = no ; then
LDNETINC="$($testdir/bin/dnet-config --cflags)"
LDNETLIB="$($testdir/bin/dnet-config --libs)"
libdnet_version="$($testdir/bin/dnet-config --version)"
founddnet=$testdir
fi
done
case "$build_os" in
linux*)
dnl # Debian/Ubuntu already have a package called libdnet
dnl # so you the package you want to install libdumbnet-dev
for testdir in $trydnetdir /usr/local /opt/local /usr ; do
if test -x ${testdir}/bin/dumbnet-config -a $founddnet = no ; then
LDNETINC="$($testdir/bin/dumbnet-config --cflags)"
LDNETLIB="$($testdir/bin/dumbnet-config --libs)"
libdnet_version="$($testdir/bin/dumbnet-config --version)"
founddnet=$testdir
fi
done
;;
esac

if test $founddnet = no ; then
for testdir in $trydnetdir /usr/local /opt/local $MACOSX_SDK_PATH/usr /usr ; do
if test -x ${testdir}/bin/dnet-config -a $founddnet = no ; then
LDNETINC="$($testdir/bin/dnet-config --cflags)"
LDNETLIB="$($testdir/bin/dnet-config --libs)"
libdnet_version="$($testdir/bin/dnet-config --version)"
founddnet=$testdir
fi
done
fi

if test $founddnet = no ; then
AC_MSG_RESULT(no)
Expand Down Expand Up @@ -1895,7 +1918,7 @@ AC_CONFIG_FILES([Makefile
AC_OUTPUT

# Configuration results
AC_MSG_RESULT(
AC_MSG_RESULT([
##########################################################################
TCPREPLAY Suite Configuration Results (${TCPREPLAY_VERSION})
##########################################################################
Expand Down Expand Up @@ -1923,7 +1946,7 @@ Tuntap device support: ${have_tuntap}
* In order of preference; see configure --help to override
** Required for tcpbridge
)
])


case $host in
Expand Down
1 change: 1 addition & 0 deletions docs/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- Jumbo frame support for fragroute option (#466)
- TCP sequence edit ACK corruption (#451)
- TCP sequence number edit initial SYN packet should have zero ACK (#450)
- Upgrade libopts to 5.18.12 to address version build issues (#430)
- Add ability to change tcp SEQ/ACK numbers (#425)
- Fails to open tap0 on Zephyr (#411)
- CVE-2018-13112 heap-buffer-overflow in get_l2len (#477 dup #408)
Expand Down
2 changes: 1 addition & 1 deletion libopts/COPYING.gplv3
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

Expand Down
2 changes: 1 addition & 1 deletion libopts/COPYING.lgplv3
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

Expand Down
1 change: 1 addition & 0 deletions libopts/COPYING.mbsd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

Expand Down
12 changes: 6 additions & 6 deletions libopts/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ noinst_LTLIBRARIES = libopts.la
endif
libopts_la_SOURCES = libopts.c
libopts_la_CPPFLAGS = -I$(srcdir)
libopts_la_LDFLAGS = -version-info 41:0:16
libopts_la_LDFLAGS = -version-info 41:1:16
EXTRA_DIST =
BUILT_SOURCES =
MOSTLYCLEANFILES =
Expand Down Expand Up @@ -40,11 +40,11 @@ EXTRA_DIST += \
COPYING.gplv3 COPYING.lgplv3 COPYING.mbsd \
MakeDefs.inc README ag-char-map.h \
alias.c ao-strs.c ao-strs.h \
autoopts/options.h autoopts/project.h autoopts/usage-txt.h \
autoopts.c autoopts.h boolean.c \
check.c compat/strdup.c compat/snprintf.c \
compat/compat.h compat/_Noreturn.h compat/pathfind.c \
compat/windows-config.h compat/strchr.c configfile.c \
autoopts.c autoopts.h autoopts/options.h \
autoopts/project.h autoopts/usage-txt.h boolean.c \
check.c compat/_Noreturn.h compat/compat.h \
compat/pathfind.c compat/snprintf.c compat/strchr.c \
compat/strdup.c compat/windows-config.h configfile.c \
cook.c enum.c env.c \
file.c find.c genshell.c \
genshell.h gettext.h init.c \
Expand Down
2 changes: 1 addition & 1 deletion libopts/README
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ These macros work as follows:

LICENSING:

This material is Copyright (C) 1992-2014 by Bruce Korb. You are
This material is Copyright (C) 1992-2015 by Bruce Korb. You are
licensed to use this under the terms of either the GNU Lesser General
Public License (see: COPYING.lgpl), or, at your option, the modified
Berkeley Software Distribution License (see: COPYING.mbsd). Both of
Expand Down
4 changes: 2 additions & 2 deletions libopts/ag-char-map.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
* 29 bits for 46 character classifications
* generated by char-mapper on 08/30/14 at 10:36:23
* generated by char-mapper on 08/29/16 at 14:35:22
*
* This file contains the character classifications
* used by AutoGen and AutoOpts for identifying tokens.
* The table is static scope, so %guard is empty.
*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
* AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
* AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
Expand Down
2 changes: 1 addition & 1 deletion libopts/alias.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
* AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
* AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
Expand Down
Loading

0 comments on commit 1fd4d09

Please sign in to comment.