From 285feb3cedca3cccff971155099adef8d902223d Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 16 Jul 2011 14:21:51 +0200 Subject: * cmdline/apt-key: - use a tmpfile instead of /etc/apt/secring.gpg (Closes: #632596) * debian/apt.postinst: - remove /etc/apt/secring.gpg if it is an empty file --- cmdline/apt-key | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cmdline/apt-key') diff --git a/cmdline/apt-key b/cmdline/apt-key index 843163f82..8a995dadd 100755 --- a/cmdline/apt-key +++ b/cmdline/apt-key @@ -5,9 +5,12 @@ unset GREP_OPTIONS # We don't use a secret keyring, of course, but gpg panics and # implodes if there isn't one available -GPG_CMD='gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg' +SECRETKEYRING="$(mktemp)" +trap "rm -f '${SECRETKEYRING}'" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM +GPG_CMD="gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring '${SECRETKEYRING}'" if [ "$(id -u)" -eq 0 ]; then + # we could use a tmpfile here too, but creation of this tends to be time-consuming GPG_CMD="$GPG_CMD --trustdb-name /etc/apt/trustdb.gpg" fi -- cgit v1.2.3 From 331eea386e2bb57af6dbb9f1c86f176b2d55c6a1 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 23 Jul 2011 11:50:49 +0200 Subject: =?UTF-8?q?you=20want=20to=20be=20nice=20and=20quote=20a=20filenam?= =?UTF-8?q?e=20just=20to=20be=20reminded=20by=20gpg=20that=20it=20doesn't?= =?UTF-8?q?=20like=20that=E2=80=A6=20remove=20superficial=20quoting=20to?= =?UTF-8?q?=20fix=20apt-key?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmdline/apt-key | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmdline/apt-key') diff --git a/cmdline/apt-key b/cmdline/apt-key index 8a995dadd..e632be706 100755 --- a/cmdline/apt-key +++ b/cmdline/apt-key @@ -7,7 +7,7 @@ unset GREP_OPTIONS # implodes if there isn't one available SECRETKEYRING="$(mktemp)" trap "rm -f '${SECRETKEYRING}'" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM -GPG_CMD="gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring '${SECRETKEYRING}'" +GPG_CMD="gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring ${SECRETKEYRING}" if [ "$(id -u)" -eq 0 ]; then # we could use a tmpfile here too, but creation of this tends to be time-consuming -- cgit v1.2.3