diff --git a/.gitignore b/.gitignore index ff7d258..c4ce777 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ /cqrlog-2.2.0.tar.gz /cqrlog-2.3.0.tar.gz /cqrlog-2.4.0.tar.gz +/cqrlog-2.5.0.tar.gz diff --git a/cqrlog-install.patch b/cqrlog-install.patch index 2a982e4..4c601a6 100644 --- a/cqrlog-install.patch +++ b/cqrlog-install.patch @@ -1,23 +1,24 @@ ---- a/Makefile -+++ b/Makefile -@@ -7,15 +7,13 @@ tmpdir = /tmp +Index: cqrlog-2.5.0/Makefile +=================================================================== +--- cqrlog-2.5.0.orig/Makefile ++++ cqrlog-2.5.0/Makefile +@@ -7,14 +7,13 @@ tmpdir = /tmp cqrlog: src/cqrlog.lpi $(CC) --ws=gtk2 --pcp=$(tmpdir)/.lazarus src/cqrlog.lpi - $(ST) src/cqrlog -- gzip tools/cqrlog.1 -c > tools/cqrlog.1.gz + gzip tools/cqrlog.1 -c > tools/cqrlog.1.gz clean: - rm -f -v src/*.o src/*.ppu src/*.bak src/lnet/lib/*.ppu src/lnet/lib/*.o src/lnet/lib/*.bak src/cqrlog src/cqrlog.compiled debian/cqrlog.* src/ipc/*.o src/ipc/*.ppu src/cqrlog.or + rm -f -v src/*.o src/*.ppu src/*.bak src/lnet/lib/*.ppu src/lnet/lib/*.o src/lnet/lib/*.bak src/cqrlog src/cqrlog.compiled src/ipc/*.o src/ipc/*.ppu src/cqrlog.or rm -f -v src/*.lrs src/*.ps src/*.lrt src/*.rsh src/*.rst src/*.a src/synapse/*.a src/synapse/*.o src/synapse/*.ppu - rm -rf debian/cqrlog rm -f -v src/mysql/*.ppu src/mysq/*.bak src/mysql/*.o - rm -f -v tools/cqrlog.1.gz + rm -f -v tools/cqrlog.1 rm -rf src/backup rm -f -v src/richmemo/*.o src/richmemo/*.ppu src/richmemo/gtk2/*.ppu src/richmemo/gtk2/*.o rm -f -v tools/adif_hash_generator tools/adif_hash_generator.lpi tools/adif_hash_generator.lps -@@ -35,8 +33,8 @@ install: +@@ -34,8 +33,8 @@ install: install -d -v $(datadir)/images/icon/64x64 install -d -v $(datadir)/images/icon/128x128 install -d -v $(datadir)/images/icon/256x256 @@ -28,7 +29,7 @@ install -d -v $(sharedir)/applications install -d -v $(sharedir)/appdata install -d -v $(sharedir)/man/man1 -@@ -53,8 +51,8 @@ install: +@@ -52,8 +51,8 @@ install: install -v -m 0644 zipcodes/* $(datadir)/zipcodes/ # install -v -m 0644 -t images/* $(datadir)/images/ cp -v -R images/* $(datadir)/images @@ -39,7 +40,7 @@ # install -v -m 0644 images/icon/32x32/* $(datadir)/images/icon/32x32/ # install -v -m 0644 images/icon/64x64/* $(datadir)/images/icon/64x64/ # install -v -m 0644 images/icon/128x128/* $(datadir)/images/icon/128x128/ -@@ -62,15 +60,15 @@ install: +@@ -61,17 +60,17 @@ install: # install -v -m 0644 images/* $(datadir)/images/ install -v -m 0644 tools/cqrlog.desktop $(sharedir)/applications/cqrlog.desktop install -v -m 0644 tools/cqrlog.appdata.xml $(sharedir)/appdata/cqrlog.appdata.xml @@ -60,3 +61,5 @@ + $(CC) --bm=debug --ws=gtk2 --pcp=$(tmpdir)/.lazarus src/cqrlog.lpi + gzip tools/cqrlog.1 -c > tools/cqrlog.1 + cqrlog_qt5: src/cqrlog.lpi + $(CC) --ws=qt5 --pcp=$(tmpdir)/.lazarus src/cqrlog.lpi diff --git a/cqrlog-jtdx.patch b/cqrlog-jtdx.patch deleted file mode 100644 index dd63bf6..0000000 --- a/cqrlog-jtdx.patch +++ /dev/null @@ -1,323 +0,0 @@ -From 47dc7b508fa084cd79f57a35365f4306d7764715 Mon Sep 17 00:00:00 2001 -From: Petr Hlozek -Date: Wed, 30 Oct 2019 19:57:11 +0100 -Subject: [PATCH 1/2] Comment to QSO is limited to 120 charactes - ---- - src/fAdifImport.pas | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/fAdifImport.pas b/src/fAdifImport.pas -index 81c8acf..af97acc 100644 ---- a/src/fAdifImport.pas -+++ b/src/fAdifImport.pas -@@ -387,6 +387,7 @@ function TfrmAdifImport.saveNewEntryFromADIFinDatabase(var d:TnewQSOEntry; var e - d.COMMENT := edtRemarks.Text + ' ' + d.COMMENT; - if d.TX_PWR = '' then - d.TX_PWR := FMyPower; -+ d.COMMENT := copy(d.COMMENT, 1, 200); - - d.MODE := UpperCase(d.MODE); - - -From 6a3ea4fffd984a09fab853eae2a7a3352f41d0a1 Mon Sep 17 00:00:00 2001 -From: OH1KH -Date: Fri, 1 Nov 2019 09:40:33 +0200 -Subject: [PATCH 2/2] Fix for JTDX logging - -This fixes bug that is caused because JTDX udp frame #5 (logging) does not have all tags that are listed in WSJT-X udp format definition leaving the contest part of logging away. - -Fix finds out from frame id that it is from JTDX and does not try to find contest tags then. - -Other improvement is buffer pointer range check so that it cannot grow over buffer size. If buffer end is reached before all tags are decoded fetching them now results either 0 (zero) or '' (empty string). -This should help also other unstandard udp messages received in future. - -Squashed commit of the following: - -commit 758b76d95c2b647122563475d0d4b14a974bb8f4 -Author: OH1KH -Date: Wed Oct 30 18:16:29 2019 +0200 - - A bit better pointer check - -commit 03a7700e6987481f08e42c30a41df33aa88b0627 -Merge: cd79309 935a009 -Author: OH1KH -Date: Mon Oct 28 17:13:31 2019 +0200 - - Merge branch 'master' into jtdx2 - -commit cd79309e17eec9819e5caf66890b5e49a91abb5d -Author: OH1KH -Date: Sun Oct 27 17:14:15 2019 +0200 - - WSJT-X: no contest tail if frame from JTDX. Fixed buffer pointer overflow if UDP frame is not within WSJT-X specifications. ---- - src/fNewQSO.lfm | 2 +- - src/fNewQSO.pas | 166 ++++++++++++++++++++++++++++++------------------ - 2 files changed, 104 insertions(+), 64 deletions(-) - -diff --git a/src/fNewQSO.lfm b/src/fNewQSO.lfm -index c22b7f4..2ef08b7 100644 ---- a/src/fNewQSO.lfm -+++ b/src/fNewQSO.lfm -@@ -1,7 +1,7 @@ - object frmNewQSO: TfrmNewQSO - Left = 159 - Height = 709 -- Top = 208 -+ Top = 64 - Width = 997 - HelpType = htKeyword - HelpKeyword = 'help/index.html' -diff --git a/src/fNewQSO.pas b/src/fNewQSO.pas -index 4f8b7eb..702236d 100644 ---- a/src/fNewQSO.pas -+++ b/src/fNewQSO.pas -@@ -2207,6 +2207,8 @@ procedure TfrmNewQSO.tmrWsjtxTimer(Sender: TObject); - TXOn : Boolean; - i : word; - TXmode : String; -+ RemoteName :String; -+ BufEnd : Boolean; - - call : String; - sname : String; -@@ -2227,19 +2229,41 @@ procedure TfrmNewQSO.tmrWsjtxTimer(Sender: TObject); - ExchR : String; - ExchS : String; - -+ Procedure MoveIndex(m:integer); //within Buf limits -+ Begin -+ index := index+m; -+ if (index >= length(Buf) ) then -+ Begin -+ //we can not find anything from Buf any more -+ index := length(Buf); -+ BufEnd :=true; -+ end -+ else BufEnd := false; -+ end; -+ - function ui32Buf(var index:integer):uint32; - begin -+ if BufEnd then -+ Begin -+ Result := 0; -+ exit; -+ end; - Result := $01000000*ord(Buf[index]) - + $00010000*ord(Buf[index+1]) - + $00000100*ord(Buf[index+2]) - + ord(Buf[index+3]); // 32-bit unsigned int BigEndian -- index := index+4 //point to next element -+ MoveIndex(4); //point to next element - end; - - function StrBuf(var index:integer):String; - var - P : uint32; - begin -+ if BufEnd then -+ Begin -+ Result := ''; -+ exit; -+ end; - P := ui32Buf(index); //string length; 4bytes - if P = $FFFFFFFF then //exeption: empty Qstring len: $FFFF FFFF content: empty - begin -@@ -2247,7 +2271,7 @@ procedure TfrmNewQSO.tmrWsjtxTimer(Sender: TObject); - end - else begin - Result := copy(Buf,index,P); //string content -- index := index + P //point to next element -+ MoveIndex(P); //point to next element - end - end; - -@@ -2267,7 +2291,7 @@ procedure TfrmNewQSO.tmrWsjtxTimer(Sender: TObject); - - function int64Buf(var index:integer):int64; - begin -- REsult := ui64Buf(index) -+ Result := ui64Buf(index) - end; - - function int32Buf(var index:integer):int32; -@@ -2277,14 +2301,24 @@ procedure TfrmNewQSO.tmrWsjtxTimer(Sender: TObject); - - function ui8Buf(var index:integer):uint8; - begin -+ if BufEnd then -+ Begin -+ Result := 0; -+ exit; -+ end; - Result := ord(Buf[index]); -- inc(index) -+ MoveIndex(1) - end; - - function BoolBuf(var index:integer):Boolean; - begin -+ if BufEnd then -+ Begin -+ Result := false; -+ exit; -+ end; - Result := ord(Buf[index]) = 1; -- inc(index) -+ MoveIndex(1) - end; - //------------------------------------------------------------------- - -@@ -2308,6 +2342,7 @@ procedure TfrmNewQSO.tmrWsjtxTimer(Sender: TObject); - if WsjtxSock.lasterror=0 then - begin - Fox2Line := 0; -+ BufEnd := false; - index := pos(#$ad+#$bc+#$cb+#$da,Buf); //QTheader: magic number 0xadbccbda - if index < 1 then - begin -@@ -2319,7 +2354,7 @@ procedure TfrmNewQSO.tmrWsjtxTimer(Sender: TObject); - - if dmData.DebugLevel>=1 then Writeln('-----------------------decode start---------------------------------'); - if dmData.DebugLevel>=1 then Write('Header position:',index); -- index:=index+4; // skip QT header -+ MoveIndex(4); // skip QT header - - ParNum := ui32Buf(index); - if dmData.DebugLevel>=1 then Write(' Schema number:',ParNum); -@@ -2329,7 +2364,7 @@ procedure TfrmNewQSO.tmrWsjtxTimer(Sender: TObject); - lblCall.Caption := 'Wsjt-x remote #'+intToStr(MsgType); //changed to see last received msgtype - - tmpindex := index; -- ParStr := StrBuf(index); //read ID to get index point to RepHead end -+ RemoteName := StrBuf(index); //read remote name to get index point to RepHead end - RepHead := copy(Buf,1,index-1); - RepHead[12] := #0; //Ready made reply header with #0 command (lobyte of uint32) - index := tmpindex; //return pointer back -@@ -2735,62 +2770,67 @@ procedure TfrmNewQSO.tmrWsjtxTimer(Sender: TObject); - ParNum := ui8Buf(index); //timespec local/utc (not used in cqrlog) - if dmData.DebugLevel>=1 then Writeln('timespec: ', ParNum); - //---------------------------------------------------- -- OpCall := trim(StrBuf(index)); //operator callsign (in contest, club etc.) -- ExchR := trim(StrBuf(index)); //fake, this is actually "My call". Not used -- ExchR := trim(StrBuf(index)); //fake, this is actually "My grid". Not used -- ExchS := trim(StrBuf(index)); //contest exchange sent. report + others -- ExchR := trim(StrBuf(index)); //contest exchange received. report + others -- //---------------------------------------------------- -- { -- These wsjt-x will return as contest number: -- * 0 -> NONE -- * 1 -> NA VHF -- * 2 -> EU VHF -- * 3 -> FIELD DAY -- * 4 -> RTTY RU -- * 5 -> FOX -- * 6 -> HOUND -- } -- -- case ContestNr of -- 1 :Begin //NA VHF EX:locator-4chr -- edtContestName.Text := ContestName[ContestNr]; -- edtContestExchangeMessageReceived.Text := ExchR; -- edtContestExchangeMessageSent.Text := ExchS; -- edtHisRST.Text := ' '; // NA-VHF has no proper reports (!?!) -- edtMyRST.Text := ' '; // fake space here. Otherwise qso edit sets 599 for reports -- end; -- 2 :Begin //EU VHF EX:RS-2chr/serial-4chr/ /locator -- edtContestName.Text := ContestName[ContestNr]; -- edtContestSerialReceived.Text := copy(ExchR,3,4); //serialNr -- edtContestExchangeMessageReceived.Text:= copy(ExchR,8,6); //exMsg=locator -- edtContestSerialSent.Text := copy(ExchS,3,4); //serialNr -- edtContestExchangeMessageSent.Text:= copy(ExchS,8,6); //exMsg=locator -- edtHisRST.Text := edtHisRST.Text+' '; // fake space here. Otherwise qso edit sets xx9 for reports -- edtMyRST.Text := edtMyRST.Text+' '; -- end; -- 3 :Begin //FIELD DAY EX:TXnrClass/ /state -- edtContestName.Text := ContestName[ContestNr]; -- edtContestExchangeMessageReceived.Text := ExchR; -- edtContestExchangeMessageSent.Text := ExchS; -- edtHisRST.Text := ' '; // FD has no proper reports (!?!) -- edtMyRST.Text := ' '; // fake space here. Otherwise qso edit sets 599 for reports -- end; -- 4 :Begin //RTTY RU EX:RST-3chr/ /serial-4chr[or] state(not numbers) -- edtContestName.Text := ContestName[ContestNr]; -- if (ExchS[5] in [ 'A' .. 'Z' ]) then -- edtContestExchangeMessageSent.Text:= copy(ExchS,5,length(ExchS)) //exMsg=state -- else -- edtContestSerialSent.Text := copy(ExchS,5,length(ExchS)); //serialNr -- if (ExchR[5] in [ 'A' .. 'Z' ]) then -- edtContestExchangeMessageReceived.Text:= copy(ExchR,5,length(ExchR)) //exMsg=state -- else -- edtContestSerialReceived.Text := copy(ExchR,5,length(ExchR)); //serialNr -- end; -- 5,6 : edtContestName.Text := ContestName[ContestNr]+'-QSO'; -- end; -- case ContestNr of -- 1,2,3,4 : edtContestSerialReceived.Text := copy( edtContestSerialReceived.Text,1,6); //Max Db length=6 -+ if dmData.DebugLevel>=1 then Writeln('Remote name: ', RemoteName); -+ if RemoteName = 'WSJT-X' then //no contest in JTDX -+ begin -+ if dmData.DebugLevel>=1 then Writeln('Tail logging part entered'); -+ OpCall := trim(StrBuf(index)); //operator callsign (in contest, club etc.) -+ ExchR := trim(StrBuf(index)); //fake, this is actually "My call". Not used -+ ExchR := trim(StrBuf(index)); //fake, this is actually "My grid". Not used -+ ExchS := trim(StrBuf(index)); //contest exchange sent. report + others -+ ExchR := trim(StrBuf(index)); //contest exchange received. report + others -+ //---------------------------------------------------- -+ { -+ These wsjt-x will return as contest number: -+ * 0 -> NONE -+ * 1 -> NA VHF -+ * 2 -> EU VHF -+ * 3 -> FIELD DAY -+ * 4 -> RTTY RU -+ * 5 -> FOX -+ * 6 -> HOUND -+ } -+ -+ case ContestNr of -+ 1 :Begin //NA VHF EX:locator-4chr -+ edtContestName.Text := ContestName[ContestNr]; -+ edtContestExchangeMessageReceived.Text := ExchR; -+ edtContestExchangeMessageSent.Text := ExchS; -+ edtHisRST.Text := ' '; // NA-VHF has no proper reports (!?!) -+ edtMyRST.Text := ' '; // fake space here. Otherwise qso edit sets 599 for reports -+ end; -+ 2 :Begin //EU VHF EX:RS-2chr/serial-4chr/ /locator -+ edtContestName.Text := ContestName[ContestNr]; -+ edtContestSerialReceived.Text := copy(ExchR,3,4); //serialNr -+ edtContestExchangeMessageReceived.Text:= copy(ExchR,8,6); //exMsg=locator -+ edtContestSerialSent.Text := copy(ExchS,3,4); //serialNr -+ edtContestExchangeMessageSent.Text:= copy(ExchS,8,6); //exMsg=locator -+ edtHisRST.Text := edtHisRST.Text+' '; // fake space here. Otherwise qso edit sets xx9 for reports -+ edtMyRST.Text := edtMyRST.Text+' '; -+ end; -+ 3 :Begin //FIELD DAY EX:TXnrClass/ /state -+ edtContestName.Text := ContestName[ContestNr]; -+ edtContestExchangeMessageReceived.Text := ExchR; -+ edtContestExchangeMessageSent.Text := ExchS; -+ edtHisRST.Text := ' '; // FD has no proper reports (!?!) -+ edtMyRST.Text := ' '; // fake space here. Otherwise qso edit sets 599 for reports -+ end; -+ 4 :Begin //RTTY RU EX:RST-3chr/ /serial-4chr[or] state(not numbers) -+ edtContestName.Text := ContestName[ContestNr]; -+ if (ExchS[5] in [ 'A' .. 'Z' ]) then -+ edtContestExchangeMessageSent.Text:= copy(ExchS,5,length(ExchS)) //exMsg=state -+ else -+ edtContestSerialSent.Text := copy(ExchS,5,length(ExchS)); //serialNr -+ if (ExchR[5] in [ 'A' .. 'Z' ]) then -+ edtContestExchangeMessageReceived.Text:= copy(ExchR,5,length(ExchR)) //exMsg=state -+ else -+ edtContestSerialReceived.Text := copy(ExchR,5,length(ExchR)); //serialNr -+ end; -+ 5,6 : edtContestName.Text := ContestName[ContestNr]+'-QSO'; -+ end; -+ case ContestNr of -+ 1,2,3,4 : edtContestSerialReceived.Text := copy( edtContestSerialReceived.Text,1,6); //Max Db length=6 -+ end; - end; - //---------------------------------------------------- - if dmData.DebugLevel>=1 then Writeln(' WSJTX decode #5 logging: press save'); diff --git a/cqrlog.spec b/cqrlog.spec index 93b80e0..043ae5f 100644 --- a/cqrlog.spec +++ b/cqrlog.spec @@ -1,6 +1,6 @@ Name: cqrlog -Version: 2.4.0 -Release: 4%{?dist} +Version: 2.5.0 +Release: 1%{?dist} Summary: An amateur radio contact logging program License: GPLv2 @@ -10,15 +10,14 @@ Source0: https://github.com/ok2cqr/cqrlog/archive/v%{version}/%{name}-%{version} # Fixes arm builds, translation improvements, and other bug fixes. Patch0: cqrlog-install.patch Patch1: cqrlog-desktop.patch -Patch2: cqrlog-jtdx.patch ExclusiveArch: %{fpc_arches} +BuildRequires: desktop-file-utils BuildRequires: fpc >= 3.0.4 BuildRequires: lazarus >= 1.8 BuildRequires: libappstream-glib -BuildRequires: desktop-file-utils -BuildRequires: make +BuildRequires: make Requires: mariadb-server # https://bugzilla.redhat.com/show_bug.cgi?id=1486480 @@ -27,12 +26,12 @@ Requires: mariadb-connector-c # https://bugzilla.redhat.com/show_bug.cgi?id=1592176 Requires: mariadb-connector-c-devel %else -Requires: mariadb-libs +Requires: mariadb-libs %endif -Requires: hamlib +Requires: hamlib Requires: openssl %if 0%{?fedora} -Requires: tqsllib +Requires: tqsllib %endif @@ -100,6 +99,9 @@ appstream-util validate-relax --nonet \ %changelog +* Sat Jan 16 2021 Richard Shaw - 2.5.0-1 +- Update to 2.5.0. + * Mon Jul 27 2020 Fedora Release Engineering - 2.4.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index 4bf4c85..c863f92 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cqrlog-2.4.0.tar.gz) = aec7b43a0d4d1cd5b1af140db149058b4cff4893e6d8ed8d1ced729bedf27baa36b71d9fa7e5312ab94dd692953346d20f7f5a55a05ba91e4eccb17919d6d49a +SHA512 (cqrlog-2.5.0.tar.gz) = d5e71d9374abf5c71076959d6ba8dcf0b1cf41ae0e5a0f34077e467a24a563dbefb4f3418906744ae8d67b600ea33b7ab7483fc8b5f078b3c68ffe675e682e7a