Bug#902640: magit: FTBFS if machine has no domain

2018-06-29 Thread Rémi Vanicat
Le 28 juin 2018, Santiago Vila a écrit:

[...]

> There is an interesting line saying "unable to auto-detect email address"
> where it may be seen that my machine has no domain. However, having a
> domain has never been a requirement to build Debian packages.

This can probably easily be fixed by giving git an email. Could you test
the attached patch ? It should fix the problem, but I have no easily
available host with no domain to test it today.

> In fact, one might ask: The fact that such test fails means the
> package will not work in machines not having a domain?

magit use git, and for some operation, git ask for an email (for author
and committer identification). If it does not know one, it will
guess. For a user on any machine this can easily be fixed by running

  git config --global user.email m...@example.com

diff --git a/debian/changelog b/debian/changelog
index bb933827..9bcda3b2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+magit (2.13.0-2) unstable; urgency=medium
+
+  * Run test: set GIT_COMMITTER_EMAIL and GIT_AUTHOR_EMAIL to let test run
+even if machine has no domain (Closes: #902640),
+thanks to Santiago Vila 
+
+ -- Rémi Vanicat   Fri, 29 Jun 2018 08:50:29 +0200
+
 magit (2.13.0-1) unstable; urgency=medium
 
   * New upstream version
diff --git a/debian/rules b/debian/rules
index b23af1fe..3860bdf0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,6 +6,8 @@ export DEB_VERSION_UPSTREAM
 # This is needed for running correctly the test in auto-builder
 export GIT_AUTHOR_NAME = "Magit testeur"
 export GIT_COMMITTER_NAME = "Magit committer"
+export GIT_AUTHOR_EMAIL = "magit-test...@example.org"
+export GIT_COMMITTER_EMAIL = "magit-test...@example.org"
 export LC_ALL = C.UTF-8
 
 %:

-- 
Rémi Vanicat


Bug#902640: magit: FTBFS if machine has no domain

2018-06-29 Thread Santiago Vila
On Fri, Jun 29, 2018 at 09:41:16AM +0200, Rémi Vanicat wrote:
> Le 28 juin 2018, Santiago Vila a écrit:
> 
> [...]
> 
> > There is an interesting line saying "unable to auto-detect email address"
> > where it may be seen that my machine has no domain. However, having a
> > domain has never been a requirement to build Debian packages.
> 
> This can probably easily be fixed by giving git an email. Could you test
> the attached patch ? It should fix the problem,

Tested. Yes, it does!

> but I have no easily
> available host with no domain to test it today.

Well, for this case, a host without domain would be just a host in
which there is not a FQDN in /etc/hosts for the hostname, for example:

192.168.1.3 myhost

If you can modify /etc/hosts in your own computer, you should be able
in theory to reproduce the failure.

Note: If you try plain dpkg-buildpackage to reproduce the error (as I
did right now to test the patch), you have to temporarily rename your
$HOME/.gitconfig file (where you will probably have another email
setting for git).

Thanks a lot.



Bug#902640: magit: FTBFS if machine has no domain

2018-06-28 Thread Santiago Vila
Package: src:magit
Version: 2.13.0-1
Severity: serious
Tags: ftbfs

Dear maintainer:

I tried to build this package in buster but it failed.
BuIld log follows:


[...]
dpkg-buildpackage: info: source package magit
dpkg-buildpackage: info: source version 2.13.0-1
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Rémi Vanicat 
 dpkg-source --before-build magit-2.13.0
 fakeroot debian/rules clean
dh clean --with elpa
   dh_auto_clean
make -j1 clean
make[1]: Entering directory '/<>'
make[2]: Entering directory '/<>/lisp'
Cleaning lisp/*...
make[2]: Leaving directory '/<>/lisp'
make[2]: Entering directory '/<>/Documentation'
Cleaning Documentation/*...
make[2]: Leaving directory '/<>/Documentation'
Cleaning...
make[1]: Leaving directory '/<>'
   debian/rules override_dh_clean
make[1]: Entering directory '/<>'
dh_clean
make[1]: Leaving directory '/<>'
 debian/rules build-indep
dh build-indep --with elpa
   dh_update_autotools_config -i
   dh_autoreconf -i
   dh_auto_configure -i
   debian/rules override_dh_auto_build
make[1]: Entering directory '/<>'
make info
make[2]: Entering directory '/<>'
make[3]: Entering directory '/<>/Documentation'
Generating magit.info
Generating dir
make[3]: Leaving directory '/<>/Documentation'
make[2]: Leaving directory '/<>'
do not run make
make[1]: Leaving directory '/<>'
   debian/rules override_dh_elpa_test
make[1]: Entering directory '/<>'
make test
make[2]: Entering directory '/<>'
Loading /<>/t/magit-tests.el (source)...
Cannot determine Magit’s version (error "/<>/lisp/magit.el" repo 
static elpa debug)
Running 16 tests (2018-06-22 15:45:52+)
   passed   1/16  magit--with-safe-default-directory
Keeping test directory:
  /tmp/magit-244342AY/
Test magit-get backtrace:
  (let ((dir (file-name-as-directory (make-temp-file "magit-" t))) (pr
  (lambda nil (let ((dir (file-name-as-directory (make-temp-file "magi
  ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc
  ert-run-test([cl-struct-ert-test magit-get nil (lambda nil (let ((di
  ert-run-or-rerun-test([cl-struct-ert--stats t [[cl-struct-ert-test m
  ert-run-tests(t #[385 "\306\307\"\203G auto-detect email address (got 
'buildd@yoda2.(none)') (in /tmp/magit-24434EFx/remote/)")
   FAILED  15/16  magit-toplevel:submodule
   passed  16/16  magit-toplevel:tramp

Ran 16 tests, 11 results as expected, 5 unexpected (2018-06-22 15:45:54+)

5 unexpected results:
   FAILED  magit-get
   FAILED  magit-get-{current|next}-tag
   FAILED  magit-list-{|local-|remote-}branch-names
   FAILED  magit-status:log-sections
   FAILED  magit-toplevel:submodule

Makefile:105: recipe for target 'test' failed
make[2]: *** [test] Error 1
make[2]: Leaving directory '/<>'
debian/rules:22: recipe for target 'override_dh_elpa_test' failed
make[1]: *** [override_dh_elpa_test] Error 2
make[1]: Leaving directory '/<>'
debian/rules:12: recipe for target 'build-indep' failed
make: *** [build-indep] Error 2
dpkg-buildpackage: error: debian/rules build-indep subprocess returned exit 
status 2


There is an interesting line saying "unable to auto-detect email address"
where it may be seen that my machine has no domain. However, having a
domain has never been a requirement to build Debian packages. In fact,
one might ask: The fact that such test fails means the package will
not work in machines not having a domain?

To reproduce, please try "dpkg-buildpackage -A" on a machine not
having a domain.

Thanks.