diff options
author | another | 2015-06-14 15:22:26 +0200 |
---|---|---|
committer | another | 2015-06-14 15:22:26 +0200 |
commit | dfe7d2ee995d147f64eaca7abb3fd8c1a21daacf (patch) | |
tree | 3a6d180b6ae1cc1702e7092fad5fbb7ae4692fb4 | |
download | aur-dfe7d2ee995d147f64eaca7abb3fd8c1a21daacf.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 31 | ||||
-rw-r--r-- | .gitignore | 33 | ||||
-rw-r--r-- | PKGBUILD | 43 | ||||
-rw-r--r-- | openssh-known-hosts.cron.d | 4 | ||||
-rw-r--r-- | openssh-known-hosts.install | 17 | ||||
-rw-r--r-- | update-openssh-known-hosts.8 | 96 |
6 files changed, 224 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..e5132040468f --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,31 @@ +pkgbase = openssh-known-hosts + pkgdesc = known_hosts downloader/merger for OpenSSH + pkgver = 0.6.2 + pkgrel = 1 + url = https://github.com/tiwe-de/openssh-known-hosts + install = openssh-known-hosts.install + arch = any + license = GPL3 + depends = bash + depends = lockfile-progs + optdepends = cron: periodic execution + optdepends = openssh: connect to remote servers + optdepends = curl: retrieve known_hosts via HTTP, FTP, etc. + optdepends = rsync: retrieve known_hosts via rsync + optdepends = postgresql-client: retrieve known_hosts from PostgreSQL + optdepends = gnupg: verify signed files + source = https://github.com/tiwe-de/openssh-known-hosts/archive/0.6.2.tar.gz + source = update-openssh-known-hosts.8 + source = openssh-known-hosts.cron.d + sha256sums = 2d1cbb0c206cddf514304fb9e6a132497e1aa2e20da6eaf53ca3a02584ef9d30 + sha256sums = 3b1e5b3c889ad550a233814a14461ce6bbf33e858fca55761ffb69e0c28c317e + sha256sums = c6f1e2c22664b102710eb21aec306b6e73b3caf88e3c870b1e3ffc496d0e406d + sha384sums = 6fc4dc33bb83fb59aa2aae78a07e7bfb54a6a47e1ba9c46d229b7247852604cb087cd7630fcb5327cf4785925c319a97 + sha384sums = a8f46b782ba3b95ee327aa5735b0f6c572019e2359847c2fbc3683facf89b583acc4f8b01db5d76ba26367ca29f5841f + sha384sums = 0c3cc0452caf6b6f85ab47d496cce53db9525cf2d406de03fda7cb59ba9c02193381b56e848ec79b93a82143cbd3aaef + sha512sums = 90ed8bf3068590b5fab3dcfcb3e001b149660e1c4875d3fc87ba764334ac758be99b80dcbe6f8715389f374228e7d09f1de9125db5001356105dc48abf595ae0 + sha512sums = 7ca4360231ea3e6b7e19aa2aac576acb112c5a6b54ed675034f1ba3de378805842478d7001da3342dd97b0d64d842576f14d3ea522a0480468d370d69b5c1f14 + sha512sums = 64da7c4baa16eb9d41a143aca5a47380afc85c9faf25eb17ff5ccdbd7b02500d5dbb527cdbcd62829a729a9833a0c66977e03532f71a43e91ba8b42c61fe0a99 + +pkgname = openssh-known-hosts + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..0490f42ef0e2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,33 @@ +# Copyright (c) 2014 GitHub, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +*.tar +*.tar.* +*.zip +*.tgz +*.log +*.log.* +*.sig + +# AUR metadata +.AURINFO + +pkg/ +src/ diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..019a0073b04f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,43 @@ +# Maintainer: another <code § deadcode § eu> +pkgname=openssh-known-hosts +pkgver=0.6.2 +pkgrel=1 +pkgdesc="known_hosts downloader/merger for OpenSSH" +arch=('any') +url="https://github.com/tiwe-de/openssh-known-hosts" +license=('GPL3') +depends=('bash' 'lockfile-progs') +optdepends=('cron: periodic execution' + 'openssh: connect to remote servers' + 'curl: retrieve known_hosts via HTTP, FTP, etc.' + 'rsync: retrieve known_hosts via rsync' + 'postgresql-client: retrieve known_hosts from PostgreSQL' + 'gnupg: verify signed files') +install=openssh-known-hosts.install +source=("https://github.com/tiwe-de/$pkgname/archive/$pkgver.tar.gz" + "update-openssh-known-hosts.8" + "openssh-known-hosts.cron.d") +sha256sums=('2d1cbb0c206cddf514304fb9e6a132497e1aa2e20da6eaf53ca3a02584ef9d30' + '3b1e5b3c889ad550a233814a14461ce6bbf33e858fca55761ffb69e0c28c317e' + 'c6f1e2c22664b102710eb21aec306b6e73b3caf88e3c870b1e3ffc496d0e406d') +sha384sums=('6fc4dc33bb83fb59aa2aae78a07e7bfb54a6a47e1ba9c46d229b7247852604cb087cd7630fcb5327cf4785925c319a97' + 'a8f46b782ba3b95ee327aa5735b0f6c572019e2359847c2fbc3683facf89b583acc4f8b01db5d76ba26367ca29f5841f' + '0c3cc0452caf6b6f85ab47d496cce53db9525cf2d406de03fda7cb59ba9c02193381b56e848ec79b93a82143cbd3aaef') +sha512sums=('90ed8bf3068590b5fab3dcfcb3e001b149660e1c4875d3fc87ba764334ac758be99b80dcbe6f8715389f374228e7d09f1de9125db5001356105dc48abf595ae0' + '7ca4360231ea3e6b7e19aa2aac576acb112c5a6b54ed675034f1ba3de378805842478d7001da3342dd97b0d64d842576f14d3ea522a0480468d370d69b5c1f14' + '64da7c4baa16eb9d41a143aca5a47380afc85c9faf25eb17ff5ccdbd7b02500d5dbb527cdbcd62829a729a9833a0c66977e03532f71a43e91ba8b42c61fe0a99') + +package() { + install -Dm0644 update-openssh-known-hosts.8 $pkgdir/usr/share/man/man8/update-openssh-known-hosts.8 + install -Dm0644 openssh-known-hosts.cron.d $pkgdir/etc/cron.d/$pkgname + + cd "$srcdir/${pkgname}-${pkgver}" + install -Dm0755 update-openssh-known-hosts $pkgdir/usr/bin/update-openssh-known-hosts + install -dm0755 $pkgdir/usr/share/$pkgname/plugins + install -Dm0755 plugins/* $pkgdir/usr/share/$pkgname/plugins/ + install -dm0755 $pkgdir/usr/share/doc/$pkgname/examples + install -Dm0644 examples/* $pkgdir/usr/share/doc/$pkgname/examples/ + install -Dm0644 changelog $pkgdir/usr/share/doc/$pkgname/changelog + install -dm0755 $pkgdir/var/{lib,cache}/$pkgname $pkgdir/etc/$pkgname/sources $pkgdir/usr/local/share/$pkgname/plugins + install -dm0755 $pkgdir/etc/ssh +} diff --git a/openssh-known-hosts.cron.d b/openssh-known-hosts.cron.d new file mode 100644 index 000000000000..ea796a800ac8 --- /dev/null +++ b/openssh-known-hosts.cron.d @@ -0,0 +1,4 @@ +# +# Regular cron jobs for the openssh-known-hosts package +# +0 * * * * root [ -x /usr/bin/update-openssh-known-hosts ] && { sleep `od -An -N1 -tu1 /dev/urandom`; /usr/bin/update-openssh-known-hosts; } diff --git a/openssh-known-hosts.install b/openssh-known-hosts.install new file mode 100644 index 000000000000..4b5d2665a1e8 --- /dev/null +++ b/openssh-known-hosts.install @@ -0,0 +1,17 @@ +post_install() { + kh_link=/etc/ssh/ssh_known_hosts + kh_dest=/var/lib/openssh-known-hosts/ssh_known_hosts + [ -L $kh_link ] || [ -e $kh_link ] || ln -s $kh_dest $kh_link + if [ "`readlink $kh_link`" != $kh_dest ]; then + echo "$kh_link already exists, please set up the link to" + echo "$kh_dest yourself or point to it" + echo "with GlobalKnownHostsFile in ssh_config(5)." + fi +} + +pre_remove() { + if [ -L /etc/ssh/ssh_known_hosts ] && \ + [ "`readlink /etc/ssh/ssh_known_hosts`" = /var/lib/openssh-known-hosts/ssh_known_hosts ]; then + rm /etc/ssh/ssh_known_hosts + fi +} diff --git a/update-openssh-known-hosts.8 b/update-openssh-known-hosts.8 new file mode 100644 index 000000000000..f3fe641fed2c --- /dev/null +++ b/update-openssh-known-hosts.8 @@ -0,0 +1,96 @@ +.TH "UPDATE\-OPENSSH\-KNOWN\-HOSTS" "8" "2014\-02\-03" "" "" +.SH NAME +.PP +update\-openssh\-knwon\-hosts \- download, filter and merge known_hosts +for OpenSSH +.SH SYNOPSIS +.PP +\f[I]update\-openssh\-known\-hosts\f[] [\f[I]\-f\f[]] +.SH DESCRIPTION +.PP +update\-openssh\-known\-hosts manages downloading, filtering and +mergeing of ssh_known_hosts files from anywhere into one local file for +use by ssh(1). +.SH OPTIONS +.TP +.B \-f +treat every non\-zero exit from download plugin as an error, see +EXIT_IGNORE below. +.RS +.RE +.SH RETURN VALUES +.PP +Returns zero on success and anything else on error. +.SH ENVIRONMENT +.TP +.B CONFDIR +Configuration directory, defaults to /etc/openssh\-known\-hosts. +Currently there is only a sources subdirectory in it. +.RS +.RE +.TP +.B PLUGIN_PATH +Plugin search path, defaults to +/usr/local/share/openssh\-known\-hosts/plugins:/usr/share/openssh\-known\-hosts/plugins. +.RS +.RE +.TP +.B CACHEDIR +Cache directory, defaults to /var/cache/openssh\-known\-hosts. +.RS +.RE +.TP +.B LOCK +Lockfile path, defaults to /var/lock/openssh\-known\-hosts. +.RS +.RE +.TP +.B OUTFILE +Output file name, defaults to +/var/lib/openssh\-known\-hosts/ssh_known_hosts +.RS +.RE +.SH SOURCE DEFINITIONS +.PP +A source definition is shell snippet dropped into CONFDIR/sources/ with +a run\-parts(8) compliant name. +There are two variables not specific to a download plugin: +.TP +.B PLUGIN +name of the download plugin to use, searched for in PLUGIN_PATH. +.RS +.RE +.TP +.B EXIT_IGNORE +optional space\-seperated list of exitcodes which should be ignored. +Upon such exit code the previously downloaded version is used. +.RS +.RE +.SH DOWNLOAD PLUGINS +.PP +Download plugins are executables dropped into PLUGIN_PATH and referenced +via the PLUGIN variable in the source definition. +A plugin gets the variables set in the source definition in its +environment. +The working directory will be set to the source\[aq]s cache directory. +Everything a plugin has to do is to create a file named "new". +"current" must not be touched but can be used as a hint to skip +downloading the same file again. +stdout and stderr will be connected to "log", which will be output on +error. +Plugins needn\[aq]t create "new" if it would be identical to "current". +.SH HOSTNAME FILTERS +.PP +Place a file foo.filter next to your source definition foo. +Each line shall contain a rule consisting of an action, a space and a +pattern. +The first rule with a matching pattern decides: If the action starts +with a, o, p or y (for accept, admit, allow, ok, pass, permit, print, +yes, ...) the hostname will be used, otherwise it is discarded. +If a key has no hostnames left it is discarded as a whole. +.SH SEE ALSO +.PP +ssh(1), sshd(8), ssh_config(5), curl(1), rsync(1), psql(1), +run\-parts(8) +.SH AUTHORS +Timo Weingärtner <timo@tiwe.de>. |