8215446 : JPackageCreateInstallerInstallDirTest fails on OLE7 JDK-8200758-branch
authorherrick
Thu, 15 Aug 2019 08:03:41 -0400
branchJDK-8200758-branch
changeset 57761 6019ac908578
parent 57750 1a9e496d54d2
child 57776 783db59cd8d3
8215446 : JPackageCreateInstallerInstallDirTest fails on OLE7 Submitted-by: asemenyuk Reviewed-by: herrick, almatvee
src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/template.spec
--- a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/template.spec	Wed Aug 14 16:36:29 2019 -0400
+++ b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/template.spec	Thu Aug 15 08:03:41 2019 -0400
@@ -37,7 +37,10 @@
  
 %files
 %{?license_install_file:%license %{license_install_file}}
-INSTALLATION_DIRECTORY/APPLICATION_FS_NAME
+# If installation directory for the application is /a/b/c, we want only root 
+# component of the path (/a) in the spec file to make sure all subdirectories
+# are owned by the package.
+%(echo INSTALLATION_DIRECTORY/APPLICATION_FS_NAME | sed -e "s|\(^/[^/]\{1,\}\).*$|\1|")
 
 %post
 if [ "RUNTIME_INSTALLER" != "true" ]; then