From ee5df0d697d824a99653de0e6819d0f2aacc105f Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 15 Jun 2026 09:34:14 -0400 Subject: [PATCH 1/2] Increase patch version for development Signed-off-by: Stephen Gallagher --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index da2c2e3..9b55235 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "ELNBuildSync" -version = "1.1.0" +version = "1.1.1" authors = [ { name = "Stephen Gallagher", email = "sgallagh@redhat.com" }, ] From 243bd280e842dde59eef2f408def256f3cd4feac Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 15 Jun 2026 16:06:26 -0400 Subject: [PATCH 2/2] Make the keytab principal configurable Signed-off-by: Stephen Gallagher --- run.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/run.sh b/run.sh index 87dcbd5..2a35553 100755 --- a/run.sh +++ b/run.sh @@ -23,6 +23,7 @@ # ARG_OPTIONAL_SINGLE([config-file],[],[Configuration file]) # ARG_OPTIONAL_SINGLE([config-url],[],[Configuration Git URL],[https://github.com/fedora-eln/elnbuildsync-config.git]) # ARG_OPTIONAL_SINGLE([config-branch],[],[Configuration Git branch],[main]) +# ARG_OPTIONAL_SINGLE([keytab-principal],[],[Keytab principal],[eln-buildsync@FEDORAPROJECT.ORG]) # ARG_POSITIONAL_DOUBLEDASH([]) # ARG_POSITIONAL_INF([custom],[Additional arguments to pass to the ELNBuildSync daemon]) # ARG_HELP([],[Run the ELNBuildSync daemon]) @@ -57,16 +58,18 @@ _arg_log_level="INFO" _arg_config_file= _arg_config_url="https://github.com/fedora-eln/elnbuildsync-config.git" _arg_config_branch="main" +_arg_keytab_principal="eln-buildsync@FEDORAPROJECT.ORG" print_help() { - printf 'Usage: %s [--log-level ] [--config-file ] [--config-url ] [--config-branch ] [-h|--help] [--] [] ... [] ...\n' "$0" + printf 'Usage: %s [--log-level ] [--config-file ] [--config-url ] [--config-branch ] [--keytab-principal ] [-h|--help] [--] [] ... [] ...\n' "$0" printf '\t%s\n' ": Additional arguments to pass to the ELNBuildSync daemon" printf '\t%s\n' "--log-level: Log verbosity (default: 'INFO')" printf '\t%s\n' "--config-file: Configuration file (no default)" printf '\t%s\n' "--config-url: Configuration Git URL (default: 'https://github.com/fedora-eln/elnbuildsync-config.git')" printf '\t%s\n' "--config-branch: Configuration Git branch (default: 'main')" + printf '\t%s\n' "--keytab-principal: Keytab principal (default: 'eln-buildsync@FEDORAPROJECT.ORG')" printf '\t%s\n' "-h, --help: Prints help" printf '\n%s\n' "Run the ELNBuildSync daemon" } @@ -122,6 +125,14 @@ parse_commandline() --config-branch=*) _arg_config_branch="${_key##--config-branch=}" ;; + --keytab-principal) + test $# -lt 2 && die "Missing value for the optional argument '$_key'." 1 + _arg_keytab_principal="$2" + shift + ;; + --keytab-principal=*) + _arg_keytab_principal="${_key##--keytab-principal=}" + ;; -h|--help) print_help exit 0 @@ -180,7 +191,7 @@ if [ -f /keytab/distrobaker.keytab ]; then export KRB5CCNAME=FILE:${TMPDIR}/tgt echo "Getting Kerberos TGT every hour" - (while true; do kinit -k -t /keytab/distrobaker.keytab eln-buildsync@FEDORAPROJECT.ORG; sleep 55m; done) & + (while true; do kinit -k -t /keytab/distrobaker.keytab ${_arg_keytab_principal}; sleep 55m; done) & fi # Make sure Kerberos is working by trying to connect to koji