diff --git a/.gitignore b/.gitignore index 2cd33d0..5742e6b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ keychain-2.6.8.tar.bz2 /keychain-2.8.0.tar.bz2 /keychain-2.8.5.tar.gz +/keychain-2.9.2.tar.gz +/keychain-2.9.8.tar.gz diff --git a/README.Fedora b/README.Fedora index 1a249d9..7d0a9a0 100644 --- a/README.Fedora +++ b/README.Fedora @@ -6,15 +6,14 @@ typically runs from the login shell environment setting, i.e. ~/.bash_profile when using bash or ~/.login when running a tcsh shell. It's general usage and different options are documented in keychain(1). -Installed from Fedora Extras keychain can be easily activated by simply -touching an empty ~/.keychainrc file when using either bash, sh, ksh, zsh, -csh or tcsh. +Installed from Fedora keychain can be easily activated by simply touching an +empty ~/.keychainrc file when using either bash, sh, ksh, zsh, csh or tcsh. This will let the user's shell invoke a default setup of keychain where it loads all user's ssh keys from ~/.ssh/ to an ssh-agent process. gpg keys are -not loaded by default as the necessary gpg-agent is not part of the Fedora -Core gnupg package, but provided by the additional gnupg2 package of Fedora -Extras. The default setup starts keychain in quiet mode, so only messages are -printed out in case of warnings, errors or if interactivity is required. +not loaded by default as the necessary gpg-agent is not part of the Fedora Core +gnupg package, but provided by the additional gnupg2 package of Fedora. The +default setup starts keychain in quiet mode, so only messages are printed out +in case of warnings, errors or if interactivity is required. To override the default settings with which keychain is activated when the shell environment finds a ~/.keychainrc, the user can customize following @@ -38,6 +37,6 @@ to make use of ssh public key auth or of gpg signing through cron jobs, because cron uses a non-interactive shell and has a limited environment set. Note: This opt-in is not part of keychain, which is originally written by -Daniel Robbins , but added to the Fedora Extras package -of keychain to allow Fedora users an overall ease of use. +Daniel Robbins , but added to the Fedora package of +keychain to allow Fedora users an overall ease of use. diff --git a/keychain.csh b/keychain.csh index 9ba0f1e..f937a7a 100755 --- a/keychain.csh +++ b/keychain.csh @@ -14,7 +14,7 @@ if ( "$HOME" == "$userhome" && -f "$HOME/.keychainrc" ) then set KCHOPTS = ( $KCHOPTS --noask ) endif if (! $?SSHKEYS) then - set SSHKEYS = `grep -l -e '[DRS]S[AH] PRIVATE KEY' $HOME/.ssh/*` + set SSHKEYS = `grep -s -l -e '[DRS]S[AH] PRIVATE KEY' $HOME/.ssh/*` endif if (! $?GPGKEYS) then set GPGKEYS = "" diff --git a/keychain.sh b/keychain.sh index 8903ccf..964f391 100755 --- a/keychain.sh +++ b/keychain.sh @@ -1,30 +1,30 @@ +# # /etc/profile.d/keychain.sh - calling keychain the Fedora way # read in user's keychain settings or use defaults running keychain # Don't do anything if we're already done. [ -n "$KEYCHAIN_DONE" ] && return -userhome=`getent passwd $USER | cut -d: -f6` -if [ "$HOME" = "$userhome" -a -f "$HOME/.keychainrc" ]; then - - . $HOME/.keychainrc +userhome=$(getent passwd "$USER" | cut -d: -f6) +if [ "$HOME" = "$userhome" ] && [ -f "$HOME/.keychainrc" ]; then + . "$HOME/.keychainrc" [ -n "$KCHOPTS" ] || KCHOPTS="--quiet" case $- in - *i*) ;; - *) KCHOPTS="$KCHOPTS --noask" ;; + *i*) ;; + *) KCHOPTS="$KCHOPTS --noask" ;; esac - [ -n "$SSHKEYS" ] || SSHKEYS=`grep -l -e '[DRS]S[AH] PRIVATE KEY' \ - $HOME/.ssh/*` + [ -n "$SSHKEYS" ] || SSHKEYS=$(grep -s -l -e '[DRS]S[AH] PRIVATE KEY' \ + "$HOME/.ssh/*") [ -n "$GPGKEYS" ] || GPGKEYS="" keychain $KCHOPTS $SSHKEYS $GPGKEYS - host=`uname -n` - [ -f $HOME/.keychain/$host-sh ] && \ - . $HOME/.keychain/$host-sh - [ -f $HOME/.keychain/$host-sh-gpg ] && \ - . $HOME/.keychain/$host-sh-gpg + host=$(uname -n) + [ -f "$HOME/.keychain/$host-sh" ] && \ + . "$HOME/.keychain/$host-sh" + [ -f "$HOME/.keychain/$host-sh-gpg" ] && \ + . "$HOME/.keychain/$host-sh-gpg" unset KCHOPTS SSHKEYS GPGKEYS host diff --git a/keychain.spec b/keychain.spec index 0eda84e..0074446 100644 --- a/keychain.spec +++ b/keychain.spec @@ -1,20 +1,18 @@ -Name: keychain -Summary: Agent manager for OpenSSH, ssh.com, Sun SSH, and GnuPG -Version: 2.8.5 -Release: 8%{?dist} -License: GPLv2 -URL: https://www.funtoo.org/Keychain -Source0: https://github.com/funtoo/keychain/archive/%{version}/keychain-%{version}.tar.gz -Source1: keychain.sh -Source2: keychain.csh -Source3: README.Fedora -BuildArch: noarch +Name: keychain +Summary: Agent manager for OpenSSH, ssh.com, Sun SSH, and GnuPG +Version: 2.9.8 +Release: %autorelease +License: GPL-2.0-only +URL: https://github.com/danielrobbins/keychain +Source0: https://github.com/funtoo/keychain/archive/%{version}/keychain-%{version}.tar.gz +Source1: keychain.sh +Source2: keychain.csh +Source3: README.Fedora +BuildArch: noarch +BuildRequires: make +BuildRequires: perl-podlators Requires: findutils -# https://bugzilla.redhat.com/show_bug.cgi?id=486025 -Conflicts: kde-settings < 4.2-3 -# https://bugzilla.redhat.com/show_bug.cgi?id=314431 -Conflicts: zsh < 4.3.4-7 %description Keychain is a manager for OpenSSH, ssh.com, Sun SSH and GnuPG agents. @@ -26,7 +24,10 @@ local machine is rebooted. %prep %setup -q -sed -i -e 's|/usr/ucb:||' keychain +sed -i -e 's|/usr/ucb:||' keychain.sh + +%build +make keychain keychain.1 %install rm -rf %{buildroot} @@ -40,142 +41,12 @@ install -pm 644 keychain.1 %{buildroot}%{_mandir}/man1 install -pm 644 %{SOURCE3} README.Fedora %files -%doc COPYING.txt ChangeLog README.md README.Fedora +%doc ChangeLog.md README.md README.Fedora +%license COPYING.txt %config(noreplace) %{_sysconfdir}/profile.d/keychain.sh %config(noreplace) %{_sysconfdir}/profile.d/keychain.csh %{_bindir}/keychain %{_mandir}/man1/keychain.1* %changelog -* Tue Apr 18 2023 Sérgio Basto - 2.8.5-8 -- Requires findutils (#2187705) - -* Thu Jan 19 2023 Fedora Release Engineering - 2.8.5-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Thu Jul 21 2022 Fedora Release Engineering - 2.8.5-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Thu Jan 20 2022 Fedora Release Engineering - 2.8.5-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Thu Jul 22 2021 Fedora Release Engineering - 2.8.5-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Tue Jan 26 2021 Fedora Release Engineering - 2.8.5-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Tue Jul 28 2020 Fedora Release Engineering - 2.8.5-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Mon Jun 01 2020 Sérgio Basto - 2.8.5-1 -- Update to 2.8.5 (#1226492) - -* Wed Jan 29 2020 Fedora Release Engineering - 2.8.0-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Thu Jul 25 2019 Fedora Release Engineering - 2.8.0-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Fri Feb 01 2019 Fedora Release Engineering - 2.8.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Fri Jul 13 2018 Fedora Release Engineering - 2.8.0-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Wed Feb 07 2018 Fedora Release Engineering - 2.8.0-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 2.8.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Fri Feb 10 2017 Fedora Release Engineering - 2.8.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Thu Feb 04 2016 Fedora Release Engineering - 2.8.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Wed Jun 17 2015 Fedora Release Engineering - 2.8.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Tue May 05 2015 Andreas Bierfert -- 2.8.0-1 -- version upgrade (rhbz#531382, rhbz#811365, rhbz#1209473) -- support for newer openssh/gnupg (rhbz#1204340) - -* Sun Jun 08 2014 Fedora Release Engineering - 2.6.8-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Sat Aug 03 2013 Fedora Release Engineering - 2.6.8-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Thu Feb 14 2013 Fedora Release Engineering - 2.6.8-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Thu Jul 19 2012 Fedora Release Engineering - 2.6.8-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Fri Jan 13 2012 Fedora Release Engineering - 2.6.8-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Mon Feb 07 2011 Fedora Release Engineering - 2.6.8-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Fri Jul 24 2009 Fedora Release Engineering - 2.6.8-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Mon Mar 2 2009 Ville Skyttä - 2.6.8-6 -- Write ~/.gpg-agent-info when launching gpg-agent for better compatibility - with other things using it, e.g. KDE 4 (#486025). -- Drop no longer needed zsh special case which caused issues with ksh from - profile.d script (#314431). - -* Wed Feb 25 2009 Fedora Release Engineering - 2.6.8-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Mon Feb 16 2009 Ville Skyttä - 2.6.8-4 -- Don't override/unset $HOST or $USERHOME in profile.d snippets (#463913). - -* Sun Apr 6 2008 Ville Skyttä - 2.6.8-3 -- Make profile.d sh snippet check if it has already run (skip if yes), - and avoid polluting the shell with its internal variables. -- License: GPLv2. -- Update URLs. - -* Sat Nov 04 2006 Alexander Dalloz - 2.6.8-2 -- Fix #212190. - -* Sat Nov 04 2006 Alexander Dalloz - 2.6.8-1 -- Update to 2.6.8. - -* Fri Sep 01 2006 Alexander Dalloz - 2.6.2-1 -- Update to 2.6.2. - -* Tue Aug 29 2006 Alexander Dalloz - 2.6.1-2 -- Rebuild for FC6. - -* Sat Nov 26 2005 Ville Skyttä - 2.6.1-1 -- Update to 2.6.1. -- Invoke keychain with --noask in opt-in scripts in non-interactive shells - to fix scp'ing to an opt-in enabled account for which keychain hasn't run. -- Make opt-in config work the same way with zsh as with other shells. -- Replace tweaks in manpage patch with more generic instructions. -- Make profile.d snippets non-executable (#35714). -- Preserve timestamps of installed files, other cosmetics. - -* Tue Aug 16 2005 Alexander Dalloz - 2.5.5-2 -- Added test for homedir mismatch in opt-in scripts, covering - `sudo -s' (reported by Ville Skyttä). - -* Fri Aug 05 2005 Alexander Dalloz - 2.5.5-1 -- Updated to new upstream version -- Removed keychain.pod from %%doc. - -* Wed Jul 27 2005 Alexander Dalloz - 2.5.4.1-2 -- Added manpage patch and %%prep removal of non existing path - (thanks Ville Skyttä) -- Added opt-in mechanism through profile.d scripts for all - login shells Fedora ships. - -* Sun Jul 10 2005 Alexander Dalloz - 2.5.4.1-1 -- Initial build, based on upstream .spec by Aron Griffis. +%autochangelog diff --git a/package.cfg b/package.cfg deleted file mode 100644 index 66ea79d..0000000 --- a/package.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[koji] -targets = epel8 epel8-playground \ No newline at end of file diff --git a/sources b/sources index 988ec87..e9ff696 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -SHA512 (keychain-2.8.5.tar.gz) = 2b98a9937b058267150d62d4f95653c4bbab6117a0774ac266abf95020c41905412b1522a82abf71722f25f6af31ba3498f6d54622009498c845802bf2df6024 +SHA512 (keychain-2.9.2.tar.gz) = 1b4aa06037cb3f89f4cfa6a4c1a1104ca6a757175a636043b7fb4776773a81f20b38b058b86618b8e6b89cf7c61af86e6441da70ed92b0c18d31fb50b3dd8a96 +SHA512 (keychain-2.9.8.tar.gz) = f6677f1e365703bada641757bb7d06d8d578c48fb0350c7e3ea032c6c3b4e725f59fd10800ef02aadbf25e8e973135da5d4d3705270340dc75b6756a736a71af