Hi,
I’m currently building my first snap for a customized Squid proxy server on a Raspberry Pi. By default, Squid assumes there are specific configuration files (squid.conf and mime.conf) under /etc. Additional build flags can be used to use a different configuration folder. Specifically, --sysconfdir can be used to change this directory. Now, if I add a configflags entry to my snapcraft.yaml to set this flag to /etc/squid, I can build a snap (in devmode) but that ends up looking at the actual /etc/squid, where there is no file. If I understand correctly, the executable should be looking in /snap/squid/current/etc/squid. But if I supply that for the --sysconfdir flag, the executable ends up looking in the right location but the asset itself is moved to /snap/squid/current/snap/squid/current/etc. So I can’t run the proxy server.
My snapcraft.yaml:
name: squid-sl
version: '0.3'
summary: Proxy server for the Scripting Languages exam
description: |
Proxy server meant to block and log traffic during the Scripting Languages exam.
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots
apps:
squid-sl:
command: squid
plugs:
- network
- network-bind
squid-sl-service:
command: squid
daemon: simple
restart-condition: always
plugs:
- network
- network-bind
parts:
squid:
source: http://www.squid-cache.org/Versions/v3/3.5/squid-3.5.26.tar.gz
plugin: autotools
#configflags: ["--sysconfdir=/etc/squid"]
configflags: ["--sysconfdir=/snap/squid-sl/current/etc/squid"]
Is this intended behavior? What’s the mechanism that’s causing this?