Repository: electron/electron (language: cpp)

Issue:
python-dbusmock & libgnome-keyring-dev are not available on Ubuntu 20
<!--  As an open source project with a dedicated but small maintainer team, it can sometimes take a long time for issues to be addressed so please be patient and we will get back to you as soon as we can.
-->

### Preflight Checklist
<!-- Please ensure you've completed the following steps by replacing [ ] with [x]-->

* [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
* [x] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
* [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.

### Issue Details

* **Electron Version:**
  * 13.0.0-nightly.20210210 <!-- (output of `node_modules/.bin/electron --version`) e.g. 4.0.3 -->
* **Operating System:**
  * Pop!_OS 20.10 <!-- (Platform and Version) e.g. macOS 10.13.6 / Windows 10 (1803) / Ubuntu 18.04 x64 -->
* **Last Known Working Electron version:**
  * N/A <!-- (if applicable) e.g. 3.1.0 -->

### Expected Behavior
<!-- A clear and concise description of what you expected to happen. -->

When following the [build instructions for linux](https://www.electronjs.org/docs/development/build-instructions-linux#prerequisites), I expected the command to install dependencies on Ubuntu to run.

### Actual Behavior
<!-- A clear and concise description of what actually happened. -->

How ever, it errors out saying that `libgnome-keyring-dev` could not be located and that `python-dbusmock` has no installation candidate (seems to be available for Ubuntu 18).

```
sudo apt-get install build-essential clang libdbus-1-dev libgtk-3-dev \
>                        libnotify-dev libgnome-keyring-dev \
>                        libasound2-dev libcap-dev libcups2-dev libxtst-dev \
>                        libxss1 libnss3-dev gcc-multilib g++-multilib curl \
>                        gperf bison python-dbusmock openjdk-8-jre
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package python-dbusmock is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Unable to locate package libgnome-keyring-dev
E: Package 'python-dbusmock' has no installation candidate
```

### To Reproduce
<!--
Your best chance of getting this bug looked at quickly is to provide an example.
-->

Try to build electron on Ubuntu 20 with electron's build tools.

<!--
For bugs that can be encapsulated in a small experiment, you can use Electron Fiddle (https://github.com/electron/fiddle) to publish your example to a GitHub Gist and link it your bug report.
-->

<!--
If Fiddle is insufficient to produce an example, please provide an example REPOSITORY that can be cloned and run. You can fork electron-quick-start (https://github.com/electron/electron-quick-start) and include a link to the branch with your changes.
-->

<!--
If you provide a URL, please list the commands required to clone/setup/run your repo e.g.
```sh
$ git clone $YOUR_URL -b $BRANCH
$ npm install
$ npm start || electron .
```
-->

### Screenshots
<!-- If applicable, add screenshots to help explain your problem. -->

### Additional Information
<!-- Add any other context about the problem here. -->

Trying to install the python-dbusmock using pip lead to an error about syntax:

```
unning: Main process specs
Traceback (most recent call last):
  File "/home/mauve/programming/electron/src/electron/script/dbus_mock.py", line 7, in <module>
    from dbusmock import DBusTestCase
  File "/home/mauve/.local/lib/python2.7/site-packages/dbusmock/__init__.py", line 14, in <module>
    from dbusmock.mockobject import (DBusMockObject, MOCK_IFACE,
  File "/home/mauve/.local/lib/python2.7/site-packages/dbusmock/mockobject.py", line 30
    objects: Dict[str, 'DBusMockObject'] = {}
           ^
SyntaxError: invalid syntax
✗ Electron tests failed with code 1.
ERROR Error: Command failed: /home/mauve/.nvm/versions/node/v15.2.1/bin/node ./script/spec-runner.js
    at checkExecSyncError (node:child_process:636:11)
    at Object.execFileSync (node:child_process:654:15)
    at runSpecRunner (/home/mauve/.electron_build_tools/src/e-test.js:33:16)
    at Object.<anonymous> (/home/mauve/.electron_build_tools/src/e-test.js:63:3)
    at Module._compile (node:internal/modules/cjs/loader:1102:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1131:10)
    at Module.load (node:internal/modules/cjs/loader:967:32)
    at Function.Module._load (node:internal/modules/cjs/loader:807:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47
```

This was solved by installing version 0.19, however it then errored out saying that `dbus` was not found.

```
Running: Main process specs
Traceback (most recent call last):
  File "/home/mauve/programming/electron/src/electron/script/dbus_mock.py", line 7, in <module>
    from dbusmock import DBusTestCase
  File "/home/mauve/.local/lib/python2.7/site-packages/dbusmock/__init__.py", line 16, in <module>
    from dbusmock.mockobject import (DBusMockObject, MOCK_IFACE,
  File "/home/mauve/.local/lib/python2.7/site-packages/dbusmock/mockobject.py", line 27, in <module>
    import dbus
ImportError: No module named dbus
✗ Electron tests failed with code 1.
ERROR Error: Command failed: /home/mauve/.nvm/versions/node/v15.2.1/bin/node ./script/spec-runner.js
    at checkExecSyncError (node:child_process:636:11)
    at Object.execFileSync (node:child_process:654:15)
    at runSpecRunner (/home/mauve/.electron_build_tools/src/e-test.js:33:16)
    at Object.<anonymous> (/home/mauve/.electron_build_tools/src/e-test.js:63:3)
    at Module._compile (node:internal/modules/cjs/loader:1102:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1131:10)
    at Module.load (node:internal/modules/cjs/loader:967:32)
    at Function.Module._load (node:internal/modules/cjs/loader:807:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47
```

Trying to install pythin-dbus using `apt` had the same error as `python-dbusmock`, and installing from pip threw an error I don't understand.

```
configure: error: in `/tmp/pip-install-Q3evpa/dbus-python/build/temp.linux-x86_64-2.7':
  configure: error:
Could not link test program to Python. Maybe the main Python library has been
    installed in some non-standard library path. If so, pass it to configure,
    via the LIBS environment variable.
    Example: ./configure LIBS="-L/usr/non-standard-path/python/lib"
```

Have people been able to build electron on Ubuntu 20, or is it unsupported?


Discussion / hints:
Yes, I've been hitting this too on stock Ubuntu 20.10. The build infrastructure still requires python-is-python2 but testing, because of python3-dbusmock, requires python-is-python3.

Are there any steps that have worked for you that I could try to replicate?

Also, would it make sense to run the electron build tools inside a docker container with Ubuntu 18?
FWIW, I tried using docker, but I eventually had the error after running `npm test`:

```
[1323:0319/213654.250342:FATAL:zygote_host_impl_linux.cc(117)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux/suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox
```

So I'm just guessing that running tests via docker are not supported either
I think more and more devs are starting to use Ubuntu 20, so it'd be nice to figure this out. 😅

Is there something I can investigate further to progress this? There's a bunch of electron bugs/features I'd like to tackle but currently cannot.
Has anything changed that unblocks this by any chance? 😅
@RangerMauve were you able to get electron to build on pop os? I am looking for a ppa that has `libgnom-keyring-dev` unsuccessfully so far. I am on pop os 21.04
> @RangerMauve were you able to get electron to build on pop os? I am looking for a ppa that has `libgnom-keyring-dev` unsuccessfully so far. I am on pop os 21.04

Sorry, I haven't had the bandwidth or expertise to figure out whats up. 😅 I'm currently waiting on some funding to do more electron stuff, and I think when I get it I'll try spinning up a Digital Ocean droplet and do the compilation on the cloud.

It'd be nice if that wasn't necessary, of course. 😅
Ran into this issue today on Ubuntu 20.04.  I found out that for Ubuntu 20, there is only a python3-dbusmock package now.  So I installed that with:

`scottw@gimli:~/devel/pubRepos$  sudo apt-get update -y`
`scottw@gimli:~/devel/pubRepos$  sudo apt-get install -y python3-dbusmock`
`scottw@gimli:~/devel/pubRepos$  e test --runners=main`

The tests now run, and at the end I see:

`# tests 1636`
`# pass 1632`
`# fail 4`

Can anyone else confirm that this is an appropriate go-forward on Ubuntu 20.04 ?

Fix patch:
diff --git a/docs/development/build-instructions-linux.md b/docs/development/build-instructions-linux.md
index d3aeb85a8ff3e..6d70af4f47d27 100644
--- a/docs/development/build-instructions-linux.md
+++ b/docs/development/build-instructions-linux.md
@@ -29,7 +29,17 @@ Follow the guidelines below for building **Electron itself** on Linux, for the p
 * [clang](https://clang.llvm.org/get_started.html) 3.4 or later.
 * Development headers of GTK 3 and libnotify.
 
-On Ubuntu, install the following libraries:
+On Ubuntu >= 20.04, install the following libraries:
+
+```sh
+$ sudo apt-get install build-essential clang libdbus-1-dev libgtk-3-dev \
+                       libnotify-dev libasound2-dev libcap-dev \
+                       libcups2-dev libxtst-dev \
+                       libxss1 libnss3-dev gcc-multilib g++-multilib curl \
+                       gperf bison python3-dbusmock openjdk-8-jre
+```
+
+On Ubuntu < 20.04, install the following libraries:
 
 ```sh
 $ sudo apt-get install build-essential clang libdbus-1-dev libgtk-3-dev \


Test patch: