- Remove access/error log references in configuration files and tests.
- Ensure that /var/log/plinth directory is not created anymore.
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Use the directory for service custom static files only if it exists.
- This fixes issue with lintian complaining of installing files in /var/www.
Closes#1399
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
The unattended-upgrades package removes older kernel packages before
starting the upgrade process, so that the current kernel and the newly
installed kernel will be retained and all older kernel packages will
be removed.
The removal of older kernel packages requires "apt autoremove" to list
them. So, a setting to enable autoremoval of packages has been turned
on as well.
When tested on a vagrant box, the current kernel 4.17.0.1 and the new
kernel 4.17.0.3 have been retained. Older kernels were removed
preemptively before the installation of 4.17.0.3
Fixes#1372
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Avoiding manual edits to LocalSettings.php by overriding the configuration in
another file called FreedomBoxSettings.php and including it in
LocalSettings.php. This avoids bugs and makes configuration changes trivial.
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
This is the final change required for Django 2.0 support. Instead of using
MIDDLEWARE_CLASSES use MIDDLEWARE setting. Support for new style middleware was
provided in version 0.3.0, so depend on that version. Django built-in middleware
already supports new style and plinth middleware will now support new style.
The actual semantics of the middleware don't need changes. See:
https://docs.djangoproject.com/en/2.0/topics/http/middleware/#upgrading-pre-django-1-10-style-middleware
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
In commit d4b4791, four files were renamed by adding a file extension .md
The files are CONTRIBUTING, COPYING, HACKING and INSTALL
This commit fixes the pending tasks and especially the bug where HACKING.md is
wrongly listed as HACKING in debian/plinth.docs and cause build failure for the
Debian package of Plinth
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
User will be shown captcha in the second attempt to login if login
fails in the first attempt.
Signed-off-by: Joseph Nuthalpati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
From freedombox-setup all the setup mechanisms and first-run mechanisms have
been removed. This script no longer does anything and is not needed. Ensuring
that the directories have proper permissions is now the duty of Plinth Debian
packaging.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Signed-off-by: Joseph Nuthalpati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Avahi daemon is being managed in Plinth, so it makes sense for Plinth to be
providing the service files. Service files can be managed so that when service
is not available, it is not advertised using Avahi.
Install service files.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Signed-off-by: Prachi Srivastava <prachi@swecha.net>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Redirect /syncthing to /syncthing/ as the daemon does not work
without a slash at the end.
- Create a separate include file for LDAP authentication
configuration that can be included on other app configurations.
Allow Plinth to manage network connections even when running as 'plinth'
user and not root user. This is done by adding polkit rules that
Network Manager checks
- Add new style Javascript based rules file for newer versions of
polkit (>105). This is not fuly tested.
- Add old style .pkla file for older versions of polkit (<=105).
Since Debian testing now has Django 1.10. There is no necessity to
support older versions of Django. The fix for showing menu items does
depend on a small feature that is introduced in Django 1.10:
django.setup(set_prefix=True) and FORCE_SCRIPT_NAME.
Add a dispatcher script to NetworkManager to configure
B.A.T.M.A.N. Advanced interfaces. This quite a bit hacky at it is
triggered for network connections that have the keyword "BATMAN" in
them. The proper way to implement this is as a core change in
NetworkManager itself (as it lacks plugins). It is done is the hope
that it will garner some more interest in FreedomBox for mesh networks.
Currently, it is possible to create a BATMAN mesh network and shared
existing internet connections on it. Other boxes can then join this
mesh network and use that internet connection.
Known issues:
- Very unintuitive setup process. First create a connection with device
a Wi-Fi device, mode as ad-hoc, with a known frequency and BSSID. The
name of the connection should have contain BATMAN in it. It should
also have IPv4 method as disabled. Second connection should be
created for 'bat0' interface after the first on is successful. It can
be with method 'shared' for sharing internet connection and doing DHCP
requests or 'auto' for aqcuiring IP address from another node in the
mesh network.
- Untested for joining existing mesh networks.
- Requires configuring two network connections and the second one needs
to be manually enabled after the first one is successfully activated.
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.
- Add gettext as build dependency
- Add setup.py commands for compiling and updating .po files.
- Clean compiled .mo files on ./setup.py clean
- Install .po and .mo files to destination on ./setup.py install
- Compile .po files when running ./setup.py build
There doesn't seem to be a simple way to integrate Django .po file
dealing with ./setup.py mechanism.
- Merge actions/pagekite_util.py into plinth/modules/pagekite/util.py.
- Rename plinth/modules/pagekite/util.py to utils.py.
- Add python-augeus as dependency.
- Move actions/util.py to plinth/action_utils.py and update services
that use it.
- Rename _run() method to run() as it is being used publicly.
- Import the utils in a more conventional manner.
- Move all python2 bits to python3.
- Add django-test-settings.py for Django settings
- Add runtests.py for setting up Django test environment
- Add Django test setup support to setup.py and coverage.py
- Add new test module test_kvstore.py
- Enable existing Django-dependent tests in test_context_processors.py and test_menu.py