7974 Commits

Author SHA1 Message Date
James Valleroy
ce2c917ddb freedombox Debian release 22.23
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEfWrbdQ+RCFWJSEvmd8DHXntlCAgFAmNXOGMACgkQd8DHXntl
 CAhT1RAApHLyIJruG0SmKkxbpHSkL9BKrojNNxKDuH1vp6h9IoB6lz2NgAP5sVZP
 hf++qheimkMLl2pWR+YMBgELAYKxPpqTNX6yiy6DKGhypdfdhAuZBZQ9rC/LfnW4
 7wsc3OdLhqfoPG5ke2x3D+XbShnRlVRAHoKeWD7XtubPwx0XFq/aEmQW82KQdX5c
 ZyegAUZc+7mkr7eOeQM2CUG+hMnF4+VAxvH0I31a3N6Ew0PGRBUghPJX8Lw3VCBo
 3GFNz0VaEMwJgQaamamA96aucAWID3wkO1ARwoE+3qJWqXSPUWhy8pKqArwbQrk8
 fU25B/sfoo2JQQIH1O8ngb0PUPt+/+vtgmBXLnQGEkMLOkUA5GywnZOn1MWV5pKi
 iQU4VRXy1SP1+YX7r73uKFbXXsDeK71dk8IyydYQxIz/1I9EkS/Dl/dZsRSYw541
 m79sHLRM3E3/fvEweGZm5X4IM9pxV4Hpd+7nY5+SlxITY9QKzSG9MFUI2aUjv8B1
 UNBmuOcBxW97Xyj9QaWuT5EbEa4kLpe7OIU+KLIJzZ1vQIHRqHo/43tYCdCpviyP
 s7ULylO014qWoEE/hOZY5GIzAvMOqvVsf6vjwLLSMDLKIW6/RR9De38QePzhcT0T
 roLcXy+7aqlzEeMeuRpijMy82MpOKkO43Q9/mCTsIUOWYkiEJLQ=
 =XuJi
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEfWrbdQ+RCFWJSEvmd8DHXntlCAgFAmNg7qQACgkQd8DHXntl
 CAgg3Q/+OrT4R/edfN3YBcvv9KLnIj+t46kBfydhAq04SDTOPK3jKhyH1W7Uinvb
 HlZ0j8uXAcZV23N7Ovj6a7twVizXLb+EQXtaqbxhA7CzYIKa/a5neetxN4tCAPjZ
 8ezn4b+Q1OjugXc/PLVlpQMOqYKpKmGi8XMeh4YqKJALntWEjfY2Sn4K4Ud0WsBu
 FJfYGqkozJ7T4SKkEigY0MD8FnloWrREpenfFkvgIZB0XbO2MMyQ0qLJCOjgXdEG
 sdq/HcZnFNKMWHz3MEB4IXtSX2v6inMsL05RGdxIk1HDv4a1PSkyvLB9SWufPtJ3
 PEPjXN/7fT5bKETZOzZH9uDeVZajn3DE3twa/EjZQAp/FlJYNRmZ/np9Ikl1GNOU
 W+B8MbPwCjHtMtjzhLPRqf0BeAe2nC0Rob3bHz0eGxCg4IB+AMRTwXyoARopBesP
 5fxb57IK2Fr6lKdXQ4HERJ9ZsuCqK5/yqMD5+6OoDf1od8bCmZXSpbf24gEwI3WG
 7HWbxnfYpXOi0o0Q92I5iwZ28G5MXmdSjqjYKC2ynOI3Zrnl9IeHm7Y91VwzPEP5
 3JhzZu0J41BQf4509HtkhSQENj28Efpi8PKLzYP/ySH/rtyyRg2KkX6Y2/QZpxtb
 voEbbarRBMCq6gqz78+x7taMHZ9q3VHNZ436ll6clQEVs0+Up4Q=
 =DG7T
 -----END PGP SIGNATURE-----

Merge tag 'v22.23' into debian/bullseye-backports

freedombox Debian release 22.23

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-11-01 06:02:11 -04:00
James Valleroy
083f67757f
Release v22.23 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v22.23
2022-10-24 20:38:14 -04:00
James Valleroy
c538871057
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-24 20:37:31 -04:00
James Valleroy
6147558793
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-24 20:16:23 -04:00
Sunil Mohan Adapa
4c5344dfa0
letsencrypt: Fix regression with comparing certificate
Closes: #2295.

