ALT Linux Team development discussions
 help / color / mirror / Atom feed
* Re: [devel] [git update] packages/gear: tags/compound_subst_stable
  @ 2007-08-28  7:17 ` Dmitry V. Levin
  2007-08-28 16:41   ` Alexey I. Froloff
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry V. Levin @ 2007-08-28  7:17 UTC (permalink / raw)
  To: Aleksey Morozov; +Cc: ALT Devel discussion list

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

On Tue, Aug 28, 2007 at 03:00:30AM +0400, Aleksey Morozov wrote:
> Update of /people/morozov/packages/gear.git
[...]
> Full diff since `1.2.5-alt1' follows:
[...]
> --- a/gear-sh-functions.in
> +++ b/gear-sh-functions.in
[...]
>  get_NVR_from_spec()
>  {
>  	local spec="$1" && shift
> +        local arg=${rpm_rclist:--q} # extra -q does't affect anything
>  
> -	spec_name="$(sed '/^name:[[:space:]]*/I!d;s///;q' "$spec")"
> -	spec_version="$(sed '/^version:[[:space:]]*/I!d;s///;q' "$spec")"
> -	spec_release="$(sed '/^release:[[:space:]]*/I!d;s///;q' "$spec")"
> +	spec_name=$($RPM "$arg" -q --qf '%{NAME}' --specfile "$spec")
> +	spec_version=$($RPM "$arg" -q --qf '%{VERSION}' --specfile "$spec")
> +	spec_release=$($RPM "$arg" -q --qf '%{RELEASE}' --specfile "$spec")

Это изменение противоречит архитектуре gear.
rpmquery --specfile даёт возможность выполнить произвольный код.


-- 
ldv

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

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

* Re: [devel] [git update] packages/gear: tags/compound_subst_stable
  2007-08-28  7:17 ` [devel] [git update] packages/gear: tags/compound_subst_stable Dmitry V. Levin
@ 2007-08-28 16:41   ` Alexey I. Froloff
  2007-08-28 16:48     ` Alexey Tourbin
  0 siblings, 1 reply; 3+ messages in thread
From: Alexey I. Froloff @ 2007-08-28 16:41 UTC (permalink / raw)
  To: ALT Devel discussion list; +Cc: Aleksey Morozov

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

* Dmitry V. Levin <ldv@> [070828 11:25]:
> > +	spec_name=$($RPM "$arg" -q --qf '%{NAME}' --specfile "$spec")
> > +	spec_version=$($RPM "$arg" -q --qf '%{VERSION}' --specfile "$spec")
> > +	spec_release=$($RPM "$arg" -q --qf '%{RELEASE}' --specfile "$spec")
> Это изменение противоречит архитектуре gear.
> rpmquery --specfile даёт возможность выполнить произвольный код.
К тому же при недостатке зависимостей rpmquery может просто не
суметь распарсить спек.

Но на самом деле очень неудобно, что в gear-rules нельзя
использовать полупроизвольные токены, типа svnrev, cvsdate и им
подобных...

-- 
Regards,
Sir Raorn.

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

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

* Re: [devel] [git update] packages/gear: tags/compound_subst_stable
  2007-08-28 16:41   ` Alexey I. Froloff
@ 2007-08-28 16:48     ` Alexey Tourbin
  0 siblings, 0 replies; 3+ messages in thread
From: Alexey Tourbin @ 2007-08-28 16:48 UTC (permalink / raw)
  To: ALT Devel discussion list

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

On Tue, Aug 28, 2007 at 08:41:58PM +0400, Alexey I. Froloff wrote:
> * Dmitry V. Levin <ldv@> [070828 11:25]:
> > > +	spec_name=$($RPM "$arg" -q --qf '%{NAME}' --specfile "$spec")
> > > +	spec_version=$($RPM "$arg" -q --qf '%{VERSION}' --specfile "$spec")
> > > +	spec_release=$($RPM "$arg" -q --qf '%{RELEASE}' --specfile "$spec")
> > Это изменение противоречит архитектуре gear.
> > rpmquery --specfile даёт возможность выполнить произвольный код.
> К тому же при недостатке зависимостей rpmquery может просто не
> суметь распарсить спек.
> 
> Но на самом деле очень неудобно, что в gear-rules нельзя
> использовать полупроизвольные токены, типа svnrev, cvsdate и им
> подобных...

Произвольные токены из %define в спеке?  Я об этом думал.
https://bugzilla.altlinux.org/show_bug.cgi?id=12387

Нужно уметь очень корректно распарсить %define, потому что
последующий define отменяет предыдущий %define (точнее,
перекрывает).  А последующий %define можно попробовать
оформить очень нестандартно.

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

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

end of thread, other threads:[~2007-08-28 16:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-28  7:17 ` [devel] [git update] packages/gear: tags/compound_subst_stable Dmitry V. Levin
2007-08-28 16:41   ` Alexey I. Froloff
2007-08-28 16:48     ` Alexey Tourbin

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