syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.67k stars 4.89k forks source link

Failure to start Spacemacs following upgrade to Emacs 27.1 #13866

Closed mirkov closed 2 years ago

mirkov commented 4 years ago

Description :octocat:

I run Emacs on MSYS2 & Windows10. This problem showed up after I updated MSYS2, which installed Emacs 27.1.

Reproduction guide :beetle:

Observed behaviour: :eyes: :broken_heart: Evil mode is not active. Editing in Emacs/holy mode. *Error Buffer* has a message.

gpg is looking in a directory that does not exist, and whose name is the concatenation of the current directory and the target directory. Here are the contents of the *Error Buffer*:

Failed to verify signature archive-contents.sig:
No public key for 066DAFCB81E42C40 created at 2020-08-20T05:05:02-0400 using RSA
Command output:
gpg: keyblock resource '/c/Users/977315/tmp/c:/Users/977315/.emacs.d/elpa/gnupg/pubring.kbx': No such file or directory
gpg: Signature made Thu, Aug 20, 2020  5:05:02 AM EDT
gpg:                using RSA key C433554766D3DDC64221BFAA066DAFCB81E42C40
gpg: Can't check signature: No public key

The *Messages* buffer shows package update notes, the failure to update the gnu archive and multiple failures to load packages:

Loading c:/Users/977315/.spacemacs.d/init.el (source)...done
(Spacemacs) --> refreshing package archive: melpa... [1/3]
Contacting host: melpa.org:443
Importing package-keyring.gpg...done
Contacting host: melpa.org:443 [2 times]
Package refresh done
(Spacemacs) --> refreshing package archive: org... [2/3]
Importing package-keyring.gpg...done
Contacting host: orgmode.org:443
Package refresh done
(Spacemacs) --> refreshing package archive: gnu... [3/3]
Importing package-keyring.gpg...done
Contacting host: elpa.gnu.org:443
Package refresh done
Failed to download ‘gnu’ archive.
(Spacemacs) --> installing package: evil@spacemacs-bootstrap... [1/27]
(Spacemacs) Error: 
An error occurred while installing evil (error: (error Package ‘undo-tree-0.1.3’ is unavailable))

(Spacemacs) --> installing package: hybrid-mode@spacemacs-bootstrap... [2/27]
Fetcher: file
Source: nil

Skipping rebuild of c:/Users/977315/.emacs.d/.cache/quelpa/packages/hybrid-mode-20191226.93208.el
Fetcher: github
Source: emacs-evil/evil

Updating c:/Users/977315/.emacs.d/.cache/quelpa/build/evil/
c:/Users/977315/.emacs.d/.cache/quelpa/build/evil/evil-command-window.el -> c:/Users/977315/AppData/Local/Temp/evilptgjX1/evil-20200816.351/evil-command-window.el
c:/Users/977315/.emacs.d/.cache/quelpa/build/evil/evil-commands.el -> c:/Users/977315/AppData/Local/Temp/evilptgjX1/evil-20200816.351/evil-commands.el
c:/Users/977315/.emacs.d/.cache/quelpa/build/evil/evil-common.el -> c:/Users/977315/AppData/Local/Temp/evilptgjX1/evil-20200816.351/evil-common.el
c:/Users/977315/.emacs.d/.cache/quelpa/build/evil/evil-core.el -> c:/Users/977315/AppData/Local/Temp/evilptgjX1/evil-20200816.351/evil-core.el
c:/Users/977315/.emacs.d/.cache/quelpa/build/evil/evil-development.el -> c:/Users/977315/AppData/Local/Temp/evilptgjX1/evil-20200816.351/evil-development.el
c:/Users/977315/.emacs.d/.cache/quelpa/build/evil/evil-digraphs.el -> c:/Users/977315/AppData/Local/Temp/evilptgjX1/evil-20200816.351/evil-digraphs.el
c:/Users/977315/.emacs.d/.cache/quelpa/build/evil/evil-ex.el -> c:/Users/977315/AppData/Local/Temp/evilptgjX1/evil-20200816.351/evil-ex.el
c:/Users/977315/.emacs.d/.cache/quelpa/build/evil/evil-integration.el -> c:/Users/977315/AppData/Local/Temp/evilptgjX1/evil-20200816.351/evil-integration.el
c:/Users/977315/.emacs.d/.cache/quelpa/build/evil/evil-jumps.el -> c:/Users/977315/AppData/Local/Temp/evilptgjX1/evil-20200816.351/evil-jumps.el
c:/Users/977315/.emacs.d/.cache/quelpa/build/evil/evil-keybindings.el -> c:/Users/977315/AppData/Local/Temp/evilptgjX1/evil-20200816.351/evil-keybindings.el
c:/Users/977315/.emacs.d/.cache/quelpa/build/evil/evil-macros.el -> c:/Users/977315/AppData/Local/Temp/evilptgjX1/evil-20200816.351/evil-macros.el
c:/Users/977315/.emacs.d/.cache/quelpa/build/evil/evil-maps.el -> c:/Users/977315/AppData/Local/Temp/evilptgjX1/evil-20200816.351/evil-maps.el
c:/Users/977315/.emacs.d/.cache/quelpa/build/evil/evil-pkg.el -> c:/Users/977315/AppData/Local/Temp/evilptgjX1/evil-20200816.351/evil-pkg.el
c:/Users/977315/.emacs.d/.cache/quelpa/build/evil/evil-repeat.el -> c:/Users/977315/AppData/Local/Temp/evilptgjX1/evil-20200816.351/evil-repeat.el
c:/Users/977315/.emacs.d/.cache/quelpa/build/evil/evil-search.el -> c:/Users/977315/AppData/Local/Temp/evilptgjX1/evil-20200816.351/evil-search.el
c:/Users/977315/.emacs.d/.cache/quelpa/build/evil/evil-states.el -> c:/Users/977315/AppData/Local/Temp/evilptgjX1/evil-20200816.351/evil-states.el
c:/Users/977315/.emacs.d/.cache/quelpa/build/evil/evil-types.el -> c:/Users/977315/AppData/Local/Temp/evilptgjX1/evil-20200816.351/evil-types.el
c:/Users/977315/.emacs.d/.cache/quelpa/build/evil/evil-vars.el -> c:/Users/977315/AppData/Local/Temp/evilptgjX1/evil-20200816.351/evil-vars.el
c:/Users/977315/.emacs.d/.cache/quelpa/build/evil/evil.el -> c:/Users/977315/AppData/Local/Temp/evilptgjX1/evil-20200816.351/evil.el
Wrote c:/Users/977315/.emacs.d/.cache/quelpa/packages/evil-readme.txt
Parsing tar file...done
Fetcher: github
Source: emacs-evil/goto-chg