_assert_managed_path() expects pathlib.Path. Due to a typo, a string is being
sent instead.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-24 20:11:17 -04:00
Sunil Mohan Adapa
bcbd623f00
upgrades: Fix a minor flake8 pipeline failure
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-10-24 16:06:38 -07:00
nbenedek
63278f0bcd
rssbridge: add option to allow public access
These modifications are copied after the wordpress
public access configurator.

Signed-off-by: nbenedek <contact@nbenedek.me>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-10-24 12:02:10 -07:00
Sunil Mohan Adapa
50c6cfd6ac
Translated using Weblate (Hungarian)
Currently translated at 96.8% (1439 of 1486 strings)
2022-10-24 20:39:24 +02:00
James Valleroy
c16d1e51d6
upgrades: Skip unattended-upgrade in dist-upgrade
Skip running unattended-upgrade due to it getting stuck in endless
loop. See #2266.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-10-24 11:19:43 -07:00
tunebes
c4b17130d4
storage: Handle file systems on non-physical devices
Fixes: #2126.

Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-10-24 11:18:53 -07:00
109247019824
0e0f5e5a86
Translated using Weblate (Bulgarian)
Currently translated at 40.5% (603 of 1486 strings)
2022-10-24 12:34:36 +02:00
Benedek Nagy
eb4229bb6e
Translated using Weblate (Hungarian)
Currently translated at 96.8% (1439 of 1486 strings)
2022-10-24 12:34:36 +02:00
James Valleroy
f0fd3d9132
upgrades: Allow FreedomBox vendor when adding backports
Fixes: #2294.

Tests:

- In stable container, when frequent feature updates option is
enabled, /etc/apt/sources.list.d/freedombox2.list exists as expected.

- Matrix Synapse can be installed.

- Shaarli can be installed.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-10-23 17:21:58 -07:00
James Valleroy
e1f8635f8d
Release v22.22.1~bpo11+1 to bullseye-backports
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v22.22.1_bpo11+1
2022-10-21 07:09:29 -04:00
James Valleroy
f78bfd8e95 freedombox Debian release 22.22.1
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEfWrbdQ+RCFWJSEvmd8DHXntlCAgFAmNMLM0ACgkQd8DHXntl
 CAhDwxAAynrsG7giNoysoqzpRW1Rkwuz0PME00PnXkVMtXYmPB4NICKdx0Zf3oY6
 eMxVRy/SoplHtoiXAqPflTnP12oYp614crIurW3AVYEeLznALXRMOnuowG6Bk/1t
 pZ0ag9lPjk53trv+qgzIrJNvqQvyzThXe9vIzsXo6GBYyjhvvUUb6ZJ+4gOtHcfc
 O2cbanYlXfe3a6eTq9ynqJ2ba8WxVLfDbAsH1JHtkDH44WZCtOobIRyMPFO/f3ax
 g047gtshAD+zBN/hZEO8+eiS53LRkVjIcTKYU4PXhUU5logtd1FsHynwKKhEuxZd
 awZBE09pqb/03VTVRqExUuIctaRyAUH7gqyD4HhiLjxa/JPdhLU24fW/nwTAZt2l
 mwSZ6xYnzzyjHwZ+by+XjwAKZ1yT3VYj4h6i+xHj3SSLKZr+rcsu5vZQcE1vkZmn
 Zhlx9+OS7quxpj3wzDJq4nnRZ00zq6wOTrTWutnaWoo/1bCmgwkAMfGwkma949Tg
 nbU7oHvxpbpQJB6V9EDpj+qXtcV4p1iJ0c691uUKd1zBbm+nQedJ8cJwQ53xD/lR
 Fp1EK9/I72yA4LhgKi+XuyL81O4LBKJHGiPK9vlWW4muW/0/zhVgdCj1bwPB5Vcv
 oYNCgjmi1RLK3+7erN7i+nf19aWUAAkYWT8T33oPkKjjah6p2gs=
 =3fnK
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEfWrbdQ+RCFWJSEvmd8DHXntlCAgFAmNSfcMACgkQd8DHXntl
 CAhnAhAAhrLKUZcgZZnpIVM6SvS7cqUTO5MRFkzzECIg29oeAn8ligMUuc8G4jKu
 SA3fwYA34gu7so1B+0dodxySHS2g/MjCJJHFgUtoEa1s33RgO35SossXPzJY+Be3
 8o0mpaUG3GBk1XNvUvu/oMZPWsecGK1pEm3+XLZpIdfxPhv8TPiE5S+am0spcy9v
 r2W202REzYiRg7fMPyYshHcCotB52SnnvP7Dl+a8ptaMc3urT/KYwAdvL75pvIk2
 TaqqqcdjjIstlHrWhagePuDqpg1XbQp3sxq5fkgrrz4Gehe5BwWOeX139E62pDXg
 442ULXzYK47gUMedtBiSQuJVf1qHM6Kz2ktmn67Xlsg9x+bQLkUVch1YOtyDMNET
 er09cBy/C73vW5+L5YmBelFIgcWadVkNhlTyVN3kgSeN/QPjgx5RQ32FVafRSQgv
 YSr2fO4IpQ4nejQRQrhUTpPt4QFwGi4x0oC83OhpRdijsPRUZImFFG52lG1jFni5
 ZPZygMzoCWwiFUfVZOgj4L1m7htXhL4BQ5XWzwU4oerwTdOSQy6FOWOmqQMyLQ6C
 TKyBdZhU8GgOHCqe2etASnIBBl07ZJVdb1o9EAL9pM47kv9wC9rr6gqFHjzpBvSx
 LPdEVbRPEDAHpUKcSX9bO6JynElzAq9YKwhPoLt6uGaTrXQ6n28=
 =uhH0
 -----END PGP SIGNATURE-----

