Skip to content

Commit ad8a91b

Browse files
committed
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
1 parent 3890544 commit ad8a91b

File tree

17 files changed

+46
-284
lines changed

17 files changed

+46
-284
lines changed

contrib/libs/curl/.yandex_meta/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,6 @@ def post_install(self):
8383

8484
# add ifaddrs implementation if needed
8585
m.PEERDIR.add("contrib/libs/libc_compat")
86-
m.PEERDIR.add("contrib/libs/openssl")
87-
m.PEERDIR.add("contrib/libs/ngtcp2")
88-
m.PEERDIR.add("contrib/libs/nghttp3")
8986

9087
# make c-ares dependency conditional,
9188
# but leave ADDINCL in place to make CONFIGURE work

contrib/libs/curl/.yandex_meta/override.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ in rec {
2929
];
3030

3131
configureFlags = [
32+
"--build=x86_64-pc-linux-gnu"
3233
"--disable-manual"
3334
"--disable-ldap"
3435
"--disable-ldaps"
@@ -41,6 +42,7 @@ in rec {
4142
"--with-ngtcp2"
4243
"--without-gnutls"
4344
"--without-libidn2"
45+
"--without-libpsl"
4446
"--without-librtmp"
4547
"--without-wolfssl"
4648
];

contrib/libs/curl/lib/curl_config-linux.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161
#define HAVE_ALARM 1
162162

163163
/* Define to 1 if you have the `arc4random' function. */
164-
/* #undef HAVE_ARC4RANDOM */
164+
#define HAVE_ARC4RANDOM 1
165165

166166
/* Define to 1 if you have the <arpa/inet.h> header file. */
167167
#define HAVE_ARPA_INET_H 1

contrib/libs/curl/ya.make

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Generated by devtools/yamaker from nixpkgs 22.11.
1+
# Generated by devtools/yamaker from nixpkgs 24.05.
22

33
LIBRARY()
44

@@ -31,6 +31,7 @@ ADDINCL(
3131
GLOBAL contrib/libs/curl/include
3232
contrib/libs/c-ares/include
3333
contrib/libs/curl/lib
34+
contrib/libs/ngtcp2/crypto/includes
3435
contrib/libs/zstd/include
3536
)
3637

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,20 @@
1-
from devtools.yamaker import fileutil
21
from devtools.yamaker.project import CMakeNinjaNixProject
32

43

5-
def post_install(self):
6-
for fname in ["quictls/quictls.c", "shared.c", "shared.h"]:
7-
fileutil.copy([f"{self.srcdir}/crypto/{fname}"], f"{self.dstdir}/lib/")
8-
for fname in ["quictls.c", "shared.c", "shared.h"]:
9-
fileutil.rename(f"{self.dstdir}/lib/{fname}", f"ngtcp2_crypto_{fname}")
10-
for fname in [
11-
"crypto/includes/ngtcp2/ngtcp2_crypto.h",
12-
"crypto/includes/ngtcp2/ngtcp2_crypto_quictls.h",
13-
"lib/ngtcp2_macro.h",
14-
"lib/ngtcp2_net.h",
15-
]:
16-
fileutil.copy([f"{self.srcdir}/{fname}"], f"{self.dstdir}/lib/includes/ngtcp2/")
17-
with self.yamakes["."] as m:
18-
m.PEERDIR.add("contrib/libs/openssl")
19-
m.SRCS.add("lib/ngtcp2_crypto_quictls.c")
20-
m.SRCS.add("lib/ngtcp2_crypto_shared.c")
21-
22-
234
ngtcp2 = CMakeNinjaNixProject(
245
license="MIT",
256
owners=["g:devtools-contrib", "g:yandex-io"],
267
nixattr="ngtcp2",
278
arcdir="contrib/libs/ngtcp2",
28-
disable_includes=["openssl/core_names.h"],
9+
disable_includes=[
10+
"openssl/core_names.h",
11+
],
2912
platform_dispatchers=["config.h"],
30-
post_install=post_install,
13+
install_targets=[
14+
"ngtcp2",
15+
"ngtcp2_crypto_quictls",
16+
],
17+
put_with={
18+
"ngtcp2": ["ngtcp2_crypto_quictls"],
19+
},
3120
)

contrib/libs/ngtcp2/.yandex_meta/devtools.copyrights.report

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ BELONGS ya.make
9191
Score : 100.00
9292
Match type : COPYRIGHT
9393
Files with this license:
94-
lib/includes/ngtcp2/ngtcp2_net.h [4:4]
9594
lib/ngtcp2_balloc.c [4:4]
9695
lib/ngtcp2_balloc.h [4:4]
9796
lib/ngtcp2_net.h [4:4]
@@ -165,7 +164,6 @@ BELONGS ya.make
165164
Match type : COPYRIGHT
166165
Files with this license:
167166
lib/includes/ngtcp2/ngtcp2.h [4:5]
168-
lib/includes/ngtcp2/ngtcp2_macro.h [4:4]
169167
lib/ngtcp2_acktr.c [4:4]
170168
lib/ngtcp2_acktr.h [4:4]
171169
lib/ngtcp2_buf.c [4:4]
@@ -255,13 +253,13 @@ BELONGS ya.make
255253
Score : 100.00
256254
Match type : COPYRIGHT
257255
Files with this license:
258-
lib/includes/ngtcp2/ngtcp2_crypto.h [4:4]
259-
lib/includes/ngtcp2/ngtcp2_crypto_quictls.h [4:4]
256+
crypto/includes/ngtcp2/ngtcp2_crypto.h [4:4]
257+
crypto/includes/ngtcp2/ngtcp2_crypto_quictls.h [4:4]
258+
crypto/quictls/quictls.c [4:4]
259+
crypto/shared.c [4:4]
260+
crypto/shared.h [4:4]
260261
lib/ngtcp2_addr.c [4:4]
261262
lib/ngtcp2_addr.h [4:4]
262-
lib/ngtcp2_crypto_quictls.c [4:4]
263-
lib/ngtcp2_crypto_shared.c [4:4]
264-
lib/ngtcp2_crypto_shared.h [4:4]
265263
lib/ngtcp2_path.c [4:4]
266264
lib/ngtcp2_path.h [4:4]
267265
lib/ngtcp2_pv.c [4:4]

contrib/libs/ngtcp2/.yandex_meta/devtools.licenses.report

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,19 +87,20 @@ BELONGS ya.make
8787

8888
KEEP MIT a3a8f7feced3937b87cd090ba748e24b
8989
BELONGS ya.make
90-
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
90+
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
9191
Note: matched license text is too long. Read it in the source files.
9292
Scancode info:
9393
Original SPDX id: MIT
9494
Score : 100.00
9595
Match type : TEXT
9696
Links : http://opensource.org/licenses/mit-license.php, https://spdx.org/licenses/MIT
9797
Files with this license:
98+
crypto/includes/ngtcp2/ngtcp2_crypto.h [6:23]
99+
crypto/includes/ngtcp2/ngtcp2_crypto_quictls.h [6:23]
100+
crypto/quictls/quictls.c [6:23]
101+
crypto/shared.c [6:23]
102+
crypto/shared.h [6:23]
98103
lib/includes/ngtcp2/ngtcp2.h [7:24]
99-
lib/includes/ngtcp2/ngtcp2_crypto.h [6:23]
100-
lib/includes/ngtcp2/ngtcp2_crypto_quictls.h [6:23]
101-
lib/includes/ngtcp2/ngtcp2_macro.h [6:23]
102-
lib/includes/ngtcp2/ngtcp2_net.h [6:23]
103104
lib/includes/ngtcp2/version.h [6:23]
104105
lib/ngtcp2_acktr.c [6:23]
105106
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
122123
lib/ngtcp2_conv.h [6:23]
123124
lib/ngtcp2_crypto.c [6:23]
124125
lib/ngtcp2_crypto.h [6:23]
125-
lib/ngtcp2_crypto_quictls.c [6:23]
126-
lib/ngtcp2_crypto_shared.c [6:23]
127-
lib/ngtcp2_crypto_shared.h [6:23]
128126
lib/ngtcp2_err.c [6:23]
129127
lib/ngtcp2_err.h [6:23]
130128
lib/ngtcp2_frame_chain.c [6:23]
Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
pkgs: attrs: with pkgs; rec {
2-
name = "ngtcp2";
3-
version = "1.8.1";
2+
version = "1.8.1";
43

5-
nativeBuildInputs = [
6-
autoreconfHook cmake pkg-config autoconf libtool automake openssl
7-
];
4+
src = fetchurl {
5+
url = "https://github.com/ngtcp2/ngtcp2/releases/download/v${version}/ngtcp2-${version}.tar.xz";
6+
hash = "sha256-rIRKees/FT5Mzc/szt9CxXqzUruKuS7IrF00F6ec+xE=";
7+
};
88

9-
# without this nix tries to fetch and build quictls
10-
buildInputs = [ ];
9+
patches = [];
1110

12-
src = fetchurl {
13-
url = "https://github.com/ngtcp2/ngtcp2/releases/download/v${version}/ngtcp2-${version}.tar.xz";
14-
hash = "sha256-rIRKees/FT5Mzc/szt9CxXqzUruKuS7IrF00F6ec+xE=";
15-
};
16-
17-
patches = [
18-
./001_crypto_includes.patch
19-
];
11+
buildInputs = [
12+
libev
13+
nghttp3
14+
quictls
15+
];
2016
}

contrib/libs/ngtcp2/INSTALL

100644100755
File mode changed.

0 commit comments

Comments
 (0)