From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D2E5815817D for ; Mon, 10 Jun 2024 16:20:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 140A5E2AE9; Mon, 10 Jun 2024 16:20:29 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E97E6E2AE9 for ; Mon, 10 Jun 2024 16:20:28 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 20D7D33BE00 for ; Mon, 10 Jun 2024 16:20:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5960D126B for ; Mon, 10 Jun 2024 16:20:26 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1718036368.8c128ff779a89ca0f9559f72e23a43db15058583.floppym@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/systemd-utils/files/, sys-apps/systemd-utils/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/systemd-utils/files/systemd-utils-255-musl-fgetxxent.patch sys-apps/systemd-utils/systemd-utils-255.7-r1.ebuild sys-apps/systemd-utils/systemd-utils-255.7-r2.ebuild X-VCS-Directories: sys-apps/systemd-utils/files/ sys-apps/systemd-utils/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: 8c128ff779a89ca0f9559f72e23a43db15058583 X-VCS-Branch: master Date: Mon, 10 Jun 2024 16:20:26 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: fea5ef0b-df46-4902-b711-76d3e6810e4b X-Archives-Hash: 0cdd1618faece7b989f2376a5edf9e16 commit: 8c128ff779a89ca0f9559f72e23a43db15058583 Author: Mike Gilbert gentoo org> AuthorDate: Mon Jun 10 16:19:28 2024 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Mon Jun 10 16:19:28 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c128ff7 sys-apps/systemd-utils: fix sysusers on musl Signed-off-by: Mike Gilbert gentoo.org> .../files/systemd-utils-255-musl-fgetxxent.patch | 61 ++++++++++++++++++++++ ...5.7-r1.ebuild => systemd-utils-255.7-r2.ebuild} | 1 + 2 files changed, 62 insertions(+) diff --git a/sys-apps/systemd-utils/files/systemd-utils-255-musl-fgetxxent.patch b/sys-apps/systemd-utils/files/systemd-utils-255-musl-fgetxxent.patch new file mode 100644 index 000000000000..682c0c7c21af --- /dev/null +++ b/sys-apps/systemd-utils/files/systemd-utils-255-musl-fgetxxent.patch @@ -0,0 +1,61 @@ +https://github.com/systemd/systemd/pull/33252 + +From 85277a97b222ce19cf951d2c99b1693e8c34fc45 Mon Sep 17 00:00:00 2001 +From: Mike Gilbert +Date: Fri, 7 Jun 2024 12:28:41 -0400 +Subject: [PATCH] user-util: fix fgetxxent_sane on musl + +musl's implementation does not set errno to ENOENT when the end of file +is reached. It returns NULL and leaves errno unchanged. +--- + src/basic/user-util.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/src/basic/user-util.c b/src/basic/user-util.c +index b3df413be6b06..6bdf5bf1cdc9a 100644 +--- a/src/basic/user-util.c ++++ b/src/basic/user-util.c +@@ -977,8 +977,8 @@ int fgetpwent_sane(FILE *stream, struct passwd **pw) { + + errno = 0; + struct passwd *p = fgetpwent(stream); +- if (!p && errno != ENOENT) +- return errno_or_else(EIO); ++ if (!p && !IN_SET(errno, 0, ENOENT)) ++ return -errno; + + *pw = p; + return !!p; +@@ -990,8 +990,8 @@ int fgetspent_sane(FILE *stream, struct spwd **sp) { + + errno = 0; + struct spwd *s = fgetspent(stream); +- if (!s && errno != ENOENT) +- return errno_or_else(EIO); ++ if (!s && !IN_SET(errno, 0, ENOENT)) ++ return -errno; + + *sp = s; + return !!s; +@@ -1003,8 +1003,8 @@ int fgetgrent_sane(FILE *stream, struct group **gr) { + + errno = 0; + struct group *g = fgetgrent(stream); +- if (!g && errno != ENOENT) +- return errno_or_else(EIO); ++ if (!g && !IN_SET(errno, 0, ENOENT)) ++ return -errno; + + *gr = g; + return !!g; +@@ -1017,8 +1017,8 @@ int fgetsgent_sane(FILE *stream, struct sgrp **sg) { + + errno = 0; + struct sgrp *s = fgetsgent(stream); +- if (!s && errno != ENOENT) +- return errno_or_else(EIO); ++ if (!s && !IN_SET(errno, 0, ENOENT)) ++ return -errno; + + *sg = s; + return !!s; diff --git a/sys-apps/systemd-utils/systemd-utils-255.7-r1.ebuild b/sys-apps/systemd-utils/systemd-utils-255.7-r2.ebuild similarity index 99% rename from sys-apps/systemd-utils/systemd-utils-255.7-r1.ebuild rename to sys-apps/systemd-utils/systemd-utils-255.7-r2.ebuild index 0d6be4c5b60d..5eada6a19240 100644 --- a/sys-apps/systemd-utils/systemd-utils-255.7-r1.ebuild +++ b/sys-apps/systemd-utils/systemd-utils-255.7-r2.ebuild @@ -132,6 +132,7 @@ pkg_setup() { src_prepare() { local PATCHES=( + "${FILESDIR}/systemd-utils-255-musl-fgetxxent.patch" ) if use elibc_musl; then