Bug#952895: php7.3-fpm: Can't install/upgrade on system with elogind (forced init switch)

Lorenzo Puliti lorenzo.ru.g at gmail.com
Sun Mar 1 15:48:47 GMT 2020


Package: php7.3-fpm
Version: 7.3.15-4
Severity: normal
Tags: patch

Dear Maintainer,

with commit ccbb813a4268e79c8bb2ef24f468eec23b53e73a is no longer possible
to install php7.3-fmp package with alternative inits when elogind is installed.
For example for me it forces removal of elogind and switch to systemd (from runit-init):

# apt-get install php7.3-fpm
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  daemon libapache2-mod-php7.3 libnss-systemd libpam-systemd libsystemd0 php7.3-cgi php7.3-cli php7.3-common
  php7.3-curl php7.3-gd php7.3-intl php7.3-json php7.3-mbstring php7.3-mysql php7.3-opcache php7.3-readline
  php7.3-soap php7.3-sqlite3 php7.3-xml php7.3-xmlrpc systemd systemd-sysv
Suggested packages:
  php-pear systemd-container
The following packages will be REMOVED:
  elogind elogind-run libelogind-dev libelogind0 libpam-elogind libpam-elogind-compat runit-init
The following NEW packages will be installed:
  daemon libnss-systemd libpam-systemd libsystemd0 systemd systemd-sysv
The following packages will be upgraded:
  libapache2-mod-php7.3 php7.3-cgi php7.3-cli php7.3-common php7.3-curl php7.3-fpm php7.3-gd php7.3-intl
  php7.3-json php7.3-mbstring php7.3-mysql php7.3-opcache php7.3-readline php7.3-soap php7.3-sqlite3 php7.3-xml
  php7.3-xmlrpc
17 upgraded, 6 newly installed, 7 to remove and 22 not upgraded.
Need to get 12.6 MB of archives.
After this operation, 13.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

Please consider to add support for alternative inits using opentmpfiles.
Note also that opentmpfiles will work on non-linux ports so this patch 
will probably help with #951803 too.
Patch is attached, I can make a MR on salsa if you prefer

Best Regards,
Lorenzo

-- Package-specific info:
==== Additional PHP 7.3 information ====

++++ PHP 7.3 SAPI (php7.3query -S): ++++

++++ PHP 7.3 Extensions (php7.3query -M -v): ++++

++++ Configuration files: ++++
[PHP]
engine = On
short_open_tag = Off
precision = 14
output_buffering = 4096
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
serialize_precision = -1
disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
disable_classes =
zend.enable_gc = On
expose_php = Off
max_execution_time = 30
max_input_time = 60
memory_limit = 128M
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
display_errors = Off
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
html_errors = On
variables_order = "GPCS"
request_order = "GP"
register_argc_argv = Off
auto_globals_jit = On
post_max_size = 8M
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
default_charset = "UTF-8"
doc_root =
user_dir =
enable_dl = Off
file_uploads = On
upload_max_filesize = 2M
max_file_uploads = 20
allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 60
[CLI Server]
cli_server.color = On
[Date]
[filter]
[iconv]
[imap]
[intl]
[sqlite3]
[Pcre]
[Pdo]
[Pdo_mysql]
pdo_mysql.default_socket=
[Phar]
[mail function]
SMTP = localhost
smtp_port = 25
mail.add_x_header = Off
[ODBC]
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1
[Interbase]
ibase.allow_persistent = 1
ibase.max_persistent = -1
ibase.max_links = -1
ibase.timestampformat = "%Y-%m-%d %H:%M:%S"
ibase.dateformat = "%Y-%m-%d"
ibase.timeformat = "%H:%M:%S"
[MySQLi]
mysqli.max_persistent = -1
mysqli.allow_persistent = On
mysqli.max_links = -1
mysqli.default_port = 3306
mysqli.default_socket =
mysqli.default_host =
mysqli.default_user =
mysqli.default_pw =
mysqli.reconnect = Off
[mysqlnd]
mysqlnd.collect_statistics = On
mysqlnd.collect_memory_statistics = Off
[OCI8]
[PostgreSQL]
pgsql.allow_persistent = On
pgsql.auto_reset_persistent = Off
pgsql.max_persistent = -1
pgsql.max_links = -1
pgsql.ignore_notice = 0
pgsql.log_notice = 0
[bcmath]
bcmath.scale = 0
[browscap]
[Session]
session.save_handler = files
session.use_strict_mode = 0
session.use_cookies = 1
session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly =
session.cookie_samesite =
session.serialize_handler = php
session.gc_probability = 0
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.referer_check =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.sid_length = 26
session.trans_sid_tags = "a=href,area=href,frame=src,form="
session.sid_bits_per_character = 5
[Assertion]
zend.assertions = -1
[COM]
[mbstring]
[gd]
[exif]
[Tidy]
tidy.clean_output = Off
[soap]
soap.wsdl_cache_enabled=1
soap.wsdl_cache_dir="/tmp"
soap.wsdl_cache_ttl=86400
soap.wsdl_cache_limit = 5
[sysvshm]
[ldap]
ldap.max_links = -1
[dba]
[opcache]
[curl]
[openssl]

