[devel] Внезапные post-install unowned files

Arseny Maslennikov arseny на altlinux.org
Вт Май 14 14:48:53 MSK 2024


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

----------- следующая часть -----------
Было удалено вложение не в текстовом формате...
Имя     : signature.asc
Тип     : application/pgp-signature
Размер  : 833 байтов
Описание: отсутствует
Url     : <http://lists.altlinux.org/pipermail/devel/attachments/20240514/f63cf11d/attachment.bin>


Подробная информация о списке рассылки Devel