Merge tag 'v22.22.1' into debian/bullseye-backports

freedombox Debian release 22.22.1

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-21 07:08:50 -04:00
109247019824
63b2e2a380
Translated using Weblate (Bulgarian)
Currently translated at 40.5% (602 of 1486 strings)
2022-10-20 23:06:51 +02:00
Michael Breidenbach
3f593bfa32
Translated using Weblate (Swedish)
Currently translated at 100.0% (1486 of 1486 strings)
2022-10-20 23:06:51 +02:00
James Valleroy
6c59f3fc7d
Release v22.22.1 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v22.22.1
2022-10-16 11:42:35 -04:00
James Valleroy
4730e85585
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-16 11:41:54 -04:00
Tymofii Lytvynenko
aa8443b777
Translated using Weblate (Ukrainian)
Currently translated at 100.0% (1486 of 1486 strings)
2022-10-16 16:35:53 +02:00
Jiří Podhorecký
16b817da48
Translated using Weblate (Czech)
Currently translated at 100.0% (1486 of 1486 strings)
2022-10-16 16:35:53 +02:00
109247019824
9f83ed4f46
Translated using Weblate (Bulgarian)
Currently translated at 40.4% (601 of 1486 strings)
2022-10-16 16:35:53 +02:00
Tymofii Lytvynenko
ba33efdb23
Translated using Weblate (Ukrainian)
Currently translated at 93.8% (1394 of 1486 strings)
2022-10-16 16:35:53 +02:00
Eric
1e6cadfb4f
Translated using Weblate (Chinese (Simplified))
Currently translated at 68.7% (1022 of 1486 strings)
2022-10-16 16:35:53 +02:00
Burak Yavuz
2a6d4e6694
Translated using Weblate (Turkish)
Currently translated at 100.0% (1486 of 1486 strings)
2022-10-16 16:35:53 +02:00
ikmaak
c788093bbf
Translated using Weblate (Dutch)
Currently translated at 100.0% (1486 of 1486 strings)
2022-10-16 16:35:53 +02: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
b02330c8a5
Release v22.22~bpo11+1 to bullseye-backports
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-14 09:47:43 -04:00
James Valleroy
df2fb42536 freedombox Debian release 22.22
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEfWrbdQ+RCFWJSEvmd8DHXntlCAgFAmNE1JUACgkQd8DHXntl
 CAifSQ/+OYYsEqoz1Q7ClpIIviTxBUsQna9d9kArCkqMmSfzRNEVI9dfOVxUAhTH
 XVkJoxS/zmyDiCWtFMxHx0HX6C0XgFmG/scznxZHUjwVRxVdaNaFYpSgfB9YnvnX
 9ppHRNw7fpz0MvGEMYjpdSjY8RW4/8bFsKSZJMjn4zBKg1OcBd+7rSmnaW3SAreh
 9P4wkNnToj9blMq+5iIJWuemWSB+aWPbLpPzb9c24TLJaehvobR0VS2cagZFrYwF
 NLOxipk0JzrBUrFcv/ytxXK5NbsPyVAZB1wcW9jM5nS+70jd9gIXJzDuiJ1bpB34
 E1aBc1nlFWN3GtDKRVJolwC2uplu8+1p35tm5gib0jziqzwo95ZqRSSPhLioniaD
 Zsxae4nxzaej89eiQUOiy8MtOC+N/MmrTcOS9vGcS0l2Am92P8LQ3Q7Fr7x65gI8
 ZPkWPkP2kZL7BJdLTP33Dsr5lnqPhHXrBqbGGhxRUA3CYdLijabBjK3GgmRcTiz1
 jomJ3+cfT7yEvk3bVMv9mguVee18GfGvThIsPdJq3p9ihEhrYcwUL7W2BAtC8zuE
 sfysIBR+dNmQHtST2OfuAdGMv4T3u+Pq1lO9ADhESsuwip9+DXS8dWn3EiCSAxg+
 Dqx7cujvoJ2nAwMG0wdsh25Ze/CKAkBoDBAONJkGOKAmMAeDEpU=
 =wEbG
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEfWrbdQ+RCFWJSEvmd8DHXntlCAgFAmNJaGMACgkQd8DHXntl
 CAjx+A/8CxwL12NhHPrWJVKQm8vVUMUVzHowenDTUs7CytqMDaqsuCjyGnNQwC87
 A21OnLTWV2UIwoX/pEuHcVzW2ZJIxj0sgfuP3l2jibvZrfscfKPWJCObvGFx6Xp/
 JLfd3pX5vxGhRkBXjxz4DSzoiFgfO7hKg2h/q1A7xhSRTtjSuDIH3RPsRtZcvlIF
 k1FwmGdOFee1WQ5qhlAxIPLNVW3a71PFXErcpbxA1Gtm3HSYJQsnAKD8LUL8jYiU
 hwfNrn6Qd65yNxVUsgmUJlUOmoZCLDRUWhphqU+qs2l7Ddk1ChnL4S8uEx/AVqUU
 JqmsOM0QDDCkJXAnpvxfCtGik/x19/TLktXMNmoESYLmDMGOEjJWLWjAqGjfb8+J
 iiFExuXNN90ZJsuA9gJlX5JOA1fDTOBZshyqkmqNi3kFX2fDAVJ1sd/wqBWld/4w
 kVKQBL0JjKNSWGudpPJbZK1OrFAE94qBJGqWcbXRgIZjlsrisWP/hjOJOI9forsY
 LQlTuaw/yMr74vMa80ggFoqAv8JiEiGtUhZPBfzWgGTF59vJ2w7T9eut0CPll5/f
 4dcPmMhms+udfxH/EMKSBQSEldh+wrX8jD6fghnOj10YXuh/AReT/fsbIbpvQQiz
 xXykNJ5nL7+nmkh7teMtZ+RkSKCU+9VmF2MuUnV9DD0QMbSvddc=
 =Nx9W
 -----END PGP SIGNATURE-----

