Discussion:
[wpkg-users] Issues with publishing Java 8u102 over wpkg
Mendim Uka
2016-09-12 09:34:28 UTC
Permalink
Dear WPKG Team :)

Ive actually got a problem with publishing the java versuib 8u102.
Actually installed version is: 8u65 which worked perfectly publishing over wpkg.
Now I want to update to 8u102 but it doesn't work using the same script (adjusted to the version 102)

Used Installer Application: jre-8u102-x64.exe (Java Platform SE binary), and jre-8u102-i586.exe (Java Platform SE binary),

Package Script:

<?xml version="1.0" encoding="UTF-8"?>

<packages>

<package
id="java10"
name="Java Runtime Environment 8"
revision="%version%"
reboot="false">
<variable name="updatever" value="08" />
<variable name="shortupdatever" value="102" />
<variable name="prevshortupdatever" value="65" /> <!--Previous Version-->
<variable name="version" value="8.0.%shortupdatever%" />
<check type="logical" condition="or">
<check type="uninstall" condition="exists" path="Java 8" />
<check type="uninstall" condition="exists" path="Java 8 Update %shortupdatever%" />
<check type="uninstall" condition="exists" path="{26A24AE4-039D-4CA4-87B4-2F832180%shortupdatever%F0}" />
</check>
<install cmd='taskkill /f /im jqs.exe /im iexplore.exe /im firefox.exe'>
<exit code='any' />
</install>

<install cmd='msiexec /i %SOFTWARE%\Java\jre1.8.0_%shortupdatever%.msi JU=0 JAVAUPDATE=0 AUTOUPDATECHECK=0 RebootYesNo=No WEB_JAVA=1 /q' >
<exit code='any' />
</install>

<upgrade cmd='msiexec.exe /qn /x {26A24AE4-039D-4CA4-87B4-2F832180%prevshortupdatever%F0}' /> <!--Remove previous Version-->

<remove cmd='msiexec.exe /qn /x {26A24AE4-039D-4CA4-87B4-2F832180%shortupdatever%F0}' />
<!-- Remove Java Quick Starter -->
<install cmd='%COMSPEC% /C if exist "%PROGRAMFILES%\Java\jre1.8.0_%shortupdatever%\bin\jqs.exe" "%PROGRAMFILES%\Java\jre1.8.0_%shortupdatever\bin\jqs.exe" -unregister'>
<exit code='any' />
</install>

<install cmd='%COMSPEC% /C if exist "%PROGRAMFILES(x86)%\Java\jre1.8.0_%shortupdatever%\bin\jqs.exe" "%PROGRAMFILES(x86)%\Java\jre1.8.0_%shortupdatever\bin\jqs.exe" -unregister'>
<exit code='any' />
</install>
<!-- Remove Java Auto Update -->
<install cmd='REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v SunJavaUpdateSched /f'>
<exit code='any' />
</install>
<downgrade include="install" />
<upgrade architecture="x64" cmd='msiexec /qn /x {26A24AE4-039D-4CA4-87B4-2F864180%prevshortupdatever%F0}' /> <!--Remove previous Version-->
<upgrade include="install" />
<remove architecture="x64" cmd='msiexec /qn /x {26A24AE4-039D-4CA4-87B4-2F864180%shortupdatever%F0}' />
</package>

</packages>


If you have any ideas please send me an email.

Thanks a lot :)


Best Regards

Mendim

[cid:***@01D20CE6.CF5D1100]
Steve Kersley
2016-09-12 10:28:45 UTC
Permalink
Just a guess, but as the SHORTUPDATEVER has rolled over to 3 digits, I assume that the ID generated is wrong. Try removing the zero from in front of the variable:

<check type="uninstall" condition="exists" path="{26A24AE4-039D-4CA4-87B4-2F83218%shortupdatever%F0}"

For consistency, maybe also pad out PREVSHORTUPDATEVER with a leading zero, same with other uses of 2 digit numbers - although that complicates things as looks as though it needs to be checked without a leading zero in the uninstall string, but used as a 3 figure value with leading zero in the uninstall string. Not sure if there's a simple way to do that without having to have multiple variables with and without leading zeroes.

That's just a guess though based on it moving from 2 to 3 digit version number.

PS: I really dislike the 'PREVIOUSVERSION' variable way of removing the old package - in our environment it's quite common for some PCs to be off/away for several months - using this model if they miss an update, the next update then doesn't remove the previous previous version as the script only tells it to remove the previous version which was never installed. With Java, that can be a security concern as the JRE doesn't appear to remove old versions itself, and malicious code in a browser can request older versions of the Java plugin. Basically, Java versioning is a mess, nothing to do with wpkg :)

