4f0c496
%if 0%{?rhel}
4f0c496
Name: rhel-system-roles
4f0c496
%else
4f0c496
Name: linux-system-roles
4f0c496
%endif
4f0c496
Summary: Set of interfaces for unified system management
4f0c496
Version: 1.0
1add951
Release: 7%{?dist}
4f0c496
4f0c496
#Group: Development/Libraries
4f0c496
License: GPLv3+ and MIT and BSD
4f0c496
%if 0%{?rhel}
4f0c496
%global rolealtprefix linux-system-roles.
4f0c496
%endif
4f0c496
%global roleprefix %{name}.
4f0c496
fadab11
#%%global commit0 fe8bb81966b60fa8979f3816a12b0c7120d71140
fadab11
#%%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
4f0c496
%global rolename0 kdump
fadab11
%global version0 1.0.0
4f0c496
eb5bc48
%global commit1 611754bcc79783d026177c79a796c6d6343d1be5
eb5bc48
%global shortcommit1 %(c=%{commit1}; echo ${c:0:7})
4f0c496
%global rolename1 postfix
eb5bc48
#%%global version1 0.1
4f0c496
fadab11
#%%global commit2 6dd057aa434a31cb6ee67d02967362f9131e0c50
fadab11
#%%global shortcommit2 %(c=%{commit2}; echo ${c:0:7})
4f0c496
%global rolename2 selinux
fadab11
%global version2 1.0.0
4f0c496
fadab11
#%%global commit3 33a1a8c349de10d6281ed83d4c791e9177d7a141
fadab11
#%%global shortcommit3 %(c=%{commit3}; echo ${c:0:7})
4f0c496
%global rolename3 timesync
fadab11
%global version3 1.0.0
4f0c496
451d940
%global commit5 64b2d76de74df2d480394d02aae204beda4d9257
4f0c496
%global shortcommit5 %(c=%{commit5}; echo ${c:0:7})
4f0c496
%global rolename5 network
fadab11
#%%global version5 1.0.0
4f0c496
4f0c496
Source: https://github.com/linux-system-roles/%{rolename0}/archive/%{version0}.tar.gz#/%{rolename0}-%{version0}.tar.gz
eb5bc48
Source1: https://github.com/linux-system-roles/%{rolename1}/archive/%{commit1}.tar.gz#/%{rolename1}-%{shortcommit1}.tar.gz
fadab11
Source2: https://github.com/linux-system-roles/%{rolename2}/archive/%{version2}.tar.gz#/%{rolename2}-%{version2}.tar.gz
4f0c496
Source3: https://github.com/linux-system-roles/%{rolename3}/archive/%{version3}.tar.gz#/%{rolename3}-%{version3}.tar.gz
4f0c496
Source5: https://github.com/linux-system-roles/%{rolename5}/archive/%{commit5}.tar.gz#/%{rolename5}-%{shortcommit5}.tar.gz
4f0c496
451d940
# 2018-10-23: Submitted upstream: https://github.com/linux-system-roles/timesync/pull/25
4f0c496
Source6: timesync-playbook.yml
4f0c496
Source7: timesync-pool-playbook.yml
4f0c496
451d940
# 2018-10-23: Submitted upstream
4f0c496
Source8: md2html.sh
4f0c496
4f0c496
%if "%{roleprefix}" != "linux-system-roles."
4f0c496
Patch1: rhel-system-roles-%{rolename1}-prefix.diff
4f0c496
Patch2: rhel-system-roles-%{rolename2}-prefix.diff
4f0c496
Patch3: rhel-system-roles-%{rolename3}-prefix.diff
4f0c496
Patch5: rhel-system-roles-%{rolename5}-prefix.diff
4f0c496
%endif
4f0c496
81cf710
# Not suitable for upstream, since the files need to be executable there
4f0c496
Patch52: network-permissions.diff
4f0c496
4f0c496
Url: https://github.com/linux-system-roles/
4f0c496
BuildArch: noarch
4f0c496
4f0c496
BuildRequires: asciidoc
4f0c496
BuildRequires: pandoc
4f0c496
BuildRequires: highlight
4f0c496
fadab11
Obsoletes: rhel-system-roles-techpreview < 1.0-3
fadab11
4f0c496
%description
4f0c496
Collection of Ansible roles and modules that provide a stable and
4f0c496
consistent configuration interface for managing multiple versions
4f0c496
of Red Hat Enterprise Linux.
4f0c496
4f0c496
4f0c496
%prep
4f0c496
%setup -qc -a1 -a2 -a3 -a5
4f0c496
cd %{rolename0}-%{version0}
4f0c496
#kdump patches here if necessary
4f0c496
cd ..
eb5bc48
cd %{rolename1}-%{commit1}
4f0c496
%if "%{roleprefix}" != "linux-system-roles."
4f0c496
%patch1 -p1
4f0c496
%endif
4f0c496
cd ..
fadab11
cd %{rolename2}-%{version2}
4f0c496
%if "%{roleprefix}" != "linux-system-roles."
4f0c496
%patch2 -p1
4f0c496
%endif
4f0c496
cd ..
4f0c496
cd %{rolename3}-%{version3}
4f0c496
%if "%{roleprefix}" != "linux-system-roles."
4f0c496
%patch3 -p1
4f0c496
%endif
4f0c496
cd ..
4f0c496
cd %{rolename5}-%{commit5}
4f0c496
%if "%{roleprefix}" != "linux-system-roles."
4f0c496
%patch5 -p1
4f0c496
%endif
4f0c496
%patch52 -p1
4f0c496
cd ..
4f0c496
4f0c496
%build
4f0c496
sh %{SOURCE8} \
4f0c496
%{rolename0}-%{version0}/README.md \
eb5bc48
%{rolename1}-%{commit1}/README.md \
fadab11
%{rolename2}-%{version2}/README.md \
4f0c496
%{rolename3}-%{version3}/README.md \
4f0c496
%{rolename5}-%{commit5}/README.md
4f0c496
4f0c496
%install
4f0c496
mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles
4f0c496
4f0c496
cp -pR %{rolename0}-%{version0}      $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}%{rolename0}
eb5bc48
cp -pR %{rolename1}-%{commit1}      $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}%{rolename1}
fadab11
cp -pR %{rolename2}-%{version2}      $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}%{rolename2}
4f0c496
cp -pR %{rolename3}-%{version3}      $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}%{rolename3}
4f0c496
cp -pR %{rolename5}-%{commit5}      $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}%{rolename5}
4f0c496
4f0c496
%if 0%{?rolealtprefix:1}
4f0c496
ln -s    %{roleprefix}%{rolename0}   $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename0}
4f0c496
ln -s    %{roleprefix}%{rolename1}   $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename1}
4f0c496
ln -s    %{roleprefix}%{rolename2}   $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename2}
4f0c496
ln -s    %{roleprefix}%{rolename3}   $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename3}
4f0c496
ln -s    %{roleprefix}%{rolename5}   $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename5}
4f0c496
%endif
4f0c496
4f0c496
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/kdump
4f0c496
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/postfix
4f0c496
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/selinux
4f0c496
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/timesync
4f0c496
install -p -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_pkgdocdir}/timesync/example-timesync-playbook.yml
4f0c496
install -p -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_pkgdocdir}/timesync/example-timesync-pool-playbook.yml
4f0c496
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/network
4f0c496
4f0c496
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}kdump/README.md \
4f0c496
    $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}kdump/README.html \
