Browse Source

Packaging cleanup

* Bump debhelper compat level to 10
* Add watch file
* Convert debian/copyright to format 1.0
* Convert debian/rules to debhelper 7 style
* Run the test suite during build
Christoph Biedl 7 years ago
parent
commit
2a7f206595
9 changed files with 178 additions and 134 deletions
  1. 1 1
      debian/compat
  2. 9 6
      debian/control
  3. 158 40
      debian/copyright
  4. 0 1
      debian/dirs
  5. 0 1
      debian/docs
  6. 6 84
      debian/rules
  7. 1 0
      debian/source/include-binaries
  8. BIN
      debian/upstream/signing-key.pgp
  9. 3 1
      debian/watch

+ 1 - 1
debian/compat

@@ -1 +1 @@
-9
+10

+ 9 - 6
debian/control

@@ -1,14 +1,18 @@
 Source: tcpreplay
 Source: tcpreplay
-Section: net
-Priority: optional
 Maintainer: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
 Maintainer: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
-Build-Depends: debhelper (>= 9.0.0), libpcap0.8-dev, tcpdump, autogen, dh-autoreconf, dpkg-dev (>= 1.16.0)
+Homepage: http://tcpreplay.appneta.com/
 Standards-Version: 3.9.8
 Standards-Version: 3.9.8
-Homepage: http://tcpreplay.synfin.net/
+Build-Depends: debhelper (>= 10~),
+    autogen,
+    dh-autoreconf,
+    libpcap0.8-dev,
+    tcpdump,
+Priority: optional
+Section: net
 
 
 Package: tcpreplay
 Package: tcpreplay
 Architecture: any
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends},
 Description: Tool to replay saved tcpdump files at arbitrary speeds
 Description: Tool to replay saved tcpdump files at arbitrary speeds
  Tcpreplay is aimed at testing the performance of a NIDS by
  Tcpreplay is aimed at testing the performance of a NIDS by
  replaying real background network traffic in which to hide
  replaying real background network traffic in which to hide
@@ -22,4 +26,3 @@ Description: Tool to replay saved tcpdump files at arbitrary speeds
  replication of real traffic seen on real networks. It included the following
  replication of real traffic seen on real networks. It included the following
  executables tcpprep, tcprewrite, tcpreplay-edit, tcpbridge and pcap
  executables tcpprep, tcprewrite, tcpreplay-edit, tcpbridge and pcap
  based captures are possible.
  based captures are possible.
-

+ 158 - 40
debian/copyright

