From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 8LvbLHsNZmAOLQEAgWs5BA (envelope-from ) for ; Thu, 01 Apr 2021 20:14:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id SL2wJnsNZmChfQAAB5/wlQ (envelope-from ) for ; Thu, 01 Apr 2021 18:14:19 +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 281B227DAD for ; Thu, 1 Apr 2021 20:14:19 +0200 (CEST) Received: from localhost ([::1]:60828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lS1pi-0002dl-6d for larch@yhetil.org; Thu, 01 Apr 2021 14:14:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58294) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lS1hi-0004xz-Jz for guix-patches@gnu.org; Thu, 01 Apr 2021 14:06:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46977) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lS1hi-0007Md-CJ for guix-patches@gnu.org; Thu, 01 Apr 2021 14:06:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lS1hi-0007Uc-5V for guix-patches@gnu.org; Thu, 01 Apr 2021 14:06:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47539] [PATCH 00/28] Add gh and dependencies Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 01 Apr 2021 18:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47539 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Leo Prikler , 47539@debbugs.gnu.org Received: via spool by 47539-submit@debbugs.gnu.org id=B47539.161730031428746 (code B ref 47539); Thu, 01 Apr 2021 18:06:02 +0000 Received: (at 47539) by debbugs.gnu.org; 1 Apr 2021 18:05:14 +0000 Received: from localhost ([127.0.0.1]:58523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lS1gv-0007Ta-OA for submit@debbugs.gnu.org; Thu, 01 Apr 2021 14:05:14 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:38552 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lS1gs-0007TF-BU for 47539@debbugs.gnu.org; Thu, 01 Apr 2021 14:05:12 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1617300302; bh=iLEyfTWyNw7mpe0JnUim0uDoId7p3Y7BbXosSX6d22I=; h=From:To:Subject:In-Reply-To:References:Date; b=Wa2xmmFIdpO14+fwOi3xsllxv9gz7xRf4AJO1ZzIl+Jpespd1wwpDPvgS6viwBvcI ULK3Ulq8Yk5Oj34cUo+9APznTBmYlmDdNUygDpleuZeGJf72MS9iQIZdyv8RqAJpex uyBHdwFfb53pRPgVXNQfxvnblt3zHRmfICY3u/8Q= In-Reply-To: References: <7f41ded1648030ed8f4db3165bfe4ccb2cb6b2a9.camel@student.tugraz.at> <87czve3vrg.fsf@yoctocell.xyz> <877dlm3rak.fsf@yoctocell.xyz> Date: Thu, 01 Apr 2021 20:05:01 +0200 Message-ID: <871rbt519u.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1617300859; 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:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=FrPSH+VeX+n02nGIDGHhr0ijkM4DeFpNZWXR9J7KvF0=; b=GyBC746y1oEuHC/WGwufLmto4mMQf1uhYK4wiA4eN+KS0L4j09WFEDAu6ngpks2sydg+Xr G6rkBmWD13VIFRKP07Dz5rXPUAwH4O8vc/DtXhj7kcgUSitSVcTd8HUbSlgCRSLWWt/Ebn w9gKCPARdi6nWNGmrem9svnWM5+GDwUF5AcUCnRwJO3IxeHmJPKz/2q1xjS3U+PizuzKhi h7AIoj2TLc/pPeIyUDtRkaNM1r6aLVqS99egZy6Cw7h++VKPkfpZfgN1MKODBRxTQteiAa opWKpGn1x4l1KxbWqyJwpa1M18OmmqSFXee071qm7xKjGFwf2T6o9oJ2PdEWTg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617300859; a=rsa-sha256; cv=none; b=HtwKE3QzB1EKfQ9aym7e7RhxieZ+XL2paaGTC0mwkjfo8yjBMzfj5fcyJHAU8bSe4x+Dha t8Dku0jBfU4SWv9gPS4sY1+HBFagMfX1wCpbDmT+tUnEQDVKjm+T5bgrfHzJBDhRPlHFQp r+b3Bp57M4eJTNz+s4ImfcJfnFnJdp7x2BJFzgmE3CZtQzATWC7luLdCPNUpMaSjT5p410 ODoETbTOLmxXFk60eXNoZX/fml3rMVmtPGAJgJ8L9U8UakVF079Q27EV4r6DU5Ihc9G5Cp woquco6IvG4aDn+l2zspB6hh/bUKYAsY+JFKXwbk4wfC/ikc193y+MvwxSGYEw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=Wa2xmmFI; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.33 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=Wa2xmmFI; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 281B227DAD X-Spam-Score: -1.33 X-Migadu-Scanner: scn0.migadu.com X-TUID: n7kZS3YYcyCp On Thu, Apr 01 2021, Leo Prikler wrote: >> Compiling github-cli without the package doesn't work, and the >> package is used in multiple places in the source code. I don't >> really know what we can do here. Should I open an issue on their >> GitHub page, or just leave it as is? > For now, I don't think this is going to be a blocking issue, as long as > the package and the input are appropriately marked, e.g. with comments, > and we make sure not to endorse the Microsoft OS through them. > As to how we might handle this, we could do our own investigations into > dropping the dependency, but asking a question (make sure to tag it as > such) should work as well. Also be clear, that the goal is not > necessarily to remove the dependency altogether, but rather make it an > optional one. > > After doing some quick investigations myself, I think the following > pair of substitute*s might work: > (("github.com/cli/safeexec") "os/exec") > (("safeexec") "exec") Thank you for the pointer, I managed to get it to work with the following snippet: #+begin_src scheme (add-after 'unpack 'remove-safeexec (lambda* (#:key outputs #:allow-other-keys) (let ((prefix-file (lambda (file) (string-append "src/github.com/cli/cli/" file)))) ;; 'github.com/cli/safeexec' is only used for Windows, we ;; replace it with the regular 'os/exec'. See ;; for discussion. (substitute* (map prefix-file '("pkg/cmd/alias/expand/expand.go" "script/build.go")) (("github.com/cli/safeexec") "os/exec") (("safeexec") "exec")) ;; These files have already imported 'os/exec', meaning that ;; 'os/exec' would get imported twice, causing an error. ;; Instead, we just remove the 'github.com/cli/safeexec'. (substitute* (map prefix-file '("cmd/gh/main.go" "git/git.go" "pkg/iostreams/iostreams.go" "pkg/cmd/auth/shared/ssh_keys.go" "pkg/cmd/pr/checkout/checkout.go" "pkg/cmdutil/web_browser.go" "pkg/surveyext/editor_manual.go")) (("\"github.com/cli/safeexec\"") "") (("safeexec") "exec"))))) #+end_src I also used it to open an issue and everything worked as expected.