Bug 194099 - [bug]: mail/dma ignores the port's CFLAGS, resulting in a failure on starting the flushing queue
Summary: [bug]: mail/dma ignores the port's CFLAGS, resulting in a failure on starting...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Baptiste Daroussin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-02 19:05 UTC by Marcus von Appen
Modified: 2014-12-30 07:45 UTC (History)
0 users

See Also:
mva: maintainer-feedback? (bapt)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus von Appen freebsd_committer freebsd_triage 2014-10-02 19:05:27 UTC
As can be seen below, mail/dma ignores the CFLAGS of the port entirely, which results in startup problems of the flush queue, since the default "mail" user used by dma can't be found.

root@medusa:/usr/ports/mail/dma # make -VCFLAGS
-O2 -fno-strict-aliasing -pipe -march=nocona  -I/usr/local/include -DCONF_PATH='\"/usr/local/etc/dma\"' -DDMA_ROOT_USER='\"mailnull\"' -DDMA_GROUP='\"mail\"'

root@medusa:/usr/ports/mail/dma # make
[...]
===>  Building for dma-v0.9_1,1
--- _sub.all ---
===> dma (all)
--- objwarn ---
Warning: Object directory not changed from original /usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma
--- aliases_parse.c ---
--- aliases_scan.c ---
--- dma.8.gz ---
--- aliases_parse.c ---
yacc -d -i -o aliases_parse.c /usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma/..//aliases_parse.y
--- aliases_scan.c ---
lex  -oaliases_scan.c /usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma/..//aliases_scan.l
--- dma.8.gz ---
gzip -cn /usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma/..//dma.8 > dma.8.gz
--- aliases_parse.o ---
--- base64.o ---
--- aliases_parse.o ---
cc -O2 -fno-strict-aliasing -pipe -march=nocona  -DYY_NO_INPUT -I/usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma -I/usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma/.. -DHAVE_REALLOCF -DHAVE_STRLCPY -DHAVE_GETPROGNAME -DLIBEXEC_PATH='"/usr/local/libexec"' -DDMA_VERSION='"v0.9"' -DCONF_PATH='"/usr/local/etc/dma"' -std=gnu99 -Qunused-arguments  -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wmissing-variable-declarations -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -c aliases_parse.c
--- conf.o ---
--- base64.o ---
cc -O2 -fno-strict-aliasing -pipe -march=nocona  -DYY_NO_INPUT -I/usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma -I/usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma/.. -DHAVE_REALLOCF -DHAVE_STRLCPY -DHAVE_GETPROGNAME -DLIBEXEC_PATH='"/usr/local/libexec"' -DDMA_VERSION='"v0.9"' -DCONF_PATH='"/usr/local/etc/dma"' -std=gnu99 -Qunused-arguments  -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wmissing-variable-declarations -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -c /usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma/..//base64.c
--- conf.o ---
cc -O2 -fno-strict-aliasing -pipe -march=nocona  -DYY_NO_INPUT -I/usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma -I/usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma/.. -DHAVE_REALLOCF -DHAVE_STRLCPY -DHAVE_GETPROGNAME -DLIBEXEC_PATH='"/usr/local/libexec"' -DDMA_VERSION='"v0.9"' -DCONF_PATH='"/usr/local/etc/dma"' -std=gnu99 -Qunused-arguments  -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wmissing-variable-declarations -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -c /usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma/..//conf.c
...
Comment 1 Bugzilla Automation freebsd_committer 2014-10-02 19:05:27 UTC
Auto-assigned to maintainer bapt@FreeBSD.org
Comment 2 Marcus von Appen freebsd_committer freebsd_triage 2014-11-12 07:27:12 UTC
The issue still exists.
Comment 3 Baptiste Daroussin freebsd_committer 2014-12-29 22:55:27 UTC
I cannot reproduce:
-- aliases_parse.o ---
cc -O2 -pipe  -I/usr/include -DCONF_PATH='"/usr/local/etc/dma"' -DDMA_ROOT_USER='"mailnull"' -DDMA_GROUP='"mail"' -fstack-protector -fno-strict-aliasing   -DYY_NO_INPUT
Comment 4 Marcus von Appen freebsd_committer freebsd_triage 2014-12-30 06:51:52 UTC
As it seems, make pulls in sys.mk, which in turn checks for /etc/make.conf.
My /etc/make.conf sets CFLAGS= ..., which seem to override the previously set CFLAGS. As soon as I comment out the CFLAGS in /etc/make.conf, the CFLAGS set in dma/Makefile are correctly passed to the port.
My guess is that something in dma's BSD-tailored Makefiles causes the problem.

FreeBSD version 10.1-STABLE FreeBSD 10.1-STABLE #22 r276198, amd64.
Comment 5 Baptiste Daroussin freebsd_committer 2014-12-30 07:44:52 UTC
Fixed
Comment 6 commit-hook freebsd_committer 2014-12-30 07:45:38 UTC
A commit references this bug:

Author: bapt
Date: Tue Dec 30 07:44:42 UTC 2014
New revision: 375815
URL: https://svnweb.freebsd.org/changeset/ports/375815

Log:
  dma is using the bsd Makefiles (bsd.*.mk) ensure it is not getting populed by
  make.conf and src.conf

  PR:		194099
  Submitted by:	mva

Changes:
  head/mail/dma/Makefile