Skip to content

Commit

Permalink
Rename cockpit-tempfiles.conf to cockpit-ws.conf
Browse files Browse the repository at this point in the history
Follow the name of the functionality in systemd:
See: https://www.freedesktop.org/software/systemd/man/latest/tmpfiles.d.html

In particular, this should be named after the package name (cockpit-ws),
and putting "tempfiles" into a tmpfiles.d/ file name is redundant.

Co-Authored-By: Martin Pitt <[email protected]>
  • Loading branch information
travier and martinpitt committed Apr 30, 2024
1 parent 1bc79c0 commit 0642db0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/systemd/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ install-exec-hook::
mkdir -p $(DESTDIR)$(sysconfdir)/issue.d
ln -sTfr $(DESTDIR)/run/cockpit/motd $(DESTDIR)$(sysconfdir)/issue.d/cockpit.issue

tempconfdir = $(prefix)/lib/tmpfiles.d
nodist_tempconf_DATA = src/systemd/cockpit-tempfiles.conf
tmpfilesconfdir = $(prefix)/lib/tmpfiles.d
nodist_tmpfilesconf_DATA = src/systemd/tmpfiles.d/cockpit-ws.conf

# we can't generate these with config.status because,
# eg. it does "@libexecdir@" -> "${exec_prefix}/libexec"
Expand All @@ -49,7 +49,7 @@ src/systemd/%: src/systemd/%.in

systemdgenerated = \
$(nodist_systemdunit_DATA) \
$(nodist_tempconf_DATA) \
$(nodist_tmpfilesconf_DATA) \
$(NULL)
systemdgenerated_in = $(patsubst %,%.in,$(systemdgenerated))

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tools/arch/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ package_cockpit() {
install -Dm644 "$srcdir"/cockpit-ws.sysuser.conf "$pkgdir"/usr/lib/sysusers.d/cockpit-ws.conf
install -Dm644 "$srcdir"/cockpit-wsinstance.sysuser.conf "$pkgdir"/usr/lib/sysusers.d/cockpit-wsinstance.conf

echo "z /usr/lib/cockpit/cockpit-session - - cockpit-wsinstance -" >> "$pkgdir"/usr/lib/tmpfiles.d/cockpit-tempfiles.conf
echo "z /usr/lib/cockpit/cockpit-session - - cockpit-wsinstance -" >> "$pkgdir"/usr/lib/tmpfiles.d/cockpit-ws.conf

# remove unused plugins
rm -rf "$pkgdir"/usr/share/cockpit/{selinux,playground,sosreport} \
Expand Down
4 changes: 2 additions & 2 deletions tools/cockpit.spec
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ authentication via sssd/FreeIPA.
%{_unitdir}/[email protected]
%{_unitdir}/[email protected]
%{_unitdir}/system-cockpithttps.slice
%{_prefix}/%{__lib}/tmpfiles.d/cockpit-tempfiles.conf
%{_prefix}/%{__lib}/tmpfiles.d/cockpit-ws.conf
%{pamdir}/pam_ssh_add.so
%{pamdir}/pam_cockpit_cert.so
%{_libexecdir}/cockpit-ws
Expand Down Expand Up @@ -447,7 +447,7 @@ if [ "$1" = 1 ]; then
chmod 644 /etc/cockpit/disallowed-users
fi

%tmpfiles_create cockpit-tempfiles.conf
%tmpfiles_create cockpit-ws.conf
%systemd_post cockpit.socket cockpit.service
# firewalld only partially picks up changes to its services files without this
test -f %{_bindir}/firewall-cmd && firewall-cmd --reload --quiet || true
Expand Down
2 changes: 1 addition & 1 deletion tools/debian/cockpit-ws.install
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ${env:deb_systemdsystemunitdir}/[email protected]
${env:deb_systemdsystemunitdir}/system-cockpithttps.slice
${env:deb_pamlibdir}/security/pam_ssh_add.so
${env:deb_pamlibdir}/security/pam_cockpit_cert.so
usr/lib/tmpfiles.d/cockpit-tempfiles.conf
usr/lib/tmpfiles.d/cockpit-ws.conf
usr/lib/cockpit/cockpit-session
usr/lib/cockpit/cockpit-ws
usr/lib/cockpit/cockpit-wsinstance-factory
Expand Down

0 comments on commit 0642db0

Please sign in to comment.