Bug 239903 - sysutils/syslog-ng: Broken JAVA_MOD option
Summary: sysutils/syslog-ng: Broken JAVA_MOD option
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: Cy Schubert
URL: https://reviews.freebsd.org/P301
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-16 10:24 UTC by Tobias Kortkamp
Modified: 2019-08-29 12:38 UTC (History)
0 users

See Also:
tobik: maintainer-feedback+


Attachments
JAVA_MOD implies JAVA (476 bytes, patch)
2019-08-16 12:40 UTC, Cy Schubert
no flags Details | Diff
tobik@'s suggestion (592 bytes, patch)
2019-08-17 20:56 UTC, Cy Schubert
no flags Details | Diff
syslog-ng322.diff (842 bytes, patch)
2019-08-19 09:21 UTC, Tobias Kortkamp
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Kortkamp freebsd_committer freebsd_triage 2019-08-16 10:24:55 UTC
It does not configure but I guess that is expected based on JAVA_MOD_DESC
and it requiring Internet access:

configure: error: Could not build Java modules without Java
===>  Script "configure" failed unexpectedly.
Please report the problem to cy@FreeBSD.org [maintainer] and attach the
"/wrkdirs/usr/ports/sysutils/syslog-ng/work/syslog-ng-3.21.1/config.log"
including the output of the failure of your make command. Also, it might be
a good idea to provide an overview of all packages installed on your system
(e.g. a /usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/syslog-ng

Full log FWIW: https://reviews.freebsd.org/P301

Since it does not build in Poudriere we cannot reasonably check if it works with
the devel/gradle update from bug #239875, so I'm not going to classify this as a
blocker for that bug.
Comment 1 Cy Schubert freebsd_committer freebsd_triage 2019-08-16 12:40:41 UTC
Created attachment 206616 [details]
JAVA_MOD implies JAVA

JAVA must be enabled when JAVA_MOD is.

I've asked our upline to look at this PR.
Comment 2 Cy Schubert freebsd_committer freebsd_triage 2019-08-16 19:11:18 UTC
Our upstream says this is the correct patch:

If
" 
JAVA_MOD_IMPLIES=		JAVA
"
means that when JAVA_MOD is selected then JAVA is automagically enabled, then it's perfect.
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-08-16 19:45:07 UTC
A commit references this bug:

Author: cy
Date: Fri Aug 16 19:44:30 UTC 2019
New revision: 509121
URL: https://svnweb.freebsd.org/changeset/ports/509121

Log:
  syslog-ng family of ports: JAVA_MOD implies JAVA.

  PR:		239903
  Discussed with:	Peter Czanik (CzP) <peter.czanik@oneidentity.com>
  		Balabit (a OneIdentity company) / syslog-ng upstream

Changes:
  head/sysutils/syslog-ng310/Makefile
  head/sysutils/syslog-ng311/Makefile
  head/sysutils/syslog-ng312/Makefile
  head/sysutils/syslog-ng313/Makefile
  head/sysutils/syslog-ng314/Makefile
  head/sysutils/syslog-ng315/Makefile
  head/sysutils/syslog-ng317/Makefile
  head/sysutils/syslog-ng318/Makefile
  head/sysutils/syslog-ng319/Makefile
  head/sysutils/syslog-ng320/Makefile
  head/sysutils/syslog-ng321/Makefile
  head/sysutils/syslog-ng322/Makefile
  head/sysutils/syslog-ng39/Makefile
Comment 4 Tobias Kortkamp freebsd_committer freebsd_triage 2019-08-17 20:31:36 UTC
syslog-ng322 builds fine now with ALLOW_NETWORKING_PACKAGES="syslog-ng322"
in poudriere.conf and either gradle-5.0 or gradle-5.6.

Poudriere however complains about leftover processes:

Leftover processes:
USER   PID %CPU %MEM    VSZ    RSS TT  STAT STARTED    TIME COMMAND
nobody 17953  1.0  4.0 977876 412880  -  IsJ  20:08   0:54.59 /usr/local/openjdk8/bin/java -XX:MaxMetaspaceSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xmx512m -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp /usr/local/share/gradle/lib/gradle-launcher-5.0.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 5.0

Basically the Gradle daemon is left running after the build...  In
openjfx8-devel I pass --no-daemon to gradle to prevent this.
Comment 5 Cy Schubert freebsd_committer freebsd_triage 2019-08-17 20:43:09 UTC
Thanks. I'll let Peter know as well.
Comment 6 Cy Schubert freebsd_committer freebsd_triage 2019-08-17 20:56:45 UTC
Created attachment 206645 [details]
tobik@'s suggestion

206616 has been committed. This implements tobik@'s suggestion.
Comment 7 commit-hook freebsd_committer freebsd_triage 2019-08-19 05:45:34 UTC
A commit references this bug:

Author: cy
Date: Mon Aug 19 05:44:35 UTC 2019
New revision: 509253
URL: https://svnweb.freebsd.org/changeset/ports/509253

Log:
  Address left over gradle daemons under poudriere when JAVA options
  selected.

  PR:		239903
  Suggested by:	tobik@
  Reported by:	tobik@
  Obtained from:	openjfx8-devel port

Changes:
  head/sysutils/syslog-ng310/Makefile
  head/sysutils/syslog-ng311/Makefile
  head/sysutils/syslog-ng312/Makefile
  head/sysutils/syslog-ng313/Makefile
  head/sysutils/syslog-ng314/Makefile
  head/sysutils/syslog-ng315/Makefile
  head/sysutils/syslog-ng317/Makefile
  head/sysutils/syslog-ng318/Makefile
  head/sysutils/syslog-ng319/Makefile
  head/sysutils/syslog-ng320/Makefile
  head/sysutils/syslog-ng321/Makefile
  head/sysutils/syslog-ng322/Makefile
  head/sysutils/syslog-ng39/Makefile
Comment 8 Tobias Kortkamp freebsd_committer freebsd_triage 2019-08-19 09:21:11 UTC
Created attachment 206692 [details]
syslog-ng322.diff

(In reply to commit-hook from comment #7)
I'm sorry but this changes nothing.  Nothing uses _GRADLE_ENV or
_GRADLE_RUN in the syslog-ng ports.  These variables are entirely
specific to openjfx8-devel.

Gradle is invoked by the build, so one possible solution is to patch
it to pass --no-daemon to it.
Comment 9 Cy Schubert freebsd_committer freebsd_triage 2019-08-19 12:05:49 UTC
Gotcha. The fix in openjfx8-devel doesn't work.

A simple grep through the build directory tree shows that the modules implicitlyh call gradle. I will have to mark the JAVA options BROKEN for now until our upstream has had a chance to look at this.
Comment 10 Tobias Kortkamp freebsd_committer freebsd_triage 2019-08-19 12:08:18 UTC
(In reply to Cy Schubert from comment #9)
Have you taken a look at the patch I attached?
Comment 11 commit-hook freebsd_committer freebsd_triage 2019-08-19 12:15:14 UTC
A commit references this bug:

Author: cy
Date: Mon Aug 19 12:14:22 UTC 2019
New revision: 509275
URL: https://svnweb.freebsd.org/changeset/ports/509275

Log:
  Revert r509253. The suggested solution does not work after all in
  poudriere.

  The JAVA and JAVA_MOD options may need BROKEN unless this can be resolved.

  PR:		239903
  Tested by:	tobik@

Changes:
  head/sysutils/syslog-ng310/Makefile
  head/sysutils/syslog-ng311/Makefile
  head/sysutils/syslog-ng312/Makefile
  head/sysutils/syslog-ng313/Makefile
  head/sysutils/syslog-ng314/Makefile
  head/sysutils/syslog-ng315/Makefile
  head/sysutils/syslog-ng317/Makefile
  head/sysutils/syslog-ng318/Makefile
  head/sysutils/syslog-ng319/Makefile
  head/sysutils/syslog-ng320/Makefile
  head/sysutils/syslog-ng321/Makefile
  head/sysutils/syslog-ng322/Makefile
  head/sysutils/syslog-ng39/Makefile
Comment 12 Cy Schubert freebsd_committer freebsd_triage 2019-08-19 12:28:54 UTC
(In reply to Tobias Kortkamp from comment #10)
Id didn't notice it. I'll check it out.
Comment 13 Cy Schubert freebsd_committer freebsd_triage 2019-08-19 12:34:56 UTC
Thank you for the patch.
Comment 14 commit-hook freebsd_committer freebsd_triage 2019-08-19 12:45:22 UTC
A commit references this bug:

Author: cy
Date: Mon Aug 19 12:44:44 UTC 2019
New revision: 509284
URL: https://svnweb.freebsd.org/changeset/ports/509284

Log:
  Pass -no-daemon to gradle more directly.

  PR:		239903
  Submitted by:	tobik@
  Reported by:	tobik@

Changes:
  head/sysutils/syslog-ng310/Makefile
  head/sysutils/syslog-ng311/Makefile
  head/sysutils/syslog-ng312/Makefile
  head/sysutils/syslog-ng313/Makefile
  head/sysutils/syslog-ng314/Makefile
  head/sysutils/syslog-ng315/Makefile
  head/sysutils/syslog-ng317/Makefile
  head/sysutils/syslog-ng318/Makefile
  head/sysutils/syslog-ng319/Makefile
  head/sysutils/syslog-ng320/Makefile
  head/sysutils/syslog-ng321/Makefile
  head/sysutils/syslog-ng322/Makefile
  head/sysutils/syslog-ng39/Makefile
Comment 15 Tobias Kortkamp freebsd_committer freebsd_triage 2019-08-29 12:38:49 UTC
Thank you.