[pkg-php-pear] Bug#1116936: shaarli: Unnecessary Apache restart during installation/upgrade

Sunil Mohan Adapa sunil at medhas.org
Tue Sep 30 19:50:01 BST 2025


Source: shaarli
Version: 0.14.0+dfsg-2
Severity: normal

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Dear Maintainer,

During the installation of the shaarli package, if the Apache module 'rewrite'
is already enabled, Apache web server should not be restarted. Restarting
Apache web server leads to page load failure if any pages are being currently
loaded. This leads to unexpected failures. This was first seen in FreedomBox
functional tests for Shaarli.

This happens because shaarli (correctly) has a postinst snippet to enable
Apache's mod_rewrite[1]. Originally the Apache postinst helper intended to skip
restarting Apache server if a module is already enabled and enabling it again
is requested. However, due to bug #702929 [2] and its fix[3], Apache is already
restarted when attempting to enable a module.

The Apache debhelper is unlikely to change due to the behaviour needed as
described in the bug. A possible fix could be to check if the module is already
enabled and not call apache_invoke() in shaarli's postinst.


1) https://salsa.debian.org/php-
team/pear/shaarli/-/blob/debian/master/debian/postinst?ref_type=heads#L9-15

2) http://bugs.debian.org/702929

3) https://salsa.debian.org/apache-
team/apache2/-/commit/fe499ed87dd14a5a7f2a6137f7abba81e3c1661c


- -- System Information:
Debian Release: 13.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.12.41+deb13-amd64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-----BEGIN PGP SIGNATURE-----

iQJFBAEBCgAvFiEE5xPDY9ZyWnWupXSBQ+oc/wqnxfIFAmjcJlIRHHN1bmlsQG1l
ZGhhcy5vcmcACgkQQ+oc/wqnxfKFhxAAgAJk0bubJIt4XaKzzW2lDSia72ITT8ua
FOp7+zjNGOf3dqXKXl1kv7gWCPP7dA165vz/d0Xes+lFnIVsOj7bywe9ih3FBDH4
j9S+CxXtN8JSyQPZLyAAGbxapDEPfzN8kARqewV9VnQzbC0/mLT9w3cyHDk81ns3
nfBGYCmYct5AZjuYdI+0RhRKoMAweAbQk44NF+8eytKz9z6qYn+V0IuwUkK0KN9S
2Dh5brgts4HEITeCu3sDNhk3+4M5SX7nmD5hAHoi2IPkH0yla+OMdFBRMpPf+Kdr
md1EuRrEJGMKYctMbMXkGef22VfHf9Jp3G+wzAk4GeiFefDAL00NfCV5rw0jX8yE
tQCO9FaONGZCJPsZDhoIWhvRvtvnfAsl3Njp14XMID7JTo//SvuuuWpfVrtAm39G
Lc/CxxvlU7AZXjR8Ovw5TB+LCW9t/O2T6NG3Gcrk1SgCVt4RWwhOH1V3dJZ8JIYB
zdqxS80Oao9B8jweMypiccv/SJo53ueHdbCHKJrdQoz7Coi31rLDBfZ1hOwreSij
DSbJ+ZPzfkuefC2xHUIsP7YjlOPvM6ONH1KFRnZxDcqXw8JWO9XTJkOSUUW0wUxy
vy0jawq1M5vQUGI7VqaQUgWJGhOP2+fV6rOX+H9xA4HWv4a4HiLFb8H/nlWdM02k
sBp2mwGw9Tc=
=st1I
-----END PGP SIGNATURE-----



More information about the pkg-php-pear mailing list