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)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2F397158099 for ; Fri, 24 Nov 2023 10:58:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 419F02BC05A; Fri, 24 Nov 2023 10:58:41 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 25FD62BC05A for ; Fri, 24 Nov 2023 10:58:41 +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 EDE80340813 for ; Fri, 24 Nov 2023 10:58:39 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1FB7B13B3 for ; Fri, 24 Nov 2023 10:58:38 +0000 (UTC) From: "Pacho Ramos" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Pacho Ramos" Message-ID: <1700823135.0b384521330687755ea3df3f4c043ad7261cc2dd.pacho@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/accountsservice/, sys-apps/accountsservice/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/accountsservice/accountsservice-23.13.9.ebuild sys-apps/accountsservice/files/accountsservice-23.13.9-musl-fixes.patch X-VCS-Directories: sys-apps/accountsservice/ sys-apps/accountsservice/files/ X-VCS-Committer: pacho X-VCS-Committer-Name: Pacho Ramos X-VCS-Revision: 0b384521330687755ea3df3f4c043ad7261cc2dd X-VCS-Branch: master Date: Fri, 24 Nov 2023 10:58:38 +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: 42cc468b-2c99-430c-b667-ac97720f42e9 X-Archives-Hash: bddb8456311ac2c17f31a04331742454 commit: 0b384521330687755ea3df3f4c043ad7261cc2dd Author: germ outlook com> AuthorDate: Mon Oct 30 12:01:40 2023 +0000 Commit: Pacho Ramos gentoo org> CommitDate: Fri Nov 24 10:52:15 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b384521 sys-apps/accountsservice: add musl build fixes from Alpine Linux Closes: https://bugs.gentoo.org/762442 Signed-off-by: Germ Mipseb outlook.com> Signed-off-by: germ outlook.com> Closes: https://github.com/gentoo/gentoo/pull/33600 Signed-off-by: Pacho Ramos gentoo.org> .../accountsservice/accountsservice-23.13.9.ebuild | 3 ++ .../files/accountsservice-23.13.9-musl-fixes.patch | 52 ++++++++++++++++++++++ 2 files changed, 55 insertions(+) diff --git a/sys-apps/accountsservice/accountsservice-23.13.9.ebuild b/sys-apps/accountsservice/accountsservice-23.13.9.ebuild index dad99e616477..61e932e21ed9 100644 --- a/sys-apps/accountsservice/accountsservice-23.13.9.ebuild +++ b/sys-apps/accountsservice/accountsservice-23.13.9.ebuild @@ -55,6 +55,9 @@ RDEPEND="${CDEPEND} PATCHES=( "${FILESDIR}"/${PN}-22.04.62-gentoo-system-users.patch "${FILESDIR}"/${PN}-23.13.9-generate-version.patch #905770 + # From Alpine Linux + # https://gitlab.freedesktop.org/accountsservice/accountsservice/-/merge_requests/97 + "${FILESDIR}"/${PN}-23.13.9-musl-fixes.patch ) python_check_deps() { diff --git a/sys-apps/accountsservice/files/accountsservice-23.13.9-musl-fixes.patch b/sys-apps/accountsservice/files/accountsservice-23.13.9-musl-fixes.patch new file mode 100644 index 000000000000..abb59a137bfd --- /dev/null +++ b/sys-apps/accountsservice/files/accountsservice-23.13.9-musl-fixes.patch @@ -0,0 +1,52 @@ +From 962a66aa12932c7899cda78c4cbda0f581947285 Mon Sep 17 00:00:00 2001 +From: germ +Date: Mon, 30 Oct 2023 06:16:16 -0400 +Subject: [PATCH 1/1] This applies two apatches to sys-apps/accountsserice + https://gitlab.alpinelinux.org/alpine/aports/-/raw/75528d8dc4206a74501799f6a6042be20b80801d/community/accountsservice/musl-fgetspent_r.patch + https://gitlab.alpinelinux.org/alpine/aports/-/raw/75528d8dc4206a74501799f6a6042be20b80801d/community/accountsservice/musl-wtmp.patch + +--- a/meson.build ++++ b/meson.build +@@ -103,8 +103,7 @@ elif cc.has_header_symbol('paths.h', '_PATH_WTMPX') + + config_h.set('PATH_WTMP', '_PATH_WTMPX') + else +- path_wtmp = '/var/log/utx.log' +- assert(run_command('test', '-e', path_wtmp, check: false).returncode() == 0, 'Do not know which filename to watch for wtmp changes') ++ path_wtmp = '/var/log/wtmp' + config_h.set_quoted('PATH_WTMP', path_wtmp) + endif + +--- a/src/daemon.c ++++ b/src/daemon.c +@@ -215,6 +215,27 @@ remove_cache_files (const gchar *user_name) + g_remove (icon_filename); + } + ++#ifndef __GLIBC__ ++/* Musl libc does not support fgetspent_r(), write own ++* wrapper ++*/ ++static int fgetspent_r(FILE *fp, struct spwd *spbuf, char *buf, size_t buflen, struct spwd **spbufp) { ++ struct spwd *shadow_entry = fgetspent(fp); ++ if(!shadow_entry) ++ return -1; ++ size_t namplen = strlen(shadow_entry->sp_namp); ++ size_t pwdplen = strlen(shadow_entry->sp_pwdp); ++ ++ if(namplen + pwdplen + 2 > buflen) ++ return -1; ++ *spbufp = memcpy(spbuf, shadow_entry, sizeof(struct spwd)); ++ spbuf->sp_namp = strncpy(buf, shadow_entry->sp_namp, namplen + 1); ++ spbuf->sp_pwdp = strncpy(buf + namplen + 1, shadow_entry->sp_pwdp, pwdplen + 1); ++ ++ return 0; ++} ++#endif ++ + static struct passwd * + entry_generator_fgetpwent (Daemon *daemon, + GHashTable *users, +-- +2.42.0 +