diff options
author | Nora Widdecke <nora@sequoia-pgp.org> | 2022-02-22 12:52:29 +0100 |
---|---|---|
committer | Nora Widdecke <nora@sequoia-pgp.org> | 2022-02-24 15:00:26 +0100 |
commit | b41e1504cd29097328cb21f95808c9972188499e (patch) | |
tree | 83f53d1b52e7da4eddbca7fb5cdf59329c8925ea /sq | |
parent | 5c829d8add2cbb5fc2b5ca35d908b84967faefa8 (diff) |
sq: Make the net feature mandatory.
- Closes #763
Diffstat (limited to 'sq')
-rw-r--r-- | sq/Cargo.toml | 6 | ||||
-rw-r--r-- | sq/build.rs | 1 | ||||
-rw-r--r-- | sq/src/commands/mod.rs | 1 | ||||
-rw-r--r-- | sq/src/sq.rs | 2 | ||||
-rw-r--r-- | sq/src/sq_cli.rs | 14 |
5 files changed, 4 insertions, 20 deletions
diff --git a/sq/Cargo.toml b/sq/Cargo.toml index 30153487..e402c839 100644 --- a/sq/Cargo.toml +++ b/sq/Cargo.toml @@ -29,14 +29,14 @@ maintenance = { status = "actively-developed" } buffered-reader = { path = "../buffered-reader", version = "1.0.0", default-features = false, features = ["compression-deflate"] } sequoia-openpgp = { path = "../openpgp", version = "1.1", default-features = false, features = ["compression-deflate"] } sequoia-autocrypt = { path = "../autocrypt", version = "0.24", default-features = false, optional = true } -sequoia-net = { path = "../net", version = "0.24", default-features = false, optional = true } +sequoia-net = { path = "../net", version = "0.24", default-features = false } anyhow = "1.0.18" chrono = "0.4.10" clap = { version = "2.33", features = ["wrap_help"] } itertools = "0.9" tempfile = "3.1" term_size = "0.3" -tokio = { version = "1.13.1", optional = true } +tokio = { version = "1.13.1" } rpassword = "5.0" [build-dependencies] @@ -59,11 +59,9 @@ bench = false default = [ "buffered-reader/compression-bzip2", "sequoia-openpgp/default", - "net", "autocrypt", ] crypto-nettle = ["sequoia-openpgp/crypto-nettle"] crypto-cng = ["sequoia-openpgp/crypto-cng"] compression-bzip2 = ["buffered-reader/compression-bzip2", "sequoia-openpgp/compression-bzip2"] -net = ["sequoia-net", "tokio"] autocrypt = ["sequoia-autocrypt"] diff --git a/sq/build.rs b/sq/build.rs index c1ce2954..71399d46 100644 --- a/sq/build.rs +++ b/sq/build.rs @@ -19,7 +19,6 @@ fn main() { let mut sq = sq_cli::configure( clap::App::new("sq").set_term_width(80), - cfg!(feature = "net"), cfg!(feature = "autocrypt"), ); let mut main = fs::File::create("src/sq-usage.rs").unwrap(); diff --git a/sq/src/commands/mod.rs b/sq/src/commands/mod.rs index 64dc6b37..1b92a366 100644 --- a/sq/src/commands/mod.rs +++ b/sq/src/commands/mod.rs @@ -52,7 +52,6 @@ pub mod key; pub mod merge_signatures; pub use self::merge_signatures::merge_signatures; pub mod keyring; -#[cfg(feature = "net")] pub mod net; pub mod certify; diff --git a/sq/src/sq.rs b/sq/src/sq.rs index 8c4beff3..6d441c4c 100644 --- a/sq/src/sq.rs +++ b/sq/src/sq.rs @@ -692,7 +692,6 @@ fn main() -> Result<()> { _ => unreachable!(), }, - #[cfg(feature = "net")] ("keyserver", Some(m)) => commands::net::dispatch_keyserver(config, m)?, @@ -700,7 +699,6 @@ fn main() -> Result<()> { ("revoke", Some(m)) => commands::revoke::dispatch(config, m)?, - #[cfg(feature = "net")] ("wkd", Some(m)) => commands::net::dispatch_wkd(config, m)?, ("certify", Some(m)) => { diff --git a/sq/src/sq_cli.rs b/sq/src/sq_cli.rs index 7c66d7c8..de41f972 100644 --- a/sq/src/sq_cli.rs +++ b/sq/src/sq_cli.rs @@ -4,7 +4,6 @@ use clap::{App, Arg, ArgGroup, SubCommand, AppSettings}; pub fn build() -> App<'static, 'static> { configure(App::new("sq"), - cfg!(feature = "net"), cfg!(feature = "autocrypt"), ) } @@ -21,7 +20,6 @@ pub fn build() -> App<'static, 'static> { /// - Inspection & packet manipulation (6xx) pub fn configure( app: App<'static, 'static>, - feature_net: bool, feature_autocrypt: bool, ) -> App<'static, 'static> { let version = Box::leak( @@ -1715,14 +1713,7 @@ as being human readable.")) .short("B").long("binary") .help("Emits binary data")) ) - ); - - let app = if ! feature_net { - // Without networking support. - app - } else { - // With networking support. - app + ) .subcommand(SubCommand::with_name("keyserver") .display_order(410) .about("Interacts with keyservers") @@ -1817,8 +1808,7 @@ as being human readable.")) .help("Uses the direct method \ [default: advanced method]")) ) - ) - }; + ); let app = if ! feature_autocrypt { // Without Autocrypt support. |