[Rpm-maint] [rpm-software-management/rpm] Dynamic spec for main package does not work (Issue #3038)
Vít Ondruch
notifications at github.com
Mon Apr 15 15:12:14 UTC 2024
**Describe the bug**
Trying to reproduce the test case from 5d288554719095d1c67fd87cad65224743152d06 it fails for me:
**To Reproduce**
Steps to reproduce the behavior:
1.
~~~
$ cat SPECS/dynamic.spec
Name: dynamic
Version: 1.0
Release: 1
BuildArch: noarch
%{?!FULLDYNAMIC:
Group: Utilities
License: GPL
Distribution: RPM test suite.
URL: http://rpm.org
Summary: dynamic hello -- hello, world rpm
}
%description
Simple rpm demonstration.
%prep
%setup -q -T -c
%build
echo "Q: Why?\nA: Because we can!" > FAQ
%install
mkdir -p $RPM_BUILD_ROOT/usr/local/bin
echo " " > $RPM_BUILD_ROOT/usr/local/bin/hello
%{?FULLDYNAMIC:
echo "Group: Utilities" >> %{specpartsdir}/mainpkg.specpart
echo "License: GPL" >> %{specpartsdir}/mainpkg.specpart
echo "Distribution: RPM test suite." >> %{specpartsdir}/mainpkg.specpart
echo "URL: http://rpm.org" >> %{specpartsdir}/mainpkg.specpart
echo "Summary: dynamic hello -- hello, world rpm" >> %{specpartsdir}/mainpkg.specpart
}
echo "%package docs" >> %{specpartsdir}/docs.specpart
%{?!FAIL:echo "Summary: Documentation for dynamic spec" >> %{specpartsdir}/docs.specpart}
echo "BuildArch: noarch" >> %{specpartsdir}/docs.specpart
echo "%description docs" >> %{specpartsdir}/docs.specpart
echo "Test for dynamically generated spec files" >> %{specpartsdir}/docs.specpart
echo "%files docs" >> $RPM_SPECPARTS_DIR/docs.specpart
echo "%doc FAQ" >> $RPM_SPECPARTS_DIR/docs.specpart
%files
%defattr(-,root,root)
%attr(0751,root,root) /usr/local/bin/hello
%changelog
* Mon Oct 24 2022 Florian Festi <ffesti at redhat.com>
- create.
~~~
2.
~~~
$ rpmbuild -D "FULLDYNAMIC 1" -ba SPECS/dynamic.spec
error: Summary field must be present in package: (main package)
error: License field must be present in package: (main package)
~~~
**Expected behavior**
The test above passes and can build binary RPMs
**Environment**
- OS / Distribution: Fedora Rawhide
- Version: rpm-4.19.1.1-1.fc40.x86_64
**Additional context**
This makes me wonder if the test case is correct and if it does not test output of other command by accident.
In any case, the test does not try to test the header, it keeps testing the -docs. That does not seem to be right.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3038
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/issues/3038 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240415/9473e9de/attachment-0001.html>
More information about the Rpm-maint
mailing list