From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: Re: [PATCH] draft addition of github updater Date: Mon, 16 Nov 2015 16:14:17 +0200 Message-ID: <20151116161417.0750dd56@debian-netbook> References: <5647D2A8.8040603@uq.edu.au> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/zsRzwJjgi5MgoRoeyTjGM7i"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyKY8-0004Re-Cf for guix-devel@gnu.org; Mon, 16 Nov 2015 09:14:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyKY5-0006Pq-3z for guix-devel@gnu.org; Mon, 16 Nov 2015 09:14:28 -0500 Received: from flashner.co.il ([178.62.234.194]:50075) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyKY4-0006Pe-Qx for guix-devel@gnu.org; Mon, 16 Nov 2015 09:14:25 -0500 In-Reply-To: <5647D2A8.8040603@uq.edu.au> 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+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ben Woodcroft Cc: "guix-devel@gnu.org" --Sig_/zsRzwJjgi5MgoRoeyTjGM7i Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sun, 15 Nov 2015 10:32:40 +1000 Ben Woodcroft wrote: > Hi, >=20 > Importing from GitHub seems very non-trivial, but can we update? There's= =20 > a number of issues with the attached patch but so far out of the 171=20 > github package in guix, it recognizes 101, and 17 are detected as out of= =20 > date (see below). >=20 > I have two questions: >=20 > 1. Some guess-work is required to get between the version as it is=20 > defined in guix, and that presented in the github json, where only the=20 > "tag_name" is available. Is it OK to be a little speculative in this=20 > conversion e.g. "v1.0" =3D> "1.0"? from what I've seen, there are two sets of urls for github, and looking at the notes in your patch, it looks like you've seen that too. I think your v1.0 =3D> 1.0 change is ok, it's also part of github's url structure.=20 > 2. For mass-updates, it fails when it hits the abuse limit on github (60= =20 > api requests per hour). This can be overcome by authenticating with an=20 > access token, but I don't think that token should go in the git=20 > repository. So I'm after some guidance on the best way of the user=20 > providing a token to the updater (or some other workaround). Ouch. Will it accept an environmental variable for the access token? Or an entry in .netrc or in .ssh/config? If I already have an ssh key registered with github does that change anything? Not directly relevant, but minitube accepts either having an API key embedded in the compiled version (what debian does iirc) or querying an environmental variable. > Thanks, > ben >=20 > gnu/packages/xml.scm:378:13: pugixml would be upgraded from 1.6 to 1.7 > ... > gnu/packages/bioinformatics.scm:1610:13: idr would be upgraded from=20 > 2.0.0 to 2.0.2 My email client won't let me comment on patches, so I'll add it here: + ;; TODO: currently requires the standard "v1.0" or "1.0" style tag names + ;; TODO: currently only accepts .tar.gz downloads + ;; TODO: should also accept alternative download URLs of style like + ;; https://github.com/libical/libical/releases/download/v1.0.1/libical-1= .0.1.tar.gz tilda's url is: https://github.com/lanoxx/tilda/archive/tilda-1.2.4.tar.gz looking at your example and my example, we have: (string-suffix? (string-append "/download/v" (package-version package) "/" (package-name = package) "-" (package-version package) ".tar.gz")) (string-suffix? (string-append "/archive/" (package-name package) "-" (package-version pa= ckage) ".tar.gz")) + (define (github-url? url) + (and + (string-prefix? "https://github.com/" url) + (or + (string-suffix? + (string-append "/archive/v" (package-version package) ".tar.gz") ur= l) + (string-suffix? + (string-append "/archive/" (package-version package) ".tar.gz") url= )))) I don't know that archive/${version}.tar.gz is actually anywhere, but a qui= ck search of videos.scm shouldn't by itself rule it out. After my search through videos.scm, I see that github and sourceforge have = similar url endings. /${name}-${version}.ending, with the ocassional ${name}_${version}.ending o= r ${version}.ending. However, every single package ended in ${version}.endi= ng, no matter where it was from. Have you found the secret of updates? --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --Sig_/zsRzwJjgi5MgoRoeyTjGM7i Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCgAGBQJWSeS5AAoJEPTB05F+rO6TSssP/1MVnq5nLKGY09DVqqxq2/1L OgAnFE6ZPwp2Dda+1wpsxrLys6vGicv4+tig38agTt2VZiWw9V1BgygGaFFRCC0K rvGlgyj/ztSgJFMOcPN4FjHido9M/G75UiJKTcTTwGiUeDN3CuKXs5tkF1qv/O8+ 18UXqxrZmMrGGNgYvaaXrpz3rTFduztsbDuq7QXOsqt5zaQ36Kl52Bp3CdXlJYAM kQAO9iu5h9+KhB8WvmqcSJemz2ME0bskXQGt7IjJ16pmkWLzox3v4Fzdwf/AaikN e7qTcHaRq2E/CEZZ7K3HuFM+K8cMGE7y5YHQn++v7DMaMtlDPlgC3ibmp6aGFL53 6Spp4LiHNqzjhx9dK7iwzHAFIABs/0+BID8eNbZWr4cqr31ERDtCG3tLKch5zBBF F7iRibRjevEQqdpYKWXa8K9uFmfRXDGofN3jFsbajQFgXrn+xSwrD0Q6mT/IWI5e 1EcmXtRznKY3kxRnO7qijjXzHGQrh2Sd1UJ/rQKUGZ3RRp7Rd0SOGUAvvzVgx7xh PqfX6tMp9r3BiYy6Pzbz4HfyJ8gDS4V7PW8b8SKqNNVsNYYcU71unEjaXIqbmwGU uH5fjMsb+8lgUhFMUhUlel/Z4qsm/r6hDroUq6x1Ne8HV4yyi1bmkrRsQRFRpXaF qLL2G+pgd4OuQ09LypMI =Jz2H -----END PGP SIGNATURE----- --Sig_/zsRzwJjgi5MgoRoeyTjGM7i--