[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#988906: unblock: libreoffice/1:7.0.4-4



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package libreoffice

This fixes the upgrade buster->bullseye. See #985297.

Quoting Andreas Beckmann:
"
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.
"
(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=985297#43)

It also includes a minor fix for #982274 which I didn't revert for this
upload - in contrast to other changes I had in git already when this
came up. The profile is in complain mode per default anyway.

Already is 20/20 days old:

libreoffice (1:7.0.4-3 to 1:7.0.4-4)
    Maintainer: Debian LibreOffice Maintainers
    Migration status for libreoffice (1:7.0.4-3 to 1:7.0.4-4): BLOCKED: Needs an approval (either due to a freeze, the source suite or a manual hint)
    Issues preventing migration:
    blocked by freeze: is a key package (Follow the freeze policy when applying for an unblock)
    Additional info:
    Updating libreoffice fixes old bugs: #985297
    Piuparts tested OK - https://piuparts.debian.org/sid/source/libr/libreoffice.html
    autopkgtest for libreoffice/1:7.0.4-4: amd64: Pass, arm64: Test in progress (will not be considered a regression), armhf: Pass, i386: Pass, ppc64el: Test in progress (will not be considered a regression)
    20 days old (needed 20 days)

(arm64 and ppc64el are blacklisted in autopkgtest due to infrastructural
issues)

Diff:

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.000000000 +0100
+++ libreoffice-7.0.4/debian/changelog	2021-05-01 13:50:48.000000000 +0200
@@ -1,3 +1,20 @@
+libreoffice (1:7.0.4-4) unstable; urgency=medium
+
+  * debian/patches/apparmor-updates.diff: allow one more digit in temp
+    files (closes: #982274)
+  * debian/control.in, debian/libreoffice-common.{maintscript,postinst.in}:
+    apply patch from Adreas Beckmann to fix upgrade buster->bullseye
+    - 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)
+
+ -- Rene Engelhard <rene@debian.org>  Sat, 01 May 2021 13:50:48 +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 libreoffice-7.0.4/debian/control
--- libreoffice-7.0.4/debian/control	2021-01-03 18:54:17.000000000 +0100
+++ libreoffice-7.0.4/debian/control	2021-05-01 13:50:48.000000000 +0200
@@ -451,6 +451,15 @@
            libreoffice-core-nogui,
            libreoffice-filter-binfilter,
            libreoffice-mysql-connector (<< 1:6.2.0~)
+# 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-avmedia-backend-gstreamer,
           libreoffice-common (<< 1:6.3.0~rc1~),
           libreoffice-core-nogui,
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.000000000 +0100
+++ libreoffice-7.0.4/debian/control.in	2021-05-01 13:10:40.000000000 +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.000000000 +0100
+++ libreoffice-7.0.4/debian/libreoffice-common.maintscript	2021-05-01 13:10:40.000000000 +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 /usr/lib/libreoffice/share/registry /etc/libreoffice/registry 1:7.0.2~rc1-1 
diff -Nru libreoffice-7.0.4/debian/libreoffice-common.postinst.in libreoffice-7.0.4/debian/libreoffice-common.postinst.in
--- libreoffice-7.0.4/debian/libreoffice-common.postinst.in	2020-12-31 11:27:09.000000000 +0100
+++ libreoffice-7.0.4/debian/libreoffice-common.postinst.in	2021-05-01 13:10:40.000000000 +0200
@@ -27,3 +27,17 @@
 
 #DEBHELPER#
 
+# 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
+if [ "$1" = "configure" ] && dpkg --compare-versions "$2" lt-nl "1:7.0.4-4~" ; then
+	if [ ! -L /usr/lib/libreoffice/share/registry ]; then
+		if [ -d /usr/lib/libreoffice/share/registry ]; then
+			# this will fail if the directory is not yet empty
+			rmdir -v /usr/lib/libreoffice/share/registry
+		fi
+		ln -sfvT /etc/libreoffice/registry /usr/lib/libreoffice/share/registry
+	fi
+fi
diff -Nru libreoffice-7.0.4/debian/patches/apparmor-updates.diff libreoffice-7.0.4/debian/patches/apparmor-updates.diff
--- libreoffice-7.0.4/debian/patches/apparmor-updates.diff	1970-01-01 01:00:00.000000000 +0100
+++ libreoffice-7.0.4/debian/patches/apparmor-updates.diff	2021-03-17 22:07:55.000000000 +0100
@@ -0,0 +1,13 @@
+diff --git a/sysui/desktop/apparmor/program.soffice.bin b/sysui/desktop/apparmor/program.soffice.bin
+index 42053db2abef..83bd9d11f93c 100644
+--- a/sysui/desktop/apparmor/program.soffice.bin
++++ b/sysui/desktop/apparmor/program.soffice.bin
+@@ -101,7 +101,7 @@ profile libreoffice-soffice INSTDIR-program/soffice.bin {
+   owner @{libo_user_dirs}/**/           rw,  #allow creating directories that we own
+   owner @{libo_user_dirs}/**~lock.*     rw,  #lock file support
+   owner @{libo_user_dirs}/**.@{libreoffice_ext} rwk,  #Open files rw with the right exts
+-  owner @{libo_user_dirs}/{,**/}lu??????????{,?}.tmp rwk, #Temporary file used when saving
++  owner @{libo_user_dirs}/{,**/}lu???????????{,?}.tmp rwk, #Temporary file used when saving
+   owner @{libo_user_dirs}/{,**/}.directory r, #Read directory settings on KDE
+ 
+   # Settings
diff -Nru libreoffice-7.0.4/debian/patches/series libreoffice-7.0.4/debian/patches/series
--- libreoffice-7.0.4/debian/patches/series	2020-12-31 11:27:09.000000000 +0100
+++ libreoffice-7.0.4/debian/patches/series	2021-03-17 22:08:06.000000000 +0100
@@ -50,3 +50,4 @@
 fix-bluez-external.diff
 unowinreg-static-libgcc.diff
 pdfium-m68k.diff
+apparmor-updates.diff

unblock libreoffice/1:7.0.4-4

Regards,

Rene


Reply to: