From 7c064f5202c9ae9915ae92f684831f2059d3e3a9 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 27 Feb 2012 12:50:29 -0300 Subject: Check if config version is supported by keyringer --- keyringer | 4 +++- lib/keyringer/functions | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/keyringer b/keyringer index 8904685..8a6eeb1 100755 --- a/keyringer +++ b/keyringer @@ -129,14 +129,16 @@ function keyringer_preferences { # Config NAME="keyringer" +KEYRINGER_VERSION="0.1" CONFIG="$HOME/.$NAME/config" BASENAME="`basename $0`" KEYRING="$1" ACTION="$2" ACTIONS="`dirname $(readlink -f $0)`/share/$NAME" -# Export preferences for other scripts +# Export preferences and version for other scripts export PREFERENCES="`dirname $CONFIG`/$KEYRING" +export KEYRINGER_VERSION # Load functions LIB="`dirname $(readlink -f $0)`/lib/$NAME/functions" diff --git a/lib/keyringer/functions b/lib/keyringer/functions index a1c95a8..8166370 100644 --- a/lib/keyringer/functions +++ b/lib/keyringer/functions @@ -234,6 +234,16 @@ function keyringer_check_version { fi VERSION="`cat $VERSION_INFO`" + + # Check if config version is supported by keyringer + if [ "$VERSION" != "$KEYRINGER_VERSION" ]; then + NEWEST="`echo -e "$VERSION\n$KEYRINGER_VERSION" | sort -V | tail -n 1`" + if [ "$NEWEST" == "$VERSION" ]; then + echo "Fatal: keyringer version: $KEYRINGER_VERSION / config version: $VERSION" + echo "Please upgrade your keyringer application" + exit 1 + fi + fi } # Configuration upgrades -- cgit v1.2.3 From b26b353d9acc6fed4688beccfb5a1055f2dbdc2e Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 27 Feb 2012 22:39:32 -0300 Subject: EDITOR variable cannot be escaped as the editor might have arguments --- share/keyringer/recipients | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/keyringer/recipients b/share/keyringer/recipients index ab61bd7..0460842 100755 --- a/share/keyringer/recipients +++ b/share/keyringer/recipients @@ -32,7 +32,7 @@ if [ "$COMMAND" == "ls" ]; then elif [ "$COMMAND" == "edit" ]; then if [ ! -z "$3" ]; then keyringer_create_new_recipients $RECIPIENTS_FILE - "$EDITOR" "$RECIPIENTS_FILE" + $EDITOR "$RECIPIENTS_FILE" keyringer_check_recipients keyringer_exec git "$BASEDIR" add "$RECIPIENTS_FILE_BASE" else -- cgit v1.2.3 From b988e13c85cf1bce5f025eb08d14199a4658d57c Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 27 Feb 2012 22:39:59 -0300 Subject: Taking into account .asc extension in recipient files --- lib/keyringer/functions | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/keyringer/functions b/lib/keyringer/functions index 8166370..04807e6 100644 --- a/lib/keyringer/functions +++ b/lib/keyringer/functions @@ -369,6 +369,7 @@ function keyringer_set_recipients { keyringer_set_default_recipients else candidate="$1" + candidate_no_extension="`echo $1 | sed -e 's/.asc$//'`" # Find the first matching recipient while [ ! -z "$candidate" ] && [ "$candidate" != "." ] && [ "$candidate" != "/" ]; do @@ -376,6 +377,10 @@ function keyringer_set_recipients { RECIPIENTS_FILE="$RECIPIENTS/$candidate" RECIPIENTS_FILE_BASE="$RECIPIENTS_BASE/$candidate" return + elif [ -e "$RECIPIENTS/$candidate_no_extension" ]; then + RECIPIENTS_FILE="$RECIPIENTS/$candidate_no_extension" + RECIPIENTS_FILE_BASE="$RECIPIENTS_BASE/$candidate_no_extension" + return fi candidate="`dirname $candidate`" -- cgit v1.2.3 From 43f16c99965d8b80b0473fd49768dad44c3bc78c Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 26 Mar 2012 10:33:32 -0300 Subject: Pull and push config changes --- lib/keyringer/functions | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/lib/keyringer/functions b/lib/keyringer/functions index 04807e6..2955473 100644 --- a/lib/keyringer/functions +++ b/lib/keyringer/functions @@ -226,10 +226,21 @@ function keyringer_set_env { # Configuration version tracking to help keyring upgrades function keyringer_check_version { if [ ! -f "$VERSION_INFO" ]; then - echo "Creating configuration version file..." - echo 0 > "$VERSION_INFO" - if keyringer_is_git "$BASEDIR"; then - keyringer_exec git "$BASEDIR" add config/version + echo "Configuration version file not found, trying to pull from remotes..." + for remote in "$BASEDIR/.git/refs/remotes/*"; do + keyringer_exec git "$BASEDIR" pull `basename $remote` master + done + + if [ ! -f "$VERSION_INFO" ]; then + echo "Creating configuration version file..." + echo 0 > "$VERSION_INFO" + if keyringer_is_git "$BASEDIR"; then + keyringer_exec git "$BASEDIR" add config/version + echo "Pushing configuration version file to remotes..." + for remote in "$BASEDIR/.git/refs/remotes/*"; do + keyringer_exec git "$BASEDIR" push $remote master + done + fi fi fi @@ -237,11 +248,18 @@ function keyringer_check_version { # Check if config version is supported by keyringer if [ "$VERSION" != "$KEYRINGER_VERSION" ]; then - NEWEST="`echo -e "$VERSION\n$KEYRINGER_VERSION" | sort -V | tail -n 1`" - if [ "$NEWEST" == "$VERSION" ]; then - echo "Fatal: keyringer version: $KEYRINGER_VERSION / config version: $VERSION" - echo "Please upgrade your keyringer application" - exit 1 + echo "Configuration version differs from keyringer version, trying to pull from remotes" + for remote in "$BASEDIR/.git/refs/remotes/*"; do + keyringer_exec git "$BASEDIR" pull `basename $remote` master + done + + if [ "$VERSION" != "$KEYRINGER_VERSION" ]; then + NEWEST="`echo -e "$VERSION\n$KEYRINGER_VERSION" | sort -V | tail -n 1`" + if [ "$NEWEST" == "$VERSION" ]; then + echo "Fatal: keyringer version: $KEYRINGER_VERSION / config version: $VERSION" + echo "Please upgrade your keyringer application" + exit 1 + fi fi fi } @@ -258,7 +276,10 @@ function keyringer_upgrade { keyringer_exec git "$BASEDIR" add $RECIPIENTS_BASE/default keyringer_exec git "$BASEDIR" add config/version keyringer_exec git "$BASEDIR" commit -m "Config-upgrade-0.1" - echo "Upgrade to version 0.1 completed" + echo "Upgrade to version 0.1 completed, pushing to remotes..." + for remote in "$BASEDIR/.git/refs/remotes/*"; do + keyringer_exec git "$BASEDIR" push $remote master + done fi # Update version information -- cgit v1.2.3 From a0d856ef9006dae1ee8b73ccc3f348155c1885c2 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 26 Mar 2012 18:27:06 -0300 Subject: Adding KEYRINGER_CHECK_VERSION env variable --- lib/keyringer/functions | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/keyringer/functions b/lib/keyringer/functions index 2955473..3022bbe 100644 --- a/lib/keyringer/functions +++ b/lib/keyringer/functions @@ -225,6 +225,10 @@ function keyringer_set_env { # Configuration version tracking to help keyring upgrades function keyringer_check_version { + if [ "$KEYRINGER_CHECK_VERSION" == "false" ]; then + return + fi + if [ ! -f "$VERSION_INFO" ]; then echo "Configuration version file not found, trying to pull from remotes..." for remote in "$BASEDIR/.git/refs/remotes/*"; do -- cgit v1.2.3 From 694c6fbe32323c3fd59afa50fead82d20498f61a Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 30 Mar 2012 18:39:36 -0300 Subject: Do not use keyringer_exec as it would trigger keyringer_check_version again --- lib/keyringer/functions | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/keyringer/functions b/lib/keyringer/functions index 3022bbe..9d8498b 100644 --- a/lib/keyringer/functions +++ b/lib/keyringer/functions @@ -232,7 +232,8 @@ function keyringer_check_version { if [ ! -f "$VERSION_INFO" ]; then echo "Configuration version file not found, trying to pull from remotes..." for remote in "$BASEDIR/.git/refs/remotes/*"; do - keyringer_exec git "$BASEDIR" pull `basename $remote` master + # Do not use keyringer_exec as it would trigger keyringer_check_version again + ( cd "$BASEDIR" && git pull `basename $remote` master ) done if [ ! -f "$VERSION_INFO" ]; then @@ -254,7 +255,8 @@ function keyringer_check_version { if [ "$VERSION" != "$KEYRINGER_VERSION" ]; then echo "Configuration version differs from keyringer version, trying to pull from remotes" for remote in "$BASEDIR/.git/refs/remotes/*"; do - keyringer_exec git "$BASEDIR" pull `basename $remote` master + # Do not use keyringer_exec as it would trigger keyringer_check_version again + ( cd "$BASEDIR" && git pull `basename $remote` master ) done if [ "$VERSION" != "$KEYRINGER_VERSION" ]; then -- cgit v1.2.3 From 54b8f9a57106949a4e81f3112744855e872f781e Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 30 Mar 2012 18:40:44 -0300 Subject: Using just git pull at keyringer_check_version --- lib/keyringer/functions | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/keyringer/functions b/lib/keyringer/functions index 9d8498b..6ac8bf8 100644 --- a/lib/keyringer/functions +++ b/lib/keyringer/functions @@ -231,10 +231,8 @@ function keyringer_check_version { if [ ! -f "$VERSION_INFO" ]; then echo "Configuration version file not found, trying to pull from remotes..." - for remote in "$BASEDIR/.git/refs/remotes/*"; do - # Do not use keyringer_exec as it would trigger keyringer_check_version again - ( cd "$BASEDIR" && git pull `basename $remote` master ) - done + # Do not use keyringer_exec as it would trigger keyringer_check_version again + ( cd "$BASEDIR" && git pull ) if [ ! -f "$VERSION_INFO" ]; then echo "Creating configuration version file..." @@ -254,10 +252,8 @@ function keyringer_check_version { # Check if config version is supported by keyringer if [ "$VERSION" != "$KEYRINGER_VERSION" ]; then echo "Configuration version differs from keyringer version, trying to pull from remotes" - for remote in "$BASEDIR/.git/refs/remotes/*"; do - # Do not use keyringer_exec as it would trigger keyringer_check_version again - ( cd "$BASEDIR" && git pull `basename $remote` master ) - done + # Do not use keyringer_exec as it would trigger keyringer_check_version again + ( cd "$BASEDIR" && git pull ) if [ "$VERSION" != "$KEYRINGER_VERSION" ]; then NEWEST="`echo -e "$VERSION\n$KEYRINGER_VERSION" | sort -V | tail -n 1`" -- cgit v1.2.3 From 80056e1a52b9528701fb265f880c819dc92641aa Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 26 Jun 2012 16:03:41 -0300 Subject: Initial packaging support --- Makefile | 40 ++++++++++++++++++++++++++++++++++++++++ debian/rules | 3 +++ keyringer | 20 ++++++++++++++++++-- 3 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 Makefile create mode 100755 debian/rules diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d5cca8f --- /dev/null +++ b/Makefile @@ -0,0 +1,40 @@ +# +# Keyringer Makefile by Silvio Rhatto (rhatto at riseup.net). +# +# This Makefile is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or any later version. +# +# This Makefile is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# this program; if not, write to the Free Software Foundation, Inc., 59 Temple +# Place - Suite 330, Boston, MA 02111-1307, USA +# + +PACKAGE = keyringer +VERSION = 0.1 +PREFIX = /usr +INSTALL = /usr/bin/install + +clean: + find . -name *~ | xargs rm -f # clean local backups + +install_lib: + $(INSTALL) -D --mode=0644 lib/keyringer/csr.sh $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/csr.sh + $(INSTALL) -D --mode=0644 lib/keyringer/functions $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/functions + +install_share: + $(INSTALL) -D --mode=0755 share/keyringer/* $(DESTDIR)/$(PREFIX)/share/$(PACKAGE) + +install_bin: + $(INSTALL) -D --mode=0755 keyringer $(DESTDIR)/$(PREFIX)/bin/keyringer + +install_doc: + $(INSTALL) -D --mode=0644 README $(DESTDIR)/$(PREFIX)/doc/$(PACKAGE)/README + $(INSTALL) -D --mode=0644 LICENSE $(DESTDIR)/$(PREFIX)/doc/$(PACKAGE)/LICENSE + +install: clean + @make install_lib install_share install_bin install_doc diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..cbe925d --- /dev/null +++ b/debian/rules @@ -0,0 +1,3 @@ +#!/usr/bin/make -f +%: + dh $@ diff --git a/keyringer b/keyringer index 8a6eeb1..7089a08 100755 --- a/keyringer +++ b/keyringer @@ -134,14 +134,30 @@ CONFIG="$HOME/.$NAME/config" BASENAME="`basename $0`" KEYRING="$1" ACTION="$2" -ACTIONS="`dirname $(readlink -f $0)`/share/$NAME" # Export preferences and version for other scripts export PREFERENCES="`dirname $CONFIG`/$KEYRING" export KEYRINGER_VERSION +# Set functions location +if [ -e "`dirname $(readlink -f $0)`/lib/$NAME/functions" ]; then + # Development or local installation layout + LIB="`dirname $(readlink -f $0)`/lib/$NAME/functions" +else + # System installation layout + LIB="`dirname $(readlink -f $0)`/../lib/$NAME/functions" +fi + +# Set actions location +if [ -e "`dirname $(readlink -f $0)`/share/$NAME" ]; then + # Development or local installation layout + ACTIONS="`dirname $(readlink -f $0)`/share/$NAME" +else + # System installation layout + ACTIONS="`dirname $(readlink -f $0)`/../share/$NAME" +fi + # Load functions -LIB="`dirname $(readlink -f $0)`/lib/$NAME/functions" source "$LIB" || exit 1 # Setup main configuration and load preferences -- cgit v1.2.3 From 80dbf12dad7500caf6fb6336a68812f28e147f8f Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 26 Jun 2012 16:35:14 -0300 Subject: More debian specifics from dh_make --- debian/README.Debian | 6 + debian/README.source | 9 ++ debian/changelog | 5 + debian/compat | 1 + debian/control | 15 +++ debian/copyright | 37 ++++++ debian/docs | 1 + debian/emacsen-install.ex | 45 +++++++ debian/emacsen-remove.ex | 15 +++ debian/emacsen-startup.ex | 25 ++++ debian/init.d.ex | 154 +++++++++++++++++++++++ debian/keyringer.cron.d.ex | 4 + debian/keyringer.default.ex | 10 ++ debian/keyringer.doc-base.EX | 20 +++ debian/manpage.1.ex | 59 +++++++++ debian/manpage.sgml.ex | 154 +++++++++++++++++++++++ debian/manpage.xml.ex | 291 +++++++++++++++++++++++++++++++++++++++++++ debian/menu.ex | 2 + debian/postinst.ex | 39 ++++++ debian/postrm.ex | 37 ++++++ debian/preinst.ex | 35 ++++++ debian/prerm.ex | 38 ++++++ debian/rules | 12 +- debian/source/format | 1 + debian/watch.ex | 23 ++++ 25 files changed, 1037 insertions(+), 1 deletion(-) create mode 100644 debian/README.Debian create mode 100644 debian/README.source create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/docs create mode 100644 debian/emacsen-install.ex create mode 100644 debian/emacsen-remove.ex create mode 100644 debian/emacsen-startup.ex create mode 100644 debian/init.d.ex create mode 100644 debian/keyringer.cron.d.ex create mode 100644 debian/keyringer.default.ex create mode 100644 debian/keyringer.doc-base.EX create mode 100644 debian/manpage.1.ex create mode 100644 debian/manpage.sgml.ex create mode 100644 debian/manpage.xml.ex create mode 100644 debian/menu.ex create mode 100644 debian/postinst.ex create mode 100644 debian/postrm.ex create mode 100644 debian/preinst.ex create mode 100644 debian/prerm.ex create mode 100644 debian/source/format create mode 100644 debian/watch.ex diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..cc5f42d --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,6 @@ +keyringer for Debian +-------------------- + + + + -- Silvio Rhatto Tue, 26 Jun 2012 16:33:57 -0300 diff --git a/debian/README.source b/debian/README.source new file mode 100644 index 0000000..da1fcdf --- /dev/null +++ b/debian/README.source @@ -0,0 +1,9 @@ +keyringer for Debian +-------------------- + + + + + + diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..6d55a57 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +keyringer (0.1-1) unstable; urgency=low + + * Initial release (Closes: #nnnn) + + -- Silvio Rhatto Tue, 26 Jun 2012 16:33:57 -0300 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..d1dac87 --- /dev/null +++ b/debian/control @@ -0,0 +1,15 @@ +Source: keyringer +Section: unknown +Priority: extra +Maintainer: Silvio Rhatto +Build-Depends: debhelper (>= 7.0.50~) +Standards-Version: 3.8.4 +Homepage: +#Vcs-Git: git://git.debian.org/collab-maint/keyringer.git +#Vcs-Browser: http://git.debian.org/?p=collab-maint/keyringer.git;a=summary + +Package: keyringer +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..7fdacff --- /dev/null +++ b/debian/copyright @@ -0,0 +1,37 @@ +This work was packaged for Debian by: + + Silvio Rhatto on Tue, 26 Jun 2012 16:33:57 -0300 + +It was downloaded from: + + + +Upstream Author(s): + + + + +Copyright: + + + + +License: + + + +The Debian packaging is: + + Copyright (C) 2012 Silvio Rhatto + +# Please chose a license for your packaging work. If the program you package +# uses a mainstream license, using the same license is the safest choice. +# Please avoid to pick license terms that are more restrictive than the +# packaged work, as it may make Debian's contributions unacceptable upstream. +# If you just want it to be GPL version 3, leave the following lines in. + +and is licensed under the GPL version 3, +see "/usr/share/common-licenses/GPL-3". + +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..e845566 --- /dev/null +++ b/debian/docs @@ -0,0 +1 @@ +README diff --git a/debian/emacsen-install.ex b/debian/emacsen-install.ex new file mode 100644 index 0000000..a710d38 --- /dev/null +++ b/debian/emacsen-install.ex @@ -0,0 +1,45 @@ +#! /bin/sh -e +# /usr/lib/emacsen-common/packages/install/keyringer + +# Written by Jim Van Zandt , borrowing heavily +# from the install scripts for gettext by Santiago Vila +# and octave by Dirk Eddelbuettel . + +FLAVOR=$1 +PACKAGE=keyringer + +if [ ${FLAVOR} = emacs ]; then exit 0; fi + +echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} + +#FLAVORTEST=`echo $FLAVOR | cut -c-6` +#if [ ${FLAVORTEST} = xemacs ] ; then +# SITEFLAG="-no-site-file" +#else +# SITEFLAG="--no-site-file" +#fi +FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile" + +ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} +ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} + +# Install-info-altdir does not actually exist. +# Maybe somebody will write it. +if test -x /usr/sbin/install-info-altdir; then + echo install/${PACKAGE}: install Info links for ${FLAVOR} + install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/share/info/${PACKAGE}.info.gz +fi + +install -m 755 -d ${ELCDIR} +cd ${ELDIR} +FILES=`echo *.el` +cp ${FILES} ${ELCDIR} +cd ${ELCDIR} + +cat << EOF > path.el +(setq load-path (cons "." load-path) byte-compile-warnings nil) +EOF +${FLAVOR} ${FLAGS} ${FILES} +rm -f *.el path.el + +exit 0 diff --git a/debian/emacsen-remove.ex b/debian/emacsen-remove.ex new file mode 100644 index 0000000..62b90e5 --- /dev/null +++ b/debian/emacsen-remove.ex @@ -0,0 +1,15 @@ +#!/bin/sh -e +# /usr/lib/emacsen-common/packages/remove/keyringer + +FLAVOR=$1 +PACKAGE=keyringer + +if [ ${FLAVOR} != emacs ]; then + if test -x /usr/sbin/install-info-altdir; then + echo remove/${PACKAGE}: removing Info links for ${FLAVOR} + install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/share/info/keyringer.info.gz + fi + + echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} + rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} +fi diff --git a/debian/emacsen-startup.ex b/debian/emacsen-startup.ex new file mode 100644 index 0000000..aa39fde --- /dev/null +++ b/debian/emacsen-startup.ex @@ -0,0 +1,25 @@ +;; -*-emacs-lisp-*- +;; +;; Emacs startup file, e.g. /etc/emacs/site-start.d/50keyringer.el +;; for the Debian keyringer package +;; +;; Originally contributed by Nils Naumann +;; Modified by Dirk Eddelbuettel +;; Adapted for dh-make by Jim Van Zandt + +;; The keyringer package follows the Debian/GNU Linux 'emacsen' policy and +;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, +;; xemacs19, emacs20, xemacs20...). The compiled code is then +;; installed in a subdirectory of the respective site-lisp directory. +;; We have to add this to the load-path: +(let ((package-dir (concat "/usr/share/" + (symbol-name flavor) + "/site-lisp/keyringer"))) +;; If package-dir does not exist, the keyringer package must have +;; removed but not purged, and we should skip the setup. + (when (file-directory-p package-dir) + (setq load-path (cons package-dir load-path)) + (autoload 'keyringer-mode "keyringer-mode" + "Major mode for editing keyringer files." t) + (add-to-list 'auto-mode-alist '("\\.keyringer$" . keyringer-mode)))) + diff --git a/debian/init.d.ex b/debian/init.d.ex new file mode 100644 index 0000000..34773e0 --- /dev/null +++ b/debian/init.d.ex @@ -0,0 +1,154 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: keyringer +# Required-Start: $network $local_fs +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: +# Description: +# <...> +# <...> +### END INIT INFO + +# Author: Silvio Rhatto + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC=keyringer # Introduce a short description here +NAME=keyringer # Introduce the short server's name here +DAEMON=/usr/sbin/keyringer # Introduce the server's location here +DAEMON_ARGS="" # Arguments to run the daemon with +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x $DAEMON ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# Load the VERBOSE setting and other rcS variables +. /lib/init/vars.sh + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. +. /lib/lsb/init-functions + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ + || return 1 + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ + $DAEMON_ARGS \ + || return 2 + # Add code here, if necessary, that waits for the process to be ready + # to handle requests from services started subsequently which depend + # on this one. As a last resort, sleep for some time. +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + status) + status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? + ;; + #reload|force-reload) + # + # If do_reload() is not implemented then leave this commented out + # and leave 'force-reload' as an alias for 'restart'. + # + #log_daemon_msg "Reloading $DESC" "$NAME" + #do_reload + #log_end_msg $? + #;; + restart|force-reload) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 + exit 3 + ;; +esac + +: diff --git a/debian/keyringer.cron.d.ex b/debian/keyringer.cron.d.ex new file mode 100644 index 0000000..2bf1942 --- /dev/null +++ b/debian/keyringer.cron.d.ex @@ -0,0 +1,4 @@ +# +# Regular cron jobs for the keyringer package +# +0 4 * * * root [ -x /usr/bin/keyringer_maintenance ] && /usr/bin/keyringer_maintenance diff --git a/debian/keyringer.default.ex b/debian/keyringer.default.ex new file mode 100644 index 0000000..808251b --- /dev/null +++ b/debian/keyringer.default.ex @@ -0,0 +1,10 @@ +# Defaults for keyringer initscript +# sourced by /etc/init.d/keyringer +# installed at /etc/default/keyringer by the maintainer scripts + +# +# This is a POSIX shell fragment +# + +# Additional options that are passed to the Daemon. +DAEMON_OPTS="" diff --git a/debian/keyringer.doc-base.EX b/debian/keyringer.doc-base.EX new file mode 100644 index 0000000..0c3549b --- /dev/null +++ b/debian/keyringer.doc-base.EX @@ -0,0 +1,20 @@ +Document: keyringer +Title: Debian keyringer Manual +Author: +Abstract: This manual describes what keyringer is + and how it can be used to + manage online manuals on Debian systems. +Section: unknown + +Format: debiandoc-sgml +Files: /usr/share/doc/keyringer/keyringer.sgml.gz + +Format: postscript +Files: /usr/share/doc/keyringer/keyringer.ps.gz + +Format: text +Files: /usr/share/doc/keyringer/keyringer.text.gz + +Format: HTML +Index: /usr/share/doc/keyringer/html/index.html +Files: /usr/share/doc/keyringer/html/*.html diff --git a/debian/manpage.1.ex b/debian/manpage.1.ex new file mode 100644 index 0000000..1a9bce1 --- /dev/null +++ b/debian/manpage.1.ex @@ -0,0 +1,59 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH KEYRINGER SECTION "June 26, 2012" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +keyringer \- program to do something +.SH SYNOPSIS +.B keyringer +.RI [ options ] " files" ... +.br +.B bar +.RI [ options ] " files" ... +.SH DESCRIPTION +This manual page documents briefly the +.B keyringer +and +.B bar +commands. +.PP +.\" TeX users may be more comfortable with the \fB\fP and +.\" \fI\fP escape sequences to invode bold face and italics, +.\" respectively. +\fBkeyringer\fP is a program that... +.SH OPTIONS +These programs follow the usual GNU command line syntax, with long +options starting with two dashes (`-'). +A summary of options is included below. +For a complete description, see the Info files. +.TP +.B \-h, \-\-help +Show summary of options. +.TP +.B \-v, \-\-version +Show version of program. +.SH SEE ALSO +.BR bar (1), +.BR baz (1). +.br +The programs are documented fully by +.IR "The Rise and Fall of a Fooish Bar" , +available via the Info system. +.SH AUTHOR +keyringer was written by . +.PP +This manual page was written by Silvio Rhatto , +for the Debian project (and may be used by others). diff --git a/debian/manpage.sgml.ex b/debian/manpage.sgml.ex new file mode 100644 index 0000000..9cf73ee --- /dev/null +++ b/debian/manpage.sgml.ex @@ -0,0 +1,154 @@ + manpage.1'. You may view + the manual page with: `docbook-to-man manpage.sgml | nroff -man | + less'. A typical entry in a Makefile or Makefile.am is: + +manpage.1: manpage.sgml + docbook-to-man $< > $@ + + + The docbook-to-man binary is found in the docbook-to-man package. + Please remember that if you create the nroff version in one of the + debian/rules file targets (such as build), you will need to include + docbook-to-man in your Build-Depends control field. + + --> + + + FIRSTNAME"> + SURNAME"> + + June 26, 2012"> + + SECTION"> + rhatto@riseup.net"> + + KEYRINGER"> + + + Debian"> + GNU"> + GPL"> +]> + + + +
+ &dhemail; +
+ + &dhfirstname; + &dhsurname; + + + 2003 + &dhusername; + + &dhdate; +
+ + &dhucpackage; + + &dhsection; + + + &dhpackage; + + program to do something + + + + &dhpackage; + + + + + + + + DESCRIPTION + + This manual page documents briefly the + &dhpackage; and bar + commands. + + This manual page was written for the &debian; distribution + because the original program does not have a manual page. + Instead, it has documentation in the &gnu; + Info format; see below. + + &dhpackage; is a program that... + + + + OPTIONS + + These programs follow the usual &gnu; command line syntax, + with long options starting with two dashes (`-'). A summary of + options is included below. For a complete description, see the + Info files. + + + + + + + + Show summary of options. + + + + + + + + Show version of program. + + + + + + SEE ALSO + + bar (1), baz (1). + + The programs are documented fully by The Rise and + Fall of a Fooish Bar available via the + Info system. + + + AUTHOR + + This manual page was written by &dhusername; &dhemail; for + the &debian; system (and may be used by others). Permission is + granted to copy, distribute and/or modify this document under + the terms of the &gnu; General Public License, Version 2 any + later version published by the Free Software Foundation. + + + On Debian systems, the complete text of the GNU General Public + License can be found in /usr/share/common-licenses/GPL. + + + +
+ + diff --git a/debian/manpage.xml.ex b/debian/manpage.xml.ex new file mode 100644 index 0000000..81f3b8b --- /dev/null +++ b/debian/manpage.xml.ex @@ -0,0 +1,291 @@ + +.
will be generated. You may view the +manual page with: nroff -man .
| less'. A typical entry +in a Makefile or Makefile.am is: + +DB2MAN = /usr/share/sgml/docbook/stylesheet/xsl/docbook-xsl/manpages/docbook.xsl +XP = xsltproc -''-nonet -''-param man.charmap.use.subset "0" + +manpage.1: manpage.xml + $(XP) $(DB2MAN) $< + +The xsltproc binary is found in the xsltproc package. The XSL files are in +docbook-xsl. A description of the parameters you can use can be found in the +docbook-xsl-doc-* packages. Please remember that if you create the nroff +version in one of the debian/rules file targets (such as build), you will need +to include xsltproc and docbook-xsl in your Build-Depends control field. +Alternatively use the xmlto command/package. That will also automatically +pull in xsltproc and docbook-xsl. + +Notes for using docbook2x: docbook2x-man does not automatically create the +AUTHOR(S) and COPYRIGHT sections. In this case, please add them manually as + ... . + +To disable the automatic creation of the AUTHOR(S) and COPYRIGHT sections +read /usr/share/doc/docbook-xsl/doc/manpages/authors.html. This file can be +found in the docbook-xsl-doc-html package. + +Validation can be done using: `xmllint -''-noout -''-valid manpage.xml` + +General documentation about man-pages and man-page-formatting: +man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/ + +--> + + + + + + + + + + + + + +]> + + + + &dhtitle; + &dhpackage; + + + &dhfirstname; + &dhsurname; + Wrote this manpage for the Debian system. +
+ &dhemail; +
+
+
+ + 2007 + &dhusername; + + + This manual page was written for the Debian system + (and may be used by others). + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU General Public License, + Version 2 or (at your option) any later version published by + the Free Software Foundation. + On Debian systems, the complete text of the GNU General Public + License can be found in + /usr/share/common-licenses/GPL. + +
+ + &dhucpackage; + &dhsection; + + + &dhpackage; + program to do something + + + + &dhpackage; + + + + + + + + + this + + + + + + + + this + that + + + + + &dhpackage; + + + + + + + + + + + + + + + + + + + DESCRIPTION + This manual page documents briefly the + &dhpackage; and bar + commands. + This manual page was written for the Debian distribution + because the original program does not have a manual page. + Instead, it has documentation in the GNU + info + 1 + format; see below. + &dhpackage; is a program that... + + + OPTIONS + The program follows the usual GNU command line syntax, + with long options starting with two dashes (`-'). A summary of + options is included below. For a complete description, see the + + info + 1 + files. + + + + + + + Does this and that. + + + + + + + Show summary of options. + + + + + + + Show version of program. + + + + + + FILES + + + /etc/foo.conf + + The system-wide configuration file to control the + behaviour of &dhpackage;. See + + foo.conf + 5 + for further details. + + + + ${HOME}/.foo.conf + + The per-user configuration file to control the + behaviour of &dhpackage;. See + + foo.conf + 5 + for further details. + + + + + + ENVIONMENT + + + FOO_CONF + + If used, the defined file is used as configuration + file (see also ). + + + + + + DIAGNOSTICS + The following diagnostics may be issued + on stderr: + + + Bad configuration file. Exiting. + + The configuration file seems to contain a broken configuration + line. Use the option, to get more info. + + + + + &dhpackage; provides some return codes, that can + be used in scripts: + + Code + Diagnostic + + 0 + Program exited successfully. + + + 1 + The configuration file seems to be broken. + + + + + + BUGS + The program is currently limited to only work + with the foobar library. + The upstreams BTS can be found + at . + + + SEE ALSO + + + bar + 1 + , + baz + 1 + , + foo.conf + 5 + + The programs are documented fully by The Rise and + Fall of a Fooish Bar available via the + info + 1 + system. + +
+ diff --git a/debian/menu.ex b/debian/menu.ex new file mode 100644 index 0000000..30b4aa5 --- /dev/null +++ b/debian/menu.ex @@ -0,0 +1,2 @@ +?package(keyringer):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\ + title="keyringer" command="/usr/bin/keyringer" diff --git a/debian/postinst.ex b/debian/postinst.ex new file mode 100644 index 0000000..4c62489 --- /dev/null +++ b/debian/postinst.ex @@ -0,0 +1,39 @@ +#!/bin/sh +# postinst script for keyringer +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/postrm.ex b/debian/postrm.ex new file mode 100644 index 0000000..65dec06 --- /dev/null +++ b/debian/postrm.ex @@ -0,0 +1,37 @@ +#!/bin/sh +# postrm script for keyringer +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/preinst.ex b/debian/preinst.ex new file mode 100644 index 0000000..6421ff8 --- /dev/null +++ b/debian/preinst.ex @@ -0,0 +1,35 @@ +#!/bin/sh +# preinst script for keyringer +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + install|upgrade) + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/prerm.ex b/debian/prerm.ex new file mode 100644 index 0000000..3ed5387 --- /dev/null +++ b/debian/prerm.ex @@ -0,0 +1,38 @@ +#!/bin/sh +# prerm script for keyringer +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|deconfigure) + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/rules b/debian/rules index cbe925d..b760bee 100755 --- a/debian/rules +++ b/debian/rules @@ -1,3 +1,13 @@ #!/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. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + %: - dh $@ + dh $@ diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/watch.ex b/debian/watch.ex new file mode 100644 index 0000000..48c8026 --- /dev/null +++ b/debian/watch.ex @@ -0,0 +1,23 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# See uscan(1) for format + +# Compulsory line, this is a version 3 file +version=3 + +# Uncomment to examine a Webpage +# +#http://www.example.com/downloads.php keyringer-(.*)\.tar\.gz + +# Uncomment to examine a Webserver directory +#http://www.example.com/pub/keyringer-(.*)\.tar\.gz + +# Uncommment to examine a FTP server +#ftp://ftp.example.com/pub/keyringer-(.*)\.tar\.gz debian uupdate + +# Uncomment to find new files on sourceforge, for devscripts >= 2.9 +# http://sf.net/keyringer/keyringer-(.*)\.tar\.gz + +# Uncomment to find new files on GooglePages +# http://example.googlepages.com/foo.html keyringer-(.*)\.tar\.gz -- cgit v1.2.3 From c85624a027dc14e415ee42edbe6c6d51ecc5daa7 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 26 Jun 2012 17:33:50 -0300 Subject: Trying to fix the debian build --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index d5cca8f..d5675ed 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,7 @@ install_lib: $(INSTALL) -D --mode=0644 lib/keyringer/functions $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/functions install_share: + $(INSTALL) -D --mode=0755 -d share/keyringer $(DESTDIR)/$(PREFIX)/share/$(PACKAGE) $(INSTALL) -D --mode=0755 share/keyringer/* $(DESTDIR)/$(PREFIX)/share/$(PACKAGE) install_bin: -- cgit v1.2.3 From 3bb919078c3a2ec1656d8cfa96d817d1f3892556 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 26 Jun 2012 17:38:40 -0300 Subject: Setting basic info at debian/control --- debian/control | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/control b/debian/control index d1dac87..7aff698 100644 --- a/debian/control +++ b/debian/control @@ -4,12 +4,14 @@ Priority: extra Maintainer: Silvio Rhatto Build-Depends: debhelper (>= 7.0.50~) Standards-Version: 3.8.4 -Homepage: +Homepage: https://git.sarava.org/?p=keyringer.git;a=summary #Vcs-Git: git://git.debian.org/collab-maint/keyringer.git #Vcs-Browser: http://git.debian.org/?p=collab-maint/keyringer.git;a=summary Package: keyringer Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} -Description: - +Description: Distributed secret management using GPG and git + Keyringer lets you manage and share secrets using GPG and git in a distributed + fashion. It has custom commands to encrypt, decrypt, recrypt, create key pairs, + etc. -- cgit v1.2.3 From d2c24ab6116d8dfcb8a6b8a576313f13b953312b Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 26 Jun 2012 17:53:12 -0300 Subject: Fixing debian/copyright ; removing ssl-cacert from genpair so keyringer do not have any third-party code --- Makefile | 1 - debian/copyright | 14 +++-- lib/keyringer/csr.sh | 145 ------------------------------------------------ share/keyringer/genpair | 29 ++++------ 4 files changed, 20 insertions(+), 169 deletions(-) delete mode 100755 lib/keyringer/csr.sh diff --git a/Makefile b/Makefile index d5675ed..8d98a67 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,6 @@ clean: find . -name *~ | xargs rm -f # clean local backups install_lib: - $(INSTALL) -D --mode=0644 lib/keyringer/csr.sh $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/csr.sh $(INSTALL) -D --mode=0644 lib/keyringer/functions $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/functions install_share: diff --git a/debian/copyright b/debian/copyright index 7fdacff..0c7a7af 100644 --- a/debian/copyright +++ b/debian/copyright @@ -4,21 +4,23 @@ This work was packaged for Debian by: It was downloaded from: - + https://git.sarava.org/?p=keyringer.git;a=summary Upstream Author(s): - - + Silvio Rhatto + Daniel Kahn Gillmor + Jamie McClelland Copyright: - - + + + License: - + GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 The Debian packaging is: diff --git a/lib/keyringer/csr.sh b/lib/keyringer/csr.sh deleted file mode 100755 index 881a46f..0000000 --- a/lib/keyringer/csr.sh +++ /dev/null @@ -1,145 +0,0 @@ -#!/bin/sh -# csr.sh: Certificate Signing Request Generator -# Copyright(c) 2005 Evaldo Gardenali -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -# ChangeLog: -# Mon May 23 00:14:37 BRT 2005 - evaldo - Initial Release -# Thu Nov 3 10:11:51 GMT 2005 - chrisc - $HOME removed so that key and csr -# are generated in the current directory -# Wed Nov 16 10:42:42 GMT 2005 - chrisc - Updated to match latest version on -# the CAcert wiki, rev #73 -# http://wiki.cacert.org/wiki/VhostTaskForce -# Mon Jan 4 18:37:28 BRST 2010 - rhatto - Support for non-interactive mode - - -# be safe about permissions -LASTUMASK=`umask` -umask 077 - -# OpenSSL for HPUX needs a random file -RANDOMFILE="$HOME/.rnd" - -# create a config file for openssl -CONFIG=`mktemp -q /tmp/openssl-conf.XXXXXXXX` -if [ ! $? -eq 0 ]; then - echo "Could not create temporary config file. exiting" - exit 1 -fi - -echo "Private Key and Certificate Signing Request Generator" -echo "This script was designed to suit the request format needed by" -echo "the CAcert Certificate Authority. www.CAcert.org" -echo - -HOST="$1" -COMMONNAME="$2" -SAN="$3" - -if [ -z "$HOST" ]; then - printf "Short Hostname (ie. imap big_srv www2): " - read HOST -fi - -if [ -z "$COMMONNAME" ]; then - printf "FQDN/CommonName (ie. www.example.com) : " - read COMMONNAME -fi - -if [ -z "$SAN" ]; then - echo "Type SubjectAltNames for the certificate, one per line. Enter a blank line to finish" - SAN=1 # bogus value to begin the loop - SANAMES="" # sanitize - while [ ! "$SAN" = "" ]; do - printf "SubjectAltName: DNS:" - read SAN - if [ "$SAN" = "" ]; then break; fi # end of input - if [ "$SANAMES" = "" ]; then - SANAMES="DNS:$SAN" - else - SANAMES="$SANAMES,DNS:$SAN" - fi - done -else - SANAMES="DNS:$SAN" -fi - -# Config File Generation - -cat < "$CONFIG" -# -------------- BEGIN custom openssl.cnf ----- - HOME = $HOME -EOF - -if [ "`uname -s`" = "HP-UX" ]; then - echo " RANDFILE = $RANDOMFILE" >> "$CONFIG" -fi - -cat <> "$CONFIG" - oid_section = new_oids - [ new_oids ] - [ req ] - default_days = 730 # how long to certify for - default_keyfile = ${HOST}_privatekey.pem - distinguished_name = req_distinguished_name - encrypt_key = no - string_mask = nombstr -EOF - -if [ ! "$SANAMES" = "" ]; then - echo "req_extensions = v3_req # Extensions to add to certificate request" >> "$CONFIG" -fi - -cat <> "$CONFIG" - [ req_distinguished_name ] - commonName = Common Name (eg, YOUR name) - commonName_default = $COMMONNAME - commonName_max = 64 - [ v3_req ] -EOF - -if [ ! "$SANAMES" = "" ]; then - echo "subjectAltName=$SANAMES" >> "$CONFIG" -fi - -echo "# -------------- END custom openssl.cnf -----" >> "$CONFIG" - -echo "Running OpenSSL..." -# The first one doesn't work, the second one does: -#openssl req -batch -config "$CONFIG" -newkey rsa -out ${HOST}_csr.pem -openssl req -batch -config "$CONFIG" -newkey rsa:2048 -out "${HOST}_csr.pem" - -echo "Copy the following Certificate Request and paste into CAcert website to obtain a Certificate." -echo "When you receive your certificate, you 'should' name it something like ${HOST}_server.pem" -echo -cat ${HOST}_csr.pem -echo -printf "The Certificate request is also available in '%s_csr.pem'\n" "$HOST" -printf "The Private Key is stored in '%s_privatekey.pem'\n" "$HOST" -echo - -rm "$CONFIG" - -#restore umask -umask "$LASTUMASK" - diff --git a/share/keyringer/genpair b/share/keyringer/genpair index 140361a..85ec1ac 100755 --- a/share/keyringer/genpair +++ b/share/keyringer/genpair @@ -101,10 +101,6 @@ function genpair_ssl { cd "$TMPWORK" # Generate certificate - if [ "$KEYTYPE" == "ssl-cacert" ]; then - # We use a custom script for CaCert - "$LIB/csr.sh" "$NODE" - else cat <> openssl.conf [ req ] default_keyfile = ${NODE}_privatekey.pem @@ -127,22 +123,21 @@ commonName = Common Name extendedKeyUsage=serverAuth,clientAuth EOF - # Add SubjectAltNames so wildcard certs can work correctly. - if [ "$WILDCARD" == "yes" ]; then + # Add SubjectAltNames so wildcard certs can work correctly. + if [ "$WILDCARD" == "yes" ]; then cat <> openssl.conf subjectAltName=DNS:${NODE}, DNS:${CNAME} EOF - fi + fi - echo "Please review your OpenSSL configuration:" - cat openssl.conf - read -p "Hit ENTER to continue." prompt + echo "Please review your OpenSSL configuration:" + cat openssl.conf + read -p "Hit ENTER to continue." prompt - openssl req -batch -nodes -config openssl.conf -newkey rsa:2048 -sha256 \ - -keyout ${NODE}_privatekey.pem -out ${NODE}_csr.pem + openssl req -batch -nodes -config openssl.conf -newkey rsa:2048 -sha256 \ + -keyout ${NODE}_privatekey.pem -out ${NODE}_csr.pem - openssl req -noout -text -in ${NODE}_csr.pem - fi + openssl req -noout -text -in ${NODE}_csr.pem # Self-sign if [ "$KEYTYPE" == "ssl-self" ]; then @@ -199,9 +194,9 @@ CWD="`pwd`" # Verify if [ -z "$NODE" ]; then - echo -e "Usage: keyringer $BASENAME [outfile]" + echo -e "Usage: keyringer $BASENAME [outfile]" echo -e "Options:" - echo -e "\t gpg|ssh|ssl[-cacert,-self]: key type." + echo -e "\t gpg|ssh|ssl[-self]: key type." echo -e "\t file : base file name for encrypted output (relative to keys folder)" echo -e "\t hostname : host for the key pair" echo -e "\t outfile : optional unencrypted output file, useful for deployment" @@ -216,7 +211,7 @@ keyringer_set_tmpfile genpair -d # Dispatch echo "Generating $KEYTYPE key for $NODE..." -if [ "$KEYTYPE" == "ssl-self" ] || [ "$KEYTYPE" == "ssl-cacert" ]; then +if [ "$KEYTYPE" == "ssl-self" ]; then genpair_ssl else genpair_"$KEYTYPE" -- cgit v1.2.3 From 367b9b1653d3f3a63f627990a1d70348e7ce70b8 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 26 Jun 2012 18:09:48 -0300 Subject: Changing debian arch to 'all' --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 7aff698..87ac26d 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,7 @@ Homepage: https://git.sarava.org/?p=keyringer.git;a=summary #Vcs-Browser: http://git.debian.org/?p=collab-maint/keyringer.git;a=summary Package: keyringer -Architecture: any +Architecture: all Depends: ${shlibs:Depends}, ${misc:Depends} Description: Distributed secret management using GPG and git Keyringer lets you manage and share secrets using GPG and git in a distributed -- cgit v1.2.3 From d461a9971185e4ddf9b0ef0e13c2992c9c96a362 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 26 Jun 2012 18:12:31 -0300 Subject: Adding debian/patches/ --- .gitignore | 1 + debian/patches/debian-changes-0.1-1 | 101 ++++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 103 insertions(+) create mode 100644 debian/patches/debian-changes-0.1-1 create mode 100644 debian/patches/series diff --git a/.gitignore b/.gitignore index 1377554..19e7574 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ *.swp +.pc diff --git a/debian/patches/debian-changes-0.1-1 b/debian/patches/debian-changes-0.1-1 new file mode 100644 index 0000000..a6ad49a --- /dev/null +++ b/debian/patches/debian-changes-0.1-1 @@ -0,0 +1,101 @@ +Description: Upstream changes introduced in version 0.1-1 + This patch has been created by dpkg-source during the package build. + Here's the last changelog entry, hopefully it gives details on why + those changes were made: + . + keyringer (0.1-1) unstable; urgency=low + . + * Initial release (Closes: #nnnn) + . + The person named in the Author field signed this changelog entry. +Author: Silvio Rhatto + +--- +The information above should follow the Patch Tagging Guidelines, please +checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here +are templates for supplementary fields that you might want to add: + +Origin: , +Bug: +Bug-Debian: http://bugs.debian.org/ +Bug-Ubuntu: https://launchpad.net/bugs/ +Forwarded: +Reviewed-By: +Last-Update: + +--- keyringer-0.1.orig/Makefile ++++ keyringer-0.1/Makefile +@@ -23,7 +23,6 @@ clean: + find . -name *~ | xargs rm -f # clean local backups + + install_lib: +- $(INSTALL) -D --mode=0644 lib/keyringer/csr.sh $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/csr.sh + $(INSTALL) -D --mode=0644 lib/keyringer/functions $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/functions + + install_share: +--- keyringer-0.1.orig/share/keyringer/genpair ++++ keyringer-0.1/share/keyringer/genpair +@@ -101,10 +101,6 @@ function genpair_ssl { + cd "$TMPWORK" + + # Generate certificate +- if [ "$KEYTYPE" == "ssl-cacert" ]; then +- # We use a custom script for CaCert +- "$LIB/csr.sh" "$NODE" +- else + cat <> openssl.conf + [ req ] + default_keyfile = ${NODE}_privatekey.pem +@@ -127,22 +123,21 @@ commonName = Common + extendedKeyUsage=serverAuth,clientAuth + EOF + +- # Add SubjectAltNames so wildcard certs can work correctly. +- if [ "$WILDCARD" == "yes" ]; then ++ # Add SubjectAltNames so wildcard certs can work correctly. ++ if [ "$WILDCARD" == "yes" ]; then + cat <> openssl.conf + subjectAltName=DNS:${NODE}, DNS:${CNAME} + EOF +- fi ++ fi + +- echo "Please review your OpenSSL configuration:" +- cat openssl.conf +- read -p "Hit ENTER to continue." prompt ++ echo "Please review your OpenSSL configuration:" ++ cat openssl.conf ++ read -p "Hit ENTER to continue." prompt + +- openssl req -batch -nodes -config openssl.conf -newkey rsa:2048 -sha256 \ +- -keyout ${NODE}_privatekey.pem -out ${NODE}_csr.pem ++ openssl req -batch -nodes -config openssl.conf -newkey rsa:2048 -sha256 \ ++ -keyout ${NODE}_privatekey.pem -out ${NODE}_csr.pem + +- openssl req -noout -text -in ${NODE}_csr.pem +- fi ++ openssl req -noout -text -in ${NODE}_csr.pem + + # Self-sign + if [ "$KEYTYPE" == "ssl-self" ]; then +@@ -199,9 +194,9 @@ CWD="`pwd`" + + # Verify + if [ -z "$NODE" ]; then +- echo -e "Usage: keyringer $BASENAME [outfile]" ++ echo -e "Usage: keyringer $BASENAME [outfile]" + echo -e "Options:" +- echo -e "\t gpg|ssh|ssl[-cacert,-self]: key type." ++ echo -e "\t gpg|ssh|ssl[-self]: key type." + echo -e "\t file : base file name for encrypted output (relative to keys folder)" + echo -e "\t hostname : host for the key pair" + echo -e "\t outfile : optional unencrypted output file, useful for deployment" +@@ -216,7 +211,7 @@ keyringer_set_tmpfile genpair -d + + # Dispatch + echo "Generating $KEYTYPE key for $NODE..." +-if [ "$KEYTYPE" == "ssl-self" ] || [ "$KEYTYPE" == "ssl-cacert" ]; then ++if [ "$KEYTYPE" == "ssl-self" ]; then + genpair_ssl + else + genpair_"$KEYTYPE" diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..0540e18 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +debian-changes-0.1-1 -- cgit v1.2.3 From 4f8e4fa1e7654fb65a86b91d8895af724474c673 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 26 Jun 2012 19:09:02 -0300 Subject: Keyringer dependencies --- README | 5 ++++- debian/control | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README b/README index a20c32c..548be8d 100644 --- a/README +++ b/README @@ -15,9 +15,12 @@ Keyringer needs: - Bash - http://tiswww.case.edu/php/chet/bash/bashtop.html - Git - http://git-scm.com - GNU Privacy Guard - http://gnupg.org - - OpenSSL - http://www.openssl.org - Grep, awk, tail, cut, sed and other GNU tools +Optional dependencies if you want to manage ssl keys: + + - OpenSSL - http://www.openssl.org + Installation ------------ diff --git a/debian/control b/debian/control index 87ac26d..108adc9 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,8 @@ Homepage: https://git.sarava.org/?p=keyringer.git;a=summary Package: keyringer Architecture: all -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: ${shlibs:Depends}, ${misc:Depends}, bash, git-core, gnupg, grep, gawk, coreutils, sed +Recommends: openssl Description: Distributed secret management using GPG and git Keyringer lets you manage and share secrets using GPG and git in a distributed fashion. It has custom commands to encrypt, decrypt, recrypt, create key pairs, -- cgit v1.2.3 From d58b24f51f7ab892480a045c239bb720aee8fe86 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 26 Jun 2012 19:09:56 -0300 Subject: Updating .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 19e7574..dd07a0f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.swp .pc +debian/files -- cgit v1.2.3 From d73dd4304325b54968deb7c6d9c73402cd9927e2 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 26 Jun 2012 19:10:07 -0300 Subject: Changing debian/compat --- debian/compat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/compat b/debian/compat index 7f8f011..ec63514 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -7 +9 -- cgit v1.2.3 From 28defbcc299dba94fb1c46251ee60f62f12eef6a Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 26 Jun 2012 19:10:15 -0300 Subject: Misc debian changes --- debian/patches/debian-changes-0.1-1 | 101 ------------------------------------ debian/patches/series | 1 - 2 files changed, 102 deletions(-) delete mode 100644 debian/patches/debian-changes-0.1-1 delete mode 100644 debian/patches/series diff --git a/debian/patches/debian-changes-0.1-1 b/debian/patches/debian-changes-0.1-1 deleted file mode 100644 index a6ad49a..0000000 --- a/debian/patches/debian-changes-0.1-1 +++ /dev/null @@ -1,101 +0,0 @@ -Description: Upstream changes introduced in version 0.1-1 - This patch has been created by dpkg-source during the package build. - Here's the last changelog entry, hopefully it gives details on why - those changes were made: - . - keyringer (0.1-1) unstable; urgency=low - . - * Initial release (Closes: #nnnn) - . - The person named in the Author field signed this changelog entry. -Author: Silvio Rhatto - ---- -The information above should follow the Patch Tagging Guidelines, please -checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here -are templates for supplementary fields that you might want to add: - -Origin: , -Bug: -Bug-Debian: http://bugs.debian.org/ -Bug-Ubuntu: https://launchpad.net/bugs/ -Forwarded: -Reviewed-By: -Last-Update: - ---- keyringer-0.1.orig/Makefile -+++ keyringer-0.1/Makefile -@@ -23,7 +23,6 @@ clean: - find . -name *~ | xargs rm -f # clean local backups - - install_lib: -- $(INSTALL) -D --mode=0644 lib/keyringer/csr.sh $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/csr.sh - $(INSTALL) -D --mode=0644 lib/keyringer/functions $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/functions - - install_share: ---- keyringer-0.1.orig/share/keyringer/genpair -+++ keyringer-0.1/share/keyringer/genpair -@@ -101,10 +101,6 @@ function genpair_ssl { - cd "$TMPWORK" - - # Generate certificate -- if [ "$KEYTYPE" == "ssl-cacert" ]; then -- # We use a custom script for CaCert -- "$LIB/csr.sh" "$NODE" -- else - cat <> openssl.conf - [ req ] - default_keyfile = ${NODE}_privatekey.pem -@@ -127,22 +123,21 @@ commonName = Common - extendedKeyUsage=serverAuth,clientAuth - EOF - -- # Add SubjectAltNames so wildcard certs can work correctly. -- if [ "$WILDCARD" == "yes" ]; then -+ # Add SubjectAltNames so wildcard certs can work correctly. -+ if [ "$WILDCARD" == "yes" ]; then - cat <> openssl.conf - subjectAltName=DNS:${NODE}, DNS:${CNAME} - EOF -- fi -+ fi - -- echo "Please review your OpenSSL configuration:" -- cat openssl.conf -- read -p "Hit ENTER to continue." prompt -+ echo "Please review your OpenSSL configuration:" -+ cat openssl.conf -+ read -p "Hit ENTER to continue." prompt - -- openssl req -batch -nodes -config openssl.conf -newkey rsa:2048 -sha256 \ -- -keyout ${NODE}_privatekey.pem -out ${NODE}_csr.pem -+ openssl req -batch -nodes -config openssl.conf -newkey rsa:2048 -sha256 \ -+ -keyout ${NODE}_privatekey.pem -out ${NODE}_csr.pem - -- openssl req -noout -text -in ${NODE}_csr.pem -- fi -+ openssl req -noout -text -in ${NODE}_csr.pem - - # Self-sign - if [ "$KEYTYPE" == "ssl-self" ]; then -@@ -199,9 +194,9 @@ CWD="`pwd`" - - # Verify - if [ -z "$NODE" ]; then -- echo -e "Usage: keyringer $BASENAME [outfile]" -+ echo -e "Usage: keyringer $BASENAME [outfile]" - echo -e "Options:" -- echo -e "\t gpg|ssh|ssl[-cacert,-self]: key type." -+ echo -e "\t gpg|ssh|ssl[-self]: key type." - echo -e "\t file : base file name for encrypted output (relative to keys folder)" - echo -e "\t hostname : host for the key pair" - echo -e "\t outfile : optional unencrypted output file, useful for deployment" -@@ -216,7 +211,7 @@ keyringer_set_tmpfile genpair -d - - # Dispatch - echo "Generating $KEYTYPE key for $NODE..." --if [ "$KEYTYPE" == "ssl-self" ] || [ "$KEYTYPE" == "ssl-cacert" ]; then -+if [ "$KEYTYPE" == "ssl-self" ]; then - genpair_ssl - else - genpair_"$KEYTYPE" diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index 0540e18..0000000 --- a/debian/patches/series +++ /dev/null @@ -1 +0,0 @@ -debian-changes-0.1-1 -- cgit v1.2.3 From b8efd998a797a1a9569dbcf4f51e48819ce7961d Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 28 Jun 2012 00:33:01 -0300 Subject: New homepage --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 548be8d..0f77dc2 100644 --- a/README +++ b/README @@ -5,7 +5,7 @@ Keyringer lets you manage and share secrets using GPG and git in a distributed fashion. It has custom commands to encrypt, decrypt, recrypt, create key pairs, etc. -Homepage: https://git.codecoop.org/projects/keyringer +Homepage: https://keyringer.sarava.org Requirements ------------ -- cgit v1.2.3 From f6f315aa3cbcaa33b2f69e79c83c08b841079703 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 28 Jun 2012 00:57:42 -0300 Subject: Adding keyringer logo --- misc/keyringer.png | Bin 0 -> 7956 bytes misc/keyringer.svg | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 misc/keyringer.png create mode 100644 misc/keyringer.svg diff --git a/misc/keyringer.png b/misc/keyringer.png new file mode 100644 index 0000000..4076ef8 Binary files /dev/null and b/misc/keyringer.png differ diff --git a/misc/keyringer.svg b/misc/keyringer.svg new file mode 100644 index 0000000..f200621 --- /dev/null +++ b/misc/keyringer.svg @@ -0,0 +1,107 @@ + + + + + + + + + + + + + image/svg+xml + + + + + + + + keyringer + Clipart from http://openclipart.org/detail/12889/keyring-by-anonymous-12889 + + -- cgit v1.2.3 From f348c88f07380747149265f319c3c3a97bd4a047 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 21 Aug 2012 14:12:50 -0300 Subject: Initialization fixes --- keyringer | 6 +++++- lib/keyringer/functions | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/keyringer b/keyringer index 7089a08..a59fd2f 100755 --- a/keyringer +++ b/keyringer @@ -24,6 +24,10 @@ function keyringer_init { RECIPIENTS="$BASEDIR/config/recipients" OPTIONS="$BASEDIR/config/options" + # We are initializing, so avoid some checks + export KEYRINGER_CHECK_VERSION="false" + export KEYRINGER_CHECK_RECIPIENTS="false" + # Parse if [ -z "$BASEDIR" ]; then echo "Usage: $BASENAME init [url]" @@ -68,7 +72,7 @@ function keyringer_init { fi # Secure - chmod 600 "$RECIPIENTS" + chmod 700 "$RECIPIENTS" fi # Reparse basedir to force absolute folder diff --git a/lib/keyringer/functions b/lib/keyringer/functions index 6ac8bf8..dc1ce0f 100644 --- a/lib/keyringer/functions +++ b/lib/keyringer/functions @@ -340,6 +340,10 @@ function keyringer_action_usage { # Check recipients function keyringer_check_recipients { + if [ "$KEYRINGER_CHECK_RECIPIENTS" == "false" ]; then + return + fi + # Check if recipients file is empty. if [ "`grep -vE "^#|^$" "$RECIPIENTS"/* | wc -l`" == 0 ] && [ "$SUBCOMMAND" != "edit" ]; then echo "Fatal: no recipients configured for this keyring." -- cgit v1.2.3 From 8bc5be5387171f7fc06492be7580787a3722a52b Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 21 Aug 2012 14:17:08 -0300 Subject: Updating .gitignore --- .gitignore | 3 +++ debian/keyringer.substvars | 1 + 2 files changed, 4 insertions(+) create mode 100644 debian/keyringer.substvars diff --git a/.gitignore b/.gitignore index dd07a0f..f9b9271 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +debian/keyringer.debhelper.log +debian/keyringer +debian/files *.swp .pc debian/files diff --git a/debian/keyringer.substvars b/debian/keyringer.substvars new file mode 100644 index 0000000..abd3ebe --- /dev/null +++ b/debian/keyringer.substvars @@ -0,0 +1 @@ +misc:Depends= -- cgit v1.2.3