441 Commits

Author SHA1 Message Date
James Valleroy
625eb28007
Release v23.17 to unstable 2023-09-11 20:48:01 -04:00
James Valleroy
f527e5db52
Release v23.16 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-08-28 20:48:23 -04:00
Sunil Mohan Adapa
770974c8ce
sso: Switch to django-axes >= 5.0
- Add explicit dependency on django-ipware >=3. django-axes >= 6 adds
only and optional dependency on django-ipware. Adding explicit dependency make
the behavior safer.

- Depend on django-axes >= 5 where the authentication backend and other features
are available. The new code won't work with older versions. The new approach
uses and authentication backend to deny access to the login form on lockout and
a middleware to redirect user to locked out form when limit of attempts have
been reached.

- Drop old code used for compatibility with django-axes 3.x.

- Suppress verbose and debug messages as django-axes is too chatty.

- Re-implment the CAPTCHA form entirely. In the old style, we have a login form
with CAPTCHA field. That would not work with the new django-axes authentication
middle. On submission of the form, auth.authenticate() will be called. This
call invokes various authentication backends include django-axes authentication
backend. This backend's behavior is to reject all authentication attempts when
the IP is listed in locked table. The new approach is to provide a simple
CAPTCHA form with just the CAPTCHA field. If the form is successfully
validated (correct CAPTCHA is provided), then the lock on the IP address is
reset. The user is then free to perform 3 more attempts to login.

- Update firstboot form to send the request parameter when using
auth.authenticate() method. This needed by Django axes' authentication method
which will be triggered.

Tests:

- Run tests on Debian Bookworm and Debian testing.

- Axes verbose messages and debug messages are not printed on the console when
running FreedomBox in debug mode.

- Only three invalid attempts are allowed at the login page. After the final
incorrect attempt, user is redirected to CAPTCHA page. Visiting the login page
using the URL works but entering the correct credentials still takes the user to
CAPTCHA page.

- CAPTCHA form appears as expected. Clicking the CAPTCHA images downloads the
audio file corresponding to the image. Incorrect CAPTCHA shows an error. Correct
CAPTCHA takes the user to login form where they are able to login with correct
credentials. Entering incorrect credentials 3 times will take the user again to
CAPTCHA page.

- Creating user account during firstboot works.

- Blocked IP address the IP of the client such as 10.42.0.1 and not the local IP
address 127.0.0.1 according the django-axes log messages. While one client IP
address is blocked, another IP is able to login to the same user account that
was attempted by the blocked client.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-08-23 21:47:39 -04:00
James Valleroy
18a04d384a
Release v23.15 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-08-14 21:11:52 -04:00
James Valleroy
4a1c96545a
debian: Add Swedish translation for debconf
Thanks to Peter Kvillegård <quat@sdfeu.org> for the translation.

Closes: #1041735
2023-08-13 10:45:43 -04:00
James Valleroy
e7826781fd
Release v23.14 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-07-31 20:40:13 -04:00
James Valleroy
3d536af95d
Release v23.13 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-07-17 22:02:45 -04:00
James Valleroy
cf7b8bfdb3
Release v23.12 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-19 20:45:25 -04:00
James Valleroy
7bd1e45742
Release v23.11 to experimental
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 22:07:40 -04:00
James Valleroy
d8c488242c
debian: Remove drop-in configs from version <23.11
Since 23.10 is already in experimental, change the prior-version to
23.11~ for removed drop-in /etc config files.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:34:49 -04:00
Sunil Mohan Adapa
a35c320ebd
ejabberd: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/

- jsxc is able to connect to jabber server

