Bug#985297: libreoffice-common: do not use dir_to_symlink for /usr/lib/libreoffice/share/registry

2021-05-01 Thread Rene Engelhard
Hi,

Am 30.04.21 um 16:23 schrieb Andreas Beckmann:
> I've been experimenting a lot to fix this bug.
Thanks very much.
> I've running various buster->bullseye upgrade scenarios (with and
> without recommends, direct distupgrade vs upgrade && dist-upgrade)
> with the patched packages as upgrade targets. I've rerun all piuparts
> tests that had libreoffice-common installed and haven't seen any more
> problems with the patched packages.
Cool, thanks.
> The attached patch does only patch debian/control.in, please regenerate
> debian/control as this caused a lot of noise (I did nocheck builds).
Applied.
> It also contains adding some weird symbols with symbol version GLIBCXX_3.4
> that looks weird, because libreoffice should not provide symbols with
> such a version. This could also be an artefact of how I did build the
> packages. Please decide what should happen to them.

Ignore them.I would say it's a gcc detail. The only thing I maintain in
the .symbols files is LOs own public versions.


Regards,


Rene



Bug#985297: libreoffice-common: do not use dir_to_symlink for /usr/lib/libreoffice/share/registry

2021-04-30 Thread Andreas Beckmann
Followup-For: Bug #985297
Control: tag -1 patch

Hi Rene,

I've been experimenting a lot to fix this bug.
One problem is Breaks in one package being handled first (by
deconfiguratio) and subsequent occurrences of Conflicts in another
package will be ignored for deconfigured packages (and removal will not
happen).

We can fix most of the upgrade issues by propagating the Conflicts to
the package with the Breaks, s.t. deconfiguration does not happen but
removal does happen immediately. Unfortunately this does not work if
there are too many packages the would need to be removed together since
dpkg does not get the optimal ordering for doing that. These are mostly
upgrade paths with libreoffice-impress or libreoffice-report-builder
installed.

So in the end I resorted to not using
  dpkg-maintscript-helper dir_to_symlink
as I had initially suggested but fixing it up manually in the postinst.

I've running various buster->bullseye upgrade scenarios (with and
without recommends, direct distupgrade vs upgrade && dist-upgrade)
with the patched packages as upgrade targets. I've rerun all piuparts
tests that had libreoffice-common installed and haven't seen any more
problems with the patched packages.

The attached patch does only patch debian/control.in, please regenerate
debian/control as this caused a lot of noise (I did nocheck builds).
It also contains adding some weird symbols with symbol version GLIBCXX_3.4
that looks weird, because libreoffice should not provide symbols with
such a version. This could also be an artefact of how I did build the
packages. Please decide what should happen to them.

Andreas
diff -Nru libreoffice-7.0.4/debian/changelog libreoffice-7.0.4/debian/changelog
--- libreoffice-7.0.4/debian/changelog  2021-01-03 18:54:17.0 +0100
+++ libreoffice-7.0.4/debian/changelog  2021-04-07 09:42:18.0 +0200
@@ -1,3 +1,16 @@
+libreoffice (1:7.0.4-4) UNRELEASED; urgency=medium
+
+  * libreoffice-core: Copy some Conflicts from libreoffice-common for smoother
+upgrades from buster. Dpkg will otherwise ignore Conflicts that are
+encountered later against a package that is already deconfigured.
+  * libreoffice-common: Do not use dir_to_symlink for
+/usr/lib/libreoffice/share/registry, the Breaks/Conflicts cascade does not
+work reliable here to ensure all packages previously shipping files there
+are either removed or upgraded first, but not just deconfigured. Fix up
+the symlink in postinst instead.  (Closes: #985297)
+
+ -- Andreas Beckmann   Wed, 07 Apr 2021 09:42:18 +0200
+
 libreoffice (1:7.0.4-3) unstable; urgency=medium
 
   * debian/tests/control.in: *really* add libreoffice-writer dependency
diff -Nru libreoffice-7.0.4/debian/control.in 
libreoffice-7.0.4/debian/control.in
--- libreoffice-7.0.4/debian/control.in 2020-12-31 11:27:09.0 +0100
+++ libreoffice-7.0.4/debian/control.in 2021-04-07 09:42:18.0 +0200
@@ -236,6 +236,15 @@
 libreoffice-common (<< 1:5.4.1),
 libreoffice-avmedia-backend-gstreamer (<< ${binary:Version})
 Conflicts: libreoffice-filter-binfilter, libreoffice-avmedia-backend-vlc, 
libreoffice-mysql-connector (<< 1:6.2.0~), libreoffice-core-nogui
+# for bullseye, copied from libreoffice-common, see #985297
+ ,
+ libreoffice-base (<< 1:7.0.0~alpha~),
+ libreoffice-calc (<< 1:7.0.0~alpha~),
+ libreoffice-draw (<< 1:7.0.0~alpha~),
+ libreoffice-impress (<< 1:7.0.0~alpha~),
+ libreoffice-math (<< 1:7.0.0~alpha~),
+ libreoffice-report-builder (<< 1:7.0.0~alpha~),
+ libreoffice-writer (<< 1:7.0.0~alpha~),
 Replaces: libreoffice-pdfimport (<< 1:5.4~), libreoffice-common (<< 
1:6.3.0~rc1~), libreoffice-avmedia-backend-gstreamer, libreoffice-core-nogui
 Description: office productivity suite -- arch-dependent files
  LibreOffice is a full-featured office productivity suite that provides
diff -Nru libreoffice-7.0.4/debian/libreoffice-common.maintscript 
libreoffice-7.0.4/debian/libreoffice-common.maintscript
--- libreoffice-7.0.4/debian/libreoffice-common.maintscript 2020-12-31 
11:27:09.0 +0100
+++ libreoffice-7.0.4/debian/libreoffice-common.maintscript 2021-04-07 
09:42:18.0 +0200
@@ -2,4 +2,10 @@
 mv_conffile /etc/apparmor.d/usr.lib.libreofficeprogram.senddoc 
/etc/apparmor.d/usr.lib.libreoffice.program.senddoc 1:5.4.3-1
 mv_conffile /etc/apparmor.d/usr.lib.libreofficeprogram.soffice.bin 
/etc/apparmor.d/usr.lib.libreoffice.program.soffice.bin 1:5.4.3-1
 mv_conffile /etc/apparmor.d/usr.lib.libreofficeprogram.xpdfimport 
/etc/apparmor.d/usr.lib.libreoffice.program.xpdfimport 1:5.4.3-1
-dir_to_symlink /usr/lib/libreoffice/share/registry /etc/libreoffice/registry 
1:7.0.2~rc1-1 
+
+# do this manually since dpkg-maintscript-helper dir_to_symlink
+# does not work reliably in this case because we cannot ensure that all
+# conflicting packages previously shipping files in
+# /usr/lib/libreoffice/share/registry are either upgraded or removed
+# but not just deconfigured, see #985297
+#dir_to_symlink