public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: www-apps/whoogle-search/files/, www-apps/whoogle-search/
@ 2023-09-02  7:28 Bailey Kasin
  0 siblings, 0 replies; 4+ messages in thread
From: Bailey Kasin @ 2023-09-02  7:28 UTC (permalink / raw
  To: gentoo-commits

commit:     81c07fdabbd04cafc98c66a6003ecb9156eff08d
Author:     Bailey Kasin <baileykasin <AT> gmail <DOT> com>
AuthorDate: Sat Sep  2 07:16:10 2023 +0000
Commit:     Bailey Kasin <baileykasin <AT> gmail <DOT> com>
CommitDate: Sat Sep  2 07:16:10 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=81c07fda

www-apps/whoogle-search: new package, add 0.8.3

Signed-off-by: Bailey Kasin <baileykasin <AT> gmail.com>

 www-apps/whoogle-search/Manifest                   |  1 +
 www-apps/whoogle-search/files/whoogle              |  2 +
 www-apps/whoogle-search/files/whoogle.conf         |  1 +
 www-apps/whoogle-search/files/whoogle.service      | 18 +++++++++
 www-apps/whoogle-search/metadata.xml               |  8 ++++
 .../whoogle-search/whoogle-search-0.8.3.ebuild     | 47 ++++++++++++++++++++++
 6 files changed, 77 insertions(+)

diff --git a/www-apps/whoogle-search/Manifest b/www-apps/whoogle-search/Manifest
new file mode 100644
index 0000000000..08e76ab42b
--- /dev/null
+++ b/www-apps/whoogle-search/Manifest
@@ -0,0 +1 @@
+DIST v0.8.3.tar.gz 612951 BLAKE2B b413727cd3bf43646b4754fd7d3d55009ca7dff7601e4c28910347427719aa541da7cab544dcb6ff7f5fab8134e50a484790a5e8c46a06ac723b45eb39980bab SHA512 ea795435809d7b0e5c7860716ed05dfdc1e38b73fcbc6e4c482367cb03d2a84db48e619fb82520e3ef3041971ca9f35f0641b61a13dc4a68c9c38d9699c4182a

diff --git a/www-apps/whoogle-search/files/whoogle b/www-apps/whoogle-search/files/whoogle
new file mode 100644
index 0000000000..948dd3d407
--- /dev/null
+++ b/www-apps/whoogle-search/files/whoogle
@@ -0,0 +1,2 @@
+BIND_ADDRESS=127.0.0.1
+LISTEN_PORT=5000
\ No newline at end of file

diff --git a/www-apps/whoogle-search/files/whoogle.conf b/www-apps/whoogle-search/files/whoogle.conf
new file mode 100644
index 0000000000..bdd57113d4
--- /dev/null
+++ b/www-apps/whoogle-search/files/whoogle.conf
@@ -0,0 +1 @@
+u whoogle - "Whoogle" /opt/whoogle-search
\ No newline at end of file

diff --git a/www-apps/whoogle-search/files/whoogle.service b/www-apps/whoogle-search/files/whoogle.service
new file mode 100644
index 0000000000..950becae8c
--- /dev/null
+++ b/www-apps/whoogle-search/files/whoogle.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=Whoogle
+After=network-online.target
+Wants=network-online.target
+
+[Service]
+Type=simple
+User=whoogle
+WorkingDirectory=/opt/whoogle-search
+EnvironmentFile=/etc/default/whoogle
+ExecStart=/opt/whoogle-search/run
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=always
+RestartSec=3
+SyslogIdentifier=whoogle
+
+[Install]
+WantedBy=multi-user.target
\ No newline at end of file

diff --git a/www-apps/whoogle-search/metadata.xml b/www-apps/whoogle-search/metadata.xml
new file mode 100644
index 0000000000..b3a874ebe3
--- /dev/null
+++ b/www-apps/whoogle-search/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>baileykasin@gmail.com</email>
+		<name>Bailey Kasin</name>
+	</maintainer>
+</pkgmetadata>

diff --git a/www-apps/whoogle-search/whoogle-search-0.8.3.ebuild b/www-apps/whoogle-search/whoogle-search-0.8.3.ebuild
new file mode 100644
index 0000000000..3ee914a883
--- /dev/null
+++ b/www-apps/whoogle-search/whoogle-search-0.8.3.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=no
+PYTHON_COMPAT=( python3_{10..12} )
+inherit distutils-r1 systemd
+
+DESCRIPTION="A self-hosted, ad-free, privacy-respecting metasearch engine"
+HOMEPAGE="https://github.com/benbusby/whoogle-search"
+SRC_URI="https://github.com/benbusby/whoogle-search/archive/refs/tags/v${PV}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+		dev-python/cssutils[${PYTHON_USEDEP}]
+		dev-python/beautifulsoup4[${PYTHON_USEDEP}]
+		dev-python/cryptography[${PYTHON_USEDEP}]
+		dev-python/flask[${PYTHON_USEDEP}]
+        dev-python/python-dotenv[${PYTHON_USEDEP}]
+		dev-python/defusedxml[${PYTHON_USEDEP}]
+		dev-python/waitress[${PYTHON_USEDEP}]
+        app-arch/brotli[${PYTHON_USEDEP},python]
+        net-libs/stem
+        acct-user/whoogle
+        acct-group/whoogle
+"
+
+
+src_install() {
+    rm -r .github docs test .dockerignore .gitignore .replit docker-compose.yml Dockerfile heroku.yml MANIFEST.in README.md requirements.txt
+    mkdir -p "${ED}/opt/whoogle-search" || die
+    insinto /opt/whoogle-search
+    doins -r ./*
+    fperms -R 0755 /opt/whoogle-search
+	fowners -R whoogle:whoogle /opt/whoogle-search
+
+    insinto /etc/default/
+    doins ${FILESDIR}/whoogle
+    insinto /usr/lib/sysusers.d/
+    doins ${FILESDIR}/whoogle.conf
+
+    systemd_dounit ${FILESDIR}/whoogle.service
+}
\ No newline at end of file


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: www-apps/whoogle-search/files/, www-apps/whoogle-search/
@ 2023-11-08  5:36 Benoît Dufour
  0 siblings, 0 replies; 4+ messages in thread
From: Benoît Dufour @ 2023-11-08  5:36 UTC (permalink / raw
  To: gentoo-commits

commit:     6b3df210e63e52967ad07750ab19a7da6a55c4d9
Author:     Benoît Dufour <benoit.dufour <AT> mail <DOT> com>
AuthorDate: Wed Nov  8 05:30:49 2023 +0000
Commit:     Benoît Dufour <benoit.dufour <AT> mail <DOT> com>
CommitDate: Wed Nov  8 05:30:49 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=6b3df210

www-apps/whoogle-search: Adds an initd file for OpenRC. Git Gud SystemD.

Signed-off-by: Benoît Dufour <benoit.dufour <AT> mail.com>

 www-apps/whoogle-search/files/whoogle.initd        | 22 ++++++++++++++++++++++
 ...0.8.3.ebuild => whoogle-search-0.8.3-r1.ebuild} |  1 +
 ...0.8.4.ebuild => whoogle-search-0.8.4-r1.ebuild} |  1 +
 3 files changed, 24 insertions(+)

diff --git a/www-apps/whoogle-search/files/whoogle.initd b/www-apps/whoogle-search/files/whoogle.initd
new file mode 100644
index 0000000000..7695e805bd
--- /dev/null
+++ b/www-apps/whoogle-search/files/whoogle.initd
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name="Whoogle Search"
+description="A self-hosted, ad-free, privacy-respecting metasearch engine"
+command="/opt/whoogle-search/run"
+command_user="whoogle:whoogle"
+command_background=1
+pidfile="/run/whoogle.pid"
+output_log="/var/log/whoogle.log"
+error_log="${output_log}"
+
+depend() {
+	use logger net
+}
+
+start_pre() {
+	checkpath -fo whoogle:whoogle "/var/log/whoogle.log"
+	source "/etc/default/whoogle"
+}
+

diff --git a/www-apps/whoogle-search/whoogle-search-0.8.3.ebuild b/www-apps/whoogle-search/whoogle-search-0.8.3-r1.ebuild
similarity index 96%
rename from www-apps/whoogle-search/whoogle-search-0.8.3.ebuild
rename to www-apps/whoogle-search/whoogle-search-0.8.3-r1.ebuild
index 3ee914a883..61b960703a 100644
--- a/www-apps/whoogle-search/whoogle-search-0.8.3.ebuild
+++ b/www-apps/whoogle-search/whoogle-search-0.8.3-r1.ebuild
@@ -43,5 +43,6 @@ src_install() {
     insinto /usr/lib/sysusers.d/
     doins ${FILESDIR}/whoogle.conf
 
+    newinitd "${FILESDIR}"/whoogle.initd whoogle
     systemd_dounit ${FILESDIR}/whoogle.service
 }
\ No newline at end of file

diff --git a/www-apps/whoogle-search/whoogle-search-0.8.4.ebuild b/www-apps/whoogle-search/whoogle-search-0.8.4-r1.ebuild
similarity index 96%
rename from www-apps/whoogle-search/whoogle-search-0.8.4.ebuild
rename to www-apps/whoogle-search/whoogle-search-0.8.4-r1.ebuild
index c419bbdc77..40c26760ef 100644
--- a/www-apps/whoogle-search/whoogle-search-0.8.4.ebuild
+++ b/www-apps/whoogle-search/whoogle-search-0.8.4-r1.ebuild
@@ -44,5 +44,6 @@ src_install() {
     insinto /usr/lib/sysusers.d/
     doins ${FILESDIR}/whoogle.conf
 
+    newinitd "${FILESDIR}"/whoogle.initd whoogle
     systemd_dounit ${FILESDIR}/whoogle.service
 }


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: www-apps/whoogle-search/files/, www-apps/whoogle-search/
@ 2023-11-09 17:50 Benoît Dufour
  0 siblings, 0 replies; 4+ messages in thread
From: Benoît Dufour @ 2023-11-09 17:50 UTC (permalink / raw
  To: gentoo-commits

commit:     0202a52755e64db7c6caae8b6a15feb52bf3b8e1
Author:     Benoît Dufour <benoit.dufour <AT> mail <DOT> com>
AuthorDate: Thu Nov  9 17:48:15 2023 +0000
Commit:     Benoît Dufour <benoit.dufour <AT> mail <DOT> com>
CommitDate: Thu Nov  9 17:49:44 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0202a527

www-apps/whoogle-search: Fix the OpenRC init.d file.

Signed-off-by: Benoît Dufour <benoit.dufour <AT> mail.com>

 www-apps/whoogle-search/files/whoogle.initd                 | 13 ++++++++++++-
 ...earch-0.8.3-r1.ebuild => whoogle-search-0.8.3-r2.ebuild} |  0
 ...earch-0.8.4-r1.ebuild => whoogle-search-0.8.4-r2.ebuild} |  0
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/www-apps/whoogle-search/files/whoogle.initd b/www-apps/whoogle-search/files/whoogle.initd
index 7695e805bd..6d51df4ab2 100644
--- a/www-apps/whoogle-search/files/whoogle.initd
+++ b/www-apps/whoogle-search/files/whoogle.initd
@@ -2,6 +2,11 @@
 # Copyright 2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+# Environment variables for whoogle
+source "/etc/default/whoogle"
+export ADDRESS=${BIND_ADDRESS:-0.0.0.0}
+export PORT=${LISTEN_PORT:-5000}
+
 name="Whoogle Search"
 description="A self-hosted, ad-free, privacy-respecting metasearch engine"
 command="/opt/whoogle-search/run"
@@ -17,6 +22,12 @@ depend() {
 
 start_pre() {
 	checkpath -fo whoogle:whoogle "/var/log/whoogle.log"
-	source "/etc/default/whoogle"
+	echo "Whoogle is running on: ${BIND_ADDRESS}:${LISTEN_PORT}"
+	cd /opt/whoogle-search
 }
 
+stop_post() {
+	# whoogle doesn't get killed by stop so it needs to be done manually
+	whoogle_pid="$(ps aux | grep -i "/usr/lib/python-exec/python3.11/python3 -um app" | grep -v 'grep' | cut -d ' ' -f 3-4 | xargs)"
+	kill "${whoogle_pid}"
+}

diff --git a/www-apps/whoogle-search/whoogle-search-0.8.3-r1.ebuild b/www-apps/whoogle-search/whoogle-search-0.8.3-r2.ebuild
similarity index 100%
rename from www-apps/whoogle-search/whoogle-search-0.8.3-r1.ebuild
rename to www-apps/whoogle-search/whoogle-search-0.8.3-r2.ebuild

diff --git a/www-apps/whoogle-search/whoogle-search-0.8.4-r1.ebuild b/www-apps/whoogle-search/whoogle-search-0.8.4-r2.ebuild
similarity index 100%
rename from www-apps/whoogle-search/whoogle-search-0.8.4-r1.ebuild
rename to www-apps/whoogle-search/whoogle-search-0.8.4-r2.ebuild


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: www-apps/whoogle-search/files/, www-apps/whoogle-search/
@ 2023-11-11  6:58 Bailey Kasin
  0 siblings, 0 replies; 4+ messages in thread
From: Bailey Kasin @ 2023-11-11  6:58 UTC (permalink / raw
  To: gentoo-commits

commit:     ecdc853e589dcc7a3b7d71c1d9103fa0ca3e6b34
Author:     Bailey Kasin <baileykasin <AT> gmail <DOT> com>
AuthorDate: Sat Nov 11 06:55:49 2023 +0000
Commit:     Bailey Kasin <baileykasin <AT> gmail <DOT> com>
CommitDate: Sat Nov 11 06:56:51 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ecdc853e

www-apps/whoogle-search: POSIX-ify openrc script

Also resolve shellcheck and pkgcheck comments

Closes: https://bugs.gentoo.org/917079
Signed-off-by: Bailey Kasin <baileykasin <AT> gmail.com>

 www-apps/whoogle-search/files/whoogle.initd        |  4 +--
 www-apps/whoogle-search/metadata.xml               |  3 ++
 ....3-r2.ebuild => whoogle-search-0.8.3-r3.ebuild} | 37 +++++++++++-----------
 ....4-r2.ebuild => whoogle-search-0.8.4-r3.ebuild} | 35 ++++++++++----------
 4 files changed, 42 insertions(+), 37 deletions(-)

diff --git a/www-apps/whoogle-search/files/whoogle.initd b/www-apps/whoogle-search/files/whoogle.initd
index 6d51df4ab2..745dceb671 100644
--- a/www-apps/whoogle-search/files/whoogle.initd
+++ b/www-apps/whoogle-search/files/whoogle.initd
@@ -3,7 +3,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 # Environment variables for whoogle
-source "/etc/default/whoogle"
+. "/etc/default/whoogle"
 export ADDRESS=${BIND_ADDRESS:-0.0.0.0}
 export PORT=${LISTEN_PORT:-5000}
 
@@ -23,7 +23,7 @@ depend() {
 start_pre() {
 	checkpath -fo whoogle:whoogle "/var/log/whoogle.log"
 	echo "Whoogle is running on: ${BIND_ADDRESS}:${LISTEN_PORT}"
-	cd /opt/whoogle-search
+	cd /opt/whoogle-search || exit 1
 }
 
 stop_post() {

diff --git a/www-apps/whoogle-search/metadata.xml b/www-apps/whoogle-search/metadata.xml
index b3a874ebe3..9cdaa89567 100644
--- a/www-apps/whoogle-search/metadata.xml
+++ b/www-apps/whoogle-search/metadata.xml
@@ -5,4 +5,7 @@
 		<email>baileykasin@gmail.com</email>
 		<name>Bailey Kasin</name>
 	</maintainer>
+	<upstream>
+		<remote-id type="github">benbusby/whoogle-search</remote-id>
+	</upstream>
 </pkgmetadata>

diff --git a/www-apps/whoogle-search/whoogle-search-0.8.3-r2.ebuild b/www-apps/whoogle-search/whoogle-search-0.8.3-r3.ebuild
similarity index 54%
rename from www-apps/whoogle-search/whoogle-search-0.8.3-r2.ebuild
rename to www-apps/whoogle-search/whoogle-search-0.8.3-r3.ebuild
index 61b960703a..7cbca25768 100644
--- a/www-apps/whoogle-search/whoogle-search-0.8.3-r2.ebuild
+++ b/www-apps/whoogle-search/whoogle-search-0.8.3-r3.ebuild
@@ -20,29 +20,30 @@ RDEPEND="
 		dev-python/beautifulsoup4[${PYTHON_USEDEP}]
 		dev-python/cryptography[${PYTHON_USEDEP}]
 		dev-python/flask[${PYTHON_USEDEP}]
-        dev-python/python-dotenv[${PYTHON_USEDEP}]
+		dev-python/python-dotenv[${PYTHON_USEDEP}]
 		dev-python/defusedxml[${PYTHON_USEDEP}]
 		dev-python/waitress[${PYTHON_USEDEP}]
-        app-arch/brotli[${PYTHON_USEDEP},python]
-        net-libs/stem
-        acct-user/whoogle
-        acct-group/whoogle
+		app-arch/brotli[${PYTHON_USEDEP},python]
+		net-libs/stem
+		acct-user/whoogle
+		acct-group/whoogle
 "
 
-
 src_install() {
-    rm -r .github docs test .dockerignore .gitignore .replit docker-compose.yml Dockerfile heroku.yml MANIFEST.in README.md requirements.txt
-    mkdir -p "${ED}/opt/whoogle-search" || die
-    insinto /opt/whoogle-search
-    doins -r ./*
-    fperms -R 0755 /opt/whoogle-search
+	rm -r .github docs test .dockerignore .gitignore .replit \
+		docker-compose.yml Dockerfile heroku.yml MANIFEST.in README.md \
+		requirements.txt
+	mkdir -p "${ED}/opt/whoogle-search" || die
+	insinto /opt/whoogle-search
+	doins -r ./*
+	fperms -R 0755 /opt/whoogle-search
 	fowners -R whoogle:whoogle /opt/whoogle-search
 
-    insinto /etc/default/
-    doins ${FILESDIR}/whoogle
-    insinto /usr/lib/sysusers.d/
-    doins ${FILESDIR}/whoogle.conf
+	insinto /etc/default/
+	doins "${FILESDIR}/whoogle"
+	insinto /usr/lib/sysusers.d/
+	doins "${FILESDIR}/whoogle.conf"
 
-    newinitd "${FILESDIR}"/whoogle.initd whoogle
-    systemd_dounit ${FILESDIR}/whoogle.service
-}
\ No newline at end of file
+	newinitd "${FILESDIR}"/whoogle.initd whoogle
+	systemd_dounit "${FILESDIR}/whoogle.service"
+}

diff --git a/www-apps/whoogle-search/whoogle-search-0.8.4-r2.ebuild b/www-apps/whoogle-search/whoogle-search-0.8.4-r3.ebuild
similarity index 55%
rename from www-apps/whoogle-search/whoogle-search-0.8.4-r2.ebuild
rename to www-apps/whoogle-search/whoogle-search-0.8.4-r3.ebuild
index 40c26760ef..73c7650736 100644
--- a/www-apps/whoogle-search/whoogle-search-0.8.4-r2.ebuild
+++ b/www-apps/whoogle-search/whoogle-search-0.8.4-r3.ebuild
@@ -20,30 +20,31 @@ RDEPEND="
 		dev-python/beautifulsoup4[${PYTHON_USEDEP}]
 		dev-python/cryptography[${PYTHON_USEDEP}]
 		dev-python/flask[${PYTHON_USEDEP}]
-        dev-python/python-dotenv[${PYTHON_USEDEP}]
+		dev-python/python-dotenv[${PYTHON_USEDEP}]
 		dev-python/defusedxml[${PYTHON_USEDEP}]
 		dev-python/waitress[${PYTHON_USEDEP}]
 		dev-python/validators[${PYTHON_USEDEP}]
-        app-arch/brotli[${PYTHON_USEDEP},python]
-        net-libs/stem
-        acct-user/whoogle
-        acct-group/whoogle
+		app-arch/brotli[${PYTHON_USEDEP},python]
+		net-libs/stem
+		acct-user/whoogle
+		acct-group/whoogle
 "
 
-
 src_install() {
-    rm -r .github docs test .dockerignore .gitignore .replit docker-compose.yml Dockerfile heroku.yml MANIFEST.in README.md requirements.txt
-    mkdir -p "${ED}/opt/whoogle-search" || die
-    insinto /opt/whoogle-search
-    doins -r ./*
-    fperms -R 0755 /opt/whoogle-search
+	rm -r .github docs test .dockerignore .gitignore .replit \
+		docker-compose.yml Dockerfile heroku.yml MANIFEST.in README.md \
+		requirements.txt
+	mkdir -p "${ED}/opt/whoogle-search" || die
+	insinto /opt/whoogle-search
+	doins -r ./*
+	fperms -R 0755 /opt/whoogle-search
 	fowners -R whoogle:whoogle /opt/whoogle-search
 
-    insinto /etc/default/
-    doins ${FILESDIR}/whoogle
-    insinto /usr/lib/sysusers.d/
-    doins ${FILESDIR}/whoogle.conf
+	insinto /etc/default/
+	doins "${FILESDIR}/whoogle"
+	insinto /usr/lib/sysusers.d/
+	doins "${FILESDIR}/whoogle.conf"
 
-    newinitd "${FILESDIR}"/whoogle.initd whoogle
-    systemd_dounit ${FILESDIR}/whoogle.service
+	newinitd "${FILESDIR}"/whoogle.initd whoogle
+	systemd_dounit "${FILESDIR}/whoogle.service"
 }


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-11-11  6:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-11  6:58 [gentoo-commits] repo/proj/guru:dev commit in: www-apps/whoogle-search/files/, www-apps/whoogle-search/ Bailey Kasin
  -- strict thread matches above, loose matches on Subject: below --
2023-11-09 17:50 Benoît Dufour
2023-11-08  5:36 Benoît Dufour
2023-09-02  7:28 Bailey Kasin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox