summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Weingärtner <timo@tiwe.de>2012-02-25 21:17:02 +0100
committerTimo Weingärtner <timo@tiwe.de>2012-02-25 21:17:02 +0100
commit550c2f513a05899566ca90a1e859218ee44a8ac7 (patch)
tree4a357b16b938c67463822b1394b09403e086e709
parent4b444020fa50e4f22a427b981c582b35cdb4efb1 (diff)
downloadopenssh-known-hosts-debian/0.3.tar.gz
Imported Debian version 0.3debian/0.3
-rw-r--r--debian/changelog10
-rw-r--r--debian/control10
-rw-r--r--debian/copyright2
-rw-r--r--debian/openssh-known-hosts.docs1
-rw-r--r--debian/openssh-known-hosts.postinst14
-rw-r--r--debian/openssh-known-hosts.prerm3
-rwxr-xr-xdebian/rules92
-rw-r--r--debian/source/format1
-rwxr-xr-xupdate-openssh-known-hosts51
-rw-r--r--update-openssh-known-hosts.84
10 files changed, 74 insertions, 114 deletions
diff --git a/debian/changelog b/debian/changelog
index 9df9cde..c505714 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+openssh-known-hosts (0.3) fsmi-squeeze; urgency=low
+
+ * Bump Standards-Version to 3.8.4, no changes needed.
+ * Use dh in debian/rules.
+ * Remove /usr/local/share/openssh-known-hosts in prerm.
+ * Add debian/source/format.
+ * Quote umlauts in manpage.
+
+ -- Timo Weingärtner <timo@tiwe.de> Wed, 28 Apr 2010 17:06:32 +0200
+
openssh-known-hosts (0.2) unstable; urgency=low
* Add examples.
diff --git a/debian/control b/debian/control
index e23b98f..632ed44 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: net
Priority: extra
Maintainer: Timo Weingärtner <timo@tiwe.de>
Build-Depends: debhelper (>= 7)
-Standards-Version: 3.8.1
+Standards-Version: 3.8.4
Package: openssh-known-hosts
Architecture: all
@@ -12,5 +12,9 @@ Recommends: openssh-client, cron
Suggests: postgresql-client, rsync, curl, gpgv
Description: known_hosts downloader for OpenSSH
This package allows you to download public hostkeys from multiple sources
- and merge them together into one file for use by OpenSSH. Plugins for some
- types of sources are included, new plugins can easily be written.
+ and merge them together into one file for use by OpenSSH. Plugins included:
+ * curl (optional GnuPG verification)
+ * rsync (optional GnuPG verification)
+ * psql
+ * symlink
+ New plugins can easily be written.
diff --git a/debian/copyright b/debian/copyright
index 0e558ce..1904392 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,6 +1,6 @@
Copyright:
- Copyright (C) 2009 Timo Weingärtner <timo@tiwe.de>
+ Copyright (C) 2009-2010 Timo Weingärtner <timo@tiwe.de>
License:
diff --git a/debian/openssh-known-hosts.docs b/debian/openssh-known-hosts.docs
index ba8894c..e845566 100644
--- a/debian/openssh-known-hosts.docs
+++ b/debian/openssh-known-hosts.docs
@@ -1,2 +1 @@
README
-
diff --git a/debian/openssh-known-hosts.postinst b/debian/openssh-known-hosts.postinst
index 5284c01..93858a1 100644
--- a/debian/openssh-known-hosts.postinst
+++ b/debian/openssh-known-hosts.postinst
@@ -36,8 +36,18 @@ esac
#DEBHELPER#
-
-mkdir -p /usr/local/share/openssh-known-hosts/plugins
+if [ ! -e /usr/local/share/openssh-known-hosts ]; then
+ if mkdir /usr/local/share/openssh-known-hosts 2>/dev/null; then
+ chown root:staff /usr/local/share/openssh-known-hosts
+ chmod 2775 /usr/local/share/openssh-known-hosts
+ fi
+fi
+if [ ! -e /usr/local/share/openssh-known-hosts/plugins ]; then
+ if mkdir /usr/local/share/openssh-known-hosts/plugins 2>/dev/null; then
+ chown root:staff /usr/local/share/openssh-known-hosts/plugins
+ chmod 2775 /usr/local/share/openssh-known-hosts/plugins
+ fi
+fi
[ -e /etc/ssh/ssh_known_hosts ] || ln -s /var/lib/openssh-known-hosts/ssh_known_hosts /etc/ssh/ssh_known_hosts
if [ "`readlink /etc/ssh/ssh_known_hosts`" != /var/lib/openssh-known-hosts/ssh_known_hosts ]; then
diff --git a/debian/openssh-known-hosts.prerm b/debian/openssh-known-hosts.prerm
index 0a34eba..b5730c7 100644
--- a/debian/openssh-known-hosts.prerm
+++ b/debian/openssh-known-hosts.prerm
@@ -40,6 +40,9 @@ if [ -L /etc/ssh/ssh_known_hosts ] && \
rm /etc/ssh/ssh_known_hosts
fi
+rmdir /usr/local/share/openssh-known-hosts/plugins 2>/dev/null || true
+rmdir /usr/local/share/openssh-known-hosts 2>/dev/null || true
+
exit 0
diff --git a/debian/rules b/debian/rules
index f1516b9..2d33f6a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,92 +1,4 @@
#!/usr/bin/make -f
-# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-#
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
-#
-# Modified to make a template file for a multi-binary package with separated
-# build-arch and build-indep targets by Bill Allombert 2001
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-# This has to be exported to make some magic below work.
-export DH_OPTIONS
-
-
-
-
-
-
-configure: configure-stamp
-configure-stamp:
- dh_testdir
-
- touch configure-stamp
-
-
-build: build-arch build-indep
-
-build-arch: build-arch-stamp
-build-arch-stamp: configure-stamp
-
- touch $@
-
-build-indep: build-indep-stamp
-build-indep-stamp: configure-stamp
-
- touch $@
-
-clean:
- dh_testdir
- dh_testroot
- rm -f build-arch-stamp build-indep-stamp configure-stamp
-
- dh_clean
-
-install: install-indep install-arch
-install-indep:
- dh_testdir
- dh_testroot
- dh_prep -i
- dh_installdirs -i
-
- dh_install -i
-
-install-arch:
- dh_testdir
- dh_testroot
- dh_prep -s
- dh_installdirs -s
-
- dh_install -s
-# Must not depend on anything. This is to be called by
-# binary-arch/binary-indep
-# in another 'make' thread.
-binary-common:
- dh_testdir
- dh_testroot
- dh_installchangelogs
- dh_installdocs
- dh_installexamples
- dh_installcron
- dh_installman
- dh_compress
- dh_fixperms
- dh_installdeb
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-# Build architecture independant packages using the common target.
-binary-indep: build-indep install-indep
- $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
-
-# Build architecture dependant packages using the common target.
-#binary-arch: build-arch install-arch
-# $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
-
-binary: binary-indep
-.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure
+%:
+ dh $@
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..d3827e7
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+1.0
diff --git a/update-openssh-known-hosts b/update-openssh-known-hosts
index 136535a..63df1e3 100755
--- a/update-openssh-known-hosts
+++ b/update-openssh-known-hosts
@@ -1,4 +1,4 @@
-#!/bin/dash
+#!/bin/bash
set -euC
@@ -9,18 +9,39 @@ LOCK=/var/lock/openssh-known-hosts
OUTFILE=/var/lib/openssh-known-hosts/ssh_known_hosts
path_search () {
- if [ "${1}" != "${1#*/}" ]; then
- echo $1
- else
- echo "$2" | tr ':' '\n' | while read -r path; do
- if [ -f "${path}/${1}" ]; then
- echo "${path}/${1}"
- break
- fi
- done
+ search="$1"
+ shift
+ local IFS
+ IFS=:
+ set -- $@
+ if [ "${search}" != "${search#*/}" ]; then
+ echo "${search}"
+ return 0
fi
+ for path; do
+ if [ -f "${path}/${search}" ]; then
+ echo "${path}/${search}"
+ return 0
+ fi
+ done
+ echo "'${search}' not found in '$@'!" >&2
+ exit 127
+}
+
+cleanup () {
+ rm -f "${OUTFILE}.new"
+ kill "${LOCKPID}"
+ lockfile-remove "${LOCK}"
}
+if [ $# = 1 ] && [ "$1" = "-f" ]; then
+ fail=1
+else
+ fail=''
+fi
+
+trap cleanup EXIT
+
lockfile-create "${LOCK}"
lockfile-touch "${LOCK}" &
LOCKPID="$!"
@@ -47,13 +68,16 @@ run-parts --list "${CONFDIR}/sources/" | while read sourcefile; do
break
fi
done
- if [ ! "$ignore" ]; then
+ if [ "$ignore" != "1" -o "$fail" = "1" ]; then
echo "${source} exited with code ${exitcode}, log follows:"
cat log
echo
fi
+ if [ "$fail" = "1" ]; then
+ exit 1
+ fi
}
- )
+ ) || exit 1
if [ -e ${source}/new ]; then
mv ${source}/new ${source}/current
fi
@@ -70,7 +94,4 @@ for d in *; do
[ -e "${CONFDIR}/sources/$d" ] || rm -fr $d
done
-kill "${LOCKPID}"
-lockfile-remove "${LOCK}"
-
# vim:set ft=sh:
diff --git a/update-openssh-known-hosts.8 b/update-openssh-known-hosts.8
index 445c7d6..40552bd 100644
--- a/update-openssh-known-hosts.8
+++ b/update-openssh-known-hosts.8
@@ -36,7 +36,7 @@ This program takes no options.
.BR /usr/share/doc/openssh-known-hosts ,
.BR /usr/share/openssh-known-hosts/plugins/* .
.SH AUTHOR
-openssh-known-hosts was written by Timo Weingärtner <timo@tiwe.de>.
+openssh-known-hosts was written by Timo Weing\[:a]rtner <timo@tiwe.de>.
.PP
-This manual page was written by Timo Weingärtner <timo@tiwe.de>,
+This manual page was written by Timo Weing\[:a]rtner <timo@tiwe.de>,
for the Debian project (but may be used by others).