4f0c496
    $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}kdump/COPYING \
4f0c496
    $RPM_BUILD_ROOT%{_pkgdocdir}/kdump
4f0c496
4f0c496
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}postfix/README.md \
4f0c496
    $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}postfix/README.html \
4f0c496
    $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}postfix/COPYING \
4f0c496
    $RPM_BUILD_ROOT%{_pkgdocdir}/postfix
4f0c496
4f0c496
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}selinux/README.md \
4f0c496
    $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}selinux/README.html \
4f0c496
    $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}selinux/COPYING \
4f0c496
    $RPM_BUILD_ROOT%{_pkgdocdir}/selinux
4f0c496
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}selinux/selinux-playbook.yml \
4f0c496
    $RPM_BUILD_ROOT%{_pkgdocdir}/selinux/example-selinux-playbook.yml
4f0c496
4f0c496
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}timesync/README.md \
4f0c496
    $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}timesync/README.html \
4f0c496
    $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}timesync/COPYING \
4f0c496
    $RPM_BUILD_ROOT%{_pkgdocdir}/timesync
4f0c496
4f0c496
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/README.md \
4f0c496
    $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/README.html \
4f0c496
    $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/LICENSE \
4f0c496
    $RPM_BUILD_ROOT%{_pkgdocdir}/network
