please explain this systemd service files question

L.P.H. van Belle belle at
Wed Oct 17 12:11:34 UTC 2018

Hai Aurélien, 

Thank for the reply. 
Now, this makes much more sense to me, and it did really help to analize this. 

I've added the configure parts and keep them empty as suggested. 

Now i've got the following configure settings. ( from debian/rules ) 

                --prefix=/usr \
                --enable-fhs \
                --sysconfdir=/etc \
                --localstatedir=/var \
                --libexecdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
                --with-privatedir=/var/lib/samba/private \
                --with-smbpasswd-file=/etc/samba/smbpasswd \
                --with-piddir=/var/run/samba \
                --with-pammodulesdir=/lib/$(DEB_HOST_MULTIARCH)/security \
                --with-pam \
                --with-syslog \
                --with-utmp \
                --with-winbind \
                --with-shared-modules=idmap_rid,idmap_ad,idmap_adex,idmap_hash,idmap_ldap,idmap_tdb2,vfs_dfs_samba4,auth_samba4,vfs_nfs4acl_xattr \
                --with-automount \
                --with-ldap \
                --with-ads \
                --with-dnsupdate \
                --with-gpgme \
                --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
                --with-modulesdir=/usr/lib/$(DEB_HOST_MULTIARCH)/samba \
                --datadir=/usr/share \
                --with-lockdir=/var/run/samba \
                --with-statedir=/var/lib/samba \
                --with-cachedir=/var/cache/samba \
                --enable-avahi \
                --disable-rpath \
                --disable-rpath-install \
                --bundled-libraries=NONE,pytevent,iniparser,roken,replace,wind,hx509,asn1,heimbase,hcrypto,krb5,gssapi,heimntlm,hdb,kdc,com_err,compile_et,asn1_compile \
                --builtin-libraries=ccan,samba-cluster-support \
                --minimum-library-version="$(shell ./debian/ --minimum-library-version)" \
                --with-cluster-support \
                --with-socketpath=/var/run/ctdb/ctdbd.socket \
                --with-logdir=/var/log/ctdb \

# small note here. --with-systemddir=/lib/systemd/system i've change that to --with-systemddir, intended. 
# Try to make a point here, read on..   
ifeq ($(DEB_HOST_ARCH_OS), linux)
        conf_args += \
                --with-systemd \
                --systemd-install-services \
                --systemd-smb-extra= \
                --systemd-nmb-extra= \
                --systemd-winbind-extra= \
                --systemd-samba-extra= \
        conf_args += \

Which results in 
/usr/bin/python2.7 ./buildtools/bin/waf -v configure --prefix=/usr --enable-fhs --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib/x86_64-linux-gnu --with-privatedir=/var/lib/samba/private --with-smbpasswd-file=/etc/samba/smbpasswd --with-piddir=/var/run/samba --with-pammodulesdir=/lib/x86_64-linux-gnu/security --with-pam --with-syslog --with-utmp --with-winbind --with-shared-modules=idmap_rid,idmap_ad,idmap_adex,idmap_hash,idmap_ldap,idmap_tdb2,vfs_dfs_samba4,auth_samba4,vfs_nfs4acl_xattr --with-automount --with-ldap --with-ads --with-dnsupdate --with-gpgme --libdir=/usr/lib/x86_64-linux-gnu --with-modulesdir=/usr/lib/x86_64-linux-gnu/samba --datadir=/usr/share --with-lockdir=/var/run/samba --with-statedir=/var/lib/samba --with-cachedir=/var/cache/samba --enable-avahi --disable-rpath --disable-rpath-install --bundled-libraries=NONE,pytevent,iniparser,roken,replace,wind,hx509,asn1,heimbase,hcrypto,krb5,gssapi,heimntlm,hdb,kdc,com_err,
 compile_et,asn1_compile --builtin-libraries=ccan,samba-cluster-support --minimum-library-version="" --with-cluster-support --with-socketpath=/var/run/ctdb/ctdbd.socket --with-logdir=/var/log/ctdb --enable-spotlight --with-systemd --systemd-install-services --with-systemddir --systemd-smb-extra= --systemd-nmb-extra= --systemd-winbind-extra= --systemd-samba-extra= else --without-systemd

These fails with these message..  
--with-systemd --systemd-install-services --with-systemddir --systemd-smb-extra= --systemd-nmb-extra= --systemd-winbind-extra= --systemd-samba-extra= else --without-systemd
--with-systemd --systemd-install-services --with-systemddir --systemd-smb-extra --systemd-nmb-extra --systemd-winbind-extra --systemd-samba-extra else --without-systemd

And this errors out on 
--systemd-samba-extra= else --without-systemd 

But i also noticed this : 


waf: error: --with-systemddir option requires an argument

-with-systemd --systemd-install-services --with-systemddir=/lib/systemd/system   Works as it should 
-with-systemd --systemd-install-services --with-systemddir  Does not work, and the default is not passed.  ?? The Default ?? 

wscript is telling me there is a default...  

                  help=("systemd service directory [PREFIX/lib/systemd/system]"),
                  action="store", dest="SYSTEMDDIR",

So we have a default set but its not passed/used? That not good in my opinion.  

Im testing more atm. 

But how should be pass these new parameters : --systemd-smb-extra 
But bases on above its not really consistant. 

Or its me, but then tell me what im doing wrong here. 



> -----Oorspronkelijk bericht-----
> Van: Aurélien Aptel [mailto:aaptel at] 
> Verzonden: woensdag 17 oktober 2018 12:17
> Aan: L.P.H. van Belle; samba-technical at
> Onderwerp: RE: please explain this systemd service files question
> "L.P.H. van Belle via samba-technical" 
> <samba-technical at>
> writes:
> > If i want to disable the extra parts, is it something like 
> this  ./configure --systemd-smb-extra=false 
> > Because thats a part i dont get, where do i need to set the 
> "default" from "empty" to no. 
> > I'll to get the patched version now where i removed the 
> systemd_*_extra parts. 
> * waf won't install the systemd files unless you configure with
>   --systemd-install-services. If they end up being installed in your
>   setup it might be done thru some outside script that 
> extracts them from the build and
>   installs them manually.
> * You can set the systemd install dir with --with-systemddir
> * All the --systemd-*-extra options are empty by default. If 
> you pass an
>   empty string (e.g. --systemd-smb-extra= ) but it should just add an
>   extra empty line.
> Cheers,
> -- 
> Aurélien Aptel / SUSE Labs Samba Team
> GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
> SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
> GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 
> 21284 (AG Nürnberg)

More information about the samba-technical mailing list