Control: done -1

Hi Vincent,

On Fri, Mar 21, 2025 at 09:47:09PM +0100, Vincent Blut wrote:
> Control: tags -1 + moreinfo
> 
> Hi Daniel,
> 
> Le 2025-03-21 16:57, Daniel Gröber a écrit :
> > Package: chrony
> > Version: 4.6.1-1
> > Severity: normal
> > X-Debbugs-Cc: d...@darkboxed.org
> > 
> > Hi Vincent,
> > 
> > I installed and removed chrony=4.6.1-1 in an unstable schroot and
> > afterwards dpkg complains:
> > 
> >     dpkg: unrecoverable fatal error, aborting:
> >      unknown system group '_chrony' in statoverride file; the system group 
> > got removed
> >     before the override, which is most probably a packaging bug, to recover 
> > you
> >     can remove the override manually with dpkg-statoverride
> >     E: Sub-process /usr/bin/dpkg returned an error code (2)
> > 
> > 
> > This appears to be because your package didn't clean up it's
> > dpkg-statoverrides:
> > 
> >     $ dpkg-statoverride --list | grep chrony
> >     root _chrony 640 /etc/chrony/chrony.keys
> >     _chrony _chrony 750 /var/lib/chrony
> >     _chrony _chrony 750 /var/log/chrony
>  
> chrony does clean stat overrides on purge. From d/postinst:
>     for d in /var/lib/chrony /var/log/chrony /etc/chrony/chrony.keys; do
>         if dpkg-statoverride --list "$d" >/dev/null; then
>             dpkg-statoverride --remove "$d"
>         fi
>     done
> 
> Since this issue does not seem to be reproducible outside schroot, I'm 
> assuming
> it is due to the way it has been configured. By default, schroot copies some
> files from the host (e.g. /etc/passwd, /etc/shadow, /etc/group) into the 
> chroot
> each time a new session is started. Could this be the issue at play?

Ah, I think you're spot on.

I must have exited the session (I thought I didn't!) after removing but not
purging chrony. I just tested this and my schroot does ofc. overwrite
/etc/passwd which breaks the leftover statoverrides. My bad.

Thanks,
--Daniel

Attachment: signature.asc
Description: PGP signature

Reply via email to