Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#66455 - [connman] does not create directory /run/connman

Attached to Project: Community Packages
Opened by Keith (keithg) - Tuesday, 28 April 2020, 18:48 GMT
Last edited by freswa (frederik) - Tuesday, 28 April 2020, 19:19 GMT
Task Type Bug Report
Category Packages
Status Assigned
Assigned To Christian Rebischke (Shibumi)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Description:
Current package does not create /run/connman for creation of the connman resolv.conf file and this error shows up in the log:

"Cannot create /var/run/connman/resolv.conf falling back to /etc/resolv.conf"

I think this may be a tmpfiles.d issue.

Additional info:
* package version(s)
* config and/or log files etc.
* link to upstream bug report, if any

Version 1.38-1

This was noted on the connman mailing list back in 2018
https://www.mail-archive.com/connman%40lists.01.org/msg00879.html


Steps to reproduce:
Install connman, enable connman, disable other network manager (networkd, NetworkManager, netctl, etc)and reboot.
Connman will run but this error will show in the journal at each boot.
This task depends upon

Comment by Keith (keithg) - Tuesday, 28 April 2020, 19:22 GMT
Tried to add 'RuntimeDirectory=connman' to the Unit portion of the service file and was unsuccessful.

Was able to hack it to create the directory by adding 'ExecStartPre=/bin/mkdir -p /run/connman' which is not
considered proper with systemd 245 but it does work and stays through a reboot...
Comment by A. Bosch (progandy) - Saturday, 28 November 2020, 21:15 GMT
That directive belongs into the [Service] section, I have it working in my override like this:

# /etc/systemd/system/connman.service.d/override.conf
[Service]
RuntimeDirectory=connman
ExecStart=
ExecStart=/usr/bin/connmand --wifi=iwd_agent --nodnsproxy -n


I'm not sure this is good to have in the default configuration, that would require symlinking the resolv.conf file to use connman.
It is mostly useful with a custom dns resolver and I have added that at the appropriate place in the wiki here:
https://wiki.archlinux.org/index.php/ConnMan#Avoiding_conflicts_with_local_DNS_server
Comment by Keith (keithg) - Sunday, 29 November 2020, 14:18 GMT
Yes, this can/does work, but the true fix, I believe, is to make sure that the connman package creates this folder at install and I think it should be in the tmpfiles.d/ folder.
Comment by Jeremy Goss (jemgoss) - Wednesday, 25 August 2021, 03:16 GMT
I noticed the PKGBUILD for connman explicitly deletes the ${pkgdir}/usr/lib/tmpfiles.d directory created by the build.

Otherwise, the package would contain this:
cat pkg/connman/usr/lib/tmpfiles.d/connman_resolvconf.conf
d /var/run/connman - - - -
L /etc/resolv.conf - - - - /var/run/connman/resolv.conf

Perhaps it was removed so connman wouldn't overwrite /etc/resolv.conf.
The fix should be to retain the tmpfiles.d file but just remove the line creating the /etc/resolv.conf link.
That way, users can manually link /etc/resolv.conf to /var/run/connman/resolv.conf or their preferred resolver.

Loading...