pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

libcanlock: Updated to version 3.0.2



Module Name:	pkgsrc-wip
Committed By:	Michael Baeuerle <michael.baeuerle%stz-e.de@localhost>
Pushed By:	micha
Date:		Fri Aug 24 13:51:16 2018 +0200
Changeset:	cee1310950705efab77010bc77f15abada8b0062

Modified Files:
	libcanlock/Makefile
	libcanlock/README
	libcanlock/distinfo
Removed Files:
	libcanlock/patches/patch-test_canlocktest.c
	libcanlock/patches/patch-test_canlocktest__legacy.c

Log Message:
libcanlock: Updated to version 3.0.2

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=cee1310950705efab77010bc77f15abada8b0062

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 libcanlock/Makefile                                |  9 +--
 libcanlock/README                                  | 10 ----
 libcanlock/distinfo                                | 10 ++--
 libcanlock/patches/patch-test_canlocktest.c        | 67 ----------------------
 .../patches/patch-test_canlocktest__legacy.c       | 36 ------------
 5 files changed, 6 insertions(+), 126 deletions(-)

diffs:
diff --git a/libcanlock/Makefile b/libcanlock/Makefile
index d02a6073fd..6d1b336684 100644
--- a/libcanlock/Makefile
+++ b/libcanlock/Makefile
@@ -1,6 +1,6 @@
 # $NetBSD$
 
-DISTNAME=	libcanlock-3.0.1
+DISTNAME=	libcanlock-3.0.2
 CATEGORIES=	news
 MASTER_SITES=	http://micha.freeshell.org/libcanlock/src/
 EXTRACT_SUFX=	.tar.bz2
@@ -17,11 +17,6 @@ USE_LIBTOOL=	yes
 
 TEST_TARGET=	test
 
-# Disable obsolete Version 2 API
-SUBST_CLASSES+=			edit-header
-SUBST_STAGE.edit-header=	post-patch
-SUBST_MESSAGE.edit-header=	Prepare header file
-SUBST_FILES.edit-header=	include/canlock.h
-SUBST_SED.edit-header=		-e 's,CL_API_V2  1,CL_API_V2  0,g'
+CONFIGURE_ARGS+=	--disable-legacy-api
 
 .include "../../mk/bsd.pkg.mk"
diff --git a/libcanlock/README b/libcanlock/README
index a6cd9544d5..7214aaba50 100644
--- a/libcanlock/README
+++ b/libcanlock/README
@@ -18,13 +18,3 @@ Anything that is not documented should be considered as internal and not
 part of the API. There is no portable way to hide all the internal stuff
 completely, but expect that a future version may no longer export it without
 notice.
-
-
-4) Backward compatibility
-The old API from version 2 is still emulated, but it is now deprecated and
-undocumented.
-
-Including the header file from the new location, recompile and relink should
-be sufficient to port an existing application to version 3 of the library.
-It is also possible to install both version 2 and version 3 of the library
-in parallel.
diff --git a/libcanlock/distinfo b/libcanlock/distinfo
index e14ff12649..21dfefb297 100644
--- a/libcanlock/distinfo
+++ b/libcanlock/distinfo
@@ -1,8 +1,6 @@
 $NetBSD$
 
