408 Commits

Author SHA1 Message Date
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
James Valleroy
56b17ca41f
Release v23.8 to experimental
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-04-24 21:47:11 -04:00
James Valleroy
339095daca
Release v23.7 to experimental
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-03-27 20:52:54 -04:00
James Valleroy
0a5d3bd8e7
Release v23.6 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-03-13 21:53:11 -04:00
James Valleroy
479c129369
Release v23.5 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-02-27 20:33:44 -05:00
James Valleroy
f202c7222e
Release v23.4 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-02-13 21:06:50 -05:00
James Valleroy
59f5fa28ff
Release v23.3 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-01-30 20:37:16 -05:00
James Valleroy
0d27d10811
Release v23.2 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-01-16 20:33:13 -05:00
James Valleroy
3e7b6bb451
Release v23.1 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-01-03 11:55:21 -05:00
James Valleroy
d1fc0d6b78
Release v22.27 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-12-19 21:00:36 -05:00
Sunil Mohan Adapa
bb527673fb
d/control: Don't recommend libpam-tmpdir
- Use of libpam-tmpdir leads to problems installing MariaDB[1][2][3]. A fix for
the serious issues may not be available for next stable release.

- Services run by systemd don't benefit from libpam-tmpdir[4]. So it's effect is
limited to PAM sessions opened with a terminal. Terminal access is mostly for
debugging in FreedomBox and not a primary use case.

- Services are (or will be) protected with PrivateTmp=yes in case of services
running on FreedomBox. This is better protection compared to what libpam-tmpdir
offers.

Links:

1) https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1022994

2) https://jira.mariadb.org/browse/MDEV-29910

3) https://salsa.debian.org/mariadb-team/mariadb-server/-/merge_requests/23

4) https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1022994#32

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-12-18 17:30:24 -05:00
James Valleroy
70662e481a
Release v22.26 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-12-05 21:37:42 -05:00
Sunil Mohan Adapa
253540fb3d
security: Remove restricted access setting and configuration
Closes: #2276.

Functionality all over the system keeps failing due this approach. The latest is
changing hostname in ejabberd Mnesia database fails (#2276). Further, users
connecting FreedomBox to a monitor can't use a GUI.

Tests:

- Without patches, enable restricted access. Apply patches and setup.py install.
Security app is updated. Restricted access is disabled and
/etc/security/access.d/{50freedombox.conf, 10freedombox-security.conf,
10freedombox-performance.conf} are removed. It is possible to login into
non-admin account via SSH.

- On a fresh install, the configuration files are not found.

- Security page does not show 'restrict console logins' option.

- Updating security app setting works. Message 'Configuration updated.' is
shown.

- First boot succeeds. Restrict console login is not enabled.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-12-05 20:47:13 -05:00
Sunil Mohan Adapa
1f4171e524
Release 22.25.1 to unstable
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-12-02 08:23:18 -08:00
Sunil Mohan Adapa
a12d056087
Release 22.25 to unstable
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-11-28 15:42:17 -08:00
James Valleroy
952b61bef5
Release v22.25 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-11-21 20:32:49 -05:00
James Valleroy
5cfdf13491
Release v22.24 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-11-07 20:58:09 -05:00
Sunil Mohan Adapa
1e0e11201c
debian/lintian-overrides: Fix mismatch patterns and new messages
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-11-05 07:20:02 -04:00
James Valleroy
083f67757f
Release v22.23 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-24 20:38:14 -04:00
James Valleroy
6c59f3fc7d
Release v22.22.1 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-16 11:42:35 -04:00
James Valleroy
785e0b7783
debian: tests: Fix PYTHONPATH
Fixes: #2290.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-16 09:54:48 -04:00
James Valleroy
64cbcb0d0d
Release v22.22 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-10 21:57:23 -04:00
Sunil Mohan Adapa
9cc91441ff
wordpress: Update fail2ban filter
- Name of the jail has to be less than 29 characters for an iptables/nft chain
to be created.

- Make the regular expressions more specific to avoid matching incorrect fields
for <HOST>.

- Added journalmatch to improve performance by matching the regular expressions
against only specific journal entries.

Tests:

- Run setup.py, remove the old jail and filter files. Restart fail2ban and make
10 incorrect login attempts. The IP address gets banned for 10 minutes.

- Not run: Build new freedombox package and upgrade from older version to see
that old configuration files have been removed.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-09 08:53:56 -04:00
James Valleroy
aa47619719
Release v22.21.1 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-01 10:07:29 -04:00
James Valleroy
23e760c9a0
setup.py: Move distutils import after setuptools import
Fixes: #2267

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-09-26 21:57:28 -04:00
James Valleroy
bc26cfa4cf
Release v22.21 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-09-26 20:48:05 -04:00
Sunil Mohan Adapa
31d7471405
d/install: mediawiki: Install the new powered by file
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-09-26 13:22:31 -07:00
James Valleroy
216071109d
Release v22.20 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-09-12 21:07:38 -04:00
nbenedek
49d77f20d7
d/maintscript: remove tahoe and mldonkey apache conf files
Currently, tahoe-plinth.conf and mldonkey-freedombox.conf are left over
in FreedomBox systems that were installed on plain Debian. This commit
makes sure these files are removed.

Test:
1. I installed FreedomBox on Debian and checked if the obselete files are indeed present.
2. I built my own package with the modifications and updated FreedomBox with the
local deb file.

Signed-off-by: nbenedek <contact@nbenedek.me>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-09-08 21:25:22 -07:00
James Valleroy
93863167d2
debian: Add Italian debconf translation (Closes: #1019157)
Thanks for Ceppo for the patch.
2022-09-05 07:59:24 -04:00
James Valleroy
eccf75efdd
Release v22.19 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-29 22:34:18 -04:00
nbenedek
7fc3ce7c20
d/control: Break ufw as we use firewalld
Some VPS providers preconfigure ufw which can break the
FreedomBox installation process on plain Debian. To
prevent this, make the freedombox package remove ufw.

Tests I made:
1. Enabled ufw on a Debian system
2. Built a custom package with the modification in the
control file
3. Installed the custom packge.

Result: ufw gets removed before the execution of
`update-initramfs: Generating /boot/initrd.img-5.10.0-17-amd64`

Signed-off-by: nbenedek <contact@nbenedek.me>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-08-23 08:58:05 -07:00
James Valleroy
fa8954464b
debian: Update Spanish translation template
Thanks to Camaleón <noelamac@gmail.com>.

Closes: #1017452
2022-08-16 09:54:55 -04:00
James Valleroy
7071a05f47
Release v22.18 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-15 20:55:15 -04:00