86 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
d2b2f8b0f1
makefile: Workaround problems with systemd-resolved package
- To complete the provisioning process with container script and vagrant.

Tests:

- Start a fresh testing container, it should succeed. systemd-resolved is
running and resolving queries.

- Start a fresh stable container, it should succeed. systemd-resolved is running
and resolving queries.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-09-04 10:31:23 +03:00
Sunil Mohan Adapa
0ff23862a0
makefile: Don't fail while building and installing multiple versions
When older version is already built and later code is updated to newer version
and built multiple .whl files are present in dist/ directory. This confuses the
install script that assumes only one .whl is present. Pip refuses to install
multiple versions of the same package. This error was seen when bringing up the
'stable' container.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-08-10 21:44:02 -04:00
Joseph Nuthalapati
1e38dbd720
make: Ignore .mypy_cache folders while copying files
This fixes the problem of running over the limit of ARG_MAX of /bin/sh in the
dev container when copying the files of plinth modules.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-07-09 10:25:52 -07:00
Sunil Mohan Adapa
2788d6810d
Makefile: Move various tests into build system
- This allows those tests to be invoked on console and not just in CI pipelines.

Tests:

- Running make check works.

- CI pipeline succeeds.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
[jvalleroy: Remove phony test target]
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-02-12 19:17:16 -05:00
Sunil Mohan Adapa
ba55d8fe2e
Makefile: Move most of the provision process into build system
Tests:

- Performing a fresh container setup works.

- Performing a fresh VM setup works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-02-12 19:17:14 -05:00
Sunil Mohan Adapa
812ed5d60d
*: Introduce make file based build, eliminate setup.py
- setuptools aims to a build library instead of being invoked by setup.py.
Launching setup tools using ./setup.py is deprecated. Launching it using
generic build tools that use pyproject.toml is recommended.

- With the new approach customizing the build is not possible to the earlier
extent. So, introduce is a simple and sufficient build system using 'make'.

Tests:

- Check the pyproject.toml using validate-pyproject tool.

- Run diffoscope on old and new packages and verify that no unexpected changes
were introduced by the build system change.

- None of the files part of .deb package have different file permissions
compared to before.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-02-12 19:17:09 -05:00
Sunil Mohan Adapa
ddb3b0f2c2 Use setup.py instead of Makefile 2014-08-31 13:11:27 +05:30
Sunil Mohan Adapa
58d13e3ed8 Use Django dispatcher instead of CherryPy dispatcher
This commit is big because anything small breaks the code.

- Django dispatcher is based on regular expressions and does not need a tree structure
- Reduces a lot of unnecessary dependencies among modules
- Use Django sessions middlewear instead of CherryPy sessions
- Introduce dependency based modules instead of numeric load order
- Remove PagePlugin and simply use Django views
- Eliminate page rendering wrappers in favor of Django context processors
- Use custom auth for now until replaced by Django auth middlewear
- Use Django templated 404 and 500 error pages
2014-06-12 23:33:25 +05:30
Sunil Mohan Adapa
f602865d05 Remove wrong dependency on libpython2.7
python2.7 is what we should depend on. libpython2.7-stdlib a dependency
for python2.7 contains all the standard libraries. libpython2.7, I believe, is 
required only for using python modules written in C.
2014-05-13 12:38:13 +05:30
Sunil Mohan Adapa
defcb43883 Use json instead of simplejson library to avoid extra depedency
Simplejson is an externally mainainted version of json library available in
Python 2.6 and up. It supports Python 2.5 which were are not targetting.
It also boasts better speed which is not at all a factor for us.
2014-05-13 12:28:39 +05:30
Sunil Mohan Adapa
be842a5baa Remove dependency on unused augeas
We can introduce it later again when it actually being used.
2014-05-13 12:13:54 +05:30
Sunil Mohan Adapa
faeb0b6be0 Remove unused dependency bjsonrpc 2014-05-13 12:06:15 +05:30
Sunil Mohan Adapa
11e7dcdd07 Remove unused make steps for custom minifing CSS 2014-05-12 22:06:37 +05:30
Sunil Mohan Adapa
368e21c085 Remove bootstrap CSS files and use debian package instead
- Add depedency on libjs-twitter-bootstrap
2014-05-12 18:46:39 +05:30
Sunil Mohan Adapa
f097047b8b Introduce python-bootstrapform as dependency
Twitter Bootstrap provides good styling for forms. Our current
theme does not ouput forms in bootstrap styles although for
everything else, it does. The python-bootstrap from is a simple
Django helper application to render Django forms into bootstrap
theme.