From: wpkg-users [mailto:wpkg-users-***@lists.wpkg.org] On Behalf Of Mendim Uka
Sent: 12 September 2016 10:34
To: wpkg-***@lists.wpkg.org
Subject: [wpkg-users] Issues with publishing Java 8u102 over wpkg

Dear WPKG Team :)

Ive actually got a problem with publishing the java versuib 8u102.
Actually installed version is: 8u65 which worked perfectly publishing over wpkg.
Now I want to update to 8u102 but it doesn't work using the same script (adjusted to the version 102)

Used Installer Application: jre-8u102-x64.exe (Java Platform SE binary), and jre-8u102-i586.exe (Java Platform SE binary),

Package Script:

<?xml version="1.0" encoding="UTF-8"?>

<packages>

<package
id="java10"
name="Java Runtime Environment 8"
revision="%version%"
reboot="false">

<variable name="updatever" value="08" />
<variable name="shortupdatever" value="102" />
<variable name="prevshortupdatever" value="65" /> <!--Previous Version-->
<variable name="version" value="8.0.%shortupdatever%" />

<check type="logical" condition="or">
<check type="uninstall" condition="exists" path="Java 8" />
<check type="uninstall" condition="exists" path="Java 8 Update %shortupdatever%" />
<check type="uninstall" condition="exists" path="{26A24AE4-039D-4CA4-87B4-2F832180%shortupdatever%F0}" />
</check>

<install cmd='taskkill /f /im jqs.exe /im iexplore.exe /im firefox.exe'>
<exit code='any' />
</install>

<install cmd='msiexec /i %SOFTWARE%\Java\jre1.8.0_%shortupdatever%.msi JU=0 JAVAUPDATE=0 AUTOUPDATECHECK=0 RebootYesNo=No WEB_JAVA=1 /q' >
<exit code='any' />
</install>

<upgrade cmd='msiexec.exe /qn /x {26A24AE4-039D-4CA4-87B4-2F832180%prevshortupdatever%F0}' /> <!--Remove previous Version-->

<remove cmd='msiexec.exe /qn /x {26A24AE4-039D-4CA4-87B4-2F832180%shortupdatever%F0}' />

<!-- Remove Java Quick Starter -->
<install cmd='%COMSPEC% /C if exist "%PROGRAMFILES%\Java\jre1.8.0_%shortupdatever%\bin\jqs.exe" "%PROGRAMFILES%\Java\jre1.8.0_%shortupdatever\bin\jqs.exe" -unregister'>
<exit code='any' />
</install>

<install cmd='%COMSPEC% /C if exist "%PROGRAMFILES(x86)%\Java\jre1.8.0_%shortupdatever%\bin\jqs.exe" "%PROGRAMFILES(x86)%\Java\jre1.8.0_%shortupdatever\bin\jqs.exe" -unregister'>
<exit code='any' />
</install>

<!-- Remove Java Auto Update -->
<install cmd='REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v SunJavaUpdateSched /f'>
<exit code='any' />
</install>

<downgrade include="install" />

<upgrade architecture="x64" cmd='msiexec /qn /x {26A24AE4-039D-4CA4-87B4-2F864180%prevshortupdatever%F0}' /> <!--Remove previous Version-->
<upgrade include="install" />

<remove architecture="x64" cmd='msiexec /qn /x {26A24AE4-039D-4CA4-87B4-2F864180%shortupdatever%F0}' />

</package>

</packages>


If you have any ideas please send me an email.

Thanks a lot :)


Best Regards

Mendim

[cid:***@01D20CE7.CF491E60]
Malte Starostik
2016-09-12 11:36:40 UTC
Permalink
Post by Steve Kersley
Just a guess, but as the SHORTUPDATEVER has rolled over to 3 digits, I
assume that the ID generated is wrong. Try removing the zero from in front
<check type="uninstall" condition="exists"
path="{26A24AE4-039D-4CA4-87B4-2F83218%shortupdatever%F0}"
In fact, someone at Oracle was apparently having a rather misanthropic day and
went the way of maximum surprise:

{26A24AE4-039D-4CA4-87B4-2F83218092F0} 8.92 32 bit and
{26A24AE4-039D-4CA4-87B4-2F86418092F0} 8.92 64 bit
turn to
{26A24AE4-039D-4CA4-87B4-2F32180102F0} 8.102 32 bit and
{26A24AE4-039D-4CA4-87B4-2F64180102F0} 8.102 64 bit

Note how -2F8 in the UUID's last part became just -2F

