Bug 240237

Summary: security/barnyard2: Mark ODBC option as broken, fix options helper usage
Product: Ports & Packages Reporter: Tobias Kortkamp <tobik>
Component: Individual Port(s)Assignee: Tobias Kortkamp <tobik>
Status: Closed FIXED    
Severity: Affects Only Me CC: bofh
Priority: --- Keywords: patch
Version: LatestFlags: tobik: maintainer-feedback-
Hardware: Any   
OS: Any   
Attachments:
Description Flags
barnyard2.diff tobik: maintainer-approval? (bofh)

Description Tobias Kortkamp freebsd_committer freebsd_triage 2019-08-31 19:43:46 UTC
Created attachment 207049 [details]
barnyard2.diff

First there is no ODBC_WITH options helper and it should be ODBC_CONFIGURE_WITH.
However while the ODBC feature is now actually activated, the port will no
longer build with ODBC=on due to lack of support in the code. Let's mark the
ODBC option as broken.  Previously turning the option on was a nop.
Alternatively, the option could maybe just be removed.

spo_database.c:3547:3: error: use of undeclared identifier 'result'
                result = 0;
                ^
spo_database.c:3841:41: warning: incompatible pointer types passing 'SQLINTEGER *' (aka 'int *') to parameter of type 'SQLLEN *' (aka 'long *') [-Wincompatible-pointer-types]
                    if(SQLRowCount(data->u_statement, &data->u_rows) == SQL_SUCCESS)
                                                      ^~~~~~~~~~~~~
/usr/local/include/sql.h:768:44: note: passing argument to parameter 'RowCount' here
                                   SQLLEN *RowCount);
                                           ^
spo_database.c:3849:33: error: use of undeclared identifier 'result'
                                result = 0;
                                ^
1 warning and 2 errors generated.
Comment 1 Tobias Kortkamp freebsd_committer freebsd_triage 2019-09-18 09:30:23 UTC
"Fixed" in the sense that the option is now marked as broken.
Comment 2 commit-hook freebsd_committer freebsd_triage 2019-09-18 09:30:24 UTC
A commit references this bug:

Author: tobik
Date: Wed Sep 18 09:29:54 UTC 2019
New revision: 512264
URL: https://svnweb.freebsd.org/changeset/ports/512264

Log:
  security/barnyard2: Spell ODBC_CONFIGURE_WITH correctly

  The option now actually activates the ODBC code paths but the port
  fails to build with it.  The code seems to lack full support for
  it in a couple of places, so mark the ODBC option as broken for
  now.

  spo_database.c:3547:3: error: use of undeclared identifier 'result'
  result = 0;
  ^
  spo_database.c:3841:41: warning: incompatible pointer types passing 'SQLINTEGER *' (aka 'int *') to parameter of type 'SQLLEN *' (aka 'long *') [-Wincompatible-pointer-types]
  if(SQLRowCount(data->u_statement, &data->u_rows) == SQL_SUCCESS)
  ^~~~~~~~~~~~~
  /usr/local/include/sql.h:768:44: note: passing argument to parameter 'RowCount' here
  SQLLEN *RowCount);
  ^
  spo_database.c:3849:33: error: use of undeclared identifier 'result'
  result = 0;
  ^
  1 warning and 2 errors generated.

  PR:		240237
  Approved by:	bofh (maintainer timeout, 17 days)

Changes:
  head/security/barnyard2/Makefile