From e2ea1bd0ef6472378fbe6f099b6d23e0bfa4b7cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Mon, 3 Oct 2022 15:57:54 +0200 Subject: [PATCH 1/7] update readme for 0.5 --- Cargo.toml | 1 + README.md | 100 ++++++++++++++----------------------------- RELEASE-CHECKLIST.md | 17 +------- 3 files changed, 36 insertions(+), 82 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 832c758..1cdccfe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,3 +9,4 @@ members = [ [profile.release] lto = "thin" +strip = true diff --git a/README.md b/README.md index a0a7648..5a4a844 100644 --- a/README.md +++ b/README.md @@ -2,89 +2,67 @@ Mumble daemon with controller (think `mpd(1)`/`mpc(1)`) written in Rust. -## Building (CURRENTLY OUT OF DATE) +## Building -**NOTE**: This is out of date as we are chaning the internal crate layout. It -will be fixed when the new layout is merged and we have time to update on crates -and the AUR. +mum is currently only tested on Linux. Windows is planned to use a REPL. macOS +should work as-is. -mumd and mumctl are available on crates.io and can be installed with +Requirements (package names are for Arch Linux): -```sh -$ cargo install mumd -$ cargo install mumctl -``` - -They are also -[available on the AUR](https://aur.archlinux.org/packages/mum-git/). Thirdly, we -publish [compiled binaries on Github](https://github.com/sornas/mum/releases/). - -### Requirements - -These are for Arch Linux. You might need other packages on other distributions -and operating systems, or they might be named something different. - -- rust (stable 1.53) +- rust (stable, current minimum version is 1.56) - alsa-lib - openssl - opus - libnotify (optional, needed in default configuration) -Windows is not currently supported but could be in the future. macOS should work. -Other operating systems haven't been tested. The limiting factor on Windows -is IPC communication which is (currently) done via the crate ipc-channel. +Build and install the latest published version: -We only "guarantee" compilation on latest Rust stable. Open a ticket if this is -an issue for you and we'll see what we can do. +```sh +$ cargo install mum +``` -### Installation +You can also build and install from source, for example with -```sh -$ cargo install --path=mum ``` +$ cargo install --git https://github.com/mum-rs/mum.git +``` + +or using the [AUR package](https://aur.archlinux.org/packages/mum-git/). ### Optional features mum contains optional features that are enabled by default. To compile without -them, build with --no-default-features. Features can then be enabled separately with +them, build with --no-default-features. Features can then be re-enabled separately with --features "FEATURES". The following features can be specified: -| Name | Needed for | -|-------------------|--------------------| -| mum/notifications | Notifications | -| mum/ogg | ogg sound effects | +| Name | Needed for | +| ----------------- | ----------------- | +| mum/notifications | Notifications | +| mum/ogg | ogg sound effects | -```sh -$ cargo build [--release] --no-default-features -``` - -### man-pages +### Manpages -Man-pages for mumd, mumctl and mumdrc (the configuration file) are included as -both asciidoc txt-files and already formatted groff-files. They are generated -with +Manpages are included as both asciidoc +txt-files and already formatted groff-files. They are generated by ```sh -$ asciidoctor -b manpage *.txt +$ asciidoctor -b manpage mumctl.txt +$ asciidoctor -b manpage mumd.txt +$ asciidoctor -b manpage mumdrc.txt ``` -## Usage +## Basic Usage This describes how to connect to a server and join different channels. -See `$ mumctl --help` or `documentation/*.txt` for more information. +See `$ mumctl --help` or the manpages for more information. ### mumd -Start the daemon with mumd. Currently it attaches to the terminal, so if you -want to run it in the background you can detach it with e.g. (zsh): - -```sh -$ mumd &>/dev/null &| -``` - -Somewhere down the line we're aiming to have a `--daemonize`. +Start the daemon by running `mumd`. It attaches to the terminal, so if you want +to run it in the background you can detach it from the shell. You could also run +it through e.g. systemd. ### mumctl @@ -102,27 +80,15 @@ ServerRoot $ mumctl channel connect Channel2 ``` -## Known issues - -The main hub for issues is [our issue -tracker](https://github.com/mum-rs/mum/issues). Additionally, there are some -features that aren't present on the issue tracker: - -- Administration tools. See [the admin tools - project](https://github.com/mum-rs/mum/projects/1). -- Surround output. If this is something you want, [open an - issue](https://github.com/mum-rs/mum/issues/new) so we can take a look at - implementing it. - ## Why? -Mostly because it's a fun way of learning a new language. Also: +Mostly because it was a fun way of learning a new language. Also: -- Most mumble clients use a GUI. While GUIs aren't necessarily bad, there +- Most Mumble clients use a GUI. While GUIs aren't necessarily bad, there should at least exist alternatives where possible. - Memory, disk and CPU usage. We haven't found a reliable way of testing this yet (suggestions welcome). ## Other projects -- [Barnard (go)](https://github.com/bmmcginty/barnard.git) - TUI mumble client +- [Barnard (go)](https://github.com/bmmcginty/barnard.git) - TUI diff --git a/RELEASE-CHECKLIST.md b/RELEASE-CHECKLIST.md index 888147f..a105fdb 100644 --- a/RELEASE-CHECKLIST.md +++ b/RELEASE-CHECKLIST.md @@ -8,7 +8,6 @@ - Check `$ cargo outdated`. - Build final version: - `$ MUM_VERSION=x.y.z RUSTFLAGS="--remap-path-prefix=$(pwd)=" cargo build --release` - - `$ strip target/release/mum{ctl,d}` - `$ cp target/release/mum{ctl,d}` - Basic test: - Check `--version`. @@ -16,7 +15,7 @@ - Connect with official mumble client. - Mute mumd and check if sound can be received. - Mute mumble and check if sound can be sent. - - Check status. + - Check `$ mumctl status`. - Send a text message. - Receive a text message. @@ -35,22 +34,10 @@ - Copy the output of `$ git diff va.b.c..vx.y.z --stat=80` where a.b.c is the previously released version. -# Publish to the AUR (-git) - -- Clone the AUR repository. -- Test `$ makepkg && sudo pacman -U `. -- If any changes to the `MAKEPKG` have to be made: - - Make the change. - - Test again. - - Update the .SRCINFO with `$ makepkg --printsrcinfo > .SRCINFO`. - - Commit and push. -- Don't commit and push if nothing but the release number changed.. - # Publish to crates.io Note that there might be a delay where crates.io catches up to the updated repository. - `$ (cd mumlib && cargo publish)` -- `$ (cd mumd && cargo publish)` -- `$ (cd mumctl && cargo publish)` +- `$ (cd mum && cargo publish)` From 00395474a400a8da13660a53bda4358dd2ea1a69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Mon, 3 Oct 2022 16:08:36 +0200 Subject: [PATCH 2/7] update changelog format --- CHANGELOG | 159 +++++++++++++++++++----------------------------------- 1 file changed, 56 insertions(+), 103 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 3c0c506..89ed13a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,128 +1,81 @@ -Changelog -========= - -This changelog is inspired by https://keepachangelog.com/en/1.1.0/[Keep a -Changelog]. We follow https://semver.org/spec/v2.0.0.html[semver], but since -we're in 0.x it's a lawless land anyway. - -Points under "unreleased" currently exist on main and will be part of the next -release. - Unreleased ---------- -Added -~~~~~ - -Changed -~~~~~~~ - -Fixed -~~~~~ - -Other -~~~~~ - - * Instead of four crates we now have only two. mumd and mumctl were merged - into mum as binary targets. - * You can now disable the noise gate by setting `audio.disable_noise_gate = - true` in the configuration file. +- Instead of four crates we now have only two. mumd and mumctl were merged into + mum as binary targets. +- You can now disable the noise gate by setting `disable_noise_gate = true` + under `[audio]` in the configuration file. 0.4.0 - 2021-06-19 ------------------ -Added -~~~~~ - - * Added a noise gate. - * Added tunneling audio through TCP if UDP connection goes down. - * --version now includes the current commit hash. - * Server passwords. Thanks @rbran! - * Added support for sending and receiving text messages. - * See a list of occured events with +mumctl events+. - * Invalid server certificates are now rejected by default and need to be - explicitly allowed either when connecting or permanently per server or - globally. - * .ogg sound effects. - -Changed -~~~~~~~ - - * Changed how you mute yourself/others. See man pages for details on the new options. - * The current channel status is now printed when connecting to a server. - -Fixed -~~~~~ - - * Client no longer sends empty audio packets. - * Informative error message instead of panic when a running mumd-process can't - be found. - * Lots of other minor informative error messages instead of panics. - * Status requests are sent in parallel. - * Pings are now less spammy in the log output. - * Sound output is stereo by default. - -Other -~~~~~ - - * Updated to tokio 1.0. - * Cleaned up dependencies +Major changes: + +- Added a noise gate. +- Added support for server passwords. Thanks @rbran! +- Added support for sending and receiving text messages. +- See a list of occured events (connections, messages, mute/deafen, ...) with + "mumctl events". +- Invalid server certificates are rejected by default and need to be + explicitly allowed either when connecting or permanently per server or + globally. +- .ogg sound effects. + +Other: + +- Added tunneling audio through TCP if UDP connection goes down. +- --version now includes the current commit hash. +- Changed how you mute yourself/others. See manpages for details on the new options. +- The current channel status is now printed when connecting to a server. +- Client no longer sends empty audio packets. +- Informative error message instead of panic when a running mumd-process can't + be found. +- Lots of other minor informative error messages instead of panics. +- Status requests are sent in parallel. +- Pings are less spammy in the log output. +- Sound output is stereo by default. +- Updated to tokio 1.0. +- Cleaned up dependencies 0.3.1 - 2021-04-08 ------------------ -Fixed -~~~~~ - - * Compilation no longer fails with "module export is private". +- Compilation no longer fails with "module export is private". 0.3.0 - 2020-12-25 ------------------ -Added -~~~~~ +Major changes: - * Published to crates.io. You can now install with +cargo install {mumctl,mumd}+! - * Support for macOS. - * Notifications via libnotify (behind a feature-gate). - * List configured servers, if they're online and how many users are - connected with +mumctl status+. - * Configure your own outgoing volume and others' ingoing volume with +mumctl config+. - * Mute/deafen yourself with +mumctl {mute,deafen}+. - * Locally mute others with +mumctl user mute+. - * Sound effects. - * Short about-texts when using +--help+. - * Man pages. +- Published to crates.io. You can now install with "cargo install {mumctl,mumd}"! +- Support for macOS. +- Notifications via libnotify (behind a feature-gate). +- List configured servers, if they're online, and how many users are + connected with "mumctl status". +- Configure your own outgoing volume and others' ingoing volume with "mumctl config". +- Mute/deafen yourself with "mumctl {mute,deafen}". +- Locally mute others with "mumctl user mute". +- Sound effects. +- Connecting and disconnecting from servers is now done with "mumctl + {connect,disconnect}" instead of under the "server" subcommand. -Changed -~~~~~~~ +Other: - * Connecting and disconnecting from servers is now done with +mumctl - {connect,disconnect}+ instead of under the +server+ subcommand. - -Fixed -~~~~~ - - * Starting an instance of mumd while another is already running now requires - the old instance to be shut down so instances aren't left running and - unreachable. - -Other -~~~~~ - - * Moved to dasp, a pure Rust digital audio signal processing library. +- Manpages. +- Short about-texts when using "--help". +- Starting an instance of mumd while another is already running now requires the + old instance to be shut down so instances aren't left running and unreachable. +- Moved to dasp, a pure Rust digital audio signal processing library. 0.2.0 - 2020-10-26 ------------------ -Added -~~~~~ - - * Connect to and disconnect from servers with +mumctl server {connect,disconnect}+. - * Save and reconfigure servers with +mumctl server {add,remove,rename,config}+. - * List channels and connect to them with +mumctl channel {list,join}+. - * Store configuration in a file. - * Generate CLI completions for zsh, bash and fish with +mumctl completions --{zsh,bash,fish}+. +- Connect to and disconnect from servers with "mumctl server + {connect,disconnect}". +- Save and reconfigure servers with "mumctl server {add,remove,rename,config}". +- List channels and connect to them with "mumctl channel {list,join}". +- Store configuration in a file. +- Generate CLI completions for zsh, bash and fish with "mumctl completions --{zsh,bash,fish}". Links ----- From be2fe0bc05f8e6910de725ffab33069abc7096dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Mon, 3 Oct 2022 16:43:53 +0200 Subject: [PATCH 3/7] update changelog, manpages and match command orderings --- CHANGELOG | 22 ++- documentation/mumctl.1 | 394 ++++++++++++++++++++++++++++++--------- documentation/mumctl.txt | 126 ++++++++----- documentation/mumd.1 | 6 +- documentation/mumdrc.5 | 107 ++++++++--- documentation/mumdrc.txt | 33 ++-- mum/src/bin/mumctl.rs | 82 ++++---- 7 files changed, 554 insertions(+), 216 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 89ed13a..e51da8e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,10 +1,26 @@ Unreleased ---------- +Major changes: + - Instead of four crates we now have only two. mumd and mumctl were merged into - mum as binary targets. -- You can now disable the noise gate by setting `disable_noise_gate = true` - under `[audio]` in the configuration file. + mum as binary targets. The installation instructions have been updated to + match this. +- Disable the noise gate by setting `disable_noise_gate = true` under `[audio]` + in the configuration file. +- The "mumctl config" and "mumctl server config" commands use toml_edit instead + of normal toml serialization. This makes it so comments and unknown values + aren't removed. + +Other: + +- Notifications are sent on their own thread so they don't freeze the entire + application while waiting for a timeout if a notification daemon isn't + present. +- Rust 2021. +- Clap 4. The help output formatting has changed a bit but the content remains + the same. + 0.4.0 - 2021-06-19 ------------------ diff --git a/documentation/mumctl.1 b/documentation/mumctl.1 index 8d8ba72..d7d952b 100644 --- a/documentation/mumctl.1 +++ b/documentation/mumctl.1 @@ -1,13 +1,13 @@ '\" t .\" Title: mumd .\" Author: [see the "AUTHOR(S)" section] -.\" Generator: Asciidoctor 2.0.15 -.\" Date: 2021-06-08 +.\" Generator: Asciidoctor 2.0.17 +.\" Date: 2022-10-03 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" -.TH "MUMCTL" "1" "2021-06-08" "\ \&" "\ \&" +.TH "MUMCTL" "1" "2022-10-03" "\ \&" "\ \&" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 @@ -31,7 +31,7 @@ mumctl \- mumd(1) controller .SH "SYNOPSIS" .sp -mumctl [] +mumctl [OPTIONS] SUBCOMMAND [ARG...] .SH "DESCRIPTION" .sp mumctl is a CLI controller for mumd(1), a client daemon for Mumble, a free and @@ -39,144 +39,358 @@ open source voice chat system. .SH "OPTIONS" .sp \-h, \-\-help -.RS 4 +.sp +.if n .RS 4 +.nf +.fam C Prints help information. -.RE +.fam +.fi +.if n .RE .sp \-\-version -.RS 4 +.sp +.if n .RS 4 +.nf +.fam C Prints version information. -.RE +.fam +.fi +.if n .RE .sp Subcommands contain additional options. .SH "SUBCOMMANDS" .sp -mumctl channel connect -.RS 4 +\fBmumctl channel connect\fP NAME +.sp +.if n .RS 4 +.nf +.fam C Connect to another channel. -.RE +.fam +.fi +.if n .RE .sp -mumctl channel list -.RS 4 +mumctl channel list [\-s|\-\-short] +.sp +.if n .RS 4 +.nf +.fam C List all channels in the connected server. -.RE +.fam +.fi +.if n .RE .sp -mumctl completions [\-\-bash|\-\-fish|\-\-zsh] -.RS 4 -Generate a completion file for the specified shell. -.RE +mumctl completions [bash|fish|zsh] .sp -mumctl config -.RS 4 -Set a configuration value in the mumd(1) config\-file. See mumdrc(5). -.RE +.if n .RS 4 +.nf +.fam C +Generate a completion file for the specified shell. +.fam +.fi +.if n .RE +.sp +mumctl config KEY VALUE +.sp +.if n .RS 4 +.nf +.fam C +Set a configuration value in the mumd(1) configuration file. +.fam +.fi +.if n .RE +.sp +.if n .RS 4 +.nf +.fam C +See mumdrc(5) for available keys and their meaning. +.fam +.fi +.if n .RE .sp mumctl config\-reload -.RS 4 -Force a reload of the configuration file (e.g. after editing it externally. -.RE -.sp -mumctl connect [\-p|\-\-port ] [username] -.RS 4 -Connect to a server on the specified port. The host may be either the name -of a saved server or an IP/URL (in which case username needs to be passed -as well). +.sp +.if n .RS 4 +.nf +.fam C +Force a reload of the configuration file (e.g. after editing it externally). +.fam +.fi +.if n .RE +.sp +mumctl connect HOST [\-p|\-\-port PORT] [\-\-accept\-invalid\-cert] [USERNAME] [PASSWORD] +.sp +.if n .RS 4 +.nf +.fam C +Connect to a server on the specified port. +.fam +.fi +.if n .RE +.sp +.if n .RS 4 +.nf +.fam C +The host may be either the name of a saved server in the configuration file +or an IP/URL, in which case a username needs to be passed as well. +.fam +.fi +.if n .RE +.sp +.if n .RS 4 +.nf +.fam C If omitted, the port defaults to 64738. -.RE +.fam +.fi +.if n .RE .sp mumctl deafen -.RS 4 +.sp +.if n .RS 4 +.nf +.fam C Deafen yourself. -.RE +.fam +.fi +.if n .RE .sp mumctl disconnect -.RS 4 +.sp +.if n .RS 4 +.nf +.fam C Disconnect from the currently connected server. -.RE +.fam +.fi +.if n .RE .sp mumctl events -.RS 4 -Print all events that have occured since mumd was started. -.RE +.sp +.if n .RS 4 +.nf +.fam C +Print a list of events that have occured. +.fam +.fi +.if n .RE .sp mumctl help -.RS 4 +.sp +.if n .RS 4 +.nf +.fam C Show a help message. -.RE +.fam +.fi +.if n .RE +.sp +mumctl message channel [\-r|\-\-recursive] MESSAGE [CHANNEL...] .sp -mumctl message channel [\-r|\-\-recursive] [...] +.if n .RS 4 +.nf +.fam C Sends a message to all channels specified in the list of channels. -If the recursive flag is set, the message is also sent to all subchannels in a recursive manner. -If no channels are given the message is sent to the channel currently +.fam +.fi +.if n .RE +.sp +.if n .RS 4 +.nf +.fam C +If \-\-recursive is set, the message is also sent to all subchannels. +.fam +.fi +.if n .RE +.sp +.if n .RS 4 +.nf +.fam C +If no channels are given, the message is sent to the channel we\*(Aqre currently connected to. +.fam +.fi +.if n .RE .sp -mumctl message user -Sends a message to all users specified in the list of users. +mumctl message user MESSAGE USER... +.sp +.if n .RS 4 +.nf +.fam C +Sends a message to one or more users. +.fam +.fi +.if n .RE .sp mumctl messages [\-f|\-\-follow] -Prints all received messages since mumd was started, or since this command last was issued, -whichever happens first. -If the follow flag is set, mumctl will instead wait for new messages to come in and print -them as they come in. To exit this loop, issue a Ctrl\-C. .sp -mumctl mute [user] -.RS 4 +.if n .RS 4 +.nf +.fam C +Prints all received messages since the last time this command was run. +.fam +.fi +.if n .RE +.sp +.if n .RS 4 +.nf +.fam C +If \-\-follow is set, wait for new messages and print them as they come +in. To exit this loop, issue a ctrl\-C. +.fam +.fi +.if n .RE +.sp +mumctl mute [USER] +.sp +.if n .RS 4 +.nf +.fam C Mute yourself or someone else. -If user is omitted, you mute yourself. Otherwise, the user with the username [user] is muted. -.RE -.sp -mumctl server add [\-\-port ] [ | ] -.RS 4 -Add a saved server configuration. -.RE -.sp -mumctl server config -.RS 4 +.fam +.fi +.if n .RE +.sp +.if n .RS 4 +.nf +.fam C +If user is omitted, you mute yourself. Otherwise, that user is muted. +.fam +.fi +.if n .RE +.sp +mumctl server add NAME HOST [\-\-port PORT] [USERNAME] [PASSWORD] +.sp +.if n .RS 4 +.nf +.fam C +Add a new saved server configuration. +.fam +.fi +.if n .RE +.sp +mumctl server config SERVER KEY VALUE +.sp +.if n .RS 4 +.nf +.fam C Configure a variable in a saved server configuration. -.RE +.fam +.fi +.if n .RE +.sp +.if n .RS 4 +.nf +.fam C +See mumdrc(5) for available keys. +.fam +.fi +.if n .RE .sp mumctl server list -.RS 4 +.sp +.if n .RS 4 +.nf +.fam C List all saved servers and how many are connected to them. -.RE +.fam +.fi +.if n .RE +.sp +mumctl server remove NAME .sp -mumctl server remove -.RS 4 +.if n .RS 4 +.nf +.fam C Remove a saved server. -.RE +.fam +.fi +.if n .RE +.sp +mumctl server rename OLD_NAME NEW_NAME .sp -mumctl server rename -.RS 4 +.if n .RS 4 +.nf +.fam C Rename a saved server. -.RE +.fam +.fi +.if n .RE .sp mumctl status -.RS 4 -Show the currently conneced channel and server. -.RE +.sp +.if n .RS 4 +.nf +.fam C +Show the currently connected channel and server. +.fam +.fi +.if n .RE .sp mumctl undeafen -.RS 4 +.sp +.if n .RS 4 +.nf +.fam C Undeafen yourself. -.RE +.fam +.fi +.if n .RE .sp -mumctl unmute [user] -.RS 4 -Unmute yourself or someone else. -If user is omitted, unmute yourself. Otherwise, the user with the username [user] is unmuted. -.RE +mumctl unmute [USER] .sp -mumctl volume set -.RS 4 -Set the outgoing volume level. +.if n .RS 4 +.nf +.fam C +Unmute yourself or someone else. +.fam +.fi +.if n .RE +.sp +.if n .RS 4 +.nf +.fam C +If user is omitted, unmute yourself. Otherwise, that user is unmuted. +.fam +.fi +.if n .RE +.sp +mumctl volume VOLUME +.sp +.if n .RS 4 +.nf +.fam C +Set the volume of outgoing audio. +.fam +.fi +.if n .RE +.sp +.if n .RS 4 +.nf +.fam C 1.0 is the default. -.RE -.sp -mumctl volume set -.RS 4 -Set the volume of another user\(cqs incoming audio. +.fam +.fi +.if n .RE +.sp +mumctl volume USER VOLUME +.sp +.if n .RS 4 +.nf +.fam C +Set the volume of another user\*(Aqs incoming audio. +.fam +.fi +.if n .RE +.sp +.if n .RS 4 +.nf +.fam C 1.0 is the default. -.RE +.fam +.fi +.if n .RE .SH "AUTHORS" .sp Gustav Sörnäs and Eskil Queseth. diff --git a/documentation/mumctl.txt b/documentation/mumctl.txt index 1c8ee8f..7fd77ff 100644 --- a/documentation/mumctl.txt +++ b/documentation/mumctl.txt @@ -9,7 +9,7 @@ mumctl - mumd(1) controller Synopsis -------- -mumctl [] +mumctl [OPTIONS] SUBCOMMAND [ARG...] Description ----------- @@ -20,10 +20,12 @@ open source voice chat system. Options ------- --h, --help :: +-h, --help + Prints help information. ---version :: +--version + Prints version information. Subcommands contain additional options. @@ -31,89 +33,125 @@ Subcommands contain additional options. Subcommands ----------- -mumctl channel connect :: +**mumctl channel connect** NAME + Connect to another channel. -mumctl channel list :: +mumctl channel list [-s|--short] + List all channels in the connected server. -mumctl completions [--bash|--fish|--zsh] :: +mumctl completions [bash|fish|zsh] + Generate a completion file for the specified shell. -mumctl config :: - Set a configuration value in the mumd(1) config-file. See mumdrc(5). +mumctl config KEY VALUE + + Set a configuration value in the mumd(1) configuration file. + + See mumdrc(5) for available keys and their meaning. + +mumctl config-reload + + Force a reload of the configuration file (e.g. after editing it externally). + +mumctl connect HOST [-p|--port PORT] [--accept-invalid-cert] [USERNAME] [PASSWORD] -mumctl config-reload :: - Force a reload of the configuration file (e.g. after editing it externally. + Connect to a server on the specified port. + + The host may be either the name of a saved server in the configuration file + or an IP/URL, in which case a username needs to be passed as well. -mumctl connect [-p|--port ] [username] :: - Connect to a server on the specified port. The host may be either the name - of a saved server or an IP/URL (in which case username needs to be passed - as well). If omitted, the port defaults to 64738. -mumctl deafen :: +mumctl deafen + Deafen yourself. -mumctl disconnect :: +mumctl disconnect + Disconnect from the currently connected server. -mumctl events :: - Print all events that have occured since mumd was started. +mumctl events + + Print a list of events that have occured. + +mumctl help -mumctl help :: Show a help message. -mumctl message channel [-r|--recursive] [...] +mumctl message channel [-r|--recursive] MESSAGE [CHANNEL...] + Sends a message to all channels specified in the list of channels. - If the recursive flag is set, the message is also sent to all subchannels in a recursive manner. - If no channels are given the message is sent to the channel currently + + If --recursive is set, the message is also sent to all subchannels. + + If no channels are given, the message is sent to the channel we're currently connected to. -mumctl message user - Sends a message to all users specified in the list of users. +mumctl message user MESSAGE USER... + + Sends a message to one or more users. mumctl messages [-f|--follow] - Prints all received messages since mumd was started, or since this command last was issued, - whichever happens first. - If the follow flag is set, mumctl will instead wait for new messages to come in and print - them as they come in. To exit this loop, issue a Ctrl-C. -mumctl mute [user] :: + Prints all received messages since the last time this command was run. + + If --follow is set, wait for new messages and print them as they come + in. To exit this loop, issue a ctrl-C. + +mumctl mute [USER] + Mute yourself or someone else. - If user is omitted, you mute yourself. Otherwise, the user with the username [user] is muted. -mumctl server add [--port ] [ | ] :: - Add a saved server configuration. + If user is omitted, you mute yourself. Otherwise, that user is muted. + +mumctl server add NAME HOST [--port PORT] [USERNAME] [PASSWORD] + + Add a new saved server configuration. + +mumctl server config SERVER KEY VALUE -mumctl server config :: Configure a variable in a saved server configuration. -mumctl server list :: + See mumdrc(5) for available keys. + +mumctl server list + List all saved servers and how many are connected to them. -mumctl server remove :: +mumctl server remove NAME + Remove a saved server. -mumctl server rename :: +mumctl server rename OLD_NAME NEW_NAME + Rename a saved server. -mumctl status :: - Show the currently conneced channel and server. +mumctl status + + Show the currently connected channel and server. + +mumctl undeafen -mumctl undeafen :: Undeafen yourself. -mumctl unmute [user] :: +mumctl unmute [USER] + Unmute yourself or someone else. - If user is omitted, unmute yourself. Otherwise, the user with the username [user] is unmuted. -mumctl volume set :: - Set the outgoing volume level. + If user is omitted, unmute yourself. Otherwise, that user is unmuted. + +mumctl volume VOLUME + + Set the volume of outgoing audio. + 1.0 is the default. -mumctl volume set :: +mumctl volume USER VOLUME + Set the volume of another user's incoming audio. + 1.0 is the default. Authors diff --git a/documentation/mumd.1 b/documentation/mumd.1 index 8d5dcc4..777159c 100644 --- a/documentation/mumd.1 +++ b/documentation/mumd.1 @@ -1,13 +1,13 @@ '\" t .\" Title: mumd .\" Author: [see the "AUTHOR(S)" section] -.\" Generator: Asciidoctor 2.0.15 -.\" Date: 2021-04-10 +.\" Generator: Asciidoctor 2.0.17 +.\" Date: 2022-04-07 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" -.TH "MUMD" "1" "2021-04-10" "\ \&" "\ \&" +.TH "MUMD" "1" "2022-04-07" "\ \&" "\ \&" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 diff --git a/documentation/mumdrc.5 b/documentation/mumdrc.5 index 00e8265..4491273 100644 --- a/documentation/mumdrc.5 +++ b/documentation/mumdrc.5 @@ -1,13 +1,13 @@ '\" t .\" Title: mumdrc .\" Author: [see the "AUTHOR(S)" section] -.\" Generator: Asciidoctor 2.0.15 -.\" Date: 2021-06-08 +.\" Generator: Asciidoctor 2.0.17 +.\" Date: 2022-10-03 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" -.TH "MUMDRC" "5" "2021-06-08" "\ \&" "\ \&" +.TH "MUMDRC" "5" "2022-10-03" "\ \&" "\ \&" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 @@ -36,56 +36,115 @@ using mumctl(1). .sp The following configuration values are supported: .sp -accept_all_invalid_certs -.RS 4 +\fBaccept_all_invalid_certs\fP +.sp +.if n .RS 4 +.nf +.fam C Whether to connect to a server that supplies an invalid server certificate. +.fam +.fi +.if n .RE +.sp +.if n .RS 4 +.nf +.fam C This is overriden by server\-specific settings. Default false. -.RE +.fam +.fi +.if n .RE .sp audio.input_volume -.RS 4 +.sp +.if n .RS 4 +.nf +.fam C Default 1.0. -.RE +.fam +.fi +.if n .RE .sp audio.output_volume -.RS 4 +.sp +.if n .RS 4 +.nf +.fam C Default 1.0. -.RE +.fam +.fi +.if n .RE .sp Servers are specified as [[servers]]\-entries and support the following variables: .sp host -.RS 4 +.sp +.if n .RS 4 +.nf +.fam C IP or URL of the server. -.RE +.fam +.fi +.if n .RE .sp name -.RS 4 +.sp +.if n .RS 4 +.nf +.fam C Custom alias for the server. -.RE +.fam +.fi +.if n .RE .sp port -.RS 4 +.sp +.if n .RS 4 +.nf +.fam C The port to connect to. (Optional) -.RE +.fam +.fi +.if n .RE .sp username -.RS 4 +.sp +.if n .RS 4 +.nf +.fam C The username to connect with. (Optional) -.RE +.fam +.fi +.if n .RE .sp password -.RS 4 +.sp +.if n .RS 4 +.nf +.fam C The password to supply to the server. (Optional) -.RE +.fam +.fi +.if n .RE .sp accept_invalid_cert -.RS 4 +.sp +.if n .RS 4 +.nf +.fam C Whether to connect to this server even if it supplies an invalid server -certificate. This overrides the global accept_all_invalid_certs if set. -Default false. -.RE +certificate. +.fam +.fi +.if n .RE +.sp +.if n .RS 4 +.nf +.fam C +If set, this overrides the global accept_all_invalid_certs. Default false. +.fam +.fi +.if n .RE .SH "AUTHORS" .sp Gustav Sörnäs and Eskil Queseth. diff --git a/documentation/mumdrc.txt b/documentation/mumdrc.txt index 0579581..365519c 100644 --- a/documentation/mumdrc.txt +++ b/documentation/mumdrc.txt @@ -14,38 +14,49 @@ using mumctl(1). The following configuration values are supported: -accept_all_invalid_certs :: +*accept_all_invalid_certs* + Whether to connect to a server that supplies an invalid server certificate. + This is overriden by server-specific settings. Default false. -audio.input_volume :: +audio.input_volume + Default 1.0. -audio.output_volume :: +audio.output_volume + Default 1.0. Servers are specified as \[[servers]]-entries and support the following variables: -host :: +host + IP or URL of the server. -name :: +name + Custom alias for the server. -port :: +port + The port to connect to. (Optional) -username :: +username + The username to connect with. (Optional) -password :: +password + The password to supply to the server. (Optional) -accept_invalid_cert :: +accept_invalid_cert + Whether to connect to this server even if it supplies an invalid server - certificate. This overrides the global accept_all_invalid_certs if set. - Default false. + certificate. + + If set, this overrides the global accept_all_invalid_certs. Default false. Authors ------- diff --git a/mum/src/bin/mumctl.rs b/mum/src/bin/mumctl.rs index 7f12fe6..9cb671d 100644 --- a/mum/src/bin/mumctl.rs +++ b/mum/src/bin/mumctl.rs @@ -52,6 +52,15 @@ struct Mum { #[derive(Debug, Subcommand)] enum Command { + /// Handle channels in the connected server + #[clap(subcommand)] + Channel(Channel), + /// Output CLI completions + Completions(Completions), + /// Change config values + Config { key: String, value: String }, + /// Reload the config file + ConfigReload, /// Connect to a server Connect { host: String, @@ -62,45 +71,36 @@ enum Command { #[clap(long = "accept-invalid-cert")] accept_invalid_cert: bool, }, - /// Disconnect from the currently connected server - Disconnect, - /// Handle servers - #[clap(subcommand)] - Server(Server), - /// Handle channels in the connected server - #[clap(subcommand)] - Channel(Channel), - /// Show current status - Status, - /// Change config values - Config { key: String, value: String }, - /// Reload the config file - ConfigReload, - /// Output CLI completions - Completions(Completions), - /// Change volume of either you or someone else - Volume { user: String, volume: Option }, - /// Mute someone/yourself - Mute { user: Option }, - /// Unmute someone/yourself - Unmute { user: Option }, /// Deafen yourself Deafen, - /// Undeafen yourself - Undeafen, - /// Get messages sent to the server you're currently connected to - Messages { + /// Disconnect from the currently connected server + Disconnect, + /// Get events that have happened since we connected + Events { #[clap(short = 'f', long = "follow")] follow: bool, }, /// Send a message to a channel or a user #[clap(subcommand)] Message(Target), - /// Get events that have happened since we connected - Events { + /// Get messages sent to the server you're currently connected to + Messages { #[clap(short = 'f', long = "follow")] follow: bool, }, + /// Mute someone/yourself + Mute { user: Option }, + /// Handle servers + #[clap(subcommand)] + Server(Server), + /// Show current status + Status, + /// Undeafen yourself + Undeafen, + /// Unmute someone/yourself + Unmute { user: Option }, + /// Change volume of either you or someone else + Volume { user: String, volume: Option }, } #[derive(Debug, Subcommand)] @@ -124,14 +124,6 @@ enum Target { #[derive(Debug, Subcommand)] enum Server { - /// Configure a saved server - Config { - server_name: Option, - key: Option, - value: Option, - }, - /// Rename a saved server - Rename { old_name: String, new_name: String }, /// Add a new saved server Add { name: String, @@ -142,21 +134,29 @@ enum Server { #[clap(requires = "username")] password: Option, }, - /// Remove a saved server - Remove { name: String }, + /// Configure a saved server + Config { + server_name: Option, + key: Option, + value: Option, + }, /// List saved servers and number of people connected List, + /// Rename a saved server + Rename { old_name: String, new_name: String }, + /// Remove a saved server + Remove { name: String }, } #[derive(Debug, Subcommand)] enum Channel { + Connect { + name: String, + }, List { #[clap(short = 's', long = "short")] short: bool, }, - Connect { - name: String, - }, } #[derive(Debug, Parser)] From 0099bb2dcc66a897b8225709f4f3bcbfd9f3cb26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Mon, 3 Oct 2022 16:45:34 +0200 Subject: [PATCH 4/7] changelog 0.5.0 --- CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index e51da8e..d1089f2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,9 @@ Unreleased ---------- +0.5.0 - 2022-10-03 +------------------ + Major changes: - Instead of four crates we now have only two. mumd and mumctl were merged into From d7d0a1669f538d23ba5be6427ec4762fa67e2837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Mon, 3 Oct 2022 17:05:13 +0200 Subject: [PATCH 5/7] bump versions --- Cargo.lock | 220 ++++++++++++++++++++++++++----------------------- mum/Cargo.toml | 4 +- 2 files changed, 119 insertions(+), 105 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9f43821..02122fa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -44,6 +44,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "audiopus_sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62314a1546a2064e033665d658e88c620a62904be945f8147e6b16c3db9f8651" +dependencies = [ + "cmake", + "log", + "pkg-config", +] + [[package]] name = "autocfg" version = "1.1.0" @@ -205,6 +216,15 @@ dependencies = [ "os_str_bytes", ] +[[package]] +name = "cmake" +version = "0.1.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8ad8cef104ac57b68b89df3208164d228503abbdce70f6880ffa3d970e7443a" +dependencies = [ + "cc", +] + [[package]] name = "colored" version = "2.0.0" @@ -263,63 +283,34 @@ dependencies = [ [[package]] name = "cpal" -version = "0.13.5" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74117836a5124f3629e4b474eed03e479abaf98988b4bb317e29f08cfe0e4116" +checksum = "7d466b47cf0ea4100186a7c12d7d0166813dda7cf648553554c9c39c6324841b" dependencies = [ "alsa", "core-foundation-sys", "coreaudio-rs", "jni", "js-sys", - "lazy_static", "libc", "mach", - "ndk", - "ndk-glue", + "ndk 0.7.0", + "ndk-context", "nix", "oboe", + "once_cell", "parking_lot", "stdweb", "thiserror", "web-sys", - "winapi", -] - -[[package]] -name = "darling" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn", + "windows", ] [[package]] -name = "darling_macro" -version = "0.13.4" +name = "cty" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" -dependencies = [ - "darling_core", - "quote", - "syn", -] +checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" [[package]] name = "dasp_envelope" @@ -456,12 +447,6 @@ dependencies = [ "log", ] -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - [[package]] name = "foreign-types" version = "0.3.2" @@ -663,12 +648,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - [[package]] name = "indexmap" version = "1.9.1" @@ -949,50 +928,45 @@ checksum = "2032c77e030ddee34a6787a64166008da93f6a352b629261d0fee232b8742dd4" dependencies = [ "bitflags", "jni-sys", - "ndk-sys", + "ndk-sys 0.3.0", "num_enum", "thiserror", ] [[package]] -name = "ndk-context" -version = "0.1.1" +name = "ndk" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" +checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" +dependencies = [ + "bitflags", + "jni-sys", + "ndk-sys 0.4.0", + "num_enum", + "raw-window-handle", + "thiserror", +] [[package]] -name = "ndk-glue" -version = "0.6.2" +name = "ndk-context" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d0c4a7b83860226e6b4183edac21851f05d5a51756e97a1144b7f5a6b63e65f" -dependencies = [ - "lazy_static", - "libc", - "log", - "ndk", - "ndk-context", - "ndk-macro", - "ndk-sys", -] +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" [[package]] -name = "ndk-macro" +name = "ndk-sys" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0df7ac00c4672f9d5aece54ee3347520b7e20f158656c7db2e6de01902eb7a6c" +checksum = "6e5a6ae77c8ee183dcbbba6150e2e6b9f3f4196a7666c02a715a95692ec1fa97" dependencies = [ - "darling", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn", + "jni-sys", ] [[package]] name = "ndk-sys" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e5a6ae77c8ee183dcbbba6150e2e6b9f3f4196a7666c02a715a95692ec1fa97" +checksum = "21d83ec9c63ec5bf950200a8e508bdad6659972187b625469f58ef8c08e29046" dependencies = [ "jni-sys", ] @@ -1088,7 +1062,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27f63c358b4fa0fbcfefd7c8be5cfc39c08ce2389f5325687e7762a48d30a5c1" dependencies = [ "jni", - "ndk", + "ndk 0.6.0", "ndk-context", "num-derive", "num-traits", @@ -1166,22 +1140,12 @@ dependencies = [ [[package]] name = "opus" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e9059a7daf1e6665eb88c4a95ca9ff393a6d276fd66e9d85191280d7e5ec18b" -dependencies = [ - "libc", - "opus-sys", -] - -[[package]] -name = "opus-sys" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad8b294f482f7972fa466b1c64d5a564e4ee6975599d80483ee4fa83f25b6ec" +checksum = "6526409b274a7e98e55ff59d96aafd38e6cd34d46b7dbbc32ce126dffcd75e8e" dependencies = [ + "audiopus_sys", "libc", - "pkg-config", ] [[package]] @@ -1192,27 +1156,25 @@ checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff" [[package]] name = "parking_lot" -version = "0.11.2" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ - "instant", "lock_api", "parking_lot_core", ] [[package]] name = "parking_lot_core" -version = "0.8.5" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" dependencies = [ "cfg-if", - "instant", "libc", "redox_syscall", "smallvec", - "winapi", + "windows-sys", ] [[package]] @@ -1317,6 +1279,15 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "raw-window-handle" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed7e3d950b66e19e0c372f3fa3fbbcf85b1746b571f74e0c2af6042a5c93420a" +dependencies = [ + "cty", +] + [[package]] name = "redox_syscall" version = "0.2.16" @@ -1458,9 +1429,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "socket2" @@ -1791,17 +1762,30 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57b543186b344cc61c85b5aab0d2e3adf4e0f99bc076eff9aa5927bcc0b8a647" +dependencies = [ + "windows_aarch64_msvc 0.37.0", + "windows_i686_gnu 0.37.0", + "windows_i686_msvc 0.37.0", + "windows_x86_64_gnu 0.37.0", + "windows_x86_64_msvc 0.37.0", +] + [[package]] name = "windows-sys" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" dependencies = [ - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_msvc", + "windows_aarch64_msvc 0.36.1", + "windows_i686_gnu 0.36.1", + "windows_i686_msvc 0.36.1", + "windows_x86_64_gnu 0.36.1", + "windows_x86_64_msvc 0.36.1", ] [[package]] @@ -1810,26 +1794,56 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +[[package]] +name = "windows_aarch64_msvc" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2623277cb2d1c216ba3b578c0f3cf9cdebeddb6e66b1b218bb33596ea7769c3a" + [[package]] name = "windows_i686_gnu" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +[[package]] +name = "windows_i686_gnu" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3925fd0b0b804730d44d4b6278c50f9699703ec49bcd628020f46f4ba07d9e1" + [[package]] name = "windows_i686_msvc" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +[[package]] +name = "windows_i686_msvc" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce907ac74fe331b524c1298683efbf598bb031bc84d5e274db2083696d07c57c" + [[package]] name = "windows_x86_64_gnu" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +[[package]] +name = "windows_x86_64_gnu" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2babfba0828f2e6b32457d5341427dcbb577ceef556273229959ac23a10af33d" + [[package]] name = "windows_x86_64_msvc" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4dd6dc7df2d84cf7b33822ed5b86318fb1781948e9663bacd047fc9dd52259d" diff --git a/mum/Cargo.toml b/mum/Cargo.toml index 208aabd..dbc2a54 100644 --- a/mum/Cargo.toml +++ b/mum/Cargo.toml @@ -26,7 +26,7 @@ clap = { version = "4.0.2", features = ["derive"] } clap_complete = "4.0.1" chrono = { version = "0.4.19", features = [ "serde" ] } colored = "2.0.0" -cpal = "0.13.5" +cpal = "0.14.0" dasp_interpolate = { version = "0.11.0", features = ["linear"] } dasp_ring_buffer = "0.11.0" dasp_signal = "0.11.0" @@ -36,7 +36,7 @@ hound = "3.4.0" log = "0.4.16" mumble-protocol = "0.4.1" native-tls = "0.2.10" -opus = "0.2.1" +opus = "0.3.0" serde = { version = "1.0.136", features = ["derive"] } strum = "0.24.0" strum_macros = "0.24.0" From 299e74df49ac419790174d01639b969164a88ee1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Mon, 3 Oct 2022 17:05:36 +0200 Subject: [PATCH 6/7] [[servers]] is array_of_table --- mum/src/bin/mumctl.rs | 64 +++++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 29 deletions(-) diff --git a/mum/src/bin/mumctl.rs b/mum/src/bin/mumctl.rs index 9cb671d..7c136e7 100644 --- a/mum/src/bin/mumctl.rs +++ b/mum/src/bin/mumctl.rs @@ -14,7 +14,9 @@ use std::os::unix::net::UnixStream; use std::path::Path; use std::thread; use toml_edit::ser::to_item; -use toml_edit::{value as toml_value, Document, Item as TomlItem, Table, Value as TomlValue}; +use toml_edit::{ + value as toml_value, ArrayOfTables, Document, Item as TomlItem, Table, Value as TomlValue, +}; const INDENTATION: &str = " "; @@ -532,11 +534,9 @@ fn match_server_command( .find(|(_, s)| s.name == server_name) .ok_or(CliError::NoServerFound(server_name))?; let server_document = document["servers"] - .as_array_mut() + .as_array_of_tables_mut() .unwrap() .get_mut(server_index) - .unwrap() - .as_inline_table_mut() .unwrap(); match (key.as_deref(), value) { @@ -612,25 +612,27 @@ fn match_server_command( return Err(CliError::UseServerRename.into()); } (Some("host"), Some(value)) => { - server_document["host"] = TomlValue::from(value); + server_document["host"] = TomlItem::Value(TomlValue::from(value)); maybe_write_config(&config_path, document.to_string())?; } (Some("port"), Some(value)) => { - server_document["port"] = TomlValue::from(value.parse::().unwrap()); + server_document["port"] = + TomlItem::Value(TomlValue::from(value.parse::().unwrap())); maybe_write_config(&config_path, document.to_string())?; } (Some("username"), Some(value)) => { - server_document["username"] = TomlValue::from(value); + server_document["username"] = TomlItem::Value(TomlValue::from(value)); maybe_write_config(&config_path, document.to_string())?; } (Some("password"), Some(value)) => { - server_document["password"] = TomlValue::from(value); + server_document["password"] = TomlItem::Value(TomlValue::from(value)); maybe_write_config(&config_path, document.to_string())?; //TODO ask stdin if empty } (Some("accept_invalid_cert"), Some(value)) => match value.parse::() { Ok(b) => { - server_document["accept_invalid_cert"] = TomlValue::from(b); + server_document["accept_invalid_cert"] = + TomlItem::Value(TomlValue::from(b)); maybe_write_config(&config_path, document.to_string())?; } Err(e) => warn!("{}", e), @@ -642,15 +644,12 @@ fn match_server_command( } Server::Rename { old_name, new_name } => { document["servers"] - .as_array_mut() + .as_array_of_tables_mut() .unwrap() .iter_mut() - .find(|server| { - server.as_inline_table().unwrap()["name"].as_str().unwrap() == old_name - }) - .ok_or(CliError::NoServerFound(old_name))? - .as_inline_table_mut() - .unwrap()["name"] = TomlValue::from(new_name); + .find(|server| server["name"].as_str().unwrap() == old_name) + .ok_or(CliError::NoServerFound(old_name))?["name"] = + TomlItem::Value(TomlValue::from(new_name)); maybe_write_config(&config_path, document.to_string())?; } Server::Add { @@ -663,19 +662,23 @@ fn match_server_command( if config.servers.iter().flatten().any(|s| s.name == name) { return Err(CliError::ServerAlreadyExists(name).into()); } else { - document["servers"].as_array_mut().unwrap().push( - to_item(&ServerConfig { - name, - host, - port, - username, - password, - accept_invalid_cert: None, - }) + document["servers"] + .or_insert(TomlItem::ArrayOfTables(ArrayOfTables::new())) + .as_array_of_tables_mut() .unwrap() - .as_value() - .unwrap(), - ); + .push( + to_item(&ServerConfig { + name, + host, + port, + username, + password, + accept_invalid_cert: None, + }) + .unwrap() + .into_table() + .unwrap(), + ); maybe_write_config(&config_path, document.to_string())?; } } @@ -686,7 +689,10 @@ fn match_server_command( .flatten() .position(|s| s.name == name) .ok_or(CliError::NoServerFound(name))?; - document["servers"].as_array_mut().unwrap().remove(idx); + document["servers"] + .as_array_of_tables_mut() + .unwrap() + .remove(idx); maybe_write_config(&config_path, document.to_string())?; } Server::List => { From 1d98d82a124bb71dd8068df052082eb8b3fc9b9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Mon, 3 Oct 2022 17:06:04 +0200 Subject: [PATCH 7/7] update release-checklist --- RELEASE-CHECKLIST.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/RELEASE-CHECKLIST.md b/RELEASE-CHECKLIST.md index a105fdb..a4050a9 100644 --- a/RELEASE-CHECKLIST.md +++ b/RELEASE-CHECKLIST.md @@ -6,9 +6,7 @@ - Run `$ cargo update`. - Check `$ cargo outdated`. -- Build final version: - - `$ MUM_VERSION=x.y.z RUSTFLAGS="--remap-path-prefix=$(pwd)=" cargo build --release` - - `$ cp target/release/mum{ctl,d}` +- Build final version: `$ MUM_VERSION=x.y.z RUSTFLAGS="--remap-path-prefix=$(pwd)=" cargo install --locked --path mum` - Basic test: - Check `--version`. - Connect to server. @@ -21,13 +19,11 @@ # Publish to Github -- Set the version header and today's date in the changelog. +- Add the version header and today's date in the changelog. - Create a new "Unreleased" header. -- Final commits: - - Cargo.lock and Cargo.toml. - - Updated changelog. -- Create a tag: `$ git tag vx.y.z`. +- Make sure everything is commited and published. - Merge into main: `$ git switch main && git merge --no-ff x.y`. +- Create a tag: `$ git tag vx.y.z`. - Push both branches and the tag. - Create a new release on Github targeting the pushed tag. - Copy the changelog (change headers to `##`-headers).