Updating c:/Users/977315/.emacs.d/.cache/quelpa/build/goto-chg/
Skipping rebuild of c:/Users/977315/.emacs.d/.cache/quelpa/packages/goto-chg-20200603.1511.el
(Spacemacs) Error: 
An error occurred while installing hybrid-mode (error: (error Package ‘undo-tree-0.1.3’ is unavailable))

(Spacemacs) --> installing package: auctex@latex... [3/27]
(Spacemacs) --> installing package: auctex-latexmk@latex... [4/27]
(Spacemacs) Error: 
An error occurred while installing auctex-latexmk (error: (error Package ‘auctex-11.87’ is unavailable))

(Spacemacs) --> installing package: company-auctex@latex... [5/27]
(Spacemacs) Error: 
An error occurred while installing company-auctex (error: (error Package ‘auctex-11.87’ is unavailable))

(Spacemacs) --> installing package: csv-mode@csv... [6/27]
(Spacemacs) --> installing package: evil-anzu@spacemacs-evil... [7/27]
(Spacemacs) Error: 
An error occurred while installing evil-anzu (error: (error Package ‘undo-tree-0.1.3’ is unavailable))

(Spacemacs) --> installing package: evil-args@spacemacs-evil... [8/27]
(Spacemacs) Error: 
An error occurred while installing evil-args (error: (error Package ‘undo-tree-0.1.3’ is unavailable))

(Spacemacs) --> installing package: evil-cleverparens@spacemacs-evil... [9/27]
(Spacemacs) Error: 
An error occurred while installing evil-cleverparens (error: (error Package ‘undo-tree-0.1.3’ is unavailable))

(Spacemacs) --> installing package: evil-ediff@spacemacs-evil... [10/27]
(Spacemacs) Error: 
An error occurred while installing evil-ediff (error: (error Package ‘undo-tree-0.1.3’ is unavailable))

(Spacemacs) --> installing package: evil-exchange@spacemacs-evil... [11/27]
(Spacemacs) Error: 
An error occurred while installing evil-exchange (error: (error Package ‘undo-tree-0.1.3’ is unavailable))

(Spacemacs) --> installing package: evil-goggles@spacemacs-evil... [12/27]
(Spacemacs) Error: 
An error occurred while installing evil-goggles (error: (error Package ‘undo-tree-0.1.3’ is unavailable))

(Spacemacs) --> installing package: evil-iedit-state@spacemacs-evil... [13/27]
(Spacemacs) Error: 
An error occurred while installing evil-iedit-state (error: (error Package ‘undo-tree-0.1.3’ is unavailable))

(Spacemacs) --> installing package: evil-indent-plus@spacemacs-evil... [14/27]
(Spacemacs) Error: 
An error occurred while installing evil-indent-plus (error: (error Package ‘undo-tree-0.1.3’ is unavailable))

(Spacemacs) --> installing package: evil-lion@spacemacs-evil... [15/27]
(Spacemacs) Error: 
An error occurred while installing evil-lion (error: (error Package ‘undo-tree-0.1.3’ is unavailable))

