diff --git a/README.md b/README.md
index d95bd84f..7693a57b 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
-
+
@@ -69,7 +69,7 @@ Commands
which-source query… Show source package name
info package Show info about package
payload package type Show package payload
- cleanup num Remove old versions of packages
+ cleanup num filter Remove old versions of packages
check errors-num Check repositories consistency
sign file… Sign one or more packages
resign Resign all packages in repository
@@ -84,22 +84,23 @@ Commands
Options
- --release, -r Run command only on release (stable) repository
- --testing, -t Run command only on testing (unstable) repository
- --all, -a Run command on all repositories
- --arch, -aa arch Package architecture (helpful with "info" and "payload" commands)
- --move, -m Move (remove after successful action) packages (helpful with "add" command)
- --no-source, -ns Ignore source packages (helpful with "add" command)
- --ignore-filter, -if Ignore repository file filter (helpful with "add" and "sign" commands)
- --force, -f Answer "yes" for all questions
- --full, -F Full reindex (helpful with "reindex" command)
- --show-all, -A Show all versions of packages (helpful with "list" command)
- --status, -S Show package status (released or not)
- --epoch, -E Show epoch info (helpful with "list" and "which-source" commands)
- --pager, -P Run command in "pager" mode (i.e. don't disable colors and don't show raw output)
- --no-color, -nc Disable colors in output
- --help, -h Show this help message
- --version, -v Show version
+ --release, -r Run command only on release (stable) repository
+ --testing, -t Run command only on testing (unstable) repository
+ --all, -a Run command on all repositories
+ --arch, -aa arch Package architecture (helpful with "info" and "payload" commands)
+ --move, -m Move (remove after successful action) packages (helpful with "add" command)
+ --no-source, -ns Ignore source packages (helpful with "add" command)
+ --ignore-filter, -if Ignore repository file filter (helpful with "add" and "sign" commands)
+ --postpone-index, -pi Postpone repository reindex (helpful with "add", "remove", "release", and "unrelase" commands)
+ --force, -f Answer "yes" for all questions
+ --full, -F Full reindex (helpful with "reindex" command)
+ --show-all, -A Show all versions of packages (helpful with "list" command)
+ --status, -S Show package status (released or not)
+ --epoch, -E Show epoch info (helpful with "list" and "which-source" commands)
+ --pager, -P Use pager for long output
+ --no-color, -nc Disable colors in output
+ --help, -h Show this help message
+ --version, -v Show versio
```
### CI Status
diff --git a/cli/cli.go b/cli/cli.go
index 71c9f68d..80524775 100644
--- a/cli/cli.go
+++ b/cli/cli.go
@@ -10,18 +10,18 @@ package cli
import (
"fmt"
"os"
- "strings"
- "github.com/essentialkaos/ek/v12/env"
"github.com/essentialkaos/ek/v12/fmtc"
"github.com/essentialkaos/ek/v12/fmtutil"
"github.com/essentialkaos/ek/v12/fsutil"
"github.com/essentialkaos/ek/v12/knf"
"github.com/essentialkaos/ek/v12/options"
+ "github.com/essentialkaos/ek/v12/pager"
"github.com/essentialkaos/ek/v12/progress"
"github.com/essentialkaos/ek/v12/signal"
"github.com/essentialkaos/ek/v12/system"
"github.com/essentialkaos/ek/v12/terminal"
+ "github.com/essentialkaos/ek/v12/terminal/tty"
"github.com/essentialkaos/ek/v12/usage"
"github.com/essentialkaos/ek/v12/usage/completion/bash"
"github.com/essentialkaos/ek/v12/usage/completion/fish"
@@ -44,7 +44,7 @@ import (
// App info
const (
APP = "rep"
- VER = "3.2.0"
+ VER = "3.3.0"
DESC = "DNF/YUM repository management utility"
)
@@ -144,22 +144,23 @@ const (
// Options
const (
- OPT_TESTING = "t:testing"
- OPT_RELEASE = "r:release"
- OPT_ALL = "a:all"
- OPT_ARCH = "aa:arch"
- OPT_MOVE = "m:move"
- OPT_NO_SOURCE = "ns:no-source"
- OPT_IGNORE_FILTER = "if:ignore-filter"
- OPT_FORCE = "f:force"
- OPT_FULL = "F:full"
- OPT_SHOW_ALL = "A:show-all"
- OPT_EPOCH = "E:epoch"
- OPT_STATUS = "S:status"
- OPT_PAGER = "P:pager"
- OPT_NO_COLOR = "nc:no-color"
- OPT_HELP = "h:help"
- OPT_VER = "v:version"
+ OPT_TESTING = "t:testing"
+ OPT_RELEASE = "r:release"
+ OPT_ALL = "a:all"
+ OPT_ARCH = "aa:arch"
+ OPT_MOVE = "m:move"
+ OPT_NO_SOURCE = "ns:no-source"
+ OPT_IGNORE_FILTER = "if:ignore-filter"
+ OPT_POSTPONE_INDEX = "pi:postpone-index"
+ OPT_FORCE = "f:force"
+ OPT_FULL = "F:full"
+ OPT_SHOW_ALL = "A:show-all"
+ OPT_EPOCH = "E:epoch"
+ OPT_STATUS = "S:status"
+ OPT_PAGER = "P:pager"
+ OPT_NO_COLOR = "nc:no-color"
+ OPT_HELP = "h:help"
+ OPT_VER = "v:version"
OPT_DEBUG = "D:debug"
OPT_VERB_VER = "vv:verbose-version"
@@ -180,22 +181,23 @@ const CONFIG_DIR = "/etc/rep.d"
// optMap is map with supported options
var optMap = options.Map{
- OPT_ARCH: {},
- OPT_TESTING: {Type: options.BOOL},
- OPT_RELEASE: {Type: options.BOOL},
- OPT_ALL: {Type: options.BOOL},
- OPT_MOVE: {Type: options.BOOL},
- OPT_NO_SOURCE: {Type: options.BOOL},
- OPT_IGNORE_FILTER: {Type: options.BOOL},
- OPT_FORCE: {Type: options.BOOL},
- OPT_FULL: {Type: options.BOOL},
- OPT_SHOW_ALL: {Type: options.BOOL},
- OPT_EPOCH: {Type: options.BOOL},
- OPT_STATUS: {Type: options.BOOL},
- OPT_PAGER: {Type: options.BOOL},
- OPT_NO_COLOR: {Type: options.BOOL},
- OPT_HELP: {Type: options.BOOL},
- OPT_VER: {Type: options.MIXED},
+ OPT_ARCH: {},
+ OPT_TESTING: {Type: options.BOOL},
+ OPT_RELEASE: {Type: options.BOOL},
+ OPT_ALL: {Type: options.BOOL},
+ OPT_MOVE: {Type: options.BOOL},
+ OPT_NO_SOURCE: {Type: options.BOOL},
+ OPT_IGNORE_FILTER: {Type: options.BOOL},
+ OPT_POSTPONE_INDEX: {Type: options.BOOL},
+ OPT_FORCE: {Type: options.BOOL},
+ OPT_FULL: {Type: options.BOOL},
+ OPT_SHOW_ALL: {Type: options.BOOL},
+ OPT_EPOCH: {Type: options.BOOL},
+ OPT_STATUS: {Type: options.BOOL},
+ OPT_PAGER: {Type: options.BOOL},
+ OPT_NO_COLOR: {Type: options.BOOL},
+ OPT_HELP: {Type: options.BOOL},
+ OPT_VER: {Type: options.MIXED},
OPT_DEBUG: {Type: options.BOOL},
OPT_VERB_VER: {Type: options.BOOL},
@@ -274,9 +276,6 @@ func Init(gitRev string, gomod []byte) {
// configureUI configure user interface
func configureUI() {
- envVars := env.Get()
- term := envVars.GetS("TERM")
-
fmtc.DisableColors = true
fmtutil.SizeSeparator = " "
fmtutil.SeparatorSymbol = "–"
@@ -300,30 +299,23 @@ func configureUI() {
fmtc.NameColor("package", "{m}")
fmtc.NameColor("repo", "{c}")
+ if fmtc.IsColorsSupported() {
+ fmtc.DisableColors = false
+ }
+
if fmtc.Is256ColorsSupported() {
fmtc.NameColor("package", "{#108}")
fmtc.NameColor("repo", "{#33}")
progress.DefaultSettings.BarFgColorTag = "{#33}"
}
- if term != "" {
- switch {
- case strings.Contains(term, "xterm"),
- strings.Contains(term, "color"),
- term == "screen":
- fmtc.DisableColors = false
- }
- }
-
if options.GetB(OPT_NO_COLOR) {
fmtc.DisableColors = true
}
- if !options.GetB(OPT_PAGER) {
- if !fsutil.IsCharacterDevice("/dev/stdout") && envVars.GetS("FAKETTY") == "" {
- fmtc.DisableColors = true
- rawOutput = true
- }
+ if !tty.IsTTY() {
+ fmtc.DisableColors = true
+ rawOutput = true
}
}
@@ -333,12 +325,12 @@ func checkPermissions() {
if err != nil {
terminal.Error("Can't get info about current user: %v", err)
- os.Exit(1)
+ shutdown(1)
}
if !curUser.IsRoot() {
terminal.Error("This app requires superuser (root) privileges")
- os.Exit(1)
+ shutdown(1)
}
}
@@ -348,7 +340,7 @@ func loadGlobalConfig() {
if err != nil {
terminal.Error(err.Error())
- os.Exit(1)
+ shutdown(1)
}
}
@@ -383,7 +375,7 @@ func validateGlobalConfig() {
terminal.Error(" - %v", err)
}
- os.Exit(1)
+ shutdown(1)
}
// loadRepoConfigs loads repositories configuration files
@@ -404,7 +396,7 @@ func loadRepoConfigs() {
if err != nil {
terminal.Error(err.Error())
- os.Exit(1)
+ shutdown(1)
}
configs[cfg.GetS(REPOSITORY_NAME)] = cfg
@@ -448,7 +440,7 @@ func validateRepoConfigs() {
}
if hasErrors {
- os.Exit(1)
+ shutdown(1)
}
}
@@ -472,7 +464,7 @@ func configureRepoCache() {
}
if hasErrors {
- os.Exit(1)
+ shutdown(1)
}
}
@@ -521,6 +513,12 @@ func process(args options.Arguments) bool {
return false
}
+ if options.GetB(OPT_PAGER) && tty.IsTTY() {
+ if pager.Setup() == nil {
+ defer pager.Complete()
+ }
+ }
+
// List repositories by default
if args.Get(1).String() == "" {
return runCommand(configs[repo], COMMAND_LIST, nil)
@@ -551,11 +549,11 @@ func printCompletion() int {
switch options.GetS(OPT_COMPLETION) {
case "bash":
- fmt.Printf(bash.Generate(info, APP))
+ fmt.Print(bash.Generate(info, APP))
case "fish":
- fmt.Printf(fish.Generate(info, APP))
+ fmt.Print(fish.Generate(info, APP))
case "zsh":
- fmt.Printf(zsh.Generate(info, optMap, APP))
+ fmt.Print(zsh.Generate(info, optMap, APP))
default:
return 1
}
@@ -573,27 +571,18 @@ func printMan() {
)
}
-// genMan generates man page
-func genMan() int {
- fmt.Println(
- man.Generate(
- genUsage(),
- genAbout(""),
- ),
- )
-
- return 0
-}
-
// genUsage generates usage info
func genUsage() *usage.Info {
info := usage.NewInfo()
+ if fmtc.Is256ColorsSupported() {
+ info.AppNameColorTag = "{*}{#33}"
+ }
+
info.AddSpoiler(
- "Notice that if you have more than one repository you should define its name as\n" +
- "the first argument. You can read detailed info about every command with usage\n" +
- "examples using {y}help{!} command.",
- )
+ ` Note that if you have more than one repository, you should specify its name
+ as the first argument. You can read detailed information about each command
+ with usage examples by using the {y}help{!} command.`)
info.AddCommand(COMMAND_INIT, "Initialize new repository", "arch…")
info.AddCommand(COMMAND_GEN_KEY, "Generate keys for signing packages")
@@ -602,7 +591,7 @@ func genUsage() *usage.Info {
info.AddCommand(COMMAND_WHICH_SOURCE, "Show source package name", "query…")
info.AddCommand(COMMAND_INFO, "Show info about package", "package")
info.AddCommand(COMMAND_PAYLOAD, "Show package payload", "package", "?type")
- info.AddCommand(COMMAND_CLEANUP, "Remove old versions of packages", "?num")
+ info.AddCommand(COMMAND_CLEANUP, "Remove old versions of packages", "?num", "?filter")
info.AddCommand(COMMAND_CHECK, "Check repositories consistency", "?errors-num")
info.AddCommand(COMMAND_SIGN, "Sign one or more packages", "file…")
info.AddCommand(COMMAND_RESIGN, "Resign all packages in repository")
@@ -618,16 +607,17 @@ func genUsage() *usage.Info {
info.AddOption(OPT_RELEASE, "Run command only on release {s}(stable){!} repository")
info.AddOption(OPT_TESTING, "Run command only on testing {s}(unstable){!} repository")
info.AddOption(OPT_ALL, "Run command on all repositories")
- info.AddOption(OPT_ARCH, "Package architecture {s-}(helpful with \"info\" and \"payload\" commands){!}", "arch")
- info.AddOption(OPT_MOVE, "Move {s}(remove after successful action){!} packages {s-}(helpful with \"add\" command){!}")
- info.AddOption(OPT_NO_SOURCE, "Ignore source packages {s-}(helpful with \"add\" command){!}")
- info.AddOption(OPT_IGNORE_FILTER, "Ignore repository file filter {s-}(helpful with \"add\" and \"sign\" commands){!}")
- info.AddOption(OPT_FORCE, "Answer \"yes\" for all questions")
- info.AddOption(OPT_FULL, "Full reindex {s-}(helpful with \"reindex\" command){!}")
- info.AddOption(OPT_SHOW_ALL, "Show all versions of packages {s-}(helpful with \"list\" command){!}")
+ info.AddOption(OPT_ARCH, `Package architecture {s-}(helpful with "info" and "payload" commands){!}`, "arch")
+ info.AddOption(OPT_MOVE, `Move {s}(remove after successful action){!} packages {s-}(helpful with "add" command){!}`)
+ info.AddOption(OPT_NO_SOURCE, `Ignore source packages {s-}(helpful with "add" command){!}`)
+ info.AddOption(OPT_IGNORE_FILTER, `Ignore repository file filter {s-}(helpful with "add" and "sign" commands){!}`)
+ info.AddOption(OPT_POSTPONE_INDEX, `Postpone repository reindex {s-}(helpful with "add", "remove", "release", and "unrelase" commands){!}`)
+ info.AddOption(OPT_FORCE, `Answer "yes" for all questions`)
+ info.AddOption(OPT_FULL, `Full reindex {s-}(helpful with "reindex" command){!}`)
+ info.AddOption(OPT_SHOW_ALL, `Show all versions of packages {s-}(helpful with "list" command){!}`)
info.AddOption(OPT_STATUS, "Show package status {s-}(released or not){!}")
- info.AddOption(OPT_EPOCH, "Show epoch info {s-}(helpful with \"list\" and \"which-source\" commands){!}")
- info.AddOption(OPT_PAGER, "Run command in \"pager\" mode {s-}(i.e. don't disable colors and don't show raw output){!}")
+ info.AddOption(OPT_EPOCH, `Show epoch info {s-}(helpful with "list" and "which-source" commands){!}`)
+ info.AddOption(OPT_PAGER, "Use pager for long output")
info.AddOption(OPT_NO_COLOR, "Disable colors in output")
info.AddOption(OPT_HELP, "Show this help message")
info.AddOption(OPT_VER, "Show version")
@@ -685,6 +675,8 @@ func genAbout(gitRev string) *usage.About {
Owner: "ESSENTIAL KAOS",
License: "Apache License, Version 2.0 ",
UpdateChecker: usage.UpdateChecker{"essentialkaos/rep", update.GitHubChecker},
+
+ DescSeparator: "{s}—{!}",
}
if gitRev != "" {
diff --git a/cli/cmd_add.go b/cli/cmd_add.go
index 4957f8e3..9f3dfff9 100644
--- a/cli/cmd_add.go
+++ b/cli/cmd_add.go
@@ -103,7 +103,7 @@ func addRPMFiles(ctx *context, files []string, signingKey *sign.Key) bool {
hasAdded = true
}
- if hasAdded {
+ if hasAdded && !options.GetB(OPT_POSTPONE_INDEX) {
fmtc.NewLine()
reindexRepository(ctx, ctx.Repo.Testing, false)
}
diff --git a/cli/cmd_check.go b/cli/cmd_check.go
index a4b421ff..23cac0c9 100644
--- a/cli/cmd_check.go
+++ b/cli/cmd_check.go
@@ -444,16 +444,17 @@ func printCheckErrorsInfo(errs errutil.Errors) bool {
}
errsList := errs.All()
+ maxErrs := mathutil.Min(errs.Num(), checkMaxErrNum)
terminal.Error(
"Found %s %s. First %s %s:\n",
fmtutil.PrettyNum(errs.Num()),
pluralize.Pluralize(errs.Num(), "problem", "problems"),
- fmtutil.PrettyNum(checkMaxErrNum),
- pluralize.Pluralize(checkMaxErrNum, "problem", "problems"),
+ fmtutil.PrettyNum(maxErrs),
+ pluralize.Pluralize(maxErrs, "problem", "problems"),
)
- for i := 0; i < mathutil.Min(errs.Num(), checkMaxErrNum); i++ {
+ for i := 0; i < maxErrs; i++ {
terminal.Error(" • %v", errsList[i])
}
diff --git a/cli/cmd_cleanup.go b/cli/cmd_cleanup.go
index 22579a1d..2b4b599e 100644
--- a/cli/cmd_cleanup.go
+++ b/cli/cmd_cleanup.go
@@ -22,8 +22,8 @@ import (
// ////////////////////////////////////////////////////////////////////////////////// //
-// MIN_CLEANUP_VERS is minimal number of versions
-const MIN_CLEANUP_VERS = 3
+// MIN_KEEP_CLEANUP_VERS is minimal number of versions to keep
+const MIN_KEEP_CLEANUP_VERS = 3
// ////////////////////////////////////////////////////////////////////////////////// //
@@ -32,7 +32,7 @@ func cmdCleanup(ctx *context, args options.Arguments) bool {
var testingStack, releaseStack repo.PackageStack
all := !options.GetB(OPT_RELEASE) && !options.GetB(OPT_TESTING)
- keepVerNum, err := getCleanupVersionNum(args)
+ keepNum, filter, err := getCleanupOptions(args)
if err != nil {
terminal.Error(err.Error())
@@ -40,7 +40,7 @@ func cmdCleanup(ctx *context, args options.Arguments) bool {
}
if all || options.GetB(OPT_RELEASE) {
- releaseStack, err = getStackToCleanup(ctx.Repo.Release, keepVerNum)
+ releaseStack, err = getStackToCleanup(ctx.Repo.Release, keepNum, filter)
if err != nil {
terminal.Error(err.Error())
@@ -49,7 +49,7 @@ func cmdCleanup(ctx *context, args options.Arguments) bool {
}
if all || options.GetB(OPT_TESTING) {
- testingStack, err = getStackToCleanup(ctx.Repo.Testing, keepVerNum)
+ testingStack, err = getStackToCleanup(ctx.Repo.Testing, keepNum, filter)
if err != nil {
terminal.Error(err.Error())
@@ -67,28 +67,30 @@ func cmdCleanup(ctx *context, args options.Arguments) bool {
// ////////////////////////////////////////////////////////////////////////////////// //
-// getCleanupVersionNum returns number of versions from arguments
-func getCleanupVersionNum(args options.Arguments) (int, error) {
+// getCleanupOptions returns number of versions and filter from arguments
+func getCleanupOptions(args options.Arguments) (int, string, error) {
var err error
- keepVerNum := MIN_CLEANUP_VERS
+ keepNum := MIN_KEEP_CLEANUP_VERS
if args.Has(0) {
- keepVerNum, err = args.Get(0).Int()
+ keepNum, err = args.Get(0).Int()
if err != nil {
- return 0, fmt.Errorf("Can't parse number of versions: %v", err)
+ return 0, "", fmt.Errorf("Can't parse number of versions: %v", err)
}
- if keepVerNum < MIN_CLEANUP_VERS {
- return 0, fmt.Errorf(
+ if keepNum < MIN_KEEP_CLEANUP_VERS {
+ return 0, "", fmt.Errorf(
"Number of versions can't be less than %d",
- MIN_CLEANUP_VERS,
+ MIN_KEEP_CLEANUP_VERS,
)
}
}
- return keepVerNum, nil
+ filter := args.Get(1).String()
+
+ return keepNum, filter, nil
}
// cleanupPackages removes packages from both repositories
@@ -121,19 +123,19 @@ func cleanupPackages(ctx *context, releaseStack, testingStack repo.PackageStack)
}
// getStackToCleanup returns stack with packages to remove
-func getStackToCleanup(r *repo.SubRepository, keepVerNum int) (repo.PackageStack, error) {
+func getStackToCleanup(r *repo.SubRepository, keepNum int, filter string) (repo.PackageStack, error) {
stack, err := r.List("", true)
if err != nil {
return nil, err
}
- return extractPackagesToCleanup(stack, keepVerNum), nil
+ return extractPackagesToCleanup(stack, keepNum, filter), nil
}
// extractPackagesToCleanup extracts bundles to remove from stack
// with all packages
-func extractPackagesToCleanup(stack repo.PackageStack, keepVerNum int) repo.PackageStack {
+func extractPackagesToCleanup(stack repo.PackageStack, keepNum int, filter string) repo.PackageStack {
var result repo.PackageStack
var prevPkgName, prevPkgVer string
var pkgCount int
@@ -147,6 +149,10 @@ func extractPackagesToCleanup(stack repo.PackageStack, keepVerNum int) repo.Pack
continue
}
+ if filter != "" && !strings.HasPrefix(pkg.Src, filter) {
+ continue
+ }
+
switch {
case prevPkgName != pkg.Name:
pkgCount = 1
@@ -156,10 +162,9 @@ func extractPackagesToCleanup(stack repo.PackageStack, keepVerNum int) repo.Pack
}
}
- prevPkgName = pkg.Name
- prevPkgVer = pkg.Version
+ prevPkgName, prevPkgVer = pkg.Name, pkg.Version
- if pkgCount > keepVerNum {
+ if pkgCount > keepNum {
result = append(result, bundle)
}
}
@@ -190,9 +195,3 @@ func getMainPackageFromBundle(bundle repo.PackageBundle) *repo.Package {
return nil
}
-
-// printEmptyFoundPackageList prints empty packages listing
-func printEmptyFoundPackageList(r *repo.SubRepository) {
- fmtutil.Separator(true, strings.ToUpper(r.Name))
- fmtc.Println("\n{s-}-- no packages --{!}\n")
-}
diff --git a/cli/cmd_gen_key.go b/cli/cmd_gen_key.go
index 9c08124b..8d868c7f 100644
--- a/cli/cmd_gen_key.go
+++ b/cli/cmd_gen_key.go
@@ -8,7 +8,6 @@ package cli
// ////////////////////////////////////////////////////////////////////////////////// //
import (
- "io/ioutil"
"os"
"regexp"
"strings"
@@ -130,7 +129,7 @@ func generateKeys(name, email string, password *secstr.String, outputPubKeyFile
return false
}
- err = ioutil.WriteFile(outputPrivKeyFile, privKeyData, 0600)
+ err = os.WriteFile(outputPrivKeyFile, privKeyData, 0600)
if err != nil {
spinner.Update("Can't save private key: %v", err)
@@ -138,7 +137,7 @@ func generateKeys(name, email string, password *secstr.String, outputPubKeyFile
return false
}
- err = ioutil.WriteFile(outputPubKeyFile, pubKeyData, 0644)
+ err = os.WriteFile(outputPubKeyFile, pubKeyData, 0644)
if err != nil {
spinner.Update("Can't save public key: %v", err)
diff --git a/cli/cmd_help.go b/cli/cmd_help.go
index 9723649d..6eece6f1 100644
--- a/cli/cmd_help.go
+++ b/cli/cmd_help.go
@@ -42,12 +42,12 @@ type commandExample struct {
// Usage shows basic usage info
func (c *commandHelp) Usage() {
if len(configs) > 1 && !c.isGlobal {
- fmtc.Print("{*}Usage:{!} rep {c}{repo-id}{!}")
+ fmtc.Print("{*}Usage:{!} rep {?repo}{repo-id}{!}")
} else {
fmtc.Print("{*}Usage:{!} rep")
}
- fmtc.Printf(" {y}%s{!}", c.command)
+ fmtc.Printf(" {?cmd}%s{!}", c.command)
cmd := c.info.GetCommand(c.command)
@@ -63,7 +63,7 @@ func (c *commandHelp) Usage() {
// Shortcut shows info about shortcut version of command
func (c *commandHelp) Shortcut() {
fmtc.Println("{*}Shortcut:{!}\n")
- fmtc.Printf(" {y}%s{!} → {y}%s{!}\n\n", c.command, c.shortcut)
+ fmtc.Printf(" {?cmd}%s{!} → {?cmd}%s{!}\n\n", c.command, c.shortcut)
}
// Examples shows usage examples
@@ -76,12 +76,12 @@ func (c *commandHelp) Examples() {
for index, example := range c.examples {
if len(configs) > 1 && !c.isGlobal {
- fmtc.Printf(" rep {c}{repo-id}{!} {y}%s{!} {s}%s{!}\n", c.command, example.command)
+ fmtc.Printf(" rep {c}{repo-id}{!} {?cmd}%s{!} {?arg}%s{!}\n", c.command, example.command)
} else {
- fmtc.Printf(" rep {y}%s{!} {s}%s{!}\n", c.command, example.command)
+ fmtc.Printf(" rep {?cmd}%s{!} {?arg}%s{!}\n", c.command, example.command)
}
- fmtc.Printf("{s-}%s{!}\n", fmtutil.Wrap(example.desc, " ", 88))
+ fmtc.Printf("{&}{s-}%s{!}\n", fmtutil.Wrap(example.desc, " ", 88))
if index+1 < len(c.examples) {
fmtc.NewLine()
@@ -97,10 +97,6 @@ func (c *commandHelp) Options() {
return
}
- if len(c.examples) != 0 {
- fmtc.NewLine()
- }
-
fmtc.Println("{*}Options:{!}\n")
for _, option := range c.info.Options {
@@ -112,8 +108,10 @@ func (c *commandHelp) Options() {
continue
}
- option.Render()
+ option.Print()
}
+
+ fmtc.NewLine()
}
// Paragraph renders paragraph text
@@ -124,7 +122,7 @@ func (c *commandHelp) Paragraph(text string) {
// Query renders query info
func (c *commandHelp) Query(short, long, desc, typ string) {
- fmtc.Printf(" {m}%2s{!} {s}or{!} {m}%-12s{!} %s {s-}(%s){!}\n", short, long, desc, typ)
+ fmtc.Printf(" {m}%2s{!} {s}or{!} {m}%-12s{!} %s {&}{s-}(%s){!}\n", short, long, desc, typ)
}
// renderArgs renders command arguments with colors
@@ -146,71 +144,55 @@ func (c *commandHelp) renderArgs(args []string) string {
// cmdHelp is 'help' command handler
func cmdHelp(ctx *context, args options.Arguments) bool {
+ fmtc.NameColor("cmd", usage.DEFAULT_COMMANDS_COLOR_TAG)
+ fmtc.NameColor("arg", "{s}")
+ fmtc.NameColor("repo", "{c}")
+
cmdName := args.Get(0)
switch cmdName {
case "":
helpAll()
-
case COMMAND_INIT:
helpInit()
-
case COMMAND_GEN_KEY:
helpGenKey()
-
case COMMAND_LIST, COMMAND_SHORT_LIST:
helpList()
-
case COMMAND_WHICH_SOURCE, COMMAND_SHORT_WHICH_SOURCE:
helpWhichSource()
-
case COMMAND_FIND, COMMAND_SHORT_FIND:
helpFind()
-
case COMMAND_INFO, COMMAND_SHORT_INFO:
helpInfo()
-
case COMMAND_PAYLOAD, COMMAND_SHORT_PAYLOAD:
helpPayload()
-
case COMMAND_CLEANUP, COMMAND_SHORT_CLEANUP:
helpCleanup()
-
case COMMAND_CHECK, COMMAND_SHORT_CHECK:
helpCheck()
-
case COMMAND_SIGN, COMMAND_SHORT_SIGN:
helpSign()
-
case COMMAND_RESIGN, COMMAND_SHORT_RESIGN:
helpResign()
-
case COMMAND_ADD, COMMAND_SHORT_ADD:
helpAdd()
-
case COMMAND_REMOVE, COMMAND_SHORT_REMOVE:
helpRemove()
-
case COMMAND_RELEASE, COMMAND_SHORT_RELEASE:
helpRelease()
-
case COMMAND_UNRELEASE, COMMAND_SHORT_UNRELEASE:
helpUnrelease()
-
case COMMAND_REINDEX, COMMAND_SHORT_REINDEX:
helpReindex()
-
case COMMAND_PURGE_CACHE, COMMAND_SHORT_PURGE_CACHE:
helpPurgeCache()
-
case COMMAND_STATS, COMMAND_SHORT_STATS:
helpStats()
-
case COMMAND_HELP, COMMAND_SHORT_HELP:
helpHelp()
-
default:
- terminal.Error("Unknown command \"%s\"", cmdName)
+ terminal.Error("Unknown command %q", cmdName)
return false
}
@@ -228,11 +210,11 @@ func helpAll() {
continue
}
- c.Render()
+ c.Print()
}
fmtc.NewLine()
- fmtc.Println(" {s}For detailed information about command use{!} {y}help {command}{!}")
+ fmtc.Println(" {s}For detailed information about command use{!} {?cmd}help {command}{!}")
}
// helpInit shows help content about "init" command
@@ -286,9 +268,18 @@ func helpList() {
examples: []commandExample{
{"", "Show a list of all the latest versions of packages in all (release and testing) repositories"},
{"my-package", "Show a list of all versions of the package with the given name"},
- {info.GetOption(OPT_TESTING).String() + " my-package", "Show a list of all package versions with the given name only in the testing repository"},
- {"| grep my-package | grep -v '.src.'", "Show a list of packages files and filter it with grep"},
- {info.GetOption(OPT_PAGER).String() + " | more", "View long list of packages with some pager utility (more/less)"},
+ {
+ info.GetOption(OPT_TESTING).String() + " my-package",
+ "Show a list of all package versions with the given name only in the testing repository",
+ },
+ {
+ "| grep my-package | grep -v '.src.'",
+ "Show a list of packages files and filter it with grep",
+ },
+ {
+ info.GetOption(OPT_PAGER).String() + " | more",
+ "View long list of packages with some pager utility (more/less)",
+ },
},
isGlobal: false,
}
@@ -297,8 +288,8 @@ func helpList() {
help.Paragraph("The command shows a list of all packages in the repository. By default, the command shows only the latest versions of packages within all repositories.")
help.Paragraph("You can filter the listing providing part of the package name. In this case, the command will show all versions of packages with the given name part.")
help.Shortcut()
- help.Examples()
help.Options()
+ help.Examples()
}
// helpWhichSource shows help content about "which-source" command
@@ -316,10 +307,10 @@ func helpWhichSource() {
help.Usage()
help.Paragraph("This command shows the source package used for package building or source package created while package building. This command is very useful for package searching. You may find the source package and use it in the search query ({s}s:{!} or {s}source:{!} query prefix with {y}" + COMMAND_REMOVE + "{!}, {y}" + COMMAND_RELEASE + "{!}, and {y}" + COMMAND_UNRELEASE + "{!} commands).")
- help.Paragraph("You can use search query syntax for package selection. For more information about query syntax, see \"rep {y}" + COMMAND_HELP + "{!} {s}" + COMMAND_FIND + "{!}\".")
+ help.Paragraph("You can use search query syntax for package selection. For more information about query syntax, see \"rep {?cmd}" + COMMAND_HELP + "{!} {?arg}" + COMMAND_FIND + "{!}\".")
help.Shortcut()
- help.Examples()
help.Options()
+ help.Examples()
}
// helpFind shows help content about "find" command
@@ -395,22 +386,22 @@ func helpFind() {
help.Paragraph("More info about supported query data types:")
- fmtc.Println(" {s-}•{!} String Any string value")
- fmtc.Println(" {s-}•{!} Number Integer greater or equal to zero")
- fmtc.Println(" {s-}•{!} Boolean Boolean value {s}(yes/true/1 or no/false/0){!}")
- fmtc.Println(" {s-}•{!} SemVer Version in semantic versioning format")
- fmtc.Println(" {s-}•{!} Dependency Package name with or without version and release condition")
- fmtc.Println(" {s-}•{!} Architecture Package architecture {s}(" + strings.Join(data.ArchList, ", ") + "){!}")
- fmtc.Println(" {s-}•{!} Size Size {s}(b/kb/mb/gb){!} with modificators {s-}(see examples){!}")
- fmtc.Println(" {s-}•{!} Duration Duration in days or custom duration {s-}(see examples){!}")
+ fmtc.Println(" {s-}•{!} {&}String{!} Any string value")
+ fmtc.Println(" {s-}•{!} {&}Number{!} Integer greater or equal to zero")
+ fmtc.Println(" {s-}•{!} {&}Boolean{!} Boolean value {s}(yes/true/1 or no/false/0){!}")
+ fmtc.Println(" {s-}•{!} {&}SemVer{!} Version in semantic versioning format")
+ fmtc.Println(" {s-}•{!} {&}Dependency{!} Package name with or without version and release condition")
+ fmtc.Println(" {s-}•{!} {&}Architecture{!} Package architecture {s}(" + strings.Join(data.ArchList, ", ") + "){!}")
+ fmtc.Println(" {s-}•{!} {&}Size{!} Size {s}(b/kb/mb/gb){!} with modificators {s-}(see examples){!}")
+ fmtc.Println(" {s-}•{!} {&}Duration{!} Duration in days or custom duration {s-}(see examples){!}")
fmtc.NewLine()
help.Paragraph("You can define a few filters at once, in this case, data that match the previous filter will be filtered by the next filter in the query. For negative search use additional colon ({s}:{!}) symbol.")
help.Shortcut()
- help.Examples()
help.Options()
+ help.Examples()
}
// helpInfo shows help content about "info" command
@@ -432,8 +423,8 @@ func helpInfo() {
help.Usage()
help.Paragraph("Show detailed information about a package. If the package version wasn't provided command will show information about the latest version.")
help.Shortcut()
- help.Examples()
help.Options()
+ help.Examples()
}
// helpPayload shows help content about "payload" command
@@ -472,8 +463,8 @@ func helpPayload() {
)
fmtc.NewLine()
help.Shortcut()
- help.Examples()
help.Options()
+ help.Examples()
}
// helpCleanup shows help content about "cleanup" command
@@ -485,12 +476,15 @@ func helpCleanup() {
examples: []commandExample{
{"5", "Remove outdated packages except the 5 latest versions"},
{"10", "Remove outdated packages except the 10 latest versions"},
+ {"5 nginx", "Remove outdated nginx packages except the 5 latest versions"},
},
}
help.Usage()
- help.Paragraph("Remove old versions of packages. Note that number of versions counts only different versions, so different releases of the same version counts as one version.")
+ help.Paragraph("Remove old versions of packages. Note that the number of versions only counts different versions, so different releases of the same version count as one version.")
+ help.Paragraph("You can also specify part of the source package name to filter the results and clean up outdated versions of only one package.")
help.Shortcut()
+ help.Options()
help.Examples()
}
@@ -526,6 +520,7 @@ func helpSign() {
help.Usage()
help.Paragraph("Add GPG signature to RPM file or files.")
help.Shortcut()
+ help.Options()
help.Examples()
}
@@ -543,6 +538,7 @@ func helpResign() {
help.Usage()
help.Paragraph("Re-sign all packages in testing and release repositories.")
help.Shortcut()
+ help.Options()
help.Examples()
}
@@ -564,8 +560,8 @@ func helpAdd() {
help.Usage()
help.Paragraph("Add RPM file or files to the testing repository.")
help.Shortcut()
- help.Examples()
help.Options()
+ help.Examples()
}
// helpRemove shows help content about "remove" command
@@ -584,11 +580,11 @@ func helpRemove() {
}
help.Usage()
- help.Paragraph("Remove package or packages from the testing repository. By default, the command removes packages from the testing repository. You can use option {g}" + info.GetOption(OPT_ALL).String() + "{!} for removing packages from the testing and release repository.")
- help.Paragraph("The command uses search query syntax for package selection. For more information about query syntax, see \"rep {y}" + COMMAND_HELP + "{!} {s}" + COMMAND_FIND + "{!}\".")
+ help.Paragraph("Remove package or packages from the testing repository. By default, the command removes packages from the testing repository. You can use option {?opt}" + info.GetOption(OPT_ALL).String() + "{!} for removing packages from the testing and release repository.")
+ help.Paragraph("The command uses search query syntax for package selection. For more information about query syntax, see \"rep {?cmd}" + COMMAND_HELP + "{!} {?arg}" + COMMAND_FIND + "{!}\".")
help.Shortcut()
- help.Examples()
help.Options()
+ help.Examples()
}
// helpRelease shows help content about "release" command
@@ -605,10 +601,10 @@ func helpRelease() {
help.Usage()
help.Paragraph("Copy package or packages from the testing repository to the release repository.")
- help.Paragraph("The command uses search query syntax for package selection. For more information about query syntax, see \"rep {y}" + COMMAND_HELP + "{!} {s}" + COMMAND_FIND + "{!}\".")
+ help.Paragraph("The command uses search query syntax for package selection. For more information about query syntax, see \"rep {?cmd}" + COMMAND_HELP + "{!} {?arg}" + COMMAND_FIND + "{!}\".")
help.Shortcut()
- help.Examples()
help.Options()
+ help.Examples()
}
// helpUnrelease shows help content about "unrelease" command
@@ -627,10 +623,10 @@ func helpUnrelease() {
help.Usage()
help.Paragraph("Remove package or packages from the release repository.")
help.Paragraph("If package or packages were previously removed from the testing repository, this command will move packages from the release repository to testing.")
- help.Paragraph("The command uses search query syntax for package selection. For more information about query syntax, see \"rep {y}" + COMMAND_HELP + "{!} {s}" + COMMAND_FIND + "{!}\".")
+ help.Paragraph("The command uses search query syntax for package selection. For more information about query syntax, see \"rep {?cmd}" + COMMAND_HELP + "{!} {?arg}" + COMMAND_FIND + "{!}\".")
help.Shortcut()
- help.Examples()
help.Options()
+ help.Examples()
}
// helpReindex shows help content about "reindex" command
@@ -651,8 +647,8 @@ func helpReindex() {
help.Usage()
help.Paragraph("Generate repository index with createrepo utility.")
help.Shortcut()
- help.Examples()
help.Options()
+ help.Examples()
}
// helpPurgeCache shows help content about "purge-cache" command
@@ -671,8 +667,8 @@ func helpPurgeCache() {
help.Usage()
help.Paragraph("Remove all cached SQLite databases.")
help.Shortcut()
- help.Examples()
help.Options()
+ help.Examples()
}
// helpStats shows help content about "stats" command
@@ -692,8 +688,8 @@ func helpStats() {
help.Usage()
help.Paragraph("Show repository statistics.")
help.Shortcut()
- help.Examples()
help.Options()
+ help.Examples()
}
// helpHelp shows help content about "help" command
diff --git a/cli/cmd_payload.go b/cli/cmd_payload.go
index 1427f530..313d25f7 100644
--- a/cli/cmd_payload.go
+++ b/cli/cmd_payload.go
@@ -70,9 +70,9 @@ func printPackagePayload(pkg *repo.Package, payloadType string) {
archColoredTag = "[unknown]"
}
- fmtc.Printf(" ▾ "+archColoredTag+" {*}%s{!} {s-}(%s){!}\n\n", pkg.FullName(), pkg.Info.Summary)
+ fmtc.Printf(" ▾ "+archColoredTag+" {*}%s{!} {s-}(%s){!}\n", pkg.FullName(), pkg.Info.Summary)
- fmtutil.Separator(true)
+ fmtutil.Separator(false)
}
switch payloadType {
diff --git a/cli/cmd_release.go b/cli/cmd_release.go
index 47da6640..4f73a91b 100644
--- a/cli/cmd_release.go
+++ b/cli/cmd_release.go
@@ -81,7 +81,7 @@ func releasePackagesFiles(ctx *context, files []repo.PackageFile) bool {
released = true
}
- if released {
+ if released && !options.GetB(OPT_POSTPONE_INDEX) {
fmtc.NewLine()
reindexRepository(ctx, ctx.Repo.Release, false)
}
diff --git a/cli/cmd_remove.go b/cli/cmd_remove.go
index d730b51f..f4735961 100644
--- a/cli/cmd_remove.go
+++ b/cli/cmd_remove.go
@@ -121,7 +121,7 @@ func removePackagesFiles(ctx *context, releaseFiles, testingFiles []repo.Package
isCancelProtected = false
- if releaseRemoved || testingRemoved {
+ if (releaseRemoved || testingRemoved) && !options.GetB(OPT_POSTPONE_INDEX) {
fmtc.NewLine()
if releaseRemoved {
diff --git a/cli/cmd_resign.go b/cli/cmd_resign.go
index 0d95606f..465d51a3 100644
--- a/cli/cmd_resign.go
+++ b/cli/cmd_resign.go
@@ -55,7 +55,7 @@ how many packages you have and how big they are).`)
// resignAllPackages re-singes all packages in testing and release repositories
func resignAllPackages(ctx *context, key *sign.Key) bool {
- var isResigned bool
+ isResigned := false
if !resignRepoPackages(ctx, key, ctx.Repo.Testing) {
ctx.Logger.Get(data.REPO_TESTING).Print("Packages re-signing finished with error")
diff --git a/cli/cmd_unrelease.go b/cli/cmd_unrelease.go
index 006af661..c2acdfbd 100644
--- a/cli/cmd_unrelease.go
+++ b/cli/cmd_unrelease.go
@@ -87,7 +87,7 @@ func unreleasePackagesFiles(ctx *context, files []repo.PackageFile) bool {
unreleased = true
}
- if unreleased {
+ if unreleased && !options.GetB(OPT_POSTPONE_INDEX) {
fmtc.NewLine()
reindexRepository(ctx, ctx.Repo.Release, false)
diff --git a/cli/common.go b/cli/common.go
index ee75e741..52330099 100644
--- a/cli/common.go
+++ b/cli/common.go
@@ -325,8 +325,7 @@ func getRepoContext(repoCfg *knf.Config) (*context, error) {
// getRepoStorage configures repository storage
func getRepoStorage(typ string, repoCfg *knf.Config) (storage.Storage, error) {
- switch typ {
- case storage.TYPE_FS:
+ if typ == storage.TYPE_FS {
return getRepoFSStorage(repoCfg)
}
diff --git a/cli/support/support.go b/cli/support/support.go
index 9f95d082..02f813ec 100644
--- a/cli/support/support.go
+++ b/cli/support/support.go
@@ -11,6 +11,7 @@ import (
"fmt"
"os"
"runtime"
+ "runtime/debug"
"strings"
"github.com/essentialkaos/ek/v12/fmtc"
@@ -94,6 +95,23 @@ func showDepsInfo(gomod []byte) {
}
}
+// extractGitRevFromBuildInfo extracts git SHA from embedded build info
+func extractGitRevFromBuildInfo() string {
+ info, ok := debug.ReadBuildInfo()
+
+ if !ok {
+ return ""
+ }
+
+ for _, s := range info.Settings {
+ if s.Key == "vcs.revision" && len(s.Value) > 7 {
+ return s.Value[:7]
+ }
+ }
+
+ return ""
+}
+
// getHashColorBullet return bullet with color from hash
func getHashColorBullet(v string) string {
if len(v) > 6 {
@@ -105,7 +123,7 @@ func getHashColorBullet(v string) string {
// printInfo formats and prints info record
func printInfo(size int, name, value string) {
- name = name + ":"
+ name += ":"
size++
if value == "" {
@@ -116,5 +134,3 @@ func printInfo(size int, name, value string) {
fmtc.Printf(fm, name, value)
}
}
-
-// ////////////////////////////////////////////////////////////////////////////////// //
diff --git a/cli/support/support_linux.go b/cli/support/support_linux.go
index 0296fb1a..465d87e7 100644
--- a/cli/support/support_linux.go
+++ b/cli/support/support_linux.go
@@ -13,9 +13,9 @@ import (
"github.com/essentialkaos/ek/v12/fmtc"
"github.com/essentialkaos/ek/v12/fmtutil"
- "github.com/essentialkaos/ek/v12/fsutil"
"github.com/essentialkaos/ek/v12/strutil"
"github.com/essentialkaos/ek/v12/system"
+ "github.com/essentialkaos/ek/v12/system/container"
)
// ////////////////////////////////////////////////////////////////////////////////// //
@@ -27,13 +27,14 @@ func showOSInfo() {
if err == nil {
fmtutil.Separator(false, "OS INFO")
- printInfo(12, "Name", osInfo.Name)
- printInfo(12, "Pretty Name", osInfo.PrettyName)
- printInfo(12, "Version", osInfo.VersionID)
+ printInfo(12, "Name", osInfo.ColoredName())
+ printInfo(12, "Pretty Name", osInfo.ColoredPrettyName())
+ printInfo(12, "Version", osInfo.Version)
printInfo(12, "ID", osInfo.ID)
printInfo(12, "ID Like", osInfo.IDLike)
printInfo(12, "Version ID", osInfo.VersionID)
printInfo(12, "Version Code", osInfo.VersionCodename)
+ printInfo(12, "Platform ID", osInfo.PlatformID)
printInfo(12, "CPE", osInfo.CPEName)
}
@@ -53,11 +54,13 @@ func showOSInfo() {
containerEngine := "No"
- switch {
- case fsutil.IsExist("/.dockerenv"):
+ switch container.GetEngine() {
+ case container.DOCKER:
containerEngine = "Yes (Docker)"
- case fsutil.IsExist("/run/.containerenv"):
+ case container.PODMAN:
containerEngine = "Yes (Podman)"
+ case container.LXC:
+ containerEngine = "Yes (LXC)"
}
fmtc.NewLine()
@@ -82,5 +85,8 @@ func showEnvInfo() {
crVer = strutil.Exclude(crVer, "Version: ")
crVer = strings.ReplaceAll(crVer, " )", ")")
- printInfo(12, "createrepo_c", crVer)
+ crVer = strings.ReplaceAll(crVer, "(", "{s-}(")
+ crVer = strings.ReplaceAll(crVer, ")", "){!}")
+
+ printInfo(12, "createrepo_c", fmtc.Sprint(crVer))
}
diff --git a/common/rep.spec b/common/rep.spec
index a544b32a..176da9e2 100644
--- a/common/rep.spec
+++ b/common/rep.spec
@@ -15,7 +15,7 @@
Summary: YUM repository management utility
Name: rep
-Version: 3.2.0
+Version: 3.3.0
Release: 0%{?dist}
Group: Applications/System
License: Apache 2.0
@@ -27,7 +27,7 @@ Source100: checksum.sha512
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: golang >= 1.20
+BuildRequires: golang >= 1.21
Requires: createrepo_c
@@ -107,6 +107,14 @@ rm -rf %{buildroot}
################################################################################
%changelog
+* Mon Oct 09 2023 Anton Novojilov - 3.3.0-0
+- Added -pi/--postpone-index option to postpone index rebuild after some
+ commands
+- Added package filtering for 'cleanup' command
+- Improved pagers (more/less) support
+- UI improvements
+- Fixed 'payload' command output
+
* Thu Oct 05 2023 Anton Novojilov - 3.2.0-0
- Added xz compression support for repository metadata
- Added zst compression support for repository metadata
diff --git a/go.mod b/go.mod
index 53cb63f9..084af0cd 100644
--- a/go.mod
+++ b/go.mod
@@ -6,22 +6,22 @@ require (
github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c
github.com/essentialkaos/check v1.4.0
github.com/essentialkaos/depsy v1.1.0
- github.com/essentialkaos/ek/v12 v12.79.0
- github.com/klauspost/compress v1.17.0
- github.com/mattn/go-sqlite3 v1.14.17
+ github.com/essentialkaos/ek/v12 v12.90.1
+ github.com/klauspost/compress v1.17.4
+ github.com/mattn/go-sqlite3 v1.14.18
github.com/sassoftware/go-rpmutils v0.2.0
github.com/ulikunitz/xz v0.5.11
- golang.org/x/crypto v0.13.0
+ golang.org/x/crypto v0.16.0
)
require (
github.com/DataDog/zstd v1.5.5 // indirect
- github.com/cloudflare/circl v1.3.3 // indirect
+ github.com/cloudflare/circl v1.3.6 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/essentialkaos/go-linenoise/v3 v3.4.0 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
- github.com/rogpeppe/go-internal v1.10.0 // indirect
+ github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
- golang.org/x/sys v0.12.0 // indirect
+ golang.org/x/sys v0.15.0 // indirect
)
diff --git a/go.sum b/go.sum
index b1032349..5ae48794 100644
--- a/go.sum
+++ b/go.sum
@@ -4,8 +4,9 @@ github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwS
github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c h1:kMFnB0vCcX7IL/m9Y5LO+KQYv+t1CQOiFe6+SV2J7bE=
github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0=
github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
-github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs=
github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA=
+github.com/cloudflare/circl v1.3.6 h1:/xbKIqSHbZXHwkhbrhrt2YOHIwYJlXH94E3tI/gDlUg=
+github.com/cloudflare/circl v1.3.6/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
@@ -14,13 +15,13 @@ github.com/essentialkaos/check v1.4.0 h1:kWdFxu9odCxUqo1NNFNJmguGrDHgwi3A8daXX1n
github.com/essentialkaos/check v1.4.0/go.mod h1:LMKPZ2H+9PXe7Y2gEoKyVAwUqXVgx7KtgibfsHJPus0=
github.com/essentialkaos/depsy v1.1.0 h1:U6dp687UkQwXlZU17Hg2KMxbp3nfZAoZ8duaeUFYvJI=
github.com/essentialkaos/depsy v1.1.0/go.mod h1:kpiTAV17dyByVnrbNaMcZt2jRwvuXClUYOzpyJQwtG8=
-github.com/essentialkaos/ek/v12 v12.79.0 h1:Dq/bCqk8/N5h/r5jJA2UHc1YoUEVYcc7xnR0DI5L9wA=
-github.com/essentialkaos/ek/v12 v12.79.0/go.mod h1:S9/XSKhEAdylL3PF8GAnUeKKyd92VrDGR4YGacHfz0c=
+github.com/essentialkaos/ek/v12 v12.90.1 h1:ID950cnz4xgpqqFzhleP5xaVoLnPwuiykdH3FrogD/E=
+github.com/essentialkaos/ek/v12 v12.90.1/go.mod h1:9efMqo1S8EtYhmeelOSTmMQDGC2vRgPkjkKKfvUD2eU=
github.com/essentialkaos/go-linenoise/v3 v3.4.0 h1:g72w8x+/HIwOMBVvNaPYp+wMWVHrYZwzFAF7OfZR5Ts=
github.com/essentialkaos/go-linenoise/v3 v3.4.0/go.mod h1:t1kNLY2bSMQCy1JXOefD2BDLs/TTPMtTv3DFNV5uDSI=
github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
-github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM=
-github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
+github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4=
+github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
@@ -28,14 +29,14 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
-github.com/mattn/go-sqlite3 v1.14.17 h1:mCRHCLDUBXgpKAqIKsaAaAsrAlbkeomtRFKXh2L6YIM=
-github.com/mattn/go-sqlite3 v1.14.17/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
+github.com/mattn/go-sqlite3 v1.14.18 h1:JL0eqdCOq6DJVNPSvArO/bIV9/P7fbGrV00LZHc+5aI=
+github.com/mattn/go-sqlite3 v1.14.18/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
-github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
-github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
+github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
+github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
github.com/sassoftware/go-rpmutils v0.2.0 h1:pKW0HDYMFWQ5b4JQPiI3WI12hGsVoW0V8+GMoZiI/JE=
github.com/sassoftware/go-rpmutils v0.2.0/go.mod h1:TJJQYtLe/BeEmEjelI3b7xNZjzAukEkeWKmoakvaOoI=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
@@ -55,8 +56,8 @@ golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWP
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
-golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck=
-golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
+golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY=
+golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs=
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
@@ -82,8 +83,8 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=
-golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
+golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=