It is being used to mean initialize the borg repository as well as creating an
instance of the repository class object. Use 'initialize' for former and
'get_instance' for latter.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Use repository class instances instead of custom ad-hoc data structures such as
repo_data.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Make store an internal implementation detail of the repository class and achieve
better abstraction.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
It is not required by any consumers. Allows for better abstraction on a complex
class.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
borg_path clearly signifies that it is to be used by borg and consumers of the
class will not be confused by it.
Also rename some repo_path variables in test cases.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Since the method is being called on Repository classes, _repository suffix is
redundant.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Make consumers depend on the repository classes instead of lower level store
API.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
get_repositories method will return repositories instead of dictionaries for
view content. This will make it usable in more situations.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Same module is being used to store/retrieve local disk repositories also.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Use sort_order property to decide which type of repositories should be listed
first.
- Remove getting repositories of a given type and retrieve all of them at the
same time.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Also make storage_type an abstract property so that derived classes are forced
to override it.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Remove incorrect instantiation of SSH repository for local disk repositories.
- Clarify the removal message to convey that backups are not removed.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
By creating an icon for 'download as pdf', we are introducing a completely new
class of buttons into FreedomBox UI. While not being essential, this causes more
learning for the user. Further, it does not exhibit the regular behavior of a
button such as hover styling and button text.
Change the icon into a regular button that user is familiar with elsewhere. Also
add label text.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
- Remove "Download Manual" card
- Create link to download manual in the header of the HTML manual
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil@medhas.org Remove hard-coded URL for manual download]
[sunil@medhas.org Fix CSS indentation]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Regression was introduced in a2d07fef0b9e2ae54f98fb5209b9cb0c5fd6f456 when
backup data import from manifest was inadvertently removed.
Closes: #1636.
Test:
Create a backup with this patch and 'storage' as one of the selected apps for
backup. Try to restore the backup without the patch. Observe that it fails.
Restore the backup with the patch. Observe that it succeeds.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- matrix-synapse 1.2 is already unavailable in buster-backports, testing and
unstable. It is replaced by matrix-synapse 1.3. Allow matrix-synapse 1.3 to
become available for Buster users.
- Allow upgrades to all future versions of matrix-synapse from buster-backports.
Since buster-backports does not have security updates except that provided
by the maintainer, it is best to let users be on the latest version provided
by the maintainer in buster-backports.
- We don't pick and choose among the versions uploaded to backports. Once we
allow a package to upgrade to backports version, we should continue to do that
without any further restriction. Update descriptions accordingly.
- Simplify updating the apt preferences file by providing a simple configuration
instead of creating the file on the fly.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Tests:
- When only when admin user is present, the users list does not show delete
button next to the admin user. The checkbox for admin group is disabled (but
checked) for that user in edit user form.
- When there are multiple admin users preset, the users list shows delete button
against all admin users. The checkbox for admin group is enabled (but checked)
for all admin users.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This reverts the additional changes done in merge request !1540 and sets the
configuration to what was originally proposed in the merge request.
- AllowEncodedSlashes can't be set inside <Location> directive. It needs to be
set inside VirtualHost directive making it apply for the entire site. In case
of FreedomBox, this needs to be set globally. It may have implications for how
we are encoding slashes in URLs include for storage module. It could cause
unexpected regressions elsewhere.
- ProxyPass directory should have only argument inside a <Location> directive.
Fix that too.
Closes: #1635.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Force upgrade to any lower version to version less than or equal to 19.8.*.
config.php is the only configuration file for tt-rss app the FreedomBox
modifies. Comparison of config.php from 19.8 shows that there are no major
changes since 18.12. Changes to the configuration file are likely to be minor
and from Debian packaging. Force upgrading to all versions until 19.8.* should
be okay by retaining new configuration and performing FreedomBox changes on top
everything new configuration file is installed.
Tests:
- Install tt-rss version 18.12-1 using a test repository and custom priority.
Then remove the custom priority and trigger 'apt update'. This will trigger an
force upgrade of tt-rss to version 18.12-1.1. Verify that the tt-rss interface
is available and functional.
- Install tt-rss version 18.12-1.1 freshly. Verify that the tt-rss interface is
available and functional.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
When a hostname is set or changed, expose <hostname>.local as a domain. With
this, daemons can configure themselves to work properly with .local domains.
Cockpit is an example of a daemon that can be configured to allow connections
from .local domains
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Replace the check for ignoring .onion domains with a check that ignore any
domain type that can't have certificates.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
If the domain name is not properly set before calling post_hostname_change
signal, then in the signal handlers config.get_domainname() returns an empty
string. So, call the post_hostname_change signal only after fully finishing the
hostname related changes, that is, after setting back the original domain name
too.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
When domain name is not set in the config app, currently ejabberd return a list
with an empty string as list of domains. This leads to certificates being copied
to invalid directory. Fix this by making sure domain name is added to the list
only if it is not an empty string.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Without restarting cockpit, newly added/removed domain in cockpit configuration
file do not immediately work. Either the daemon has to stop itself due to
inactivity (it is socket activated by systemd) or system needs to be restarted.
Without the patch, if cockpit is not currently running (due to socket activation
not having happened yet) the domain name changes would be noticeable
immediately.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Closes: #1626
Tests:
- List apps in mobile app front page. Observe that all apps are shown including
disabled apps.
- With the patch, observer that only enabled apps are shown.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Domain added and removed signals provide sufficient knowledge of domain name
changes.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
In the action, the new domain is always extended to the list of domain names
accepted by ejabberd. To simplify domain handling simply use the domain_added
signal.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
When a domain is added, an attempt will be made to obtain a valid LE certificate
for domain.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>