aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs
diff options
context:
space:
mode:
authorthegeorg <thegeorg@yandex-team.com>2025-01-11 23:49:03 +0300
committerthegeorg <thegeorg@yandex-team.com>2025-01-12 00:05:04 +0300
commitad8a91bf945c4449b4005f6b8ac80ab2f69c9862 (patch)
treef5cce5e5a5a94a03e9f248d0f9634c88d998675b /contrib/libs
parent389054495d864432cf6d3f891e1eab1e6a7d426f (diff)
downloadydb-ad8a91bf945c4449b4005f6b8ac80ab2f69c9862.tar.gz
Cleanup contrib/libs/ngtcp2 import routine
Preserve original file structure and remove excessive hacks applied during `post_install()` thus allow further updates to be done automatically. commit_hash:3b4e377996c12e4bc99b7bb74423f12a7e039f7b
Diffstat (limited to 'contrib/libs')
-rw-r--r--contrib/libs/curl/.yandex_meta/__init__.py3
-rw-r--r--contrib/libs/curl/.yandex_meta/override.nix2
-rw-r--r--contrib/libs/curl/lib/curl_config-linux.h2
-rw-r--r--contrib/libs/curl/ya.make3
-rw-r--r--contrib/libs/ngtcp2/.yandex_meta/__init__.py31
-rw-r--r--contrib/libs/ngtcp2/.yandex_meta/devtools.copyrights.report12
-rw-r--r--contrib/libs/ngtcp2/.yandex_meta/devtools.licenses.report14
-rw-r--r--contrib/libs/ngtcp2/.yandex_meta/override.nix26
-rwxr-xr-x[-rw-r--r--]contrib/libs/ngtcp2/INSTALL0
-rw-r--r--contrib/libs/ngtcp2/crypto/includes/ngtcp2/ngtcp2_crypto.h (renamed from contrib/libs/ngtcp2/lib/includes/ngtcp2/ngtcp2_crypto.h)0
-rw-r--r--contrib/libs/ngtcp2/crypto/includes/ngtcp2/ngtcp2_crypto_quictls.h (renamed from contrib/libs/ngtcp2/lib/includes/ngtcp2/ngtcp2_crypto_quictls.h)0
-rw-r--r--contrib/libs/ngtcp2/crypto/quictls/quictls.c (renamed from contrib/libs/ngtcp2/lib/ngtcp2_crypto_quictls.c)4
-rw-r--r--contrib/libs/ngtcp2/crypto/shared.c (renamed from contrib/libs/ngtcp2/lib/ngtcp2_crypto_shared.c)2
-rw-r--r--contrib/libs/ngtcp2/crypto/shared.h (renamed from contrib/libs/ngtcp2/lib/ngtcp2_crypto_shared.h)0
-rw-r--r--contrib/libs/ngtcp2/lib/includes/ngtcp2/ngtcp2_macro.h81
-rw-r--r--contrib/libs/ngtcp2/lib/includes/ngtcp2/ngtcp2_net.h141
-rw-r--r--contrib/libs/ngtcp2/ya.make9
17 files changed, 46 insertions, 284 deletions
diff --git a/contrib/libs/curl/.yandex_meta/__init__.py b/contrib/libs/curl/.yandex_meta/__init__.py
index 219d30179f..d00730e77b 100644
--- a/contrib/libs/curl/.yandex_meta/__init__.py
+++ b/contrib/libs/curl/.yandex_meta/__init__.py
@@ -83,9 +83,6 @@ def post_install(self):
# add ifaddrs implementation if needed
m.PEERDIR.add("contrib/libs/libc_compat")
- m.PEERDIR.add("contrib/libs/openssl")
- m.PEERDIR.add("contrib/libs/ngtcp2")
- m.PEERDIR.add("contrib/libs/nghttp3")
# make c-ares dependency conditional,
# but leave ADDINCL in place to make CONFIGURE work
diff --git a/contrib/libs/curl/.yandex_meta/override.nix b/contrib/libs/curl/.yandex_meta/override.nix
index 3fdf2c31e5..cd21254538 100644
--- a/contrib/libs/curl/.yandex_meta/override.nix
+++ b/contrib/libs/curl/.yandex_meta/override.nix
@@ -29,6 +29,7 @@ in rec {
];
configureFlags = [
+ "--build=x86_64-pc-linux-gnu"
"--disable-manual"
"--disable-ldap"
"--disable-ldaps"
@@ -41,6 +42,7 @@ in rec {
"--with-ngtcp2"
"--without-gnutls"
"--without-libidn2"
+ "--without-libpsl"
"--without-librtmp"
"--without-wolfssl"
];
diff --git a/contrib/libs/curl/lib/curl_config-linux.h b/contrib/libs/curl/lib/curl_config-linux.h
index e10307c771..548dd9135d 100644
--- a/contrib/libs/curl/lib/curl_config-linux.h
+++ b/contrib/libs/curl/lib/curl_config-linux.h
@@ -161,7 +161,7 @@
#define HAVE_ALARM 1
/* Define to 1 if you have the `arc4random' function. */
-/* #undef HAVE_ARC4RANDOM */
+#define HAVE_ARC4RANDOM 1
/* Define to 1 if you have the <arpa/inet.h> header file. */
#define HAVE_ARPA_INET_H 1
diff --git a/contrib/libs/curl/ya.make b/contrib/libs/curl/ya.make
index 1b7ede7dc1..fa68be3520 100644
--- a/contrib/libs/curl/ya.make
+++ b/contrib/libs/curl/ya.make
@@ -1,4 +1,4 @@
-# Generated by devtools/yamaker from nixpkgs 22.11.
+# Generated by devtools/yamaker from nixpkgs 24.05.
LIBRARY()
@@ -31,6 +31,7 @@ ADDINCL(
GLOBAL contrib/libs/curl/include
contrib/libs/c-ares/include
contrib/libs/curl/lib
+ contrib/libs/ngtcp2/crypto/includes
contrib/libs/zstd/include
)
diff --git a/contrib/libs/ngtcp2/.yandex_meta/__init__.py b/contrib/libs/ngtcp2/.yandex_meta/__init__.py
index 7c849ca99b..d1ccf16fa0 100644
--- a/contrib/libs/ngtcp2/.yandex_meta/__init__.py
+++ b/contrib/libs/ngtcp2/.yandex_meta/__init__.py
@@ -1,31 +1,20 @@
-from devtools.yamaker import fileutil
from devtools.yamaker.project import CMakeNinjaNixProject
-def post_install(self):
- for fname in ["quictls/quictls.c", "shared.c", "shared.h"]:
- fileutil.copy([f"{self.srcdir}/crypto/{fname}"], f"{self.dstdir}/lib/")
- for fname in ["quictls.c", "shared.c", "shared.h"]:
- fileutil.rename(f"{self.dstdir}/lib/{fname}", f"ngtcp2_crypto_{fname}")
- for fname in [
- "crypto/includes/ngtcp2/ngtcp2_crypto.h",
- "crypto/includes/ngtcp2/ngtcp2_crypto_quictls.h",
- "lib/ngtcp2_macro.h",
- "lib/ngtcp2_net.h",
- ]:
- fileutil.copy([f"{self.srcdir}/{fname}"], f"{self.dstdir}/lib/includes/ngtcp2/")
- with self.yamakes["."] as m:
- m.PEERDIR.add("contrib/libs/openssl")
- m.SRCS.add("lib/ngtcp2_crypto_quictls.c")
- m.SRCS.add("lib/ngtcp2_crypto_shared.c")
-
-
ngtcp2 = CMakeNinjaNixProject(
license="MIT",
owners=["g:devtools-contrib", "g:yandex-io"],
nixattr="ngtcp2",
arcdir="contrib/libs/ngtcp2",
- disable_includes=["openssl/core_names.h"],
+ disable_includes=[
+ "openssl/core_names.h",
+ ],
platform_dispatchers=["config.h"],
- post_install=post_install,
+ install_targets=[
+ "ngtcp2",
+ "ngtcp2_crypto_quictls",
+ ],
+ put_with={
+ "ngtcp2": ["ngtcp2_crypto_quictls"],
+ },
)
diff --git a/contrib/libs/ngtcp2/.yandex_meta/devtools.copyrights.report b/contrib/libs/ngtcp2/.yandex_meta/devtools.copyrights.report
index 13037df63c..8555efbf89 100644
--- a/contrib/libs/ngtcp2/.yandex_meta/devtools.copyrights.report
+++ b/contrib/libs/ngtcp2/.yandex_meta/devtools.copyrights.report
@@ -91,7 +91,6 @@ BELONGS ya.make
Score : 100.00
Match type : COPYRIGHT
Files with this license:
- lib/includes/ngtcp2/ngtcp2_net.h [4:4]
lib/ngtcp2_balloc.c [4:4]
lib/ngtcp2_balloc.h [4:4]
lib/ngtcp2_net.h [4:4]
@@ -165,7 +164,6 @@ BELONGS ya.make
Match type : COPYRIGHT
Files with this license:
lib/includes/ngtcp2/ngtcp2.h [4:5]
- lib/includes/ngtcp2/ngtcp2_macro.h [4:4]
lib/ngtcp2_acktr.c [4:4]
lib/ngtcp2_acktr.h [4:4]
lib/ngtcp2_buf.c [4:4]
@@ -255,13 +253,13 @@ BELONGS ya.make
Score : 100.00
Match type : COPYRIGHT
Files with this license:
- lib/includes/ngtcp2/ngtcp2_crypto.h [4:4]
- lib/includes/ngtcp2/ngtcp2_crypto_quictls.h [4:4]
+ crypto/includes/ngtcp2/ngtcp2_crypto.h [4:4]
+ crypto/includes/ngtcp2/ngtcp2_crypto_quictls.h [4:4]
+ crypto/quictls/quictls.c [4:4]
+ crypto/shared.c [4:4]
+ crypto/shared.h [4:4]
lib/ngtcp2_addr.c [4:4]
lib/ngtcp2_addr.h [4:4]
- lib/ngtcp2_crypto_quictls.c [4:4]
- lib/ngtcp2_crypto_shared.c [4:4]
- lib/ngtcp2_crypto_shared.h [4:4]
lib/ngtcp2_path.c [4:4]
lib/ngtcp2_path.h [4:4]
lib/ngtcp2_pv.c [4:4]
diff --git a/contrib/libs/ngtcp2/.yandex_meta/devtools.licenses.report b/contrib/libs/ngtcp2/.yandex_meta/devtools.licenses.report
index 12434f6ac9..62c23b3fc1 100644
--- a/contrib/libs/ngtcp2/.yandex_meta/devtools.licenses.report
+++ b/contrib/libs/ngtcp2/.yandex_meta/devtools.licenses.report
@@ -87,7 +87,7 @@ BELONGS ya.make
KEEP MIT a3a8f7feced3937b87cd090ba748e24b
BELONGS ya.make
-FILE_INCLUDE AUTHORS found in files: lib/includes/ngtcp2/ngtcp2.h at line 21, lib/includes/ngtcp2/ngtcp2_crypto.h at line 20, lib/includes/ngtcp2/ngtcp2_crypto_quictls.h at line 20, lib/includes/ngtcp2/ngtcp2_macro.h at line 20, lib/includes/ngtcp2/ngtcp2_net.h at line 20, lib/includes/ngtcp2/version.h at line 20, lib/ngtcp2_acktr.c at line 20, lib/ngtcp2_acktr.h at line 20, lib/ngtcp2_addr.c at line 20, lib/ngtcp2_addr.h at line 20, lib/ngtcp2_balloc.c at line 20, lib/ngtcp2_balloc.h at line 20, lib/ngtcp2_bbr.c at line 20, lib/ngtcp2_bbr.h at line 20, lib/ngtcp2_buf.c at line 20, lib/ngtcp2_buf.h at line 20, lib/ngtcp2_cc.c at line 20, lib/ngtcp2_cc.h at line 20, lib/ngtcp2_cid.c at line 20, lib/ngtcp2_cid.h at line 20, lib/ngtcp2_conn.c at line 20, lib/ngtcp2_conn.h at line 20, lib/ngtcp2_conn_stat.h at line 20, lib/ngtcp2_conv.c at line 20, lib/ngtcp2_conv.h at line 20, lib/ngtcp2_crypto.c at line 20, lib/ngtcp2_crypto.h at line 20, lib/ngtcp2_crypto_quictls.c at line 20, lib/ngtcp2_crypto_shared.c at line 20, lib/ngtcp2_crypto_shared.h at line 20, lib/ngtcp2_err.c at line 20, lib/ngtcp2_err.h at line 20, lib/ngtcp2_frame_chain.c at line 20, lib/ngtcp2_frame_chain.h at line 20, lib/ngtcp2_gaptr.c at line 20, lib/ngtcp2_gaptr.h at line 20, lib/ngtcp2_idtr.c at line 20, lib/ngtcp2_idtr.h at line 20, lib/ngtcp2_ksl.c at line 20, lib/ngtcp2_ksl.h at line 20, lib/ngtcp2_log.c at line 20, lib/ngtcp2_log.h at line 20, lib/ngtcp2_macro.h at line 20, lib/ngtcp2_map.c at line 21, lib/ngtcp2_map.h at line 21, lib/ngtcp2_mem.c at line 21, lib/ngtcp2_mem.h at line 21, lib/ngtcp2_net.h at line 20, lib/ngtcp2_objalloc.c at line 20, lib/ngtcp2_objalloc.h at line 20, lib/ngtcp2_opl.c at line 20, lib/ngtcp2_opl.h at line 20, lib/ngtcp2_path.c at line 20, lib/ngtcp2_path.h at line 20, lib/ngtcp2_pkt.c at line 20, lib/ngtcp2_pkt.h at line 20, lib/ngtcp2_pktns_id.h at line 20, lib/ngtcp2_pmtud.c at line 20, lib/ngtcp2_pmtud.h at line 20, lib/ngtcp2_ppe.c at line 20, lib/ngtcp2_ppe.h at line 20, lib/ngtcp2_pq.c at line 21, lib/ngtcp2_pq.h at line 21, lib/ngtcp2_pv.c at line 20, lib/ngtcp2_pv.h at line 20, lib/ngtcp2_qlog.c at line 20, lib/ngtcp2_qlog.h at line 20, lib/ngtcp2_range.c at line 20, lib/ngtcp2_range.h at line 20, lib/ngtcp2_rcvry.h at line 20, lib/ngtcp2_ringbuf.c at line 20, lib/ngtcp2_ringbuf.h at line 20, lib/ngtcp2_rob.c at line 20, lib/ngtcp2_rob.h at line 20, lib/ngtcp2_rst.c at line 20, lib/ngtcp2_rst.h at line 20, lib/ngtcp2_rtb.c at line 20, lib/ngtcp2_rtb.h at line 20, lib/ngtcp2_settings.c at line 20, lib/ngtcp2_settings.h at line 20, lib/ngtcp2_str.c at line 20, lib/ngtcp2_str.h at line 20, lib/ngtcp2_strm.c at line 20, lib/ngtcp2_strm.h at line 20, lib/ngtcp2_transport_params.c at line 20, lib/ngtcp2_transport_params.h at line 20, lib/ngtcp2_tstamp.h at line 20, lib/ngtcp2_unreachable.c at line 20, lib/ngtcp2_unreachable.h at line 20, lib/ngtcp2_vec.c at line 20, lib/ngtcp2_vec.h at line 20, lib/ngtcp2_version.c at line 20, lib/ngtcp2_window_filter.c at line 20, lib/ngtcp2_window_filter.h at line 20
+FILE_INCLUDE AUTHORS found in files: crypto/includes/ngtcp2/ngtcp2_crypto.h at line 20, crypto/includes/ngtcp2/ngtcp2_crypto_quictls.h at line 20, crypto/quictls/quictls.c at line 20, crypto/shared.c at line 20, crypto/shared.h at line 20, lib/includes/ngtcp2/ngtcp2.h at line 21, lib/includes/ngtcp2/version.h at line 20, lib/ngtcp2_acktr.c at line 20, lib/ngtcp2_acktr.h at line 20, lib/ngtcp2_addr.c at line 20, lib/ngtcp2_addr.h at line 20, lib/ngtcp2_balloc.c at line 20, lib/ngtcp2_balloc.h at line 20, lib/ngtcp2_bbr.c at line 20, lib/ngtcp2_bbr.h at line 20, lib/ngtcp2_buf.c at line 20, lib/ngtcp2_buf.h at line 20, lib/ngtcp2_cc.c at line 20, lib/ngtcp2_cc.h at line 20, lib/ngtcp2_cid.c at line 20, lib/ngtcp2_cid.h at line 20, lib/ngtcp2_conn.c at line 20, lib/ngtcp2_conn.h at line 20, lib/ngtcp2_conn_stat.h at line 20, lib/ngtcp2_conv.c at line 20, lib/ngtcp2_conv.h at line 20, lib/ngtcp2_crypto.c at line 20, lib/ngtcp2_crypto.h at line 20, lib/ngtcp2_err.c at line 20, lib/ngtcp2_err.h at line 20, lib/ngtcp2_frame_chain.c at line 20, lib/ngtcp2_frame_chain.h at line 20, lib/ngtcp2_gaptr.c at line 20, lib/ngtcp2_gaptr.h at line 20, lib/ngtcp2_idtr.c at line 20, lib/ngtcp2_idtr.h at line 20, lib/ngtcp2_ksl.c at line 20, lib/ngtcp2_ksl.h at line 20, lib/ngtcp2_log.c at line 20, lib/ngtcp2_log.h at line 20, lib/ngtcp2_macro.h at line 20, lib/ngtcp2_map.c at line 21, lib/ngtcp2_map.h at line 21, lib/ngtcp2_mem.c at line 21, lib/ngtcp2_mem.h at line 21, lib/ngtcp2_net.h at line 20, lib/ngtcp2_objalloc.c at line 20, lib/ngtcp2_objalloc.h at line 20, lib/ngtcp2_opl.c at line 20, lib/ngtcp2_opl.h at line 20, lib/ngtcp2_path.c at line 20, lib/ngtcp2_path.h at line 20, lib/ngtcp2_pkt.c at line 20, lib/ngtcp2_pkt.h at line 20, lib/ngtcp2_pktns_id.h at line 20, lib/ngtcp2_pmtud.c at line 20, lib/ngtcp2_pmtud.h at line 20, lib/ngtcp2_ppe.c at line 20, lib/ngtcp2_ppe.h at line 20, lib/ngtcp2_pq.c at line 21, lib/ngtcp2_pq.h at line 21, lib/ngtcp2_pv.c at line 20, lib/ngtcp2_pv.h at line 20, lib/ngtcp2_qlog.c at line 20, lib/ngtcp2_qlog.h at line 20, lib/ngtcp2_range.c at line 20, lib/ngtcp2_range.h at line 20, lib/ngtcp2_rcvry.h at line 20, lib/ngtcp2_ringbuf.c at line 20, lib/ngtcp2_ringbuf.h at line 20, lib/ngtcp2_rob.c at line 20, lib/ngtcp2_rob.h at line 20, lib/ngtcp2_rst.c at line 20, lib/ngtcp2_rst.h at line 20, lib/ngtcp2_rtb.c at line 20, lib/ngtcp2_rtb.h at line 20, lib/ngtcp2_settings.c at line 20, lib/ngtcp2_settings.h at line 20, lib/ngtcp2_str.c at line 20, lib/ngtcp2_str.h at line 20, lib/ngtcp2_strm.c at line 20, lib/ngtcp2_strm.h at line 20, lib/ngtcp2_transport_params.c at line 20, lib/ngtcp2_transport_params.h at line 20, lib/ngtcp2_tstamp.h at line 20, lib/ngtcp2_unreachable.c at line 20, lib/ngtcp2_unreachable.h at line 20, lib/ngtcp2_vec.c at line 20, lib/ngtcp2_vec.h at line 20, lib/ngtcp2_version.c at line 20, lib/ngtcp2_window_filter.c at line 20, lib/ngtcp2_window_filter.h at line 20
Note: matched license text is too long. Read it in the source files.
Scancode info:
Original SPDX id: MIT
@@ -95,11 +95,12 @@ FILE_INCLUDE AUTHORS found in files: lib/includes/ngtcp2/ngtcp2.h at line 21, li
Match type : TEXT
Links : http://opensource.org/licenses/mit-license.php, https://spdx.org/licenses/MIT
Files with this license:
+ crypto/includes/ngtcp2/ngtcp2_crypto.h [6:23]
+ crypto/includes/ngtcp2/ngtcp2_crypto_quictls.h [6:23]
+ crypto/quictls/quictls.c [6:23]
+ crypto/shared.c [6:23]
+ crypto/shared.h [6:23]
lib/includes/ngtcp2/ngtcp2.h [7:24]
- lib/includes/ngtcp2/ngtcp2_crypto.h [6:23]
- lib/includes/ngtcp2/ngtcp2_crypto_quictls.h [6:23]
- lib/includes/ngtcp2/ngtcp2_macro.h [6:23]
- lib/includes/ngtcp2/ngtcp2_net.h [6:23]
lib/includes/ngtcp2/version.h [6:23]
lib/ngtcp2_acktr.c [6:23]
lib/ngtcp2_acktr.h [6:23]
@@ -122,9 +123,6 @@ FILE_INCLUDE AUTHORS found in files: lib/includes/ngtcp2/ngtcp2.h at line 21, li
lib/ngtcp2_conv.h [6:23]
lib/ngtcp2_crypto.c [6:23]
lib/ngtcp2_crypto.h [6:23]
- lib/ngtcp2_crypto_quictls.c [6:23]
- lib/ngtcp2_crypto_shared.c [6:23]
- lib/ngtcp2_crypto_shared.h [6:23]
lib/ngtcp2_err.c [6:23]
lib/ngtcp2_err.h [6:23]
lib/ngtcp2_frame_chain.c [6:23]
diff --git a/contrib/libs/ngtcp2/.yandex_meta/override.nix b/contrib/libs/ngtcp2/.yandex_meta/override.nix
index 3f250b774b..cc56fbc565 100644
--- a/contrib/libs/ngtcp2/.yandex_meta/override.nix
+++ b/contrib/libs/ngtcp2/.yandex_meta/override.nix
@@ -1,20 +1,16 @@
pkgs: attrs: with pkgs; rec {
- name = "ngtcp2";
- version = "1.8.1";
+ version = "1.8.1";
- nativeBuildInputs = [
- autoreconfHook cmake pkg-config autoconf libtool automake openssl
- ];
+ src = fetchurl {
+ url = "https://github.com/ngtcp2/ngtcp2/releases/download/v${version}/ngtcp2-${version}.tar.xz";
+ hash = "sha256-rIRKees/FT5Mzc/szt9CxXqzUruKuS7IrF00F6ec+xE=";
+ };
- # without this nix tries to fetch and build quictls
- buildInputs = [ ];
+ patches = [];
- src = fetchurl {
- url = "https://github.com/ngtcp2/ngtcp2/releases/download/v${version}/ngtcp2-${version}.tar.xz";
- hash = "sha256-rIRKees/FT5Mzc/szt9CxXqzUruKuS7IrF00F6ec+xE=";
- };
-
- patches = [
- ./001_crypto_includes.patch
- ];
+ buildInputs = [
+ libev
+ nghttp3
+ quictls
+ ];
}
diff --git a/contrib/libs/ngtcp2/INSTALL b/contrib/libs/ngtcp2/INSTALL
index e82fd21de2..e82fd21de2 100644..100755
--- a/contrib/libs/ngtcp2/INSTALL
+++ b/contrib/libs/ngtcp2/INSTALL
diff --git a/contrib/libs/ngtcp2/lib/includes/ngtcp2/ngtcp2_crypto.h b/contrib/libs/ngtcp2/crypto/includes/ngtcp2/ngtcp2_crypto.h
index 5b8626191d..5b8626191d 100644
--- a/contrib/libs/ngtcp2/lib/includes/ngtcp2/ngtcp2_crypto.h
+++ b/contrib/libs/ngtcp2/crypto/includes/ngtcp2/ngtcp2_crypto.h
diff --git a/contrib/libs/ngtcp2/lib/includes/ngtcp2/ngtcp2_crypto_quictls.h b/contrib/libs/ngtcp2/crypto/includes/ngtcp2/ngtcp2_crypto_quictls.h
index 22e3eda0c4..22e3eda0c4 100644
--- a/contrib/libs/ngtcp2/lib/includes/ngtcp2/ngtcp2_crypto_quictls.h
+++ b/contrib/libs/ngtcp2/crypto/includes/ngtcp2/ngtcp2_crypto_quictls.h
diff --git a/contrib/libs/ngtcp2/lib/ngtcp2_crypto_quictls.c b/contrib/libs/ngtcp2/crypto/quictls/quictls.c
index c5bd70aefb..f79dfa405d 100644
--- a/contrib/libs/ngtcp2/lib/ngtcp2_crypto_quictls.c
+++ b/contrib/libs/ngtcp2/crypto/quictls/quictls.c
@@ -37,10 +37,10 @@
#include <openssl/rand.h>
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
-# error #include <openssl/core_names.h>
+# error #include <openssl/core_names.h>
#endif /* OPENSSL_VERSION_NUMBER >= 0x30000000L */
-#include "ngtcp2_crypto_shared.h"
+#include "shared.h"
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
static int crypto_initialized;
diff --git a/contrib/libs/ngtcp2/lib/ngtcp2_crypto_shared.c b/contrib/libs/ngtcp2/crypto/shared.c
index 5befb9041a..6088b80c37 100644
--- a/contrib/libs/ngtcp2/lib/ngtcp2_crypto_shared.c
+++ b/contrib/libs/ngtcp2/crypto/shared.c
@@ -22,7 +22,7 @@
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "ngtcp2_crypto_shared.h"
+#include "shared.h"
#ifdef WIN32
# include <winsock2.h>
diff --git a/contrib/libs/ngtcp2/lib/ngtcp2_crypto_shared.h b/contrib/libs/ngtcp2/crypto/shared.h
index 34158d3d02..34158d3d02 100644
--- a/contrib/libs/ngtcp2/lib/ngtcp2_crypto_shared.h
+++ b/contrib/libs/ngtcp2/crypto/shared.h
diff --git a/contrib/libs/ngtcp2/lib/includes/ngtcp2/ngtcp2_macro.h b/contrib/libs/ngtcp2/lib/includes/ngtcp2/ngtcp2_macro.h
deleted file mode 100644
index 649ed8434a..0000000000
--- a/contrib/libs/ngtcp2/lib/includes/ngtcp2/ngtcp2_macro.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * ngtcp2
- *
- * Copyright (c) 2017 ngtcp2 contributors
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-#ifndef NGTCP2_MACRO_H
-#define NGTCP2_MACRO_H
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif /* defined(HAVE_CONFIG_H) */
-
-#include <stddef.h>
-
-#include <ngtcp2/ngtcp2.h>
-
-#define ngtcp2_struct_of(ptr, type, member) \
- ((type *)(void *)((char *)(ptr) - offsetof(type, member)))
-
-/* ngtcp2_list_insert inserts |T| before |*PD|. The contract is that
- this is singly linked list, and the next element is pointed by next
- field of the previous element. |PD| must be a pointer to the
- pointer to the next field of the previous element of |*PD|: if C is
- the previous element of |PD|, PD = &C->next. */
-#define ngtcp2_list_insert(T, PD) \
- do { \
- (T)->next = *(PD); \
- *(PD) = (T); \
- } while (0)
-
-/*
- * ngtcp2_arraylen returns the number of elements in array |A|.
- */
-#define ngtcp2_arraylen(A) (sizeof(A) / sizeof(A[0]))
-
-#define ngtcp2_max_def(SUFFIX, T) \
- static inline T ngtcp2_max_##SUFFIX(T a, T b) { return a < b ? b : a; }
-
-ngtcp2_max_def(int8, int8_t);
-ngtcp2_max_def(int16, int16_t);
-ngtcp2_max_def(int32, int32_t);
-ngtcp2_max_def(int64, int64_t);
-ngtcp2_max_def(uint8, uint8_t);
-ngtcp2_max_def(uint16, uint16_t);
-ngtcp2_max_def(uint32, uint32_t);
-ngtcp2_max_def(uint64, uint64_t);
-ngtcp2_max_def(size, size_t);
-
-#define ngtcp2_min_def(SUFFIX, T) \
- static inline T ngtcp2_min_##SUFFIX(T a, T b) { return a < b ? a : b; }
-
-ngtcp2_min_def(int8, int8_t);
-ngtcp2_min_def(int16, int16_t);
-ngtcp2_min_def(int32, int32_t);
-ngtcp2_min_def(int64, int64_t);
-ngtcp2_min_def(uint8, uint8_t);
-ngtcp2_min_def(uint16, uint16_t);
-ngtcp2_min_def(uint32, uint32_t);
-ngtcp2_min_def(uint64, uint64_t);
-ngtcp2_min_def(size, size_t);
-
-#endif /* !defined(NGTCP2_MACRO_H) */
diff --git a/contrib/libs/ngtcp2/lib/includes/ngtcp2/ngtcp2_net.h b/contrib/libs/ngtcp2/lib/includes/ngtcp2/ngtcp2_net.h
deleted file mode 100644
index 103a2fb2d8..0000000000
--- a/contrib/libs/ngtcp2/lib/includes/ngtcp2/ngtcp2_net.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * ngtcp2
- *
- * Copyright (c) 2022 ngtcp2 contributors
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-#ifndef NGTCP2_NET_H
-#define NGTCP2_NET_H
-
-/* This header file is explicitly allowed to be shared with
- ngtcp2_crypto library. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif /* defined(HAVE_CONFIG_H) */
-
-#ifdef HAVE_ARPA_INET_H
-# include <arpa/inet.h>
-#endif /* defined(HAVE_ARPA_INET_H) */
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif /* defined(HAVE_NETINET_IN_H) */
-
-#ifdef HAVE_BYTESWAP_H
-# include <byteswap.h>
-#endif /* defined(HAVE_BYTESWAP_H) */
-
-#ifdef HAVE_ENDIAN_H
-# include <endian.h>
-#endif /* defined(HAVE_ENDIAN_H) */
-
-#ifdef HAVE_SYS_ENDIAN_H
-# include <sys/endian.h>
-#endif /* defined(HAVE_SYS_ENDIAN_H) */
-
-#ifdef __APPLE__
-# include <libkern/OSByteOrder.h>
-#endif /* defined(__APPLE__) */
-
-#include <ngtcp2/ngtcp2.h>
-
-#if HAVE_DECL_BE64TOH
-# define ngtcp2_ntohl64(N) be64toh(N)
-# define ngtcp2_htonl64(N) htobe64(N)
-#else /* !HAVE_DECL_BE64TOH */
-# ifdef WORDS_BIGENDIAN
-# define ngtcp2_ntohl64(N) (N)
-# define ngtcp2_htonl64(N) (N)
-# else /* !defined(WORDS_BIGENDIAN) */
-# if HAVE_DECL_BSWAP_64
-# define ngtcp2_bswap64 bswap_64
-# elif defined(WIN32)
-# define ngtcp2_bswap64 _byteswap_uint64
-# elif defined(__APPLE__)
-# define ngtcp2_bswap64 OSSwapInt64
-# else /* !(HAVE_DECL_BSWAP_64 || defined(WIN32) || defined(__APPLE__)) */
-# define ngtcp2_bswap64(N) \
- ((uint64_t)(ngtcp2_ntohl((uint32_t)(N))) << 32 | \
- ngtcp2_ntohl((uint32_t)((N) >> 32)))
-# endif /* !(HAVE_DECL_BSWAP_64 || defined(WIN32) || defined(__APPLE__)) */
-# define ngtcp2_ntohl64(N) ngtcp2_bswap64(N)
-# define ngtcp2_htonl64(N) ngtcp2_bswap64(N)
-# endif /* !defined(WORDS_BIGENDIAN) */
-#endif /* !HAVE_DECL_BE64TOH */
-
-#ifdef WIN32
-/* Windows requires ws2_32 library for ntonl family functions. We
- define inline functions for those function so that we don't have
- dependency on that lib. */
-
-# ifdef _MSC_VER
-# define STIN static __inline
-# else /* !defined(_MSC_VER) */
-# define STIN static inline
-# endif /* !defined(_MSC_VER) */
-
-STIN uint32_t ngtcp2_htonl(uint32_t hostlong) {
- uint32_t res;
- unsigned char *p = (unsigned char *)&res;
- *p++ = (unsigned char)(hostlong >> 24);
- *p++ = (hostlong >> 16) & 0xffu;
- *p++ = (hostlong >> 8) & 0xffu;
- *p = hostlong & 0xffu;
- return res;
-}
-
-STIN uint16_t ngtcp2_htons(uint16_t hostshort) {
- uint16_t res;
- unsigned char *p = (unsigned char *)&res;
- *p++ = (unsigned char)(hostshort >> 8);
- *p = hostshort & 0xffu;
- return res;
-}
-
-STIN uint32_t ngtcp2_ntohl(uint32_t netlong) {
- uint32_t res;
- unsigned char *p = (unsigned char *)&netlong;
- res = (uint32_t)(*p++ << 24);
- res += (uint32_t)(*p++ << 16);
- res += (uint32_t)(*p++ << 8);
- res += *p;
- return res;
-}
-
-STIN uint16_t ngtcp2_ntohs(uint16_t netshort) {
- uint16_t res;
- unsigned char *p = (unsigned char *)&netshort;
- res = (uint16_t)(*p++ << 8);
- res += *p;
- return res;
-}
-
-#else /* !defined(WIN32) */
-
-# define ngtcp2_htonl htonl
-# define ngtcp2_htons htons
-# define ngtcp2_ntohl ntohl
-# define ngtcp2_ntohs ntohs
-
-#endif /* !defined(WIN32) */
-
-#endif /* !defined(NGTCP2_NET_H) */
diff --git a/contrib/libs/ngtcp2/ya.make b/contrib/libs/ngtcp2/ya.make
index c1c7b88d78..19c9cf0579 100644
--- a/contrib/libs/ngtcp2/ya.make
+++ b/contrib/libs/ngtcp2/ya.make
@@ -1,4 +1,4 @@
-# Generated by devtools/yamaker from nixpkgs 22.11.
+# Generated by devtools/yamaker from nixpkgs 24.05.
LIBRARY()
@@ -21,6 +21,9 @@ PEERDIR(
ADDINCL(
GLOBAL contrib/libs/ngtcp2/lib/includes
contrib/libs/ngtcp2
+ contrib/libs/ngtcp2/crypto
+ contrib/libs/ngtcp2/crypto/includes
+ contrib/libs/ngtcp2/lib
)
NO_COMPILER_WARNINGS()
@@ -33,6 +36,8 @@ CFLAGS(
)
SRCS(
+ crypto/quictls/quictls.c
+ crypto/shared.c
lib/ngtcp2_acktr.c
lib/ngtcp2_addr.c
lib/ngtcp2_balloc.c
@@ -43,8 +48,6 @@ SRCS(
lib/ngtcp2_conn.c
lib/ngtcp2_conv.c
lib/ngtcp2_crypto.c
- lib/ngtcp2_crypto_quictls.c
- lib/ngtcp2_crypto_shared.c
lib/ngtcp2_err.c
lib/ngtcp2_frame_chain.c
lib/ngtcp2_gaptr.c