[rfc][icedtea] makefiel part of fix of rhbz 580478
Jiri Vanek
jvanek at redhat.com
Thu Jan 5 07:33:48 PST 2012
2011-12-21 Jiri Vanek <jvanek at redhat.com>
fixes rhbz#580478
* Makefile.am:
(EXTRA_DIST) console.desktop policytool.desktop replaced by *.in files
(clean-local) now depends on new target clean-desktop-files
(jconsole.desktop) new target which transforms
jconsole.desktop.in to jconsole.desktop, using default or set value
(policytool.desktop) new target which transforms
policytool.desktop.in to policytool.desktop, using default or set value
(clean-desktop-files) new target, removes policytool.desktop and jconsole.desktop
(stamps/icedtea.stamp) now depends also on console.desktop policytool.desktop
(stamps/icedtea-debug.stamp) likewise, as enforced by stamps/icedtea.stamp comment
* configure.ac: abs-install-dir block moved outside conditional ENABLE_SYSTEMTAP block
* jconsole.desktop: removed, replaced by jconsole.desktop.in
* jconsole.desktop.in: new file, stub for desktop file, have variable
to be substitued during make
* policytool.desktop: removed, replaced by policytool.desktop.in
* policytool.desktop.in: new file, stub for desktop file, have variable
to be substituted during make
Flowing Andrew's advice, now using abs-install-dir.
Your remaining hints were also fixed. Looks better now :).
On 12/21/2011 05:41 PM, Omair Majid wrote:
> On 12/21/2011 10:31 AM, Jiri Vanek wrote:
>> hi all!
>
> Hi Jiri,
>
> I would be nice to know some background about the problem to you are trying to fix without having to look into the bugzilla :)
>
> It seems like the right "fix" for this sort of problem would be to support 'make install' in icedtea6. But given that's something not possible at the moment, a bandaid like this will do.
>
>> Second part of fix will be to use this new --with-val in spec files
>>
>
> I am not sure if --with-jconsole is a good name. On first look, it looks like you are saying which jconosle to use to build icedtea6. See what the autoconf docs have to say about --with-foo:
> http://www.gnu.org/software/autoconf/manual/autoconf.html#External-Software
>
>> 2011-12-21 Jiri Vanek <jvanek at redhat.com>
>>
>> partially fixes rhbz#580478
>> * Makefile.am:
>> (EXTRA_DIST) removed console.desktop policytool.desktop targets
>> to be available during make, and not only during make dist
>> (clean-local) now depends on new target clean-desktop-files
>> (jconsole.desktop) new target which transforms
>> jconsole.desktop.in to jconsole.desktop, using default or set value
>> (policytool.desktop) new target which transforms
>> policytool.desktop.in to policytool.desktop, using default or set
>> value
>> (clean-desktop-files) new target, removes policytool.desktop and
>> jconsole.desktop
>> (stamps/icedtea.stamp) now depends also on console.desktop
>> policytool.desktop
>> (stamps/icedtea-debug.stamp) likewise, as enforced by
>> stamps/icedtea.stamp comment
>> * acinclude.m4:
>> added definitions of IT_SET_JCONSOLE_DESKTOP and
>> IT_SET_POLICYTOOL_DESKTOP,
>> which allows to set user paths used in jconsole and policytool
>> desktop files,
>> or use defaults
>> * configure.ac: called IT_SET_JCONSOLE_DESKTOP and
>> IT_SET_POLICYTOOL_DESKTOP
>> * jconsole.desktop: removed, replaced by jconsole.desktop.in
>> * jconsole.desktop.in: new file, stub for desktop file, have variable
>> to be substitued during make
>> * policytool.desktop: removed, replaced by policytool.desktop.in
>> * policytool.desktop.in: new file, stub for desktop file, have
>> variable
>> to be substituted during make
>>
>
> More comments on the patch below.
>
>> To fulfil the bug, it will needs probably backport to 1.9 and 1.10 (1.11?)
>>
>> Regards, J.
>>
>> setableDesktpsPaths.patch
>>
>>
>> diff -r cf80d2049346 Makefile.am
>> --- a/Makefile.am Tue Dec 20 13:49:11 2011 -0500
>> +++ b/Makefile.am Wed Dec 21 15:58:05 2011 +0100
>> @@ -616,7 +616,6 @@
>> $(top_srcdir)/patches/* \
>> contrib arm_port \
>> overlays \
>> - jconsole.desktop policytool.desktop \
>
> You probably want to add the *.in files here. Otherwise 'make dist' will not include the jconsole.desktop.in file.
>
>> $(JTREG_SRCS) HACKING pulseaudio fsg.sh \
>> hotspot.map \
>> autogen.sh \
>> @@ -641,7 +640,7 @@
>> clean-icedtea-against-ecj clean-extract-ecj clean-generated clean-replace-hotspot \
>> clean-rewriter clean-rewrite-rhino clean-rt clean-bootstrap-directory \
>> clean-bootstrap-directory-ecj clean-bootstrap-directory-symlink \
>> - clean-bootstrap-directory-symlink-ecj clean-fonts
>> + clean-bootstrap-directory-symlink-ecj clean-fonts clean-desktop-files
>> if [ -e bootstrap ]; then \
>> rmdir bootstrap ; \
>> fi
>> @@ -702,8 +701,13 @@
>> # OpenJDK Source Preparation Targets
>> # ==================================
>>
>> -# Download OpenJDK sources.
>> +jconsole.desktop:
>
> Perhaps this should be:
> jconsole.destkop: jconsole.desktop.in
>
>> + cat jconsole.desktop.in | sed s,JCONSOLE_DESKTOP,$(JCONSOLE_DESKTOP),> jconsole.desktop
>>
>
> You can use '<' on sed to save the invocation of the cat command:
> sed -e regular_expression_here < jconsole.desktop.in > jconsole.desktop
>
>> +policytool.desktop:
>> + cat policytool.desktop.in | sed s,POLICYTOOL_DESKTOP,$(POLICYTOOL_DESKTOP),> policytool.desktop
>> +
>> +# Download OpenJDK sources.
>> stamps/hgforest.stamp:
>> if !USE_HG
>> else
>> @@ -1073,6 +1077,10 @@
>> clean-fonts:
>> rm -f stamps/fonts.stamp
>>
>> +clean-desktop-files:
>> + -rm -f policytool.desktop
>> + -rm -f jconsole.desktop
>> +
>> stamps/patch-fsg.stamp: stamps/fonts.stamp
>> mkdir -p stamps ; \
>> rm -f stamps/patch-fsg.stamp.tmp ; \
>> @@ -1381,7 +1389,7 @@
>> # you change it in the icedtea-debug target as well.
>> stamps/icedtea.stamp: stamps/bootstrap-directory-symlink.stamp \
>> $(OPENJDK_TREE) stamps/cacao.stamp stamps/rewrite-rhino.stamp \
>> - stamps/jamvm.stamp
>> + stamps/jamvm.stamp jconsole.desktop policytool.desktop
>> $(ARCH_PREFIX) $(MAKE) -j1 \
>> $(ICEDTEA_ENV) \
>> -C openjdk \
>> @@ -1412,7 +1420,7 @@
>>
>> stamps/icedtea-debug.stamp: stamps/bootstrap-directory-symlink.stamp \
>> $(OPENJDK_TREE) stamps/cacao.stamp stamps/rewrite-rhino.stamp \
>> - stamps/jamvm.stamp
>> + stamps/jamvm.stamp jconsole.desktop policytool.desktop
>> $(ARCH_PREFIX) $(MAKE) -j1 \
>> $(ICEDTEA_ENV) \
>> -C openjdk \
>> diff -r cf80d2049346 acinclude.m4
>> --- a/acinclude.m4 Tue Dec 20 13:49:11 2011 -0500
>> +++ b/acinclude.m4 Wed Dec 21 15:58:05 2011 +0100
>> @@ -129,6 +129,37 @@
>> AC_SUBST(OS_PATH)
>> ])
>>
>> +AC_DEFUN([IT_SET_JCONSOLE_DESKTOP],
>> +[
>> + AC_MSG_CHECKING([which jconsole path will be used])
>> + AC_ARG_WITH([jconsole],
>> + [AS_HELP_STRING(--with-jconsole,specify location of the jconsole used in jconsole.desktop file)],
>> + [
>> + JCONSOLE_DESKTOP="${withval}"
>> + ],
>> + [
>> + JCONSOLE_DESKTOP="/usr/bin/jconsole"
>> + ])
>> + AC_MSG_RESULT([${JCONSOLE_DESKTOP}])
>> + AC_SUBST(JCONSOLE_DESKTOP)
>> +])
>> +
>> +AC_DEFUN([IT_SET_POLICYTOOL_DESKTOP],
>> +[
>> + AC_MSG_CHECKING([which policytool path will be used])
>> + AC_ARG_WITH([policytool],
>> + [AS_HELP_STRING(--with-policytool,specify location of the policytool used in policytool.desktop file)],
>> + [
>> + POLICYTOOL_DESKTOP="${withval}"
>> + ],
>> + [
>> + POLICYTOOL_DESKTOP="/usr/bin/policytool"
>> + ])
>> + AC_MSG_RESULT([${POLICYTOOL_DESKTOP}])
>> + AC_SUBST(POLICYTOOL_DESKTOP)
>> +])
>> +
>> +
>> AC_DEFUN([IT_FIND_JAVAC],
>> [
>> JAVAC=${SYSTEM_JDK_DIR}/bin/javac
>> diff -r cf80d2049346 configure.ac
>> --- a/configure.ac Tue Dec 20 13:49:11 2011 -0500
>> +++ b/configure.ac Wed Dec 21 15:58:05 2011 +0100
>> @@ -31,6 +31,9 @@
>> IT_FIND_TOOL([UNZIP], [unzip])
>> IT_FIND_TOOL([CPIO], [cpio])
>> IT_FIND_TOOL([FILE], [file])
>> +IT_SET_JCONSOLE_DESKTOP
>> +IT_SET_POLICYTOOL_DESKTOP
>> +
>> AC_CHECK_TOOLS([FASTJAR], [fastjar jar])
>> if test "x$FASTJAR" = x; then
>> AC_MSG_ERROR([Can't find fastjar or jar])
>> diff -r cf80d2049346 jconsole.desktop
>> --- a/jconsole.desktop Tue Dec 20 13:49:11 2011 -0500
>> +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
>> @@ -1,10 +0,0 @@
>> -[Desktop Entry]
>> -Name=OpenJDK Monitoring& Management Console
>> -Comment=Monitor and manage OpenJDK applications
>> -Exec=/usr/bin/jconsole
>> -Icon=java
>> -Terminal=false
>> -Type=Application
>> -StartupWMClass=sun-tools-jconsole-JConsole
>> -Categories=Development;Monitor;Java;
>> -Version=1.0
>> diff -r cf80d2049346 jconsole.desktop.in
>> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
>> +++ b/jconsole.desktop.in Wed Dec 21 15:58:05 2011 +0100
>> @@ -0,0 +1,11 @@
>> +[Desktop Entry]
>> +Name=OpenJDK Monitoring& Management Console
>> +Comment=Monitor and manage OpenJDK applications
>> +Exec=JCONSOLE_DESKTOP
>
> It might be a good idea to use @ around JCONSOLE_DESKTOP (as in @JCONSOLE_DESKTOP@). This is the normal convention for specifying a variable that will be replaced in a .in file.
>
>> +Icon=java
>> +Terminal=false
>> +Type=Application
>> +StartupWMClass=sun-tools-jconsole-JConsole
>> +Categories=Development;Monitor;Java;
>> +Version=1.0
>> +Name[en_US]=jconsole.desktop
>
> This Name doesn't look right. Shouldn't this be "OpenJDK Monitoring & Management Console"? Name (and Name[*], since name is of type localestring) is supposed to be the name of the application:
> http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html
>
>> diff -r cf80d2049346 policytool.desktop
>> --- a/policytool.desktop Tue Dec 20 13:49:11 2011 -0500
>> +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
>> @@ -1,10 +0,0 @@
>> -[Desktop Entry]
>> -Name=OpenJDK Policy Tool
>> -Comment=Manage OpenJDK policy files
>> -Exec=/usr/bin/policytool
>> -Icon=java
>> -Terminal=false
>> -Type=Application
>> -StartupWMClass=sun-security-tools-PolicyTool
>> -Categories=Development;Java;
>> -Version=1.0
>> diff -r cf80d2049346 policytool.desktop.in
>> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
>> +++ b/policytool.desktop.in Wed Dec 21 15:58:05 2011 +0100
>> @@ -0,0 +1,11 @@
>> +[Desktop Entry]
>> +Name=OpenJDK Policy Tool
>> +Comment=Manage OpenJDK policy files
>> +Exec=POLICYTOOL_DESKTOP
>> +Icon=java
>> +Terminal=false
>> +Type=Application
>> +StartupWMClass=sun-security-tools-PolicyTool
>> +Categories=Development;Java;
>> +Version=1.0
>> +Name[en_US]=policytool.desktop
>>
>
> Cheers,
> Omair
-------------- next part --------------
A non-text attachment was scrubbed...
Name: setableDesktpsPaths2.patch
Type: text/x-patch
Size: 5885 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120105/2ff3ff6d/setableDesktpsPaths2.patch
More information about the distro-pkg-dev
mailing list