Merge ~athos-ribeiro/ubuntu/+source/squid:halt-build-on-test-failures-kinetic into ubuntu/+source/squid:applied/ubuntu/kinetic-devel

Proposed by Athos Ribeiro
Status: Superseded
Proposed branch: ~athos-ribeiro/ubuntu/+source/squid:halt-build-on-test-failures-kinetic
Merge into: ubuntu/+source/squid:applied/ubuntu/kinetic-devel
Diff against target: 87 lines (+36/-3)
4 files modified
debian/changelog (+14/-0)
debian/patches/series (+3/-1)
debian/rules (+15/-2)
debian/tests/upstream-test-suite (+4/-0)
Reviewer Review Type Date Requested Status
Bryce Harrington (community) Needs Fixing
Canonical Server Reporter Pending
Review via email: mp+436605@code.launchpad.net

This proposal has been superseded by a proposal from 2023-02-03.

Description of the change

As it is being discussed in [1], squid builds will not halt upon upstream unit test failures during dh_auto_test. This could hinder the squid MRE test plan process [2].

This MP proposes a patch set to force squid builds to fail upon test failures. It also includes additional changes to ensure build time and autopkgtests are also passing for those upstream tests.

This is the kinetic SRU for the change applied in lunar in [3]

[1] https://lists.ubuntu.com/archives/ubuntu-release/2023-January/005522.html
[2] https://wiki.ubuntu.com/SquidUpdates
PPA: https://launchpad.net/~athos-ribeiro/+archive/ubuntu/squid-halt-build-on-test-failures/+packages
[3] https://code.launchpad.net/~athos-ribeiro/ubuntu/+source/squid/+git/squid/+merge/436437

autopkgtest run for the ppa above:

* Results:
  - squid/5.6-1ubuntu4~ppa2
    + ✅ squid on kinetic for amd64 @ 31.01.23 14:52:41 Log️ 🗒️
    + ✅ squid on kinetic for arm64 @ 31.01.23 15:18:39 Log️ 🗒️
    + ❌ squid on kinetic for armhf @ 31.01.23 14:28:20 Log️ 🗒️
      • upstream-test-suite PASS 🟩
      • squid FAIL 🟥
    + ✅ squid on kinetic for ppc64el @ 31.01.23 14:36:17 Log️ 🗒️
    + ✅ squid on kinetic for s390x @ 31.01.23 14:26:15 Log️ 🗒️

Do note that the armhf failure is not a regression: https://autopkgtest.ubuntu.com/packages/s/squid/kinetic/armhf

To post a comment you must log in.
Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Note that I already have

- verified that the s390x LTO change is needed here; and
- tested a build without removing the 0003 patch, which did lead to a build failure due to failing tests, as expected.

Revision history for this message
Bryce Harrington (bryce) wrote :

Should this be targeting the applied branch? Or am I confused?

With this targeting kinetic, should version number be 5.6-1ubuntu3.1?

review: Needs Fixing

Unmerged commits

ef1d7d1... by Athos Ribeiro

Update changelog

a29e530... by Athos Ribeiro

    - d/rules: disable LTO for s390x builds.

77e79bd... by Athos Ribeiro

    - d/t/upstream-test-suite: use installed squid binary for
      autopkgtest config file checks.

8b054a4... by Athos Ribeiro

    - d/rules: do not include additional configuration files during
      build time tests. This would lead to test failures due to missing
      paths.

88d0b52... by Athos Ribeiro

    - d/rules: halt build upon test failures.

