summaryrefslogtreecommitdiff
path: root/net-misc/rwhoisd
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/rwhoisd')
-rw-r--r--net-misc/rwhoisd/Manifest4
-rw-r--r--net-misc/rwhoisd/files/rwhoisd-1.5.9.6-c99.patch89
-rw-r--r--net-misc/rwhoisd/files/rwhoisd-1.5.9.6-fix-direct-ar-call.patch33
-rw-r--r--net-misc/rwhoisd/rwhoisd-1.5.9.6-r3.ebuild61
4 files changed, 187 insertions, 0 deletions
diff --git a/net-misc/rwhoisd/Manifest b/net-misc/rwhoisd/Manifest
index 07469cd2e97e..c25970cb0321 100644
--- a/net-misc/rwhoisd/Manifest
+++ b/net-misc/rwhoisd/Manifest
@@ -1,5 +1,9 @@
AUX rwhoisd 280 BLAKE2B 8d2e54026175bb53897e69a61abf83b5c7548acbe52555f6adbdc88a07f94a88e3486aea81dd2d3043a99b83b5bc7b4255014f3df2687d463ab60a86ef2a37b5 SHA512 cd278c6dd828d7f07c50147e5dedad7cf8c8e44926b4717fec442b91d891838b59f61dc2a51968df5b4b1dfe181958148a9a7f9e93e65fc815b69c6219dabd6d
+AUX rwhoisd-1.5.9.6-c99.patch 2689 BLAKE2B 466806c1715f9a14eb23ba442b0861e06a20751a1eab9ad2086d920ce7ee2d422d937424fe44a1b2e6c7cc3e8788573065fcf6eb89e5c34c9601ccc427f63b29 SHA512 08dddbd033df5f2ad0eed17f61e4cc3b2b6b08f75729273824b7318d50f2c03e9266f5850e97560ef5b4641f0c5ea45c131261f3dda539d96df0f57cff101ed8
+AUX rwhoisd-1.5.9.6-fix-direct-ar-call.patch 685 BLAKE2B 115db4bbfcc39474256c67c6b6035b97ecb76f3afb36514f5eb215078a8d7cdc0b58bbcf557d25bdcfdcf21c1f1e6708d375d49c2120d70ee3bddc4dfaf26045 SHA512 dfd6c6129f559a4f30dd8b18146340e7c2497990683b1b17e2b60e9886bdc256555b2c1d0f7670073c27ab22f3a8eb8d31d2ecb1356e053ed8bed4a70138ccfb
AUX rwhoisd.conf 154 BLAKE2B 1f80fde2a8ed3066c4c5b5a3a17ad735a6bef56bb897cb41bbc7d3e314803a9e3b06dc957077b28b3590435b7a18a0827f3f4554247509ea21bc0d5048b08cf2 SHA512 882d93ddf72f6a909ab6a33a6f5026e35f52ae025a9e4653cc0449c4b0ab1b2fda5799e1b44b19c620eb98337270a7a1c1eb9cff66af49832adf9726f4713bb8
+DIST rwhoisd-1.5.9.6-fix-build-for-clang16.patch.xz 71604 BLAKE2B f528fdf51203210a9c3c268569f3b84d668e45a000d76bd52e3b4eb3f9ad0f317aeb46e26475ca4c79b768232be9116f2ae13feac4e888d40b8359a72c3cb30c SHA512 ed82d09f6ceecaa607b800906780d68e276d26eba480da1a0d7d4867fcf692a9cf6eca90b16066b2065a749f9a07b47bb55bd45a8976058fd63bc25a9040324e
DIST rwhoisd-1.5.9.6.tar.gz 491955 BLAKE2B 97587fc6a728cde58bc5049a9bf27ec1673ce7beb751aa0de7c787d08185b597e16a4920e89fa5aaabc6e7e1b5dfecedc50aaf55cbdbe7f85a43d6a125848cb9 SHA512 ab5674d9ed9f9c5fc00b2859b1336c766c546ca067ddf9d3863a0728c6d0eac11be3a9cd22dce8c25999ed8c8e5377e6da4aa1252e396d5b3c8e959794903c52
EBUILD rwhoisd-1.5.9.6-r2.ebuild 878 BLAKE2B 1a2e0e4ca812bf9f8e239536895abb84184b86e8a97d1ac77287a6b9a3188471bfdde38a77a382e321b325a1047adab81fe95263dd97bcc98c1296c5394aefc4 SHA512 a485ade69728540e27a3f4ec842fbdb4947e6e965f9fa65891ff9dab015743a428bfe6a0fa75401d2e4416f88f95be011ac42e562a5b4356dafa50ecf57276b2
+EBUILD rwhoisd-1.5.9.6-r3.ebuild 1256 BLAKE2B 754a6e14eac8ef48a7520907f50a0bd244d897372a304229800cdf22b36eabf73c7b13932078f1b25f13056ab8e68bf85f42abc867cb62cfb953d288f031e955 SHA512 6eb543116fbed2eb40f9fd6e23a9ed821edf45828b60afcba0b119e4f27432992d5e17d7b4e8ca1a209b73e89246b345a1c0a22499a9200c372c0a4133e15dec
MISC metadata.xml 248 BLAKE2B c05b7c43d2b78bc6a55a9c89cecd347a257f27e7c6e1bdb20b20bef8301f5a7777bca32a4e77155f0fba7fe7c9127108aacf235332cb2f176f39f02f3e4227f6 SHA512 500fc7831f70375cea82d69fe01a97852fd78583dd7216549620ea581de3e36f6eab035949d35a9cc366fd163df6c8198f8673f070b992bec3d67d04bc0bf7d4
diff --git a/net-misc/rwhoisd/files/rwhoisd-1.5.9.6-c99.patch b/net-misc/rwhoisd/files/rwhoisd-1.5.9.6-c99.patch
new file mode 100644
index 000000000000..8b207d0683ac
--- /dev/null
+++ b/net-misc/rwhoisd/files/rwhoisd-1.5.9.6-c99.patch
@@ -0,0 +1,89 @@
+https://github.com/arineng/rwhoisd/pull/3/commits/285e84dddee471886d84da3ea3579facb9fe7e99
+
+From 285e84dddee471886d84da3ea3579facb9fe7e99 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
+Date: Fri, 1 Dec 2023 13:32:08 +0100
+Subject: [PATCH] Fix a return value of signal handlers
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+GCC 14 will error if a value returned from a function does not match
+a function prototype. This can be reproduced with -Wreturn-mismatch
+option and is a problem compilers where a signal handler should return
+void:
+
+ daemon.c: In function ‘sigchld_handler’:
+ daemon.c:108:10: error: ‘return’ with a value, in function returning void
+ 108 | return 0;
+ | ^
+ daemon.c:92:1: note: declared here
+ 92 | sigchld_handler(
+ | ^~~~~~~~~~~~~~~
+ daemon.c: In function ‘sighup_handler’:
+ daemon.c:117:10: error: ‘return’ with a value, in function returning void
+ 117 | return 0;
+ | ^
+ daemon.c:112:1: note: declared here
+ 112 | sighup_handler(
+ | ^~~~~~~~~~~~~~
+ daemon.c: In function ‘exit_handler’:
+ daemon.c:127:10: error: ‘return’ with a value, in function returning void
+ 127 | return 0;
+ | ^
+
+This patch fixes it.
+---
+ rwhoisd/configure.ac | 3 +++
+ rwhoisd/server/daemon.c | 6 ++++++
+ 2 files changed, 9 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 0b822ac..b1d659f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -114,6 +114,9 @@ AC_CHECK_FUNCS(getcwd gethostname socket strftime uname flock lockf \
+ setsid crypt memset memcpy usleep wait3 getaddrinfo vsnprintf)
+ AC_REPLACE_FUNCS(strerror)
+
++AS_IF([test "${ac_cv_type_signal}" = "int"],
++ AC_DEFINE([RETSIGTYPE_IS_INT], [1], [Define if RETSIGTYPE is int.])
++ )
+
+ dnl Optional software.
+
+diff --git a/server/daemon.c b/server/daemon.c
+index a5c638b..c943da9 100644
+--- a/server/daemon.c
++++ b/server/daemon.c
+@@ -105,7 +105,9 @@ sigchld_handler(
+ /* reset the signal handler -- some older systems remove the signal
+ handler upon use. POSIX systems should not do this */
+ signal(SIGCHLD, (__sighandler_t)sigchld_handler);
++#ifdef RETSIGTYPE_IS_INT
+ return 0;
++#endif
+ }
+
+ static RETSIGTYPE
+@@ -114,7 +116,9 @@ sighup_handler(
+ {
+ hup_recvd = TRUE;
+ signal(SIGHUP, (__sighandler_t)sighup_handler);
++#ifdef RETSIGTYPE_IS_INT
+ return 0;
++#endif
+ }
+
+ static RETSIGTYPE
+@@ -124,7 +128,9 @@ exit_handler(
+ log(L_LOG_NOTICE, UNKNOWN, "Exiting");
+ delpid();
+ exit(0);
++#ifdef RETSIGTYPE_IS_INT
+ return 0;
++#endif
+ }
+
+ static void set_sighup (void)
+
diff --git a/net-misc/rwhoisd/files/rwhoisd-1.5.9.6-fix-direct-ar-call.patch b/net-misc/rwhoisd/files/rwhoisd-1.5.9.6-fix-direct-ar-call.patch
new file mode 100644
index 000000000000..c015559fc891
--- /dev/null
+++ b/net-misc/rwhoisd/files/rwhoisd-1.5.9.6-fix-direct-ar-call.patch
@@ -0,0 +1,33 @@
+Date: Wed, 1 Mar 2023 22:04:45 +0100
+Subject: [PATCH] fix direct ar call
+
+Prevent build to directly call ar and use a variable instead.
+
+Bug: https://bugs.gentoo.org/725194
+
+Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de>
+
+--- a/common/Makefile.in
++++ b/common/Makefile.in
+@@ -1,7 +1,7 @@
+
+ # programs
+ CC = @CC@
+-AR = ar
++AR = @AR@
+ RANLIB = @RANLIB@
+ SHELL = /bin/sh
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -4,6 +4,8 @@ dnl This has been updated to use autoconf-2.52.
+ AC_INIT
+ AC_CONFIG_SRCDIR([common/attributes.c])
+
++AC_CHECK_TOOL(AR, ar, false)
++
+ dnl Random substitution variables
+ if test -f VERSION; then
+ RWHOIS_VERSION=`cat VERSION`
+--
+2.39.2
diff --git a/net-misc/rwhoisd/rwhoisd-1.5.9.6-r3.ebuild b/net-misc/rwhoisd/rwhoisd-1.5.9.6-r3.ebuild
new file mode 100644
index 000000000000..72b282754486
--- /dev/null
+++ b/net-misc/rwhoisd/rwhoisd-1.5.9.6-r3.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic
+
+DESCRIPTION="ARIN rwhois daemon"
+HOMEPAGE="https://projects.arin.net/rwhois/"
+SRC_URI="https://github.com/arineng/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/rwhoisd-1.5.9.6-fix-build-for-clang16.patch.xz"
+S="${WORKDIR}/${P}/${PN}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="virtual/libcrypt:="
+RDEPEND="
+ ${DEPEND}
+ acct-group/rwhoisd
+ acct-user/rwhoisd
+"
+BDEPEND="
+ sys-devel/flex
+ app-alternatives/yacc
+"
+
+# upstream PR: https://github.com/arineng/rwhoisd/pull/2
+PATCHES=(
+ "${WORKDIR}/${P}-fix-build-for-clang16.patch"
+ "${FILESDIR}/${P}-fix-direct-ar-call.patch"
+ "${FILESDIR}/${P}-c99.patch"
+)
+
+src_prepare() {
+ default
+ eautoreconf #893906
+}
+
+src_compile() {
+ append-cflags -DNEW_STYLE_BIN_SORT -std=gnu89
+
+ emake -C common
+ emake -C regexp
+ emake -C mkdb
+
+ default
+}
+
+src_install() {
+ default
+
+ doinitd "${FILESDIR}"/rwhoisd
+ newconfd "${FILESDIR}"/rwhoisd.conf rwhoisd
+}
+
+pkg_postinst() {
+ einfo "Please make sure to set the userid in rwhoisd.conf to rwhoisd."
+ einfo "It is highly inadvisable to run rwhoisd as root."
+}