Blame SOURCES/0001-feat-default-config-file-location.patch

696de9
--- main.go.orig	2022-02-11 15:41:53.199642591 -0500
696de9
+++ main.go	2022-02-11 15:42:43.738219604 -0500
696de9
@@ -6,6 +6,7 @@
696de9
 	"fmt"
696de9
 	"net"
696de9
 	"os"
696de9
+	"path/filepath"
696de9
 	"strconv"
696de9
 	"strings"
696de9
 	"time"
696de9
@@ -21,7 +22,7 @@
696de9
 )
696de9
 
696de9
 func main() {
696de9
-	fs := flag.NewFlagSet("yggd-package-manager-worker", flag.ExitOnError)
696de9
+	fs := flag.NewFlagSet(filepath.Base(os.Args[0]), flag.ExitOnError)
696de9
 
696de9
 	var (
696de9
 		socketAddr    = ""
696de9
@@ -32,7 +33,7 @@
696de9
 	fs.StringVar(&socketAddr, "socket-addr", "", "dispatcher socket address")
696de9
 	fs.Var(&logLevel, "log-level", "log verbosity level (error (default), warn, info, debug, trace)")
696de9
 	fs.Var(&allowPatterns, "allow-pattern", "regular expression pattern to allow package operations\n(can be specified multiple times)")
696de9
-	_ = fs.String("config", "", "path to `file` containing configuration values (optional)")
696de9
+	_ = fs.String("config", filepath.Join("etc", "rhc", "workers", fs.Name()+".toml"), "path to `file` containing configuration values (optional)")
696de9
 
696de9
 	ff.Parse(fs, os.Args[1:], ff.WithEnvVarPrefix("YGG"), ff.WithConfigFileFlag("config"), ff.WithConfigFileParser(fftoml.Parser))
696de9