Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jul 2018 12:52:25 +0000 (UTC)
From:      Steve Wills <swills@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r475312 - in head/net/megatools: . files
Message-ID:  <201807251252.w6PCqPF0065092@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: swills
Date: Wed Jul 25 12:52:24 2018
New Revision: 475312
URL: https://svnweb.freebsd.org/changeset/ports/475312

Log:
  net/megatools: update to 1.10.0
  
  PR:		230033
  Submitted by:	Max Kostikov <max@kostikov.co> (maintainer)

Added:
  head/net/megatools/files/patch-lib_mega.h   (contents, props changed)
Modified:
  head/net/megatools/Makefile   (contents, props changed)
  head/net/megatools/distinfo   (contents, props changed)
  head/net/megatools/files/patch-lib_mega.c   (contents, props changed)

Modified: head/net/megatools/Makefile
==============================================================================
--- head/net/megatools/Makefile	Wed Jul 25 12:48:39 2018	(r475311)
+++ head/net/megatools/Makefile	Wed Jul 25 12:52:24 2018	(r475312)
@@ -2,8 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	megatools
-PORTVERSION=	1.9.98
-PORTREVISION=	1
+PORTVERSION=	1.10.0
 CATEGORIES=	net
 MASTER_SITES=	https://megatools.megous.com/builds/
 

Modified: head/net/megatools/distinfo
==============================================================================
--- head/net/megatools/distinfo	Wed Jul 25 12:48:39 2018	(r475311)
+++ head/net/megatools/distinfo	Wed Jul 25 12:52:24 2018	(r475312)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1478256777
-SHA256 (megatools-1.9.98.tar.gz) = 9b0521a4d27dbc417fc8e12610ac1e1da729bf6d6eb5bef927ef3670b372a16f
-SIZE (megatools-1.9.98.tar.gz) = 285805
+TIMESTAMP = 1532507562
+SHA256 (megatools-1.10.0.tar.gz) = 788a51d0977db95c371c97917aee3d39e145044b6bb70d671bc76c2ea6c4171b
+SIZE (megatools-1.10.0.tar.gz) = 297369

Modified: head/net/megatools/files/patch-lib_mega.c
==============================================================================
--- head/net/megatools/files/patch-lib_mega.c	Wed Jul 25 12:48:39 2018	(r475311)
+++ head/net/megatools/files/patch-lib_mega.c	Wed Jul 25 12:52:24 2018	(r475312)
@@ -1,33 +1,46 @@
-Fix build for FreeBSD 9.x base OpenSSL and LibreSSL.  Fix for LibreSSL is
-already in upstream repository, so this file can be removed once FreeBSD 9.x
-support is dropped AND the next version of megatools is released.
---- lib/mega.c.orig	2016-11-03 13:45:42 UTC
+--- lib/mega.c.orig	2018-07-22 21:41:55 UTC
 +++ lib/mega.c
-@@ -29,7 +29,9 @@
- #include <string.h>
- #include <time.h>
- #include <openssl/aes.h>
-+#if OPENSSL_VERSION_NUMBER >= 0x101000000L && !defined(LIBRESSL_VERSION_NUMBER)
- #include <openssl/modes.h>
-+#endif
- #include <openssl/bn.h>
- #include <openssl/rsa.h>
- #include <openssl/rand.h>
-@@ -803,7 +805,7 @@ static gboolean rsa_key_gen(rsa_key* k)
-     return FALSE;
-   }
+@@ -3172,6 +3172,7 @@ static void tman_worker_upload_chunk(struct transfer_c
+ 	GError *local_err = NULL;
+ 	gc_free gchar *url = NULL;
+ 	gc_string_free GString *response = NULL;
++	gc_free gchar* chksum = NULL;
  
--#if OPENSSL_VERSION_NUMBER >= 0x10100000L
-+#if OPENSSL_VERSION_NUMBER >= 0x101000000L && !defined(LIBRESSL_VERSION_NUMBER)
-   RSA_get0_key(key, &k->m, &k->e, &k->d);
-   RSA_get0_factors(key, &k->q, &k->p);
-   RSA_get0_crt_params(key, NULL, NULL, &k->u);
-@@ -2988,7 +2990,7 @@ struct _put_data
-   GByteArray* buffer;
- };
+ 	tman_debug("W[%d]: started for chunk %d\n", worker->index, c->index);
  
--#if OPENSSL_VERSION_NUMBER >= 0x10100000L
-+#if OPENSSL_VERSION_NUMBER >= 0x101000000L && !defined(LIBRESSL_VERSION_NUMBER)
- void AES_ctr128_encrypt(
-   const unsigned char *in, 
-   unsigned char *out,
+@@ -3217,7 +3218,7 @@ static void tman_worker_upload_chunk(struct transfer_c
+ 	}
+ 
+ 	// prepare URL including chunk offset
+-	gc_free gchar* chksum = upload_checksum(buf, c->size);
++	chksum = upload_checksum(buf, c->size);
+ 	url = g_strdup_printf("%s/%" G_GOFFSET_FORMAT "?c=%s", t->upload_url, c->offset, chksum);
+ 
+ 	// perform upload POST
+@@ -4636,6 +4637,26 @@ gboolean mega_node_get_path(struct mega_node *n, gchar
+ gboolean mega_node_is_container(struct mega_node *n)
+ {
+ 	return n && n->type != MEGA_NODE_FILE;
++}
++
++// }}}
++// {{{ mega_node_has_ancestor
++
++gboolean mega_node_has_ancestor(struct mega_node *n, struct mega_node *ancestor)
++{
++	g_return_val_if_fail(n != NULL, FALSE);
++	g_return_val_if_fail(ancestor != NULL, FALSE);
++
++	struct mega_node* it = n->parent;
++
++	while (it) {
++		if (it == ancestor)
++			return TRUE;
++
++		it = it->parent;
++	}
++
++	return FALSE;
+ }
+ 
+ // }}}

Added: head/net/megatools/files/patch-lib_mega.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/megatools/files/patch-lib_mega.h	Wed Jul 25 12:52:24 2018	(r475312)
@@ -0,0 +1,19 @@
+--- lib/mega.h.orig	2018-07-22 21:40:40 UTC
++++ lib/mega.h
+@@ -118,7 +118,7 @@ struct mega_download_data_params {
+ 
+ 	gchar *node_handle;
+ 	gchar *node_name;
+-	gsize node_size;
++	guint64 node_size;
+ };
+ 
+ #define MEGA_DEBUG_API 0x01
+@@ -181,6 +181,7 @@ void mega_download_data_free(struct mega_download_data
+ gboolean mega_node_is_writable(struct mega_session *s, struct mega_node *n);
+ 
+ gboolean mega_node_is_container(struct mega_node *n);
++gboolean mega_node_has_ancestor(struct mega_node *n, struct mega_node *ancestor);
+ gchar *mega_node_get_link(struct mega_node *n, gboolean include_key);
+ gchar *mega_node_get_key(struct mega_node *n);
+ gboolean mega_node_get_path(struct mega_node *n, gchar *buf, gsize len);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807251252.w6PCqPF0065092>