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

ofono: crashes when OFONO_PLUGIN_PATH is unset due to patch #88178

Closed
jonascarpay opened this issue May 19, 2020 · 2 comments · Fixed by #88254
Closed

ofono: crashes when OFONO_PLUGIN_PATH is unset due to patch #88178

jonascarpay opened this issue May 19, 2020 · 2 comments · Fixed by #88254

Comments

@jonascarpay
Copy link
Contributor

Describe the bug
The nixpkgs version of ofono is patched to read a OFONO_PLUGIN_PATH environment variable. It crashes when this variable is not set.
This also means that the services.ofono service does not work if services.ofono.plugins is empty.

To Reproduce
Run nix-shell -p ofono --run "sudo ofonod -n":

$ nix-shell -p ofono --run "sudo ofonod -n"
ofonod[9865]: oFono version 1.31

(ofonod:9865): GLib-CRITICAL **: 01:26:47.382: g_strsplit: assertion 'string != NULL' failed
ofonod[9865]: Aborting (signal 11) [ofonod]
ofonod[9865]: ++++++++ backtrace ++++++++
-C: 'ofonod': No such file
ofonod[9865]: +++++++++++++++++++++++++++

Expected behavior
The same behavior you get as when OFONO_PLUGIN_PATH is set, or you compile without the patch:

$ nix-shell -p ofono --run "sudo env OFONO_PLUGIN_PATH='' ofonod -n"
ofonod[9976]: oFono version 1.31
ofonod[9976]: parse_devices_reply: found 1st battery device: /org/freedesktop/UPower/devices/battery_BAT1

Notify maintainers
@jtojnar

Metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 5.4.41, NixOS, 20.03.1896.025deb80b24 (Markhor)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.4`
 - channels(root): `"nixos-20.03.1896.025deb80b24"`
 - channels(jmc): `"haskell-nix, nixpkgs-20.03.1795.d6c1b566b77, nur, unstable-20.09pre223023.fce7562cf46"`
 - nixpkgs: `/home/jmc/.nix-defexpr/channels/nixpkgs`

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
  - ofono
# a list of nixos modules affected by the problem
module:
  - ofono
@jtojnar
Copy link
Contributor

jtojnar commented May 19, 2020

Ugh, loooks like this line should be if (plugin_path) {

@jonascarpay
Copy link
Contributor Author

Ohhhh... I also completely missed it when looking at it

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

Successfully merging a pull request may close this issue.

2 participants