Django forms themselves provide numerous advantages over the
current incomplete homegrown solution. It also has solutions for
problems such as CSRF attacks which the current application is
vulnerable to.
2014-05-11 10:41:34 +05:30
Sunil Mohan Adapa
ee77f107ea Remove cheetah as a dependency 2014-05-04 16:10:27 +05:30
Sunil Mohan Adapa
7e16b74718 Remove steps for compiling templates 2014-05-04 16:07:48 +05:30
Nick Daly
9350052e59 Merge: Sunil's firewall branch. 2014-04-23 19:26:57 -05:00
Sunil Mohan Adapa
f77ceedc94 Make XMPP work with service framework
- This allows firewall to manage ports automatically
2014-04-18 12:55:32 +05:30
Sunil Mohan Adapa
0f8050d031 Add a framework for working with services
- Basic information about each service is available for consumers
- Information about whether service is enabled or disabled is available
- Interested parties may listen to enabling/disabling of a service
- Information about some core services are made available
2014-04-18 12:50:14 +05:30
Sunil Mohan Adapa
77ac199348 Remove dependency on improperly used and unmaintained contract module
- contract module has not see a release since 2010
- Corresponding PEP has been deferred
- python-contract module in Debian is orphaned
- We are only using contract module in one method of one module
- That can be replaced with one line of check instead of depending on an
  entire module
- The code using contract module does not work
- There is already replacement one line code that is actually working
2014-04-05 10:10:22 +05:30
Nick Daly
e30a9b6a27 Merge pull request #63 from jvalleroy/split-apache-config
Split apache conf into 2 files, one for HTTP and one for SSL.
2014-03-25 03:05:05 +00:00
James Valleroy
f178b74055 Split apache conf into 2 files, one for HTTP and one for SSL. 2014-03-24 07:19:57 -04:00
Sunil Mohan Adapa
e49aa3df43 Add python-contract as dependency 2014-03-22 12:56:12 +05:30
Sunil Mohan Adapa
0d79d58b1d Add python-passlib as dependency 2014-03-22 12:52:24 +05:30
Nick Daly
4d5d93678b Require python-bcrypt as a build-from-source dependency. 2013-12-08 11:39:37 -06:00
Nick Daly
51e3af611b Moved Apache configuration to Plinth setup script.
James added the Apache Headers module to the makefile, but not the
FreedomBox-Setup configuration script.  However, it's ridiculous to
have multiple locations for that same logic, so now the makefile uses
the setup script for the Apache configuration instead.

