[gentoo-commits] repo/gentoo:master commit in: net-irc/ngircd/files/, net-irc/ngircd/

2022-02-20 Thread Sam James
commit: df75ebf4605ac1b0b38f1025bb965d1dffb07431
Author: Anna Vyalkova  sysrq  in>
AuthorDate: Sat Feb 19 21:00:26 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Feb 20 21:03:57 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df75ebf4

net-irc/ngircd: add new OpenRC service

Ebuild changes (r3):
* update EAPI 7 -> 8
* uncomment PIDFile, ServerUID and ServerGID
* correct ngircd.conf's owner

Service changes (r2):
* use pidfile
* use declarative config
* add configtest command
* add reload command

Signed-off-by: Anna Vyalkova  sysrq.in>
Closes: https://github.com/gentoo/gentoo/pull/24277
Signed-off-by: Sam James  gentoo.org>

 net-irc/ngircd/files/ngircd.conf.d|   8 +++
 net-irc/ngircd/files/ngircd.init-r2.d |  52 
 net-irc/ngircd/ngircd-26.1-r3.ebuild  | 111 ++
 3 files changed, 171 insertions(+)

diff --git a/net-irc/ngircd/files/ngircd.conf.d 
b/net-irc/ngircd/files/ngircd.conf.d
new file mode 100644
index ..6088e5dae69a
--- /dev/null
+++ b/net-irc/ngircd/files/ngircd.conf.d
@@ -0,0 +1,8 @@
+# Configuration file
+#NGIRCD_CONFIGFILE="/etc/ngircd/ngircd.conf"
+
+# PID file
+#NGIRCD_PIDFILE="/var/run/ngircd/ngircd.pid"
+
+# Options for ngircd
+#NGIRCD_OPTS="-d -s"

diff --git a/net-irc/ngircd/files/ngircd.init-r2.d 
b/net-irc/ngircd/files/ngircd.init-r2.d
new file mode 100644
index ..1a54154ff417
--- /dev/null
+++ b/net-irc/ngircd/files/ngircd.init-r2.d
@@ -0,0 +1,52 @@
+#!/sbin/openrc-run
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+extra_commands="configtest"
+extra_started_commands="reload"
+
+description="IRC server"
+description_configtest="Run ngircd's internal config check."
+description_reload="Reload the ngircd's configuration."
+
+: ${NGIRCD_CONFIGFILE:=/etc/ngircd/${RC_SVCNAME}.conf}
+
+command="/usr/sbin/ngircd"
+command_args="${NGIRCD_OPTS} -f \"${NGIRCD_CONFIGFILE}\""
+command_args_foreground="-n"
+command_user="ngircd:ngircd"
+pidfile="${NGIRCD_PIDFILE:-/var/run/ngircd/${RC_SVCNAME}.pid}"
+
+depend() {
+   need net
+   use logger
+   provide ircd
+}
+
+start_pre() {
+   checkpath -f "${pidfile}" -o ${command_user} || return 1
+   if [ "${RC_CMD}" != "restart" ]; then
+   configtest || return 1
+   fi
+}
+
+stop_pre() {
+   if [ "${RC_CMD}" = "restart" ]; then
+   configtest || return 1
+   fi
+}
+
+reload() {
+   configtest || return 1
+   ebegin "Refreshing ${RC_SVCNAME}'s configuration"
+   start-stop-daemon --signal SIGHUP --pidfile "${pidfile}"
+   eend $? "Failed to reload ${RC_SVCNAME}"
+}
+
+configtest() {
+   ebegin "Checking ${RC_SVCNAME}'s configuration"
+   # "press enter to continue"
+   echo | ${command} -f "${NGIRCD_CONFIGFILE}" -t >/dev/null
+
+   eend $? "failed, please correct errors in the config file"
+}

