47 Commits

Author SHA1 Message Date
John Lines
f978d2f0d0
zoph: Add new app to organize photos
- Identify Freedbombox admin who installed the app to be zoph admin.

- Implement backup and restore.

- Photos directory should remain at /var/lib/zoph, for proper operation of
backups.

- There remains an issue that the App is enabled before it is configured but
will not work correctly until configuration.

- OpenStreetMap mapping is enabled. These should be configurable before
installation.

- Add initial forms.py and views.py to Zoph app, however these are currently
unused as urls.py does not invoke the view. When the view is not invoked the
Zoph App installs, with single signon, currently as the first LDAP user, rather
than the plinth user.

- The first user's preferences are not set, and need to be manually set to avoid
other errors.

* Sunil's changes

- Squash commits and re-split them.

- Drop documentation as it will be auto populated from wiki later.

- Remove outdated validation code from manifest.

- Drop some dead code.

- Don't send MySQL password over command line for improved security. Instead
  rely on Unix authentication of root user similar to backup/restore process.

- Use JSON for exchanging configuration dump to avoid encoding errors.

- Add username validation to avoid a potential SQL injection.

- Update description for neural tone and brevity. Add information about how user
  accounts work in FreedomBox

- Fix functional tests.

- Drop all code related to changing photos path until it is ready.

- Update URL from /zoph to /zoph/ to avoid another redirect.

- Fix disabling the app.

- Use icon that Zoph uses for favicon as logo. Update copyright file.

- Fix spelling unzip.

- Minor refactors. Run yapf and isort.

- Use subprocess.run() instead of os.popen() everywhere for better security with
argument parsing.

- Enable OpenStreetMap by default. User have a choice to disable it before using
the app. Add label to explain privacy concerns.

- Fix dropping database by using --force argument.

- Cleanup enabling the app to not enable the app when updating configuration.

- Use AppView's default template instead of overriding.

- Update functional tests to just check if the app is enabled/disabled as
expected. Checking that Zoph site is available will require reliable handling of
admin user.

Signed-off-by: John Lines <john@paladyn.org>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-02-10 01:13:29 -08:00
Sunil Mohan Adapa
7a11ba9fa3
deluge: Use older icon to drop CC 2.0 license
Tests:

- Check the interface in apps page and in the Deluge app page that icon has
changed.

- No lintian warnings related to debian/copyright file.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-09-15 15:23:32 -04:00
Sunil Mohan Adapa
bb28ac1b72
doc: manual: Replace manual icons to drop CC 2.5 license
Tests:

- Affected sections/pages of the manual are: Firewall, Hardware and VirtualBox.
Confirm by diffing with manual generated without the code changes.

- Open all affected pages and the full manual page and confirm that images have
changed.

- Check all affected pages and the full manual page in FreedomBox interface and
confirm that images have changed.

- Check all affected sections in the generated PDF.

- Repeat tests for English and Spanish manuals.

- No lintian warnings related to debian/copyright file.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-09-15 15:23:29 -04:00
James Valleroy
1b55849c02
doc: Add icons used in manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-08-28 12:09:18 -04: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
James Valleroy
7edc2f4e13
bepasty: New app for file upload and sharing
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-08-21 21:50:38 +05:30
James Valleroy
a89ae56382
debian: Split copyright paragraph to avoid lintian error
Update overall copyright year.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-08-15 15:50:29 -07:00
James Valleroy
53919d1374
debian: Fix use of wildcard path in copyright
Avoid a lintian info about network-freedombox.svg.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Add network-connection*.svg to list, also based on Tango icons]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-08-15 15:44:11 -07:00
Sunil Mohan Adapa
b4e6c03bd7
coturn: New app to manage Coturn TURN/STUN server
- Shows URLs and shared secret that communication servers like matrix-synapse
should be configured to. Later we will implement auto-configuring those servers.

- Allow selecting domain for the sake of TLS/DTLS certificate installation.

- Simplify systemd service file options. Drop log file and pid file support as
they are not needed with systemd. Add security options.

- Set custom configuration file by overriding systemd service file options so
that we don't have a problem with conffile prompts.

- Implement functional tests (and automatic diagnostics).

- Custom icon selected from the Noun project as Coturn project does not have
one.

- Backup/restore configuration file and certificates.

- Document some questions regarding configuration options.

Tests performed:

- App is not listed in the app page if 'advanced' flag is disabled.

- App name, icon and short description shows up correctly in apps page.

- App name, icon, short description, description, manual link, enable/disable
button and diagnostics link show up currently in app page.

- Verify that configuration used by coturn server is the FreedomBox
configuration by checking the cert path in the log output.