4f0c496
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/bond-with-vlan.yml \
4f0c496
    $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-bond-with-vlan-playbook.yml
4f0c496
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/bridge-with-vlan.yml \
4f0c496
    $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-bridge-with-vlan-playbook.yml
4f0c496
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/eth-simple-auto.yml \
4f0c496
    $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-eth-simple-auto-playbook.yml
4f0c496
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/eth-with-vlan.yml \
4f0c496
    $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-eth-with-vlan-playbook.yml
4f0c496
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/infiniband.yml \
4f0c496
    $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-infiniband-playbook.yml
4f0c496
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/macvlan.yml \
4f0c496
    $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-macvlan-playbook.yml
4f0c496
cp $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/remove-profile.yml \
4f0c496
    $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-remove-profile-playbook.yml
4f0c496
rm $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/remove-profile.yml
4f0c496
cp $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/down-profile.yml \
4f0c496
    $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-down-profile-playbook.yml
4f0c496
rm $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/down-profile.yml
4f0c496
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/inventory \
4f0c496
   $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-inventory
4f0c496
4f0c496
rm $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/.gitignore
4f0c496
rm $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/tests/.gitignore
4f0c496
rm $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/roles
4f0c496
rmdir $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples
4f0c496
4f0c496
%files
4f0c496
%dir %{_datadir}/ansible
4f0c496
%dir %{_datadir}/ansible/roles
4f0c496
%if 0%{?rolealtprefix:1}
4f0c496
%{_datadir}/ansible/roles/%{rolealtprefix}kdump
4f0c496
%{_datadir}/ansible/roles/%{rolealtprefix}postfix
4f0c496
%{_datadir}/ansible/roles/%{rolealtprefix}selinux
4f0c496
%{_datadir}/ansible/roles/%{rolealtprefix}timesync
4f0c496
%{_datadir}/ansible/roles/%{rolealtprefix}network
4f0c496
%endif
4f0c496
%{_datadir}/ansible/roles/%{roleprefix}kdump
4f0c496
%{_datadir}/ansible/roles/%{roleprefix}postfix
4f0c496
%{_datadir}/ansible/roles/%{roleprefix}selinux
4f0c496
%{_datadir}/ansible/roles/%{roleprefix}timesync
4f0c496
%{_datadir}/ansible/roles/%{roleprefix}network
4f0c496
%doc %{_pkgdocdir}/*/example-*-playbook.yml
4f0c496
%doc %{_pkgdocdir}/network/example-inventory
4f0c496
%doc %{_pkgdocdir}/*/README.md
4f0c496
%doc %{_pkgdocdir}/*/README.html
4f0c496
%doc %{_datadir}/ansible/roles/%{roleprefix}kdump/README.md
4f0c496
%doc %{_datadir}/ansible/roles/%{roleprefix}postfix/README.md
4f0c496
%doc %{_datadir}/ansible/roles/%{roleprefix}selinux/README.md
4f0c496
%doc %{_datadir}/ansible/roles/%{roleprefix}timesync/README.md
4f0c496
%doc %{_datadir}/ansible/roles/%{roleprefix}network/README.md
4f0c496
%doc %{_datadir}/ansible/roles/%{roleprefix}kdump/README.html
4f0c496
%doc %{_datadir}/ansible/roles/%{roleprefix}postfix/README.html
4f0c496
%doc %{_datadir}/ansible/roles/%{roleprefix}selinux/README.html
4f0c496
%doc %{_datadir}/ansible/roles/%{roleprefix}timesync/README.html
4f0c496
%doc %{_datadir}/ansible/roles/%{roleprefix}network/README.html
4f0c496
4f0c496
4f0c496
%license %{_pkgdocdir}/*/COPYING
4f0c496
%license %{_pkgdocdir}/*/LICENSE
4f0c496
%license %{_datadir}/ansible/roles/%{roleprefix}kdump/COPYING
4f0c496
%license %{_datadir}/ansible/roles/%{roleprefix}postfix/COPYING
4f0c496
%license %{_datadir}/ansible/roles/%{roleprefix}selinux/COPYING
4f0c496
%license %{_datadir}/ansible/roles/%{roleprefix}timesync/COPYING
4f0c496
%license %{_datadir}/ansible/roles/%{roleprefix}network/LICENSE
4f0c496
4f0c496
%changelog
1add951
* Wed Oct 24 2018 Pavel Cahyna <pcahyna@redhat.com> - 1.0-7
1add951
- Update to latest versions of selinux, kdump and timesync.
eb5bc48
- Update to the latest revision of postfix, fixes README markup
1add951
- Add Obsoletes for the -techpreview subpackage introduced mistakenly in 1.0-1
1add951
451d940
* Tue Oct 23 2018 Till Maas <opensource@till.name> - 1.0-6
451d940
- Update Network system role to latest commit to include Fedora 29 fixes
451d940
- Update example timesync example playbooks
451d940
- Add comments about upstream status
451d940
4f0c496
* Tue Aug 14 2018 Pavel Cahyna <pcahyna@redhat.com> - 1.0-4
4f0c496
- Format the READMEs as html, by vdolezal, with changes to use highlight
4f0c496
  (source-highlight does not understand YAML)
4f0c496
4f0c496
* Thu Aug  9 2018 Pavel Cahyna <pcahyna@redhat.com> - 1.0-3
4f0c496
- Rebase the network role to the last revision (d866422).
4f0c496
  Many improvements to tests, introduces autodetection of the current provider
4f0c496
  and defaults to using profile name as interface name.
4f0c496
- Rebase the selinux, timesync and kdump roles to their 1.0rc1 versions.
4f0c496
  Many changes to the role interfaces to make them more consistent
4f0c496
  and conforming to Ansible best practices.
4f0c496
- Update the description.
4f0c496
4f0c496
* Fri May 11 2018 Pavel Cahyna <pcahyna@redhat.com> - 0.6-4
4f0c496
- Fix complaints about /usr/bin/python during RPM build by making the affected scripts non-exec
4f0c496
- Fix merge botch
4f0c496
4f0c496
* Mon Mar 19 2018 Troy Dawson <tdawson@redhat.com> - 0.6-3.1
4f0c496
- Use -a (after cd) instead of -b (before cd) in %setup
4f0c496
4f0c496
* Wed Mar 14 2018 Pavel Cahyna <pcahyna@redhat.com> - 0.6-3
4f0c496
- Minor corrections of the previous change by Till Maas.
4f0c496
4f0c496
* Fri Mar  9 2018 Pavel Cahyna <pcahyna@redhat.com> - 0.6-2
4f0c496
- Document network role options: static routes, ethernet, dns
4f0c496
  Upstream PR#36, bz1550128, documents bz1487747 and bz1478576
4f0c496
4f0c496
* Tue Jan 30 2018 Pavel Cahyna <pcahyna@redhat.com> - 0.6-1
4f0c496
- Drop hard dependency on ansible (#1525655), patch from Yaakov Selkowitz
4f0c496
- Update the network role to version 0.4, solves bz#1487747, bz#1478576
4f0c496
4f0c496
* Tue Dec 19 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.5-3
4f0c496
- kdump: fix the wrong conditional for ssh checking and improve test (PR#10)
4f0c496
4f0c496
* Tue Nov 07 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.5-2
4f0c496
- kdump: add ssh support. upstream PR#9, rhbz1478707
4f0c496
4f0c496
* Tue Oct 03 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.5-1
4f0c496
- SELinux: fix policy reload when SELinux is disabled on CentOS/RHEL 6
4f0c496
  (bz#1493574)
4f0c496
- network: update to b856c7481bf5274d419f71fb62029ea0044b3ec1 :
4f0c496
  makes the network role idempotent (bz#1476053) and fixes manual
4f0c496
  network provider selection (bz#1485074).
4f0c496
4f0c496
* Mon Aug 28 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.4-1
4f0c496
- network: update to b9b6f0a7969e400d8d6ba0ac97f69593aa1e8fa5:
4f0c496
  ensure that state:absent followed by state:up works (bz#1478910), and change
4f0c496
  the example IP adresses to the IANA-assigned ones.
4f0c496
- SELinux: fix the case when SELinux is disabled (bz#1479546).
4f0c496
4f0c496
* Tue Aug 8 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.3-2
4f0c496
- We can't change directories to symlinks (rpm bug #447156) so keep the old
4f0c496
  names and create the new names as symlinks.
4f0c496
4f0c496
* Tue Aug 8 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.3-1
4f0c496
- Change the prefix to linux-system-roles., keeping compatibility
4f0c496
  symlinks.
4f0c496
- Update the network role to dace7654feb7b5629ded0734c598e087c2713265:
4f0c496
  adds InfiniBand support and other fixes.
4f0c496
- Drop a patch included upstream.
4f0c496
4f0c496
* Mon Jun 26 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.2-2
4f0c496
- Leave a copy of README and COPYING in every role's directory, as suggested by T. Bowling.
4f0c496
- Move the network example inventory to the documentation directory together.
4f0c496
  with the example playbooks and delete the now empty "examples" directory.
4f0c496
- Use proper reserved (by RFC 7042) MAC addresses in the network examples.
4f0c496
4f0c496
* Tue Jun 6 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.2-1
4f0c496
- Update the networking role to version 0.2 (#1459203)
4f0c496
- Version every role and the package separately. They live in separate repos
4f0c496
  and upstream release tags are not coordinated.
4f0c496
4f0c496
* Mon May 22 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.1-2
4f0c496
- Prefix the roles in examples and documentation with rhel-system-roles.
4f0c496
4f0c496
* Thu May 18 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.1-1
4f0c496
- Update to 0.1 (first upstream release).
4f0c496
- Remove the tuned role, it is not ready yet.
4f0c496
- Move the example playbooks to /usr/share/doc/rhel-system-roles/$SUBSYSTEM
4f0c496
  directly to get rid of an extra directory.
4f0c496
- Depend on ansible.
4f0c496
4f0c496
* Thu May 4 2017  Pavel Cahyna <pcahyna@redhat.com> - 0-0.1.20170504
4f0c496
- Initial release.
4f0c496
- kdump r. fe8bb81966b60fa8979f3816a12b0c7120d71140
4f0c496
- postfix r. 43eec5668425d295dce3801216c19b1916df1f9b
4f0c496
- selinux r. 1e4a21f929455e5e76dda0b12867abaa63795ae7
4f0c496
- timesync r. 33a1a8c349de10d6281ed83d4c791e9177d7a141
4f0c496
- tuned r. 2e8bb068b9815bc84287e9b6dc6177295ffdf38b
4f0c496
- network r. 03ff040df78a14409a0d89eba1235b8f3e50a750
4f0c496