Bug 2379294 - post-without-tmpfile-creation has different ideas than systemd-rpm-macros
Summary: post-without-tmpfile-creation has different ideas than systemd-rpm-macros
Keywords:
Status: NEW
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: rpmlint
Version: epel10
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-07-10 12:23 UTC by Ulrik Haugen
Modified: 2025-07-10 12:23 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ulrik Haugen 2025-07-10 12:23:55 UTC
Description of problem:
In a specfile with:

    %pre
    %{tmpfiles_create_package %{name} %{S:4}}

rpmlint warns for two reasons about post-without-tmpfile-creation:

First that i called tmpfiles_create_package in %pre instead of %post (as that is what's suggested in /usr/lib/rpm/macros.d/macros.systemd from systemd-rpm-macros-257-9.el10_0.1.noarch).

Second because that macro expansion does not match "systemd-tmpfiles --create .* pkgname" although that might also be somewhat handy since that means i don't get a pre-with-tmpfile-creation warning as well.

In my example i can't think of a reason that tmpfiles_create_package has to go in one or the other so if the example in macros.systemd is ill advised please let me know and i'll file a bug against systemd as well.

In any case i think rpmlint/checks/TmpFilesCheck.py should recognise the expansion of tmpfiles_create_package, perhaps in addition to tmpfiles_create but that macro is deprecated according to /usr/lib/rpm/macros.d/macros.systemd.

Version-Release number of selected component (if applicable):
rpmlint-2.7.0-3.el10_1.noarch

How reproducible:
always

Steps to Reproduce:
Call rpmlint on binary package created according to the example above the macro definition of %tmpfiles_create_package().

Actual results:
Warning about post-without-tmpfile-creation...

Expected results:
No warnings.

Additional info:


Note You need to log in before you can comment on or make changes to this bug.