42 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
6cf1cc72b9
networks: Ability to configure for BATMAN
Add a dispatcher script to NetworkManager to configure
B.A.T.M.A.N. Advanced interfaces.  This quite a bit hacky at it is
triggered for network connections that have the keyword "BATMAN" in
them.  The proper way to implement this is as a core change in
NetworkManager itself (as it lacks plugins).  It is done is the hope
that it will garner some more interest in FreedomBox for mesh networks.

Currently, it is possible to create a BATMAN mesh network and shared
existing internet connections on it.  Other boxes can then join this
mesh network and use that internet connection.

Known issues:

- Very unintuitive setup process.  First create a connection with device
  a Wi-Fi device, mode as ad-hoc, with a known frequency and BSSID.  The
  name of the connection should have contain BATMAN in it.  It should
  also have IPv4 method as disabled.  Second connection should be
  created for 'bat0' interface after the first on is successful.  It can
  be with method 'shared' for sharing internet connection and doing DHCP
  requests or 'auto' for aqcuiring IP address from another node in the
  mesh network.

- Untested for joining existing mesh networks.

- Requires configuring two network connections and the second one needs
  to be manually enabled after the first one is successfully activated.
2016-07-21 19:23:34 -04:00
Sunil Mohan Adapa
1f53321b51
Don't use init.d file, don't daemonize
We pretty much only run in systemd environment and I don't see that
changing any time soon.  By relying on it, we can reduce some burden.
Remove init script.

Daemonizing is not needed for systemd.  Remove code related
daemonization.
2016-05-29 20:32:12 +05:30
Sunil Mohan Adapa
7b8b12dc20
users: Move PAM configs over from freedombox-setup
Since we are running PAM update script from users action file, it is
appropriate for the PAM configurations that are effected by it to stay
here in Plinth as well.
2016-05-21 16:06:36 -04:00
James Valleroy
a6417c59a7
tor: Use augeas to modify configuration.
- Use json to get info from action script.
- Add SSH port to hidden service.
- Enable hidden service during setup.
2016-03-15 18:50:51 -04:00
Sunil Mohan Adapa
c3c44ab379
firstboot: Minor Danube PageKite fixes
- Fix message internationalization with formatting and laziness.

- Styling fixes.

- Simplify Subdomain widget.

- Update messages for grammer and consistency.
2016-03-13 23:32:26 +05:30
fonfon
435f980c6f
firstboot: freedombox.me pagekite vouchers
- Show PageKite voucher only if cfg.danube_edition is enabled
2016-03-13 23:32:20 +05:30
James Valleroy
73c125f1ae
Remove Plinth.egg-info/ during clean. Fixes #335. 2016-02-07 11:34:34 +05:30
Sunil Mohan Adapa
fed2178f7e Keep POT file when updating translations 2015-12-05 10:25:28 -05:00
Sunil Mohan Adapa
7cb96b62dd Compile and install translation files
- Add gettext as build dependency

- Add setup.py commands for compiling and updating .po files.

- Clean compiled .mo files on ./setup.py clean

- Install .po and .mo files to destination on ./setup.py install

- Compile .po files when running ./setup.py build

There doesn't seem to be a simple way to integrate Django .po file
dealing with ./setup.py mechanism.
2015-11-28 18:27:56 -05:00
Sunil Mohan Adapa
4bddc70ce0 diagnostics: Add external dependency on psutil 2015-08-29 06:22:01 -04:00
Sunil Mohan Adapa
517c364559 pagekite: Move to using python3-augeas
- Merge actions/pagekite_util.py into plinth/modules/pagekite/util.py.

- Rename plinth/modules/pagekite/util.py to utils.py.

- Add python-augeus as dependency.

- Move actions/util.py to plinth/action_utils.py and update services
  that use it.

- Rename _run() method to run() as it is being used publicly.

- Import the utils in a more conventional manner.

- Move all python2 bits to python3.
2015-07-19 15:37:43 -04:00
Sunil Mohan Adapa
124656b5ba Add django-stronghold as dependency 2015-07-01 21:43:07 +05:30
James Valleroy
be14b49c83 ikiwiki: Install conf files during Plinth install. 2015-06-26 17:34:37 +05:30
Bob Girard
5cadd223d5 Add support for testing Django-dependent modules
- Add django-test-settings.py for Django settings
- Add runtests.py for setting up Django test environment
- Add Django test setup support to setup.py and coverage.py
- Add new test module test_kvstore.py
- Enable existing Django-dependent tests in test_context_processors.py and test_menu.py
2015-05-23 13:59:49 +05:30
James Valleroy
1055787be2 Merge remote-tracking branch 'sunil/network-manager-glib' 2015-05-16 13:18:20 -04:00
Sunil Mohan Adapa
d5e484a6b4 networks: Update dependencies list 2015-05-05 16:10:33 +05:30
fonfon
cf96797040 pagekite action: Use augeas pagekite lens
And allow setting any server as pagekite frontend.
2015-05-03 09:44:45 +02:00
Sunil Mohan Adapa
69adf1cfc5 transmission: Run from behind Apache
- Introduce Apache configuration for plinth.

- Remove Transmission service file for firewalld.

- Enable transmission on install.

- Enable/disable Apache configuration on Transmission on enable/disable.

- Remove IP address whilelisting as 127.0.0.1 is the default setting and
  is sufficient for Apache to reverse proxy.

