ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Victor Wagner <v.wagner@postgrespro.ru>
To: Andrey Savchenko <bircoph@altlinux.org>
Cc: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] rpm: некорректные макросы
Date: Sun, 15 Dec 2019 18:06:45 +0300
Message-ID: <20191215180645.68677a8a@wagner.wagner.home> (raw)
In-Reply-To: <20191213211843.4a0228834c2c2b22c7921cbe@altlinux.org>

В Fri, 13 Dec 2019 21:18:43 +0300
Andrey Savchenko <bircoph@altlinux.org> пишет:


> > > $ rpm -q rpm
> > > rpm-4.13.0.1-alt15.x86_64
> > > $ rpm --showrc | grep "@.*@"
> > >         %{expand:%(cat /usr/lib/rpm/macros.d/*.env
> > > @SYSCONFIGDIR@/macros.d/*.env 2>/dev/null)} -14: __install_info
> > > @__INSTALL_INFO@ -14: __lzma     @__LZMA@ -14: __pgp      @PGPBIN@
> > > -14: __subst    @__SUBST@
> > > -14: _build_arch        @RPMCANONARCH@
> > > 
> > > Что мы будем с этим делать? На мой взгляд нужно или задать
> > > значения, или убрать эти макросы вовсе.  
> > 
> > Из процитированного видно, что это всё было скопировано из
> > rpm-build, в самом rpm не используется, а rpm-build продолжает
> > использовать свои определения.  
> 
> Прорезюмирую результат обсуждения IRL: значения этих и многих
> других макросов нужно брать из rpmbuild. Из rpm их лучше в
> дальнейшем удалить во избежание недоразумений.

Тут есть одна тонкость - нету у юзера на production сервере
rpmbuild. И не должно быть. Ибо средства разработки это толстенная дыра
в безопасности.

А у меня проблема возникла именно из задачи  - "прописать юзеру в
/etc/apt/sources.list.d правильный репозиторий, не полагаясь на то,
что юзер знает, какая у него архитектура и версия платформы".

Поэтому нужен способ точно определить архитектуру установленной системы.
Именно системы, а не ядра, так как никто не обещал в нашу эпоху
контейнеров, что они совпадают.
Правда, видимо, лучше это делать не посредством rpm, поскольку вызов rpm
изнутри %post скрипта вообще говоря недопустим.

Либо тогда надо передеелывать логкику работы apt, чтобы там, как и в
Debian, не требовалось явно указывать архитектуру в URL-ках.

Вот у yum или zypper, например я могу в url-ке на репозиторийй написать
$releasever и $basearch и он мне сам подставит то, что надо.





-- 
                                   Victor Wagner <vitus@wagner.pp.ru>


  reply	other threads:[~2019-12-15 15:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-12 23:08 Andrey Savchenko
2019-12-13  8:02 ` Dmitry V. Levin
2019-12-13 18:18   ` Andrey Savchenko
2019-12-15 15:06     ` Victor Wagner [this message]
2019-12-16  0:46       ` Alexey V. Vissarionov
2019-12-16 13:16         ` Andrey Savchenko
2019-12-16 14:27           ` Alexey V. Vissarionov
2019-12-16 17:40           ` Andrey Savchenko
2019-12-16  9:55     ` Ivan A. Melnikov

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=20191215180645.68677a8a@wagner.wagner.home \
    --to=v.wagner@postgrespro.ru \
    --cc=bircoph@altlinux.org \
    --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