Merge ~athos-ribeiro/ubuntu/+source/php8.1:lp1882279-lp1772915-php into ubuntu/+source/php8.1:ubuntu/devel

Proposed by Athos Ribeiro
Status: Merged
Merged at revision: 95ac7634581fe0cb019912bc3ad07d45fcc7a1aa
Proposed branch: ~athos-ribeiro/ubuntu/+source/php8.1:lp1882279-lp1772915-php
Merge into: ubuntu/+source/php8.1:ubuntu/devel
Diff against target: 101 lines (+51/-0)
4 files modified
debian/changelog (+8/-0)
debian/patches/0046-Update-gcc-func-attr-macro.patch (+29/-0)
debian/patches/series (+1/-0)
debian/rules (+13/-0)
Reviewer Review Type Date Requested Status
Bryce Harrington (community) Approve
Canonical Server Pending
Review via email: mp+421591@code.launchpad.net

Description of the change

This MP contains the fixes for both LP: #1772915 and LP: #1882279.

A PPA with the proposed changes is available at

https://launchpad.net/~athos-ribeiro/+archive/ubuntu/lp1882279-lp1772915-php/+packages

I ran the autopkgtest suite locally. This is the result summary:

autopkgtest [10:59:23]: @@@@@@@@@@@@@@@@@@@@ summary
cli PASS
cgi PASS
mod-php PASS
fpm PASS

To post a comment you must log in.
Revision history for this message
Bryce Harrington (bryce) wrote :

Wow, great debugging work on this. Rather crazy that warning messages caused a performance regression.

I've reviewed the upstream bugs including the forwarded PRs and upstream's response. It looks like the grep for -Wattributes follows what was done in autoconf at http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=commitdiff;h=df0894ad1a8195df67a52108b931e07d708cec9a.

I've not reproduced the problem + fix, but did check rebuilding locally is fine, and triggered autopkgtests against the ppa:

  lp-test-ppa -r kinetic -u ppa:athos-ribeiro/lp1882279-lp1772915-php

Results from https://autopkgtest.ubuntu.com/results/autopkgtest-kinetic-athos-ribeiro-lp1882279-lp1772915-php/?format=plain:
    No results published yet
Running:
    time pkg release arch ppa trigger
    0:10:00 php8.1 kinetic armhf athos-ribeiro/lp1882279-lp1772915-php php8.1/8.1.2-1ubuntu4~ppa1
    0:14:01 php8.1 kinetic arm64 athos-ribeiro/lp1882279-lp1772915-php php8.1/8.1.2-1ubuntu4~ppa1
    0:14:01 php8.1 kinetic amd64 athos-ribeiro/lp1882279-lp1772915-php php8.1/8.1.2-1ubuntu4~ppa1
    0:15:21 php8.1 kinetic s390x athos-ribeiro/lp1882279-lp1772915-php php8.1/8.1.2-1ubuntu4~ppa1
    0:16:21 php8.1 kinetic ppc64el athos-ribeiro/lp1882279-lp1772915-php php8.1/8.1.2-1ubuntu4~ppa1
Waiting:

Assuming no failures from the test, this all LGTM, +1

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

Thanks, Bryce!

I will need sponsorship for this one since my request at

https://lists.ubuntu.com/archives/devel-permissions/2022-May/001962.html

was not processed yet :)

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

Actually, Robie just updated the packageset (thanks, Robie), so I can upload this one myself (and test the new permissions as well).

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

Uploaded

$ dput ubuntu ../php8.1_8.1.2-1ubuntu4_source.changes
D: Setting host argument.
Checking signature on .changes
gpg: ../php8.1_8.1.2-1ubuntu4_source.changes: Valid signature from 033C4CA276024834
Checking signature on .dsc
gpg: ../php8.1_8.1.2-1ubuntu4.dsc: Valid signature from 033C4CA276024834
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading php8.1_8.1.2-1ubuntu4.dsc: done.
  Uploading php8.1_8.1.2-1ubuntu4.debian.tar.xz: done.
  Uploading php8.1_8.1.2-1ubuntu4_source.buildinfo: done.
  Uploading php8.1_8.1.2-1ubuntu4_source.changes: done.
