Bug 2098553

Summary: expose /usr/share/user-tmpfiles.d via pkgconfig
Product: [Fedora] Fedora Reporter: Daiki Ueno <dueno>
Component: systemdAssignee: systemd-maint
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 36CC: fedoraproject, filbranden, flepied, lnykryn, msekleta, ryncsn, ssahani, s, systemd-maint, yuwatana, zbyszek
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: systemd-250.8-1.fc36 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-16 01:22:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Daiki Ueno 2022-06-20 05:42:01 UTC
Description of problem:
I wanted to use systemd-tmpfiles to maintain per-user temporary directory for my package (namely p11-kit client module, which require $XDG_RUNTIME_DIR/p11-kit to be created to host some Unix sockets). However, I realized that /usr/share/user-tmpfiles.d does not exist by default and no packages own that directly, while it is mentioned in the systemd-tempfiles manual page.

Version-Release number of selected component (if applicable):
systemd-250.7-1.fc36.x86_64

How reproducible:
100%

Steps to Reproduce:
1. dnf --release rawhide repoquery -f /usr/share/user-tmpfiles.d
2.
3.

Actual results:
none returned

Expected results:
some package owns that directory

Additional info:

Comment 1 Zbigniew Jędrzejewski-Szmek 2022-06-20 09:16:38 UTC
Please just co-own this directory from your package. (For /usr/lib/tmpfiles.d/ the story is a bit
different, because systemd has always shipped its own files there. But since it doesn't ship
anything under /usr/share/user-tmpfiles.d/, there wasn't ever any reason to create the directory.)

Comment 2 Daiki Ueno 2022-06-20 09:41:48 UTC
Thanks; on a slightly related note, it would be useful if the directory is queried through pkgconfig, e.g., `pkg-config systemd --variable=usertmpfiles_dir` so we don't need to hard-code the value in packages.

Comment 3 Zbigniew Jędrzejewski-Szmek 2022-06-20 12:10:21 UTC
Indeed.

Comment 4 Zbigniew Jędrzejewski-Szmek 2022-06-20 13:07:22 UTC
https://github.com/systemd/systemd/pull/23787

Comment 5 Fedora Update System 2022-07-14 13:46:22 UTC
FEDORA-2022-a1cafa0a68 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-a1cafa0a68

Comment 6 Fedora Update System 2022-07-15 01:20:32 UTC
FEDORA-2022-a1cafa0a68 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-a1cafa0a68`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-a1cafa0a68

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2022-07-16 01:22:46 UTC
FEDORA-2022-a1cafa0a68 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.