Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Arch] Build test fails & installation is aborted #1233

Closed
Kleysley opened this issue Mar 9, 2022 · 8 comments
Closed

[Arch] Build test fails & installation is aborted #1233

Kleysley opened this issue Mar 9, 2022 · 8 comments

Comments

@Kleysley
Copy link

Kleysley commented Mar 9, 2022

I've been trying to install backintime on my Arch installation (kernel 5.16.13).
No matter if I build it from source or whether I try to install the gui or the cli version, the build always fails the same way.
Here is the console output:

Ran 19 tests in 0.029s
OK
python -m unittest  -b test/test_argparser.py
.....................
----------------------------------------------------------------------
Ran 21 tests in 1.990s

OK
python -m unittest  -b test/test_backintime.py
FF
Stderr:
/home/kleysley/.cache/yay/backintime/src/backintime-1.3.1/common/test/test_backintime.py:33: DeprecationWarning: Please use assertEqual instead.
  self.assertEquals("", subprocess.getoutput("python3 backintime.py --quiet"))

======================================================================
FAIL: test_local_snapshot_is_successful (test.test_backintime.TestBackInTime)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kleysley/.cache/yay/backintime/src/backintime-1.3.1/common/test/test_backintime.py", line 68, in test_local_snapshot_is_successful
    self.assertEqual(proc.returncode, 0, msg)
