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 Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:01 GMT
Opened by Keith (keithg) - Tuesday, 28 April 2020, 18:48 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:01 GMT
|
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
Closed by Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:01 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/connman/issues/1
Saturday, 25 November 2023, 20:01 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/connman/issues/1
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...
# /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
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.
But the current package doesn't install anything into /usr/lib/tmpfiles.d because of this change that was made way back in 2016:
https://github.com/archlinux/svntogit-community/commit/ee20ae8f03bd8ba9dfd779284a3d0f1cc8f5667f
Notice the removal of "$pkgdir"/usr/lib/tmpfiles.d in that change.
If that file is reinstated, I think it should look like:
d /run/connman - - - -
L! /etc/resolv.conf - - - - /run/connman/resolv.conf
I believe the ! after the L should avoid overwriting the symlink.
So, here are my suggested changes to build a package that includes a tmpfile as above (sorry, I don't know how to create a PR for this):
$ diff PKGBUILD.orig PKGBUILD
22c22,23
< 'allow_group_network.diff')
---
> 'allow_group_network.diff'
> 'connman_resolvconf.conf.diff')
25c26,27
< '06dd5867d460f1c3cf6c359e650ca2ef24495493a99cd03dbd17f23e587e9066d9bc98758d85d5c690d1ae21fa77ad8da5e2fa83d0b52c95d7a535784c5c4964')
---
> '06dd5867d460f1c3cf6c359e650ca2ef24495493a99cd03dbd17f23e587e9066d9bc98758d85d5c690d1ae21fa77ad8da5e2fa83d0b52c95d7a535784c5c4964'
> '17cab752aa7bf4e1a538580148943e48f8c2f4e304b6f9c05f7f664991909c69a20d8a3c7b52bcd93a9075a76b97cc91060b5fcb3e699701fdd74855897d5cd7')
30a33
> patch -Np1 -i "${srcdir}/connman_resolvconf.conf.diff"
36a40
> --runstatedir=/run \
60d63
< rm -r "${pkgdir}"/usr/lib/tmpfiles.d
-----------------------------------------------------------
$ cat connman_resolvconf.conf.diff
--- a/scripts/connman_resolvconf.conf.in.orig
+++ b/scripts/connman_resolvconf.conf.in
@@ -1,2 +1,2 @@
d @runstatedir@/connman - - - -
-L /etc/resolv.conf - - - - @runstatedir@/connman/resolv.conf
+L! /etc/resolv.conf - - - - @runstatedir@/connman/resolv.conf
FS#67876I've been using this without problems:
d /run/connman - - - -
L /etc/resolv.conf - - - - /run/connman/resolv.conf
BTW. If you are going to show a patch with `diff`, it's better to use the unified format `diff -u`.