From unknown Fri Jun 20 20:10:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49006: MELPA importer uses the wrong source when called from CLI Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 13 Jun 2021 16:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49006 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 49006@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16236012267038 (code B ref -1); Sun, 13 Jun 2021 16:21:02 +0000 Received: (at submit) by debbugs.gnu.org; 13 Jun 2021 16:20:26 +0000 Received: from localhost ([127.0.0.1]:44269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsSqX-0001pR-FL for submit@debbugs.gnu.org; Sun, 13 Jun 2021 12:20:25 -0400 Received: from lists.gnu.org ([209.51.188.17]:47944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsSqV-0001pJ-76 for submit@debbugs.gnu.org; Sun, 13 Jun 2021 12:20:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsSqU-0002Fp-PJ for bug-guix@gnu.org; Sun, 13 Jun 2021 12:20:22 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:33876 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 1lsSqS-00072B-09 for bug-guix@gnu.org; Sun, 13 Jun 2021 12:20:22 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1623601215; bh=4C/F91iMI8Ouo4fSUZmr2pv+oY07QcrFN66URJWzzRI=; h=From:To:Subject:Date; b=Q9a4XPkhvtPzHszIa5ZetFSYa/0s+2e3DqKxzEjFKhbtH7jCMIY1rXOZHWwjQPI35 PPdZJtC5Ky0smAAkkimbqUBmm/hWtRW+aNfLzSU8DMP2z6N4BInX0qrArIUe4nLTe4 4SxVYV7z5O4uB4DvtxF/LR0us+4+n54gywLEiHgw= Date: Sun, 13 Jun 2021 18:20:14 +0200 Message-ID: <87fsxl91oh.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" 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.973, PDS_OTHER_BAD_TLD=1.997, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_FILL_THIS_FORM_SHORT=0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 3.1 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: When importing a package from MELPA, the source for generated package definition points to a (potentially unstable?) MELPA URL. https://melpa.org/packages/PACKAGE-VERSION.tar --88--- ~/src/guix [env]$ ./pre-inst-env guix import elpa -a melpa magit Content analysis details: (3.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [209.51.188.17 listed in wl.mailspike.net] 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 2.0 FROM_SUSPICIOUS_NTLD_FP From abused NTLD -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 T_FILL_THIS_FORM_SHORT Fill in a short form with personal information X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.1 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable When importing a package from MELPA, the source for generated package definition points to a (potentially unstable?) MELPA URL. https://melpa.org/packages/PACKAGE-VERSION.tar =2D-8<---------------cut here---------------start------------->8--- ~/src/guix [env]$ ./pre-inst-env guix import elpa -a melpa magit Starting download of /tmp/guix-file.wbtAlA From=20https://melpa.org/packages/magit-20210609.2000.tar... =E2=80=A6609.2000.tar 1.7MiB 472KiB/s 00:04 [#############= #####] 100.0% (package (name "emacs-magit") (version "20210609.2000") (source (origin (method url-fetch) (uri (string-append "https://melpa.org/packages/magit-" version ".tar")) (sha256 (base32 "0pplizxy20i3i9zqm5kfjz4la93gpz8wwh1ybwdwngv5ks7vhdsr")))) (build-system emacs-build-system) (propagated-inputs `(("emacs-dash" ,emacs-dash) ("emacs-git-commit" ,emacs-git-commit) ("emacs-magit-section" ,emacs-magit-section) ("emacs-transient" ,emacs-transient) ("emacs-with-editor" ,emacs-with-editor))) (home-page "https://github.com/magit/magit") (synopsis "A Git porcelain inside Emacs.") (description "Magit is a text-based Git user interface that puts an unmatched focus on streamlining workflows. Commands are invoked using short mnemonic key sequences that take the cursor=E2=80=99s position in the highly actiona= ble interface into account to provide context-sensitive behavior. With Magit you can do nearly everything that you can do when using Git on the command-line, but at greater speed and while taking advantage of advanced features that previously seemed too daunting to use on a daily basis. Many users will find that by using Magit they can become more effective Git user. ") (license #f)) =2D-8<---------------cut here---------------end--------------->8--- However, looking at (guix import elpa), it has a =E2=80=98melpa-recipe->ori= gin=E2=80=99 procedure, which calls the =E2=80=98git-repository->origin=E2=80=99 procedu= re, which returns an origin that uses =E2=80=98git-fetch=E2=80=99. #+begin_src scheme (define (git-repository->origin recipe url) "Fetch origin details from the Git repository at URL for the provided MEL= PA RECIPE." (define ref (cond ((assoc-ref recipe #:branch) =3D> (lambda (branch) (cons 'branch branch))) ((assoc-ref recipe #:commit) =3D> (lambda (commit) (cons 'commit commit))) (else '(branch . "master")))) (let-values (((directory commit) (download-git-repository url ref))) `(origin (method git-fetch) (uri (git-reference (url ,url) (commit ,commit))) (sha256 (base32 ,(bytevector->nix-base32-string (file-hash directory (negate vcs-file?) #t))))))) (define* (melpa-recipe->origin recipe) "Fetch origin details from the MELPA recipe and associated repository for the package named PACKAGE-NAME." (define (github-repo->url repo) (string-append "https://github.com/" repo ".git")) (define (gitlab-repo->url repo) (string-append "https://gitlab.com/" repo ".git")) (match (assq-ref recipe ':fetcher) ('github (git-repository->origin recipe (github-repo->url (assq-ref rec= ipe ':repo)))) ('gitlab (git-repository->origin recipe (gitlab-repo->url (assq-ref rec= ipe ':repo)))) ('git (git-repository->origin recipe (assq-ref recipe ':url))) (#f #f) ; if we're not using melpa then this stops us printing a warn= ing (_ (warning (G_ "Unsupported MELPA fetcher: ~a, falling back to unstabl= e MELPA source.~%") (assq-ref recipe ':fetcher)) #f))) #+end_src =E2=80=98melpa-recipe->origin=E2=80=99 is used in the =E2=80=98elpa-package= ->sexp=E2=80=99 procedure, and takes precedence over the =E2=80=98url-fetch=E2=80=99 origin. Meaning = that =E2=80=98melpa-source=E2=80=99 must have been #f, otherwise it shouldn=E2= =80=99t have used =E2=80=99url-fetch=E2=80=99. #+begin_src scheme (define melpa-source (melpa-recipe->origin melpa-recipe)) (values `(package (name ,(elpa-name->package-name name)) (version ,version) (source ,(or melpa-source ;here (let ((tarball (with-store store (download-to-store store source-= url)))) `(origin (method url-fetch) (uri (string-append ,@(factorize-uri source-url version= ))) (sha256 (base32 ,(if tarball (bytevector->nix-base32-string (file-sha256 tarb= all)) "failed to download package"))))))) ...)) #+end_src What=E2=80=99s weird is that calling =E2=80=98elpa->guix-package=E2=80=99 i= n the REPL generates a package definition that uses =E2=80=99git-fetch=E2=80=99 instead of =E2= =80=99url-fetch=E2=80=99 =2D-8<---------------cut here---------------start------------->8--- scheme@(guile-user)> ,use(guix import elpa) scheme@(guile-user)> (elpa->guix-package "magit" #:repo 'melpa) $2 =3D (package (name "emacs-magit") (version "20210609.2000") (source (ori= gin (method git-fetch) (uri (git-reference (url "https://github.com/magit/m= agit.git") (commit "71f57c5582448be81b02ba53750dd2ea39ed0eaf"))) (sha256 (b= ase32 "16ip50a46nk6xxj8qkpf6rmp28zjc1bhyjj9bfgibim8ywj87dlq")))) (build-sys= tem emacs-build-system) (propagated-inputs (quasiquote (("emacs-dash" (unqu= ote emacs-dash)) ("emacs-git-commit" (unquote emacs-git-commit)) ("emacs-ma= git-section" (unquote emacs-magit-section)) ("emacs-transient" (unquote ema= cs-transient)) ("emacs-with-editor" (unquote emacs-with-editor))))) (argume= nts (quote (#:include (quote ("^lisp/magit$" "^lisp/magit[^/]+.el$" "^lisp/= git-rebase.el$" "^Documentation/magit.texi$" "^Documentation/AUTHORS.md$" "= ^LICENSE$")) #:exclude (quote ("^lisp/magit-libgit.el$" "^lisp/magit-sectio= n.el$"))))) (home-page "https://github.com/magit/magit") (synopsis "A Git p= orcelain inside Emacs.") (description "Magit is a text-based Git user inter= face that puts an unmatched focus\non streamlining workflows. Commands are= invoked using short mnemonic\nkey sequences that take the cursor=E2=80=99s= position in the highly actionable\ninterface into account to provide conte= xt-sensitive behavior.\n\nWith Magit you can do nearly everything that you = can do when using Git\non the command-line, but at greater speed and while = taking advantage\nof advanced features that previously seemed too daunting = to use on a\ndaily basis. Many users will find that by using Magit they ca= n become\nmore effective Git user.\n") (license license:gpl3+)) $3 =3D ("dash" "git-commit" "magit-section" "transient" "with-editor") =2D-8<---------------cut here---------------end--------------->8--- --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmDGMD4VHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5JEsP/R0HWNNasONb0TW0cQa+QvHook6D 9s87poLRSnWiHwH50d68VHNoxd6D4a59F9Xpa/pncEvThDEp58LR7IrwxnpCjymR aPDETDz6gRJFLwhmCUBqcxLlm4SpOv6NyhVbSXJSs6vF/C8Dt3OR+VzVf6Itp5hP 1snFdK6HzRyLV5U2adLUkc7sFsAZjuQZP/9F8HfcxQoZ2Q7YQUNPWONMl4gtIJaR ru5U+ToOvGicG6fyQylH7wvVY63JCid+9sHiirftJFYHeiL00cWTPYp5m1r9g+LR 2L0QY25tURCu/2pfw92mFRJ034olzrKgpdL81gIeyW9e8L0gmo6BUcf7yD8sh+yk pw53JVYyx1vpJnPPoTyienDwoFM8gIcEwI5epUMYE/ZpJ+3RNHQ6GUwMMykLhHE2 CkKyRSu8Uh7VVimoYiKB0TTeV+5tMjOJvMi7kiXB6ZneEKsohepbsgQKo9swoJYG tuoPfFl1bg+bO2ajPwzieq9DnK2ONata/ma7Z0qN1tJcrV121LKiaJFzSCFdQzcl +U32dQIpx+kauAScyrtyfPQa8r+sTnnLM3B5hq3oWvWudecIkATrYlmjU6I7iqqR gbvQNH8JQ6roKJNPviKmxkUrOH4aV9IYeCMe05lFNhzYz+4U49VsVCSOLRdnTEb0 zJmeFYABXsrjCOAT =pWry -----END PGP SIGNATURE----- --=-=-=-- From unknown Fri Jun 20 20:10:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49006: MELPA importer uses the wrong source when called from CLI Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 13 Jun 2021 18:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49006 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 49006@debbugs.gnu.org Received: via spool by 49006-submit@debbugs.gnu.org id=B49006.162360792826571 (code B ref 49006); Sun, 13 Jun 2021 18:13:01 +0000 Received: (at 49006) by debbugs.gnu.org; 13 Jun 2021 18:12:08 +0000 Received: from localhost ([127.0.0.1]:44350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsUae-0006uU-0t for submit@debbugs.gnu.org; Sun, 13 Jun 2021 14:12:08 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:44428 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsUab-0006tt-8M for 49006@debbugs.gnu.org; Sun, 13 Jun 2021 14:12:06 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1623607916; bh=QExOthFPLtVRfApU4KKq70mSvdezq5D4hvsAFIZadZM=; h=From:To:Subject:In-Reply-To:References:Date; b=sfiXyi+anVZkMommZohQzO5f5YSzWqAd3iraGuQSe307a3HSS76PUJhNSMgaPjk/h fL8nI/YqeptxmiJoaOIVqFQHCxaywI6mNP1soac1H6Ju7DmLICVd6drpo+JTwBHzGc y2om0FuN1vlZXsUsWr3BIpGZOLUGzc7iTCuhjXAY= In-Reply-To: <87fsxl91oh.fsf@yoctocell.xyz> References: <87fsxl91oh.fsf@yoctocell.xyz> Date: Sun, 13 Jun 2021 20:11:55 +0200 Message-ID: <87czsp8wic.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Okay, so new findings: When the (guix import elpa) module has been compiled, the generated package definition uses =?UTF-8?Q?=E2=80=98url-fetch=E2=80=99?= to fetch the source. --88--- ~/src/guix [env]$ ./pre-inst-env guix import elpa -a melpa magit Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Okay, so new findings: When the (guix import elpa) module has been compiled, the generated package definition uses =?UTF-8?Q?=E2=80=98url-fetch=E2=80=99?= to fetch the source. --88--- ~/src/guix [env]$ ./pre-inst-env guix import elpa -a melpa magit Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 1.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Okay, so new findings: When the (guix import elpa) module has been compiled, the generated package definition uses =E2=80=98url-fetch=E2=80=99 to fetch the source. =2D-8<---------------cut here---------------start------------->8--- ~/src/guix [env]$ ./pre-inst-env guix import elpa -a melpa magit Starting download of /tmp/guix-file.US750W From=20https://melpa.org/packages/magit-20210609.2000.tar... =E2=80=A6609.2000.tar 1.7MiB 365KiB/s 00:05 [#############= #####] 100.0% (package (name "emacs-magit") (version "20210609.2000") (source (origin (method url-fetch) (uri (string-append "https://melpa.org/packages/magit-" version ".tar")) (sha256 (base32 "0pplizxy20i3i9zqm5kfjz4la93gpz8wwh1ybwdwngv5ks7vhdsr")))) (build-system emacs-build-system) (propagated-inputs `(("emacs-dash" ,emacs-dash) ("emacs-git-commit" ,emacs-git-commit) ("emacs-magit-section" ,emacs-magit-section) ("emacs-transient" ,emacs-transient) ("emacs-with-editor" ,emacs-with-editor))) (home-page "https://github.com/magit/magit") (synopsis "A Git porcelain inside Emacs.") (description "Magit is a text-based Git user interface that puts an unmatched focus on streamlining workflows. Commands are invoked using short mnemonic key sequences that take the cursor=E2=80=99s position in the highly actiona= ble interface into account to provide context-sensitive behavior. With Magit you can do nearly everything that you can do when using Git on the command-line, but at greater speed and while taking advantage of advanced features that previously seemed too daunting to use on a daily basis. Many users will find that by using Magit they can become more effective Git user. ") (license #f)) =2D-8<---------------cut here---------------end--------------->8--- However, if the (guix import elpa) module hasn=E2=80=99t been compiled, say= I just add a dummy comment to it, then the generated package definition uses =E2=80=98git-fetch=E2=80=99 instead of =E2=80=98url-fetch=E2=80=99. N= otice the messages emitted by Guile. =2D-8<---------------cut here---------------start------------->8--- ~/src/guix [env]$ ./pre-inst-env guix import elpa -a melpa magit ;;; note: source file /home/yoctocell/src/guix/guix/import/elpa.scm ;;; newer than compiled /home/yoctocell/src/guix/guix/import/elpa.go ;;; note: source file /home/yoctocell/src/guix/guix/import/elpa.scm ;;; newer than compiled /home/yoctocell/.config/guix/current/lib/guil= e/3.0/site-ccache/guix/import/elpa.go ;;; note: source file /home/yoctocell/src/guix/guix/import/elpa.scm ;;; newer than compiled /home/yoctocell/.guix-home/profile/lib/guile/= 3.0/site-ccache/guix/import/elpa.go ;;; note: source file /home/yoctocell/src/guix/guix/import/elpa.scm ;;; newer than compiled /home/yoctocell/.config/guix/current/lib/guil= e/3.0/site-ccache/guix/import/elpa.go ;;; note: source file /home/yoctocell/src/guix/guix/import/elpa.scm ;;; newer than compiled guix/import/elpa.go ;;; note: source file /home/yoctocell/src/guix/guix/import/elpa.scm ;;; newer than compiled /home/yoctocell/.cache/guile/ccache/3.0-LE-8-= 4.5/home/yoctocell/src/guix/guix/import/elpa.scm.go (package (name "emacs-magit") (version "20210609.2000") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/magit/magit.git") (commit "71f57c5582448be81b02ba53750dd2ea39ed0eaf"))) (sha256 (base32 "16ip50a46nk6xxj8qkpf6rmp28zjc1bhyjj9bfgibim8ywj87dlq")))) (build-system emacs-build-system) (propagated-inputs `(("emacs-dash" ,emacs-dash) ("emacs-git-commit" ,emacs-git-commit) ("emacs-magit-section" ,emacs-magit-section) ("emacs-transient" ,emacs-transient) ("emacs-with-editor" ,emacs-with-editor))) (arguments '(#:include '("^lisp/magit$" "^lisp/magit[^/]+.el$" "^lisp/git-rebase.el$" "^Documentation/magit.texi$" "^Documentation/AUTHORS.md$" "^LICENSE$") #:exclude '("^lisp/magit-libgit.el$" "^lisp/magit-section.el$"))) (home-page "https://github.com/magit/magit") (synopsis "A Git porcelain inside Emacs.") (description "Magit is a text-based Git user interface that puts an unmatched focus on streamlining workflows. Commands are invoked using short mnemonic key sequences that take the cursor=E2=80=99s position in the highly actiona= ble interface into account to provide context-sensitive behavior. With Magit you can do nearly everything that you can do when using Git on the command-line, but at greater speed and while taking advantage of advanced features that previously seemed too daunting to use on a daily basis. Many users will find that by using Magit they can become more effective Git user. ") (license #f)) =2D-8<---------------cut here---------------end--------------->8--- Maybe there is some problem with Guile itself? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmDGSmsVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5b8oP+wTVXlFENDq0VOXR5U3z/nCrvHFe 0XASR77E63n3hHaH+4VEnASHHnGBI/KmMwFtwSLU1MXfC4tQ7dPEDrBsOqm0QfbB HnVIjdo+DKf7+jSQFAwKD067F5Mts5+92lZuveanmd2MtLHGK5iYHJ0xkZOjW/p4 fulftakDSWNbG8JdC9nPQgbx26IeFR+0kX3Y8vkuzcTOor11HE98Bp4bzBzo+yZ3 Bl17dQY35VLFmkfXCdKDlx6uxLOxWR9XxMbADKznlegxy6HTU+zB2X5PIOnhYjoy jt275h0aY0sHKHpVG5HUGk+wHQlcHetROXNRz2Ri0yj1LOhCAq7ZtMfmbRWEQwrx SZ5ZwVEC1kfHrR9auUm6C3eMTOJfYsV+AQpasUfDFpYTrIKr9OF0eiQoaPVcq1MM Zfpa7rYRO9xcHtHviJIA0W0WJXVOyX5rSOuOhPZyjmBCJxSNj5FT7LoWc7pQjwzS abJHwpjBeitHdH/+9amqqtZMqcd6e1J0uOq/fxniaL4GWkiURHDjXiMkvGlgqYgC MlQv+dFZVSMcXJnu2Mr5XT+eGvHZrm+b3vOh6O47ayAxYAuY43dWc6UOtMbZ0Mrx eIOYFCgR+nIjwln7MNwRrMGxzx+C5McF0FRO4Yfc9y3XpmJyVkbiByi58VBhuKDV FmmW27NAcBAZLKXh =JWgp -----END PGP SIGNATURE----- --=-=-=-- From unknown Fri Jun 20 20:10:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49006: MELPA importer uses the wrong source when called from CLI Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 06 Sep 2021 11:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49006 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 49006@debbugs.gnu.org Received: via spool by 49006-submit@debbugs.gnu.org id=B49006.163092653930417 (code B ref 49006); Mon, 06 Sep 2021 11:09:02 +0000 Received: (at 49006) by debbugs.gnu.org; 6 Sep 2021 11:08:59 +0000 Received: from localhost ([127.0.0.1]:52147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNCUl-0007uX-FV for submit@debbugs.gnu.org; Mon, 06 Sep 2021 07:08:59 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:36410 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNCUj-0007uI-QR for 49006@debbugs.gnu.org; Mon, 06 Sep 2021 07:08:58 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1630926530; bh=O/ArN9kALLqnUQozFmXxNs4IZdJsl+rkOcoK1rs12sU=; h=From:To:Subject:In-Reply-To:References:Date; b=PpEcaEXiwYnR4C6KLndWXg/vqFGivCpXlQhHQWqJN/X3VC9tgP3CqTD256QG+aL/B Ggr7qWDITCTBcLsYwoIPKhGeFRj16iEBETRUWK2njc3EImqsjBUBXt3UYHvCIks6l+ NOARqxqSCUviEdeue7b4Hgs5URgzYJ4z6GhZdu5s= In-Reply-To: <87czsp8wic.fsf@yoctocell.xyz> References: <87fsxl91oh.fsf@yoctocell.xyz> <87czsp8wic.fsf@yoctocell.xyz> Date: Mon, 06 Sep 2021 13:08:49 +0200 Message-ID: <87fsui2c72.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Sun, Jun 13 2021, Xinglu Chen wrote: > Okay, so new findings: > > When the (guix import elpa) module has been compiled, the generated > package definition uses =?UTF-8?Q?=E2=80=98url-fetch=E2=80=99?= to fetch the source. > > --8 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Sun, Jun 13 2021, Xinglu Chen wrote: > Okay, so new findings: > > When the (guix import elpa) module has been compiled, the generated > package definition uses =?UTF-8?Q?=E2=80=98url-fetch=E2=80=99?= to fetch the source. > > --8 Okay, so new findings: > > When the (guix import elpa) module has been compiled, the generated > package definition uses =E2=80=98url-fetch=E2=80=99 to fetch the source. > > --8<---------------cut here---------------start------------->8--- > ~/src/guix [env]$ ./pre-inst-env guix import elpa -a melpa magit > > Starting download of /tmp/guix-file.US750W > From https://melpa.org/packages/magit-20210609.2000.tar... > =E2=80=A6609.2000.tar 1.7MiB 365KiB/s 00:05 [###########= #######] 100.0% > (package > (name "emacs-magit") > (version "20210609.2000") > (source > (origin > (method url-fetch) > (uri (string-append > "https://melpa.org/packages/magit-" > version > ".tar")) > (sha256 > (base32 > "0pplizxy20i3i9zqm5kfjz4la93gpz8wwh1ybwdwngv5ks7vhdsr")))) > (build-system emacs-build-system) > (propagated-inputs > `(("emacs-dash" ,emacs-dash) > ("emacs-git-commit" ,emacs-git-commit) > ("emacs-magit-section" ,emacs-magit-section) > ("emacs-transient" ,emacs-transient) > ("emacs-with-editor" ,emacs-with-editor))) > (home-page "https://github.com/magit/magit") > (synopsis "A Git porcelain inside Emacs.") > (description > "Magit is a text-based Git user interface that puts an unmatched focus > on streamlining workflows. Commands are invoked using short mnemonic > key sequences that take the cursor=E2=80=99s position in the highly actio= nable > interface into account to provide context-sensitive behavior. > > With Magit you can do nearly everything that you can do when using Git > on the command-line, but at greater speed and while taking advantage > of advanced features that previously seemed too daunting to use on a > daily basis. Many users will find that by using Magit they can become > more effective Git user. > ") > (license #f)) > --8<---------------cut here---------------end--------------->8--- > > However, if the (guix import elpa) module hasn=E2=80=99t been compiled, s= ay I > just add a dummy comment to it, then the generated package definition > uses =E2=80=98git-fetch=E2=80=99 instead of =E2=80=98url-fetch=E2=80=99. = Notice the messages emitted by > Guile. > > --8<---------------cut here---------------start------------->8--- > ~/src/guix [env]$ ./pre-inst-env guix import elpa -a melpa magit > ;;; note: source file /home/yoctocell/src/guix/guix/import/elpa.scm > ;;; newer than compiled /home/yoctocell/src/guix/guix/import/elpa.go > ;;; note: source file /home/yoctocell/src/guix/guix/import/elpa.scm > ;;; newer than compiled /home/yoctocell/.config/guix/current/lib/gu= ile/3.0/site-ccache/guix/import/elpa.go > ;;; note: source file /home/yoctocell/src/guix/guix/import/elpa.scm > ;;; newer than compiled /home/yoctocell/.guix-home/profile/lib/guil= e/3.0/site-ccache/guix/import/elpa.go > ;;; note: source file /home/yoctocell/src/guix/guix/import/elpa.scm > ;;; newer than compiled /home/yoctocell/.config/guix/current/lib/gu= ile/3.0/site-ccache/guix/import/elpa.go > ;;; note: source file /home/yoctocell/src/guix/guix/import/elpa.scm > ;;; newer than compiled guix/import/elpa.go > ;;; note: source file /home/yoctocell/src/guix/guix/import/elpa.scm > ;;; newer than compiled /home/yoctocell/.cache/guile/ccache/3.0-LE-= 8-4.5/home/yoctocell/src/guix/guix/import/elpa.scm.go > (package > (name "emacs-magit") > (version "20210609.2000") > (source > (origin > (method git-fetch) > (uri (git-reference > (url "https://github.com/magit/magit.git") > (commit > "71f57c5582448be81b02ba53750dd2ea39ed0eaf"))) > (sha256 > (base32 > "16ip50a46nk6xxj8qkpf6rmp28zjc1bhyjj9bfgibim8ywj87dlq")))) > (build-system emacs-build-system) > (propagated-inputs > `(("emacs-dash" ,emacs-dash) > ("emacs-git-commit" ,emacs-git-commit) > ("emacs-magit-section" ,emacs-magit-section) > ("emacs-transient" ,emacs-transient) > ("emacs-with-editor" ,emacs-with-editor))) > (arguments > '(#:include > '("^lisp/magit$" > "^lisp/magit[^/]+.el$" > "^lisp/git-rebase.el$" > "^Documentation/magit.texi$" > "^Documentation/AUTHORS.md$" > "^LICENSE$") > #:exclude > '("^lisp/magit-libgit.el$" > "^lisp/magit-section.el$"))) > (home-page "https://github.com/magit/magit") > (synopsis "A Git porcelain inside Emacs.") > (description > "Magit is a text-based Git user interface that puts an unmatched focus > on streamlining workflows. Commands are invoked using short mnemonic > key sequences that take the cursor=E2=80=99s position in the highly actio= nable > interface into account to provide context-sensitive behavior. > > With Magit you can do nearly everything that you can do when using Git > on the command-line, but at greater speed and while taking advantage > of advanced features that previously seemed too daunting to use on a > daily basis. Many users will find that by using Magit they can become > more effective Git user. > ") > (license #f)) > --8<---------------cut here---------------end--------------->8--- > > Maybe there is some problem with Guile itself? I came up with a hack to fix the issue, see the diff below diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm index c0dc5acf51..0d07b4b35e 100644 --- a/guix/import/elpa.scm +++ b/guix/import/elpa.scm @@ -335,7 +335,8 @@ the package named PACKAGE-NAME." type ''." =20=20=20 (define melpa-recipe - (if (eq? repo 'melpa) + ;; XXX: Otherwise (eq? repo 'melpa) always seems to return #f. + (if (force (delay (eq? repo 'melpa))) (package-name->melpa-recipe (elpa-package-name pkg)) #f)) =20=20=20 I am not sure if this is a good workaround, though. Any thoughts? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmE19sEVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x55aEP/RAOmMLSPEVQC1xkWgy42VWhRJoj vGXamThwtMXYf6ugtZjKp1cRzf+Hg6zGHjNheSgzA1NNi+cga0n+coKlzeMPKiTM IvZLrJPXQMK5w/fCPEguLS+GRQlXF0hmFvgKS8LxaYxSBvMHexmqxLvSmR9iiaLq xHdK3mxVu3NtLsbasVZ3MZzmhKuQPEXgqT0OMgaS8BfNlrB359bLBE/k9X8pS2Hc Io/DZ1HD2AQdxSPOTYar9Og8W+5+lwak/eKwGumZ3obu8H7iwGpVgGDbb7WAL9FC wzt6ZDyfsdHscKdSPONCQLHHtdUDx3vYTQP+23/FvkTDLG0KYJCb7kaB+nbBdv0a T3OQajFtIw+BjKYZI5Wbb426wp6jA9iYD0135hVbkuyt41MhsFZBW9hQ3B48ndBH 3UPE5RPKzuVuIzKqqmR5/K5caRxjCQPlzFLAaHfGlS6SqD4QWIPCKs/763rFP6iJ bSNXmQpeCV9NzF68wehmiYL3l07CjQkmwlTGr637rwaLWgT1Gi0dJUDvWCLDbe2S /io018jIr2P+HUy65jHL2ap/zAQdZLbU88CHSBbmtdWvFQJJVjpO9gavDpv7LSO+ dxotTp0QzvHp+RFX1ALr9Osx20/IkCATcbNIA36cRW/3uop46sEJtjMi8PUf2Zqi 9Bp/qhv8qt2sR60F =cWy2 -----END PGP SIGNATURE----- --=-=-=-- From unknown Fri Jun 20 20:10:04 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Xinglu Chen Subject: bug#49006: closed (Re: bug#49006: MELPA importer uses the wrong source when called from CLI) Message-ID: References: <87y261kjs4.fsf@gnu.org> <87fsxl91oh.fsf@yoctocell.xyz> X-Gnu-PR-Message: they-closed 49006 X-Gnu-PR-Package: guix Reply-To: 49006@debbugs.gnu.org Date: Sat, 06 Nov 2021 22:22:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1636237322-10557-1" This is a multi-part message in MIME format... ------------=_1636237322-10557-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #49006: MELPA importer uses the wrong source when called from CLI which was filed against the guix package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 49006@debbugs.gnu.org. --=20 49006: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D49006 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1636237322-10557-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 49006-done) by debbugs.gnu.org; 6 Nov 2021 22:21:26 +0000 Received: from localhost ([127.0.0.1]:50996 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjU3y-0002in-Cn for submit@debbugs.gnu.org; Sat, 06 Nov 2021 18:21:26 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39154) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjU3w-0002iX-CF for 49006-done@debbugs.gnu.org; Sat, 06 Nov 2021 18:21:24 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56114) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjU3q-0001dU-Fz; Sat, 06 Nov 2021 18:21:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=w/sto8IC0jd2Vu8qH5cb70RAnZh/zpcVRw/RE403LbU=; b=eDz7LTUBukC1el7DILLP ZM6HLBIKV6hIlx/NaxUvVxBVHjSeKM5vQep3+1E1XEdRXNqRkS+UiH6euTF/RuAUNdN2DE/kdevOj pHKMdVh5BQt4GH6BJmVvvbo+BA/F76v1DLDZ9G+pnKYSgRfCN7WMLApwqPFOFU8CJsq/3F9EPPx07 hCvgfUBBNZmmWc3iPI0053KhdT+aoMMIQ1ThpRoj41VaEcsPVzdP7v51JlRFyGlqmUs+SwmTAVd0K 5Oo04fVg15/xABhTv8D5nDdKuUl1XJWzkmixGVUYC07mYO4Cp9AGkiinXZj1RKRdHyFtuILdGFK67 L9+RMuw9zjKw5w==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:55528 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjU3q-0007br-6U; Sat, 06 Nov 2021 18:21:18 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Xinglu Chen Subject: Re: bug#49006: MELPA importer uses the wrong source when called from CLI References: <87fsxl91oh.fsf@yoctocell.xyz> <87czsp8wic.fsf@yoctocell.xyz> Date: Sat, 06 Nov 2021 23:21:15 +0100 In-Reply-To: <87czsp8wic.fsf@yoctocell.xyz> (Xinglu Chen's message of "Sun, 13 Jun 2021 20:11:55 +0200") Message-ID: <87y261kjs4.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: 49006-done Cc: 49006-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) Hi, Xinglu Chen skribis: > When the (guix import elpa) module has been compiled, the generated > package definition uses =E2=80=98url-fetch=E2=80=99 to fetch the source. [...] > However, if the (guix import elpa) module hasn=E2=80=99t been compiled, s= ay I > just add a dummy comment to it, then the generated package definition > uses =E2=80=98git-fetch=E2=80=99 instead of =E2=80=98url-fetch=E2=80=99. = Notice the messages emitted by > Guile. This is a miscompilation error that d21353adea700b7f008d7a9f047d9f8b9c422cfb works around, presumably the same as . Thanks, Ludo=E2=80=99. ------------=_1636237322-10557-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 13 Jun 2021 16:20:26 +0000 Received: from localhost ([127.0.0.1]:44269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsSqX-0001pR-FL for submit@debbugs.gnu.org; Sun, 13 Jun 2021 12:20:25 -0400 Received: from lists.gnu.org ([209.51.188.17]:47944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsSqV-0001pJ-76 for submit@debbugs.gnu.org; Sun, 13 Jun 2021 12:20:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsSqU-0002Fp-PJ for bug-guix@gnu.org; Sun, 13 Jun 2021 12:20:22 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:33876 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 1lsSqS-00072B-09 for bug-guix@gnu.org; Sun, 13 Jun 2021 12:20:22 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1623601215; bh=4C/F91iMI8Ouo4fSUZmr2pv+oY07QcrFN66URJWzzRI=; h=From:To:Subject:Date; b=Q9a4XPkhvtPzHszIa5ZetFSYa/0s+2e3DqKxzEjFKhbtH7jCMIY1rXOZHWwjQPI35 PPdZJtC5Ky0smAAkkimbqUBmm/hWtRW+aNfLzSU8DMP2z6N4BInX0qrArIUe4nLTe4 4SxVYV7z5O4uB4DvtxF/LR0us+4+n54gywLEiHgw= To: bug-guix@gnu.org Subject: MELPA importer uses the wrong source when called from CLI Date: Sun, 13 Jun 2021 18:20:14 +0200 Message-ID: <87fsxl91oh.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" 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.973, PDS_OTHER_BAD_TLD=1.997, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_FILL_THIS_FORM_SHORT=0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 3.1 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: When importing a package from MELPA, the source for generated package definition points to a (potentially unstable?) MELPA URL. https://melpa.org/packages/PACKAGE-VERSION.tar --88--- ~/src/guix [env]$ ./pre-inst-env guix import elpa -a melpa magit Content analysis details: (3.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [209.51.188.17 listed in wl.mailspike.net] 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 2.0 FROM_SUSPICIOUS_NTLD_FP From abused NTLD -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 T_FILL_THIS_FORM_SHORT Fill in a short form with personal information X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.1 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable When importing a package from MELPA, the source for generated package definition points to a (potentially unstable?) MELPA URL. https://melpa.org/packages/PACKAGE-VERSION.tar =2D-8<---------------cut here---------------start------------->8--- ~/src/guix [env]$ ./pre-inst-env guix import elpa -a melpa magit Starting download of /tmp/guix-file.wbtAlA From=20https://melpa.org/packages/magit-20210609.2000.tar... =E2=80=A6609.2000.tar 1.7MiB 472KiB/s 00:04 [#############= #####] 100.0% (package (name "emacs-magit") (version "20210609.2000") (source (origin (method url-fetch) (uri (string-append "https://melpa.org/packages/magit-" version ".tar")) (sha256 (base32 "0pplizxy20i3i9zqm5kfjz4la93gpz8wwh1ybwdwngv5ks7vhdsr")))) (build-system emacs-build-system) (propagated-inputs `(("emacs-dash" ,emacs-dash) ("emacs-git-commit" ,emacs-git-commit) ("emacs-magit-section" ,emacs-magit-section) ("emacs-transient" ,emacs-transient) ("emacs-with-editor" ,emacs-with-editor))) (home-page "https://github.com/magit/magit") (synopsis "A Git porcelain inside Emacs.") (description "Magit is a text-based Git user interface that puts an unmatched focus on streamlining workflows. Commands are invoked using short mnemonic key sequences that take the cursor=E2=80=99s position in the highly actiona= ble interface into account to provide context-sensitive behavior. With Magit you can do nearly everything that you can do when using Git on the command-line, but at greater speed and while taking advantage of advanced features that previously seemed too daunting to use on a daily basis. Many users will find that by using Magit they can become more effective Git user. ") (license #f)) =2D-8<---------------cut here---------------end--------------->8--- However, looking at (guix import elpa), it has a =E2=80=98melpa-recipe->ori= gin=E2=80=99 procedure, which calls the =E2=80=98git-repository->origin=E2=80=99 procedu= re, which returns an origin that uses =E2=80=98git-fetch=E2=80=99. #+begin_src scheme (define (git-repository->origin recipe url) "Fetch origin details from the Git repository at URL for the provided MEL= PA RECIPE." (define ref (cond ((assoc-ref recipe #:branch) =3D> (lambda (branch) (cons 'branch branch))) ((assoc-ref recipe #:commit) =3D> (lambda (commit) (cons 'commit commit))) (else '(branch . "master")))) (let-values (((directory commit) (download-git-repository url ref))) `(origin (method git-fetch) (uri (git-reference (url ,url) (commit ,commit))) (sha256 (base32 ,(bytevector->nix-base32-string (file-hash directory (negate vcs-file?) #t))))))) (define* (melpa-recipe->origin recipe) "Fetch origin details from the MELPA recipe and associated repository for the package named PACKAGE-NAME." (define (github-repo->url repo) (string-append "https://github.com/" repo ".git")) (define (gitlab-repo->url repo) (string-append "https://gitlab.com/" repo ".git")) (match (assq-ref recipe ':fetcher) ('github (git-repository->origin recipe (github-repo->url (assq-ref rec= ipe ':repo)))) ('gitlab (git-repository->origin recipe (gitlab-repo->url (assq-ref rec= ipe ':repo)))) ('git (git-repository->origin recipe (assq-ref recipe ':url))) (#f #f) ; if we're not using melpa then this stops us printing a warn= ing (_ (warning (G_ "Unsupported MELPA fetcher: ~a, falling back to unstabl= e MELPA source.~%") (assq-ref recipe ':fetcher)) #f))) #+end_src =E2=80=98melpa-recipe->origin=E2=80=99 is used in the =E2=80=98elpa-package= ->sexp=E2=80=99 procedure, and takes precedence over the =E2=80=98url-fetch=E2=80=99 origin. Meaning = that =E2=80=98melpa-source=E2=80=99 must have been #f, otherwise it shouldn=E2= =80=99t have used =E2=80=99url-fetch=E2=80=99. #+begin_src scheme (define melpa-source (melpa-recipe->origin melpa-recipe)) (values `(package (name ,(elpa-name->package-name name)) (version ,version) (source ,(or melpa-source ;here (let ((tarball (with-store store (download-to-store store source-= url)))) `(origin (method url-fetch) (uri (string-append ,@(factorize-uri source-url version= ))) (sha256 (base32 ,(if tarball (bytevector->nix-base32-string (file-sha256 tarb= all)) "failed to download package"))))))) ...)) #+end_src What=E2=80=99s weird is that calling =E2=80=98elpa->guix-package=E2=80=99 i= n the REPL generates a package definition that uses =E2=80=99git-fetch=E2=80=99 instead of =E2= =80=99url-fetch=E2=80=99 =2D-8<---------------cut here---------------start------------->8--- scheme@(guile-user)> ,use(guix import elpa) scheme@(guile-user)> (elpa->guix-package "magit" #:repo 'melpa) $2 =3D (package (name "emacs-magit") (version "20210609.2000") (source (ori= gin (method git-fetch) (uri (git-reference (url "https://github.com/magit/m= agit.git") (commit "71f57c5582448be81b02ba53750dd2ea39ed0eaf"))) (sha256 (b= ase32 "16ip50a46nk6xxj8qkpf6rmp28zjc1bhyjj9bfgibim8ywj87dlq")))) (build-sys= tem emacs-build-system) (propagated-inputs (quasiquote (("emacs-dash" (unqu= ote emacs-dash)) ("emacs-git-commit" (unquote emacs-git-commit)) ("emacs-ma= git-section" (unquote emacs-magit-section)) ("emacs-transient" (unquote ema= cs-transient)) ("emacs-with-editor" (unquote emacs-with-editor))))) (argume= nts (quote (#:include (quote ("^lisp/magit$" "^lisp/magit[^/]+.el$" "^lisp/= git-rebase.el$" "^Documentation/magit.texi$" "^Documentation/AUTHORS.md$" "= ^LICENSE$")) #:exclude (quote ("^lisp/magit-libgit.el$" "^lisp/magit-sectio= n.el$"))))) (home-page "https://github.com/magit/magit") (synopsis "A Git p= orcelain inside Emacs.") (description "Magit is a text-based Git user inter= face that puts an unmatched focus\non streamlining workflows. Commands are= invoked using short mnemonic\nkey sequences that take the cursor=E2=80=99s= position in the highly actionable\ninterface into account to provide conte= xt-sensitive behavior.\n\nWith Magit you can do nearly everything that you = can do when using Git\non the command-line, but at greater speed and while = taking advantage\nof advanced features that previously seemed too daunting = to use on a\ndaily basis. Many users will find that by using Magit they ca= n become\nmore effective Git user.\n") (license license:gpl3+)) $3 =3D ("dash" "git-commit" "magit-section" "transient" "with-editor") =2D-8<---------------cut here---------------end--------------->8--- --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmDGMD4VHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5JEsP/R0HWNNasONb0TW0cQa+QvHook6D 9s87poLRSnWiHwH50d68VHNoxd6D4a59F9Xpa/pncEvThDEp58LR7IrwxnpCjymR aPDETDz6gRJFLwhmCUBqcxLlm4SpOv6NyhVbSXJSs6vF/C8Dt3OR+VzVf6Itp5hP 1snFdK6HzRyLV5U2adLUkc7sFsAZjuQZP/9F8HfcxQoZ2Q7YQUNPWONMl4gtIJaR ru5U+ToOvGicG6fyQylH7wvVY63JCid+9sHiirftJFYHeiL00cWTPYp5m1r9g+LR 2L0QY25tURCu/2pfw92mFRJ034olzrKgpdL81gIeyW9e8L0gmo6BUcf7yD8sh+yk pw53JVYyx1vpJnPPoTyienDwoFM8gIcEwI5epUMYE/ZpJ+3RNHQ6GUwMMykLhHE2 CkKyRSu8Uh7VVimoYiKB0TTeV+5tMjOJvMi7kiXB6ZneEKsohepbsgQKo9swoJYG tuoPfFl1bg+bO2ajPwzieq9DnK2ONata/ma7Z0qN1tJcrV121LKiaJFzSCFdQzcl +U32dQIpx+kauAScyrtyfPQa8r+sTnnLM3B5hq3oWvWudecIkATrYlmjU6I7iqqR gbvQNH8JQ6roKJNPviKmxkUrOH4aV9IYeCMe05lFNhzYz+4U49VsVCSOLRdnTEb0 zJmeFYABXsrjCOAT =pWry -----END PGP SIGNATURE----- --=-=-=-- ------------=_1636237322-10557-1--