Github messages for voidlinux
 help / color / mirror / Atom feed
From: AnInternetTroll <AnInternetTroll@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [WIP] ngircd: update to 27~rc1.
Date: Wed, 24 Apr 2024 18:46:43 +0200	[thread overview]
Message-ID: <20240424164643.483F72569A@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-49826@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 784 bytes --]

There is an updated pull request by AnInternetTroll against master on the void-packages repository

https://github.com/AnInternetTroll/void-packages user/luca/ngircd
https://github.com/void-linux/void-packages/pull/49826

[WIP] ngircd: update to 27~rc1.
#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, (x86\_64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl

Crossbuilt on x86\_64-glibc for aarch64-musl and tested with a simple
unencrypted server. As far as features go, I only tested the default
with PAM disabled


A patch file from https://github.com/void-linux/void-packages/pull/49826.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-user/luca/ngircd-49826.patch --]
[-- Type: text/x-diff, Size: 6303 bytes --]

From 69180ed6bcc990de4f14da37feccc513b98a4934 Mon Sep 17 00:00:00 2001
From: Luca Matei Pintilie <luca@lucamatei.com>
Date: Wed, 24 Apr 2024 18:46:16 +0200
Subject: [PATCH] ngircd: update to 27~rc1.

---
 srcpkgs/ngircd/patches/0001-getpid-fix.patch  | 30 +++++++++++++
 .../ngircd/patches/0002-getpid-fix-2.patch    | 22 ++++++++++
 ...when-setgid-setuid-fails-with-EINVAL.patch | 43 +++++++++++++++++++
 srcpkgs/ngircd/template                       | 12 +++---
 4 files changed, 102 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/ngircd/patches/0001-getpid-fix.patch
 create mode 100644 srcpkgs/ngircd/patches/0002-getpid-fix-2.patch
 create mode 100644 srcpkgs/ngircd/patches/don-t-abort-startup-when-setgid-setuid-fails-with-EINVAL.patch

diff --git a/srcpkgs/ngircd/patches/0001-getpid-fix.patch b/srcpkgs/ngircd/patches/0001-getpid-fix.patch
new file mode 100644
index 00000000000000..4765604bea554f
--- /dev/null
+++ b/srcpkgs/ngircd/patches/0001-getpid-fix.patch
@@ -0,0 +1,30 @@
+From a33d15751b3e3910bd06125efbeae6569844f313 Mon Sep 17 00:00:00 2001
+From: Alexander Barton <alex@barton.de>
+Date: Sat, 13 Apr 2024 15:52:33 +0200
+Subject: [PATCH] Test suite: Don't use "pgrep -u" when LOGNAME and USER are
+ not set
+
+Thanks for reporting this on IRC, luca!
+---
+ src/testsuite/getpid.sh | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/src/testsuite/getpid.sh b/src/testsuite/getpid.sh
+index 85059142..3cc186e1 100755
+--- a/src/testsuite/getpid.sh
++++ b/src/testsuite/getpid.sh
+@@ -23,7 +23,13 @@ if [ -x /usr/bin/pgrep ]; then
+ 		*)
+ 			PGREP_FLAGS=""
+ 	esac
+-	exec /usr/bin/pgrep $PGREP_FLAGS -n -u "${LOGNAME:-$USER}" "$1"
++	if [ -n "$LOGNAME" ] || [ -n "$USER" ]; then
++		# Try to narrow the search down to the current user ...
++		exec /usr/bin/pgrep $PGREP_FLAGS -n -u "${LOGNAME:-$USER}" "$1"
++	else
++		# ... but neither LOGNAME nor USER were set!
++		exec /usr/bin/pgrep $PGREP_FLAGS -n "$1"
++	fi
+ fi
+ 
+ # pidof(1) could be a good alternative on elder Linux systems
diff --git a/srcpkgs/ngircd/patches/0002-getpid-fix-2.patch b/srcpkgs/ngircd/patches/0002-getpid-fix-2.patch
new file mode 100644
index 00000000000000..8bbd59a37e354b
--- /dev/null
+++ b/srcpkgs/ngircd/patches/0002-getpid-fix-2.patch
@@ -0,0 +1,22 @@
+From b77b9432c45d6f38c0ad6d9021afb4dd91f163e4 Mon Sep 17 00:00:00 2001
+From: Alexander Barton <alex@barton.de>
+Date: Sat, 13 Apr 2024 16:04:29 +0200
+Subject: [PATCH] Test suite: Correctly test for LOGNAME and USER
+
+---
+ src/testsuite/getpid.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/testsuite/getpid.sh b/src/testsuite/getpid.sh
+index 3cc186e1..7a3dbe37 100755
+--- a/src/testsuite/getpid.sh
++++ b/src/testsuite/getpid.sh
+@@ -23,7 +23,7 @@ if [ -x /usr/bin/pgrep ]; then
+ 		*)
+ 			PGREP_FLAGS=""
+ 	esac
+-	if [ -n "$LOGNAME" ] || [ -n "$USER" ]; then
++	if [ -n "${LOGNAME:-}" ] || [ -n "${USER:-}" ]; then
+ 		# Try to narrow the search down to the current user ...
+ 		exec /usr/bin/pgrep $PGREP_FLAGS -n -u "${LOGNAME:-$USER}" "$1"
+ 	else
diff --git a/srcpkgs/ngircd/patches/don-t-abort-startup-when-setgid-setuid-fails-with-EINVAL.patch b/srcpkgs/ngircd/patches/don-t-abort-startup-when-setgid-setuid-fails-with-EINVAL.patch
new file mode 100644
index 00000000000000..21100f74bc789c
--- /dev/null
+++ b/srcpkgs/ngircd/patches/don-t-abort-startup-when-setgid-setuid-fails-with-EINVAL.patch
@@ -0,0 +1,43 @@
+From 6ec213cd8cf1e65d3c912f8f8eba663a2bf93fb5 Mon Sep 17 00:00:00 2001
+From: Alexander Barton <alex@barton.de>
+Date: Sat, 13 Apr 2024 19:43:54 +0200
+Subject: [PATCH] Don't abort startup when setgid/setuid() fails with EINVAL
+
+Both setgid(2) as well as setuid(2) can fail with EINVAL in addition to
+EPERM, their manual pages state "EINVAL: The user/group ID specified in
+uid/gid is not valid in this user namespace ".
+
+So not only treat EPERM as an "acceptable error" and continue with
+logging the error, but do the same for EINVAL.
+
+This was triggered by the Void Linux xbps-uunshare(1) tool used for
+building "XBPS source packages" and reported by luca in #ngircd. Thanks!
+---
+ src/ngircd/ngircd.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/ngircd/ngircd.c b/src/ngircd/ngircd.c
+index b0610392..c2169c43 100644
+--- a/src/ngircd/ngircd.c
++++ b/src/ngircd/ngircd.c
+@@ -722,7 +722,7 @@ NGIRCd_Init(bool NGIRCd_NoDaemon)
+ 			Log(LOG_ERR, "Can't change group ID to %s(%u): %s!",
+ 			    grp ? grp->gr_name : "?", Conf_GID,
+ 			    strerror(real_errno));
+-			if (real_errno != EPERM)
++			if (real_errno != EPERM && real_errno != EINVAL)
+ 				goto out;
+ 		}
+ #ifdef HAVE_SETGROUPS
+@@ -748,7 +748,7 @@ NGIRCd_Init(bool NGIRCd_NoDaemon)
+ 			Log(LOG_ERR, "Can't change user ID to %s(%u): %s!",
+ 			    pwd ? pwd->pw_name : "?", Conf_UID,
+ 			    strerror(real_errno));
+-			if (real_errno != EPERM)
++			if (real_errno != EPERM && real_errno != EINVAL)
+ 				goto out;
+ 		}
+ 	}
+-- 
+2.39.2
+
diff --git a/srcpkgs/ngircd/template b/srcpkgs/ngircd/template
index 66c09814f049ef..4a32f9d807d360 100644
--- a/srcpkgs/ngircd/template
+++ b/srcpkgs/ngircd/template
@@ -1,18 +1,20 @@
 # Template file for 'ngircd'
 pkgname=ngircd