AssertionError: 1 != 0 : Returncode: 1
stderr: Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/dbus/bus.py", line 177, in activate_name_owner
    return self.get_name_owner(bus_name)
  File "/usr/lib/python3.10/site-packages/dbus/bus.py", line 361, in get_name_owner
    return self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
  File "/usr/lib/python3.10/site-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'net.launchpad.backintime.serviceHelper': no such name

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kleysley/.cache/yay/backintime/src/backintime-1.3.1/common/backintime.py", line 1165, in <module>
    startApp()
  File "/home/kleysley/.cache/yay/backintime/src/backintime-1.3.1/common/backintime.py", line 517, in startApp
    args.func(args)
  File "/home/kleysley/.cache/yay/backintime/src/backintime-1.3.1/common/backintime.py", line 1150, in checkConfig
    cfg = getConfig(args)
  File "/home/kleysley/.cache/yay/backintime/src/backintime-1.3.1/common/backintime.py", line 669, in getConfig
    cfg = config.Config(config_path = args.config, data_path = args.share_path)
  File "/home/kleysley/.cache/yay/backintime/src/backintime-1.3.1/common/config.py", line 280, in __init__
    self.setupUdev = tools.SetupUdev()
  File "/home/kleysley/.cache/yay/backintime/src/backintime-1.3.1/common/tools.py", line 1719, in __init__
    conn = bus.get_object(SetupUdev.CONNECTION, SetupUdev.OBJECT)
  File "/usr/lib/python3.10/site-packages/dbus/bus.py", line 241, in get_object
    return self.ProxyObjectClass(self, bus_name, object_path,
  File "/usr/lib/python3.10/site-packages/dbus/proxies.py", line 250, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python3.10/site-packages/dbus/bus.py", line 182, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python3.10/site-packages/dbus/bus.py", line 277, in start_service_by_name
    return (True, self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
  File "/usr/lib/python3.10/site-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with unknown return code 1

stdout: 
Back In Time
Version: 1.3.1

Back In Time comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; type `backintime --license' for details.

INFO: Update to config version 6


======================================================================
FAIL: test_quiet_mode (test.test_backintime.TestBackInTime)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kleysley/.cache/yay/backintime/src/backintime-1.3.1/common/test/test_backintime.py", line 33, in test_quiet_mode
    self.assertEquals("", subprocess.getoutput("python3 backintime.py --quiet"))
AssertionError: '' != 'Traceback (most recent call last):\n  Fil[2338 chars]de 1'
Diff is 2416 characters long. Set self.maxDiff to None to see it.

Stderr:
/home/kleysley/.cache/yay/backintime/src/backintime-1.3.1/common/test/test_backintime.py:33: DeprecationWarning: Please use assertEqual instead.
  self.assertEquals("", subprocess.getoutput("python3 backintime.py --quiet"))

----------------------------------------------------------------------
Ran 2 tests in 0.335s

FAILED (failures=2)
make: *** [Makefile:566: unittest] Error 1
==> ERROR: A failure occurred in check().
    Aborting...
 -> error making: backintime (backintime-cli)
 `
@aryoda
Copy link
Contributor

aryoda commented Aug 23, 2022

On which type of file system are you building and executing the unit test?

Edit: I mean, the failing unit test chmods test files and spawns a backintime sub process, there is lot that could go wrong in this end-to-end test...

@aryoda
Copy link
Contributor

aryoda commented Sep 6, 2022

dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner:
Could not get owner of name 'net.launchpad.backintime.serviceHelper': no such name

Looks like the BiT serviceHelper service is not running (or accessible) so that no communication can be established via the DBus inter process communication bus...

The 2nd exception seems to confirm this:

dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ChildExited:
Launch helper exited with unknown return code 1

I see no way to reproduce and diagnose this exactly but it is probably related to

  • some build dependencies are missing (dbus from PyQt5 or python)
  • missing rights to attach a service to dbus
  • Python 3.10 (which is used here) and BiT version 1.3.1 is from the same day as the merge of this issue: Tests no longer work with Python 3.10 #1175 (Tests no longer work with Python 3.10).
    dev.CONNECTION, SetupUdev.OBJECT)

Could you already solved this issue or narrow it down?

@Kleysley
Copy link
Author

Kleysley commented Sep 6, 2022

Some info:
I'm on on the newest version of Arch linux (filesystem is EXT4). I have Python 3.10.6 installed on my system, that's the version that's currently distributed with Arch. I tried both the AUR package of backintime and the manual build. Both fail to install, even with the current newest version of backintime (1.3.2-2).

The installation still fails with the same error. I don't know what to do about missing rights to attach a service to dbus and also don't know how to check for missing build dependencies.

@emtiu emtiu added the Distro-Specific only for certain distributions, desktop environments or display servers label Sep 6, 2022
@aryoda
Copy link
Contributor

aryoda commented Sep 6, 2022

OK, thx for your clarification.

Normally this problem should be passed on to the AUR package maintainer too, probably here:
https://aur.archlinux.org/packages/backintime-cli

The package maintainer should be able to fix missing dependencies or report here "upstream" if there should really be a general problem (eg. with Python 3.10.x or undocumented dependencies)...

Meanwhile I have pulled the current source code on Ubuntu 20.04 with Python 3.8.10 and built it with the usual make.

Starting the unit tests in common/ with make unittest then throws a dbus (!) error:

ModuleNotFoundError: No module named 'dbus'
...
python3 -m unittest  -b test/test_applicationinstance.py
E
======================================================================
ERROR: test_applicationinstance (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_applicationinstance
...

I have installed the missing dbus module via sudo apt install python-dbus then - it did not change it.

I have tried to install dbus via pip with pip install dbus and get this error:

ERROR: Could not find a version that satisfies the requirement dbus (from versions: none)
ERROR: No matching distribution found for dbus

Your issue and my problem look both related to dbus, may just be a coincidence or the root problem...

Big question to our developers here: Is this reproducible? Is the dbus package deprecated or broken?

@aryoda
Copy link
Contributor

aryoda commented Sep 6, 2022

It seems pip3 install dbus-python solved the problem for me on Ubuntu (NOT Arch), unit tests do run OK now...

Can someone please cross-check and confirm this?

@emtiu emtiu added Feedback needs user response, may be closed after timeout without a response and removed Distro-Specific only for certain distributions, desktop environments or display servers labels Oct 8, 2022
@emtiu
Copy link
Member

emtiu commented Oct 8, 2022

Thank you for your report, @Kleysley. Please see the latest comments in #921, of which this Issue is a likely duplicate.

@aryoda
Copy link
Contributor

aryoda commented Oct 13, 2022

dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'net.launchpad.backintime.serviceHelper': no such name

I think our generated Makefile has a chicken-egg type of problem for first-time installations when I look into the PKGBUILD when following a configure/make/make test/make install sequence):

make test requires an already installed serviceHelper - see #921 (comment) - but the serviceHelper is only installed in a later script step after succeeding all unit tests (make install of qt folder)...

So if BiT was installed once successfully with make install from common and qt the unit tests should succeed!

@aryoda
Copy link
Contributor

aryoda commented Oct 14, 2022

Note to self:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants