Your message dated Mon, 13 Jan 2025 00:21:57 +0000
with message-id <[email protected]>
and subject line Bug#1092877: fixed in debputy 0.1.60.1
has caused the Debian Bug report #1092877,
regarding dh-debputy: CPPFLAGS concatenation issue breaks CMake builds in full 
integration mode
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1092877: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1092877
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: dh-debputy
Version: 0.1.60
Severity: important
Tags: patch

Hi again :)

There's still one issue preventing CMake builds. I've attached a patch, which describes the issue and fix.

Bye!
From 4b9a8c05fc8862289aaa58f390eff444c2425145 Mon Sep 17 00:00:00 2001
From: Andrea Pappacoda <[email protected]>
Date: Sun, 12 Jan 2025 18:07:11 +0100
Subject: [PATCH] cmake: fix lstrip of CFLAGS and CPPFLAGS concatenation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Before this change, lstrip() was applied on the " {cppflags}" string,
which always resulted in a string equal to the contents of the cppflags
variable. This variable, without leading whitespace, would lead to an
improper concatenation of a non-empty CFLAGS (or CXXFLAGS) to some other
flags, which would lead to build failures. For example:

    c++: error: unrecognized command-line option ‘-fcf-protection-Wdate-time’; did you mean ‘-fcf-protection=return’?

As you can see, `-fcf-protection` from CFLAGS gets concatenated to
`-Wdate-time` from CPPFLAGS without spaces, creating an invalid option.

This is solved by creating the whole string result as a single f-string
and executing lstrip() at the end, so to remove the extra space when
CFLAGS is empty.
---
 src/debputy/plugin/debputy/build_system_rules.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/debputy/plugin/debputy/build_system_rules.py b/src/debputy/plugin/debputy/build_system_rules.py
index eccda70..e379103 100644
--- a/src/debputy/plugin/debputy/build_system_rules.py
+++ b/src/debputy/plugin/debputy/build_system_rules.py
@@ -1363,8 +1363,8 @@ class CMakeBuildSystemRule(StepBasedBuildSystemRule):
         if "CPPFLAGS" in os.environ:
             # CMake doesn't respect CPPFLAGS, see #653916.
             cppflags = os.environ["CPPFLAGS"]
-            cflags = os.environ.get("CFLAGS", "") + f" {cppflags}".lstrip()
-            cxxflags = os.environ.get("CXXFLAGS", "") + f" {cppflags}".lstrip()
+            cflags = f"{os.environ.get('CFLAGS', '')} {cppflags}".lstrip()
+            cxxflags = f"{os.environ.get('CXXFLAGS', '')} {cppflags}".lstrip()
             env_mod = env_mod.combine(
                 # The debhelper build system never showed this delta, so people might find it annoying.
                 EnvironmentModification(
-- 
2.45.2

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Source: debputy
Source-Version: 0.1.60.1
Done: Niels Thykier <[email protected]>

We believe that the bug you reported is fixed in the latest version of
debputy, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Niels Thykier <[email protected]> (supplier of updated debputy package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sun, 12 Jan 2025 23:30:37 +0000
Source: debputy
Architecture: source
Version: 0.1.60.1
Distribution: unstable
Urgency: medium
Maintainer: Debputy Maintainers <[email protected]>
Changed-By: Niels Thykier <[email protected]>
Closes: 1092877
Changes:
 debputy (0.1.60.1) unstable; urgency=medium
 .
   [ Andrea Pappacoda ]
   * cmake: fix lstrip of CFLAGS and CPPFLAGS concatenation.
     (Closes: #1092877)
Checksums-Sha1:
 a2f7536a582533c83e24b73370f407c17dd4abf6 2155 debputy_0.1.60.1.dsc
 f1f686b09bad3446227e67d0dec6bb0e5b221f23 662456 debputy_0.1.60.1.tar.xz
Checksums-Sha256:
 0dc623b658b2b25f96eeacb1bd5aebea07bf33184b3800121ca67fab8aabfbaf 2155 
debputy_0.1.60.1.dsc
 a461a36ef7a417b1d8631f5940e5baba7308b87be8e07476c1183a2a21a35479 662456 
debputy_0.1.60.1.tar.xz
Files:
 95d4279b12701d5603f678c128edbe1d 2155 devel optional debputy_0.1.60.1.dsc
 fed67b61a3f3479bad3ded74ab504655 662456 devel optional debputy_0.1.60.1.tar.xz

-----BEGIN PGP SIGNATURE-----

iQFGBAEBCgAwFiEE9ecZmu9eXGflVYc/dA1oiINl0okFAmeEVSwSHG5pZWxzQHRo
eWtpZXIubmV0AAoJEHQNaIiDZdKJNcQH/i4tP2bRKLHvHjQAeXbGzwdk4221mBsy
BrEGzZ9zdnY6s9mdRIIAYGJoGY3nYQXirTRsYXPs5iiiCS2qavPTfS08766mu/D0
1rZ2ApM5s2BvRl6PwNQ9ThMoJQZ0MuwKSyQumaVdLCB5SJTbUu7LmTkdoXLGM8Bt
82t5nvGQBelr4yk3WBDl/z/2UU2dkVBMOXaE3yIa/4F56oQ+dTRapfLR9lH0qdVo
zPo70uH6yXQV1OSo5y+XMd5svvqpYMe40ZsNmiVgwUYEcjA8qzcAsrAQI3Uejt5k
nerYOadlf1i7ESX5WXMQxUHnXLt9hf6ASmZlorMQk/4LxuO33Uiu5P8=
=8Kvz
-----END PGP SIGNATURE-----

Attachment: pgpteADVnWUYS.pgp
Description: PGP signature


--- End Message ---

Reply via email to