Merge ~athos-ribeiro/ubuntu/+source/squid:halt-build-on-test-failures-kinetic into ubuntu/+source/squid: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:ubuntu/kinetic-devel
Diff against target: 124 lines (+34/-33)
5 files modified
debian/changelog (+14/-0)
debian/patches/series (+0/-1)
debian/rules (+16/-2)
debian/tests/upstream-test-suite (+4/-0)
dev/null (+0/-30)
Reviewer Review Type Date Requested Status
git-ubuntu bot Approve
Bryce Harrington (community) Approve
Canonical Server Reporter Pending
Review via email: mp+436827@code.launchpad.net

This proposal supersedes a proposal from 2023-01-31.

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

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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
Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Thanks, Bryce!

I fixed the target branch and updated the version string.

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

Thanks, looks good now!

review: Approve
Revision history for this message
git-ubuntu bot (git-ubuntu-bot) wrote :

Approvers: athos-ribeiro, bryce
Uploaders: athos-ribeiro, bryce
MP auto-approved

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

Uploaded:

Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading squid_5.6-1ubuntu3.1.dsc: done.
  Uploading squid_5.6-1ubuntu3.1.debian.tar.xz: done.
  Uploading squid_5.6-1ubuntu3.1_source.buildinfo: done.
  Uploading squid_5.6-1ubuntu3.1_source.changes: done.
Successfully uploaded packages.

Unmerged commits

17fddcd... by Athos Ribeiro

Update changelog

ee2d4ce... by Athos Ribeiro

    - d/rules: disable LTO related compilation errors for s390x builds.

498c497... by Athos Ribeiro

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

a507cb7... 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.

23ef3fa... by Athos Ribeiro

    - d/rules: halt build upon test failures.

4531ab4... by Athos Ribeiro

    - d/patches: 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..df188a9 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,17 @@