(Spacemacs) --> installing package: evil-lisp-state@spacemacs-evil... [16/27]
(Spacemacs) Error: 
An error occurred while installing evil-lisp-state (error: (error Package ‘undo-tree-0.1.3’ is unavailable))

(Spacemacs) --> installing package: evil-magit@git... [17/27]
(Spacemacs) Error: 
An error occurred while installing evil-magit (error: (error Package ‘undo-tree-0.1.3’ is unavailable))

(Spacemacs) --> installing package: evil-matchit@spacemacs-evil... [18/27]
(Spacemacs) Error: 
An error occurred while installing evil-matchit (error: (error Package ‘undo-tree-0.1.3’ is unavailable))

(Spacemacs) --> installing package: evil-org@org... [19/27]
(Spacemacs) Error: 
An error occurred while installing evil-org (error: (error Package ‘undo-tree-0.1.3’ is unavailable))

(Spacemacs) --> installing package: evil-surround@spacemacs-evil... [20/27]
(Spacemacs) Error: 
An error occurred while installing evil-surround (error: (error Package ‘undo-tree-0.1.3’ is unavailable))

(Spacemacs) --> installing package: evil-textobj-line@spacemacs-evil... [21/27]
(Spacemacs) Error: 
An error occurred while installing evil-textobj-line (error: (error Package ‘undo-tree-0.1.3’ is unavailable))

(Spacemacs) --> installing package: evil-tutor@spacemacs-evil... [22/27]
(Spacemacs) Error: 
An error occurred while installing evil-tutor (error: (error Package ‘undo-tree-0.1.3’ is unavailable))

(Spacemacs) --> installing package: evil-visual-mark-mode@spacemacs-evil... [23/27]
(Spacemacs) Error: 
An error occurred while installing evil-visual-mark-mode (error: (error Package ‘undo-tree-0.1.3’ is unavailable))

(Spacemacs) --> installing package: evil-visualstar@spacemacs-evil... [24/27]
(Spacemacs) Error: 
An error occurred while installing evil-visualstar (error: (error Package ‘undo-tree-0.1.3’ is unavailable))

(Spacemacs) --> installing package: paradox@spacemacs-navigation... [25/27]
(Spacemacs) Error: 
An error occurred while installing paradox (error: (error Package ‘spinner-1.7.3’ is unavailable))

(Spacemacs) --> installing package: treemacs-evil@treemacs... [26/27]
(Spacemacs) Error: 
An error occurred while installing treemacs-evil (error: (error Package ‘undo-tree-0.1.3’ is unavailable))

(Spacemacs) --> installing package: undo-tree@spacemacs-editing... [27/27]
Saving file c:/Users/977315/.emacs.d/.cache/.custom-settings...
Wrote c:/Users/977315/.emacs.d/.cache/.custom-settings
Spacemacs is ready.

Expected behaviour: :heart: :smile: The awesome Spacemacs experience

SYSTEM_INFO:

Backtrace :paw_prints:

The backtrace captured when I do emacs --debug-init

