[Rpm-maint] [rpm-software-management/rpm] Add %collect macro for easy file manifest creation (PR #2035)

Panu Matilainen notifications at github.com
Tue Apr 26 07:10:50 UTC 2022


@pmatilai commented on this pull request.



> @@ -1104,6 +1104,24 @@ package or when debugging this package.\
 # arch macro for 64-bit LOONGARCH processors
 %loongarch64	loongarch64
 
+#------------------------------------------------------------------------
+# Use in %install to generate fully-quoted file lists. For example,
+#
+# %install
+# ...
+# %collect [-r <root>] %{name}
+# ...
+# %files -f %{name}.list
+#
+%collect(r:)\
+rm -f %{1}.list \
+find %{buildroot}%{_prefix}/%{-r*} -type f -print | \\\
+perl -pe 's!%{buildroot}!!g;'			    \\\

Ugh, let's not drag Perl into any stock rpm macros, we don't want any new dependencies on the gorilla which we're trying to walk out the door.

Also I don't recall ever coming across a case that would've needed this thing from the dusty 2001 doc, with the weird `%{_prefix}` and all. Which is not to say such cases don't exist, but whether it's common enough to warrant a macro I dunno.

An alternative, probably more robust way to achieve this would be adding a new "raw manifest" flag to `%files` which does not expand lines at all. 

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

Message ID: <rpm-software-management/rpm/pull/2035/review/952868983 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220426/966a0a38/attachment-0001.html>


More information about the Rpm-maint mailing list