Bug 240237 - security/barnyard2: Mark ODBC option as broken, fix options helper usage
Summary: security/barnyard2: Mark ODBC option as broken, fix options helper usage
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: Tobias Kortkamp
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2019-08-31 19:43 UTC by Tobias Kortkamp
Modified: 2019-09-18 09:30 UTC (History)
1 user (show)

See Also:
tobik: maintainer-feedback-


Attachments
barnyard2.diff (882 bytes, patch)
2019-08-31 19:43 UTC, Tobias Kortkamp
tobik: maintainer-approval? (bofh)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Kortkamp freebsd_committer 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 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 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