diff --git a/net-irc/ngircd/ngircd-26.1-r3.ebuild 
b/net-irc/ngircd/ngircd-26.1-r3.ebuild
new file mode 100644
index ..579814e2b0e5
--- /dev/null
+++ b/net-irc/ngircd/ngircd-26.1-r3.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}/usr/share/openpgp-keys/alexbarton.asc"
+inherit verify-sig
+
+DESCRIPTION="An IRC server written from scratch"
+HOMEPAGE="https://ngircd.barton.de/;
+SRC_URI="https://arthur.barton.de/pub/${PN}/${P}.tar.gz;
+SRC_URI+=" verify-sig? ( https://arthur.barton.de/pub/${PN}/${P}.tar.gz.sig )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~x64-macos"
+IUSE="debug gnutls ident irc-plus +ipv6 pam +ssl strict-rfc tcpd test zlib"
+
+# Flaky test needs investigation (bug 719256)
+RESTRICT="test"
+
+RDEPEND="
+   acct-user/ngircd
+   irc-plus? ( virtual/libiconv )
+   ident? ( net-libs/libident )
+   pam? ( sys-libs/pam )
+   ssl? (
+   gnutls? ( net-libs/gnutls:= )
+   !gnutls? (
+   dev-libs/openssl:0=
+   )
+   )
+   tcpd? ( sys-apps/tcp-wrappers )
+   zlib? ( sys-libs/zlib )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+   test? (
+   dev-tcltk/expect
+   net-misc/netkit-telnetd
+   )
+   verify-sig? ( sec-keys/openpgp-keys-alexbarton )
+"
+
+src_prepare() {
+   default
+
+   if ! use prefix ; then
+   sed -i \
+   -e "/;ServerUID = /s/65534/ngircd/" \
+   -e "/;ServerGID = /s/65534/ngircd/" \
+   doc/sample-ngircd.conf.tmpl || die
+   fi
+
+   # make pidfiles work out-of-the-box
+   sed -i \
+   -e "/;PidFile = /s/;//" \
+   -e "/;ServerUID = /s/;//" \
+   -e "/;ServerGID = /s/;//" \
+   doc/sample-ngircd.conf.tmpl || die
+
+   # Note that if we need to use automake, 

[gentoo-commits] repo/gentoo:master commit in: net-irc/ngircd/files/, net-irc/ngircd/

2020-08-29 Thread Sam James
commit: 417e58c420eccb652dd16b23f7d3155e07b20938
Author: Sam James  gentoo  org>
AuthorDate: Sun Aug 30 05:47:53 2020 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Aug 30 05:47:53 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=417e58c4

net-irc/ngircd: cleanup old

Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Sam James  gentoo.org>

 net-irc/ngircd/Manifest |   1 -
 net-irc/ngircd/files/ngircd-25-fix-gcc-10.patch |  77 
 net-irc/ngircd/files/ngircd-25-make-env.patch   |  75 
 net-irc/ngircd/ngircd-25.ebuild | 111 
 4 files changed, 264 deletions(-)

diff --git a/net-irc/ngircd/Manifest b/net-irc/ngircd/Manifest
index 788ac8cbe86..6dba9318b06 100644
--- a/net-irc/ngircd/Manifest
+++ b/net-irc/ngircd/Manifest
@@ -1,2 +1 @@
-DIST ngircd-25.tar.gz 527886 BLAKE2B 
ab75c9a904fae8da4c89e07bd66bb000bc9b614e27269be3ac6f55254c77abeb2d6f7d0afc6d05630f7c548ea13d842d4c0376123035f9417eda55565a69dcec
 SHA512 
0c96e97da312fe86c50007a72db03f85b9f79df053806f50badd07c7ca8e8bddd99adb478eab8be9630330707d7aa578b5d0bd3017b59bf4515319a64c29ea6c
 DIST ngircd-26.tar.gz 565579 BLAKE2B 
edd005179a79bbb51a1401f7d580ebf66cb5bf65d1427453c471a4e7e667d7fd6b320c292e9a7993c5fef6beeae88126fefb73284063451b080ecc0d3e6ca0f1
 SHA512 
2502baf83e3bfca3e6b83c22fe660fee24732ee875b32a7071a489a8babcc08124738142215b55d4f9bd4e94bec3f2a41889ab18324f772b1674b02883cbfb91

diff --git a/net-irc/ngircd/files/ngircd-25-fix-gcc-10.patch 
b/net-irc/ngircd/files/ngircd-25-fix-gcc-10.patch
deleted file mode 100644
index 33e0d444bd5..000
--- a/net-irc/ngircd/files/ngircd-25-fix-gcc-10.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From f27827d7937375b5348107ca7427abf74c9eff3d Mon Sep 17 00:00:00 2001
-From: michi 
-Date: Tue, 14 Apr 2020 16:53:02 +0200
-Subject: [PATCH] Unbreak GCC 10 (-fno-common) build
-

- src/ngircd/conn.c   |  1 +
- src/ngircd/conn.h   | 14 +++---
- src/ngircd/ngircd.c |  1 +
- src/portab/portab.h |  4 
- 4 files changed, 17 insertions(+), 3 deletions(-)
-
-diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c
-index f62e9675..e14e6c08 100644
 a/src/ngircd/conn.c
-+++ b/src/ngircd/conn.c
-@@ -10,6 +10,7 @@
-  */
- 
- #define CONN_MODULE
-+#define CONN_MODULE_GLOBAL_INIT
- 
- #include "portab.h"
- 
-diff --git a/src/ngircd/conn.h b/src/ngircd/conn.h
-index c642541f..869477f0 100644
 a/src/ngircd/conn.h
-+++ b/src/ngircd/conn.h
-@@ -105,9 +105,17 @@ typedef struct _Connection
- #endif
- } CONNECTION;
- 
--GLOBAL CONNECTION *My_Connections;
--GLOBAL CONN_ID Pool_Size;
--GLOBAL long WCounter;
-+
-+#ifdef CONN_MODULE_GLOBAL_INIT
-+CONNECTION *My_Connections;
-+CONN_ID Pool_Size;
-+long WCounter;
-+#else
-+extern CONNECTION *My_Connections;
-+extern CONN_ID Pool_Size;
-+extern long WCounter;
-+#endif
-+
- 
- #define CONNECTION2ID(x) (long)(x - My_Connections)
- 
-diff --git a/src/ngircd/ngircd.c b/src/ngircd/ngircd.c
-index 7166640b..41255ca0 100644
 a/src/ngircd/ngircd.c
