We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
installing from Ubuntu repo does not install s3 adapter
# Bug Report

DVC version 2.6.3

![image](https://user-images.githubusercontent.com/167835/186968532-080d228a-054f-4688-8967-8ec62cd17458.png)

DVC version 2.21.1

![image](https://user-images.githubusercontent.com/167835/186968664-c2b3edcb-2dca-4eba-9cee-fbdd472979eb.png)


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `scripts/pyinstaller/build.py`
Content:
```
1 import os
2 import pathlib
3 from subprocess import STDOUT, check_call
4 
5 path = pathlib.Path(__file__).parent.absolute()
6 hooks = path / "hooks"
7 dvc = path.parent.parent / "dvc"
8 entry = dvc / "__main__.py"
9 
10 check_call(
11     [
12         "pyinstaller",
13         "--additional-hooks-dir",
14         os.fspath(hooks),
15         "--name",
16         "dvc",
17         "-y",
18         os.fspath(entry),
19     ],
20     cwd=path,
21     stderr=STDOUT,
22 )
23 
24 check_call(
25     [
26         path / "dist" / "dvc" / "dvc",
27         "doctor",
28     ],
29     stderr=STDOUT,
30 )
31
```

Path: `scripts/pyinstaller/hooks/hook-dvc.py`
Content:
```
1 from PyInstaller.utils.hooks import (  # pylint:disable=import-error
2     copy_metadata,
3 )
4 
5 # needed for `dvc doctor` to show dep versions
6 datas = copy_metadata("adlfs", recursive=True)
7 datas += copy_metadata("knack")
8 datas += copy_metadata("gcsfs")
9 datas += copy_metadata("pyarrow")
10 datas += copy_metadata("pydrive2")
11 datas += copy_metadata("s3fs", recursive=True)
12 datas += copy_metadata("boto3")
13 datas += copy_metadata("ossfs")
14 datas += copy_metadata("sshfs")
15 datas += copy_metadata("webdav4")
16 datas += copy_metadata("aiohttp")
17 datas += copy_metadata("aiohttp_retry")
18 
19 # https://github.com/pypa/setuptools/issues/1963
20 hiddenimports = ["pkg_resources.py2_warn"]
21
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/scripts/pyinstaller/build.py b/scripts/pyinstaller/build.py
--- a/scripts/pyinstaller/build.py
+++ b/scripts/pyinstaller/build.py
@@ -1,6 +1,6 @@
 import os
 import pathlib
-from subprocess import STDOUT, check_call
+from subprocess import STDOUT, check_call, check_output
 
 path = pathlib.Path(__file__).parent.absolute()
 hooks = path / "hooks"
@@ -21,10 +21,27 @@
     stderr=STDOUT,
 )
 
-check_call(
+out = check_output(
     [
         path / "dist" / "dvc" / "dvc",
         "doctor",
     ],
     stderr=STDOUT,
-)
+).decode()
+
+remotes = [
+    "s3",
+    "oss",
+    "gdrive",
+    "gs",
+    "hdfs",
+    "http",
+    "webhdfs",
+    "azure",
+    "ssh",
+    "webdav",
+]
+
+print(out)
+for remote in remotes:
+    assert f"\t{remote}" in out, f"Missing support for {remote}"
diff --git a/scripts/pyinstaller/hooks/hook-dvc.py b/scripts/pyinstaller/hooks/hook-dvc.py
--- a/scripts/pyinstaller/hooks/hook-dvc.py
+++ b/scripts/pyinstaller/hooks/hook-dvc.py
@@ -16,5 +16,15 @@
 datas += copy_metadata("aiohttp")
 datas += copy_metadata("aiohttp_retry")
 
-# https://github.com/pypa/setuptools/issues/1963
-hiddenimports = ["pkg_resources.py2_warn"]
+hiddenimports = [
+    "dvc_azure",
+    "dvc_gdrive",
+    "dvc_gs",
+    "dvc_hdfs",
+    "dvc_oss",
+    "dvc_s3",
+    "dvc_webdav",
+    "dvc_webhdfs",
+    # https://github.com/pypa/setuptools/issues/1963
+    "pkg_resources.py2_warn",
+]

{"golden_diff": "diff --git a/scripts/pyinstaller/build.py b/scripts/pyinstaller/build.py\n--- a/scripts/pyinstaller/build.py\n+++ b/scripts/pyinstaller/build.py\n@@ -1,6 +1,6 @@\n import os\n import pathlib\n-from subprocess import STDOUT, check_call\n+from subprocess import STDOUT, check_call, check_output\n \n path = pathlib.Path(__file__).parent.absolute()\n hooks = path / \"hooks\"\n@@ -21,10 +21,27 @@\n     stderr=STDOUT,\n )\n \n-check_call(\n+out = check_output(\n     [\n         path / \"dist\" / \"dvc\" / \"dvc\",\n         \"doctor\",\n     ],\n     stderr=STDOUT,\n-)\n+).decode()\n+\n+remotes = [\n+    \"s3\",\n+    \"oss\",\n+    \"gdrive\",\n+    \"gs\",\n+    \"hdfs\",\n+    \"http\",\n+    \"webhdfs\",\n+    \"azure\",\n+    \"ssh\",\n+    \"webdav\",\n+]\n+\n+print(out)\n+for remote in remotes:\n+    assert f\"\\t{remote}\" in out, f\"Missing support for {remote}\"\ndiff --git a/scripts/pyinstaller/hooks/hook-dvc.py b/scripts/pyinstaller/hooks/hook-dvc.py\n--- a/scripts/pyinstaller/hooks/hook-dvc.py\n+++ b/scripts/pyinstaller/hooks/hook-dvc.py\n@@ -16,5 +16,15 @@\n datas += copy_metadata(\"aiohttp\")\n datas += copy_metadata(\"aiohttp_retry\")\n \n-# https://github.com/pypa/setuptools/issues/1963\n-hiddenimports = [\"pkg_resources.py2_warn\"]\n+hiddenimports = [\n+    \"dvc_azure\",\n+    \"dvc_gdrive\",\n+    \"dvc_gs\",\n+    \"dvc_hdfs\",\n+    \"dvc_oss\",\n+    \"dvc_s3\",\n+    \"dvc_webdav\",\n+    \"dvc_webhdfs\",\n+    # https://github.com/pypa/setuptools/issues/1963\n+    \"pkg_resources.py2_warn\",\n+]\n", "issue": "installing from Ubuntu repo does not install s3 adapter\n# Bug Report\r\n\r\nDVC version 2.6.3\r\n\r\n![image](https://user-images.githubusercontent.com/167835/186968532-080d228a-054f-4688-8967-8ec62cd17458.png)\r\n\r\nDVC version 2.21.1\r\n\r\n![image](https://user-images.githubusercontent.com/167835/186968664-c2b3edcb-2dca-4eba-9cee-fbdd472979eb.png)\r\n\n", "before_files": [{"content": "import os\nimport pathlib\nfrom subprocess import STDOUT, check_call\n\npath = pathlib.Path(__file__).parent.absolute()\nhooks = path / \"hooks\"\ndvc = path.parent.parent / \"dvc\"\nentry = dvc / \"__main__.py\"\n\ncheck_call(\n    [\n        \"pyinstaller\",\n        \"--additional-hooks-dir\",\n        os.fspath(hooks),\n        \"--name\",\n        \"dvc\",\n        \"-y\",\n        os.fspath(entry),\n    ],\n    cwd=path,\n    stderr=STDOUT,\n)\n\ncheck_call(\n    [\n        path / \"dist\" / \"dvc\" / \"dvc\",\n        \"doctor\",\n    ],\n    stderr=STDOUT,\n)\n", "path": "scripts/pyinstaller/build.py"}, {"content": "from PyInstaller.utils.hooks import (  # pylint:disable=import-error\n    copy_metadata,\n)\n\n# needed for `dvc doctor` to show dep versions\ndatas = copy_metadata(\"adlfs\", recursive=True)\ndatas += copy_metadata(\"knack\")\ndatas += copy_metadata(\"gcsfs\")\ndatas += copy_metadata(\"pyarrow\")\ndatas += copy_metadata(\"pydrive2\")\ndatas += copy_metadata(\"s3fs\", recursive=True)\ndatas += copy_metadata(\"boto3\")\ndatas += copy_metadata(\"ossfs\")\ndatas += copy_metadata(\"sshfs\")\ndatas += copy_metadata(\"webdav4\")\ndatas += copy_metadata(\"aiohttp\")\ndatas += copy_metadata(\"aiohttp_retry\")\n\n# https://github.com/pypa/setuptools/issues/1963\nhiddenimports = [\"pkg_resources.py2_warn\"]\n", "path": "scripts/pyinstaller/hooks/hook-dvc.py"}], "after_files": [{"content": "import os\nimport pathlib\nfrom subprocess import STDOUT, check_call, check_output\n\npath = pathlib.Path(__file__).parent.absolute()\nhooks = path / \"hooks\"\ndvc = path.parent.parent / \"dvc\"\nentry = dvc / \"__main__.py\"\n\ncheck_call(\n    [\n        \"pyinstaller\",\n        \"--additional-hooks-dir\",\n        os.fspath(hooks),\n        \"--name\",\n        \"dvc\",\n        \"-y\",\n        os.fspath(entry),\n    ],\n    cwd=path,\n    stderr=STDOUT,\n)\n\nout = check_output(\n    [\n        path / \"dist\" / \"dvc\" / \"dvc\",\n        \"doctor\",\n    ],\n    stderr=STDOUT,\n).decode()\n\nremotes = [\n    \"s3\",\n    \"oss\",\n    \"gdrive\",\n    \"gs\",\n    \"hdfs\",\n    \"http\",\n    \"webhdfs\",\n    \"azure\",\n    \"ssh\",\n    \"webdav\",\n]\n\nprint(out)\nfor remote in remotes:\n    assert f\"\\t{remote}\" in out, f\"Missing support for {remote}\"\n", "path": "scripts/pyinstaller/build.py"}, {"content": "from PyInstaller.utils.hooks import (  # pylint:disable=import-error\n    copy_metadata,\n)\n\n# needed for `dvc doctor` to show dep versions\ndatas = copy_metadata(\"adlfs\", recursive=True)\ndatas += copy_metadata(\"knack\")\ndatas += copy_metadata(\"gcsfs\")\ndatas += copy_metadata(\"pyarrow\")\ndatas += copy_metadata(\"pydrive2\")\ndatas += copy_metadata(\"s3fs\", recursive=True)\ndatas += copy_metadata(\"boto3\")\ndatas += copy_metadata(\"ossfs\")\ndatas += copy_metadata(\"sshfs\")\ndatas += copy_metadata(\"webdav4\")\ndatas += copy_metadata(\"aiohttp\")\ndatas += copy_metadata(\"aiohttp_retry\")\n\nhiddenimports = [\n    \"dvc_azure\",\n    \"dvc_gdrive\",\n    \"dvc_gs\",\n    \"dvc_hdfs\",\n    \"dvc_oss\",\n    \"dvc_s3\",\n    \"dvc_webdav\",\n    \"dvc_webhdfs\",\n    # https://github.com/pypa/setuptools/issues/1963\n    \"pkg_resources.py2_warn\",\n]\n", "path": "scripts/pyinstaller/hooks/hook-dvc.py"}]}