From unknown Mon Jun 23 02:25:22 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#76878] gnu: xinit: Fix broken mcookie path in startx. Resent-From: B. Wilson Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 09 Mar 2025 04:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 76878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 76878@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17414942472732 (code B ref -1); Sun, 09 Mar 2025 04:25:02 +0000 Received: (at submit) by debbugs.gnu.org; 9 Mar 2025 04:24:07 +0000 Received: from localhost ([127.0.0.1]:57588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tr8Cs-0000hz-KD for submit@debbugs.gnu.org; Sat, 08 Mar 2025 23:24:07 -0500 Received: from lists.gnu.org ([2001:470:142::17]:38036) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tr8Cp-0000hN-6J for submit@debbugs.gnu.org; Sat, 08 Mar 2025 23:24:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tr8Ci-0002L8-8P for guix-patches@gnu.org; Sat, 08 Mar 2025 23:23:56 -0500 Received: from m42-5.mailgun.net ([69.72.42.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tr8Cf-0006DD-Oz for guix-patches@gnu.org; Sat, 08 Mar 2025 23:23:55 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.wilsonb.com; q=dns/txt; s=krs; t=1741494231; x=1741501431; h=Content-Type: MIME-Version: Message-Id: Subject: Subject: From: From: To: To: Date: Sender: Sender; bh=MwOxyZM9VpezENA2FR3cWRIoZDgUc5oVJeCVwCIVIBs=; b=jyDogejqprTTy4TX8vgdR0GzSRamxU2Va5ReunY+K4xCuXdnTRlJkUOR+I14mNUFzqvXh+9g71AwzQ3EWG/WHC/uEkdavcDoM730Ltp16zxGlZ0MyiLUOy3DsixcHSl73Z6oLuU4gcW+Ypd1f7fI9dIP7cHOaszPqkY2GujpeZ4DSvABezRzh1L/h1A5p7RCbOYYU9DwrTBH0M3drJrCWry9/Vu4ko88kKIwog35RPb6V4lkw4Ac9BmWh1f4UXCYmvhPSk3HeMOMgFDVGR1H+tcnUcE5mbHV5CxFvQXP00l6x7feMm7f4SitLMwHSuZfAah2RH0cBsZm4RKTlUeF6w== X-Mailgun-Sending-Ip: 69.72.42.5 X-Mailgun-Sending-Ip-Pool-Name: X-Mailgun-Sending-Ip-Pool: X-Mailgun-Sid: WyI5MmEzMyIsImd1aXgtcGF0Y2hlc0BnbnUub3JnIiwiMDg1NDdhIl0= Received: from wilsonb.com (wilsonb.com [104.199.203.42]) by 1f86744badb7 with SMTP id 67cd17d76c41ba7804b515ab (version=TLS1.3, cipher=TLS_AES_128_GCM_SHA256); Sun, 09 Mar 2025 04:23:51 GMT Received: from localhost (softbank126227227137.bbtec.net [126.227.227.137]) by wilsonb.com (Postfix) with ESMTPSA id 82876A190C for ; Sun, 9 Mar 2025 04:23:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wilsonb.com; s=201703; t=1741494228; bh=MwOxyZM9VpezENA2FR3cWRIoZDgUc5oVJeCVwCIVIBs=; h=Date:To:From:Subject:From; b=gmYdeEcoi7MFFGZAlT+xiRrGScSjNuvms5T2teLNoXB0jhX8ux8Kwg5tTLYv3dN3M sbVSkHRuAO/ujj3T89HvG8K8vvrEcSO9MummwTS5c3mpeoVcUjNF1LCJJ5wFx2jGwk qagkmfaPZIonga+IZoMf4wmHctUJPnxIMIsikVola0BsiUip1uLw8AbBc6mPzecBVb noDoFITnDjYD5GqZaC32zshCns+AFjA4IHXc45onDj68eHKrA6maps8USRjjdd2Dho lcJuIpFoF1VQ3CLq1UKx8sOeq9vREuaTAtO4eAMzfXPCbJtONkg3zLp5P09QGBLkSr lvWTe4l3LM+GAehWCHN4+UBUIO3ZgmiXIkNQbOEeAdBaS1U3lDABaPPJmp7MkEqjtC L+69ZKca8u48MhAE7juAeTsHvWo18yEob4npPPAg3lptdDki4SbBKBK4WFVd8qoAXb I4tiwzbNYpGi77XzIVYkAa/aER40Lhvxenzk7veX4TE6MDZzMB07IHmR9msvYPWO5w wX2lKdG05EYvD5LECtIuSqM8tTOXD+WeYAmvjMMjyQC7Bmv4wrwmJTgViaL9EAEc0/ Js3dfkat21rz07NZlYnclhLEog9HhL4StHFZkS+2CpbCKHv6xi9Ju9nK6F7xGl80ef CqWHMFqcw9Px94WrDh9pveNY= Date: Sun, 09 Mar 2025 13:23:41 +0900 From: B. Wilson Message-Id: <3TFGIH7KFRA8E.2O2IVAVY05SK6@example.com> User-Agent: mblaze/1.2 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_4f775ba023cffc3c735e46a7_=_" Received-SPF: pass client-ip=69.72.42.5; envelope-from=bounce+686de0.08547a-guix-patches=gnu.org@mg.wilsonb.com; helo=m42-5.mailgun.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) This is a multipart message in MIME format. ------_=_4f775ba023cffc3c735e46a7_=_ Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable The xinit upgrade to 1.4.3 introduced a large upstream changeset that ends = up breaking startx in a couple cases. This commit patches the upstream build t= o 1) let startx use mcookie, and 2) protect the injected mcookie path. ------_=_4f775ba023cffc3c735e46a7_=_ Content-Disposition: attachment; filename*0*=UTF-8''0001-gnu-xinit-Fix-broken-mcookie-path-in-startx.patc; filename*1*=h Content-Type: text/x-diff Content-Transfer-Encoding: quoted-printable =46rom daef339310d7fe902623187ea5df19fc797d00d4 Mon Sep 17 00:00:00 2001 =46rom: "B. Wilson" =44ate: Sun, 9 Mar 2025 13:12:55 +0900 =53ubject: [PATCH] gnu: xinit: Fix broken mcookie path in startx. =0A* gnu/packages/patches/xinit-startx-mcookie-path.patch: New file. =2A gnu/local.mk (dist_patch_DATA): Register patch. =2A gnu/packages/xorg.scm (xinit)[source]: Add patch. =2D-- =20gnu/local.mk | 3 ++- =20.../patches/xinit-startx-mcookie-path.patch | 23 +++++++++++++++++++ =20gnu/packages/xorg.scm | 14 +++++------ =203 files changed, 32 insertions(+), 8 deletions(-) =20create mode 100644 gnu/packages/patches/xinit-startx-mcookie-path.patch =0Adiff --git a/gnu/local.mk b/gnu/local.mk =69ndex 9082ed04bf..5f5e219e85 100644 =2D-- a/gnu/local.mk =2B++ b/gnu/local.mk =40@ -2422,7 +2422,8 @@ dist_patch_DATA =3D \ =20 %D%/packages/patches/xfig-Fix-double-free-when-requesting-MediaBox.pat= =63h \ =20 %D%/packages/patches/xfig-Use-pkg-config-to-set-fontconfig-CFLAGS-and-= =4CIBS.patch \ =20 %D%/packages/patches/xfce4-settings-defaults.patch \ =2D %D%/packages/patches/xgboost-use-system-dmlc-core.patch \ =2B %D%/packages/patches/xgboost-use-system-dmlc-core.patch \ =2B %D%/packages/patches/xinit-startx-mcookie-path.patch \ =20 %D%/packages/patches/xmonad-dynamic-linking.patch \ =20 %D%/packages/patches/xplanet-1.3.1-cxx11-eof.patch \ =20 %D%/packages/patches/xplanet-1.3.1-libdisplay_DisplayOutput.cpp.patch = =5C =64iff --git a/gnu/packages/patches/xinit-startx-mcookie-path.patch b/gnu/p= =61ckages/patches/xinit-startx-mcookie-path.patch =6Eew file mode 100644 =69ndex 0000000000..050603433b =2D-- /dev/null =2B++ b/gnu/packages/patches/xinit-startx-mcookie-path.patch =40@ -0,0 +1,23 @@ =2BThis patch fixes two bugs in upstream mcookie detection: 1) If mcookie i= =73 not =2Bdetected, we still need to set HAS_COOKIE_HANDLER and MK_COOKIE, and 2) = =74he =2Bvalue for MK_COOKIE must be a string in order to disallow further prepro= =63essor =2Bexpansions. =2B =2BIn particular for 2, if we fail to surround the path in quotes, our path= =0A+contains the token "linux", which gcc further expands, creating an inva= =6Cid =2Bpath. =2B =2B--- a/configure.ac 2025-03-08 16:48:34.476791744 +0900 =2B+++ b/configure.ac 2025-03-08 16:48:30.208791623 +0900 =2B@@ -157,8 +157,10 @@ =2B fi =2B fi =2B if test "x$MCOOKIE" !=3D x ; then =2B- STARTX_COOKIE_FLAGS=3D'-DHAS_COOKIE_MAKER -DMK_COOKIE=3D"$(MCOOKIE)"' =2B+ STARTX_COOKIE_FLAGS=3D'-DHAS_COOKIE_MAKER -DMK_COOKIE=3D"'"'"'$(MCOOKI= =45)'"'"'"' =2B AC_MSG_NOTICE([startx will depend on "$MCOOKIE" to generate xauth cook= =69es]) =2B+else =2B+ STARTX_COOKIE_FLAGS=3D'-DHAS_COOKIE_MAKER -DMK_COOKIE=3D' =2B fi =2B AC_SUBST(STARTX_COOKIE_FLAGS) =2B=20 =64iff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm =69ndex 15ee9edc79..db34a58f6e 100644 =2D-- a/gnu/packages/xorg.scm =2B++ b/gnu/packages/xorg.scm =40@ -42,6 +42,7 @@ =20;;; Copyright =C2=A9 2024 Nicolas Graves =20;;; Copyright =C2=A9 2025 Artyom V. Poptsov =20;;; Copyright =C2=A9 2025 =E5=AE=8B=E6=96=87=E6=AD=A6 = =0A+;;; Copyright =C2=A9 2025 B. Wilson =20;;; =20;;; This file is part of GNU Guix. =20;;; =40@ -5898,14 +5899,13 @@ (define-public xinit =20 version ".tar.xz")) =20 (sha256 =20 (base32 =2D "0npx32mi035xkz26gp7raps5xsq4v7rgayy1q794h4d3lqhryh46"))= =29) =2B "0npx32mi035xkz26gp7raps5xsq4v7rgayy1q794h4d3lqhryh46"))= =0A+ (patches =2B (search-patches "xinit-startx-mcookie-path.patch")))) =20 (build-system gnu-build-system) =2D (inputs =2D (list xorgproto libx11)) =2D (native-inputs =2D (list pkg-config)) =2D (propagated-inputs =2D (list xauth)) =2B (inputs (list libx11 util-linux xorgproto)) =2B (native-inputs (list pkg-config)) =2B (propagated-inputs (list xauth)) =20 (home-page "https://www.x.org/") =20 (synopsis "Commands to start the X Window server") =20 (description =2D-=20 =32.48.1 =0A= ------_=_4f775ba023cffc3c735e46a7_=_-- From unknown Mon Jun 23 02:25:22 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: B. Wilson Subject: bug#76878: closed (Re: [bug#76878] gnu: xinit: Fix broken mcookie path in startx., [PATCH] gnu: xinit: Fix broken mcookie path in startx.) Message-ID: References: <87r02tfgzz.fsf@gnu.org> <3TFGIH7KFRA8E.2O2IVAVY05SK6@example.com> X-Gnu-PR-Message: they-closed 76878 X-Gnu-PR-Package: guix-patches Reply-To: 76878@debbugs.gnu.org Date: Wed, 19 Mar 2025 10:33:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1742380382-8021-1" This is a multi-part message in MIME format... ------------=_1742380382-8021-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #76878: gnu: xinit: Fix broken mcookie path in startx. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 76878@debbugs.gnu.org. --=20 76878: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D76878 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1742380382-8021-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 76878-done) by debbugs.gnu.org; 19 Mar 2025 10:32:31 +0000 Received: from localhost ([127.0.0.1]:48593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tuqis-00024X-OZ for submit@debbugs.gnu.org; Wed, 19 Mar 2025 06:32:30 -0400 Received: from hera.aquilenet.fr ([185.233.100.1]:60238) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tuqio-00024E-UI for 76878-done@debbugs.gnu.org; Wed, 19 Mar 2025 06:32:28 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id D366542C; Wed, 19 Mar 2025 11:32:17 +0100 (CET) Authentication-Results: hera.aquilenet.fr; none X-Virus-Scanned: Debian amavis at hera.aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavis, port 10024) with ESMTP id O99v3MTrST-h; Wed, 19 Mar 2025 11:32:17 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id B700E3DB; Wed, 19 Mar 2025 11:32:16 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: B. Wilson Subject: Re: [bug#76878] gnu: xinit: Fix broken mcookie path in startx., [PATCH] gnu: xinit: Fix broken mcookie path in startx. In-Reply-To: <3TFGIH7KFRA8E.2O2IVAVY05SK6@example.com> (B. Wilson's message of "Sun, 09 Mar 2025 13:23:41 +0900") References: <3TFGIH7KFRA8E.2O2IVAVY05SK6@example.com> Date: Wed, 19 Mar 2025 11:32:16 +0100 Message-ID: <87r02tfgzz.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: D366542C X-Spamd-Result: default: False [-5.86 / 15.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM(-2.76)[-0.919]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCPT_COUNT_TWO(0.00)[2]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Action: no action X-Spamd-Bar: ----- X-Rspamd-Server: hera X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 76878-done Cc: 76878-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi, B. Wilson skribis: > From daef339310d7fe902623187ea5df19fc797d00d4 Mon Sep 17 00:00:00 2001 > From: "B. Wilson" > Date: Sun, 9 Mar 2025 13:12:55 +0900 > Subject: [PATCH] gnu: xinit: Fix broken mcookie path in startx. > > * gnu/packages/patches/xinit-startx-mcookie-path.patch: New file. > * gnu/local.mk (dist_patch_DATA): Register patch. > * gnu/packages/xorg.scm (xinit)[source]: Add patch. Applied. Thanks for diving in the configure machinery of this thing! :-) Ludo=E2=80=99. ------------=_1742380382-8021-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 9 Mar 2025 04:24:07 +0000 Received: from localhost ([127.0.0.1]:57588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tr8Cs-0000hz-KD for submit@debbugs.gnu.org; Sat, 08 Mar 2025 23:24:07 -0500 Received: from lists.gnu.org ([2001:470:142::17]:38036) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tr8Cp-0000hN-6J for submit@debbugs.gnu.org; Sat, 08 Mar 2025 23:24:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tr8Ci-0002L8-8P for guix-patches@gnu.org; Sat, 08 Mar 2025 23:23:56 -0500 Received: from m42-5.mailgun.net ([69.72.42.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tr8Cf-0006DD-Oz for guix-patches@gnu.org; Sat, 08 Mar 2025 23:23:55 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.wilsonb.com; q=dns/txt; s=krs; t=1741494231; x=1741501431; h=Content-Type: MIME-Version: Message-Id: Subject: Subject: From: From: To: To: Date: Sender: Sender; bh=MwOxyZM9VpezENA2FR3cWRIoZDgUc5oVJeCVwCIVIBs=; b=jyDogejqprTTy4TX8vgdR0GzSRamxU2Va5ReunY+K4xCuXdnTRlJkUOR+I14mNUFzqvXh+9g71AwzQ3EWG/WHC/uEkdavcDoM730Ltp16zxGlZ0MyiLUOy3DsixcHSl73Z6oLuU4gcW+Ypd1f7fI9dIP7cHOaszPqkY2GujpeZ4DSvABezRzh1L/h1A5p7RCbOYYU9DwrTBH0M3drJrCWry9/Vu4ko88kKIwog35RPb6V4lkw4Ac9BmWh1f4UXCYmvhPSk3HeMOMgFDVGR1H+tcnUcE5mbHV5CxFvQXP00l6x7feMm7f4SitLMwHSuZfAah2RH0cBsZm4RKTlUeF6w== X-Mailgun-Sending-Ip: 69.72.42.5 X-Mailgun-Sending-Ip-Pool-Name: X-Mailgun-Sending-Ip-Pool: X-Mailgun-Sid: WyI5MmEzMyIsImd1aXgtcGF0Y2hlc0BnbnUub3JnIiwiMDg1NDdhIl0= Received: from wilsonb.com (wilsonb.com [104.199.203.42]) by 1f86744badb7 with SMTP id 67cd17d76c41ba7804b515ab (version=TLS1.3, cipher=TLS_AES_128_GCM_SHA256); Sun, 09 Mar 2025 04:23:51 GMT Received: from localhost (softbank126227227137.bbtec.net [126.227.227.137]) by wilsonb.com (Postfix) with ESMTPSA id 82876A190C for ; Sun, 9 Mar 2025 04:23:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wilsonb.com; s=201703; t=1741494228; bh=MwOxyZM9VpezENA2FR3cWRIoZDgUc5oVJeCVwCIVIBs=; h=Date:To:From:Subject:From; b=gmYdeEcoi7MFFGZAlT+xiRrGScSjNuvms5T2teLNoXB0jhX8ux8Kwg5tTLYv3dN3M sbVSkHRuAO/ujj3T89HvG8K8vvrEcSO9MummwTS5c3mpeoVcUjNF1LCJJ5wFx2jGwk qagkmfaPZIonga+IZoMf4wmHctUJPnxIMIsikVola0BsiUip1uLw8AbBc6mPzecBVb noDoFITnDjYD5GqZaC32zshCns+AFjA4IHXc45onDj68eHKrA6maps8USRjjdd2Dho lcJuIpFoF1VQ3CLq1UKx8sOeq9vREuaTAtO4eAMzfXPCbJtONkg3zLp5P09QGBLkSr lvWTe4l3LM+GAehWCHN4+UBUIO3ZgmiXIkNQbOEeAdBaS1U3lDABaPPJmp7MkEqjtC L+69ZKca8u48MhAE7juAeTsHvWo18yEob4npPPAg3lptdDki4SbBKBK4WFVd8qoAXb I4tiwzbNYpGi77XzIVYkAa/aER40Lhvxenzk7veX4TE6MDZzMB07IHmR9msvYPWO5w wX2lKdG05EYvD5LECtIuSqM8tTOXD+WeYAmvjMMjyQC7Bmv4wrwmJTgViaL9EAEc0/ Js3dfkat21rz07NZlYnclhLEog9HhL4StHFZkS+2CpbCKHv6xi9Ju9nK6F7xGl80ef CqWHMFqcw9Px94WrDh9pveNY= Date: Sun, 09 Mar 2025 13:23:41 +0900 To: guix-patches@gnu.org From: B. Wilson Subject: gnu: xinit: Fix broken mcookie path in startx. Message-Id: <3TFGIH7KFRA8E.2O2IVAVY05SK6@example.com> User-Agent: mblaze/1.2 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_4f775ba023cffc3c735e46a7_=_" Received-SPF: pass client-ip=69.72.42.5; envelope-from=bounce+686de0.08547a-guix-patches=gnu.org@mg.wilsonb.com; helo=m42-5.mailgun.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) This is a multipart message in MIME format. ------_=_4f775ba023cffc3c735e46a7_=_ Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable The xinit upgrade to 1.4.3 introduced a large upstream changeset that ends = up breaking startx in a couple cases. This commit patches the upstream build t= o 1) let startx use mcookie, and 2) protect the injected mcookie path. ------_=_4f775ba023cffc3c735e46a7_=_ Content-Disposition: attachment; filename*0*=UTF-8''0001-gnu-xinit-Fix-broken-mcookie-path-in-startx.patc; filename*1*=h Content-Type: text/x-diff Content-Transfer-Encoding: quoted-printable =46rom daef339310d7fe902623187ea5df19fc797d00d4 Mon Sep 17 00:00:00 2001 =46rom: "B. Wilson" =44ate: Sun, 9 Mar 2025 13:12:55 +0900 =53ubject: [PATCH] gnu: xinit: Fix broken mcookie path in startx. =0A* gnu/packages/patches/xinit-startx-mcookie-path.patch: New file. =2A gnu/local.mk (dist_patch_DATA): Register patch. =2A gnu/packages/xorg.scm (xinit)[source]: Add patch. =2D-- =20gnu/local.mk | 3 ++- =20.../patches/xinit-startx-mcookie-path.patch | 23 +++++++++++++++++++ =20gnu/packages/xorg.scm | 14 +++++------ =203 files changed, 32 insertions(+), 8 deletions(-) =20create mode 100644 gnu/packages/patches/xinit-startx-mcookie-path.patch =0Adiff --git a/gnu/local.mk b/gnu/local.mk =69ndex 9082ed04bf..5f5e219e85 100644 =2D-- a/gnu/local.mk =2B++ b/gnu/local.mk =40@ -2422,7 +2422,8 @@ dist_patch_DATA =3D \ =20 %D%/packages/patches/xfig-Fix-double-free-when-requesting-MediaBox.pat= =63h \ =20 %D%/packages/patches/xfig-Use-pkg-config-to-set-fontconfig-CFLAGS-and-= =4CIBS.patch \ =20 %D%/packages/patches/xfce4-settings-defaults.patch \ =2D %D%/packages/patches/xgboost-use-system-dmlc-core.patch \ =2B %D%/packages/patches/xgboost-use-system-dmlc-core.patch \ =2B %D%/packages/patches/xinit-startx-mcookie-path.patch \ =20 %D%/packages/patches/xmonad-dynamic-linking.patch \ =20 %D%/packages/patches/xplanet-1.3.1-cxx11-eof.patch \ =20 %D%/packages/patches/xplanet-1.3.1-libdisplay_DisplayOutput.cpp.patch = =5C =64iff --git a/gnu/packages/patches/xinit-startx-mcookie-path.patch b/gnu/p= =61ckages/patches/xinit-startx-mcookie-path.patch =6Eew file mode 100644 =69ndex 0000000000..050603433b =2D-- /dev/null =2B++ b/gnu/packages/patches/xinit-startx-mcookie-path.patch =40@ -0,0 +1,23 @@ =2BThis patch fixes two bugs in upstream mcookie detection: 1) If mcookie i= =73 not =2Bdetected, we still need to set HAS_COOKIE_HANDLER and MK_COOKIE, and 2) = =74he =2Bvalue for MK_COOKIE must be a string in order to disallow further prepro= =63essor =2Bexpansions. =2B =2BIn particular for 2, if we fail to surround the path in quotes, our path= =0A+contains the token "linux", which gcc further expands, creating an inva= =6Cid =2Bpath. =2B =2B--- a/configure.ac 2025-03-08 16:48:34.476791744 +0900 =2B+++ b/configure.ac 2025-03-08 16:48:30.208791623 +0900 =2B@@ -157,8 +157,10 @@ =2B fi =2B fi =2B if test "x$MCOOKIE" !=3D x ; then =2B- STARTX_COOKIE_FLAGS=3D'-DHAS_COOKIE_MAKER -DMK_COOKIE=3D"$(MCOOKIE)"' =2B+ STARTX_COOKIE_FLAGS=3D'-DHAS_COOKIE_MAKER -DMK_COOKIE=3D"'"'"'$(MCOOKI= =45)'"'"'"' =2B AC_MSG_NOTICE([startx will depend on "$MCOOKIE" to generate xauth cook= =69es]) =2B+else =2B+ STARTX_COOKIE_FLAGS=3D'-DHAS_COOKIE_MAKER -DMK_COOKIE=3D' =2B fi =2B AC_SUBST(STARTX_COOKIE_FLAGS) =2B=20 =64iff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm =69ndex 15ee9edc79..db34a58f6e 100644 =2D-- a/gnu/packages/xorg.scm =2B++ b/gnu/packages/xorg.scm =40@ -42,6 +42,7 @@ =20;;; Copyright =C2=A9 2024 Nicolas Graves =20;;; Copyright =C2=A9 2025 Artyom V. Poptsov =20;;; Copyright =C2=A9 2025 =E5=AE=8B=E6=96=87=E6=AD=A6 = =0A+;;; Copyright =C2=A9 2025 B. Wilson =20;;; =20;;; This file is part of GNU Guix. =20;;; =40@ -5898,14 +5899,13 @@ (define-public xinit =20 version ".tar.xz")) =20 (sha256 =20 (base32 =2D "0npx32mi035xkz26gp7raps5xsq4v7rgayy1q794h4d3lqhryh46"))= =29) =2B "0npx32mi035xkz26gp7raps5xsq4v7rgayy1q794h4d3lqhryh46"))= =0A+ (patches =2B (search-patches "xinit-startx-mcookie-path.patch")))) =20 (build-system gnu-build-system) =2D (inputs =2D (list xorgproto libx11)) =2D (native-inputs =2D (list pkg-config)) =2D (propagated-inputs =2D (list xauth)) =2B (inputs (list libx11 util-linux xorgproto)) =2B (native-inputs (list pkg-config)) =2B (propagated-inputs (list xauth)) =20 (home-page "https://www.x.org/") =20 (synopsis "Commands to start the X Window server") =20 (description =2D-=20 =32.48.1 =0A= ------_=_4f775ba023cffc3c735e46a7_=_-- ------------=_1742380382-8021-1--