[aqbanking] Add upstream patches for OFXDirectConnect (#1040224)

Bill Nottingham notting at fedoraproject.org
Thu Dec 12 20:27:34 UTC 2013


commit 8c76c64e295a621d91b6626505c84ece60cb259e
Author: Bill Nottingham <notting at redhat.com>
Date:   Thu Dec 12 15:27:10 2013 -0500

    Add upstream patches for OFXDirectConnect (#1040224)

 2349.patch     |   23 ++++++++++
 2357.patch     |   61 ++++++++++++++++++++++++++++
 2366.patch     |  123 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 aqbanking.spec |   13 +++++-
 4 files changed, 218 insertions(+), 2 deletions(-)
---
diff --git a/2349.patch b/2349.patch
new file mode 100644
index 0000000..43487c4
--- /dev/null
+++ b/2349.patch
@@ -0,0 +1,23 @@
+Index: src/plugins/backends/aqofxconnect/plugin/provider.c
+===================================================================
+diff --git a/src/plugins/backends/aqofxconnect/plugin/provider.c b/src/plugins/backends/aqofxconnect/plugin/provider.c
+--- a/src/plugins/backends/aqofxconnect/plugin/provider.c	(revision 2348)
++++ b/src/plugins/backends/aqofxconnect/plugin/provider.c	(revision 2349)
+@@ -57,6 +57,9 @@
+ 
+ 
+ static AO_APPINFO _appInfos[]={
++  /* got this list from https://microsoftmoneyoffline.wordpress.com/appid-appver/ */
++{ I18S("Intuit Quicken Windows 2013"),    "QWIN",       "2200"},
++{ I18S("Intuit Quicken Windows 2012"),    "QWIN",       "2100"},
+ { I18S("Intuit Quicken Windows 2011"),    "QWIN",       "2000"},
+ { I18S("Intuit Quicken Windows 2010"),    "QWIN",       "1900"},
+ { I18S("Intuit Quicken Windows 2009"),    "QWIN",       "1800"},
+@@ -64,6 +67,7 @@
+ { I18S("Intuit Quicken Windows 2007"),    "QWIN",       "1600"},
+ { I18S("Intuit Quicken Windows 2006"),    "QWIN",       "1500"},
+ { I18S("Intuit Quicken Windows 2005"),    "QWIN",       "1400"},
++
+ { I18S("Intuit Quicken Mac 2008"),        "QMOFX",      "1700"},
+ { I18S("Intuit Quicken Mac 2007"),        "QMOFX",      "1600"},
+ { I18S("Intuit Quicken Mac 2006"),        "QMOFX",      "1500"},
diff --git a/2357.patch b/2357.patch
new file mode 100644
index 0000000..accedc3
--- /dev/null
+++ b/2357.patch
@@ -0,0 +1,61 @@
+Index: src/plugins/backends/aqhbci/plugin/msglayer/dialog_https.c
+===================================================================
+diff --git a/src/plugins/backends/aqhbci/plugin/msglayer/dialog_https.c b/src/plugins/backends/aqhbci/plugin/msglayer/dialog_https.c
+--- a/src/plugins/backends/aqhbci/plugin/msglayer/dialog_https.c	(revision 2356)
++++ b/src/plugins/backends/aqhbci/plugin/msglayer/dialog_https.c	(revision 2357)
+@@ -194,6 +194,8 @@
+ 			  bbuf);
+     if (rv) {
+       DBG_INFO(AQHBCI_LOGDOMAIN, "Could not decode BASE64 message (%d)", rv);
++      /* for debugging purposes */
++      GWEN_Buffer_Dump(tbuf, 2);
+       GWEN_Gui_ProgressLog(0,
+ 			   GWEN_LoggerLevel_Error,
+                            I18N("Could not BASE64-decode the message"));
+@@ -211,6 +213,8 @@
+       GWEN_Gui_ProgressLog(0,
+ 			   GWEN_LoggerLevel_Error,
+                            I18N("Received message is not HBCI"));
++      /* for debugging purposes */
++      GWEN_Buffer_Dump(tbuf, 2);
+       GWEN_Buffer_free(tbuf);
+       GWEN_HttpSession_Fini(dlg->httpSession);
+       GWEN_HttpSession_free(dlg->httpSession);
+@@ -233,6 +237,8 @@
+   p1=strchr(GWEN_Buffer_GetStart(tbuf), '+');
+   if (p1==NULL) {
+     DBG_ERROR(AQHBCI_LOGDOMAIN, "Bad data (missing '+')");
++    /* for debugging purposes */
++    GWEN_Buffer_Dump(tbuf, 2);
+     GWEN_Buffer_free(tbuf);
+     GWEN_HttpSession_Fini(dlg->httpSession);
+     GWEN_HttpSession_free(dlg->httpSession);
+@@ -245,6 +251,8 @@
+   p2=strchr(p1, '+');
+   if (p2==NULL) {
+     DBG_ERROR(AQHBCI_LOGDOMAIN, "Bad data (missing '+')");
++    /* for debugging purposes */
++    GWEN_Buffer_Dump(tbuf, 2);
+     GWEN_Buffer_free(tbuf);
+     GWEN_HttpSession_Fini(dlg->httpSession);
+     GWEN_HttpSession_free(dlg->httpSession);
+@@ -257,6 +265,8 @@
+   *p2=0;
+   if (1!=sscanf(p1, "%d", &msgSize)) {
+     DBG_ERROR(AQHBCI_LOGDOMAIN, "Bad size field [%s]", p1);
++    /* for debugging purposes */
++    GWEN_Buffer_Dump(tbuf, 2);
+     GWEN_Buffer_free(tbuf);
+     GWEN_Gui_ProgressLog(0,
+ 			 GWEN_LoggerLevel_Error,
+@@ -271,7 +281,9 @@
+   /* check message size */
+   if (GWEN_Buffer_GetUsedBytes(tbuf)<msgSize) {
+     DBG_ERROR(AQHBCI_LOGDOMAIN, "Bad message size (%d<%d)",
+-	      GWEN_Buffer_GetUsedBytes(tbuf), msgSize);
++              GWEN_Buffer_GetUsedBytes(tbuf), msgSize);
++    /* for debugging purposes */
++    GWEN_Buffer_Dump(tbuf, 2);
+     GWEN_Buffer_free(tbuf);
+     GWEN_Gui_ProgressLog(0,
+ 			 GWEN_LoggerLevel_Error,
diff --git a/2366.patch b/2366.patch
new file mode 100644
index 0000000..b0128d1
--- /dev/null
+++ b/2366.patch
@@ -0,0 +1,123 @@
+Index: src/plugins/backends/aqofxconnect/plugin/user_p.h
+===================================================================
+diff --git a/src/plugins/backends/aqofxconnect/plugin/user_p.h b/src/plugins/backends/aqofxconnect/plugin/user_p.h
+--- a/src/plugins/backends/aqofxconnect/plugin/user_p.h	(revision 2365)
++++ b/src/plugins/backends/aqofxconnect/plugin/user_p.h	(revision 2366)
+@@ -31,6 +31,7 @@
+ 
+   int httpVMajor;
+   int httpVMinor;
++  char *httpUserAgent;
+ };
+ 
+ static void GWENHYWFAR_CB AO_User_FreeData(void *bp, void *p);
+Index: src/plugins/backends/aqofxconnect/plugin/user.c
+===================================================================
+diff --git a/src/plugins/backends/aqofxconnect/plugin/user.c b/src/plugins/backends/aqofxconnect/plugin/user.c
+--- a/src/plugins/backends/aqofxconnect/plugin/user.c	(revision 2365)
++++ b/src/plugins/backends/aqofxconnect/plugin/user.c	(revision 2366)
+@@ -173,6 +173,9 @@
+       GWEN_DB_SetIntValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS,
+ 			  "httpVMinor", ue->httpVMinor);
+ 
++      if (ue->httpUserAgent)
++	GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS,
++			     "httpUserAgent", ue->httpUserAgent);
+     }
+   }
+ }
+@@ -286,6 +289,14 @@
+     ue->httpVMajor=1;
+     ue->httpVMinor=0;
+   }
++
++  free(ue->httpUserAgent);
++  s=GWEN_DB_GetCharValue(db, "httpUserAgent", 0, NULL);
++  if (s)
++    ue->httpUserAgent=strdup(s);
++  else
++    ue->httpUserAgent=NULL;
++
+ }
+ 
+ 
+@@ -644,13 +655,37 @@
+ 
+ 
+ 
++const char *AO_User_GetHttpUserAgent(const AB_USER *u) {
++  AO_USER *ue;
+ 
++  assert(u);
++  ue=GWEN_INHERIT_GETDATA(AB_USER, AO_USER, u);
++  assert(ue);
+ 
++  return ue->httpUserAgent;
++}
+ 
+ 
+ 
++void AO_User_SetHttpUserAgent(AB_USER *u, const char *s) {
++  AO_USER *ue;
+ 
++  assert(u);
++  ue=GWEN_INHERIT_GETDATA(AB_USER, AO_USER, u);
++  assert(ue);
+ 
++  free(ue->httpUserAgent);
++  if (s) ue->httpUserAgent=strdup(s);
++  else ue->httpUserAgent=NULL;
++}
+ 
+ 
+ 
++
++
++
++
++
++
++
++
+Index: src/plugins/backends/aqofxconnect/plugin/user.h
+===================================================================
+diff --git a/src/plugins/backends/aqofxconnect/plugin/user.h b/src/plugins/backends/aqofxconnect/plugin/user.h
+--- a/src/plugins/backends/aqofxconnect/plugin/user.h	(revision 2365)
++++ b/src/plugins/backends/aqofxconnect/plugin/user.h	(revision 2366)
+@@ -137,6 +137,13 @@
+ void AO_User_SetHttpVMinor(AB_USER *u, int i);
+ 
+ 
++AQOFXCONNECT_API
++const char *AO_User_GetHttpUserAgent(const AB_USER *u);
++
++AQOFXCONNECT_API
++void AO_User_SetHttpUserAgent(AB_USER *u, const char *s);
++
++
+ #ifdef __cplusplus
+ }
+ #endif
+Index: src/plugins/backends/aqofxconnect/plugin/network.c
+===================================================================
+diff --git a/src/plugins/backends/aqofxconnect/plugin/network.c b/src/plugins/backends/aqofxconnect/plugin/network.c
+--- a/src/plugins/backends/aqofxconnect/plugin/network.c	(revision 2365)
++++ b/src/plugins/backends/aqofxconnect/plugin/network.c	(revision 2366)
+@@ -22,6 +22,7 @@
+   GWEN_HTTP_SESSION *sess;
+   uint32_t flags;
+   const char *addr;
++  const char *s;
+ 
+   /* take bank addr from user */
+   addr=AO_User_GetServerAddr(u);
+@@ -43,6 +44,9 @@
+   GWEN_HttpSession_SetHttpVMajor(sess, AO_User_GetHttpVMajor(u));
+   GWEN_HttpSession_SetHttpVMinor(sess, AO_User_GetHttpVMinor(u));
+ 
++  s=AO_User_GetHttpUserAgent(u);
++  GWEN_HttpSession_SetHttpUserAgent(sess, (s && *s)?s:"AqBanking");
++
+   /* init session */
+   rv=GWEN_HttpSession_Init(sess);
+   if (rv<0) {
diff --git a/aqbanking.spec b/aqbanking.spec
index be4db0d..cd71e02 100644
--- a/aqbanking.spec
+++ b/aqbanking.spec
@@ -3,7 +3,7 @@
 Name: aqbanking
 Summary: A library for online banking functions and financial data import/export
 Version: 5.0.25
-Release: 3%{?dist}
+Release: 4%{?dist}
 # Download is PHP form at http://www.aquamaniac.de/sites/download/packages.php
 # aqbanking contains nonfree code that we cannot ship.  Therefore we use
 # this script to remove the nonfree code before shipping it.
@@ -17,6 +17,9 @@ URL: http://www.aquamaniac.de/aqbanking/
 Patch2: aqbanking-5.0.2-pkgconfig.patch
 Patch3: aqbanking-5.0.25-conflict.patch
 Patch4: aqbanking-arch.patch
+Patch100: 2349.patch
+Patch101: 2357.patch
+Patch102: 2366.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: gwenhywfar-devel >= 4.0.0, gmp-devel, gettext, libtool
 Obsoletes: aqhbci <= 1.0.3
@@ -56,6 +59,9 @@ compiling programs using Aqbanking.
 %setup -q
 %patch2 -p1 -b .pkgconfig
 %patch3 -p1 -b .conflict
+%patch100 -p1
+%patch101 -p1
+%patch102 -p1
 
 # hack to nuke rpaths, slighly less ugly than using overriding LIBTOOL below
 %if "%{_libdir}" != "/usr/lib"
@@ -137,7 +143,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/aqbanking/typemaker2
 
 %changelog
-* Tue Aug 06 2013 Bill Nottingham <notting at redhat.com> - 5.0.26-1
+* Thu Dec 12 2013 Bill Nottingham <notting at redhat.com> - 5.0.25-4
+- add upstream patches for OFXDirectConnect (#1040224)
+
+* Tue Aug 06 2013 Bill Nottingham <notting at redhat.com> - 5.0.25-3
 - Fix for UnversionedDocDirs feature (#993669)
 
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 5.0.25-2


More information about the scm-commits mailing list