**** /etc/php/7.3/fpm/conf.d/20-mbstring.ini ****
extension=mbstring.so

**** /etc/php/7.3/fpm/conf.d/10-pdo.ini ****
extension=pdo.so

**** /etc/php/7.3/fpm/conf.d/20-sysvsem.ini ****
extension=sysvsem.so

**** /etc/php/7.3/fpm/conf.d/20-apcu.ini ****
extension=apcu.so

**** /etc/php/7.3/fpm/conf.d/20-curl.ini ****
extension=curl.so

**** /etc/php/7.3/fpm/conf.d/20-pdo_mysql.ini ****
extension=pdo_mysql.so

**** /etc/php/7.3/fpm/conf.d/20-posix.ini ****
extension=posix.so

**** /etc/php/7.3/fpm/conf.d/20-readline.ini ****
extension=readline.so

**** /etc/php/7.3/fpm/conf.d/20-ftp.ini ****
extension=ftp.so

**** /etc/php/7.3/fpm/conf.d/20-pdo_sqlite.ini ****
extension=pdo_sqlite.so

**** /etc/php/7.3/fpm/conf.d/20-calendar.ini ****
extension=calendar.so

**** /etc/php/7.3/fpm/conf.d/20-iconv.ini ****
extension=iconv.so

**** /etc/php/7.3/fpm/conf.d/20-gd.ini ****
extension=gd.so

**** /etc/php/7.3/fpm/conf.d/20-gettext.ini ****
extension=gettext.so

**** /etc/php/7.3/fpm/conf.d/20-dom.ini ****
extension=dom.so

**** /etc/php/7.3/fpm/conf.d/20-fileinfo.ini ****
extension=fileinfo.so

**** /etc/php/7.3/fpm/conf.d/20-phar.ini ****
extension=phar.so

**** /etc/php/7.3/fpm/conf.d/15-xml.ini ****
extension=xml.so

**** /etc/php/7.3/fpm/conf.d/20-wddx.ini ****
extension=wddx.so

**** /etc/php/7.3/fpm/conf.d/20-sqlite3.ini ****
extension=sqlite3.so

**** /etc/php/7.3/fpm/conf.d/25-apcu_bc.ini ****
extension=apc.so

**** /etc/php/7.3/fpm/conf.d/20-exif.ini ****
extension=exif.so

**** /etc/php/7.3/fpm/conf.d/10-mysqlnd.ini ****
extension=mysqlnd.so

**** /etc/php/7.3/fpm/conf.d/20-tokenizer.ini ****
extension=tokenizer.so

**** /etc/php/7.3/fpm/conf.d/20-sockets.ini ****
extension=sockets.so

**** /etc/php/7.3/fpm/conf.d/20-shmop.ini ****
extension=shmop.so

**** /etc/php/7.3/fpm/conf.d/20-sysvmsg.ini ****
extension=sysvmsg.so

**** /etc/php/7.3/fpm/conf.d/20-json.ini ****
extension=json.so

**** /etc/php/7.3/fpm/conf.d/20-intl.ini ****
extension=intl.so

**** /etc/php/7.3/fpm/conf.d/20-soap.ini ****
extension=soap.so

**** /etc/php/7.3/fpm/conf.d/20-xmlwriter.ini ****
extension=xmlwriter.so