- When ssh is enabled avahi-browse -a shows SSH and SFTP services. The avahi
service files are created in /etc/avahi/services/. When service is disabled,
files are removed and avahi-browse -a does not show the services.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:30:16 -04:00
Sunil Mohan Adapa
87a45e1716
cockpit: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- Web interface is available

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:30:14 -04:00
Sunil Mohan Adapa
98be58eb41
calibre: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- calibre web interface is available

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:30:11 -04:00
Sunil Mohan Adapa
1060d733a7
bepasty: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- bepasty uwsgi service is running
- bepasty web interface is available

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:30:09 -04:00
Sunil Mohan Adapa
c6817ab462
apache: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- ttrss app's web interface works
- Incorrect password attempts in LDAP login with /tt-rss-app/ get registered by
  fail2ban

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:30:06 -04:00
Sunil Mohan Adapa
86444764a7
wordpress: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- Web interface works
- Adding a plugin using auto-download works
- fail2ban-client status shows wordpress-freedombox
- fail2ban catches invalid login attempts

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:30:04 -04:00
Sunil Mohan Adapa
73bc89b916
users: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- LDAP auth works for /tt-rss-app/

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:30:01 -04:00
Sunil Mohan Adapa
4b5d1d3204
upgrades: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- Running 'apt update' sends a DBus signal to freedombox service
- unattended-upgrade works
- Many service were restart when unattended-upgrade was run

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:59 -04:00
Sunil Mohan Adapa
efe303de31
ttrss: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- Web interface works

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:56 -04:00
Sunil Mohan Adapa
ba251c1e9a
transmission: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- Web interface works

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:54 -04:00
Sunil Mohan Adapa
3d299a7b8a
syncthing: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- Web interface works

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:51 -04:00
Sunil Mohan Adapa
f3bad4a880
sso: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- Single-sing-on for searx works

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:49 -04:00
Sunil Mohan Adapa
e019f76b40
ssh: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/

- fail2ban-client show shows sshd in jail list

- When ssh is enabled avahi-browse -a shows SSH and SFTP services. The avahi
service files are created in /etc/avahi/services/. When service is disabled,
files are removed and avahi-browse -a does not show the services.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:46 -04:00
Sunil Mohan Adapa
56b3c854e4
sharing: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- Sharing folders works

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:43 -04:00
Sunil Mohan Adapa
31cfb8f643
security: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- 'fail2ban-client get logtarget' shows sysout
- fail2ban logs to journald
- fail2ban identifies failures logged by apache in journald

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:41 -04:00
Sunil Mohan Adapa
500cfca6d4
searx: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- Web interface works
- Web interface authentication works

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:38 -04:00
Sunil Mohan Adapa
4f0dd7733b
rssbridge: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- Web interface works

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:35 -04:00
Sunil Mohan Adapa
8b1dfc525b
roundcube: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- Web interface works
- fail2ban jail is enabled

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:33 -04:00
Sunil Mohan Adapa
23f7497c05
radicale: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- Web interface works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:30 -04:00
Sunil Mohan Adapa
8533a287a6
privacy: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- popularity-contest shows VENDOR:FreedomBox

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:27 -04:00
Sunil Mohan Adapa
e05a4b5eae
pagekite: Drop the config file for forcing use of Debian certs
See Debian bug #961984. This patch is available in Debian since version
1.5.2.200531-1. It is present in bullseye and bookworm. So it can be dropped
from FreedomBox.

Tests:

- Untested, as the exact configuration exists in
/etc/pagekite.d/90_debian_certs.rc

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:24 -04:00
Sunil Mohan Adapa
0daf6f353e
networks: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- Network manager does run the dispatcher script due to write permission for
  group. This issue is unrelated to the patch, however.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:22 -04:00
Sunil Mohan Adapa
df7e2e313f
minidlna: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- /_minidlna/ works and shows a 404 generated by miniDLNA

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:18 -04:00
Sunil Mohan Adapa
cd512bd24c
mediawiki: Use drop-in config component for /etc files
- Don't ship /etc/mediawiki/FreedomBoxSettings.php anymore. Create the file on
first setup. Keep old file on update.

- Simplify and unify how the configuration settings are read and written.

Tests:

- Run unit and functional tests.

- All the drop-in config files in /etc/ are symlinks.

- Shipped configuration is effective.

- Upgrade from older version keeps old configuration.

- Config files are all symlinks in /etc/

- When upgrading from older version FreedomBoxSettings.php does not change.
  FreedomBoxStaticSettings.php becomes a symlink.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:16 -04:00
Sunil Mohan Adapa
c326b35238
matrixsynapse: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- Login to Matrix using app.element.io works.
- Fail2ban rules work

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:13 -04:00
Sunil Mohan Adapa
0e82c58f1b
letsencrypt: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- Unable to test renewal hook

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:10 -04:00
Sunil Mohan Adapa
0bddd4bb54
janus: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- Web interface is accessible

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:08 -04:00
Sunil Mohan Adapa
6688ec9a20
ikiwiki: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- Creating blog and wiki works
- Wiki is accessible

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:05 -04:00
Sunil Mohan Adapa
4950639fbf
i2p: Use drop-in config component for /etc files
Tests:

