Mail archive
alpine-aports

[alpine-aports] [PATCH] testing/mongodb-tools: upgrade to 3.4.3

From: Marc Vertes <mvertes_at_free.fr>
Date: Mon, 17 Apr 2017 00:58:25 +0200

---
 testing/mongodb-tools/APKBUILD        | 27 ++++++--------------
 testing/mongodb-tools/fix-build.patch | 13 ++++++++++
 testing/mongodb-tools/libressl.patch  | 47 +++++++++++++++--------------------
 3 files changed, 41 insertions(+), 46 deletions(-)
 create mode 100644 testing/mongodb-tools/fix-build.patch
diff --git a/testing/mongodb-tools/APKBUILD b/testing/mongodb-tools/APKBUILD
index 72e7552998..4306e0680b 100644
--- a/testing/mongodb-tools/APKBUILD
+++ b/testing/mongodb-tools/APKBUILD
_at_@ -1,8 +1,8 @@
 # Contributor: Marc Vertes <marc.vertes_at_ugrid.net>
 # Maintainer: Marc Vertes <marc.vertes_at_ugrid.net>
 pkgname=mongodb-tools
-pkgver=r3.2.4
-pkgrel=1
+pkgver=r3.4.3
+pkgrel=0
 pkgdesc="The MongoDB tools provide import, export, and diagnostic capabilities."
 url="https://github.com/mongodb/mongo-tools"
 arch="all !aarch64"
_at_@ -14,7 +14,7 @@ install=""
 subpackages=""
 source="https://github.com/mongodb/mongo-tools/archive/$pkgver/$pkgname-$pkgver.tar.gz
 	libressl.patch
