During Image Mode fixes in [bind 
package](https://gitlab.com/redhat/centos-stream/rpms/bind/-/merge_requests/69),
 I have realized I have to duplicate the same information both in RPM spec and 
in tmpfiles config snippet. But I failed to find a good way to either generate 
rpm %files section during the build from tmpfiles.d. Or other way around, 
generate tmpfiles config snippet from rpm specified information.

I think there should be only one place, which should define what permissions, 
owner and group should have. There is also a special case for symlinks. It 
would be great to have ability to define symlink target. My idea was this:

I have already defined what is inside /var for my package. I should be able to 
recreate any missing empty directories from the information already present in 
rpm. That is doable, although I have seen only tmpfiles config files used for 
it. But that needs a different format in extra file. It seems to me both need 
to be kept in sync, but one cannot be derived from the other one. I think that 
is unfortunate.

I there a way to generate list of files, but including also %ghost, %doc and 
%attr macros parsed? I tried to find additional info about supported format of 
%files -f <file>, but that does not seem to be documented at places I tried.

I think the only thing missing in current rpm is ability to define symlink 
target. Then I could generate ``bind.tmpfiles.d`` in [linked MR 
69](https://gitlab.com/redhat/centos-stream/rpms/bind/-/merge_requests/69).

Is there a known alternative approach, how to keep list of files and 
permissions only in one place. Without a need to keep two definitions of the 
same files in two formats and places?



-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/4264
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/repo-discussions/[email protected]>
_______________________________________________
Rpm-maint mailing list
[email protected]
https://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to