GNU bug report logs - #45064
[PATCH 0/2] Set environment variables for GTK+ input methods via profile startup files

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: iyzsong@HIDDEN; Keywords: patch; dated Sun, 6 Dec 2020 06:07:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 45064 <at> debbugs.gnu.org:


Received: (at 45064) by debbugs.gnu.org; 7 Dec 2020 14:47:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 07 09:47:12 2020
Received: from localhost ([127.0.0.1]:53028 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kmHnE-0008QN-1d
	for submit <at> debbugs.gnu.org; Mon, 07 Dec 2020 09:47:12 -0500
Received: from mailrelay.tugraz.at ([129.27.2.202]:45610)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leo.prikler@HIDDEN>) id 1kmHn9-0008M0-E0
 for 45064 <at> debbugs.gnu.org; Mon, 07 Dec 2020 09:47:11 -0500
Received: from nijino.local (217-149-166-73.nat.highway.telekom.at
 [217.149.166.73])
 by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4CqR3W5Xryz1LLyb;
 Mon,  7 Dec 2020 15:47:03 +0100 (CET)
DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4CqR3W5Xryz1LLyb
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at;
 s=mailrelay; t=1607352424;
 bh=7P+3+41aVZtNvfQ9Im4QSlAmPWww1S3Bh4viZV2FuPc=;
 h=Subject:From:To:Cc:Date:In-Reply-To:References:From;
 b=J2zCK0CjW+Kxr59hI2efbe5axkKIi029Ovoh0zzvWq3eS8cC39Iros6VO2v2aC7xc
 dTNVf0dVsrxoZizTwXMxMn/zjHS+aZ9LrOkdDH3xTMddImFORQogqNJRVEILHONLmK
 DwT6m6pDzTBEcRm/WWVh4uFeLqv283PYmCGiQ2m4=
Message-ID: <5dff940dcf1ba6d6b4facfa9eb1167f23c6add04.camel@HIDDEN>
Subject: Re: [PATCH 0/2] Set environment variables for GTK+ input methods
 via profile startup files
From: Leo Prikler <leo.prikler@HIDDEN>
To: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@HIDDEN>
Date: Mon, 07 Dec 2020 15:47:03 +0100
In-Reply-To: <TYAP286MB01850D310F024AF85AAB129DA3CE0@HIDDEN>
References: <TYAP286MB018580C92BF3E9783BD56362A3CF0@HIDDEN>
 <72dca2daaef417e9fef63e43f16eb76fe215f066.camel@HIDDEN>
 <TYAP286MB01850D310F024AF85AAB129DA3CE0@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.34.2 
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw
X-Spam-Scanner: SpamAssassin 3.003001 
X-Spam-Score-relay: -1.9
X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 45064
Cc: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@HIDDEN>,
 45064 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hello,

Am Montag, den 07.12.2020, 21:55 +0800 schrieb 宋文武:
> [...]
> >   b. What about `guix environment`?
> For `guix environment`, it dosen't load `/etc/profile`, so this have
> no
> effect, but maybe we should make it doing so?
It may not load `/etc/profile`, but it will load
`$GUIX_ENVIRONMENT/etc/profile`.

> > 2. Which purpose would sourcing those files offer other than
> > setting
> > environment variables?  What would be permissible
> > actions?  Remember,
> > that those would be executed whenever the user spawns a shell, so
> > while
> > you could put stuff like `fc-cache -r` in there, I personally think
> > you
> > ought not to.
> Sure, for set environment variables, I can't came up with other
> examples. It's just like support '/etc/profile.d', but there are some
> packages (for now, only nix I think) that will set environment
> variables
> outside of store and profile (NIX_PATH=$HOME/.nix-defexpr/channels,
> etc)
> which would be difficult for search-paths.  I agree with you that
> profile should not run things that modify files.
I think another potential candidate if we were to head into that
direction might be flatpak, but should those packages not rather assume
meaningful default values if said variables are unset?

