php mailparse module does not work.

Bug #2067365 reported by José Luis Jiménez Fernández
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php-mailparse (Ubuntu)
Fix Released
Undecided
Athos Ribeiro
Noble
Fix Committed
Undecided
Unassigned

Bug Description

[ Impact ]

The package is unusable in noble because the shared object cannot be loaded.

[ Test Plan ]

install the package

$ sudo apt install php-mailparse

and list the compile in modules with

$ php -m

You will get the following warning:

PHP Warning: PHP Startup: Unable to load dynamic library 'mailparse.so' (tried: /usr/lib/php/20230831/mailparse.so (/usr/lib/php/20230831/mailparse.so: undefined symbol: mbfl_name2no_encoding)...

and "mailparse" will not be in the compiled in modules list.

Then, install php-mailparse with the proposed fix and run the command again:

$ php -m

Now, you will not get the warning and "mailparse" will be in the list.

Alternatively, just install php-mailparse and run

$ php -m | grep '^mailparse$'

This command should fail for affected versions of the package.

[ Where problems could occur ]

The fix consists of substituting the mbfl deprecated API calls for the new ones. If any bugs are found in those new implementations, we will need to fix them in php8.3 in noble. Note that, currently, the extension cannot be loaded at all.

[ Other Info ]

I am also including a simple smoketest as a DEP8 test here, which is testing what we described in the test plan above. This is also being included in oracular for completeness. Finally, I will propose to Debian that all php native extensions should perform this smoketest in autopkgtest

[ Original message ]

$ php -m
PHP Warning: PHP Startup: Unable to load dynamic library 'mailparse.so' (tried: /usr/lib/php/20230831/mailparse.so (/usr/lib/php/20230831/mailparse.so: undefined symbol: mbfl_name2no_encoding), /usr/lib/php/20230831/mailparse.so.so (/usr/lib/php/20230831/mailparse.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
....

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: php8.3-mailparse 3.1.4+2.1.7~dev20160128-1ubuntu1
ProcVersionSignature: Ubuntu 6.8.0-31.31-generic 6.8.1
Uname: Linux 6.8.0-31-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.28.1-0ubuntu3
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Tue May 28 11:27:00 2024
InstallationDate: Installed on 2024-05-26 (2 days ago)
InstallationMedia: Ubuntu 24.04 LTS "Noble Numbat" - Release amd64 (20240424)
ProcEnviron:
 LANG=en_US.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
SourcePackage: php-mailparse
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
José Luis Jiménez Fernández (joseluisjimenezfernandez) wrote :
Revision history for this message
Jeff Standen (jstanden) wrote :

PHP removed the `mbfl_name2no_encoding` symbol in this 8.3.0rc1 commit:
https://github.com/php/php-src/commit/a85adb170cf831e742c4be2333c886d054ca738c

Revision history for this message
Jeff Standen (jstanden) wrote :

PHP ext/mailparse also removed the use of `mbfl` in version 3.1.5 (2023-07-27), but Ubuntu 24.04 ships version 3.1.4 (2022-09-15). https://pecl.php.net/package-changelog.php?package=mailparse&release=3.1.5

Revision history for this message
Moses Lecce (mosescan) wrote :

Will this fixed version included in the Ubuntu 24.04.1 release?

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Thanks for reporting this bug. Sorry for the delay to getting to it (thanks, Moses, for calling my attention to this one).

This is the commit we want to pull in: https://github.com/php/pecl-mail-mailparse/commit/a0d99d637281753f62a28842aad716352dc0e5a3

I suppose this is too late for 24.04.1, but this is clearly a bug that makes the package unusable and IMHO there should be no blockers to SRU this shortly.

description: updated
Changed in php-mailparse (Ubuntu):
assignee: nobody → Athos Ribeiro (athos-ribeiro)
Changed in php-mailparse (Ubuntu):
status: New → In Progress
Revision history for this message
Robie Basak (racb) wrote :
Changed in php-mailparse (Ubuntu):
status: In Progress → Fix Released
Changed in php-mailparse (Ubuntu Noble):
status: New → Fix Committed
tags: added: verification-needed verification-needed-noble
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello José, or anyone else affected,

Accepted php-mailparse into noble-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/php-mailparse/3.1.4+2.1.7~dev20160128-1ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-noble to verification-done-noble. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-noble. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Reproducing the bug as per the test plan:

$ lxc launch ubuntu-daily:noble php-mailparse-nn
$ lxc exec php-mailparse-nn -- apt update
$ lxc exec php-mailparse-nn -- apt install php-mailparse
$ lxc exec php-mailparse-nn -- apt install -y php-mailparse
$ lxc exec php-mailparse-nn -- php -m | grep '^mailparse$'
PHP Warning: PHP Startup: Unable to load dynamic library 'mailparse.so' (tried: /usr/lib/php/20230831/mailparse.so (/usr/lib/php/20230831/mailparse.so: undefined symbol: mbfl_name2no_encoding), /usr/lib/php/20230831/mailparse.so.so (/usr/lib/php/20230831/mailparse.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
$ echo $?
1

Verifying the fix with version 3.1.4+2.1.7~dev20160128-1ubuntu1.1 as per the test plan (note that we need to install php8.3-mailparse because just upgrading the unversioned package will not update the versioned one):

$ lxc exec php-mailparse-nn -- sed -i 's/\(noble-backports\)$/\1 noble-proposed/' /etc/apt/sources.list.d/ubuntu.sources
$ lxc exec php-mailparse-nn -- apt update
$ lxc exec php-mailparse-nn -- apt install -y php-mailparse/noble-proposed php8.3-mailparse/noble-proposed
$ lxc exec php-mailparse-nn -- php -m | grep '^mailparse$'
mailparse
$ echo $?
0

As expected.

tags: added: verification-done verification-done-noble
removed: verification-needed verification-needed-noble
Revision history for this message
Moses Lecce (mosescan) wrote :

I can confirm that the problem has been resolved with the version in noble-proposed.

With the previous version of the mailparse library we would get this warning:
PHP Startup: Unable to load dynamic library 'mailparse.so' (tried: /usr/lib/php/20230831/mailparse.so (/usr/lib/php/20230831/mailparse.so: undefined symbol: mbfl_name2no_encoding), /usr/lib/php/20230831/mailparse.so.so (/usr/lib/php/20230831/mailparse.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

With the Version: 3.1.4+2.1.7~dev20160128-1ubuntu1 this is no longer present, and the library works as expected.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.