Spec URL: https://github.com/mikedep333/linux-system-roles-rpm/blob/master/linux-system-roles.spec SRPM URL: https://s3.amazonaws.com/fedora-misc-packages/linux-system-roles-1.0-7.fc30.src.rpm Description: Collection of Ansible roles and modules that provide a stable and consistent configuration interface for managing multiple versions of Fedora, Red Hat Enterprise Linux & CentOS. Fedora Account System Username: mikedep333
I should mention that this package is already in RHEL, and thus CentOS: https://git.centos.org/summary/rpms!rhel-system-roles.git
This: %license %{_pkgdocdir}/*/COPYING %license %{_pkgdocdir}/*/LICENSE %license %{_datadir}/ansible/roles/%{roleprefix}kdump/COPYING %license %{_datadir}/ansible/roles/%{roleprefix}postfix/COPYING %license %{_datadir}/ansible/roles/%{roleprefix}selinux/COPYING %license %{_datadir}/ansible/roles/%{roleprefix}timesync/COPYING %license %{_datadir}/ansible/roles/%{roleprefix}network/LICENSE ain't gonna work. You'll end up overwriting COPYING and LICENSE files. You need to rename them first then install them. - Don't %doc files already in %{_pkgdocdir} %doc %{_pkgdocdir}/*/example-*-playbook.yml %doc %{_pkgdocdir}/network/example-inventory %doc %{_pkgdocdir}/timesync/example-multiple-ntp-servers.yml %doc %{_pkgdocdir}/timesync/example-single-pool.yml %doc %{_pkgdocdir}/*/README.md %doc %{_pkgdocdir}/*/README.html - This won't work either, it will overwrite the READMEs: %doc %{_datadir}/ansible/roles/%{roleprefix}kdump/README.md %doc %{_datadir}/ansible/roles/%{roleprefix}postfix/README.md %doc %{_datadir}/ansible/roles/%{roleprefix}selinux/README.md %doc %{_datadir}/ansible/roles/%{roleprefix}timesync/README.md %doc %{_datadir}/ansible/roles/%{roleprefix}network/README.md %doc %{_datadir}/ansible/roles/%{roleprefix}kdump/README.html %doc %{_datadir}/ansible/roles/%{roleprefix}postfix/README.html %doc %{_datadir}/ansible/roles/%{roleprefix}selinux/README.html %doc %{_datadir}/ansible/roles/%{roleprefix}timesync/README.html %doc %{_datadir}/ansible/roles/%{roleprefix}network/README.html Also I don't see how this is necessary as you already copied the READMEs in pkgdocdir. You shouldn't copy the licenses in pkgdocdir too.
WRT the entire command by Robert-André Mauchin: Overwriting them? I do not think we are. Are you saying that RPM installs them twice? `rpm -qlp` & `rpm -ql` list them once. I am open to the idea of symlinking them, but I am under the impression that we need to keep the entire per-role file/folder structure intact under {_datadir}/ansible/roles/ to conform to Ansible standards, including the licenses and docs. I would think the link would be under %{_pkgdocdir} and would point to the path under %{_datadir} . Granted, we are getting warnings like: warning: File listed twice: /usr/share/ansible/roles/linux-system-roles.kdump/COPYING I asked on #fedora-devel and was told this is the best approach given the circumstances. These occur because we include the entire directories like: %{_datadir}/ansible/roles/%{roleprefix}kdump I am OK with doing the work to specify the files individually, but I thought it would be better to include the entire dir though. Since the dir belongs to the package really. Thank you for reviewing, -Mike
%doc copies file to /usr/share/doc/%{name}, %license to /usr/share/licenses/%{name} If you %doc or %license different files with the same name, they'll be copied to /usr/share/doc/%{name} or /usr/share/licenses/%{name} but each new files will overwrite the previous one since they have the same name.
I thought that %doc & %license only copy files when you specify relative paths. But these are absolute paths, it doesn't copy them, correct?
I couldn't find anymore info on this. Anyhow, I think specifying %doc here is not needed as files are already in pkgdocdir: %doc %{_pkgdocdir}/*/example-*-playbook.yml %doc %{_pkgdocdir}/network/example-inventory %doc %{_pkgdocdir}/timesync/example-multiple-ntp-servers.yml %doc %{_pkgdocdir}/timesync/example-single-pool.yml %doc %{_pkgdocdir}/*/README.md %doc %{_pkgdocdir}/*/README.html Also these are already in _pkgdocdir, so I don't thenk it is necessary to specix them a second time: %doc %{_datadir}/ansible/roles/%{roleprefix}kdump/README.md %doc %{_datadir}/ansible/roles/%{roleprefix}postfix/README.md %doc %{_datadir}/ansible/roles/%{roleprefix}selinux/README.md %doc %{_datadir}/ansible/roles/%{roleprefix}timesync/README.md %doc %{_datadir}/ansible/roles/%{roleprefix}network/README.md %doc %{_datadir}/ansible/roles/%{roleprefix}kdump/README.html %doc %{_datadir}/ansible/roles/%{roleprefix}postfix/README.html %doc %{_datadir}/ansible/roles/%{roleprefix}selinux/README.html %doc %{_datadir}/ansible/roles/%{roleprefix}timesync/README.html %doc %{_datadir}/ansible/roles/%{roleprefix}network/README.html Instead of COPYING LICERSE and COPYING to pkgdocdir, copy them instead to licensedir: cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}kdump/README.md \ $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}kdump/README.html \ $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}kdump/COPYING \ $RPM_BUILD_ROOT%{_pkgdocdir}/kdump cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}postfix/README.md \ $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}postfix/README.html \ $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}postfix/COPYING \ $RPM_BUILD_ROOT%{_pkgdocdir}/postfix cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}selinux/README.md \ $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}selinux/README.html \ $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}selinux/COPYING \ $RPM_BUILD_ROOT%{_pkgdocdir}/selinux mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}selinux/selinux-playbook.yml \ $RPM_BUILD_ROOT%{_pkgdocdir}/selinux/example-selinux-playbook.yml cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}timesync/README.md \ $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}timesync/README.html \ $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}timesync/COPYING \ $RPM_BUILD_ROOT%{_pkgdocdir}/timesync cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/README.md \ $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/README.html \ $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/LICENSE \ $RPM_BUILD_ROOT%{_pkgdocdir}/network wOwn these directorx [!]: Package requires other packages for directories it uses. Note: No known owner of /usr/share/doc/linux-system-roles/kdump, /usr/share/doc/linux-system-roles/network, /usr/share/doc/linux- system-roles/postfix, /usr/share/doc/linux-system-roles/selinux, /usr/share/doc/linux-system-roles, /usr/share/doc/linux-system- roles/timesync Trx to fix rpmlint error by removing shebangs: linux-system-roles.noarch: W: hidden-file-or-dir /usr/share/ansible/roles/linux-system-roles.network/.travis.yml linux-system-roles.noarch: E: non-executable-script /usr/share/ansible/roles/linux-system-roles.network/library/network_connections.py 644 /usr/bin/python linux-system-roles.noarch: E: non-executable-script /usr/share/ansible/roles/linux-system-roles.network/module_utils/network_lsr/__init__.py 644 /usr/bin/python3 -tt linux-system-roles.noarch: E: non-executable-script /usr/share/ansible/roles/linux-system-roles.network/module_utils/network_lsr/argument_validator.py 644 /usr/bin/python3 -tt linux-system-roles.noarch: E: non-executable-script /usr/share/ansible/roles/linux-system-roles.network/module_utils/network_lsr/utils.py 644 /usr/bin/python3 -tt linux-system-roles.noarch: E: wrong-script-interpreter /usr/share/ansible/roles/linux-system-roles.network/tests/test_network_connections.py /usr/bin/env python linux-system-roles.noarch: E: non-executable-script /usr/share/ansible/roles/linux-system-roles.network/tests/test_network_connections.py 644 /usr/bin/env python linux-system-roles.noarch: E: non-executable-script /usr/share/ansible/roles/linux-system-roles.selinux/library/selogin.py 644 /usr/bin/python linux-system-roles.noarch: E: non-executable-script /usr/share/ansible/roles/linux-system-roles.timesync/library/timesync_provider.sh 644 /bin/bash
> Anyhow, I think specifying %doc here is not needed as files are already in pkgdocdir: > > %doc %{_pkgdocdir}/*/example-*-playbook.yml > %doc %{_pkgdocdir}/network/example-inventory > %doc %{_pkgdocdir}/timesync/example-multiple-ntp-servers.yml > %doc %{_pkgdocdir}/timesync/example-single-pool.yml > %doc %{_pkgdocdir}/*/README.md > %doc %{_pkgdocdir}/*/README.html You're right. `rpm -qd` indicates it is not necessary. I updated the spec file in git. (See the same URL) > Also these are already in _pkgdocdir, so I don't thenk it is necessary to specix them a second time: > > %doc %{_datadir}/ansible/roles/%{roleprefix}kdump/README.md > %doc %{_datadir}/ansible/roles/%{roleprefix}postfix/README.md > %doc %{_datadir}/ansible/roles/%{roleprefix}selinux/README.md > %doc %{_datadir}/ansible/roles/%{roleprefix}timesync/README.md > %doc %{_datadir}/ansible/roles/%{roleprefix}network/README.md > %doc %{_datadir}/ansible/roles/%{roleprefix}kdump/README.html > %doc %{_datadir}/ansible/roles/%{roleprefix}postfix/README.html > %doc %{_datadir}/ansible/roles/%{roleprefix}selinux/README.html > %doc %{_datadir}/ansible/roles/%{roleprefix}timesync/README.html > %doc %{_datadir}/ansible/roles/%{roleprefix}network/README.html We need to specify them a 2nd time for them to be considered documentation files under _datadir though. I still offer to make the _pkgdocdir files symlinks to the the files under _datadir. Same thing for the licenses. > Instead of COPYING LICERSE and COPYING to pkgdocdir, copy them instead to licensedir: > ... Agreed and implemented also. `rpm -qL` indicates that I still need to specify %license > Trx to fix rpmlint error by removing shebangs: > [...] The design of Ansible is that the "Ansible modules" (scripts in "library", etc) never get executed on the management node (where linux-system-roles gets installed.) Instead, Ansible at runtime copies them (via SSH) to the managed nodes, where it changes the permissions and executes them according to the shebang. So the files need to have functional shebangs, but should be non-executable on the disk where the RPM is installed.
Ok, looks good, packagae approved.
(In reply to Robert-André Mauchin from comment #8) > Ok, looks good, packagae approved. Thank you!
(fedscm-admin): The Pagure repository was created at https://src.fedoraproject.org/rpms/linux-system-roles
linux-system-roles-1.0-7.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-33063f5f84
linux-system-roles-1.0-7.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-7da1358300
I built it against rawhide too of course. It should be in that automatically.
linux-system-roles-1.0-7.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-33063f5f84
linux-system-roles-1.0-7.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-7da1358300
(In reply to Michael DePaulo from comment #5) > I thought that %doc & %license only copy files when you specify relative > paths. > > But these are absolute paths, it doesn't copy them, correct? yes. See https://fedoraproject.org/wiki/Packaging:Guidelines#Documentation. "Marking a relative path with %doc in the %files section will cause RPM to copy the referenced file or directory from %_builddir to the proper location for documentation. Files can also be placed in %_pkgdocdir, and the build scripts of the software being packaged may do this automatically when called in %install. However, mixing these methods is problematic and may result in duplicated or conflicting files, so use of %doc with relative paths and installation of files directly into %_pkgdocdir in the same source package is forbidden. "
linux-system-roles-1.0-9.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2019-197c1515f6
linux-system-roles-1.0-9.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-d5f9c35f8c
linux-system-roles-1.0-9.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-197c1515f6
linux-system-roles-1.0-9.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-d5f9c35f8c
linux-system-roles-1.0-9.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.
linux-system-roles-1.0-9.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.