From f194c5efbc8fdf7698e4ec608643720a40bcfa9d Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sun, 30 Apr 2017 11:49:25 +0300 Subject: [PATCH] Rename nncp-*cfg commands to have the common prefix --- common.mk | 16 +++--- doc/cmds.texi | 54 +++++++++---------- doc/news.ru.texi | 5 ++ doc/news.texi | 5 ++ doc/usecases.ru.texi | 2 +- doc/usecases.texi | 2 +- ports/nncp/Makefile | 4 +- .../cmd/{nncp-mincfg => nncp-cfgmin}/main.go | 2 +- .../cmd/{nncp-newcfg => nncp-cfgnew}/main.go | 2 +- 9 files changed, 51 insertions(+), 41 deletions(-) rename src/cypherpunks.ru/nncp/cmd/{nncp-mincfg => nncp-cfgmin}/main.go (97%) rename src/cypherpunks.ru/nncp/cmd/{nncp-newcfg => nncp-cfgnew}/main.go (97%) diff --git a/common.mk b/common.mk index c6559e2..02dee66 100644 --- a/common.mk +++ b/common.mk @@ -19,14 +19,14 @@ LDFLAGS = \ ALL = \ nncp-call \ nncp-caller \ + nncp-cfgmin \ + nncp-cfgnew \ nncp-check \ nncp-daemon \ nncp-file \ nncp-freq \ nncp-log \ nncp-mail \ - nncp-mincfg \ - nncp-newcfg \ nncp-pkt \ nncp-reass \ nncp-rm \ @@ -42,6 +42,12 @@ nncp-call: nncp-caller: GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)" cypherpunks.ru/nncp/cmd/nncp-caller +nncp-cfgmin: + GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)" cypherpunks.ru/nncp/cmd/nncp-cfgmin + +nncp-cfgnew: + GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)" cypherpunks.ru/nncp/cmd/nncp-cfgnew + nncp-check: GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)" cypherpunks.ru/nncp/cmd/nncp-check @@ -60,12 +66,6 @@ nncp-log: nncp-mail: GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)" cypherpunks.ru/nncp/cmd/nncp-mail -nncp-mincfg: - GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)" cypherpunks.ru/nncp/cmd/nncp-mincfg - -nncp-newcfg: - GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)" cypherpunks.ru/nncp/cmd/nncp-newcfg - nncp-pkt: GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)" cypherpunks.ru/nncp/cmd/nncp-pkt diff --git a/doc/cmds.texi b/doc/cmds.texi index 58a906d..dc4b4ef 100644 --- a/doc/cmds.texi +++ b/doc/cmds.texi @@ -82,6 +82,32 @@ file is renamed from @file{.part} one and when you rerun @command{nncp-call} again, remote node will receive completion notification. +@node nncp-cfgmin +@section nncp-cfgmin + +@verbatim +% nncp-cfgmin [options] > stripped.yaml +@end verbatim + +Print out stripped configuration version: only path to @ref{Spool, +spool}, path to log file, neighbours public keys are stayed. This is +useful mainly for usage with @ref{nncp-xfer} that has to know only +neighbours, without private keys involving. + +@node nncp-cfgnew +@section nncp-cfgnew + +@verbatim +% nncp-cfgnew [options] > new.yaml +@end verbatim + +Generate new node configuration: private keys, example configuration +file and print it to stdout. You must use this command when you setup +the new node. + +Pay attention that private keys generation consumes an entropy from your +operating system. + @node nncp-check @section nncp-check @@ -185,32 +211,6 @@ side will execute specified @ref{CfgSendmail, sendmail} command with @option{USER}s appended as a command line argument and feed decompressed mail body to that command's stdin. -@node nncp-mincfg -@section nncp-mincfg - -@verbatim -% nncp-mincfg [options] > stripped.yaml -@end verbatim - -Print out stripped configuration version: only path to @ref{Spool, -spool}, path to log file, neighbours public keys are stayed. This is -useful mainly for usage with @ref{nncp-xfer} that has to know only -neighbours, without private keys involving. - -@node nncp-newcfg -@section nncp-newcfg - -@verbatim -% nncp-newcfg [options] > new.yaml -@end verbatim - -Generate new node configuration: private keys, example configuration -file and print it to stdout. You must use this command when you setup -the new node. - -Pay attention that private keys generation consumes an entropy from your -operating system. - @node nncp-pkt @section nncp-pkt @@ -370,7 +370,7 @@ remove them. @option{-rx} option tells only to move inbound packets addressed to us. @option{-tx} option tells exactly the opposite: move only outbound packets. -@ref{nncp-mincfg} could be useful for creating stripped minimalistic +@ref{nncp-cfgmin} could be useful for creating stripped minimalistic configuration file version without any private keys. @file{DIR} directory has the following structure: diff --git a/doc/news.ru.texi b/doc/news.ru.texi index 289be52..dccde59 100644 --- a/doc/news.ru.texi +++ b/doc/news.ru.texi @@ -24,6 +24,11 @@ @item Опция @option{-minsize} задётся в KiB, а не байтах, для удобства. +@item +Команда @command{nncp-newcfg} переименована в @command{nncp-cfgnew}, +а @command{nncp-mincfg} в @command{nncp-cfgmin}, для того чтобы они +имели общий префикс и были сгруппированы для удобства. + @item Обновлены зависимые криптографические библиотеки. @end itemize diff --git a/doc/news.texi b/doc/news.texi index d080ea2..5dec744 100644 --- a/doc/news.texi +++ b/doc/news.texi @@ -27,6 +27,11 @@ entry. Useful for transferring big files over small storage devices. @option{-minsize} option is specified in KiBs, not bytes, for convenience. +@item +@command{nncp-newcfg} command is renamed to @command{nncp-cfgnew}, +and @command{nncp-mincfg} to @command{nncp-cfgmin} -- now they have +common prefix and are grouped together for convenience. + @item Cryptographic libraries (dependecies) are updated. @end itemize diff --git a/doc/usecases.ru.texi b/doc/usecases.ru.texi index dee3a32..19885c7 100644 --- a/doc/usecases.ru.texi +++ b/doc/usecases.ru.texi @@ -294,5 +294,5 @@ Bluetooth и WiFi могут быть и довольно быстрыми, по вы не "распаковываете" эти пакеты сразу же на том же самом устройстве. Распаковка (чтение этих зашифрованных пакетов с извлечением переданных файлов и почтовых сообщений) может и должна бы быть произведена на -отдельном компьютере (@ref{nncp-mincfg} команда может помочь с созданием +отдельном компьютере (@ref{nncp-cfgmin} команда может помочь с созданием конфигурационного файла без приватных ключей для этой цели). diff --git a/doc/usecases.texi b/doc/usecases.texi index 65d1c60..5f8fdcb 100644 --- a/doc/usecases.texi +++ b/doc/usecases.texi @@ -274,5 +274,5 @@ and so on -- it is not so bad, because you are not carrying private keys with it (don't you?), you do not "toss" those packets immediately on the same device. Tossing (reading those encrypted packets and extracting transferred files and mail messages) could and should be done on a -separate computer (@ref{nncp-mincfg} command could help creating +separate computer (@ref{nncp-cfgmin} command could help creating configuration file without private keys for that purpose). diff --git a/ports/nncp/Makefile b/ports/nncp/Makefile index 2043075..7e2fcb6 100644 --- a/ports/nncp/Makefile +++ b/ports/nncp/Makefile @@ -28,14 +28,14 @@ INSTALL_TARGET= install-strip PLIST_FILES= bin/nncp-call \ bin/nncp-caller \ + bin/nncp-cfgmin \ + bin/nncp-cfgnew \ bin/nncp-check \ bin/nncp-daemon \ bin/nncp-file \ bin/nncp-freq \ bin/nncp-log \ bin/nncp-mail \ - bin/nncp-mincfg \ - bin/nncp-newcfg \ bin/nncp-pkt \ bin/nncp-reass \ bin/nncp-rm \ diff --git a/src/cypherpunks.ru/nncp/cmd/nncp-mincfg/main.go b/src/cypherpunks.ru/nncp/cmd/nncp-cfgmin/main.go similarity index 97% rename from src/cypherpunks.ru/nncp/cmd/nncp-mincfg/main.go rename to src/cypherpunks.ru/nncp/cmd/nncp-cfgmin/main.go index 5b5fdf5..48df34e 100644 --- a/src/cypherpunks.ru/nncp/cmd/nncp-mincfg/main.go +++ b/src/cypherpunks.ru/nncp/cmd/nncp-cfgmin/main.go @@ -32,7 +32,7 @@ import ( func usage() { fmt.Fprintf(os.Stderr, nncp.UsageHeader()) - fmt.Fprintln(os.Stderr, "nncp-mincfg -- print stripped configuration\n") + fmt.Fprintln(os.Stderr, "nncp-cfgmin -- print stripped configuration\n") fmt.Fprintf(os.Stderr, "Usage: %s [options]\nOptions:\n", os.Args[0]) flag.PrintDefaults() } diff --git a/src/cypherpunks.ru/nncp/cmd/nncp-newcfg/main.go b/src/cypherpunks.ru/nncp/cmd/nncp-cfgnew/main.go similarity index 97% rename from src/cypherpunks.ru/nncp/cmd/nncp-newcfg/main.go rename to src/cypherpunks.ru/nncp/cmd/nncp-cfgnew/main.go index cd36aa9..2601d46 100644 --- a/src/cypherpunks.ru/nncp/cmd/nncp-newcfg/main.go +++ b/src/cypherpunks.ru/nncp/cmd/nncp-cfgnew/main.go @@ -30,7 +30,7 @@ import ( func usage() { fmt.Fprintf(os.Stderr, nncp.UsageHeader()) - fmt.Fprintln(os.Stderr, "nncp-newcfg -- generate new configuration and keys\nOptions:") + fmt.Fprintln(os.Stderr, "nncp-cfgnew -- generate new configuration and keys\nOptions:") flag.PrintDefaults() } -- 2.44.0