My snap uses pulseaudio, which inturn requires a external symlink into the running system
ie $SNAP/etc/pulse/client.conf.d/01-enable-autospawn.conf is a symlink which points to /run/pulseaudio-enable-autospawn
However snapcraft publish doesnt allow publishing this by telling there is a external symlink.
I can bypass this temporarily by removing the external symlink from snap by using a override-prime to remove it. (My system Ubuntu 24.04 doesnt contain the /run/pulseaudio-enable-autospawn to force the /etc/pulseaudio/… file into a normal file)
But logically it would appear to me (havent looked into pulseaudio) that this symlink may be useful to retain. So
Is there something like layout, but working in reverse so that I can somehow create a symlink in $SNAP that points to a file on the running system? OR
Is there a way of indicating to snapcraft to allow a external symlink to be retained?
Havent used snapcraft for almost 4 years now, given that chess fide championship is running, so wanted to use scidvspc on my system, so I am looking at updating my previously created snap for scidvspc, thats when this issue poped up. My knowledge about snapcraft has all evaporated away, so currently I am blind to any standard mechanism which may be already in snapcraft. However google didnt show any answer wrt what I wanted.
This sounds like you are bundling pulseaudio in your snap … Why is that necessary at all, your app should instead use the audio-playback plug (and/or -record if needed) and talk to the sound service the system has already running…
I have added the plugs entry for audio-playback previously itself.
Rather scid needs tcl-snack, which inturn depends on libsnack-alsa, which auto pulls in pusleaudio from core22+ or so, if I am not wrong, which inturn contains/creates the external symlink implicitly. Again this is from old memory and what I am seeing now after changing to track newer packages.
At 2018 & 2020 championship times, I had got more into snapcraft internal flow and created the snap and later updated it. But now I am totally blank from snapcraft. Given that I dont use snapcraft in general, I had made notes on the snapcraft steps then for future, I am basically rerunning it and tweaking few things, based on changes I am noticing.
At a different level the external link comes in implicitly with the pulseaudio package due to dependencies from other packages needed.
My point is - there will be situations, where people may want to have external symlinks for valid reasons, is there a standard mechanism provided by snapcraft for such situations.