Commit Graph
100 Commits
Author SHA1 Message Date
Sunil Mohan Adapa 7de78071eb debian: Add powermgmt-base to recommends list
This package adds a single command on_ac_power to the system which is used by
unattended-upgrades to avoid running upgrades when on batter power.

Closes: #1753.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-04 12:07:54 -05: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
Sunil Mohan Adapa b372a13b1e debian: Remove plinth transitional package
Stop building plinth package.

This will spark removal of package from unstable as it will not be built for any
source package (NBS, "not built from source") by the "cruft-report" tool.
Eventually it will also be removed from testing as there are not dependencies on
it.

See: https://wiki.debian.org/ftpmaster_Removals

Removal from backports may require filing a ticket in RT.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-26 09:50:46 -04:00
James Valleroy 0b78a40766 d/control: Update Standards-Version to 4.4.1
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-07 19:15:40 -04:00
James Valleroy 1996a0c821 d/control: Add Rules-Requires-Root: no
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-07 19:14:30 -04:00
James Valleroy 5fe84bf395 security: Add past vulnerabilities count
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil@medhas.org isort]
[sunil@medhas.org Handle errors during HTTP request]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-03 15:59:49 -07:00
Sunil Mohan Adapa f0e45d39c9 debian: Remove python3-requests from depends list
Requests library is still used by functional tests.

- Add requests as test dependency in setup.py.

- Keep python3-requests are build dependency in debian/control

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-02 17:21:44 -04:00
James Valleroy 872cf382b0 debian: Switch to debhelper-compat
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-08-12 19:45:58 -04:00
James Valleroy 68535fa1e6 debian: Update standards version to 4.4.0
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-08-12 19:45:48 -04:00
Nikolas Nyby ace339eabf Introduce flake8 checking - #58
This introduces flake8 and fixes a bunch of flake8 errors.

flake8 is run with: ./venv/bin/flake8 plinth
if you're using a python3 venv.

We can eventually further integrate this with gitlab ci.

