/hg/icedtea-web: 2 new changesets
jvanek at icedtea.classpath.org
jvanek at icedtea.classpath.org
Wed May 10 11:41:31 UTC 2017
changeset c354ddd6de5f in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=c354ddd6de5f
author: Jiri Vanek <jvanek at redhat.com>
date: Wed May 10 12:41:53 2017 +0200
PR3366 - Install bash completion to configured dynamic load location (3/4)
* Makefile.am: BASH_CMPL_DEST_DIR subsituted from bashcompdir
* configure.ac: added PKG_CHECK_VAR on bashcompdir and bash-completion
changeset 90c27b3bf5a6 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=90c27b3bf5a6
author: Jiri Vanek <jvanek at redhat.com>
date: Wed May 10 13:34:34 2017 +0200
PR3366 - Split bash completion to (three) files per binary (4./4)
* NEWS: mentioned configure-ability and split to three
* icedteaweb-completion.in: removed (split to three following files)
* completion/itweb-settings.bash.in: new file, extracted from icedteaweb-completion.in individual @@ replace identifiers replaced by OPTIONS
* completion/javaws.bash.in: same
* completion/policyeditor.bash.in: same
* Makefile: EXTRA_DIST now lists completion dir instead of icedteaweb-completion.in file (install-exec-local) installs three new files instead of old one. (uninstall-local) same with removal. (TOP_BUILD_DIR/completion/itweb-settings.bash) split to three targets accordingly. (clean-icedteaweb-completion) as uninstall.
diffstat:
ChangeLog | 22 +++++++++++++
Makefile.am | 47 +++++++++++++++++++----------
NEWS | 1 +
completion/itweb-settings.bash.in | 13 ++++++++
completion/javaws.bash.in | 31 +++++++++++++++++++
completion/policyeditor.bash.in | 13 ++++++++
configure.ac | 4 ++
icedteaweb-completion.in | 62 ---------------------------------------
8 files changed, 115 insertions(+), 78 deletions(-)
diffs (289 lines):
diff -r 13cf373ecdba -r 90c27b3bf5a6 ChangeLog
--- a/ChangeLog Thu May 04 16:13:43 2017 +0200
+++ b/ChangeLog Wed May 10 13:34:34 2017 +0200
@@ -1,3 +1,25 @@
+2017-05-10 Jiri Vanek <jvanek at redhat.com>
+ Ville Skyttä <ville.skytta at iki.fi>
+
+ PR3366 - Split bash completion to (three) files per binary (4./4)
+ * NEWS: mentioned configure-ability and split to three
+ * icedteaweb-completion.in: removed (split to three following files)
+ * completion/itweb-settings.bash.in: new file, extracted from icedteaweb-completion.in
+ individual @@ replace identifiers replaced by OPTIONS
+ * completion/javaws.bash.in: same
+ * completion/policyeditor.bash.in: same
+ * Makefile: EXTRA_DIST now lists completion dir instead of icedteaweb-completion.in file
+ (install-exec-local) installs three new files instead of old one.
+ (uninstall-local) same with removal. (TOP_BUILD_DIR/completion/itweb-settings.bash)
+ split to three targets accordingly. (clean-icedteaweb-completion) as uninstall.
+
+2017-05-10 Jiri Vanek <jvanek at redhat.com>
+ Ville Skyttä <ville.skytta at iki.fi>
+
+ PR3366 - Install bash completion to configured dynamic load location (3/4)
+ * Makefile.am: BASH_CMPL_DEST_DIR subsituted from bashcompdir
+ * configure.ac: added PKG_CHECK_VAR on bashcompdir and bash-completion
+
2017-05-04 Jiri Vanek <jvanek at redhat.com>
* Makefile: (stamps/run-netx-unit-tests.stamp) variable CLASSPATH's content
diff -r 13cf373ecdba -r 90c27b3bf5a6 Makefile.am
--- a/Makefile.am Thu May 04 16:13:43 2017 +0200
+++ b/Makefile.am Wed May 10 13:34:34 2017 +0200
@@ -34,7 +34,7 @@
export NETX_SRCDIR = $(TOP_SRC_DIR)/netx
export NETX_RESOURCE_DIR=$(NETX_SRCDIR)/net/sourceforge/jnlp/resources
export ICONS_DEST_DIR=$(DESTDIR)$(datadir)/pixmaps
-export BASH_CMPL_DEST_DIR=$(DESTDIR)$(sysconfdir)/bash_completion.d
+export BASH_CMPL_DEST_DIR=$(DESTDIR)@bashcompdir@
export WIN_ALL_DEPS=$(DESTDIR)$(prefix)/win-deps-all
export WIN_RUN_DEPS=$(DESTDIR)$(prefix)/win-deps-runtime
@@ -248,7 +248,7 @@
export PLUGIN_VERSION = IcedTea-Web $(FULL_VERSION)
-export EXTRA_DIST = $(top_srcdir)/netx $(top_srcdir)/plugin javaws.png javaws.desktop.in policyeditor.desktop.in icedteaweb-completion.in \
+export EXTRA_DIST = $(top_srcdir)/netx $(top_srcdir)/plugin javaws.png javaws.desktop.in policyeditor.desktop.in $(top_srcdir)/completion \
itweb-settings.desktop.in launcher $(top_srcdir)/tests html-gen.sh NEW_LINE_IFS $(top_srcdir)/metadata.in
# reproducers `D`shortcuts
@@ -318,7 +318,9 @@
${INSTALL_DATA} $(NETX_DIR)/lib/classes.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar
${INSTALL_DATA} $(NETX_SRCDIR)/javaws_splash.png $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/javaws_splash.png
${INSTALL_DATA} $(TOP_SRC_DIR)/javaws.png $(ICONS_DEST_DIR)/
- ${INSTALL_DATA} $(TOP_BUILD_DIR)/icedteaweb-completion $(BASH_CMPL_DEST_DIR)/icedteaweb-completion
+ ${INSTALL_DATA} $(TOP_BUILD_DIR)/completion/itweb-settings.bash $(BASH_CMPL_DEST_DIR)/
+ ${INSTALL_DATA} $(TOP_BUILD_DIR)/completion/javaws.bash $(BASH_CMPL_DEST_DIR)/
+ ${INSTALL_DATA} $(TOP_BUILD_DIR)/completion/policyeditor.bash $(BASH_CMPL_DEST_DIR)/
${INSTALL_PROGRAM} launcher.build/$(javaws) $(DESTDIR)$(bindir)
${INSTALL_PROGRAM} launcher.build/$(itweb_settings) $(DESTDIR)$(bindir)
${INSTALL_PROGRAM} launcher.build/$(policyeditor) $(DESTDIR)$(bindir)
@@ -392,7 +394,9 @@
rm -f $(DESTDIR)$(bindir)/$(itweb_settings)
rm -f $(DESTDIR)$(bindir)/$(policyeditor)
rm -rf $(DESTDIR)$(htmldir)
- rm -f $(BASH_CMPL_DEST_DIR)/icedteaweb-completion
+ rm -f $(BASH_CMPL_DEST_DIR)/itweb-settings.bash
+ rm -f $(BASH_CMPL_DEST_DIR)/javaws.bash
+ rm -f $(BASH_CMPL_DEST_DIR)/policyeditor.bas
if WINDOWS
rm -rf $(WIN_ALL_DEPS)
rm -rf $(WIN_RUN_DEPS)
@@ -642,17 +646,26 @@
# appstreamcli validate $(TOP_BUILD_DIR)/metadata/*.appdata.xml $(TOP_BUILD_DIR)/metadata/*.metainfo.xml
-$(TOP_BUILD_DIR)/icedteaweb-completion: $(TOP_SRC_DIR)/icedteaweb-completion.in stamps/netx.stamp
+$(TOP_BUILD_DIR)/completion/itweb-settings.bash: $(TOP_SRC_DIR)/completion/itweb-settings.bash.in stamps/netx.stamp
OPTIONS_COMMAND="$(SYSTEM_JRE_DIR)/bin/java -cp $(NETX_DIR) net.sourceforge.jnlp.OptionsDefinitions" ; \
- JAVAWS=`$$OPTIONS_COMMAND javaws` ; \
- POLICYEDITOR=`$$OPTIONS_COMMAND policyeditor` ; \
- ITWEBSETTINGS=`$$OPTIONS_COMMAND itweb-settings`; \
- echo $$JAVAWS ; \
- echo $$POLICYEDITOR ; \
- echo $$ITWEBSETTINGS ; \
- cat $(TOP_SRC_DIR)/icedteaweb-completion.in | sed "s/@JAVAWS@/$${JAVAWS}/" \
- | sed "s/@POLICYEDITOR@/$${POLICYEDITOR}/" | \
- sed "s/@ITWEBSETTINGS@/$${ITWEBSETTINGS}/" > $(TOP_BUILD_DIR)/icedteaweb-completion ;
+ OPTIONS=`$$OPTIONS_COMMAND itweb-settings`; \
+ echo $$OPTIONS ; \
+ cat $(TOP_SRC_DIR)/completion/itweb-settings.bash.in | \
+ sed "s/@OPTIONS@/$${OPTIONS}/" > $@ ;
+
+$(TOP_BUILD_DIR)/completion/javaws.bash: $(TOP_SRC_DIR)/completion/javaws.bash.in stamps/netx.stamp
+ OPTIONS_COMMAND="$(SYSTEM_JRE_DIR)/bin/java -cp $(NETX_DIR) net.sourceforge.jnlp.OptionsDefinitions" ; \
+ OPTIONS=`$$OPTIONS_COMMAND javaws` ; \
+ echo $$OPTIONS ; \
+ cat $(TOP_SRC_DIR)/completion/javaws.bash.in | \
+ sed "s/@OPTIONS@/$${OPTIONS}/" > $@ ;
+
+$(TOP_BUILD_DIR)/completion/policyeditor.bash: $(TOP_SRC_DIR)/completion/policyeditor.bash.in stamps/netx.stamp
+ OPTIONS_COMMAND="$(SYSTEM_JRE_DIR)/bin/java -cp $(NETX_DIR) net.sourceforge.jnlp.OptionsDefinitions" ; \
+ OPTIONS=`$$OPTIONS_COMMAND policyeditor` ; \
+ echo $$OPTIONS ; \
+ cat $(TOP_SRC_DIR)/completion/policyeditor.bash.in | \
+ sed "s/@OPTIONS@/$${OPTIONS}/" > $@ ;
stamps/generate-docs.stamp: stamps/netx.stamp
mkdir -p "$(DOCS_DIR)" ; \
@@ -721,7 +734,7 @@
mkdir -p stamps
touch $@
-stamps/netx-dist.stamp: stamps/netx.stamp $(TOP_BUILD_DIR)/netx.manifest stamps/generate-docs.stamp $(TOP_BUILD_DIR)/icedteaweb-completion $(TOP_BUILD_DIR)/metadata
+stamps/netx-dist.stamp: stamps/netx.stamp $(TOP_BUILD_DIR)/netx.manifest stamps/generate-docs.stamp $(TOP_BUILD_DIR)/completion/itweb-settings.bash $(TOP_BUILD_DIR)/completion/javaws.bash $(TOP_BUILD_DIR)/completion/policyeditor.bash $(TOP_BUILD_DIR)/metadata
(cd $(NETX_DIR) ; \
mkdir -p lib ; \
$(SYSTEM_JDK_DIR)/bin/jar cfm lib/classes.jar \
@@ -862,7 +875,9 @@
rm -f stamps/generate-docs.stamp
clean-icedteaweb-completion:
- rm -f $(TOP_BUILD_DIR)/icedteaweb-completion
+ rm -f $(TOP_BUILD_DIR)/completion/itweb-settings.bash
+ rm -f $(TOP_BUILD_DIR)/completion/javaws.bash
+ rm -f $(TOP_BUILD_DIR)/completion/policyeditor.bash
clean-metadata:
rm -rf $(TOP_BUILD_DIR)/metadata
diff -r 13cf373ecdba -r 90c27b3bf5a6 NEWS
--- a/NEWS Thu May 04 16:13:43 2017 +0200
+++ b/NEWS Wed May 10 13:34:34 2017 +0200
@@ -9,6 +9,7 @@
CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY
New in release 1.7 (2015-XX-XX):
+* PR3366 - bash completion file was split to three, and is setup-able by bashcompdir environment variable
* added experimental support for java 9
* added experimental support for jnlp protocol (see https://bugs.openjdk.java.net/browse/JDK-8055464)
* restricted to JDK8 and higher
diff -r 13cf373ecdba -r 90c27b3bf5a6 completion/itweb-settings.bash.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/completion/itweb-settings.bash.in Wed May 10 13:34:34 2017 +0200
@@ -0,0 +1,13 @@
+_itwebsettings()
+{
+ local cur prev opts base
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+
+ # Icedtea-web settings Options
+ opts="@OPTIONS@"
+
+ COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
+ return 0
+}
+complete -F _itwebsettings itweb-settings
diff -r 13cf373ecdba -r 90c27b3bf5a6 completion/javaws.bash.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/completion/javaws.bash.in Wed May 10 13:34:34 2017 +0200
@@ -0,0 +1,31 @@
+_javaws()
+{
+ local cur prev opts base
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+
+ # JavaWs Options
+ opts="@OPTIONS@"
+ if [[ $prev == *"-jnlp" || $prev == *"-html" ]] ; then
+ COMPREPLY=($(compgen -f -X "!*" -- ${cur}))
+ if [ -d "$COMPREPLY" ] ; then
+ COMPREPLY="$COMPREPLY/"
+ fi
+ return 0
+ fi
+ if [[ $cur == "" ]] ; then
+ COMPREPLY=($(compgen -W "aa_file_or_url ${opts} zz_file_or_url" -- ${cur}))
+ return 0
+ fi
+ if [[ $cur == "-"* ]] ; then
+ COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
+ return 0
+ else
+ COMPREPLY=($(compgen -f -X "!*" -- ${cur}))
+ if [ -d "$COMPREPLY" ] ; then
+ COMPREPLY="$COMPREPLY/"
+ fi
+ return 0
+ fi
+}
+complete -F _javaws javaws
diff -r 13cf373ecdba -r 90c27b3bf5a6 completion/policyeditor.bash.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/completion/policyeditor.bash.in Wed May 10 13:34:34 2017 +0200
@@ -0,0 +1,13 @@
+_policyeditor()
+{
+ local cur prev opts base
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+
+ # PolicyEditor Options
+ opts="@OPTIONS@"
+
+ COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
+ return 0
+}
+complete -F _policyeditor policyeditor
diff -r 13cf373ecdba -r 90c27b3bf5a6 configure.ac
--- a/configure.ac Thu May 04 16:13:43 2017 +0200
+++ b/configure.ac Wed May 10 13:34:34 2017 +0200
@@ -157,6 +157,10 @@
IT_CHECK_FOR_TAGSOUP
+PKG_CHECK_VAR(bashcompdir, [bash-completion], [completionsdir], ,
+ bashcompdir="${sysconfdir}/bash_completion.d")
+AC_SUBST(bashcompdir)
+
AC_CONFIG_FILES([jrunscript], [chmod u+x jrunscript])
AC_CONFIG_FILES([build.properties])
diff -r 13cf373ecdba -r 90c27b3bf5a6 icedteaweb-completion.in
--- a/icedteaweb-completion.in Thu May 04 16:13:43 2017 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-#/bin/bash
-#place this file over to /etc/bash_completion.d/ to make this file useful
-#Note: If you do not have bash-completion you will need to install it
-_itwebsettings()
-{
- local cur prev opts base
- cur="${COMP_WORDS[COMP_CWORD]}"
- prev="${COMP_WORDS[COMP_CWORD-1]}"
-
- # Icedtea-web settings Options
- opts="@ITWEBSETTINGS@"
-
- COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
- return 0
-}
-complete -F _itwebsettings itweb-settings
-
-_policyeditor()
-{
- local cur prev opts base
- cur="${COMP_WORDS[COMP_CWORD]}"
- prev="${COMP_WORDS[COMP_CWORD-1]}"
-
- # PolicyEditor Options
- opts="@POLICYEDITOR@"
-
- COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
- return 0
-}
-complete -F _policyeditor policyeditor
-
-_javaws()
-{
- local cur prev opts base
- cur="${COMP_WORDS[COMP_CWORD]}"
- prev="${COMP_WORDS[COMP_CWORD-1]}"
-
- # JavaWs Options
- opts="@JAVAWS@"
- if [[ $prev == *"-jnlp" || $prev == *"-html" ]] ; then
- COMPREPLY=($(compgen -f -X "!*" -- ${cur}))
- if [ -d "$COMPREPLY" ] ; then
- COMPREPLY="$COMPREPLY/"
- fi
- return 0
- fi
- if [[ $cur == "" ]] ; then
- COMPREPLY=($(compgen -W "aa_file_or_url ${opts} zz_file_or_url" -- ${cur}))
- return 0
- fi
- if [[ $cur == "-"* ]] ; then
- COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
- return 0
- else
- COMPREPLY=($(compgen -f -X "!*" -- ${cur}))
- if [ -d "$COMPREPLY" ] ; then
- COMPREPLY="$COMPREPLY/"
- fi
- return 0
- fi
-}
-complete -F _javaws javaws
More information about the distro-pkg-dev
mailing list