#168 add fkinit
Closed 3 years ago by humaton. Opened 3 years ago by msuchy.
msuchy/fedora-packager fkinit  into  main

file modified
+5
@@ -3,6 +3,7 @@ 

  	fedora-cert \

  	fedora-getsvn \

  	fedora-hosted \

+ 	fkinit \

  	pkgname \

  	rpmbuild-md5 \

  	s390-koji \
@@ -58,6 +59,10 @@ 

  	rm -f stg-koji

  	install -p -m 755 -T $(srcdir)/src/secondary-koji stg-koji

  

+ fkinit: $(srcdir)/src/fkinit

+ 	rm -f fkinit

+ 	install -p -m 755 -T $(srcdir)/src/fkinit fkinit

+ 

  fedora_cert_PYTHON = $(wildcard $(srcdir)/src/fedora_cert/*.py)

  

  fedora_certdir = $(pythondir)/fedora_cert

file added
+13
@@ -0,0 +1,13 @@ 

+ #!/usr/bin/bash

+ 

+ [ -d "${HOME}/.cache" ] || mkdir "${HOME}/.cache"

+ 

+ FUSER="${USER}"

+ if [ -n "$1" ]; then

+   FUSER="${1}"

+ fi

+ 

+ kinit -n @FEDORAPROJECT.ORG -c "FILE:${HOME}/.cache/armor.ccache"

+ 	

+ echo "Enter your password and OTP concatenated. (Ignore that the prompt is for only the token)"

+ kinit -T "FILE:${HOME}/.cache/armor.ccache" "${FUSER}@FEDORAPROJECT.ORG"

Should this be mkdir "${HOME}/.cache"?

Would be nice for fkinit to take an optional argument, in order to be able to specify an user name different than ${USER}.

I have a slightly more comprehensive script available at https://pagure.io/fedora-kinit/blob/main/f/fedora-kinit that we can include. It will handle the username difference as well.

rebased onto b95aa56

3 years ago

rebased onto 195fb4d

3 years ago

@csomh both notes addressed
@sgallagh I stolen one line from your script. Feel free to submit another PR and @mohanboddu will decide who will win :)

@csomh both notes addressed
@sgallagh I stolen one line from your script. Feel free to submit another PR and @mohanboddu will decide who will win :)

https://pagure.io/fedora-packager/pull-request/169

Pull-Request has been closed by humaton

3 years ago
Metadata