ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Vladimir Lettiev <thecrux@gmail.com>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] альтовые пакеты и не альтовый  rpm
Date: Tue, 23 Mar 2010 15:15:53 +0300
Message-ID: <20100323121553.GA2804@truecrux.org> (raw)
In-Reply-To: <fa54e4a91003230010u269ebbcl583814aeb496154@mail.gmail.com>

On Tue, Mar 23, 2010 at 09:10:23AM +0200, Igor Zubkov wrote:
> Появилось пара вопросов относительно альтового rpm и пакетов им собранных.
> 1. Какой rpm будет читать альтовые rpm'ки более правильно?
> 4.5/4.6/5.0/5.1/5.2/5.3?
> 2. В альтовом rpm реализована локализация summary/group/description.
> Как его можно прочитать не альтовым rpm?
> 
> Ну и вопрос который относится просто к rpm (или ruby-rpm), можно ли
> одной командой извлечь spec из произвольного src.rpm?

У меня была схожая задача: читать альтовый rpm на не-rpm платформе
(debian). Оказалось, что самый простой вариант это вообще не завязываться
на librpm, а реализовать чтение информации из rpm-пакета напрямую,
основываясь на спецификации[1] файлового формата rpm. Так появился модуль
для perl[2], которым можно успешно вытаскивать информацию из rpm-пакетов
не имея на системе librpm. Думаю на ruby реализовать схожий модуль тоже
не сложно.

По поводу spec и других файлов в rpm-пакете.
rpm-файл это заголовок + архив (archive.cpio.gz или archive.cpio.lzma).
Т.о. откусив заголовок можно извлечь всё содержимое пакета, включая спек,
штатными утилитами. (Длину заголовка расчитать несложно, в модуле[2] есть
такая возможность)

[1] - http://www.rpm.org/max-rpm/s1-rpm-file-format-rpm-file-format.html
[2] - http://prometheus.altlinux.org/en/srpm/Sisyphus/perl-RPM-Header-Alt

-- 
Vladimir Lettiev aka crux <theCrux@gmail.com>


  reply	other threads:[~2010-03-23 12:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-23  7:10 Igor Zubkov
2010-03-23 12:15 ` Vladimir Lettiev [this message]
2010-03-23 16:23 ` Alexey Tourbin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100323121553.GA2804@truecrux.org \
    --to=thecrux@gmail.com \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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