-	"
+	fix-build.patch"
 
 _builddir="$srcdir"/mongo-tools-$pkgver
 prepare() {
_at_@ -28,28 +28,17 @@ prepare() {
 }
 
 build() {
-	local ldflags
 	cd "$_builddir"
-	. ./set_gopath.sh
-	mkdir -p bin
-	ldflags="-X github.com/mongodb/mongo-tools/common/options.Gitspec=`git rev-parse HEAD`"
-	for i in bsondump mongostat mongofiles mongoexport mongoimport mongorestore mongodump mongotop mongooplog
-	do
-		echo "Building $i"
-		go build -ldflags "$ldflags" -o "bin/$i" -tags "ssl sasl" "$i/main/$i.go"
-	done
+	./build.sh sasl ssl
 }
 
 package() {
 	cd "$_builddir/bin"
 	local bindir="$pkgdir/usr/bin"
 	mkdir -p "$bindir" || return 1
-	cp bsondump mongostat mongofiles mongoexport mongoimport mongorestore mongodump mongotop mongooplog "$bindir" || return 1
+	cp bsondump mongostat mongofiles mongoexport mongoimport mongorestore mongodump mongotop mongooplog mongoreplay "$bindir" || return 1
 }
 
-md5sums="d4ac35044dd2bf91979f25a78c69612a  mongodb-tools-r3.2.4.tar.gz
-8740979d526a5eb5dedb91484d36ccbd  libressl.patch"
-sha256sums="9d52028fb2be6a6e0a779aa73587c52ccd5fa59b258e26e5c2c3fce167599138  mongodb-tools-r3.2.4.tar.gz
-09ee19045940ec86f66618e8b13769c61d83f94ca5057ecec24d171f44649b4b  libressl.patch"
-sha512sums="d34ad87bb2a53c9df0124c26a4c200236aa889c7a5bd09a3b535acd4b18c5757018e78813fa04b48b359004eb9097853b49fd359617e71f66e41ef71da01c222  mongodb-tools-r3.2.4.tar.gz
-069c303bc52b6020d7dd5250851bca85d7cef0e6294d3dc8b7d6a45033b2f4beae1c23935fe84cfb39b75de082e2621b2f45f1501944d09a0942edc024eb2f3e  libressl.patch"
+sha512sums="ec754e8b19c517d9603e0eb89cc315e0af53886b74a905c0742faf5369af8b87b84cedf57aaa25f93068cd21370fa8a274a97dc3c58bbb4a50db6c2e4f0109d9  mongodb-tools-r3.4.3.tar.gz
+3e336b01c33da66623cc84bf9c29c794bba20bdaf6299713f39416ed1a92406c6f2e5e03865aaca128f91e8e1ac64c6c52a2a92610c59dc7be2fd6c997e9361e  libressl.patch
+74e432b354fd75209b87461e54f79a173ba0d647a2e45a48d520ee9342236b6a50ef1c634312f4804402578b8534d59ebf10973ce90cae2bbe76407102f2b404  fix-build.patch"
diff --git a/testing/mongodb-tools/fix-build.patch b/testing/mongodb-tools/fix-build.patch
new file mode 100644
index 0000000000..4913d8caa6
--- /dev/null
+++ b/testing/mongodb-tools/fix-build.patch
_at_@ -0,0 +1,13 @@
+--- mongo-tools-r3.4.3/build.sh.orig
++++ mongo-tools-r3.4.3/build.sh
+_at_@ -7,8 +7,8 @@
+ fi
+ 
+ # make sure we're in the directory where the script lives
+-SCRIPT_DIR="$(cd "$(dirname ${BASH_SOURCE[0]})" && pwd)"
+-cd $SCRIPT_DIR
++#SCRIPT_DIR="$(cd "$(dirname ${BASH_SOURCE[0]})" && pwd)"
++#cd $SCRIPT_DIR
+ 
+ sed -i.bak -e "s/built-without-version-string/$(git describe)/" \
+            -e "s/built-without-git-spec/$(git rev-parse HEAD)/" \
diff --git a/testing/mongodb-tools/libressl.patch b/testing/mongodb-tools/libressl.patch
index 9cbcf2ee04..0afd28f98c 100644
--- a/testing/mongodb-tools/libressl.patch
+++ b/testing/mongodb-tools/libressl.patch
_at_@ -1,28 +1,21 @@
-diff --git a/vendor/src/github.com/spacemonkeygo/openssl/ctx.go b/vendor/src/github.com/spacemonkeygo/openssl/ctx.go
-index 22d6dd1..894fecd 100644
---- a/vendor/src/github.com/spacemonkeygo/openssl/ctx.go
-+++ b/vendor/src/github.com/spacemonkeygo/openssl/ctx.go
-_at_@ -140,8 +140,8 @@ const (
- func NewCtxWithVersion(version SSLVersion) (*Ctx, error) {
- 	var method *C.SSL_METHOD
- 	switch version {
--	case SSLv3:
--		method = C.SSLv3_method()
-+//	case SSLv3:
-+//		method = C.SSLv3_method()
- 	case TLSv1:
- 		method = C.TLSv1_method()
- 	case TLSv1_1:
-diff --git a/vendor/src/github.com/spacemonkeygo/openssl/hostname.c b/vendor/src/github.com/spacemonkeygo/openssl/hostname.c
-index 7ebea17..41c5951 100644
---- a/vendor/src/github.com/spacemonkeygo/openssl/hostname.c
-+++ b/vendor/src/github.com/spacemonkeygo/openssl/hostname.c
-_at_@ -346,7 +346,7 @@ static int do_x509_check(X509 *x, const unsigned char *chk, size_t chklen,
- 	return 0;
- 	}
+--- mongo-tools-r3.4.3.orig/vendor/src/github.com/spacemonkeygo/openssl/cert.go
++++ mongo-tools-r3.4.3/vendor/src/github.com/spacemonkeygo/openssl/cert.go
+_at_@ -277,8 +277,8 @@
+ 		md = C.EVP_md_null()
+ 	case EVP_MD5:
+ 		md = C.EVP_md5()
+-	case EVP_SHA:
+-		md = C.EVP_sha()
++	//case EVP_SHA:
++	//	md = C.EVP_sha()
+ 	case EVP_SHA1:
+ 		md = C.EVP_sha1()
+ 	case EVP_DSS:
+--- mongo-tools-r3.4.3.orig/vendor/src/github.com/spacemonkeygo/openssl/version.go
++++ mongo-tools-r3.4.3/vendor/src/github.com/spacemonkeygo/openssl/version.go
+_at_@ -19,4 +19,4 @@
+ // #include <openssl/opensslv.h>
+ import "C"
  
--#if OPENSSL_VERSION_NUMBER < 0x1000200fL
-+#if OPENSSL_VERSION_NUMBER < 0x1000200fL || defined(LIBRESSL_VERSION_NUMBER)
- 
- int X509_check_host(X509 *x, const unsigned char *chk, size_t chklen,
- 					unsigned int flags)
+-const Version string = C.OPENSSL_VERSION_TEXT
++const Version string = "LibreSSL 2.4.5"
-- 
2.12.2
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Mon Apr 17 2017 - 00:58:25 GMT