- Could not test as the app is uninstallable

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:01 -04:00
Sunil Mohan Adapa
340c8bd156
email: Use drop-in config component for /etc files
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:28:58 -04:00
Sunil Mohan Adapa
99b23b75a4
deluge: Use drop-in config comonents for /etc files
Tests:

- Could not test as the app is not installable.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:28:54 -04:00
Sunil Mohan Adapa
13db2c2372
gitweb: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks /etc/
- Configuration file is effective
- Web interface works
- Web interface authentication works

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:27:32 -04:00
Sunil Mohan Adapa
ad13211f7e
debian/install: Add new place in /usr to keep drop-in config files
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:27:28 -04:00
James Valleroy
e719b1ed49
shadowsocksserver: Add separate app for Shadowsocks server
Closes: #729.

Tests:

- Install Shadowsocks Server. Install Shadowsocks Client, and set the
  server to localhost, and set the same password as the server. Use
  curl to connect to local SOCKS proxy on port 1080 and fetch a
  website.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Update some docstring comments for shadowsocks clients]
[sunil: Use the term Censorship instead of network filters]
[sunil: Prevent enabling both apps when setup is re-run]
[sunil: Update typehint for a privileged method to be minimal]
[sunil: Accept connections from external IPs too]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-05-23 13:58:39 -07:00
James Valleroy
1e905d8553
Release v23.10 to experimental
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-05-22 21:14:59 -04:00
Sunil Mohan Adapa
40eecb6446
*: Move modules-enabled files to /usr/share
- This will leave /etc/{plinth,freedombox} empty by default making service more
robust to run across various environments and situations. See systemd's
explanation for more details.

- Use Debian maintainer scripts remove all the existing files in
/etc/plinth/modules-enabled.

- Read from /usr/share/freedombox/modules-enabled then from
/etc/plinth/modules-enabled and finally from /etc/freedombox/modules-enabled.
Later read ones override previously read files. Any file pointing to /dev/null
will mean the module must be ignored.

Tests:

- Clean up /etc/plinth, /etc/freedombox and
/usr/share/freedombox/modules-enabled. Run service and notice that files are
getting loaded from development folder using a debug message.

- Run setup.py and notice that files get installed in
/usr/share/freedombox/modules-enabled/ and in the next run they get loaded from
there.

- Create a override file in /etc/plinth/modules-enabled/transmission and notice
that overriden file gets priority over the one in
/usr/share/freedombox/modules-enabled.

- Link the file /etc/plinth/modules-enabled/transmission to /dev/null and notice
that is not loaded.

- Create another file in /etc/freedombox/modules-enabled/transmission and notice
that it overrides the previous two files.

- All affected modules are loaded.

- Build a new Debian package and ensure that upgrading 23.8 to new version
removes are all configuration files.

- Build developer documentation and test that Tutorial -> Full Code and Tutorial
-> Skeleton sections have been updated with references to
-.../modules-enabled/... paths.

- Install quassel and notice that certificates were copied to /var/lib/quassel
directory. Change domain to another domain and notice that certificates were
copied again to that directory.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-05-13 07:08:43 -04:00
James Valleroy
6cce7126dd
Release v23.9 to experimental
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-05-08 21:12:59 -04:00
Sunil Mohan Adapa
ac3754fa2f
theme: Move icons to app folders
- This improves modularity. Each app brings its own icons in its directory
instead of a centralized directory.

Tests:

- Install an app and notice that the installation notification has the icon.

- Visit an app's page in Apps and System (cockpit) section and ensure that the
app's icon is being shown.

- Visit the Apps and System section and notice that apps' icons are being shown.

- Visit the home page and notice that shortcuts' icons are being shown.

- Visit the URL /plinth/api/0/shortcuts and notice that the URLs for icons are
accessible and lead to proper icon files.

- Build developer documentation and notice that Tutorial -> View and Reference >
Menu pages show the expected updates.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-05-07 13:11:27 -04:00
James Valleroy
b423733ec4
debian: Follows policy v4.6.2
No changes are needed.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-26 06:10:41 -07:00
James Valleroy
b8f786cf40
debian: Update copyright years
Add doc/*.wiki to the section covered by CC-BY-SA-4.0.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-26 06:10:24 -07:00