cdparanoia does not build with distro build flags

Bug #2073149 reported by Nick Rosbrook
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cdparanoia (Debian)
New
Unknown
cdparanoia (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

As seen in this build log[1], the distro build flags are not used. This should be fixed so that e.g. -fno-omit-frame-pointer is picked up.

[1] https://launchpadlibrarian.net/723749641/buildlog_ubuntu-noble-amd64.cdparanoia_3.10.2+debian-14build3_BUILDING.txt.gz

Revision history for this message
Nick Rosbrook (enr0n) wrote :

This happens because in debian/rules, there is:

export CFLAGS += ...

instead of

export DEB_CFLAGS_MAINT_APPEND = ...

After making that change, there is FTBFS due to warnings as errors:

make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -O2 -fsigned-char -g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fdebug-prefix-map=/<<PKGBUILDDIR>>=/usr/src/cdparanoia-3.10.2+debian-14ubuntu1 -fPIC -g -c main.c
main.c: In function ‘callback’:
main.c:597:24: error: format not a string literal and no format arguments [-Werror=format-security]
  597 | fprintf(stderr,buffer);
      | ^~~~~~
main.c:600:27: error: format not a string literal and no format arguments [-Werror=format-security]
  600 | fprintf(logfile,buffer+1);
      | ^~~~~~
main.c: In function ‘main’:
main.c:1207:7: warning: ignoring return value of ‘seteuid’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 1207 | seteuid(getuid());
      | ^~~~~~~~~~~~~~~~~
main.c:1208:7: warning: ignoring return value of ‘setegid’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 1208 | setegid(getgid());
      | ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

These need to be fixed as well.

Nick Rosbrook (enr0n)
Changed in cdparanoia (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cdparanoia - 3.10.2+debian-14ubuntu1

---------------
cdparanoia (3.10.2+debian-14ubuntu1) oracular; urgency=medium

  * Build with distro build flags, and fix resulting FTBFS (LP: #2073149)
    - debian/rules: use *_MAINT_APPEND to add to {C,LD}FLAGS
    - d/p/fix-format-security-warnings.patch: fix fprintf warnings
    - d/p/check-seteuid-and-setegid-return-value.patch: fix unused result
      warning

 -- Nick Rosbrook <email address hidden> Mon, 15 Jul 2024 15:17:24 -0400

Changed in cdparanoia (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :

@Nick, did you ever forward that fix to Debian?

Revision history for this message
Nick Rosbrook (enr0n) wrote :

Hi seb, thanks for the ping. I have done so now: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1085353.

no longer affects: cdparanoia
Changed in cdparanoia (Debian):
status: Unknown → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.