Merge tag 'v22.22' into debian/bullseye-backports

freedombox Debian release 22.22

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-14 09:47:14 -04:00
Sunil Mohan Adapa
bbb6451254
privacy: Remove unused import, fix pipline
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-10-10 22:55:30 -07:00
James Valleroy
64cbcb0d0d
Release v22.22 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v22.22
2022-10-10 21:57:23 -04:00
James Valleroy
23d807fe25
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-10 21:56:32 -04:00
James Valleroy
ae999c3ff0
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-10 21:35:37 -04:00
Sunil Mohan Adapa
236ad3771a
privacy: Set vendor as FreedomBox for dpkg and popularity-contest
- This changes sets the default dpkg vendor as FreedomBox. 'Debian' is still the
parent of the vendor.

- This results in popcon setting the Vendor as FreedomBox. This allows measuring
the popular of FreedomBox distribution itself as against other Debian
derivatives in the section 'Statistics per distributions reporting to Debian' of
https://popcon.debian.org

Tests:

- Run `sudo ./setup.py install` and freedombox service. Privacy app will be
setup for the first time. In /etc/dpkg/origins/ the file default is a symlink
pointing to /etc/dpkg/origins/fredombox. Running 'sudo sh +x
/etc/cron.daily/popularity' runs successfully. Remove files
/var/lib/popularity-contest/lastsub /var/log/popularity-contest* if necessary.
The file /etc/log/popularity-contest shows VENDOR:FreedomBox in the first line.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-10 21:33:27 -04:00
nbenedek
7e2ebcb743
privacy: Add new system app for popularity-contest
- Keep the description about app generic

