From: Aleksandr Shamaraev <shad@altlinux.org>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] %post considered harmful
Date: Tue, 05 May 2026 10:58:47 +0300
Message-ID: <ad27c6d2cb36f341685ce077d57880e6@altlinux.org> (raw)
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, но ключевое слово
> осталось).
>
>
Спасибо.
С уважением, Александр
reply other threads:[~2026-05-05 7:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=ad27c6d2cb36f341685ce077d57880e6@altlinux.org \
--to=shad@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