Commit Graph

73 Commits

Author SHA1 Message Date
Michael Bayne b2263104e6 Small formatting tweaks. 2019-05-03 13:45:44 -07:00
Michael Bayne 18d449166c Merge pull request #206 from sergiorussia/feature/java_local_dir
enable custom java local dir instead of hardcoded "java_vm"
2019-05-03 13:34:32 -07:00
sergiorussia f7a5092116 review fixes 2019-05-01 00:18:47 +03:00
Michael Bayne 901682d5f7 timeout_verify -> verify_timeout. 2019-04-30 10:58:46 -07:00
Michael Bayne eb8a2da9d8 Merge branch 'master' into timeoutVerify 2019-04-30 10:55:10 -07:00
sergiorussia 557e615862 review fixes 2019-04-15 21:10:12 +03:00
sergiorussia e253db10be enable custom java local dir instead of hardcoded "java_vm" 2019-04-14 01:18:13 +03:00
Michael Bayne dcfd113dbf [maven-release-plugin] prepare for next development iteration 2019-04-10 11:45:13 -07:00
Michael Bayne a223f40549 [maven-release-plugin] prepare release getdown-1.8.3 2019-04-10 11:45:04 -07:00
Michael Bayne 8d59367742 Default to current working directory if no appdir is provided. 2019-04-10 11:35:55 -07:00
gropp_volker 8e520e7a25 add config timeout_verify
- remove hardcoded 60 seconds timeout during verify, as with pack200
this may fail on slow systems
- introduce new config "timeout_verify" with 60 seconds default
- handle timeout with aborting the launch
2019-03-13 11:28:14 +01:00
Michael Bayne f7586cf601 More formatting tweaks. 2019-02-25 17:58:48 -08:00
Myron Boyle d24d12a6c4 add -Dsilent=noupdate, to just start the app w/o any updates 2019-02-25 14:33:51 +01:00
Michael Bayne ae129fad6f Added support for proxy auth.
This also makes the use of a Proxy instance explicit in the Getdown code,
rather than trying to thread things through the proxy-related system
properties.

It introduces a ProxyAuth SPI which allows an app installation to save proxy
credentials in whatever way it deems fit. Otherwise the credentials are unsaved
and the user effectively has to enter them every time Getdown attempts to
access the internet.

This is obviously a terrible design, but there's no good (cross-platform) way
to securely store a username and password. So anyone using this feature is
likely going to need to provide an implementation of ProxyAuth that does
whatever auth storage they deem appropriate.

Adapted from PR from @ThomasG-AI, thanks!
2019-01-15 12:27:05 -08:00
Michael Bayne 9402d7c900 Update copyright headers. 2018-12-06 11:55:49 -08:00
Michael Bayne 16b8b836e4 Clean up the nresource patch & older code cache stuff.
Two important changes:

1. Don't change the name of the code cache dir as that would leave a stale code
cache around on old installations that were using the code cache.

2. Don't create a native libs cache dir if there are no native resources.

Everything else is mostly cosmetic and organizational.
2018-12-06 11:51:15 -08:00
vsolanki 86723193e6 Use nresource=[native jar] to add contents of resource to java.library.path
This feature makes use of the current caching system for "code" jars. Resources marked by nresource are copied to specific cache directories, unpacked, and then the caches are added to the applications java.library.path. This "native" cache is cleaned according to "cache_retention_days", similar to the code cache.
2018-12-05 12:00:58 -05:00
Michael Bayne 9f2071f152 Minor reorg & fix all "config UI when getdown.txt" changes issues. 2018-12-01 20:00:03 -08:00
Michael Bayne f4679b4a36 Merge pull request #172 from vatsal22/Predownloads
Use presource=[resource] to "predownload" resource
2018-11-30 14:49:56 -08:00
vsolanki cca7749dc8 Use presource=[resource] to "predownload" resource
-these will be downloaded before a UI is displayed, allowing them to be
loaded on first launch
2018-11-30 15:40:51 -05:00
Michael Bayne c8226b83ee Default concurrent download count to #CPUS-1. 2018-11-30 11:41:59 -08:00
Michael Bayne d7d937c2a1 Use a resource attribute instead of a param. 2018-11-30 11:31:59 -08:00
Guenther Demetz dd9c83a347 Fix for #112
Cleans content of each found directory when unpacking a new java_vm.
Fixes the problem when java_wm was build using standard jar. 
For pack200 this remains unresolved.
2018-11-29 10:24:20 +01:00
Michael Bayne ac876a36ef [maven-release-plugin] prepare for next development iteration 2018-11-27 13:35:37 -08:00
Michael Bayne 7f8add0322 [maven-release-plugin] prepare release getdown-1.8.2 2018-11-27 13:35:31 -08:00
Michael Bayne 7a8de58e4d Egads, don't share a download buffer.
Fragile assumptions, they plague us.

