Bug 244976 - java/icedtea-web: Update to 1.8.4
Summary: java/icedtea-web: Update to 1.8.4
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Greg Lewis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-22 13:01 UTC by Lars Herschke
Modified: 2020-08-08 01:33 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (java)


Attachments
This patch updates the port to the latest release. (26.88 KB, patch)
2020-03-22 13:01 UTC, Lars Herschke
no flags Details | Diff
Here is a new patch for release 1.8.4 (26.88 KB, patch)
2020-06-08 10:55 UTC, Lars Herschke
no flags Details | Diff
New patch that also removes dependencies from Cargo.toml (27.86 KB, patch)
2020-06-15 08:15 UTC, Lars Herschke
no flags Details | Diff
Log of build failure (921.51 KB, text/plain)
2020-07-11 17:54 UTC, Greg Lewis
no flags Details
new patch which prevents the build error (27.90 KB, patch)
2020-07-14 20:00 UTC, Lars Herschke
no flags Details | Diff
Makefile and pkg-plist patch (2.31 KB, patch)
2020-07-24 13:49 UTC, Lars Herschke
no flags Details | Diff
restriction to java 8 java (571 bytes, patch)
2020-07-25 10:33 UTC, Lars Herschke
no flags Details | Diff
patch to solve completion-dir problem (1.22 KB, patch)
2020-07-29 18:52 UTC, Lars Herschke
no flags Details | Diff
fix for rust-launcher and for bash-completion (1.97 KB, patch)
2020-07-31 18:35 UTC, Lars Herschke
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Herschke 2020-03-22 13:01:20 UTC
Created attachment 212611 [details]
This patch updates the port to the latest release.
Comment 1 Greg Lewis freebsd_committer freebsd_triage 2020-06-08 06:16:20 UTC
Hi Lars, in patch-configure.ac linux is replaced with freebsd.  Can we instead just add freebsd?  E.g. make it linux*|freebsd*) rather than replacing?  That way there is some change of getting the changes upstreamed.
Comment 2 Lars Herschke 2020-06-08 10:31:37 UTC
Ok, i made a pull request regarding configure.ac in the github of icedtea-web. The whole thing will only have an effect on the next release and therefore the patch will be needed for the time being.
Comment 3 Lars Herschke 2020-06-08 10:55:57 UTC
Created attachment 215350 [details]
Here is a new patch for release 1.8.4
Comment 4 Greg Lewis freebsd_committer freebsd_triage 2020-06-14 06:56:49 UTC
I tested this patch out today, and it looks to me like it downloads something during the build.  This won't work in either poudriere or any other type of package build jail.  That will need to be addressed before this can be committed.
Comment 5 Lars Herschke 2020-06-15 08:13:59 UTC
This is the download of the crates.io index. At Cargo, this happens automatically as soon as you have "dependencies" in Cargo.toml, even if the dependencies are for another operating system. Unfortunately, this cannot currently be prevented at Cargo. See also https://github.com/AdoptOpenJDK/IcedTea-Web/issues/103.
Comment 6 Lars Herschke 2020-06-15 08:15:19 UTC
Created attachment 215574 [details]
New patch that also removes dependencies from Cargo.toml
Comment 7 Greg Lewis freebsd_committer freebsd_triage 2020-07-11 17:54:38 UTC
Created attachment 216383 [details]
Log of build failure

Build fails for me.  Attaching log.
Comment 8 Lars Herschke 2020-07-14 20:00:45 UTC
Created attachment 216446 [details]
new patch which prevents the build error

Here is a new patch that sets MAKE_JOBS_UNSAFE = yes. The build error happens when building the native launchers with rust. Three parallel rust builds (itweb-javaws, itweb-settings and policyeditor) are started here, which build in different directories, but do their tests in the same directory. At the end of a rust build, make clean is also called in the test directory, which then deletes test files from the parallel builds. I will soon submit an upstream patch to AdoptOpenJDK. This can then be used to remove MAKE_JOBS_UNSAFE at the next release, but first we need it.
Comment 9 Greg Lewis freebsd_committer freebsd_triage 2020-07-22 03:47:21 UTC
Thanks.  That builds for me and seems to install ok.

How have you tested it out?  I ran 'make test' and received a lot of test failures, so I want to make sure it works :)
Comment 10 Lars Herschke 2020-07-22 07:18:15 UTC
With multiple builds I was able to reproduce your error at some point. Then i took a close look at the error output and was able to trace the error back to the place in the Makefile. make test has a lot of mistakes in icedtea-web in the 1er releases. make test runs without errors only in the master branch and the future 2-release. These tests relate to java sources. but if make (without test) is called, cargo test is always called when building the launcher. That means tests are always carried out on rust sources. After setting MAKE_JOBS_UNSAFE = yes in the port-Makefile, I tried again to reproduce the error through many builds, but this was no longer possible.
Comment 11 commit-hook freebsd_committer freebsd_triage 2020-07-23 02:17:20 UTC
A commit references this bug:

