Hello community,

here is the log from the commit of package aiccu for openSUSE:Factory checked 
in at 2015-04-22 01:19:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/aiccu (Old)
 and      /work/SRC/openSUSE:Factory/.aiccu.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "aiccu"

Changes:
--------
--- /work/SRC/openSUSE:Factory/aiccu/aiccu.changes      2015-03-27 
09:41:01.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.aiccu.new/aiccu.changes 2015-04-22 
01:19:49.000000000 +0200
@@ -1,0 +2,5 @@
+Tue Apr 21 13:52:21 UTC 2015 - [email protected]
+
+- Fix build with recent gnutls (gnutls-and-uclibc-fixes.patch)
+
+-------------------------------------------------------------------

New:
----
  gnutls-and-uclibc-fixes.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ aiccu.spec ++++++
--- /var/tmp/diff_new_pack.nXtniR/_old  2015-04-22 01:19:49.000000000 +0200
+++ /var/tmp/diff_new_pack.nXtniR/_new  2015-04-22 01:19:49.000000000 +0200
@@ -31,6 +31,8 @@
 Patch2:         aiccu-linkorder.dif
 Patch3:         aiccu-pthread.dif
 Patch4:         aiccu-systemd.dif
+# patch from https://github.com/maximeh/buildroot/tree/master/package/aiccu
+Patch5:         gnutls-and-uclibc-fixes.patch
 BuildRequires:  gnutls-devel
 Requires:       iproute2
 Requires:       iputils
@@ -65,6 +67,7 @@
 %if 0%{?suse_version} >= 1210
 %patch4
 %endif
+%patch5 -p1
 
 %build
 RPM_OPT_FLAGS="%{optflags} -fPIE -pie"

++++++ gnutls-and-uclibc-fixes.patch ++++++
aiccu.h, common.c, common.h: fixes for deprecated GNUTLS functions and types
resolver.c: fixes for selection of wrong resolver function under uclibc

Signed-off-by: Michael Rommel <[email protected]>

Index: aiccu/common/aiccu.h
===================================================================
--- aiccu.orig/common/aiccu.h
+++ aiccu/common/aiccu.h
@@ -111,7 +111,7 @@ struct AICCU_conf
 #endif
 
 #ifdef AICCU_GNUTLS
-       gnutls_certificate_credentials  tls_cred;       /* GNUTLS credentials */
+       gnutls_certificate_credentials_t tls_cred;      /* GNUTLS credentials */
 #endif
 
        bool            daemonize;              /* Daemonize? */
Index: aiccu/common/common.c
===================================================================
--- aiccu.orig/common/common.c
+++ aiccu/common/common.c
@@ -271,9 +271,8 @@ TLSSOCKET sock_alloc(void);
 TLSSOCKET sock_alloc(void)
 {
 #ifdef AICCU_GNUTLS
-       /* Allow connections to servers that have OpenPGP keys as well */
-       const int       cert_type_priority[3] = { GNUTLS_CRT_X509, 
GNUTLS_CRT_OPENPGP, 0 };
        int             ret;
+       const char      *err;
 #endif /* AICCU_GNUTLS*/
 
        TLSSOCKET       sock;   
@@ -297,11 +296,16 @@ TLSSOCKET sock_alloc(void)
        }
 
        /* Use default priorities */
-       gnutls_set_default_priority(sock->session);
-       /* XXX: Return value is not documented in GNUTLS documentation! */
-
-       gnutls_certificate_type_set_priority(sock->session, cert_type_priority);
-       /* XXX: Return value is not documented in GNUTLS documentation! */
+       ret = gnutls_priority_set_direct(sock->session, "NORMAL", &err); 
+       if (ret < 0)
+       {
+               if (ret == GNUTLS_E_INVALID_REQUEST)
+               {
+                       dolog( LOG_ERR, "TLS set priority failed, syntax error 
at: %s\n", err);
+               }
+               free(sock);
+               return NULL;
+       }
 
        /* Configure the x509 credentials for the current session */
        gnutls_credentials_set(sock->session, GNUTLS_CRD_CERTIFICATE, 
g_aiccu->tls_cred);
@@ -474,7 +478,7 @@ bool sock_gotls(TLSSOCKET sock)
        }
 
        /* Set the transport */
-       gnutls_transport_set_ptr(sock->session, 
(gnutls_transport_ptr)sock->socket);
+       gnutls_transport_set_ptr(sock->session, (gnutls_transport_ptr_t) 
sock->socket);
 
        /* Perform the TLS handshake */
        ret = gnutls_handshake(sock->session);
Index: aiccu/common/common.h
===================================================================
--- aiccu.orig/common/common.h
+++ aiccu/common/common.h
@@ -381,7 +381,7 @@ struct tlssocket
        SOCKET                  socket;
 #ifdef AICCU_GNUTLS
        bool                    tls_active;     /* TLS active? */
-       gnutls_session          session;        /* The GnuTLS sesision */
+       gnutls_session_t        session;        /* The GnuTLS sesision */
 #endif
 };
 
Index: aiccu/common/resolver.c
===================================================================
--- aiccu.orig/common/resolver.c
+++ aiccu/common/resolver.c
@@ -26,7 +26,7 @@
 
 int getrrs(const char *label, int rrtype, void gotrec(unsigned int num, int 
type, const char *record))
 {
-#ifdef _LINUX
+#if defined(_LINUX) && !defined(__UCLIBC__)
        struct __res_state      res;
 #endif
        unsigned char           answer[8192];
@@ -38,7 +38,7 @@ int getrrs(const char *label, int rrtype
        uint16_t                type = 0, class = 0;
        uint32_t                ttl = 0;
 
-#ifdef _LINUX
+#if defined(_LINUX) && !defined(__UCLIBC__)
        memset(&res, 0, sizeof(res));
        res.options = RES_DEBUG;
        res_ninit(&res);
@@ -47,7 +47,7 @@ int getrrs(const char *label, int rrtype
 #endif
 
        memset(answer, 0, sizeof(answer));
-#ifdef _LINUX
+#if defined(_LINUX) && !defined(__UCLIBC__)
        ret = res_nquery(&res, label, C_IN, rrtype, answer, sizeof(answer));
 #else
        ret = res_query(label, C_IN, rrtype, answer, sizeof(answer));

Reply via email to