They did *not* go from 092F0 to 102F0 in the end. Nor 092 to 0A2 to kind of
make use of the hexadecimal charset. Nah. Gotta really surprise packagers
instead.

Kind regards,
Malte
---------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Steve Kersley
2016-09-12 12:13:02 UTC
Permalink
That's nasty. Well, hopefully my incorrect guess didn't cause anyone any problems - thanks for researching and responding...

This change also breaks our (messy and kludgy) uninstall method, which loops through previous version numbers attempting to uninstall any that are still installed. Should be able to tweak it though to use a different ID for versions >99.

Steve.

-----Original Message-----
From: Malte Starostik [mailto:***@xodtsoq.de]
Sent: 12 September 2016 12:37
To: wpkg-***@lists.wpkg.org
Cc: Steve Kersley <***@keble.ox.ac.uk>; Mendim Uka <***@esag.ch>
Subject: Re: [wpkg-users] Issues with publishing Java 8u102 over wpkg
Post by Steve Kersley
Just a guess, but as the SHORTUPDATEVER has rolled over to 3 digits, I
assume that the ID generated is wrong. Try removing the zero from in
<check type="uninstall" condition="exists"
path="{26A24AE4-039D-4CA4-87B4-2F83218%shortupdatever%F0}"
In fact, someone at Oracle was apparently having a rather misanthropic day and went the way of maximum surprise:

{26A24AE4-039D-4CA4-87B4-2F83218092F0} 8.92 32 bit and {26A24AE4-039D-4CA4-87B4-2F86418092F0} 8.92 64 bit turn to {26A24AE4-039D-4CA4-87B4-2F32180102F0} 8.102 32 bit and {26A24AE4-039D-4CA4-87B4-2F64180102F0} 8.102 64 bit

Note how -2F8 in the UUID's last part became just -2F

They did *not* go from 092F0 to 102F0 in the end. Nor 092 to 0A2 to kind of make use of the hexadecimal charset. Nah. Gotta really surprise packagers instead.

Kind regards,
Malte
---------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Stefan Pendl
2016-09-12 17:09:04 UTC
Permalink
I use the following definition without problem.

<!-- code start (watch for line wraps) -->
<package id="JRE8" name="Java Runtime Environment 8"
revision="%PKG_VER%" reboot="false" priority="10"
precheck-upgrade="always" precheck-install="always"
precheck-remove="always">

<variable name="PKG_VER" value="101" />
<variable name="PKG_SOURCE_X86"
value="%SOFTWARE%\Java\jre-8u%PKG_VER%-windows-i586.exe"/>
<variable name="PKG_SOURCE_X64"
value="%SOFTWARE%\Java\jre-8u%PKG_VER%-windows-x64.exe"/>
<variable name="PKG_INSTALL_SWITCH" value="STATIC=0 REBOOT=0"/>
<variable name="PKG_DEST_32BIT"
value="INSTALLDIR=&quot;%ProgramFiles%\Java\jre8&quot;"/>
<variable name="PKG_DEST_32BIT"
value="INSTALLDIR=&quot;%ProgramFiles(x86)%\Java\jre8&quot;"
architecture="x64"/>
<variable name="PKG_DEST_64BIT"
value="INSTALLDIR=&quot;%ProgramFiles%\Java\jre8&quot;"/>

<check type="uninstall" condition="versiongreaterorequal"
path="Java 8 Update \d+" value="8.0.%PKG_VER%0" />
<check type="uninstall" condition="versiongreaterorequal"
path="Java 8 Update \d+ \(64-bit\)" value="8.0.%PKG_VER%0"
architecture="x64" />

<commands>
<command type="install" include="remove" />
<command type="install" cmd='"%PKG_SOURCE_X86%" /s
%PKG_DEST_32BIT% %PKG_INSTALL_SWITCH% /L %TMP%\JRE8_x86.log' />
<command type="install" cmd='"%PKG_SOURCE_X64%" /s
%PKG_DEST_64BIT% %PKG_INSTALL_SWITCH% /L %TMP%\JRE8_AMD64.log'
architecture="x64" />

<command type="upgrade" include="install" />

<!-- stop quick start service -->
<command type="remove" cmd="%ComSpec% /c net stop
JavaQuickStarterService">
<exit code="2" />
</command>
<command type="remove" cmd="%ComSpec% /c wmic product where
&quot;Name like 'Java 8%'&quot; call Uninstall &gt;%TMP%\JRE8_remove.log
2&gt;%TMP%\JRE8_remove.err" />
</commands>
</package>
<!-- code end -->

In addition I would not install 102, since that is more a developer
release, the general release is 101.


*Stefan P.*