6+squid (5.6-1ubuntu3.1) kinetic; urgency=medium
7+
8+ * Make builds fail when upstream test suite fails (LP: #2004050):
9+ - d/patches: 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 related compilation errors 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/0003-installed-binary-for-debian-ci.patch b/debian/patches/0003-installed-binary-for-debian-ci.patch
24deleted file mode 100644
25index fb1ce64..0000000
26--- a/debian/patches/0003-installed-binary-for-debian-ci.patch
27+++ /dev/null
28@@ -1,30 +0,0 @@
29-From: Amos Jeffries <amosjeffries@squid-cache.org>
30-Date: Sat, 21 Jul 2018 21:07:00 +1300
31-Subject: Use installed squid binary for Debian CI testing
32-
33-Index: pkg-squid/test-suite/Makefile.am
34-===================================================================
35---- pkg-squid.orig/test-suite/Makefile.am
36-+++ pkg-squid/test-suite/Makefile.am
37-@@ -150,7 +150,7 @@ VirtualDeleteOperator_SOURCES = VirtualD
38- squid-conf-tests: $(top_builddir)/src/squid.conf.default $(srcdir)/squidconf/*
39- @failed=0; cfglist="$?"; rm -f $@ || $(TRUE); \
40- for cfg in $$cfglist ; do \
41-- $(top_builddir)/src/squid -k parse -f $$cfg || \
42-+ /usr/sbin/squid -k parse -f $$cfg || \
43- { echo "FAIL: squid.conf test: $$cfg" | \
44- sed s%$(top_builddir)/src/%% | \
45- sed s%$(srcdir)/squidconf/%% ; \
46-Index: pkg-squid/test-suite/Makefile.in
47-===================================================================
48---- pkg-squid.orig/test-suite/Makefile.in
49-+++ pkg-squid/test-suite/Makefile.in
50-@@ -1477,7 +1477,7 @@ STUB.h: $(top_srcdir)/src/tests/STUB.h
51- squid-conf-tests: $(top_builddir)/src/squid.conf.default $(srcdir)/squidconf/*
52- @failed=0; cfglist="$?"; rm -f $@ || $(TRUE); \
53- for cfg in $$cfglist ; do \
54-- $(top_builddir)/src/squid -k parse -f $$cfg || \
55-+ /usr/sbin/squid -k parse -f $$cfg || \
56- { echo "FAIL: squid.conf test: $$cfg" | \
57- sed s%$(top_builddir)/src/%% | \
58- sed s%$(srcdir)/squidconf/%% ; \
59diff --git a/debian/patches/series b/debian/patches/series
60index 3c055ad..8c2318e 100644
61--- a/debian/patches/series
62+++ b/debian/patches/series
63@@ -1,6 +1,5 @@
64 0001-Default-configuration-file-for-debian.patch
65 0002-Change-default-file-locations-for-debian.patch
66-0003-installed-binary-for-debian-ci.patch
67 0005-Use-RuntimeDirectory-to-create-run-squid.patch
68 0006-Fix-build-against-OpenSSL-3-0.patch
69 90-cf.data.ubuntu.patch
70diff --git a/debian/rules b/debian/rules
71index 85d55f3..44e224a 100755
72--- a/debian/rules
73+++ b/debian/rules
74@@ -1,9 +1,15 @@
75 #! /usr/bin/make -f
76
77 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
78+
79 export DEB_CFLAGS_MAINT_APPEND = -Wno-error=deprecated-declarations
80 export DEB_CXXFLAGS_MAINT_APPEND = -Wno-error=deprecated-declarations
81
82+ifeq ($(DEB_HOST_ARCH), s390x)
83+ DEB_CFLAGS_MAINT_APPEND += -Wno-error=stringop-overread
84+ DEB_CXXFLAGS_MAINT_APPEND += -Wno-error=stringop-overread
85+endif
86+
87 ifneq (,$(filter $(DEB_HOST_ARCH), armel m68k mips mipsel powerpc powerpcspe sh4))
88 DEB_LDFLAGS_MAINT_APPEND += -latomic
89 endif
90@@ -89,9 +95,17 @@ override_dh_auto_build:
91 dh_auto_build
92 cd debian/build-openssl && dh_auto_build
93
94+execute_before_dh_auto_test:
95+ # Do not include additional configuration files during tests. This would lead to failures due to missing paths.
96+ sed -i 's|^\(include /etc/squid/conf\.d/\*\.conf\)|# \1|' src/squid.conf.default debian/build-openssl/src/squid.conf.default
97+
98 override_dh_auto_test:
99- -dh_auto_test
100- -cd debian/build-openssl && dh_auto_test
101+ dh_auto_test
102+ cd debian/build-openssl && dh_auto_test
103+
104+execute_after_dh_auto_test:
105+ # Restore configuration file to its previous state.
106+ sed -i 's|^# \(include /etc/squid/conf\.d/\*\.conf\)|\1|' src/squid.conf.default debian/build-openssl/src/squid.conf.default
107
108 override_dh_auto_install:
109 dh_auto_install
110diff --git a/debian/tests/upstream-test-suite b/debian/tests/upstream-test-suite
111index b6c9495..d503788 100644
112--- a/debian/tests/upstream-test-suite
113+++ b/debian/tests/upstream-test-suite
114@@ -5,6 +5,10 @@ export DEB_CFLAGS_MAINT_APPEND="-Wno-error=deprecated-declarations"
115 export DEB_CXXFLAGS_MAINT_APPEND="-Wno-error=deprecated-declarations"
116
117 dpkg-source --before-build `pwd`
118+
119+# Use installed squid binary
120+sed -i 's|\$(top_builddir)/src/squid -k parse|/usr/sbin/squid -k parse|' test-suite/Makefile.am test-suite/Makefile.in
121+
122 dh_update_autotools_config
123 dh_autoreconf
124 dh_auto_configure -- ${DEB_CONFIGURE_EXTRA_FLAGS} --with-gnutls

Subscribers

People subscribed via source and target branches