Merge ~kstenerud/ubuntu/+source/php7.3:disco-php7.3-pcre3-1806710 into ubuntu/+source/php7.3:ubuntu/devel

Proposed by Karl Stenerud
Status: Rejected
Rejected by: Robie Basak
Proposed branch: ~kstenerud/ubuntu/+source/php7.3:disco-php7.3-pcre3-1806710
Merge into: ubuntu/+source/php7.3:ubuntu/devel
Diff against target: 129 lines (+48/-1)
4 files modified
debian/changelog (+8/-0)
debian/control.in (+8/-1)
debian/tests.in/pcre (+16/-0)
debian/tests/pcre (+16/-0)
Reviewer Review Type Date Requested Status
Canonical Server Core Reviewers Pending
Canonical Server Pending
Review via email: mp+360125@code.launchpad.net

Description of the change

  * d/control.in: Reverted dependency on pcre2, temporarily depending on pcre3,
    to avoid pulling pcre2 into main (LP: #1806710)
  * d/tests.in/pcre, d/tests/pcre: Added regex smoke test for pcre3

PPA: https://launchpad.net/~kstenerud/+archive/ubuntu/disco-php7.3-pcre3-2-1806710

Steps to test:

lxc launch ubuntu-daily:disco tester && lxc exec tester bash
apt-add-repository -y ppa:kstenerud/disco-php7.3-pcre3-2-1806710 && \
apt update && apt dist-upgrade -y && \
apt install -y php7.3 &&
echo "echo preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', 'http://example.com/path');" | php -a

This should print "1"

Package Tests:

autopkgtest [14:41:20]: test fpm: -----------------------]
fpm PASS
autopkgtest [14:41:21]: test fpm: - - - - - - - - - - results - - - - - - - - - -
autopkgtest [14:41:21]: @@@@@@@@@@@@@@@@@@@@ summary
cli PASS
cgi PASS
mod-php PASS
fpm PASS

To post a comment you must log in.
Revision history for this message
Robie Basak (racb) wrote :

Looks good, thanks! Comments inline.

Also, do we need to regenerate tests/ from tests.in/ before upload? I assume we do need to do this, because the source previously contains a generated tests/ that matches tests.in/, and now it won't.

Revision history for this message
Robie Basak (racb) wrote :

Also control needs regenerating from control.in please.

