<div dir="ltr"><div><div style="font-size:12.8px">Hi guys</div><div style="font-size:12.8px"> I'm sorry that I'm here so late. :(</div><div style="font-size:12.8px"> G<span style="font-size:12.8px">enerally,</span> regarding<span style="font-size:12.8px"> the purpose of this MP.</span></div><div style="font-size:12.8px"> <a href="https://code.launchpad.net/~gary-wzl77/squid/ipc_prefix/+merge/318714">https://code.launchpad.net/~gary-wzl77/squid/ipc_prefix/+merge/318714</a></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"> I'd like to make squid snap works as a <a href="https://snapcraft.io/docs/reference/confinement" target="_blank">confined </a>snap in snap world. So that we can ship this snap in ubuntu-core.</div><div style="font-size:12.8px"> The reason why I need to add compile option to enable to customize IPC prefix at compiling time is that i<span style="font-size:12.8px">n order to use shared memory in an app which released as a snap package t</span><span style="font-size:12.8px">he only allowed file path will be like </span><a href="https://bugs.launchpad.net/snappy/+bug/1653955" target="_blank" style="font-size:12.8px">this </a><span style="font-size:12.8px">(in the following namespace)</span></div><div style="font-size:12.8px"><span style="color:rgb(51,51,51);font-family:monospace;font-size:13.3333px"> /dev/shm/</span><span style="color:rgb(51,51,51);font-family:monospace;font-size:13.3333px">sem.snap.</span><span style="color:rgb(51,51,51);font-family:monospace;font-size:13.3333px">@{SNAP_</span><span style="color:rgb(51,51,51);font-family:monospace;font-size:13.3333px">NAME<wbr>}.*</span> </div><div style="font-size:12.8px"> <br></div><div style="font-size:12.8px"> Hence in our case, the shared memory file path should be </div><div style="font-size:12.8px"> <span style="color:rgb(51,51,51);font-family:monospace;font-size:13.3333px">/dev/shm/</span><span style="color:rgb(51,51,51);font-family:monospace;font-size:13.3333px">sem.snap.squid-snap</span><span style="color:rgb(51,51,51);font-family:monospace;font-size:13.3333px"><wbr>.{random-string}</span> </div><div style="font-size:12.8px"> Otherwise, you will get the following error when running the squid in snap world</div><div style="font-size:12.8px"> <a href="http://paste.ubuntu.com/24175840/" target="_blank">http://paste.ubuntu.com/<wbr>24175840/</a></div><div style="font-size:12.8px"> </div><div style="font-size:12.8px"> @Amos</div><div style="font-size:12.8px"> About your suggestions, I could add "-n sem.snap.squid-snap" in the command line to launch snap.</div><span style="font-size:12.8px"> However, If I do it like this, I will receive the following error.</span><div style="font-size:12.8px"> <a href="http://paste.ubuntu.com/24175793/" target="_blank">http://paste.ubuntu.com/<wbr>24175793/</a></div><div style="font-size:12.8px"> I suppose it's caused by the '.' separator.</div><div style="font-size:12.8px"> </div><div style="font-size:12.8px"> @Alex</div><div style="font-size:12.8px"> About the DEFAULT_STATEDIR,</div><div style="font-size:12.8px"> ...</div><div style="font-size:12.8px"> DEFS += -DDEFAULT_STATEDIR=\"$(<wbr>localstatedir)/run/squid\" </div><div style="font-size:12.8px"> ...</div><div style="font-size:12.8px"> According to the above share memory namespace in snap world, it couldn't help on this either.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"> Hopefully, I made it clear on this MP. :)</div><div style="font-size:12.8px"> If there is sth wrong on the usage of your suggestions or any other compiler options I can use, please let me know.</div><div style="font-size:12.8px"> I'd like to hear your guys feedbacks.</div><div style="font-size:12.8px"> Thanks in advance.</div></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Br<div>Gary.Wzl</div></div></div>
</div>