You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using rpmPrefix to make a package relocatable, one must also take ownership of the init start script and scriptlets.
The current doc for rpmPrefix has had rpmChangelogFile inserted into the 'how to enable relocation' story. From https://github.com/sbt/sbt-native-packager/pull/242/files we learn that one must also copy the init script out of sbt-native-packager into the project source in order to get a functioning init script when relocated (the stock script uses the default path in exec). This is presented under Template Changes with: "Apply the following changes to the default init start script. You can find this in the sbt-native-packager source." This is not only a template customization example, but is also required in order to have a relocatable package that will start.
Copying sbt-native-packager sources into a project source is highly undesirable. Could the templates use PACKAGE_PREFIX instead of chdir, for example?
The text was updated successfully, but these errors were encountered:
I haven't used the prefix myself yet. So to get it working you have to
set the rpmPrefix value
override scriptlets
copy the (systemV?) initScript
The ${PACKAGE_PREFIX} has to be inserted "by hand", right?
First thing that comes to mind is, changing the linuxScriptReplacements. {{chdir}} could be set to the relocated location? Or what else does this relocation do?
set linuxPackageSymlinks (tip: use show linuxPackageSymlinks to get them all!)
set defaultLinuxLogsLocation
This resulted in a relocatable package, but with an invalid init script.
As I understand the doc, yes, next I would need to copy start-rpm-template into the project tree and edit it to use ${PACKAGE_PREFIX} instead of ${{chdir}} for exec. With same for the scriptlet changes for post-rpm and reun-rpm.
Yes, setting {{chdir}} to the user specified location should also work. Relocation let's the user specify an alternative install location (i.e. rpm -i --relocate /usr/share=/opt mypackage.rpm). The relocation works, it's the reflection of the user chosen path in the (systemV) scripts that's been the sticky wicket.
When using rpmPrefix to make a package relocatable, one must also take ownership of the init start script and scriptlets.
The current doc for rpmPrefix has had rpmChangelogFile inserted into the 'how to enable relocation' story. From https://github.com/sbt/sbt-native-packager/pull/242/files we learn that one must also copy the init script out of sbt-native-packager into the project source in order to get a functioning init script when relocated (the stock script uses the default path in exec). This is presented under Template Changes with: "Apply the following changes to the default init start script. You can find this in the sbt-native-packager source." This is not only a template customization example, but is also required in order to have a relocatable package that will start.
Copying sbt-native-packager sources into a project source is highly undesirable. Could the templates use PACKAGE_PREFIX instead of chdir, for example?
The text was updated successfully, but these errors were encountered: