[Pkg-roundcube-maintainers] Bug#988701: unblock: roundcube/1.4.11+dfsg.1-4

Guilhem Moulin guilhem at debian.org
Tue May 18 12:52:36 BST 2021


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

Dear Release Team,

Please unblock package roundcube/1.4.11+dfsg.1-4:

[ Reason ]

Roundcube's integration (postinst/postrm auto configuration) with
lighttpd is currently broken in Bullseye.

[ Impact ]

On systems where the lighttpd package is installed and where webserver
autoconfiguration isn't manually disabled via debconf dialog:

  * #988282 installing roundcube breaks the lighttpd configuration if
    another fastcgi handler for .php files (such as fastcgi-php-fpm) is
    already enabled; and
  * #988236 `apt remove --purge roundcube-core` exits with a non-zero
    status.

These bugs have been filed last week but AFAICT Buster is affected as
well so I suppose not many Roundcube users use lighttpd.  Of course
that's not an excuse to ship a broken integration.

[ Tests ]

Manually tested install + remove/purge with a stock lighttpd
configuration and also after manually enabling fastcgi-php-fpm.

[ Risks ]

Quite low given the modified code is guarded and a no-op on systems
where lighttpd is not installed.

[ Checklist ]

  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing

unblock roundcube/1.4.11+dfsg.1-4

-- 
Guilhem.
-------------- next part --------------
diffstat for roundcube-1.4.11+dfsg.1 roundcube-1.4.11+dfsg.1

 changelog               |   10 ++++++++++
 roundcube-core.postinst |   16 +++++++++++++++-
 roundcube-core.postrm   |    2 +-
 uupdate                 |    2 +-
 4 files changed, 27 insertions(+), 3 deletions(-)

diff -Nru roundcube-1.4.11+dfsg.1/debian/changelog roundcube-1.4.11+dfsg.1/debian/changelog
--- roundcube-1.4.11+dfsg.1/debian/changelog	2021-02-26 23:44:31.000000000 +0100
+++ roundcube-1.4.11+dfsg.1/debian/changelog	2021-05-17 20:45:48.000000000 +0200
@@ -1,3 +1,13 @@
+roundcube (1.4.11+dfsg.1-4) unstable; urgency=medium
+
+  * d/roundcube-core.postinst: Remove the roundcube lighttpd module after it
+    has been disabled, not before (closes: #988282).
+  * d/roundcube-core.postinst: lighttpd: Don't enable fastcgi-php if there is
+    already an enabled fastcgi .php handler (closes: #988236).
+  * d/uupdate: Fix comment.
+
+ -- Guilhem Moulin <guilhem at debian.org>  Mon, 17 May 2021 20:45:48 +0200
+
 roundcube (1.4.11+dfsg.1-3) unstable; urgency=medium
 
   * Remove versioned dependency (php* <<8.0) as it prevents users from
diff -Nru roundcube-1.4.11+dfsg.1/debian/roundcube-core.postinst roundcube-1.4.11+dfsg.1/debian/roundcube-core.postinst
--- roundcube-1.4.11+dfsg.1/debian/roundcube-core.postinst	2021-02-26 23:44:31.000000000 +0100
+++ roundcube-1.4.11+dfsg.1/debian/roundcube-core.postinst	2021-05-17 20:45:48.000000000 +0200
@@ -34,14 +34,28 @@
 }
 
 lighttpd_install() {
+    local has_fastcgi_php="n" m
     if [ -d /etc/lighttpd/conf-available ] && [ ! -f /etc/lighttpd/conf-available/50-roundcube.conf ] ; then
         if pathfind lighty-enable-mod; then
             ln -s /etc/roundcube/lighttpd.conf /etc/lighttpd/conf-available/50-roundcube.conf
-            if ! { lighty-enable-mod roundcube fastcgi fastcgi-php || [ $? -eq 2 ]; } then
+            # check if a fastcgi .php handler is enabled already
+            # (lighttpd complains if more than one is enabled, see #988236)
+            for m in /etc/lighttpd/conf-enabled/*-fastcgi-php.conf /etc/lighttpd/conf-enabled/*-fastcgi-php-*.conf; do
+                if [ -f "$m" ]; then
+                    has_fastcgi_php="y"
+                    break
+                fi
+            done
+            # exit status 2 denotes a minor flaw (e.g., a module was not enabled because it was already loaded before)
+            if [ "$has_fastcgi_php" = "n" ] && ! { lighty-enable-mod fastcgi fastcgi-php || [ $? -eq 2 ]; } then
+                return 1
+            fi
+            if ! { lighty-enable-mod roundcube || [ $? -eq 2 ]; } then
                 return 1
             fi
         fi
     fi
+    return 0
 }
 
 [ ! -e /usr/share/apache2/apache2-maintscript-helper ] || \
diff -Nru roundcube-1.4.11+dfsg.1/debian/roundcube-core.postrm roundcube-1.4.11+dfsg.1/debian/roundcube-core.postrm
--- roundcube-1.4.11+dfsg.1/debian/roundcube-core.postrm	2021-02-26 23:44:31.000000000 +0100
+++ roundcube-1.4.11+dfsg.1/debian/roundcube-core.postrm	2021-05-17 20:45:48.000000000 +0200
@@ -28,10 +28,10 @@
 
 lighttpd_remove() {
     if [ -h /etc/lighttpd/conf-available/50-roundcube.conf ]; then
-        rm -f /etc/lighttpd/conf-available/50-roundcube.conf
         if pathfind lighty-disable-mod; then
             lighty-disable-mod roundcube
         fi
+        rm -f /etc/lighttpd/conf-available/50-roundcube.conf
     fi
 }
 
diff -Nru roundcube-1.4.11+dfsg.1/debian/uupdate roundcube-1.4.11+dfsg.1/debian/uupdate
--- roundcube-1.4.11+dfsg.1/debian/uupdate	2021-02-26 23:44:31.000000000 +0100
+++ roundcube-1.4.11+dfsg.1/debian/uupdate	2021-05-17 20:45:48.000000000 +0200
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #----------------------------------------------------------------------
-# Custom script for version 3 watch files (see "HISTORY AND UPGRADING"
+# Custom script for version 4 watch files (see "HISTORY AND UPGRADING"
 # section of the uscan(1) manual).  This downloads the TinyMCE tarballs
 # as secondary upstream tarballs and repacks according to d/copyright's
 # Files-Excluded-component.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-roundcube-maintainers/attachments/20210518/f958409a/attachment.sig>


More information about the Pkg-roundcube-maintainers mailing list