4799 Commits

Author SHA1 Message Date
James Valleroy
b338501778
config: Implement get_initial and form_valid
Fixes #1675.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-11-04 11:30:38 -08:00
Michael Breidenbach
da0325e4b5
Translated using Weblate (Swedish)
Currently translated at 36.1% (398 of 1101 strings)
2019-11-04 19:04:02 +01:00
Fred
2970d27551
Translated using Weblate (French)
Currently translated at 98.9% (1089 of 1101 strings)
2019-11-04 19:03:56 +01:00
Allan Nordhøy
3b447e026a
Translated using Weblate (French)
Currently translated at 98.9% (1089 of 1101 strings)
2019-11-04 19:03:54 +01:00
Joseph Nuthalapati
19d96f30e8
snapshot: Sort snapshot list from newest to oldest
Fixes #1655

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-11-04 06:15:48 -05:00
Sunil Mohan Adapa
1b218666f4
actions: Fix issue with docstring causing issues with Sphnix
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-11-02 13:51:18 -04: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
Allan Nordhøy
108f7b8d46
Translated using Weblate (French)
Currently translated at 97.6% (1075 of 1101 strings)
2019-11-02 15:17:58 +01:00
Fred
4cb48deed6
Translated using Weblate (French)
Currently translated at 97.6% (1075 of 1101 strings)
2019-11-02 15:17:58 +01:00
Michael Breidenbach
7bd4e60ba0
Translated using Weblate (Swedish)
Currently translated at 29.6% (326 of 1101 strings)
2019-11-01 00:03:57 +01:00
Thomas Vincent
d5144224e5
Translated using Weblate (French)
Currently translated at 78.1% (860 of 1101 strings)
2019-11-01 00:03:49 +01:00
Doma Gergő
2a33c87c4c
Translated using Weblate (Hungarian)
Currently translated at 94.9% (1045 of 1101 strings)
2019-11-01 00:03:47 +01:00
Sunil Mohan Adapa
4026d21d33
setup.py: Add more topics to classifiers
- Assumed that a topic means that the software is relevant to discussion in that
  topic area.

- Mark the as Python 3 only as FreedomBox does not run on Python 2 anymore.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-31 07:04:18 -04:00
Sunil Mohan Adapa
776f1d5d9e
setup.py: Set development status classifier to production/stable
FreedomBox is available in Debian stable, hardware is available for purchase and
many end users are using it in theirs homes everyday.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-31 07:04:14 -04:00
Sunil Mohan Adapa
030deaf4d9
app: Fix a pytest warning in tests
A class name that starts with 'Test' is considered for test case collection
resulting in the following warning:

plinth/tests/test_app.py:28
  /home/bunny/work/freedombox/plinth/plinth/tests/test_app.py:28: PytestWarning:
  cannot collect test class 'TestApp' because it has a __init__ constructor
  class TestApp(App):

Since this class does not contain test cases itself, rename it.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-31 06:57:36 -04:00
Sunil Mohan Adapa
121c1cf4ca
help: Fix showing manual pages in fallback cases
- When a manual page for a certain language is not found, redirect to 'en' for
  that manual page. Simply showing English content will cause issues with
  serving images.

- Don't use language preferences unless the URL language is not generic. The
  language of the page shown will always correspond to the language in the URL.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:25:15 -04:00
Sunil Mohan Adapa
78839173fd
doc: Fetch and add Spanish manual
This is simply:

- Add es to languages list

- mkdir doc/manual/es

- make -C doc fetch

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:25:12 -04:00
Sunil Mohan Adapa
8734d96ce9
doc: Install using makefile instead of setup.py
- Prevent unnecessary copying and shipping of .xml files.

- Run multiple jobs concurrently to speed up the process.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:25:09 -04:00
Joseph Nuthalapati
eb91938963
help: Respect language preference when showing user manual
Retrieve the manual page or download PDF manual in user's preferred language.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil@medhas.org Merge URL format since view is the same]
[sunil@medhas.org Refactor language extraction]
[sunil@medhas.org Minor refactorings]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:25:06 -04:00
Joseph Nuthalapati
d62463247f
doc: Move English manual to manual/en directory
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil@medhas.org Have common top level makefile for building manual]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:25:02 -04:00
Joseph Nuthalapati
f475a94581
doc: Minor cosmetic changes
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:24:59 -04:00
Joseph Nuthalapati
004ba5b3ea
doc: Move build scripts into separate directory
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:24:57 -04:00
Joseph Nuthalapati
d67412220a
doc: Remove language code from title
This code currently works only by assuming that the language code is either 2 or
5 chars long. This is not entirely correct but works for now.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:24:54 -04:00
Joseph Nuthalapati
46b587196f
doc: Fix Unicode issues with the manual
docbook2html generates HTML4 documents and can't handle utf-8 input. It is quite
outdated. Switch to using stylesheets from docbook-xsl package instead.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil@medhas.org Remove intermediary file docbook.css]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:24:52 -04:00
Joseph Nuthalapati
853c056018
doc: Skip empty lines when piping to wget
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:24:49 -04:00
Joseph Nuthalapati
a036a4af5b
doc: Add directory for development documentation
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:24:46 -04:00
Sunil Mohan Adapa
6a6983f39e
storage: Use AppView and cleanup custom code
- Follow common code so that extending becomes easier.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:24:43 -04:00
Sunil Mohan Adapa
dd1884e8ab
config: Use AppView and cleanup custom code
- Follow common code so that extending becomes easier.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:24:40 -04:00
Joseph Nuthalapati
62115dcd1e
infinoted: Add missing manual page link
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:24:36 -04:00
Fioddor Superconcentrado
a2565906ca
d/po: Fix header comments
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-30 11:55:16 -07:00
Fioddor Superconcentrado
60b412990f
d/po/es: New translation file
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-30 11:54:58 -07:00
Sunil Mohan Adapa
92a5a11659
ssh: Fix flake8 failure by removing unused import
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-29 15:28:23 -07:00
Nektarios Katakis
ddb95752a8
ssh: Option for disabling password authentication
Closes: #572

