6904 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
d1b040cdb6
package: Implement installing packages in the component
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-12-04 16:34:22 -05:00
Sunil Mohan Adapa
2157cb33b7
package: Add parameter to specify skipping package recommendations
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-12-04 16:34:12 -05:00
Sunil Mohan Adapa
057a125531
app: Introduce API to setup an app
Like the earlier API, accept old_version as parameter. A base implementation,
simply call setup on all components.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-12-04 16:34:02 -05:00
Sunil Mohan Adapa
80d0a7638c
*: Drop unused manual_page at module level
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-12-04 16:33:49 -05:00
Sunil Mohan Adapa
18ed1c9267
firewall: Allow configuration upgrade to version 1.0.x
Closes: #2133.

There are two new defaults which need not be altered in FreedomBox:

CleanupModulesOnExit=no
(removed) AllowZoneDrifting=no

Tests:

- Without the patch, on a testing system with firewalld 0.9.x installed, run apt
update. FreedomBox considers firewalld for force upgrade and then ignores it as
shown in the logs.

- With the patch, firewalld is upgraded to 1.0.x version by FreedomBox using
force upgrade as shown in logs. After upgrade, the default zone is external and
backend is nftables.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-12-03 14:09:26 -05:00
Sunil Mohan Adapa
9133711baf
dynamicdns: Update URLs to the new dynamic DNS server
By December 15th, all freedomboxes should no longer be pointing to the old
server. Hence, we need to have these changes done much before the migration date
for the changes to propagate.

The new website ddns.freedombox.org does not allow registrations yet. However,
the new website has a link to announcement. There is now an advice for new users
seeking to create accounts during the migration period.

Tests:

- In Dynamic DNS app, in the about page, the link is to the new server and it
works.

- The example link in the configuration form, IP URL field description is to new
server and it works.

- Functional tests for the Dynamic DNS app work.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-12-03 12:43:11 -05:00
Petter Reinholdtsen
6e6b979579
Translated using Weblate (Norwegian Bokmål)
Currently translated at 79.8% (1196 of 1498 strings)
2021-11-29 20:52:01 +01:00
James Valleroy
b10fc8c107
shaarli: Enable app
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2021-11-28 21:01:09 +05:30
trendspotter
dd9fa45784
Translated using Weblate (Czech)
Currently translated at 64.7% (970 of 1498 strings)
2021-11-27 23:05:00 +01:00
James Valleroy
9718b2aa2c
Release v21.14.1 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v21.14.1
2021-11-24 10:37:37 -05:00
Sunil Mohan Adapa
20b46f7df5
config: Add packages component to a re-add zram-tools dependency
Fixes: #2151.

Tests:

- Before this patch, --list-dependencies does not list zram-tools. After this
patch, --list-dependencies lists zram-tools.

- After this patch, --list-dependencies exactly matches the output from
freedombox release without Packages component changes.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-24 10:17:27 -05:00
James Valleroy
9a855f7bd2
Release v21.14 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v21.14
2021-11-22 18:46:18 -05:00
James Valleroy
4fc4a91166
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-22 18:45:07 -05:00
James Valleroy
18bf1062a8
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-22 18:18:37 -05:00
James Valleroy
bec080ec90
datetime: Avoid error when systemctl is not available
This situation happens when building the package with cowbuilder.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-11-22 05:42:51 -08:00
James Valleroy
122bda7f7e
debian: Fail build if no module dependencies found
debian/rules uses --list-dependencies to collect the dependencies of
all essential modules. Ensure that the list is not empty.

Helps #2149.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-11-22 05:39:56 -08:00
Joseph Nuthalapati
aaea6bf00e
tt-rss: Allow selection of a domain name
Fixes: #2136

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[james: Fix comment]
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-21 19:10:54 -05:00
Joseph Nuthalapati
a912c867c8
names: Create a generic TLS domain selection form
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-21 19:04:35 -05:00
Andrij Mizyk
5c62fc7599
Translated using Weblate (Ukrainian)
Currently translated at 79.2% (1187 of 1498 strings)
2021-11-19 12:51:12 +01:00
Sunil Mohan Adapa
abf389aaa1
main: Drop initializing Django when listing dependencies
- Avoid any potential problems with sqlite3 not being present.

- Avoid any potential problems with secret key not being available. Avoid
accidentally creating the secret key hardware/container images.

Tests:

- --list-dependencies works with and without secret key and plinth sqlite3.

- --list-dependencies works with plinth and root users.

- --list-dependencies does not create the sqlite3 database or the secret key.

- Running app works in normal mode and creates the secret key.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-18 06:48:41 -05:00
Sunil Mohan Adapa
00e42a42b9
menu: Avoid reversing URL during Menu component construction
This allows app initialization to happen without Django being configured.

Tests:

- Update unit tests.

- Visit /app, /system and /help pages. All the icons are listed properly.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-18 06:48:32 -05:00
Sunil Mohan Adapa
fa48fafa6b
frontpage: Avoid URL reverse during Shortcut component construction
This allows the entire app construction process not to require Django.

Tests:

- An app with url is None (ejabberd) and one without (transmission) show their
on the frontpage. Both shortcuts work as expected.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-18 06:48:19 -05:00
Sunil Mohan Adapa
3c44fa9a07
gitweb: Split app initialization
Tests:

- When a public repo is added, upon startup, the front page shortcut is shown.

- When all public repos are removed, upon startup, the front page shortcut is
not shown.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-15 10:14:14 -05:00
Sunil Mohan Adapa
9c091df245
ejabberd: Split app initialziation
Tests:

- When enabled, when domain name or hostname changes, ejabberd actions are
triggered.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-15 10:14:07 -05:00
Sunil Mohan Adapa
5b4f70d6f9
upgrades: Split app initialziation
Tests:

