9148 Commits

Author SHA1 Message Date
James Valleroy
5062cb2585
Release v24.25 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v24.25
2024-12-16 21:44:38 -05:00
James Valleroy
93796b9479
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2024-12-16 21:31:58 -05:00
James Valleroy
d4bfb993b7
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2024-12-16 21:13:06 -05:00
Sunil Mohan Adapa
e523a83f1a
i2p: Drop app as it has not been available in Debian for a while
Closes: #1528.
Closes: #2041.
Closes: #2438.

- In Bullseye and Bookworm the app is not available.

- i2pd (written is C++) is available in Debian, but it is not a drop-in
replacement for i2p. First, it is only a client. Then has a differently
philosophy of not integrating apps inside it and let outside apps connect to it.
If i2pd is ever added to FreedomBox, it has to be added as a new app with no
possibility of migration from an unlikely old setups.

- Updated wiki pages to remove references to I2P.

Tests:

- Looked for all string references to 'i2p'.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-12-16 21:09:40 -05:00
Sunil Mohan Adapa
11aa36f6ca
d/control: Drop unnecessary recommendations
- These tools are not strictly needed for FreedomBox operation in anyway.

- Slightly Reduce the size of the built images.

- Some of these tools are outdated or not typically used on a modern GNU/Linux
system and make FreedomBox seem less shiny.

- Originally thought of splitting them into a separate metapackage but it does
not seem worth it.

- killall from psmisc is used in the Makefile, it is kept for now.

- FreedomBox already has many dependency and so it is now important to start
paying attention to unnecessary ones.

Tests:

- For each binary executable provided in each of the packages, verify that it
not being used in our code anywhere.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-12-16 20:01:37 -05:00
Sunil Mohan Adapa
b78b76a692
ci: Add flake8 to gitlabci container
- This is needed to run code quality check in the GitLab CI pipeline. Not sure
how it work before this.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-12-16 19:36:08 -05:00
James Valleroy
86ca8164d3
d/control: Drop version specification on dependencies for Bookworm
- We don't support Debian Bullseye or older in latest versions of FreedomBox. We
can drop any minimum version specifications that are only relevant on those
release.

Tests:

- Potential issues with tomli/coverage will be caught during autopkgtests.

- For version specifications, it has been verified that for each of the
packages, version available in Bookworm is newer than the minimum version
specification.

- freedombox-setup and plinth packages don't exist on Bookworm or newer. We
don't support upgrade from older version with the latest code.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-12-16 13:31:11 -05:00
Sunil Mohan Adapa
b64ea720fc
sso: Switch using cryptography module instead of OpenSSL.crypto
Closes: Debian bug #1088760.

- OpenSSL.crypto.sign has been deprecated and in the current version of
python3-openssl in Debian testing, it has been dropped. The recommended
alternative is cryptography.hazmat.primitives. So, use this instead.

- The entire OpenSSL.crypto module is planned to be deprecated in the future.
So, stop using it entirely by using cryptography.hazmat.primitives.

- sso app does not use openssl anymore, so drop dependency on it. Other apps
such as Let's Encrypt do depend on it and but they have their own dependency
declared. The freedombox package on the overall retains on 'openssl' package.

- We are not using the python OpenSSL module anywhere else, so drop dependency
on it.

- Use pathlib to simplify some code.

- Ensure proper permissions on private and public keys as they are being written
to.

Tests:

- Freshly setup container and ensure that first run succeeds. Permission on the
public/private key files and the parent directly are correct. Users are able
login to FreedomBox. SSO works when accessing apps such as transmission.

- Without patches, setup freedombox container. Apply patches. Permission for
keys directory is updated but keys are not overwritten. Login to FreedomBox
works. SSO works when accessing apps such as transmission.

- Run code to perform signatures using old code and ensure that newer code
generates bit-identical signatures.

- Running ./run --list-dependencies show 'openssl' and python3-cryptography.

- Running unit tests works.

