After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 782410 - XMLRPC tests get skipped when PHP extension is present but not loaded
XMLRPC tests get skipped when PHP extension is present but not loaded
Status: RESOLVED FIXED
Product: libsoup
Classification: Core
Component: Misc
2.58.x
Other Linux
: Normal normal
: ---
Assigned To: libsoup-maint@gnome.bugs
libsoup-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2017-05-09 21:05 UTC by Jan Alexander Steffens (heftig)
Modified: 2018-04-17 08:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] Configure PHP to load the XMLRPC extension if present (3.23 KB, patch)
2017-05-09 21:05 UTC, Jan Alexander Steffens (heftig)
none Details | Review
meson: Unbreak VAPI generation (990 bytes, patch)
2018-04-13 20:24 UTC, Jan Alexander Steffens (heftig)
rejected Details | Review
meson: Don't install soup-tests resources (1.74 KB, patch)
2018-04-13 20:24 UTC, Jan Alexander Steffens (heftig)
committed Details | Review
meson: Move HAVE_CONFIG_H define to global args (1.88 KB, patch)
2018-04-13 20:24 UTC, Jan Alexander Steffens (heftig)
committed Details | Review
meson: Unbreak PHP XMLRPC existence check (1.01 KB, patch)
2018-04-13 20:25 UTC, Jan Alexander Steffens (heftig)
none Details | Review
tests: Adjust apache_cmd to better match Makefile.am (2.25 KB, patch)
2018-04-13 20:25 UTC, Jan Alexander Steffens (heftig)
none Details | Review
tests: Configure PHP to load the XMLRPC extension if present (5.01 KB, patch)
2018-04-13 20:25 UTC, Jan Alexander Steffens (heftig)
none Details | Review
meson: Unbreak build of pull-api-test (1.49 KB, patch)
2018-04-16 18:08 UTC, Jan Alexander Steffens (heftig)
committed Details | Review
build: Check php-xmlrpc in a more robust way (1.79 KB, patch)
2018-04-16 18:09 UTC, Jan Alexander Steffens (heftig)
committed Details | Review
tests: Configure PHP to load the XMLRPC extension if present (5.00 KB, patch)
2018-04-16 18:09 UTC, Jan Alexander Steffens (heftig)
none Details | Review
tests: Configure PHP to load the XMLRPC extension if present (4.90 KB, patch)
2018-04-17 08:44 UTC, Jan Alexander Steffens (heftig)
committed Details | Review

Description Jan Alexander Steffens (heftig) 2017-05-09 21:05:18 UTC
Created attachment 351482 [details] [review]
[PATCH] Configure PHP to load the XMLRPC extension if present

The attached patch configures PHP to load the XMLRPC extension if present. This is needed when the system PHP configuration does not already load the extension.
Comment 1 Jan Alexander Steffens (heftig) 2017-10-19 11:28:56 UTC
Ping? I humbly request a review.
Comment 2 Jan Alexander Steffens (heftig) 2018-04-09 19:47:42 UTC
Ping? I humbly request a review.
Comment 3 Claudio Saavedra 2018-04-13 15:23:26 UTC
We're currently in the process of moving to Meson. Is there any chance that you could make sure that with Meson this is also handled properly? Autotools are going away soon.
Comment 4 Jan Alexander Steffens (heftig) 2018-04-13 20:24:34 UTC
Created attachment 370904 [details] [review]
meson: Unbreak VAPI generation

It referenced a nonexistent variable.
Comment 5 Jan Alexander Steffens (heftig) 2018-04-13 20:24:48 UTC
Created attachment 370905 [details] [review]
meson: Don't install soup-tests resources

This was installed into the builddir on 'ninja install', especially
noticable if DESTDIR was set for packaging.
Comment 6 Jan Alexander Steffens (heftig) 2018-04-13 20:24:56 UTC
Created attachment 370906 [details] [review]
meson: Move HAVE_CONFIG_H define to global args

Resolves missing config in examples and tests.
Comment 7 Jan Alexander Steffens (heftig) 2018-04-13 20:25:07 UTC
Created attachment 370907 [details] [review]
meson: Unbreak PHP XMLRPC existence check

If the function is missing, the command will succeed but contain "does
not exist".
Comment 8 Jan Alexander Steffens (heftig) 2018-04-13 20:25:16 UTC
Created attachment 370908 [details] [review]
tests: Adjust apache_cmd to better match Makefile.am

Unbreaks httpd launching in meson.
Comment 9 Jan Alexander Steffens (heftig) 2018-04-13 20:25:29 UTC
Created attachment 370909 [details] [review]
tests: Configure PHP to load the XMLRPC extension if present

