systemd[1]: /lib/systemd/system/nmbd.service:6: PIDFile= references a path below legacy directory /var/run/, updating /var/run/samba/nmbd.pid → /run/samba/nmbd.pid; please update the unit file accordingly. systemd[1]: /lib/systemd/system/smbd.service:6: PIDFile= references a path below legacy directory /var/run/, updating /var/run/samba/smbd.pid → /run/samba/smbd.pid; please update the unit file accordingly.
systemd[1]: /lib/systemd/system/winbindd.service:6: PIDFile= references a path below legacy directory /var/run/, updating /var/run/samba/winbindd.pid → /run/samba/winbindd.pid; please update the unit file accordingly.
we are already at 4.11.2, will this be fixed?
FWIW the upstream supplied units have the correct paths but we're not installing those. They have different names than our units too, so we either need to rename upstream's to our names, or have some method to migrate people to the new units.
Created attachment 602762 [details] samba-4.11.4-r1.ebuild Can you test the attached ebuild which uses upstream's units & unit naming, and also preserves functionality via the old names? Seems to work well here. Ebuild changes are: --- a/net-fs/samba/samba-4.11.4.ebuild +++ b/net-fs/samba/samba-4.11.4-r1.ebuild @@ -209,6 +209,8 @@ $(multilib_native_use_with quota quotas) $(multilib_native_use_with syslog) $(multilib_native_use_with systemd) + --systemd-install-services + --with-systemddir="$(systemd_get_systemunitdir)" $(multilib_native_use_with winbind) $(multilib_native_usex python '' '--disable-python') $(multilib_native_use_enable zeroconf avahi) @@ -264,12 +266,12 @@ newinitd "${CONFDIR}/samba4.initd-r1" samba newconfd "${CONFDIR}/samba4.confd" samba - systemd_dotmpfilesd "${FILESDIR}"/samba.conf - systemd_dounit "${FILESDIR}"/nmbd.service - systemd_dounit "${FILESDIR}"/smbd.{service,socket} - systemd_newunit "${FILESDIR}"/smbd_at.service 'smbd@.service' - systemd_dounit "${FILESDIR}"/winbindd.service - systemd_dounit "${FILESDIR}"/samba.service + systemd_newtmpfilesd packaging/systemd/samba.conf.tmp samba.conf + # Preserve functionality for old gentoo-specific unit names + dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service" + dosym smb.service "$(systemd_get_systemunitdir)/smbd.service" + dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service" + fi if use pam && use winbind ; then
Also had this issue for a long time.
Have you tested the above ebuild which has a fix? I'd like to get this merged to the latest ebuild soon but I really want someone besides myself to test & report success.
Hello Ben Kohler, I just tested your patch this morning on my system. It greatly works just as expected. Please, don't hesitate to merge it in the latest ebuild. :)
Mmmh, except that /usr/lib/tmpfiles.d/samba.conf is not updated. systemd-tmpfiles /usr/lib/tmpfiles.d/samba.conf:1: Line references path below legacy directory /var/run/, updating /var/run/samba → /run/samba; please update the tmpfiles.d/ drop-in file accordingly.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a19e6bd0004fdf91141e798b405b069412fa114 commit 6a19e6bd0004fdf91141e798b405b069412fa114 Author: Ben Kohler <bkohler@gentoo.org> AuthorDate: 2020-02-09 14:40:02 +0000 Commit: Ben Kohler <bkohler@gentoo.org> CommitDate: 2020-02-09 14:46:38 +0000 net-fs/samba: revbump to switch to upstream's systemd units Switch to upstream's packaged systemd units with new filenames. Add symlinks to preserve existing setups. Remove unused samba.service when addc is disabled. Fix minor whitespace issue in IUSE. Bug: https://bugs.gentoo.org/692602 Closes: https://bugs.gentoo.org/573976 Package-Manager: Portage-2.3.88, Repoman-2.3.20 Signed-off-by: Ben Kohler <bkohler@gentoo.org> net-fs/samba/samba-4.11.6-r1.ebuild | 314 ++++++++++++++++++++++++++++++++++++ 1 file changed, 314 insertions(+)
I have pushed a 4.11.6-r1 ebuild with upstream's units but still using gentoo's tmpfilesd config to address comment #8. Please test again and let me know if you see any more problems.
I have updated to 4.11.6-r1. It just works has expected!