- Update UI URL.
2015-05-01 19:00:56 +05:30
Sunil Mohan Adapa
2a83f29b8b Add systemd service file
- When running in an environment without systemd, the changes are completely
  ignored.

- When running under systemd, the patch introduces a systemd native service
  file to take advantages of nice feature provided by systemd.

- One of the feature currently taken advantage of is the ability to restart the
  service automatically if it ever crashes or exits with error.

- Another feature is that when we wish to kill Plinth all the processes under
  the cgroup are killed as well.
2015-04-07 22:43:25 +05:30
Sunil Mohan Adapa
cd88ca7ecc network: Add python-networkmanager to setup.py and requirements.txt 2015-04-06 22:49:04 +05:30
Bob Girard
41d6cae0a9 Enable integration of Plinth with Travis-CI
- Add files .travis.yml and requirements.txt
- In setup.py, remove 'pygobject' from install_requires
- In setup.py, add 'pyyaml' to install_requires
- Add file plinth/tests/coverage/__init__.py
- Rename file plinth/tests/coverage/test_coverage.py to coverage.py
- In plinth/tests/coverage/coverage.py, rename class TestCoverageCommand
  to CoverageCommand
2015-04-01 16:12:59 -07:00
Sunil Mohan Adapa
7bd9f41833 xmpp: Add yaml as install dependency in setup.py 2015-03-30 01:52:31 +05:30
Sunil Mohan Adapa
2028a63deb mumble: Add new module for installing, enabling/disabling 2015-03-28 16:02:39 -04:00
Sunil Mohan Adapa
a4be460538 Introduce framework for checking/installing packages
- Uses PackageKit dameon, Glib library wrapping packagekit DBUS API and
  Python bindings for the Glib library.

- Implement a decorator to wrap views requiring packages.

- Framework allows for parallel operations.  However, doing parallel
  operations hangs because of what appears to be PackageKit backend
  limitations.
2015-01-05 00:13:19 +05:30
Sunil Mohan Adapa
5016087d5c Move coverage to test dependency and install it properly
- Coverage should only be required if running tests

- When running test_coverage command all the install dependencies and
  test dependencies should be installed.
2014-12-07 11:38:33 +05:30
Bob Girard
a502da63d5 Add test coverage measurement and reporting
- Implement coverage functionality as a setuptools Command subclass
  (in plinth/tests/coverage/test_coverage.py)
- Register the new 'test_coverage' command in setup.py
- Modify the INSTALL file to specify python3-coverage as a new dependency
- Modify the HACKING file to document the new 'test_coverage' command
- Have git (via .gitignore) ignore the '.coverage' output data file and
  the contents of the 'plinth/tests/coverage/report' directory
2014-12-06 18:14:42 +05:30
Sunil Mohan Adapa
fcc1330318 Relicense __main__.py to AGPLv3+
- There is no point in keeping this one single file as with different
  license from the rest of the package.  This change simplifies things.

- The file has been almost entirely been rewritten for Django, module
  loading, CherryPy static directories etc.

- This change will be pushed with the consent of new authors: fonfon and
  Me.
2014-11-30 14:49:49 +05:30
Sunil Mohan Adapa
7906b0ab5e Clean documentation directory when 'setup.py clean' is run 2014-11-30 14:49:49 +05:30
Sunil Mohan Adapa
7f307dc5a2 Fix issue with installing to a different root with --root= 2014-11-30 14:49:49 +05:30
Sunil Mohan Adapa
3871875ddf Don't add boostrap form to python module dependencies
Setup.py list will need python modules list and doesn't understand
Debian packages.  Setup.py will try to install libjs-boostrap as a
Python module and download it from PyPI.
2014-11-23 13:59:12 +05:30
fonfon
f0582e7a94 replaced bootstrap2 by bootstrap3 2014-11-11 19:06:47 +01:00
Sunil Mohan Adapa
5418542d56 Fix issue with plinth module not getting installed 2014-10-12 19:18:18 +05:30
Sunil Mohan Adapa
d704b3961e Fix issue with symlinks during recursive copy during install 2014-10-12 19:04:52 +05:30
Sunil Mohan Adapa
731c2535b7 Make setup.py sdist command work properly 2014-10-05 13:44:30 +05:30
Sunil Mohan Adapa
22def21d6b Update documentation with Python3 dependency information 2014-10-04 13:41:27 +05:30
fonfon
ea982bf73e call django.setup before syncdb for django 1.7 compatibility 2014-10-01 19:18:27 +02:00
Sunil Mohan Adapa
e7ed0c7c58 Update dependencies list in setup.py and INSTALL 2014-10-01 11:35:02 +05:30
Sunil Mohan Adapa
c9d8bb9d00 Require and use Python3 2014-10-01 11:31:51 +05:30
Sunil Mohan Adapa
27cdadbc76 Log a message showing the config file used 2014-09-02 14:47:35 +05:30
Sunil Mohan Adapa
b12072d924 Build documentation before install 2014-08-31 18:29:21 +05:30
Sunil Mohan Adapa
4cc2dc4546 Launch test cases using "setup.py test" 2014-08-31 14:24:00 +05:30
Sunil Mohan Adapa
ddb3b0f2c2 Use setup.py instead of Makefile 2014-08-31 13:11:27 +05:30