Rename project to muscl

This commit is contained in:
2025-11-26 03:38:31 +09:00
parent 805c2d11ff
commit a4acfe91af
16 changed files with 88 additions and 88 deletions

View File

@@ -88,15 +88,15 @@ pub enum ClientCommand {
///
/// Enable privileges `SELECT`, `INSERT`, and `UPDATE` for user `my_user` on database `my_db`:
///
/// `mysqladm edit-db-privs -p my_db:my_user:siu`
/// `muscl edit-db-privs -p my_db:my_user:siu`
///
/// Enable all privileges for user `my_other_user` on database `my_other_db`:
///
/// `mysqladm edit-db-privs -p my_other_db:my_other_user:A`
/// `muscl edit-db-privs -p my_other_db:my_other_user:A`
///
/// Set miscellaneous privileges for multiple users on database `my_db`:
///
/// `mysqladm edit-db-privs my_db -p my_user:siu my_other_user:ct``
/// `muscl edit-db-privs my_db -p my_user:siu my_other_user:ct``
///
#[command(verbatim_doc_comment)]
EditDbPrivs(EditDbPrivsArgs),

View File

@@ -52,8 +52,8 @@ The Y/N-values corresponds to the following mysql privileges:
/// Create, drop or edit permissions for the DATABASE(s),
/// as determined by the COMMAND.
///
/// This is a compatibility layer for the mysql-dbadm command.
/// Please consider using the newer mysqladm command instead.
/// This is a compatibility layer for the 'mysql-dbadm' command.
/// Please consider using the newer 'muscl' command instead.
#[derive(Parser)]
#[command(
bin_name = "mysql-dbadm",
@@ -93,7 +93,7 @@ pub struct Args {
// NOTE: mysql-dbadm explicitly calls privileges "permissions".
// This is something we're trying to move away from.
// See https://git.pvv.ntnu.no/Projects/mysqladm-rs/issues/29
// See https://git.pvv.ntnu.no/Projects/muscl/issues/29
#[derive(Parser)]
pub enum Command {
/// create the DATABASE(s).

View File

@@ -28,8 +28,8 @@ use crate::{
/// Create, delete or change password for the USER(s),
/// as determined by the COMMAND.
///
/// This is a compatibility layer for the mysql-useradm command.
/// Please consider using the newer mysqladm command instead.
/// This is a compatibility layer for the 'mysql-useradm' command.
/// Please consider using the newer 'muscl' command instead.
#[derive(Parser)]
#[command(
bin_name = "mysql-useradm",

View File

@@ -4,8 +4,8 @@ use nix::unistd::{Group as LibcGroup, User as LibcUser};
#[cfg(not(target_os = "macos"))]
use std::ffi::CString;
pub const DEFAULT_CONFIG_PATH: &str = "/etc/mysqladm/config.toml";
pub const DEFAULT_SOCKET_PATH: &str = "/run/mysqladm/mysqladm.sock";
pub const DEFAULT_CONFIG_PATH: &str = "/etc/muscl/config.toml";
pub const DEFAULT_SOCKET_PATH: &str = "/run/muscl/muscl.sock";
pub struct UnixUser {
pub username: String,

View File

@@ -37,7 +37,7 @@ mod core;
/// You are only allowed to manage databases and users that are prefixed with
/// either your username, or a group that you are a member of.
#[derive(Parser, Debug)]
#[command(bin_name = "mysqladm", version, about, disable_help_subcommand = true)]
#[command(bin_name = "muscl", version, about, disable_help_subcommand = true)]
struct Args {
#[command(subcommand)]
command: Command,
@@ -83,14 +83,14 @@ struct GenerateCompletionArgs {
#[arg(long, default_value = "bash")]
shell: Shell,
#[arg(long, default_value = "mysqladm")]
#[arg(long, default_value = "muscl")]
command: ToplevelCommands,
}
#[cfg(feature = "mysql-admutils-compatibility")]
#[derive(ValueEnum, Debug, Clone)]
enum ToplevelCommands {
Mysqladm,
Muscl,
MysqlDbadm,
MysqlUseradm,
}
@@ -167,7 +167,7 @@ fn handle_generate_completions_command(args: &Args) -> anyhow::Result<Option<()>
"The executable should not be SUID or SGID when generating completions"
);
let mut cmd = match completion_args.command {
ToplevelCommands::Mysqladm => Args::command(),
ToplevelCommands::Muscl => Args::command(),
#[cfg(feature = "mysql-admutils-compatibility")]
ToplevelCommands::MysqlDbadm => mysql_dbadm::Args::command(),
#[cfg(feature = "mysql-admutils-compatibility")]