diff --git a/.gitignore b/.gitignore index aac45b2..d78360d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /autogen.sh /viking-1.11.tar.gz /viking-viking-1.11.tar.gz +/viking-2a2420963e4b913d0b37dcf8801dc3695ca72a6c.tar.gz diff --git a/nettle-4.patch b/nettle-4.patch deleted file mode 100644 index 3eeea81..0000000 --- a/nettle-4.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index 8f665e36..abed70da 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -512,7 +512,7 @@ AC_CACHE_CHECK([whether to enable MD5 Hash support], - [ac_cv_enable_nettle], [ac_cv_enable_nettle=yes]) - case $ac_cv_enable_nettle in - yes) -- AC_CHECK_HEADER([nettle/md5-compat.h],[],[AC_MSG_ERROR([nettle/md5-compat.h is needed but not found - you will need to install package 'nettle-dev' or similar. The feature can be disabled with --disable-nettle])]) -+ AC_CHECK_HEADER([nettle/md5.h],[],[AC_MSG_ERROR([nettle/md5.h is needed but not found - you will need to install package 'nettle-dev' or similar. The feature can be disabled with --disable-nettle])]) - AC_CHECK_LIB([nettle], [main], [], - if test "$ac_mingw32" = "yes"; then - [LIBS="-lnettle $LIBS" -diff --git a/src/md5_hash.c b/src/md5_hash.c -index eaec8355..6508c636 100644 ---- a/src/md5_hash.c -+++ b/src/md5_hash.c -@@ -26,7 +26,8 @@ - #include "config.h" - #endif - #ifdef HAVE_LIBNETTLE --#include -+#include -+#include - #endif - - /** -@@ -37,10 +38,14 @@ char *md5_hash(const char *message) - char *answer = NULL; - #ifdef HAVE_LIBNETTLE - unsigned char result[16]; -- MD5_CTX ctx; -- MD5Init ( &ctx ); -- MD5Update ( &ctx, (const unsigned char*)message, strlen(message) ); -- MD5Final ( &result[0], &ctx ); -+ struct md5_ctx ctx; -+ md5_init ( &ctx ); -+ md5_update ( &ctx, strlen(message), (const unsigned char*)message ); -+#if defined(NETTLE_VERSION_MAJOR) && NETTLE_VERSION_MAJOR >= 4 -+ md5_digest ( &ctx, &result[0] ); -+#else -+ md5_digest ( &ctx, MD5_DIGEST_SIZE, &result[0] ); -+#endif - /* - g_printf ( "%s: of string '%s' is: ", __FUNCTION__, message ); - for(int i = 0; i < 16; i++) diff --git a/sources b/sources index 9603403..841d50b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (viking-viking-1.11.tar.gz) = 8a1074a3729d41326021dec9873652be5eab89c231e6f58c30c11f690a30b69bd513a64d3311a6dd4845cfeb20ce6774d20376e2a1ebce2500475bf0cb435edc +SHA512 (viking-2a2420963e4b913d0b37dcf8801dc3695ca72a6c.tar.gz) = 94eb5f5f211ed4f1645a0b7b4d9ce3adeaffdf1502f3a9367bc99a37b9ad2e739337b7920766ac5b9719aca1ad95fab368b8343550420fda5cebbdcce5cdc795 diff --git a/viking.spec b/viking.spec index ded65f1..f5d0e5d 100644 --- a/viking.spec +++ b/viking.spec @@ -2,7 +2,7 @@ Name: viking %global forgeurl https://github.com/viking-gps/viking %global version0 1.11 -%global tag0 viking-%version0 +%global commit 2a2420963e4b913d0b37dcf8801dc3695ca72a6c %forgemeta Version: %forgeversion Release: %autorelease @@ -12,9 +12,6 @@ License: GPL-2.0-or-later URL: %forgeurl Source0: %forgesource -# https://github.com/viking-gps/viking/issues/387 -# https://github.com/viking-gps/viking/pull/388 -Patch0: nettle-4.patch # Fails to build on s390x, not needed for multilib ExcludeArch: s390x %{ix86}