8215446 : JPackageCreateInstallerInstallDirTest fails on OLE7
Submitted-by: asemenyuk
Reviewed-by: herrick, almatvee
--- 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