[debian-mysql] Bug#853008: Bug#853008: Bug#853008: Bug#853008: mysql-server-5.7: purge could delete mariadb-server files with inadequate warning

Julian Gilbey jdg at debian.org
Tue Feb 21 14:11:44 UTC 2017


On Tue, Feb 21, 2017 at 02:10:22PM +0100, Lars Tangvald wrote:
> On 02/21/2017 01:59 PM, Julian Gilbey wrote:
> > On Tue, Feb 21, 2017 at 01:27:44PM +0100, Lars Tangvald wrote:
> > > I've looked at it some more, and I'm hesitant about including such a big
> > > patch for a pretty rare scenario, which in the worst case does ask the
> > > following:
> > >   The /var/lib/mysql directory which contains the MySQL databases is about
> > >   to be removed.
> > >   .
> > >   This will also erase all data in /var/lib/mysql-files as well as
> > >   /var/lib/mysql-keyring.
> > >   .
> > >   If you're removing the MySQL package in order to later install a more
> > >   recent version or if a different mysql-server package is already
> > >   using it, the data should be kept.
> > > 
> > > My suggestion is that for now, we revert the patch that enabled the
> > > purge-remove (meaning postrm will never delete anything or ask to do so) and
> > > instead work on separating the data for the different packages so that
> > > MariaDB and MySQL data isn't in the same location.
> > Hi Lars,
> > 
> > Does that mean that the whole remove section just gets removed from
> > the postrm, or that you put back the test for /usr/sbin/mysqld existing?
> > 
> > Best wishes,
> > 
> >     Julian
> > 
> Only reverting the commit would put it back, which I guess would be best
> since I think it can trigger if you first do apt-get remove and then apt-get
> purge (without installing a different variant between).

As in commit 554ecf472109f2b2e2fdfa0aaa0302cf2247ac1e - yes, that
would make some sense.

However, this does not address other serious issues which are
addressed in the patch, and which will affect even users who say "No"
to the debconf purge question mentioned above:

* Purging old removed mysql-* packages stops our server, potentially
  interferes with our data and does other unwanted things (such as
  messing with our init.d scripts).

* The current postrm has some of the same issues remaining, so that
  future mysql-* packages will be damaged by purging mysql-5.7 in its
  current form.

Neither of these issues will be fixed by splitting the mysql/mariadb
data to a different location during the next release cycle, and will
potentially affect users of Debian 9.

I realise that the patch is big, which is unideal.  I wish I had
spotted the issues earlier in the release cycle, rather than now.  But
that's life.

Best wishes,

   Julian



More information about the pkg-mysql-maint mailing list