- PID file is not created in /var/run/turnserver/. It goes into /dev/null
according to the log output.

- No log file is created other than what is collected by systemd from command
line.

- systemctl show coturn.service shows all the intended restrictions such as
NoNewPrivileges, Protect* options.

- Run functional tests.

- Ensure that backup of configuration file works by taking backup, changing the
secret and restoring. During backup and restore coturn should be stopped and
started as per logs.

- Build Debian package. No warnings about the copyright file.

- Enabling the app enables the service and runs it.

- Disabling the app disables the service and stop it.

- All diagnostics tests pass.

- Diagnostic tests show firewall port coturn-freedombox for internal and
external networks, service coturn, and each listening port for udp4, udp6, tcp4
and tcp6.

- Information in the firewall page shows up properly. Enabling the app opens
firewall ports, and disabling it closes them.

- When the app is installed, if a cert domain is available, it will be used.
When multiple domains are available, one of them is picked.

- Status shows 4 URLs with the currently selected domain and secret key.

- Changing domain to another domain succeeds and reflects in the status
information.

- When no domain is configured. Installing the app succeeds. No domain is shown
in the list of domains.

- When domain is changed, the certificates files in /etc/coturn/certs are
overwritten.

- Certificates have the ownership turnserver:turnserver. Public key is cert.pem
has 644 permissions. Private is pkey.pem has 600 permissions. /etc/coturn/certs
is owned by root:root.

- Let's encrypt certificates are setup immediately after install.

- Port forwarding information shows all ports except for relay ports.

- Trying to create a user with username 'turnserver' throws an error. This
happens even when coturn is not installed yet.

- After installing coturn, the configuration file /etc/coturn/freedombox.conf is
created with ownership root:turnserver and permissions 640. The directory
/etc/coturn is created with ownership root:root and permissions 755.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
[jvalleroy: Fix copied form_valid comment]
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-02 18:51:23 -04:00
Sunil Mohan Adapa
16202e6f3a
*: Update links to repository and project page
- The repository has been renamed from 'plinth' to 'freedombox'.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-05-01 17:14:23 +05:30
James Valleroy
41498ba9f6
d/copyright: Fix path to visual_design
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-04-24 16:15:58 -04:00
Sunil Mohan Adapa
ff44a7de5a
static: Don't ship visual design file and unused images
- Move all the unused image files into doc/visual_design directory.

- Reduces the size of the shipped .deb binary significantly.

Closes: #1840.

Tests performed:

- Ensure that each of the files moves are not referenced anywhere in the source
code.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-04-24 16:10:02 -04:00
James Valleroy
4c6fa5c9e8
debian: Add Expat license to copyright
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-27 19:40:02 -05: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
eaa71f056a
wireguard: Add icon
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Fix size of SVG, add PNG image too]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:53:12 -05:00
Veiko Aasa
dbdd482e61
samba: fixes and improvements
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-01 11:30:35 -05:00
Sunil Mohan Adapa
80498919fb
doc: Add developer documentation using Sphinx
- This is completely reworked but based on /Developer page in the FreedomBox
  Manual.

- This documentation can be made available as static site on
  https://docs.freedombox.org and the /Developer page in the FreedomBox Manual
  can be dropped.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-11-02 13:51:14 -04:00
Sunil Mohan Adapa
8d4614c3e2
gitweb: Minor fixes after review
- Since Wiki Commons and Icons project seems to be referring to each other for
  license about the git icon, point to the upstream git as source for copyright.

- Rename the is_running() method so that it won't clash with the semantics of
  is_running method in other components.

- Fix incorrect call to have_public_repos() in is_enabled() method for gitweb
  auth configuration.

- Use {{ block.super }} to avoid repeating inherited block.

- Send the repository data as context data rather than form data in AppView.
  This seems more appropriate.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-19 19:13:57 -07:00
Veiko Aasa
1b9dea4033
gitweb: New app for simple git hosting
Closes: #1658

Signed-off-by: Veiko Aasa veiko17@disroot.org
[sunil@medhas.org Minor styling and cosmetic changes]
[sunil@medhas.org Write comments for Apache configurations]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-19 19:13:54 -07:00
Sunil Mohan Adapa
c61eea8e11
doc: Update the correct license for documentation
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-05-16 06:41:58 -04:00
Sunil Mohan Adapa
fbc2e195a1
icons: Update copyright information remaining icons
- Move information from LICENSES to debian/copyright file where applicable.