**** /etc/php/7.3/fpm/conf.d/20-xmlreader.ini ****
extension=xmlreader.so

**** /etc/php/7.3/fpm/conf.d/20-mysqli.ini ****
extension=mysqli.so

**** /etc/php/7.3/fpm/conf.d/20-simplexml.ini ****
extension=simplexml.so

**** /etc/php/7.3/fpm/conf.d/20-wikidiff2.ini ****
extension=wikidiff2.so

**** /etc/php/7.3/fpm/conf.d/20-sysvshm.ini ****
extension=sysvshm.so

**** /etc/php/7.3/fpm/conf.d/20-ctype.ini ****
extension=ctype.so

**** /etc/php/7.3/fpm/conf.d/20-xmlrpc.ini ****
extension=xmlrpc.so

**** /etc/php/7.3/fpm/conf.d/20-xsl.ini ****
extension=xsl.so

**** /etc/php/7.3/fpm/conf.d/10-opcache.ini ****
zend_extension=opcache.so


-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.3.0-2-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: runit (via /run/runit.stopit)

Versions of packages php7.3-fpm depends on:
ii  libapparmor1               2.13.3-7
ii  libargon2-1                0~20171227-0.2
ii  libc6                      2.29-10
ii  libelogind0 [libsystemd0]  241.3-1+debian3
ii  libmagic1                  1:5.38-4
ii  libpcre2-8-0               10.34-7
ii  libsodium23                1.0.18-1
ii  libssl1.1                  1.1.1d-2
ii  libxml2                    2.9.10+dfsg-4
ii  mime-support               3.64
ii  opentmpfiles               0.2+2019.05.21.git.44a55796ba-2
ii  php7.3-cli                 7.3.15-4
ii  php7.3-common              7.3.15-4
ii  php7.3-json                7.3.15-4
ii  php7.3-opcache             7.3.15-4
ii  tzdata                     2019c-3
ii  ucf                        3.0038+nmu1
ii  zlib1g                     1:1.2.11.dfsg-2

php7.3-fpm recommends no packages.

Versions of packages php7.3-fpm suggests:
pn  php-pear  <none>

Versions of packages php7.3-common depends on:
ii  libc6       2.29-10
ii  libssl1.1   1.1.1d-2
ii  php-common  2:73
ii  ucf         3.0038+nmu1

-- no debconf information
-------------- next part --------------
>From b2640ce984287a7a8a4dd102c87f7764fbd72565 Mon Sep 17 00:00:00 2001
From: Lorenzo Puliti <lorenzo.ru.g at gmail.com>
Date: Sun, 1 Mar 2020 13:41:37 +0100
Subject: [PATCH] Support alternative inits with opentmpfiles

Use opentmpfiles when systemd-tmpfiles is not available, so that
php-fpm package doesn't force init sitch on systems where also
elogind is installed.
---
 debian/control.in   | 2 +-
 debian/php-fpm.init | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/debian/control.in b/debian/control.in
index 404c7ebf8..e09022984 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -237,7 +237,7 @@ Depends: libmagic1,
          php at PHP_VERSION@-common (= ${binary:Version}),
          php at PHP_VERSION@-json,
          php at PHP_VERSION@-opcache,
-         systemd,
+         systemd | opentmpfiles,
          tzdata,
          ucf,
          ${misc:Depends},
diff --git a/debian/php-fpm.init b/debian/php-fpm.init
index 865376e58..b74b5a771 100644
--- a/debian/php-fpm.init
+++ b/debian/php-fpm.init
@@ -96,7 +96,11 @@ do_reload() {
 case "$1" in
     start)
 	[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
-	systemd-tmpfiles --remove --create /usr/lib/tmpfiles.d/php at PHP_VERSION@-fpm.conf
+	if [ -e /bin/systemd-tmpfiles ]; then
+		systemd-tmpfiles --remove --create /usr/lib/tmpfiles.d/php at PHP_VERSION@-fpm.conf
+	else
+		opentmpfiles-tmpfiles --remove --create /usr/lib/tmpfiles.d/php at PHP_VERSION@-fpm.conf
+	fi
 	case "$?" in
 	    0)
 		do_start
-- 
2.25.1



More information about the Debian-init-diversity mailing list