[sunil: Reload instead of restart, fix i18n strings]
[sunil: Load augeas minimally, minor cosmetic fixes]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-29 14:50:46 -07:00
Veiko Aasa
caa336babc
gitweb: do not change working directory inside actions script
This is a good practice and maybe related to commit 83337e47

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-28 11:26:32 -07:00
Veiko Aasa
ba9869c030
gitweb: Validate repository name also in actions script
This prevents writing to an arbitrary directory if running actions script
as a root user.

- Included tests for invalid names

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
[sunil@medhas.org Parametrize the test case]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-28 11:22:20 -07:00
Veiko Aasa
0b2d1265cb
gitweb: fix links that end with /HEAD
On the Gitweb site, links that end with /HEAD (for example menu links after
selecting 'tree' on the front page) are mistakenly redirected
to the git-http-backend cgi script and an empty page is shown to the user.

Modified Apache2 ScriptAliasMatch regex so that git-http-backend services get
redirected only if they immediately follow repository's name path component.
Links on Gitweb site have additional action component before /HEAD and those
will be handled by the gitweb cgi script.

The relevant git-http-backend source:
https://repo.or.cz/git/debian.git/blob/refs/tags/v2.20.1:/http-backend.c#l706

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-27 18:04:30 -07:00
Sunil Mohan Adapa
bb7890263b
setup: Don't include actions/__pycache__ during installation
Perhaps due to recent changes in distutils, the setup script fails during
install with an error that it is unable to copy actions/__pycache__. Don't
attempt to copy this directory.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-27 19:10:15 -04:00
Veiko Aasa
ea01ef6f80
gitweb: avoid global environment variables in Apache configuration
Closes #1671

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-27 12:07:22 -07:00
Sunil Mohan Adapa
ef5c2ab908
gitweb: Set proper access after restoration of a backup
Otherwise, if the backup contains public repos and state before backup is all
private repos, then gitweb interface is not available publicly after restore.
Similar case happens when all restore repos are private and state before that
contains a public repos.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-27 00:33:08 -07:00
Veiko Aasa
8694849701
gitweb: Add functional tests
- add eleven functional tests
- gitweb_configure.html template: add id to the repository list element
  to distinct it better.

Closes #1668

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-26 23:48:56 -07:00
Sunil Mohan Adapa
273c419a26
gitlab-ci: Fix path for HTML coverage report generation
This issue is caused by use of tmpdir fixture which forces the tests to run in a
temporary directory and HTML report to also get generated there.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-26 23:01:38 -07:00
Sunil Mohan Adapa
83337e4786
cfg: Fix test case failure due to incorrect path assumption
When tmpdir fixture is used, the tests run in a separate directory instead of
command execution directory. Any tests that take the current directory and
assume that it contains files will fail. Fix this by taking the path relative to
test module instead.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-26 22:07:52 -07:00
Veiko Aasa
c8eb5bb3ca
gitweb: Add tests for actions script
- add tests for create, edit and delete repository functions
- modify actions script to allow run actions without root privileges:
  - add argument --git-repo-root to overwrite the default root directory
    of repositories
  - add option --keep-ownership to the create-repo command to skip
    changing ownership to www-data
- actions script, repo-info command: instead of returning empty values,
  raise an error if the repository doesn't exist

Closes #1667

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
[sunil@medhas.org Remove unneeded #! directive]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-26 21:27:28 -07:00
Thomas Vincent
314e30d034
backups: Fix a typo in backups upload form
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-26 17:55:21 -07:00
Allan Nordhøy
fa82a7ea72
Translated using Weblate (Norwegian Bokmål)
Currently translated at 95.9% (1056 of 1101 strings)
2019-10-26 19:53:28 +02:00
Mattias Münster
d09b485590
Translated using Weblate (Swedish)
Currently translated at 18.2% (200 of 1101 strings)
2019-10-26 19:53:27 +02:00
homycal
92790ff8d4
Translated using Weblate (French)
Currently translated at 76.0% (837 of 1101 strings)
2019-10-26 19:53:25 +02:00
Thomas Vincent
10ea3b2a58
Translated using Weblate (French)
Currently translated at 76.0% (837 of 1101 strings)
2019-10-26 19:53:24 +02:00
Fioddor Superconcentrado
221d1ee887
Translated using Weblate (Spanish)
Currently translated at 100.0% (1101 of 1101 strings)
2019-10-26 19:53:20 +02:00
Pavel Borecki
9133855cec
Translated using Weblate (Czech)
Currently translated at 98.8% (1088 of 1101 strings)
2019-10-26 19:53:17 +02:00