From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1295353-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id DC2131382C5
	for <garchives@archives.gentoo.org>; Sun, 20 Jun 2021 09:20:48 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 19AFEE0802;
	Sun, 20 Jun 2021 09:20:48 +0000 (UTC)
Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id E56F6E0802
	for <gentoo-commits@lists.gentoo.org>; Sun, 20 Jun 2021 09:20:47 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 8C2AA335CD8
	for <gentoo-commits@lists.gentoo.org>; Sun, 20 Jun 2021 09:20:46 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id F32BB78E
	for <gentoo-commits@lists.gentoo.org>; Sun, 20 Jun 2021 09:20:44 +0000 (UTC)
From: "Alexandru Campeanu" <tiotags1@gmail.com>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Alexandru Campeanu" <tiotags1@gmail.com>
Message-ID: <1624180675.35e86e4fb59120ffeeb37a17fbf9bcfffcf5f62e.tiotags1@gentoo>
Subject: [gentoo-commits] repo/proj/guru:dev commit in: www-servers/hinsightd/files/, www-servers/hinsightd/
X-VCS-Repository: repo/proj/guru
X-VCS-Files: www-servers/hinsightd/Manifest www-servers/hinsightd/files/hinsightd-defines-v3.patch www-servers/hinsightd/files/initd-v1.sh www-servers/hinsightd/hinsightd-0.9.5.ebuild www-servers/hinsightd/hinsightd-9999.ebuild
X-VCS-Directories: www-servers/hinsightd/files/ www-servers/hinsightd/
X-VCS-Committer: tiotags1
X-VCS-Committer-Name: Alexandru Campeanu
X-VCS-Revision: 35e86e4fb59120ffeeb37a17fbf9bcfffcf5f62e
X-VCS-Branch: dev
Date: Sun, 20 Jun 2021 09:20:44 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: e8de552c-e9f0-48db-9496-d40c46a89a11
X-Archives-Hash: 9629628e0fe26d08216fe1d4f7b57817

commit:     35e86e4fb59120ffeeb37a17fbf9bcfffcf5f62e
Author:     tiotags <tiotags1 <AT> gmail <DOT> com>
AuthorDate: Sun Jun 20 09:17:24 2021 +0000
Commit:     Alexandru Campeanu <tiotags1 <AT> gmail <DOT> com>
CommitDate: Sun Jun 20 09:17:55 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=35e86e4f

www-servers/hinsightd: new version + changes

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Alexandru Campeanu <tiotags1 <AT> gmail.com>

 www-servers/hinsightd/Manifest                     |  1 +
 .../hinsightd/files/hinsightd-defines-v3.patch     | 21 +++++++++
 www-servers/hinsightd/files/initd-v1.sh            | 50 ++++++++++++++++++++++
 ...insightd-9999.ebuild => hinsightd-0.9.5.ebuild} | 10 ++---
 www-servers/hinsightd/hinsightd-9999.ebuild        | 10 ++---
 5 files changed, 82 insertions(+), 10 deletions(-)

diff --git a/www-servers/hinsightd/Manifest b/www-servers/hinsightd/Manifest
index 56ef7b385..9bad66830 100644
--- a/www-servers/hinsightd/Manifest
+++ b/www-servers/hinsightd/Manifest
@@ -1,2 +1,3 @@
 DIST hin9-v0.9.3.tar.gz 65343 BLAKE2B 4b475f8088aa113ae7dbd2cfe091ee10efb39d60b7277cb821eb010e752b39adf5e2a3c53aedc73c612ed4ba3d96178c09f255b9a07caf64b9cad34af2da5841 SHA512 768f0e55c2992b0ce50187a62e4c75ae2c2e2c31067d77898d221ad89afba20a3121853f01267bf6f1e43942ddca273bfed6c63849ce922c9c9d2c971a9061e0
 DIST hin9-v0.9.4.tar.gz 77019 BLAKE2B 7339b407ba60c740f51f47794bd5fa4b73c662c718841c8de10be53bc6bec53f5ba511e2f69859ef9312aa85a318f0feeab5088b839dcae1dd734951f52f87a4 SHA512 817ac692778b9b7d9b2b7dd82a0d92fa0303d875601d6b52ddd75bb470cab1c9ac39170a0a1f5737ec4d28849837a8b61bf34bc96481044fe9864932bcfdd6cf
