Package: authbind Version: 2.1.3 Severity: normal Tags: patch User: [email protected] Usertags: origin-ubuntu oracular ubuntu-patch
Dear Maintainer, When building authbind, CFLAGS and LDFLAGS are overwritten by the upstream makefile (and are also hardcoded in debian/rules). Therefore, flags specified via dpkg-buildflags are ignored. In Ubuntu, the attached patch was applied to enable frame-pointers and enable LTO. Thanks for considering the patch. -- System Information: Debian Release: trixie/sid APT prefers noble-updates APT policy: (500, 'noble-updates'), (500, 'noble-security'), (500, 'noble'), (100, 'noble-backports') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.8.0-36-generic (SMP w/8 CPU threads; PREEMPT) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled
diff -Nru authbind-2.1.3build2/debian/control authbind-2.1.3ubuntu1~ppa2/debian/control --- authbind-2.1.3build2/debian/control 2024-04-08 17:54:08.000000000 +0200 +++ authbind-2.1.3ubuntu1~ppa2/debian/control 2024-07-03 17:42:33.000000000 +0200 @@ -1,8 +1,7 @@ Source: authbind Section: utils Priority: optional -Maintainer: Ubuntu Developers <[email protected]> -XSBC-Original-Maintainer: Ian Jackson <[email protected]> +Maintainer: Ian Jackson <[email protected]> Standards-Version: 3.9.1 Package: authbind diff -Nru authbind-2.1.3build2/debian/patches/makefile-honor-cflags-ldflags.patch authbind-2.1.3ubuntu1~ppa2/debian/patches/makefile-honor-cflags-ldflags.patch --- authbind-2.1.3build2/debian/patches/makefile-honor-cflags-ldflags.patch 1970-01-01 01:00:00.000000000 +0100 +++ authbind-2.1.3ubuntu1~ppa2/debian/patches/makefile-honor-cflags-ldflags.patch 2024-07-03 17:42:33.000000000 +0200 @@ -0,0 +1,28 @@ +Description: Honor CFLAGS and LDFLAGS set by the maintainer + The upstream makefile used to override any CFLAGS / LDFLAGS set by the + maintainer when building authbind. This prevents us from controlling the + presence of frame pointers when building. It also prevents us from enabling + LTO. + Fixed by dropping directives that overwrite CFLAGS & LDFLAGS ; and only adding + to those variables when relevant. +Author: Olivier Gayot <[email protected]> +Bug-Ubuntu: https://launchpad.net/bugs/2071841 +Forwarded: no +Last-Update: 2024-07-03 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/Makefile ++++ b/Makefile +@@ -34,11 +34,8 @@ + INSTALL_DIR ?= install -o root -g root -m 755 -d + STRIP ?= strip + +-OPTIMISE= -O2 +-LDFLAGS= -g + LIBS= -ldl -lc +-CFLAGS= -g $(OPTIMISE) \ +- -Wall -Wwrite-strings -Wpointer-arith -Wimplicit \ ++CFLAGS+= -Wall -Wwrite-strings -Wpointer-arith -Wimplicit \ + -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes + CPPFLAGS= -DMAJOR_VER='"$(MAJOR)"' -DMINOR_VER='"$(MINOR)"' \ + -DLIBAUTHBIND='"$(lib_dir)/$(LIBCANON)"' \ diff -Nru authbind-2.1.3build2/debian/patches/series authbind-2.1.3ubuntu1~ppa2/debian/patches/series --- authbind-2.1.3build2/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ authbind-2.1.3ubuntu1~ppa2/debian/patches/series 2024-07-03 17:42:33.000000000 +0200 @@ -0,0 +1 @@ +makefile-honor-cflags-ldflags.patch diff -Nru authbind-2.1.3build2/debian/rules authbind-2.1.3ubuntu1~ppa2/debian/rules --- authbind-2.1.3build2/debian/rules 2021-12-17 19:34:02.000000000 +0100 +++ authbind-2.1.3ubuntu1~ppa2/debian/rules 2024-07-03 17:42:33.000000000 +0200 @@ -41,12 +41,10 @@ INSTALL_SCRIPT = $(INSTALL) -p -o root -g root -m 755 INSTALL_DIR = $(INSTALL) -p -d -o root -g root -m 755 -CFLAGS = -O2 -Wall -LDFLAGS = +DPKG_EXPORT_BUILDFLAGS := 1 -CFLAGS += -g -LDFLAGS += -g +include /usr/share/dpkg/buildflags.mk ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) STRIP=$(TOOL_PREFIX)strip @@ -55,8 +53,6 @@ STRIP=: endif -export CFLAGS -export LDFLAGS export INSTALL export INSTALL_FILE export INSTALL_PROGRAM