-+++ b/src/ngircd/ngircd.c
-@@ -9,6 +9,7 @@
-  * Please read the file COPYING, README and AUTHORS for more information.
-  */
- 
-+#define GLOBAL_INIT
- #include "portab.h"
- 
- /**
-diff --git a/src/portab/portab.h b/src/portab/portab.h
-index 70d5ed3e..43f2f907 100644
 a/src/portab/portab.h
-+++ b/src/portab/portab.h
-@@ -102,7 +102,11 @@ typedef unsigned char bool;
- #endif
- 
- #undef GLOBAL
-+#ifdef GLOBAL_INIT
- #define GLOBAL
-+#else
-+#define GLOBAL extern
-+#endif
- 
- /* SPLint */
- 

diff --git a/net-irc/ngircd/files/ngircd-25-make-env.patch 
b/net-irc/ngircd/files/ngircd-25-make-env.patch
deleted file mode 100644
index e6494c72007..000
--- a/net-irc/ngircd/files/ngircd-25-make-env.patch
+++ /dev/null
@@ -1,75 +0,0 @@
 a/Makefile.am  2016-09-18 18:01:30.0 -
-+++ b/Makefile.am  2020-04-20 14:01:43.166312404 -
-@@ -25,13 +25,13 @@
-   rm -f config.log debian
- 
- testsuite:
--  cd src/testsuite && make check
-+  cd src/testsuite && ${MAKE} check
- 
- lint:
--  cd src/ngircd && make lint
-+  cd src/ngircd && ${MAKE} lint
- 
- srcdoc:
--  cd doc && make srcdoc
-+  cd doc && ${MAKE} srcdoc
- 
- have-xcodebuild:
-   @xcodebuild -project contrib/MacOSX/ngIRCd.xcodeproj -list \
-@@ -66,7 +66,7 @@
---out ../../$(distdir).mpkg
-   rm -f $(distdir).mpkg.zip
-   zip -ro9 $(distdir).mpkg.zip $(distdir).mpkg
--  make osxpkg-clean
-+  ${MAKE} osxpkg-clean
- 
- osxpkg-clean:
-   [ ! -r ngircd.dest ] || sudo -n rm -rf ngircd.dest
-@@ -74,12 +74,12 @@
- 
- osxpkg-dest: have-xcodebuild osxpkg-clean clean
-   ./configure --prefix=/opt/ngircd
--  make xcode
--  make -C contrib/MacOSX de.barton.ngircd.plist
-+  ${MAKE} xcode
-+  ${MAKE} -C contrib/MacOSX de.barton.ngircd.plist
-   mkdir -p ngircd.dest/opt/ngircd/sbin
--  DESTDIR="$$PWD/ngircd.dest" make -C doc install
--  

[gentoo-commits] repo/gentoo:master commit in: net-irc/ngircd/files/, net-irc/ngircd/

2016-10-18 Thread Patrice Clement
commit: 1a4bbebb47fe204d34cddbb3992112ba863dc2c4
Author: Moritz Kick  blackphoenix  de>
AuthorDate: Mon Oct 17 17:44:01 2016 +
Commit: Patrice Clement  gentoo  org>
CommitDate: Tue Oct 18 08:04:35 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a4bbebb

net-irc/ngircd: remove old.

Closes: https://github.com/gentoo/gentoo/pull/2581

Signed-off-by: Patrice Clement  gentoo.org>

 net-irc/ngircd/Manifest|  1 -
 net-irc/ngircd/files/ngircd.init.d | 21 --
 net-irc/ngircd/ngircd-20.3.ebuild  | 80 ---
 net-irc/ngircd/ngircd-23.ebuild| 85 --
 4 files changed, 187 deletions(-)