Successfully uploaded packages.

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 7c1f1b8..e4bd36c 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+php8.1 (8.1.2-1ubuntu4) kinetic; urgency=medium
7+
8+ * d/p/0046-Update-gcc-func-attr-macro.patch: fix detection of unknown gcc
9+ function attributes. (LP: #1882279)
10+ * d/rules: document garbage collection in ini files. (LP: #1772915)
11+
12+ -- Athos Ribeiro <athos.ribeiro@canonical.com> Mon, 02 May 2022 19:54:49 -0300
13+
14 php8.1 (8.1.2-1ubuntu3) kinetic; urgency=medium
15
16 * No-change rebuild against libicu71
17diff --git a/debian/patches/0046-Update-gcc-func-attr-macro.patch b/debian/patches/0046-Update-gcc-func-attr-macro.patch
18new file mode 100644
19index 0000000..cb8ea57
20--- /dev/null
21+++ b/debian/patches/0046-Update-gcc-func-attr-macro.patch
22@@ -0,0 +1,29 @@
23+From df0894ad1a8195df67a52108b931e07d708cec9a Mon Sep 17 00:00:00 2001
24+From: Ming Chen <ming.chen1986@gmail.com>
25+Date: Mon, 2 Mar 2020 09:40:36 +0800
26+Subject: ax_gcc_func_attribute: Revise the detection of unknown attributes
27+
28+GCC outputs a warning when Wstrict-prototypes is on, in such case the
29+attribute detection always fails even if the attribute is actually
30+supported. This change checks for the "-Wattributes" warning in
31+conftest.err instead of the existence of the file.
32+
33+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/php8.1/+bug/1882279
34+Forwarded: https://github.com/php/php-src/pull/8483
35+Origin: http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=commitdiff;h=df0894ad1a8195df67a52108b931e07d708cec9a
36+Last-Update: 2022-05-02
37+---
38+ build/ax_gcc_func_attribute.m4 | 2 +-
39+ 1 file changed, 1 insertion(+), 1 deletion(-)
40+
41+--- a/build/ax_gcc_func_attribute.m4
42++++ b/build/ax_gcc_func_attribute.m4
43+@@ -227,7 +227,7 @@
44+ dnl GCC doesn't exit with an error if an unknown attribute is
45+ dnl provided but only outputs a warning, so accept the attribute
46+ dnl only if no warning were issued.
47+- [AS_IF([test -s conftest.err],
48++ [AS_IF([grep -- -Wattributes conftest.err],
49+ [AS_VAR_SET([ac_var], [no])],
50+ [AS_VAR_SET([ac_var], [yes])])],
51+ [AS_VAR_SET([ac_var], [no])])
52diff --git a/debian/patches/series b/debian/patches/series
53index 08755ab..953d8cf 100644
54--- a/debian/patches/series
55+++ b/debian/patches/series
56@@ -44,3 +44,4 @@
57 0044-Fail-the-build-when-the-dtrace-call-fails.patch
58 0045-Override-result-of-AC_PROG_LN_S-to-fix-FTBFS-on-ppc6.patch
59 CVE-2021-21708.patch
60+0046-Update-gcc-func-attr-macro.patch
61diff --git a/debian/rules b/debian/rules
62index 1b3fc90..036610f 100755
63--- a/debian/rules
64+++ b/debian/rules
65@@ -257,6 +257,16 @@ BUILTIN_EXTENSION_CHECK=$$e=get_loaded_extensions(); natcasesort($$e); \
66 foreach($$e as $$i) { $$s .= " $$i"; } \
67 echo("php:Extensions=" . wordwrap($$s . ".\n", 75, "\$${Newline}"));
68
69+# Document garbage collection procedure
70+define GC_PROBABILITY_DOC
71+; Debian Default Value: 1\n;\
72+This is disabled in the Debian packages due to the strict permissions\n;\
73+on /var/lib/php. Instead, GC is performed through /etc/cron.d/php,\n;\
74+which uses the session.gc_maxlifetime setting. Please, check\n;\
75+/usr/share/doc/$(PHP_COMMON)/README.Debian.gz for further reference.
76+endef
77+export GC_PROBABILITY_DOC
78+
79 include $(CURDIR)/debian/rules.d/*.mk
80
81 #extensions
82@@ -509,6 +519,7 @@ override_dh_install-arch: remove-files-stamp prepare-fpm-pools
83 mkdir -p debian/$(PHP_COMMON)/usr/lib/php/$(PHP_NAME_VERSION)/
84 cat php.ini-production | tr "\t" " " | \
85 $(SED) -e'/session.gc_probability =/ s/1/0/g;' \
86+ -e"/session.gc_probability =/i $${GC_PROBABILITY_DOC}" \
87 -e'/disable_functions =/ s/$$/ $(PCNTL_FUNCTIONS)/g;' \
88 -e'/expose_php =/ s/On/Off/g;' \
89 > debian/$(PHP_COMMON)/usr/lib/php/$(PHP_NAME_VERSION)/php.ini-production
90@@ -516,10 +527,12 @@ override_dh_install-arch: remove-files-stamp prepare-fpm-pools
91 cat php.ini-production | tr "\t" " " | \
92 $(SED) -e'/memory_limit =/ s/128M/-1/g;' \
93 -e'/session.gc_probability =/ s/1/0/g' \
94+ -e"/session.gc_probability =/i $${GC_PROBABILITY_DOC}" \
95 > debian/$(PHP_COMMON)/usr/lib/php/$(PHP_NAME_VERSION)/php.ini-production.cli
96
97 cat php.ini-development | tr "\t" " " | \
98 $(SED) -e'/session.gc_probability =/ s/1/0/g;' \
99+ -e"/session.gc_probability =/i $${GC_PROBABILITY_DOC}" \
100 -e'/disable_functions =/ s/$$/ $(PCNTL_FUNCTIONS)/g;' \
101 > debian/$(PHP_COMMON)/usr/lib/php/$(PHP_NAME_VERSION)/php.ini-development
102

Subscribers

People subscribed via source and target branches