0

I'm running Ubuntu 14.04 + XBMC on a HTPC and now I want to setup automatic updates on this machine.

On top of the normal Ubuntu sources, I have also 3 other sources installed, of which I want to receive automatic updates:

1) The XBMC ppa (http://ppa.launchpad.net/team-xbmc/ppa/ubuntu/)

2) The Steam source (http://repo.steampowered.com precise/steam)

3) The Flirc source (http://apt.flirc.tv binary/)

I have already read about the unattended-upgrades package, but I don't know how to modify this package to also download updates for XBMC, Steam & Flirc (I've read something about reading the lists file in /var/lib/apt/lists, but unfortunately, I couldn't find Source and Origin defined in these lists).

Or is it better for me to go the cron route for this?

muru
  • 197,895
  • 55
  • 485
  • 740
  • It's actually a continuation on that. I first followed the instructions from that question, but looking through /var/lib/apt/lists, I couldn't find a "source" and "suite" for Steam, XBMC and Flirc and now I'm not sure if unattended-upgrades will also upgrade these packages. – Timo Verbrugghe Jul 24 '14 at 20:59
  • This should work: If you write a bash script with something like echo PASSWORD | sudo -S apt-get update && sudo apt-get upgrade -y and then make a CRON job out of it. – amanthethy Jul 24 '14 at 21:08
  • Yeah, that was what I was planning on doing, before reading about unattended-upgrades... Now, it's just a way of disabling unattended-upgrades and switching over to a cron job... – Timo Verbrugghe Jul 24 '14 at 21:09
  • I have the Steam repository enabled, this is my Release file for it: http://paste.ubuntu.com/7849735/ So we have an Origin, and are missing a suite, which can be taken to be precise, I think. – muru Jul 24 '14 at 21:10

1 Answers1

0

In case you can't find the Release file in /var/lib/apt/lists even after sudo apt-get upgrade, you can take a look at the file at the repository itself. In this case, they are:

  1. http://ppa.launchpad.net/team-xbmc/ppa/ubuntu/dists/trusty/Release for XBMC
  2. http://repo.steampowered.com/steam/dists/precise/Release for Steam and
  3. Unfortunately, the Flirc repository doesn't do directory listing, so I can't locate it without more information.

The Origin values are present for both XBMC and Steam (LP-PPA-team-xbmc and Valve Software LLC respectively). The Suite in this case would be which ever folder under the dists section of the repository you are using (http://repo.steampowered.com/steam/dists or http://ppa.launchpad.net/team-xbmc/ppa/ubuntu/dists) - should be precise for for Steam and and trusty for XBMC PPA.

muru
  • 197,895
  • 55
  • 485
  • 740
  • 1
    Allright, thanks! For the Flirc repository, it does have directory listing if you go to http://apt.flirc.tv/arch/, but they appearantly don't have a "release" file... – Timo Verbrugghe Jul 24 '14 at 21:32
  • Also, just to be clear: I add "LP-PPA-team-xbmc, trusty"; and "Valve\ Software\ LLC, precise"; to the 50unattended-upgrades file, under Allowed Origins, right? – Timo Verbrugghe Jul 24 '14 at 21:35
  • @TimoVerbrugghe I think you don't need to escape spaces, and the format is Origin:Suite, so you need to put a colon and not a comma between them. – muru Jul 24 '14 at 21:37
  • My bad, I thought you did have to escape spaces, as was explained in the answer to this question: http://askubuntu.com/questions/87849/how-to-enable-silent-automatic-updates-for-any-repository – Timo Verbrugghe Jul 24 '14 at 21:39
  • Yes, but this comment says it works without spaces: http://askubuntu.com/questions/87849/how-to-enable-silent-automatic-updates-for-any-repository#comment207493_87854 Could you test with both? – muru Jul 24 '14 at 21:41
  • 1
    Just did a dry run (and debug) with both, with the escape spaces, it shows "o=Valve\ Software\ LLC" with escaped spaces and "o=Valve Software LLC" without escaped spaces, so will probably use without ;). – Timo Verbrugghe Jul 24 '14 at 21:43
  • Now, next obstacle: I know you can edit the preferences for unattended-upgrades by editing the 10periodic file, but if I want to change the time at which this is run, I need to change crontab for the cron.daily file, right? – Timo Verbrugghe Jul 24 '14 at 21:44
  • @TimoVerbrugghe Excellent! Could you suggest an edit to that answer about escaping, since it is a popular answer? For setting the time, since it is a cron.daily script, you will have to change crontab. The unattended package doesn't offer a delay, only a possible reboot time, I think. – muru Jul 24 '14 at 21:48
  • Allright, all set to go! Never mind about the escaping spaces, I read the answer wrong: you need to escape commas, not spaces. Thank you for all the advice! Now enjoying a fully automatically updated HTPC (well.. except for flirc... gonna ask the creator for a source and suite) – Timo Verbrugghe Jul 24 '14 at 22:06