diff --git a/net-irc/ngircd/Manifest b/net-irc/ngircd/Manifest
index 0afd7e0..098b7eb 100644
--- a/net-irc/ngircd/Manifest
+++ b/net-irc/ngircd/Manifest
@@ -1,2 +1 @@
-DIST ngircd-20.3.tar.gz 479982 SHA256 
55d7c74c6df790b11a68c07f39836d581965087efb618d3e9a6bec855364c2f9 SHA512 
8bc36a66e893873fade6dcadb07bf561fb25156714ba30168cf2e399e50f4dd80592fd7fcdb6c8d1083fa7c5e839b0da3a27ed4ce2041a2c5ab2b9581def948c
 WHIRLPOOL 
379ef30a2e23dfc3a523d85e9f2c1531b8079d0880b5f46b9cdb803af873fc943d25186ebc0b9294da26140b46a37a4ebd2b86f3c7cf17acd3a802e4a395dd1e
 DIST ngircd-23.tar.gz 517686 SHA256 
99b8b67a975a9ae9b81c96bdee02133a10f515c718825d34cedcb64f1fc95e73 SHA512 
714fbb4af12335e62c615fa1e8de9c7366c4c6da6af9b334019ba900dce072067f7b08199de8c96aad5dd4b9b786b57d536ba9dc92c62b37d2ae11960dbd01b1
 WHIRLPOOL 
06e1b3a9675277c980898118e71e9a6c08de998c93919f431ecd7505f64dc57617beef885aae5e5c72b27cd1df3c89204dbc2101c1f4a30970fceb78a7825441

diff --git a/net-irc/ngircd/files/ngircd.init.d 
b/net-irc/ngircd/files/ngircd.init.d
deleted file mode 100644
index 7f06682..
--- a/net-irc/ngircd/files/ngircd.init.d
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-depend() {
-   need net
-   provide ircd
-}
-
-start() {
-   ebegin "Starting ngIRCd"
-   start-stop-daemon --start --quiet --exec /usr/sbin/ngircd
-   eend $?
-}
-
-stop() {
-   ebegin "Stopping ngIRCd"
-   start-stop-daemon --stop --quiet --exec /usr/sbin/ngircd
-   eend $?
-}

diff --git a/net-irc/ngircd/ngircd-20.3.ebuild 
b/net-irc/ngircd/ngircd-20.3.ebuild
deleted file mode 100644
index 1a7281c8..
--- a/net-irc/ngircd/ngircd-20.3.ebuild
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-inherit autotools-utils eutils user
-
-DESCRIPTION="A IRC server written from scratch"
-HOMEPAGE="http://ngircd.barton.de/;
-SRC_URI="ftp://ngircd.barton.de/pub/${PN}/${P}.tar.gz;
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 x86 ~x64-macos"
-IUSE="debug gnutls ident ipv6 pam ssl tcpd zlib"
-
-RDEPEND="
-   ident? ( net-libs/libident )
-   ssl? (
-   gnutls? ( net-libs/gnutls )
-   !gnutls? ( dev-libs/openssl )
-   )
-   pam? ( virtual/pam )
-   tcpd? ( sys-apps/tcp-wrappers )
-   zlib? ( sys-libs/zlib )
-"
-DEPEND="${RDEPEND}
-   >=sys-apps/sed-4
-"
-
-RESTRICT="test"
-
-src_configure() {
-   if ! use prefix; then
-   sed -i \
-   -e "s:;ServerUID = 65534:ServerUID = ngircd:" \
-   -e "s:;ServerGID = 65534:ServerGID = nogroup:" \
-   doc/sample-ngircd.conf.tmpl || die
-   fi
-
-   local myeconfargs=(
-   --docdir="${EPREFIX}"/usr/share/doc/${PF}
-   --sysconfdir="${EPREFIX}"/etc/ngircd
-   $(use_enable ipv6)
-   $(use_with zlib)
-   $(use_with tcpd tcp-wrappers)
-   $(use_with ident)
-   $(use_with pam)
-   $(use_enable debug)
-   $(use_enable debug sniffer)
-   )
-
-   if use ssl; then
-   myeconfargs+=(
-   $(use_with !gnutls openssl)
-   $(use_with gnutls)
-   )
-   else
-   myeconfargs+=(
-   --without-gnutls
-   --without-ssl
-   )
-   fi
-
-   autotools-utils_src_configure
-}
-
-src_install() {
-   autotools-utils_src_install
-
-   newinitd "${FILESDIR}"/ngircd.init.d ngircd
-}
-
-pkg_postinst() {
-   if ! use prefix; then
-   enewuser ngircd
-   chown ngircd "${ROOT}"/etc/ngircd/ngircd.conf
-   fi
-}

diff --git a/net-irc/ngircd/ngircd-23.ebuild b/net-irc/ngircd/ngircd-23.ebuild
deleted file mode 100644
index 6e71ce9..
--- a/net-irc/ngircd/ngircd-23.ebuild
+++ /dev/null
@@ -1,85 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-inherit autotools-utils eutils user
-
-DESCRIPTION="An IRC