Author: glewis
Date: Thu Jul 23 02:16:30 UTC 2020
New revision: 542907
URL: https://svnweb.freebsd.org/changeset/ports/542907

Log:
  Update to 1.8.4

  PR:		244976
  Submitted by:	Lars Herschke <lhersch@dssgmbh.de>

Changes:
  head/java/icedtea-web/Makefile
  head/java/icedtea-web/distinfo
  head/java/icedtea-web/files/patch-Makefile.am
  head/java/icedtea-web/files/patch-Makefile.in
  head/java/icedtea-web/files/patch-configure
  head/java/icedtea-web/files/patch-configure.ac
  head/java/icedtea-web/files/patch-netx_net_sourceforge_jnlp_util_XDesktopEntry.java
  head/java/icedtea-web/files/patch-plugin_icedteanp_IcedTeaNPPlugin.cc
  head/java/icedtea-web/files/patch-rust-launcher_Cargo.toml
  head/java/icedtea-web/pkg-plist
Comment 12 Lars Herschke 2020-07-24 13:49:04 UTC
Created attachment 216744 [details]
Makefile and pkg-plist patch

Here's a little patch that adds rust to the build dependencies, limits the Java version, and fixes the pkg-plist.

See also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248197
Comment 13 Lars Herschke 2020-07-24 13:50:49 UTC
reopen for small fixes
Comment 14 commit-hook freebsd_committer freebsd_triage 2020-07-24 23:53:42 UTC
A commit references this bug:

Author: glewis
Date: Fri Jul 24 23:53:32 UTC 2020
New revision: 543385
URL: https://svnweb.freebsd.org/changeset/ports/543385

Log:
  * Add missing build depends
  * Restrict Java versions
  * Fix packing list

  PR:		244976
  Submitted by:	Lars Herschke <lhersch@dssgmbh.de>

Changes:
  head/java/icedtea-web/Makefile
  head/java/icedtea-web/pkg-plist
Comment 15 Lars Herschke 2020-07-25 10:33:08 UTC
Created attachment 216757 [details]
restriction to java 8 java

Sorry for reopening, but building with java 7 is also not possible.
Comment 16 Lars Herschke 2020-07-25 10:34:42 UTC
reopen again, see comment above
Comment 17 commit-hook freebsd_committer freebsd_triage 2020-07-25 17:58:42 UTC
A commit references this bug:

Author: glewis
Date: Sat Jul 25 17:58:07 UTC 2020
New revision: 543427
URL: https://svnweb.freebsd.org/changeset/ports/543427

Log:
  Restrict to Java 8 only

  PR:		244976
  Submitted by:	Lars Herschke <lhersch@dssgmbh.de>

Changes:
  head/java/icedtea-web/Makefile
Comment 18 Joseph Mingrone freebsd_committer freebsd_triage 2020-07-28 02:16:24 UTC
There is a plist issue with the bash completion files.

====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: etc/bash_completion.d/itweb-settings.bash
Error: Orphaned: etc/bash_completion.d/javaws.bash
Error: Orphaned: etc/bash_completion.d/policyeditor.bash
===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: share/bash-completion/completions/itweb-settings.bash
Error: Missing: share/bash-completion/completions/javaws.bash
Error: Missing: share/bash-completion/completions/policyeditor.bash
===> Error: Plist issues found.
*** Error code 1

Here is the full poudriere build log:
http://pkg.awarnach.mathstat.dal.ca/data/12amd64-default/2020-07-27_17h38m18s/logs/errors/icedtea-web-1.8.4_1.log
Comment 19 Greg Lewis freebsd_committer freebsd_triage 2020-07-28 15:36:41 UTC
It looks like the bash completion directory is different.  E.g. I see locally:

> pkg-config --variable=completionsdir bash-completion
/usr/local/share/bash-completion/completions

But clearly the build machines are seeing something different.
Comment 20 Joseph Mingrone freebsd_committer freebsd_triage 2020-07-28 15:42:08 UTC
It looks like there are also issues with the build machines.

http://beefy6.nyi.freebsd.org/data/latest-per-pkg/icedtea-web/1.8.4_1/121amd64-default.log
Comment 21 Joseph Mingrone freebsd_committer freebsd_triage 2020-07-28 15:43:48 UTC
I just now realized that you meant the build machines are seeing something different *than your local pkg-config output* and not the poudriere output that I posted.
Comment 22 Greg Lewis freebsd_committer freebsd_triage 2020-07-28 15:45:59 UTC
We likely have two options.

