Bug 211603

Summary: [NEW PORT] devel/kore: Web application framework for writing web APIs in C
Product: Ports & Packages Reporter: Tobias Kortkamp <tobik>
Component: Individual Port(s)Assignee: Kurt Jaeger <pi>
Status: Closed FIXED    
Severity: Affects Only Me CC: pi
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
kore.shar
none
kore.shar
none
kore.shar
tobik: maintainer-approval+
kore.shar tobik: maintainer-approval+

Description Tobias Kortkamp freebsd_committer freebsd_triage 2016-08-05 15:38:30 UTC
Created attachment 173322 [details]
kore.shar

Kore is an easy to use web application framework for writing scalable
web APIs in C.  Its main goals are security, scalability and allowing
rapid development and deployment of such APIs.

Because of this Kore is an ideal candidate for building robust,
scalable and secure web things.

WWW: http://www.kore.io/

portlint ok, Poudriere testport@FreeBSD 9.3/i386 and 10.2/amd64 ok
Comment 1 Tobias Kortkamp freebsd_committer freebsd_triage 2016-08-05 15:40:57 UTC
Created attachment 173323 [details]
kore.shar
Comment 2 Kurt Jaeger freebsd_committer freebsd_triage 2016-08-27 18:41:42 UTC
Fails to build on 10.3-i386 with 

cc -O2 -pipe  -fstack-protector -fno-strict-aliasing -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wshadow -Wpointer-arith -Wcast-qual -Wsign-compare -Iincludes -std=c99 -pedantic -DPREFIX='"/usr/local"' -I/usr/local/include -DKORE_USE_PGSQL -DPGSQL_INCLUDE_PATH="\"/usr/local/include\"" -DKORE_USE_TASKS -DKORE_USE_JSONRPC -I/usr/local/include -c src/tasks.c -o obj/tasks.o
src/pgsql.c:222:6: error: variable 'args' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
        if (count > 0)
            ^~~~~~~~~
src/pgsql.c:225:63: note: uninitialized use occurs here
        ret = kore_pgsql_v_query_params(pgsql, query, result, count, args);
                                                                     ^~~~
src/pgsql.c:222:2: note: remove the 'if' if its condition is always true
        if (count > 0)
        ^~~~~~~~~~~~~~
src/pgsql.c:220:15: note: initialize the variable 'args' to silence this warning
        va_list         args;
                            ^
                             = NULL
1 error generated.
gmake[1]: *** [Makefile:106: obj/pgsql.o] Error 1

for the full build see

http://people.freebsd.org/~pi/logs/devel__kore-10i-1472321629.txt

It's interesting this does not happen on amd64 ?
Comment 3 Kurt Jaeger freebsd_committer freebsd_triage 2016-08-27 18:46:41 UTC
Build failed on 9.3a, too:

http://people.freebsd.org/~pi/logs/devel__kore-93a-1472321629.txt
Comment 4 Tobias Kortkamp freebsd_committer freebsd_triage 2016-08-27 21:10:04 UTC
Created attachment 174136 [details]
kore.shar

(In reply to Kurt Jaeger from comment #2)
I've opened an issue for the build failure on FreeBSD/i386: https://github.com/jorisvink/kore/issues/144

I've added NOT_FOR_ARCHS=i386 for the time being, but I don't think it makes sense to commit kore until this is fixed.

I think FreeBSD 9.3's OpenSSL version is too old.  I had LibreSSL toggled in make.conf when I tested building the port.  Adding WITH_OPENSSL_PORT=yes to the port seems to fix building, but then kore links with base's OpenSSL and port's SSL via libpq.so when PGSQL=on, so I'm setting BROKEN_FreeBSD_9 now when the user does not have DEFAULT_VERSIONS=ssl=openssl or ssl=libressl in /etc/make.conf.

Poudriere testport 10.2/amd64 ok (without ssl=libressl), also 9.3/amd64 (with ssl=libressl) ok.
Comment 5 Tobias Kortkamp freebsd_committer freebsd_triage 2016-09-05 19:12:33 UTC
Created attachment 174391 [details]
kore.shar

Compilation on FreeBSD 10.2/i386 should now work.  The issue has been fixed in the upstream repo, and I've included a backport of the fix: https://github.com/jorisvink/kore/commit/c071d64bdddacbe1b69d238e14994d666a86f7cf

Poudriere testport 10.2/{i386,amd64} ok (without ssl=libressl), also 9.3/amd64 (with ssl=libressl) ok.
Comment 6 Kurt Jaeger freebsd_committer freebsd_triage 2016-09-06 17:40:03 UTC
Testbuilds are fine. Committed, thanks!
Comment 7 commit-hook freebsd_committer freebsd_triage 2016-09-06 17:40:56 UTC
A commit references this bug:

Author: pi
Date: Tue Sep  6 17:40:02 UTC 2016
New revision: 421450
URL: https://svnweb.freebsd.org/changeset/ports/421450

Log:
  New port: devel/kore

  Kore is an easy to use web application framework for writing scalable
  web APIs in C.  Its main goals are security, scalability and allowing
  rapid development and deployment of such APIs.

  Because of this Kore is an ideal candidate for building robust,
  scalable and secure web things.

  WWW: http://www.kore.io/

  PR:		211603
  Submitted by:	Tobias Kortkamp <t@tobik.me>

Changes:
  head/devel/Makefile
  head/devel/kore/
  head/devel/kore/Makefile
  head/devel/kore/distinfo
  head/devel/kore/files/
  head/devel/kore/files/patch-src_bsd.c
  head/devel/kore/files/patch-src_cli.c
  head/devel/kore/files/patch-src_pgsql.c
  head/devel/kore/pkg-descr
  head/devel/kore/pkg-plist