aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 74752e6518dce6662bf999db1e50320725dc3d31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# apt-desktop-upgrades

The `unattended-upgrades` package is really useful for servers, but I've found
that a reasonable amount of desktop software doesn't play well to being replaced
*in situ*, while a user is using the desktop.

This package is designed to handle desktop upgrades by checking for and
downloading package upgrades in the background as they become available, and
then applying those upgrades on reboot via the [systemd Offline Updates][]
functionality.


## Installation

A simple `make install` will install to `/usr/local` by default.

You can run `make PREFIX=/new/prefix` to modify the scripts to base itself
somewhere other than `/usr/local`, e.g. `make PREFIX=/usr`. `make install`
will then install to that location.

If you want to install to a separate location, e.g. if you're building a
package, you can use `DESTDIR` to accomplish this, e.g.
`make install DESTDIR=/path/to/packaging`.

Under normal installs, after copying systemd service and timer units into place,
the installation process will call `systemctl daemon-reload` and enable various
units. If `DESTDIR` is set and different from `PREFIX`, then these steps are
omitted.

Similarly, systemd is normally notified on `make uninstall`, but again if
`DESTDIR` is set and different from `PREFIX`, the steps are omitted again.


## TODO

### apt-listbugs

We disable `apt-listbugs` during upgrades, because desktop systems typically use
`NetworkManager`, which is not started by default for `offline-updates.target`.
And if `apt-listbugs` can't reach the network, it aborts the upgrade.

We could try pulling in the network during upgrades, just in case `apt-listbugs`
is installed. But that kind of defeats the purpose of "offline updates". Also,
it's redundant if `apt-listbugs` isn't installed. And given that this package's
target audience is mainly systems that are *not* individually managed by
attentive sysadmins, but are as much as possible fire-and-forget, "stable"/LTS
systems for users who aren't necessarily in a position to make a decision on
whether a bug will affect their workflow, the intersection of those systems with
`apt-desktop-upgrades` installed, and those with `apt-listbugs` installed, is
probably pretty small.

However...

It would be nice if it were possible somehow to hook `apt-listbugs` (if it's
installed) into the `adu-download` phase of things, and just not download
updates for packages which have bugs (or remove already-downloaded updates).

So, look into a way of doing that.

### Notifying users about updates

Find a better way of getting a list of logged in users and their DBus session
bus address than `find /run/user -type s -name bus`.


## License

Copyright © 2022 Adam Spragg

apt-desktop-upgrades is free software: you can redistribute it and/or modify
under the terms of the GNU Lesser General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your option)
any later version.

apt-desktop-upgrades is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
for more details.

You should have received a copy of the GNU Lesser General Public License along
with apt-desktop-upgrades.  If not, see <https://www.gnu.org/licenses/>.


[systemd Offline Updates]: https://www.freedesktop.org/software/systemd/man/systemd.offline-updates.html

SPDX-License-Identifier: LGPL-3.0-or-later