pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/misc/open2300 Update open2300 to version 1.7 (and impl...
details: https://anonhg.NetBSD.org/pkgsrc/rev/99ef7bed2736
branches: trunk
changeset: 483358:99ef7bed2736
user: martin <martin%pkgsrc.org@localhost>
date: Thu Nov 11 10:19:29 2004 +0000
description:
Update open2300 to version 1.7 (and implicitly open2300-mysql too):
bugfix release to fix a buffer overrun.
While there, add a few patches to disable checksum verification on
wind direction - this failed for my weather station consistently on some
data sets. I'll bring this up with the authors.
diffstat:
misc/open2300/Makefile.common | 4 +-
misc/open2300/distinfo | 15 +-
misc/open2300/patches/patch-aa | 8 +-
misc/open2300/patches/patch-ab | 535 +++++++++++++++++++++++++++++++++++++++-
misc/open2300/patches/patch-ad | 23 +
misc/open2300/patches/patch-ae | 13 +
misc/open2300/patches/patch-af | 13 +
misc/open2300/patches/patch-ag | 13 +
misc/open2300/patches/patch-ah | 13 +
9 files changed, 611 insertions(+), 26 deletions(-)
diffs (truncated from 697 to 300 lines):
diff -r 395958ba726d -r 99ef7bed2736 misc/open2300/Makefile.common
--- a/misc/open2300/Makefile.common Thu Nov 11 08:03:53 2004 +0000
+++ b/misc/open2300/Makefile.common Thu Nov 11 10:19:29 2004 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile.common,v 1.1.1.1 2004/11/10 08:19:46 martin Exp $
+# $NetBSD: Makefile.common,v 1.2 2004/11/11 10:19:29 martin Exp $
#
-DISTNAME= open2300-1.6
+DISTNAME= open2300-1.7
CATEGORIES= misc
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=open2300/}
diff -r 395958ba726d -r 99ef7bed2736 misc/open2300/distinfo
--- a/misc/open2300/distinfo Thu Nov 11 08:03:53 2004 +0000
+++ b/misc/open2300/distinfo Thu Nov 11 10:19:29 2004 +0000
@@ -1,7 +1,12 @@
-$NetBSD: distinfo,v 1.1.1.1 2004/11/10 08:19:46 martin Exp $
+$NetBSD: distinfo,v 1.2 2004/11/11 10:19:29 martin Exp $
-SHA1 (open2300-1.6.tar.gz) = e6483c57126b85e3a8189d023cffe88902e928ed
-Size (open2300-1.6.tar.gz) = 327045 bytes
-SHA1 (patch-aa) = cc3948b297357939a23b55ea6dcd4505d5381d15
-SHA1 (patch-ab) = 0db92f0ab78ed6b5cd949123cee26b01e7d10ba8
+SHA1 (open2300-1.7.tar.gz) = 12227964e6a74f41c1efbbd58c4af67fc8ca3151
+Size (open2300-1.7.tar.gz) = 330103 bytes
+SHA1 (patch-aa) = f63fcb9632729e32750f6e1129e2011bbe5c4419
+SHA1 (patch-ab) = abf7bc87a25d1894ecc32d09ed48bd479f076fe3
SHA1 (patch-ac) = 5ddd6e4c0ce2df718c4fcb7efed1d9553c415684
+SHA1 (patch-ad) = 1075315c9eed8d97997b5aab82916772440332c0
+SHA1 (patch-ae) = 062f9d02e839c3c01a31d8b5ac6824a688742c2b
+SHA1 (patch-af) = eaeda5057a9d268c0034c0edff080bb488861296
+SHA1 (patch-ag) = 1239d4d60865e75aa61bba1f04e760c74e84d68c
+SHA1 (patch-ah) = 00d5dfd3a86691f7b2c0cef6360fc52103be6f17
diff -r 395958ba726d -r 99ef7bed2736 misc/open2300/patches/patch-aa
--- a/misc/open2300/patches/patch-aa Thu Nov 11 08:03:53 2004 +0000
+++ b/misc/open2300/patches/patch-aa Thu Nov 11 10:19:29 2004 +0000
@@ -1,7 +1,7 @@
-$NetBSD: patch-aa,v 1.1.1.1 2004/11/10 08:19:46 martin Exp $
+$NetBSD: patch-aa,v 1.2 2004/11/11 10:19:29 martin Exp $
---- Makefile.orig 2004-04-23 17:35:30.000000000 +0200
-+++ Makefile 2004-11-04 09:28:14.000000000 +0100
+--- Makefile.orig 2004-08-01 11:51:08.000000000 +0200
++++ Makefile 2004-11-11 10:43:54.000000000 +0100
@@ -4,7 +4,7 @@
# Default locations are
# 1. Path to config file including filename given as parameter
@@ -22,7 +22,7 @@
@@ -37,7 +37,7 @@
- VERSION = 1.6
+ VERSION = 1.7
-CFLAGS = -Wall -O3 -DVERSION=\"$(VERSION)\"
+CFLAGS += -DVERSION=\"$(VERSION)\" -DSYSCONFDIR=\"$(PKG_SYSCONFDIR)\" -I /usr/pkg/include/mysql
diff -r 395958ba726d -r 99ef7bed2736 misc/open2300/patches/patch-ab
--- a/misc/open2300/patches/patch-ab Thu Nov 11 08:03:53 2004 +0000
+++ b/misc/open2300/patches/patch-ab Thu Nov 11 10:19:29 2004 +0000
@@ -1,21 +1,526 @@
-$NetBSD: patch-ab,v 1.1.1.1 2004/11/10 08:19:46 martin Exp $
+$NetBSD: patch-ab,v 1.2 2004/11/11 10:19:29 martin Exp $
---- rw2300.c.orig 2004-04-18 09:51:14.000000000 +0200
-+++ rw2300.c 2004-11-09 09:49:09.000000000 +0100
-@@ -2423,7 +2423,7 @@
+--- rw2300.c.orig 2004-08-01 11:51:08.000000000 +0200
++++ rw2300.c 2004-11-11 10:45:50.000000000 +0100
+@@ -9,6 +9,7 @@
+ * This program is published under the GNU General Public license
+ */
+
++#include <errno.h>
+ #include "rw2300.h"
+
+ /********************************************************************/
+@@ -30,7 +31,7 @@
+ int address=0x346;
+ int bytes=2;
+
+- if (read_safe(ws2300, address, bytes, data, command) != bytes)
++ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes)
+ read_error_exit();
+
+ if (temperature_conv)
+@@ -70,7 +71,7 @@
+ int address=0x34B;
+ int bytes=15;
+
+- if (read_safe(ws2300, address, bytes, data, command) != bytes)
++ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes)
+ read_error_exit();
+
+ *temp_min = ((data[1]>>4)*10 + (data[1]&0xF) + (data[0]>>4)/10.0 +
+@@ -125,7 +126,7 @@
+ address=0x346;
+ number=2;
+
+- if (read_safe(ws2300, address, number, data_read, command) != number)
++ if (read_safe(ws2300, address, number, data_read, command, 1) != number)
+ read_error_exit();
+
+ data_value[0] = data_read[0]&0xF;
+@@ -137,7 +138,7 @@
+ address=0x23B;
+ number=6;
+
+- if (read_safe(ws2300, address, number, data_read, command) != number)
++ if (read_safe(ws2300, address, number, data_read, command, 1) != number)
+ read_error_exit();
+
+ data_time[0] = data_read[0]&0xF;
+@@ -208,7 +209,7 @@
+ int address=0x373;
+ int bytes=2;
+
+- if (read_safe(ws2300, address, bytes, data, command) != bytes)
++ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes)
+ read_error_exit();
+
+ if (temperature_conv)
+@@ -248,7 +249,7 @@
+ int address=0x378;
+ int bytes=15;
+
+- if (read_safe(ws2300, address, bytes, data, command) != bytes)
++ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes)
+ read_error_exit();
+
+ *temp_min = ((data[1]>>4)*10 + (data[1]&0xF) + (data[0]>>4)/10.0 +
+@@ -304,7 +305,7 @@
+ address=0x373;
+ number=2;
+
+- if (read_safe(ws2300, address, number, data_read, command) != number)
++ if (read_safe(ws2300, address, number, data_read, command, 1) != number)
+ read_error_exit();
+
+ data_value[0] = data_read[0]&0xF;
+@@ -316,7 +317,7 @@
+ address=0x23B;
+ number=6;
+
+- if (read_safe(ws2300, address, number, data_read, command) != number)
++ if (read_safe(ws2300, address, number, data_read, command, 1) != number)
+ read_error_exit();
+
+ data_time[0] = data_read[0]&0xF;
+@@ -387,7 +388,7 @@
+ int address=0x3CE;
+ int bytes=2;
+
+- if (read_safe(ws2300, address, bytes, data, command) != bytes)
++ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes)
+ read_error_exit();
+
+ if (temperature_conv)
+@@ -427,7 +428,7 @@
+ int address=0x3D3;
+ int bytes=15;
+
+- if (read_safe(ws2300, address, bytes, data, command) != bytes)
++ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes)
+ read_error_exit();
+
+ *dp_min = ((data[1]>>4)*10 + (data[1]&0xF) + (data[0]>>4)/10.0 +
+@@ -483,7 +484,7 @@
+ address=0x3CE;
+ number=2;
+
+- if (read_safe(ws2300, address, number, data_read, command) != number)
++ if (read_safe(ws2300, address, number, data_read, command, 1) != number)
+ read_error_exit();
+
+ data_value[0] = data_read[0]&0xF;
+@@ -495,7 +496,7 @@
+ address=0x23B;
+ number=6;
+
+- if (read_safe(ws2300, address, number, data_read, command) != number)
++ if (read_safe(ws2300, address, number, data_read, command, 1) != number)
+ read_error_exit();
+
+ data_time[0] = data_read[0]&0xF;
+@@ -562,7 +563,7 @@
+ int address=0x3FB;
+ int bytes=1;
+
+- if (read_safe(ws2300, address, bytes, data, command) != bytes)
++ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes)
+ read_error_exit();
+
+ return ((data[0] >> 4) * 10 + (data[0] & 0xF));
+@@ -591,7 +592,7 @@
+ int address=0x3FB;
+ int bytes=13;
+
+- if (read_safe(ws2300, address, bytes, data, command) != bytes)
++ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes)
+ read_error_exit();
+
+ *hum_min = (data[1] >> 4) * 10 + (data[1] & 0xF);
+@@ -638,7 +639,7 @@
+ address=0x3FB;
+ number=1;
+
+- if (read_safe(ws2300, address, number, data_read, command) != number)
++ if (read_safe(ws2300, address, number, data_read, command, 1) != number)
+ read_error_exit();
+
+ data_value[0] = data_read[0]&0xF;
+@@ -648,7 +649,7 @@
+ address=0x23B;
+ number=6;
+
+- if (read_safe(ws2300, address, number, data_read, command) != number)
++ if (read_safe(ws2300, address, number, data_read, command, 1) != number)
+ read_error_exit();
+
+ data_time[0] = data_read[0]&0xF;
+@@ -715,7 +716,7 @@
+ int address=0x419;
+ int bytes=1;
+
+- if (read_safe(ws2300, address, bytes, data, command) != bytes)
++ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes)
+ read_error_exit();
+
+ return ((data[0] >> 4) * 10 + (data[0] & 0xF));
+@@ -745,7 +746,7 @@
+ int address=0x419;
+ int bytes=13;
+
+- if (read_safe(ws2300, address, bytes, data, command) != bytes)
++ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes)
+ read_error_exit();
+
+ *hum_min = (data[1] >> 4) * 10 + (data[1] & 0xF);
+@@ -792,7 +793,7 @@
+ address=0x419;
+ number=1;
+
+- if (read_safe(ws2300, address, number, data_read, command) != number)
++ if (read_safe(ws2300, address, number, data_read, command, 1) != number)
+ read_error_exit();
+
+ data_value[0] = data_read[0]&0xF;
+@@ -802,7 +803,7 @@
+ address=0x23B;
+ number=6;
+
+- if (read_safe(ws2300, address, number, data_read, command) != number)
++ if (read_safe(ws2300, address, number, data_read, command, 1) != number)
+ read_error_exit();
+
+ data_time[0] = data_read[0]&0xF;
+@@ -879,7 +880,7 @@
+
+ for (i=0; i<MAXWINDRETRIES; i++)
+ {
+- if (read_safe(ws2300, address, bytes, data, command)!=bytes) //Wind
++ if (read_safe(ws2300, address, bytes, data, command, 1)!=bytes) //Wind
+ read_error_exit();
+
+ if ( (data[0]!=0x00) || //Invalid wind data
+@@ -935,7 +936,12 @@
+
+ for (i=0; i<MAXWINDRETRIES; i++)
+ {
+- if (read_safe(ws2300, address, bytes, data, command)!=bytes) //Wind
++ // do not verify checksum here - the result is ~5.5 bytes
++ // and apparently the weather station calculates it differently
++ // than what we expect. example:
++ // 0x00, 0x00, 0xd0, 0xdd, 0xdd, 0x0a - with checksum 0x97
++ // instead of the expected 0x94.
++ if (read_safe(ws2300, address, bytes, data, command, 0)!=bytes) //Wind
+ read_error_exit();
+
+ if ( (data[0]!=0x00) || //Invalid wind data
+@@ -999,7 +1005,7 @@
+ int address=0x4EE;
+ int bytes=15;
+
+- if (read_safe(ws2300, address, bytes, data, command) != bytes)
++ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes)
+ read_error_exit();
+
+ if (wind_min != NULL)
+@@ -1057,7 +1063,7 @@
+
+ for (i=0; i<MAXWINDRETRIES; i++)
{
- if ((fptr = fopen("open2300.conf", "r")) == NULL)
- {
-- if ((fptr = fopen("/usr/local/etc/open2300.conf", "r")) == NULL)
-+ if ((fptr = fopen(SYSCONFDIR "/open2300.conf", "r")) == NULL)
- {
- if ((fptr = fopen("/etc/open2300.conf", "r")) == NULL)
- {
Home |
Main Index |
Thread Index |
Old Index