package licenses and docs for pcs-web-ui
Pcs-web-ui added a changelog upstream, so I'm adding it downstream as well. It turns out that I forgot to package the readme and license before, so adding them too. For pcs, readme and changelog are installed via automake variable `dist_doc_DATA` [1] which gets automatically converted to its own target ran during `make install`. The target installs it to %docdir/%TARNAME (automake variables). This happens to align with RPM default of %_docdir/%name (spec macros). This is rendered completely useless as these later get replaced by RPM anyway. The path is therefore /usr/share/doc/pcs. RPM %doc directive has two modes. If there is a relative path, the %doc directive runs a script that goes into builddir/BUILD/<Source0> and copies the file to %_docdir. If there is an absolute path, the file is only marked as a doc file in the RPM database. The same goes for %license directive, except for it getting copied to %_defaultlicensedir. [2][3] The problem arises for pcs-web-ui files as they neither come from the pcs tarball nor are to be owned by the pcs package. Additionally, the package name changes for different downstreams. Because the package name changes, it is not desirable to install the files in the upstream Makefile which is not aware of RPM package names. I made a decision to handle file copying entirely in the specfile for these reasons. It seems like for relative paths, RPM searches the Source0 tarball, but ours are located in Source100. Therefore, I explicitly used %_docdir and %_defaultlicensedir in %install and %files. Resolves: RHEL-86233 [1]: https://www.gnu.org/software/automake/manual/html_node/amhello_0027s-Makefile_002eam-Setup-Explained.html [2]: https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/ [3]: https://web.archive.org/web/20160927094629/https://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch09s05s03.html
This commit is contained in:
parent
00950e918d
commit
cf0d6484c8
13
pcs.spec
13
pcs.spec
@ -403,6 +403,15 @@ cd ../%{ui_src_name}
|
||||
mkdir -p %{buildroot}%{_libdir}/%{pcsd_public_dir}/ui/static/media
|
||||
ln -fs /etc/favicon.png %{buildroot}%{_libdir}/%{pcsd_public_dir}/ui/static/media/favicon.png
|
||||
|
||||
# prepare pcs-web-ui files (not needed for pcs as pcs installs them in Makefile)
|
||||
mkdir -p %{buildroot}/%{_defaultlicensedir}/%{name}
|
||||
mv COPYING %{buildroot}/%{_defaultlicensedir}/%{name}/COPYING_WUI.md
|
||||
|
||||
mkdir -p %{buildroot}/%{_docdir}/%{name}
|
||||
mv CHANGELOG.md %{buildroot}/%{_docdir}/%{name}/CHANGELOG_WUI.md
|
||||
mv README.md %{buildroot}/%{_docdir}/%{name}/README_WUI.md
|
||||
|
||||
|
||||
# Install pcs
|
||||
cd ../%{pcs_source_name}
|
||||
%make_install
|
||||
@ -544,9 +553,12 @@ run_all_tests
|
||||
%files
|
||||
%doc CHANGELOG.md
|
||||
%doc README.md
|
||||
%doc %{_docdir}/%{name}/CHANGELOG_WUI.md
|
||||
%doc %{_docdir}/%{name}/README_WUI.md
|
||||
%doc dacite_README.md
|
||||
%license dacite_LICENSE
|
||||
%license COPYING
|
||||
%license %{_defaultlicensedir}/%{name}/COPYING_WUI.md
|
||||
# rubygem licenses
|
||||
%license backports_LICENSE.txt
|
||||
%license base64_LICENSE.txt
|
||||
@ -609,6 +621,7 @@ run_all_tests
|
||||
%license COPYING
|
||||
%license pyagentx_LICENSE.txt
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed May 14 2025 Michal Pospisil <mpospisi@redhat.com> - 0.11.9-3
|
||||
- Rebased pcs to the latest sources (see CHANGELOG.md)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user