From f2c180e3d906ba5ca2ef8587d3b937162a6edf14 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 3 Apr 2024 18:33:39 +0000 Subject: [PATCH] import CS rpm-local-generator-support-1-1.module_el9+862+220991ec --- .gitignore | 0 SOURCES/README.md | 23 +++++++++++++ SPECS/rpm-local-generator-support.spec | 45 ++++++++++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 .gitignore create mode 100644 SOURCES/README.md create mode 100644 SPECS/rpm-local-generator-support.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/SOURCES/README.md b/SOURCES/README.md new file mode 100644 index 0000000..b1410ed --- /dev/null +++ b/SOURCES/README.md @@ -0,0 +1,23 @@ +# rpm-local-generator-support + +This package ships `%{_fileattrsdir}/local_generator.attr` file, which enables +`local_generator` for RPM. This is useful in cases, where package ships +generators and wants to use them internally. In such case, it is possible to +redefine the generator macros: + +~~~ +... snip ... + +Source1: generator.req +BuildRequires: rpm-local-generator-support + +%global __local_generator_requires bash %{SOURCE9}" + +... snip ... +~~~ + +More details about the idea and purpose of this file can be find here: + +https://github.com/rpm-software-management/rpm/issues/782#issuecomment-1747200612 +https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/3MHROKOM53HM6NF7RGGLFBIQFG5IEIQG/ + diff --git a/SPECS/rpm-local-generator-support.spec b/SPECS/rpm-local-generator-support.spec new file mode 100644 index 0000000..b20fcd7 --- /dev/null +++ b/SPECS/rpm-local-generator-support.spec @@ -0,0 +1,45 @@ +Summary: RPM local_generator support +Name: rpm-local-generator-support +Version: 1 +Release: 1%{?dist} + +# It is not really clear if the one empty file shipped by this package is even +# copyrightable. But let's go with GPLv2+ which is the license used by RPM, +# where this file should ideally come from or be replaced by different +# implementation. +# +# The license was discussed in this thread: +# https://lists.fedoraproject.org/archives/list/legal@lists.fedoraproject.org/thread/X6RUQK5R6KIMVIQ6FQPNVGTJJXSNRD4V/ +License: GPLv2+ +URL: https://src.fedoraproject.org/rpms/rpm-local-generator-support +Source1: README.md +BuildArch: noarch + +%description +local_generator.attr file enabling RPM dependency generator to be used on .spec +files, which ships them. + + + +%prep + + +%build + + +%install +install %{SOURCE1} %{basename:%{SOURCE1}} + +install -d %{buildroot}%{_fileattrsdir} +touch %{buildroot}%{_fileattrsdir}/local_generator.attr + + +%files +%doc README.md +%{_fileattrsdir}/local_generator.attr + + + +%changelog +* Fri Oct 06 2023 Vít Ondruch - 1-1 +- Initial version.