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

Subscribers

People subscribed via source and target branches