NMUing this package with the debdiff attached.
diff -Nru vpb-driver-4.2.61/debian/changelog vpb-driver-4.2.61/debian/changelog
--- vpb-driver-4.2.61/debian/changelog 2022-12-10 00:47:42.000000000 +0100
+++ vpb-driver-4.2.61/debian/changelog 2022-12-10 00:42:50.000000000 +0100
@@ -1,3 +1,11 @@
+vpb-driver (4.2.61-1.3) unstable; urgency=medium
+
+ * Non-maintainer upload
+ * Convert to 3.0 source format (Closes: #1007564)
+ * Fix build on current Linux version (Closes: #1005418)
+
+ -- Bastian Germann <b...@debian.org> Sat, 10 Dec 2022 00:42:50 +0100
+
vpb-driver (4.2.61-1.2) unstable; urgency=medium
* Non-maintainer upload
diff -Nru vpb-driver-4.2.61/debian/patches/debian.patch
vpb-driver-4.2.61/debian/patches/debian.patch
--- vpb-driver-4.2.61/debian/patches/debian.patch 1970-01-01
01:00:00.000000000 +0100
+++ vpb-driver-4.2.61/debian/patches/debian.patch 2022-12-10
00:42:50.000000000 +0100
@@ -0,0 +1,221 @@
+--- vpb-driver-4.2.61.orig/src/vpb/Makefile
++++ vpb-driver-4.2.61/src/vpb/Makefile
+@@ -46,7 +46,9 @@ install:
+ echo "installing $$m --> $(MODULEDIR)"; \
+ install -m 644 $$m $(MODULEDIR); \
+ done
+- /sbin/depmod
++ifeq ($(DESTDIR),)
++ /sbin/depmod $(KVERS)
++endif
+
+ clean distclean:
+ $(RM) *.o *.ko *~ core *.mod.c .*.cmd
+--- vpb-driver-4.2.61.orig/src/vpb/vpb.c
++++ vpb-driver-4.2.61/src/vpb/vpb.c
+@@ -97,14 +97,6 @@
+ #define MODVERSIONS
+ #endif
+
+-#ifdef MODVERSIONS
+-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,4))
+-#include <config/modversions.h>
+-#else
+-#include <linux/modversions.h>
+-#endif
+-#endif
+-
+ #include <linux/ioport.h>
+ #include <linux/errno.h>
+ #include <linux/mm.h>
+@@ -279,7 +271,7 @@ int init_module(void)
+ printk(KERN_INFO NAME ": tmp [0x%lx] dev->res2
[0x%lx]\n",
+ tmp, (unsigned
long)dev->resource[2].start);
+
+- base2[numPCI] =
ioremap_nocache(dev->resource[2].start &
++ base2[numPCI] = ioremap(dev->resource[2].start &
+ PCI_BASE_ADDRESS_MEM_MASK,
+ sizeof(short)*SIZE_WD);
+
+--- vpb-driver-4.2.61.orig/src/vtcore/Makefile
++++ vpb-driver-4.2.61/src/vtcore/Makefile
+@@ -50,8 +50,10 @@ install:
+ echo "installing $$m --> $(MODULEDIR)"; \
+ install -m 644 $$m $(MODULEDIR); \
+ done
+- /sbin/depmod
++ifeq ($(DESTDIR),)
++ /sbin/depmod $(KVERS)
+ @modprobe -r netjet > /dev/null 2>&1 || true
++endif
+
+ clean distclean:
+ rm -f *.o *.ko *~ core *.mod.c .*.cmd
+--- vpb-driver-4.2.61.orig/src/vtcore/vtcommon.h
++++ vpb-driver-4.2.61/src/vtcore/vtcommon.h
+@@ -49,14 +49,6 @@
+ #endif
+ #endif
+
+-#ifdef MODVERSIONS
+- #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,4))
+- #include <config/modversions.h>
+- #else
+- #include <linux/modversions.h>
+- #endif
+-#endif
+-
+ #include <linux/slab.h>
+
+
+--- vpb-driver-4.2.61.orig/src/vtcore/vtcore_main.c
++++ vpb-driver-4.2.61/src/vtcore/vtcore_main.c
+@@ -213,6 +213,34 @@ static inline const char *porttype(int t
+ }
+ } //}}}
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)
++#define VT_DEFINE_PROC_OPS(storage, name, _owner, _open, _write) \
++storage const struct proc_ops name = {
\
++ .proc_open = _open, \
++ .proc_read = seq_read, \
++ .proc_lseek = seq_lseek, \
++ .proc_release = single_release, \
++ .proc_write = _write, \
++}
++#else /* LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0) */
++#define VT_DEFINE_PROC_OPS(storage, name, _owner, _open, _write) \
++storage const struct file_operations name = { \
++ .owner = _owner, \
++ .open = _open, \
++ .read = seq_read, \
++ .llseek = seq_lseek, \
++ .release = single_release, \
++ .write = _write, \
++}
++#endif
++
++#define VT_DEFINE_PROC_OPS_OPEN(storage, name)
\
++ VT_DEFINE_PROC_OPS(storage, name ## _proc_fops, NULL, \
++ name ## _proc_open, NULL)
++
++#define VT_DEFINE_PROC_OPS_OPEN_WRITE(storage, name) \
++ VT_DEFINE_PROC_OPS(storage, name ## _proc_fops, THIS_MODULE, \
++ name ## _proc_open, name ## _proc_write)
+
+ static int vt_int_proc_show(struct seq_file *m, void *v)
+ { //{{{
+@@ -225,12 +253,8 @@ static int vt_int_proc_open(struct inode
+ return single_open(file, vt_int_proc_show, PDE_DATA(inode));
+ }
+
+-const struct file_operations vt_int_proc_fops = {
+- .open = vt_int_proc_open,
+- .read = seq_read,
+- .llseek = seq_lseek,
+- .release = single_release,
+-}; //}}}
++VT_DEFINE_PROC_OPS_OPEN(, vt_int);
++//}}}
+
+ static int vt_string_proc_show(struct seq_file *m, void *v)
+ { //{{{
+@@ -243,12 +267,8 @@ static int vt_string_proc_open(struct in
+ return single_open(file, vt_string_proc_show, PDE_DATA(inode));
+ }
+
+-const struct file_operations vt_string_proc_fops = {
+- .open = vt_string_proc_open,
+- .read = seq_read,
+- .llseek = seq_lseek,
+- .release = single_release,
+-}; //}}}
++VT_DEFINE_PROC_OPS_OPEN(, vt_string);
++//}}}
+
+
+ int __init vtcore_init(void)
+@@ -1081,14 +1101,8 @@ static ssize_t vt_country_proc_write(str
+ return ret;
+ }
+
+-static const struct file_operations vt_country_proc_fops = {
+- .owner = THIS_MODULE,
+- .open = vt_country_proc_open,
+- .read = seq_read,
+- .llseek = seq_lseek,
+- .release = single_release,
+- .write = vt_country_proc_write,
+-}; //}}}
++VT_DEFINE_PROC_OPS_OPEN_WRITE(static, vt_country);
++//}}}
+
+ // Template definitions for port ops that communicate a single integer value.
+ // {{{
+@@ -1161,25 +1175,13 @@ static ssize_t vt_##attrib##_proc_write(
+ #define PROC_READ_PORT(attrib)
\
+ PROC_READ_PORT_(attrib)
\
+
\
+-static const struct file_operations vt_##attrib##_proc_fops = {
\
+- .open = vt_##attrib##_proc_open,
\
+- .read = seq_read,
\
+- .llseek = seq_lseek,
\
+- .release = single_release,
\
+-};
++VT_DEFINE_PROC_OPS_OPEN(static, vt_##attrib);
+
+ #define PROC_READWRITE_PORT(attrib)
\
+ PROC_READ_PORT_(attrib)
\
+ PROC_WRITE_PORT_(attrib)
\
+
\
+-static const struct file_operations vt_##attrib##_proc_fops = {
\
+- .owner = THIS_MODULE,
\
+- .open = vt_##attrib##_proc_open,
\
+- .read = seq_read,
\
+- .llseek = seq_lseek,
\
+- .release = single_release,
\
+- .write = vt_##attrib##_proc_write,
\
+-};
++VT_DEFINE_PROC_OPS_OPEN_WRITE(static, vt_##attrib);
+ //}}}
+
+ PROC_READWRITE_PORT(playgain)
+--- vpb-driver-4.2.61.orig/src/vtcore/vtmodule.h
++++ vpb-driver-4.2.61/src/vtcore/vtmodule.h
+@@ -9,6 +9,7 @@
+ #define __VTMODULE__
+
+ #include <linux/cdev.h>
++#include <linux/version.h>
+
+ #include "linringbuf.h"
+
+@@ -159,8 +160,13 @@ void vt_write(struct vtboard *board);
+ void vt_read(struct vtboard *board);
+ int vt_send_event(struct vtboard *board, char *mess, int size);
+
+-const struct file_operations vt_int_proc_fops;
+-const struct file_operations vt_string_proc_fops;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)
++extern const struct proc_ops vt_int_proc_fops;
++extern const struct proc_ops vt_string_proc_fops;
++#else
++extern const struct file_operations vt_int_proc_fops;
++extern const struct file_operations vt_string_proc_fops;
++#endif
+ void vt_create_board_proc_const_int(struct vtboard *board, const char *node,
long val);
+
+ #endif
+--- vpb-driver-4.2.61.orig/src/vtcore/vtopenswitch.c
++++ vpb-driver-4.2.61/src/vtcore/vtopenswitch.c
+@@ -1642,8 +1642,8 @@ static int openswitch_probe_board(struct
+ //XXX The new way.
+ //void __iomem * map = pci_iomap(dev, bar, maxbytes);
+
+- card->base0 = ioremap_nocache( pci_resource_start(pdev,0),
+- pci_resource_len(pdev,0) );
++ card->base0 = ioremap( pci_resource_start(pdev,0),
++ pci_resource_len(pdev,0) );
+ card->base2 = ioremap( pci_resource_start(pdev,2),
+ pci_resource_len(pdev,2) );
+
diff -Nru vpb-driver-4.2.61/debian/patches/series
vpb-driver-4.2.61/debian/patches/series
--- vpb-driver-4.2.61/debian/patches/series 1970-01-01 01:00:00.000000000
+0100
+++ vpb-driver-4.2.61/debian/patches/series 2022-12-10 00:42:50.000000000
+0100
@@ -0,0 +1 @@
+debian.patch
diff -Nru vpb-driver-4.2.61/debian/source/format
vpb-driver-4.2.61/debian/source/format
--- vpb-driver-4.2.61/debian/source/format 1970-01-01 01:00:00.000000000
+0100
+++ vpb-driver-4.2.61/debian/source/format 2022-12-10 00:42:43.000000000
+0100
@@ -0,0 +1 @@
+3.0 (quilt)
diff -Nru vpb-driver-4.2.61/src/vpb/Makefile vpb-driver-4.2.61/src/vpb/Makefile
--- vpb-driver-4.2.61/src/vpb/Makefile 2022-12-10 00:47:42.000000000 +0100
+++ vpb-driver-4.2.61/src/vpb/Makefile 2018-04-04 21:42:57.000000000 +0200
@@ -46,9 +46,7 @@
echo "installing $$m --> $(MODULEDIR)"; \
install -m 644 $$m $(MODULEDIR); \
done
-ifeq ($(DESTDIR),)
- /sbin/depmod $(KVERS)
-endif
+ /sbin/depmod
clean distclean:
$(RM) *.o *.ko *~ core *.mod.c .*.cmd
diff -Nru vpb-driver-4.2.61/src/vpb/vpb.c vpb-driver-4.2.61/src/vpb/vpb.c
--- vpb-driver-4.2.61/src/vpb/vpb.c 2022-12-10 00:47:42.000000000 +0100
+++ vpb-driver-4.2.61/src/vpb/vpb.c 2018-04-04 21:42:57.000000000 +0200
@@ -279,7 +279,7 @@
printk(KERN_INFO NAME ": tmp [0x%lx] dev->res2
[0x%lx]\n",
tmp, (unsigned
long)dev->resource[2].start);
- base2[numPCI] = ioremap(dev->resource[2].start &
+ base2[numPCI] = ioremap_nocache(dev->resource[2].start
&
PCI_BASE_ADDRESS_MEM_MASK,
sizeof(short)*SIZE_WD);
diff -Nru vpb-driver-4.2.61/src/vtcore/Makefile
vpb-driver-4.2.61/src/vtcore/Makefile
--- vpb-driver-4.2.61/src/vtcore/Makefile 2022-12-10 00:47:42.000000000
+0100
+++ vpb-driver-4.2.61/src/vtcore/Makefile 2018-04-04 21:42:57.000000000
+0200
@@ -50,10 +50,8 @@
echo "installing $$m --> $(MODULEDIR)"; \
install -m 644 $$m $(MODULEDIR); \
done
-ifeq ($(DESTDIR),)
- /sbin/depmod $(KVERS)
+ /sbin/depmod
@modprobe -r netjet > /dev/null 2>&1 || true
-endif
clean distclean:
rm -f *.o *.ko *~ core *.mod.c .*.cmd
diff -Nru vpb-driver-4.2.61/src/vtcore/vtcore_main.c
vpb-driver-4.2.61/src/vtcore/vtcore_main.c
--- vpb-driver-4.2.61/src/vtcore/vtcore_main.c 2022-12-10 00:47:42.000000000
+0100
+++ vpb-driver-4.2.61/src/vtcore/vtcore_main.c 2018-04-04 21:42:57.000000000
+0200
@@ -213,34 +213,6 @@
}
} //}}}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)
-#define VT_DEFINE_PROC_OPS(storage, name, _owner, _open, _write) \
-storage const struct proc_ops name = { \
- .proc_open = _open, \
- .proc_read = seq_read, \
- .proc_lseek = seq_lseek, \
- .proc_release = single_release, \
- .proc_write = _write, \
-}
-#else /* LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0) */
-#define VT_DEFINE_PROC_OPS(storage, name, _owner, _open, _write) \
-storage const struct file_operations name = { \
- .owner = _owner, \
- .open = _open, \
- .read = seq_read, \
- .llseek = seq_lseek, \
- .release = single_release, \
- .write = _write, \
-}
-#endif
-
-#define VT_DEFINE_PROC_OPS_OPEN(storage, name) \
- VT_DEFINE_PROC_OPS(storage, name ## _proc_fops, NULL, \
- name ## _proc_open, NULL)
-
-#define VT_DEFINE_PROC_OPS_OPEN_WRITE(storage, name) \
- VT_DEFINE_PROC_OPS(storage, name ## _proc_fops, THIS_MODULE, \
- name ## _proc_open, name ## _proc_write)
static int vt_int_proc_show(struct seq_file *m, void *v)
{ //{{{
@@ -253,8 +225,12 @@
return single_open(file, vt_int_proc_show, PDE_DATA(inode));
}
-VT_DEFINE_PROC_OPS_OPEN(, vt_int);
-//}}}
+const struct file_operations vt_int_proc_fops = {
+ .open = vt_int_proc_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+}; //}}}
static int vt_string_proc_show(struct seq_file *m, void *v)
{ //{{{
@@ -267,8 +243,12 @@
return single_open(file, vt_string_proc_show, PDE_DATA(inode));
}
-VT_DEFINE_PROC_OPS_OPEN(, vt_string);
-//}}}
+const struct file_operations vt_string_proc_fops = {
+ .open = vt_string_proc_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+}; //}}}
int __init vtcore_init(void)
@@ -1101,8 +1081,14 @@
return ret;
}
-VT_DEFINE_PROC_OPS_OPEN_WRITE(static, vt_country);
-//}}}
+static const struct file_operations vt_country_proc_fops = {
+ .owner = THIS_MODULE,
+ .open = vt_country_proc_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+ .write = vt_country_proc_write,
+}; //}}}
// Template definitions for port ops that communicate a single integer value.
// {{{
@@ -1175,13 +1161,25 @@
#define PROC_READ_PORT(attrib)
\
PROC_READ_PORT_(attrib)
\
\
-VT_DEFINE_PROC_OPS_OPEN(static, vt_##attrib);
+static const struct file_operations vt_##attrib##_proc_fops = {
\
+ .open = vt_##attrib##_proc_open,
\
+ .read = seq_read,
\
+ .llseek = seq_lseek,
\
+ .release = single_release,
\
+};
#define PROC_READWRITE_PORT(attrib)
\
PROC_READ_PORT_(attrib)
\
PROC_WRITE_PORT_(attrib)
\
\
-VT_DEFINE_PROC_OPS_OPEN_WRITE(static, vt_##attrib);
+static const struct file_operations vt_##attrib##_proc_fops = {
\
+ .owner = THIS_MODULE,
\
+ .open = vt_##attrib##_proc_open,
\
+ .read = seq_read,
\
+ .llseek = seq_lseek,
\
+ .release = single_release,
\
+ .write = vt_##attrib##_proc_write,
\
+};
//}}}
PROC_READWRITE_PORT(playgain)
diff -Nru vpb-driver-4.2.61/src/vtcore/vtmodule.h
vpb-driver-4.2.61/src/vtcore/vtmodule.h
--- vpb-driver-4.2.61/src/vtcore/vtmodule.h 2022-12-10 00:47:42.000000000
+0100
+++ vpb-driver-4.2.61/src/vtcore/vtmodule.h 2018-04-04 21:42:57.000000000
+0200
@@ -9,7 +9,6 @@
#define __VTMODULE__
#include <linux/cdev.h>
-#include <linux/version.h>
#include "linringbuf.h"
@@ -160,13 +159,8 @@
void vt_read(struct vtboard *board);
int vt_send_event(struct vtboard *board, char *mess, int size);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)
-extern const struct proc_ops vt_int_proc_fops;
-extern const struct proc_ops vt_string_proc_fops;
-#else
-extern const struct file_operations vt_int_proc_fops;
-extern const struct file_operations vt_string_proc_fops;
-#endif
+const struct file_operations vt_int_proc_fops;
+const struct file_operations vt_string_proc_fops;
void vt_create_board_proc_const_int(struct vtboard *board, const char *node,
long val);
#endif
diff -Nru vpb-driver-4.2.61/src/vtcore/vtopenswitch.c
vpb-driver-4.2.61/src/vtcore/vtopenswitch.c
--- vpb-driver-4.2.61/src/vtcore/vtopenswitch.c 2022-12-10 00:47:42.000000000
+0100
+++ vpb-driver-4.2.61/src/vtcore/vtopenswitch.c 2018-04-04 21:42:57.000000000
+0200
@@ -1642,8 +1642,8 @@
//XXX The new way.
//void __iomem * map = pci_iomap(dev, bar, maxbytes);
- card->base0 = ioremap( pci_resource_start(pdev,0),
- pci_resource_len(pdev,0) );
+ card->base0 = ioremap_nocache( pci_resource_start(pdev,0),
+ pci_resource_len(pdev,0) );
card->base2 = ioremap( pci_resource_start(pdev,2),
pci_resource_len(pdev,2) );