8

I am wondering where I can find update (refresh) logs for snap packages. Normally, apt updates can be found in /var/log/apt/ but where does snapd write its logfiles?

Thanks for your answer

Laryllan
  • 213

2 Answers2

4

snap changes will let you know what changed.

e.g.

alan@gort:~$ snap changes
ID    Status  Spawn                 Ready                 Summary
1289  Done    2017-05-30T08:39:03Z  2017-05-30T08:39:14Z  Auto-refresh snap "syncthing"
popey
  • 23,667
  • Hi Popey, let me give you an example. I installed the magic device tool to flash my Ubuntu phone. The author will support a new device and I am waiting for the updated snap package. If MDT was installed as a .deb, Ubuntus update manager will pop up and inform me about the new version. Why doesn't it do that for snaps?

    How do I get the information about updated snap packages?

    – Laryllan Jun 01 '17 at 04:25
  • 1
    Snaps are designed to be auto updated in the background. Periodically snapd will check in with the store, and when the new mdt is released you'd get it. – popey Jun 01 '17 at 15:05
  • Sure, but how do I know I got it? Is there no way of knowing? – Laryllan Jun 03 '17 at 12:09
  • 2
    You can "snap info ", but typically by the time you do that, you already got the update automatically. – popey Jun 07 '17 at 22:06
  • 4
    I cannot understand why snapd doesn't inform its users of updates. Not only doesn't it report when a snap updates - a changelog isn't available either. So a snap may update at will and completely change its contents without the user knowing. It's a bit scary, don't you think? – Laryllan Jun 09 '17 at 04:46
1

Quite surprisingly, you still can't if the changes were more than something apparently less than 48 hours ago. (In my limited testing, e.g. I had evidence that a snap was updated within the last ~28 hours but snap changes showed nothing.) See https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1695934

So if your goal is to monitor a system for changes, maybe running "snap changes" periodically might catch them. How frequently you have to run it to guarantee you capture the changes I'm not sure.

You could also run "snap list" periodically and save that output which include the version numbers. That seems somewhat more deterministic instead of relying on whatever rules snap uses to (prematurely, IMHO) delete it's change log.

Also "journalctl -ru snapd" might provide some useful information. Maybe, it was not conclusive for me. And this: https://snap.readthedocs.io/en/latest/SNAPD_CONFIGURATION/ suggest you can create a configuration file that would log to /var/log which might be useful. I have no tried that either.