Top-posting:
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
Post by Steve Kersley
That's nasty. Well, hopefully my incorrect guess didn't cause anyone any problems - thanks for researching and responding...
This change also breaks our (messy and kludgy) uninstall method, which loops through previous version numbers attempting to uninstall any that are still installed. Should be able to tweak it though to use a different ID for versions >99.
Steve.
-----Original Message-----
Sent: 12 September 2016 12:37
Subject: Re: [wpkg-users] Issues with publishing Java 8u102 over wpkg
Post by Steve Kersley
Just a guess, but as the SHORTUPDATEVER has rolled over to 3 digits, I
assume that the ID generated is wrong. Try removing the zero from in
<check type="uninstall" condition="exists"
path="{26A24AE4-039D-4CA4-87B4-2F83218%shortupdatever%F0}"
{26A24AE4-039D-4CA4-87B4-2F83218092F0} 8.92 32 bit and {26A24AE4-039D-4CA4-87B4-2F86418092F0} 8.92 64 bit turn to {26A24AE4-039D-4CA4-87B4-2F32180102F0} 8.102 32 bit and {26A24AE4-039D-4CA4-87B4-2F64180102F0} 8.102 64 bit
Note how -2F8 in the UUID's last part became just -2F
They did *not* go from 092F0 to 102F0 in the end. Nor 092 to 0A2 to kind of make use of the hexadecimal charset. Nah. Gotta really surprise packagers instead.
Kind regards,
Malte
---------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
_______________________________________________
wpkg-users mailing list
https://lists.wpkg.org/mailman/listinfo/wpkg-users
---------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Marco Gaiarin
2016-09-13 07:54:47 UTC
Permalink
Mandi! Stefan Pendl
In chel di` si favelave...
Post by Stefan Pendl
In addition I would not install 102, since that is more a developer
release, the general release is 101.
A bit OT but.. i've never found a doc that explain the 'double release',
ando so also i've everytime picked the latest.

How you say that? Eg, that the '+1' version is 'more a developer release'?


Thanks.
--
dott. Marco Gaiarin GNUPG Key ID: 240A3D66
Associazione ``La Nostra Famiglia'' http://www.lanostrafamiglia.it/
Polo FVG - Via della Bontà, 7 - 33078 - San Vito al Tagliamento (PN)
marco.gaiarin(at)lanostrafamiglia.it t +39-0434-842711 f +39-0434-842797

Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA!
http://www.lanostrafamiglia.it/25/index.php/component/k2/item/123
(cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)
---------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Stefan Pendl
2016-09-13 19:08:03 UTC
Permalink
Post by Marco Gaiarin
Mandi! Stefan Pendl
In chel di` si favelave...
Post by Stefan Pendl
In addition I would not install 102, since that is more a developer
release, the general release is 101.
A bit OT but.. i've never found a doc that explain the 'double release',
ando so also i've everytime picked the latest.
How you say that? Eg, that the '+1' version is 'more a developer release'?
Thanks.
Marco,

when you get notified by the Java updater, you are always offered the
lower release.
In addition you can find the following on the download page at
http://www.oracle.com/technetwork/java/javase/downloads/index.html:
Java SE 8u101 includes important security fixes. Oracle strongly
recommends that all Java SE 8 users upgrade to this release.
Java SE 8u102 is a patch-set update, including all of 8u101 plus
additional features (described in the release notes).
<<
--
*Stefan P.*

Top-posting:
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
---------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Marco Gaiarin
2016-09-14 10:20:52 UTC
Permalink
Mandi! Stefan Pendl
In chel di` si favelave...
Post by Stefan Pendl
when you get notified by the Java updater, you are always offered
the lower release.
Ok. I've never enabled automatic update, so... ;-)))
Post by Stefan Pendl
In addition you can find the following on the download page at
Java SE 8u101 includes important security fixes. Oracle strongly
recommends that all Java SE 8 users upgrade to this release.
Java SE 8u102 is a patch-set update, including all of 8u101 plus
additional features (described in the release notes).
<<
Yes, i read that, but the release note is rather obscure about the
''additional feature''.


Anyway, thanks.
--
dott. Marco Gaiarin GNUPG Key ID: 240A3D66
Associazione ``La Nostra Famiglia'' http://www.lanostrafamiglia.it/
Polo FVG - Via della Bontà, 7 - 33078 - San Vito al Tagliamento (PN)
marco.gaiarin(at)lanostrafamiglia.it t +39-0434-842711 f +39-0434-842797

Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA!
http://www.lanostrafamiglia.it/25/index.php/component/k2/item/123
(cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)
---------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Loading...