pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Config files in PLIST



On Mon, Jul 18, 2022 at 06:32:41PM +0200, Francisco J. Tsao Santín wrote:
> Hello, I have a newbie question...
> 
> I'm trying to package openfortivpn, which is a client for Fortinet VPNs.
> I followed the usual steps, and when I generate PLIST file one of the
> files included is etc/openfortivpn/config. So pkglint raises an error.
> 
> I dove into the package build configuration, and I saw that one of the
> install targets uses a file template (that also is installed in share
> directory) to generate a default file in etc.
> 
> My question is how to properly deal with this situation. I believe I have
> at least two options:
> * patch the package to do not template the config file, and generate it using
> CONF_FILES framework
> * create a post-build step that does the dirty work
> 
> but I would appreciate an expert advice about this situation.

A template config file is fine, but you should make sure it is
installed into ${PREFIX}/share/examples/${PKGNAME}, and copied to
${PKG_SYSCONFDIR} using the CONF_FILES framework you already found.

You can either do that by patching the build system to change the
default installation path for the file, but that often has the
downside that the same path is used for looking for the file, which we
don't want to change; or by moving the file in the correct location
using a post-install target (be sure to use
${DESTDIR}${PREFIX}... paths).

Hope this helps,
 Thomas


Home | Main Index | Thread Index | Old Index