diff --git a/doc/dev/reference/app_module.rst b/doc/dev/reference/app_module.rst index b1c3b4d26..3dba5e53a 100644 --- a/doc/dev/reference/app_module.rst +++ b/doc/dev/reference/app_module.rst @@ -14,12 +14,3 @@ application depends on. The application is specified as string which is the final part of the full module load path. For example, ``names``. Dependencies are part of the :class:`~plinth.app.Info` component. Need for this attribute at the module level will be removed in the future. - - -.version -^^^^^^^^^^^^^^^^^^^^ - -Required. Version number of an app. Increasing the version number of an app -triggers the setup() logic allowing the app to run upgrade scripts. This -attribute is part of the :class:`~plinth.app.Info` component. Need for this -attribute at the module level will be removed in the future. diff --git a/plinth/modules/apache/__init__.py b/plinth/modules/apache/__init__.py index 2057a3699..4a6b3a4d3 100644 --- a/plinth/modules/apache/__init__.py +++ b/plinth/modules/apache/__init__.py @@ -15,8 +15,6 @@ from plinth.modules.letsencrypt.components import LetsEncrypt from plinth.package import Packages from plinth.utils import format_lazy, is_valid_user_name -version = 9 - app = None @@ -25,11 +23,13 @@ class ApacheApp(app_module.App): app_id = 'apache' + _version = 9 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, is_essential=True, name=_('Apache HTTP Server')) self.add(info) diff --git a/plinth/modules/api/__init__.py b/plinth/modules/api/__init__.py index a1999a72a..44fefaed8 100644 --- a/plinth/modules/api/__init__.py +++ b/plinth/modules/api/__init__.py @@ -3,4 +3,20 @@ FreedomBox app for api for android app. """ -version = 1 +from plinth import app as app_module + + +class ApiApp(app_module.App): + """FreedomBox app for API for Android app.""" + + app_id = 'api' + + _version = 1 + + def __init__(self): + """Create components for the app.""" + super().__init__() + + info = app_module.Info(app_id=self.app_id, version=self._version, + is_essential=True) + self.add(info) diff --git a/plinth/modules/avahi/__init__.py b/plinth/modules/avahi/__init__.py index 1c91b257e..8896cad0d 100644 --- a/plinth/modules/avahi/__init__.py +++ b/plinth/modules/avahi/__init__.py @@ -21,8 +21,6 @@ from . import manifest # pylint: disable=C0103 -version = 1 - depends = ['names'] _description = [ @@ -44,11 +42,13 @@ class AvahiApp(app_module.App): app_id = 'avahi' + _version = 1 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, is_essential=True, name=_('Service Discovery'), icon='fa-compass', description=_description, manual_page='ServiceDiscovery') diff --git a/plinth/modules/backups/__init__.py b/plinth/modules/backups/__init__.py index 00fed229a..a006d61a8 100644 --- a/plinth/modules/backups/__init__.py +++ b/plinth/modules/backups/__init__.py @@ -23,8 +23,6 @@ from . import api logger = logging.getLogger(__name__) -version = 3 - depends = ['storage'] _description = [ @@ -43,12 +41,14 @@ class BackupsApp(app_module.App): app_id = 'backups' + _version = 3 + def __init__(self): """Create components for the app.""" super().__init__() info = app_module.Info( - app_id=self.app_id, version=version, is_essential=True, + app_id=self.app_id, version=self._version, is_essential=True, depends=depends, name=_('Backups'), icon='fa-files-o', description=_description, manual_page='Backups', donation_url='https://www.borgbackup.org/support/fund.html') diff --git a/plinth/modules/bepasty/__init__.py b/plinth/modules/bepasty/__init__.py index ed2edc226..77ad279a1 100644 --- a/plinth/modules/bepasty/__init__.py +++ b/plinth/modules/bepasty/__init__.py @@ -17,8 +17,6 @@ from plinth.package import Packages from . import manifest -version = 2 - _description = [ _('bepasty is a web application that allows large files to be uploaded ' 'and shared. Text and code snippets can also be pasted and shared. ' @@ -56,11 +54,13 @@ class BepastyApp(app_module.App): app_id = 'bepasty' + _version = 2 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(self.app_id, version, name=_('bepasty'), + info = app_module.Info(self.app_id, self._version, name=_('bepasty'), icon_filename='bepasty', short_description=_('File & Snippet Sharing'), description=_description, manual_page='bepasty', diff --git a/plinth/modules/bind/__init__.py b/plinth/modules/bind/__init__.py index 3c2bb37c5..402f38140 100644 --- a/plinth/modules/bind/__init__.py +++ b/plinth/modules/bind/__init__.py @@ -21,8 +21,6 @@ from plinth.utils import format_lazy from . import manifest -version = 2 - _description = [ _('BIND enables you to publish your Domain Name System (DNS) information ' 'on the Internet, and to resolve DNS queries for your user devices on ' @@ -68,11 +66,13 @@ class BindApp(app_module.App): app_id = 'bind' + _version = 2 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, name=_('BIND'), icon='fa-globe-w', short_description=_('Domain Name Server'), description=_description) diff --git a/plinth/modules/calibre/__init__.py b/plinth/modules/calibre/__init__.py index ffee9a87b..0847bbf1d 100644 --- a/plinth/modules/calibre/__init__.py +++ b/plinth/modules/calibre/__init__.py @@ -21,8 +21,6 @@ from plinth.utils import format_lazy from . import manifest -version = 1 - _description = [ format_lazy( _('calibre server provides online access to your e-book collection. ' @@ -48,6 +46,8 @@ class CalibreApp(app_module.App): app_id = 'calibre' + _version = 1 + DAEMON = 'calibre-server-freedombox' def __init__(self): @@ -56,7 +56,7 @@ class CalibreApp(app_module.App): groups = {'calibre': _('Use calibre e-book libraries')} - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, name=_('calibre'), icon_filename='calibre', short_description=_('E-book Library'), description=_description, manual_page='Calibre', diff --git a/plinth/modules/cockpit/__init__.py b/plinth/modules/cockpit/__init__.py index 4fa128ab3..648ec78e8 100644 --- a/plinth/modules/cockpit/__init__.py +++ b/plinth/modules/cockpit/__init__.py @@ -20,8 +20,6 @@ from plinth.utils import format_lazy from . import manifest, utils -version = 1 - _description = [ format_lazy( _('Cockpit is a server manager that makes it easy to administer ' @@ -52,13 +50,15 @@ class CockpitApp(app_module.App): app_id = 'cockpit' + _version = 1 + DAEMON = 'cockpit.socket' def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, is_essential=True, name=_('Cockpit'), icon='fa-wrench', icon_filename='cockpit', short_description=_('Server Administration'), diff --git a/plinth/modules/config/__init__.py b/plinth/modules/config/__init__.py index 04d4271ce..428cd2a5f 100644 --- a/plinth/modules/config/__init__.py +++ b/plinth/modules/config/__init__.py @@ -19,8 +19,6 @@ from plinth.modules.names.components import DomainType from plinth.package import Packages from plinth.signals import domain_added -version = 3 - _description = [ _('Here you can set some general configuration options ' 'like hostname, domain name, webserver home page etc.') @@ -44,12 +42,14 @@ class ConfigApp(app_module.App): app_id = 'config' + _version = 3 + can_be_disabled = False def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, is_essential=True, depends=depends, name=_('General Configuration'), icon='fa-cog', description=_description, diff --git a/plinth/modules/coturn/__init__.py b/plinth/modules/coturn/__init__.py index 231d2334a..390e8e274 100644 --- a/plinth/modules/coturn/__init__.py +++ b/plinth/modules/coturn/__init__.py @@ -25,8 +25,6 @@ from plinth.utils import format_lazy from . import manifest -version = 1 - _description = [ _('Coturn is a server to facilitate audio/video calls and conferences by ' 'providing an implementation of TURN and STUN protocols. WebRTC, SIP ' @@ -49,11 +47,13 @@ class CoturnApp(app_module.App): app_id = 'coturn' + _version = 1 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, name=_('Coturn'), icon_filename='coturn', short_description=_('VoIP Helper'), description=_description, manual_page='Coturn') diff --git a/plinth/modules/datetime/__init__.py b/plinth/modules/datetime/__init__.py index e1e5697d6..8ffcbe03e 100644 --- a/plinth/modules/datetime/__init__.py +++ b/plinth/modules/datetime/__init__.py @@ -14,8 +14,6 @@ from plinth.modules.backups.components import BackupRestore from . import manifest -version = 2 - _description = [ _('Network time server is a program that maintains the system time ' 'in synchronization with servers on the Internet.') @@ -29,6 +27,8 @@ class DateTimeApp(app_module.App): app_id = 'datetime' + _version = 2 + _time_managed = None @property @@ -60,7 +60,7 @@ class DateTimeApp(app_module.App): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, is_essential=True, name=_('Date & Time'), icon='fa-clock-o', description=_description, manual_page='DateTime') diff --git a/plinth/modules/deluge/__init__.py b/plinth/modules/deluge/__init__.py index 68be81004..3c4ede5d7 100644 --- a/plinth/modules/deluge/__init__.py +++ b/plinth/modules/deluge/__init__.py @@ -18,8 +18,6 @@ from plinth.package import Packages from . import manifest -version = 6 - _description = [ _('Deluge is a BitTorrent client that features a Web UI.'), _('The default password is \'deluge\', but you should log in and ' @@ -36,6 +34,8 @@ class DelugeApp(app_module.App): app_id = 'deluge' + _version = 6 + def __init__(self): """Create components for the app.""" super().__init__() @@ -45,7 +45,7 @@ class DelugeApp(app_module.App): } info = app_module.Info( - app_id=self.app_id, version=version, name=_('Deluge'), + app_id=self.app_id, version=self._version, name=_('Deluge'), icon_filename='deluge', short_description=_('BitTorrent Web Client'), description=_description, manual_page='Deluge', diff --git a/plinth/modules/diagnostics/__init__.py b/plinth/modules/diagnostics/__init__.py index 5db9ec46d..7bb51f071 100644 --- a/plinth/modules/diagnostics/__init__.py +++ b/plinth/modules/diagnostics/__init__.py @@ -19,8 +19,6 @@ from plinth.modules.backups.components import BackupRestore from . import manifest -version = 1 - _description = [ _('The system diagnostic test will run a number of checks on your ' 'system to confirm that applications and services are working as ' @@ -43,10 +41,12 @@ class DiagnosticsApp(app_module.App): app_id = 'diagnostics' + _version = 1 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, is_essential=True, name=_('Diagnostics'), icon='fa-heartbeat', description=_description, manual_page='Diagnostics') diff --git a/plinth/modules/diaspora/__init__.py b/plinth/modules/diaspora/__init__.py index a144fee75..1dbf13aaa 100644 --- a/plinth/modules/diaspora/__init__.py +++ b/plinth/modules/diaspora/__init__.py @@ -36,8 +36,6 @@ def get_configured_domain_name(): return lazy_domain_name -version = 1 - _description = [ _('diaspora* is a decentralized social network where you can store ' 'and control your own data.'), @@ -57,12 +55,14 @@ class DiasporaApp(app_module.App): app_id = 'diaspora' + _version = 1 + def __init__(self): """Create components for the app.""" super().__init__() from . import manifest - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, name=_('diaspora*'), icon_filename='diaspora', short_description=_('Federated Social Network'), description=_description, diff --git a/plinth/modules/dynamicdns/__init__.py b/plinth/modules/dynamicdns/__init__.py index 8f0e0e1e9..5bfdd45d8 100644 --- a/plinth/modules/dynamicdns/__init__.py +++ b/plinth/modules/dynamicdns/__init__.py @@ -17,8 +17,6 @@ from plinth.utils import format_lazy from . import manifest -version = 1 - depends = ['names'] _description = [ @@ -45,11 +43,13 @@ class DynamicDNSApp(app_module.App): app_id = 'dynamicdns' + _version = 1 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, is_essential=True, depends=depends, name=_('Dynamic DNS Client'), icon='fa-refresh', description=_description, diff --git a/plinth/modules/ejabberd/__init__.py b/plinth/modules/ejabberd/__init__.py index 4bde2c9ac..dbef49769 100644 --- a/plinth/modules/ejabberd/__init__.py +++ b/plinth/modules/ejabberd/__init__.py @@ -28,8 +28,6 @@ from plinth.utils import format_lazy from . import manifest -version = 4 - _description = [ _('XMPP is an open and standardized communication protocol. Here ' 'you can run and configure your XMPP server, called ejabberd.'), @@ -59,11 +57,13 @@ class EjabberdApp(app_module.App): app_id = 'ejabberd' + _version = 4 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, name=_('ejabberd'), icon_filename='ejabberd', short_description=_('Chat Server'), description=_description, diff --git a/plinth/modules/email_server/__init__.py b/plinth/modules/email_server/__init__.py index ec8e14160..d74df3802 100644 --- a/plinth/modules/email_server/__init__.py +++ b/plinth/modules/email_server/__init__.py @@ -18,8 +18,6 @@ from plinth.package import Packages, remove from . import audit, manifest -version = 1 - clamav_packages = ['clamav', 'clamav-daemon'] clamav_daemons = ['clamav-daemon', 'clamav-freshclam'] @@ -44,6 +42,8 @@ class EmailServerApp(plinth.app.App): app_id = 'email_server' app_name = _('Email Server') + _version = 1 + def __init__(self): """The app's constructor""" super().__init__() @@ -86,7 +86,7 @@ class EmailServerApp(plinth.app.App): def _add_ui_components(self): info = plinth.app.Info( - app_id=self.app_id, version=version, name=self.app_name, + app_id=self.app_id, version=self._version, name=self.app_name, short_description=_('Powered by Postfix, Dovecot & Rspamd'), description=_description, manual_page='EmailServer', clients=manifest.clients, diff --git a/plinth/modules/firewall/__init__.py b/plinth/modules/firewall/__init__.py index 591615d85..dacb29e57 100644 --- a/plinth/modules/firewall/__init__.py +++ b/plinth/modules/firewall/__init__.py @@ -21,8 +21,6 @@ from . import manifest gio = import_from_gi('Gio', '2.0') glib = import_from_gi('GLib', '2.0') -version = 2 - _description = [ format_lazy( _('Firewall is a security system that controls the incoming and ' @@ -52,13 +50,15 @@ class FirewallApp(app_module.App): app_id = 'firewall' + _version = 2 + can_be_disabled = False def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, is_essential=True, name=_('Firewall'), icon='fa-shield', description=_description, manual_page='Firewall') diff --git a/plinth/modules/first_boot/__init__.py b/plinth/modules/first_boot/__init__.py index 9bf921766..342516d91 100644 --- a/plinth/modules/first_boot/__init__.py +++ b/plinth/modules/first_boot/__init__.py @@ -11,8 +11,6 @@ from django.urls import reverse from plinth import app, cfg, module_loader from plinth.signals import post_setup -version = 1 - first_boot_steps = [ { 'id': 'firstboot_welcome', @@ -37,11 +35,14 @@ class FirstBootApp(app.App): app_id = 'first_boot' + _version = 1 + def __init__(self): """Create components for the app.""" super().__init__() - info = app.Info(app_id=self.app_id, version=version, is_essential=True) + info = app.Info(app_id=self.app_id, version=self._version, + is_essential=True) self.add(info) def post_init(self): diff --git a/plinth/modules/gitweb/__init__.py b/plinth/modules/gitweb/__init__.py index a68797849..bd0f6bf4a 100644 --- a/plinth/modules/gitweb/__init__.py +++ b/plinth/modules/gitweb/__init__.py @@ -22,8 +22,6 @@ from . import manifest from .forms import is_repo_url from .manifest import GIT_REPO_PATH -version = 1 - _description = [ _('Git is a distributed version-control system for tracking changes in ' 'source code during software development. Gitweb provides a web ' @@ -44,6 +42,8 @@ class GitwebApp(app_module.App): app_id = 'gitweb' + _version = 1 + def __init__(self): """Create components for the app.""" super().__init__() @@ -52,7 +52,7 @@ class GitwebApp(app_module.App): self.repos = [] - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, name=_('Gitweb'), icon_filename='gitweb', short_description=_('Simple Git Hosting'), description=_description, manual_page='GitWeb', diff --git a/plinth/modules/help/__init__.py b/plinth/modules/help/__init__.py index 70ad6fadf..2d748a7de 100644 --- a/plinth/modules/help/__init__.py +++ b/plinth/modules/help/__init__.py @@ -11,8 +11,6 @@ from django.utils.translation import pgettext_lazy from plinth import app as app_module from plinth import cfg, menu, web_server -version = 1 - app = None @@ -21,11 +19,13 @@ class HelpApp(app_module.App): app_id = 'help' + _version = 1 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, is_essential=True) self.add(info) diff --git a/plinth/modules/i2p/__init__.py b/plinth/modules/i2p/__init__.py index 5a477c355..7c70dfa85 100644 --- a/plinth/modules/i2p/__init__.py +++ b/plinth/modules/i2p/__init__.py @@ -18,8 +18,6 @@ from plinth.package import Packages from . import manifest -version = 1 - _description = [ _('The Invisible Internet Project is an anonymous network layer intended ' 'to protect communication from censorship and surveillance. I2P ' @@ -45,6 +43,8 @@ class I2PApp(app_module.App): app_id = 'i2p' + _version = 1 + def __init__(self): """Create components for the app.""" super().__init__() @@ -52,7 +52,7 @@ class I2PApp(app_module.App): groups = {'i2p': _('Manage I2P application')} info = app_module.Info( - app_id=self.app_id, version=version, name=_('I2P'), + app_id=self.app_id, version=self._version, name=_('I2P'), icon_filename='i2p', short_description=_('Anonymity Network'), description=_description, manual_page='I2P', clients=manifest.clients, diff --git a/plinth/modules/ikiwiki/__init__.py b/plinth/modules/ikiwiki/__init__.py index b49ac4c0f..a38e85567 100644 --- a/plinth/modules/ikiwiki/__init__.py +++ b/plinth/modules/ikiwiki/__init__.py @@ -18,8 +18,6 @@ from plinth.utils import format_lazy from . import manifest -version = 1 - _description = [ _('ikiwiki is a simple wiki and blog application. It supports ' 'several lightweight markup languages, including Markdown, and ' @@ -41,11 +39,13 @@ class IkiwikiApp(app_module.App): app_id = 'ikiwiki' + _version = 1 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, name=_('ikiwiki'), icon_filename='ikiwiki', short_description=_('Wiki and Blog'), description=_description, manual_page='Ikiwiki', diff --git a/plinth/modules/infinoted/__init__.py b/plinth/modules/infinoted/__init__.py index b02009b36..9a9a8bd18 100644 --- a/plinth/modules/infinoted/__init__.py +++ b/plinth/modules/infinoted/__init__.py @@ -17,8 +17,6 @@ from plinth.utils import format_lazy from . import manifest -version = 3 - _description = [ _('infinoted is a server for Gobby, a collaborative text editor.'), format_lazy( @@ -36,11 +34,13 @@ class InfinotedApp(app_module.App): app_id = 'infinoted' + _version = 3 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, name=_('infinoted'), icon_filename='infinoted', short_description=_('Gobby Server'), description=_description, diff --git a/plinth/modules/jsxc/__init__.py b/plinth/modules/jsxc/__init__.py index 0bffe344d..059c29772 100644 --- a/plinth/modules/jsxc/__init__.py +++ b/plinth/modules/jsxc/__init__.py @@ -17,8 +17,6 @@ from plinth.web_server import StaticFiles from . import manifest -version = 1 - _description = [ _('JSXC is a web client for XMPP. Typically it is used with an XMPP ' 'server running locally.'), @@ -34,13 +32,15 @@ class JSXCApp(app_module.App): app_id = 'jsxc' + _version = 1 + can_be_disabled = False def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, name=_('JSXC'), icon_filename='jsxc', short_description=_('Chat Client'), description=_description, manual_page='JSXC', diff --git a/plinth/modules/letsencrypt/__init__.py b/plinth/modules/letsencrypt/__init__.py index feaa5d3e6..c7538b4ed 100644 --- a/plinth/modules/letsencrypt/__init__.py +++ b/plinth/modules/letsencrypt/__init__.py @@ -23,8 +23,6 @@ from plinth.utils import format_lazy from . import components, manifest -version = 3 - depends = ['names'] _description = [ @@ -54,11 +52,13 @@ class LetsEncryptApp(app_module.App): app_id = 'letsencrypt' + _version = 3 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, is_essential=True, depends=depends, name=_('Let\'s Encrypt'), icon='fa-lock', short_description=_('Certificates'), diff --git a/plinth/modules/matrixsynapse/__init__.py b/plinth/modules/matrixsynapse/__init__.py index 6c7e33af4..bb00d8338 100644 --- a/plinth/modules/matrixsynapse/__init__.py +++ b/plinth/modules/matrixsynapse/__init__.py @@ -25,8 +25,6 @@ from plinth.utils import format_lazy, is_non_empty_file from . import manifest -version = 7 - _description = [ _('Matrix is an new ' 'ecosystem for open, federated instant messaging and VoIP. Synapse is a ' @@ -63,15 +61,17 @@ class MatrixSynapseApp(app_module.App): app_id = 'matrixsynapse' + _version = 7 + def __init__(self): """Create components for the app.""" super().__init__() info = app_module.Info( - app_id=self.app_id, version=version, name=_('Matrix Synapse'), - icon_filename='matrixsynapse', short_description=_('Chat Server'), - description=_description, manual_page='MatrixSynapse', - clients=manifest.clients) + app_id=self.app_id, version=self._version, + name=_('Matrix Synapse'), icon_filename='matrixsynapse', + short_description=_('Chat Server'), description=_description, + manual_page='MatrixSynapse', clients=manifest.clients) self.add(info) menu_item = menu.Menu('menu-matrixsynapse', info.name, diff --git a/plinth/modules/mediawiki/__init__.py b/plinth/modules/mediawiki/__init__.py index 387b14d6d..5dd860795 100644 --- a/plinth/modules/mediawiki/__init__.py +++ b/plinth/modules/mediawiki/__init__.py @@ -19,8 +19,6 @@ from plinth.package import Packages from . import manifest -version = 10 - _description = [ _('MediaWiki is the wiki engine that powers Wikipedia and other WikiMedia ' 'projects. A wiki engine is a program for creating a collaboratively ' @@ -47,12 +45,14 @@ class MediaWikiApp(app_module.App): app_id = 'mediawiki' + _version = 10 + def __init__(self): """Create components for the app.""" super().__init__() self._private_mode = True - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, name=_('MediaWiki'), icon_filename='mediawiki', short_description=_('Wiki'), description=_description, diff --git a/plinth/modules/minetest/__init__.py b/plinth/modules/minetest/__init__.py index f56d48f0d..7aa1e032d 100644 --- a/plinth/modules/minetest/__init__.py +++ b/plinth/modules/minetest/__init__.py @@ -18,8 +18,6 @@ from plinth.utils import format_lazy from . import manifest -version = 2 - _mods = [ 'minetest-mod-character-creator', 'minetest-mod-craftguide', 'minetest-mod-infinite-chest', 'minetest-mod-lucky-block', @@ -51,12 +49,14 @@ class MinetestApp(app_module.App): app_id = 'minetest' + _version = 2 + def __init__(self): """Create components for the app.""" super().__init__() info = app_module.Info( - app_id=self.app_id, version=version, name=_('Minetest'), + app_id=self.app_id, version=self._version, name=_('Minetest'), icon_filename='minetest', short_description=_('Block Sandbox'), description=_description, manual_page='Minetest', clients=manifest.clients, diff --git a/plinth/modules/minidlna/__init__.py b/plinth/modules/minidlna/__init__.py index 680c5d089..f4781d236 100644 --- a/plinth/modules/minidlna/__init__.py +++ b/plinth/modules/minidlna/__init__.py @@ -16,8 +16,6 @@ from plinth.utils import Version from . import manifest -version = 2 - _description = [ _('MiniDLNA is a simple media server software, with the aim of being ' 'fully compliant with DLNA/UPnP-AV clients. ' @@ -36,13 +34,15 @@ class MiniDLNAApp(app_module.App): """Freedombox app managing miniDlna""" app_id = 'minidlna' + _version = 2 + def __init__(self): """Initialize the app components""" super().__init__() groups = {'minidlna': _('Media streaming server')} - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, name=_('MiniDLNA'), icon_filename='minidlna', short_description=_('Simple Media Server'), description=_description, diff --git a/plinth/modules/mldonkey/__init__.py b/plinth/modules/mldonkey/__init__.py index 1b5934230..56801ed32 100644 --- a/plinth/modules/mldonkey/__init__.py +++ b/plinth/modules/mldonkey/__init__.py @@ -19,8 +19,6 @@ from plinth.utils import format_lazy from . import manifest -version = 2 - _description = [ _('MLDonkey is a peer-to-peer file sharing application used to exchange ' 'large files. It can participate in multiple peer-to-peer networks ' @@ -44,6 +42,8 @@ class MLDonkeyApp(app_module.App): app_id = 'mldonkey' + _version = 2 + DAEMON = 'mldonkey-server' def __init__(self): @@ -53,7 +53,7 @@ class MLDonkeyApp(app_module.App): groups = {'ed2k': _('Download files using eDonkey applications')} info = app_module.Info( - app_id=self.app_id, version=version, name=_('MLDonkey'), + app_id=self.app_id, version=self._version, name=_('MLDonkey'), icon_filename='mldonkey', short_description=_('Peer-to-peer File Sharing'), description=_description, manual_page='MLDonkey', diff --git a/plinth/modules/monkeysphere/__init__.py b/plinth/modules/monkeysphere/__init__.py index 3589578bc..c6aea2286 100644 --- a/plinth/modules/monkeysphere/__init__.py +++ b/plinth/modules/monkeysphere/__init__.py @@ -13,8 +13,6 @@ from plinth.package import Packages from . import manifest -version = 1 - _description = [ _('With Monkeysphere, an OpenPGP key can be generated for each configured ' 'domain serving SSH. The OpenPGP public key can then be uploaded to the ' @@ -42,11 +40,13 @@ class MonkeysphereApp(app_module.App): app_id = 'monkeysphere' + _version = 1 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, name=_('Monkeysphere'), icon='fa-certificate', description=_description, manual_page='Monkeysphere') diff --git a/plinth/modules/mumble/__init__.py b/plinth/modules/mumble/__init__.py index ddc250d07..0b06d15d1 100644 --- a/plinth/modules/mumble/__init__.py +++ b/plinth/modules/mumble/__init__.py @@ -22,8 +22,6 @@ from plinth.utils import Version from . import manifest -version = 2 - _description = [ _('Mumble is an open source, low-latency, encrypted, high quality ' 'voice chat software.'), @@ -40,12 +38,14 @@ class MumbleApp(app_module.App): app_id = 'mumble' + _version = 2 + def __init__(self): """Create components for the app.""" super().__init__() info = app_module.Info( - app_id=self.app_id, version=version, name=_('Mumble'), + app_id=self.app_id, version=self._version, name=_('Mumble'), icon_filename='mumble', short_description=_('Voice Chat'), description=_description, manual_page='Mumble', clients=manifest.clients, diff --git a/plinth/modules/names/__init__.py b/plinth/modules/names/__init__.py index 8b4093fcb..a3f8162df 100644 --- a/plinth/modules/names/__init__.py +++ b/plinth/modules/names/__init__.py @@ -15,8 +15,6 @@ from plinth.utils import format_lazy from . import components, manifest -version = 1 - logger = logging.getLogger(__name__) _description = [ @@ -36,10 +34,12 @@ class NamesApp(app_module.App): app_id = 'names' + _version = 1 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, is_essential=True, name=_('Name Services'), icon='fa-tags', description=_description, manual_page='NameServices') diff --git a/plinth/modules/networks/__init__.py b/plinth/modules/networks/__init__.py index 0e04889b1..83c1d52f7 100644 --- a/plinth/modules/networks/__init__.py +++ b/plinth/modules/networks/__init__.py @@ -14,8 +14,6 @@ from plinth import app as app_module from plinth import daemon, kvstore, menu, network from plinth.package import Packages -version = 1 - first_boot_steps = [ { 'id': 'network_topology_wizard', @@ -51,11 +49,13 @@ class NetworksApp(app_module.App): app_id = 'networks' + _version = 1 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, is_essential=True, name=_('Networks'), icon='fa-signal', description=_description, manual_page='Networks') diff --git a/plinth/modules/openvpn/__init__.py b/plinth/modules/openvpn/__init__.py index a156d110d..3d73b0032 100644 --- a/plinth/modules/openvpn/__init__.py +++ b/plinth/modules/openvpn/__init__.py @@ -20,8 +20,6 @@ from plinth.utils import format_lazy from . import manifest -version = 4 - _description = [ format_lazy( _('Virtual Private Network (VPN) is a technique for securely ' @@ -43,6 +41,8 @@ class OpenVPNApp(app_module.App): app_id = 'openvpn' + _version = 4 + @property def can_be_disabled(self): """Return whether the app can be disabled.""" @@ -54,7 +54,7 @@ class OpenVPNApp(app_module.App): self.groups = {'vpn': _('Connect to VPN services')} - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, name=_('OpenVPN'), icon_filename='openvpn', short_description=_('Virtual Private Network'), description=_description, manual_page='OpenVPN', diff --git a/plinth/modules/pagekite/__init__.py b/plinth/modules/pagekite/__init__.py index 0b7cf5694..cc86ad228 100644 --- a/plinth/modules/pagekite/__init__.py +++ b/plinth/modules/pagekite/__init__.py @@ -16,8 +16,6 @@ from plinth.utils import format_lazy from . import manifest, utils -version = 2 - depends = ['names'] _description = [ @@ -56,12 +54,14 @@ class PagekiteApp(app_module.App): DAEMON = 'pagekite' + _version = 2 + def __init__(self): """Create components for the app.""" super().__init__() info = app_module.Info( - app_id=self.app_id, version=version, depends=depends, + app_id=self.app_id, version=self._version, depends=depends, name=_('PageKite'), icon='fa-flag', short_description=_('Public Visibility'), description=_description, manual_page='PageKite', diff --git a/plinth/modules/performance/__init__.py b/plinth/modules/performance/__init__.py index 0901ece69..7a56ed1c3 100644 --- a/plinth/modules/performance/__init__.py +++ b/plinth/modules/performance/__init__.py @@ -13,8 +13,6 @@ from plinth.package import Packages from . import manifest -version = 1 - name = _('Performance') _description = [ @@ -34,11 +32,13 @@ class PerformanceApp(app_module.App): app_id = 'performance' + _version = 1 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, name=_('Performance'), icon='fa-bar-chart', short_description=_('System Monitoring'), description=_description, diff --git a/plinth/modules/power/__init__.py b/plinth/modules/power/__init__.py index d1faadd43..89c3a4356 100644 --- a/plinth/modules/power/__init__.py +++ b/plinth/modules/power/__init__.py @@ -10,8 +10,6 @@ from plinth.modules.backups.components import BackupRestore from . import manifest -version = 1 - _description = [_('Restart or shut down the system.')] app = None @@ -22,11 +20,13 @@ class PowerApp(app_module.App): app_id = 'power' + _version = 1 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, is_essential=True, name=_('Power'), description=_description, manual_page='Power') self.add(info) diff --git a/plinth/modules/privoxy/__init__.py b/plinth/modules/privoxy/__init__.py index 8dd1d5c08..726c825ba 100644 --- a/plinth/modules/privoxy/__init__.py +++ b/plinth/modules/privoxy/__init__.py @@ -19,8 +19,6 @@ from plinth.utils import format_lazy from . import manifest -version = 1 - _description = [ _('Privoxy is a non-caching web proxy with advanced filtering ' 'capabilities for enhancing privacy, modifying web page data and ' @@ -44,12 +42,14 @@ class PrivoxyApp(app_module.App): app_id = 'privoxy' + _version = 1 + def __init__(self): """Create components for the app.""" super().__init__() info = app_module.Info( - app_id=self.app_id, version=version, name=_('Privoxy'), + app_id=self.app_id, version=self._version, name=_('Privoxy'), icon_filename='privoxy', short_description=_('Web Proxy'), description=_description, manual_page='Privoxy', donation_url='https://www.privoxy.org/faq/general.html#DONATE') diff --git a/plinth/modules/quassel/__init__.py b/plinth/modules/quassel/__init__.py index eff5ee29c..533ee5f0e 100644 --- a/plinth/modules/quassel/__init__.py +++ b/plinth/modules/quassel/__init__.py @@ -22,8 +22,6 @@ from plinth.utils import format_lazy from . import manifest -version = 1 - _description = [ format_lazy( _('Quassel is an IRC application that is split into two parts, a ' @@ -48,11 +46,13 @@ class QuasselApp(app_module.App): app_id = 'quassel' + _version = 1 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, name=_('Quassel'), icon_filename='quassel', short_description=_('IRC Client'), description=_description, manual_page='Quassel', diff --git a/plinth/modules/radicale/__init__.py b/plinth/modules/radicale/__init__.py index fa87df5cf..d80fcd5ba 100644 --- a/plinth/modules/radicale/__init__.py +++ b/plinth/modules/radicale/__init__.py @@ -20,8 +20,6 @@ from plinth.utils import Version, format_lazy from . import manifest -version = 2 - _description = [ format_lazy( _('Radicale is a CalDAV and CardDAV server. It allows synchronization ' @@ -47,11 +45,13 @@ class RadicaleApp(app_module.App): app_id = 'radicale' + _version = 2 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, name=_('Radicale'), icon_filename='radicale', short_description=_('Calendar and Addressbook'), description=_description, diff --git a/plinth/modules/roundcube/__init__.py b/plinth/modules/roundcube/__init__.py index a3fa709ed..49997b7dc 100644 --- a/plinth/modules/roundcube/__init__.py +++ b/plinth/modules/roundcube/__init__.py @@ -16,8 +16,6 @@ from plinth.utils import Version from . import manifest -version = 1 - _description = [ _('Roundcube webmail is a browser-based multilingual IMAP ' 'client with an application-like user interface. It provides ' @@ -45,11 +43,13 @@ class RoundcubeApp(app_module.App): app_id = 'roundcube' + _version = 1 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, name=_('Roundcube'), icon_filename='roundcube', short_description=_('Email Client'), description=_description, diff --git a/plinth/modules/samba/__init__.py b/plinth/modules/samba/__init__.py index dc31a9608..b0baee393 100644 --- a/plinth/modules/samba/__init__.py +++ b/plinth/modules/samba/__init__.py @@ -23,8 +23,6 @@ from plinth.utils import format_lazy from . import manifest -version = 2 - _description = [ _('Samba allows to share files and folders between FreedomBox and ' 'other computers in your local network.'), @@ -49,6 +47,8 @@ class SambaApp(app_module.App): app_id = 'samba' + _version = 2 + def __init__(self): """Create components for the app.""" super().__init__() @@ -56,7 +56,7 @@ class SambaApp(app_module.App): groups = {'freedombox-share': _('Access to the private shares')} info = app_module.Info( - app_id=self.app_id, version=version, name=_('Samba'), + app_id=self.app_id, version=self._version, name=_('Samba'), icon_filename='samba', short_description=_('Network File Storage'), manual_page='Samba', description=_description, clients=manifest.clients, diff --git a/plinth/modules/searx/__init__.py b/plinth/modules/searx/__init__.py index 10df828b6..53995106f 100644 --- a/plinth/modules/searx/__init__.py +++ b/plinth/modules/searx/__init__.py @@ -18,8 +18,6 @@ from plinth.package import Packages from . import manifest -version = 4 - _description = [ _('Searx is a privacy-respecting Internet metasearch engine. ' 'It aggregrates and displays results from multiple search engines.'), @@ -35,6 +33,8 @@ class SearxApp(app_module.App): app_id = 'searx' + _version = 4 + def __init__(self): """Create components for the app.""" super().__init__() @@ -42,7 +42,7 @@ class SearxApp(app_module.App): groups = {'web-search': _('Search the web')} info = app_module.Info( - app_id=self.app_id, version=version, name=_('Searx'), + app_id=self.app_id, version=self._version, name=_('Searx'), icon_filename='searx', short_description=_('Web Search'), description=_description, manual_page='Searx', clients=manifest.clients, diff --git a/plinth/modules/security/__init__.py b/plinth/modules/security/__init__.py index 13f884879..9268ec071 100644 --- a/plinth/modules/security/__init__.py +++ b/plinth/modules/security/__init__.py @@ -18,8 +18,6 @@ from plinth.package import Packages from . import manifest -version = 7 - ACCESS_CONF_FILE = '/etc/security/access.d/50freedombox.conf' ACCESS_CONF_FILE_OLD = '/etc/security/access.conf' ACCESS_CONF_SNIPPET = '-:ALL EXCEPT root fbx plinth (admin) (sudo):ALL' @@ -34,11 +32,13 @@ class SecurityApp(app_module.App): app_id = 'security' + _version = 7 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, is_essential=True, name=_('Security'), icon='fa-lock', manual_page='Security') self.add(info) diff --git a/plinth/modules/shaarli/__init__.py b/plinth/modules/shaarli/__init__.py index 9ab2158e7..b58062559 100644 --- a/plinth/modules/shaarli/__init__.py +++ b/plinth/modules/shaarli/__init__.py @@ -13,8 +13,6 @@ from plinth.package import Packages from . import manifest -version = 1 - _description = [ _('Shaarli allows you to save and share bookmarks.'), _('Note that Shaarli only supports a single user account, which you will ' @@ -29,11 +27,13 @@ class ShaarliApp(app_module.App): app_id = 'shaarli' + _version = 1 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, name=_('Shaarli'), icon_filename='shaarli', short_description=_('Bookmarks'), description=_description, manual_page='Shaarli', diff --git a/plinth/modules/shadowsocks/__init__.py b/plinth/modules/shadowsocks/__init__.py index 566c599c1..c396272fa 100644 --- a/plinth/modules/shadowsocks/__init__.py +++ b/plinth/modules/shadowsocks/__init__.py @@ -17,8 +17,6 @@ from plinth.utils import format_lazy from . import manifest -version = 3 - _description = [ _('Shadowsocks is a lightweight and secure SOCKS5 proxy, designed to ' 'protect your Internet traffic. It can be used to bypass Internet ' @@ -41,13 +39,15 @@ class ShadowsocksApp(app_module.App): app_id = 'shadowsocks' + _version = 3 + DAEMON = 'shadowsocks-libev-local@freedombox' def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, name=_('Shadowsocks'), icon_filename='shadowsocks', short_description=_('Socks5 Proxy'), diff --git a/plinth/modules/sharing/__init__.py b/plinth/modules/sharing/__init__.py index 1ac5ee950..7498285c9 100644 --- a/plinth/modules/sharing/__init__.py +++ b/plinth/modules/sharing/__init__.py @@ -15,8 +15,6 @@ from plinth.utils import format_lazy from . import manifest -version = 1 - _description = [ format_lazy( _('Sharing allows you to share files and folders on your {box_name} ' @@ -32,10 +30,12 @@ class SharingApp(app_module.App): app_id = 'sharing' + _version = 1 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, name=_('Sharing'), icon_filename='sharing', manual_page='Sharing', description=_description) self.add(info) diff --git a/plinth/modules/snapshot/__init__.py b/plinth/modules/snapshot/__init__.py index 144759124..872324b6a 100644 --- a/plinth/modules/snapshot/__init__.py +++ b/plinth/modules/snapshot/__init__.py @@ -18,8 +18,6 @@ from plinth.package import Packages from . import manifest -version = 4 - _description = [ _('Snapshots allows creating and managing btrfs file system snapshots. ' 'These can be used to roll back the system to a previously known ' @@ -46,11 +44,13 @@ class SnapshotApp(app_module.App): app_id = 'snapshot' + _version = 4 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, is_essential=True, name=_('Storage Snapshots'), icon='fa-film', description=_description, manual_page='Snapshots') diff --git a/plinth/modules/ssh/__init__.py b/plinth/modules/ssh/__init__.py index d199c08b0..6fb1eb41d 100644 --- a/plinth/modules/ssh/__init__.py +++ b/plinth/modules/ssh/__init__.py @@ -19,8 +19,6 @@ from plinth.package import Packages from . import manifest -version = 1 - _description = [ _('A Secure Shell server uses the secure shell protocol to accept ' 'connections from remote computers. An authorized remote computer ' @@ -36,11 +34,13 @@ class SSHApp(app_module.App): app_id = 'ssh' + _version = 1 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, is_essential=True, name=_('Secure Shell (SSH) Server'), icon='fa-terminal', description=_description) diff --git a/plinth/modules/sso/__init__.py b/plinth/modules/sso/__init__.py index 6dd5ebf2b..8ac43f406 100644 --- a/plinth/modules/sso/__init__.py +++ b/plinth/modules/sso/__init__.py @@ -9,8 +9,6 @@ from plinth import actions from plinth import app as app_module from plinth.package import Packages -version = 1 - depends = ['security', 'apache'] app = None @@ -20,11 +18,13 @@ class SSOApp(app_module.App): """FreedomBox app for single sign on.""" app_id = 'sso' + _version = 1 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, is_essential=True, depends=depends, name=_('Single Sign On')) self.add(info) diff --git a/plinth/modules/storage/__init__.py b/plinth/modules/storage/__init__.py index 855f868e4..1a486a3f0 100644 --- a/plinth/modules/storage/__init__.py +++ b/plinth/modules/storage/__init__.py @@ -21,8 +21,6 @@ from plinth.utils import format_lazy from . import manifest, udisks2 -version = 4 - _description = [ format_lazy( _('This module allows you to manage storage media attached to your ' @@ -41,13 +39,15 @@ class StorageApp(app_module.App): app_id = 'storage' + _version = 4 + can_be_disabled = False def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, is_essential=True, name=_('Storage'), icon='fa-hdd-o', description=_description, manual_page='Storage') diff --git a/plinth/modules/syncthing/__init__.py b/plinth/modules/syncthing/__init__.py index de89b2b68..3cf8b0758 100644 --- a/plinth/modules/syncthing/__init__.py +++ b/plinth/modules/syncthing/__init__.py @@ -19,8 +19,6 @@ from plinth.utils import format_lazy from . import manifest -version = 5 - _description = [ _('Syncthing is an application to synchronize files across multiple ' 'devices, e.g. your desktop computer and mobile phone. Creation, ' @@ -47,6 +45,8 @@ class SyncthingApp(app_module.App): app_id = 'syncthing' + _version = 5 + DAEMON = 'syncthing@syncthing' def __init__(self): @@ -57,7 +57,7 @@ class SyncthingApp(app_module.App): 'syncthing-access': _('Administer Syncthing application') } - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, name=_('Syncthing'), icon_filename='syncthing', short_description=_('File Synchronization'), description=_description, diff --git a/plinth/modules/tahoe/__init__.py b/plinth/modules/tahoe/__init__.py index 98a0e0fcc..6c4bbcd1e 100644 --- a/plinth/modules/tahoe/__init__.py +++ b/plinth/modules/tahoe/__init__.py @@ -22,8 +22,6 @@ from plinth.utils import format_lazy from . import manifest from .errors import TahoeConfigurationError -version = 1 - _description = [ _('Tahoe-LAFS is a decentralized secure file storage system. ' 'It uses provider independent security to store files over a ' @@ -52,11 +50,13 @@ class TahoeApp(app_module.App): app_id = 'tahoe' + _version = 1 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, name=_('Tahoe-LAFS'), icon_filename='tahoe-lafs', short_description=_('Distributed File Storage'), diff --git a/plinth/modules/tor/__init__.py b/plinth/modules/tor/__init__.py index 262cd7212..c39d6c4ee 100644 --- a/plinth/modules/tor/__init__.py +++ b/plinth/modules/tor/__init__.py @@ -22,8 +22,6 @@ from plinth.signals import domain_added, domain_removed from . import manifest, utils -version = 5 - depends = ['names'] _description = [ @@ -43,11 +41,13 @@ class TorApp(app_module.App): app_id = 'tor' + _version = 5 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, name=_('Tor'), icon_filename='tor', short_description=_('Anonymity Network'), description=_description, manual_page='Tor', diff --git a/plinth/modules/transmission/__init__.py b/plinth/modules/transmission/__init__.py index 7fc8363aa..477c33c8c 100644 --- a/plinth/modules/transmission/__init__.py +++ b/plinth/modules/transmission/__init__.py @@ -20,8 +20,6 @@ from plinth.package import Packages from . import manifest -version = 4 - _description = [ _('Transmission is a BitTorrent client with a web interface.'), _('BitTorrent is a peer-to-peer file sharing protocol. ' @@ -39,6 +37,8 @@ class TransmissionApp(app_module.App): app_id = 'transmission' + _version = 4 + DAEMON = 'transmission-daemon' def __init__(self): @@ -50,7 +50,7 @@ class TransmissionApp(app_module.App): } info = app_module.Info( - app_id=self.app_id, version=version, name=_('Transmission'), + app_id=self.app_id, version=self._version, name=_('Transmission'), icon_filename='transmission', short_description=_('BitTorrent Web Client'), description=_description, manual_page='Transmission', diff --git a/plinth/modules/ttrss/__init__.py b/plinth/modules/ttrss/__init__.py index 6713e44b8..fb90ad392 100644 --- a/plinth/modules/ttrss/__init__.py +++ b/plinth/modules/ttrss/__init__.py @@ -19,8 +19,6 @@ from plinth.utils import Version, format_lazy from . import manifest -version = 3 - _description = [ _('Tiny Tiny RSS is a news feed (RSS/Atom) reader and aggregator, ' 'designed to allow reading news from any location, while feeling as ' @@ -42,13 +40,15 @@ class TTRSSApp(app_module.App): app_id = 'ttrss' + _version = 3 + def __init__(self): """Create components for the app.""" super().__init__() groups = {'feed-reader': _('Read and subscribe to news feeds')} - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, name=_('Tiny Tiny RSS'), icon_filename='ttrss', short_description=_('News Feed Reader'), description=_description, diff --git a/plinth/modules/upgrades/__init__.py b/plinth/modules/upgrades/__init__.py index 6e92bf25f..c0879d532 100644 --- a/plinth/modules/upgrades/__init__.py +++ b/plinth/modules/upgrades/__init__.py @@ -22,8 +22,6 @@ from plinth.package import Packages from . import manifest -version = 9 - first_boot_steps = [ { 'id': 'backports_wizard', @@ -64,13 +62,15 @@ class UpgradesApp(app_module.App): app_id = 'upgrades' + _version = 9 + can_be_disabled = False def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, is_essential=True, name=_('Update'), icon='fa-refresh', description=_description, manual_page='Upgrades') diff --git a/plinth/modules/users/__init__.py b/plinth/modules/users/__init__.py index 7abb6e719..7a1dd68b9 100644 --- a/plinth/modules/users/__init__.py +++ b/plinth/modules/users/__init__.py @@ -17,8 +17,6 @@ from plinth.package import Packages from .components import UsersAndGroups -version = 3 - first_boot_steps = [ { 'id': 'users_firstboot', @@ -47,13 +45,15 @@ class UsersApp(app_module.App): app_id = 'users' + _version = 3 + can_be_disabled = False def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, is_essential=True, name=_('Users and Groups'), icon='fa-users', description=_description, manual_page='Users') diff --git a/plinth/modules/wireguard/__init__.py b/plinth/modules/wireguard/__init__.py index ca0b3960a..80ca8972f 100644 --- a/plinth/modules/wireguard/__init__.py +++ b/plinth/modules/wireguard/__init__.py @@ -16,8 +16,6 @@ from . import manifest, utils nm = import_from_gi('NM', '1.0') -version = 1 - _description = [ _('WireGuard is a fast, modern, secure VPN tunnel.'), format_lazy( @@ -41,12 +39,14 @@ class WireguardApp(app_module.App): app_id = 'wireguard' + _version = 1 + def __init__(self): """Create components for the app.""" super().__init__() info = app_module.Info( - app_id=self.app_id, version=version, name=_('WireGuard'), + app_id=self.app_id, version=self._version, name=_('WireGuard'), icon_filename='wireguard', short_description=_('Virtual Private Network'), description=_description, manual_page='WireGuard', diff --git a/plinth/modules/wordpress/__init__.py b/plinth/modules/wordpress/__init__.py index 707d2ec5e..f4061acc8 100644 --- a/plinth/modules/wordpress/__init__.py +++ b/plinth/modules/wordpress/__init__.py @@ -19,8 +19,6 @@ from . import manifest PUBLIC_ACCESS_FILE = '/etc/wordpress/is_public' -version = 1 - _description = [ _('WordPress is a popular way to create and manage websites and blogs. ' 'Content can be managed using a visual interface. Layout and ' @@ -50,12 +48,14 @@ class WordPressApp(app_module.App): app_id = 'wordpress' + _version = 1 + def __init__(self): """Create components for the app.""" super().__init__() info = app_module.Info( - app_id=self.app_id, version=version, name=_('WordPress'), + app_id=self.app_id, version=self._version, name=_('WordPress'), icon_filename='wordpress', short_description=_('Website and Blog'), description=_description, manual_page='WordPress', clients=manifest.clients, diff --git a/plinth/modules/zoph/__init__.py b/plinth/modules/zoph/__init__.py index 7fc055d03..c1486b05e 100644 --- a/plinth/modules/zoph/__init__.py +++ b/plinth/modules/zoph/__init__.py @@ -21,8 +21,6 @@ from . import manifest logger = logging.getLogger(__name__) -version = 1 - _description = [ format_lazy( _('Zoph manages your photo collection. Photos are stored on your ' @@ -50,11 +48,13 @@ class ZophApp(app_module.App): app_id = 'zoph' + _version = 1 + def __init__(self): """Create components for the app.""" super().__init__() - info = app_module.Info(app_id=self.app_id, version=version, + info = app_module.Info(app_id=self.app_id, version=self._version, name=_('Zoph'), icon_filename='zoph', short_description=_('Photo Organizer'), description=_description, manual_page='Zoph',