From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Re: A few questions about channels Date: Sun, 05 May 2019 20:21:37 -0700 Message-ID: <87woj4xo72.fsf@gmail.com> References: <20190424224654.td7fwnjjf4hnguyc@cf0> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:58264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNUCF-0005SG-CK for help-guix@gnu.org; Sun, 05 May 2019 23:21:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNUCD-0006jr-Vf for help-guix@gnu.org; Sun, 05 May 2019 23:21:43 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:41901) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hNUCD-0006jb-Pv for help-guix@gnu.org; Sun, 05 May 2019 23:21:41 -0400 Received: by mail-pg1-x543.google.com with SMTP id z3so2044966pgp.8 for ; Sun, 05 May 2019 20:21:41 -0700 (PDT) In-Reply-To: <20190424224654.td7fwnjjf4hnguyc@cf0> (ison's message of "Wed, 24 Apr 2019 16:46:55 -0600") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: ison Cc: help-guix@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable ison writes: > 3) How can a channel provide patch files which can be used with > "search-patches"? I attempted to look through the guix code in > gnu/packages.scm and from what I can tell it looks like search-patches > only looks in paths included from "%load-path". There is also a > comment saying that it picks up the paths from $GUIX_PACKAGE_PATH, but > I thought that variable was being deprecated in favor of channels. If > so, shouldn't search-patches also look inside the channels repository > for patch files? This should work just like it would for GUIX_PACKAGE_PATH. Are you saying that the patch files you have created in your channel are not being found? david.larsson@selfhosted.xyz writes: > On Wed, 24 Apr 2019, ison wrote: > >> Several questions about channels have been on my mind which I >> haven't been able to find any documentation on. So I figured I would >> ask them all in one place since they seem like fairly standard >> questions that could help others setting up channels in the future >> as well. >> >> 1) Is it possible to make a channel from a local git repository? (That i= s to say, a directory on the local machine initialized as a git repository) >> > > Yes, for example, cat ~/.config/guix/channels.scm > > (cons (channel > (name 'my-personal-packages) > (url "file:///home/myuser/src/my-guix-packages")) > %default-channels) Actually, you can also just write "/home/myuser/src/my-guix-packages". The "file://" part is fine to add, but it is not necessary. I think (but am not sure) that you can use any protocol understood by Git here. >> 2) Is it possible to use private remote repositories as channels? >> The issue here seems to be one of authentication. I'm wonder if >> there is (or should be) an "authentication" field one would add to >> the channel definition in the channels.scm file. >> > I agree it would be nice to have. The git-fetch method is defined > here: > https://github.com/guix-mirror/guix/blob/012bf5c4c03e30633f137960bd0677e2= 04c638a7/guix/build/git.scm > and I think it can be modified without too much effort to include an > argument for the -key flag to the git command. I am not sure though > whether git-fetch will have access to the home user's directory in > case you provide let's say ~/.ssh/id_rsa as argument. Another > possibility would be to check the GIT_SSH_COMMAND env variable. I > suppose you also need to make sure ssh is available for git-fetch. It may also be possible to jump through hoops similar to how I did it for package origins in this not-yet-merged patch: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D31285 I have been thinking about this problem for a while, but I have not yet tried to solve it for channels. The patch above only works for individual packages, and it is quite a hack, so I am hesitant to merge it into master because I think maybe there is a better way. I think the better way might be to give the guix-daemon an SSH key specifically for the purpose of accessing Git repositories over authenticated SSH. In the same way that the Guix daemon has its own built in downloader for downloading files, we might be able to give it a built in "git fetcher" to fetch Git repositories over SSH, using the provided SSH key. But I haven't looked into it more at this time. Help is welcome! =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlzPqEEACgkQ3UCaFdgi Rp1aVg/8C/UfEBKD3Vi6Q0dMS2di3/Y7Wv1jJoTUvrzw5GZggKjhMcxe6kXmZS4n 5CM0yBe8dATv/wjYI+7lDIHVUnmzYR/TS+W7DSWeuLzytz6SKPD/lDqcP4zxbqGb 7Qvq/9JgQmc/Sb+BmHp6qAEnp1crDkplsQ8xTkVLzIrADQBXjLbSwewKNrIulmSn UcR/wxMeeIi/ym1D1NIQxNbVvcL2rcEMfXqDmlZS0FHOyjXkzEsVDAYAOvY78WjT pIMYlcrsEinQ9fH3yqkY2jQFMxxauJPW+SbEzIAwEN7uJ8pyvKGF8QTvdNo/0aTP L2o/IciUy7PSoA8xaZ/rE0hIQJbtjp6PDTicEEgCS/QJAsZrlzcbeKWhYK69r06n SiTjnXono9Y5WHYKBiyb+OHLVOBoDP9MKVM3jL0uolQWlnzZTum+JXspqwy4LbZs pmll1peBoBy8qxY/UdkukyzUZI9L/7p21KR9KYIEwPvQzRsbm7/gOTHTVaBTbC2+ zcuEnaV6w88p+js3ZfLXqpuqE/i/h66vC3gmGy8QQjUh4sckKkG4KZ0lh3I4OXfG 8ErC3Z8edDdzWTXpve9SmWmPabqkDcR4lr1zhNU1jwFBitkTopmaXeQtmOvy5UkR p1wy6GDFwGQOqfOxuu5ZVoO70CZwN2WU8pc9JLHNZ6WUbCLUTkE= =Ti9U -----END PGP SIGNATURE----- --=-=-=--