public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-misc/rwhoisd/, net-misc/rwhoisd/files/
@ 2016-05-04  1:02 Austin English
  0 siblings, 0 replies; 2+ messages in thread
From: Austin English @ 2016-05-04  1:02 UTC (permalink / raw
  To: gentoo-commits

commit:     e80645174260d52c03050b688f19c71cc9465b74
Author:     Austin English <wizardedit <AT> gentoo <DOT> org>
AuthorDate: Wed May  4 00:37:37 2016 +0000
Commit:     Austin English <wizardedit <AT> gentoo <DOT> org>
CommitDate: Wed May  4 00:37:37 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8064517

net-misc/rwhoisd: use #!/sbin/openrc-run instead of #!/sbin/runscript

Gentoo-Bug: https://bugs.gentoo.org/573846

Package-Manager: portage-2.2.26

 net-misc/rwhoisd/files/rwhoisd             |  2 +-
 net-misc/rwhoisd/rwhoisd-1.5.9.5-r3.ebuild | 47 ++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+), 1 deletion(-)

diff --git a/net-misc/rwhoisd/files/rwhoisd b/net-misc/rwhoisd/files/rwhoisd
index 8e02214..f6978f6 100644
--- a/net-misc/rwhoisd/files/rwhoisd
+++ b/net-misc/rwhoisd/files/rwhoisd
@@ -1,4 +1,4 @@
-#!/sbin/runscript
+#!/sbin/openrc-run
 
 depend() {
 	use logger

diff --git a/net-misc/rwhoisd/rwhoisd-1.5.9.5-r3.ebuild b/net-misc/rwhoisd/rwhoisd-1.5.9.5-r3.ebuild
new file mode 100644
index 0000000..3acff49
--- /dev/null
+++ b/net-misc/rwhoisd/rwhoisd-1.5.9.5-r3.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic user
+
+DESCRIPTION="ARIN rwhois daemon"
+HOMEPAGE="http://projects.arin.net/rwhois/"
+SRC_URI="http://projects.arin.net/rwhois/ftp/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="
+	sys-devel/flex
+	virtual/yacc
+"
+
+pkg_setup() {
+	enewgroup rwhoisd
+	enewuser rwhoisd -1 -1 /var/rwhoisd rwhoisd
+}
+
+src_prepare() {
+	epatch "${FILESDIR}"/${PN}-destdir-${PV}.patch
+	append-cflags -DNEW_STYLE_BIN_SORT
+}
+
+src_compile() {
+	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."
+}


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

* [gentoo-commits] repo/gentoo:master commit in: net-misc/rwhoisd/, net-misc/rwhoisd/files/
@ 2023-12-09 18:11 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2023-12-09 18:11 UTC (permalink / raw
  To: gentoo-commits

commit:     8e0c7585f5ff58e7a5c9538ad7d60c69699032d4
Author:     Pascal Jäger <pascal.jaeger <AT> leimstift <DOT> de>
AuthorDate: Thu Dec 15 21:55:46 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Dec  9 18:06:02 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e0c7585

net-misc/rwhoisd: fix build for clang16

Closes: https://bugs.gentoo.org/725194
Closes: https://bugs.gentoo.org/861830
Closes: https://bugs.gentoo.org/870940
Closes: https://bugs.gentoo.org/893906
Signed-off-by: Pascal Jäger <pascal.jaeger <AT> leimstift.de>
Closes: https://github.com/gentoo/gentoo/pull/28676
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-misc/rwhoisd/Manifest                          |  1 +
 net-misc/rwhoisd/files/rwhoisd-1.5.9.6-c99.patch   | 89 ++++++++++++++++++++++
 .../files/rwhoisd-1.5.9.6-fix-direct-ar-call.patch | 33 ++++++++
 net-misc/rwhoisd/rwhoisd-1.5.9.6-r3.ebuild         | 61 +++++++++++++++
 4 files changed, 184 insertions(+)

diff --git a/net-misc/rwhoisd/Manifest b/net-misc/rwhoisd/Manifest
index 2f18403d071c..330991fe45d4 100644
--- a/net-misc/rwhoisd/Manifest
+++ b/net-misc/rwhoisd/Manifest
@@ -1 +1,2 @@
+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

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."
+}


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

end of thread, other threads:[~2023-12-09 18:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-09 18:11 [gentoo-commits] repo/gentoo:master commit in: net-misc/rwhoisd/, net-misc/rwhoisd/files/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2016-05-04  1:02 Austin English

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