Fixes #166
2018-11-27 13:33:11 -08:00
Michael Bayne 8017dcc359 Properly handle just an exception as a logging arg. 2018-11-27 13:30:31 -08:00
Michael Bayne 555d28a80a [maven-release-plugin] prepare for next development iteration 2018-11-26 14:33:07 -08:00
Michael Bayne 2523ba285b [maven-release-plugin] prepare release getdown-1.8.1 2018-11-26 14:32:57 -08:00
Michael Bayne 4d40bc53db Shutdown our verifier thread pool when we're done. 2018-11-26 13:15:05 -08:00
Michael Bayne 9dd8285243 Use a "sys." prefix instead of custom parsing. 2018-11-26 13:11:32 -08:00
Michael Bayne 0bd22aaacc Merge pull request #160 from vatsal22/master
Introduced a new option called sysargs to bootstrap.properties...
2018-11-26 12:43:34 -08:00
Michael Bayne 469f4feb0a Auto-create app dir if we have an appbase.
We were already doing this for bootstrap.properties-based launches, but there's
no reason to restrict it to that. If you run Getdown with an appbase and an
appdir, it can create the app dir and download the app into it.

This enables scenarios where getdown is installed to a shared location and
users that run the app install it in their private storage area (or on a
machine local file system, or who knows).

Closes #163.
2018-11-26 12:40:18 -08:00
Michael Bayne 2fbc7cb12c Fix bug in EnvConfig, add tests.
Fixes #164.
2018-11-26 12:20:50 -08:00
Michael Bayne e0d119d87b A bunch of cleanup of the concurrent downloads PR.
- Max concurrent downloads is controlled by a config in getdown.txt:
  max_concurrent_downloads. It defaults to two.

- A bunch of thread-safety problems were fixed.

- While in there, I revamped the downloader to be less crufty from years of
  ad-hoc requirements accretion.

- I disabled the Channel.transferFrom based download change because it prevents
  fine-grained feedback (and abort checking) from taking place, and it doesn't
  handle failure cases. Maybe we'll clean it up and re-enable it in the future.
2018-11-26 11:25:37 -08:00
Michael Bayne 21fba32915 Merge pull request #162 from vatsal22/concurrent1
Download files concurrently
2018-11-26 10:14:21 -08:00
vsolanki 8408f10eff Download files concurrently 2018-11-21 10:05:20 -05:00
Michael Bayne df2ff3fddb Always use a thread pool of at least size 1.
Fixes #161.
2018-11-19 19:36:13 -08:00
vsolanki 94d7852324 Typo 2018-11-19 10:40:06 -05:00
vsolanki 901b1c03e2 Introduced a new option called sysargs to bootstrap.properties to allow the setting of system properties during the bootstrap setup
Usage: sysargs = [key1]:[val1], [key2]:[val2], [key3]
2018-11-19 09:07:01 -05:00
Michael Bayne 3b888a72b7 Escape special chars in env var replacements. 2018-11-15 08:32:39 -08:00
Michael Bayne d4884d5388 [maven-release-plugin] prepare for next development iteration 2018-10-19 09:50:39 -07:00
Michael Bayne 9edca56628 [maven-release-plugin] prepare release getdown-1.8.0 2018-10-19 09:50:29 -07:00
Michael Bayne 0efc039a17 Fix Javadoc error. 2018-10-19 09:48:43 -07:00
Michael Bayne 0f5622df72 Allow thread pool to be sized with -Dthread_pool_size.
Also use num processors minus one instead of num processors.
2018-10-03 08:47:44 -07:00
Michael Bayne 5499969b2c Fix bug in argv apparg parsing. 2018-09-25 09:12:28 -07:00
Michael Bayne 883954c3e5 Consolidate & enhance "environment config" handling.
The new code is more careful about how it obtains config info, and issues
warnings when sources of info conflict. It does not abort in such circumstances
as Getdown's prime directive is to do the best it can to get the app updated
and launched. But the warnings will hopefully allow accidental conflicts to be
detected and avoided before being deployed to customers.

We also now allow bootstrap.properties to provide an appid; that matches what
was possible via system properties and command line arguments. We also avoid
"communicating" environment configuration through the Java system properties
mechanism. We now read from sysprops but do not write back to them.

Lastly, this includes some name tidying (like appdir -> appDir and
getAppdir -> getAppDir).
2018-09-17 13:44:14 -07:00
Michael Bayne 2bd10cf8a1 Use logging system in code run "inside" Getdown.
Command line tools may still use stdout/stderr directly.
2018-09-14 15:01:31 -07:00
Michael Bayne 935f77e3e8 Merge pull request #135 from sdgx/dos-start-delay
Small DoS mitigation: add start delay sanity check
2018-09-14 14:49:53 -07:00
Michael Bayne 2f0eae9753 Excise additional samskivert code. 2018-09-14 14:48:58 -07:00