https://salsa.debian.org/freedombox-team/plinth/issues/58

Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-07-24 14:01:54 -07:00
Nikolas Nyby d2e987ef3c Fix a handful of typos in docs and comments
Found with [codespell](https://github.com/codespell-project/codespell/)

Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-07-24 12:39:11 -07:00
Joseph Nuthalapati 3a8fbdd799 debian: Add python3-paramiko to build dependencies
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:41:36 +05:30
Joseph Nuthalapati 67404a1c2d backups: Make paramiko a dependency of freedombox package
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:41:28 +05:30
James Valleroy 177c819a76 debian: Remove duplicate priority field
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-05-27 18:19:29 -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
Sunil Mohan Adapa 2df02b059c dbus: Add new module for D-Bus services
- Implement listening for CacheUpdated notification.

- Configuration to allow only root to trigger the notification.

- Trigger the notification from an apt update hook.

- Retrieve the list of packages available for upgrade and print them to log.

- Add dependency on libglib2.0-bin for the gdbus command line tool.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-26 06:24:05 -05:00
James Valleroy 37dfc7876b debian: Update debhelper compat version to 12
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-14 22:03:22 -05:00
Prachi Srivastava 5d68f6bf52 Replace glyphicons with forkawesome icons
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-14 17:37:58 -08:00
Sunil Mohan Adapa 1faee11d4d django: Use Argon2 password hash
Passwords will be automatically upgraded for each user on login.

Usernames not yet upgraded are vulnerable to user enumeration attack due to
difference in password check timing.

No need to add build dependency on python3-argon2 because tests use a different
Django configuration which does not use argon2 hash.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-13 14:46:15 -05:00
Sunil Mohan Adapa 25b5eaf4d9 debian: Replace and break older versions of plinth
This is necessary to avoid errors when installing freedombox with older plinth
already installed. Also make plinth depend on latest freedombox to ensure
upgrades go smoothly.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-04 22:52:15 -05:00
James Valleroy f93b6e2d54 debian: Standards-Version is now 4.3.0
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-31 16:45:32 -05:00
Sunil Mohan Adapa 5f8965df25 debian: Rename plinth package to freedombox
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-31 15:59:08 -05:00
Sunil Mohan Adapa d9b374137b debian: Update short description
Plinth is no longer just the web interface but all of freedombox.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-31 15:59:02 -05:00
Sunil Mohan Adapa a6479648a6 debian: Use description from freedombox.org
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-31 15:58:39 -05:00
Sunil Mohan Adapa 9f93c874db debian: Break current version of freedombox-setup
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-31 15:58:29 -05:00
Sunil Mohan Adapa 4c1572a3f0 debian: Add dependencies from freedombox-setup
All the packages that are removed as dependencies in freedombox-setup and are
not essential for the operation of FreedomBox/Plinth have been moved to
Recommends .

The following packages were *moved* from freedombox-setup directly as is:

- bridge-utils
- curl
- devio
- dnsutils
- dosfstools
- haveged
- htop
- iftop
- iputils-ping
- iw
- libnss-gw-name
- libnss-mdns
- libnss-myhostname
- libpam-tmpdir
- libpam-abl
- locales
- locales-all
- lsof
- netcat-openbsd
- psmisc
- resolvconf
- rfkill
- tcpdump
- vim-tiny
- wget
- wireless-tools
- zile

The following packages have been *added* as they are part of standard system
utilities present in a Debian system:

- bzip2
- file
- openssh-client
- pciutils
- whois

The following packages were *dropped* as dependencies from freedombox-setup:

- dialog: no utility to an admin on command line. No scripts are currently using
  it. Any script using it should have a dependency on it.

- dnsmasq-base: network-manager is one that uses it and it already recommends
  it.

- parted: Added as dependency for the storage module which uses it.

- ssl-cert: apache2 and other packages that use it already recommend it.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-31 15:58:04 -05:00
Sunil Mohan Adapa bf8fc21e08 debian: Alter control file indentation
To a more natural appearance.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-31 15:56:22 -05:00
James Valleroy 1813f175da debian: Move Recommends to binary package
This field is not recognized for the source package, and causes a
warning.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-26 19:50:37 -08:00
Sunil Mohan Adapa f36753fcb8 logging: Log to systemd journal directly
While capturing stdout and stderr and automatically logging that to system
logging daemon provides basic information, a lot of information lost in the
process.

This change logs to systemd journal directly so that rich information such as
code file, code function, code line, etc, can be captured in a structured way.
To avoid double logging, discard stdout and stderr in the systemd unit file.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-23 17:18:13 -05:00
Joseph Nuthalapati 5e06017e5c customization: Serve custom shortcuts through the REST API
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-08 20:30:24 -04:00
James Valleroy 8fa1b54ba7 Bump Standards-Version to 4.2.1
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2018-09-24 19:22:41 -04:00
James Valleroy 9b620d7986 Bump Standards-Version to 4.2.0
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2018-08-27 18:22:33 -04:00
Joseph Nuthalapati f762f57d1c Add turbolinks
- Load scripts in the head with `defer` instead of at the end of the body
- Disable turbolinks for application shortcuts and manual download

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-07-29 12:22:52 -04:00
Joseph Nuthalapati d75b03b85f debian: Remove Bdale Garbee from the list of uploaders
As requested. Closes #1339.

Thanks for all those uploads, Bdale!

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-07-28 12:27:23 +05:30
James Valleroy 6fdd033625 debian: Update standards version
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2018-07-16 19:34:42 -04:00
Joseph Nuthalapati ba9af6ddff firstboot: Prompt for secret during firstboot welcome
- A freshly installed FreedomBox can be hijacked by a third party and an admin
  account can be created which can be used to inject malware or simply take over
  the instance. Password protecting the firstboot step is a good way to avoid
  this. A secret will be displayed to the user as soon as the Plinth package
  is installed, which they have to enter during firstboot welcome step. Also,
  writing this to a file in plinth's home in case the user loses it.
- This protection is not applicable for images built by freedom-maker and for
  Amazon Machine Images.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-07-04 20:22:54 -04:00
James Valleroy 08eeace30f udiskie: New module for automatic mounting of removable media
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2018-07-02 19:00:32 -04:00
James Valleroy d83c5de6bd Bump Standards-Version to 4.1.4
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2018-04-23 20:55:50 -04:00
James Valleroy 4cfdf102a5 debian: Bump standards version to 4.1.3
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-04-09 19:05:49 +05:30
James Valleroy 094b586834 debian: Bump debhelper compat version to 11
Rely on dh_installsystemd instead of systemd-sequence.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-04-09 19:04:35 +05:30
Sunil Mohan Adapa 1da594c32d Support Django 2.0
This is the final change required for Django 2.0 support. Instead of using
MIDDLEWARE_CLASSES use MIDDLEWARE setting. Support for new style middleware was
provided in version 0.3.0, so depend on that version. Django built-in middleware
already supports new style and plinth middleware will now support new style.

The actual semantics of the middleware don't need changes. See:
https://docs.djangoproject.com/en/2.0/topics/http/middleware/#upgrading-pre-django-1-10-style-middleware

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-03-12 17:27:26 -04:00
James Valleroy 05af10729c Add fonts-lato as dependency
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-12 18:00:41 -05:00
Joseph Nuthalapati 45c23068db matrix-synapse: Fix YAML format issues.
/etc/matrix-synapse/homeserver.yaml file has several complex cases of inline
comments which are introducing bugs when parsed with ruamel.yaml
Eliminated the problem by discarding comments altogether since the YAML data is
only read by Plinth and not by a human.

Closes #1214

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-01-30 12:30:16 +05:30
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
Sunil Mohan Adapa c957427a59 debian: Add e2fsprogs as explicit dependency
- To Build-Depends list as tests depend on it.
- To Depends list as storage action needs it.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-01-15 14:14:00 -05:00
James Valleroy 029451870c Bump standards version, no changes needed
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2017-12-18 17:16:47 -05:00
Joseph Nuthalapati e4f053af17 Make Plinth depend on django-axes 3.0.3 or later
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-11-30 20:22:20 -05:00
Sunil Mohan Adapa 4f620fde10 debian: Update Homepage and VCS URLs
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-11-04 15:29:25 -04:00
Sunil Mohan Adapa 41e8bb4805 debian: Remove python3-yaml dependency
The yaml package is not used in Plinth anywhere.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-11-04 15:29:16 -04:00
Federico Ceratto 17ee712502 debian: Switch to native package
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-11-03 18:30:35 +05:30