ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] ALT Linux Team
@ 2004-08-31 21:10 Alexey I. Froloff
  2004-08-31 21:39 ` Dmitry V. Levin
  0 siblings, 1 reply; 3+ messages in thread
From: Alexey I. Froloff @ 2004-08-31 21:10 UTC (permalink / raw)
  To: ALT Devel discussion list


[-- Attachment #1.1: Type: text/plain, Size: 352 bytes --]

Собрал тут ruby-gpgme и попутно сваял скриптик, который генерит
список alias'ов для mutt.  Может кому пригодится?

mkdir tmp/altkeys
cp /usr/lib/alt-gpgkeys/* tmp/altkeys
GNUPGHOME=$HOME/tmp/altkeys ruby -w getkeys.rb >> ~/.mutt/alias

P.S. Вот зачем gnupg хочет trustdb создавать при попытке
перебрать все ключи?

-- 
Regards,
Sir Raorn.

[-- Attachment #1.2: getkeys.rb --]
[-- Type: text/plain, Size: 504 bytes --]

#!/usr/bin/ruby -w

require 'gpgme'

alt=Hash.new(nil)

ctx = GPGME::GpgmeCtx.new

ctx.keylist_mode=GPGME::GPGME_KEYLIST_MODE_LOCAL

ctx.each_keys(ARGV[0]) do |k|
    i = 0
    while k[GPGME::GPGME_ATTR_KEYID, i] do
	if k[GPGME::GPGME_ATTR_EMAIL, i] =~ /@altlinux/ then
	    key = k[GPGME::GPGME_ATTR_EMAIL, i].gsub(/@.*$/, '').downcase
	    alt[key] = k[GPGME::GPGME_ATTR_NAME, i]
	end
	i += 1
    end
end

alt.keys.sort.each do |id|
    puts "alias\talt-#{id}\t\"#{alt[id]}\"\t<#{id}@altlinux.ru>"
end

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [devel] ALT Linux Team
  2004-08-31 21:10 [devel] ALT Linux Team Alexey I. Froloff
@ 2004-08-31 21:39 ` Dmitry V. Levin
  2004-09-01  5:39   ` Alexey I. Froloff
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry V. Levin @ 2004-08-31 21:39 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 945 bytes --]

On Wed, Sep 01, 2004 at 01:10:48AM +0400, Alexey I. Froloff wrote:
> P.S. Вот зачем gnupg хочет trustdb создавать при попытке
> перебрать все ключи?

Разве?

$ strace -e trace=open gpg --homedir=/usr/lib/alt-gpgkeys --list-keys >/dev/null
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib/libz.so.1", O_RDONLY)        = 3
open("/lib/libbz2.so.1", O_RDONLY)      = 3
open("/lib/libdl.so.2", O_RDONLY)       = 3
open("/lib/libc.so.6", O_RDONLY)        = 3
gpg: WARNING: unsafe ownership on homedir "/usr/lib/alt-gpgkeys"
open("/usr/lib/alt-gpgkeys/options", O_RDONLY|O_LARGEFILE) = 3
open("/usr/lib/alt-gpgkeys/pubring.gpg", O_RDONLY|O_LARGEFILE) = 3
open("/usr/lib/alt-gpgkeys/pubring.gpg", O_RDONLY|O_LARGEFILE) = 3
open("/usr/lib/alt-gpgkeys/pubring.gpg", O_RDONLY|O_LARGEFILE) = 4
open("/etc/localtime", O_RDONLY)        = 5


-- 
ldv

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [devel] ALT Linux Team
  2004-08-31 21:39 ` Dmitry V. Levin
@ 2004-09-01  5:39   ` Alexey I. Froloff
  0 siblings, 0 replies; 3+ messages in thread
From: Alexey I. Froloff @ 2004-09-01  5:39 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 701 bytes --]

* Dmitry V. Levin <ldv@> [040901 01:39]:
> > P.S. Вот зачем gnupg хочет trustdb создавать при попытке
> > перебрать все ключи?
> Разве?
Да.  Мой скрипт от это тоже спотыкается.

$ gpg --homedir /usr/lib/alt-gpgkeys --with-colons --list-keys --list-only --no-auto-check-trustdb
gpg: WARNING: unsafe ownership on homedir "/usr/lib/alt-gpgkeys"
gpg: fatal: /usr/lib/alt-gpgkeys/trustdb.gpg: can't create: Permission denied
secmem usage: 0/0 bytes in 0/0 blocks of pool 0/32768

P.S. СтОит убрать --with-colons как всё начинает работать.

-- 
Regards, Sir Raorn.
-------------------
rsync пока жив, но в наших интересах использовать зеркала,
предоставляющие rsync.
		-- rider in devel@

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-09-01  5:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-31 21:10 [devel] ALT Linux Team Alexey I. Froloff
2004-08-31 21:39 ` Dmitry V. Levin
2004-09-01  5:39   ` Alexey I. Froloff

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git