Debugger entered--Lisp error: (bad-signature "archive-contents.sig")
  signal(bad-signature ("archive-contents.sig"))
  package--check-signature-content("\211\1\263\4\0\1\n\0\35\26!\4\3043UGf\323\335\306B!\277\252\6m\257\313\201\344,@\5\2_><\276\0\n\11\20\6m\257\313\201\344,@..." "(1\n (ace-window .\n\11     [(0 9 0)\n\11      ((avy\n\11\11(0..." "archive-contents.sig")
  #f(compiled-function () #<bytecode 0x359ae71>)()
  package--with-response-buffer-1("https://elpa.gnu.org/packages/" #f(compiled-function () #<bytecode 0x359ae71>) :file "archive-contents.sig" :async nil :error-function #f(compiled-function () #<bytecode 0x359ae9d>) :noerror t)
  package--check-signature("https://elpa.gnu.org/packages/" "archive-contents" "(1\n (ace-window .\n\11     [(0 9 0)\n\11      ((avy\n\11\11(0..." nil #f(compiled-function (&optional good-sigs) #<bytecode 0x359ae29>) #f(compiled-function () #<bytecode 0x359ae3d>))
  #f(compiled-function () #<bytecode 0x359c315>)()
  package--with-response-buffer-1("https://elpa.gnu.org/packages/" #f(compiled-function () #<bytecode 0x359c315>) :file "archive-contents" :async nil :error-function #f(compiled-function () #<bytecode 0x359c329>) :noerror nil)
  package--download-one-archive(("gnu" . "https://elpa.gnu.org/packages/") "archive-contents" nil)
  package--download-and-read-archives(nil)
  package-refresh-contents()
  (let ((package-archives (list archive))) (package-refresh-contents))
  (if (and (not (configuration-layer//package-archive-local-path-p archive)) (eq 'error (let ((-with-timeout-value- (catch 'timeout (let* ... ...)))) (if (eq -with-timeout-value- 'timeout) (progn (progn (display-warning ... ... :warning) 'error)) -with-timeout-value-)))) nil (let ((package-archives (list archive))) (package-refresh-contents)))
  (let ((aname (car archive)) (apath (cdr archive))) (if quiet nil (spacemacs-buffer/replace-last-line (format "--> refreshing package archive: %s... [%s/%s]" aname i count) t)) (spacemacs//redisplay) (setq i (1+ i)) (if (and (not (configuration-layer//package-archive-local-path-p archive)) (eq 'error (let ((-with-timeout-value- (catch ... ...))) (if (eq -with-timeout-value- 'timeout) (progn (progn ... ...)) -with-timeout-value-)))) nil (let ((package-archives (list archive))) (package-refresh-contents))))
  (while --dolist-tail-- (setq archive (car --dolist-tail--)) (let ((aname (car archive)) (apath (cdr archive))) (if quiet nil (spacemacs-buffer/replace-last-line (format "--> refreshing package archive: %s... [%s/%s]" aname i count) t)) (spacemacs//redisplay) (setq i (1+ i)) (if (and (not (configuration-layer//package-archive-local-path-p archive)) (eq 'error (let ((-with-timeout-value- ...)) (if (eq -with-timeout-value- ...) (progn ...) -with-timeout-value-)))) nil (let ((package-archives (list archive))) (package-refresh-contents)))) (setq --dolist-tail-- (cdr --dolist-tail--)))
  (let ((--dolist-tail-- package-archives) archive) (while --dolist-tail-- (setq archive (car --dolist-tail--)) (let ((aname (car archive)) (apath (cdr archive))) (if quiet nil (spacemacs-buffer/replace-last-line (format "--> refreshing package archive: %s... [%s/%s]" aname i count) t)) (spacemacs//redisplay) (setq i (1+ i)) (if (and (not (configuration-layer//package-archive-local-path-p archive)) (eq 'error (let (...) (if ... ... -with-timeout-value-)))) nil (let ((package-archives (list archive))) (package-refresh-contents)))) (setq --dolist-tail-- (cdr --dolist-tail--))))
  (let ((count (length package-archives)) (i 1)) (let ((--dolist-tail-- package-archives) archive) (while --dolist-tail-- (setq archive (car --dolist-tail--)) (let ((aname (car archive)) (apath (cdr archive))) (if quiet nil (spacemacs-buffer/replace-last-line (format "--> refreshing package archive: %s... [%s/%s]" aname i count) t)) (spacemacs//redisplay) (setq i (1+ i)) (if (and (not (configuration-layer//package-archive-local-path-p archive)) (eq 'error (let ... ...))) nil (let ((package-archives ...)) (package-refresh-contents)))) (setq --dolist-tail-- (cdr --dolist-tail--)))) (package-read-all-archive-contents) (if quiet nil (spacemacs-buffer/append "\n")))
  (if (and configuration-layer--package-archives-refreshed (not force)) nil (setq configuration-layer--package-archives-refreshed t) (let ((count (length package-archives)) (i 1)) (let ((--dolist-tail-- package-archives) archive) (while --dolist-tail-- (setq archive (car --dolist-tail--)) (let ((aname (car archive)) (apath (cdr archive))) (if quiet nil (spacemacs-buffer/replace-last-line (format "--> refreshing package archive: %s... [%s/%s]" aname i count) t)) (spacemacs//redisplay) (setq i (1+ i)) (if (and (not ...) (eq ... ...)) nil (let (...) (package-refresh-contents)))) (setq --dolist-tail-- (cdr --dolist-tail--)))) (package-read-all-archive-contents) (if quiet nil (spacemacs-buffer/append "\n"))))
  configuration-layer/retrieve-package-archives()
  (let ((delayed-warnings-backup delayed-warnings-list)) (spacemacs-buffer/append (format "Found %s new package(s) to install...\n" not-inst-count)) (configuration-layer/retrieve-package-archives) (setq installed-count 0) (spacemacs//redisplay) (let ((--dolist-tail-- upkg-names) pkg-name) (while --dolist-tail-- (setq pkg-name (car --dolist-tail--)) (let ((pkg (configuration-layer/get-package pkg-name))) (if (and pkg (memq (eieio-oref pkg ...) '...)) (progn (setq installed-count (1+ installed-count)) (configuration-layer//install-package pkg)))) (setq --dolist-tail-- (cdr --dolist-tail--)))) (let ((--dolist-tail-- upkg-names) pkg-name) (while --dolist-tail-- (setq pkg-name (car --dolist-tail--)) (let ((pkg (configuration-layer/get-package pkg-name))) (if (and pkg (memq (eieio-oref pkg ...) '...)) nil (setq installed-count (1+ installed-count)) (configuration-layer//install-package pkg))) (setq --dolist-tail-- (cdr --dolist-tail--)))) (spacemacs-buffer/append "\n") (if init-file-debug nil (setq delayed-warnings-list delayed-warnings-backup)))
  (progn (spacemacs-buffer/set-mode-line "Installing packages..." t) (let ((delayed-warnings-backup delayed-warnings-list)) (spacemacs-buffer/append (format "Found %s new package(s) to install...\n" not-inst-count)) (configuration-layer/retrieve-package-archives) (setq installed-count 0) (spacemacs//redisplay) (let ((--dolist-tail-- upkg-names) pkg-name) (while --dolist-tail-- (setq pkg-name (car --dolist-tail--)) (let ((pkg (configuration-layer/get-package pkg-name))) (if (and pkg (memq ... ...)) (progn (setq installed-count ...) (configuration-layer//install-package pkg)))) (setq --dolist-tail-- (cdr --dolist-tail--)))) (let ((--dolist-tail-- upkg-names) pkg-name) (while --dolist-tail-- (setq pkg-name (car --dolist-tail--)) (let ((pkg (configuration-layer/get-package pkg-name))) (if (and pkg (memq ... ...)) nil (setq installed-count (1+ installed-count)) (configuration-layer//install-package pkg))) (setq --dolist-tail-- (cdr --dolist-tail--)))) (spacemacs-buffer/append "\n") (if init-file-debug nil (setq delayed-warnings-list delayed-warnings-backup))))
  (if upkg-names (progn (spacemacs-buffer/set-mode-line "Installing packages..." t) (let ((delayed-warnings-backup delayed-warnings-list)) (spacemacs-buffer/append (format "Found %s new package(s) to install...\n" not-inst-count)) (configuration-layer/retrieve-package-archives) (setq installed-count 0) (spacemacs//redisplay) (let ((--dolist-tail-- upkg-names) pkg-name) (while --dolist-tail-- (setq pkg-name (car --dolist-tail--)) (let ((pkg ...)) (if (and pkg ...) (progn ... ...))) (setq --dolist-tail-- (cdr --dolist-tail--)))) (let ((--dolist-tail-- upkg-names) pkg-name) (while --dolist-tail-- (setq pkg-name (car --dolist-tail--)) (let ((pkg ...)) (if (and pkg ...) nil (setq installed-count ...) (configuration-layer//install-package pkg))) (setq --dolist-tail-- (cdr --dolist-tail--)))) (spacemacs-buffer/append "\n") (if init-file-debug nil (setq delayed-warnings-list delayed-warnings-backup)))))
  (let* ((upkg-names (configuration-layer//get-uninstalled-packages packages)) (not-inst-count (length upkg-names)) installed-count) (if upkg-names (progn (spacemacs-buffer/set-mode-line "Installing packages..." t) (let ((delayed-warnings-backup delayed-warnings-list)) (spacemacs-buffer/append (format "Found %s new package(s) to install...\n" not-inst-count)) (configuration-layer/retrieve-package-archives) (setq installed-count 0) (spacemacs//redisplay) (let ((--dolist-tail-- upkg-names) pkg-name) (while --dolist-tail-- (setq pkg-name (car --dolist-tail--)) (let (...) (if ... ...)) (setq --dolist-tail-- (cdr --dolist-tail--)))) (let ((--dolist-tail-- upkg-names) pkg-name) (while --dolist-tail-- (setq pkg-name (car --dolist-tail--)) (let (...) (if ... nil ... ...)) (setq --dolist-tail-- (cdr --dolist-tail--)))) (spacemacs-buffer/append "\n") (if init-file-debug nil (setq delayed-warnings-list delayed-warnings-backup))))))
  (let ((display-buffer-alist '(("\\(\\*Compile-Log\\*\\)\\|\\(\\*Warnings\\*\\)" (display-buffer-in-side-window) (inhibit-same-window . t) (side . bottom) (window-height . 0.2))))) (configuration-layer//configure-quelpa) (let* ((upkg-names (configuration-layer//get-uninstalled-packages packages)) (not-inst-count (length upkg-names)) installed-count) (if upkg-names (progn (spacemacs-buffer/set-mode-line "Installing packages..." t) (let ((delayed-warnings-backup delayed-warnings-list)) (spacemacs-buffer/append (format "Found %s new package(s) to install...\n" not-inst-count)) (configuration-layer/retrieve-package-archives) (setq installed-count 0) (spacemacs//redisplay) (let ((--dolist-tail-- upkg-names) pkg-name) (while --dolist-tail-- (setq pkg-name ...) (let ... ...) (setq --dolist-tail-- ...))) (let ((--dolist-tail-- upkg-names) pkg-name) (while --dolist-tail-- (setq pkg-name ...) (let ... ...) (setq --dolist-tail-- ...))) (spacemacs-buffer/append "\n") (if init-file-debug nil (setq delayed-warnings-list delayed-warnings-backup)))))))
  configuration-layer//install-packages((ac-ispell ace-jump-helm-line ace-link ace-window aggressive-indent anaconda-mode async auctex auctex-latexmk auto-compile auto-complete auto-highlight-symbol auto-yasnippet avy biblio biblio-core bind-key bind-map blacken centered-cursor-mode clean-aindent-mode column-enforce-mode common-lisp-snippets company company-anaconda company-auctex company-reftex company-web css-mode csv-mode cython-mode define-word desktop devdocs diminish dotenv-mode dumb-jump editorconfig elisp-slime-nav emmet-mode emr eval-sexp-fu evil evil-anzu evil-args evil-cleverparens evil-ediff evil-escape evil-exchange evil-goggles ...))
  (let ((packages (append (configuration-layer//filter-distant-packages configuration-layer--used-packages t '(not (oref pkg :lazy-install))) (if (eq 'all dotspacemacs-install-packages) (progn (let (all-other-packages) (let ... ...) (configuration-layer//filter-distant-packages all-other-packages nil))))))) (configuration-layer//install-packages packages) (if (and (or (eq 'used dotspacemacs-install-packages) (eq 'used-only dotspacemacs-install-packages)) (not configuration-layer-force-distribution) (not configuration-layer-exclude-all-layers)) (progn (configuration-layer/delete-orphan-packages packages))))
  (progn (let ((packages (append (configuration-layer//filter-distant-packages configuration-layer--used-packages t '(not ...)) (if (eq 'all dotspacemacs-install-packages) (progn (let ... ... ...)))))) (configuration-layer//install-packages packages) (if (and (or (eq 'used dotspacemacs-install-packages) (eq 'used-only dotspacemacs-install-packages)) (not configuration-layer-force-distribution) (not configuration-layer-exclude-all-layers)) (progn (configuration-layer/delete-orphan-packages packages)))))
  (if spacemacs-sync-packages (progn (let ((packages (append (configuration-layer//filter-distant-packages configuration-layer--used-packages t '...) (if (eq ... dotspacemacs-install-packages) (progn ...))))) (configuration-layer//install-packages packages) (if (and (or (eq 'used dotspacemacs-install-packages) (eq 'used-only dotspacemacs-install-packages)) (not configuration-layer-force-distribution) (not configuration-layer-exclude-all-layers)) (progn (configuration-layer/delete-orphan-packages packages))))))
  configuration-layer//load()
  (cond (changed-since-last-dump-p (configuration-layer//load) (if (spacemacs/emacs-with-pdumper-set-p) (progn (configuration-layer/message "Layer list has changed since last dump.") (configuration-layer//dump-emacs)))) (spacemacs-force-dump (configuration-layer//load) (if (spacemacs/emacs-with-pdumper-set-p) (progn (configuration-layer/message (concat "--force-dump passed on the command line, " "forcing a redump.")) (configuration-layer//dump-emacs)))) ((spacemacs-is-dumping-p) (configuration-layer//load)) ((and (spacemacs/emacs-with-pdumper-set-p) (spacemacs-run-from-dump-p)) (configuration-layer/message "Running from a dumped file. Skipping the loading p...")) (t (configuration-layer//load) (if (spacemacs/emacs-with-pdumper-set-p) (progn (configuration-layer/message (concat "Layer list has not changed since last time. " "Skipping dumping process!"))))))
  configuration-layer/load()
  (let ((file-name-handler-alist nil)) (require 'core-spacemacs) (spacemacs/dump-restore-load-path) (configuration-layer/load-lock-file) (spacemacs/init) (configuration-layer/stable-elpa-init) (configuration-layer/load) (spacemacs-buffer/display-startup-note) (spacemacs/setup-startup-hook) (spacemacs/dump-eval-delayed-functions) (if (and dotspacemacs-enable-server (not (spacemacs-is-dumping-p))) (progn (require 'server) (if dotspacemacs-server-socket-dir (progn (setq server-socket-dir dotspacemacs-server-socket-dir))) (if (server-running-p) nil (message "Starting a server...") (server-start)))))
  (if (not (version<= spacemacs-emacs-min-version emacs-version)) (error (concat "Your version of Emacs (%s) is too old. " "Spacemacs requires Emacs version %s or above.") emacs-version spacemacs-emacs-min-version) (let ((file-name-handler-alist nil)) (require 'core-spacemacs) (spacemacs/dump-restore-load-path) (configuration-layer/load-lock-file) (spacemacs/init) (configuration-layer/stable-elpa-init) (configuration-layer/load) (spacemacs-buffer/display-startup-note) (spacemacs/setup-startup-hook) (spacemacs/dump-eval-delayed-functions) (if (and dotspacemacs-enable-server (not (spacemacs-is-dumping-p))) (progn (require 'server) (if dotspacemacs-server-socket-dir (progn (setq server-socket-dir dotspacemacs-server-socket-dir))) (if (server-running-p) nil (message "Starting a server...") (server-start))))))
  eval-buffer(#<buffer  *load*> nil "c:/Users/977315/.emacs.d/init.el" nil t)  ; Reading at buffer position 1880
  load-with-code-conversion("c:/Users/977315/.emacs.d/init.el" "c:/Users/977315/.emacs.d/init.el" t t)
  load("c:/Users/977315/.emacs.d/init" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode 0x1360b65>) #f(compiled-function () #<bytecode 0x1360b79>) t)
  command-line()
  normal-top-level()
mirkov commented 4 years ago

I was able to reproduce this issue in bare Emacs (emacs -Q) by issuing the 'package-list' command.

I have submitted a bug report to the Emacs maintainers link

I propose to leave this issue open until I get some resolution. I can then close it with a link on how it got resolved.

If Spacemacs maintainers feel differently, please proceed as you prefer.

emacs18 commented 4 years ago

I have the following in my early-init.el:

(setq package-check-signature nil)

I don't know whether this would help you, but it might be worth trying.

mirkov commented 4 years ago

Your advice worked. Thank you :-)

I added that snippet into the dotspacemacs/user-init part of my init.el, and Spacemacs downloaded the required packages and started succesfully.

Assuming this isssue is not related to some details of my laptop setup, it still requires a fix of some kind. Either it is an Emacs 27.1 fix, or Spacemacs' default init.el template will set this variable to nil.

emacs18 commented 4 years ago

Cryptographic signing of packages is a new feature of 27. It is then not surprising that maintainers of melpa or other archives have not yet made the required changes. There could also be other issues such as missing programs to check the signatures or misconfiguation of some tools.

I'm sure things will improved over the next few months for everyone to adopt. Signature checking perhaps can be enabled then.

This issue does not impact me, since I build all my packages myself, i.e., I create something like MELPA on my own local machine, and install. Thus I never install packages that I have not built myself. That is why I felt that it was safe for me to disable signature checking altogether.

mirkov commented 4 years ago

Just to emphasise the nature of the error I encountered: gpg failed when the pathname was a concatenation of a Posix current working directory and Windows target path (with forward slashes), e.g., /c/Users/977315/tmp/c:/Users/977315/.emacs.d/elpa/gnupg/pubring.kbx

emacs18 commented 4 years ago

I see. This then looks like a problem specific to your setup or your OS. I used cygwin in 1990's, but I have not used WIndows for over 10 years (other than being conduit to access other OS'es), so I'm afraid I can't help you. I'm clueless what MSYS2, WSL, etc are. On GNU/Linux I would have suggested examining TMPDIR or similar environment variables, but I doubt that matters for you.

octplane commented 3 years ago

Seeing the same issue here when trying to update the package list with a working Spacemacs. when trying to get the key:

gpg --homedir ~/.emacs.d/elpa/gnupg --receive-keys 066DAFCB81E42C40
gpg: keyserver receive failed: General error
flcong commented 3 years ago

I encounter the same issue, too, right after installing Spacemacs and updating packages:

Failed to verify signature archive-contents.sig:
No public key for 066DAFCB81E42C40 created at 2020-11-12T05:05:03-0500 using RSA
Command output:
gpg: keyblock resource '/c/Program Files/Emacs/c:/Users/flcon/AppData/Roaming/.emacs.d/elpa/gnupg/pubring.kbx': No such file or directory
gpg: Signature made Thu Nov 12 05:05:03 2020 EST
gpg:                using RSA key C433554766D3DDC64221BFAA066DAFCB81E42C40
gpg: Can't check signature: No public key

Seems to be a path issue: /c/Program Files/Emacs/c:/Users/flcon/AppData/Roaming/.emacs.d/elpa/gnupg/pubring.kbx.

mirkov commented 3 years ago

I was able to update the GPG key adding the keyserver argument to gpg

gpg --homedir ~/.emacs.d/elpa/gnupg --keyserver hkp://keys.gnupg.net --recv-keys 066DAFCB81E42C40

WIth that, the elpa archive gets updated. But melpa and org archives do not:

(Spacemacs) --> refreshing package archive: melpa... [1/3]
Contacting host: melpa.org:443
Importing package-keyring.gpg...done
Contacting host: melpa.org:443 [2 times]
Package refresh done
Failed to download ‘melpa’ archive.            <<<<<<<<<
(Spacemacs) --> refreshing package archive: org... [2/3]
Importing package-keyring.gpg...done
Contacting host: orgmode.org:443
Package refresh done
Failed to download ‘org’ archive.                <<<<<<<<<
(Spacemacs) --> refreshing package archive: gnu... [3/3]
Importing package-keyring.gpg...done
Contacting host: elpa.gnu.org:443
Package refresh done

As result of that, spacemacs would not load 15 packages. I had to package-inatall them manually:

AlastorMordrek commented 3 years ago

Shouldn't the path have ".gnupg" with a dot?. Without the dot I get a "No such file or directory..." error (several actually).

gpg --homedir ~/.emacs.d/elpa/gnupg --receive-keys 066DAFCB81E42C40

gives

gpg: keyblock resource '/Users/silas/.emacs.d/elpa/gnupg/pubring.kbx': No such file or directory
gpg: failed to create temporary file '/Users/silas/.emacs.d/elpa/gnupg/.#lk0x00007fa65ec08820.Alastors-MacBook-Pro.local.4109': No such file or directory
gpg: connecting dirmngr at '/Users/silas/.emacs.d/elpa/gnupg/S.dirmngr' failed: No such file or directory
gpg: keyserver receive failed: No dirmngr

while

gpg --homedir ~/.emacs.d/elpa/.gnupg --receive-keys 066DAFCB81E42C40

gives

gpg: directory '/Users/silas/.emacs.d/elpa/.gnupg' created
gpg: keybox '/Users/silas/.emacs.d/elpa/.gnupg/pubring.kbx' created
gpg: /Users/silas/.emacs.d/elpa/.gnupg/trustdb.gpg: trustdb created
gpg: key 066DAFCB81E42C40: public key "GNU ELPA Signing Agent (2019) <elpasign@elpa.gnu.org>" imported
gpg: Total number processed: 1
gpg:               imported: 1

Checking my "~/.emacs.d/elpa" folder there is no "gnupg" folder inside.

Could it be that it's a keystroke error?. Or that the path is fine, but somewhere that folder should have been created and it wasn't?.

I just started using emacs, so I don't know which folders should exist and where.

Edit 1:

Trying to run my emacs again gives the same error, as if the keys had not been generated/obtained.

Somewhere I found that you could install the package "gnu-elpa-keyring-update" to help with this, but this had no effect for me, my emacs still fails to start, I'm stuck not even being able to run my first prelude boot.

mirkov commented 3 years ago

On my laptop the path was without the dot from the start. In other words, the first time I looked for the pubring.kbx file on the laptop I did see the gnupg (without the dot) directory.

mirkov commented 3 years ago

This morning I tried the following (see https://github.com/syl20bnr/spacemacs/issues/13866#issuecomment-732389015 and https://github.com/syl20bnr/spacemacs/issues/13866#issuecomment-732458389 as reference):

  1. (setq package-check-signature nil)
  2. install-package gnu-elpa-keyring-update

Following the second step, a bunch of keys were automatically added (I did not write down the messages).

Upon spacemacs restart, the warning messages in the Message buffer are gone and I do not get the Error buffer about the failure to load the archive-contents.sig.

I believe this was suggested before by someone else, but I failed to read it carefully or comprehend its significance.

mirkov commented 3 years ago

This issue may have been resolved (see Emacs Bug) which actually is not a bug but my (user) error. I do not claim 100% for it to be resolved until I figure out a way to test it on Spacemacs. (see below why I think it is resolved by testing in in plain Emacs.).

To repeat: this issue arose on Emacs 27.1 distributed for Windows via MSYS2/MinGW64.

To resolve this issue ensure the following:

For Emacs 27.1 to properly handle the archive signatures, it needs to access MinGW64's gnupg and not MSYS2's gnupg

See Eli Zaretskii's explanation why that is required (in the link above).

This issue manifested itself by starting plain emacs with the -Q switch (no customizations of any kind) and executing package-list-packages. Now that emacs can find MinGW64's gnupg, the package list updates normally without any errors.

To install the correct version of gnupg, issue the following in MSYS2 shell:

pacman -S mingw64/mingw-w64-x86_64-gnupg

Then make sure that your PATH points to this gnupg and not the MSYS2 one:

> which gpg
/mingw64/bin/gpg

After this fix, my Spacemacs starts OK with no errors.

I will not close this issue as yet for just in case there is something else going on.

sierra-alpha commented 3 years ago

Thanks for your help, I was having this problem on and off (different $PATH's) but the comment on the bug that you linked above about posix paths not recognizing the windows path got me thinking...

You can also set the package-gnupghome-dir in your .spacemacs with:

(setq package-gnupghome-dir "/c/users/<path to your .emacs>/elpa/gnupg")

note the unix style /c/ as we are running emacs through MSYS

It needs to be in the (defun dotspacemacs/user-init () function of your .spacemacs so that it takes effect before the repos are checked.

If you're having trouble because a package isn't signed with the key you have yet you can temporarily set

(setq package-check-signature nil)

in the same place but that means you'll except any old signature so I wouldn't run like that permanently.

This was for win 7 and MSYS2 with the same incorrect windows path appended to a unix path.

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!