[Pkg-samba-maint] Bug#451269: Bug#451269: samba's package postinst script shouldn't return an error if samba daemon can't be started
Steve Langasek
vorlon at debian.org
Thu Nov 15 00:43:11 UTC 2007
On Wed, Nov 14, 2007 at 06:41:43PM -0500, Mathias Gug wrote:
> > Yes, it can be a problem for apt when packages fail to configure; but why is
> > the samba package's configuration broken in the first place?
> I think the use case would be that the user broke the configuration
> file. For example, there is a recurring bug on Kubuntu where the kde
> network administration tool inserts a broken entry in smb.conf (it adds
> a "dfs proxy = no" line for each share it defines).
Hmm, it's my understanding that setting "msdfs proxy = no" breaks the use of
such a share, but would not prevent smbd from starting. So that doesn't
explain the observed behavior.
I mean, I certainly accept that there are ways that samba can be
misconfigured such that it will fail to start, I just don't think ignoring
restart failures is a good way to handle this.
> It's true that the problem is not the samba package itself, but the idea
> is to make the post installation script more robust to
> mis-configuration (in the same vein as don't restart apache if the
> configuration is broken).
The samba package stops the daemons in the prerm, so the damage is already
done by the time you reach the postinst if the server was running
previously. Also, per the smbd manpage's confirmation of my memory, smbd
dynamically rereads its configuration when it's changed, so you can
completely break smbd without touching /etc/init.d/samba... :)
> > The argument given in the Ubuntu bug report, that "we are not following the
> > packaging policy when the postinst assumes that we should have a correct
> > config file from another package", is false; samba and samba-common are
> > cooperating packages, and one of the main purposes of the samba-common
> > package is to manage the smb.conf file on behalf of samba. But of course
> > samba-common doesn't contain enough information to ascertain for itself that
> > the config on disk is usable by smbd, so it's up to the samba package to
> > complain when this is not the case.
> > Do you disagree with this position?
> No.
Ok
> > I would in any case be interested to know for sure why the original bug
> > submitter had an smbd that wouldn't start; the follow-up from Mantas is
> > fairly speculative about the cause of the failure, it's entirely possible
> > that this change has only papered over whatever the original submitter's
> > problem was.
> Yes that's probably true. Again my aim was to make the package more
> robust to mis-configuration. OTOH if the configuration is broken we need
> a way to tell the user that there is a problem.
Right - unless you have a better way, I think the package state is the way
to notify the user of this problem.
Cheers,
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
vorlon at debian.org http://www.debian.org/
More information about the Pkg-samba-maint
mailing list