public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: www-servers/hinsightd/files/, www-servers/hinsightd/
@ 2021-04-17 19:24 Alexandru Campeanu
  0 siblings, 0 replies; 8+ messages in thread
From: Alexandru Campeanu @ 2021-04-17 19:24 UTC (permalink / raw
  To: gentoo-commits

commit:     c0abb42b17e62539099bd65adcf557839ece7c79
Author:     tiotags <tiotags1 <AT> gmail <DOT> com>
AuthorDate: Sat Apr 17 19:03:29 2021 +0000
Commit:     Alexandru Campeanu <tiotags1 <AT> gmail <DOT> com>
CommitDate: Sat Apr 17 19:22:37 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c0abb42b

www-servers/hinsightd: added hinsightd http server

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

 www-servers/hinsightd/files/gentoo.patch    | 28 +++++++++++++
 www-servers/hinsightd/files/init.d.sh       | 49 +++++++++++++++++++++++
 www-servers/hinsightd/hinsightd-9999.ebuild | 61 +++++++++++++++++++++++++++++
 www-servers/hinsightd/metadata.xml          | 11 ++++++
 4 files changed, 149 insertions(+)

diff --git a/www-servers/hinsightd/files/gentoo.patch b/www-servers/hinsightd/files/gentoo.patch
new file mode 100644
index 000000000..22925c1dc
--- /dev/null
+++ b/www-servers/hinsightd/files/gentoo.patch
@@ -0,0 +1,28 @@
+diff --git a/src/hin/conf.h b/src/hin/conf.h
+index c4f7f4c..29b9375 100644
+--- a/src/hin/conf.h
++++ b/src/hin/conf.h
+@@ -2,9 +2,9 @@
+ #ifndef HIN_CONF_H
+ #define HIN_CONF_H
+ 
+-#define HIN_CONF_PATH "workdir/main.lua"
+-#define HIN_LOGDIR_PATH "build/"
+-#define HIN_CWD_PATH "./"
++#define HIN_CONF_PATH "/etc/hinsightd/hinsightd.lua"
++#define HIN_LOGDIR_PATH "/var/log/hinsightd/"
++#define HIN_CWD_PATH "/var/www/localhost/"
+ 
+ #define HIN_URING_QUEUE_DEPTH 256
+ #define HIN_URING_DONT_FORK 0
+@@ -20,8 +20,8 @@
+ #define HIN_HTTPD_MAX_HEADER_LINE_SIZE 4096
+ #define HIN_HTTPD_MAX_POST_SIZE 4121440
+ #define HIN_HTTPD_MAX_DEFLATE_SIZE 0
+-#define HIN_HTTPD_POST_DIRECTORY "/tmp"
+-#define HIN_HTTPD_CACHE_DIRECTORY "/tmp"
++#define HIN_HTTPD_POST_DIRECTORY "/var/tmp/hinsightd"
++#define HIN_HTTPD_CACHE_DIRECTORY "/var/tmp/hinsightd"
+ #define HIN_HTTPD_CACHE_CLEAN_ON_EXIT 1
+ #define HIN_HTTPD_CACHE_TMPFILE 0
+ #define HIN_HTTPD_CACHE_MAX_SIZE 64 * 1024 * 1024

diff --git a/www-servers/hinsightd/files/init.d.sh b/www-servers/hinsightd/files/init.d.sh
new file mode 100755
index 000000000..9146de844
--- /dev/null
+++ b/www-servers/hinsightd/files/init.d.sh
@@ -0,0 +1,49 @@
+#!/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/$NAME.lua
+
+RUN_FILE=/usr/bin/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"
+pidfile="$PID_FILE"
+command_args_background="--daemonize"
+command_user="$RUN_USER:$RUN_USER"
+
+depend() {
+  use net
+}
+
+checkconfig() {
+  $command $command_args --pretend > /dev/null
+}
+
+start_pre() {
+  checkpath --directory --owner $command_user --mode 0770 $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-9999.ebuild
new file mode 100644
index 000000000..e76ea720c
--- /dev/null
+++ b/www-servers/hinsightd/hinsightd-9999.ebuild
@@ -0,0 +1,61 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( lua5-{1..4} )
+
+inherit git-r3 fcaps
+
+DESCRIPTION="hinsightd a http/1.1 webserver with (hopefully) minimal goals"
+HOMEPAGE="https://gitlab.com/tiotags/hin9"
+EGIT_REPO_URI="https://gitlab.com/tiotags/hin9.git"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS=""
+IUSE="" #+openssl
+
+RDEPEND="
+acct-user/hinsightd
+acct-group/hinsightd
+sys-libs/liburing
+dev-lang/lua:*
+sys-libs/zlib
+dev-libs/openssl
+"
+
+DEPEND="${RDEPEND}"
+
+BDEPEND="
+acct-user/hinsightd
+acct-group/hinsightd
+dev-util/ninja
+"
+
+PATCHES=(
+"${FILESDIR}/gentoo.patch"
+)
+
+#src_configure() {
+#}
+
+src_compile() {
+	cd build
+	ninja
+}
+
+src_install() {
+	newbin "${S}/build/hin9 hinsightd"
+	newinitd "${FILESDIR}/init.d.sh" hinsightd
+
+	insinto /etc/hinsightd
+	newins "${S}/workdir/main.lua" hinsightd.lua
+
+	keepdir /var/www/localhost/htdocs
+	keepdir /var/log/hinsightd
+	keepdir /var/tmp/hinsightd
+}
+
+pkg_postinst() {
+	fcaps CAP_NET_BIND_SERVICE /usr/bin/hinsightd
+}

diff --git a/www-servers/hinsightd/metadata.xml b/www-servers/hinsightd/metadata.xml
new file mode 100644
index 000000000..9b48d579b
--- /dev/null
+++ b/www-servers/hinsightd/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+        <!-- maintainer-needed -->
+        <longdescription lang="en">
+                hinsightd a http/1.1 webserver with (hopefully) minimal goals
+        </longdescription>
+        <use>
+                <!--<flag name="openssl">Enable tls encryption with openssl</flag>-->
+        </use>
+</pkgmetadata>


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

* [gentoo-commits] repo/proj/guru:dev commit in: www-servers/hinsightd/files/, www-servers/hinsightd/
  2021-04-17 20:00 [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan
@ 2021-04-17 20:00 ` Andrew Ammerlaan
  0 siblings, 0 replies; 8+ messages in thread
From: Andrew Ammerlaan @ 2021-04-17 20:00 UTC (permalink / raw
  To: gentoo-commits

commit:     20417631c25a91e2ee0548600efdddccc33fad2a
Author:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
AuthorDate: Sat Apr 17 19:59:22 2021 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Sat Apr 17 19:59:22 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=20417631

www-servers/hinsightd: remove RedundantLongDescription

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>

 www-servers/hinsightd/files/init.d.sh | 0
 www-servers/hinsightd/metadata.xml    | 3 ---
 2 files changed, 3 deletions(-)

diff --git a/www-servers/hinsightd/files/init.d.sh b/www-servers/hinsightd/files/init.d.sh
old mode 100755
new mode 100644

diff --git a/www-servers/hinsightd/metadata.xml b/www-servers/hinsightd/metadata.xml
index 9b48d579b..3e7b7f452 100644
--- a/www-servers/hinsightd/metadata.xml
+++ b/www-servers/hinsightd/metadata.xml
@@ -2,9 +2,6 @@
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
         <!-- maintainer-needed -->
-        <longdescription lang="en">
-                hinsightd a http/1.1 webserver with (hopefully) minimal goals
-        </longdescription>
         <use>
                 <!--<flag name="openssl">Enable tls encryption with openssl</flag>-->
         </use>


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

* [gentoo-commits] repo/proj/guru:dev commit in: www-servers/hinsightd/files/, www-servers/hinsightd/
@ 2021-04-19  7:51 Alexandru Campeanu
  0 siblings, 0 replies; 8+ messages in thread
From: Alexandru Campeanu @ 2021-04-19  7:51 UTC (permalink / raw
  To: gentoo-commits

commit:     fa6c928b5253e3753be0b6c377ac8ad3a0fd9f2d
Author:     tiotags <tiotags1 <AT> gmail <DOT> com>
AuthorDate: Mon Apr 19 07:47:55 2021 +0000
Commit:     Alexandru Campeanu <tiotags1 <AT> gmail <DOT> com>
CommitDate: Mon Apr 19 07:50:37 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=fa6c928b

www-servers/hinsightd: fail condition to src_compile

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

 .../{gentoo.patch => hinsightd-redefine-directories.patch} |  0
 www-servers/hinsightd/hinsightd-9999.ebuild                | 14 ++++++--------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/www-servers/hinsightd/files/gentoo.patch b/www-servers/hinsightd/files/hinsightd-redefine-directories.patch
similarity index 100%
rename from www-servers/hinsightd/files/gentoo.patch
rename to www-servers/hinsightd/files/hinsightd-redefine-directories.patch

diff --git a/www-servers/hinsightd/hinsightd-9999.ebuild b/www-servers/hinsightd/hinsightd-9999.ebuild
index 571f67b24..fc2323148 100644
--- a/www-servers/hinsightd/hinsightd-9999.ebuild
+++ b/www-servers/hinsightd/hinsightd-9999.ebuild
@@ -15,6 +15,10 @@ SLOT="0"
 KEYWORDS=""
 IUSE="" #+openssl
 
+BDEPEND="
+dev-util/ninja
+"
+
 RDEPEND="
 acct-user/hinsightd
 acct-group/hinsightd
@@ -26,14 +30,8 @@ dev-libs/openssl
 
 DEPEND="${RDEPEND}"
 
-BDEPEND="
-acct-user/hinsightd
-acct-group/hinsightd
-dev-util/ninja
-"
-
 PATCHES=(
-"${FILESDIR}/gentoo.patch"
+"${FILESDIR}/hinsightd-redefine-directories.patch"
 )
 
 #src_configure() {
@@ -41,7 +39,7 @@ PATCHES=(
 
 src_compile() {
 	cd build
-	ninja
+	ninja || die
 }
 
 src_install() {


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

* [gentoo-commits] repo/proj/guru:dev commit in: www-servers/hinsightd/files/, www-servers/hinsightd/
@ 2021-04-19  7:51 Alexandru Campeanu
  0 siblings, 0 replies; 8+ messages in thread
From: Alexandru Campeanu @ 2021-04-19  7:51 UTC (permalink / raw
  To: gentoo-commits

commit:     398256d5a7bb8a7717e656587272e271e76c15c7
Author:     tiotags <tiotags1 <AT> gmail <DOT> com>
AuthorDate: Mon Apr 19 07:50:00 2021 +0000
Commit:     Alexandru Campeanu <tiotags1 <AT> gmail <DOT> com>
CommitDate: Mon Apr 19 07:50:37 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=398256d5

www-servers/hinsightd: added logrotate script and systemd unit

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

 www-servers/hinsightd/files/hinsightd.service | 10 ++++++++++
 www-servers/hinsightd/files/logrotate.d.sh    | 14 ++++++++++++++
 www-servers/hinsightd/hinsightd-9999.ebuild   |  5 +++++
 3 files changed, 29 insertions(+)

diff --git a/www-servers/hinsightd/files/hinsightd.service b/www-servers/hinsightd/files/hinsightd.service
new file mode 100644
index 000000000..02215732e
--- /dev/null
+++ b/www-servers/hinsightd/files/hinsightd.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=hinsightd is a http/1.1 webserver
+After=syslog.target network.target
+
+[Service]
+ExecStart=/usr/bin/hinsightd --config /etc/hinsightd/hinsightd.lua
+ExecReload=/bin/kill -USR1 $MAINPID
+
+[Install]
+WantedBy=multi-user.target

diff --git a/www-servers/hinsightd/files/logrotate.d.sh b/www-servers/hinsightd/files/logrotate.d.sh
new file mode 100644
index 000000000..3483c001f
--- /dev/null
+++ b/www-servers/hinsightd/files/logrotate.d.sh
@@ -0,0 +1,14 @@
+/var/log/hinsightd/*.log {
+daily
+missingok
+rotate 7
+compress
+delaycompress
+minsize 1M
+notifempty
+sharedscripts
+postrotate
+	test -e /run/openrc/softlevel && /etc/init.d/hinsightd reload 1>/dev/null || true
+	test -e /run/systemd/system && systemctl reload hinsightd.service || true
+endscript
+}

diff --git a/www-servers/hinsightd/hinsightd-9999.ebuild b/www-servers/hinsightd/hinsightd-9999.ebuild
index fc2323148..bdb8dbee6 100644
--- a/www-servers/hinsightd/hinsightd-9999.ebuild
+++ b/www-servers/hinsightd/hinsightd-9999.ebuild
@@ -45,10 +45,15 @@ src_compile() {
 src_install() {
 	newbin "${S}/build/hin9" hinsightd
 	newinitd "${FILESDIR}/init.d.sh" hinsightd
+	#systemd_dounit "${FILESDIR}/hinsightd.service" # not tested
 
 	insinto /etc/hinsightd
 	newins "${S}/workdir/main.lua" hinsightd.lua
 
+	# logrotate
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}"/logrotate.d.sh hinsightd
+
 	keepdir /var/www/localhost/htdocs
 	keepdir /var/log/hinsightd
 	keepdir /var/tmp/hinsightd


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

* [gentoo-commits] repo/proj/guru:dev commit in: www-servers/hinsightd/files/, www-servers/hinsightd/
@ 2021-04-26 13:41 Alexandru Campeanu
  0 siblings, 0 replies; 8+ messages in thread
From: Alexandru Campeanu @ 2021-04-26 13:41 UTC (permalink / raw
  To: gentoo-commits

commit:     0a4b02d6b1e419e686dd4fb7ecde957fff152ee8
Author:     tiotags <tiotags1 <AT> gmail <DOT> com>
AuthorDate: Mon Apr 26 13:41:19 2021 +0000
Commit:     Alexandru Campeanu <tiotags1 <AT> gmail <DOT> com>
CommitDate: Mon Apr 26 13:41:19 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0a4b02d6

www-servers/hinsightd: version bump 0.9.1

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

 www-servers/hinsightd/Manifest                               |  1 +
 www-servers/hinsightd/files/hinsightd-default-config.patch   | 12 ++++++++++++
 .../hinsightd/files/hinsightd-redefine-directories.patch     |  6 +++---
 .../{hinsightd-9999.ebuild => hinsightd-0.9.1.ebuild}        |  6 +++---
 www-servers/hinsightd/hinsightd-9999.ebuild                  |  6 +++---
 5 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/www-servers/hinsightd/Manifest b/www-servers/hinsightd/Manifest
index 61940dc50..37be5d923 100644
--- a/www-servers/hinsightd/Manifest
+++ b/www-servers/hinsightd/Manifest
@@ -1 +1,2 @@
 DIST hin9-v0.9.0.tar.gz 65320 BLAKE2B c1348bc5afffa8804494f6ae228f54874d25cc5f40c17ee2a36f23104286f96f5d616cdc3e98de0854cf7d4b18165a2b70600b32f58024b679d213b2156c1f18 SHA512 60a1ff72d1abf57d8f764ebb77ab77f7069b40bfdbb5bb1c95324b366d1052378ffe36198112a595e08238622654a9c1e1d89679924883f8ff42b98ca7cf139e
+DIST hin9-v0.9.1.tar.gz 64851 BLAKE2B ca646af3b2a752f2b0ba2eec983f807d148b302a7a2db627117686dea3d16811829a1f89a3347708c775d8141372dd91ca46c79c32684b9366b703eb7018706e SHA512 175bbb25bd8be5052bcda96b709b33a996945c63f71249750ab11a46bafdb425818437023a882858e34692abc341d99141954ca31f6296383b26f617e76ac11a

diff --git a/www-servers/hinsightd/files/hinsightd-default-config.patch b/www-servers/hinsightd/files/hinsightd-default-config.patch
new file mode 100644
index 000000000..114be8fe2
--- /dev/null
+++ b/www-servers/hinsightd/files/hinsightd-default-config.patch
@@ -0,0 +1,12 @@
+diff --git a/workdir/main.lua b/workdir/main.lua
+index 4d516c6..08dd597 100644
+--- a/workdir/main.lua
++++ b/workdir/main.lua
+@@ -2,6 +2,7 @@
+ 
+ --redirect_log (logdir.."debug.log")
+ --redirect_log (NULL, "ffffffff")
++redirect_log (logdir.."debug.log")
+ 
+ function printf (...)
+   io.write (string.format (...))

diff --git a/www-servers/hinsightd/files/hinsightd-redefine-directories.patch b/www-servers/hinsightd/files/hinsightd-redefine-directories.patch
index 22925c1dc..c204eff35 100644
--- a/www-servers/hinsightd/files/hinsightd-redefine-directories.patch
+++ b/www-servers/hinsightd/files/hinsightd-redefine-directories.patch
@@ -1,5 +1,5 @@
 diff --git a/src/hin/conf.h b/src/hin/conf.h
-index c4f7f4c..29b9375 100644
+index c4f7f4c..23b0714 100644
 --- a/src/hin/conf.h
 +++ b/src/hin/conf.h
 @@ -2,9 +2,9 @@
@@ -21,8 +21,8 @@ index c4f7f4c..29b9375 100644
  #define HIN_HTTPD_MAX_DEFLATE_SIZE 0
 -#define HIN_HTTPD_POST_DIRECTORY "/tmp"
 -#define HIN_HTTPD_CACHE_DIRECTORY "/tmp"
-+#define HIN_HTTPD_POST_DIRECTORY "/var/tmp/hinsightd"
-+#define HIN_HTTPD_CACHE_DIRECTORY "/var/tmp/hinsightd"
++#define HIN_HTTPD_POST_DIRECTORY "/var/tmp/hinsightd/"
++#define HIN_HTTPD_CACHE_DIRECTORY "/var/tmp/hinsightd/"
  #define HIN_HTTPD_CACHE_CLEAN_ON_EXIT 1
  #define HIN_HTTPD_CACHE_TMPFILE 0
  #define HIN_HTTPD_CACHE_MAX_SIZE 64 * 1024 * 1024

diff --git a/www-servers/hinsightd/hinsightd-9999.ebuild b/www-servers/hinsightd/hinsightd-0.9.1.ebuild
similarity index 96%
copy from www-servers/hinsightd/hinsightd-9999.ebuild
copy to www-servers/hinsightd/hinsightd-0.9.1.ebuild
index 9107371b8..924a614e4 100644
--- a/www-servers/hinsightd/hinsightd-9999.ebuild
+++ b/www-servers/hinsightd/hinsightd-0.9.1.ebuild
@@ -11,17 +11,16 @@ DESCRIPTION="hinsightd a http/1.1 webserver with (hopefully) minimal goals"
 HOMEPAGE="https://gitlab.com/tiotags/hin9"
 
 if [[ ${PV} == *9999* ]]; then
-	EGIT_REPO_URI="https://gitlab.com/tiotags/hin9.git"
 	inherit git-r3
+	EGIT_REPO_URI="https://gitlab.com/tiotags/hin9.git"
 else
-	KEYWORDS="~amd64"
 	SRC_URI="https://gitlab.com/tiotags/hin9/-/archive/v${PV}/hin9-v${PV}.tar.gz"
 	S="${WORKDIR}/hin9-v${PV}"
+	KEYWORDS="~amd64"
 fi
 
 LICENSE="BSD"
 SLOT="0"
-KEYWORDS=""
 
 IUSE="+openssl"
 REQUIRED_USE="${LUA_REQUIRED_USE}"
@@ -45,6 +44,7 @@ DEPEND="${RDEPEND}"
 
 PATCHES=(
 	"${FILESDIR}/hinsightd-redefine-directories.patch"
+	"${FILESDIR}/hinsightd-default-config.patch"
 )
 
 src_configure() {

diff --git a/www-servers/hinsightd/hinsightd-9999.ebuild b/www-servers/hinsightd/hinsightd-9999.ebuild
index 9107371b8..924a614e4 100644
--- a/www-servers/hinsightd/hinsightd-9999.ebuild
+++ b/www-servers/hinsightd/hinsightd-9999.ebuild
@@ -11,17 +11,16 @@ DESCRIPTION="hinsightd a http/1.1 webserver with (hopefully) minimal goals"
 HOMEPAGE="https://gitlab.com/tiotags/hin9"
 
 if [[ ${PV} == *9999* ]]; then
-	EGIT_REPO_URI="https://gitlab.com/tiotags/hin9.git"
 	inherit git-r3
+	EGIT_REPO_URI="https://gitlab.com/tiotags/hin9.git"
 else
-	KEYWORDS="~amd64"
 	SRC_URI="https://gitlab.com/tiotags/hin9/-/archive/v${PV}/hin9-v${PV}.tar.gz"
 	S="${WORKDIR}/hin9-v${PV}"
+	KEYWORDS="~amd64"
 fi
 
 LICENSE="BSD"
 SLOT="0"
-KEYWORDS=""
 
 IUSE="+openssl"
 REQUIRED_USE="${LUA_REQUIRED_USE}"
@@ -45,6 +44,7 @@ DEPEND="${RDEPEND}"
 
 PATCHES=(
 	"${FILESDIR}/hinsightd-redefine-directories.patch"
+	"${FILESDIR}/hinsightd-default-config.patch"
 )
 
 src_configure() {


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

* [gentoo-commits] repo/proj/guru:dev commit in: www-servers/hinsightd/files/, www-servers/hinsightd/
@ 2021-06-20  9:20 Alexandru Campeanu
  0 siblings, 0 replies; 8+ messages in thread
From: Alexandru Campeanu @ 2021-06-20  9:20 UTC (permalink / raw
  To: gentoo-commits

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 ""


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

* [gentoo-commits] repo/proj/guru:dev commit in: www-servers/hinsightd/files/, www-servers/hinsightd/
@ 2021-07-20  8:48 Alexandru Campeanu
  0 siblings, 0 replies; 8+ messages in thread
From: Alexandru Campeanu @ 2021-07-20  8:48 UTC (permalink / raw
  To: gentoo-commits

commit:     a67913b3fa6f91d47a7bb2432e9127f29e7a93f6
Author:     tiotags <tiotags1 <AT> gmail <DOT> com>
AuthorDate: Tue Jul 20 08:48:01 2021 +0000
Commit:     Alexandru Campeanu <tiotags1 <AT> gmail <DOT> com>
CommitDate: Tue Jul 20 08:48:01 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a67913b3

www-servers/hinsightd: bump to 0.9.7, removed old versions

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

 www-servers/hinsightd/Manifest                     |  4 +-
 ...hinsightd-defines-v3.patch => defines-v4.patch} | 13 ++--
 .../hinsightd/files/hinsightd-default-config.patch | 12 ---
 .../files/hinsightd-redefine-directories-v2.patch  | 21 ------
 .../files/hinsightd-redefine-directories.patch     | 30 --------
 www-servers/hinsightd/files/hinsightd.service      |  2 +-
 www-servers/hinsightd/files/init.d.sh              | 50 -------------
 www-servers/hinsightd/files/initd-v1.sh            | 50 -------------
 www-servers/hinsightd/files/logrotate.d.sh         | 14 ----
 www-servers/hinsightd/hinsightd-0.9.3.ebuild       | 81 --------------------
 www-servers/hinsightd/hinsightd-0.9.4.ebuild       | 87 ----------------------
 ...nsightd-0.9.5.ebuild => hinsightd-0.9.7.ebuild} |  8 +-
 www-servers/hinsightd/hinsightd-9999.ebuild        |  8 +-
 13 files changed, 17 insertions(+), 363 deletions(-)

diff --git a/www-servers/hinsightd/Manifest b/www-servers/hinsightd/Manifest
index 9bad66830..8ed01577a 100644
--- a/www-servers/hinsightd/Manifest
+++ b/www-servers/hinsightd/Manifest
@@ -1,3 +1 @@
-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
+DIST hin9-v0.9.7.tar.gz 86527 BLAKE2B 243e627f67b6ce4efe683ca51a175e0364eebf47e7a1a881c0650f65aa922bb596dbc7814fff59b9e8d5c61ff16152cc1da0ab764b10027bed4b48bb7961b41c SHA512 161aacf50d6581643fff2c494e13faa7a07dd58fdc74ffbf14d1199500ae231be90b358bd9223e1a4cb8cb7c7502793b127c7c933d67ddd1bfbaa2984c3ae715

diff --git a/www-servers/hinsightd/files/hinsightd-defines-v3.patch b/www-servers/hinsightd/files/defines-v4.patch
similarity index 65%
rename from www-servers/hinsightd/files/hinsightd-defines-v3.patch
rename to www-servers/hinsightd/files/defines-v4.patch
index 271481f1f..bd0a2b563 100644
--- a/www-servers/hinsightd/files/hinsightd-defines-v3.patch
+++ b/www-servers/hinsightd/files/defines-v4.patch
@@ -1,21 +1,18 @@
 diff --git a/src/hin/conf.h b/src/hin/conf.h
-index 61db395..1eaaa14 100644
+index 9edb801..1deefd5 100644
 --- a/src/hin/conf.h
 +++ b/src/hin/conf.h
-@@ -2,11 +2,11 @@
+@@ -2,10 +2,10 @@
  #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_WORKDIR_PATH "./"
+-#define HIN_TEMP_PATH "/tmp/"
 +#define HIN_TEMP_PATH "/var/tmp/hinsightd/"
-+#define HIN_DEBUG_MASK 0x27f0f
+ #define HIN_DEBUG_MASK 0x20007
  
  #define HIN_URING_QUEUE_DEPTH 256
- #define HIN_URING_DONT_FORK 0

diff --git a/www-servers/hinsightd/files/hinsightd-default-config.patch b/www-servers/hinsightd/files/hinsightd-default-config.patch
deleted file mode 100644
index 114be8fe2..000000000
--- a/www-servers/hinsightd/files/hinsightd-default-config.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/workdir/main.lua b/workdir/main.lua
-index 4d516c6..08dd597 100644
---- a/workdir/main.lua
-+++ b/workdir/main.lua
-@@ -2,6 +2,7 @@
- 
- --redirect_log (logdir.."debug.log")
- --redirect_log (NULL, "ffffffff")
-+redirect_log (logdir.."debug.log")
- 
- function printf (...)
-   io.write (string.format (...))

diff --git a/www-servers/hinsightd/files/hinsightd-redefine-directories-v2.patch b/www-servers/hinsightd/files/hinsightd-redefine-directories-v2.patch
deleted file mode 100644
index 8406efc86..000000000
--- a/www-servers/hinsightd/files/hinsightd-redefine-directories-v2.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/src/hin/conf.h b/src/hin/conf.h
-index 4a6f071..f4f6f36 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 "build/"
--#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/hinsightd-redefine-directories.patch b/www-servers/hinsightd/files/hinsightd-redefine-directories.patch
deleted file mode 100644
index 9fa2285a8..000000000
--- a/www-servers/hinsightd/files/hinsightd-redefine-directories.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff --git a/src/hin/conf.h b/src/hin/conf.h
-index 8dfe060..3874d6c 100644
---- a/src/hin/conf.h
-+++ b/src/hin/conf.h
-@@ -2,10 +2,10 @@
- #ifndef HIN_CONF_H
- #define HIN_CONF_H
- 
--#define HIN_CONF_PATH "workdir/main.lua"
--#define HIN_LOGDIR_PATH "build/"
--#define HIN_WORKDIR_PATH "./"
--#define HIN_PRINT_GREETING 1
-+#define HIN_CONF_PATH "/etc/hinsightd/hinsightd.lua"
-+#define HIN_LOGDIR_PATH "/var/log/hinsightd/"
-+#define HIN_WORKDIR_PATH "/var/www/localhost/"
-+#define HIN_PRINT_GREETING 0
- 
- #define HIN_URING_QUEUE_DEPTH 256
- #define HIN_URING_DONT_FORK 0
-@@ -21,8 +21,8 @@
- #define HIN_HTTPD_MAX_HEADER_LINE_SIZE 4096
- #define HIN_HTTPD_MAX_POST_SIZE 4121440
- #define HIN_HTTPD_MAX_DEFLATE_SIZE 0
--#define HIN_HTTPD_POST_DIRECTORY "/tmp"
--#define HIN_HTTPD_CACHE_DIRECTORY "/tmp"
-+#define HIN_HTTPD_POST_DIRECTORY "/var/tmp/hinsightd/"
-+#define HIN_HTTPD_CACHE_DIRECTORY "/var/tmp/hinsightd/"
- #define HIN_HTTPD_CACHE_CLEAN_ON_EXIT 1
- #define HIN_HTTPD_CACHE_TMPFILE 0
- #define HIN_HTTPD_CACHE_MAX_SIZE 64 * 1024 * 1024

diff --git a/www-servers/hinsightd/files/hinsightd.service b/www-servers/hinsightd/files/hinsightd.service
index 02215732e..e06957419 100644
--- a/www-servers/hinsightd/files/hinsightd.service
+++ b/www-servers/hinsightd/files/hinsightd.service
@@ -3,7 +3,7 @@ Description=hinsightd is a http/1.1 webserver
 After=syslog.target network.target
 
 [Service]
-ExecStart=/usr/bin/hinsightd --config /etc/hinsightd/hinsightd.lua
+ExecStart=/usr/sbin/hinsightd --config /etc/hinsightd/hinsightd.lua
 ExecReload=/bin/kill -USR1 $MAINPID
 
 [Install]

diff --git a/www-servers/hinsightd/files/init.d.sh b/www-servers/hinsightd/files/init.d.sh
deleted file mode 100644
index 15cd2ced5..000000000
--- a/www-servers/hinsightd/files/init.d.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/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/bin/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/files/initd-v1.sh b/www-servers/hinsightd/files/initd-v1.sh
deleted file mode 100644
index c0c2da823..000000000
--- a/www-servers/hinsightd/files/initd-v1.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/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/files/logrotate.d.sh b/www-servers/hinsightd/files/logrotate.d.sh
deleted file mode 100644
index 3483c001f..000000000
--- a/www-servers/hinsightd/files/logrotate.d.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-/var/log/hinsightd/*.log {
-daily
-missingok
-rotate 7
-compress
-delaycompress
-minsize 1M
-notifempty
-sharedscripts
-postrotate
-	test -e /run/openrc/softlevel && /etc/init.d/hinsightd reload 1>/dev/null || true
-	test -e /run/systemd/system && systemctl reload hinsightd.service || true
-endscript
-}

diff --git a/www-servers/hinsightd/hinsightd-0.9.3.ebuild b/www-servers/hinsightd/hinsightd-0.9.3.ebuild
deleted file mode 100644
index a7e45d693..000000000
--- a/www-servers/hinsightd/hinsightd-0.9.3.ebuild
+++ /dev/null
@@ -1,81 +0,0 @@
-# Copyright 2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-LUA_COMPAT=( lua5-{1..4} )
-
-inherit fcaps lua-single systemd cmake linux-info
-
-DESCRIPTION="hinsightd a http/1.1 webserver with (hopefully) minimal goals"
-HOMEPAGE="https://gitlab.com/tiotags/hin9"
-
-if [[ ${PV} == *9999* ]]; then
-	inherit git-r3
-	EGIT_REPO_URI="https://gitlab.com/tiotags/hin9.git"
-else
-	SRC_URI="https://gitlab.com/tiotags/hin9/-/archive/v${PV}/hin9-v${PV}.tar.gz"
-	S="${WORKDIR}/hin9-v${PV}"
-	KEYWORDS="~amd64"
-fi
-
-LICENSE="BSD"
-SLOT="0"
-
-IUSE="+openssl"
-REQUIRED_USE="${LUA_REQUIRED_USE}"
-
-BDEPEND="
-	dev-util/cmake
-	virtual/pkgconfig
-"
-
-RDEPEND="
-	${LUA_DEPS}
-	acct-user/hinsightd
-	acct-group/hinsightd
-	sys-libs/liburing
-	sys-libs/zlib
-	openssl? ( dev-libs/openssl )
-"
-
-DEPEND="${RDEPEND}"
-
-PATCHES=(
-	"${FILESDIR}/hinsightd-redefine-directories.patch"
-	"${FILESDIR}/hinsightd-default-config.patch"
-)
-
-src_configure() {
-	local mycmakeargs=(
-		-DUSE_OPENSSL=$(usex openssl)
-	)
-	cmake_src_configure
-}
-
-src_install() {
-	newbin "${BUILD_DIR}/hin9" hinsightd
-	newinitd "${FILESDIR}/init.d.sh" hinsightd
-	systemd_dounit "${FILESDIR}/hinsightd.service" # not tested
-
-	insinto /etc/hinsightd
-	newins "${S}/workdir/main.lua" hinsightd.lua
-
-	# logrotate
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}"/logrotate.d.sh hinsightd
-
-	keepdir /var/www/localhost/htdocs
-	keepdir /var/log/hinsightd
-	keepdir /var/tmp/hinsightd
-}
-
-pkg_postinst() {
-	fcaps CAP_NET_BIND_SERVICE /usr/bin/hinsightd
-
-	if kernel_is lt 5 7; then
-		ewarn ""
-		ewarn "hinsightd requires io_uring and kernel ~5.6.0"
-		ewarn ""
-	fi
-}

diff --git a/www-servers/hinsightd/hinsightd-0.9.4.ebuild b/www-servers/hinsightd/hinsightd-0.9.4.ebuild
deleted file mode 100644
index f8d82a655..000000000
--- a/www-servers/hinsightd/hinsightd-0.9.4.ebuild
+++ /dev/null
@@ -1,87 +0,0 @@
-# Copyright 2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-LUA_COMPAT=( lua5-{1..4} )
-
-inherit fcaps lua-single systemd cmake linux-info
-
-DESCRIPTION="hinsightd a http/1.1 webserver with (hopefully) minimal goals"
-HOMEPAGE="https://gitlab.com/tiotags/hin9"
-
-if [[ ${PV} == *9999* ]]; then
-	inherit git-r3
-	EGIT_REPO_URI="https://gitlab.com/tiotags/hin9.git"
-else
-	SRC_URI="https://gitlab.com/tiotags/hin9/-/archive/v${PV}/hin9-v${PV}.tar.gz"
-	S="${WORKDIR}/hin9-v${PV}"
-	KEYWORDS="~amd64"
-fi
-
-LICENSE="BSD"
-SLOT="0"
-
-IUSE="+openssl"
-REQUIRED_USE="${LUA_REQUIRED_USE}"
-
-BDEPEND="
-	dev-util/cmake
-	virtual/pkgconfig
-"
-
-RDEPEND="
-	${LUA_DEPS}
-	acct-user/hinsightd
-	acct-group/hinsightd
-	sys-libs/liburing
-	sys-libs/zlib
-	openssl? ( dev-libs/openssl )
-"
-
-DEPEND="${RDEPEND}"
-
-PATCHES=(
-	"${FILESDIR}/hinsightd-redefine-directories-v2.patch"
-)
-
-src_configure() {
-	local mycmakeargs=(
-		-DUSE_OPENSSL=$(usex openssl)
-	)
-	cmake_src_configure
-}
-
-src_install() {
-	newbin "${BUILD_DIR}/hin9" $PN
-	newinitd "${FILESDIR}/init.d.sh" $PN
-	systemd_dounit "${FILESDIR}/$PN.service" # not tested
-
-	# config
-	insinto /etc/$PN
-	doins "${S}/workdir/main.lua"
-	doins "${S}/workdir/lib.lua"
-	doins "${S}/workdir/default_config.lua"
-
-	# logrotate
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}"/logrotate.d.sh $PN
-
-	keepdir /var/www/localhost/htdocs
-}
-
-pkg_postinst() {
-	fcaps CAP_NET_BIND_SERVICE /usr/bin/$PN
-
-	if kernel_is lt 5 7; then
-		ewarn ""
-		ewarn "hinsightd requires io_uring and kernel ~5.6.0"
-		ewarn ""
-	fi
-
-	ewarn ""
-	ewarn "hinsightd requires a higher than default RLIMIT_MEMLOCK for"
-	ewarn "things like graceful restarting"
-	ewarn "memory limit can be increased in /etc/security/limits.conf"
-	ewarn ""
-}

diff --git a/www-servers/hinsightd/hinsightd-0.9.5.ebuild b/www-servers/hinsightd/hinsightd-0.9.7.ebuild
similarity index 88%
rename from www-servers/hinsightd/hinsightd-0.9.5.ebuild
rename to www-servers/hinsightd/hinsightd-0.9.7.ebuild
index 727392d53..528b0d20c 100644
--- a/www-servers/hinsightd/hinsightd-0.9.5.ebuild
+++ b/www-servers/hinsightd/hinsightd-0.9.7.ebuild
@@ -36,13 +36,14 @@ RDEPEND="
 	acct-group/hinsightd
 	sys-libs/liburing
 	sys-libs/zlib
+	virtual/libcrypt
 	openssl? ( dev-libs/openssl )
 "
 
 DEPEND="${RDEPEND}"
 
 PATCHES=(
-	"${FILESDIR}/hinsightd-defines-v3.patch"
+	"${FILESDIR}/defines-v4.patch"
 )
 
 src_configure() {
@@ -54,7 +55,8 @@ src_configure() {
 
 src_install() {
 	newsbin "${BUILD_DIR}/hin9" $PN
-	newinitd "${FILESDIR}/initd-v1.sh" $PN
+	newinitd "${S}/external/packaging/$PN.initd.sh" $PN
+	newconfd "${S}/external/packaging/$PN.confd.sh" $PN
 	systemd_dounit "${FILESDIR}/$PN.service" # not tested
 
 	# config
@@ -65,7 +67,7 @@ src_install() {
 
 	# logrotate
 	insinto /etc/logrotate.d
-	newins "${FILESDIR}"/logrotate.d.sh $PN
+	newins "${S}/external/packaging/$PN.logrotate.sh" $PN
 
 	keepdir /var/www/localhost/htdocs
 }

diff --git a/www-servers/hinsightd/hinsightd-9999.ebuild b/www-servers/hinsightd/hinsightd-9999.ebuild
index 727392d53..528b0d20c 100644
--- a/www-servers/hinsightd/hinsightd-9999.ebuild
+++ b/www-servers/hinsightd/hinsightd-9999.ebuild
@@ -36,13 +36,14 @@ RDEPEND="
 	acct-group/hinsightd
 	sys-libs/liburing
 	sys-libs/zlib
+	virtual/libcrypt
 	openssl? ( dev-libs/openssl )
 "
 
 DEPEND="${RDEPEND}"
 
 PATCHES=(
-	"${FILESDIR}/hinsightd-defines-v3.patch"
+	"${FILESDIR}/defines-v4.patch"
 )
 
 src_configure() {
@@ -54,7 +55,8 @@ src_configure() {
 
 src_install() {
 	newsbin "${BUILD_DIR}/hin9" $PN
-	newinitd "${FILESDIR}/initd-v1.sh" $PN
+	newinitd "${S}/external/packaging/$PN.initd.sh" $PN
+	newconfd "${S}/external/packaging/$PN.confd.sh" $PN
 	systemd_dounit "${FILESDIR}/$PN.service" # not tested
 
 	# config
@@ -65,7 +67,7 @@ src_install() {
 
 	# logrotate
 	insinto /etc/logrotate.d
-	newins "${FILESDIR}"/logrotate.d.sh $PN
+	newins "${S}/external/packaging/$PN.logrotate.sh" $PN
 
 	keepdir /var/www/localhost/htdocs
 }


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

* [gentoo-commits] repo/proj/guru:dev commit in: www-servers/hinsightd/files/, www-servers/hinsightd/
@ 2022-08-26 10:15 Alexandru Campeanu
  0 siblings, 0 replies; 8+ messages in thread
From: Alexandru Campeanu @ 2022-08-26 10:15 UTC (permalink / raw
  To: gentoo-commits

commit:     fb693d546eed37211f64b428a7244912d26d7c63
Author:     Alexandru Campeanu <tiotags1 <AT> gmail <DOT> com>
AuthorDate: Fri Aug 26 10:11:43 2022 +0000
Commit:     Alexandru Campeanu <tiotags1 <AT> gmail <DOT> com>
CommitDate: Fri Aug 26 10:14:09 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=fb693d54

www-servers/hinsightd: add 0.9.15_p20220826, drop old

Closes: https://bugs.gentoo.org/866458
Signed-off-by: Alexandru Campeanu <tiotags1 <AT> gmail.com>

 www-servers/hinsightd/Manifest                     |  2 +-
 .../hinsightd/files/hinsightd-defines-v4.patch     | 18 ------------
 ...17.ebuild => hinsightd-0.9.15_p20220826.ebuild} | 33 ++++++++++++++--------
 www-servers/hinsightd/hinsightd-9999.ebuild        |  2 +-
 4 files changed, 24 insertions(+), 31 deletions(-)

diff --git a/www-servers/hinsightd/Manifest b/www-servers/hinsightd/Manifest
index ee98956b4..9d5f3af9b 100644
--- a/www-servers/hinsightd/Manifest
+++ b/www-servers/hinsightd/Manifest
@@ -1,2 +1,2 @@
 DIST hin9-0c584cbe00c2227d4cb29675e8e2da2c6bd57371.tar.gz 116295 BLAKE2B 69c6a9593fa721e113172696523beb39c63385e8fe319687b2e12c9eb8ff91bb63e45e3c33429026e45522d535c6acb305af1dcc8f120d552dab5fcda3d7734c SHA512 9d66c58545b64c66365c74935be8e3988022b1f3902af5bec7996df86f37bf2fdd54fb913826a0bcf5f9f4ba07e30abc5e6573cf8b4c2f11ec67c1917ed7f000
-DIST hin9-af60390e3ade1e617ef76c5ab778934acd76a16e.tar.gz 115019 BLAKE2B a8f15d07dfa7adea3665cc4f8189bb9dc4afa9e9ebd457f78fd0975dad65b4741c1e14b9f701b9bfedafc8d138c96022895b17b9628a8569d60818f46ca791fd SHA512 fb125099500b049e5f371ae1d84b2e07f77b28358d5ad7ff8a655baa86bc77a940a9d9321fbbcd6b1d7ac54e14aa214aeb792ade24cb7140fdb494799686efa8
+DIST hin9-60ff105ba76746ac8f669616ed3658f7c03c3ab3.tar.gz 116619 BLAKE2B 9e7777c584cc31c853f210e3c4b9306e675fb2501c99239b86fc8b5d925532fba8402b40b9ff43eebafec70457f67f11174e36a7c49aa59483606e19ebdf936e SHA512 e4e6e62b618e0fa845d94a723b4723e230fa03415ad4831bddc0a99f8c262fdca495a8ea6bdb7019e3a97bcf03554fae6f09a2a673e2f3db3e535c5fdc490f4e

diff --git a/www-servers/hinsightd/files/hinsightd-defines-v4.patch b/www-servers/hinsightd/files/hinsightd-defines-v4.patch
deleted file mode 100644
index bd0a2b563..000000000
--- a/www-servers/hinsightd/files/hinsightd-defines-v4.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/src/hin/conf.h b/src/hin/conf.h
-index 9edb801..1deefd5 100644
---- a/src/hin/conf.h
-+++ b/src/hin/conf.h
-@@ -2,10 +2,10 @@
- #ifndef HIN_CONF_H
- #define HIN_CONF_H
- 
--#define HIN_CONF_PATH "workdir/main.lua"
--#define HIN_LOGDIR_PATH "workdir/logs/"
-+#define HIN_CONF_PATH "/etc/hinsightd/main.lua"
-+#define HIN_LOGDIR_PATH "/var/log/hinsightd/"
- #define HIN_WORKDIR_PATH "./"
--#define HIN_TEMP_PATH "/tmp/"
-+#define HIN_TEMP_PATH "/var/tmp/hinsightd/"
- #define HIN_DEBUG_MASK 0x20007
- 
- #define HIN_URING_QUEUE_DEPTH 256

diff --git a/www-servers/hinsightd/hinsightd-0.9.15_p20220817.ebuild b/www-servers/hinsightd/hinsightd-0.9.15_p20220826.ebuild
similarity index 77%
rename from www-servers/hinsightd/hinsightd-0.9.15_p20220817.ebuild
rename to www-servers/hinsightd/hinsightd-0.9.15_p20220826.ebuild
index 427d8a07b..e4732875c 100644
--- a/www-servers/hinsightd/hinsightd-0.9.15_p20220817.ebuild
+++ b/www-servers/hinsightd/hinsightd-0.9.15_p20220826.ebuild
@@ -5,14 +5,14 @@ EAPI=8
 
 LUA_COMPAT=( lua5-{1..4} luajit )
 
-inherit fcaps lua-single systemd cmake linux-info
+inherit fcaps lua-single systemd meson linux-info
 
 DESCRIPTION="hinsightd a http/1.1 webserver with (hopefully) minimal goals"
 HOMEPAGE="https://tiotags.gitlab.io/hinsightd"
 LICENSE="BSD"
 SLOT="0"
 
-mycommit="af60390e3ade1e617ef76c5ab778934acd76a16e"
+mycommit="60ff105ba76746ac8f669616ed3658f7c03c3ab3"
 
 if [[ ${PV} == *9999* ]]; then
 	inherit git-r3
@@ -33,7 +33,7 @@ IUSE="+ssl cgi +fcgi +rproxy +ffcall"
 REQUIRED_USE="${LUA_REQUIRED_USE}"
 
 BDEPEND="
-	dev-util/cmake
+	dev-util/meson
 	virtual/pkgconfig
 "
 
@@ -54,19 +54,30 @@ FILECAPS=(
 	cap_net_bind_service usr/sbin/${PN}
 )
 
+pkg_setup() {
+	linux-info_pkg_setup;
+	lua-single_pkg_setup
+}
+
 src_configure() {
-	local mycmakeargs=(
-		-DUSE_OPENSSL=$(usex ssl)
-		-DUSE_CGI=$(usex cgi)
-		-DUSE_FCGI=$(usex fcgi)
-		-DUSE_RPROXY=$(usex rproxy)
-		-DUSE_FFCALL=$(usex ffcall)
+	version=$(ver_cut 1-2 $(lua_get_version))
+	if [ "$version" == "2.1" ]; then
+		version="jit"
+	fi
+	local emesonargs=(
+		$(meson_use ssl openssl)
+		$(meson_use cgi)
+		$(meson_use fcgi)
+		$(meson_use rproxy)
+		$(meson_use ffcall)
+		-Dforce-lua-version=$version
 	)
-	cmake_src_configure
+	meson_src_configure
 }
 
 src_install() {
-	cmake_src_install
+	meson_src_install
+
 	newinitd "${S}/external/packaging/$PN.initd.sh" $PN
 	newconfd "${S}/external/packaging/$PN.confd.sh" $PN
 	systemd_dounit "${FILESDIR}/$PN.service" # not tested

diff --git a/www-servers/hinsightd/hinsightd-9999.ebuild b/www-servers/hinsightd/hinsightd-9999.ebuild
index 9b9d8695b..60ce5a5ee 100644
--- a/www-servers/hinsightd/hinsightd-9999.ebuild
+++ b/www-servers/hinsightd/hinsightd-9999.ebuild
@@ -60,7 +60,7 @@ pkg_setup() {
 src_configure() {
 	version=$(ver_cut 1-2 $(lua_get_version))
 	if [ "$version" == "2.1" ]; then
-	  version="jit"
+		version="jit"
 	fi
 	local emesonargs=(
 		$(meson_use ssl openssl)


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

end of thread, other threads:[~2022-08-26 10:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-19  7:51 [gentoo-commits] repo/proj/guru:dev commit in: www-servers/hinsightd/files/, www-servers/hinsightd/ Alexandru Campeanu
  -- strict thread matches above, loose matches on Subject: below --
2022-08-26 10:15 Alexandru Campeanu
2021-07-20  8:48 Alexandru Campeanu
2021-06-20  9:20 Alexandru Campeanu
2021-04-26 13:41 Alexandru Campeanu
2021-04-19  7:51 Alexandru Campeanu
2021-04-17 20:00 [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan
2021-04-17 20:00 ` [gentoo-commits] repo/proj/guru:dev " Andrew Ammerlaan
2021-04-17 19:24 Alexandru Campeanu

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