Also, the modules are now fancy and alphabetized.
2013-12-08 11:37:15 -06:00
James Valleroy
96310b4366 Use HSTS in apache conf. Fixes #47. 2013-11-28 00:52:18 +00:00
James Valleroy
31ffed9323 Remove users database and folder. The user db will be generated in firstboot. 2013-11-20 20:45:17 -05:00
Nick Daly
e3f1297711 Unify git.sample.config and git.sample.fhs.config.
There's no point to having two copies of what's essentially the same
file.  In the long term, this means the distributions will need to
patch out cfg.py directories instead of plinth.sample.fhs.config.  So,
if diff plinth.sample.config plinth.sample.fhs.config reveals
anything relevant, put that in your patch.
2013-10-30 22:05:29 -05:00
Petter Reinholdtsen
6e1d144706 Add freedombox-setup script for plinth.
This allow us to handle all plinth setup in one package.
2013-10-19 09:05:36 +02:00
Nick Daly
025c2aebc1 Forgot an Apache module: proxy_http.
Without this module, Apache doesn't know how to proxy HTTP requests.
2013-10-18 17:03:27 -05:00
Nick Daly
ee5609a2e3 Configure Apache correctly when installing Plinth.
Apache configuration was missing a few modules, and the server needs
to be restarted after those modules are enabled.  Also, the server
needs to be reloaded after the Plinth site is enabled.
2013-10-18 16:52:40 -05:00
Petter Reinholdtsen
80f39c545e Fix install path and target for share/apache2/plinth.conf. 2013-10-07 09:09:12 +02:00
Petter Reinholdtsen
7c5cec57b4 Make sure 'make all' do not need privileges, and 'make install'
do not try to change stuff outside $(DESTDIR).  This make
sure debian packaging is possible.
2013-10-07 09:00:26 +02:00
Nick Daly
a9c853e5bd Merged with upstream. 2013-10-06 21:21:43 -05:00
Nick Daly
04d9abfba6 Updated Makefile to reflect Apache config changes. 2013-10-06 21:17:18 -05:00
Nick Daly
5de7ecc99b Configure Apache by default. 2013-10-05 14:54:53 -05:00
James Valleroy
4048e77738 Fixes for plinth.config when run from source folder. 2013-09-28 18:04:53 -04:00
Nick Daly
6c988755ac Merge pull request #30 from petterreinholdtsen/do-not-clean-vendor-destdir
Avoid removing vendor and $(DESTDIR).
2013-09-28 10:49:16 -07:00
Petter Reinholdtsen
55bf19865a Avoid removing vendor and $(DESTDIR).
The vendor/ directory contain source used during build, and
$(DESTDIR) might point to /usr/.  Neither should be removed
in the clean target.
2013-09-25 11:23:51 +02:00
Petter Reinholdtsen
444365ec78 Rewrite plinth to use sudo and action scripts instead of exmachina for privileged accesss. 2013-09-23 09:37:24 +02:00
Nick Daly
c99f074f22 Use ExMachina already in Plinth/vendor. 2013-09-15 21:55:23 -05:00
Nick Daly
87753531d2 Reverted change 657068b0. 2013-09-15 21:47:18 -05:00
Petter Reinholdtsen
6409552e70 Fix exmachine import. 2013-09-12 12:58:39 +02:00
Petter Reinholdtsen
657068b026 Import exmachina into plint, using source from Tom Galloway. 2013-09-12 11:05:08 +02:00
Nick Daly
ec9a457e3e Merged: tzafrir's novendor patch.
Author: Tzafrir Cohen <tzafrir@debian.org>
Description: "vendor" packages are installed as separate system debs
2013-09-08 17:34:53 -05:00
Nick Daly
a97061055c Merged: tzafrir's install_dir patch.
Author: Tzafrir Cohen <tzafrir@debian.org>
Description: These things are easier to install with dh

* Python modules: fighting with dh_python2 is tough
  (it changes the /etc/ symlink, for isntance)
* Let's just install man pages ourselves for now.
* symlinks: with dh_link
2013-09-08 17:31:27 -05:00
Nick Daly
ce0d6a57e3 Included missing dependencies. 2013-09-08 15:07:18 -05:00
Nick Daly
3ab7d05bf3 Add hosting and auto-archive-creation.
The makefile has three new targets:

1. hosting: Publish repository and automagically build the archives to
   serve to clients.

2. current-checkout.tar.gz: Create an archive of the current project
   directory.

3. current-repository.tar.gz: Create an archive of the current project
   directory along with the source repository metadata so that the
   archive is a full checkout of the project.
2013-04-23 21:44:09 -05:00