> > I believe a proper fix for GTK would be to allow setting multiple
> > IM_MODULE_FILEs instead of a single one and using search paths.
> Our search paths can be a single file (eg: SSL_CERT_FILE) or mutiple
> files, but we need to add it to all GTK+ input methods (only ibus and
> fcitx, but it's like GST_PLUGIN_SYSTEM_PATH every where, not ideal),
> my
> point is that set thoses environment varaibles once profile level is
> better than set them many times each package.  If profile hook can
> contribute to the search-paths of manifest, I'd go for it.
I think there might be a way to work around that.  First, create a
hidden package, that uses GTK+ as an input and propagates the immodules
as well as share/locale (for translation) towards its output (the
source can be empty). Add a search-path for GUIX_GTK*_IM_MODULE_FILE to
that package.  Propagate that input from ibus and fcitx.  Then make it
so that the IM module file builder looks for that package instead of
plain GTK+.

If you do everything right, the IM module file builder should only run
if a package, that adds an IM module is in the profile and that IM
module file will then be used to set GUIX_GTK*_IM_MODULE_FILE.

Regards,
Leo





Information forwarded to guix-patches@HIDDEN:
bug#45064; Package guix-patches. Full text available.

Message received at 45064 <at> debbugs.gnu.org:


Received: (at 45064) by debbugs.gnu.org; 7 Dec 2020 13:54:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 07 08:54:48 2020
Received: from localhost ([127.0.0.1]:52946 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kmGyV-0003BH-WC
	for submit <at> debbugs.gnu.org; Mon, 07 Dec 2020 08:54:48 -0500
Received: from mail-oln040092254034.outbound.protection.outlook.com
 ([40.92.254.34]:19392 helo=APC01-PU1-obe.outbound.protection.outlook.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iyzsong@HIDDEN>) id 1kmGyT-0003Ax-7I
 for 45064 <at> debbugs.gnu.org; Mon, 07 Dec 2020 08:54:46 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=XCoderwhsRb/b0BANv3sYsvm8rE+QJTN/z51ADLVL5Don4Rxx64jedzQJg3dDMiUTBQ1NFcT2hkviDtETFI6wK6NRNYfI84QRlFPLqmlT4QrfRqdLt1cN2/pajgZsXoTKqrcOpIvLiFQTropmxO/fLcPNu8nX1xXP4yhLAQT65FWM5/fAzWxXfnDyr+bPKK6mljYvRAo8+dP9S+CvKZVZRSLJzf4Z973yfVXB51oSaeJTAjAmW6fvtNnwhqsaC5s9Sujw0ie1Dfc4r1j1VzTRCtEjb/QaSpbP68H3ih6wVmsSeoA03zKbi9aIYgVFD28uJ24bFqWwAogLAuXZOpGGw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=qsJHnyn+fHWYxPUPhSUBX856mSFCZWo1ft06Y35z+t0=;
 b=N8JuTooyawBbL+vmf1bXlKaQKjI7G68CPHnuN2B0fGVVtwJixNriOrAHld1p+9+KMhPgx8pvUrrY2g9IknD33mV7WHz7VbZnjklVcNf1U85EOsdsTYPdrEzqCc4XqVsgb3HHvN8/0/uCmvU+qeFNm3O75VUs/ZcfWkGTJnNyHsEZJM2bfwdn+v9zhRI0L3Y5OXtdQSBDok6SderF858nUjvq3DI5Pd5eAbBvj+RijdZx2X61ocTzfkRwtMucgRtSh4yhlgRXfjGinl4iSdiiVdZzH9WejbjI1hb7AWTxSP7jKdDmnFYD2LgOarJRPHKli9U4VEuCnn1MoLj8LNbZug==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none;
 dkim=none; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com;
 s=selector1;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=qsJHnyn+fHWYxPUPhSUBX856mSFCZWo1ft06Y35z+t0=;
 b=Zaq8C7wcDPoR61OJUb0VVgrIarfBpsdvqGP8Gqkm2bSWXoQP1/3psXHW+UeoLf1rky96u8abJDkWW+8birV8/xknQLTyclDJLJFYR8xWkFMERlcKE5jLnEsDE3RWFPTq9pKbLWrP1xXd/bAivrdod0zzoTj7YnIFsqKlcKCQuZLS6I76LB8swR3exX7ltzdrOwqw9Z6kHMO3CfCTxX8W8jaiRPtVSBexJqn6THDJlIJp65elkah0TmKl97sMZPmRINq6s3s4V1DI3AcrfJoRzaxONbyVreOOxvFxvgQRV9P501zlQnnsJrukedRUDxsgxK70aLhZH+sxX2f5poJcyg==
Received: from HK2APC01FT039.eop-APC01.prod.protection.outlook.com
 (2a01:111:e400:7ebc::48) by
 HK2APC01HT215.eop-APC01.prod.protection.outlook.com (2a01:111:e400:7ebc::331)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.17; Mon, 7 Dec
 2020 13:54:36 +0000
Received: from TYAP286MB0185.JPNP286.PROD.OUTLOOK.COM (10.152.248.52) by
 HK2APC01FT039.mail.protection.outlook.com (10.152.249.7) with Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.3632.17 via Frontend Transport; Mon, 7 Dec 2020 13:54:36 +0000
X-IncomingTopHeaderMarker: OriginalChecksum:17757145CCD903AD344B9DC98772E0A8A311C681D5651ED75DD586035DE6A721;
 UpperCasedChecksum:7FE10561B931EB0C06368D6E59EDC993E4FB28AC7DC37932F0E7EAA46F7BF496;
 SizeAsReceived:8942; Count:47
Received: from TYAP286MB0185.JPNP286.PROD.OUTLOOK.COM
 ([fe80::d802:80c9:f6bd:1fbb]) by TYAP286MB0185.JPNP286.PROD.OUTLOOK.COM
 ([fe80::d802:80c9:f6bd:1fbb%8]) with mapi id 15.20.3632.017; Mon, 7 Dec 2020
 13:54:36 +0000
From: =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>
To: Leo Prikler <leo.prikler@HIDDEN>
Subject: Re: [PATCH 0/2] Set environment variables for GTK+ input methods
 via profile startup files
References: <TYAP286MB018580C92BF3E9783BD56362A3CF0@HIDDEN>
 <72dca2daaef417e9fef63e43f16eb76fe215f066.camel@HIDDEN>
Date: Mon, 07 Dec 2020 21:55:04 +0800
In-Reply-To: <72dca2daaef417e9fef63e43f16eb76fe215f066.camel@HIDDEN>
 (Leo Prikler's message of "Mon, 07 Dec 2020 13:09:05 +0100")
Message-ID: <TYAP286MB01850D310F024AF85AAB129DA3CE0@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-TMN: [M5g8dEq0CY/HEKOqQqfbpIXJNPBe8EI5u5NUHotrAuOEYadrrsR0w2aN8T2mA6v7]
X-ClientProxiedBy: HE1PR0701CA0079.eurprd07.prod.outlook.com
 (2603:10a6:3:64::23) To TYAP286MB0185.JPNP286.PROD.OUTLOOK.COM
 (2603:1096:404:8038::14)
X-Microsoft-Original-Message-ID: <87eek1yb47.fsf@HIDDEN>
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
Received: from localhost (2409:8a62:372:3600:2f1:f5ff:fe18:6bb) by
 HE1PR0701CA0079.eurprd07.prod.outlook.com (2603:10a6:3:64::23) with Microsoft
 SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.3654.7 via Frontend Transport; Mon, 7 Dec 2020 13:54:34 +0000
X-MS-PublicTrafficType: Email
X-IncomingHeaderCount: 47
X-EOPAttributedMessage: 0
X-MS-Office365-Filtering-Correlation-Id: ac7858ad-4409-44ed-1873-08d89ab7a1a0
X-MS-TrafficTypeDiagnostic: HK2APC01HT215:
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: HvmGjcU92E0+XrswEjPKGf4/MW5iWmYwAB0ZEm1HnX5gdW8nP071l1JsFstBbMp7eY93nlbR07/QRYa1T0p6erBz/qpLOwtg+COIg4SVs4eKw/jRhVm47Dun/8XvL+w3zYAHtOeE5QPKtVj80NgieAp0g6PFDzmZFVYBxVrwTpU6nlxa24sTOqIa1FndMg+kkF4wp/DypDFGn6+wqvbsEQ==
X-MS-Exchange-AntiSpam-MessageData: f8bdAj3P6uO5J6xU2qQAgwEwK7h2fDdZWCVXKozL40xY+OCF/+XT+RSrnDyPCbgzNo11uYI0Fhzhvzsx7eGvqNDTT/N5YdrU3g+4zJsTcXUSD1a4dXf3qTUb+d79dxoIeG6S1wyVS/HfOGQXpktW7YFsf9f8jB+EL+/s8PPfRh3LVR0dbPdoQnkneGXWz5obZhsEiczB376Y/cTZy+L4kg==
X-OriginatorOrg: outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: ac7858ad-4409-44ed-1873-08d89ab7a1a0
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2020 13:54:36.3709 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-CrossTenant-AuthSource: HK2APC01FT039.eop-APC01.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: Internet
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2APC01HT215
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 45064
Cc: =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>, 45064 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Leo Prikler <leo.prikler@HIDDEN> writes:

> Hello, =E5=AE=8B=E6=96=87=E6=AD=A6!
>
> As the author of [1] I might be a bit biased, but I have a few
> questions regarding this patch set:
Hello, thanks for asking!

> 1. Will it correctly pick up IM_MODULE_FILEs at system level if you
> also happen to have GTK+ applications installed at user level?
Oh, if I have ibus in system profile, and no input methods but GTK+
applications in user profile, then it will be broken, as user's profile
was source later in '/etc/profile', replace the IM_MODULE_FILE from
system profile.  Need more think...

>   a. What about multi-profile setups, where more than one profile
> contains GTK+ applications?
Because only a single variable for all gtk+ versions, We can only hope
those GTK+ applications from different profiles can accept the same
input methods modules, this patch dosen't improve the situation.

>   b. What about `guix environment`?
For `guix environment`, it dosen't load `/etc/profile`, so this have no
effect, but maybe we should make it doing so?

> 2. Which purpose would sourcing those files offer other than setting
> environment variables?  What would be permissible actions?  Remember,
> that those would be executed whenever the user spawns a shell, so while
> you could put stuff like `fc-cache -r` in there, I personally think you
> ought not to.
Sure, for set environment variables, I can't came up with other
examples. It's just like support '/etc/profile.d', but there are some
packages (for now, only nix I think) that will set environment variables
outside of store and profile (NIX_PATH=3D$HOME/.nix-defexpr/channels, etc)
which would be difficult for search-paths.  I agree with you that
profile should not run things that modify files.


>
> I believe a proper fix for GTK would be to allow setting multiple
> IM_MODULE_FILEs instead of a single one and using search paths.
Our search paths can be a single file (eg: SSL_CERT_FILE) or mutiple
files, but we need to add it to all GTK+ input methods (only ibus and
fcitx, but it's like GST_PLUGIN_SYSTEM_PATH every where, not ideal), my
point is that set thoses environment varaibles once profile level is
better than set them many times each package.  If profile hook can
contribute to the search-paths of manifest, I'd go for it.

So in the end, this may only bring benifits for packages that came up
with profile scripts in etc/profile.d, and I need to think more for
multiple profiles...

Thank you!




Information forwarded to guix-patches@HIDDEN:
bug#45064; Package guix-patches. Full text available.

Message received at 45064 <at> debbugs.gnu.org:


Received: (at 45064) by debbugs.gnu.org; 7 Dec 2020 12:09:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 07 07:09:14 2020
Received: from localhost ([127.0.0.1]:52771 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kmFKM-0002fz-Dp
	for submit <at> debbugs.gnu.org; Mon, 07 Dec 2020 07:09:14 -0500
Received: from mailrelay.tugraz.at ([129.27.2.202]:9007)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leo.prikler@HIDDEN>) id 1kmFKJ-0002fm-IN
 for 45064 <at> debbugs.gnu.org; Mon, 07 Dec 2020 07:09:12 -0500
Received: from nijino.local (217-149-166-73.nat.highway.telekom.at
 [217.149.166.73])
 by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4CqMYH0QNjz1LLyW;
 Mon,  7 Dec 2020 13:09:07 +0100 (CET)
DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4CqMYH0QNjz1LLyW
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at;
 s=mailrelay; t=1607342947;
 bh=rNnz8Ll8uWHG84nU3O4r4LAPDyxYhu0/z4ve9ngPVnw=;
 h=Subject:From:To:Cc:Date:In-Reply-To:References:From;
 b=Do0SL4R4DE83hLLuJI84flY4LXdS84lkgnv1rhNYvk4SgS/YZjXDmBU90aA28uzhb
 kQj8I39RoqE7KknK+sgx04/FouBSCg+gNmwBEcXfApnA7qFr5Vl2VZhBsp5hRGmkkC
 F8RETY/+SE9DWWZvv0GhK5iv5WQ/uUXduyPlV2dY=
Message-ID: <72dca2daaef417e9fef63e43f16eb76fe215f066.camel@HIDDEN>
Subject: Re: [PATCH 0/2] Set environment variables for GTK+ input methods
 via profile startup files
From: Leo Prikler <leo.prikler@HIDDEN>
To: iyzsong@HIDDEN, 45064 <at> debbugs.gnu.org
Date: Mon, 07 Dec 2020 13:09:05 +0100
In-Reply-To: <TYAP286MB018580C92BF3E9783BD56362A3CF0@HIDDEN>
References: <TYAP286MB018580C92BF3E9783BD56362A3CF0@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.34.2 
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw
X-Spam-Scanner: SpamAssassin 3.003001 
X-Spam-Score-relay: -1.9
X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 45064
Cc: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hello, 宋文武!

As the author of [1] I might be a bit biased, but I have a few
questions regarding this patch set:
1. Will it correctly pick up IM_MODULE_FILEs at system level if you
also happen to have GTK+ applications installed at user level?
  a. What about multi-profile setups, where more than one profile
contains GTK+ applications?
  b. What about `guix environment`?
2. Which purpose would sourcing those files offer other than setting
environment variables?  What would be permissible actions?  Remember,
that those would be executed whenever the user spawns a shell, so while
you could put stuff like `fc-cache -r` in there, I personally think you
ought not to.

I believe a proper fix for GTK would be to allow setting multiple
IM_MODULE_FILEs instead of a single one and using search paths.  [1]
was merely meant to have a reasonable default when installing ibus
system-wide, it can not (and will not) help you if you also happen to
have stuff in another profile.

Regards,
Leo

Am Sonntag, den 06.12.2020, 13:40 +0800 schrieb iyzsong@HIDDEN:
> From: 宋文武 <iyzsong@HIDDEN>
> 
> Hello, Guix!
> 
> To use GTK+ input methods, currently we need set
> ‘GUIX_GTK2_IM_MODULE_FILE’ and ‘GUIX_GTK3_IM_MODULE_FILE’ manually in
> .xsession or .bash_profile, we also having a patch [1] that set them
> for gnome via ‘gnome-desktop-service-type’.  But I think the right
> place to set them is the ‘gtk-im-modules’ profile hook, so the first
> patch make ‘etc/profile’ source files in ‘etc/profile.d/*.sh’, and
> the
> second patch add ‘etc/profile.d/gtk2-im-modules.sh’ and
> ‘etc/profile.d/gtk3-im-modules.sh’.  The first patch is also useful
> for packages that provide profile startup files (eg: nix).
> 
> Thanks!
> 
> [1] <https://issues.guix.gnu.org/44354>
> 
> Sou Bunnbu (宋文武) (2):
>   profiles: Load application specific startup files.
>   profiles: gtk-im-modules: Set environment variables for input
> methods.
> 
>  guix/build/profiles.scm | 13 ++++++++++++-
>  guix/profiles.scm       | 12 ++++++++++--
>  2 files changed, 22 insertions(+), 3 deletions(-)
> 





Information forwarded to guix-patches@HIDDEN:
bug#45064; Package guix-patches. Full text available.

Message received at 45064 <at> debbugs.gnu.org:


Received: (at 45064) by debbugs.gnu.org; 6 Dec 2020 16:40:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 06 11:40:35 2020
Received: from localhost ([127.0.0.1]:51022 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1klx5P-0006cv-7o
	for submit <at> debbugs.gnu.org; Sun, 06 Dec 2020 11:40:35 -0500
Received: from mail-oln040092254053.outbound.protection.outlook.com
 ([40.92.254.53]:6116 helo=APC01-PU1-obe.outbound.protection.outlook.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iyzsong@HIDDEN>) id 1klnKE-00035C-LD
 for 45064 <at> debbugs.gnu.org; Sun, 06 Dec 2020 01:15:20 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=KayVK+6ROWNUB3GGA7l83KEPRQGofKXrc8SdsiR6Eno+DvW/4Ji9Jnd7YCTalPN2nGsqhNWo3UIIzz6QV3JrO5QcEsMdY9gcMEkyjT5eYmyj423H2dZMsBKc52Hbr13Z7m0XrTuBEDyMrJmNd9Nlluq9Q6djkQl5Y8jHeKVVVIesYwNcBtEsC001zUdlgkZbvhUP1hN7K1vQ3QyWY19W642XlgR2xRrWtbS50P8PEaUBtJIreY42NdbHfAkq4oHA92IAmauAOKYhNNr6bh/7QcW3uV39vmJHVXTktJxzFwEpETk/wysEE0Se1jQoo7aV9uo+5YEipjEt3lXBMf6v9A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=bwhA00lS4TJbqdl84Dpv7Sp+T1I7NbuKm0dXhMthMR8=;
 b=md4kMH2Qz4q8g1vlE6ibwGdJ8uEwYBpaaMbxADchTXfm8aHdgSNqUb1sy7meymkdCfq5e60py6SkZfvZNrYGdJwOERcd/XQbZYOLzo0jswEQPWGL1GxBpk1S4vP79WE7dS9ZSAvJklFbUxbGjq/Nt9rcj2JpWyACaYRQdf+uthhW5AVuNvjYRotvuhlODMUL/nPU706CnpkpvNq9rlo7LyEfdRhOa/SpGG6L9cTt5xSdPHS9PBuLklped1NIYetdOhVtzJdFg88w/j3pcTWrmghGTAsdVu4XdG21mCSFqnsTxTNLALxo3OahKCLnY+PE+nrFowOun1KX4BqMoKQQbg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none;
 dkim=none; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com;
 s=selector1;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=bwhA00lS4TJbqdl84Dpv7Sp+T1I7NbuKm0dXhMthMR8=;
 b=F+kUguscY6cjp5pz/zd/JRM8XjJfwX7wUFAx9x3eSR/9TrTxmw1bSrGxrIyzwtr5CCkITSlvgQBfs4uNMWa3mKf5jcvq32maWkRQahtI3wcASWpUKNqKM26TgpPx7m2xE6iBw+CLbKWLA0jH0q9pNPqjxWbqdtEFMsE2Th9HL4rSi8wtF6yuv+zXlzpTakUv34tLqtxthCWxIDvGFNh//TAxwpwMTchMEAA3LQhiJwPz2ct5wLWolhnjhLSaqL0Tn0F0ABug2VMVcsCnhFtW6drxmmnLTIO++U6h0G69zRdQbyeroioKAQUuEFJzlf1SKgjTa6sv1WM3nYKkQn0ETQ==
Received: from HK2APC01FT046.eop-APC01.prod.protection.outlook.com
 (2a01:111:e400:7ebc::49) by
 HK2APC01HT164.eop-APC01.prod.protection.outlook.com (2a01:111:e400:7ebc::434)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.17; Sun, 6 Dec
 2020 06:15:04 +0000
Received: from TYAP286MB0185.JPNP286.PROD.OUTLOOK.COM (2a01:111:e400:7ebc::53)
 by HK2APC01FT046.mail.protection.outlook.com
 (2a01:111:e400:7ebc::436) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.17 via Frontend
 Transport; Sun, 6 Dec 2020 06:15:04 +0000
X-IncomingTopHeaderMarker: OriginalChecksum:E9C403F734E532898D2F44084E2C0AA34AF563170F17DCAF3FFA14E5F296C499;
 UpperCasedChecksum:4B77DA5E37873DF32233361176DCE4A348D26CBB4E9C5E7FF3F65A62D646694B;
 SizeAsReceived:8665; Count:47
Received: from TYAP286MB0185.JPNP286.PROD.OUTLOOK.COM
 ([fe80::d802:80c9:f6bd:1fbb]) by TYAP286MB0185.JPNP286.PROD.OUTLOOK.COM
 ([fe80::d802:80c9:f6bd:1fbb%8]) with mapi id 15.20.3632.017; Sun, 6 Dec 2020
 06:15:04 +0000
From: iyzsong@HIDDEN
To: 45064 <at> debbugs.gnu.org
Subject: [PATCH 2/2] profiles: gtk-im-modules: Set environment variables for
 input methods.
Date: Sun,  6 Dec 2020 14:15:15 +0800
Message-ID: <TYAP286MB01853FA44EBA3C46C5CCE754A3CF0@HIDDEN>
X-Mailer: git-send-email 2.29.2
In-Reply-To: <20201206061515.10449-1-iyzsong@HIDDEN>
References: <20201206061515.10449-1-iyzsong@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-TMN: [S5+kepw81Uxt78nbYPrglPMhryFkmUvJpIQM2fz7qFU22GytxqHF+nN5obxeuibm]
X-ClientProxiedBy: BYAPR07CA0104.namprd07.prod.outlook.com
 (2603:10b6:a03:12b::45) To TYAP286MB0185.JPNP286.PROD.OUTLOOK.COM
 (2603:1096:404:8038::14)
X-Microsoft-Original-Message-ID: <20201206061515.10449-2-iyzsong@HIDDEN>
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
Received: from localhost (2409:8a62:372:3600:2f1:f5ff:fe18:6bb) by
 BYAPR07CA0104.namprd07.prod.outlook.com (2603:10b6:a03:12b::45) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.18 via Frontend
 Transport; Sun, 6 Dec 2020 06:15:03 +0000
X-MS-PublicTrafficType: Email
X-IncomingHeaderCount: 47
X-EOPAttributedMessage: 0
X-MS-Office365-Filtering-Correlation-Id: 8ab26230-b5b0-4c26-a9e3-08d899ae456b
X-MS-TrafficTypeDiagnostic: HK2APC01HT164:
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: 8qqOgc4G8s5R7sumRKQtgcfe5FXOQlj4tXl5gfxuL9rzGQhPZhQ3C+EwTpiC75oGzm6o21zaH+YD5cVJiMyKALfaXPxZwPODw814iFybzqEQqViEkzEsJOPBhJFv0SXoYVYKzE7KNN44ELskb8tmTGtxKfjfV0868j2Bed4IG+hIMX3/COqsyXWNqUq8iy40oTKkAP1zlDxfSB67HKI0xQ==
X-MS-Exchange-AntiSpam-MessageData: Ydko/iDe2MPZFSwdLxnPihi7hxHxCcJA1uXvnVWsk1A5pTQgFI/CReQGNjT8EumYKKCJKVMh3xxS4WjQ4eHQvF3ux/H5sVDj6rA2rf9kiuOBhZIW0BmX7v4UaMdX4JMuBDMQ/ftW1HIM2rnnKMJz8OKMeGSsu4Fs+m0U0972Ls0mJPEJUlJba0vZLLfctlmYfQUb0XuFXm6EcEqQVpOmlA==
X-OriginatorOrg: outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 8ab26230-b5b0-4c26-a9e3-08d899ae456b
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Dec 2020 06:15:04.3656 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-CrossTenant-AuthSource: HK2APC01FT046.eop-APC01.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: Internet
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2APC01HT164
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 45064
X-Mailman-Approved-At: Sun, 06 Dec 2020 11:40:33 -0500
Cc: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From: 宋文武 <iyzsong@HIDDEN>

* guix/profiles.scm (gtk-im-modules): Set 'GUIX_GTK2_IM_MODULE_FILE' and
'GUIX_GTK3_IM_MODULE_FILE' via profile startup files.
---
 guix/profiles.scm | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/guix/profiles.scm b/guix/profiles.scm
index 1b15257210..c998329e8a 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -1151,7 +1151,10 @@ for both major versions of GTK+."
                                             (map (cut string-append <> prefix "/immodules")
                                                  '#$(manifest-inputs manifest)))))
                      (modules (append-map (cut find-files <> "\\.so$")
-                                          moddirs)))
+                                          moddirs))
+                     (im-env  (string-append "GUIX_GTK" #$major "_IM_MODULE_FILE"))
+                     (envfile (string-append #$output "/etc/profile.d/gtk"
+                                             #$major "-im-modules.sh")))
 
                 ;; Generate a new immodules cache file.
                 (mkdir-p (string-append #$output prefix))
@@ -1167,7 +1170,12 @@ for both major versions of GTK+."
                             (write-char (read-char pipe) out))))
                       #t)
                     (lambda ()
-                      (close-pipe pipe)))))))))
+                      (close-pipe pipe)))
+                  ;; Set environment variable for GTK+ input method modules.
+                  (mkdir-p (dirname envfile))
+                  (with-output-to-file envfile
+                    (lambda ()
+                      (simple-format #t "export ~a=~a\n" im-env outfile)))))))))
 
     ;; Don't run the hook when there's nothing to do.
     (let* ((pkg-gtk+ (module-ref        ; lazy reference
-- 
2.29.2





Information forwarded to guix-patches@HIDDEN:
bug#45064; Package guix-patches. Full text available.

Message received at 45064 <at> debbugs.gnu.org:


Received: (at 45064) by debbugs.gnu.org; 6 Dec 2020 16:40:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 06 11:40:35 2020
Received: from localhost ([127.0.0.1]:51020 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1klx5O-0006cs-Q6
	for submit <at> debbugs.gnu.org; Sun, 06 Dec 2020 11:40:35 -0500
Received: from mail-oln040092255036.outbound.protection.outlook.com
 ([40.92.255.36]:45856 helo=APC01-HK2-obe.outbound.protection.outlook.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iyzsong@HIDDEN>) id 1klnK9-000352-4D
 for 45064 <at> debbugs.gnu.org; Sun, 06 Dec 2020 01:15:09 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=JkyLVX92bkZICxh8FmVpuDW2XrkErr/V34h3EStjmy9zY66lZmgj+KEpuzOroKO+G7ZNbCOvtSE14PSeT9RDBTx5L7nL0BHuvdKZAj9aieHZ2c0YHBwMdjwSSnmUT0ZgzdqBOTU89TsRT2/h7p5tLPnttHBukbrYjiJl556ZXo9gwdZ6//dPPfhSRP7yo8WD3rOasp1uc+DmhyltfPSPU26TS+51UFwX/PJd4b80kK6tvjHxmOmG0nixoiLdoEK0uy85nx1XWCOtXOvbUKPZDHuMhqUwBQ8h/Cuu3AdDtaWax8niAjs2kUGRUu0dUSNny1oXBbCPX9zGtzB03qrAsg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=4YQdPe1DqI1flRjO2X8vFV0rsL/XXw74DstLHeCkfWw=;
 b=if66mdbXPjSJXTo+zYBuy3WEPor+Pl5h0kIdBxMg8r1QJqNPFaxfew6TbLVmqkK8mhoMsg3exnOtUFXWz0upiB0bnKr5XLYd0JSqElSbN1cy4Rmj9F7VoWAp7hNOHsBI+XM7DBL96zhmPx2yfOhCKuWuzwSmcDBv76GM53FQcNAuw1xcHfhaYY5fixU5sum9ZIAcDOXLSaHkw46tGUy0cvvAxX8gZ/+QuxzoWKuntORZ8+7U82GOtFHb0ANm/iADY3kO4fj9Ukgx9KP28dg3QAQTD09Q22Li4Okk7GDPsCuymNi44A/qLKguz+xuJ7wSv45+ewcHiApHo6QwYQUYAg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none;
 dkim=none; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com;
 s=selector1;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=4YQdPe1DqI1flRjO2X8vFV0rsL/XXw74DstLHeCkfWw=;
 b=D2+EhuBhv60zXSxHTTGFulWn4KoUjpNk4i+DDFa1zqwXcpcVokuzlmPEZ63UOcU7Z56CLCQ96JD4Ghr07WOzNzNIEKlip7iBq8YcA1Apc4r0FlXJHcKrae7rIphVPn+OQ1sevIuGtuAQM+XjIaWwbUM8hjAp5ogyJjx5G5D7dC2QN5EKz3qSlzr9Tah3vfXl4xwy6S/fhj1Q+AAy+hiMK8BIVy850bTwvgH/UFh3Ub5iyiUUxgnrLQ0GOLGnWzgrtAYjeqqubcZ8PkbVS2DILb3TRC81ENQL1ppiZaupoGWtGuF2BliTOkMXPfW+u3L/azGURIFQBPFSYT/EI/VVAw==
Received: from HK2APC01FT046.eop-APC01.prod.protection.outlook.com
 (2a01:111:e400:7ebc::43) by
 HK2APC01HT207.eop-APC01.prod.protection.outlook.com (2a01:111:e400:7ebc::442)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.17; Sun, 6 Dec
 2020 06:14:56 +0000
Received: from TYAP286MB0185.JPNP286.PROD.OUTLOOK.COM (2a01:111:e400:7ebc::53)
 by HK2APC01FT046.mail.protection.outlook.com
 (2a01:111:e400:7ebc::436) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.17 via Frontend
 Transport; Sun, 6 Dec 2020 06:14:56 +0000
X-IncomingTopHeaderMarker: OriginalChecksum:00D3F67C6A2389D829E7B6901B4F2D7A60D85B3B405BEFDC6FFBB5E36C272ABE;
 UpperCasedChecksum:BD7A1A2EA4BF88A6797915CEAFCA16E222B30754296866105495CBDB1D7EF817;
 SizeAsReceived:8528; Count:45
Received: from TYAP286MB0185.JPNP286.PROD.OUTLOOK.COM
 ([fe80::d802:80c9:f6bd:1fbb]) by TYAP286MB0185.JPNP286.PROD.OUTLOOK.COM
 ([fe80::d802:80c9:f6bd:1fbb%8]) with mapi id 15.20.3632.017; Sun, 6 Dec 2020
 06:14:56 +0000
From: iyzsong@HIDDEN
To: 45064 <at> debbugs.gnu.org
Subject: [PATCH 1/2] profiles: Load application specific startup files.
Date: Sun,  6 Dec 2020 14:15:14 +0800
Message-ID: <TYAP286MB01857F3A772A5768FC7EC801A3CF0@HIDDEN>
X-Mailer: git-send-email 2.29.2
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-TMN: [0sP+Fab6mfQAIrDeIv6pZbf6GLGvInc9LFzt0RmQFfgRJOEG/w+Gtl21RjgIZOQ3]
X-ClientProxiedBy: BYAPR07CA0104.namprd07.prod.outlook.com
 (2603:10b6:a03:12b::45) To TYAP286MB0185.JPNP286.PROD.OUTLOOK.COM
 (2603:1096:404:8038::14)
X-Microsoft-Original-Message-ID: <20201206061515.10449-1-iyzsong@HIDDEN>
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
Received: from localhost (2409:8a62:372:3600:2f1:f5ff:fe18:6bb) by
 BYAPR07CA0104.namprd07.prod.outlook.com (2603:10b6:a03:12b::45) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.18 via Frontend
 Transport; Sun, 6 Dec 2020 06:14:54 +0000
X-MS-PublicTrafficType: Email
X-IncomingHeaderCount: 45
X-EOPAttributedMessage: 0
X-MS-Office365-Filtering-Correlation-Id: 427de137-d2ec-4824-7fe2-08d899ae4060
X-MS-TrafficTypeDiagnostic: HK2APC01HT207:
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: T8xFddbEd1Gu/z2rVkcvLgI76LzZ9+Vi4jXTcitmgEbsvvBCtZN7F3mzDvds7dl5ewceG07PO+Gmxl4P7TwWv54bkbgHrIGEIqhFoEauF8NTuQ41uhV8pnoa0NTt5z8jogIr2dFa28uz4a79kgqBN441pvfcIoUc2bNK+kW/P8ZANtq+9HZ5w32Q3Yq6Yfi6j6NBk/2ZR81A40F5rbRlSw==
X-MS-Exchange-AntiSpam-MessageData: mWFTCbW7E8YKKg5NW/iDYX68zL13OnMsvKlMuzxbWrvvmYi43rL/FW/CYKEXBIumahveiDWiJyRCX4HQsqTpg2XtFLSZ212NSf+C4l0ynDuhOC7rLXnXh1MP36isHyB1uZ5o9c1AFnIOnR6T3W4GDlYIpxfRwv4svxwN24Kd3b7ONPTaTGTTgIot7wcy3MEVeQ0P64FZ7BkeSZtDGniBSQ==
X-OriginatorOrg: outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 427de137-d2ec-4824-7fe2-08d899ae4060
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Dec 2020 06:14:56.1487 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-CrossTenant-AuthSource: HK2APC01FT046.eop-APC01.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: Internet
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2APC01HT207
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 45064
X-Mailman-Approved-At: Sun, 06 Dec 2020 11:40:33 -0500
Cc: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From: 宋文武 <iyzsong@HIDDEN>

* guix/build/profiles.scm (build-etc/profile): Source application specific
startup files in 'etc/profile.d'.
---
 guix/build/profiles.scm | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/guix/build/profiles.scm b/guix/build/profiles.scm
index 67ee9b665a..25165e0edb 100644
--- a/guix/build/profiles.scm
+++ b/guix/build/profiles.scm
@@ -98,7 +98,17 @@ definitions for all the SEARCH-PATHS."
       (let ((variables (evaluate-search-paths search-paths
                                               (list output))))
         (for-each (write-environment-variable-definition port)
-                  (map (abstract-profile output) variables))))))
+                  (map (abstract-profile output) variables)))
+
+      (simple-format port "
+# Load application specific startup files.
+if test -d ~a/etc/profile.d; then
+    for script in ~a/etc/profile.d/*.sh; do
+        source \"$script\"
+    done
+    unset script
+fi
+\n" output output))))
 
 (define* (ensure-writable-directory directory
                                     #:key (symlink symlink))
-- 
2.29.2





Information forwarded to guix-patches@HIDDEN:
bug#45064; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 6 Dec 2020 06:06:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 06 01:06:49 2020
Received: from localhost ([127.0.0.1]:48747 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1klnC5-0002ki-5M
	for submit <at> debbugs.gnu.org; Sun, 06 Dec 2020 01:06:49 -0500
Received: from lists.gnu.org ([209.51.188.17]:58156)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iyzsong@HIDDEN>) id 1kln0Z-0002RD-0m
 for submit <at> debbugs.gnu.org; Sun, 06 Dec 2020 00:54:55 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:51564)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <iyzsong@HIDDEN>)
 id 1kln0Y-0006gh-70
 for guix-patches@HIDDEN; Sun, 06 Dec 2020 00:54:54 -0500
Received: from mail-oln040092255016.outbound.protection.outlook.com
 ([40.92.255.16]:6038 helo=APC01-HK2-obe.outbound.protection.outlook.com)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <iyzsong@HIDDEN>)
 id 1kln0V-0000eO-Qm
 for guix-patches@HIDDEN; Sun, 06 Dec 2020 00:54:53 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=gBUBdq2JJ5Sh4oEQbsKTk3THMlIq86VhA9J4nrGkRrjifQtsFme5sjKAhy1YUoNmKt2DSRyfFnu3ur4+aHO4TKJhcVLzAR7kUAiuau3zMJWWZ30Eg+7rPnFN5GtLMlud38qGsxDgw3QWgzqEfeRXzWl4UDW5vPTH15kVU+6eUM4DYBzuKnG6YaekleEKAHY35WrNXPe16aHs2nND3K/JZfMxoEqj3xmpiPABbeazqpPLhXokWw/qHje8BLYy61jeRwyUGxAVPYWbuecV1MNo4RjbrT1CMqt94M7xcgjEKGFr4UpswhwntnqU7pHMP14UPuvpboHq+H78MTBtx8R3sA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=Y78AAc/5CYjeRMoHlhuT61+/F1483Sj2mrufdhBiOcQ=;
 b=j1L415OpROA5LSrsCEO3R3ZzB7U3inoweaemnLG9B9PrHdJ5sSgKRuLwG3pSdBMWo8Q1m+HH7Lsh23yZ8j/HU2JyQfqWfN4OGdIocY7Yltyse4nvaACZX+E8Z00q2QMTxpT8hXfgjAw7J73aayYZsnkTL2/NY1RzcdbYFrCkYymzaWSbvnVqyxlPgunSfO5QMeel65f865/hoG0+YNImokT/PC6ED7oKdZxSCerstL/cFm8Ezk7ot19BWEIw1tDwITxZxt9yennjc06z1y1VhG+794sIhF/aiK7QaqXQccRM0yJoEteGrh6b1UocSgAX2lQ1aIjCA/RWLn4AHXfBDg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none;
 dkim=none; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com;
 s=selector1;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=Y78AAc/5CYjeRMoHlhuT61+/F1483Sj2mrufdhBiOcQ=;
 b=t40vQnQzyquv/+JTX4CTKeZVLBItqN4GqqKs0dP7MlaUlcTidlDaoum6ZEijL6rylpBsBTxYKpyk/BVu4tFuQZMuIMNbN2oZpWPgXv2nUDDfnWagaJkQu4rkOvqyuhdTzt3M+AvKufQ0NdICXzWXaru0TGt7IOcmVYpLLKqXyvk8581hjycdx+OpcVnbBmrJy4T6fMNfEfvMwWl/dhtzMSM0yYBD6GWKJgmCHxElJyotnxWfoDVGzshzky6kUJVpZtBRcGWyuOYCNxsJBwZgzxi/VPOwFQZfLAYWYKDq0nHXgcOr/6fCiKgtoo+HUf7y5Fgoig0D2oVlWGBqsT1gJg==
Received: from PU1APC01FT064.eop-APC01.prod.protection.outlook.com
 (2a01:111:e400:7ebe::4e) by
 PU1APC01HT213.eop-APC01.prod.protection.outlook.com (2a01:111:e400:7ebe::428)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.17; Sun, 6 Dec
 2020 05:39:37 +0000
Received: from TYAP286MB0185.JPNP286.PROD.OUTLOOK.COM (10.152.252.59) by
 PU1APC01FT064.mail.protection.outlook.com (10.152.253.70) with Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.3632.17 via Frontend Transport; Sun, 6 Dec 2020 05:39:37 +0000
X-IncomingTopHeaderMarker: OriginalChecksum:877BA171DB780838D7E68C6F2BDC92A62AA2EE66CC0E363C7991E7A384A4AADD;
 UpperCasedChecksum:A2E0F7161039BA216E2BE992C5392F04AB56A7BA36A1A3432D701BF74A55C85A;
 SizeAsReceived:8530; Count:45
Received: from TYAP286MB0185.JPNP286.PROD.OUTLOOK.COM
 ([fe80::d802:80c9:f6bd:1fbb]) by TYAP286MB0185.JPNP286.PROD.OUTLOOK.COM
 ([fe80::d802:80c9:f6bd:1fbb%8]) with mapi id 15.20.3632.017; Sun, 6 Dec 2020
 05:39:37 +0000
From: iyzsong@HIDDEN
To: guix-patches@HIDDEN
Subject: [PATCH 0/2] Set environment variables for GTK+ input methods via
 profile startup files
Date: Sun,  6 Dec 2020 13:40:06 +0800
Message-ID: <TYAP286MB018580C92BF3E9783BD56362A3CF0@HIDDEN>
X-Mailer: git-send-email 2.29.2
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-TMN: [VAF+4WlnJa36yqxB26GZxuzcRP/Lnn0lPk0m0vQW6vMQb5yBylMQWUFUOY1pv375]
X-ClientProxiedBy: HE1P190CA0047.EURP190.PROD.OUTLOOK.COM (2603:10a6:7:52::36)
 To TYAP286MB0185.JPNP286.PROD.OUTLOOK.COM
 (2603:1096:404:8038::14)
X-Microsoft-Original-Message-ID: <20201206054006.9567-1-iyzsong@HIDDEN>
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
Received: from localhost (2409:8a62:372:3600:2f1:f5ff:fe18:6bb) by
 HE1P190CA0047.EURP190.PROD.OUTLOOK.COM (2603:10a6:7:52::36) with Microsoft
 SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.3632.17 via Frontend Transport; Sun, 6 Dec 2020 05:39:35 +0000
X-MS-PublicTrafficType: Email
X-IncomingHeaderCount: 45
X-EOPAttributedMessage: 0
X-MS-Office365-Filtering-Correlation-Id: 86a7e7ee-4c7a-4f43-0fa9-08d899a95162
X-MS-TrafficTypeDiagnostic: PU1APC01HT213:
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: q36e4WVUrFbxeCha6o3Y7xmU6+Du8+Um5RncHpA9DrAxYQJpOylc2a1eo97N0ZiJf1YqMCSbwpbLYJYw3ACNCN5cSF9DO9RGkT3rURCdP++U5MuXmHX4hytyL3+MyIuYlatWdgSXzW+Vwi6ZgH7Gc985b1FcihyD6z0VRtKbIdX2g/YXYdHxF4IT8mIZ2ZzcG8xWQM+OMk77xSWrPK1BhhTfGrKAI5tRAWQx29rpfqGraafuhiCFonRZ1pF0rPks
X-MS-Exchange-AntiSpam-MessageData: T/sggI/TxArQO7KDRTrSeUng+IvBM8xiyILIdLHetfzVKo5CpJh2sUfFV8sE0cfRjK0jAMZvsVQNK8tphte9VxUr27lxSct8J9k9QbEjjTyp701AU+bMlxc3k0rxYewy158dBCqYaB6z1m12wV1LOTkZABxljlaGCNiOmYZdoEHxWOJMKaWFJcPTgzF5cCbz9SO365IngWkGh+AZwoxl4w==
X-OriginatorOrg: outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 86a7e7ee-4c7a-4f43-0fa9-08d899a95162
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Dec 2020 05:39:37.4694 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-CrossTenant-AuthSource: PU1APC01FT064.eop-APC01.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: Internet
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PU1APC01HT213
Received-SPF: pass client-ip=40.92.255.16; envelope-from=iyzsong@HIDDEN;
 helo=APC01-HK2-obe.outbound.protection.outlook.com
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, FREEMAIL_FROM=0.001,
 MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001,
 RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sun, 06 Dec 2020 01:06:47 -0500
Cc: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

From: 宋文武 <iyzsong@HIDDEN>

Hello, Guix!

To use GTK+ input methods, currently we need set
‘GUIX_GTK2_IM_MODULE_FILE’ and ‘GUIX_GTK3_IM_MODULE_FILE’ manually in
.xsession or .bash_profile, we also having a patch [1] that set them
for gnome via ‘gnome-desktop-service-type’.  But I think the right
place to set them is the ‘gtk-im-modules’ profile hook, so the first
patch make ‘etc/profile’ source files in ‘etc/profile.d/*.sh’, and the
second patch add ‘etc/profile.d/gtk2-im-modules.sh’ and
‘etc/profile.d/gtk3-im-modules.sh’.  The first patch is also useful
for packages that provide profile startup files (eg: nix).

Thanks!

[1] <https://issues.guix.gnu.org/44354>

Sou Bunnbu (宋文武) (2):
  profiles: Load application specific startup files.
  profiles: gtk-im-modules: Set environment variables for input methods.

 guix/build/profiles.scm | 13 ++++++++++++-
 guix/profiles.scm       | 12 ++++++++++--
 2 files changed, 22 insertions(+), 3 deletions(-)

-- 
2.29.2





Acknowledgement sent to iyzsong@HIDDEN:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#45064; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 7 Dec 2020 15:00:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.