Merge ~danilogondolfo/ubuntu/+source/beep:fix_ftbfs into ubuntu/+source/beep:ubuntu/devel

Proposed by Danilo Egea Gondolfo
Status: Merged
Merged at revision: 5344c29f9eafebc501e88d07671ec3b76d901d30
Proposed branch: ~danilogondolfo/ubuntu/+source/beep:fix_ftbfs
Merge into: ubuntu/+source/beep:ubuntu/devel
Diff against target: 67 lines (+35/-1)
4 files modified
debian/changelog (+8/-0)
debian/control (+2/-1)
debian/patches/dont_redefine_FORTIFY_SOURCE.patch (+24/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Lena Voytek (community) Approve
git-ubuntu import Pending
Review via email: mp+461630@code.launchpad.net

Description of the change

It FTBFS due to the redefinition of _FORTIFY_SOURCE as it already comes from dpkg-buildflags:

<command-line>: error: "_FORTIFY_SOURCE" redefined [-Werror]
<command-line>: note: this is the location of the previous definition
cc1: all warnings being treated as errors
make[2]: *** [GNUmakefile:242: beep-log.gcc-o] Error 1

To post a comment you must log in.
Revision history for this message
Lena Voytek (lvoytek) wrote :

This patch looks good to me, and I can confirm this fixes the build. I'll go ahead and sponsor it.

review: Approve

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 c086313..4512390 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+beep (1.4.9-1.1ubuntu1) noble; urgency=medium
7+
8+ * debian/patches/dont_redefine_FORTIFY_SOURCE.patch (LP: #2055689):
9+ _FORTIFY_SOURCE is already defined from dpkg-buildflags and is causing a
10+ FTBFS due to redefinition.
11+
12+ -- Danilo Egea Gondolfo <danilo.egea.gondolfo@canonical.com> Fri, 01 Mar 2024 12:55:39 +0000
13+
14 beep (1.4.9-1.1) unstable; urgency=medium
15
16 * Non-maintainer upload.
17diff --git a/debian/control b/debian/control
18index 5bb1c54..2145a6d 100644
19--- a/debian/control
20+++ b/debian/control
21@@ -1,7 +1,8 @@
22 Source: beep
23 Section: sound
24 Priority: optional
25-Maintainer: Rhonda D'Vine <rhonda@debian.org>
26+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
27+XSBC-Original-Maintainer: Rhonda D'Vine <rhonda@debian.org>
28 Build-Depends: debhelper-compat (= 13), pkgconf, systemd-dev
29 Standards-Version: 4.5.0
30 Homepage: https://github.com/spkr-beep/beep
31diff --git a/debian/patches/dont_redefine_FORTIFY_SOURCE.patch b/debian/patches/dont_redefine_FORTIFY_SOURCE.patch
32new file mode 100644
33index 0000000..f803f43
34--- /dev/null
35+++ b/debian/patches/dont_redefine_FORTIFY_SOURCE.patch
36@@ -0,0 +1,24 @@
37+From: Danilo Egea Gondolfo <danilogondolfo@gmail.com>
38+Date: Fri, 1 Mar 2024 12:46:50 +0000
39+Subject: Don't define _FORTIFY_SOURCE as it's already defined by
40+ dpkg-buildflags.
41+
42+The build is failing with 'error: "_FORTIFY_SOURCE" redefined'.
43+
44+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/beep/+bug/2055689
45+---
46+ GNUmakefile | 1 -
47+ 1 file changed, 1 deletion(-)
48+
49+diff --git a/GNUmakefile b/GNUmakefile
50+index cef7b7b..31f60ab 100644
51+--- a/GNUmakefile
52++++ b/GNUmakefile
53+@@ -103,7 +103,6 @@ CFLAGS_gcc += -std=gnu99 -pedantic
54+ CFLAGS_gcc += -O -g
55+ CFLAGS_gcc += -Wa,-adhlns=$(@:-o=-lst)
56+ $(eval $(call CHECK_CFLAGS_gcc,-Wall -Wextra -Werror -Werror=format-security))
57+-$(eval $(call CHECK_CFLAGS_gcc,-Wp$$(comma)-D_FORTIFY_SOURCE=2))
58+ $(eval $(call CHECK_CFLAGS_gcc,-Wp$$(comma)-D_GLIBCXX_ASSERTIONS))
59+ $(eval $(call CHECK_CFLAGS_gcc,-fasynchronous-unwind-tables))
60+ $(eval $(call CHECK_CFLAGS_gcc,-fstack-protector-strong))
61diff --git a/debian/patches/series b/debian/patches/series
62new file mode 100644
63index 0000000..624e772
64--- /dev/null
65+++ b/debian/patches/series
66@@ -0,0 +1 @@
67+dont_redefine_FORTIFY_SOURCE.patch

Subscribers

People subscribed via source and target branches