@@ -1,47 +1,165 @@
-This package was debianized by
-Raphael Bossek <bossekr@debian.org>  Tue, 29 Aug 2000 21:36:07 +0200
-Noël Köthe <noel@debian.org> on Tue, 31 Dec 2002 16:19:09 +0100.
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: tcpreplay
+Source: https://github.com/appneta/tcpreplay
 
 
-It was downloaded from https://sf.net/projects/tcpreplay/
+Files: *
+Copyright:
+ 2013-2017 Fred Klassen <tcpreplay at appneta dot com> - AppNeta
+ 2001-2010 Aaron Turner <aturner at synfin dot net>]
+License: GPL-3.0+
+
+Files:
+ lib/queue.h
+Copyright: 1991-1993 The Regents of the University of California
+License: BSD-4-Clause
+
+Files:
+ lib/sll.h
+Copyright: 1990-1997 The Regents of the University of California
+License: BSD-4-Clause
 
 
-Upstream Authors:
-Tcpreplay was originally written by Matt Undy of Anzen Computing.
-Tcpreplay has been re-written and is now maintained by Matt Bing 
-<mbing@nfr.net> and Aaron Turner <aturner@pobox.com>
-Tcpprep was written and is now maintained by Aaron Turner.
-Capinfo was written and is now maintained by Matt Bing.
+Files:
+ lib/strlcat.c
+ lib/strlcpy.*
+Copyright: 1998 Todd C. Miller <Todd.Miller@courtesan.com>
+License: ISC
 
 
+Files:
+ lib/tree.h
+Copyright: 2002 Niels Provos <provos@citi.umich.edu>
+License: BSD-2-Clause
+
+Files:
+ libopts/*
+Copyright: 1992-2014 by Bruce Korb
+License: GPL-3.0+
+
+Files:
+ src/fragroute/*
+Copyright:
+ 2001-2002 Dug Song <dugsong@monkey.org>
+ 2008 Aaron Turner
+ 2013-2014 Fred Klassen - AppNeta
+License: BSD-3-Clause
 
 
+Files:
+ scripts/dlt2name.pl
+ src/common/dlt_names.*
 Copyright:
 Copyright:
+ 1990-1997 The Regents of the University of California
+ 2006-2010 Aaron Turner
+License: BSD-4-Clause
+
+Files:
+ src/common/fakepoll.*
+Copyright: 2001-2003 Nick Mathewson <nickm@freehaven.net>
+License: BSD-3-Clause
+
+Files:
+ src/tcpliveplay.*
+Copyright: 2012 Yazan Siam
+License: BSD-3-Clause
+
+License: GPL-3.0+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
+
+License: BSD-4-Clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ 3. All advertising materials mentioning features or use of this software
+    must display the following acknowledgement:
+      This product includes software developed by the University of
+      California, Berkeley and its contributors.
+ 4. Neither the name of the University nor the names of its contributors
+    may be used to endorse or promote products derived from this software
+    without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+License: ISC
+ Permission to use, copy, modify, and distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 
-Copyright (c) 2001-2010 Aaron Turner.  aturner at synfin dot net
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-3. Neither the names of the copyright owners nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-This product includes software developed by the University of California,
-Berkeley, Lawrence Berkeley Laboratory and its contributors.
+License: BSD-2-Clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
+License: BSD-3-Clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ 3. The names of the authors and copyright holders may not be used to
+    endorse or promote products derived from this software without
+    specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 0 - 1
debian/dirs

@@ -1 +0,0 @@
-usr/bin

+ 0 - 1
debian/docs

@@ -1 +0,0 @@
-docs/TODO

+ 6 - 84
debian/rules

@@ -1,94 +1,16 @@
 #!/usr/bin/make -f
 #!/usr/bin/make -f
 
 
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
 
-DEB_HOST_GNU_TYPE ?=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+%:
+	dh $@
 
 
-ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
-confflags= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
-else
-confflags= --build $(DEB_BUILD_GNU_TYPE)
-endif
-
-DEB_BUILD_MAINT_OPTIONS = hardening=+all
-DPKG_EXPORT_BUILDFLAGS = 1
-include /usr/share/dpkg/buildflags.mk
-CFLAGS += -g -Wall
-
-configure-stamp:
-	dh_testdir
-	dh_autoreconf
-	# Add here commands to configure the package.
-	CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
+override_dh_auto_configure:
+	dh_auto_configure -- \
+		--host=$(DEB_HOST_GNU_TYPE) \
 		--build=$(DEB_BUILD_GNU_TYPE) \
 		--build=$(DEB_BUILD_GNU_TYPE) \
 		--prefix=/usr \
 		--prefix=/usr \
 		--enable-debug \
 		--enable-debug \
 		--enable-dynamic-link \
 		--enable-dynamic-link \
 		--mandir=\$${prefix}/share/man \
 		--mandir=\$${prefix}/share/man \
 		--infodir=\$${prefix}/share/info
 		--infodir=\$${prefix}/share/info
-
-	touch configure-stamp
-
-build: build-arch build-indep
-
-build-arch: build-stamp
-
-build-indep: build-stamp
-
-build-stamp: configure-stamp
-	dh_testdir
-
-	# Add here commands to compile the package.
-	$(MAKE)
-	#/usr/bin/docbook-to-man debian/tcpreplay.sgml > tcpreplay.1
-
-	touch build-stamp
-
-clean:
-	dh_testdir
-	dh_testroot
-	rm -f build-stamp configure-stamp
-
-	# Add here commands to clean up after the build process.
-	[ ! -f Makefile ] || $(MAKE) distclean
-	dh_autoreconf_clean
-
-	dh_clean
-
-install: build
-	dh_testdir
-	dh_testroot
-	dh_prep
-	dh_installdirs
-
-	# Add here commands to install the package into debian/tcpreplay.
-	$(MAKE) install prefix=$(CURDIR)/debian/tcpreplay/usr
-
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
-	dh_testdir
-	dh_testroot
-	dh_installdocs
-	dh_installcron
-	dh_installman
-	dh_installchangelogs docs/CHANGELOG
-	dh_link
-	dh_strip
-	dh_compress
-	dh_fixperms
-	dh_installdeb
-	dh_shlibdeps
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
-

+ 1 - 0
debian/source/include-binaries

@@ -0,0 +1 @@
+debian/upstream/signing-key.pgp

BIN
debian/upstream/signing-key.pgp


+ 3 - 1
debian/watch

@@ -1,2 +1,4 @@
 version=3
 version=3
-http://sf.net/tcpreplay/tcpreplay-(.*)\.tar\.gz
+opts=pgpsigurlmangle=s/$/.asc/ \
+    https://github.com/appneta/tcpreplay/releases \
+    /appneta/tcpreplay/releases/download/[^/]+/tcpreplay-([0-9][.0-9]*)\.tar\.xz