- Upon startup, upgrade check runs every 3 minutes.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-15 10:13:59 -05:00
Sunil Mohan Adapa
fe482256f6
tor: Split app initialziation
Tests:

- When onion services are enabled, upon startup, names module shows the onion
domain.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-15 10:13:51 -05:00
Sunil Mohan Adapa
4b3a4020d9
storage: Split app initialization
Tests:

- Upon startup, 'storage usage-info' action is triggered every 3 minutes.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-15 10:13:42 -05:00
Sunil Mohan Adapa
e5b56e44f1
pagekite: Split app initialization
Tests:

- When configured, upon startup, pagekite domains shows up in the names module.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-15 10:13:34 -05:00
Sunil Mohan Adapa
1d17ba2134
names: Split app initialization
Tests:

- When domain name is changed in config module. The updated names shows up in
the names module.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-15 10:13:25 -05:00
Sunil Mohan Adapa
32d7ce9b38
letencrypt: Split app initialization
Tests:

- On startup, LE tries to obtain certs during post app initialization.

- When domain is added, LE tried to obtain certificates.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-15 10:13:17 -05:00
Sunil Mohan Adapa
c27000c6d6
config: Split app configuration
Tests:

- After startup, the configured domain name shows up in names module.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-15 10:13:08 -05:00
Sunil Mohan Adapa
6429806114
email_server: Don't get domain name during initialization
This keeps the LE module working better when the domain name is changed after
startup.

Tests:

- Untested. The module is not enabled yet. LE functionality in email server is
not fully functional.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-15 10:13:00 -05:00
Sunil Mohan Adapa
b163423a26
dynamicdns: Split app initialization
Tests:

- When configured, after startup, Dynamic DNS domain shows up in names module.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-15 10:12:52 -05:00
Sunil Mohan Adapa
249c713bb5
diagnostics: Split app initialization
Tests:

- When a print message is added in low disk space checking method, it is printed
every 3 minutes.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-15 10:12:44 -05:00
Sunil Mohan Adapa
2947e182cd
cockpit: Split app initialization
Tests:

- When a domain is added it is added to the configuration file.

- When a domain is removed it is removed from the configuration file.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-15 10:12:35 -05:00
Sunil Mohan Adapa
143bff3984
backups: Split app initialization
Tests:

- After startup, every 3 minutes, backup schedule check is performed if a
schedule is set.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-15 10:12:19 -05:00
Sunil Mohan Adapa
79a6e041ca
avahi: Split app initialization
Tests:

- After startup, names module shows a .local domain if app is enabled.

- If app is disabled, .local domain is not shown.

- When hostname is changed, .local domain name in names modules changes.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-15 10:12:11 -05:00
Sunil Mohan Adapa
d2aee03c89
module_loader: Split app initialization into separate steps
- Loading module is only for importing python modules and determining the order
in which they should be loaded.

- Initializing apps will create the instances which involves just creating the
components of the apps.

- Post initialization involves connecting to signals, running configuration
fixes, etc.

Tests:

- All apps that have post initialization step have been tested.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-15 10:11:59 -05:00
Sunil Mohan Adapa
1147249bd8
app: Introduce separate method for post initialization operations
During __init__, only component building must be done. All other operations go
in to post_init(). This allows for cleaner initialization from various
scenarios which simply have to query the app instead of fully initializing it.

Tests:

- None.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-15 10:11:47 -05:00
Michael Breidenbach
bdb239c72e
Translated using Weblate (Swedish)
Currently translated at 100.0% (1498 of 1498 strings)
2021-11-13 04:49:48 +01:00
Burak Yavuz
4d2053e115
Translated using Weblate (Turkish)
Currently translated at 100.0% (1498 of 1498 strings)
2021-11-10 05:52:39 +01:00
James Valleroy
898a854ddc
Release v21.13 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v21.13
2021-11-08 21:34:54 -05:00
James Valleroy
eda492405a
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-08 21:33:58 -05:00
James Valleroy
e3f7511ff2
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-08 21:02:10 -05:00
Sunil Mohan Adapa
7b9149d048
security: Properly handle sandbox analysis of timer units
- When a timer is provided to 'systemctl show' not all expected keys are
provided in the result. This leads to a KeyError exception.

- Also the security analysis for a timer unit is not useful. Instead perform the
analysis on the corresponding .service unit.

Closes: #2145

Tests:

- Before the patch, Wordpress shows as not sandboxed. The security report page
crashes on Debian testing setup.

- After the patch, there is no crash. Wordpress shows as sandboxed with 86%
coverage.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-08 20:44:49 -05:00
James Valleroy
903bf6f29b
debian: Add python3-openssl to autopkgtest depends
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2021-11-08 20:42:30 -05:00
Joseph Nuthalapati
53fbaf27f2
components: Add docstrings & tutorial for Packages
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Include the new component reference in the components index]
[sunil: Minor changes to component doc string]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-11-08 16:12:00 -08:00
Joseph Nuthalapati
6e68614e21
setup: Use packages from Packages component
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Minor refactor in listing unavailable packages, add code comment]
[sunil: Fix listing dependencies by initializing modules before call]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-11-08 16:11:34 -08:00
Joseph Nuthalapati
cd4bd17173
components: Introduce new component - Packages
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: isort all files]
[sunil: Remove component in datetime component as managed_packages is empty]
[sunil: Minor refactor in minidlna for consistency]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-11-08 16:03:42 -08:00
James Valleroy
ff0dc01023
samba: Use systemd sandboxing for smbd/nmbd
Test: Samba functional tests passed.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-11-08 13:52:54 -08:00