Blame SPECS/rhel-system-roles.spec

617c05
Name: rhel-system-roles
617c05
Summary: Set of interfaces for unified system management
617c05
Version: 0.2
617c05
Release: 2%{?dist}
617c05
617c05
#Group: Development/Libraries
617c05
License: GPLv3+ and MIT and BSD
617c05
%global roleauthor rhel-system-roles
617c05
%global roleprefix %{roleauthor}.
617c05
617c05
%global commit0 fe8bb81966b60fa8979f3816a12b0c7120d71140
617c05
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
617c05
%global rolename0 kdump
617c05
%global version0 0.1
617c05
617c05
%global commit1 43eec5668425d295dce3801216c19b1916df1f9b
617c05
%global shortcommit1 %(c=%{commit1}; echo ${c:0:7})
617c05
%global rolename1 postfix
617c05
%global version1 0.1
617c05
617c05
%global commit2 1e4a21f929455e5e76dda0b12867abaa63795ae7
617c05
%global shortcommit2 %(c=%{commit2}; echo ${c:0:7})
617c05
%global rolename2 selinux
617c05
%global version2 0.1
617c05
617c05
%global commit3 33a1a8c349de10d6281ed83d4c791e9177d7a141
617c05
%global shortcommit3 %(c=%{commit3}; echo ${c:0:7})
617c05
%global rolename3 timesync
617c05
%global version3 0.1
617c05
617c05
%global commit5 03ff040df78a14409a0d89eba1235b8f3e50a750
617c05
%global shortcommit5 %(c=%{commit5}; echo ${c:0:7})
617c05
%global rolename5 network
617c05
%global version5 0.2
617c05
617c05
617c05
Source: https://github.com/linux-system-roles/%{rolename0}/archive/%{version0}.tar.gz#/%{rolename0}-%{version0}.tar.gz
617c05
Source1: https://github.com/linux-system-roles/%{rolename1}/archive/%{version1}.tar.gz#/%{rolename1}-%{version1}.tar.gz
617c05
Source2: https://github.com/linux-system-roles/%{rolename2}/archive/%{version2}.tar.gz#/%{rolename2}-%{version2}.tar.gz
617c05
Source3: https://github.com/linux-system-roles/%{rolename3}/archive/%{version3}.tar.gz#/%{rolename3}-%{version3}.tar.gz
617c05
Source5: https://github.com/linux-system-roles/%{rolename5}/archive/%{version5}.tar.gz#/%{rolename5}-%{version5}.tar.gz
617c05
Source6: timesync-playbook.yml
617c05
Source7: timesync-pool-playbook.yml
617c05
617c05
Patch1: rhel-system-roles-%{rolename1}-prefix.diff
617c05
Patch2: rhel-system-roles-%{rolename2}-prefix.diff
617c05
Patch3: rhel-system-roles-%{rolename3}-prefix.diff
617c05
Patch5: rhel-system-roles-%{rolename5}-prefix.diff
617c05
617c05
Patch6: rhel-system-roles-network-rfc7042.diff
617c05
617c05
Url: https://github.com/linux-system-roles/
617c05
BuildArch: noarch
617c05
617c05
Requires: ansible
617c05
617c05
%description
617c05
Collection of interfaces serving as a stable API for the management
617c05
of the RHEL operating system across major releases, implemented
617c05
using Ansible.
617c05
617c05
617c05
%prep
617c05
%setup -qc -b1 -b2 -b3 -b5
617c05
cd %{rolename1}-%{version1}
617c05
%patch1 -p1
617c05
cd ..
617c05
cd %{rolename2}-%{version2}
617c05
%patch2 -p1
617c05
cd ..
617c05
cd %{rolename3}-%{version3}
617c05
%patch3 -p1
617c05
cd ..
617c05
cd %{rolename5}-%{version5}
617c05
%patch5 -p1
617c05
%patch6 -p1
617c05
cd ..
617c05
617c05
%build
617c05
617c05
%install
617c05
mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles
617c05
617c05
cp -pR %{rolename0}-%{version0}      $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}%{rolename0}
617c05
cp -pR %{rolename1}-%{version1}      $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}%{rolename1}
617c05
cp -pR %{rolename2}-%{version2}      $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}%{rolename2}
617c05
cp -pR %{rolename3}-%{version3}      $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}%{rolename3}
617c05
cp -pR %{rolename5}-%{version5}      $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}%{rolename5}
617c05
617c05
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/kdump
617c05
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/postfix
617c05
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/selinux
617c05
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/timesync
617c05
install -p -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_pkgdocdir}/timesync/example-timesync-playbook.yml
617c05
install -p -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_pkgdocdir}/timesync/example-timesync-pool-playbook.yml
617c05
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/network
617c05
617c05
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}kdump/README.md \
617c05
    $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}kdump/COPYING \
617c05
    $RPM_BUILD_ROOT%{_pkgdocdir}/kdump
617c05
617c05
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}postfix/README.md \
617c05
    $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}postfix/COPYING \
