Created attachment 212611 [details] This patch updates the port to the latest release.
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.
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.
Created attachment 215350 [details] Here is a new patch for release 1.8.4
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.
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.
Created attachment 215574 [details] New patch that also removes dependencies from Cargo.toml
Created attachment 216383 [details] Log of build failure Build fails for me. Attaching log.
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.
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 :)
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.
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
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
reopen for small fixes
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
Created attachment 216757 [details] restriction to java 8 java Sorry for reopening, but building with java 7 is also not possible.
reopen again, see comment above
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
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
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.
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
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.
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.
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
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.
Created attachment 216865 [details] patch to solve completion-dir problem
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.
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
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.
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.
reopened for patch
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