Skip to content

Commit

Permalink
SPEC: manage /run/sssd using tmpfiles.d
Browse files Browse the repository at this point in the history
Reviewed-by: Jakub Vávra <[email protected]>
Reviewed-by: Sumit Bose <[email protected]>
  • Loading branch information
alexey-tikhonov committed Apr 30, 2024
1 parent 54179a0 commit a226b24
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5721,6 +5721,7 @@ dist_noinst_DATA += \
contrib/sssd.spec.in \
contrib/sssd.sysusers \
contrib/90-sssd-token-access.rules \
contrib/sssd-tmpfiles.conf \
BUILD.txt \
COPYING \
src/tests/ \
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,7 @@ AC_DEFINE_UNQUOTED([ABS_SRC_DIR], ["$my_srcdir"], [Absolute path to the source d

AC_CONFIG_FILES([Makefile contrib/sssd.spec src/examples/rwtab src/doxy.config
contrib/sssd-pcsc.rules contrib/90-sssd-token-access.rules
contrib/sssd-tmpfiles.conf
src/sysv/sssd src/sysv/gentoo/sssd src/sysv/gentoo/sssd-kcm
po/Makefile.in src/man/Makefile src/tests/cwrap/Makefile
src/tests/intg/Makefile src/tests/test_CA/Makefile
Expand Down
1 change: 1 addition & 0 deletions contrib/sssd-tmpfiles.conf.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d /run/sssd 775 @SSSD_USER@ @SSSD_USER@ -
5 changes: 5 additions & 0 deletions contrib/sssd.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,9 @@ cp $RPM_BUILD_ROOT/%{_datadir}/sssd/krb5-snippets/enable_sssd_conf_dir \
# Otherwise this directory could not be owned by sssd-client
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/cifs-utils

# tmpfiles.d config
install -D -m 0644 contrib/sssd-tmpfiles.conf %{buildroot}%{_tmpfilesdir}/%{name}.conf

This comment has been minimized.

Copy link
@joakim-tjernlund

joakim-tjernlund May 2, 2024

Contributor

No make install target ?

This comment has been minimized.

Copy link
@alexey-tikhonov

alexey-tikhonov May 2, 2024

Author Member

indeed...

btw, what value do you provide to --with-pid-path= ./configure option?

This comment has been minimized.

Copy link
@alexey-tikhonov

alexey-tikhonov May 2, 2024

Author Member

But I don't understand how other config files are installed during 'make install'...

For example - kcm_default_ccache: does

dist_sssdkcmdata_DATA = contrib/kcm_default_ccache

handle everything?
I don't see where a path - /etc/krb5.conf.d/ - would be specified in the Makefile.am...

This comment has been minimized.

Copy link
@alexey-tikhonov

alexey-tikhonov May 2, 2024

Author Member

Looks like it installs to

sssdkcmdatadir = $(datadir)/sssd-kcm

but not to the target config folder

This comment has been minimized.

Copy link
@alexey-tikhonov

alexey-tikhonov May 2, 2024

Author Member

The same with '90-sssd-token-access.rules', other krb5.conf.d snippets and probably other system config files.

This comment has been minimized.

Copy link
@alexey-tikhonov

alexey-tikhonov May 2, 2024

Author Member

How do you handle this, @joakim-tjernlund ?

This comment has been minimized.

Copy link
@joakim-tjernlund

joakim-tjernlund May 2, 2024

Contributor

indeed...

btw, what value do you provide to --with-pid-path= ./configure option?

--with-pid-path=/run

This comment has been minimized.

Copy link
@joakim-tjernlund

joakim-tjernlund May 2, 2024

Contributor

How do you handle this, @joakim-tjernlund ?

I don't. Just build sssd master in Gentoo and noticed there was no tmpfiles conf installed by sssd

This comment has been minimized.

Copy link
@alexey-tikhonov

alexey-tikhonov May 3, 2024

Author Member

@joakim-tjernlund,

I meant kcm_default_ccache, 90-sssd-token-access.rules and other config snippets, that are installed by spec-file but not by 'make install'.

Wrt tmpfiles conf:

  • upstream file tells system to create /run/sssd, and this is in sync with spec-file that configures SSSD '--with-pid-path=/run/sssd/' (a default); since you configure '--with-pid-path=/run' you don't need this tmpfiles conf
  • take a note '--with-pid-path=/run' is incompatible with '--with-sssd-user=sssd' and then running SSSD service under 'sssd' user, because non-privileged user can't write to /run

# Remove .la files created by libtool
find $RPM_BUILD_ROOT -name "*.la" -exec rm -f {} \;

Expand Down Expand Up @@ -782,6 +785,8 @@ install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/sssd.conf
%{_unitdir}/sssd-sudo.socket
%{_unitdir}/sssd-sudo.service

%{_tmpfilesdir}/%{name}.conf

%dir %{_libexecdir}/%{servicename}
%{_libexecdir}/%{servicename}/sssd_be
%{_libexecdir}/%{servicename}/sssd_nss
Expand Down

0 comments on commit a226b24

Please sign in to comment.