| Newsgroups |
gmane.linux.lfs.beyond.book |
| Message-ID |
<178232055104.1041282.7965138576489205330@rivendell.linuxfromscratch.org> |
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch trunk
in repository blfs.
The following commit(s) were added to refs/heads/trunk by this push:
new 040101076f samba: switch to shipped units
040101076f is described below
commit 040101076f932a0c754e01c80de5555dd6dbea5e
Author: Xi Ruoyao <[email protected]>
AuthorDate: Thu Jun 25 00:49:25 2026 +0800
samba: switch to shipped units
They seems better suited in the systemd environment but they require
--with-systemd (in addition to --systemd-install-services which simply
installs them). Interestingly the name of them lacks the "d" suffix.
Also smbd.socket is completely broken: the man page of systemd.socket
states that for foo.socket with Accept=yes we must provide [email protected].
There's no way to provide a correct [email protected] in this case: systemd
expects the socket returned by accept() to be passed to the service
instance either as stdin/stdout or via sd_listen_fds(), however smbd
supports neither way. Even changing Accept to no still won't fix the
issue: with Accept=no systemd will simply pass the socket binded to
[::]:445 to smbd as stdin/stdout or via sd_listen_fds(), but smbd still
supports neither.
The example of socket activation with Accept=yes can be put into the
OpenSSH page instead (I have some systems running sshd.socket instead of
sshd.service and they behave well).
I'll remove the hand-brew (and in case of smbd.socket, incorrect) samba
units in systemd-blfs-units later.
---
networking/netprogs/samba.xml | 58 +++++++++++++++----------------------------
1 file changed, 20 insertions(+), 38 deletions(-)
diff --git a/networking/netprogs/samba.xml b/networking/netprogs/samba.xml
index 846c0330c3..5dd0945c8b 100644
--- a/networking/netprogs/samba.xml
+++ b/networking/netprogs/samba.xml
@@ -203,8 +203,10 @@ make</userinput></screen>
--enable-fhs \
--without-ad-dc \
--with-system-mitkrb5 \
+ --with-systemd \
--enable-selftest \
- --disable-rpath-install &&
+ --disable-rpath-install \
+ --systemd-install-services &&
make</userinput></screen>
<para>
@@ -318,6 +320,12 @@ install -v -m755 examples/LDAP/{get*,ol*} \
Remove this if you do not have <xref linkend="mitkrb"/> installed.
</para>
+ <para revision="systemd">
+ <parameter>--with-systemd</parameter>: Enable
+ <application>systemd</application> integration (required by
+ <literal>Type=notify</literal> in the shipped systemd unit files).
+ </para>
+
<!-- Note that /usr/lib/samba is still in rpath and it's really
needed. -->
<para>
@@ -335,6 +343,11 @@ install -v -m755 examples/LDAP/{get*,ol*} \
specifies the test suite work directory (default=./st).
</para>
+ <para revision="systemd">
+ <parameter>--systemd-install-services</parameter>: Install the
+ shipped systemd units.
+ </para>
+
<para>
<command>install -v -m644 examples/LDAP/* /etc/openldap/schema</command>:
These commands are used to copy sample Samba schemas to the OpenLDAP
@@ -600,59 +613,28 @@ ln -v -sf /usr/bin/smbspool /usr/lib/cups/backend/smb</userinput></screen>
<para>
To start the <application>Samba</application> daemons at boot,
- install the systemd units from the <xref linkend="systemd-units"/>
- package by running the following command as the
- <systemitem class="username">root</systemitem> user:
+ enable the shipped systemd unit by running the following command
+ as the &root; user:
</para>
<indexterm zone="samba samba-init-sysd">
<primary sortas="f-samba">samba</primary>
</indexterm>
-<screen role="root"><userinput>make install-samba</userinput></screen>
+<screen role="root"><userinput>systemctl enable smb.service</userinput></screen>
<para>
To start the <command>winbindd</command> daemon at boot,
- install the systemd unit from the <xref linkend="systemd-units"/>
- package by running the following command as the
- <systemitem class="username">root</systemitem> user:
+ enable the shipped systemd unit by running the following command
+ as the &root; user:
</para>
<indexterm zone="samba samba-init-sysd">
<primary sortas="f-winbindd">winbindd</primary>
</indexterm>
-<screen role="root"><userinput>make install-winbindd</userinput></screen>
-
- <note>
- <para>
- This package comes with two types of units: A service file and a
- socket file. The service file will start the smbd daemon once at
- boot and it will keep running until the system shuts down. The
- socket file will make systemd listen on the smbd port (Default 445,
- needs to be edited for anything else) and will start the smbd
- daemon when something tries to connect to that port and stop the
- daemon when the connection is terminated. This is called socket
- activation and is analogous to using
- <application>{,x}inetd</application> on a SysVinit based system.
- </para>
-
- <para>
- By default, the first method is used - the smbd daemon is started
- at boot and stopped at shutdown. If the socket method is desired,
- you need to run the following commands as the <systemitem
- class="username">root</systemitem> user:
- </para>
-
-<screen role="root"><userinput>systemctl stop smbd &&
-systemctl disable smbd &&
-systemctl enable smbd.socket &&
-systemctl start smbd.socket</userinput></screen>
+<screen role="root"><userinput>systemctl enable winbind.service</userinput></screen>
- <para>
- Note that only the smbd daemon can be socket activated.
- </para>
- </note>
</sect4>
</sect3>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
--
http://lists.linuxfromscratch.org/sympa/info/blfs-book
Unsubscribe: See the above information page