summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtem Klevtsov2017-10-15 20:32:27 +0700
committerArtem Klevtsov2017-10-15 20:32:27 +0700
commit35f69080f8a7d57ca3b79ac21d6ddedb7b1d60ad (patch)
treeab71f43c9396b9256af57b8a591dd3b5235fc3d2
parentbf2ce08f611c70548d72438c301037dc9341a96c (diff)
downloadaur-35f69080f8a7d57ca3b79ac21d6ddedb7b1d60ad.tar.gz
Fix build issues
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD7
-rw-r--r--openssl-crypto.patch72
-rw-r--r--openssl-socketproxy.patch (renamed from socketproxy-openssl.patch)0
4 files changed, 80 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6aaa2ce87218..fb7133bfd9da 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -45,10 +45,12 @@ pkgbase = rstudio-desktop-git
source = git+https://github.com/rstudio/rstudio.git
source = https://s3.amazonaws.com/rstudio-buildtools/gin-1.5.zip
source = https://s3.amazonaws.com/rstudio-buildtools/gwt-2.8.1.zip
- source = socketproxy-openssl.patch
+ source = openssl-crypto.patch
+ source = openssl-socketproxy.patch
md5sums = SKIP
md5sums = 2409168cc18bf5f341e107e6887fe359
md5sums = ddd572887957fd5cdfde3469bd8c1102
+ md5sums = e5a5b48fdddd7273d3b4a41123e9c419
md5sums = d571313f511ad4a17014c4aef6d01bbc
pkgname = rstudio-desktop-git
diff --git a/PKGBUILD b/PKGBUILD
index 4e455afec6ac..ec2899cd03fa 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -23,10 +23,12 @@ install="${pkgname}.install"
source=("git+https://github.com/rstudio/rstudio.git"
"https://s3.amazonaws.com/rstudio-buildtools/gin-${_ginver}.zip"
"https://s3.amazonaws.com/rstudio-buildtools/gwt-${_gwtver}.zip"
- socketproxy-openssl.patch)
+ openssl-crypto.patch
+ openssl-socketproxy.patch)
md5sums=('SKIP'
'2409168cc18bf5f341e107e6887fe359'
'ddd572887957fd5cdfde3469bd8c1102'
+ 'e5a5b48fdddd7273d3b4a41123e9c419'
'd571313f511ad4a17014c4aef6d01bbc')
pkgver() {
@@ -37,7 +39,8 @@ pkgver() {
prepare() {
msg "Apply socketproxy-openssl.patch..."
cd "${srcdir}/${_gitname}"
- patch -p1 < ${srcdir}/socketproxy-openssl.patch
+ patch -p1 < ${srcdir}/openssl-crypto.patch
+ patch -p1 < ${srcdir}/openssl-socketproxy.patch
msg "Extracting dependencies..."
cd "${srcdir}/${_gitname}/src/gwt"
diff --git a/openssl-crypto.patch b/openssl-crypto.patch
new file mode 100644
index 000000000000..a307cf27d2b1
--- /dev/null
+++ b/openssl-crypto.patch
@@ -0,0 +1,72 @@
+--- a/src/cpp/core/system/Crypto.cpp.orig 2017-10-14 15:59:52.561983799 +0900
++++ b/src/cpp/core/system/Crypto.cpp 2017-10-14 15:58:24.504542511 +0900
+@@ -261,27 +261,26 @@ Error aesEncrypt(const std::vector<unsig
+ int outlen = 0;
+ int bytesEncrypted = 0;
+
+- EVP_CIPHER_CTX ctx;
+- EVP_CIPHER_CTX_init(&ctx);
+- EVP_CipherInit_ex(&ctx, EVP_aes_128_cbc(), NULL, &key[0], &iv[0], kEncrypt);
++ EVP_CIPHER_CTX* ctx = EVP_CIPHER_CTX_new();
++ EVP_CipherInit_ex(ctx, EVP_aes_128_cbc(), NULL, &key[0], &iv[0], kEncrypt);
+
+ // perform the encryption
+- if(!EVP_CipherUpdate(&ctx, &(pEncrypted->operator[](0)), &outlen, &data[0], data.size()))
++ if(!EVP_CipherUpdate(ctx, &(pEncrypted->operator[](0)), &outlen, &data[0], data.size()))
+ {
+- EVP_CIPHER_CTX_cleanup(&ctx);
++ EVP_CIPHER_CTX_free(ctx);
+ return lastCryptoError(ERROR_LOCATION);
+ }
+ bytesEncrypted += outlen;
+
+ // perform final flush including left-over padding
+- if(!EVP_CipherFinal_ex(&ctx, &(pEncrypted->operator[](outlen)), &outlen))
++ if(!EVP_CipherFinal_ex(ctx, &(pEncrypted->operator[](outlen)), &outlen))
+ {
+- EVP_CIPHER_CTX_cleanup(&ctx);
++ EVP_CIPHER_CTX_free(ctx);
+ return lastCryptoError(ERROR_LOCATION);
+ }
+ bytesEncrypted += outlen;
+
+- EVP_CIPHER_CTX_cleanup(&ctx);
++ EVP_CIPHER_CTX_free(ctx);
+
+ // resize the container to the amount of actual bytes encrypted (including padding)
+ pEncrypted->resize(bytesEncrypted);
+@@ -298,27 +297,26 @@ Error aesDecrypt(const std::vector<unsig
+ int outlen = 0;
+ int bytesDecrypted = 0;
+
+- EVP_CIPHER_CTX ctx;
+- EVP_CIPHER_CTX_init(&ctx);
+- EVP_CipherInit_ex(&ctx, EVP_aes_128_cbc(), NULL, &key[0], &iv[0], kDecrypt);
++ EVP_CIPHER_CTX* ctx = EVP_CIPHER_CTX_new();
++ EVP_CipherInit_ex(ctx, EVP_aes_128_cbc(), NULL, &key[0], &iv[0], kDecrypt);
+
+ // perform the decryption
+- if(!EVP_CipherUpdate(&ctx, &(pDecrypted->operator[](0)), &outlen, &data[0], data.size()))
++ if(!EVP_CipherUpdate(ctx, &(pDecrypted->operator[](0)), &outlen, &data[0], data.size()))
+ {
+- EVP_CIPHER_CTX_cleanup(&ctx);
++ EVP_CIPHER_CTX_free(ctx);
+ return lastCryptoError(ERROR_LOCATION);
+ }
+ bytesDecrypted += outlen;
+
+ // perform final flush
+- if(!EVP_CipherFinal_ex(&ctx, &(pDecrypted->operator[](outlen)), &outlen))
++ if(!EVP_CipherFinal_ex(ctx, &(pDecrypted->operator[](outlen)), &outlen))
+ {
+- EVP_CIPHER_CTX_cleanup(&ctx);
++ EVP_CIPHER_CTX_free(ctx);
+ return lastCryptoError(ERROR_LOCATION);
+ }
+ bytesDecrypted += outlen;
+
+- EVP_CIPHER_CTX_cleanup(&ctx);
++ EVP_CIPHER_CTX_free(ctx);
+
+ // resize the container to the amount of actual bytes decrypted (padding is removed)
+ pDecrypted->resize(bytesDecrypted); \ No newline at end of file
diff --git a/socketproxy-openssl.patch b/openssl-socketproxy.patch
index 9d521eda2e27..9d521eda2e27 100644
--- a/socketproxy-openssl.patch
+++ b/openssl-socketproxy.patch