This is needed when the system PHP configuration does not already load
the extension.
Comment 10 Jan Alexander Steffens (heftig) 2018-04-13 20:26:25 UTC
Here. Unfortunately, I had to touch a lot of other stuff to get the meson build into an acceptable state.
Comment 11 Claudio Saavedra 2018-04-14 07:00:37 UTC
Tomáš, could you review this?
Comment 12 Tomas Popela 2018-04-16 05:06:53 UTC
Review of attachment 370904 [details] [review]:

This was already reviewed in https://bugzilla.gnome.org/review?bug=795233&attachment=370888 and will be committed soon.
Comment 13 Tomas Popela 2018-04-16 05:09:13 UTC
Review of attachment 370905 [details] [review]:

Makes sense..
Comment 14 Tomas Popela 2018-04-16 05:10:29 UTC
Review of attachment 370906 [details] [review]:

Good catch!
Comment 15 Tomas Popela 2018-04-16 05:13:52 UTC
Review of attachment 370907 [details] [review]:

::: meson.build
@@ +144,3 @@
     have_php = true
     php_xmlrpc = run_command(php, '--rf', 'xmlrpc_server_create')
+    if php_xmlrpc.returncode() == 0 and not php_xmlrpc.stdout().contains('does not exist')

How will this work when the locale won't be set to en_*? It's strange that it's returning 0, but it actually failed.
Comment 16 Tomas Popela 2018-04-16 05:27:02 UTC
Review of attachment 370908 [details] [review]:

Apache is starting fine for me (when using 'ninja test'). What exact error do you see?
Comment 17 Tomas Popela 2018-04-16 05:30:06 UTC
Review of attachment 370909 [details] [review]:

I'm not an Apache expert, but the change looks sane.
Comment 18 Tomas Popela 2018-04-16 05:30:35 UTC
Review of attachment 370906 [details] [review]:

Good catch!
Comment 19 Jan Alexander Steffens (heftig) 2018-04-16 18:06:08 UTC
(In reply to Tomas Popela from comment #16)
>Apache is starting fine for me (when using 'ninja test'). What exact error do you see?

I'm not sure. The tests seem to be fine without this patch now. 
Comment 20 Jan Alexander Steffens (heftig) 2018-04-16 18:08:22 UTC
Created attachment 370997 [details] [review]
meson: Unbreak build of pull-api-test

The #if HAVE_APACHE checks caused compiler errors after HAVE_APACHE was
turned into an empty macro. Unbreak by replacing #if with #ifdef.
Comment 21 Jan Alexander Steffens (heftig) 2018-04-16 18:09:15 UTC
Created attachment 370998 [details] [review]
build: Check php-xmlrpc in a more robust way

The old way was dependent on parsing PHP's output, which might depend on
the locale (but does not seem to at this time).

The check was completely broken in meson, which was missing the output
parsing.
Comment 22 Jan Alexander Steffens (heftig) 2018-04-16 18:09:54 UTC
Created attachment 370999 [details] [review]
tests: Configure PHP to load the XMLRPC extension if present

This is needed when the system PHP configuration does not already load
the extension.
Comment 23 Tomas Popela 2018-04-17 04:45:16 UTC
Review of attachment 370997 [details] [review]:

LGTM
Comment 24 Tomas Popela 2018-04-17 04:46:16 UTC
Review of attachment 370998 [details] [review]:

This is a way better! Thanks!
Comment 25 Tomas Popela 2018-04-17 04:49:36 UTC
Review of attachment 370999 [details] [review]:

As I already said, I'm not an Apache expert, but the change looks sane to me.
Comment 26 Jan Alexander Steffens (heftig) 2018-04-17 08:44:04 UTC
Created attachment 371018 [details] [review]
tests: Configure PHP to load the XMLRPC extension if present

This is needed when the system PHP configuration does not already load
the extension.
Comment 27 Tomas Popela 2018-04-17 08:48:49 UTC
Review of attachment 371018 [details] [review]:

LGTM (thank you for rebase)
Comment 28 Tomas Popela 2018-04-17 08:50:13 UTC
Attachment 370905 [details] pushed as bc489c3 - meson: Don't install soup-tests resources
Attachment 370906 [details] pushed as b03ff4e - meson: Move HAVE_CONFIG_H define to global args
Attachment 370997 [details] pushed as fed0e93 - meson: Unbreak build of pull-api-test
Attachment 370998 [details] pushed as 4d9a148 - build: Check php-xmlrpc in a more robust way
Attachment 371018 [details] pushed as 6d28d98 - tests: Configure PHP to load the XMLRPC extension if present