#3691 SYSTEMD: Allow to use "/run" in ListenStream
Merged 5 years ago by jhrozek. Opened 6 years ago by lslebodn.
SSSD/ lslebodn/sssd sockets_rustatedir  into  master

file modified
+1
@@ -4686,6 +4686,7 @@ 

          -e 's|@sbindir[@]|$(sbindir)|g' \

          -e 's|@environment_file[@]|$(environment_file)|g' \

          -e 's|@localstatedir[@]|$(localstatedir)|g' \

+         -e 's|@runstatedir[@]|$(runstatedir)|g' \

          -e 's|@logpath[@]|$(logpath)|g' \

          -e 's|@libexecdir[@]|$(libexecdir)|g' \

          -e 's|@pipepath[@]|$(pipepath)|g' \

@@ -4,7 +4,7 @@ 

  Requires=sssd-secrets.socket

  

  [Socket]

- ListenStream=@localstatedir@/run/.heim_org.h5l.kcm-socket

+ ListenStream=@runstatedir@/.heim_org.h5l.kcm-socket

  

  [Install]

  WantedBy=sockets.target

@@ -3,7 +3,7 @@ 

  Documentation=man:sssd-secrets(5)

  

  [Socket]

- ListenStream=@localstatedir@/run/secrets.socket

+ ListenStream=@runstatedir@/secrets.socket

  

  [Install]

  WantedBy=sockets.target

/var/run is only symbolic link to /run on some distributions
and /run is mounted on tmpfs

sh-4.4$ ls -l /var/run
lrwxrwxrwx. 1 root root 6 Dec 12  2015 /var/run -> ../run

Previously, we used $(localstatedir)/run in ListenStream
which does not allow to use "/run" because we still need to
store some files in under $(localstatedir) (/var).

Autoconf 2.70 will add new configure time option --runstatedir
for configuring runstatedir. ATM, we use just fallback implementation
where $(runstatedir) is set to $(localstatedir)/run

rebased onto a9c03fb

5 years ago

ACK, sorry this stalled for so long.

BTW we can add also following changes to spec file (of course conditionally)

diff --git a/sssd.spec b/sssd.spec
index 25314596b..dfe31c7ff 100644
--- a/contrib/sssd.spec.in
+++ b/contrib/sssd.spec.in
@@ -743,6 +743,7 @@ autoreconf -ivf
     --enable-nsslibdir=/%{_lib} \
     --enable-pammoddir=/%{_lib}/security \
     --enable-nfsidmaplibdir=%{_libdir}/libnfsidmap \
+    --with-pid-path=/run \
     --disable-static \
     --disable-rpath \
 %if %{with sssd_user}
@@ -758,7 +759,8 @@ autoreconf -ivf
     %{?with_kcm_option} \
     %{?experimental}

-make %{?_smp_mflags} all
+make %{?_smp_mflags} all \
+     runstatedir=/run

Just let me know.

I don't know. If you think it would be beneficial, then yes, but I think a separate PR would be better (I'll push this one later today to avoid blocking our internal CI with post-commit runs)

I don't know. If you think it would be beneficial, then yes, but I think a separate PR would be better (I'll push this one later today to avoid blocking our internal CI with post-commit runs)

make sense

Commit f64e958 fixes this pull-request

Pull-Request has been merged by jhrozek

5 years ago

Commit 7ddbcd8 fixes this pull-request

Pull-Request has been merged by jhrozek

5 years ago