-version=26
-revision=4
+version=27~rc1
+revision=1
 build_style=gnu-configure
-configure_args="--enable-ipv6 --with-openssl --without-ident ac_cv_func_getaddrinfo=yes"
+configure_args="--enable-ipv6 --with-openssl --without-ident ac_cv_func_getaddrinfo=yes --with-pam --with-iconv"
 hostmakedepends="pkg-config"
-makedepends="zlib-devel openssl-devel"
+makedepends="zlib-devel openssl-devel pam-devel libticonv-devel"
+checkdepends="procps-ng expect inetutils-telnet"
 conf_files="/etc/ngircd.conf"
 short_desc="Free, portable and lightweight Internet Relay Chat server"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="http://ngircd.barton.de/"
 distfiles="https://ngircd.barton.de/pub/ngircd/ngircd-${version}.tar.xz"
-checksum=56dcc6483058699fcdd8e54f5010eecee09824b93bad7ed5f18818e550d855c6
+checksum=ef04b85e99ffda2bdf73a823848f04a1d5aa4f288beb631dae2dcc0d34e5c665
+make_check="ci-skip" # Stopping the integration test servers fails in CI
 
 post_configure() {
 	echo "#define HAVE_WORKING_GETADDRINFO 1" >>src/config.h

  parent reply	other threads:[~2024-04-24 16:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-13 19:08 [PR PATCH] " AnInternetTroll
2024-04-13 19:08 ` [PR PATCH] [Updated] " AnInternetTroll
2024-04-16 19:34 ` AnInternetTroll
2024-04-24 16:46 ` AnInternetTroll [this message]
2024-04-26 15:31 ` AnInternetTroll
2024-04-26 15:32 ` AnInternetTroll
2024-04-26 15:33 ` AnInternetTroll
2024-04-26 16:32 ` [PR PATCH] [Updated] ngircd: update to 27 AnInternetTroll
2024-04-26 18:15 ` AnInternetTroll
2024-04-26 18:25 ` AnInternetTroll
2024-05-01 14:33 ` AnInternetTroll
2024-05-01 19:50 ` AnInternetTroll

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240424164643.483F72569A@inbox.vuxu.org \
    --to=aninternettroll@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).