acc991b... by Karl Stenerud

  * d/control.in: Reverted dependency on pcre2, temporarily depending on pcre3,
    to avoid pulling pcre2 into main (LP: #1806710)

0cb9be6... by Karl Stenerud

  * d/tests.in/pcre, d/tests/pcre: Added regex smoke test for pcre3

52865d5... by Karl Stenerud

changelog

Revision history for this message
Nish Aravamudan (nacc) wrote :

Based upon the diff below, you are b-d upon both libpcre2-dev and libpcre3-dev. I don't think that's correct.

Also, most of the binary packages should not depend on -dev but the correct libpcre3 package, which should not be necessary to add explictily to each (it'll come from shlibs, I think). Only the replacement you have for php7.3-dev (which lists libpcre2-dev explicitly) is needed.

Also, as a sanity test, it's probably best to show the binary package dependencies in a comment here when you update the MP to prove no rev-dep on pcre2 is left.

Revision history for this message
Robie Basak (racb) wrote :

We've cancelled attempting to make PHP work against pcre3 again. The upstream commits seem too extensive and spread out for us to realistically cherry-pick reverts from them.

Unmerged commits

52865d5... by Karl Stenerud

changelog

0cb9be6... by Karl Stenerud

  * d/tests.in/pcre, d/tests/pcre: Added regex smoke test for pcre3

acc991b... by Karl Stenerud

  * d/control.in: Reverted dependency on pcre2, temporarily depending on pcre3,
    to avoid pulling pcre2 into main (LP: #1806710)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index fe00365..f1d4ece 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+php7.3 (7.3.0~rc5-2ubuntu1) disco; urgency=medium
7+
8+ * d/control.in: Reverted dependency on pcre2, temporarily depending on pcre3,
9+ to avoid pulling pcre2 into main (LP: #1806710)
10+ * d/tests.in/pcre, d/tests/pcre: Added regex smoke test for pcre3
11+
12+ -- Karl Stenerud <karl.stenerud@canonical.com> Mon, 04 Dec 2018 10:23:56 +0100
13+
14 php7.3 (7.3.0~rc5-2build1) disco; urgency=medium
15
16 * No-change rebuild against latest libzip
17diff --git a/debian/control.in b/debian/control.in
18index 94ea59d..64c9cc6 100644
19--- a/debian/control.in
20+++ b/debian/control.in
21@@ -45,6 +45,7 @@ Build-Depends: apache2-dev (>= 2.4),
22 libonig-dev,
23 libpam0g-dev,
24 libpcre2-dev (>= 10.30),
25+ libpcre3-dev (>= 2:8.35),
26 libpng-dev,
27 libpq-dev,
28 libpspell-dev,
29@@ -84,6 +85,7 @@ Package: libapache2-mod-php@PHP_VERSION@
30 Section: httpd
31 Architecture: any
32 Depends: libmagic1,
33+ libpcre3-dev (>= 2:8.35),
34 mime-support,
35 php@PHP_VERSION@-cli,
36 php@PHP_VERSION@-common (= ${binary:Version}),
37@@ -111,6 +113,7 @@ Description: server-side, HTML-embedded scripting language (Apache 2 module)
38 Package: libphp@PHP_VERSION@-embed
39 Architecture: any
40 Depends: libmagic1,
41+ libpcre3-dev (>= 2:8.35),
42 mime-support,
43 php@PHP_VERSION@-cli,
44 php@PHP_VERSION@-common (= ${binary:Version}),
45@@ -156,6 +159,7 @@ Description: server-side, HTML-embedded scripting language (metapackage)
46 Package: php@PHP_VERSION@-cgi
47 Architecture: any
48 Depends: libmagic1,
49+ libpcre3-dev (>= 2:8.35),
50 mime-support,
51 php@PHP_VERSION@-cli,
52 php@PHP_VERSION@-common (= ${binary:Version}),
53@@ -183,6 +187,7 @@ Description: server-side, HTML-embedded scripting language (CGI binary)
54 Package: php@PHP_VERSION@-cli
55 Architecture: any
56 Depends: libedit2 (>= 2.11-20080614-4),
57+ libpcre3-dev (>= 2:8.35),
58 libmagic1,
59 mime-support,
60 php@PHP_VERSION@-common (= ${binary:Version}),
61@@ -209,7 +214,7 @@ Description: command-line interpreter for the PHP scripting language
62 Package: php@PHP_VERSION@-dev
63 Depends: autoconf (>= 2.63),
64 automake (>= 1.11),
65- libpcre2-dev (>= 10.30),
66+ libpcre3-dev (>= 2:8.35),
67 libssl-dev,
68 php@PHP_VERSION@-cli (>= ${binary:Version}),
69 php@PHP_VERSION@-common (= ${binary:Version}),
70@@ -232,6 +237,7 @@ Description: Files for PHP@PHP_VERSION@ module development
71 Package: php@PHP_VERSION@-fpm
72 Architecture: any
73 Depends: libmagic1,
74+ libpcre3-dev (>= 2:8.35),
75 mime-support,
76 php@PHP_VERSION@-cli,
77 php@PHP_VERSION@-common (= ${binary:Version}),
78@@ -259,6 +265,7 @@ Description: server-side, HTML-embedded scripting language (FPM-CGI binary)
79 Package: php@PHP_VERSION@-phpdbg
80 Architecture: any
81 Depends: libmagic1,
82+ libpcre3-dev (>= 2:8.35),
83 mime-support,
84 php@PHP_VERSION@-cli,
85 php@PHP_VERSION@-common (= ${binary:Version}),
86diff --git a/debian/tests.in/pcre b/debian/tests.in/pcre
87new file mode 100644
88index 0000000..0ef6351
89--- /dev/null
90+++ b/debian/tests.in/pcre
91@@ -0,0 +1,16 @@
92+#!/bin/sh
93+set -e
94+
95+# Author: Karl Stenerud <karl.stenerud@canonical.com>
96+#
97+# This test ensures that PCRE regular expressions still work
98+# after reverting from pcre2 to pcre3. Once we fully move to
99+# pcre2, this test should no longer be necessary.
100+
101+cd "$ADTTMP"
102+cat > regex.php <<EOT
103+<?php echo preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', 'http://example.com/path'); ?>
104+EOT
105+
106+result=`php@PHP_VERSION@ regex.php`
107+test "$result" = "1"
108diff --git a/debian/tests/pcre b/debian/tests/pcre
109new file mode 100644
110index 0000000..ada1bb3
111--- /dev/null
112+++ b/debian/tests/pcre
113@@ -0,0 +1,16 @@
114+#!/bin/sh
115+set -e
116+
117+# Author: Karl Stenerud <karl.stenerud@canonical.com>
118+#
119+# This test ensures that PCRE regular expressions still work
120+# after reverting from pcre2 to pcre3. Once we fully move to
121+# pcre2, this test should no longer be necessary.
122+
123+cd "$ADTTMP"
124+cat > regex.php <<EOT
125+<?php echo preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', 'http://example.com/path'); ?>
126+EOT
127+
128+result=`php7.3 regex.php`
129+test "$result" = "1"

Subscribers

People subscribed via source and target branches