From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id gJD+BMqykWBLTQAAgWs5BA (envelope-from ) for ; Tue, 04 May 2021 22:47:06 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id AEabAMqykWDNLwAAB5/wlQ (envelope-from ) for ; Tue, 04 May 2021 20:47:06 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7AE221F99F for ; Tue, 4 May 2021 22:47:05 +0200 (CEST) Received: from localhost ([::1]:36380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1le1wd-00014e-3z for larch@yhetil.org; Tue, 04 May 2021 16:47:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37846) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1le1w2-00014L-DC for guix-devel@gnu.org; Tue, 04 May 2021 16:46:26 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:50916 helo=mail.yoctocell.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1le1w0-0002zH-Jk for guix-devel@gnu.org; Tue, 04 May 2021 16:46:26 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1620161174; bh=40JRkgm+CEEIy8jmLZGTt1lKekEue6QMC1JHSz5b/gU=; h=From:To:Subject:Date; b=rpl8AIfH4cds0nr1p1oy6fg9Q7Z78Bhi+PXFK63r7QVuCumBYMl0g9nP1kA+DZdOH 5y6gFiiRSQUHVodPA1Gn3MSB8JGlC3baiplDpR6S4N1ro3hR6DcvnaN9qndh5d3RUq cHAfRfc1oecOBmQQsarz+kLgkjL3llX+UWovymzw= To: guix-devel@gnu.org Subject: [PATCH 0/2] Add mercurial-commitsigs and some changes to Mercurial. Message-Id: Date: Tue, 04 May 2021 22:46:14 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=87.96.130.155; envelope-from=public@yoctocell.xyz; helo=mail.yoctocell.xyz X-Spam_score_int: 34 X-Spam_score: 3.4 X-Spam_bar: +++ X-Spam_report: (3.4 / 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, FROM_SUSPICIOUS_NTLD=0.498, FROM_SUSPICIOUS_NTLD_FP=1.997, PDS_OTHER_BAD_TLD=1.997, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620161225; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=IPD3wWJxCLbFd7zZD3nzwlkqP59FewhiRZGMmuF4Qm8=; b=MMuABMlnswvZGa5fGEMAJYj0ZCaLVU3S4x/VBrUmrFkH/BCF4xN7nePLPuv55IBbPZq3qO 1q57vyp24b8Db/jnzXcsc2yvkoH/FYTzvtm8CNAkQrNSvNuboGoMe/ukkWzSKaPqyLfRpd Ov8mwaXaPXzgnQ7HEQnyNh3+SQnrvbvhY24IJ2+7fDauNZLXhTA5q65Vd6lEFBFvm63qI/ 5/M6tQlW8CS5Isl11G5O0vg/bJgmH9hjYYw4OhT8VamimAYoVF87pQ7WbvGd5QQ2s95r+C WmpGwZti+FBJA6Kqe5HQZFhSJDbTv2b9vSUvaoMBBn5TWEycef1HLycLFnbdHw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620161225; a=rsa-sha256; cv=none; b=tbf7Q498sU6iCjlmgdCLgRFiY/9t6a6Qrioo7LHrusNetw/ic4422Uruk4Av4R0dOdYAXA UYrfaXBLdJ/633j/ubxpK1IcfYTPiE59VEPPJesIeUQBna3Jv1OfsFtPlKJVw/CMPpJK83 c8LXVCZUGm9tOfIsI5JQjPgkcahwKwLSeHbHWxpMQkSwm7EdVfe5oijauSZFB6vOjkuwc3 e6hqdViqA9oXv+vAOeXxR2xptpKWRhnRLewL0RhdUcABYQArcI/nDcvT0tkrdZjaB+6FNa SMTWj7xwrak1Nl1HXrQNHM8st27TSjBytTY6zajEAL6BXbRWLxxH/sun04f3LA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=yoctocell.xyz header.s=mail header.b=rpl8AIfH; dmarc=pass (policy=none) header.from=yoctocell.xyz; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -0.66 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=yoctocell.xyz header.s=mail header.b=rpl8AIfH; dmarc=pass (policy=none) header.from=yoctocell.xyz; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 7AE221F99F X-Spam-Score: -0.66 X-Migadu-Scanner: scn0.migadu.com X-TUID: 060nGkGjkZ9Y The first patch adds the commitsigs extension for Mercurial, it allows users to sign Mercurial changesets (equivalent to Git commits) with GnuPG or OpenSSL. The second patch adds PYTHONPATH to the =E2=80=98native-search-paths=E2=80= =99 field of Mercurial, this allows Mercurial to automatically find third-party extensions (like commitsigs) installed in /gnu/store/...-profile/lib/python3.8/site-packages/hgext3rd. By default, it only looks at /gnu/store/...-mercurial/lib/python3.8/site-packages/hgext3rd. However, I am not sure this is the best approach since it messes with PYTHONPATH, AFAIK there is no such things as a HGEXTENSIONS variable I could set. Another problem is that I have to hardcode =E2=80=9Cpython3.8= =E2=80=9D, this would obviously have to be updated if the default Python version gets updated. I did try to do something like this: #+begin_src scheme (string-append "lib/python" (string-join (drop-right (string-split (package-version python) #\.) 1) ".") "/site-packages/hgext3rd") #+end_src but it just gave me a confusing error message when trying to build it; it worked fine if I hit {C-x C-e} in Emacs, though. What we could do instead is to delegate the work of installing Mercurial extensions to Guix Home[1] (I am currently working on adding a service for Mercurial[2]) and add a =E2=80=98mercurial-extension-file-path=E2=80=99= key to the =E2=80=98properties=E2=80=99 field of Mercurial extensions so Guix Home can= tell Mercurial where to find the extension by the relevant lines in hgrc. We could have a package definition like this: #+begin_src scheme (package (name "mercurial-commitsigs") ... (properties '((mercurial-extension-file-path . "commitsigs.py")))) #+end_src hgrc: #+begin_src [extensions] commitsigs =3D /gnu/store/...-mercurial-commitsigs/commitsigs.py #+end_src [1]: https://yhetil.org/guix-devel/878s6u2pco.fsf@trop.in/ [2]: https://lists.sr.ht/~abcdw/rde-devel/patches/22421 Xinglu Chen (2): gnu: Add mercurial-commitsigs. gnu: mercurial: Add PYTHONPATH to =E2=80=98native-search-paths=E2=80=99. gnu/packages/version-control.scm | 68 ++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) base-commit: aa7eeabe9a782afc2535581298990050d16b1895 --=20 2.31.1