From 4c4f77f6f252114439ddd39ff7a25a86f7332dfa Mon Sep 17 00:00:00 2001 From: Tomas Hrcka Date: May 11 2021 08:18:33 +0000 Subject: Bump release 0.6.0.6 Signed-off-by: Tomas Hrcka --- diff --git a/fedora-packager.spec b/fedora-packager.spec index 667d7b2..1696e48 100644 --- a/fedora-packager.spec +++ b/fedora-packager.spec @@ -3,8 +3,8 @@ %endif Name: fedora-packager -Version: 0.6.0.5 -Release: 2%{?dist} +Version: 0.6.0.6 +Release: 1%{?dist} Summary: Tools for setting up a fedora maintainer environment License: GPLv2+ @@ -83,6 +83,9 @@ sed -i -r 's|#!/usr/bin/python$|#!%{__python3}|' %{buildroot}/usr/*bin/* %{_sbindir}/* %changelog +* Tue May 11 2021 Tomas Hrcka - 0.6.0.6-1 +- Add fkinit (sgallagh) + * Fri May 07 2021 Fabian Arrotin - 0.6.0.5-2 - minor change to have centos.org alias for kerberos auth to work client side diff --git a/fkinit b/fkinit deleted file mode 100755 index 9bb5772..0000000 --- a/fkinit +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash - -# Created by argbash-init v2.10.0 -# ARG_OPTIONAL_SINGLE([user],[u],[Fedora account name],[$USER]) -# ARG_HELP([Acquire a Kerberos ticket-granting ticket for Fedora]) -# ARGBASH_GO() -# needed because of Argbash --> m4_ignore([ -### START OF CODE GENERATED BY Argbash v2.10.0 one line above ### -# Argbash is a bash code generator used to get arguments parsing right. -# Argbash is FREE SOFTWARE, see https://argbash.io for more info - - -die() -{ - local _ret="${2:-1}" - test "${_PRINT_HELP:-no}" = yes && print_help >&2 - echo "$1" >&2 - exit "${_ret}" -} - - -begins_with_short_option() -{ - local first_option all_short_options='uh' - first_option="${1:0:1}" - test "$all_short_options" = "${all_short_options/$first_option/}" && return 1 || return 0 -} - -# THE DEFAULTS INITIALIZATION - OPTIONALS -_arg_user="$USER" - - -print_help() -{ - printf '%s\n' "Acquire a Kerberos ticket-granting ticket for Fedora" - printf 'Usage: %s [-u|--user ] [-h|--help]\n' "$0" - printf '\t%s\n' "-u, --user: Fedora account name (default: '$USER')" - printf '\t%s\n' "-h, --help: Prints help" -} - - -parse_commandline() -{ - while test $# -gt 0 - do - _key="$1" - case "$_key" in - -u|--user) - test $# -lt 2 && die "Missing value for the optional argument '$_key'." 1 - _arg_user="$2" - shift - ;; - --user=*) - _arg_user="${_key##--user=}" - ;; - -u*) - _arg_user="${_key##-u}" - ;; - -h|--help) - print_help - exit 0 - ;; - -h*) - print_help - exit 0 - ;; - *) - _PRINT_HELP=yes die "FATAL ERROR: Got an unexpected argument '$1'" 1 - ;; - esac - shift - done -} - -parse_commandline "$@" - -# OTHER STUFF GENERATED BY Argbash - -### END OF CODE GENERATED BY Argbash (sortof) ### ]) -# [ <-- needed because of Argbash - -finalize() -{ - rm -f $armorcache -} - -set -e - -armorcache=$(mktemp) -trap finalize EXIT - -kinit -n @FEDORAPROJECT.ORG -c FILE:$armorcache - -echo "Enter your password and OTP concatenated. (Ignore that the prompt is for only the token)" -kinit -T FILE:$armorcache $_arg_user@FEDORAPROJECT.ORG - - -# ^^^ TERMINATE YOUR CODE BEFORE THE BOTTOM ARGBASH MARKER ^^^ - -# ] <-- needed because of Argbash diff --git a/src/fkinit b/src/fkinit new file mode 100755 index 0000000..9bb5772 --- /dev/null +++ b/src/fkinit @@ -0,0 +1,100 @@ +#!/bin/bash + +# Created by argbash-init v2.10.0 +# ARG_OPTIONAL_SINGLE([user],[u],[Fedora account name],[$USER]) +# ARG_HELP([Acquire a Kerberos ticket-granting ticket for Fedora]) +# ARGBASH_GO() +# needed because of Argbash --> m4_ignore([ +### START OF CODE GENERATED BY Argbash v2.10.0 one line above ### +# Argbash is a bash code generator used to get arguments parsing right. +# Argbash is FREE SOFTWARE, see https://argbash.io for more info + + +die() +{ + local _ret="${2:-1}" + test "${_PRINT_HELP:-no}" = yes && print_help >&2 + echo "$1" >&2 + exit "${_ret}" +} + + +begins_with_short_option() +{ + local first_option all_short_options='uh' + first_option="${1:0:1}" + test "$all_short_options" = "${all_short_options/$first_option/}" && return 1 || return 0 +} + +# THE DEFAULTS INITIALIZATION - OPTIONALS +_arg_user="$USER" + + +print_help() +{ + printf '%s\n' "Acquire a Kerberos ticket-granting ticket for Fedora" + printf 'Usage: %s [-u|--user ] [-h|--help]\n' "$0" + printf '\t%s\n' "-u, --user: Fedora account name (default: '$USER')" + printf '\t%s\n' "-h, --help: Prints help" +} + + +parse_commandline() +{ + while test $# -gt 0 + do + _key="$1" + case "$_key" in + -u|--user) + test $# -lt 2 && die "Missing value for the optional argument '$_key'." 1 + _arg_user="$2" + shift + ;; + --user=*) + _arg_user="${_key##--user=}" + ;; + -u*) + _arg_user="${_key##-u}" + ;; + -h|--help) + print_help + exit 0 + ;; + -h*) + print_help + exit 0 + ;; + *) + _PRINT_HELP=yes die "FATAL ERROR: Got an unexpected argument '$1'" 1 + ;; + esac + shift + done +} + +parse_commandline "$@" + +# OTHER STUFF GENERATED BY Argbash + +### END OF CODE GENERATED BY Argbash (sortof) ### ]) +# [ <-- needed because of Argbash + +finalize() +{ + rm -f $armorcache +} + +set -e + +armorcache=$(mktemp) +trap finalize EXIT + +kinit -n @FEDORAPROJECT.ORG -c FILE:$armorcache + +echo "Enter your password and OTP concatenated. (Ignore that the prompt is for only the token)" +kinit -T FILE:$armorcache $_arg_user@FEDORAPROJECT.ORG + + +# ^^^ TERMINATE YOUR CODE BEFORE THE BOTTOM ARGBASH MARKER ^^^ + +# ] <-- needed because of Argbash