- Remove enable/disable option

- Create a booleanfield to turn on/off popcon

- Don't re-enable popcon during an update

Tests:

- When enabling/disabling the option, the `"PARTICIPATE"` value in
`/etc/popularity-contest.conf` is changed to yes/no as expected. For reference
see `/var/lib/dpkg/info/popularity-contest.templates`

- When popcon option is enabled, running sudo sh -x
/etc/cron.daily/popularity-context shows that execution was successful and data
was submitted. Remove files /var/log/popularity-contest* and
/var/lib/popularity-contest/lastsub if necessary. Gpg is used and encrypted data
is what was submitted.

- When popcon option is disabled, running sudo sh -x
/etc/cron.daily/popularity-context shows that execution stopped because the
option is disabled.

Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Add a notification to tell users about privacy app]
[sunil: Correct the URL to /sys]
[sunil: Minor code styling changes and updates to description, icon]
[sunil: Ensure that popcon works with encryption]
[sunil: Write configuration to a separate file]
[sunil: Use Shellvars lens instead of Php lns]
[sunil: Add functional tests]
[sunil: Backup/restore the configuration file]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-10-10 17:35:26 -07:00
Nikita Epifanov
5dd2751514
Translated using Weblate (Russian)
Currently translated at 96.7% (1443 of 1491 strings)
2022-10-10 20:52:22 +02:00
nbenedek
95f2d372d8
matrix: Add fail2ban jail
Test:

- Setup Matrix on a VPS with a FQDN and a valid LE certificate, then add these
configs to fail2ban.

- On a production server apply the changes of MR !2296

- Setup the fail2ban filter and jail, then restart fail2ban

- Trying to log in unsuccessfully from FluffyChat leads to a 10 min ban

Result:

`sudo fail2ban-client status matrix-synapse-auth-freedombox` returns the
following output, but the server actually remains accessible in every way.

```
Status for the jail: matrix-synapse-auth-freedombox
|- Filter
|  |- Currently failed: 1
|  |- Total failed:     11
|  `- Journal matches:
`- Actions
   |- Currently banned: 1
   |- Total banned:     1
   `- Banned IP list:   MY IP
