From: Alexey Gladkov <gladkov.alexey@gmail.com>
To: make-initrd@lists.altlinux.org
Subject: Re: [make-initrd] put-udev-rules и p11
Date: Tue, 27 Feb 2024 17:44:29 +0100
Message-ID: <Zd4RbevW7lGKxK6z@example.org> (raw)
In-Reply-To: <d83007dc-4a1e-4973-bb13-907a9533b97a@gmail.com>
On Tue, Feb 27, 2024 at 07:17:56PM +0300, Leonid Krivoshein wrote:
> Алексей, привет!
>
>
> Накануне p11 словили потенциальную граблю -- см. скриншот. Детали здесь
> точно не важны. В make-initrd появился чудесный строгий валидатор udev
> правил. Теперь, если в каком-то другом пакете пакуются правила с
> ошибками, может быть не только ругань, но и отказ собирать initrd. В
> случае инсталлятора 11.x это может означать, что в каких-то
> конфигурациях мы можем ничего не установить, но об ошибках в правилах
> udev узнаем только пост-фактум из логов.
>
> Тем не менее, проверка нужная. Но, может, стоит проверять все udev
> правила при упаковке на сборочнице, чтобы исключить такие сюрпризы?
> Можно ли (и насколько сложно) туда будет приделать твой валидатор? Что
> ты об этом думаешь?
По мотивам этого валидатора в systemd 254 был добавлен: udevadm verify. Он
делает ещё больше проверок т.к. он использует тот же парсер.
Свою утилиту я писал глядя на правила в пакетах sisyphus и глядя в парсер
udev.
Запускать проверку правил важно и нужно. Правила с ошибками не
исполняются, какая-то ругань про ошибки попадает в лог udev, но кто это
читает? В итоге правило частично или полностью не работает.
Я специально положил свой парсер в /usr/sbin на случай если она кому-то
ещё понадобиться. В остальном выбор за вами каким валидатором
пользоваться.
--
Rgrds, legion
next prev parent reply other threads:[~2024-02-27 16:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-27 16:35 ` Leonid Krivoshein
2024-02-27 18:44 ` Alexey Gladkov
2024-02-27 16:44 ` Alexey Gladkov [this message]
2024-02-27 17:17 ` Leonid Krivoshein
2024-02-27 18:59 ` Alexey Gladkov
2024-02-27 22:23 ` Leonid Krivoshein
2024-02-27 22:43 ` Alexey Gladkov
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=Zd4RbevW7lGKxK6z@example.org \
--to=gladkov.alexey@gmail.com \
--cc=make-initrd@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
Make-initrd development discussion
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/make-initrd/0 make-initrd/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 make-initrd make-initrd/ http://lore.altlinux.org/make-initrd \
make-initrd@lists.altlinux.org make-initrd@lists.altlinux.ru make-initrd@lists.altlinux.com
public-inbox-index make-initrd
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.make-initrd
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git