diff --git a/.gitignore b/.gitignore index 02ee5df..db49b37 100644 --- a/.gitignore +++ b/.gitignore @@ -1,19 +1,19 @@ -SOURCES/ansible-sshd-32f9d0dda5a801cbefad09214ec2d88b6838b943.tar.gz -SOURCES/auto-maintenance-4e47b3809a4e6c1dcd9af57fee117d6df0c261ad.tar.gz -SOURCES/certificate-310fc53db04e8d3134524afb7a89b0477a2ffb83.tar.gz -SOURCES/crypto_policies-b2a9857ac661fa32e66666e444b73bfdb34cdf95.tar.gz -SOURCES/ha_cluster-6e1e37f0097db23c8b804e520e272575e9714d5f.tar.gz -SOURCES/kdump-02fc72b482e165472624b2f68eecd2ddce1d93b1.tar.gz -SOURCES/kernel_settings-9373303b98e09ef38df7afc8d06e5e55812096c7.tar.gz -SOURCES/logging-20dd3e5520ca06dcccaa9b3f1fb428d055e0c23f.tar.gz -SOURCES/metrics-384718b020c50ae274230e9dc59fc11620e03537.tar.gz -SOURCES/nbde_client-bef2fad5e365712d1f40e53662490ba2550a253f.tar.gz -SOURCES/nbde_server-c57d0b1f3384c525738fa26ba4bdca485e162567.tar.gz -SOURCES/network-ae2d60a0b204f4a7ba1f27696f11d950dd882fda.tar.gz -SOURCES/postfix-33ca4faa031be745c6d12220aa04caa3a8f9451f.tar.gz -SOURCES/selinux-62ff85a9c605a7c281d4dfb5a047f322245c63b5.tar.gz -SOURCES/ssh-59b9fd7b25607d8bd33bdb082748955f2652846a.tar.gz -SOURCES/storage-b3b456183edb7b8aa6ceff7ce667d8e22009ef6a.tar.gz -SOURCES/timesync-3f69039d5ff986a74ed76bc4419da7b2efb2992a.tar.gz -SOURCES/tlog-2b9e53233ee3a68bdb532e62f289733e436a6106.tar.gz -SOURCES/vpn-5f6cb73e6753fbdbb219b7d3079f0378b2d3bdb3.tar.gz +SOURCES/ansible-sshd-v0.13.0.tar.gz +SOURCES/auto-maintenance-ec364d2e0bd422b69f34871a1188114f368097a0.tar.gz +SOURCES/certificate-1.0.3.tar.gz +SOURCES/crypto_policies-1.0.1.tar.gz +SOURCES/ha_cluster-1.1.1.tar.gz +SOURCES/kdump-1.0.5.tar.gz +SOURCES/kernel_settings-1.0.3.tar.gz +SOURCES/logging-1.3.1.tar.gz +SOURCES/metrics-1.2.3.tar.gz +SOURCES/nbde_client-1.0.4.tar.gz +SOURCES/nbde_server-1.0.3.tar.gz +SOURCES/network-85b75b6c8cca13f40fb356540bd8aa05d5ca820f.tar.gz +SOURCES/postfix-1.0.0.tar.gz +SOURCES/selinux-1.2.3.tar.gz +SOURCES/ssh-1.0.2.tar.gz +SOURCES/storage-1.4.0.tar.gz +SOURCES/timesync-1.5.0.tar.gz +SOURCES/tlog-1.1.1.tar.gz +SOURCES/vpn-1.1.0.tar.gz diff --git a/.rhel-system-roles.metadata b/.rhel-system-roles.metadata index 2279a67..1ea50d2 100644 --- a/.rhel-system-roles.metadata +++ b/.rhel-system-roles.metadata @@ -1,19 +1,19 @@ -7ea8f4a254259f270e1a442266e2f9cccbfc9527 SOURCES/ansible-sshd-32f9d0dda5a801cbefad09214ec2d88b6838b943.tar.gz -30f17b25c0971959762153c9509f0e5a25332d05 SOURCES/auto-maintenance-4e47b3809a4e6c1dcd9af57fee117d6df0c261ad.tar.gz -b2c6c7aa236c68467b9c6bd927486ec70314ad22 SOURCES/certificate-310fc53db04e8d3134524afb7a89b0477a2ffb83.tar.gz -97e0808740e2baf13be0ef18690baf861c218f99 SOURCES/crypto_policies-b2a9857ac661fa32e66666e444b73bfdb34cdf95.tar.gz -0bba79ccdfb382b085e43cdf912e8e1a0083ef46 SOURCES/ha_cluster-6e1e37f0097db23c8b804e520e272575e9714d5f.tar.gz -98c00815b05eed770357f2b826f1c6872446e2c9 SOURCES/kdump-02fc72b482e165472624b2f68eecd2ddce1d93b1.tar.gz -c48b0b3d74e703ad20c1fe9319e160760c352194 SOURCES/kernel_settings-9373303b98e09ef38df7afc8d06e5e55812096c7.tar.gz -305709bbbf763b72a7f41660c45735f6a35f2141 SOURCES/logging-20dd3e5520ca06dcccaa9b3f1fb428d055e0c23f.tar.gz -f1081bd6ed2b2cdcd075dd8a21977ce379400749 SOURCES/metrics-384718b020c50ae274230e9dc59fc11620e03537.tar.gz -80b6ad0a68c665861010fb6bcb73b83a4a852941 SOURCES/nbde_client-bef2fad5e365712d1f40e53662490ba2550a253f.tar.gz -59710a98972e9291bdcad9e319a012e825b85f72 SOURCES/nbde_server-c57d0b1f3384c525738fa26ba4bdca485e162567.tar.gz -0b902fe56d422deca254e130edddbb0ece485455 SOURCES/network-ae2d60a0b204f4a7ba1f27696f11d950dd882fda.tar.gz -ecc61b1c95deb554d3a68805f810902091697067 SOURCES/postfix-33ca4faa031be745c6d12220aa04caa3a8f9451f.tar.gz -2f7df1ba7ffc418f6d2be0d35fa0c0eec884455a SOURCES/selinux-62ff85a9c605a7c281d4dfb5a047f322245c63b5.tar.gz -ddd13f13bdb64bc2bd9e217df17fd225539c6441 SOURCES/ssh-59b9fd7b25607d8bd33bdb082748955f2652846a.tar.gz -4f0adb91f09f6b09f57729f617f26672318eaef0 SOURCES/storage-b3b456183edb7b8aa6ceff7ce667d8e22009ef6a.tar.gz -5c47063743e17680fc69ceaf5d1986e722021240 SOURCES/timesync-3f69039d5ff986a74ed76bc4419da7b2efb2992a.tar.gz -5a35e486a7fe9defa773a66fa1ac7b600b3745d2 SOURCES/tlog-2b9e53233ee3a68bdb532e62f289733e436a6106.tar.gz -a94ae620a6bfdf917102d1e64639d57cbd8e619e SOURCES/vpn-5f6cb73e6753fbdbb219b7d3079f0378b2d3bdb3.tar.gz +41850638f6dcd1b79a92a61daa61b68e313fb760 SOURCES/ansible-sshd-v0.13.0.tar.gz +bfd618e94056a68c75de22dfcde7b29445850176 SOURCES/auto-maintenance-ec364d2e0bd422b69f34871a1188114f368097a0.tar.gz +52de0ee4ae3784111f905df683012259bd11b4ee SOURCES/certificate-1.0.3.tar.gz +9d04c3eb41c9018797c7edc0749ab7e244b685c4 SOURCES/crypto_policies-1.0.1.tar.gz +1ff5e45549592e4ef4c18eda94de5d21344ddf19 SOURCES/ha_cluster-1.1.1.tar.gz +ccf003fe359ed688cd38d909405a0cb814dafee1 SOURCES/kdump-1.0.5.tar.gz +6716372376dbca7bd109ccb03d0e417d24ec0b74 SOURCES/kernel_settings-1.0.3.tar.gz +ca44c608c488094199de433ab60ae1141e51599a SOURCES/logging-1.3.1.tar.gz +df2381874aac396f5143cb6ed3e35daabaae4c4b SOURCES/metrics-1.2.3.tar.gz +996c1d4f2763d8ae7fe2973d48429b6fcb88d387 SOURCES/nbde_client-1.0.4.tar.gz +717e2cd6ba686ffa7abdf885e04e185d09b03d88 SOURCES/nbde_server-1.0.3.tar.gz +3b1e7807374e724e2c389a1265c3ecc905578680 SOURCES/network-85b75b6c8cca13f40fb356540bd8aa05d5ca820f.tar.gz +609a44ce29de5786eaab9b8b4f0c3b0f2586a525 SOURCES/postfix-1.0.0.tar.gz +9e060a747dda947cc87321bf472db9ecf37912a0 SOURCES/selinux-1.2.3.tar.gz +3fa7da323b39ad6555d5232aa5fb4b7dd173c01c SOURCES/ssh-1.0.2.tar.gz +c29af72feb6d37b5ad12273f759bdf447550ad54 SOURCES/storage-1.4.0.tar.gz +ba01428f0812c5780d8c1c839d53f2b76ff4e9d6 SOURCES/timesync-1.5.0.tar.gz +67a587cad5bf1716931556844a592ea348a70e5c SOURCES/tlog-1.1.1.tar.gz +bc5dd7ab2f823c394a14c1074c709497c3d31a74 SOURCES/vpn-1.1.0.tar.gz diff --git a/SPECS/rhel-system-roles.spec b/SPECS/rhel-system-roles.spec index 704b5a6..64cbdb5 100644 --- a/SPECS/rhel-system-roles.spec +++ b/SPECS/rhel-system-roles.spec @@ -6,15 +6,23 @@ %bcond_with collection_artifact +%if 0%{?fedora} || 0%{?rhel} >= 8 +%bcond_without html +%else +# pandoc is not supported in rhel 7 and older, +# which is needed for converting .md to .html. +%bcond_with html +%endif + %if 0%{?rhel} Name: rhel-system-roles %else Name: linux-system-roles %endif -Url: https://github.com/linux-system-roles/ +Url: https://github.com/linux-system-roles Summary: Set of interfaces for unified system management -Version: 1.2.2 -Release: 3%{?dist} +Version: 1.4.0 +Release: 1%{?dist} #Group: Development/Libraries License: GPLv3+ and MIT and BSD @@ -47,7 +55,15 @@ License: GPLv3+ and MIT and BSD # Not used (yet). Could be made to point to AH in RHEL - but what about CentOS Stream? #%%{!?ansible_collection_url:%%define ansible_collection_url() https://galaxy.ansible.com/%%{collection_namespace}/%%{collection_name}} -%{!?ansible_collection_files:%define ansible_collection_files %{_datadir}/ansible/collections/ansible_collections/%{collection_namespace}} +%if 0%{?fedora} || 0%{?rhel} >= 8 +%{!?ansible_collection_files:%define ansible_collection_files %{_datadir}/ansible/collections/ansible_collections/%{collection_namespace}/} +%else +# Define undefined macro using "!?ansible_collection_files:..." does not work for rhel-7 +%if %{?ansible_collection_files:0}%{!?ansible_collection_files:1} +%define ansible_collection_files %{_datadir}/ansible/collections/ansible_collections/%{collection_namespace}/ +%endif +%endif + %if %{with ansible} BuildRequires: ansible >= 2.9.10 @@ -56,7 +72,7 @@ BuildRequires: ansible >= 2.9.10 %if %{without ansible} # We don't have ansible-galaxy. # Simply copy everything instead of galaxy-installing the built artifact. -%define ansible_collection_build_install() tar -cf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{version}.tar.gz .; mkdir -p %{buildroot}%{ansible_collection_files}/%{collection_name}; (cd %{buildroot}%{ansible_collection_files}/%{collection_name}; tar -xf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{version}.tar.gz) +%define ansible_collection_build_install() tar -cf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{version}.tar.gz .; mkdir -p %{buildroot}%{ansible_collection_files}%{collection_name}; (cd %{buildroot}%{ansible_collection_files}%{collection_name}; tar -xf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{version}.tar.gz) %else %define ansible_collection_build_install() ansible-galaxy collection build; ansible-galaxy collection install -n -p %{buildroot}%{_datadir}/ansible/collections %{collection_namespace}-%{collection_name}-%{version}.tar.gz %endif @@ -76,7 +92,7 @@ BuildRequires: ansible >= 2.9.10 %%global shortcommit%{1} %%(c=%%{ref%{1}}; echo ${c:0:7}) %%global extractdir%{1} %%{expand:%%getarchivedir %{1}} %%{!?repo%{1}:%%global repo%{1} %%{rolename%{1}}} -%%global archiveurl%{1} %%{?forgeorg%{1}}%%{!?forgeorg%{1}:%%{url}}%%{repo%{1}}/archive/%%{ref%{1}}/%%{repo%{1}}-%%{ref%{1}}.tar.gz +%%global archiveurl%{1} %%{?forgeorg%{1}}%%{!?forgeorg%{1}:%%{url}}/%%{repo%{1}}/archive/%%{ref%{1}}/%%{repo%{1}}-%%{ref%{1}}.tar.gz %%global rolenames %%{?rolenames} %%{rolename%{1}} %%global roletodir%{1} [%{rolename%{1}}]="%{extractdir%{1}}" %%global rolestodir %%{?rolestodir} %{roletodir%{1}} @@ -85,83 +101,88 @@ BuildRequires: ansible >= 2.9.10 %define deftag() %{expand:%%global ref%{1} %{2} %%global extractdir%{1} %%{expand:%%getarchivedir %{1}} %%{!?repo%{1}:%%global repo%{1} %%{rolename%{1}}} -%%global archiveurl%{1} %%{?forgeorg%{1}}%%{!?forgeorg%{1}:%%{url}}%%{repo%{1}}/archive/%%{ref%{1}}/%%{repo%{1}}-%%{ref%{1}}.tar.gz +%%global archiveurl%{1} %%{?forgeorg%{1}}%%{!?forgeorg%{1}:%%{url}}/%%{repo%{1}}/archive/%%{ref%{1}}/%%{repo%{1}}-%%{ref%{1}}.tar.gz %%global rolenames %%{?rolenames} %%{rolename%{1}} %%global roletodir%{1} [%{rolename%{1}}]="%{extractdir%{1}}" %%global rolestodir %%{?rolestodir} %%{roletodir%{1}} } -%defcommit 1 33ca4faa031be745c6d12220aa04caa3a8f9451f +#%%defcommit 1 14314822b529520ac12964e0d2938c4bb18ab895 %global rolename1 postfix -#%%deftag 1 0.1 +%deftag 1 1.0.0 -%defcommit 2 62ff85a9c605a7c281d4dfb5a047f322245c63b5 +#%%defcommit 2 9fe6eb36772e83b53dcfb8ceb73608fd4f72eeda %global rolename2 selinux -#%%deftag 2 1.1.1 +%deftag 2 1.2.3 -%defcommit 3 3f69039d5ff986a74ed76bc4419da7b2efb2992a +#%%defcommit 3 8db8f9ed9088432bac7abf68f1b284475a3baa38 %global rolename3 timesync -#%%deftag 3 1.0.0 +%deftag 3 1.5.0 -%defcommit 4 02fc72b482e165472624b2f68eecd2ddce1d93b1 +#%%defcommit 4 02fc72b482e165472624b2f68eecd2ddce1d93b1 %global rolename4 kdump -#%%deftag 4 1.0.0 +%deftag 4 1.0.5 -%defcommit 5 ae2d60a0b204f4a7ba1f27696f11d950dd882fda +%defcommit 5 85b75b6c8cca13f40fb356540bd8aa05d5ca820f %global rolename5 network #%%deftag 5 1.0.0 -%defcommit 6 b3b456183edb7b8aa6ceff7ce667d8e22009ef6a +#%%defcommit 6 b3b456183edb7b8aa6ceff7ce667d8e22009ef6a %global rolename6 storage -#%%deftag 6 1.2.2 +%deftag 6 1.4.0 -%defcommit 7 384718b020c50ae274230e9dc59fc11620e03537 +#%%defcommit 7 0673d842fb32c437501e2aada2e38921da98e115 %global rolename7 metrics -#%%deftag 7 0.1.0 +%deftag 7 1.2.3 -%defcommit 8 2b9e53233ee3a68bdb532e62f289733e436a6106 +#%%defcommit 8 2b9e53233ee3a68bdb532e62f289733e436a6106 %global rolename8 tlog -#%%deftag 8 1.1.0 +%deftag 8 1.1.1 -%defcommit 9 9373303b98e09ef38df7afc8d06e5e55812096c7 +#%%defcommit 9 9373303b98e09ef38df7afc8d06e5e55812096c7 %global rolename9 kernel_settings -#%%deftag 9 1.0.1 +%deftag 9 1.0.3 -%defcommit 10 20dd3e5520ca06dcccaa9b3f1fb428d055e0c23f +#%%defcommit 10 20dd3e5520ca06dcccaa9b3f1fb428d055e0c23f %global rolename10 logging -#%%deftag 10 0.2.0 +%deftag 10 1.3.1 -%defcommit 11 c57d0b1f3384c525738fa26ba4bdca485e162567 +#%%defcommit 11 c57d0b1f3384c525738fa26ba4bdca485e162567 %global rolename11 nbde_server -#%%deftag 11 1.0.1 +%deftag 11 1.0.3 -%defcommit 12 bef2fad5e365712d1f40e53662490ba2550a253f +#%%defcommit 12 bef2fad5e365712d1f40e53662490ba2550a253f %global rolename12 nbde_client -#%%deftag 12 1.0.1 +%deftag 12 1.0.4 -%defcommit 13 310fc53db04e8d3134524afb7a89b0477a2ffb83 +#%%defcommit 13 310fc53db04e8d3134524afb7a89b0477a2ffb83 %global rolename13 certificate -#%%deftag 13 1.0.1 +%deftag 13 1.0.3 -%defcommit 14 b2a9857ac661fa32e66666e444b73bfdb34cdf95 +#%%defcommit 14 b2a9857ac661fa32e66666e444b73bfdb34cdf95 %global rolename14 crypto_policies +%deftag 14 1.0.1 -%global forgeorg15 https://github.com/willshersystems/ +%global forgeorg15 https://github.com/willshersystems %global repo15 ansible-sshd %global rolename15 sshd -%defcommit 15 32f9d0dda5a801cbefad09214ec2d88b6838b943 +#%%defcommit 15 32f9d0dda5a801cbefad09214ec2d88b6838b943 +%deftag 15 v0.13.0 -%defcommit 16 59b9fd7b25607d8bd33bdb082748955f2652846a +#%%defcommit 16 59b9fd7b25607d8bd33bdb082748955f2652846a %global rolename16 ssh +%deftag 16 1.0.2 -%defcommit 17 6e1e37f0097db23c8b804e520e272575e9714d5f +#%%defcommit 17 f901239cb91878719c9e7461760ef8d4789d626d %global rolename17 ha_cluster +%deftag 17 1.1.1 -%defcommit 18 5f6cb73e6753fbdbb219b7d3079f0378b2d3bdb3 +#%%defcommit 18 5f6cb73e6753fbdbb219b7d3079f0378b2d3bdb3 %global rolename18 vpn +%deftag 18 1.1.0 -%global mainid 4e47b3809a4e6c1dcd9af57fee117d6df0c261ad -Source: %{url}auto-maintenance/archive/%{mainid}/auto-maintenance-%{mainid}.tar.gz +%global mainid ec364d2e0bd422b69f34871a1188114f368097a0 +Source: %{url}/auto-maintenance/archive/%{mainid}/auto-maintenance-%{mainid}.tar.gz Source1: %{archiveurl1} Source2: %{archiveurl2} Source3: %{archiveurl3} @@ -190,6 +211,7 @@ Patch52: network-disable-bondtests.diff BuildArch: noarch +%if %{with html} # Requirements for md2html.sh to build the documentation %if 0%{?fedora} || 0%{?rhel} >= 9 BuildRequires: rubygem-kramdown-parser-gfm @@ -198,14 +220,21 @@ BuildRequires: pandoc BuildRequires: asciidoc BuildRequires: highlight %endif +%endif # Requirements for galaxy_transform.py BuildRequires: python3 -BuildRequires: python3-six +%if 0%{?fedora} || 0%{?rhel} >= 8 BuildRequires: python3dist(ruamel.yaml) Requires: python3-jmespath Requires: python3-netaddr +%else +BuildRequires: python3-ruamel-yaml + +Requires: python-jmespath +Requires: python-netaddr +%endif Obsoletes: rhel-system-roles-techpreview < 1.0-3 @@ -242,7 +271,17 @@ Collection artifact for %{name}. This package contains %{collection_namespace}-% declare -A ROLESTODIR=(%{rolestodir}) for rolename in %{rolenames}; do - mv "${ROLESTODIR[${rolename}]}" ${rolename} + dir_from_archive="${ROLESTODIR[${rolename}]}" + if [ ! -d "$dir_from_archive" ]; then + # ansible-sshd uses tags like vX.Y.Z + # using the github archive/ link with a tag like this strips + # the leading v from the tag used to construct the directory + # name in the archive + if [[ "$dir_from_archive" =~ %{repo15}-v([0-9]+[.][0-9]+.*) ]]; then + dir_from_archive="%{repo15}-${BASH_REMATCH[1]}" + fi + fi + mv "$dir_from_archive" ${rolename} done cd %{rolename5} @@ -274,17 +313,24 @@ done rm %{rolename5}/tests/modules rm %{rolename5}/tests/module_utils rm %{rolename5}/tests/playbooks/roles +# Drop network/{scripts/print_all_options.py,tests/ensure_provider_tests.py} +# from rpm. These 2 files fail in brp-python-bytecompile due to f-strings +# when python2 is default python. +rm %{rolename5}/scripts/print_all_options.py +rm %{rolename5}/tests/ensure_provider_tests.py # transform ambiguous #!/usr/bin/env python shebangs to python3 to stop brp-mangle-shebangs complaining find -type f -executable -name '*.py' -exec \ sed -i -r -e '1s@^(#! */usr/bin/env python)(\s|$)@#\13\2@' '{}' + %build +%if %{with html} readmes="" for role in %{rolenames}; do readmes="${readmes} $role/README.md" done sh md2html.sh $readmes +%endif mkdir .collections %if 0%{?rhel} @@ -362,8 +408,11 @@ rm $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/examples/roles for role in %{rolenames}; do mkdir -p "$RPM_BUILD_ROOT%{_pkgdocdir}/$role" cp -p "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/README.md" \ - "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/README.html" \ "$RPM_BUILD_ROOT%{_pkgdocdir}/$role" +%if %{with html} + cp -p "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/README.html" \ + "$RPM_BUILD_ROOT%{_pkgdocdir}/$role" +%endif if [ -f "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/COPYING" ]; then cp -p "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/COPYING" \ "$RPM_BUILD_ROOT%{_pkglicensedir}/$role.COPYING" @@ -413,23 +462,25 @@ popd mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/collection mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/collection/roles -cp -p %{buildroot}%{ansible_collection_files}/%{collection_name}/README.md \ +cp -p %{buildroot}%{ansible_collection_files}%{collection_name}/README.md \ $RPM_BUILD_ROOT%{_pkgdocdir}/collection for rolename in %{rolenames}; do - if [ -f %{buildroot}%{ansible_collection_files}/%{collection_name}/roles/${rolename}/README.md ]; then + if [ -f %{buildroot}%{ansible_collection_files}%{collection_name}/roles/${rolename}/README.md ]; then mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/collection/roles/${rolename} - cp -p %{buildroot}%{ansible_collection_files}/%{collection_name}/roles/${rolename}/README.md \ + cp -p %{buildroot}%{ansible_collection_files}%{collection_name}/roles/${rolename}/README.md \ $RPM_BUILD_ROOT%{_pkgdocdir}/collection/roles/${rolename} fi done +%if %{with html} # converting README.md to README.html for collection in $RPM_BUILD_ROOT%{_pkgdocdir}/collection readmes="$RPM_BUILD_ROOT%{_pkgdocdir}/collection/README.md" for role in %{rolenames}; do readmes="${readmes} $RPM_BUILD_ROOT%{_pkgdocdir}/collection/roles/${role}/README.md" done sh md2html.sh $readmes +%endif %if %{with collection_artifact} # Copy collection artifact to /usr/share/ansible/collections/ for collection-artifact @@ -466,9 +517,9 @@ format_item_for_files() { else echo "%doc $files_item" fi - elif [[ "$item" == */COPYING* ]] || [[ "$item" == */LICENSE* ]]; then - echo "%%license $files_item" - else + elif [[ "$item" != */COPYING* ]] && [[ "$item" != */LICENSE* ]]; then + # Avoid dynamically using the license macro since the license macro + # is replaced with the value of License directive in the older rpmbuild. echo "$files_item" fi } @@ -484,8 +535,8 @@ echo '%dir %{_datadir}/ansible/roles' >> $files_section echo '%dir %{installbase}' >> $files_section %endif echo '%dir %{ansible_collection_files}' >> $files_section -echo '%dir %{ansible_collection_files}/%{collection_name}' >> $files_section -find %{buildroot}%{ansible_collection_files}/%{collection_name} -mindepth 1 -maxdepth 1 | \ +echo '%dir %{ansible_collection_files}%{collection_name}' >> $files_section +find %{buildroot}%{ansible_collection_files}%{collection_name} -mindepth 1 -maxdepth 1 | \ while read item; do if [[ "$item" == */roles ]]; then format_item_for_files "$item" true >> $files_section @@ -530,11 +581,31 @@ fi %files -f files_section.txt %{_pkgdocdir}/*/README.md +%if %{with html} %{_pkgdocdir}/*/README.html +%endif %{_pkgdocdir}/*/example-* %{_pkgdocdir}/collection/roles/*/README.md +%if %{with html} %{_pkgdocdir}/collection/roles/*/README.html +%endif %license %{_pkglicensedir}/* +%license %{installbase}/*/COPYING* +%license %{installbase}/*/LICENSE* +%license %{ansible_collection_files}/%{collection_name}/COPYING* +%license %{ansible_collection_files}/%{collection_name}/LICENSE* +%if 0%{?rhel} < 8 +# Needs to list excluded files in this hardcoded style since when +# format_item_for_files is executed, brp-python-bytecompile is not +# executed yet. +%exclude %{installbase}/*/*.py? +%exclude %{installbase}/*/*/*.py? +%exclude %{installbase}/*/*/*/*.py? +%exclude %{installbase}/*/*/*/*/*.py? +%exclude %{ansible_collection_files}/%{collection_name}/*/*/*.py? +%exclude %{ansible_collection_files}/%{collection_name}/*/*/*/*.py? +%exclude %{ansible_collection_files}/%{collection_name}/*/*/*/*/*.py? +%endif %if %{with collection_artifact} %files collection-artifact @@ -542,7 +613,63 @@ fi %endif %changelog -* Wed Jun 16 2021 Rich Megginson - 1.2.2-3 +* Thu Jul 8 2021 Rich Megginson - 1.4.0-1 +- storage - LVMVDO support + Resolves rhbz#1882475 + Resolves rhbz#1978488 + +* Wed Jun 23 2021 Rich Megginson - 1.3.0-1 +- ha_cluster - add pacemaker resources configuration + Resolves rhbz#1963283 +- ha_cluster - code cleanup + Resolves rhbz#1970666 +- Postfix RHEL system role README.md missing variables under the "Role Variables" section + Resolves rhbz#1961858 +- logging README.html examples are rendered incorrectly + Resolves rhbz#1962374 +- make postfix role idempotent - round 2 + Resolves rhbz#1960375 +- selinux task for semanage says Fedora in name but also runs on RHEL/CentOS 8 + Resolves rhbz#1966681 +- metrics role task to enable logging for targeted hosts not working + Resolves rhbz#1967335 +- network - Add 'auto_gateway' option + Resolves rhbz#1897565 +- network - Only show stderr_lines by default + Resolves rhbz#1970666 +- storage - LVMVDO support + Resolves rhbz#1882475 +- storage - fix several linter issues + Resolves rhbz#1970666 +- ssh - Fix variable precedence when invoked through roles + Resolves rhbz#1966711 +- ssh - Update configuration options list for OpenSSH 8.6 + Resolves rhbz#1970666 +- sshd - Fix variable precedence when invoked through roles + Resolves rhbz#1966711 +- sshd - Update configuration options list for OpenSSH 8.6 + Resolves rhbz#1970666 +- sshd - support for appending a snippet to configuration file + Resolves rhbz#1970642 +- timesync - add NTS support + Resolves rhbz#1970664 +- timesync - rebase to latest + Resolves rhbz#1970666 +- nbde_client - rebase to latest + Resolves rhbz#1970666 + +* Thu Jun 17 2021 Sergei Petrosian - 1.2.3-3 +- Make the ansible_collection_files macro defined in Fedora automatically and + in RHEL manually consistent - having slash at the end to clean double-slashes + +* Wed Jun 16 2021 Sergei Petrosian - 1.2.3-2 +- Remove slash (/) from the end of URLs to improve code readability + +* Wed Jun 16 2021 Noriko Hosoi - 1.2.3-1 +- Add EL 9 support for timesync and network + Resolves rhbz#1952887 + +* Tue Jun 15 2021 Rich Megginson - 1.2.2-3 - Fix HTML rendering of internal links when using pandoc/asciidoc - Uses pandoc gfm instead of markdown_github Resolves rhbz#1962976