Some of the `*.attr` files we bundle with rpm are using incorrect regex 
escaping of the dot character. Since the macro expansion engine itself 
recognizes the backslash escape character, it strips its occurrences from the 
macro body upon expansion. To fix that, every backslash needs to be escaped 
itself.

Example of a bad escape from 
[fileattrs/elf.attr](https://github.com/rpm-software-management/rpm/blob/master/fileattrs/elf.attr):
`%__elf_exclude_path     ^/lib/modules/.*\.ko?(\.[[:alnum:]]*)$`

Example of a good escape from 
[fileattrs/sysusers.attr](https://github.com/rpm-software-management/rpm/blob/master/fileattrs/sysusers.attr):
`%__sysusers_path        ^%{_sysusersdir}/.*\\.conf$`

There was a similar case in the redhat-rpm-config package shipped in 
Fedora/RHEL which is addressed by 
https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/309. I've 
also seen this issue in some other `*.attr` files shipped by other packages, 
specifically in `kmod.attr` so we may want to fix those in their respective 
repos, too.

The original issue was reported via the ticket 
[RHEL-28767](https://issues.redhat.com/browse/RHEL-28767).

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

Message ID: <rpm-software-management/rpm/issues/3...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to