* Re: [devel] %post considered harmful
@ 2026-05-05 7:58 Aleksandr Shamaraev
0 siblings, 0 replies; only message in thread
From: Aleksandr Shamaraev @ 2026-05-05 7:58 UTC (permalink / raw)
To: ALT Linux Team development discussions
05.05.2026 14:48, Alexey V. Vissarionov пишет:
> Good ${greeting_time}!
>
> On 2026-05-05 05:05:10 +0300, Aleksandr Shamaraev wrote:
>
> >>> после обновления они сбросятся, следовательно на вторую
> >>> транзакцию apt-get не будет знать где смотреть.
> >> %config(noreplace) ... ?
> > Попробую, спасибо.
>
> Если интересно, я в подобных случаях пишу примерно так:
>
> %post
> test -f %_sysconfdir/%name.conf \
> || cp -af %_sysconfdir/%name-example.conf %_sysconfdir/%name.conf
>
> %files
> %config %verify(not md5 mtime size) %_sysconfdir/%name-example.conf
> %config(noreplace) %ghost %_sysconfdir/%name.conf
>
> (вместо MD5 уже давно используется SHA2-512, но ключевое слово
> осталось).
>
>
Спасибо.
С уважением, Александр
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-05-05 7:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-05 7:58 [devel] %post considered harmful Aleksandr Shamaraev
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