+DIST hin9-v0.9.5.tar.gz 79621 BLAKE2B 2bf1fb03abf1d10d20bd47788e0d2eb39bc01be7fab867fb9b2ddb40e233cc0eed3e55cdfef84881c205de8d35da5bb9a4a56744a69e232b5f7baa6a5910c4a4 SHA512 8db159d95b008f3f4070844ba078f523f6159461c66ebe889e0a0af473e3a888cefa43eedc97c450b3a7bcc35079bfa4530cdcc8741da513a17e08ea896af1f5

diff --git a/www-servers/hinsightd/files/hinsightd-defines-v3.patch b/www-servers/hinsightd/files/hinsightd-defines-v3.patch
new file mode 100644
index 000000000..271481f1f
--- /dev/null
+++ b/www-servers/hinsightd/files/hinsightd-defines-v3.patch
@@ -0,0 +1,21 @@
+diff --git a/src/hin/conf.h b/src/hin/conf.h
+index 61db395..1eaaa14 100644
+--- a/src/hin/conf.h
++++ b/src/hin/conf.h
+@@ -2,11 +2,11 @@
+ #ifndef HIN_CONF_H
+ #define HIN_CONF_H
+ 
+-#define HIN_CONF_PATH "workdir/main.lua"
+-#define HIN_LOGDIR_PATH "workdir/logs/"
+-#define HIN_WORKDIR_PATH "./"
+-#define HIN_TEMP_PATH "/tmp/"
+-#define HIN_DEBUG_MASK 0xffffffff
++#define HIN_CONF_PATH "/etc/hinsightd/main.lua"
++#define HIN_LOGDIR_PATH "/var/log/hinsightd/"
++#define HIN_WORKDIR_PATH "/etc/hinsightd/"
++#define HIN_TEMP_PATH "/var/tmp/hinsightd/"
++#define HIN_DEBUG_MASK 0x27f0f
+ 
+ #define HIN_URING_QUEUE_DEPTH 256
+ #define HIN_URING_DONT_FORK 0

diff --git a/www-servers/hinsightd/files/initd-v1.sh b/www-servers/hinsightd/files/initd-v1.sh
new file mode 100644
index 000000000..c0c2da823
--- /dev/null
+++ b/www-servers/hinsightd/files/initd-v1.sh
@@ -0,0 +1,50 @@
+#!/sbin/openrc-run
+
+NAME=$RC_SVCNAME
+RUN_DIR=/var/run/$NAME
+LOG_DIR=/var/log/$NAME
+TMP_DIR=/var/tmp/$NAME
+CWD_DIR=/var/www/localhost
+PID_FILE=$RUN_DIR/$NAME.pid
+CFG_FILE=/etc/hinsightd/main.lua
+LOG_FILE=$LOG_DIR/hindsight.log
+
+RUN_FILE=/usr/sbin/hinsightd
+RUN_USER="hinsightd"
+
+extra_commands="checkconfig reload"
+
+command=$RUN_FILE
+command_args="--config $CFG_FILE --logdir $LOG_DIR --cwd $CWD_DIR --pidfile $PID_FILE --tmpdir $TMP_DIR --log $LOG_FILE"
+pidfile="$PID_FILE"
+command_args_background="--daemonize"
+command_user="$RUN_USER:$RUN_USER"
+
+depend() {
+  use net
+}
+
+checkconfig() {
+  start-stop-daemon --quiet --user $RUN_USER --start --exec $command -- --check $command_args
+}
+
+start_pre() {
+  checkpath --directory --owner $command_user --mode 06770 $LOG_DIR $TMP_DIR $RUN_DIR
+  checkconfig || return 1
+}
+
+reload() {
+  if ! service_started "${NAME}" ; then
+    eerror " * ERROR ${NAME} isn't running"
+    return 1
+  fi
+
+  checkconfig || return 1
+
+  echo " * Reloading ${NAME} ..."
+
+  start-stop-daemon --quiet --signal USR1 --pidfile ${PID_FILE}
+  eend $?
+}
+
+