-SHA1 (libcanlock-3.0.1.tar.bz2) = 609f3c5e6e5cefbe9c806c0372e258cb5a57d553
-RMD160 (libcanlock-3.0.1.tar.bz2) = c118b3ee8ac981e08102ebc105daaeba9d82b51b
-SHA512 (libcanlock-3.0.1.tar.bz2) = ccd4d81c49ab054359885eb1f8e65f1e978c4591a01dc280b029a5d8850b2b92895bd2c34c010da697946b27220f67f36346a6e2439b4e91a9da0c54bf08927c
-Size (libcanlock-3.0.1.tar.bz2) = 316579 bytes
-SHA1 (patch-test_canlocktest.c) = d04b6011f588c580d566e8f9ac6908df45d5ba71
-SHA1 (patch-test_canlocktest__legacy.c) = c6d8788b35d81c43c8cc447b04b912525ea4db44
+SHA1 (libcanlock-3.0.2.tar.bz2) = b05cbef7f90b7d7de7edb06ebc017c3f29026e9b
+RMD160 (libcanlock-3.0.2.tar.bz2) = b388add68a74bc82a1179ebeb1ccbdf8f9dc61b4
+SHA512 (libcanlock-3.0.2.tar.bz2) = 319feddfa726b767dedcf5709b51d5dd787c32041b200243f8eb09918ab1f85b22102ddc6cc3148ac2af797a294ed6a52819486596b77093e0a92231b72644e9
+Size (libcanlock-3.0.2.tar.bz2) = 317428 bytes
diff --git a/libcanlock/patches/patch-test_canlocktest.c b/libcanlock/patches/patch-test_canlocktest.c
deleted file mode 100644
index 765679be44..0000000000
--- a/libcanlock/patches/patch-test_canlocktest.c
+++ /dev/null
@@ -1,67 +0,0 @@
-$NetBSD$
-
-Disable test with <clue-string> and no longer use V2 API.
-
---- test/canlocktest.c.orig	2017-05-08 14:24:53.000000000 +0000
-+++ test/canlocktest.c
-@@ -80,23 +80,21 @@ static const char *check_scheme(cl_hash_
- static int checker(cl_hash_version hash, char *key, char *lock)
- {
-    int res = -1;
--   char *rawkey, *rawlock;
--   char keytype[BUFFSIZE], locktype[BUFFSIZE];
-+   cl_hash_version hash_key, hash_lock;
-+   char *string_key, *string_lock;
-    const char *scheme;
- 
-    printf("%s\n%s,%s\n", "Check Cancel-Key,Cancel-Lock:", key, lock);
- 
--   rawkey = lock_strip_alpha(key, keytype);
--   rawlock = lock_strip_alpha(lock, locktype);
-+   hash_key = cl_split(key, &string_key);
-+   hash_lock = cl_split(lock, &string_lock);
- 
--   /* Check whether <scheme> matches */
--   if (!strcmp(keytype, locktype))
-+   if (hash_key && hash_lock)
-    {
--      /* Check whether <scheme> is supported */
--      scheme = check_scheme(hash);
--      if (NULL != scheme && !strcmp(keytype, scheme))
-+      /* Check whether <scheme> matches */
-+      if (hash_key == hash_lock)
-       {
--         if (!cl_verify(hash, rawkey, rawlock))
-+         if (!cl_verify(hash, string_key, string_lock))
-          {
-             printf("\nGOOD\n");
-             res = 0;
-@@ -105,10 +103,11 @@ static int checker(cl_hash_version hash,
-             printf("\nBAD\n");
-       }
-       else
--         printf("\nBAD: Scheme not supported\n");
-+         printf("\nBAD: Scheme mismatch (%s/%s)\n",
-+                check_scheme(hash_key), check_scheme(hash_lock));
-    }
-    else
--      printf("\nBAD: Scheme mismatch (%s/%s)\n", keytype, locktype);
-+      printf("\nBAD: Scheme not supported\n");
- 
-    return res;
- }
-@@ -224,10 +223,14 @@ int main(void)
- 
-    /* Test 5 (Check SHA1 with <clue-string> element) */
-    printf("Test 5 (Check SHA1 with <clue-string> element)\n\n");
-+#if 0  /* Skip because it requires V2 API */
-    c_key = "ShA1:aaaBBBcccDDDeeeFFF:bN";
-    c_lock = "sha1:bNXHc6ohSmeHaRHHW56BIWZJt+4=";
-    rv = checker(CL_SHA1, c_key, c_lock);
-    if (rv) failed = 1;
-+#endif
-+   printf("SKIP\n");
-+   printf("(Note: <clue-string> is obsolete since >20 years)\n");
-    printf("\n----------------------------------------"
-           "----------------------------------------\n\n");
- 
diff --git a/libcanlock/patches/patch-test_canlocktest__legacy.c b/libcanlock/patches/patch-test_canlocktest__legacy.c
deleted file mode 100644
index 487ea2826a..0000000000
--- a/libcanlock/patches/patch-test_canlocktest__legacy.c
+++ /dev/null
@@ -1,36 +0,0 @@
-$NetBSD$
-
-Execute legacy tests as NOP if V2 API is disabled.
-
---- test/canlocktest_legacy.c.orig	2017-05-07 14:53:45.000000000 +0000
-+++ test/canlocktest_legacy.c
-@@ -49,6 +49,7 @@
- #define BUFFSIZE 512
- 
- 
-+#if CL_API_V2
- static int checker(char *key, char *lock)
- {
-    int res = -1;
-@@ -80,10 +81,12 @@ static int checker(char *key, char *lock
- 
-    return res;
- }
-+#endif  /* CL_API_V2 */
- 
- 
- int main(void)
- {
-+#if CL_API_V2
-    char cankey[256], canlock[256], *lkey, *llock;
-    unsigned char secret[] = "fluffy",
-       message[] = "<lkr905851929.22670@meow.invalid>";
-@@ -146,4 +149,8 @@ int main(void)
-    /* Check for success */
-    if (!failed) exit(EXIT_SUCCESS);
-    exit(EXIT_FAILURE);
-+#else  /* CL_API_V2 */
-+   /* Without V2 API: Execute as NOP and return success */
-+   exit(EXIT_SUCCESS);
-+#endif  /* CL_API_V2 */
- }


Home | Main Index | Thread Index | Old Index