```
Signed-off-by: nbenedek <contact@nbenedek.me>
2022-10-10 10:08:06 -07:00
Besnik Bleta
ecb4ce0733
Translated using Weblate (Albanian)
Currently translated at 99.3% (1482 of 1491 strings)
2022-10-10 15:34:38 +02:00
Besnik Bleta
99aa891454
Translated using Weblate (Albanian)
Currently translated at 95.8% (1429 of 1491 strings)
2022-10-10 15:34:38 +02:00
Tymofii Lytvynenko
c9f924f592
Translated using Weblate (Ukrainian)
Currently translated at 88.0% (1313 of 1491 strings)
2022-10-10 15:34:38 +02:00
Petter Reinholdtsen
b7b2c94526
Translated using Weblate (Norwegian Bokmål)
Currently translated at 79.0% (1179 of 1491 strings)
2022-10-10 15:34:37 +02:00
Sunil Mohan Adapa
387874ecfd
fail2ban: Make fail2ban log to journald
- Recommendation to use 'sysout' as log target in order to log to systemd
journal comes from the fail2ban.service file.

Tests:

- Install the changes and restart fail2ban. Notice that journalctl shows new
log lines.

- Logged to /var/log/fail2ban.log has stopped.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-09 08:54:02 -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
Sunil Mohan Adapa
72d7a05ead
apache: Fix logs still going into /var/log files
Closes: #2264.

- Set apache-auth fail2ban jail's backend to read from journal instead of
syslog. Tweak the regex matching to deal with the custom format.

- Adjust the apache error log format to remove unnecessary timestamp. It causes
problems for fail2ban regex matching.

- There was an error in the earlier patch the make apache log into journald.
Configuration for TLS sites still contained ErrorLog and CustomLog directives.
Remove them.

- There is also file with CustomLog directive that logs for other vhosts.

- For some reason, for custom error log format, %T - thread ID did not work and
had to switch to %{g}T global thread ID.

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

Tests:

- In a container, apply the patch, run setup and start FreedomBox. Apache app is
updated to new version. Apache web server is reloaded. The
other-vhosts-access-log configuration is disabled.

- On a production machine, remove the directives in
freedombox-tls-site-macro.conf and disabling other-vhosts-access-log stopped the
logging into /var/log/apache2/ directory.

- Use TTRSS /tt-rss-app/ URL and type wrong credentials for 10 times. The client
is banned for 10 minutes. Repeat after unban. Client is banned again.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-09 08:53:46 -04:00
Sunil Mohan Adapa
6a0493a752
action_utils: Drop support for non-systemd environments
- There hasn't been a need for this for a long time. non-systemd environments
haven't been worked on or tested for in a long time.

- Keep the is_systemd_running() method for future use.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-08 18:54:13 -04:00
Sunil Mohan Adapa
e3a67da8ec
config: Drop legacy migration of Apache homepage settings
- Initial implementation of home page setting used the file
/etc/apache2/conf-available/freedombox.conf and edited the file. Since this file
is shipped by the freedombox package, it lead to package getting stuck with
conf-file prompt. FreedomBox v19.10 first fix this by carefully undoing the
edits in this file and making them elsewhere.

- This fix is present in Debian present old stable (with backports) and current
stable, the migration is not needed in almost all the of cases.

Tests:

- First setup of FreedomBox works.

- Setting home page works are expected.

- Functional tests for config module works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-08 18:54:10 -04:00
Sunil Mohan Adapa
158366feea
bind: Drop enabling DNSSEC (deprecated) as it is always enabled
- As of bind 9.16, the option to enable DNSSEC 'dnssec-enable' is obsolete and
has no effect[1]. The option 'dnssec-validation' controls DNSSEC validation and
is set to 'auto' by default. 'auto' means that DNSSEC validation is enabled and
default trust anchor is used for DNS root zone. DNSSEC signatures are also
passed onto a client whenever available. Current stable, Debian Buster, has
version 9.16[3].

- As of bind 9.18, the option to enable DNSSEC 'dnssec-enable' is not recognized
and causes the daemon to fail to start[2]. Debian next, Debian Bookworm, has
version 9.18[3]. Therefore, in testing and unstable, bind fails to start of
installation from FreedomBox.

- There is no use-case for changing the current default behavior.

Links:

1)
https://bind9.readthedocs.io/en/v9_16_32/reference.html#dnssec-validation-option

2) https://bind9.readthedocs.io/en/v9_18_6/reference.html

3) https://tracker.debian.org/pkg/bind9

Tests:

- Run functional and unit tests.

- Option to enable/disable DNSSEC is removed.

- When bind is installed on testing without the patch, it fails to start. When
the patch is applied, bind will be upgraded, the dnssec-enable option is removed
from the configuration file /etc/bind/named.conf.options and bind is running.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-08 18:54:08 -04:00
Sunil Mohan Adapa
65c433a211
action_utils: Drop unused progress requests from apt-get
Tests:

- All tests in patch series have been done with this patch applied
- Install and uninstall of apps works

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-08 18:54:05 -04:00
Sunil Mohan Adapa
5c5fc9eb61
actions: Drop unused superuser_run and related methods
Tests:

- All tests in patch series have been done with this patch applied
- Unit tests pass

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-08 18:54:03 -04:00
Sunil Mohan Adapa
0bda4843a7
*: Use privileged decorator for package actions
Tests:

- DONE: Check if package manager is busy works
  - DONE: Power app shows status in app/restart/shutdown pages
  - DONE: Upgrades app shows in app page and first boot wizard page
  - DONE: When attempting force upgrade, busy state results in a back-off
- DONE: An app's packages can be installed/uninstalled successfully
  - DONE: apt update is run before install
  - DONE: If network is not available during package install, error message is shown
- DONE: Filtering packages with configuration file prompts works. Tested with
  firewall 1.0.3 to 1.2.1.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-08 18:54:00 -04:00