- Building debian package works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2024-12-14 23:41:13 +05:30
Sunil Mohan Adapa
235a3cd139
openvpn: Declare explicit dependency on openssl
- OpenVPN app uses openssl command line. Even though easy-rsa has dependency on
openssl, declare this explicitly.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2024-12-14 23:40:59 +05:30
Sunil Mohan Adapa
10602619b6
letsencrypt: Declare explicit dependency on openssl
- Let Encrypt app uses openssl to determine the expiry date of a certificate.
So, declare and explicit dependency on it.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2024-12-14 23:40:39 +05:30
Sunil Mohan Adapa
b8b2c85eea
deluge: Cleanup and simplify setup code
- Use various action utilities to simplify daemon management.

- Instead of writing systemd service file to /etc ship an override file in
/usr/lib/systemd/system/*.d/. deluged and deluge-web both have systemd unit file
shipped. They are very close to what we want from them. Drop the old service file.

- Don't write /etc/default/deluged, it is not used in the systemd unit file.

- App's setup version has not been incremented as it has already been
incremented for the next release.

Tests:

- Fresh install of the app works in testing container. Functional tests work as
expected.

- /var/lib/deluged/config/web.conf is created when deluge-web is started
confirming that the correct configuration path is being used. Also app works on
/deluge web path.

- Old systemd unit file is removed when the setup is run when it is present to
due to deluge installation attempt previously.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-13 13:48:51 +02:00
Sunil Mohan Adapa
f501bc99ab
action_utils: Add utility to ensure that service is stopped
- This could be used when the daemon can't be running while configuration is
being updated.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-13 13:48:21 +02:00
Sunil Mohan Adapa
0ea0a8b33c
ui: help: Fix alignment issue with footer links in about page
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-13 11:58:33 +02:00
Sunil Mohan Adapa
1c1cc82f55
ui: backups: Use Bootstrap color variables instead of static values
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-13 11:58:16 +02:00
Sunil Mohan Adapa
132d577a8a
ui: firewall: Fix styling with Bootstrap 5
- Drop unnecessary code. Bootstrap does not style a:hover or table roes like
before.

- Use default table color variables from Bootstrap to work well with dark mode.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-13 11:57:25 +02:00
Sunil Mohan Adapa
2aa9f72ea1
tests: functional: Disable smooth scrolling from Bootstrap 5
- When an item needs to be scrolled into view, the slow scrolling leads to an
early click causing the click to happen on an element that is not in view. Fix
this by disabling smooth scrolling in browser options.

-
https://salsa.debian.org/freedombox-team/freedombox/-/merge_requests/2576#note_558614
- https://github.com/SeleniumHQ/selenium/issues/11136#issuecomment-1370803713

Tests:

- Run functional tests on wordpress app.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
[vexch: Move importing from selenium into function to prevent unit tests depend
on selenium]
Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 13:07:21 +02:00
Sunil Mohan Adapa
765e3176fa
diagnostics: tests: functional: Pick errors more specifically
- When notifications badge is present in navigation bar, that could be confused
for a diagnostics failure. Make the diagnostics failure selector more specific
to avoid this.

- This was caused because of removing .badge-warning/error classes in favor of
.text-bg-warning/danger classes.

Tests:

- Enable ejabberd app and use 'systemctl stop ejabberd.service'. Run system-wide
diagnostics to see a notification with error it and error badge on the
notification icon. Then run functional tests on transmission app which includes
diagnostic tests.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 13:05:12 +02:00
Sunil Mohan Adapa
4fdf6a7ffe
ui: Fix placement of tags menu under tags input with Bootstrap 5
- During the placement computation for the drop down menu, the height of the
dropdown-menu is very high and that leads to it getting placed at the top of the
page instead of the below the search element.

- To avoid the problem, cap the height of the dropdown. Somehow, the original
calculation for the height using CSS calc() does not seem to working as
expected.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 13:04:01 +02:00
Sunil Mohan Adapa
1a01f672d6
ui: Cleanup use of colors with CSS variables
- Custom CSS variables were declared with Bootstrap 4 since it did not use CSS
variables itself. In Boostrap 5, CSS variables are available. Use them to
eliminate custom color definitions. This means that when Bootstrap colors are
changed, custom colored elements will not look different.

- Use color utilities from Bootstratp instead of .processing, .warning, and
.normal.

- Collect more repeated colors into variables. This will make themeing easier.

- Using Bootstrap variables also makes implement dark mode easier.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 13:03:12 +02:00
Sunil Mohan Adapa
1de071cceb
ui: Don't use nav-link inside card
- .nav-link classes are meant to be used in navbars and tab navigations. Don't
use them incorrectly in .card to avoid potential breakages and readability.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 13:02:45 +02:00
Sunil Mohan Adapa
b97cd9094e
ui: Style the 'Log out' item properly
- This navigation item in the main header is only when Javascript is blocked.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 13:02:31 +02:00
Sunil Mohan Adapa
be7910e901
ui: Fix flash of notifications popdown during page load
- Notifications dropdown is shown briefly before page load. After the page load,
it disappears. This is quite annoying and happens due to the following reason.

  - We add .no-js class to <html> tag and later remove using Javascript.

  - We load most of our Javascirpt using 'defer' attribute leading display of
  layout of content before Javascript is loaded.

  - We also wait for DOMContentLoaded event to fire before removing the .no-js
  class on <html> element.

- Solve the problem by adding special class to notifications dropdown to ensure
that it is not shown even when Javascript is not available.

- There might be a better fix to the problem.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 13:01:43 +02:00
Sunil Mohan Adapa
ab0e127378
ui: Fix issue with notifications icon showing twice in mobile view
- In mobile view, when the burger menu is clicked on, the menu is expanded and
options are shown. In those options, notifications icon is shown while the menu
is expanding but not when it is fully expanded. To fix this, hide it while
expanding too.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 13:01:25 +02:00
Sunil Mohan Adapa
fb6cd03b5a
ui: Use collapse instead of dropdown for notification in Bootstrap 5
- In Bootstrap 5, dropdown button and dropdown menu not being siblings does not
work like it did in Bootstrap 4.

- Use collapse component instead of dropdown. Collapse component does not have
the same limitations. Apply some of the styling from dropdown-menu to restore
previous appearance.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 13:00:48 +02:00
Sunil Mohan Adapa
9aa81e5c58
ui: Workaround dropdowns not working with Bootstrap 5
- Workaround Debian bug #1087969. popper.js 2.x is needed for Bootstrap 5,
however, the current version on in Debian is 1.x. Implement a Popper 2.x method
that Bootstrap 5 is expecting and translate the call into Popper 1.x.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 13:00:15 +02:00
Sunil Mohan Adapa
3b369cd90f
ui: Update styling for navbar menu items
- Drop menu_link and menu_link_active classes and use the bootstrap's default
classes.

- Override values for bootstrap variables instead of overriding the styles
themselves.

Tests:

- Test that navbar shows same colors as before in mobile view and desktop view.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:59:44 +02:00
Sunil Mohan Adapa
fb95c5dce2
ui: Fix styling in dismiss button in form errors for Bootstrap 5
- Since django-bootstrap-form still generates styling for Bootstrap 3, we need
to adapt styling for Bootstrap 5 for it.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:58:26 +02:00
Sunil Mohan Adapa
36c5ffd3af
ui: samba: Fix layout regressions with Bootstrap 5
- In Bootstrap 5, .table-responsive does not seem to set 'width: 100%;'. This
leads to tables getting laid out between the disk name and disk free progress
bar since they are both floating elements. Fix this by using flex layout
instead.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:58:13 +02:00
Sunil Mohan Adapa
efe278cd08
ui: Update custom button styles for Bootstrap 5
- Use CSS variables instead of overwritten style.

- Fix some missing styles for btn-default.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:57:51 +02:00
Sunil Mohan Adapa
9299a682e5
ui: Accept default styling of Bootstrap 5 for warning button
- The new styling has much higher contrast compared to older styling.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:57:33 +02:00
Sunil Mohan Adapa
a4017b2bf2
ui: Restyle tags, remove underlining of text
- Tags have important text that is too small and could cause problems with users
with limited vision. Make them regular buttons. Make the buttons shorter and
rounder to resemble previous styling.

- Drop underlining of text in the process.

- In code, don't call them 'badges' anymore.

Tests:

- Run functional tests for tags.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:56:37 +02:00
Sunil Mohan Adapa
a094f2a357
ui: Allow underlining for most links due to Bootstrap 5
- Bootstrap 5 underlines all links by default. Allow this change without
reverting as this is likely done to improve accessibility.

- In Networks diagram and firewall page, provide exception and remove the
underlining.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:56:19 +02:00
Sunil Mohan Adapa
c842397292
ui: Fix toggle button styling for Bootstrap 5
- Bootstrap 5, unlike Bootstrap 4 overrides button styling when hovered on and
disabled. Provide the values for these overrides using CSS variables.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:56:03 +02:00
Sunil Mohan Adapa
20db62bc22
ui: snapshots: Fix horizontal form layout on mobiles for Bootstrap 5
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:55:39 +02:00
Sunil Mohan Adapa
319d414c2e
ui: snapshots: Fix horizontal form styling margins for Bootstrap 5
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:55:28 +02:00
Sunil Mohan Adapa
72bd565c6c
ui: Restore spacing between form elements in Bootstrap 5
- Styling for form-group has been removed in Bootstrap 5.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:55:13 +02:00
Sunil Mohan Adapa
95c6a92ec3
ui: backups: Drop unused styling in verify host key page
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:55:01 +02:00
Sunil Mohan Adapa
c898e4e3bf
ui: forms: Fix margins for form labels for Bootstrap 5
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:54:49 +02:00
Sunil Mohan Adapa
adc615bc32
ui: diagnostics: Fix gap between headings
- Wrap each app's results in a <section>. Style section to maintain gap with
previous sections.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:54:19 +02:00
Sunil Mohan Adapa
a2d5238dbc
ui: diagnostics: Fix layout of repair buttons
- A 'row' class is more suitable when we want to use the Bootstrap's 'Grid'
system. Bootstrap 5 sets 'width: 100%' on all children of a .row. So, use a
simpler 'display: flex' instead.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:53:46 +02:00
Sunil Mohan Adapa
380c889771
ui: Reduce the gap at the top of the pages
- So much spacing is not required as we have remove the background and borders.

- This is similar in approach to Bootstrap 4/5 which does not provide top
margins for heading elements and instead provides them only when they are not
the first element.

- Increase the margin between the end of a section and beginning of the next
heading.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:52:10 +02:00
Sunil Mohan Adapa
11cb883518
ui: app: Fix an incorrect HTML tag nesting
- <div> is not allowed inside a <p> tag. Browsers will close and reopen <p> if
one tries to place a <div> inside a <p>. Avoid this.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:51:18 +02:00
Sunil Mohan Adapa
7602cf6172
ui: users: Fix close button for confirmation dialog for Bootstrap 5
- Also place the body content in <p> for improved semantics and suggested by
Bootstrap.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:50:50 +02:00
Sunil Mohan Adapa
618a0caec3
ui: Fix overflow of exception text in message
- Without the change, the exception information formatted in <pre> overflows the
alert's boundaries and make a long line. With the change, it now sows a
horizontal scrollbar instead.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:50:22 +02:00
Sunil Mohan Adapa
9f9c8879b4
ui: Show disabled form elements as grey for Bootstrap 5
- Same color as in Bootstrap 4 but removed in Bootstrap 5.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:49:33 +02:00
Sunil Mohan Adapa
ebcc9595c4
ui: app, system: Revert to earlier width for card lists
- This allows for system page to show 4 items in a row instead of 3.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:49:15 +02:00
Sunil Mohan Adapa
95ecf36152
ui: Rename data- attributes to data-bs- for Bootstrap 5
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:48:54 +02:00
Sunil Mohan Adapa
f6f5b7a478
power: Refactor display of package manager busy alerts
Tests:

- Trigger the message using code change and observe the messages displayed.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:47:59 +02:00
Sunil Mohan Adapa
62dad9336b
ui: Use Bootstrap 5 styling for all alerts
- Ensure that .sr-only is replaced with newer classes.

- Ensure that icons are present for all alerts.

- Use flex-box for display of icons on the left center of the alert.

- .close has been renamed to .btn-close.

- &times; is no longer required for close buttons.

Tests:

- Visually verify all the changes by triggering them with code changes.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:38:01 +02:00
Sunil Mohan Adapa
ac6cca95e3
matrixsynapse: Fix trimming an i18n string
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:37:47 +02:00