BlueTeaLondon / heroku-buildpack-libreoffice-for-heroku-18

Other
17 stars 31 forks source link

Buildpack not compatible with upcoming build system changes #17

Closed edmorley closed 3 years ago

edmorley commented 3 years ago

Hi! I'm on the team that maintains Heroku's build system.

In the future we plan on changing the value for $HOME at build time as part of moving where the build occurs, however scans of frequently used buildpacks have identified this buildpack as not compatible with this upcoming change.

This buildpack currently writes the resolved value of $HOME (currently /app) into .profile.d/libreoffice.sh at build time, rather than the actual variable name ($HOME):

https://github.com/BlueTeaLondon/heroku-buildpack-libreoffice-for-heroku-18/blob/96145126fd3ca6aa96ec9569eb374026535c1743/bin/compile#L40-L45

In the future, at build time $HOME will be another value (for example /tmp/home), and no longer match the runtime value of $HOME (/app).

The fix is to change the ACTUAL_INSTALL_PATH assignment to either escape the dollar sign (so the variable is resolved at runtime):

ACTUAL_INSTALL_PATH="\$HOME/vendor/libreoffice"

Or else just hardcode the /app path without using the $HOME variable at all:

ACTUAL_INSTALL_PATH="/app/vendor/libreoffice"

Many thanks :-)

geomic commented 3 years ago

Thanks @edmorley, will review if a change of that part alone would do it. :)