To handle the absolute path in compiling time

Jin Hsieh jin.hsieh at
Tue Jan 10 17:16:34 UTC 2017

Hello All,

We are trying to snap up a mail server,
by referring to the design of a popular solution,
there are several services need to be packaged as parts.

The major one is the postfix,
it uses an install script to deploy the built binary,
libraries and the configuration files,
the problem here is it assigns an absolute path when installing:
it's a trouble in snap world since my goal is pushing them into $SNAP
however, in the Build phase of my parts it does not know the path $SNAP.

I tried to deploy it by stage-packages directly but no luck for such the
complicated service,
the configuration path is hardcoded on the pre-compiled binary.
Besides give the postfix source a hack to do getenv for $SNAP in compiling,
do you guys have any idea or any tricks on this to make it works could
share with us?

Many thanks.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Snapcraft mailing list