<div dir="ltr"><div dir="ltr">Hi,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 9, 2021 at 5:12 AM Michael Biebl <<a href="mailto:biebl@debian.org">biebl@debian.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Felipe<br>
<br>
Am 08.09.21 um 19:25 schrieb Michael Biebl:<br>
> systemd-timesyncd was split into a separate binary package in bullseye. <br>
> Transferring the ownership of the conffile from systemd to <br>
> systemd-timesyncd is a tricky business as dpkg does not have native <br>
> support for that and so we need to go behind dpkg's back for that.<br>
> <br>
> We do have some custom maintainer scripts code where we try to preserve <br>
> local modifications:<br>
> <a href="https://salsa.debian.org/systemd-team/systemd/-/blob/debian/master/debian/systemd-timesyncd.postinst" rel="noreferrer" target="_blank">https://salsa.debian.org/systemd-team/systemd/-/blob/debian/master/debian/systemd-timesyncd.postinst</a> <br>
<br>
This code is based on<br>
<a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=797048" rel="noreferrer" target="_blank">https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=797048</a><br>
i.e.<br>
<a href="https://salsa.debian.org/systemd-team/systemd/commit/f5f5028055f25fa733a45265e7c008e06960e0a7" rel="noreferrer" target="_blank">https://salsa.debian.org/systemd-team/systemd/commit/f5f5028055f25fa733a45265e7c008e06960e0a7</a><br>
<br>
A typescript log from an upgrade is attached.<br>
One can see, that systemd-timesyncd.postinst is run before <br>
systemd.postinst and as a result timesyncd.conf.dpkg-bak does not exist yet.<br>
<br>
Afaics, this could only be fixed with a versioned Pre-Depends on systemd <br>
(>= 245.4-2). I don't think a Depends gives us any guarantees regarding <br>
the order postinst is run?<br></blockquote><div><br></div><div>It should give us the guarantees[1]:</div><div><br></div><div>> The postinst script may be called in the following ways:<br>> postinst configure most-recently-configured-version<br>> The files contained in the package will be unpacked. </div><div>> All package dependencies will at least be “Unpacked”. </div><div>> If there are no circular dependencies involved, </div><div>> all package dependencies will be configured<br></div><div><br></div><div>AFAICS we don't have circular dependencies, but maybe the versioned breaks/replaces + versioned depends makes dpkg think there is one?</div><div><br></div><div>[1]<a href="https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#summary-of-ways-maintainer-scripts-are-called">https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#summary-of-ways-maintainer-scripts-are-called</a> </div></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><br>Saludos,<br>Felipe Sateler</div></div>