--- old/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/template.spec 2019-08-08 11:48:12.700365000 -0400 +++ new/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/template.spec 2019-08-08 11:48:11.163165200 -0400 @@ -32,7 +32,10 @@ %files APPLICATION_LICENSE_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