diff --git a/www-servers/hinsightd/hinsightd-9999.ebuild b/www-servers/hinsightd/hinsightd-0.9.5.ebuild
similarity index 88%
copy from www-servers/hinsightd/hinsightd-9999.ebuild
copy to www-servers/hinsightd/hinsightd-0.9.5.ebuild
index f8d82a655..727392d53 100644
--- a/www-servers/hinsightd/hinsightd-9999.ebuild
+++ b/www-servers/hinsightd/hinsightd-0.9.5.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-LUA_COMPAT=( lua5-{1..4} )
+LUA_COMPAT=( lua5-{1..4} luajit )
 
 inherit fcaps lua-single systemd cmake linux-info
 
@@ -42,7 +42,7 @@ RDEPEND="
 DEPEND="${RDEPEND}"
 
 PATCHES=(
-	"${FILESDIR}/hinsightd-redefine-directories-v2.patch"
+	"${FILESDIR}/hinsightd-defines-v3.patch"
 )
 
 src_configure() {
@@ -53,8 +53,8 @@ src_configure() {
 }
 
 src_install() {
-	newbin "${BUILD_DIR}/hin9" $PN
-	newinitd "${FILESDIR}/init.d.sh" $PN
+	newsbin "${BUILD_DIR}/hin9" $PN
+	newinitd "${FILESDIR}/initd-v1.sh" $PN
 	systemd_dounit "${FILESDIR}/$PN.service" # not tested
 
 	# config
@@ -71,7 +71,7 @@ src_install() {
 }
 
 pkg_postinst() {
-	fcaps CAP_NET_BIND_SERVICE /usr/bin/$PN
+	fcaps CAP_NET_BIND_SERVICE /usr/sbin/$PN
 
 	if kernel_is lt 5 7; then
 		ewarn ""

diff --git a/www-servers/hinsightd/hinsightd-9999.ebuild b/www-servers/hinsightd/hinsightd-9999.ebuild
index f8d82a655..727392d53 100644
--- a/www-servers/hinsightd/hinsightd-9999.ebuild
+++ b/www-servers/hinsightd/hinsightd-9999.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-LUA_COMPAT=( lua5-{1..4} )
+LUA_COMPAT=( lua5-{1..4} luajit )
 
 inherit fcaps lua-single systemd cmake linux-info
 
@@ -42,7 +42,7 @@ RDEPEND="
 DEPEND="${RDEPEND}"
 
 PATCHES=(
-	"${FILESDIR}/hinsightd-redefine-directories-v2.patch"
+	"${FILESDIR}/hinsightd-defines-v3.patch"
 )
 
 src_configure() {
@@ -53,8 +53,8 @@ src_configure() {
 }
 
 src_install() {
-	newbin "${BUILD_DIR}/hin9" $PN
-	newinitd "${FILESDIR}/init.d.sh" $PN
+	newsbin "${BUILD_DIR}/hin9" $PN
+	newinitd "${FILESDIR}/initd-v1.sh" $PN
 	systemd_dounit "${FILESDIR}/$PN.service" # not tested
 
 	# config
@@ -71,7 +71,7 @@ src_install() {
 }
 
 pkg_postinst() {
-	fcaps CAP_NET_BIND_SERVICE /usr/bin/$PN
+	fcaps CAP_NET_BIND_SERVICE /usr/sbin/$PN
 
 	if kernel_is lt 5 7; then
 		ewarn ""