Source: mmc-utils
Severity: wishlist
X-Debbugs-Cc: [email protected]
Hello there, dear maintainer!
Ubuntu currently carries multiple weird patches, all mostly due to the use of
_FORTIFY_SOURCE=3 there.
The upstream package already sets _FORTIFY_SOURCE=2, which doesn't conflict
with Debian, so everything is fine here.
Still, it's not very idiomatic in the sense that if one day Debian changes its
value, there will be a conflict, because specifying multiple time
_FORTIFY_SOURCE with different values is not allowed.
The version currently in Debian (1.0-1) doesn't build with _FORTIFY_SOURCE=3,
so keeping upstream's value kinda make sense, but also prevents catching more
issues with stronger checks.
I've no idea how upstream would consider removing that definition to let
distros free to choose, and/or bumping the value to 3 with some code changes to
build with that, so I'll leave that to you.
In the meantime, would you consider the following debdiff to make the package
more friendly to downstream distros that set a different value for
_FORTIFY_SOURCE?
```
diff -Nru mmc-utils-1.0/debian/rules mmc-utils-1.0/debian/rules
--- mmc-utils-1.0/debian/rules 2025-08-16 23:44:39.000000000 +0200
+++ mmc-utils-1.0/debian/rules 2025-11-21 17:34:23.000000000 +0100
@@ -1,6 +1,7 @@
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+DEB_CPPFLAGS_MAINT_APPEND=-U_FORTIFY_SOURCE
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/pkg-info.mk
```
Thanks
Skia
-- System Information:
Debian Release: forky/sid
APT prefers resolute
APT policy: (500, 'resolute'), (500, 'questing-updates'), (500, 'questing'),
(200, 'noble-updates'), (200, 'noble-backports'), (200, 'noble'), (100,
'resolute-proposed'), (100, 'questing-proposed')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.17.0-6-generic (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.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