--- libdumbnet-1.12.orig/debian/README.Debian +++ libdumbnet-1.12/debian/README.Debian @@ -0,0 +1,21 @@ +libdumbnet for Debian +--------------------- + +This library was originally distributed as libdnet. However, Debian +already been distributing a libdnet since the 1980s --- the DECnet +library. + +So, since this library describes itself as a "dumb networking library" +the obvious thing to do is to rename it as such. If you are using source +code that #includes , you will want to change this to +As well, you may need to make revisions to Makefiles or Autoconf scripts. + + -- Simon Law , Thu, 15 Aug 2002 03:14:03 -0400 + +Please note that the library has changed its hosting location from Sourceforge +to GoogleCode. The upstream README file does not reflect that yet. The website +is + +http://code.google.com/p/libdnet/ + + -- Jan Christoph Nordholz Mon, 18 May 2009 05:54:22 +0200 --- libdumbnet-1.12.orig/debian/README.source +++ libdumbnet-1.12/debian/README.source @@ -0,0 +1,6 @@ +The changes to the upstream source of this Debian package are managed +by the patch management system 'dpatch'. See the dpatch documentation +at /usr/share/doc/dpatch/README.source.gz for further information on +how to comfortably create new patches or edit existing ones. + + -- Jan Christoph Nordholz, 23 Aug 2009 --- libdumbnet-1.12.orig/debian/changelog +++ libdumbnet-1.12/debian/changelog @@ -0,0 +1,211 @@ +libdumbnet (1.12-8) unstable; urgency=medium + + * QA upload. + * Correct the placement and the call to dh_prep. (Closes: #908910) + * Use dh_auto_{configure,build,install} as they know how to pass + cross-building information to the upstream build system. + * Set Rules-Requires-Root to "no". + * Remove duplicated Build-Depends on autoconf. + + -- Niels Thykier Sun, 16 Sep 2018 07:24:55 +0000 + +libdumbnet (1.12-7) unstable; urgency=medium + + * QA upload. + * Multiarchify the library package. + * Build using dpkg-buildflags. + * Bump the lintian and debhelper level. + * Build using dh-python. + * Enable parallel builds. + + -- Matthias Klose Fri, 05 Feb 2016 12:24:58 +0100 + +libdumbnet (1.12-6) unstable; urgency=medium + + * QA upload. + * Make people who test upgrades from testing to unstable + happy (Closes: #775896). + + -- Bernd Zeimetz Thu, 05 Feb 2015 19:06:08 +0100 + +libdumbnet (1.12-5) unstable; urgency=medium + + * QA upload. + * Fix missing doc folder during upgrades + (Closes: #775896) + + -- Bernd Zeimetz Fri, 30 Jan 2015 22:53:35 +0100 + +libdumbnet (1.12-4) unstable; urgency=low + + * QA upload. + - Set Maintainer to Debian QA Group. + * Convert to dh_python2 (Closes: #616861). + * debian/rules: + - Pass --add-missing parameter to automake call (Closes: #713367). + + -- Luca Falavigna Sun, 07 Jul 2013 14:20:17 +0200 + +libdumbnet (1.12-3.1) unstable; urgency=low + + * Non-maintainer upload. + * Don't ship .la files. + + -- Luk Claes Fri, 01 Jul 2011 19:43:39 +0200 + +libdumbnet (1.12-3) unstable; urgency=low + + * Restore lost libdumbnet.so symlink in the -dev package. + Closes: #542972. + * Provide dumbnet-config again, provide the old name 'dnet-config' + as a symlink, and make it print the correct -l parameter (i.e. + include it into the changed files of the 01rename_library patch). + Closes: #543050. + * Write a terse manpage for dumbnet-config. + * Bump Standards Version to 3.8.3. + * Add a README.source file. + + -- Jan Christoph Nordholz Sun, 23 Aug 2009 00:09:20 +0200 + +libdumbnet (1.12-2) unstable; urgency=low + + * kfreebsd has , too, so the ./configure check to decide + between tun-solaris and tun-bsd is bogus. For the time being patch + ./configure.in to drop that test and choose tun-bsd right away. + + -- Jan Christoph Nordholz Wed, 29 Jul 2009 13:56:43 +0200 + +libdumbnet (1.12-1) unstable; urgency=low + + * New upstream version. + * Update upstream location in all Debian files, but do not overwrite + the upstream README - add a note to README.Debian instead. + * Add a symbols file. + * Bump Standards Version to 3.8.2. + + -- Jan Christoph Nordholz Sat, 25 Jul 2009 13:51:29 +0200 + +libdumbnet (1.11-1) UNRELEASED; urgency=low + + * Adopt the package. Closes: #474128. + * New upstream version. + * Completely rework the packaging. Use dpatch for patch management. + * Thoroughly revise debian/copyright. + * Accomplish the Debian-specific library renaming by modifying the + .am files and rerunning the whole auto-toolchain. This is the cleanest + way to do this and produces the smallest distro diff. + -> New dpatch (script): 01rename_library.sh + * Activate the python module build (closes: #388541): + * Configure --with-python. + * Patch the .pyx code to avoid using the reserved keyword 'type' as a + mundane identifier. + -> New dpatch: 02python_type_is_reserved + * Patch the python Makefile to build against all current python versions. + -> New dpatch: 03build_all_python_versions + * Use debhelper v7. + * Standards Version is now 3.8.1. + + -- Jan Christoph Nordholz Sat, 28 Mar 2009 01:51:45 +0100 + +libdumbnet (1.8-2) unstable; urgency=low + + * QA upload. + + Set maintainer to Debian QA Group . + * Move {Source-Version} to {binary:Version}. + * Change pwd to CURDIR in rules. + * Add {shlibs:Depends} to dev package. + * Add watch file. + * Remove redundant section: libs from binary package. + * Bump debhelper build-dep and compat to 5. + * Bump Standards Version to 3.8.0. + + -- Barry deFreese Fri, 23 Jan 2009 18:00:52 -0500 + +libdumbnet (1.8-1.5) unstable; urgency=low + + * Porter NMU. + * Added support for GNU/kFreeBSD, patch from the BTS (closes: bug#341598). + + -- Aurelien Jarno Sun, 10 Dec 2006 20:38:30 +0100 + +libdumbnet (1.8-1.4) unstable; urgency=low + + * NMU + * Fix a bug in addr_btos() (Closes: #364821) + + -- Julien Danjou Tue, 16 May 2006 13:56:32 +0200 + +libdumbnet (1.8-1.3) unstable; urgency=low + + * Fixed SONAME problem by fixing the -version-info number in + src/Makefile.am (Closes: #289777) + + -- Javier Fernandez-Sanguino Pen~a Tue, 11 Jan 2005 16:13:41 +0100 + +libdumbnet (1.8-1.2) unstable; urgency=low + + * Introduce AM_MAINTAINER_MODE in configure.in to avoid timestamp + skew of the auto* files, also touch ac files in debian/rules configure + just in case (Closes: #289794) + * Check if symlinks exist before creating them (in config.status + and distclean target in debian/rules) + + -- Javier Fernandez-Sanguino Pen~a Tue, 11 Jan 2005 14:55:00 +0100 + +libdumbnet (1.8-1.1) unstable; urgency=low + + * NMU with maintainer's approval. + * New upstream release (Closes: #253572) + - Updated config.sub and config.guess from automake 1.7 + - Fixed configure.in since there is no need now to normalize LTLIBOBJS + - Rerun aclocal, automake and autoconf + - Updated debian/patches/libdumbnet.patch + - Change debian/rules so that it will only distclean if the Makefile + is there and so that it will create the symlinks it needs for cleaning + if they are not available (will happen if the 'Makefile distclean' breaks + at some point) + + -- Javier Fernandez-Sanguino Pen~a Thu, 23 Dec 2004 11:42:14 +0100 + +libdumbnet (1.7-3) unstable; urgency=low + + * Fix acinclude.m4, aclocal.m4, configure.in, and configure to test + correctly for PF_PACKET support on GNU/Linux. This will cause + libdumbnet to include the right eth-$ARCH.o file. (Closes: Bug#219303) + + -- Simon Law Thu, 13 Nov 2003 01:44:56 -0500 + +libdumbnet (1.7-2) unstable; urgency=low + + * Use netinet/* headers instead of linux/* headers in src/fw-ipchains.c + + -- Simon Law Thu, 09 Oct 2003 09:52:00 -0400 + +libdumbnet (1.7-1) unstable; urgency=low + + * New upstream release. (Closes: Bug#193777) + * Added a src/net/sock.h since its contents are unneeded. + (Closes: Bug#207698) + * Removed the period from the short description. + * Moved libdumbnet-dev to libdevel. + * Makefile.am: Set SONAME to 1.0.0. + + -- Simon Law Tue, 7 Oct 2003 17:52:59 -0400 + +libdumbnet (1.5-2) unstable; urgency=low + + * Wrote a better description for libdumbnet-dev. (Closes: Bug#162995) + * Mentioned the namespace conflict with libdnet so that it will + show up on an `apt-cache search libdnet` + + -- Simon Law Fri, 04 Oct 2002 23:22:36 -0400 + +libdumbnet (1.5-1) unstable; urgency=low + + * Initial Release. (Closes: Bug#157350, Bug#157351) + * Renamed this library to libdumbnet to avoid namespace conflicts. + * Makefile.am configure.in: Now uses libtool to build shared libraries + * Makefile.am: Set SONAME to 0.0.0 + + -- Simon Law Sat, 28 Sep 2002 12:23:08 -0400 + --- libdumbnet-1.12.orig/debian/compat +++ libdumbnet-1.12/debian/compat @@ -0,0 +1 @@ +9 --- libdumbnet-1.12.orig/debian/control +++ libdumbnet-1.12/debian/control @@ -0,0 +1,65 @@ +Source: libdumbnet +Section: libs +Priority: optional +Standards-Version: 3.9.6 +Homepage: http://code.google.com/p/libdnet/ +Maintainer: Debian QA Group +Build-Depends: debhelper (>> 9), autotools-dev, libtool, automake, autoconf, dpatch, python-all-dev (>= 2.6.6-3~), python-pyrex, check, dh-python +Rules-Requires-Root: no + +Package: libdumbnet1 +Pre-Depends: ${misc:Pre-Depends} +Depends: ${shlibs:Depends}, ${misc:Depends} +Architecture: any +Multi-Arch: same +Description: dumb, portable networking library -- shared library + libdumbnet provides a simplified, portable interface to several low-level + networking routines, including + * network address manipulation + * kernel arp(4) cache and route(4) table lookup and manipulation + * network firewalling (Ip filter, ipfw, ipchains, pdf, ...) + * network interface lookup and manipulation + * raw IP packet and Ethernet frame transmission + . + libdumbnet is known as libdnet in other distributions, but was renamed + in Debian in favour of the older DECnet library 'libdnet'. + . + This package contains the shared library. + +Package: libdumbnet-dev +Section: libdevel +Depends: ${shlibs:Depends}, libdumbnet1 (= ${binary:Version}), ${misc:Depends} +Pre-Depends: dpkg (>= 1.17.14) +Architecture: any +Description: dumb, portable networking library -- development files + libdumbnet provides a simplified, portable interface to several low-level + networking routines, including + * network address manipulation + * kernel arp(4) cache and route(4) table lookup and manipulation + * network firewalling (Ip filter, ipfw, ipchains, pdf, ...) + * network interface lookup and manipulation + * raw IP packet and Ethernet frame transmission + . + libdumbnet is known as libdnet in other distributions, but was renamed + in Debian in favour of the older DECnet library 'libdnet'. + . + This package contains the static library and the C header files. + +Package: python-dumbnet +Section: python +Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends} +Provides: ${python:Provides} +Architecture: any +Description: dumb, portable networking library -- python bindings + libdumbnet provides a simplified, portable interface to several low-level + networking routines, including + * network address manipulation + * kernel arp(4) cache and route(4) table lookup and manipulation + * network firewalling (Ip filter, ipfw, ipchains, pdf, ...) + * network interface lookup and manipulation + * raw IP packet and Ethernet frame transmission + . + libdumbnet is known as libdnet in other distributions, but was renamed + in Debian in favour of the older DECnet library 'libdnet'. + . + This package contains the corresponding 'dumbnet' Python module. --- libdumbnet-1.12.orig/debian/copyright +++ libdumbnet-1.12/debian/copyright @@ -0,0 +1,76 @@ +This package was debianized by Jan Christoph Nordholz +. + +Upstream Homepage: http://code.google.com/p/libdnet/ +Upstream Author: Dug Song + +Copyright for include/queue.h: + Copyright (c) 1991, 1993 The Regents of the University of California. + All rights reserved. + +Copyright for include/dnet/rand.h and src/rand.c: + Copyright (c) 2000 Dug Song + Copyright (c) 1996 David Mazieres + +Copyright for src/strlcat.c and src/strlcpy.c: + Copyright (c) 1998 Todd C. Miller + All rights reserved. + +Copyright for src/memcmp.c: + Copyright (c) 1990 The Regents of the University of California. + All rights reserved. + +Copyright for src/strsep.c: + Copyright (c) 1990, 1993 The Regents of the University of California. + All rights reserved. + +Copyright for include/err.h and src/err.c: + Copyright (c) 2000 Dug Song + Copyright (c) 1993 The Regents of the University of California. + All rights reserved. + +Copyright for src/fw-pktfilter.c: + Copyright (c) 2002 Dug Song + Copyright (c) 2001 Jean-Baptiste Marchand, Hervé Schauer Consultants. + +Copyright for src/route-bsd.c: + Copyright (c) 2001 Dug Song + Copyright (c) 1999 Masaki Hirabaru + +Copyright for all other files: + Copyright (c) 2000-2006 Dug Song + +License: + This package is distributed under a 3-clause BSD license. + + 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. + +Note: + (include/queue.h, include/err.h, src/err.c, src/memcmp.c, src/strsep.c) +Several files contained in this package stem from BSD origins and still bear +the old 4-clause BSD license. The only copyright holders of those files are +the University of California (who have retroactively removed the "ad clause") +and Dug Song (who has placed this software under the 3-clause BSD), so the +3-clause BSD license applies uniformly to all files. --- libdumbnet-1.12.orig/debian/dumbnet-config.1 +++ libdumbnet-1.12/debian/dumbnet-config.1 @@ -0,0 +1,12 @@ +.TH DUMBNET-CONFIG 1 "23 Aug 2009" +.SH NAME +dumbnet-config \- provide compiler and linker information for libdumbnet +.SH SYNOPSIS +.BR dumbnet-config " [ " \-\-version " | " \-\-cflags " | " \-\-libs " ]" +.SH DESCRIPTION +.I dumbnet-config +prints the library version (\fB\-\-version\fR) or the necessary compiler +(\fB\-\-cflags\fR) or linker flags (\fB\-\-libs\fR) to build software +based on this library. +.SH SEE ALSO +.BR dumbnet "(3), " dumbnet (8) --- libdumbnet-1.12.orig/debian/libdumbnet-dev.postinst +++ libdumbnet-1.12/debian/libdumbnet-dev.postinst @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +dpkg-maintscript-helper symlink_to_dir /usr/share/doc/libdumbnet-dev /usr/share/doc/libdumbnet1 '1.12-6~' libdumbnet-dev -- $@ + +#DEBHELPER# + +exit 0 --- libdumbnet-1.12.orig/debian/libdumbnet-dev.postrm +++ libdumbnet-1.12/debian/libdumbnet-dev.postrm @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +dpkg-maintscript-helper symlink_to_dir /usr/share/doc/libdumbnet-dev /usr/share/doc/libdumbnet1 '1.12-6~' libdumbnet-dev -- $@ + +#DEBHELPER# + +exit 0 --- libdumbnet-1.12.orig/debian/libdumbnet-dev.preinst +++ libdumbnet-1.12/debian/libdumbnet-dev.preinst @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +dpkg-maintscript-helper symlink_to_dir /usr/share/doc/libdumbnet-dev /usr/share/doc/libdumbnet1 '1.12-6~' libdumbnet-dev -- $@ + +#DEBHELPER# + +exit 0 --- libdumbnet-1.12.orig/debian/libdumbnet1.symbols +++ libdumbnet-1.12/debian/libdumbnet1.symbols @@ -0,0 +1,91 @@ +libdumbnet.so.1 libdumbnet1 #MINVER# + addr_bcast@Base 1.8 + addr_btom@Base 1.8 + addr_btos@Base 1.8 + addr_cmp@Base 1.8 + addr_mtob@Base 1.8 + addr_net@Base 1.8 + addr_ntoa@Base 1.8 + addr_ntop@Base 1.8 + addr_ntos@Base 1.8 + addr_pton@Base 1.8 + addr_stob@Base 1.8 + addr_ston@Base 1.8 + arp_add@Base 1.8 + arp_close@Base 1.8 + arp_delete@Base 1.8 + arp_get@Base 1.8 + arp_loop@Base 1.8 + arp_open@Base 1.8 + blob_delete@Base 1.8 + blob_free@Base 1.8 + blob_index@Base 1.8 + blob_insert@Base 1.8 + blob_new@Base 1.8 + blob_pack@Base 1.8 + blob_print@Base 1.8 + blob_printers@Base 1.8 + blob_read@Base 1.8 + blob_register_alloc@Base 1.8 + blob_register_pack@Base 1.8 + blob_rindex@Base 1.8 + blob_seek@Base 1.8 + blob_sprint@Base 1.8 + blob_unpack@Base 1.8 + blob_write@Base 1.8 + eth_close@Base 1.8 + eth_get@Base 1.8 + eth_ntoa@Base 1.8 + eth_ntop@Base 1.8 + eth_open@Base 1.8 + eth_pton@Base 1.8 + eth_send@Base 1.8 + eth_set@Base 1.8 + fw_add@Base 1.8 + fw_close@Base 1.8 + fw_delete@Base 1.8 + fw_loop@Base 1.8 + fw_open@Base 1.8 + intf_close@Base 1.8 + intf_get@Base 1.8 + intf_get_dst@Base 1.8 + intf_get_src@Base 1.8 + intf_loop@Base 1.8 + intf_open@Base 1.8 + intf_set@Base 1.8 + ip6_checksum@Base 1.8 + ip6_ntoa@Base 1.8 + ip6_ntop@Base 1.8 + ip6_pton@Base 1.8 + ip_add_option@Base 1.8 + ip_checksum@Base 1.8 + ip_cksum_add@Base 1.8 + ip_close@Base 1.8 + ip_ntoa@Base 1.8 + ip_ntop@Base 1.8 + ip_open@Base 1.8 + ip_pton@Base 1.8 + ip_send@Base 1.8 + rand_add@Base 1.8 + rand_close@Base 1.8 + rand_get@Base 1.8 + rand_open@Base 1.8 + rand_set@Base 1.8 + rand_shuffle@Base 1.8 + rand_uint16@Base 1.8 + rand_uint32@Base 1.8 + rand_uint8@Base 1.8 + route_add@Base 1.8 + route_close@Base 1.8 + route_delete@Base 1.8 + route_get@Base 1.8 + route_loop@Base 1.8 + route_open@Base 1.8 + strlcat@Base 1.8 + strlcpy@Base 1.8 + tun_close@Base 1.11 + tun_fileno@Base 1.11 + tun_name@Base 1.11 + tun_open@Base 1.11 + tun_recv@Base 1.11 + tun_send@Base 1.11 --- libdumbnet-1.12.orig/debian/patches/00list +++ libdumbnet-1.12/debian/patches/00list @@ -0,0 +1,7 @@ +01rename_library.sh +02python_type_is_reserved +03build_all_python_versions +04kfreebsd +05groff_hyphens +06use_tun_bsd +07noconfig-script-multiarch-path --- libdumbnet-1.12.orig/debian/patches/01rename_library.sh.dpatch +++ libdumbnet-1.12/debian/patches/01rename_library.sh.dpatch @@ -0,0 +1,79 @@ +#!/bin/bash +## 01rename_library.sh.dpatch by +## +## DP: Script patch to accomplish the Debian-specific library +## DP: name change (and the corresponding reverse action). +set -e + +# Make all necessary modifications to magically change upstream's +# conflicting "libdnet" to "libdumbnet" as chosen for Debian. + +declare -a OLD_RENAME_FILES NEW_RENAME_FILES + +MANPAGENOTE='.Sh COMPATIBILITY\ +The library was originally named\ +.Xr dnet\ +but was renamed to\ +.Xr dumbnet\ +due to a conflict with the DECnet library. This decision affects not only the\ +filename of the shared library, but also the header file names and the library'\''s\ +SONAME tag, which means that software built on a non-Debian-derived distribution\ +will not run with this library and recompiling the software will only work if\ +some adjustments to header include directives and compiler/linker flags are made.' + +OLD_RENAME_FILES=( dnet-config.in include/dnet include/dnet.h test/dnet/dnet.8 test/dnet/dnet.c test/dnet man/dnet.3 python/dnet.pyx ) +NEW_RENAME_FILES=( dumbnet-config.in include/dumbnet include/dumbnet.h test/dnet/dumbnet.8 test/dnet/dumbnet.c test/dumbnet man/dumbnet.3 python/dumbnet.pyx ) + +if [ "$1" = "-patch" ]; then + OLD_NAME="dnet" + NEW_NAME="dumbnet" + DIR=1 +elif [ "$1" = "-unpatch" ]; then + OLD_NAME="dumbnet" + NEW_NAME="dnet" + DIR=-1 +else + echo "Unknown option to dpatch." >&2 + exit 1 +fi + +if [ -n "$2" ]; then + cd "$2" +fi + +for MF in $(find . -name Makefile.am -or -name "*.[38]" -or -name "setup.py.in" -or -name "*-config.in"); do + sed -i -e "s/${OLD_NAME}/${NEW_NAME}/g" $MF +done + +for CF in $(find . -name "*.c" -or -name "*.h"); do + sed -i -e "s/#include \"${OLD_NAME}\.h\"/#include \"${NEW_NAME}.h\"/" \ + -e "s/#include <${OLD_NAME}\.h>/#include <${NEW_NAME}.h>/" \ + -e "s/#include <${OLD_NAME}\//#include <${NEW_NAME}\//" $CF +done + +sed -i -e "s/\"${OLD_NAME}\.h\"/\"${NEW_NAME}.h\"/" python/*.pyx + +sed -i -e "/^AC_INIT/ s/${OLD_NAME}/${NEW_NAME}/g" \ + -e "/^AM_INIT_/ s/${OLD_NAME}/${NEW_NAME}/g" \ + -e "/^AC_OUTPUT/,$ s/${OLD_NAME}/${NEW_NAME}/g" \ + configure.in + +if [ "$DIR" = 1 ]; then + for (( i=0; i<${#OLD_RENAME_FILES[*]}; i++ )); do + [ -e ${NEW_RENAME_FILES[$i]} ] || mv ${OLD_RENAME_FILES[$i]} ${NEW_RENAME_FILES[$i]} + done + for P in $(find . -name "*.[38]"); do + sed -i -e "/^\.Sh SEE ALSO/ i$MANPAGENOTE" $P + done +else + for (( i=${#OLD_RENAME_FILES[*]}-1; i>=0; i-- )); do + [ -e ${OLD_RENAME_FILES[$i]} ] || mv ${NEW_RENAME_FILES[$i]} ${OLD_RENAME_FILES[$i]} + done + for P in $(find . -name "*.[38]"); do + sed -i -e "/^\.Sh COMPATIBILITY/,+9 d" $P + done +fi + +sed -i -e "s/libd[a-z]*\.sourceforge\.net/libdnet.sourceforge.net/" python/setup.py.in + +exit 0 --- libdumbnet-1.12.orig/debian/patches/02python_type_is_reserved.dpatch +++ libdumbnet-1.12/debian/patches/02python_type_is_reserved.dpatch @@ -0,0 +1,89 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01python_type_is_reserved.dpatch by +## +## DP: Rename parameters called 'type' as this is a reserved word +## DP: in recent python versions. + +@DPATCH@ +--- libdumbnet-1.11.orig/python/dumbnet.pyx 2006-01-19 07:09:01.000000000 +0100 ++++ libdumbnet-1.11/python/dumbnet.pyx 2009-03-29 01:09:52.429818816 +0100 +@@ -70,7 +70,7 @@ + char *__eth_ntoa "eth_ntoa" (eth_addr_t *buf) + int __eth_aton "eth_aton" (char *src, eth_addr_t *dst) + void __eth_pack_hdr "eth_pack_hdr" (char *h, +- eth_addr_t dst, eth_addr_t src, int type) ++ eth_addr_t dst, eth_addr_t src, int etype) + + ETH_ADDR_LEN = 6 + ETH_ADDR_BITS = 48 +@@ -160,19 +160,19 @@ + return PyString_FromStringAndSize(ea.data, 6) + + def eth_pack_hdr(dst=ETH_ADDR_BROADCAST, src=ETH_ADDR_BROADCAST, +- type=ETH_TYPE_IP): ++ etype=ETH_TYPE_IP): + """Return a packed binary string representing an Ethernet header. + + Keyword arguments: + dst -- destination address (6-byte binary string) + src -- source address (6-byte binary string) +- type -- Ethernet payload type (ETH_TYPE_*) (16-bit integer) ++ etype -- Ethernet payload type (ETH_TYPE_*) (16-bit integer) + """ + cdef char hdr[14] + cdef eth_addr_t s, d + __memcpy(s.data, src, 6) + __memcpy(d.data, dst, 6) +- __eth_pack_hdr(hdr, d, s, type) ++ __eth_pack_hdr(hdr, d, s, etype) + return PyString_FromStringAndSize(hdr, 14) + + # +@@ -434,14 +434,14 @@ + ADDR_TYPE_IP6 = 3 + + cdef class addr: +- """addr(addrtxt=None, type=ADDR_TYPE_NONE) -> network address object ++ """addr(addrtxt=None, addrtype=ADDR_TYPE_NONE) -> network address object + + Create a network address object, optionally initialized from a + human-readable Ethernet, IP, or IPv6 address string. + """ + cdef addr_t _addr + +- def __init__(self, addrtxt=None, type=ADDR_TYPE_NONE): ++ def __init__(self, addrtxt=None, addrtype=ADDR_TYPE_NONE): + if addrtxt != None and addr_aton(addrtxt, &self._addr) < 0: + if PyString_Size(addrtxt) == 4: + self._addr.addr_type = ADDR_TYPE_IP +@@ -450,7 +450,7 @@ + else: + raise ValueError, "invalid network address" + +- property type: ++ property addrtype: + """Address type (ADDR_TYPE_*) integer.""" + def __get__(self): + return self._addr.addr_type +@@ -783,17 +783,17 @@ + # icmp.h + # + cdef extern from *: +- void __icmp_pack_hdr "icmp_pack_hdr" (char *hdr, int type, int code) ++ void __icmp_pack_hdr "icmp_pack_hdr" (char *hdr, int itype, int code) + +-def icmp_pack_hdr(type, code): ++def icmp_pack_hdr(itype, code): + """Return a packed binary string representing an ICMP header. + + Keyword arguments: +- type -- ICMP type (8-bit integer) ++ itype -- ICMP type (8-bit integer) + code -- ICMP code (8-bit integer) + """ + cdef char buf[4] +- __icmp_pack_hdr(buf, type, code) ++ __icmp_pack_hdr(buf, itype, code) + return PyString_FromStringAndSize(buf, sizeof(buf)) + + # --- libdumbnet-1.12.orig/debian/patches/03build_all_python_versions.dpatch +++ libdumbnet-1.12/debian/patches/03build_all_python_versions.dpatch @@ -0,0 +1,36 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 03build_all_python_versions.dpatch by +## +## DP: Change the upstream automake Makefiles to build multiple versions +## DP: of the python module, one for each supported python version. + +@DPATCH@ +--- libdumbnet-1.11.orig/python/Makefile.am 2009-03-29 01:31:22.141871504 +0100 ++++ libdumbnet-1.11/python/Makefile.am 2009-03-29 01:40:23.911281752 +0100 +@@ -8,10 +8,12 @@ + noinst_SCRIPTS = python-build + + $(srcdir)/dumbnet.c: $(srcdir)/dumbnet.pyx +- pyrexc $(srcdir)/dumbnet.pyx + +-python-build: $(srcdir)/dumbnet.c +- $(PYTHON) setup.py build ++python-build: $(srcdir)/dumbnet.pyx ++ for PV in $(shell cd .. && pyversions -r); do \ ++ $$PV /usr/bin/pyrexc $(srcdir)/dumbnet.pyx; \ ++ $$PV setup.py build; \ ++ done + touch python-build + + python-clean: +@@ -22,7 +24,9 @@ + distclean: clean + + python-install: +- $(PYTHON) setup.py install --prefix=$(DESTDIR)$(prefix) ++ for PV in $(shell cd .. && pyversions -r); do \ ++ $$PV setup.py install --prefix=$(DESTDIR)$(prefix); \ ++ done + + install-exec-local: python-install + --- libdumbnet-1.12.orig/debian/patches/04kfreebsd.dpatch +++ libdumbnet-1.12/debian/patches/04kfreebsd.dpatch @@ -0,0 +1,17 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 04kfreebsd.dpatch by +## +## DP: Add build support for kfreebsd. + +@DPATCH@ +--- libdumbnet-1.11.orig/configure.in ++++ libdumbnet-1.11/configure.in +@@ -244,7 +244,7 @@ + elif test "$ac_cv_header_netinet_ip_fw_h" = yes ; then + dnl XXX - ipfw2 support later... + case "$host_os" in +- *freebsd5*) ++ *freebsd5* | *kfreebsd*) + AC_LIBOBJ([fw-none]) ;; + *) + AC_LIBOBJ([fw-ipfw]) ;; --- libdumbnet-1.12.orig/debian/patches/05groff_hyphens.dpatch +++ libdumbnet-1.12/debian/patches/05groff_hyphens.dpatch @@ -0,0 +1,101 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 05groff_hyphens.dpatch by +## +## DP: Distinguish between groff hyphens and minus signs, just +## DP: to keep lintian happy. + +@DPATCH@ +--- libdumbnet-1.12.orig/man/dumbnet.3 2009-05-18 05:11:34.728007033 +0200 ++++ libdumbnet-1.12/man/dumbnet.3 2009-05-18 05:12:22.789006061 +0200 +@@ -359,7 +359,7 @@ + .Fa b + into + .Fa buf , +-returning the total number of bytes read, or -1 on failure. ++returning the total number of bytes read, or \-1 on failure. + .Pp + .Fn blob_write + writes +@@ -369,7 +369,7 @@ + to blob + .Fa b , + advancing the current offset. It returns the number of bytes written, +-or -1 on failure. ++or \-1 on failure. + .Pp + .Fn blob_seek + repositions the offset within blob +@@ -380,7 +380,7 @@ + .Fa whence + (see + .Xr lseek 2 +-for details), returning the new absolute offset, or -1 on failure. ++for details), returning the new absolute offset, or \-1 on failure. + .Pp + .Fn blob_index + returns the offset of the first occurence in blob +@@ -389,7 +389,7 @@ + .Fa buf + of length + .Fa len , +-or -1 on failure. ++or \-1 on failure. + .Pp + .Fn blob_rindex + returns the offset of the last occurence in blob +@@ -398,7 +398,7 @@ + .Fa buf + of length + .Fa len , +-or -1 on failure. ++or \-1 on failure. + .Pp + .Fn blob_pack + converts and writes, and +@@ -407,7 +407,7 @@ + .Fa b + according to the given format + .Fa fmt +-as described below, returning 0 on success, and -1 on failure. ++as described below, returning 0 on success, and \-1 on failure. + .Pp + The format string is composed of zero or more directives: ordinary + characters (not +@@ -820,7 +820,7 @@ + .Fn eth_send + and + .Fn ip_send +-return the length of the datagram successfully sent, or -1 on failure. ++return the length of the datagram successfully sent, or \-1 on failure. + .Pp + .Fn arp_loop , + .Fn fw_loop , +@@ -835,7 +835,7 @@ + .Pp + .Fn ip_add_option + returns the length of the inserted option (which may have been padded +-with NOPs for memory alignment) or -1 on failure. ++with NOPs for memory alignment) or \-1 on failure. + .Pp + .Fn rand_uint8 , + .Fn rand_uint16 , +@@ -845,7 +845,7 @@ + .Pp + All other + .Nm +-routines return 0 on success, or -1 on failure. ++routines return 0 on success, or \-1 on failure. + .Sh COMPATIBILITY + The library was originally named + .Xr dnet +--- libdumbnet-1.12.orig/test/dumbnet/dumbnet.8 2009-05-18 05:16:36.509006302 +0200 ++++ libdumbnet-1.12/test/dumbnet/dumbnet.8 2009-05-18 05:16:45.664006443 +0200 +@@ -244,7 +244,7 @@ + dd if=ping.pkt of=ping.data bs=20 skip=1 + + # Fragment IP payload +-split -b 24 ping.data p. ++split \-b 24 ping.data p. + + # Send fragments + dumbnet ip id 1 off 0+ proto icmp src 1.2.3.4 dst 5.6.7.8 < p.aa | \\ --- libdumbnet-1.12.orig/debian/patches/06use_tun_bsd.dpatch +++ libdumbnet-1.12/debian/patches/06use_tun_bsd.dpatch @@ -0,0 +1,23 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 06use_tun_bsd.dpatch by +## +## DP: The existence of is no discerning criterion +## DP: between Solaris and BSD. Debian is only concerned with +## DP: BSD, so choose that. + +@DPATCH@ +--- configure.in 2009-07-29 14:35:15.646148704 +0200 ++++ ../configure.in 2009-07-29 13:57:32.549129500 +0200 +@@ -302,11 +302,7 @@ + if test "$ac_cv_header_linux_if_tun_h" = yes ; then + AC_LIBOBJ([tun-linux]) + elif test "$ac_cv_header_net_if_tun_h" = yes ; then +- if test "$ac_cv_header_stropts_h" = yes ; then +- AC_LIBOBJ([tun-solaris]) +- else +- AC_LIBOBJ([tun-bsd]) +- fi ++ AC_LIBOBJ([tun-bsd]) + elif test -c "/dev/tun0" ; then + AC_LIBOBJ([tun-bsd]) + else --- libdumbnet-1.12.orig/debian/patches/07noconfig-script-multiarch-path.dpatch +++ libdumbnet-1.12/debian/patches/07noconfig-script-multiarch-path.dpatch @@ -0,0 +1,13 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run + +@DPATCH@ +--- a/dumbnet-config.in ++++ b/dumbnet-config.in +@@ -49,6 +49,6 @@ + fi + + if test "$echo_libs" = "yes"; then +- echo -L@libdir@ -ldumbnet @LIBS@ ++ echo -ldumbnet @LIBS@ + fi + --- libdumbnet-1.12.orig/debian/python-dumbnet.README.Debian +++ libdumbnet-1.12/debian/python-dumbnet.README.Debian @@ -0,0 +1,8 @@ +python bindings for libdumbnet +------------------------------ + +Because the dnet library is called dumbnet in Debian and its derivatives, +the python module carries the same name for consistency. Python programs +might need some tweaking on the import directives. + + -- Jan Christoph Nordholz Sun, 29 Mar 2009 --- libdumbnet-1.12.orig/debian/rules +++ libdumbnet-1.12/debian/rules @@ -0,0 +1,103 @@ +#!/usr/bin/make -f + +.PHONY: clean configure build install binary binary-arch binary-indep + +include /usr/share/dpatch/dpatch.make + +build-arch: build +build-indep: build +build: build-stamp +install: install-stamp +binary: binary-arch binary-indep + +configure-stamp: patch-stamp + dh_testdir + cp /usr/share/misc/config.sub \ + /usr/share/misc/config.guess \ + config/ + aclocal -I . -I config + libtoolize -c + autoheader + automake --add-missing + autoconf + dh_auto_configure -- --prefix=/usr \ + --mandir=/usr/share/man \ + --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \ + --with-python \ + $(shell dpkg-buildflags --export=cmdline) + rm -f python/*.c + touch $@ + +build-stamp: configure-stamp + dh_testdir + dh_auto_build +ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),) + # Running test suite. Errors are being ignored because several tests + # are bound to fail: + # * check_addr: fails because glibc gethostbyname() accepts malformed + # IPs + # * check_ip: fails because test includes binding to a RAW socket + # which requires CAP_NET_ADMIN + # * check_fw: fails because Linux doesn't provide a simple userspace + # fw API (and libdumbnet therefore includes its fw-none module which + # just returns ENOSYS) + -$(MAKE) -C test/check check-am +endif + touch $@ + +install-stamp: build-stamp + dh_testdir + touch $@ + +binary-indep: + +binary-arch: install-stamp + dh_testdir + dh_testroot + dh_prep + dh_auto_install --destdir $(CURDIR)/debian/libdumbnet1 + mkdir -p debian/libdumbnet-dev/usr/lib/$(DEB_HOST_MULTIARCH) \ + debian/libdumbnet-dev/usr/share/doc/libdumbnet-dev \ + debian/libdumbnet-dev/usr/share/man/man1 + mkdir -p debian/python-dumbnet/usr/lib + mv debian/libdumbnet1/usr/include \ + debian/libdumbnet1/usr/sbin \ + debian/libdumbnet1/usr/bin \ + debian/libdumbnet-dev/usr/ + mv debian/libdumbnet1/usr/share/man/* \ + debian/libdumbnet-dev/usr/share/man/ + mv debian/libdumbnet1/usr/lib/$(DEB_HOST_MULTIARCH)/libdumbnet.a \ + debian/libdumbnet1/usr/lib/$(DEB_HOST_MULTIARCH)/libdumbnet.so \ + debian/libdumbnet-dev/usr/lib/$(DEB_HOST_MULTIARCH)/ + mv debian/libdumbnet1/usr/lib/python* \ + debian/python-dumbnet/usr/lib + cp debian/dumbnet-config.1 debian/libdumbnet-dev/usr/share/man/man1/ + ln -s dumbnet-config.1 debian/libdumbnet-dev/usr/share/man/man1/dnet-config.1 + ln -s ../libdumbnet1 debian/libdumbnet-dev/usr/share/doc/libdumbnet-dev/docs + ln -s dumbnet-config debian/libdumbnet-dev/usr/bin/dnet-config + dh_installchangelogs + dh_installdocs -plibdumbnet1 TODO README + dh_installdocs -Nlibdumbnet1 + dh_python2 -ppython-dumbnet + for E in debian/python-dumbnet/usr/lib/python*; do \ + rm -f $$E/site-packages/*egg-info; \ + done + dh_strip + dh_compress + dh_fixperms + dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_md5sums + dh_gencontrol + dh_builddeb + +clean: + rm -f *-stamp + [ ! -f Makefile ] || $(MAKE) clean maintainer-clean + rm -rf autom4te.cache/ config/config.sub config/config.guess \ + configure config/ltmain.sh aclocal.m4 python/*.c \ + python/Makefile python/setup.py config/test-driver config/compile + find . -\( -name Makefile.in -or -name config.h.in -\) -print0 | xargs -0r -- rm -f + dpatch deapply-all + dh_clean --- libdumbnet-1.12.orig/debian/watch +++ libdumbnet-1.12/debian/watch @@ -0,0 +1,3 @@ +version=3 +http://code.google.com/p/libdnet/downloads/list \ + http://libdnet.googlecode.com/files/libdnet-([0-9.]*).tgz