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 DB1D7158095 for ; Thu, 1 Sep 2022 02:11:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1D58FE085B; Thu, 1 Sep 2022 02:11:51 +0000 (UTC) Received: from smtp.gentoo.org (mail.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 04DDDE085B for ; Thu, 1 Sep 2022 02:11:51 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 238AC340A9E for ; Thu, 1 Sep 2022 02:11:50 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A9AFF58D for ; Thu, 1 Sep 2022 02:11:48 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1661998150.0326445b2ff09d42d0fa399840e3314e56dd1644.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/lightdm/files/, x11-misc/lightdm/ X-VCS-Repository: repo/gentoo X-VCS-Files: x11-misc/lightdm/files/lightdm-1.30.0-musl-locale.patch x11-misc/lightdm/files/lightdm-1.30.0-musl-updwtmpx.patch x11-misc/lightdm/lightdm-1.30.0-r3.ebuild X-VCS-Directories: x11-misc/lightdm/files/ x11-misc/lightdm/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 0326445b2ff09d42d0fa399840e3314e56dd1644 X-VCS-Branch: master Date: Thu, 1 Sep 2022 02:11:48 +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: aac46ae9-6aba-40e9-9342-30b381d78fc4 X-Archives-Hash: 50e17d4ffb2965cf2bf227ec75ad8007 commit: 0326445b2ff09d42d0fa399840e3314e56dd1644 Author: brahmajit das protonmail com> AuthorDate: Thu Jul 21 13:53:18 2022 +0000 Commit: Sam James gentoo org> CommitDate: Thu Sep 1 02:09:10 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0326445b x11-misc/lightdm: Fix LC_IDENTIFICATION and updwtmpx on musl This commit fixes two issues with lightdm on musl - LC_IDENTIFICATION not being defined, and - updwtmpx giving conflicting types Patches are documented to the best of my abilities. Closes: https://bugs.gentoo.org/766866 Signed-off-by: brahmajit das protonmail.com> Closes: https://github.com/gentoo/gentoo/pull/26469 Signed-off-by: Sam James gentoo.org> .../lightdm/files/lightdm-1.30.0-musl-locale.patch | 42 ++++++++++++++++++++++ .../files/lightdm-1.30.0-musl-updwtmpx.patch | 26 ++++++++++++++ x11-misc/lightdm/lightdm-1.30.0-r3.ebuild | 5 +++ 3 files changed, 73 insertions(+) diff --git a/x11-misc/lightdm/files/lightdm-1.30.0-musl-locale.patch b/x11-misc/lightdm/files/lightdm-1.30.0-musl-locale.patch new file mode 100644 index 000000000000..46c65d79f764 --- /dev/null +++ b/x11-misc/lightdm/files/lightdm-1.30.0-musl-locale.patch @@ -0,0 +1,42 @@ +https://github.com/canonical/lightdm/pull/261 + +# Fix LC_IDENTIFICATION undeclared on musl or other libc that doesn't have it defined +# Patch is taken from Alpine linux [1] +# [1]: https://git.alpinelinux.org/aports/tree/community/lightdm/musl-language.patch +# Closes: https://bugs.gentoo.org/766866 +diff --git a/liblightdm-gobject/language.c b/liblightdm-gobject/language.c +index 3d4fa96..e38f5ce 100644 +--- a/liblightdm-gobject/language.c ++++ b/liblightdm-gobject/language.c +@@ -210,6 +210,7 @@ lightdm_language_get_name (LightDMLanguage *language) + + if (!priv->name) + { ++#if HAVE_LC_IDENTIFICATION + g_autofree gchar *locale = get_locale_name (priv->code); + if (locale) + { +@@ -223,6 +224,7 @@ lightdm_language_get_name (LightDMLanguage *language) + + setlocale (LC_ALL, current); + } ++#endif + if (!priv->name) + { + g_auto(GStrv) tokens = g_strsplit_set (priv->code, "_.@", 2); +@@ -250,6 +252,7 @@ lightdm_language_get_territory (LightDMLanguage *language) + + if (!priv->territory && strchr (priv->code, '_')) + { ++#if HAVE_LC_IDENTIFICATION + g_autofree gchar *locale = get_locale_name (priv->code); + if (locale) + { +@@ -263,6 +266,7 @@ lightdm_language_get_territory (LightDMLanguage *language) + + setlocale (LC_ALL, current); + } ++#endif + if (!priv->territory) + { + g_auto(GStrv) tokens = g_strsplit_set (priv->code, "_.@", 3); diff --git a/x11-misc/lightdm/files/lightdm-1.30.0-musl-updwtmpx.patch b/x11-misc/lightdm/files/lightdm-1.30.0-musl-updwtmpx.patch new file mode 100644 index 000000000000..0df9bd4f051e --- /dev/null +++ b/x11-misc/lightdm/files/lightdm-1.30.0-musl-updwtmpx.patch @@ -0,0 +1,26 @@ +https://github.com/canonical/lightdm/pull/261 + +# A little bit modified version of Alpine linux patch [1]. On musl the default +# implementation of updwtmpx will give conflicting types error and build will +# fail. This patch should fix that. This issue is noticed together with bug +# 766866 [2]. +# [1]: https://git.alpinelinux.org/aports/tree/community/lightdm/musl-updwtmpx.patch +# [2]: https://bugs.gentoo.org/766866 +diff --git a/src/session-child.c b/src/session-child.c +index eef51e4..0052904 100644 +--- a/src/session-child.c ++++ b/src/session-child.c +@@ -193,8 +193,13 @@ read_xauth (void) + } + + /* GNU provides this but we can't rely on that so let's make our own version */ ++#if defined(__GLIBC__) + static void + updwtmpx (const gchar *wtmp_file, struct utmpx *ut) ++#else // use this version in libc's other than glibc ++void ++updwtmpx (const char *wtmp_file, const struct utmpx *ut) ++#endif + { + struct utmp u; + memset (&u, 0, sizeof (u)); diff --git a/x11-misc/lightdm/lightdm-1.30.0-r3.ebuild b/x11-misc/lightdm/lightdm-1.30.0-r3.ebuild index 2c0883c92e03..5f23bb293fae 100644 --- a/x11-misc/lightdm/lightdm-1.30.0-r3.ebuild +++ b/x11-misc/lightdm/lightdm-1.30.0-r3.ebuild @@ -51,6 +51,11 @@ DOCS=( NEWS ) RESTRICT="test" REQUIRED_USE="vala? ( introspection )" +PATCHES=( + "${FILESDIR}"/${PN}-1.30.0-musl-locale.patch + "${FILESDIR}"/${PN}-1.30.0-musl-updwtmpx.patch +) + pkg_setup() { export LIGHTDM_USER=${LIGHTDM_USER:-lightdm} }