[squid-dev] To make squid works in snap world.
Gary Wang
gary.wang at canonical.com
Tue Mar 14 14:44:33 UTC 2017
Hi guys
I'm sorry that I'm here so late. :(
Generally, regarding the purpose of this MP.
https://code.launchpad.net/~gary-wzl77/squid/ipc_prefix/+merge/318714
I'd like to make squid snap works as a confined
<https://snapcraft.io/docs/reference/confinement>snap in snap world. So
that we can ship this snap in ubuntu-core.
The reason why I need to add compile option to enable to customize IPC
prefix at compiling time is that in order to use shared memory in an app
which released as a snap package the only allowed file path will be like
this <https://bugs.launchpad.net/snappy/+bug/1653955>(in the following
namespace)
/dev/shm/sem.snap.@{SNAP_NAME}.*
Hence in our case, the shared memory file path should be
/dev/shm/sem.snap.squid-snap.{random-string}
Otherwise, you will get the following error when running the squid in
snap world
http://paste.ubuntu.com/24175840/
@Amos
About your suggestions, I could add "-n sem.snap.squid-snap" in the
command line to launch snap.
However, If I do it like this, I will receive the following error.
http://paste.ubuntu.com/24175793/
I suppose it's caused by the '.' separator.
@Alex
About the DEFAULT_STATEDIR,
...
DEFS += -DDEFAULT_STATEDIR=\"$(localstatedir)/run/squid\"
...
According to the above share memory namespace in snap world, it
couldn't help on this either.
Hopefully, I made it clear on this MP. :)
If there is sth wrong on the usage of your suggestions or any other
compiler options I can use, please let me know.
I'd like to hear your guys feedbacks.
Thanks in advance.
--
Br
Gary.Wzl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20170314/6de20844/attachment.html>
More information about the squid-dev
mailing list