update a few deps

This commit is contained in:
Scott Lamb 2022-05-02 11:22:14 -07:00
parent 909a174957
commit 841e06e354
12 changed files with 78 additions and 77 deletions

View File

@ -11,7 +11,7 @@ jobs:
name: Rust ${{ matrix.rust }} name: Rust ${{ matrix.rust }}
strategy: strategy:
matrix: matrix:
rust: [ "stable", "1.57", "nightly" ] rust: [ "stable", "1.60", "nightly" ]
include: include:
- rust: nightly - rust: nightly
extra_args: "--features nightly --benches" extra_args: "--features nightly --benches"

View File

@ -11,7 +11,7 @@ Each release is tagged in Git and on the Docker repository
* [#219](https://github.com/scottlamb/moonfire-nvr/issues/219): fix * [#219](https://github.com/scottlamb/moonfire-nvr/issues/219): fix
live stream failing with `ws close: 1006` on URLs with port numbers. live stream failing with `ws close: 1006` on URLs with port numbers.
* build Docker images with link-time optimization. * build Docker images with link-time optimization.
* bump minimum Rust version to 1.57. * bump minimum Rust version to 1.60.
## 0.7.4 (2022-04-13) ## 0.7.4 (2022-04-13)

View File

@ -207,7 +207,7 @@ following command:
$ brew install node $ brew install node
``` ```
Next, you need Rust 1.57+ and Cargo. The easiest way to install them is by Next, you need Rust 1.60+ and Cargo. The easiest way to install them is by
following the instructions at [rustup.rs](https://www.rustup.rs/). Avoid following the instructions at [rustup.rs](https://www.rustup.rs/). Avoid
your Linux distribution's Rust packages, which tend to be too old. your Linux distribution's Rust packages, which tend to be too old.
(At least on Debian-based systems; Arch and Gentoo might be okay.) (At least on Debian-based systems; Arch and Gentoo might be okay.)

123
server/Cargo.lock generated
View File

@ -28,6 +28,15 @@ dependencies = [
"version_check", "version_check",
] ]
[[package]]
name = "aho-corasick"
version = "0.7.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f"
dependencies = [
"memchr",
]
[[package]] [[package]]
name = "ansi_term" name = "ansi_term"
version = "0.12.1" version = "0.12.1"
@ -125,16 +134,7 @@ dependencies = [
"cc", "cc",
"cfg-if", "cfg-if",
"constant_time_eq", "constant_time_eq",
"digest 0.10.3", "digest",
]
[[package]]
name = "block-buffer"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4"
dependencies = [
"generic-array",
] ]
[[package]] [[package]]
@ -376,22 +376,13 @@ version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e25ea47919b1560c4e3b7fe0aaab9becf5b84a10325ddf7db0f0ba5e1026499" checksum = "0e25ea47919b1560c4e3b7fe0aaab9becf5b84a10325ddf7db0f0ba5e1026499"
[[package]]
name = "digest"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"
dependencies = [
"generic-array",
]
[[package]] [[package]]
name = "digest" name = "digest"
version = "0.10.3" version = "0.10.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506"
dependencies = [ dependencies = [
"block-buffer 0.10.2", "block-buffer",
"crypto-common", "crypto-common",
"subtle", "subtle",
] ]
@ -724,7 +715,7 @@ version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
dependencies = [ dependencies = [
"digest 0.10.3", "digest",
] ]
[[package]] [[package]]
@ -740,17 +731,17 @@ dependencies = [
[[package]] [[package]]
name = "http-auth" name = "http-auth"
version = "0.1.5" version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26d3003cd46a8f8da3292b79488bc95917ef8c6cac33b39473e191bbff0dc85d" checksum = "c0b40b39d66c28829a0cf4d09f7e139ff8201f7500a5083732848ed3b4b4d850"
dependencies = [ dependencies = [
"base64", "base64",
"digest 0.9.0", "digest",
"hex", "hex",
"md-5", "md-5",
"memchr", "memchr",
"rand", "rand",
"sha2 0.9.9", "sha2",
] ]
[[package]] [[package]]
@ -766,9 +757,9 @@ dependencies = [
[[package]] [[package]]
name = "http-serve" name = "http-serve"
version = "0.3.5" version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8fb663bddc0a96082a0131e22ce74623d85f77b7701dc165139c42cb16452cbe" checksum = "496ab5f39096e4c915f167c276aea19521ed862beb50f7d2bc530578535689d7"
dependencies = [ dependencies = [
"bytes", "bytes",
"flate2", "flate2",
@ -953,13 +944,11 @@ checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
[[package]] [[package]]
name = "md-5" name = "md-5"
version = "0.9.1" version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b5a279bb9607f9f53c22d496eade00d138d1bdcccd07d74650387cf94942a15" checksum = "658646b21e0b72f7866c7038ab086d3d5e1cd6271f060fd37defb241949d0582"
dependencies = [ dependencies = [
"block-buffer 0.9.0", "digest",
"digest 0.9.0",
"opaque-debug",
] ]
[[package]] [[package]]
@ -1334,12 +1323,6 @@ version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9"
[[package]]
name = "opaque-debug"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
[[package]] [[package]]
name = "owning_ref" name = "owning_ref"
version = "0.4.1" version = "0.4.1"
@ -1389,7 +1372,7 @@ version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "271779f35b581956db91a3e55737327a03aa051e90b1c47aeb189508533adfd7" checksum = "271779f35b581956db91a3e55737327a03aa051e90b1c47aeb189508533adfd7"
dependencies = [ dependencies = [
"digest 0.10.3", "digest",
] ]
[[package]] [[package]]
@ -1483,41 +1466,55 @@ dependencies = [
[[package]] [[package]]
name = "protobuf" name = "protobuf"
version = "3.0.0-alpha.8" version = "3.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a416d5c5d48e9cec99c6348d72567827a7db92eb9a6dac4c6bbf498c92b5387c" checksum = "430ff91293021cc9369e04edced9594c9c7a03760e62afcf98b0f8ad99a56ef7"
dependencies = [ dependencies = [
"once_cell",
"protobuf-support",
"thiserror", "thiserror",
] ]
[[package]] [[package]]
name = "protobuf-codegen" name = "protobuf-codegen"
version = "3.0.0-alpha.8" version = "3.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44d49fd0d60dbcca37527ec064c80f00bac163fdd79955674363f3c2fbe09bc0" checksum = "f9248f242f2b2915e050852c56058dffe2ea9d71fba735d8eb33be78973b71cd"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"once_cell",
"protobuf", "protobuf",
"protobuf-parse", "protobuf-parse",
"regex",
"tempfile", "tempfile",
"thiserror", "thiserror",
] ]
[[package]] [[package]]
name = "protobuf-parse" name = "protobuf-parse"
version = "3.0.0-alpha.8" version = "3.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc005ee4b04f4a8dac9f23d2394541ee85fe7a32fbcd6bb793a3f1f6d184d5cc" checksum = "a7aa0f9769c554c90cb1b28592f7efe03ad2540de046dfa21d89155776c27c29"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"indexmap", "indexmap",
"log", "log",
"protobuf", "protobuf",
"protobuf-support",
"tempfile", "tempfile",
"thiserror", "thiserror",
"which", "which",
] ]
[[package]]
name = "protobuf-support"
version = "3.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9553cd16fcb53a9b33da0735313393ba2697d090ae9af4a96f160992513ce8cb"
dependencies = [
"thiserror",
]
[[package]] [[package]]
name = "quote" name = "quote"
version = "1.0.15" version = "1.0.15"
@ -1590,12 +1587,29 @@ dependencies = [
"stable_deref_trait", "stable_deref_trait",
] ]
[[package]]
name = "regex"
version = "1.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286"
dependencies = [
"aho-corasick",
"memchr",
"regex-syntax",
]
[[package]] [[package]]
name = "regex-automata" name = "regex-automata"
version = "0.1.10" version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
[[package]]
name = "regex-syntax"
version = "0.6.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"
[[package]] [[package]]
name = "remove_dir_all" name = "remove_dir_all"
version = "0.5.3" version = "0.5.3"
@ -1763,7 +1777,7 @@ dependencies = [
"password-hash", "password-hash",
"pbkdf2", "pbkdf2",
"salsa20", "salsa20",
"sha2 0.10.2", "sha2",
] ]
[[package]] [[package]]
@ -1827,20 +1841,7 @@ checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"cpufeatures", "cpufeatures",
"digest 0.10.3", "digest",
]
[[package]]
name = "sha2"
version = "0.9.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800"
dependencies = [
"block-buffer 0.9.0",
"cfg-if",
"cpufeatures",
"digest 0.9.0",
"opaque-debug",
] ]
[[package]] [[package]]
@ -1851,7 +1852,7 @@ checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"cpufeatures", "cpufeatures",
"digest 0.10.3", "digest",
] ]
[[package]] [[package]]

