/srv/irclogs.ubuntu.com/2018/09/09/#snappy.txt

dot-tobias(Good morning)07:32
onyb_fr7I'm building a snap by specifying the source as my local directory, which is a cloned git repository. Under the parts definition, I'm using the "source" key with value "./src". However I see that Snapcraft is also copying files that's outside the "src" directory, notably the .git folder. Is there any way to ignore these extra files?10:09
ograonyb_fr7, try using "source: ." and "source-subdir: src"10:18
ograalso, always use relative paths without spomething like ./10:19
ogra(i.e. just "src", not "./src")10:19
diddledanwhy is snapd denying opens on files shipped within core?! https://www.irccloud.com/pastebin/ozQJImar/16:03
diddledansurely if it's in core it should _never_ be denied16:03
popeydiddledan: is that library in core?16:04
diddledanif it isn't then why does it try to load it there?16:04
popey(yes, it is)16:04
diddledan(there's many libraries in that paste)16:04
diddledanI'd like to hear arguments as to why it is desirable to deny access to libraries in core rather than not putting them in core to begin with16:05
diddledandoesn't the whole "let's put this in core" kinda suggest that you expect snaps to use it???16:06
ograwhy would it allow opening random libs ?16:07
diddledanwhy wouldn't it?16:07
diddledanthey're in core ffs16:07
ograthe apparmor default profile doesnt blindly grant access to everything16:07
diddledancore is "a shared platform that provides a base for all snaps" so if it isn't expected to read the libraries there then why are they there?16:07
ograespecially if youo use /snap/foo/bar/12345/baz16:08
ogracore is your / ...16:08
ogra(from a snaps POV)16:08
ograwhy would apparmor allow any snap to access /snap/foo ?16:08
diddledanthat doesn't make a difference whether it's / or /core/omgzor16:08
ograit surely does :)16:08
diddledanit's core ffs16:09
diddledancore is shared. it's meant to be shared.16:09
ograjust open it via /lib/$ARCH ;)16:09
diddledanif you don't want us to access libraries from core then don't put them there16:09
ograyes, it is meant to be shared as your root as /16:10
ogranot via /snap7core16:10
ogra*/snap/core16:10
diddledanthen why is "random snap" trying to read libraries from there when "random snap" hasn't been configured to do so. because something in snapd or the default setup has obviously told it about that location16:11
ogradunno, missing LD_LIBRARY_PATH entry perhaps ?16:11
popeyor incorrect LD_LIBRARY_PATH overriding existing16:12
diddledanhow is "not including a path in LD_LIBRARY_PATH" going to make an application decide "oh, I can't find this library. for **ts and giggles I'll look in this completely random arbitrary location that nobody has told me exists"16:12
ogra/snap/core/current/lib/x86_64-linux-gnu is definitely identical to /lib/x86_64-linux-gnu ... but apparmor will definitely block the first16:13
diddledanthis is a snap that I built. I sure as hell did not tell it about /snap/core16:13
ograwell, something did16:13
ograprobably a bug, probably a missing or wrong LD_LIBRARY_PATH16:14
diddledantherefore something in snapd or the snapcraft default wrapper scripts HAS told it about that location. I did not. therefore when I see it accessing that location which I didn't tell it about I assume that snapd has16:14
diddledanif snapd is telling my application about a path then I expect that it be readable16:14
ograprobably your snap ships a linker inside while it shouldnt and adds /snap/core to the lib search path16:14
ograi can only guess here16:14
diddledanyou seem to assume I'm a newbie16:14
ograbut the DENIAL is definitely correct16:14
ograyou know i'm not :)16:15
ograbut all i can judge here is the DENIAL ... and thats fine ... why you get into that situation is likely a matter of debugging16:16
diddledanyou're spot on though. ld is included seemingly16:16
ograaha16:16
diddledanwtf did that come from?!16:16
ograsnapcraft should have protected you (IMHO)16:16
diddledanyeah that should be a blacklisted thing16:16
ograjust like libc16:16
diddledanhttps://www.irccloud.com/pastebin/bJzKmUo7/16:17
diddledanthat's all the ld16:17
diddledanoh boy https://www.irccloud.com/pastebin/FjigITFo/16:17
diddledanso because I've got $SNAP/lib in LD_LIBRARY_PATH it's picking ld-2.23.so from there?16:18
diddledandarn and blast it16:19
popeyooh16:19
popeygood debugging16:19
* diddledan yells at mycroft only to get no reply because he's got a random ld.so16:19
diddledanwell foo16:20
diddledanI'm annoyed as much at myself as at snapcraft :-p16:20
diddledanthis is painful :-p16:20
* diddledan moans more16:20
diddledannow to work out how to get mycroft semaphores working16:20
diddledanit's using the python multiprocessing module for something and getting permission denied which was what highlighted those others - the semaphore permission denied though doesn't appear to be causing a denied message in the logs :-(16:21
* diddledan goes to find consolation cookies16:22
* ogra hands diddledan some hot fresh coffee to have with the cookies16:23
diddledan\o/16:24
diddledan...and calm16:24
* diddledan breathes methodically16:24
diddledanhttps://youtu.be/v30HUOx6SYk?t=5016:26
ogra:D16:31
diddledanspeaking of snapcraft - kyrofa and I discovered a really random edge case problem - keeping vscode open while compiling a large project that also depends on the alsa remote part I created will cause the build to die part-way through complaining that alsa changed on disk even though it didn't16:33
diddledanagain that was mycroft that highlighted this one16:33
diddledanit seems that vscode will do something while it monitors for git changes that causes the .git folder timestamp to change. combine that with the alsa remote part which doesn't specify a source, therefore meaning `source: .` and you get snapcraft detecting that the source (.) for alsa changing16:35
ogragrr, why does snapcraft close not take an --arch argument20:44

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!