49 Commits

Author SHA1 Message Date
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
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
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
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
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
Sunil Mohan Adapa
f8f7dd22b5
apache: Merge old configuration files into a better location
- It is simpler to keep all the configuration in a single file. Any overrides
are expected to be done by writing additional configuration files with higher
priority.

- /etc/apache2/site-available/ is typically reserved for virtual host
configurations. Redirections and proxying for all virtual hosts rather belongs
in /etc/apache2/conf-available/.

- This looses the option of disabling plinth-ssl.conf when needed. In the
initial days of enabling TLS, there was a need felt to keep the option of easily
disabling redirection to TLS in case there is a need for it. However, TLS
certificate setup is mature and the limitations are well understood. There is no
longer a need for it. It still may be possible to avoid the redirection with an
additional configuration.

Tests:

- In a fresh container, setup succeeds. Redirecting to https:// for /plinth
works. FreedomBox web interface is available.

- Without the patch applied created a container. Run setup and access Plinth
interface. Apply the patches. Apache setup is run. a2query -s plinth and a2query
-s plinth-ssl show that sites are not enabled. Redirecting to https:// for
/plinth works. FreedomBox web interface is available.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-07-17 12:07:55 -04:00
Sunil Mohan Adapa
668da20a02
mldonkey: Drop app not available in Debian Bullseye and Bookworm
Closes: #2157.

Original author of the app J. Carlos Romero <juancarlos.romero@gmail.com> has
been contacted to see if there is interest in continuing to maintain the app.
There has been no response.

Since the app is not available even in the current stable (Bullseye), few users
are presumably using it on a supported FreedomBox distribution. Any users are
advised to maintain the manually instead of relying on FreedomBox for it.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-01-22 11:55:34 -05:00
Joseph Nuthalapati
b0305746c8
tahoe-lafs: Drop app as it is not being used
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Add to configuration file removal in Debian package and setup.py]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-12-20 15:12:11 -08:00
Joseph Nuthalapati
621cb67527
diaspora: Drop app that was never finished.
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Add to configuration file removal in Debian package]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-12-20 15:11:29 -08:00
Joseph Nuthalapati
ce5274d9ee
monkeysphere: Drop app as it is not being used
Closes #2157.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Split diaspora and tahoe-lafs into separate commits]
[sunil: Remove monkeysphere from help/tests/test_views.py]
[sunil: Add to configuration file removal in Debian package and setup.py]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-12-20 15:09:50 -08:00
Joseph Nuthalapati
4e9d22d376
apps: Remove Coquelicot
Bepasty is the replacement file-sharing app.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-08-21 15:42:14 -07:00
Sunil Mohan Adapa
9def9750c0
frontpage: Drop empty custom shortcut files
Installing an empty file in /etc/ that is meant to be modified is an unnecessary
invitation to upgrade issues.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-06-28 21:01:20 -04:00
Sunil Mohan Adapa
4263f9e2c8
cfg: Drop the default configuration file
- The configuration module defaults to values in the production configuration
file.

- If the file is found, it is read and the read values overwrite the defaults.
If the file is not found, no error is raised. This allows us to not ship the
configuration file. User may create the configuration if they want to change the
defaults. This eases upgrades when configuration is edited. This also make
FreedomBox robust to deployments where /etc/ is not populated by default such as
OSTree. It is also a good practice for daemons as followed by the likes of
systemd.

- If the file partly populated only the values read override the defaults and
the remaining values don't change. This allows the user to write simpler
configuration file.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-06-28 21:01:15 -04:00
Sunil Mohan Adapa
6179d98a07
upgrades: Don't ship apt backport preferences file
- Don't ship the file preferences file as this is a violation of the Debian
policy. Lintian throws a hard error that can't be overridden. Remove the lintian
override. Remove this file using maintainer scripts when upgrading from all
version below 20.5.

- The preferences file is now renamed to 50freedombox4.pref.

- Instead write the file when the app is getting setup (on each new version).

- Don't run the setup code on daily timer, instead run the code when the app
upgrades. This ensures that as soon as freedombox package is upgraded and run,
the new preferences file is created instead of waiting for the daily timer to
run.

- From now on when the preferences change, we will increment the version number
of the upgrades app. Change the setup() for the app so that it does not
re-enable automatic upgrades every time setup() is run.

Closes: #1673.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-03-20 13:59:58 -04:00
James Valleroy
21ba450484
repro: Remove app
The repro app has been disabled for a long time. Its package has been
removed from Debian, and there is no sign of it returning soon.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 20:00:43 -05:00
James Valleroy
c8a5f3727f
restore: Remove app
The restore app has always been disabled, because node-restore package
is not available in Debian (RFP #804507). There hasn't been progress
towards packaging it since 2016.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 19:59:02 -05:00
Sunil Mohan Adapa
5f8965df25
debian: Rename plinth package to freedombox
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-31 15:59:08 -05:00