Sophie

Sophie

distrib > Mageia > 8 > x86_64 > by-pkgid > 9c75c594d584180980e31ac4bc9c4072 > files > 3

etcd-3.4.14-1.mga8.src.rpm

diff -up etcd-3.4.13/etcdctl/ctlv2/ctl.go.orig2 etcd-3.4.13/etcdctl/ctlv2/ctl.go
--- etcd-3.4.13/etcdctl/ctlv2/ctl.go.orig2	2020-08-24 21:11:28.000000000 +0200
+++ etcd-3.4.13/etcdctl/ctlv2/ctl.go	2020-09-04 00:13:47.552811076 +0200
@@ -36,6 +36,68 @@ func Start() {
 	}
 	app.Usage = "A simple command line client for etcd."
 
+	cli.AppHelpTemplate = `.TH "ETCD" "1" " etcd User Manuals" "Etcd contributors" "Nov 2017"  ""
+.SH NAME:
+{{.Name}} - {{.Usage}}
+
+{{if .Version}}
+.SH VERSION:
+   {{.Version}}
+{{end}}
+
+.SH USAGE:
+   {{.HelpName}} {{if .VisibleFlags}}[global options]{{end}}{{if .Commands}} command [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}
+   {{if .Commands}}
+
+.SH COMMANDS:
+{{range .Commands}}{{if not .HideHelp}}\fB{{ .Name }}\fP{{ "\n\t\t\t" }}{{.Usage}}{{ "\n" }}
+
+{{end}}{{end}}{{end}}{{if .VisibleFlags}}
+
+.SH GLOBAL OPTIONS:
+{{range .VisibleFlags}}{{ . }}
+
+{{end}}{{end}}
+
+.SH SEE ALSO
+{{range .Commands}}{{if not .HideHelp}}{{if ne .Name "help" }}\fBetcdctl-{{ .Name }}(1)\fP,
+{{end}}{{end}}{{end}}
+`
+
+	cli.CommandHelpTemplate = `.TH "ETCD" "1" " etcd User Manuals" "Etcd contributors" "Nov 2017"  ""
+.SH NAME:
+   {{.HelpName}} - {{.Usage}}
+
+.SH USAGE:
+   {{.HelpName}}{{if .VisibleFlags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}
+
+{{if .VisibleFlags}}
+.SH OPTIONS:
+   {{range .VisibleFlags}}{{.}}
+   {{end}}{{end}}
+`
+
+
+	cli.SubcommandHelpTemplate = `.TH "ETCD" "1" " etcd User Manuals" "Etcd contributors" "Nov 2017"  ""
+.SH NAME:
+   {{.HelpName}} - {{.Usage}}
+
+.SH USAGE:
+   {{.HelpName}} command{{if .VisibleFlags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}
+
+.SH COMMANDS:
+{{range .VisibleCategories}}{{if .Name}}
+{{.Name}}:{{end}}{{range .VisibleCommands}}
+\fB{{ .Name }}\fP{{"\n\t\t\t"}}{{.Usage}}{{ "\n" }}{{end}}
+{{end}}
+
+{{if .VisibleFlags}}
+.SH OPTIONS:
+{{range .VisibleFlags}}{{.}}
+{{end}}{{end}}
+`
+
+
 	app.Flags = []cli.Flag{
 		cli.BoolFlag{Name: "debug", Usage: "output cURL commands which can be used to reproduce the request"},
 		cli.BoolFlag{Name: "no-sync", Usage: "don't synchronize cluster information before sending request"},
diff -up etcd-3.4.13/etcdctl/ctlv3/ctl_nocov.go.orig2 etcd-3.4.13/etcdctl/ctlv3/ctl_nocov.go
--- etcd-3.4.13/etcdctl/ctlv3/ctl_nocov.go.orig2	2020-08-24 21:11:28.000000000 +0200
+++ etcd-3.4.13/etcdctl/ctlv3/ctl_nocov.go	2020-09-04 00:13:47.553811076 +0200
@@ -16,13 +16,20 @@
 
 package ctlv3
 
-import "go.etcd.io/etcd/etcdctl/ctlv3/command"
+//import "github.com/coreos/etcd/etcdctl/ctlv3/command"
+import cobra "github.com/spf13/cobra/doc"
 
 func Start() {
 	rootCmd.SetUsageFunc(usageFunc)
 	// Make help just show the usage
 	rootCmd.SetHelpTemplate(`{{.UsageString}}`)
-	if err := rootCmd.Execute(); err != nil {
-		command.ExitWithError(command.ExitError, err)
+	//if err := rootCmd.Execute(); err != nil {
+	//	command.ExitWithError(command.ExitError, err)
+	//}
+	header := &cobra.GenManHeader{
+		Title: "etcdctl3",
+		Section: "1",
 	}
+
+	cobra.GenManTree(rootCmd, header, "")
 }
diff -up etcd-3.4.13/vendor/github.com/urfave/cli/flag.go.orig2 etcd-3.4.13/vendor/github.com/urfave/cli/flag.go
--- etcd-3.4.13/vendor/github.com/urfave/cli/flag.go.orig2	2020-08-24 21:11:28.000000000 +0200
+++ etcd-3.4.13/vendor/github.com/urfave/cli/flag.go	2020-09-04 00:13:47.555811078 +0200
@@ -670,7 +670,7 @@ func prefixedNames(fullName, placeholder
 	parts := strings.Split(fullName, ",")
 	for i, name := range parts {
 		name = strings.Trim(name, " ")
-		prefixed += prefixFor(name) + name
+		prefixed += "\\fB" + prefixFor(name) + name + "\\fP"
 		if placeholder != "" {
 			prefixed += " " + placeholder
 		}
@@ -745,7 +745,7 @@ func stringifyFlag(f Flag) string {
 	usageWithDefault := strings.TrimSpace(fmt.Sprintf("%s%s", usage, defaultValueString))
 
 	return withEnvHint(fv.FieldByName("EnvVar").String(),
-		fmt.Sprintf("%s\t%s", prefixedNames(fv.FieldByName("Name").String(), placeholder), usageWithDefault))
+		fmt.Sprintf("%s\n\t\t\t%s", prefixedNames(fv.FieldByName("Name").String(), placeholder), usageWithDefault))
 }
 
 func stringifyIntSliceFlag(f IntSliceFlag) string {