From 37fadd09de7099a92218a4eb11e5467f02f81816 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 2 Feb 2025 13:02:14 +0000 Subject: [PATCH 01/16] Switch to hyper 1.x We need to update our minimal tokio too, to avoid a compile failure somewhere in our dependency tree. --- Cargo.lock | 104 ++------- Cargo.lock.minimal | 412 +++++++++++++--------------------- Cargo.toml | 4 +- debian/control | 4 +- maint/update-minimal-versions | 3 - server/server.rs | 60 +++-- server/sweb.rs | 8 +- src/prelude.rs | 5 +- src/queue.rs | 14 +- 9 files changed, 234 insertions(+), 380 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1151c1b..7791fc6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -555,25 +555,6 @@ version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "h2" version = "0.4.7" @@ -585,7 +566,7 @@ dependencies = [ "fnv", "futures-core", "futures-sink", - "http 1.2.0", + "http", "indexmap", "slab", "tokio", @@ -622,9 +603,9 @@ dependencies = [ "futures", "heck", "hippotat-macros", - "http-body 1.0.1", + "http-body", "http-body-util", - "hyper 0.14.32", + "hyper", "hyper-util", "indenter", "ipnet", @@ -672,17 +653,6 @@ dependencies = [ "windows", ] -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - [[package]] name = "http" version = "1.2.0" @@ -694,17 +664,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - [[package]] name = "http-body" version = "1.0.1" @@ -712,7 +671,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.2.0", + "http", ] [[package]] @@ -723,8 +682,8 @@ checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", "futures-util", - "http 1.2.0", - "http-body 1.0.1", + "http", + "http-body", "pin-project-lite", ] @@ -746,30 +705,6 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" -[[package]] -name = "hyper" -version = "0.14.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - [[package]] name = "hyper" version = "1.6.0" @@ -779,10 +714,11 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.7", - "http 1.2.0", - "http-body 1.0.1", + "h2", + "http", + "http-body", "httparse", + "httpdate", "itoa", "pin-project-lite", "smallvec", @@ -797,8 +733,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" dependencies = [ "futures-util", - "http 1.2.0", - "hyper 1.6.0", + "http", + "hyper", "hyper-util", "rustls", "rustls-pki-types", @@ -815,7 +751,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.6.0", + "hyper", "hyper-util", "native-tls", "tokio", @@ -832,9 +768,9 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.2.0", - "http-body 1.0.1", - "hyper 1.6.0", + "http", + "http-body", + "hyper", "pin-project-lite", "socket2", "tokio", @@ -1352,11 +1288,11 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2 0.4.7", - "http 1.2.0", - "http-body 1.0.1", + "h2", + "http", + "http-body", "http-body-util", - "hyper 1.6.0", + "hyper", "hyper-rustls", "hyper-tls", "hyper-util", diff --git a/Cargo.lock.minimal b/Cargo.lock.minimal index fa6acbf..745a9a4 100644 --- a/Cargo.lock.minimal +++ b/Cargo.lock.minimal @@ -151,15 +151,9 @@ checksum = "12ae9db68ad7fac5fe51304d20f016c911539251075a214f8e663babefa35187" [[package]] name = "bytes" -version = "0.5.3" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10004c15deb332055f7a4a208190aed362cf9a7c2f6ab70a305fba50e1105f38" - -[[package]] -name = "bytes" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1f8e949d755f9d79112b5bb46938e0ef9d3804a0b16dfab13aafcaa5f0fa72" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "c2-chacha" @@ -592,51 +586,23 @@ checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" [[package]] name = "h2" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f8a914c2987b688368b5138aa05321db91f4090cf26118185672ad588bce21" -dependencies = [ - "bytes 1.0.0", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.0", - "indexmap 1.5.2", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "h2" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d308f63daf4181410c242d34c11f928dcb3aa105852019e043c9d1f4e4368a" +checksum = "31d030e59af851932b72ceebadf4a2b5986dba4c3b99dd2493f8273a0f151943" dependencies = [ - "bytes 1.0.0", + "bytes", "fnv", "futures-core", "futures-sink", "futures-util", - "http 1.0.0", - "indexmap 2.0.0", + "http", + "indexmap", "slab", "tokio", "tokio-util", "tracing", ] -[[package]] -name = "hashbrown" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34f595585f103464d8d2f6e9864682d74c1601fed5e07d62b1c9058dba8246fb" -dependencies = [ - "autocfg 1.1.0", -] - [[package]] name = "hashbrown" version = "0.14.0" @@ -651,9 +617,9 @@ checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hippotat" @@ -672,9 +638,10 @@ dependencies = [ "futures", "heck", "hippotat-macros", - "http-body 1.0.1", + "http-body", "http-body-util", - "hyper 0.14.7", + "hyper", + "hyper-util", "indenter", "ipnet", "itertools", @@ -685,7 +652,7 @@ dependencies = [ "memchr", "mime", "nix", - "parking_lot", + "parking_lot 0.11.0", "pin-project-lite", "regex", "reqwest", @@ -721,46 +688,25 @@ dependencies = [ "winapi", ] -[[package]] -name = "http" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b708cc7f06493459026f53b9a61a7a121a5d1ec6238dee58ea4941132b30156b" -dependencies = [ - "bytes 0.5.3", - "fnv", - "itoa 0.4.7", -] - [[package]] name = "http" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" dependencies = [ - "bytes 1.0.0", + "bytes", "fnv", "itoa 1.0.0", ] -[[package]] -name = "http-body" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2861bd27ee074e5ee891e8b539837a9430012e249d7f0ca2d795650f579c1994" -dependencies = [ - "bytes 1.0.0", - "http 0.2.0", -] - [[package]] name = "http-body" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ - "bytes 1.0.0", - "http 1.0.0", + "bytes", + "http", ] [[package]] @@ -769,10 +715,10 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ - "bytes 1.0.0", + "bytes", "futures-util", - "http 1.0.0", - "http-body 1.0.1", + "http", + "http-body", "pin-project-lite", ] @@ -796,43 +742,21 @@ checksum = "b9b6c53306532d3c8e8087b44e6580e10db51a023cf9b433cea2ac38066b92da" [[package]] name = "hyper" -version = "0.14.7" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e5f105c494081baa3bf9e200b279e27ec1623895cd504c7dbef8d0b080fcf54" +checksum = "c4fe55fb7a772d59a5ff1dfbff4fe0258d19b89fec4b233e75d35d5d2316badc" dependencies = [ - "bytes 1.0.0", + "bytes", "futures-channel", - "futures-core", "futures-util", - "h2 0.3.18", - "http 0.2.0", - "http-body 0.4.0", + "h2", + "http", + "http-body", "httparse", "httpdate", - "itoa 0.4.7", - "pin-project", - "socket2 0.4.10", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5aa53871fc917b1a9ed87b683a5d86db645e23acb32c2e0785a353e522fb75" -dependencies = [ - "bytes 1.0.0", - "futures-channel", - "futures-util", - "h2 0.4.0", - "http 1.0.0", - "http-body 1.0.1", - "httparse", "itoa 1.0.0", "pin-project-lite", + "smallvec", "tokio", "want", ] @@ -844,8 +768,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "736f15a50e749d033164c56c09783b6102c4ff8da79ad77dbddbbaea0f8567f7" dependencies = [ "futures-util", - "http 1.0.0", - "hyper 1.1.0", + "http", + "hyper", "hyper-util", "rustls", "rustls-pki-types", @@ -860,9 +784,9 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ - "bytes 1.0.0", + "bytes", "http-body-util", - "hyper 1.1.0", + "hyper", "hyper-util", "native-tls", "tokio", @@ -872,20 +796,19 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.3" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ - "bytes 1.0.0", + "bytes", "futures-channel", "futures-util", - "http 1.0.0", - "http-body 1.0.1", - "hyper 1.1.0", + "http", + "http-body", + "hyper", "pin-project-lite", - "socket2 0.5.0", + "socket2", "tokio", - "tower", "tower-service", "tracing", ] @@ -906,16 +829,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0bd112d44d9d870a6819eb505d04dd92b5e4d94bb8c304924a0872ae7016fb5" -[[package]] -name = "indexmap" -version = "1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e47a3566dd4fd4eec714ae6ceabdee0caec795be835c223d92c2d40f1e8cf1c" -dependencies = [ - "autocfg 1.1.0", - "hashbrown 0.8.1", -] - [[package]] name = "indexmap" version = "2.0.0" @@ -923,7 +836,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown", ] [[package]] @@ -1027,9 +940,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.156" +version = "0.2.168" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5f43f184355eefb8d17fc948dbecf6c13be3c141f20d834ae842193a448c72a" +checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d" [[package]] name = "linux-raw-sys" @@ -1045,9 +958,9 @@ checksum = "bb68f22743a3fb35785f1e7f844ca5a3de2dde5bd0c0ef5b372065814699b121" [[package]] name = "lock_api" -version = "0.4.0" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de302ce1fe7482db13738fbaf2e21cfb06a986b89c0bf38d88abf16681aada4e" +checksum = "88943dd7ef4a2e5a4bfa2753aaab3013e34ce2533d1996fb18ef591e315e2b3b" dependencies = [ "scopeguard", ] @@ -1099,25 +1012,14 @@ dependencies = [ [[package]] name = "mio" -version = "0.7.6" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f33bc887064ef1fd66020c9adfc45bb9f33d75a42096c81e7c56c65b75dd1a8b" +checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" dependencies = [ + "hermit-abi", "libc", - "log", - "miow", - "ntapi", - "winapi", -] - -[[package]] -name = "miow" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897" -dependencies = [ - "socket2 0.3.16", - "winapi", + "wasi", + "windows-sys 0.52.0", ] [[package]] @@ -1152,24 +1054,6 @@ dependencies = [ "pin-utils", ] -[[package]] -name = "ntapi" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcdaac6150484ca8fed0f2ba30c2970d05da1ceac10d1beefae91ff4ada7928f" -dependencies = [ - "winapi", -] - -[[package]] -name = "num_cpus" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" -dependencies = [ - "libc", -] - [[package]] name = "object" version = "0.36.0" @@ -1237,7 +1121,17 @@ checksum = "a4893845fa2ca272e647da5d0e46660a314ead9c2fdd9a883aabc32e481a8733" dependencies = [ "instant", "lock_api", - "parking_lot_core", + "parking_lot_core 0.8.0", +] + +[[package]] +name = "parking_lot" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" +dependencies = [ + "lock_api", + "parking_lot_core 0.9.0", ] [[package]] @@ -1250,36 +1144,29 @@ dependencies = [ "cloudabi 0.1.0", "instant", "libc", - "redox_syscall", + "redox_syscall 0.1.56", "smallvec", "winapi", ] [[package]] -name = "percent-encoding" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" - -[[package]] -name = "pin-project" -version = "1.0.2" +name = "parking_lot_core" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ccc2237c2c489783abd8c4c80e5450fc0e98644555b1364da68cc29aa151ca7" +checksum = "b2f4f894f3865f6c0e02810fc597300f34dc2510f66400da262d8ae10e75767d" dependencies = [ - "pin-project-internal", + "cfg-if 1.0.0", + "libc", + "redox_syscall 0.2.8", + "smallvec", + "windows-sys 0.29.0", ] [[package]] -name = "pin-project-internal" -version = "1.0.2" +name = "percent-encoding" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8e8d2bf0b23038a4424865103a4df472855692821aab4e4f5c3312d461d9e5f" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.103", -] +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pin-project-lite" @@ -1371,13 +1258,22 @@ version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" +[[package]] +name = "redox_syscall" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "742739e41cd49414de871ea5e549afb7e2a3ac77b589bcbebe8c82fab37147fc" +dependencies = [ + "bitflags 1.2.1", +] + [[package]] name = "redox_termios" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc495930de8d330f14856cface52561b7d79a072c76e438cf8f34d7233a35fa7" dependencies = [ - "redox_syscall", + "redox_syscall 0.1.56", ] [[package]] @@ -1413,15 +1309,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" dependencies = [ "base64 0.22.0", - "bytes 1.0.0", + "bytes", "encoding_rs", "futures-core", "futures-util", - "h2 0.4.0", - "http 1.0.0", - "http-body 1.0.1", + "h2", + "http", + "http-body", "http-body-util", - "hyper 1.1.0", + "hyper", "hyper-rustls", "hyper-tls", "hyper-util", @@ -1660,40 +1556,18 @@ checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" [[package]] name = "smallvec" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3757cb9d89161a2f24e1cf78efa0c1fcff485d18e3f55e0aa3480824ddaa0f3f" - -[[package]] -name = "socket2" -version = "0.3.16" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fd8b795c389288baa5f355489c65e71fd48a02104600d15c4cfbc561e9e429d" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "redox_syscall", - "winapi", -] +checksum = "2593d31f82ead8df961d8bd23a64c2ccf2eb5dd34b0a34bfb4dd54011c72009e" [[package]] name = "socket2" -version = "0.4.10" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" dependencies = [ "libc", - "winapi", -] - -[[package]] -name = "socket2" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f86942952dddcbda5e75d086eb38ae9e51d5bc0374299ff4596d836f036dbc36" -dependencies = [ - "libc", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -1787,7 +1661,7 @@ dependencies = [ "cfg-if 0.1.10", "libc", "rand", - "redox_syscall", + "redox_syscall 0.1.56", "remove_dir_all", "winapi", ] @@ -1818,7 +1692,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8affd752d0f2c7127d6d5f1b98182a5471606b48b1a955165d39eb5e4887ceba" dependencies = [ "libc", - "redox_syscall", + "redox_syscall 0.1.56", "redox_termios", ] @@ -1869,33 +1743,31 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.7.0" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c79ba603c337335df6ba6dd6afc38c38a7d5e1b0c871678439ea973cd62a118e" +checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" dependencies = [ - "autocfg 1.1.0", - "bytes 1.0.0", + "backtrace", + "bytes", "libc", - "memchr", "mio", - "num_cpus", - "once_cell", - "parking_lot", + "parking_lot 0.12.0", "pin-project-lite", "signal-hook-registry", + "socket2", "tokio-macros", - "winapi", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "1.1.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caf7b11a536f46a809a8a9f0bb4237020f70ecbf115b842360afb127ea2fda57" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 1.0.103", + "syn 2.0.52", ] [[package]] @@ -1925,7 +1797,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764" dependencies = [ - "bytes 1.0.0", + "bytes", "futures-core", "futures-sink", "pin-project-lite", @@ -1933,27 +1805,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "tower" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ebe6c299e025c20c08a730be54f816b90089d153a58b8648adea98eee85c82a" -dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "tokio", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-layer" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "343bc9466d3fe6b0f960ef45960509f84480bf4fd96f92901afe7ff3df9d3a62" - [[package]] name = "tower-service" version = "0.3.0" @@ -1967,7 +1818,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a400e31aa60b9d44a52a8ee0343b5b18566b03a8321e0d321f695cf56e940160" dependencies = [ "cfg-if 1.0.0", - "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -2161,9 +2011,9 @@ dependencies = [ [[package]] name = "winapi" -version = "0.3.9" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" dependencies = [ "winapi-i686-pc-windows-gnu", "winapi-x86_64-pc-windows-gnu", @@ -2220,6 +2070,19 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ceb069ac8b2117d36924190469735767f0990833935ab430155e71a44bafe148" +dependencies = [ + "windows_aarch64_msvc 0.29.0", + "windows_i686_gnu 0.29.0", + "windows_i686_msvc 0.29.0", + "windows_x86_64_gnu 0.29.0", + "windows_x86_64_msvc 0.29.0", +] + [[package]] name = "windows-sys" version = "0.36.0" @@ -2266,6 +2129,15 @@ dependencies = [ "windows-targets 0.48.0", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-targets" version = "0.42.1" @@ -2330,6 +2202,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_msvc" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d027175d00b01e0cbeb97d6ab6ebe03b12330a35786cbaca5252b1c4bf5d9b" + [[package]] name = "windows_aarch64_msvc" version = "0.36.0" @@ -2354,6 +2232,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_i686_gnu" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8793f59f7b8e8b01eda1a652b2697d87b93097198ae85f823b969ca5b89bba58" + [[package]] name = "windows_i686_gnu" version = "0.36.0" @@ -2384,6 +2268,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_msvc" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8602f6c418b67024be2996c512f5f995de3ba417f4c75af68401ab8756796ae4" + [[package]] name = "windows_i686_msvc" version = "0.36.0" @@ -2408,6 +2298,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_x86_64_gnu" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d615f419543e0bd7d2b3323af0d86ff19cbc4f816e6453f36a2c2ce889c354" + [[package]] name = "windows_x86_64_gnu" version = "0.36.0" @@ -2450,6 +2346,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_msvc" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d95421d9ed3672c280884da53201a5c46b7b2765ca6faf34b0d71cf34a3561" + [[package]] name = "windows_x86_64_msvc" version = "0.36.0" diff --git a/Cargo.toml b/Cargo.toml index 5aa1b12..73e751e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,7 +42,7 @@ eyre = "0.6" fehler = "1" futures = "0.3" heck = ">=0.4, <0.6" -hyper = { version = "0.14.7", features = ["full"] } +hyper = { version = "1", features = ["full"] } hyper-util = "0.1.10" indenter = "0.3" ipnet = "2.3" @@ -62,7 +62,7 @@ sha2 = "0.10" subtle = "2" syslog = ">=6, <8" thiserror = ">=1.0.2, <3" -tokio = { version = "1.7", features = ["full"] } +tokio = { version = "1.43", features = ["full"] } void = "1" http-body = "1.0.1" http-body-util = "0.1.2" diff --git a/debian/control b/debian/control index fb4036e..2b9d03a 100644 --- a/debian/control +++ b/debian/control @@ -25,7 +25,7 @@ Build-Depends: debhelper (>= 12), librust-heck-dev (>= 0.4~) , librust-http-body-dev (>= 1.0.1~) , librust-http-body-util-dev (>= 0.1.2~) , - librust-hyper-dev (>= 0.14.7~) , + librust-hyper-dev (>= 1~) , librust-hyper-util-dev (>= 0.1.10~) , librust-indenter-dev (>= 0.3~) , librust-ipnet-dev (>= 2.3~) , @@ -51,7 +51,7 @@ Build-Depends: debhelper (>= 12), librust-syn-dev (>= 1~) , librust-syslog-dev (>= 6~) , librust-thiserror-dev (>= 1.0.2~) , - librust-tokio-dev (>= 1.7~) , + librust-tokio-dev (>= 1.43~) , librust-void-dev (>= 1~) , Standards-Version: 4.6.1 diff --git a/maint/update-minimal-versions b/maint/update-minimal-versions index 3d0ee8d..a784636 100755 --- a/maint/update-minimal-versions +++ b/maint/update-minimal-versions @@ -11,8 +11,5 @@ cp Cargo.lock.minimal Cargo.lock $CARGO +nightly update -Z minimal-versions $CARGO +nightly update -p openssl -p openssl-sys -# -Z minimal-versions leaves this at 0.14.28 which is broken -$CARGO +nightly update -p hyper@0.14.28 --precise=0.14.7 - cp Cargo.lock Cargo.lock.minimal mv Cargo.lock.normal Cargo.lock diff --git a/server/server.rs b/server/server.rs index 1aa6f26..32d06a7 100644 --- a/server/server.rs +++ b/server/server.rs @@ -239,6 +239,15 @@ async fn async_main(opts: Opts, daemon: Option) { all_clients, }); + let max_buffer = chain!( + [16384], // hyper demands at least 8192 + ics.iter().map(|ic| { + [ic.max_batch_up, + ic.max_batch_down] + }).flatten(), + ).max().expect("not empty since we have at least one [item]") + .try_into().unwrap_or_else(|_: TryFromIntError| usize::MAX); + for (ic, (web_recv, route_recv)) in izip!( ics, client_handles_recv, @@ -255,22 +264,29 @@ async fn async_main(opts: Opts, daemon: Option) { let mut listeners = vec![]; for saddr in &global.config.addrs { let saddr = SocketAddr::new(*saddr, global.config.port); - // TODO move bind() here - let listener = (); + let listener = tokio::net::TcpListener::bind(saddr) + .await + .with_context(|| format!("bind {}", saddr))?; listeners.push((saddr, listener)); } listeners }; for (saddr, listener) in listeners { - let make_service = hyper::service::make_service_fn({ - let global = global.clone(); - move |conn: &hyper::server::conn::AddrStream| { - let caddr = conn.remote_addr(); - let global = global.clone(); - let caddr = Arc::new(format!("[{}]", caddr)); + info!("listening on {}", &saddr); + let global = global.clone(); + + let task = tokio::task::spawn(async move { + loop { + let (conn, caddr) = match listener.accept().await { + Ok(y) => y, + Err(e) => { debug!("{saddr}: listen error: {e:#}"); continue; } + }; + let caddr = Arc::new(format!("[{caddr}]")); let service = hyper::service::service_fn({ + let global = global.clone(); + let caddr = caddr.clone(); move |req| { let global = global.clone(); let caddr = caddr.clone(); @@ -285,20 +301,22 @@ async fn async_main(opts: Opts, daemon: Option) { } } }); - async { Ok::<_, Void>(service) } - } - }); - let () = listener; // TODO move bind() earlier. - let server = hyper::Server::try_bind(&saddr) - .context("bind")? - .http1_preserve_header_case(true) - .serve(make_service); - info!("listening on {}", &saddr); - let task = tokio::task::spawn(async move { - match server.await { - Ok(()) => anyhow!("shut down?!"), - Err(e) => e.into(), + let conn = hyper_util::rt::tokio::TokioIo::new(conn); + + let conn_fut = hyper::server::conn::http1::Builder::new() + .half_close(true) + .title_case_headers(true) + .max_buf_size(max_buffer) + .serve_connection(conn, service); + + tokio::task::spawn(async move { + match conn_fut.await { + Ok(()) => {}, + Err(e) => trace!("{}: client connection from {} failed: {:#}", + saddr, caddr, e), + }; + }); } }); tasks.push((task, format!("http server {}", saddr))); diff --git a/server/sweb.rs b/server/sweb.rs index 4515ec6..d3cf993 100644 --- a/server/sweb.rs +++ b/server/sweb.rs @@ -13,7 +13,7 @@ pub struct WebRequest { pub initial: Box<[u8]>, pub initial_remaining: usize, pub length_hint: usize, - pub body: hyper::body::Body, + pub body: http_body_util::BodyDataStream, pub boundary_finder: multipart::BoundaryFinder, pub reply_to: oneshot::Sender, pub warnings: Warnings, @@ -34,7 +34,7 @@ pub type WebResponseBody = BufBody; pub async fn handle( conn: Arc, global: Arc, - req: hyper::Request + req: hyper::Request ) -> Result, hyper::http::Error> { if req.method() == Method::GET { let mut resp = hyper::Response::new(BufBody::display("hippotat\r\n")); @@ -85,7 +85,9 @@ pub async fn handle( |e| { let _ = warnings.add(&e.wrap_err("parsing Content-Length")); 0 } ); - let mut body = req.into_body(); + let body = req.into_body(); + let mut body = http_body_util::BodyDataStream::new(body); + let initial = match read_limited_bytes( METADATA_MAX_LEN, default(), length_hint, Pin::new(&mut body), ).await { diff --git a/src/prelude.rs b/src/prelude.rs index d1574ee..c2adfbb 100644 --- a/src/prelude.rs +++ b/src/prelude.rs @@ -16,6 +16,7 @@ pub use std::io::{self, Cursor, ErrorKind, IoSlice, Read as _, Write as _}; pub use std::iter; pub use std::mem; pub use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr}; +pub use std::num::TryFromIntError; pub use std::os::fd::{BorrowedFd, OwnedFd}; pub use std::os::raw::c_int; pub use std::path::{Path, PathBuf}; @@ -32,10 +33,10 @@ pub use either::Either; pub use easy_ext::ext; pub use fehler::{throw, throws}; pub use futures::{poll, future, FutureExt, StreamExt, TryStreamExt}; -pub use hyper::body::{Bytes, Buf, HttpBody}; +pub use hyper::body::{Bytes, Buf}; pub use hyper::{Method}; pub use ipnet::IpNet; -pub use itertools::{iproduct, izip, Itertools}; +pub use itertools::{chain, iproduct, izip, Itertools}; pub use lazy_regex::{regex_captures, regex_is_match, regex_replace_all}; pub use lazy_static::lazy_static; pub use log::{trace, debug, info, warn, error}; diff --git a/src/queue.rs b/src/queue.rs index 34dd2a5..1e393c1 100644 --- a/src/queue.rs +++ b/src/queue.rs @@ -133,15 +133,13 @@ impl BufBody { } } -impl HttpBody for BufBody { +impl hyper::body::Body for BufBody { type Error = Void; type Data = B; - fn poll_data(self: Pin<&mut Self>, _: &mut std::task::Context<'_>) - -> Poll>> { - Poll::Ready(Ok(self.project().body.take()).transpose()) - } - fn poll_trailers(self: Pin<&mut Self>, _: &mut std::task::Context<'_>) - -> Poll>, Void>> { - Poll::Ready(Ok(None)) + fn poll_frame(self: Pin<&mut Self>, _: &mut std::task::Context<'_>) + -> Poll, Void>>> { + Poll::Ready(Ok(self.project().body.take() + .map(hyper::body::Frame::data) + ).transpose()) } } -- 2.30.2 From 63fbb8437fbede4e4e802592d14677bd9685b369 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 2 Feb 2025 16:45:53 +0000 Subject: [PATCH 02/16] autopkgtests: Use `isolation-machine` restriction Instead of `x-hippotat-adt-broken-in-debci`. We think this may help, with appropriate configuration in ci.d.n. Signed-off-by: Ian Jackson --- .gitlab-ci.yml | 2 +- HACKING.md | 2 +- Makefile | 2 +- debian/tests/control | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f8691eb..ffbbc27 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -137,4 +137,4 @@ minimal-versions-pinned: # - apt-get -y -Pupstream-cargo build-dep . # - apt-get -y install autopkgtest # - DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -Pupstream-cargo -uc -us --build=full -# - autopkgtest --ignore-restrictions=x-hippotat-adt-broken-in-debci ../hippotat_*.changes --- null +# - autopkgtest --ignore-restrictions=isolation-machine ../hippotat_*.changes --- null diff --git a/HACKING.md b/HACKING.md index 922c568..1f6dcc4 100644 --- a/HACKING.md +++ b/HACKING.md @@ -13,5 +13,5 @@ NAILING_CARGO=nailing-cargo make check Using dependencies from Debian ``` -autopkgtest --ignore-restrictions=x-hippotat-adt-broken-in-debci . --- schroot build +autopkgtest --ignore-restrictions=isolation-machine . --- schroot build ``` diff --git a/Makefile b/Makefile index c551021..105af05 100644 --- a/Makefile +++ b/Makefile @@ -101,7 +101,7 @@ very-clean: clean # nailing-cargo -o audit # git clean -xdff && NAILING_CARGO=nailing-cargo make check # dgit -wgfa sbuild -c build -A -# autopkgtest --ignore-restrictions=x-hippotat-adt-broken-in-debci . --- schroot build +# autopkgtest --ignore-restrictions=isolation-machine . --- schroot build # # Update release notes in debian/changelog: # diff --git a/debian/tests/control b/debian/tests/control index 51e6805..2b3b3bd 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -6,7 +6,7 @@ Depends: rsyslog, authbind, iptables, bash, iproute2, util-linux, iputils-ping, orphan-sysvinit-scripts, psmisc -Restrictions: needs-root, allow-stderr, x-hippotat-adt-broken-in-debci +Restrictions: needs-root, allow-stderr, isolation-machine Tests: adt-initscript Tests-Directory: adt @@ -15,4 +15,4 @@ Depends: net-tools, rsyslog, bash, userv-utils, netcat-openbsd, curl -Restrictions: needs-root, allow-stderr, x-hippotat-adt-broken-in-debci +Restrictions: needs-root, allow-stderr, isolation-machine -- 2.30.2 From e98f20af8c37f89203f2b38d935559efa83394b4 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 2 Feb 2025 16:59:43 +0000 Subject: [PATCH 03/16] Update version to 1.2.0 Signed-off-by: Ian Jackson --- Cargo.lock | 4 ++-- Cargo.lock.minimal | 4 ++-- Cargo.toml | 4 ++-- debian/changelog | 25 +++++++++++++++++++++++++ macros/Cargo.toml | 2 +- 5 files changed, 32 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7791fc6..4fe9227 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -588,7 +588,7 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hippotat" -version = "1.1.12" +version = "1.2.0" dependencies = [ "backtrace", "base64", @@ -634,7 +634,7 @@ dependencies = [ [[package]] name = "hippotat-macros" -version = "1.1.12" +version = "1.2.0" dependencies = [ "itertools", "proc-macro2", diff --git a/Cargo.lock.minimal b/Cargo.lock.minimal index 745a9a4..5e9cab9 100644 --- a/Cargo.lock.minimal +++ b/Cargo.lock.minimal @@ -623,7 +623,7 @@ checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hippotat" -version = "1.1.12" +version = "1.2.0" dependencies = [ "backtrace", "base64 0.21.0", @@ -669,7 +669,7 @@ dependencies = [ [[package]] name = "hippotat-macros" -version = "1.1.12" +version = "1.2.0" dependencies = [ "itertools", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index 73e751e..8769369 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "hippotat" -version = "1.1.12" +version = "1.2.0" edition = "2018" description="Asinine HTTP-over-IP" license="GPL-3.0-or-later" @@ -26,7 +26,7 @@ path="server/server.rs" [dependencies] -hippotat-macros = { version = "1.1.3", path = "macros" } +hippotat-macros = { version = "1.2.0", path = "macros" } backtrace = "0.3.74" base64 = ">=0.21, <0.23" diff --git a/debian/changelog b/debian/changelog index 41c3e7a..d33b4ef 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,28 @@ +hippotat (1.2.0) unstable; urgency=medium + + HTTP implementation changed: + * Client now uses reqwest (and thus hyper 1) + * Server now uses hyper 1 + * Closes: #1094093. [Report from Lucas Nussbaum] + + Build system: + * Makefile: Add + sigil before cargo invocations. + Fixes compatibility with recent GNU make. + * autopkgtests: Declare isolation-machine restriction, + rather than x-hippotat-adt-broken-in-debci. + + Dependency updates: + * New deps: http-body 1.0.1, http-body-util 0.1.2, hyper-util 0.1.10 + * Require backtrace 0.3.74, tokio 1.43 + * Allow educe 0.6, itertools 0.14, thiserror 2 + * cargo update (upstream Cargo.lock) + + Internal tidying up: + * HACKING.md: New file with some notes in. + * Clarifications to config item defaulting traits. + + -- Ian Jackson Sun, 02 Feb 2025 16:59:18 +0000 + hippotat (1.1.12) unstable; urgency=medium Dependency updates: diff --git a/macros/Cargo.toml b/macros/Cargo.toml index 9b6ab25..10991f8 100644 --- a/macros/Cargo.toml +++ b/macros/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "hippotat-macros" -version = "1.1.12" +version = "1.2.0" edition = "2018" description="Asinine HTTP-over-IP, proc-macros" license="GPL-3.0-or-later" -- 2.30.2 From 569517fc08a05690446e09900aaf0fdf07ff572d Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 3 Feb 2025 18:01:33 +0000 Subject: [PATCH 04/16] HACKING.md: Document running one test case Signed-off-by: Ian Jackson --- HACKING.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/HACKING.md b/HACKING.md index 1f6dcc4..5fe1d2b 100644 --- a/HACKING.md +++ b/HACKING.md @@ -15,3 +15,10 @@ Using dependencies from Debian ``` autopkgtest --ignore-restrictions=isolation-machine . --- schroot build ``` + +Run one test, ad-hoc, using a debug build + +``` +nailing-cargo build +nailing-cargo --- test/with-unshare test/t-basic +``` -- 2.30.2 From b19b584502434110f0c33fca6977a440e52bd0fc Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 5 Feb 2025 14:03:46 +0000 Subject: [PATCH 05/16] autopkgtest: redirect stdout to stderr The test environment mangles the relative ordering of the stderr and stdout xtreams, which can be very confusing. Signed-off-by: Ian Jackson --- adt/acommon | 2 ++ 1 file changed, 2 insertions(+) diff --git a/adt/acommon b/adt/acommon index 20a2f9d..9612946 100644 --- a/adt/acommon +++ b/adt/acommon @@ -8,6 +8,8 @@ set -x . "${0%/*}"/../test/tcommon +exec >&2 + on_failure=: test-prep () { -- 2.30.2 From 1bdaa9b8a6904f2b1735e47f8d7c32b985665ab9 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 4 Feb 2025 14:50:14 +0000 Subject: [PATCH 06/16] autopkgtest: properly quote $cs in perl scripts Signed-off-by: Ian Jackson --- adt/acommon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adt/acommon b/adt/acommon index 9612946..714245a 100644 --- a/adt/acommon +++ b/adt/acommon @@ -148,9 +148,9 @@ setup-host () { local unwanted_deps=$(perl -ne ' next if m{^(?:userv-utils|libnetaddr-ip-perl|net-tools)$}; next if m{^hippotat-'"$cs"'$}; - next if m{^(?:iptables|rsyslog|authbind)$} && '"$cs"' eq "server"; + next if m{^(?:iptables|rsyslog|authbind)$} && "'"$cs"'" eq "server"; # TODO for rsyslog, record bug number here - next if m{^(?:orphan-sysvinit-scripts)$} && '"$cs"' eq "server"; + next if m{^(?:orphan-sysvinit-scripts)$} && "'"$cs"'" eq "server"; print; ' $tmp/$cs-unwanted-deps) in- $cs apt-mark auto $unwanted_deps -- 2.30.2 From 785119ca35d648cc7ad40b099cd5453824a1f4bd Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 5 Feb 2025 19:03:52 +0000 Subject: [PATCH 07/16] Routine Cargo.lock update Signed-off-by: Ian Jackson --- Cargo.lock | 62 +++++++++++++++++++++++++++--------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4fe9227..6053441 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -132,15 +132,15 @@ checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" [[package]] name = "bytes" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" +checksum = "f61dac84819c6588b558454b194026eb1f09c293b9036ae9b159e74e73ab6cf9" [[package]] name = "cc" -version = "1.2.11" +version = "1.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4730490333d58093109dc02c23174c3f4d490998c3fed3cc8e82d57afedb9cf" +checksum = "755717a7de9ec452bf7f3f1a3099085deabd7f2962b861dae91ecd7a365903d2" dependencies = [ "shlex", ] @@ -159,9 +159,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "clap" -version = "4.5.27" +version = "4.5.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "769b0145982b4b48713e01ec42d61614425f27b7058bda7180a3a41f30104796" +checksum = "3e77c3243bd94243c03672cb5154667347c457ca271254724f9f393aee1c05ff" dependencies = [ "clap_builder", "clap_derive", @@ -182,14 +182,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.24" +version = "4.5.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54b755194d6389280185988721fffba69495eed5ee9feeee9a599b53db80318c" +checksum = "bf4ced95c6f4a675af3da73304b9ac4ed991640c36374e4b46795c49e17cf1ed" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -266,7 +266,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -284,7 +284,7 @@ dependencies = [ "enum-ordinalize", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -319,7 +319,7 @@ checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -483,7 +483,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -893,7 +893,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -990,7 +990,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -1126,9 +1126,9 @@ checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "openssl" -version = "0.10.69" +version = "0.10.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5e534d133a060a3c19daec1eb3e98ec6f4685978834f2dbadfe2ec215bab64e" +checksum = "61cfb4e166a8bb8c9b55c500bc2308550148ece889be90f609377e58140f42c6" dependencies = [ "bitflags", "cfg-if", @@ -1147,7 +1147,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -1158,9 +1158,9 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-sys" -version = "0.9.104" +version = "0.9.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" +checksum = "8b22d5b84be05a8d6947c7cb71f7c849aa0f112acd4bf51c2a7c1c988ac0a9dc" dependencies = [ "cc", "libc", @@ -1467,7 +1467,7 @@ checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -1582,9 +1582,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.96" +version = "2.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" +checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" dependencies = [ "proc-macro2", "quote", @@ -1608,7 +1608,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -1685,7 +1685,7 @@ checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -1757,7 +1757,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -1956,7 +1956,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", "wasm-bindgen-shared", ] @@ -1991,7 +1991,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2187,7 +2187,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", "synstructure", ] @@ -2208,7 +2208,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", "synstructure", ] @@ -2237,5 +2237,5 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] -- 2.30.2 From d930bd63000bbbde334c8dc0e6b92db3f4bbdd16 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 4 Feb 2025 19:53:18 +0000 Subject: [PATCH 08/16] autopkgtest: setup-host server: fall back to starting rsyslogd by hand Signed-off-by: Ian Jackson --- adt/acommon | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/adt/acommon b/adt/acommon index 714245a..bd863c3 100644 --- a/adt/acommon +++ b/adt/acommon @@ -173,7 +173,14 @@ finish-setup-host-server () { in- server iptables -N empty ||: in- server iptables -I INPUT -j empty -s 192.0.2.0/24 rsyslog-capture-daemon in- server - in- server service rsyslog start + + in- server service rsyslog start || { + # When the outer system is systemd, `service` doesn't find it + # in the chroot, but the init script is in orphan-sysvinit-scripts + # which is also missing. Run it by hand. + in- server rsyslogd -n & + sleep 5 + } } in- () { -- 2.30.2 From 1f728ec0afb3cd407a363e7200e250173dff284e Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 5 Feb 2025 01:36:58 +0000 Subject: [PATCH 09/16] autopkgtest: setup-host: clean out possibly-wrong /dev/log Signed-off-by: Ian Jackson --- adt/acommon | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/adt/acommon b/adt/acommon index bd863c3..6541b14 100644 --- a/adt/acommon +++ b/adt/acommon @@ -135,6 +135,16 @@ setup-host () { ! test -d /var/cache/apt/archives; then rm /var/cache/apt/archives fi + + # On systemd systems, /dev/log is a symlink into /run/systemd, + # but we cannot run systemd in the inner environment, + # so we use rsyslog. Clean out the symlink. + # + # The check for systemd is to let this test be less destructive + # when run under inadequate isolation on a non-systemd setup. + if ls -al /dev/log | grep systemd; then + rm -f /dev/log + fi ' : remove redundant packages -- 2.30.2 From 99e025e0ceaa63e9fe23b891339e92bd81501741 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 3 Feb 2025 23:40:10 +0000 Subject: [PATCH 10/16] autopkgtest: setup-host unwanted deps: handle | properly Signed-off-by: Ian Jackson --- adt/acommon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adt/acommon b/adt/acommon index 6541b14..83e2272 100644 --- a/adt/acommon +++ b/adt/acommon @@ -153,7 +153,7 @@ setup-host () { next unless m{^Depends:}...m{^\S}; s{^Depends:}{ }; next if m{^\S}; - print $_, "\n" foreach split m{[\s,]+}; + print $_, "\n" foreach split m{[\s,\|]+}; ' debian/tests/control |sort >$tmp/$cs-unwanted-deps local unwanted_deps=$(perl -ne ' next if m{^(?:userv-utils|libnetaddr-ip-perl|net-tools)$}; -- 2.30.2 From 3ddbaef7d35f5f2ccffcdf0f528c301dda90cf00 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 3 Feb 2025 17:55:04 +0000 Subject: [PATCH 11/16] autopkgtest: adt-full: allow systemd-sysv as alt to init script orphan-sysvinit-scripts and systemd conflict. The effect is that in ci.debian.net this dep would want to change the init system. What we actually need is rsyslog to be started, which is satisfied with systemd-sysv since then systemd is the init system and rsyslog has a systemd unit. (I believe.) Signed-off-by: Ian Jackson --- debian/tests/control | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/tests/control b/debian/tests/control index 2b3b3bd..aa6e7f3 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -4,7 +4,8 @@ Depends: hippotat-client, hippotat-server, userv-utils, libnetaddr-ip-perl, net-tools, rsyslog, authbind, iptables, - bash, iproute2, util-linux, iputils-ping, orphan-sysvinit-scripts, + bash, iproute2, util-linux, iputils-ping, + orphan-sysvinit-scripts | systemd-sysv, psmisc Restrictions: needs-root, allow-stderr, isolation-machine -- 2.30.2 From df169bb833a488016a002eca824d6a4522cd2d3b Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 5 Feb 2025 14:06:50 +0000 Subject: [PATCH 12/16] autopkgtest: adt-full: do not start a duplicate uservd This is already done as part of setup-pair by setup-host. Signed-off-by: Ian Jackson --- adt/adt-full | 2 -- 1 file changed, 2 deletions(-) diff --git a/adt/adt-full b/adt/adt-full index 39d367e..c36bf14 100755 --- a/adt/adt-full +++ b/adt/adt-full @@ -11,8 +11,6 @@ set -e setup-pair -in- server sh -x /etc/init.d/userv start - in- server service hippotatd restart in-ns-await-up server 192.0.2.1 -- 2.30.2 From a7442c33f9963337c13978e95dc35832c82ca8f6 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 4 Feb 2025 15:01:00 +0000 Subject: [PATCH 13/16] autopkgtest: adt-initscript: turn on set -x in the init script Via /etc/default. This may help debugging. Signed-off-by: Ian Jackson --- adt/adt-initscript | 1 + 1 file changed, 1 insertion(+) diff --git a/adt/adt-initscript b/adt/adt-initscript index 91c96a5..84ebbfd 100755 --- a/adt/adt-initscript +++ b/adt/adt-initscript @@ -15,6 +15,7 @@ perl /etc/hippotat/main.cfg -pe ' ' cat >>/etc/default/hippotatd < Date: Mon, 3 Feb 2025 17:58:18 +0000 Subject: [PATCH 14/16] autopkgtest: adt-initscript: require rsyslog init script We run rsyslog, so we do need its init script (unless we're running under systemd). Signed-off-by: Ian Jackson --- debian/tests/control | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/tests/control b/debian/tests/control index aa6e7f3..bf71add 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -15,5 +15,6 @@ Depends: hippotat-server, net-tools, rsyslog, + orphan-sysvinit-scripts | systemd-sysv, bash, userv-utils, netcat-openbsd, curl Restrictions: needs-root, allow-stderr, isolation-machine -- 2.30.2 From 204a36902d5d146bf4bc2cbde46271119b420670 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 4 Feb 2025 17:28:24 +0000 Subject: [PATCH 15/16] autopkgtest: adt-initscript: use restart to start Signed-off-by: Ian Jackson --- adt/adt-initscript | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/adt/adt-initscript b/adt/adt-initscript index 84ebbfd..920ece3 100755 --- a/adt/adt-initscript +++ b/adt/adt-initscript @@ -20,7 +20,15 @@ CHECK_FIREWALL=false USER=root END -service hippotatd start +# hippotatd is not actually running now because the init script check +# if we have any configured endpoints, and doesn't run it if not. +# With sysvinit, "start" works to start the deaemon. +# With systemd, "start" doesn't work because systemd thought it +# started it when it was installed. There's apparently a "pidfile" +# thing we could perhaps put in the LSB headers, but I couldn't find +# any formal documentation of it. Instead, "restart" ought to DTRT. +service hippotatd restart + curl http://localhost:8099/ | tee /dev/stderr | grep hippotat dpid=$(pidof hippotatd) -- 2.30.2 From 4568db90a0c466dbd7eb487d61426814198e767e Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 5 Feb 2025 22:04:22 +0000 Subject: [PATCH 16/16] Release 1.2.1 Signed-off-by: Ian Jackson --- Cargo.lock | 4 ++-- Cargo.lock.minimal | 8 ++++---- Cargo.toml | 4 ++-- debian/changelog | 9 +++++++++ macros/Cargo.toml | 2 +- 5 files changed, 18 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6053441..09adadd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -588,7 +588,7 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hippotat" -version = "1.2.0" +version = "1.2.1" dependencies = [ "backtrace", "base64", @@ -634,7 +634,7 @@ dependencies = [ [[package]] name = "hippotat-macros" -version = "1.2.0" +version = "1.2.1" dependencies = [ "itertools", "proc-macro2", diff --git a/Cargo.lock.minimal b/Cargo.lock.minimal index 5e9cab9..50fabd3 100644 --- a/Cargo.lock.minimal +++ b/Cargo.lock.minimal @@ -623,7 +623,7 @@ checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hippotat" -version = "1.2.0" +version = "1.2.1" dependencies = [ "backtrace", "base64 0.21.0", @@ -669,7 +669,7 @@ dependencies = [ [[package]] name = "hippotat-macros" -version = "1.2.0" +version = "1.2.1" dependencies = [ "itertools", "proc-macro2", @@ -1103,9 +1103,9 @@ checksum = "756d49c8424483a3df3b5d735112b4da22109ced9a8294f1f5cdf80fb3810919" [[package]] name = "openssl-sys" -version = "0.9.104" +version = "0.9.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" +checksum = "8b22d5b84be05a8d6947c7cb71f7c849aa0f112acd4bf51c2a7c1c988ac0a9dc" dependencies = [ "cc", "libc", diff --git a/Cargo.toml b/Cargo.toml index 8769369..5168959 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "hippotat" -version = "1.2.0" +version = "1.2.1" edition = "2018" description="Asinine HTTP-over-IP" license="GPL-3.0-or-later" @@ -26,7 +26,7 @@ path="server/server.rs" [dependencies] -hippotat-macros = { version = "1.2.0", path = "macros" } +hippotat-macros = { version = "=1.2.1", path = "macros" } backtrace = "0.3.74" base64 = ">=0.21, <0.23" diff --git a/debian/changelog b/debian/changelog index d33b4ef..98ff3b6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +hippotat (1.2.1) unstable; urgency=medium + + * autopkgtests: Many fixes/improvements; should now work in ci.debian.net. + * HACKING.md (internal docs): Minor improvement. + * Includes all desired changes from 1.2.0+exp1 to 1.2.0+exp16 inclusive. + * cargo update (upstream Cargo.lock), fixes RUSTSEC-2023-0067. + + -- Ian Jackson Wed, 05 Feb 2025 22:04:10 +0000 + hippotat (1.2.0) unstable; urgency=medium HTTP implementation changed: diff --git a/macros/Cargo.toml b/macros/Cargo.toml index 10991f8..806df81 100644 --- a/macros/Cargo.toml +++ b/macros/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "hippotat-macros" -version = "1.2.0" +version = "1.2.1" edition = "2018" description="Asinine HTTP-over-IP, proc-macros" license="GPL-3.0-or-later" -- 2.30.2