2149223... by Athos Ribeiro

    - d/p/series: do not rely on installed binaries for build time tests.

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 9bd5a20..67a6796 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,17 @@
6+squid (5.6-1ubuntu4) kinetic; urgency=medium
7+
8+ * Make builds fail when upstream test suite fails (LP: #2004050):
9+ - d/p/series: do not rely on installed binaries for build time tests.
10+ - d/rules: halt build upon test failures.
11+ - d/rules: do not include additional configuration files during
12+ build time tests. This would lead to test failures due to missing
13+ paths.
14+ - d/t/upstream-test-suite: use installed squid binary for
15+ autopkgtest config file checks.
16+ - d/rules: disable LTO for s390x builds.
17+
18+ -- Athos Ribeiro <athos.ribeiro@canonical.com> Mon, 30 Jan 2023 20:12:50 -0300
19+
20 squid (5.6-1ubuntu3) kinetic; urgency=medium
21
22 * SECURITY UPDATE: Exposure of Sensitive Information in Cache Manager
23diff --git a/debian/patches/series b/debian/patches/series
24index 3c055ad..2184d3e 100644
25--- a/debian/patches/series
26+++ b/debian/patches/series
27@@ -1,6 +1,8 @@
28 0001-Default-configuration-file-for-debian.patch
29 0002-Change-default-file-locations-for-debian.patch
30-0003-installed-binary-for-debian-ci.patch
31+# Do not use installed binary during build time since they are not yet
32+# available. Do not apply the patch below.
33+# 0003-installed-binary-for-debian-ci.patch
34 0005-Use-RuntimeDirectory-to-create-run-squid.patch
35 0006-Fix-build-against-OpenSSL-3-0.patch
36 90-cf.data.ubuntu.patch
37diff --git a/debian/rules b/debian/rules
38index 85d55f3..365a786 100755
39--- a/debian/rules
40+++ b/debian/rules
41@@ -1,6 +1,11 @@
42 #! /usr/bin/make -f
43
44 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
45+
46+ifeq ($(DEB_HOST_ARCH), s390x)
47+ DEB_BUILD_MAINT_OPTIONS += optimize=-lto
48+endif
49+
50 export DEB_CFLAGS_MAINT_APPEND = -Wno-error=deprecated-declarations
51 export DEB_CXXFLAGS_MAINT_APPEND = -Wno-error=deprecated-declarations
52
53@@ -89,9 +94,17 @@ override_dh_auto_build:
54 dh_auto_build
55 cd debian/build-openssl && dh_auto_build
56
57+execute_before_dh_auto_test:
58+ # Do not include additional configuration files during tests. This would lead to failures due to missing paths.
59+ sed -i 's|^\(include /etc/squid/conf\.d/\*\.conf\)|# \1|' src/squid.conf.default debian/build-openssl/src/squid.conf.default
60+
61 override_dh_auto_test:
62- -dh_auto_test
63- -cd debian/build-openssl && dh_auto_test
64+ dh_auto_test
65+ cd debian/build-openssl && dh_auto_test
66+
67+execute_after_dh_auto_test:
68+ # Restore configuration file to its previous state.
69+ sed -i 's|^# \(include /etc/squid/conf\.d/\*\.conf\)|\1|' src/squid.conf.default debian/build-openssl/src/squid.conf.default
70
71 override_dh_auto_install:
72 dh_auto_install
73diff --git a/debian/tests/upstream-test-suite b/debian/tests/upstream-test-suite
74index b6c9495..d503788 100644
75--- a/debian/tests/upstream-test-suite
76+++ b/debian/tests/upstream-test-suite
77@@ -5,6 +5,10 @@ export DEB_CFLAGS_MAINT_APPEND="-Wno-error=deprecated-declarations"
78 export DEB_CXXFLAGS_MAINT_APPEND="-Wno-error=deprecated-declarations"
79
80 dpkg-source --before-build `pwd`
81+
82+# Use installed squid binary
83+sed -i 's|\$(top_builddir)/src/squid -k parse|/usr/sbin/squid -k parse|' test-suite/Makefile.am test-suite/Makefile.in
84+
85 dh_update_autotools_config
86 dh_autoreconf
87 dh_auto_configure -- ${DEB_CONFIGURE_EXTRA_FLAGS} --with-gnutls

Subscribers

People subscribed via source and target branches