- Use action helper so that Plinth can run unprivilaged and action
script can run as root.
- Use Status-Fd feature of apt-get to report progress. Don't report
much detail.
- Capture all stderr of the apt-get process and present it only in case
of failure.
- Remove package installation using PackageKit. Remove dependency on
PackageKit.
- Merge --setup package installation with regular package installation.
This should fix the following problems:
- PackageKit throws errors when APT encounters an error and later
corrects them and proceeds well. This is reported upstream but not
fixed.
- PackageKit does not install recommends by default and there is no easy
way to tell it to do so.
- In some rare cases, PackageKit could get stuck for interactive input
even though interactive flag is set to false.
- PackageKit does not work without network manager connections. (Could
have been mitigated by altering packagekit configuration).
- PackageKit glib library leaks file descriptors after each operation.
This leads to running out of fds during long running refresh
operations such as OpenVPN setup. (This should have subsided by not
checking package install with the new setup mechanism.)]
Known issues:
- In development mode, inside action scripts the python modules are
always loaded from system path and not development directory.
- With PackageKit it is possible to run multiple operations
simultaneously. Others would wait while the first is being
installed. With new implementation, the others error out unable to
obtain lock.
This can then be used by a privileged action to verify that packages
requested for installation are in fact valid. This slightly improves
security of those privileged actions.
Setting IP address on a shared connection can be usefull. This tells
Network Manager to pick the provided network range (inferred from
IP/netmask) instead of something in 10.42.x.x. This can be used to give
predicatable IPs, static IPs and to make large static
reservations (instead of the default 8).
After the recent cleanup, pagekite no longer shows description before
installation. Only after installation does it show the insturctions
about why it is needed. Also in the description {box_name} is not
substituted and there are incorrect escape sequences.
Revert this earlier change that causes these regressions.
This app rightfully belongs in system configuration section instead of
the application section. It is setup once and not used regularly. It
is not service but enabler for other services.
This app rightfully belongs in system configuration section instead of
the application section. It is setup once and not used regularly. It
is not service but enabler for other services. Closes: #441.
Currently menu items are shown in alphabetical order in applications and
no clear order in system configuration. This is done using static
weights for menu items based on English names that does not work for
other locales.
Sorting can't be done at the time of adding menu items as users of
multiple locales may use the interface at the same time.
Implement a sorting mechanism based on existing order as well as labels
of menu item. This allows the flexiblity of grouping menu items in
future as it may be need for system configuration. In case of help menu
Remove sort order for all modules except for help menu as here we want
that specific order.
I find that I am almost always during development runs using ./run
--debug --no-daemon --server_dir=/plinth . The daemon part is gone due
to recent changes. But without specifying --server_dir it will run on /
and since it is not the same as production run, it change this to
/plinth. I am assuming this also the case with other people. So,
change the default to /plinth. I believe this reduces the entry to
development barrier by a tiny bit.
When firewall services are list, the order changes for every run of
plinth and is not predictable making it hard to lookup a service. List
services alphabetically to fix the problem.
Now that all firewall ports are explicitly specified for all services,
it is safer to remove automatic infering of firewall service name from
systemd service name. This Closes: #468 where firewall status is
being shown for 'software upgrades'.
It has become confusing to reuse the name of the service for name of the
systemd unit file and firewall port. This has lead to the regression
that quassel, mumble and minetest can no longer open firewall ports.
Fix this by explicitly specifying ports all services.
wget does not seem to support interface scoping for IPv6 addresses. For
example, http_proxy=http://[fe80::babe:ff:ffff:babe%eth0]:8118/ . Curl
supports this.
This fixes most of the failures for IPv6 related addresses. Hide the
last failure as there does not seem to be a proper fix from OS level:
when using link local addresses, if a hostname is resolved to IPv6 link
local address, it is not scoped to that interface. It can't properly be
used by any tool then.
Don't raise a 404 exception when a page is not found. Instead, simply
bypass the setup middleware so that other middleware have a chance to
process further.
Slight modification so that resolve method can be mocked during
unittests.
Django runs process_request() on all the middleware classes in order.
Then it runs process_view() on all of them again. During the runs, if
any of the views return a HttpResponse. Further processing is ignored.
Setup middleware was handling process_request() and returning
HttpResponse if the application as not setup. However, stronghold
middleware handles process_view(). Since process_request happens first
and response is being returned there, stronghold middleware is never
called.
Make setup middleware use process_view() instead.
We pretty much only run in systemd environment and I don't see that
changing any time soon. By relying on it, we can reduce some burden.
Remove init script.
Daemonizing is not needed for systemd. Remove code related
daemonization.
Since we are running PAM update script from users action file, it is
appropriate for the PAM configurations that are effected by it to stay
here in Plinth as well.
- Break down setup process into methods.
- Make sure that LDAP entity setup is idempotent.
- Peform all entry updates while slapd is running instead of using
slapadd.
- Start slapd only when necessary. Shutdown (only) if we have started
slapd.
In case of start/stop/restart/reload and to check whether service is
running, fallback to sysvinit scripts when systemd is not running. This
happens inside a chroot environment when setup of essential components
is happening.
It has been decided that FreedomBox will no longer support ownCloud due
it's removal from Debian. To deal with this:
- Don't show ownCloud in Plinth any more for new users.
- For users who have already installed ownCloud, show a warning message
that they need to migrate away from ownCloud or need to manage it
manually.
- adapted all modules to not use views.ConfigurationView anymore
- removed templates that are not needed anymore
- no more implicit 'enabled' and 'get_status' functions in __init__.py files
- (more coherent/explicit use of Django functionality)
The Service object now offers handling services on a system level,
and gathering information whether it's enabled or running.
New methods: enable, disable, is_enabled, is_running;
For this it needs the correct (system-level) service name.
All of the methods can be overridden/customized.
This changes all modules to the new Service object and deletes
action scripts that are not required anymore.
- API: start, stop, enable, disable, reload, is-running, is-enabled, list
- only allows access to a service if the service name is listed in a
'managed_services' variable of any plinth module.