Package: dbf2mysql
Severity: wishlist
Tags: patch

Hi,

The dpatch patch management system has been deprecated for some time. The
Lintian currently flags use of dpatch packages as an error. The new 3.0
packaging format is an improved version which, among other things, contains
patch management built-in. For more information, see:

    http://wiki.debian.org/Projects/DebSrc3.0

I had some free time; see attached patch to migrate to new package
format. Note that all files in debian/patches/* are canocalized to
*.patch.

Let me know if there is anything that needs adjusting or if it is ok
to upload this version in a NMU in case you are working on other
issues needing attention.

Thanks,
Jari

>From d76cfb208f5d83c533cc601b3f2a54a2f9d17cf0 Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aa...@cante.net>
Date: Sat, 28 Apr 2012 17:32:05 +0300
Subject: [PATCH] format-3.0
Organization: Private
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Signed-off-by: Jari Aalto <jari.aa...@cante.net>
---
 debian/changelog                                   |   16 ++++++
 debian/compat                                      |    1 +
 debian/control                                     |   11 ++--
 debian/copyright                                   |   13 +++--
 debian/patches/00list                              |    5 --
 debian/patches/05-foxpro.patch                     |   15 ++++++
 debian/patches/{mysql.dpatch => 10-mysql.patch}    |   26 +--------
 debian/patches/15-README.patch                     |   16 ++++++
 debian/patches/20-u-char.patch                     |   36 +++++++++++++
 ..._connect.dpatch => 25-mysql-real-connect.patch} |   10 +---
 debian/patches/README.dpatch                       |   38 --------------
 debian/patches/foxpro.dpatch                       |   37 -------------
 debian/patches/series                              |    5 ++
 debian/patches/u_char.dpatch                       |   55 --------------------
 debian/rules                                       |   36 ++++---------
 debian/source/format                               |    1 +
 16 files changed, 118 insertions(+), 203 deletions(-)
 create mode 100644 debian/compat
 delete mode 100644 debian/patches/00list
 create mode 100644 debian/patches/05-foxpro.patch
 rename debian/patches/{mysql.dpatch => 10-mysql.patch} (88%)
 create mode 100644 debian/patches/15-README.patch
 create mode 100644 debian/patches/20-u-char.patch
 rename debian/patches/{05_mysql_real_connect.dpatch => 25-mysql-real-connect.patch} (77%)
 delete mode 100644 debian/patches/README.dpatch
 delete mode 100644 debian/patches/foxpro.dpatch
 create mode 100644 debian/patches/series
 delete mode 100644 debian/patches/u_char.dpatch
 create mode 100644 debian/source/format

diff --git a/debian/changelog b/debian/changelog
index 0d788e5..677d5e9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,19 @@
+dbf2mysql (1.14a-3.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Remove deprecated dpatch and upgrade to packaging format "3.0 quilt".
+  * Update to Standards-Version to 3.9.3 and debhelper to 9.
+  * Add build-arch and build-indep targets; use dh_prep in rules file.
+  * Patches:
+    - Number all files to make apply order apparent.
+    - Patch 05: update with "quilt refresh" to make it apply cleanly.
+  * Fix copyright-refers-to-symlink-license (Lintian).
+  * Fix copyright-without-copyright-notice (Lintian).
+  * Fix debian-rules-ignores-make-clean-error (Lintian).
+  * Fix extended-description-is-probably-too-short (Lintian).
+
+ -- Jari Aalto <jari.aa...@cante.net>  Sat, 28 Apr 2012 17:30:58 +0300
+
 dbf2mysql (1.14a-3.1) unstable; urgency=low
 
   * Non-maintainer upload.
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
index 33e5ead..805308c 100644
--- a/debian/control
+++ b/debian/control
@@ -2,12 +2,15 @@ Source: dbf2mysql
 Section: misc
 Priority: optional
 Maintainer: Francesco Paolo Lovergine <fran...@debian.org>
-Standards-Version: 3.6.1
-Build-Depends: debhelper (>= 3), dpatch, libmysqlclient15-dev | libmysqlclient-dev
+Standards-Version: 3.9.3
+Build-Depends: debhelper (>= 9), libmysqlclient15-dev | libmysqlclient-dev
 
 Package: dbf2mysql
 Architecture: any
-Depends: ${shlibs:Depends}
-Description: xBase <--> MySQL
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: xBase to MySQL or vice versa
  This program takes an xBase file and sends queries to an MySQL server to
  insert it into an MySQL table and vice versa.
+ .
+ This package now consists of two programs: the dbf2mysql, and mysql2dbf,
+ which makes it possible to dump an mySQL-table to a dbf-file.
diff --git a/debian/copyright b/debian/copyright
index 0c48865..729979d 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -3,12 +3,15 @@ This is Debian's prepackaged version of the dbf2mysql utility.
 Upstream sources were obtained from
 <http://www.mysql.com/Downloads/Contrib/dbf2mysql-1.14.tar.gz>.
 
-The copyright found in the package README:
+Upstream authors:
+
+  Copyright (C) 1995 Maarten Boekhold <boekh...@cindy.et.tudelft.nl>
+  Copyright (C) 1996 Michael Widenius <mo...@analytikerna.se>
+
+Copyright
+
+  [from file README]
 
   Use this piece of software as you want, modify it to suit your needs,
   but please leave my name in place ok? :)
 
-The authors are:
-
-  Maarten Boekhold <boekh...@cindy.et.tudelft.nl>
-  Michael Widenius <mo...@analytikerna.se>
diff --git a/debian/patches/00list b/debian/patches/00list
deleted file mode 100644
index bb41e7e..0000000
--- a/debian/patches/00list
+++ /dev/null
@@ -1,5 +0,0 @@
-foxpro
-mysql
-README
-u_char
-05_mysql_real_connect
diff --git a/debian/patches/05-foxpro.patch b/debian/patches/05-foxpro.patch
new file mode 100644
index 0000000..3c3bfc7
--- /dev/null
+++ b/debian/patches/05-foxpro.patch
@@ -0,0 +1,15 @@
+From: Francesco Paolo Lovergine <fran...@debian.org>
+Subject: No description.
+
+diff -urNad /home/frankie/debian/mypkgs/dbf2mysql/dbf2mysql-1.14a/dbf.c dbf2mysql-1.14a/dbf.c
+--- /home/frankie/debian/mypkgs/dbf2mysql/dbf2mysql-1.14a/dbf.c	2003-10-07 20:40:57.000000000 +0200
++++ dbf2mysql-1.14a/dbf.c	2003-10-07 20:41:29.000000000 +0200
+@@ -570,8 +570,6 @@
+ 	    switch(dbh->db_memo)
+ 	    {
+ 	      case DBF_MTYPE_FPT:
+-		blknum = get_long(dbffield);
+-		break;
+ 	      case DBF_MTYPE_DBT3:
+ 	      case DBF_MTYPE_DBT4:
+ 		strncpy(fields[t].db_contents, (char *)dbffield, fields[t].db_flen);
diff --git a/debian/patches/mysql.dpatch b/debian/patches/10-mysql.patch
similarity index 88%
rename from debian/patches/mysql.dpatch
rename to debian/patches/10-mysql.patch
index f880161..07d1360 100644
--- a/debian/patches/mysql.dpatch
+++ b/debian/patches/10-mysql.patch
@@ -1,28 +1,6 @@
-#!/bin/sh -e
-## mysql.dpatch by Francesco Paolo Lovergine <fran...@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
+From: Francesco Paolo Lovergine <fran...@debian.org>
+Subject: No description.
 
-if [ $# -ne 1 ]; then
-    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-    exit 1
-fi
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
-
-case "$1" in
-       -patch) patch $patch_opts -p1 < $0;;
-       -unpatch) patch $patch_opts -p1 -R < $0;;
-        *)
-                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-                exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
 diff -urNad /home/frankie/debian/mypkgs/dbf2mysql/dbf2mysql-1.14a/dbf2mysql.c dbf2mysql-1.14a/dbf2mysql.c
 --- /home/frankie/debian/mypkgs/dbf2mysql/dbf2mysql-1.14a/dbf2mysql.c	2003-10-07 20:46:27.000000000 +0200
 +++ dbf2mysql-1.14a/dbf2mysql.c	2003-10-07 20:46:55.000000000 +0200
diff --git a/debian/patches/15-README.patch b/debian/patches/15-README.patch
new file mode 100644
index 0000000..ab71235
--- /dev/null
+++ b/debian/patches/15-README.patch
@@ -0,0 +1,16 @@
+From: Francesco Paolo Lovergine <fran...@debian.org>
+Subject: No description.
+
+diff -urNad /home/frankie/debian/mypkgs/dbf2mysql/dbf2mysql-1.14a/README dbf2mysql-1.14a/README
+--- /home/frankie/debian/mypkgs/dbf2mysql/dbf2mysql-1.14a/README	2003-10-07 20:48:13.000000000 +0200
++++ dbf2mysql-1.14a/README	2003-10-07 20:48:43.000000000 +0200
+@@ -84,6 +84,9 @@
+ 
+ -r  Trim trailing and leading whitspaces from CHAR type fields data
+ 
++-L  Enable LOAD DATA LOCAL INFILE, should be used with MySQL > 3.23.49 and
++    > 4.0.2
++
+ Rudimentary read-only support for Visual FoxPro, DB III+, and DB IV memo
+ fields/files has been added.
+ 
diff --git a/debian/patches/20-u-char.patch b/debian/patches/20-u-char.patch
new file mode 100644
index 0000000..dfd1440
--- /dev/null
+++ b/debian/patches/20-u-char.patch
@@ -0,0 +1,36 @@
+From: Francesco Paolo Lovergine <fran...@debian.org>
+Subject: No description.
+
+---
+ dbf.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/dbf.c
++++ b/dbf.c
+@@ -513,7 +513,7 @@
+ {
+     int     	t, i;
+     u_char  	*dbffield;
+-    char	*end, *sp;
++    u_char	*end, *sp;
+     double	dblval;
+     long long	int8val;
+     long	int4val;
+@@ -549,7 +549,7 @@
+     {
+ 	switch(fields[t].db_type) {
+ 	  case 'C':		/* Character data */
+-	    end = (char *)&dbffield[fields[t].db_flen - 1];
++	    end = &dbffield[fields[t].db_flen - 1];
+ 	    i = fields[t].db_flen;
+ 	    while (( i > 0) && ((*end < 0x21)/* || (*end > 0x7E)*/)) {
+ 		end--;
+@@ -657,7 +657,7 @@
+ 	    break;
+ 
+ 	  default:
+-	    end = (char *)dbffield;
++	    end = dbffield;
+ 	    i = fields[t].db_flen;
+ 	    while (( i > 0) && ((*end < 0x21)/* || (*end > 0x7E)*/)) {
+ 		end++;
diff --git a/debian/patches/05_mysql_real_connect.dpatch b/debian/patches/25-mysql-real-connect.patch
similarity index 77%
rename from debian/patches/05_mysql_real_connect.dpatch
rename to debian/patches/25-mysql-real-connect.patch
index 71dbee3..18b618f 100644
--- a/debian/patches/05_mysql_real_connect.dpatch
+++ b/debian/patches/25-mysql-real-connect.patch
@@ -1,11 +1,5 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 05_mysql_real_connect.dpatch by Steve Langasek <vor...@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: switch from using mysql_connect to mysql_real_connect, for MySQL 5.0
-## DP: compatibility
-
-@DPATCH@
+From: Steve Langasek <vor...@debian.org>
+Subject: switch from using mysql_connect to mysql_real_connect, for MySQL 5.0
 
 --- dbf2mysql-1.14a.orig/mysql2dbf.c
 +++ dbf2mysql-1.14a/mysql2dbf.c
diff --git a/debian/patches/README.dpatch b/debian/patches/README.dpatch
deleted file mode 100644
index dd5bc50..0000000
--- a/debian/patches/README.dpatch
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh -e
-## README.dpatch by Francesco Paolo Lovergine <fran...@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
-if [ $# -ne 1 ]; then
-    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-    exit 1
-fi
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
-
-case "$1" in
-       -patch) patch $patch_opts -p1 < $0;;
-       -unpatch) patch $patch_opts -p1 -R < $0;;
-        *)
-                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-                exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
-diff -urNad /home/frankie/debian/mypkgs/dbf2mysql/dbf2mysql-1.14a/README dbf2mysql-1.14a/README
---- /home/frankie/debian/mypkgs/dbf2mysql/dbf2mysql-1.14a/README	2003-10-07 20:48:13.000000000 +0200
-+++ dbf2mysql-1.14a/README	2003-10-07 20:48:43.000000000 +0200
-@@ -84,6 +84,9 @@
- 
- -r  Trim trailing and leading whitspaces from CHAR type fields data
- 
-+-L  Enable LOAD DATA LOCAL INFILE, should be used with MySQL > 3.23.49 and
-+    > 4.0.2
-+
- Rudimentary read-only support for Visual FoxPro, DB III+, and DB IV memo
- fields/files has been added.
- 
diff --git a/debian/patches/foxpro.dpatch b/debian/patches/foxpro.dpatch
deleted file mode 100644
index 2010a98..0000000
--- a/debian/patches/foxpro.dpatch
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh -e
-## foxpro.dpatch by Francesco Paolo Lovergine <fran...@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
-if [ $# -ne 1 ]; then
-    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-    exit 1
-fi
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
-
-case "$1" in
-       -patch) patch $patch_opts -p1 < $0;;
-       -unpatch) patch $patch_opts -p1 -R < $0;;
-        *)
-                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-                exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
-diff -urNad /home/frankie/debian/mypkgs/dbf2mysql/dbf2mysql-1.14a/dbf.c dbf2mysql-1.14a/dbf.c
---- /home/frankie/debian/mypkgs/dbf2mysql/dbf2mysql-1.14a/dbf.c	2003-10-07 20:40:57.000000000 +0200
-+++ dbf2mysql-1.14a/dbf.c	2003-10-07 20:41:29.000000000 +0200
-@@ -570,8 +570,6 @@
- 	    switch(dbh->db_memo)
- 	    {
- 	      case DBF_MTYPE_FPT:
--		blknum = get_long(dbffield);
--		break;
- 	      case DBF_MTYPE_DBT3:
- 	      case DBF_MTYPE_DBT4:
- 		strncpy(fields[t].db_contents, (char *)dbffield, fields[t].db_flen);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..2b79e3b
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,5 @@
+05-foxpro.patch
+10-mysql.patch
+15-README.patch
+20-u-char.patch
+25-mysql-real-connect.patch
diff --git a/debian/patches/u_char.dpatch b/debian/patches/u_char.dpatch
deleted file mode 100644
index 0ec8e99..0000000
--- a/debian/patches/u_char.dpatch
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/sh -e
-## u_char.dpatch by Francesco Paolo Lovergine <fran...@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
-if [ $# -ne 1 ]; then
-    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-    exit 1
-fi
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
-
-case "$1" in
-       -patch) patch $patch_opts -p1 < $0;;
-       -unpatch) patch $patch_opts -p1 -R < $0;;
-        *)
-                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-                exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
-diff -urNad /home/frankie/debian/mypkgs/dbf2mysql/dbf2mysql-1.14a/dbf.c dbf2mysql-1.14a/dbf.c
---- /home/frankie/debian/mypkgs/dbf2mysql/dbf2mysql-1.14a/dbf.c	2003-10-07 20:40:57.000000000 +0200
-+++ dbf2mysql-1.14a/dbf.c	2003-10-07 20:48:59.000000000 +0200
-@@ -513,7 +513,7 @@
- {
-     int     	t, i;
-     u_char  	*dbffield;
--    char	*end, *sp;
-+    u_char	*end, *sp;
-     double	dblval;
-     long long	int8val;
-     long	int4val;
-@@ -549,7 +549,7 @@
-     {
- 	switch(fields[t].db_type) {
- 	  case 'C':		/* Character data */
--	    end = (char *)&dbffield[fields[t].db_flen - 1];
-+	    end = &dbffield[fields[t].db_flen - 1];
- 	    i = fields[t].db_flen;
- 	    while (( i > 0) && ((*end < 0x21)/* || (*end > 0x7E)*/)) {
- 		end--;
-@@ -659,7 +659,7 @@
- 	    break;
- 
- 	  default:
--	    end = (char *)dbffield;
-+	    end = dbffield;
- 	    i = fields[t].db_flen;
- 	    while (( i > 0) && ((*end < 0x21)/* || (*end > 0x7E)*/)) {
- 		end++;
diff --git a/debian/rules b/debian/rules
index 3f8fd01..36ebe45 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,55 +5,37 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-# This is the debhelper compatibility version to use.
-export DH_COMPAT=3
-
 CFLAGS=-O2 -Wall
 ifneq ($(findstring debug,$(DEB_BUILD_OPTIONS)),)
 CFLAGS+=-g
 endif
 
-include /usr/share/dpatch/dpatch.make
+
+
+build-arch: build
+build-indep: build
 
 build: build-stamp
-build-stamp: patch-stamp
+build-stamp:
 	dh_testdir
-
-	# Patching
-	
-#	patch <debian/foxpro.diff
-#	patch <debian/mysql.diff
-#	patch <debian/README.diff
-#	patch <debian/u_char.diff
-	
 	# Add here commands to compile the package.
 	$(MAKE) CFLAGS="$(CFLAGS)" MYSQLLIB= STRIP=
 
 	touch build-stamp
 
-clean: myclean unpatch
+clean: myclean
 myclean:
 	dh_testdir
 	dh_testroot
 	rm -f build-stamp
-
 	# Add here commands to clean up after the build process.
-	-$(MAKE) clean
-
-
-	# Reversing patches
-	 
-#	-patch --reverse <debian/README.diff
-#	-patch --reverse <debian/mysql.diff
-#	-patch --reverse <debian/foxpro.diff
-#	-patch --reverse <debian/u_char.diff
-
+	[ ! -f Makefile ] || $(MAKE) clean
 	dh_clean
 
 install: build
 	dh_testdir
 	dh_testroot
-	dh_clean -k
+	dh_prep
 	dh_installdirs usr/bin
 
 	# Add here commands to install the package into debian/<packagename>
@@ -94,4 +76,4 @@ binary-arch: build install
 	dh_builddeb
 
 binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install patch unpatch myclean
+.PHONY: build clean binary-indep binary-arch binary install myclean
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
-- 
1.7.10

Reply via email to