1. Use pkg-config to detect where bash completions live and use SUB_LIST to dynamically set that location in the packing list

2. Force the completion directory to be one of the two.  There is a variable that configure --help reports to be able to set this.

Preference is probably the first option.
Comment 23 Greg Lewis freebsd_committer freebsd_triage 2020-07-28 15:48:30 UTC
Different ports use different directories for the completion scripts.

E.g. Look at sysutils/pass-update/Makefile

BASHCOMPDIR=${PREFIX}/share/bash-completions/completions

vs sysutils/nut/pkg-plist

%%BASH%%etc/bash_completion.d/nut.bash_completion
Comment 24 Greg Lewis freebsd_committer freebsd_triage 2020-07-28 15:50:19 UTC
Yes, I meant that it looks like different installations think the bash completion dir is one of two different locations.  The port currently assumes it is one of those and if it's the other then the packing list breaks.

I'm not sure why the difference in the first place though.
Comment 25 Lars Herschke 2020-07-29 18:52:05 UTC
Created attachment 216865 [details]
patch to solve completion-dir problem
Comment 26 Joseph Mingrone freebsd_committer freebsd_triage 2020-07-29 18:59:41 UTC
Thanks Lars.  Do you know what causes the completion directory to vary?

The Porter's Handbook has something to say on this: https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/book.html#shell-completion  That is, bash completion files go in ${PREFIX}/etc/bash_completion.d.

I think it would be ideal if the files were always installed in the same place.
Comment 27 commit-hook freebsd_committer freebsd_triage 2020-07-30 07:00:01 UTC
A commit references this bug:

Author: glewis
Date: Thu Jul 30 06:59:41 UTC 2020
New revision: 543713
URL: https://svnweb.freebsd.org/changeset/ports/543713

Log:
  Fix packing list

  * Force bash completion to install into ${PREFIX}/etc/bash_completion.d
  * Adjust packing list to reflect this

  PR:		244976

Changes:
  head/java/icedtea-web/Makefile
  head/java/icedtea-web/pkg-plist
Comment 28 Lars Herschke 2020-07-30 07:26:06 UTC
I found my solution better for the following reasons.

On a freshly installed FreeBSD 12, completionsdir is set to /usr/local/share/bash-completion/completion contrary to what is stated in the Porter's Handbook.

In addition, the README.md of the port shells/bash-completion states the following.

"
Q. I author/maintain package X and would like to maintain my own
   completion code for this package. Where should I put it to be sure
   that interactive bash shells will find it and source it?

A. Install it in one of the directories pointed to by
   bash-completion's `pkgconfig` file variables. There are two
   alternatives:

   - The recommended directory is `completionsdir`, which you can get with
   `pkg-config --variable=completionsdir bash-completion`. From this
   directory, completions are loaded on-demand based on invoked commands' names,
   so be sure to name your completion file accordingly, and to include
   (for example) symbolic links in case the file provides completions
   for more than one command.
   ...
   For packages using GNU autotools the installation can be handled
   for example like this in `configure.ac`:

   ```
   PKG_CHECK_VAR(bashcompdir, [bash-completion], [completionsdir], ,
     bashcompdir="${sysconfdir}/bash_completion.d")
   AC_SUBST(bashcompdir)
   ```
"

Icedtea-web uses exactly the method mentioned in its configure.ac.
Comment 29 Lars Herschke 2020-07-31 18:35:20 UTC
Created attachment 216912 [details]
fix for rust-launcher and for bash-completion

This patch fixes the warning "fallback to hardcoded paths" from the rust launchers and it ensures that the bash completion also works for itweb-javaws and itweb-policyeditor.
Comment 30 Lars Herschke 2020-07-31 18:37:24 UTC
reopened for patch
Comment 31 commit-hook freebsd_committer freebsd_triage 2020-08-08 01:33:33 UTC
A commit references this bug:

Author: glewis
Date: Sat Aug  8 01:33:27 UTC 2020
New revision: 544356
URL: https://svnweb.freebsd.org/changeset/ports/544356

Log:
  Fix rust launchers and bash completion

  PR:		244976
  Submitted by:	Lars Herschke <lhersch@dssgmbh.de>

Changes:
  head/java/icedtea-web/Makefile
  head/java/icedtea-web/files/patch-completion_javaws.bash.in
  head/java/icedtea-web/files/patch-completion_policyeditor.bash.in