Bug 241941

Summary: [PATCH] databases/tdb does not respect DEBUG option
Product: Ports & Packages Reporter: ml
Component: Individual Port(s)Assignee: Timur I. Bakeyev <timur>
Status: Open ---    
Severity: Affects Only Me Keywords: buildisok
Priority: --- Flags: bugzilla: maintainer-feedback? (timur)
Version: Latest   
Hardware: Any   
OS: Any   
Description Flags
SVN patch that corrects Makefile none

Description ml 2019-11-13 09:27:41 UTC
Created attachment 209126 [details]
SVN patch that corrects Makefile

Binaries are stripped anyway.
Comment 1 Automation User 2019-11-28 00:09:18 UTC
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/99097176
Comment 2 Timur I. Bakeyev freebsd_committer 2020-01-14 01:33:51 UTC
I'm wondering, if:

DEBUG_VARS=                     WITH_DEBUG=yes

would also fix this issue? As STRIP should be redefined to `true` in this case.
Comment 3 ml 2020-01-27 10:53:14 UTC
I tried compiling "WITH_DEBUG=yes" and deployed it to a few servers (AD DCs and AD members).

On all of them this started producing tons of secrets.ldb.trace.[0-9]*, sam.ldb.trace.[0-9]*, schannel_store.tdb.trace.[0-9]*, etc... in /var/db/samba4/private.

Monitoring advised that that partition was getting full and saved me.

Rebuilding without "WITH_DEBUG=yes" reverted everything to normal.

Now we might discuss what the DEBUG option should do: I thought it just meant compiling with debug info and not stripping. If it's so, then this change is wrong.
OTOH if this *should* produce that result, then it's ok:

# file /usr/local/bin/tdbbackup 
/usr/local/bin/tdbbackup: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 11.3, FreeBSD-style, with debug_info, not stripped