jdoss pushed to wireguard-tools (f33). "wg-quick: freebsd: check for
socket using -S, not -f (..more)"
by notificationsï¼ fedoraproject.org
Notification time stamped 2021-04-30 14:40:22 UTC
From 68a90c3dbd63b0e93ccdf3cdbff687ccc91b59ea Mon Sep 17 00:00:00 2001
From: Joe Doss <joe(a)solidadmin.com>
Date: Apr 30 2021 14:36:35 +0000
Subject: wg-quick: freebsd: check for socket using -S, not -f
wg-quick: freebsd: do not assume point-to-point interface flag
wg-quick: freebsd: use ifconfig for determining if interface is up
wg-quick: kill route monitor when loop terminates
---
diff --git a/.gitignore b/.gitignore
index 1c0a7d2..b02f160 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@
/wireguard-tools-1.0.20200827.tar.xz
/wireguard-tools-1.0.20210223.tar.xz
/wireguard-tools-1.0.20210315.tar.xz
+/wireguard-tools-1.0.20210424.tar.xz
diff --git a/sources b/sources
index 7750c6f..6aa618a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (wireguard-tools-1.0.20210315.tar.xz) = 2ebc5e5a248f6b8c19cbb8bcc3c375ad339a16bf27e32346fb7cde21b9cfb1efdf877e0e5ea4a511f7cb69ff184a6731e76492e03cf490f7d49368e7f145b72e
+SHA512 (wireguard-tools-1.0.20210424.tar.xz) = b919c7ce1e8ee8660ccc1490d3dad7817f3d6f0ab79f26866e8ed10d40545a9ddca67959ff6cc84ac36a91683c1f58d274d91d47f40c0b9a7bfee4009dcbbf59
diff --git a/wireguard-tools.spec b/wireguard-tools.spec
index cb09f15..93221df 100644
--- a/wireguard-tools.spec
+++ b/wireguard-tools.spec
@@ -1,5 +1,5 @@
Name: wireguard-tools
-Version: 1.0.20210315
+Version: 1.0.20210424
Release: 1%{?dist}
URL: https://www.wireguard.com/
Summary: Fast, modern, secure VPN tunnel
@@ -57,6 +57,12 @@ WITH_BASHCOMPLETION=yes WITH_WGQUICK=yes WITH_SYSTEMDUNITS=yes -C src
%{_mandir}/man8/wg-quick.8*
%changelog
+* Fri Apr 30 2021 Joe Doss <joe(a)solidadmin.com> - 1.0.20210424-1
+- wg-quick: freebsd: check for socket using -S, not -f
+- wg-quick: freebsd: do not assume point-to-point interface flag
+- wg-quick: freebsd: use ifconfig for determining if interface is up
+- wg-quick: kill route monitor when loop terminates
+
* Mon Mar 15 2021 Joe Doss <joe(a)solidadmin.com> - 1.0.20210315-1
- Makefile: fix version indicator
- wireguard-tools: const correctness
https://src.fedoraproject.org/rpms/wireguard-tools/c/68a90c3dbd63b0e93ccd...
3Â years
jdoss pushed to wireguard-tools (f34). "wg-quick: freebsd: check for
socket using -S, not -f (..more)"
by notificationsï¼ fedoraproject.org
Notification time stamped 2021-04-30 14:39:50 UTC
From 68a90c3dbd63b0e93ccdf3cdbff687ccc91b59ea Mon Sep 17 00:00:00 2001
From: Joe Doss <joe(a)solidadmin.com>
Date: Apr 30 2021 14:36:35 +0000
Subject: wg-quick: freebsd: check for socket using -S, not -f
wg-quick: freebsd: do not assume point-to-point interface flag
wg-quick: freebsd: use ifconfig for determining if interface is up
wg-quick: kill route monitor when loop terminates
---
diff --git a/.gitignore b/.gitignore
index 1c0a7d2..b02f160 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@
/wireguard-tools-1.0.20200827.tar.xz
/wireguard-tools-1.0.20210223.tar.xz
/wireguard-tools-1.0.20210315.tar.xz
+/wireguard-tools-1.0.20210424.tar.xz
diff --git a/sources b/sources
index 7750c6f..6aa618a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (wireguard-tools-1.0.20210315.tar.xz) = 2ebc5e5a248f6b8c19cbb8bcc3c375ad339a16bf27e32346fb7cde21b9cfb1efdf877e0e5ea4a511f7cb69ff184a6731e76492e03cf490f7d49368e7f145b72e
+SHA512 (wireguard-tools-1.0.20210424.tar.xz) = b919c7ce1e8ee8660ccc1490d3dad7817f3d6f0ab79f26866e8ed10d40545a9ddca67959ff6cc84ac36a91683c1f58d274d91d47f40c0b9a7bfee4009dcbbf59
diff --git a/wireguard-tools.spec b/wireguard-tools.spec
index cb09f15..93221df 100644
--- a/wireguard-tools.spec
+++ b/wireguard-tools.spec
@@ -1,5 +1,5 @@
Name: wireguard-tools
-Version: 1.0.20210315
+Version: 1.0.20210424
Release: 1%{?dist}
URL: https://www.wireguard.com/
Summary: Fast, modern, secure VPN tunnel
@@ -57,6 +57,12 @@ WITH_BASHCOMPLETION=yes WITH_WGQUICK=yes WITH_SYSTEMDUNITS=yes -C src
%{_mandir}/man8/wg-quick.8*
%changelog
+* Fri Apr 30 2021 Joe Doss <joe(a)solidadmin.com> - 1.0.20210424-1
+- wg-quick: freebsd: check for socket using -S, not -f
+- wg-quick: freebsd: do not assume point-to-point interface flag
+- wg-quick: freebsd: use ifconfig for determining if interface is up
+- wg-quick: kill route monitor when loop terminates
+
* Mon Mar 15 2021 Joe Doss <joe(a)solidadmin.com> - 1.0.20210315-1
- Makefile: fix version indicator
- wireguard-tools: const correctness
https://src.fedoraproject.org/rpms/wireguard-tools/c/68a90c3dbd63b0e93ccd...
3Â years
jdoss pushed to wireguard-tools (rawhide). "wg-quick: freebsd: check
for socket using -S, not -f (..more)"
by notificationsï¼ fedoraproject.org
Notification time stamped 2021-04-30 14:36:46 UTC
From 68a90c3dbd63b0e93ccdf3cdbff687ccc91b59ea Mon Sep 17 00:00:00 2001
From: Joe Doss <joe(a)solidadmin.com>
Date: Apr 30 2021 14:36:35 +0000
Subject: wg-quick: freebsd: check for socket using -S, not -f
wg-quick: freebsd: do not assume point-to-point interface flag
wg-quick: freebsd: use ifconfig for determining if interface is up
wg-quick: kill route monitor when loop terminates
---
diff --git a/.gitignore b/.gitignore
index 1c0a7d2..b02f160 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@
/wireguard-tools-1.0.20200827.tar.xz
/wireguard-tools-1.0.20210223.tar.xz
/wireguard-tools-1.0.20210315.tar.xz
+/wireguard-tools-1.0.20210424.tar.xz
diff --git a/sources b/sources
index 7750c6f..6aa618a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (wireguard-tools-1.0.20210315.tar.xz) = 2ebc5e5a248f6b8c19cbb8bcc3c375ad339a16bf27e32346fb7cde21b9cfb1efdf877e0e5ea4a511f7cb69ff184a6731e76492e03cf490f7d49368e7f145b72e
+SHA512 (wireguard-tools-1.0.20210424.tar.xz) = b919c7ce1e8ee8660ccc1490d3dad7817f3d6f0ab79f26866e8ed10d40545a9ddca67959ff6cc84ac36a91683c1f58d274d91d47f40c0b9a7bfee4009dcbbf59
diff --git a/wireguard-tools.spec b/wireguard-tools.spec
index cb09f15..93221df 100644
--- a/wireguard-tools.spec
+++ b/wireguard-tools.spec
@@ -1,5 +1,5 @@
Name: wireguard-tools
-Version: 1.0.20210315
+Version: 1.0.20210424
Release: 1%{?dist}
URL: https://www.wireguard.com/
Summary: Fast, modern, secure VPN tunnel
@@ -57,6 +57,12 @@ WITH_BASHCOMPLETION=yes WITH_WGQUICK=yes WITH_SYSTEMDUNITS=yes -C src
%{_mandir}/man8/wg-quick.8*
%changelog
+* Fri Apr 30 2021 Joe Doss <joe(a)solidadmin.com> - 1.0.20210424-1
+- wg-quick: freebsd: check for socket using -S, not -f
+- wg-quick: freebsd: do not assume point-to-point interface flag
+- wg-quick: freebsd: use ifconfig for determining if interface is up
+- wg-quick: kill route monitor when loop terminates
+
* Mon Mar 15 2021 Joe Doss <joe(a)solidadmin.com> - 1.0.20210315-1
- Makefile: fix version indicator
- wireguard-tools: const correctness
https://src.fedoraproject.org/rpms/wireguard-tools/c/68a90c3dbd63b0e93ccd...
3Â years
rmeggins pushed to linux-system-roles (f34). "omit trailing slash
from ansible_collection_files"
by notificationsï¼ fedoraproject.org
Notification time stamped 2021-04-30 14:34:23 UTC
From 63e7be2dbee01001ebd01a2c720ef1f84699adad Mon Sep 17 00:00:00 2001
From: Rich Megginson <rmeggins(a)redhat.com>
Date: Apr 28 2021 14:58:40 +0000
Subject: omit trailing slash from ansible_collection_files
---
diff --git a/linux-system-roles.spec b/linux-system-roles.spec
index d147049..5a11d6a 100644
--- a/linux-system-roles.spec
+++ b/linux-system-roles.spec
@@ -47,7 +47,7 @@ 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}/}
+%{!?ansible_collection_files:%define ansible_collection_files %{_datadir}/ansible/collections/ansible_collections/%{collection_namespace}}
%if %{with ansible}
BuildRequires: ansible >= 2.9.10
@@ -62,7 +62,7 @@ BuildRequires: ansible >= 2.9.10
%if %{without ansible}
# Simply copy everything instead of galaxy-installing the built artifact.
-%define ansible_collection_install() 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_install() 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_install() ansible-galaxy collection install -n -p %{buildroot}%{_datadir}/ansible/collections %{collection_namespace}-%{collection_name}-%{version}.tar.gz
%endif
@@ -431,20 +431,20 @@ 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 \
- %{buildroot}%{ansible_collection_files}%{collection_name}/README.html \
+cp -p %{buildroot}%{ansible_collection_files}/%{collection_name}/README.md \
+ %{buildroot}%{ansible_collection_files}/%{collection_name}/README.html \
$RPM_BUILD_ROOT%{_pkgdocdir}/collection
# no html files in collection directory
-rm -f %{buildroot}%{ansible_collection_files}%{collection_name}/README.html
+rm -f %{buildroot}%{ansible_collection_files}/%{collection_name}/README.html
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 \
- %{buildroot}%{ansible_collection_files}%{collection_name}/roles/${rolename}/README.html \
+ cp -p %{buildroot}%{ansible_collection_files}/%{collection_name}/roles/${rolename}/README.md \
+ %{buildroot}%{ansible_collection_files}/%{collection_name}/roles/${rolename}/README.html \
$RPM_BUILD_ROOT%{_pkgdocdir}/collection/roles/${rolename}
# no html files in collection directory
- rm -f %{buildroot}%{ansible_collection_files}%{collection_name}/roles/${rolename}/README.html
+ rm -f %{buildroot}%{ansible_collection_files}/%{collection_name}/roles/${rolename}/README.html
fi
done
@@ -501,8 +501,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
https://src.fedoraproject.org/rpms/linux-system-roles/c/63e7be2dbee01001e...
3Â years
rmeggins pushed to linux-system-roles (f34). "use correct directory
for collection tarball"
by notificationsï¼ fedoraproject.org
Notification time stamped 2021-04-30 14:34:23 UTC
From 0d4e50e6a7371ff9a7425471211b48cb09659d85 Mon Sep 17 00:00:00 2001
From: Rich Megginson <rmeggins(a)redhat.com>
Date: Apr 28 2021 14:58:40 +0000
Subject: use correct directory for collection tarball
---
diff --git a/linux-system-roles.spec b/linux-system-roles.spec
index 22be3f0..d147049 100644
--- a/linux-system-roles.spec
+++ b/linux-system-roles.spec
@@ -450,10 +450,12 @@ done
%if %{with collection_artifact}
# Copy collection artifact to /usr/share/ansible/collections/ for collection-artifact
+pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
if [ -f %{collection_namespace}-%{collection_name}-%{version}.tar.gz ]; then
mv %{collection_namespace}-%{collection_name}-%{version}.tar.gz \
$RPM_BUILD_ROOT%{_datadir}/ansible/collections/
fi
+popd
%endif
# generate the %files section in the file files_section.txt
https://src.fedoraproject.org/rpms/linux-system-roles/c/0d4e50e6a7371ff9a...
3Â years
rmeggins pushed to linux-system-roles (f34). "add vpn role source
(..more)"
by notificationsï¼ fedoraproject.org
Notification time stamped 2021-04-30 14:34:23 UTC
From b633acca6a98e04e3f13963e2ce3b97716fd3e77 Mon Sep 17 00:00:00 2001
From: Rich Megginson <rmeggins(a)redhat.com>
Date: Apr 28 2021 14:58:40 +0000
Subject: add vpn role source
Related: rhbz#1943679
---
diff --git a/.gitignore b/.gitignore
index 70c1879..8a08a7f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -53,4 +53,5 @@
/selinux-170eff9fd90e481242784b49688d1fe7203c1889.tar.gz
/ssh-54bec0855966cc3eed65b26a7c90962eb103d66d.tar.gz
/tlog-103d3996436c98dccf89e645378e76bd9add2abb.tar.gz
+/vpn-73e8f5e3b514a8e7a3637dc204d5c106adddeea7.tar.gz
/postfix-bbf5784849d362cc3443fde8b09da26ea698a8ce.tar.gz
diff --git a/sources b/sources
index 72e97be..c3f82f1 100644
--- a/sources
+++ b/sources
@@ -16,3 +16,4 @@ SHA512 (ansible-sshd-428d390668077f0baf5e88c5834ee810ae11113c.tar.gz) = 55ce34bb
SHA512 (auto-maintenance-e9e30b03c0fe9387cb0ea8a5e7aac8313de2deef.tar.gz) = b2f623e5982a823bfc11c7f619162ae2c4a03ae0a7ffcbdcb92cb81a5159825f6279c6cb6360ddb187d916280fd57556b1b46557fade1524926f099b532fc05d
SHA512 (ssh-54bec0855966cc3eed65b26a7c90962eb103d66d.tar.gz) = 19c0dcf2eea24a1ff8cbc8795f6f751e8b98927d274a47fca82b06586992140a0cfa892750e935ac159391d2863aee17ed58dec69fae134c842250dea9658f08
SHA512 (ha_cluster-d97f48a21002497e1ac1bd1385841f2939d7b840.tar.gz) = c931ae0e51b32cb002453da6da2ebb37396c70253c40d51800c66fd0b109a4ae37649fbeaaa09533573a9856f582a3b0ff46373bd55c03ebdd7b219af95a0899
+SHA512 (vpn-73e8f5e3b514a8e7a3637dc204d5c106adddeea7.tar.gz) = 266f41983def6bd2bb4940b4f54740f225129229f423ef62c1f625900c7c59407538e41c8cd212be2ea909e8b91b21596e2e871995545685f6233f6d27398416
https://src.fedoraproject.org/rpms/linux-system-roles/c/b633acca6a98e04e3...
3Â years
rmeggins pushed to linux-system-roles (f34). "add vpn role (..more)"
by notificationsï¼ fedoraproject.org
Notification time stamped 2021-04-30 14:34:23 UTC
From 2ff4921f272a393888f37970b423b02e50685e11 Mon Sep 17 00:00:00 2001
From: Rich Megginson <rmeggins(a)redhat.com>
Date: Apr 28 2021 14:58:40 +0000
Subject: add vpn role
Resolves: rhbz#1943679
---
diff --git a/linux-system-roles.spec b/linux-system-roles.spec
index d4d1454..8e4dcfa 100644
--- a/linux-system-roles.spec
+++ b/linux-system-roles.spec
@@ -163,6 +163,9 @@ BuildRequires: ansible >= 2.9.10
%defcommit 17 d97f48a21002497e1ac1bd1385841f2939d7b840
%global rolename17 ha_cluster
+%defcommit 18 73e8f5e3b514a8e7a3637dc204d5c106adddeea7
+%global rolename18 vpn
+
%global mainid e9e30b03c0fe9387cb0ea8a5e7aac8313de2deef
Source: %{url}auto-maintenance/archive/%{mainid}/auto-maintenance-%{mainid}.tar.gz
Source1: %{archiveurl1}
@@ -182,6 +185,7 @@ Source14: %{archiveurl14}
Source15: %{archiveurl15}
Source16: %{archiveurl16}
Source17: %{archiveurl17}
+Source18: %{archiveurl18}
# Script to convert the collection README to Automation Hub.
# Not used on Fedora.
@@ -215,6 +219,7 @@ BuildRequires: python3-six
BuildRequires: python3dist(ruamel.yaml)
Requires: python3-jmespath
+Requires: python3-netaddr
Obsoletes: rhel-system-roles-techpreview < 1.0-3
@@ -247,7 +252,7 @@ Collection artifact for %{name}. This package contains %{collection_namespace}-%
%endif
%prep
-%setup -q -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a8 -a9 -a10 -a11 -a12 -a13 -a14 -a15 -a16 -a17 -n %{getarchivedir 0}
+%setup -q -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a8 -a9 -a10 -a11 -a12 -a13 -a14 -a15 -a16 -a17 -a18 -n %{getarchivedir 0}
declare -A ROLESTODIR=(%{rolestodir})
for rolename in %{rolenames}; do
https://src.fedoraproject.org/rpms/linux-system-roles/c/2ff4921f272a39388...
3Â years
rmeggins pushed to linux-system-roles (f34). "update changelog
(..more)"
by notificationsï¼ fedoraproject.org
Notification time stamped 2021-04-30 14:34:23 UTC
From decbb9d63625516b8e718b8a371de5e6919d86f4 Mon Sep 17 00:00:00 2001
From: Rich Megginson <rmeggins(a)redhat.com>
Date: Apr 28 2021 14:58:40 +0000
Subject: update changelog
Related: rhbz#1943679
---
diff --git a/linux-system-roles.spec b/linux-system-roles.spec
index 8e4dcfa..22be3f0 100644
--- a/linux-system-roles.spec
+++ b/linux-system-roles.spec
@@ -590,6 +590,8 @@ fi
- rebase remaining roles to latest upstream
Resolves rhbz#1937938
- Generate %%files dynamically
+- add vpn role
+ Resolves rhbz#1943679
* Tue Apr 13 2021 Noriko Hosoi <nhosoi(a)redhat.com> - 1.0.1-2
- Adding the -collection-artifact subpackage, enabled using
https://src.fedoraproject.org/rpms/linux-system-roles/c/decbb9d63625516b8...
3Â years
rmeggins pushed to linux-system-roles (f34). "dynamically generate
%files (..more)"
by notificationsï¼ fedoraproject.org
Notification time stamped 2021-04-30 14:34:23 UTC
From dce247f742625a66367d939f70ff503fffe4103f Mon Sep 17 00:00:00 2001
From: Rich Megginson <rmeggins(a)redhat.com>
Date: Apr 28 2021 14:58:40 +0000
Subject: dynamically generate %files
Generate the content of the %files section dynamically.
Related: rhbz#1943679
---
diff --git a/linux-system-roles.spec b/linux-system-roles.spec
index 5277fa5..d5c97e3 100644
--- a/linux-system-roles.spec
+++ b/linux-system-roles.spec
@@ -62,7 +62,7 @@ BuildRequires: ansible >= 2.9.10
%if %{without ansible}
# Simply copy everything instead of galaxy-installing the built artifact.
-%define ansible_collection_install() 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_install() 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_install() ansible-galaxy collection install -n -p %{buildroot}%{_datadir}/ansible/collections %{collection_namespace}-%{collection_name}-%{version}.tar.gz
%endif
@@ -306,24 +306,11 @@ find -type f -executable -name '*.py' -exec \
sed -i -r -e '1s@^(#! */usr/bin/env python)(\s|$)@#\13\2@' '{}' +
%build
-sh md2html.sh \
-%{rolename1}/README.md \
-%{rolename2}/README.md \
-%{rolename3}/README.md \
-%{rolename4}/README.md \
-%{rolename5}/README.md \
-%{rolename6}/README.md \
-%{rolename7}/README.md \
-%{rolename8}/README.md \
-%{rolename9}/README.md \
-%{rolename10}/README.md \
-%{rolename11}/README.md \
-%{rolename12}/README.md \
-%{rolename13}/README.md \
-%{rolename14}/README.md \
-%{rolename15}/README.md \
-%{rolename16}/README.md \
-%{rolename17}/README.md
+readmes=""
+for role in %{rolenames}; do
+ readmes="${readmes} $role/README.md"
+done
+sh md2html.sh $readmes
mkdir .collections
%if 0%{?rhel}
@@ -358,194 +345,69 @@ rm -r .collections/ansible_collections/%{collection_namespace}/%{collection_name
cp -p galaxy.yml lsr_role2collection/.ansible-lint \
.collections/ansible_collections/%{collection_namespace}/%{collection_name}
-pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
+# converting README.md to README.html for collection
+readmes=".collections/ansible_collections/%{collection_namespace}/%{collection_name}/README.md"
+for role in %{rolenames}; do
+ readmes="${readmes} .collections/ansible_collections/%{collection_namespace}/%{collection_name}/roles/$role/README.md"
+done
+sh md2html.sh $readmes
+pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
%ansible_collection_build
-
-# converting README.md to README.html
-sh ../../../../md2html.sh -l \
- README.md \
- roles/%{rolename1}/README.md \
- roles/%{rolename2}/README.md \
- roles/%{rolename3}/README.md \
- roles/%{rolename4}/README.md \
- roles/%{rolename5}/README.md \
- roles/%{rolename6}/README.md \
- roles/%{rolename7}/README.md \
- roles/%{rolename8}/README.md \
- roles/%{rolename9}/README.md \
- roles/%{rolename10}/README.md \
- roles/%{rolename11}/README.md \
- roles/%{rolename12}/README.md \
- roles/%{rolename13}/README.md \
- roles/%{rolename14}/README.md \
- roles/%{rolename15}/README.md \
- roles/%{rolename16}/README.md \
- roles/%{rolename17}/README.md
-
-tar -cf - README.html \
- roles/%{rolename1}/README.html \
- roles/%{rolename2}/README.html \
- roles/%{rolename3}/README.html \
- roles/%{rolename4}/README.html \
- roles/%{rolename5}/README.html \
- roles/%{rolename6}/README.html \
- roles/%{rolename7}/README.html \
- roles/%{rolename8}/README.html \
- roles/%{rolename9}/README.html \
- roles/%{rolename10}/README.html \
- roles/%{rolename11}/README.html \
- roles/%{rolename12}/README.html \
- roles/%{rolename13}/README.html \
- roles/%{rolename14}/README.html \
- roles/%{rolename15}/README.html \
- roles/%{rolename16}/README.html \
- roles/%{rolename17}/README.html | \
- (cd ../../../..; tar -xf -)
popd
%install
mkdir -p $RPM_BUILD_ROOT%{installbase}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles
-cp -pR %{rolename1} $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}%{rolename1}
-cp -pR %{rolename2} $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}%{rolename2}
-cp -pR %{rolename3} $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}%{rolename3}
-cp -pR %{rolename4} $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}%{rolename4}
-cp -pR %{rolename5} $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}%{rolename5}
-cp -pR %{rolename6} $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}%{rolename6}
-cp -pR %{rolename7} $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}%{rolename7}
-cp -pR %{rolename8} $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}%{rolename8}
-cp -pR %{rolename9} $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}%{rolename9}
-cp -pR %{rolename10} $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}%{rolename10}
-cp -pR %{rolename11} $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}%{rolename11}
-cp -pR %{rolename12} $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}%{rolename12}
-cp -pR %{rolename13} $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}%{rolename13}
-cp -pR %{rolename14} $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}%{rolename14}
-cp -pR %{rolename15} $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}%{rolename15}
-cp -pR %{rolename16} $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}%{rolename16}
-cp -pR %{rolename17} $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}%{rolename17}
+for role in %{rolenames}; do
+ cp -pR "$role" "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role"
+done
%if 0%{?rolealtprefix:1}
-ln -s %{rolealtrelpath}%{roleinstprefix}%{rolename1} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename1}
-ln -s %{rolealtrelpath}%{roleinstprefix}%{rolename2} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename2}
-ln -s %{rolealtrelpath}%{roleinstprefix}%{rolename3} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename3}
-ln -s %{rolealtrelpath}%{roleinstprefix}%{rolename4} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename4}
-ln -s %{rolealtrelpath}%{roleinstprefix}%{rolename5} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename5}
-ln -s %{rolealtrelpath}%{roleinstprefix}%{rolename6} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename6}
-ln -s %{rolealtrelpath}%{roleinstprefix}%{rolename7} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename7}
-ln -s %{rolealtrelpath}%{roleinstprefix}%{rolename8} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename8}
-ln -s %{rolealtrelpath}%{roleinstprefix}%{rolename9} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename9}
-ln -s %{rolealtrelpath}%{roleinstprefix}%{rolename10} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename10}
-ln -s %{rolealtrelpath}%{roleinstprefix}%{rolename11} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename11}
-ln -s %{rolealtrelpath}%{roleinstprefix}%{rolename12} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename12}
-ln -s %{rolealtrelpath}%{roleinstprefix}%{rolename13} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename13}
-ln -s %{rolealtrelpath}%{roleinstprefix}%{rolename14} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename14}
-ln -s %{rolealtrelpath}%{roleinstprefix}%{rolename15} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename15}
-ln -s %{rolealtrelpath}%{roleinstprefix}%{rolename16} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename16}
-ln -s %{rolealtrelpath}%{roleinstprefix}%{rolename17} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename17}
+for role in %{rolenames}; do
+ ln -s "%{rolealtrelpath}%{roleinstprefix}$role" "$RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}$role"
+done
%endif
-mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/kdump
-mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/postfix
-mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/selinux
-mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/timesync
-mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/network
-mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/storage
-mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/metrics
-mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/tlog
-mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/kernel_settings
-mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/logging
-mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/nbde_server
-mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/nbde_client
-mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/certificate
-mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/crypto_policies
-mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/sshd
-mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/ssh
-mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/ha_cluster
mkdir -p $RPM_BUILD_ROOT%{_pkglicensedir}
-
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}kdump/README.md \
- $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}kdump/README.html \
- $RPM_BUILD_ROOT%{_pkgdocdir}/kdump
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}kdump/COPYING \
- $RPM_BUILD_ROOT%{_pkglicensedir}/kdump.COPYING
-
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}postfix/README.md \
- $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}postfix/README.html \
- $RPM_BUILD_ROOT%{_pkgdocdir}/postfix
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}postfix/COPYING \
- $RPM_BUILD_ROOT%{_pkglicensedir}/postfix.COPYING
-
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}selinux/README.md \
- $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}selinux/README.html \
- $RPM_BUILD_ROOT%{_pkgdocdir}/selinux
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}selinux/COPYING \
- $RPM_BUILD_ROOT%{_pkglicensedir}/selinux.COPYING
-mv $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}selinux/selinux-playbook.yml \
- $RPM_BUILD_ROOT%{_pkgdocdir}/selinux/example-selinux-playbook.yml
-
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}timesync/README.md \
- $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}timesync/README.html \
- $RPM_BUILD_ROOT%{_pkgdocdir}/timesync
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}timesync/COPYING \
- $RPM_BUILD_ROOT%{_pkglicensedir}/timesync.COPYING
-mv $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}timesync/examples/multiple-ntp-servers.yml \
- $RPM_BUILD_ROOT%{_pkgdocdir}/timesync/example-timesync-playbook.yml
-mv $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}timesync/examples/single-pool.yml \
- $RPM_BUILD_ROOT%{_pkgdocdir}/timesync/example-timesync-pool-playbook.yml
-
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/README.md \
- $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/README.html \
- $RPM_BUILD_ROOT%{_pkgdocdir}/network
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/LICENSE \
- $RPM_BUILD_ROOT%{_pkglicensedir}/network.LICENSE
-mv $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/examples/bond_with_vlan.yml \
- $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-bond_with_vlan-playbook.yml
-mv $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/examples/bridge_with_vlan.yml \
- $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-bridge_with_vlan-playbook.yml
-mv $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/examples/eth_simple_auto.yml \
- $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-eth_simple_auto-playbook.yml
-mv $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/examples/eth_with_vlan.yml \
- $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-eth_with_vlan-playbook.yml
-mv $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/examples/infiniband.yml \
- $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-infiniband-playbook.yml
-mv $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/examples/macvlan.yml \
- $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-macvlan-playbook.yml
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/examples/remove_profile.yml \
- $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-remove_profile-playbook.yml
-rm $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/examples/remove_profile.yml
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/examples/down_profile.yml \
- $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-down_profile-playbook.yml
-rm $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/examples/down_profile.yml
-mv $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/examples/inventory \
- $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-inventory
-mv $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/examples/ethtool_features.yml \
- $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-ethtool_features-playbook.yml
-mv $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/examples/ethtool_features_default.yml \
- $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-ethtool_features_default-playbook.yml
-mv $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/examples/bond_simple.yml \
- $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-bond_simple-playbook.yml
-mv $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/examples/eth_with_802_1x.yml \
- $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-eth_with_802_1x-playbook.yml
-mv $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/examples/wireless_wpa_psk.yml \
- $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-wireless_wpa_psk-playbook.yml
-mv $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/examples/remove+down_profile.yml \
- $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-remove+down_profile-playbook.yml
-mv $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/examples/dummy_simple.yml \
- $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-dummy_simple-playbook.yml
-mv $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/examples/ethtool_coalesce.yml \
- $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-ethtool_coalesce-playbook.yml
-mv $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/examples/team_simple.yml \
- $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-team_simple-playbook.yml
-mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/eth_dns_support.yml \
- $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-eth_dns_support-playbook.yml
-
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}storage/README.md \
- $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}storage/README.html \
- $RPM_BUILD_ROOT%{_pkgdocdir}/storage
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}storage/LICENSE \
- $RPM_BUILD_ROOT%{_pkglicensedir}/storage.LICENSE
+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 [ -f "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/COPYING" ]; then
+ cp -p "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/COPYING" \
+ "$RPM_BUILD_ROOT%{_pkglicensedir}/$role.COPYING"
+ fi
+ if [ -f "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/LICENSE" ]; then
+ cp -p "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/LICENSE" \
+ "$RPM_BUILD_ROOT%{_pkglicensedir}/$role.LICENSE"
+ fi
+ if [ -d "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/examples" ]; then
+ for file in "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/examples/"*.yml ; do
+ basename=$(basename "$file" .yml)
+ newname="$basename"
+ if [[ "$newname" != example-* ]]; then
+ newname="example-$newname"
+ fi
+ if [[ "$newname" != *-playbook ]]; then
+ newname="${newname}-playbook"
+ fi
+ cp "$file" "$RPM_BUILD_ROOT%{_pkgdocdir}/$role/${newname}.yml"
+ rm "$file"
+ done
+ if [ -f "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/examples/inventory" ]; then
+ cp "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/examples/inventory" \
+ "$RPM_BUILD_ROOT%{_pkgdocdir}/$role/example-inventory"
+ rm "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/examples/inventory"
+ fi
+ # special case for network
+ # this will error if the directory is unexpectedly empty
+ rmdir "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/examples"
+ fi
+done
rm $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}*/semaphore
rm -r $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}*/molecule
@@ -553,102 +415,31 @@ rm -r $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}*/molecule
rm -r $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}*/.[A-Za-z]*
rm $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}*/tests/.git*
-rm $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/examples/roles
-rmdir $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/examples
-
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}metrics/README.md \
- $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}metrics/README.html \
- $RPM_BUILD_ROOT%{_pkgdocdir}/metrics
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}metrics/LICENSE \
- $RPM_BUILD_ROOT%{_pkglicensedir}/metrics.LICENSE
-
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}tlog/README.md \
- $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}tlog/README.html \
- $RPM_BUILD_ROOT%{_pkgdocdir}/tlog
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}tlog/LICENSE \
- $RPM_BUILD_ROOT%{_pkglicensedir}/tlog.LICENSE
-
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}kernel_settings/README.md \
- $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}kernel_settings/README.html \
- $RPM_BUILD_ROOT%{_pkgdocdir}/kernel_settings
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}kernel_settings/LICENSE \
- $RPM_BUILD_ROOT%{_pkglicensedir}/kernel_settings.LICENSE
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}kernel_settings/COPYING \
- $RPM_BUILD_ROOT%{_pkglicensedir}/kernel_settings.COPYING
-
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}logging/README.md \
- $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}logging/README.html \
- $RPM_BUILD_ROOT%{_pkgdocdir}/logging
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}logging/LICENSE \
- $RPM_BUILD_ROOT%{_pkglicensedir}/logging.LICENSE
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}logging/COPYING \
- $RPM_BUILD_ROOT%{_pkglicensedir}/logging.COPYING
-
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}nbde_server/README.md \
- $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}nbde_server/README.html \
- $RPM_BUILD_ROOT%{_pkgdocdir}/nbde_server
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}nbde_server/LICENSE \
- $RPM_BUILD_ROOT%{_pkglicensedir}/nbde_server.LICENSE
-
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}nbde_client/README.md \
- $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}nbde_client/README.html \
- $RPM_BUILD_ROOT%{_pkgdocdir}/nbde_client
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}nbde_client/LICENSE \
- $RPM_BUILD_ROOT%{_pkglicensedir}/nbde_client.LICENSE
-
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}certificate/README.md \
- $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}certificate/README.html \
- $RPM_BUILD_ROOT%{_pkgdocdir}/certificate
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}certificate/LICENSE \
- $RPM_BUILD_ROOT%{_pkglicensedir}/certificate.LICENSE
-
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}crypto_policies/README.md \
- $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}crypto_policies/README.html \
- $RPM_BUILD_ROOT%{_pkgdocdir}/crypto_policies
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}crypto_policies/LICENSE \
- $RPM_BUILD_ROOT%{_pkglicensedir}/crypto_policies.LICENSE
-
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}sshd/README.md \
- $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}sshd/README.html \
- $RPM_BUILD_ROOT%{_pkgdocdir}/sshd
-cp -p $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}sshd/LICENSE \
- $RPM_BUILD_ROOT%{_pkglicensedir}/sshd.LICENSE
+# NOTE: sshd/examples/example-root-login.yml is
# referenced in the configuring-openssh-servers-using-the-sshd-system-role documentation module
# must be updated if changing the file path
-mv $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}sshd/examples/example-root-login.yml \
- $RPM_BUILD_ROOT%{_pkgdocdir}/sshd/example-root-login-playbook.yml
-rmdir $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}sshd/examples
-
-cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}ssh/README.md \
- $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}ssh/README.html \
- $RPM_BUILD_ROOT%{_pkgdocdir}/ssh
-cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}ssh/LICENSE \
- $RPM_BUILD_ROOT%{_pkglicensedir}/ssh.LICENSE
-
-cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}ha_cluster/README.md \
- $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}ha_cluster/README.html \
- $RPM_BUILD_ROOT%{_pkgdocdir}/ha_cluster
-cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}ha_cluster/LICENSE \
- $RPM_BUILD_ROOT%{_pkglicensedir}/ha_cluster.LICENSE
-mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}ha_cluster/examples/simple.yml \
- $RPM_BUILD_ROOT%{_pkgdocdir}/ha_cluster/example-simple-playbook.yml
-rmdir $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}ha_cluster/examples
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
%ansible_collection_install
+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 \
- ../../../../README.html $RPM_BUILD_ROOT%{_pkgdocdir}/collection
+ %{buildroot}%{ansible_collection_files}%{collection_name}/README.html \
+ $RPM_BUILD_ROOT%{_pkgdocdir}/collection
+# no html files in collection directory
+rm -f %{buildroot}%{ansible_collection_files}%{collection_name}/README.html
for rolename in %{rolenames}; do
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 \
- ../../../../roles/%{rolename1}/README.html \
+ %{buildroot}%{ansible_collection_files}%{collection_name}/roles/${rolename}/README.html \
$RPM_BUILD_ROOT%{_pkgdocdir}/collection/roles/${rolename}
+ # no html files in collection directory
+ rm -f %{buildroot}%{ansible_collection_files}%{collection_name}/roles/${rolename}/README.html
fi
done
@@ -659,101 +450,101 @@ if [ -f %{collection_namespace}-%{collection_name}-%{version}.tar.gz ]; then
$RPM_BUILD_ROOT%{_datadir}/ansible/collections/
fi
%endif
-popd
-%files
+# generate the %files section in the file files_section.txt
+format_item_for_files() {
+ # $1 is directory or file name in buildroot
+ # $2 - if true, and item is a directory, use %dir
+ local item
+ local files_item
+ item="$1"
+ files_item=${item##"%{buildroot}"}
+ if [ -L "$item" ]; then
+ echo "$files_item"
+ elif [ -d "$item" ]; then
+ if [[ "$item" == */doc* ]]; then
+ echo "%doc $files_item"
+ elif [ "${2:-false}" = true ]; then
+ echo "%dir $files_item"
+ else
+ echo "$files_item"
+ fi
+ elif [[ "$item" == */README.md ]] || [[ "$item" == */README.html ]]; then
+ if [[ "$item" == */private_* ]]; then
+ # mark as regular file, not %doc
+ echo "$files_item"
+ else
+ echo "%doc $files_item"
+ fi
+ elif [[ "$item" == */COPYING* ]] || [[ "$item" == */LICENSE* ]]; then
+ echo "%%license $files_item"
+ else
+ echo "$files_item"
+ fi
+}
+
+files_section=files_section.txt
+rm -f $files_section
+touch $files_section
%if %{without ansible}
-%dir %{_datadir}/ansible
-%dir %{_datadir}/ansible/roles
+echo '%dir %{_datadir}/ansible' >> $files_section
+echo '%dir %{_datadir}/ansible/roles' >> $files_section
%endif
%if "%{installbase}" != "%{_datadir}/ansible/roles"
-%dir %{installbase}
+echo '%dir %{installbase}' >> $files_section
%endif
-%if 0%{?rolealtprefix:1}
-%{_datadir}/ansible/roles/%{rolealtprefix}kdump
-%{_datadir}/ansible/roles/%{rolealtprefix}postfix
-%{_datadir}/ansible/roles/%{rolealtprefix}selinux
-%{_datadir}/ansible/roles/%{rolealtprefix}timesync
-%{_datadir}/ansible/roles/%{rolealtprefix}network
-%{_datadir}/ansible/roles/%{rolealtprefix}storage
-%{_datadir}/ansible/roles/%{rolealtprefix}metrics
-%{_datadir}/ansible/roles/%{rolealtprefix}tlog
-%{_datadir}/ansible/roles/%{rolealtprefix}kernel_settings
-%{_datadir}/ansible/roles/%{rolealtprefix}logging
-%{_datadir}/ansible/roles/%{rolealtprefix}nbde_server
-%{_datadir}/ansible/roles/%{rolealtprefix}nbde_client
-%{_datadir}/ansible/roles/%{rolealtprefix}certificate
-%{_datadir}/ansible/roles/%{rolealtprefix}crypto_policies
-%{_datadir}/ansible/roles/%{rolealtprefix}sshd
-%{_datadir}/ansible/roles/%{rolealtprefix}ssh
-%{_datadir}/ansible/roles/%{rolealtprefix}ha_cluster
-%endif
-%{installbase}/%{roleinstprefix}kdump
-%{installbase}/%{roleinstprefix}postfix
-%{installbase}/%{roleinstprefix}selinux
-%{installbase}/%{roleinstprefix}timesync
-%{installbase}/%{roleinstprefix}network
-%{installbase}/%{roleinstprefix}storage
-%{installbase}/%{roleinstprefix}metrics
-%{installbase}/%{roleinstprefix}tlog
-%{installbase}/%{roleinstprefix}kernel_settings
-%{installbase}/%{roleinstprefix}logging
-%{installbase}/%{roleinstprefix}nbde_server
-%{installbase}/%{roleinstprefix}nbde_client
-%{installbase}/%{roleinstprefix}certificate
-%{installbase}/%{roleinstprefix}crypto_policies
-%{installbase}/%{roleinstprefix}sshd
-%{installbase}/%{roleinstprefix}ssh
-%{installbase}/%{roleinstprefix}ha_cluster
-%{_pkgdocdir}/*/example-*-playbook.yml
-%{_pkgdocdir}/network/example-inventory
+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 | \
+ while read item; do
+ if [[ "$item" == */roles ]]; then
+ format_item_for_files "$item" true >> $files_section
+ find "$item" -mindepth 1 -maxdepth 1 | while read roles_dir; do
+ format_item_for_files "$roles_dir" true >> $files_section
+ find "$roles_dir" -mindepth 1 -maxdepth 1 | while read roles_item; do
+ format_item_for_files "$roles_item" >> $files_section
+ done
+ done
+ else
+ format_item_for_files "$item" >> $files_section
+ fi
+ done
+
+find %{buildroot}%{installbase} -mindepth 1 -maxdepth 1 | \
+ while read item; do
+ if [ -d "$item" ]; then
+ format_item_for_files "$item" true >> $files_section
+ find "$item" -mindepth 1 -maxdepth 1 | while read roles_item; do
+ format_item_for_files "$roles_item" >> $files_section
+ done
+ else
+ format_item_for_files "$item" >> $files_section
+ fi
+ done
+if [ "%{installbase}" != "%{_datadir}/ansible/roles" ]; then
+ find %{buildroot}%{_datadir}/ansible/roles -mindepth 1 -maxdepth 1 | \
+ while read item; do
+ if [ -d "$item" ]; then
+ format_item_for_files "$item" true >> $files_section
+ find "$item" -mindepth 1 -maxdepth 1 | while read roles_item; do
+ format_item_for_files "$roles_item" >> $files_section
+ done
+ else
+ format_item_for_files "$item" >> $files_section
+ fi
+ done
+fi
+# cat files_section.txt
+# done with files_section.txt generation
+
+
+%files -f files_section.txt
%{_pkgdocdir}/*/README.md
%{_pkgdocdir}/*/README.html
+%{_pkgdocdir}/*/example-*
%{_pkgdocdir}/collection/roles/*/README.md
%{_pkgdocdir}/collection/roles/*/README.html
-%doc %{installbase}/%{roleinstprefix}*/README.md
-%doc %{installbase}/%{roleinstprefix}*/README.html
-%doc %{ansible_collection_files}/%{collection_name}/README.md
-%doc %{ansible_collection_files}/%{collection_name}/roles/kdump/README.md
-%doc %{ansible_collection_files}/%{collection_name}/roles/postfix/README.md
-%doc %{ansible_collection_files}/%{collection_name}/roles/selinux/README.md
-%doc %{ansible_collection_files}/%{collection_name}/roles/timesync/README.md
-%doc %{ansible_collection_files}/%{collection_name}/roles/network/README.md
-%doc %{ansible_collection_files}/%{collection_name}/roles/storage/README.md
-%doc %{ansible_collection_files}/%{collection_name}/roles/metrics/README.md
-%doc %{ansible_collection_files}/%{collection_name}/roles/tlog/README.md
-%doc %{ansible_collection_files}/%{collection_name}/roles/kernel_settings/README.md
-%doc %{ansible_collection_files}/%{collection_name}/roles/logging/README.md
-%doc %{ansible_collection_files}/%{collection_name}/roles/nbde_server/README.md
-%doc %{ansible_collection_files}/%{collection_name}/roles/nbde_client/README.md
-%doc %{ansible_collection_files}/%{collection_name}/roles/certificate/README.md
-%doc %{ansible_collection_files}/%{collection_name}/roles/crypto_policies/README.md
-%doc %{ansible_collection_files}/%{collection_name}/roles/sshd/README.md
-%doc %{ansible_collection_files}/%{collection_name}/roles/ssh/README.md
-%doc %{ansible_collection_files}/%{collection_name}/roles/ha_cluster/README.md
-
%license %{_pkglicensedir}/*
-%license %{installbase}/%{roleinstprefix}kdump/COPYING
-%license %{installbase}/%{roleinstprefix}postfix/COPYING
-%license %{installbase}/%{roleinstprefix}selinux/COPYING
-%license %{installbase}/%{roleinstprefix}timesync/COPYING
-%license %{installbase}/%{roleinstprefix}network/LICENSE
-%license %{installbase}/%{roleinstprefix}storage/LICENSE
-%license %{installbase}/%{roleinstprefix}metrics/LICENSE
-%license %{installbase}/%{roleinstprefix}tlog/LICENSE
-%license %{installbase}/%{roleinstprefix}kernel_settings/LICENSE
-%license %{installbase}/%{roleinstprefix}kernel_settings/COPYING
-%license %{installbase}/%{roleinstprefix}logging/LICENSE
-%license %{installbase}/%{roleinstprefix}logging/COPYING
-%license %{installbase}/%{roleinstprefix}nbde_server/LICENSE
-%license %{installbase}/%{roleinstprefix}nbde_client/LICENSE
-%license %{installbase}/%{roleinstprefix}certificate/LICENSE
-%license %{installbase}/%{roleinstprefix}crypto_policies/LICENSE
-%license %{installbase}/%{roleinstprefix}sshd/LICENSE
-%license %{installbase}/%{roleinstprefix}ssh/LICENSE
-%license %{installbase}/%{roleinstprefix}ha_cluster/LICENSE
-
-%{ansible_collection_files}
%if %{with collection_artifact}
%files collection-artifact
https://src.fedoraproject.org/rpms/linux-system-roles/c/dce247f742625a663...
3Â years