[Rpm-maint] [rpm-software-management/rpm] Add a man page for RPM dependency generators (PR #3957)

Panu Matilainen notifications at github.com
Tue Sep 23 08:19:14 UTC 2025


@pmatilai commented on this pull request.



> +%__NAME_magic
+%__NAME_exclude_path
+%__NAME_exclude_magic
+```
+
+The values of these macros represent the inclusion and exclusion rules. They are
+macro-expanded on use and then interpreted as extended regular expressions (RE).
+Matching is inclusive unless changed by _flags_ (see below): If the path, magic
+or both match, the file is said to _have_ the attribute in question, unless
+there is a matching exclusion rule (also inclusive by default) or a flag that
+prevents the match.
+
+The path REs are matched against the packaged path, that is, without the
+*%buildroot* prefix (for example, _/bin/bash_). The magic REs are matched
+against the result of *magic*(5) classification and possibly the *FILECLASS* tag
+stored in the package (see *--fileclass* in *rpm*(8) for details).

BTW one important piece of info to bring over from the original (but feel free to reword if needed):
"To get compatible results with rpm, use `file -z -e tokens <file>` when determining appropriate file attribute magic REs."

Without that info, creating magic REs is a very hit-and-miss process.

Similarly I think we should mention `file --mime <file>` for determining mime REs.

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

Message ID: <rpm-software-management/rpm/pull/3957/review/3256806218 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20250923/788d0c7d/attachment-0001.htm>


More information about the Rpm-maint mailing list