Re: RFR: 8263154: [macos] DMG builds have finder errors
On Thu, 15 Apr 2021 01:24:04 GMT, Alexander Matveev wrote: > - Issue was reproducible when install-dir points to some invalid location. > - Fixed by defaulting DMG drag and drop location to /Applications folder and > --install-dir will be ignored with warning for DMG. > - I do not see any way to support other valid, but uncommon locations for > drag and drop. For example: /Users/USERNAME/Applications is not possible to > support since user name is not known. /usr/bin requires root privileges and > should contain symbolic links. Locations which does not exist also not > possible to support, since DMG cannot create paths. So > /Applications/MyCompany is not possible for DMG. Marked as reviewed by asemenyuk (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/3505
Re: RFR: 8263154: [macos] DMG builds have finder errors
On Thu, 15 Apr 2021 01:24:04 GMT, Alexander Matveev wrote: > - Issue was reproducible when install-dir points to some invalid location. > - Fixed by defaulting DMG drag and drop location to /Applications folder and > --install-dir will be ignored with warning for DMG. > - I do not see any way to support other valid, but uncommon locations for > drag and drop. For example: /Users/USERNAME/Applications is not possible to > support since user name is not known. /usr/bin requires root privileges and > should contain symbolic links. Locations which does not exist also not > possible to support, since DMG cannot create paths. So > /Applications/MyCompany is not possible for DMG. Consensus is to leave as Log.info() - so all looks good. - Marked as reviewed by herrick (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/3505
Re: RFR: 8263154: [macos] DMG builds have finder errors
On Thu, 15 Apr 2021 01:24:04 GMT, Alexander Matveev wrote: > - Issue was reproducible when install-dir points to some invalid location. > - Fixed by defaulting DMG drag and drop location to /Applications folder and > --install-dir will be ignored with warning for DMG. > - I do not see any way to support other valid, but uncommon locations for > drag and drop. For example: /Users/USERNAME/Applications is not possible to > support since user name is not known. /usr/bin requires root privileges and > should contain symbolic links. Locations which does not exist also not > possible to support, since DMG cannot create paths. So > /Applications/MyCompany is not possible for DMG. It's my feeling that there should probably be no stdout/stderr from the jpackage tool other than what is specified (--help, --version, and hard errors). If that is consensus we should also change the warnings about foreign app-image to Log.verbose, if not we can leave this Log.info() as is. - PR: https://git.openjdk.java.net/jdk/pull/3505
Re: RFR: 8263154: [macos] DMG builds have finder errors
On Thu, 15 Apr 2021 01:24:04 GMT, Alexander Matveev wrote: > - Issue was reproducible when install-dir points to some invalid location. > - Fixed by defaulting DMG drag and drop location to /Applications folder and > --install-dir will be ignored with warning for DMG. > - I do not see any way to support other valid, but uncommon locations for > drag and drop. For example: /Users/USERNAME/Applications is not possible to > support since user name is not known. /usr/bin requires root privileges and > should contain symbolic links. Locations which does not exist also not > possible to support, since DMG cannot create paths. So > /Applications/MyCompany is not possible for DMG. Should we always show warning messages, especially that output will be different from what user expected? I can switch to Log.verbose(), but I still think it should be displayed always. - PR: https://git.openjdk.java.net/jdk/pull/3505
Re: RFR: 8263154: [macos] DMG builds have finder errors
On Thu, 15 Apr 2021 01:24:04 GMT, Alexander Matveev wrote: > - Issue was reproducible when install-dir points to some invalid location. > - Fixed by defaulting DMG drag and drop location to /Applications folder and > --install-dir will be ignored with warning for DMG. > - I do not see any way to support other valid, but uncommon locations for > drag and drop. For example: /Users/USERNAME/Applications is not possible to > support since user name is not known. /usr/bin requires root privileges and > should contain symbolic links. Locations which does not exist also not > possible to support, since DMG cannot create paths. So > /Applications/MyCompany is not possible for DMG. Since target directory shown by apple script is only a suggestion, and user can drag app to anywhere in finder, I may be able to be convinced to ignore install-dir on dmg builds. I don't think we should use Log.info() to say given install-dir is ignored, it should just be Log.verbose(). (I started the bad precedence when I used Log.info for messages about foreign app-image, this should have been Log.verbose() too). - PR: https://git.openjdk.java.net/jdk/pull/3505
Re: RFR: 8263154: [macos] DMG builds have finder errors
On Thu, 15 Apr 2021 01:24:04 GMT, Alexander Matveev wrote: > - Issue was reproducible when install-dir points to some invalid location. > - Fixed by defaulting DMG drag and drop location to /Applications folder and > --install-dir will be ignored with warning for DMG. > - I do not see any way to support other valid, but uncommon locations for > drag and drop. For example: /Users/USERNAME/Applications is not possible to > support since user name is not known. /usr/bin requires root privileges and > should contain symbolic links. Locations which does not exist also not > possible to support, since DMG cannot create paths. So > /Applications/MyCompany is not possible for DMG. Not sure if I understood question about PKG. PKG can create destination folders and will have root access once elevated, so user can specify any locations for --install-dir in case of PKG. Well DMG is not an installer it is just disk image which contains app (think of it as archive file), so we cannot really support all functionality with DMG as with actual installers. Yes, I can check if install-dir exist with apple script, but destination machine might not have this folder. Permissions might be different on folder on machine which generates DMG and machine which will install it. If PKG cannot be install into user home Applications folder, then it is another bug. Also, if someone really want --install-dir to some other location they can overwrite apple script we using via resource folder. This fix only affects apple script we generate to customize DMG. Extra step for user, but I think it will not be common anyway. - PR: https://git.openjdk.java.net/jdk/pull/3505
Re: RFR: 8263154: [macos] DMG builds have finder errors
On Thu, 15 Apr 2021 01:24:04 GMT, Alexander Matveev wrote: > - Issue was reproducible when install-dir points to some invalid location. > - Fixed by defaulting DMG drag and drop location to /Applications folder and > --install-dir will be ignored with warning for DMG. > - I do not see any way to support other valid, but uncommon locations for > drag and drop. For example: /Users/USERNAME/Applications is not possible to > support since user name is not known. /usr/bin requires root privileges and > should contain symbolic links. Locations which does not exist also not > possible to support, since DMG cannot create paths. So > /Applications/MyCompany is not possible for DMG. Doesn't much of this argument apply to pkg builds too ? I hate to abandon install-dir option entirely for dmg, and just printing a warning and ignoring the argument is contrary to what is done for other arguments. Is there any way, in the apple script, to check if the install-dir exists, and to use it if it does ? Also wouldn't it be useful (for both pkg and dmg) to have ability to install into the users home directory ? just specifying ~ or ~/Applications gets expanded before going in script if not quoted, and doesn't work if it is quoted. Unless we define a meaning for non-fully qualified path in install-dir that should probably be a hard error.. - PR: https://git.openjdk.java.net/jdk/pull/3505
RFR: 8263154: [macos] DMG builds have finder errors
- Issue was reproducible when install-dir points to some invalid location. - Fixed by defaulting DMG drag and drop location to /Applications folder and --install-dir will be ignored with warning for DMG. - I do not see any way to support other valid, but uncommon locations for drag and drop. For example: /Users/USERNAME/Applications is not possible to support since user name is not known. /usr/bin requires root privileges and should contain symbolic links. Locations which does not exist also not possible to support, since DMG cannot create paths. So /Applications/MyCompany is not possible for DMG. - Commit messages: - 8263154: [macos] DMG builds have finder errors Changes: https://git.openjdk.java.net/jdk/pull/3505/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=3505=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8263154 Stats: 18 lines in 6 files changed: 7 ins; 0 del; 11 mod Patch: https://git.openjdk.java.net/jdk/pull/3505.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/3505/head:pull/3505 PR: https://git.openjdk.java.net/jdk/pull/3505