Your message dated Fri, 11 Aug 2023 20:39:31 +0200
with message-id <[email protected]>
and subject line Re: Bug#1041126: krb5-config install doesn't gracefully handle 
read-only /etc/krb5.conf file and errors out
has caused the Debian Bug report #1041126,
regarding krb5-config install doesn't gracefully handle read-only 
/etc/krb5.conf file and errors out
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1041126: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1041126
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: krb5-configVersion: 2.7
When attempting to install krb5-config, if there is a pre-existing 
/etc/krb5.conf file that is part of a read-only filesystem,example: mounted 
through something like a container Docker/Kubernetes,the install process will 
error and fail.
Here are reproducible steps:
1. Start a Debain instance with a read-only copy of /etc/krb5.conf.2. Run$ 
apt-get update && apt-get -y install krb5-config
Unpacking krb5-config (2.7) ...dpkg: krb5-config: dependency problems, but 
configuring anyway as you requested: krb5-config depends on bind9-host; 
however:  Package bind9-host is not installed.Setting up krb5-config (2.7) 
...debconf: unable to initialize frontend: Dialogdebconf: (TERM is not set, so 
the dialog frontend is not usable.)debconf: falling back to frontend: 
Readlinedebconf: unable to initialize frontend: Readlinedebconf: (Can't locate 
Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) 
(@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 
/usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 
/usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base 
/usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 
/usr/local/lib/site_perl) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 
7.)debconf: falling back to frontend: TeletypeUnable to rename file: Device or 
resource busy, stopped at /var/lib/dpkg/info/krb5-config.postinst line 79, 
<CONF> line 22.dpkg: error processing package krb5-config (--install): 
installed krb5-config package post-installation script subprocess returned 
error exit status 16Errors were encountered while processing: krb5-config

Based on my investigation it appears that 
/var/lib/dpkg/info/krb5-config.postinst will always try to replace 
/etc/krb5.conf even if it would be unable to.I suggest that a check be added 
before attempting to replace to ensure that it will be able to do so. If it is 
unable to replace it should exit successfully, but potentially log a warning.
I'm not too familiar with the script, but potentially using a "test -w" before 
trying to replace the file would work here. (test -w does properly detect that 
the file is read only, so it's more of a question of whether it is usable in 
the install script.
Installing Kerberos on other distributions with a similar setup does not result 
in this type of error. Which is why I'm opening this bug report.
I am running on Debian GNU/Linux 12 (bookworm), Linux 25bb0bdce857 
3.10.0-1160.92.1.el7.x86_64 #1 SMP Tue Jun 20 11:48:01 UTC 2023 x86_64 GNU/Linux


--- End Message ---
--- Begin Message ---
* Ben Brenek <[email protected]>, 2023-07-14 23:29:
Apologies, this email got really mangled when sending, I will resubmit with corrected formatting.

Let's close the mangled one in favor of #1041129.

--
Jakub Wilk

--- End Message ---

Reply via email to