please explain this systemd service files question
L.P.H. van Belle
belle at bazuin.nl
Wed Oct 17 10:15:29 UTC 2018
Ok, quick report back.
My latest version build where i patched the template files, removed the @systemd_*_extra@ parts.
Did not resolve the problem, even worse, it still added the extra parts and installed them in /etc/systemd/system
Patched the defaults to "False" in the wscript file.
I'll build again and report back.
Greetz,
Louis
> -----Oorspronkelijk bericht-----
> Van: samba-technical
> [mailto:samba-technical-bounces at lists.samba.org] Namens
> L.P.H. van Belle via samba-technical
> Verzonden: woensdag 17 oktober 2018 11:28
> Aan: samba-technical at lists.samba.org
> Onderwerp: RE: please explain this systemd service files question
>
> Hello Alexander,
>
> Thank you for the reply.
> Now, i've look at the commit, that gave me a bit more info.
>
> I've currently a build running where i've patch the template
> files and remove the @systemd_*_extra@ parts.
> Thats for a new try to get past this problem.
>
> I've ask the systemd devs and they also confirm that no
> systemctl try-start or try-stop exists.
> I've ask debian and they also say no try-start or try-stop
> exists with systemctl
> I've check the complied version of the service files and
> there these command dont exits.
> And googled for it like you also, and nothing.
> So i still dont get it where these commands are coming from
> except somewhere from sama.
>
>
> I have a few problem here.
> - I cant fingure out why/how the extra part is added at what
> point so i can stop it.
> Yes i've created a patch for now but i preffer setting the
> options in the debian/rules file.
>
> - It also install the .service files in /etc/systemd/system
> which overrides the correct files in /lib/systemd/systemd
> The service files located in /lib/systemd/systemd dont
> contain the extra parts.
>
> - The complete build logs dont show systemd-*-extra
>
> So im still not getting how and where the extra options are
> added, because the dont show up in my builds if i check the
> files manualy.
> Its a maze for me to follow the code where whats changed..
> :-/ ( but thats me.. )
>
> 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.
>
> And big thanks for having a look.. :-)
>
>
> Greetz,
>
> Louis
>
>
>
> > -----Oorspronkelijk bericht-----
> > Van: Alexander Bokovoy [mailto:ab at samba.org]
> > Verzonden: woensdag 17 oktober 2018 10:45
> > Aan: L.P.H. van Belle
> > CC: samba-technical at lists.samba.org
> > Onderwerp: Re: please explain this systemd service files question
> >
> > On ke, 17 loka 2018, L.P.H. van Belle via samba-technical wrote:
> > > Hai,
> > >
> > > After days of searching why on a debian install samba and
> > winbind fails, i did find this.
> > > in this folder : SOURCE/packaging/systemd/
> > > i notice the systemd service files with the following.
> > >
> > > for examplel this file : smb.service.in contains.
> > > [Unit]
> > > Description=Samba SMB Daemon
> > > Documentation=man:smbd(8) man:samba(7) man:smb.conf(5)
> > > Wants=network-online.target
> > > After=network.target network-online.target nmb.service
> > winbind.service
> > >
> > > [Service]
> > > Type=notify
> > > NotifyAccess=all
> > > PIDFile=@PIDDIR@/smbd.pid
> > > LimitNOFILE=16384
> > > EnvironmentFile=- at SYSCONFDIR@/sysconfig/samba
> > > ExecStart=@SBINDIR@/smbd --foreground --no-process-group
> > $SMBDOPTIONS
> > > ExecReload=/bin/kill -HUP $MAINPID
> > > LimitCORE=infinity
> > > @systemd_smb_extra@
> > >
> > > [Install]
> > > WantedBy=multi-user.target
> > >
> > >
> > >
> > > Now my question what is @systemd_smb_extra@ and why is it there.
> > >
> > > Due to that, the service files on debian are modifies and
> > this part is added:
> > >
> > >
> > > ExecStartPre=/bin/systemctl try-stop winbind.service
> > > ExecStartPost=/bin/systemctl try-start winbind.service
> > > Restart=on-failure
> > > RestartSec=30s
> > >
> > > resulting at the install :
> > >
> > > Process: 2065 ExecStartPre=/bin/systemctl try-stop
> > smbd.service (code=exited, status=1/FAILURE)
> > > because it does not understand try-stop ( or try-start )
> > >
> > > The commands there : systemctl try-stop and systemctl try-start
> > > does not exist, so can someone explain this for me?
> > Look at packaging/wscript:
> > gr.add_option('--systemd-smb-extra',
> > metavar="Option=Value",
> > help=("Extra directives added to the smb
> > service file."
> > +" Can be given multiple times."),
> > action="append", dest="systemd_smb_extra",
> > default=[])
> >
> > They default to empty list.
> >
> > The need to turn them to templates came from
> >
> > commit 080d590de1ff9f8ebc55aeffaea8d41991466549
> > Author: Aurelien Aptel <aaptel at suse.com>
> > Date: Thu Dec 14 16:47:49 2017 +0100
> >
> > packaging: add configure option to preprocess and install
> > systemd files
> >
> > Turn the systemd service files under packaging into
> > template (.in) files
> > with @VAR@ substitutions and add configure options to
> > install and tweak
> > them.
> >
> > Signed-off-by: Aurelien Aptel <aaptel at suse.com>
> > Reviewed-by: Andrew Bartlett <abartlet at samba.org>
> > Reviewed-by: Garming Sam <garming at catalyst.net.nz>
> >
> > I cannot find any references to 'try-stop/try-start' in systemd
> > upstream code so looks like try-start/try-stop were Debian-specific.
> >
> > --
> > / Alexander Bokovoy
> >
> >
>
>
>
More information about the samba-technical
mailing list