ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] Внезапные post-install unowned files
@ 2024-05-14 11:30 Sergey Afonin
  2024-05-14 11:45 ` Arseny Maslennikov
  0 siblings, 1 reply; 3+ messages in thread
From: Sergey Afonin @ 2024-05-14 11:30 UTC (permalink / raw)
  To: ALT Devel discussion list

Приветствую.

Это последствия usrmerge?

https://git.altlinux.org/tasks/archive/done/_339/347639/logs/events.1.2.log

	x86_64: bird=2.15.1-alt1 post-install unowned files:
 /usr/lib/systemd/system/bird.service
 /usr/lib/tmpfiles.d/bird.conf

В спеке эти файлы описаны, в 
https://git.altlinux.org/tasks/archive/done/_316/324357/logs/events.3.1.log
всё хорошо было.

-- 
С уважением, Сергей Афонин.


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

* Re: [devel] Внезапные  post-install unowned files
  2024-05-14 11:30 [devel] Внезапные post-install unowned files Sergey Afonin
@ 2024-05-14 11:45 ` Arseny Maslennikov
  2024-05-14 11:48   ` Arseny Maslennikov
  0 siblings, 1 reply; 3+ messages in thread
From: Arseny Maslennikov @ 2024-05-14 11:45 UTC (permalink / raw)
  To: ALT Linux Team development discussions

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

On Tue, May 14, 2024 at 03:30:29PM +0400, Sergey Afonin wrote:
> Приветствую.
> 
> Это последствия usrmerge?
> 
> https://git.altlinux.org/tasks/archive/done/_339/347639/logs/events.1.2.log
> 
> 	x86_64: bird=2.15.1-alt1 post-install unowned files:
>  /usr/lib/systemd/system/bird.service
>  /usr/lib/tmpfiles.d/bird.conf
> 
> В спеке эти файлы описаны, в 
> https://git.altlinux.org/tasks/archive/done/_316/324357/logs/events.3.1.log
> всё хорошо было.

Эти файлы в post-install unowned files указаны по ошибке, у меня даже
есть вариант патча на gb-remote-install-check.

Если коротко: до и после установки пакета в чрут запускают `find /*` и
кладут вывод соотв. в 2 файла, содержимое которых потом подлежит сравнению.
Так вот для всех этих пар /x и /usr/x:
— `find /*` показывает только /usr/x,
— в выводе `rpm -qal` обычно только /x (есть исключения).
Путь /usr/x в таком случае считается unprovided и в итоге оказывается в
списке unowned files.

После того, как мы поменяем макросы _tmpfilesdir, _unitdir и т. п. и во
всех этих пакетах файлы лягут под /usr, проблема пропадёт сама собой.
Правда, есть ядра и ядерные модули, где этот шаг, наверное, произойдёт
значительно позже.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [devel] Внезапные  post-install unowned files
  2024-05-14 11:45 ` Arseny Maslennikov
@ 2024-05-14 11:48   ` Arseny Maslennikov
  0 siblings, 0 replies; 3+ messages in thread
From: Arseny Maslennikov @ 2024-05-14 11:48 UTC (permalink / raw)
  To: ALT Linux Team development discussions

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

On Tue, May 14, 2024 at 02:45:14PM +0300, Arseny Maslennikov wrote:
> On Tue, May 14, 2024 at 03:30:29PM +0400, Sergey Afonin wrote:
> > Приветствую.
> > 
> > Это последствия usrmerge?
> > 
> > https://git.altlinux.org/tasks/archive/done/_339/347639/logs/events.1.2.log
> > 
> > 	x86_64: bird=2.15.1-alt1 post-install unowned files:
> >  /usr/lib/systemd/system/bird.service
> >  /usr/lib/tmpfiles.d/bird.conf
> > 
> > В спеке эти файлы описаны, в 
> > https://git.altlinux.org/tasks/archive/done/_316/324357/logs/events.3.1.log
> > всё хорошо было.
> 
> Эти файлы в post-install unowned files указаны по ошибке, у меня даже
> есть вариант патча на gb-remote-install-check.

From: Arseny Maslennikov <arseny@altlinux.org>
Date: Wed,  1 May 2024 23:45:47 +0300
Message-ID: <20240501204548.25091-1-arseny@altlinux.org>
X-Mailer: git-send-email 2.42.1
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: [RFC PATCH girar.git] remote-check-install: temporarily fix unowned files reports

On merged-usr systems for each file path accessible under both /lib and
/usr/lib, etc. `find /*` automatically optimizes away the /lib one. Many
rpm packages contain files under /lib, though, and are reported by
rpmquery as such, so the real file under /usr/lib is considered
"unprovided".

For each path in the output of `(rpmquery -al; rpmquery -a --provides)`
under a legacy directory alias, add a matching path under the prefix.
The transformation will look like this:
  % sed 's!^/\(bin\|lib\|lib32\|lib64\|libx32\|sbin\).\+!/usr&\n&!' <<____
  /sbin/chroot
  /bin/bash
  ____
  /usr/sbin/chroot
  /sbin/chroot
  /usr/bin/bash
  /bin/bash

This way the new files under the prefix can never show up.
---
 gb/remote/gb-remote-check-install | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gb/remote/gb-remote-check-install b/gb/remote/gb-remote-check-install
index 5cac126..ac09c4f 100755
--- a/gb/remote/gb-remote-check-install
+++ b/gb/remote/gb-remote-check-install
@@ -189,6 +189,9 @@ sort -u -o instprov{,}
 hsh-run --rooter -- \
 rpmquery -al >instfiles 2>>warnings
 sed '/^(contains no files)$/d' -i warnings
+# Temporary hack: for each entry in legacy aliased dirs,
+# add its real location.
+sed -i 's!^/\(bin\|lib\|lib32\|lib64\|libx32\|sbin\).\+!/usr&\n&!' instfiles
 sort -u -o instfiles{,}
 
 sort -u instprov instfiles >instlist
-- 
2.42.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2024-05-14 11:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-14 11:30 [devel] Внезапные post-install unowned files Sergey Afonin
2024-05-14 11:45 ` Arseny Maslennikov
2024-05-14 11:48   ` Arseny Maslennikov

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