617c05
    $RPM_BUILD_ROOT%{_pkgdocdir}/postfix
617c05
617c05
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}selinux/README.md \
617c05
    $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}selinux/COPYING \
617c05
    $RPM_BUILD_ROOT%{_pkgdocdir}/selinux
617c05
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}selinux/selinux-playbook.yml \
617c05
    $RPM_BUILD_ROOT%{_pkgdocdir}/selinux/example-selinux-playbook.yml
617c05
617c05
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}timesync/README.md \
617c05
    $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}timesync/COPYING \
617c05
    $RPM_BUILD_ROOT%{_pkgdocdir}/timesync
617c05
617c05
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/README.md \
617c05
    $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/COPYING \
617c05
    $RPM_BUILD_ROOT%{_pkgdocdir}/network
617c05
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/bond-with-vlan.yml \
617c05
    $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-bond-with-vlan-playbook.yml
617c05
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/bridge-with-vlan.yml \
617c05
    $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-bridge-with-vlan-playbook.yml
617c05
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/eth-simple-auto.yml \
617c05
    $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-eth-simple-auto-playbook.yml
617c05
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/eth-with-vlan.yml \
617c05
    $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-eth-with-vlan-playbook.yml
617c05
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/inventory \
617c05
   $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-inventory
617c05
617c05
rm $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/.gitignore
617c05
rm $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/test/.gitignore
617c05
rm $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/roles/network
617c05
rmdir $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/roles
617c05
rmdir $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples
617c05
617c05
%files
617c05
%{_datadir}/ansible/roles/%{roleprefix}kdump
617c05
%{_datadir}/ansible/roles/%{roleprefix}postfix
617c05
%{_datadir}/ansible/roles/%{roleprefix}selinux
617c05
%{_datadir}/ansible/roles/%{roleprefix}timesync
617c05
%{_datadir}/ansible/roles/%{roleprefix}network
617c05
%doc %{_pkgdocdir}/*/example-*-playbook.yml
617c05
%doc %{_pkgdocdir}/network/example-inventory
617c05
%doc %{_pkgdocdir}/*/README.md
617c05
%doc %{_datadir}/ansible/roles/%{roleprefix}kdump/README.md
617c05
%doc %{_datadir}/ansible/roles/%{roleprefix}postfix/README.md
617c05
%doc %{_datadir}/ansible/roles/%{roleprefix}selinux/README.md
617c05
%doc %{_datadir}/ansible/roles/%{roleprefix}timesync/README.md
617c05
%doc %{_datadir}/ansible/roles/%{roleprefix}network/README.md 
617c05
617c05
617c05
%license %{_pkgdocdir}/*/COPYING
617c05
%license %{_datadir}/ansible/roles/%{roleprefix}kdump/COPYING
617c05
%license %{_datadir}/ansible/roles/%{roleprefix}postfix/COPYING
617c05
%license %{_datadir}/ansible/roles/%{roleprefix}selinux/COPYING
617c05
%license %{_datadir}/ansible/roles/%{roleprefix}timesync/COPYING
617c05
%license %{_datadir}/ansible/roles/%{roleprefix}network/COPYING
617c05
617c05
%changelog
617c05
* Mon Jun 26 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.2-2
617c05
- Leave a copy of README and COPYING in every role's directory, as suggested by T. Bowling.
617c05
- Move the network example inventory to the documentation directory together.
617c05
  with the example playbooks and delete the now empty "examples" directory.
617c05
- Use proper reserved (by RFC 7042) MAC addresses in the network examples.
617c05
617c05
* Tue Jun 6 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.2-1
617c05
- Update the networking role to version 0.2 (#1459203)
617c05
- Version every role and the package separately. They live in separate repos
617c05
  and upstream release tags are not coordinated.
617c05
617c05
* Mon May 22 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.1-2
617c05
- Prefix the roles in examples and documentation with rhel-system-roles.
617c05
617c05
* Thu May 18 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.1-1
617c05
- Update to 0.1 (first upstream release).
617c05
- Remove the tuned role, it is not ready yet.
617c05
- Move the example playbooks to /usr/share/doc/rhel-system-roles/$SUBSYSTEM
617c05
  directly to get rid of an extra directory.
617c05
- Depend on ansible.
617c05
617c05
* Thu May 4 2017  Pavel Cahyna <pcahyna@redhat.com> - 0-0.1.20170504
617c05
- Initial release.
617c05
- kdump r. fe8bb81966b60fa8979f3816a12b0c7120d71140
617c05
- postfix r. 43eec5668425d295dce3801216c19b1916df1f9b
617c05
- selinux r. 1e4a21f929455e5e76dda0b12867abaa63795ae7
617c05
- timesync r. 33a1a8c349de10d6281ed83d4c791e9177d7a141
617c05
- tuned r. 2e8bb068b9815bc84287e9b6dc6177295ffdf38b
617c05
- network r. 03ff040df78a14409a0d89eba1235b8f3e50a750
617c05