From 14e672f348f40ff9ab90c655388e03f1444f13cb Mon Sep 17 00:00:00 2001 From: Jon Ringle Date: Fri, 27 May 2011 17:55:27 -0400 Subject: mii-diag: replace index/rindex with strchr/strrchr index and rindex are deprated and not available on uclibc replace with strchr and strrchr respectively Kept only Makefile + typo fixes from mii-diag_2.11-2.diff regenerate patch series with git-ptx-patches Signed-off-by: Jon Ringle Signed-off-by: Michael Olbrich --- .../0001-mii-diag_2.11-2-Makefile.patch | 71 ++ ...-replace-index-rindex-with-strchr-strrchr.patch | 34 + patches/mii-diag-2.11.orig/mii-diag_2.11-2.diff | 918 --------------------- patches/mii-diag-2.11.orig/series | 5 +- 4 files changed, 109 insertions(+), 919 deletions(-) create mode 100644 patches/mii-diag-2.11.orig/0001-mii-diag_2.11-2-Makefile.patch create mode 100644 patches/mii-diag-2.11.orig/0002-replace-index-rindex-with-strchr-strrchr.patch delete mode 100644 patches/mii-diag-2.11.orig/mii-diag_2.11-2.diff diff --git a/patches/mii-diag-2.11.orig/0001-mii-diag_2.11-2-Makefile.patch b/patches/mii-diag-2.11.orig/0001-mii-diag_2.11-2-Makefile.patch new file mode 100644 index 000000000..f92bad95e --- /dev/null +++ b/patches/mii-diag-2.11.orig/0001-mii-diag_2.11-2-Makefile.patch @@ -0,0 +1,71 @@ +From: Jon Ringle +Date: Fri, 27 May 2011 17:48:06 -0400 +Subject: [PATCH] mii-diag_2.11-2 Makefile + +Get rid of debian/ stuff +Keep only Makefile and typo fixes + +Signed-off-by: Jon Ringle +--- + Makefile | 26 ++++++++++++++++++++++++++ + mii-diag.8 | 4 ++-- + 2 files changed, 28 insertions(+), 2 deletions(-) + create mode 100644 Makefile + +diff --git a/Makefile b/Makefile +new file mode 100644 +index 0000000..cdfc573 +--- /dev/null ++++ b/Makefile +@@ -0,0 +1,26 @@ ++CFLAGS= -O -Wall ++CC=gcc ++INSTALL=install ++ ++LIBS=libmii.o ++ ++all: mii-diag mii-diag-udeb ++ ++mii-diag: ++ $(CC) $(CFLAGS) -Wstrict-prototypes -O mii-diag.c -DLIBMII \ ++ libmii.c -o mii-diag ++ ++mii-diag-udeb: ++ $(CC) -Os -Wstrict-prototypes -O mii-diag.c -o mii-diag ++clean: ++ rm -f *.o mii-diag mii-diag-udeb *~ ++ ++install-mii-diag: ++ mkdir -p $(DESTDIR)/usr/sbin ++ $(INSTALL) mii-diag $(DESTDIR)/usr/sbin ++ ++install-mii-diag-udeb: ++ mkdir -p $(DESTDIR)/usr/sbin ++ $(INSTALL) mii-diag-udeb $(DESTDIR)/usr/sbin/mii-diag ++ ++install: all install-mii-diag +diff --git a/mii-diag.8 b/mii-diag.8 +index 38837da..2890582 100644 +--- a/mii-diag.8 ++++ b/mii-diag.8 +@@ -61,7 +61,7 @@ A summary of options is as follows. + .B \-F, --fixed-speed + + Speed is one of: 100baseT4, 100baseTx, 100baseTx-FD, 100baseTx-HD, 10baseT, +-10baseT-FD, 10baseT-HD. For more precise control an explict numeric ++10baseT-FD, 10baseT-HD. For more precise control an explicit numeric + register setting is also allowed. + + +@@ -117,7 +117,7 @@ capabilities, configuration and current status. + .PP + The '--monitor' option allows scripting link beat changes. + .PP +-This option is similar to --watch, but with lower overhead and simplifed ++This option is similar to --watch, but with lower overhead and simplified + output. It polls the interface only once a second and the output format + is a single line per link change with three fixed words + +-- +1.7.0.4 + diff --git a/patches/mii-diag-2.11.orig/0002-replace-index-rindex-with-strchr-strrchr.patch b/patches/mii-diag-2.11.orig/0002-replace-index-rindex-with-strchr-strrchr.patch new file mode 100644 index 000000000..cdfffad3a --- /dev/null +++ b/patches/mii-diag-2.11.orig/0002-replace-index-rindex-with-strchr-strrchr.patch @@ -0,0 +1,34 @@ +From: Jon Ringle +Date: Tue, 26 Apr 2011 03:27:51 -0400 +Subject: [PATCH] replace index/rindex with strchr/strrchr + +Signed-off-by: Jon Ringle +--- + mii-diag.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/mii-diag.c b/mii-diag.c +index 3c47e4a..3b45db9 100644 +--- a/mii-diag.c ++++ b/mii-diag.c +@@ -174,7 +174,7 @@ main(int argc, char **argv) + { + int c, errflag = 0; + char **spp, *ifname; +- char *progname = rindex(argv[0], '/') ? rindex(argv[0], '/')+1 : argv[0]; ++ char *progname = strrchr(argv[0], '/') ? strrchr(argv[0], '/')+1 : argv[0]; + + while ((c = getopt_long(argc, argv, shortopts, longopts, 0)) != EOF) + switch (c) { +@@ -310,7 +310,7 @@ int do_one_xcvr(int skfd) + str = endstr+1; + else { + fprintf(stderr, "Invalid driver parameter '%s'.\n", str); +- str = index(str, ','); ++ str = strchr(str, ','); + } + } else if (endstr[0] == ',') { + data32[i] = newval; +-- +1.7.0.4 + diff --git a/patches/mii-diag-2.11.orig/mii-diag_2.11-2.diff b/patches/mii-diag-2.11.orig/mii-diag_2.11-2.diff deleted file mode 100644 index 28b87f0f8..000000000 --- a/patches/mii-diag-2.11.orig/mii-diag_2.11-2.diff +++ /dev/null @@ -1,918 +0,0 @@ ---- mii-diag-2.11.orig/mii-diag.8 -+++ mii-diag-2.11/mii-diag.8 -@@ -61,7 +61,7 @@ - .B \-F, --fixed-speed - - Speed is one of: 100baseT4, 100baseTx, 100baseTx-FD, 100baseTx-HD, 10baseT, --10baseT-FD, 10baseT-HD. For more precise control an explict numeric -+10baseT-FD, 10baseT-HD. For more precise control an explicit numeric - register setting is also allowed. - - -@@ -117,7 +117,7 @@ - .PP - The '--monitor' option allows scripting link beat changes. - .PP --This option is similar to --watch, but with lower overhead and simplifed -+This option is similar to --watch, but with lower overhead and simplified - output. It polls the interface only once a second and the output format - is a single line per link change with three fixed words - ---- mii-diag-2.11.orig/debian/mii-diag-udeb.dirs -+++ mii-diag-2.11/debian/mii-diag-udeb.dirs -@@ -0,0 +1 @@ -+usr/sbin ---- mii-diag-2.11.orig/debian/postinst -+++ mii-diag-2.11/debian/postinst -@@ -0,0 +1,47 @@ -+#! /bin/sh -+# postinst script for nictools -+# -+# see: dh_installdeb(1) -+ -+set -e -+ -+# summary of how this script can be called: -+# * `configure' -+# * `abort-upgrade' -+# * `abort-remove' `in-favour' -+# -+# * `abort-deconfigure' `in-favour' -+# `removing' -+# -+# for details, see /usr/doc/packaging-manual/ -+# -+# quoting from the policy: -+# Any necessary prompting should almost always be confined to the -+# post-installation script, and should be protected with a conditional -+# so that unnecessary prompting doesn't happen if a package's -+# installation fails and the `postinst' is called with `abort-upgrade', -+# `abort-remove' or `abort-deconfigure'. -+ -+case "$1" in -+ configure) -+ -+ ;; -+ -+ abort-upgrade|abort-remove|abort-deconfigure) -+ -+ ;; -+ -+ *) -+ echo "postinst called with unknown argument \`$1'" >&2 -+ exit 0 -+ ;; -+esac -+ -+# dh_installdeb will replace this with shell code automatically -+# generated by other debhelper scripts. -+ -+#DEBHELPER# -+ -+exit 0 -+ -+ ---- mii-diag-2.11.orig/debian/changelog -+++ mii-diag-2.11/debian/changelog -@@ -0,0 +1,177 @@ -+mii-diag (2.11-2) unstable; urgency=low -+ -+ * Fix Typos in manpage (closes: #325676) -+ -+ -- Alain Schroeder Sat, 3 Jun 2006 11:57:52 +0200 -+ -+mii-diag (2.11-1) unstable; urgency=low -+ -+ * New Upstream -+ * Switched to upstreams manpage -+ -+ -- Alain Schroeder Sat, 26 Mar 2005 18:58:53 +0100 -+ -+mii-diag (2.09-1) unstable; urgency=low -+ -+ * Build udeb (smaller binary, not using libmii) (Closes: #247177) -+ * Fix manpage, thanks to Jim Van Zandt (Closes: #229386) -+ * New Upstream: new -C (Set BMCR) and -m (Monitor) switches. -+ * Add manpage entries for new -C and -m switches. -+ -+ -- Alain Schroeder Mon, 3 May 2004 22:05:56 +0200 -+ -+mii-diag (2.07-1) unstable; urgency=low -+ -+ * New Upstream -+ * mii-diag 2.07 -+ * Split the -G command into -g and -G -+ * libmii 2.10 -+ * New chip-ids added -+ * Better support for TDK, VIA and Intel chips -+ * Updated man-page -+ * Cleaned my helptext from multiline strings, Thanks to Daniel Schepler -+ (Closes: #194987) -+ -+ -- Alain Schroeder Fri, 6 Jun 2003 20:46:44 +0200 -+ -+mii-diag (2.05-1) unstable; urgency=low -+ -+ * New Upstream. It now has a detailed --help from upstream. -+ * Fixed manpage to match --help. -+ -+ -- Alain Schroeder Sat, 27 Jul 2002 22:23:07 +0200 -+ -+mii-diag (2.04-1) unstable; urgency=low -+ -+ * New Upstream - few fixes and it now showes, if the old or new SIOCGMIIPHY -+ is used. -+ * Add "-s" parameter to manpage, which is documented in the helptext. -+ (Closes: #146879). -+ -+ -- Alain Schroeder Sun, 26 May 2002 15:47:21 +0200 -+ -+mii-diag (2.03-1) unstable; urgency=low -+ -+ * New Upstream (closes: #133000). -+ * Some small changes to the manpage. -+ * Do not use dh_testversion anymore. -+ -+ -- Alain Schroeder Sun, 10 Feb 2002 00:16:46 +0100 -+ -+mii-diag (2.02-4) unstable; urgency=low -+ -+ * Fix-a-typo (closes: #130565) -+ -+ -- Alain Schroeder Wed, 23 Jan 2002 23:51:54 +0100 -+ -+mii-diag (2.02-3) unstable; urgency=low -+ -+ * Fix-a-typo in description. (closes: #125136) -+ * Make mii-diag flush after changes (Thanks to Ingvar Mattsson). -+ -+ -- Alain Schroeder Sat, 22 Dec 2001 16:28:28 +0100 -+ -+mii-diag (2.02-2) unstable; urgency=low -+ -+ * Removed Build dependency on libc6-dev -+ -+ -- Alain Schroeder Tue, 10 Jul 2001 13:28:48 +0200 -+ -+mii-diag (2.02-1) unstable; urgency=low -+ -+ * Splitted nictools source into mii-diag, nictools-pci and -+ nictools-nopci. -+ * Bumped version to 2.02, because mii-diag has that version. -+ -+ -- Alain Schroeder Mon, 18 Jun 2001 22:15:42 +0200 -+ -+nictools (1.3.1-2) unstable; urgency=low -+ -+ * Removed a tab from debian/control -+ -+ -- Alain Schroeder Fri, 1 Jun 2001 13:40:30 +0200 -+ -+nictools (1.3.1-1) unstable; urgency=low -+ -+ * New Upstream(s): -+ ** Added ns820-diag for cards with Myson MTD803 chip (v1.00) -+ ** Added myson-diag for cards with National Semiconductor DP83820 -+ chips (v2.02) -+ ** Updated eepro-diag (v2.04) -+ ** Updated epic-diag (v2.01) -+ ** Updated libmmi (v2.04) -+ ** Updated mii-diag (v2.02) -+ ** Updated natsemi-diag (v2.04) -+ ** Updated ne2k-pci-diag (v2.01) -+ ** Updatet rtl8139-diag (v2.03) -+ ** Updated tulip-diag (v2.08) -+ ** Updated via-diag (v2.06) -+ ** Updated vortex-diag (v2.05) -+ * Added myson-diag and ns820-diag to description -+ -+ -- Alain Schroeder Tue, 22 May 2001 00:18:46 +0200 -+ -+nictools (1.3-6) unstable; urgency=low -+ -+ * Added patch that allowes building this package with -+ /usr/src/kernel-source-* as a symlink from Guido Guenther. -+ (Closes: #95850) -+ * Added Build-Depend on gawk. -+ -+ -- Alain Schroeder Tue, 17 Apr 2001 00:10:20 +0200 -+ -+nictools (1.3-5) unstable; urgency=low -+ -+ * I was a bit too fast with making 3c5x9utils an obsolete package. -+ I forgot to include the actual binaries. (Closes: #94194) -+ -+ -- Alain Schroeder Tue, 17 Apr 2001 00:10:20 +0200 -+ -+nictools (1.3-4) unstable; urgency=low -+ -+ * Modified the Descriptions a little bit. -+ * Wrote manpages for atlantic-diag, atp-diag, eexpress-diag, e21-diag, -+ hp+-diag and ne2k-diag. -+ -+ -- Alain Schroeder Thu, 8 Mar 2001 02:53:10 +0100 -+ -+nictools (1.3-3) unstable; urgency=low -+ -+ * Reimplemented debian/rules cleanly. -+ * Wrote manpages for 3c515-diag, alta-diag and at1700-diag. -+ -+ -- Alain Schroeder Wed, 28 Feb 2001 14:02:04 +0100 -+ -+nictools (1.3-2) unstable; urgency=low -+ -+ * Fixed Typos in mii-diag's description, closes: #83700 -+ * Wrote a manpage for mii-diag, closes: #83702 -+ * Implemented a real "help" mode with all infos from the manpagei in -+ mii-diag. -+ -+ -- Alain Schroeder Fri, 16 Feb 2001 16:03:35 +0100 -+ -+nictools (1.3-1) unstable; urgency=low -+ -+ * Jumped upstream version up to 1.3 to nicely integrate 3c5x9utils. -+ * Reconstructed the building. Now 3c9x5utils and nictools-noisa ist only -+ build on i386, while nictools-pci is i386 arm alpha only. mii-diag is -+ the only package that can be crosscompiled, closes: #84704, #85233 -+ -+ -- Alain Schroeder Mon, 5 Feb 2001 15:07:24 +0100 -+ -+nictools (1.0-2) unstable; urgency=low -+ -+ * Fixed Description to not be wrapped, closes: #83985 -+ -+ -- Alain Schroeder Tue, 30 Jan 2001 13:26:25 +0100 -+ -+nictools (1.0-1) unstable; urgency=low -+ -+ * Initial Release, closes: #83441 -+ -+ -- Alain Schroeder Tue, 9 Jan 2001 20:27:27 +0100 -+ -+Local variables: -+mode: debian-changelog -+End: ---- mii-diag-2.11.orig/debian/control -+++ mii-diag-2.11/debian/control -@@ -0,0 +1,28 @@ -+Source: mii-diag -+Section: net -+Priority: extra -+Maintainer: Alain Schroeder -+Standards-Version: 3.7.2.0 -+Build-Depends: debhelper (>= 4.2) -+ -+Package: mii-diag -+Architecture: any -+Section: net -+Depends: ${shlibs:Depends} -+Suggests: nictools-pci, nictools-nopci -+Description: A little tool to manipulate network cards -+ Examines and sets the MII registers of network cards. -+ . -+ This is a general program. You can find specialized programs for -+ several network cards in the nictools-pci and nictools-nopci packages. -+ -+Package: mii-diag-udeb -+Architecture: any -+Section: debian-installer -+Depends: ${shlibs:Depends} -+XC-Package-Type: udeb -+Description: A little tool to manipulate network cards -+ Examines and sets the MII registers of network cards. -+ . -+ This is a general program. You can find specialized programs for -+ several network cards in the nictools-pci and nictools-nopci packages. ---- mii-diag-2.11.orig/debian/copyright -+++ mii-diag-2.11/debian/copyright -@@ -0,0 +1,13 @@ -+This package was debianized by Alain Schroeder on -+Tue, 9 Jan 2001 20:27:27 +0100. -+ -+It was downloaded from http://www.scyld.com/diag/index.html -+ -+Upstream Author: Donald Becker -+ -+Copyright: -+ -+ You are free to distribute this software under the terms of the GNU -+ General Public License. The full text of this license can be found -+ in the file /usr/share/common-licenses/GPL. -+ ---- mii-diag-2.11.orig/debian/postrm -+++ mii-diag-2.11/debian/postrm -@@ -0,0 +1,38 @@ -+#! /bin/sh -+# postrm script for nictools -+# -+# see: dh_installdeb(1) -+ -+set -e -+ -+# summary of how this script can be called: -+# * `remove' -+# * `purge' -+# * `upgrade' -+# * `failed-upgrade' -+# * `abort-install' -+# * `abort-install' -+# * `abort-upgrade' -+# * `disappear' overwrit>r> -+# for details, see /usr/doc/packaging-manual/ -+ -+case "$1" in -+ purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) -+ -+ # update the menu system -+# if [ -x /usr/bin/update-menus ]; then update-menus; fi -+ -+ ;; -+ -+ *) -+ echo "postrm called with unknown argument \`$1'" >&2 -+ exit 0 -+ -+esac -+ -+# dh_installdeb will replace this with shell code automatically -+# generated by other debhelper scripts. -+ -+#DEBHELPER# -+ -+ ---- mii-diag-2.11.orig/debian/rules -+++ mii-diag-2.11/debian/rules -@@ -0,0 +1,92 @@ -+#!/usr/bin/make -f -+# Sample debian/rules that uses debhelper. -+# GNU copyright 1997 by Joey Hess. -+# -+# This version is for a hypothetical package that builds an -+# architecture-dependant package, as well as an architecture-independent -+# package. -+ -+# Uncomment this to turn on verbose mode. -+#export DH_VERBOSE=1 -+ -+# This is the debhelper compatability version to use. -+export DH_COMPAT=4 -+ -+# This has to be exported to make some magic below work. -+export DH_OPTIONS -+ -+BUILD_ARCH:=$(shell dpkg --print-gnu-build-architecture) -+# New cross-compilation policy may set the DEB_HOST_ARCH variable. -+ifdef DEB_HOST_ARCH -+ ARCH:=$(DEB_HOST_ARCH) -+else -+ # dpkg-cross sets the ARCH environment variable, so use it. -+ ifdef ARCH -+ ARCH:=$(ARCH) -+ else -+ ARCH:=$(BUILD_ARCH) -+ endif -+endif -+ -+build: build-stamp -+build-stamp: -+ dh_testdir -+ touch build-stamp -+ -+clean: -+ dh_testdir -+ dh_testroot -+ rm -f build-stamp -+ -+ # Add here commands to clean up after the build process. -+ -$(MAKE) clean -+ -rm -rf debian/mii-diag debian/mii-diag-udeb -+ -+ dh_clean -+ -+install: DH_OPTIONS= -+install: build -+ dh_testdir -+ dh_testroot -+ dh_clean -k -+ dh_installdirs -+ $(MAKE) mii-diag -+ dh_install -pmii-diag mii-diag usr/sbin -+ $(MAKE) clean -+ $(MAKE) mii-diag-udeb -+ dh_install -pmii-diag-udeb mii-diag usr/sbin -+ #dh_movefiles -+ -+# Build architecture-independent files here. -+# Pass -i to all debhelper commands in this target to reduce clutter. -+binary-indep: DH_OPTIONS=-i -+binary-indep: build install -+ -+# Build architecture-dependent files here. -+# Pass -a to all debhelper commands in this target to reduce clutter. -+binary-arch: DH_OPTIONS=-s -+binary-arch: build install -+# dh_testversion 1.1.17 -+ dh_testdir -+ dh_testroot -+ dh_installdocs -+ dh_installexamples -+ dh_installmenu -+ dh_installcron -+ -+ dh_installman -+ -+ dh_installinfo -+ dh_installchangelogs -+ dh_strip -+ dh_link -+ 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 ---- mii-diag-2.11.orig/debian/prerm -+++ mii-diag-2.11/debian/prerm -@@ -0,0 +1,37 @@ -+#! /bin/sh -+# prerm script for nictools -+# -+# see: dh_installdeb(1) -+ -+set -e -+ -+# summary of how this script can be called: -+# * `remove' -+# * `upgrade' -+# * `failed-upgrade' -+# * `remove' `in-favour' -+# * `deconfigure' `in-favour' -+# `removing' -+# -+# for details, see /usr/doc/packaging-manual/ -+ -+case "$1" in -+ remove|upgrade|deconfigure) -+# install-info --quiet --remove /usr/info/nictools.info.gz -+ ;; -+ failed-upgrade) -+ ;; -+ *) -+ echo "prerm called with unknown argument \`$1'" >&2 -+ exit 0 -+ ;; -+esac -+ -+# dh_installdeb will replace this with shell code automatically -+# generated by other debhelper scripts. -+ -+#DEBHELPER# -+ -+exit 0 -+ -+ ---- mii-diag-2.11.orig/debian/preinst -+++ mii-diag-2.11/debian/preinst -@@ -0,0 +1,40 @@ -+#! /bin/sh -+# preinst script for nictools -+# -+# see: dh_installdeb(1) -+ -+set -e -+ -+# summary of how this script can be called: -+# * `install' -+# * `install' -+# * `upgrade' -+# * `abort-upgrade' -+ -+case "$1" in -+ install|upgrade) -+# if [ "$1" = "upgrade" ] -+# then -+# start-stop-daemon --stop --quiet --oknodo \ -+# --pidfile /var/run/nictools.pid \ -+# --exec /usr/sbin/nictools 2>/dev/null || true -+# fi -+ ;; -+ -+ abort-upgrade) -+ ;; -+ -+ *) -+ echo "preinst called with unknown argument \`$1'" >&2 -+ exit 0 -+ ;; -+esac -+ -+# dh_installdeb will replace this with shell code automatically -+# generated by other debhelper scripts. -+ -+#DEBHELPER# -+ -+exit 0 -+ -+ ---- mii-diag-2.11.orig/debian/mii-diag-udeb.files -+++ mii-diag-2.11/debian/mii-diag-udeb.files -@@ -0,0 +1 @@ -+usr/sbin/mii-diag ---- mii-diag-2.11.orig/debian/mii-diag-udeb.manpages -+++ mii-diag-2.11/debian/mii-diag-udeb.manpages -@@ -0,0 +1 @@ -+debian/mii-diag.8 ---- mii-diag-2.11.orig/debian/mii-diag-udeb.postrm -+++ mii-diag-2.11/debian/mii-diag-udeb.postrm -@@ -0,0 +1,38 @@ -+#! /bin/sh -+# postrm script for nictools -+# -+# see: dh_installdeb(1) -+ -+set -e -+ -+# summary of how this script can be called: -+# * `remove' -+# * `purge' -+# * `upgrade' -+# * `failed-upgrade' -+# * `abort-install' -+# * `abort-install' -+# * `abort-upgrade' -+# * `disappear' overwrit>r> -+# for details, see /usr/doc/packaging-manual/ -+ -+case "$1" in -+ purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) -+ -+ # update the menu system -+# if [ -x /usr/bin/update-menus ]; then update-menus; fi -+ -+ ;; -+ -+ *) -+ echo "postrm called with unknown argument \`$1'" >&2 -+ exit 0 -+ -+esac -+ -+# dh_installdeb will replace this with shell code automatically -+# generated by other debhelper scripts. -+ -+#DEBHELPER# -+ -+ ---- mii-diag-2.11.orig/debian/mii-diag-udeb.preinst -+++ mii-diag-2.11/debian/mii-diag-udeb.preinst -@@ -0,0 +1,40 @@ -+#! /bin/sh -+# preinst script for nictools -+# -+# see: dh_installdeb(1) -+ -+set -e -+ -+# summary of how this script can be called: -+# * `install' -+# * `install' -+# * `upgrade' -+# * `abort-upgrade' -+ -+case "$1" in -+ install|upgrade) -+# if [ "$1" = "upgrade" ] -+# then -+# start-stop-daemon --stop --quiet --oknodo \ -+# --pidfile /var/run/nictools.pid \ -+# --exec /usr/sbin/nictools 2>/dev/null || true -+# fi -+ ;; -+ -+ abort-upgrade) -+ ;; -+ -+ *) -+ echo "preinst called with unknown argument \`$1'" >&2 -+ exit 0 -+ ;; -+esac -+ -+# dh_installdeb will replace this with shell code automatically -+# generated by other debhelper scripts. -+ -+#DEBHELPER# -+ -+exit 0 -+ -+ ---- mii-diag-2.11.orig/debian/mii-diag.dirs -+++ mii-diag-2.11/debian/mii-diag.dirs -@@ -0,0 +1,2 @@ -+usr/sbin -+usr/share/man/man8 ---- mii-diag-2.11.orig/debian/mii-diag-udeb.prerm -+++ mii-diag-2.11/debian/mii-diag-udeb.prerm -@@ -0,0 +1,37 @@ -+#! /bin/sh -+# prerm script for nictools -+# -+# see: dh_installdeb(1) -+ -+set -e -+ -+# summary of how this script can be called: -+# * `remove' -+# * `upgrade' -+# * `failed-upgrade' -+# * `remove' `in-favour' -+# * `deconfigure' `in-favour' -+# `removing' -+# -+# for details, see /usr/doc/packaging-manual/ -+ -+case "$1" in -+ remove|upgrade|deconfigure) -+# install-info --quiet --remove /usr/info/nictools.info.gz -+ ;; -+ failed-upgrade) -+ ;; -+ *) -+ echo "prerm called with unknown argument \`$1'" >&2 -+ exit 0 -+ ;; -+esac -+ -+# dh_installdeb will replace this with shell code automatically -+# generated by other debhelper scripts. -+ -+#DEBHELPER# -+ -+exit 0 -+ -+ ---- mii-diag-2.11.orig/debian/mii-diag.manpages -+++ mii-diag-2.11/debian/mii-diag.manpages -@@ -0,0 +1 @@ -+mii-diag.8 ---- mii-diag-2.11.orig/debian/mii-diag-udeb.postinst -+++ mii-diag-2.11/debian/mii-diag-udeb.postinst -@@ -0,0 +1,47 @@ -+#! /bin/sh -+# postinst script for nictools -+# -+# see: dh_installdeb(1) -+ -+set -e -+ -+# summary of how this script can be called: -+# * `configure' -+# * `abort-upgrade' -+# * `abort-remove' `in-favour' -+# -+# * `abort-deconfigure' `in-favour' -+# `removing' -+# -+# for details, see /usr/doc/packaging-manual/ -+# -+# quoting from the policy: -+# Any necessary prompting should almost always be confined to the -+# post-installation script, and should be protected with a conditional -+# so that unnecessary prompting doesn't happen if a package's -+# installation fails and the `postinst' is called with `abort-upgrade', -+# `abort-remove' or `abort-deconfigure'. -+ -+case "$1" in -+ configure) -+ -+ ;; -+ -+ abort-upgrade|abort-remove|abort-deconfigure) -+ -+ ;; -+ -+ *) -+ echo "postinst called with unknown argument \`$1'" >&2 -+ exit 0 -+ ;; -+esac -+ -+# dh_installdeb will replace this with shell code automatically -+# generated by other debhelper scripts. -+ -+#DEBHELPER# -+ -+exit 0 -+ -+ ---- mii-diag-2.11.orig/debian/mii-diag.postinst -+++ mii-diag-2.11/debian/mii-diag.postinst -@@ -0,0 +1,47 @@ -+#! /bin/sh -+# postinst script for nictools -+# -+# see: dh_installdeb(1) -+ -+set -e -+ -+# summary of how this script can be called: -+# * `configure' -+# * `abort-upgrade' -+# * `abort-remove' `in-favour' -+# -+# * `abort-deconfigure' `in-favour' -+# `removing' -+# -+# for details, see /usr/doc/packaging-manual/ -+# -+# quoting from the policy: -+# Any necessary prompting should almost always be confined to the -+# post-installation script, and should be protected with a conditional -+# so that unnecessary prompting doesn't happen if a package's -+# installation fails and the `postinst' is called with `abort-upgrade', -+# `abort-remove' or `abort-deconfigure'. -+ -+case "$1" in -+ configure) -+ -+ ;; -+ -+ abort-upgrade|abort-remove|abort-deconfigure) -+ -+ ;; -+ -+ *) -+ echo "postinst called with unknown argument \`$1'" >&2 -+ exit 0 -+ ;; -+esac -+ -+# dh_installdeb will replace this with shell code automatically -+# generated by other debhelper scripts. -+ -+#DEBHELPER# -+ -+exit 0 -+ -+ ---- mii-diag-2.11.orig/debian/mii-diag.preinst -+++ mii-diag-2.11/debian/mii-diag.preinst -@@ -0,0 +1,40 @@ -+#! /bin/sh -+# preinst script for nictools -+# -+# see: dh_installdeb(1) -+ -+set -e -+ -+# summary of how this script can be called: -+# * `install' -+# * `install' -+# * `upgrade' -+# * `abort-upgrade' -+ -+case "$1" in -+ install|upgrade) -+# if [ "$1" = "upgrade" ] -+# then -+# start-stop-daemon --stop --quiet --oknodo \ -+# --pidfile /var/run/nictools.pid \ -+# --exec /usr/sbin/nictools 2>/dev/null || true -+# fi -+ ;; -+ -+ abort-upgrade) -+ ;; -+ -+ *) -+ echo "preinst called with unknown argument \`$1'" >&2 -+ exit 0 -+ ;; -+esac -+ -+# dh_installdeb will replace this with shell code automatically -+# generated by other debhelper scripts. -+ -+#DEBHELPER# -+ -+exit 0 -+ -+ ---- mii-diag-2.11.orig/debian/mii-diag.prerm -+++ mii-diag-2.11/debian/mii-diag.prerm -@@ -0,0 +1,37 @@ -+#! /bin/sh -+# prerm script for nictools -+# -+# see: dh_installdeb(1) -+ -+set -e -+ -+# summary of how this script can be called: -+# * `remove' -+# * `upgrade' -+# * `failed-upgrade' -+# * `remove' `in-favour' -+# * `deconfigure' `in-favour' -+# `removing' -+# -+# for details, see /usr/doc/packaging-manual/ -+ -+case "$1" in -+ remove|upgrade|deconfigure) -+# install-info --quiet --remove /usr/info/nictools.info.gz -+ ;; -+ failed-upgrade) -+ ;; -+ *) -+ echo "prerm called with unknown argument \`$1'" >&2 -+ exit 0 -+ ;; -+esac -+ -+# dh_installdeb will replace this with shell code automatically -+# generated by other debhelper scripts. -+ -+#DEBHELPER# -+ -+exit 0 -+ -+ ---- mii-diag-2.11.orig/debian/mii-diag.postrm -+++ mii-diag-2.11/debian/mii-diag.postrm -@@ -0,0 +1,38 @@ -+#! /bin/sh -+# postrm script for nictools -+# -+# see: dh_installdeb(1) -+ -+set -e -+ -+# summary of how this script can be called: -+# * `remove' -+# * `purge' -+# * `upgrade' -+# * `failed-upgrade' -+# * `abort-install' -+# * `abort-install' -+# * `abort-upgrade' -+# * `disappear' overwrit>r> -+# for details, see /usr/doc/packaging-manual/ -+ -+case "$1" in -+ purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) -+ -+ # update the menu system -+# if [ -x /usr/bin/update-menus ]; then update-menus; fi -+ -+ ;; -+ -+ *) -+ echo "postrm called with unknown argument \`$1'" >&2 -+ exit 0 -+ -+esac -+ -+# dh_installdeb will replace this with shell code automatically -+# generated by other debhelper scripts. -+ -+#DEBHELPER# -+ -+ ---- mii-diag-2.11.orig/debian/mii-diag.files -+++ mii-diag-2.11/debian/mii-diag.files -@@ -0,0 +1 @@ -+usr/sbin/mii-diag ---- mii-diag-2.11.orig/Makefile -+++ mii-diag-2.11/Makefile -@@ -0,0 +1,26 @@ -+CFLAGS= -O -Wall -+CC=gcc -+INSTALL=install -+ -+LIBS=libmii.o -+ -+all: mii-diag mii-diag-udeb -+ -+mii-diag: -+ $(CC) $(CFLAGS) -Wstrict-prototypes -O mii-diag.c -DLIBMII \ -+ libmii.c -o mii-diag -+ -+mii-diag-udeb: -+ $(CC) -Os -Wstrict-prototypes -O mii-diag.c -o mii-diag -+clean: -+ rm -f *.o mii-diag mii-diag-udeb *~ -+ -+install-mii-diag: -+ mkdir -p $(DESTDIR)/usr/sbin -+ $(INSTALL) mii-diag $(DESTDIR)/usr/sbin -+ -+install-mii-diag-udeb: -+ mkdir -p $(DESTDIR)/usr/sbin -+ $(INSTALL) mii-diag-udeb $(DESTDIR)/usr/sbin/mii-diag -+ -+install: all install-mii-diag diff --git a/patches/mii-diag-2.11.orig/series b/patches/mii-diag-2.11.orig/series index 04214af48..3ecb2736b 100644 --- a/patches/mii-diag-2.11.orig/series +++ b/patches/mii-diag-2.11.orig/series @@ -1 +1,4 @@ -mii-diag_2.11-2.diff +# generated by git-ptx-patches +0001-mii-diag_2.11-2-Makefile.patch +0002-replace-index-rindex-with-strchr-strrchr.patch +# 2e29a1e83e57463840643d7cbf0162d3 - git-ptx-patches magic -- cgit v1.2.3