From 82a7d0dc881e7f5b1d3855603972fedc7f4f6760 Mon Sep 17 00:00:00 2001 From: "Issam E. Maghni" Date: Sun, 29 Nov 2020 13:54:27 -0500 Subject: [PATCH 1/3] glog: update to 0.4.0 --- srcpkgs/glog/template | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/srcpkgs/glog/template b/srcpkgs/glog/template index 8c1d1af9357..206551992bc 100644 --- a/srcpkgs/glog/template +++ b/srcpkgs/glog/template @@ -1,14 +1,16 @@ # Template file for 'glog' pkgname=glog -version=0.3.5 -revision=3 -build_style=gnu-configure +version=0.4.0 +revision=1 +build_style=cmake +configure_args=" -D BUILD_SHARED_LIBS=ON" +makedepends="gflags-devel" short_desc="Logging library for C++" maintainer="John Regan " license="BSD-3-Clause" homepage="https://github.com/google/glog" -distfiles="${homepage}/archive/v${version}.tar.gz" -checksum=7580e408a2c0b5a89ca214739978ce6ff480b5e7d8d7698a2aa92fadc484d1e0 +distfiles="https://github.com/google/glog/archive/v${version}.tar.gz" +checksum=f28359aeba12f30d73d9e4711ef356dc842886968112162bc73002645139c39c post_install() { vlicense COPYING @@ -19,15 +21,8 @@ glog-devel_package() { depends="${sourcepkg}>=${version}_${revision}" pkg_install() { vmove usr/include - vmove "usr/lib/*.a" vmove "usr/lib/*.so" - vmove usr/lib/pkgconfig - } -} - -glog-doc_package() { - short_desc+=" - documentation" - pkg_install() { - vmove usr/share/doc + vmove usr/lib/cmake + #vmove usr/lib/pkgconfig UNCOMMENT THIS LINE IN NEXT RELEASE } } From 9c4de54ada027d369b4c7aa29e6920171a2951e2 Mon Sep 17 00:00:00 2001 From: "Issam E. Maghni" Date: Sun, 29 Nov 2020 21:23:06 -0500 Subject: [PATCH 2/3] New package: folly-2020.11.23.00 --- srcpkgs/folly-devel | 1 + .../folly/patches/0001-libressl-compat.patch | 280 ++++++++++++++++++ srcpkgs/folly/template | 35 +++ 3 files changed, 316 insertions(+) create mode 120000 srcpkgs/folly-devel create mode 100644 srcpkgs/folly/patches/0001-libressl-compat.patch create mode 100644 srcpkgs/folly/template diff --git a/srcpkgs/folly-devel b/srcpkgs/folly-devel new file mode 120000 index 00000000000..2757897bf91 --- /dev/null +++ b/srcpkgs/folly-devel @@ -0,0 +1 @@ +folly \ No newline at end of file diff --git a/srcpkgs/folly/patches/0001-libressl-compat.patch b/srcpkgs/folly/patches/0001-libressl-compat.patch new file mode 100644 index 00000000000..c2646e63248 --- /dev/null +++ b/srcpkgs/folly/patches/0001-libressl-compat.patch @@ -0,0 +1,280 @@ +https://www.mail-archive.com/haproxy@formilux.org/msg26685.html +https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95dcce86af2109c34e7ac852c267ec07bab9c3cb +https://github.com/proftpd/proftpd/commit/a3d65e868308b28c1add87eadd120717a55dc57b#diff-8d90650fe394db7f70d0c0a3c070f92a + +diff --git a/folly/io/async/AsyncSSLSocket.cpp b/folly/io/async/AsyncSSLSocket.cpp +index 9584bfb2..77180ebf 100644 +--- a/folly/io/async/AsyncSSLSocket.cpp ++++ b/folly/io/async/AsyncSSLSocket.cpp +@@ -45,6 +45,10 @@ using folly::SpinLock; + using folly::io::Cursor; + using folly::ssl::SSLSessionUniquePtr; + ++static inline const char *SSL_SESSION_get0_hostname(const SSL_SESSION *sess) { ++ return sess->tlsext_hostname; ++} ++ + namespace { + using folly::AsyncSSLSocket; + using folly::SSLContext; +diff --git a/folly/io/async/SSLContext.cpp b/folly/io/async/SSLContext.cpp +index b6d1e6a3..8af8869e 100644 +--- a/folly/io/async/SSLContext.cpp ++++ b/folly/io/async/SSLContext.cpp +@@ -217,7 +217,7 @@ void SSLContext::setCiphersOrThrow(const std::string& ciphers) { + } + + void SSLContext::setSigAlgsOrThrow(const std::string& sigalgs) { +-#if OPENSSL_VERSION_NUMBER >= 0x1000200fL ++#if 0 + int rc = SSL_CTX_set1_sigalgs_list(ctx_, sigalgs.c_str()); + if (rc == 0) { + throw std::runtime_error("SSL_CTX_set1_sigalgs_list " + getErrors()); +diff --git a/folly/ssl/Init.cpp b/folly/ssl/Init.cpp +index 7baeae58..c23e24aa 100644 +--- a/folly/ssl/Init.cpp ++++ b/folly/ssl/Init.cpp +@@ -22,6 +22,8 @@ + #include + #include + ++#define OPENSSL_cleanup ERR_free_strings ++ + namespace folly { + namespace ssl { + +diff --git a/folly/ssl/OpenSSLCertUtils.cpp b/folly/ssl/OpenSSLCertUtils.cpp +index 320893a0..00976f51 100644 +--- a/folly/ssl/OpenSSLCertUtils.cpp ++++ b/folly/ssl/OpenSSLCertUtils.cpp +@@ -21,6 +21,230 @@ + #include + #include + ++static time_t ASN1_TIME_seconds(const ASN1_TIME *a) { ++ static const int min[9] = { 0, 0, 1, 1, 0, 0, 0, 0, 0 }; ++ static const int max[9] = { 99, 99, 12, 31, 23, 59, 59, 12, 59 }; ++ time_t t = 0; ++ char *text; ++ int text_len; ++ int i, j, n; ++ unsigned int nyears, nmons, nhours, nmins, nsecs; ++ ++ if (a->type != V_ASN1_GENERALIZEDTIME) { ++ return 0; ++ } ++ ++ text_len = a->length; ++ text = (char *) a->data; ++ ++ /* GENERALIZEDTIME is similar to UTCTIME except the year is represented ++ * as YYYY. This stuff treats everything as a two digit field so make ++ * first two fields 00 to 99 ++ */ ++ ++ if (text_len < 13) { ++ return 0; ++ } ++ ++ nyears = nmons = nhours = nmins = nsecs = 0; ++ ++ for (i = 0, j = 0; i < 7; i++) { ++ if (i == 6 && ++ (text[j] == 'Z' || ++ text[j] == '+' || ++ text[j] == '-')) { ++ i++; ++ break; ++ } ++ ++ if (text[j] < '0' || ++ text[j] > '9') { ++ return 0; ++ } ++ ++ n = text[j] - '0'; ++ if (++j > text_len) { ++ return 0; ++ } ++ ++ if (text[j] < '0' || ++ text[j] > '9') { ++ return 0; ++ } ++ ++ n = (n * 10) + (text[j] - '0'); ++ if (++j > text_len) { ++ return 0; ++ } ++ ++ if (n < min[i] || ++ n > max[i]) { ++ return 0; ++ } ++ ++ switch (i) { ++ case 0: ++ /* Years */ ++ nyears = (n * 100); ++ break; ++ ++ case 1: ++ /* Years */ ++ nyears += n; ++ break; ++ ++ case 2: ++ /* Month */ ++ nmons = n - 1; ++ break; ++ ++ case 3: ++ /* Day of month; ignored */ ++ break; ++ ++ case 4: ++ /* Hours */ ++ nhours = n; ++ break; ++ ++ case 5: ++ /* Minutes */ ++ nmins = n; ++ break; ++ ++ case 6: ++ /* Seconds */ ++ nsecs = n; ++ break; ++ } ++ } ++ ++ /* Yes, this is not calendrical accurate. It only needs to be a good ++ * enough estimation, as it is used (currently) only for determining the ++ * validity window of an OCSP request (in seconds). ++ */ ++ t = (nyears * 365 * 86400) + (nmons * 30 * 86400) * (nhours * 3600) + nsecs; ++ ++ /* Optional fractional seconds: decimal point followed by one or more ++ * digits. ++ */ ++ if (text[j] == '.') { ++ if (++j > text_len) { ++ return 0; ++ } ++ ++ i = j; ++ ++ while (text[j] >= '0' && ++ text[j] <= '9' && ++ j <= text_len) { ++ j++; ++ } ++ ++ /* Must have at least one digit after decimal point */ ++ if (i == j) { ++ return 0; ++ } ++ } ++ ++ if (text[j] == 'Z') { ++ j++; ++ ++ } else if (text[j] == '+' || ++ text[j] == '-') { ++ int offsign, offset = 0; ++ ++ offsign = text[j] == '-' ? -1 : 1; ++ j++; ++ ++ if (j + 4 > text_len) { ++ return 0; ++ } ++ ++ for (i = 7; i < 9; i++) { ++ if (text[j] < '0' || ++ text[j] > '9') { ++ return 0; ++ } ++ ++ n = text[j] - '0'; ++ j++; ++ ++ if (text[j] < '0' || ++ text[j] > '9') { ++ return 0; ++ } ++ ++ n = (n * 10) + text[j] - '0'; ++ ++ if (n < min[i] || ++ n > max[i]) { ++ return 0; ++ } ++ ++ if (i == 7) { ++ offset = n * 3600; ++ ++ } else if (i == 8) { ++ offset += n * 60; ++ } ++ ++ j++; ++ } ++ ++ if (offset > 0) { ++ t += (offset * offsign); ++ } ++ ++ } else if (text[j]) { ++ /* Missing time zone information. */ ++ return 0; ++ } ++ ++ return t; ++} ++ ++static int ASN1_TIME_diff(int *pday, int *psec, const ASN1_TIME *from, ++ const ASN1_TIME *to) { ++ time_t from_secs, to_secs, diff_secs; ++ long diff_days; ++ ++ from_secs = ASN1_TIME_seconds(from); ++ if (from_secs == 0) { ++ return 0; ++ } ++ ++ to_secs = ASN1_TIME_seconds(to); ++ if (to_secs == 0) { ++ return 0; ++ } ++ ++ if (to_secs > from_secs) { ++ diff_secs = to_secs - from_secs; ++ ++ } else { ++ diff_secs = from_secs - to_secs; ++ } ++ ++ /* The ASN1_TIME_diff() API in OpenSSL-1.0.2+ offers days and seconds, ++ * possibly to handle LARGE time differences without overflowing the data ++ * type for seconds. So we do the same. ++ */ ++ ++ diff_days = diff_secs % 86400; ++ diff_secs -= (diff_days * 86400); ++ ++ if (pday) { ++ *pday = (int) diff_days; ++ } ++ ++ if (psec) { ++ *psec = diff_secs; ++ } ++ ++ return 1; ++} ++ + namespace folly { + namespace ssl { + diff --git a/srcpkgs/folly/template b/srcpkgs/folly/template new file mode 100644 index 00000000000..7c51105de57 --- /dev/null +++ b/srcpkgs/folly/template @@ -0,0 +1,35 @@ +# Template file for 'folly' +pkgname=folly +version=2020.11.23.00 +revision=1 +build_style=cmake +configure_args="-D BUILD_SHARED_LIBS=ON -D BUILD_TESTS=OFF + -D PACKAGE_VERSION=0.58.0" +makedepends="binutils-devel boost-devel bzip2-devel double-conversion-devel + fmt-devel gflags-devel glog-devel jemalloc-devel libaio-devel libevent-devel + liblz4-devel liblzma-devel libressl-devel libsodium-devel liburing-devel + libzstd-devel snappy-devel zlib-devel $(vopt_if debug glibc-devel) + $(vopt_if debug libdwarf-devel) $(vopt_if debug libunwind-devel)" +checkdepends="gtest-devel" +short_desc="Variety of core library components used extensively at Facebook" +maintainer="Issam E. Maghni " +license="Apache-2.0" +homepage="https://github.com/facebook/folly" +distfiles="https://github.com/facebook/folly/archive/v${version}.tar.gz" +checksum=28940c49c92df15e061e51323be7d1879eaa095f13a715b1e8c0600e4e51bc19 +patch_args="-Np1" + +build_options="debug" +desc_option_debug="Enable advanced debugging functionality" + +folly-devel_package() { + short_desc+=" - development files" + depends="${sourcepkg}>=${version}_${revision} boost-devel fmt-devel + jemalloc-devel" + pkg_install() { + vmove usr/include + vmove "usr/lib/*.so" + vmove usr/lib/cmake + vmove usr/lib/pkgconfig + } +} From 54e75b30b941d3706a0e2dadeade4e3db84bff82 Mon Sep 17 00:00:00 2001 From: "Issam E. Maghni" Date: Sun, 29 Nov 2020 23:44:25 -0500 Subject: [PATCH 3/3] zz --- srcpkgs/dwarfs/template | 15 ++++++++++ srcpkgs/fbthrift-devel | 1 + srcpkgs/fbthrift/template | 19 ++++++++++++ srcpkgs/fizz-devel | 1 + .../fizz/patches/0001-libressl-compat.patch | 13 +++++++++ srcpkgs/fizz/template | 29 +++++++++++++++++++ srcpkgs/wangle/template | 29 +++++++++++++++++++ 7 files changed, 107 insertions(+) create mode 100644 srcpkgs/dwarfs/template create mode 120000 srcpkgs/fbthrift-devel create mode 100644 srcpkgs/fbthrift/template create mode 120000 srcpkgs/fizz-devel create mode 100644 srcpkgs/fizz/patches/0001-libressl-compat.patch create mode 100644 srcpkgs/fizz/template create mode 100644 srcpkgs/wangle/template diff --git a/srcpkgs/dwarfs/template b/srcpkgs/dwarfs/template new file mode 100644 index 00000000000..2545c26cdb1 --- /dev/null +++ b/srcpkgs/dwarfs/template @@ -0,0 +1,15 @@ +# Template file for 'dwarfs' +pkgname=dwarfs +version=0.2.1 +revision=1 +build_style=cmake +configure_args="-D WITH_LUA=OFF -D WITH_TESTS=ON" +hostmakedepends="pkg-config" +makedepends="boost-devel fuse3-devel" +depends="" +short_desc="Fast high compression read-only file system" +maintainer="Issam E. Maghni " +license="GPL-3.0-or-later" +homepage="https://github.com/mhx/dwarfs" +distfiles="https://github.com/mhx/dwarfs/archive/v${version}.tar.gz" +checksum=fd34463764684bb4ce643583a0756f6422cf72a0374c90b8ec45921b4847600b diff --git a/srcpkgs/fbthrift-devel b/srcpkgs/fbthrift-devel new file mode 120000 index 00000000000..cba3fa38168 --- /dev/null +++ b/srcpkgs/fbthrift-devel @@ -0,0 +1 @@ +fbthrift \ No newline at end of file diff --git a/srcpkgs/fbthrift/template b/srcpkgs/fbthrift/template new file mode 100644 index 00000000000..5ff3d946e9c --- /dev/null +++ b/srcpkgs/fbthrift/template @@ -0,0 +1,19 @@ +# Template file for 'fbthrift' +pkgname=fbthrift +version=2020.11.23.00 +revision=1 +build_style=cmake +#configure_args="" +#make_build_args="" +#make_install_args="" +#conf_files="" +#make_dirs="/var/log/dir 0755 root root" +hostmakedepends="bison flex" +makedepends="fizz-devel folly-devel gflags-devel glog-devel libressl-devel" +depends="" +short_desc="Serialization and RPC framework for service communication" +maintainer="Issam E. Maghni " +license="Apache-2.0" +homepage="https://github.com/facebook/fbthrift" +distfiles="https://github.com/facebook/fbthrift/archive/v${version}.tar.gz" +checksum=126d0770250bf203eb370259323a76ac16fcbe7db6413e94df4690167baf3b24 diff --git a/srcpkgs/fizz-devel b/srcpkgs/fizz-devel new file mode 120000 index 00000000000..9b00ce20c29 --- /dev/null +++ b/srcpkgs/fizz-devel @@ -0,0 +1 @@ +fizz \ No newline at end of file diff --git a/srcpkgs/fizz/patches/0001-libressl-compat.patch b/srcpkgs/fizz/patches/0001-libressl-compat.patch new file mode 100644 index 00000000000..f38794641b0 --- /dev/null +++ b/srcpkgs/fizz/patches/0001-libressl-compat.patch @@ -0,0 +1,13 @@ +diff --git a/fizz/crypto/signature/Signature-inl.h b/fizz/crypto/signature/Signature-inl.h +index 65a42880..1f8884a7 100644 +--- a/fizz/crypto/signature/Signature-inl.h ++++ b/fizz/crypto/signature/Signature-inl.h +@@ -172,7 +172,7 @@ inline void OpenSSLSignature::setKey( + template <> + inline void OpenSSLSignature::setKey( + folly::ssl::EvpPkeyUniquePtr pkey) { +- detail::validateEdKey(pkey, NID_ED25519); ++ detail::validateEdKey(pkey, NID_Ed25519); + pkey_ = std::move(pkey); + #else + inline void OpenSSLSignature::setKey( diff --git a/srcpkgs/fizz/template b/srcpkgs/fizz/template new file mode 100644 index 00000000000..9ff6ed3ee28 --- /dev/null +++ b/srcpkgs/fizz/template @@ -0,0 +1,29 @@ +# Template file for 'fizz' +pkgname=fizz +version=2020.11.23.00 +revision=1 +wrksrc="${pkgname}-${version}/${pkgname}" +build_style=cmake +configure_args="-D BUILD_SHARED_LIBS=ON -D BUILD_STATIC_LIBS=ON + -D BUILD_TESTS=ON" +makedepends="double-conversion-devel fmt-devel folly-devel gflags-devel + glog-devel libevent-devel libressl-devel libsodium-devel" +checkdepends="gtest-devel" +short_desc="C++14 implementation of the TLS-1.3 standard" +maintainer="Issam E. Maghni " +license="BSD-3-Clause" +homepage="https://github.com/facebookincubator/fizz" +distfiles="https://github.com/facebookincubator/fizz/archive/v${version}.tar.gz" +checksum=ed9bf4714aaa5f401bbb47a98182c6886564fcb35301b0765eac853afbe9dc90 + +fizz-devel_package() { + short_desc+=" - development files" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/include + vmove "usr/lib/*.a" + vmove "usr/lib/*.so" + vmove usr/lib/cmake + vmove usr/lib/pkgconfig + } +} diff --git a/srcpkgs/wangle/template b/srcpkgs/wangle/template new file mode 100644 index 00000000000..9cfe13c9ba4 --- /dev/null +++ b/srcpkgs/wangle/template @@ -0,0 +1,29 @@ +# Template file for 'wangle' +pkgname=wangle +version=2020.11.23.00 +revision=1 +wrksrc="${pkgname}-${version}/${pkgname}" +build_style=cmake +configure_args="-D BUILD_SHARED_LIBS=ON -D BUILD_STATIC_LIBS=ON + -D BUILD_TESTS=ON" +makedepends="double-conversion-devel fizz-devel fmt-devel folly-devel + gflags-devel glog-devel libevent-devel libressl-devel" +checkdepends="gtest-devel" +short_desc="C++ networking library" +maintainer="Issam E. Maghni " +license="Apache-2.0" +homepage="https://github.com/facebook/wangle" +distfiles="https://github.com/facebook/wangle/archive/v${version}.tar.gz" +checksum=b92d7ca7299fafa015dcbff21e79b2636a7f05c4250c3a6f3bbdf583af56ec95 + +wangle-devel_package() { + short_desc+=" - development files" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/include + vmove "usr/lib/*.a" + vmove "usr/lib/*.so" + vmove usr/lib/cmake + vmove usr/lib/pkgconfig + } +}