- Generate fresh PNG files from SVG to simplify copyright information.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-05-16 06:41:55 -04:00
Sunil Mohan Adapa
8e62c4e351
icons: Ensure SVG presence for all non-app icons
- Update debian/copyright with proper information.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-05-16 06:41:52 -04:00
Sunil Mohan Adapa
a931bf3fc5
icons: Add license information for SVG icons
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-05-16 06:41:46 -04:00
Sunil Mohan Adapa
fd9b6770be
tests: Use pytest for running all tests
- Create option --include-functional to run functional tests. Otherwise, they
  are disabled by default. If pytest-bdd is not installed, functional tests are
  not discovered at all.

- Make pytest-django discover the setting files by creating dummy manage.py in
  top level directory.

- Make pytest run as './setup.py pytest'. Add alias from './setup.py test'. This
  requires pytest-runner package.

- Merge .gitignore files from functional_tests/

- Update gitlab-ci.yml to run tests with coverage using pytest.

- Update HACKING.md to suggest using py.test-3 instead of old way of running.
  Merge functional tests README.md into HACKING.md.

- Remove execution wrapper runtests.py as pytest-django is able to configure
  Django settings before execution of tests. Update tests to explicitly ask for
  Django database as database access is denied by default.

- Replace usage of python3-coverage with python3-pytest-coverage. Execution
  wrappers are not required.

- Add build dependencies on pytest modules.

- Let all warnings be shown after running tests.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-03-10 09:54:23 -04:00
James Valleroy
7c01585f2b
debian/copyright: Fix filename for tahoe-lafs logo
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-03-01 06:19:38 -05:00
Sunil Mohan Adapa
0a1a0cd1b4
debian/copyright: Update copyright for logos
Robert Martinez the original author transferred all copyrights for the initial
logo work to the FreedomBox foundation. The icons are derivatives of this work.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-03-01 01:58:59 -08:00
Sunil Mohan Adapa
06d1b167bb
debian/copyright: Add license text for CC-BY-SA-3.0
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-03-01 01:58:35 -08:00
Sunil Mohan Adapa
1e48a64ddf
debian/copyright: Add license text for GPL-2 and GPL-3
They are different from GPL-2+ and GPL-3+.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-03-01 01:57:59 -08:00
Sunil Mohan Adapa
f5c85471ee
debian/copyright: Add license text for public-domain
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-03-01 01:57:32 -08:00
Sunil Mohan Adapa
a4fdf3f703
debian/copyright: Add full text for AGPL-3+
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-03-01 01:57:29 -08:00
Sunil Mohan Adapa
130102e1f4
debian/copyright: Minor fixes
- Update copyright year for fonts based on information embedded in .ttf file.

- Remove incorrect copyright text.

- Each session should have only one copyright line.

- Fix syntax for multiple licenses.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-03-01 01:57:07 -08:00
James Valleroy
e4e379926f
debian/copyright: Move some more app icons from LICENSES
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-03-01 01:28:33 -08:00
James Valleroy
a1d130299a
debian/copyright: Include some URLs dropped from LICENSES
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-03-01 01:28:30 -08:00
James Valleroy
2297defe3d
debian/copyright: Move more app icons from LICENSES
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-03-01 01:28:26 -08:00
James Valleroy
990c2446a7
debian/copyright: Fix typo in year
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-28 23:55:14 -08:00
James Valleroy
f2b45ea15b
debian/copyright: Move some app icons from LICENSES
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-28 23:55:11 -08:00
James Valleroy
7b0957d795
debian/copyright: Remove unnecessary fields for native package
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-28 23:55:07 -08:00
James Valleroy
d4b4d1e29f
debian/copyright: Move all license texts to end
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-28 23:55:04 -08:00
James Valleroy
4e5b1f346f
debian: Add copyright info for theme images
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-28 23:55:01 -08:00
James Valleroy
2202439af8
debian: Add copyright info for individual logo files
Remove from LICENSES.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-28 23:54:54 -08:00
James Valleroy
5b9b1cbfa9
debian: Add copyright info for lato fonts
Remove from LICENSES.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-28 23:54:51 -08:00
James Valleroy
adb08df512
debian: Add copyright years for debian/*
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-25 20:42:05 -05:00
James Valleroy
de62a3260c
Add 2019 to copyright years
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-25 20:17:54 -05:00
James Valleroy
a69e7a27a3
debian: Use https for copyright format url
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-04-09 19:05:13 +05:30
Sunil Mohan Adapa
f64a584aff
debian: Update copyright to FreedomBox Authors
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-16 20:11:17 -05:00
Sunil Mohan Adapa
db2b796165
Update Github URLs with Salsa URLs
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-01-30 11:06:13 +05:30
Federico Ceratto
17ee712502
debian: Switch to native package
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-11-03 18:30:35 +05:30