summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schauer Marin Rodrigues <josch@debian.org>2021-12-09 13:18:19 +0100
committerJohannes Schauer Marin Rodrigues <josch@debian.org>2021-12-09 18:20:06 +0100
commitc1bdb2fd300eba0f0b99cbbda8de7c42f517b9f3 (patch)
tree5ac00a86e46c40ef4f9515659e08c2205ca91abf
parentf42d65e930f249b2924e51716416c57e5f6e835f (diff)
add apache2 autopkgtest
-rw-r--r--debian/changelog6
-rw-r--r--debian/control3
-rw-r--r--debian/examples/apache2/sites-available/searx.conf5
-rw-r--r--debian/searx.examples1
-rw-r--r--debian/tests/apache224
-rw-r--r--debian/tests/control6
-rw-r--r--debian/tests/nginx (renamed from debian/tests/general)0
7 files changed, 43 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 9e95193..ca4cb49 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+searx (1.0.0+dfsg1-2) UNRELEASED; urgency=medium
+
+ * add apache2 autopkgtest
+
+ -- Johannes Schauer Marin Rodrigues <josch@debian.org> Thu, 09 Dec 2021 13:18:29 +0100
+
searx (1.0.0+dfsg1-1) unstable; urgency=medium
[ Johannes Schauer Marin Rodrigues ]
diff --git a/debian/control b/debian/control
index 2c0550e..af64eef 100644
--- a/debian/control
+++ b/debian/control
@@ -42,7 +42,8 @@ Depends:
Suggests:
nginx | apache2 | httpd,
uwsgi,
- uwsgi-plugin-python3
+ uwsgi-plugin-python3,
+ libapache2-mod-uwsgi
Section: python
Description: Privacy-respecting metasearch engine - library package
Searx is an internet metasearch engine which aggregates results from more than
diff --git a/debian/examples/apache2/sites-available/searx.conf b/debian/examples/apache2/sites-available/searx.conf
new file mode 100644
index 0000000..6b61985
--- /dev/null
+++ b/debian/examples/apache2/sites-available/searx.conf
@@ -0,0 +1,5 @@
+<Location /searx>
+ SetHandler uwsgi-handler
+ ProxyPreserveHost On
+ uWSGISocket /run/uwsgi/app/searx/socket
+</Location>
diff --git a/debian/searx.examples b/debian/searx.examples
index 2fedfe1..e0c43c7 100644
--- a/debian/searx.examples
+++ b/debian/searx.examples
@@ -1,3 +1,4 @@
debian/examples/nginx
+debian/examples/apache2
debian/examples/uwsgi
searx/settings.yml
diff --git a/debian/tests/apache2 b/debian/tests/apache2
new file mode 100644
index 0000000..37ea62e
--- /dev/null
+++ b/debian/tests/apache2
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+set -ex
+
+rm /etc/apache2/sites-enabled/000-default.conf
+cp /usr/share/doc/searx/examples/apache2/sites-available/searx.conf /etc/apache2/sites-available/
+ln -s ../sites-available/searx.conf /etc/apache2/sites-enabled/searx.conf
+a2enmod proxy
+a2enmod proxy_uwsgi
+a2enmod uwsgi
+
+cp /usr/share/doc/searx/examples/uwsgi/apps-available/searx.ini /etc/uwsgi/apps-available
+ln -s ../apps-available/searx.ini /etc/uwsgi/apps-enabled/searx.ini
+mkdir /etc/searx
+cp /usr/share/doc/searx/examples/settings.yml /etc/searx/settings.yml
+sed -i -e "s/ultrasecretkey/$(openssl rand -hex 16)/g" /etc/searx/settings.yml
+systemctl restart apache2
+systemctl restart uwsgi
+sleep 5
+systemctl status apache2
+systemctl status uwsgi
+cat /var/log/uwsgi/app/searx.log
+curl http://localhost/searx/
+curl http://localhost/searx/ | grep '<input type="search".* name="q"'
diff --git a/debian/tests/control b/debian/tests/control
index dbabf19..be344e9 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,3 +1,7 @@
-Tests: general
+Tests: nginx
Restrictions: allow-stderr, isolation-container, needs-root
Depends: @, curl, nginx, uwsgi, uwsgi-plugin-python3
+
+Tests: apache2
+Restrictions: allow-stderr, isolation-container, needs-root
+Depends: @, curl, apache2, libapache2-mod-uwsgi, uwsgi, uwsgi-plugin-python3
diff --git a/debian/tests/general b/debian/tests/nginx
index df20ec3..df20ec3 100644
--- a/debian/tests/general
+++ b/debian/tests/nginx