View File

@ -5,7 +5,7 @@ authors = ["Scott Lamb <slamb@slamb.org>"]
edition = "2018" edition = "2018"
resolver = "2" resolver = "2"
license-file = "../LICENSE.txt" license-file = "../LICENSE.txt"
rust-version = "1.57" rust-version = "1.60"
[features] [features]
@ -45,7 +45,7 @@ nix = "0.23.0"
nom = "7.0.0" nom = "7.0.0"
parking_lot = "0.12.0" parking_lot = "0.12.0"
password-hash = "0.3.2" password-hash = "0.3.2"
protobuf = "3.0.0-alpha.1" protobuf = "3.0"
reffers = "0.7.0" reffers = "0.7.0"
retina = "0.3.9" retina = "0.3.9"
ring = "0.16.2" ring = "0.16.2"

View File

@ -33,7 +33,7 @@ num-rational = { version = "0.4.0", default-features = false, features = ["std"]
odds = { version = "0.4.0", features = ["std-vec"] } odds = { version = "0.4.0", features = ["std-vec"] }
parking_lot = "0.12.0" parking_lot = "0.12.0"
pretty-hex = "0.2.1" pretty-hex = "0.2.1"
protobuf = "3.0.0-alpha.1" protobuf = "3.0"
ring = "0.16.2" ring = "0.16.2"
rusqlite = "0.27.0" rusqlite = "0.27.0"
scrypt = "0.9.0" scrypt = "0.9.0"
@ -49,4 +49,4 @@ uuid = { version = "0.8", features = ["serde", "std", "v4"] }
itertools = "0.10.0" itertools = "0.10.0"
[build-dependencies] [build-dependencies]
protobuf-codegen = "3.0.0-alpha.1" protobuf-codegen = "3.0"

View File

@ -97,7 +97,7 @@ pub fn run(conn: &mut rusqlite::Connection, opts: &Options) -> Result<i32, Error
meta.db_uuid.extend_from_slice(&db_uuid.as_bytes()[..]); meta.db_uuid.extend_from_slice(&db_uuid.as_bytes()[..]);
meta.dir_uuid.extend_from_slice(&dir_uuid.0.as_bytes()[..]); meta.dir_uuid.extend_from_slice(&dir_uuid.0.as_bytes()[..]);
{ {
let o = meta.last_complete_open.set_default(); let o = meta.last_complete_open.mut_or_insert_default();
o.id = open_id; o.id = open_id;
o.uuid.extend_from_slice(&open_uuid.0.as_bytes()[..]); o.uuid.extend_from_slice(&open_uuid.0.as_bytes()[..]);
} }

View File

@ -352,7 +352,7 @@ impl SampleFileDir {
meta.db_uuid.extend_from_slice(&db_uuid.as_bytes()[..]); meta.db_uuid.extend_from_slice(&db_uuid.as_bytes()[..]);
meta.dir_uuid.extend_from_slice(&self.uuid.as_bytes()[..]); meta.dir_uuid.extend_from_slice(&self.uuid.as_bytes()[..]);
if let Some(o) = self.last_complete_open { if let Some(o) = self.last_complete_open {
let open = meta.last_complete_open.set_default(); let open = meta.last_complete_open.mut_or_insert_default();
open.id = o.id; open.id = o.id;
open.uuid.extend_from_slice(&o.uuid.as_bytes()[..]); open.uuid.extend_from_slice(&o.uuid.as_bytes()[..]);
} }
@ -1182,7 +1182,7 @@ impl LockedDatabase {
} }
let mut expected_meta = dir.expected_meta(&self.uuid); let mut expected_meta = dir.expected_meta(&self.uuid);
if let Some(o) = self.open.as_ref() { if let Some(o) = self.open.as_ref() {
let open = expected_meta.in_progress_open.set_default(); let open = expected_meta.in_progress_open.mut_or_insert_default();
open.id = o.id; open.id = o.id;
open.uuid.extend_from_slice(&o.uuid.as_bytes()[..]); open.uuid.extend_from_slice(&o.uuid.as_bytes()[..]);
} }
@ -1753,7 +1753,7 @@ impl LockedDatabase {
{ {
meta.db_uuid.extend_from_slice(&self.uuid.as_bytes()[..]); meta.db_uuid.extend_from_slice(&self.uuid.as_bytes()[..]);
meta.dir_uuid.extend_from_slice(uuid_bytes); meta.dir_uuid.extend_from_slice(uuid_bytes);
let open = meta.in_progress_open.set_default(); let open = meta.in_progress_open.mut_or_insert_default();
open.id = o.id; open.id = o.id;
open.uuid.extend_from_slice(&o.uuid.as_bytes()[..]); open.uuid.extend_from_slice(&o.uuid.as_bytes()[..]);
} }

View File

@ -403,12 +403,12 @@ mod tests {
meta.db_uuid.extend_from_slice(fake_uuid); meta.db_uuid.extend_from_slice(fake_uuid);
meta.dir_uuid.extend_from_slice(fake_uuid); meta.dir_uuid.extend_from_slice(fake_uuid);
{ {
let o = meta.last_complete_open.set_default(); let o = meta.last_complete_open.mut_or_insert_default();
o.id = u32::max_value(); o.id = u32::max_value();
o.uuid.extend_from_slice(fake_uuid); o.uuid.extend_from_slice(fake_uuid);
} }
{ {
let o = meta.in_progress_open.set_default(); let o = meta.in_progress_open.mut_or_insert_default();
o.id = u32::max_value(); o.id = u32::max_value();
o.uuid.extend_from_slice(fake_uuid); o.uuid.extend_from_slice(fake_uuid);
} }

View File

@ -95,7 +95,7 @@ pub fn run(args: &super::Args, tx: &rusqlite::Transaction) -> Result<(), Error>
{ {
meta.db_uuid.extend_from_slice(db_uuid_bytes); meta.db_uuid.extend_from_slice(db_uuid_bytes);
meta.dir_uuid.extend_from_slice(dir_uuid_bytes); meta.dir_uuid.extend_from_slice(dir_uuid_bytes);
let open = meta.last_complete_open.set_default(); let open = meta.last_complete_open.mut_or_insert_default();
open.id = open_id; open.id = open_id;
open.uuid.extend_from_slice(&open_uuid_bytes); open.uuid.extend_from_slice(&open_uuid_bytes);
} }

View File

@ -46,7 +46,7 @@ fn open_sample_file_dir(tx: &rusqlite::Transaction) -> Result<Arc<dir::SampleFil
meta.db_uuid.extend_from_slice(&db_uuid.0.as_bytes()[..]); meta.db_uuid.extend_from_slice(&db_uuid.0.as_bytes()[..]);
meta.dir_uuid.extend_from_slice(&s_uuid.0.as_bytes()[..]); meta.dir_uuid.extend_from_slice(&s_uuid.0.as_bytes()[..]);
{ {
let open = meta.last_complete_open.set_default(); let open = meta.last_complete_open.mut_or_insert_default();
open.id = o_id as u32; open.id = o_id as u32;
open.uuid.extend_from_slice(&o_uuid.0.as_bytes()[..]); open.uuid.extend_from_slice(&o_uuid.0.as_bytes()[..]);
} }

View File

@ -139,7 +139,7 @@ pub fn run(_args: &super::Args, tx: &rusqlite::Transaction) -> Result<(), Error>
.extend_from_slice(&dir_uuid.0.as_bytes()[..]); .extend_from_slice(&dir_uuid.0.as_bytes()[..]);
match (open_id, open_uuid) { match (open_id, open_uuid) {
(Some(id), Some(uuid)) => { (Some(id), Some(uuid)) => {
let mut o = db_meta.last_complete_open.set_default(); let mut o = db_meta.last_complete_open.mut_or_insert_default();
o.id = id; o.id = id;
o.uuid.extend_from_slice(&uuid.0.as_bytes()[..]); o.uuid.extend_from_slice(&uuid.0.as_bytes()[..]);
} }