Bug#1020153: magit: FTBFS: make[2]: *** [Makefile:111: test] Error 255

2022-11-22 Thread intrigeri
Hi,

I ended up here after realizing that a bunch of Emacs packages I use
got removed from testing due to this bug.

Lucas Nussbaum (2022-09-18):
> During a rebuild of all packages in sid, your package failed to build
> on amd64.
>
>
> Relevant part (hopefully):
>> make[2]: Entering directory '/<>'
>> Loading /<>/t/magit-tests.el (source)...
>> Debugger entered--Lisp error: (error "Cannot find suitable directory for 
>> output in ‘nati...")
>>   error("Cannot find suitable directory for output in `nati...")
>>   comp-trampoline-compile(abort-recursive-edit)

I can reproduce this with sbuild, but not with pbuilder.

It seems to belong the same class of errors that was fixed in dh-elpa with
https://salsa.debian.org/emacsen-team/dh-elpa/-/commit/d80ee7a8a159f20316640ec9e6a928e3c57d3f6e

But magit's debian/rule has override_dh_elpa_test, so we don't benefit
from the dh-elpa fix.

The attached patch replicates the dh-elpa fix in t/magit-tests.el,
which fixes the problem allows running the test suite.

Unfortunately, 2/20 tests fail, so the attached patch won't fit the
FTBFS (which is why I'm not tagging this "patch"):

Loading /<>/t/magit-tests.el (source)...
Cannot determine Magit’s version (error "/<>/lisp/magit.el" repo 
static elpa dirname hash)
Running 20 tests (2022-11-22 08:13:25+, selector ‘t’)
   passed   1/20  magit--with-safe-default-directory (0.015131 sec)
Keeping test directory:
  /tmp/magit-TDFbME/
Test magit-get backtrace:
  signal(magit-git-error ("clone of '/tmp/magit-TDFbME/remote' into su
  (condition-case err (let* ((vnew #'(lambda ( _))) (old (symbol-
  (let ((dir (file-name-as-directory (make-temp-file "magit-" t))) (pr
  (let ((lexical-binding nil)) (let ((dir (file-name-as-directory (mak
  (lambda nil (let ((lexical-binding nil)) (let ((dir (file-name-as-di
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name magit-get :documentation nil :body (l
  ert-run-or-rerun-test(#s(ert--stats :selector t :tests [... ... ... 
  ert-run-tests(t #f(compiled-function (event-type  event-args) #
  ert-run-tests-batch(nil)
  ert-run-tests-batch-and-exit()
  (progn (load-file "t/magit-tests.el") (ert-run-tests-batch-and-exit)
  command-line-1(("-L" "./lisp" "-L" "/usr/share/emacs/site-lisp/elpa-
  command-line()
  normal-top-level()
Test magit-get condition:
(magit-git-error "clone of '/tmp/magit-TDFbME/remote' into submodule path 
'/tmp/magit-TDFbME/super/repo' failed (in /tmp/magit-TDFbME/super/)")
   FAILED   2/20  magit-get (0.708641 sec)
   passed   3/20  magit-get-boolean (0.199891 sec)
   passed   4/20  magit-get-{current|next}-tag (0.749619 sec)
   passed   5/20  magit-in-bare-repo (0.071072 sec)
   passed   6/20  magit-in-non-bare-repo (0.080570 sec)
   passed   7/20  magit-list-{|local-|remote-}branch-names (0.366282 sec)
   passed   8/20  magit-process:match-prompt-match-non-first-prompt (0.91 
sec)
   passed   9/20  magit-process:match-prompt-nil-when-no-match (0.65 sec)
   passed  10/20  magit-process:match-prompt-non-nil-when-match (0.61 sec)
   passed  11/20  magit-process:match-prompt-preserves-match-group (0.000111 
sec)
   passed  12/20  magit-process:match-prompt-suffixes-prompt (0.98 sec)
   passed  13/20  magit-process:password-prompt (0.000111 sec)
   passed  14/20  magit-process:password-prompt-observed (0.001084 sec)
   passed  15/20  magit-status:file-sections (0.868935 sec)
   passed  16/20  magit-status:log-sections (0.907880 sec)
   passed  17/20  magit-toplevel:basic (0.245211 sec)
Keeping test directory:
  /tmp/magit-6jLVvi/
Test magit-toplevel:submodule backtrace:
  signal(magit-git-error ("clone of '/tmp/magit-6jLVvi/remote' into su
  (condition-case err (let* ((vnew #'(lambda ( _))) (old (symbol-
  (let ((dir (file-name-as-directory (make-temp-file "magit-" t))) (pr
  (let ((find-file-visit-truename nil)) (let ((dir (file-name-as-direc
  (let ((lexical-binding nil)) (let ((find-file-visit-truename nil)) (
  (lambda nil (let ((lexical-binding nil)) (let ((find-file-visit-true
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name magit-toplevel:submodule :documentati
  ert-run-or-rerun-test(#s(ert--stats :selector t :tests ... :test-map
  ert-run-tests(t #f(compiled-function (event-type  event-args) #
  ert-run-tests-batch(nil)
  ert-run-tests-batch-and-exit()
  (progn (load-file "t/magit-tests.el") (ert-run-tests-batch-and-exit)
  command-line-1(("-L" "./lisp" "-L" "/usr/share/emacs/site-lisp/elpa-
  command-line()
  normal-top-level()
Test magit-toplevel:submodule condition:
(magit-git-error "clone of '/tmp/magit-6jLVvi/remote' into submodule path 
'/tmp/magit-6jLVvi/super/repo' failed (in /tmp/magit-6jLVvi/super/)")
   FAILED  18/20  magit-toplevel:submodule (0.249347 sec)
   passed  19/20  magit-toplevel:tramp (1.286620 sec)
   passed  20/20  magit-utils:add-face-text-property (0.50 sec)

Ran 20 tests, 18 results as expected, 2 

Bug#1020153: magit: FTBFS: make[2]: *** [Makefile:111: test] Error 255

2022-09-18 Thread Lucas Nussbaum
Source: magit
Version: 3.3.0-1
Severity: serious
Justification: FTBFS
Tags: bookworm sid ftbfs
User: lu...@debian.org
Usertags: ftbfs-20220917 ftbfs-bookworm

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.


Relevant part (hopefully):
> make[2]: Entering directory '/<>'
> Loading /<>/t/magit-tests.el (source)...
> Debugger entered--Lisp error: (error "Cannot find suitable directory for 
> output in ‘nati...")
>   error("Cannot find suitable directory for output in `nati...")
>   comp-trampoline-compile(abort-recursive-edit)
>   comp-subr-trampoline-install(abort-recursive-edit)
>   advice--add-function(:before (#f(compiled-function () # 0x32e14019df7e91>) . #f(compiled-function (gv--val) # 0x9f608bbba7cb3c2>)) transient--abort-edebug nil)
>   advice-add(abort-recursive-edit :before transient--abort-edebug)
>   
> load-with-code-conversion("/usr/share/emacs/site-lisp/elpa-src/transient-0.3"
>  "/usr/share/emacs/site-lisp/elpa-src/transient-0.3" nil t)
>   require(transient)
>   load-with-code-conversion("/<>/lisp/magit-mode.el" 
> "/<>/lisp/magit-mode.el" nil t)
>   require(magit-mode)
>   load-with-code-conversion("/<>/lisp/magit-core.el" 
> "/<>/lisp/magit-core.el" nil t)
>   require(magit-core)
>   load-with-code-conversion("/<>/lisp/magit.el" 
> "/<>/lisp/magit.el" nil t)
>   require(magit)
>   load-with-code-conversion("/<>/t/magit-tests.el" 
> "/<>/t/magit-tests.el" nil nil)
>   load-file("t/magit-tests.el")
>   (progn (load-file "t/magit-tests.el") (ert-run-tests-batch-and-exit))
>   command-line-1(("-L" "./lisp" "-L" 
> "/usr/share/emacs/site-lisp/elpa-src/dash-2.19.1" "-L" "./../libgit" "-L" 
> "/usr/share/emacs/site-lisp/elpa-src/transient-0.3" "-L" 
> "/usr/share/emacs/site-lisp/elpa-src/with-editor-3" "--eval" "(progn  
>   (load-file \"t/magit-tests.el\")(ert-r..."))
>   command-line()
>   normal-top-level()
> 
> make[2]: *** [Makefile:111: test] Error 255


The full build log is available from:
http://qa-logs.debian.net/2022/09/17/magit_3.3.0-1_unstable.log

All bugs filed during this archive rebuild are listed at:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20220917;users=lu...@debian.org
or:
https://udd.debian.org/bugs/?release=na=ign=7=7=only=ftbfs-20220917=lu...@debian.org=1=1=1=1#results

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

If you reassign this bug to another package, please marking it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects

If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.