Blame SPECS/rhel-system-roles.spec

190903
%if 0%{?rhel}
190903
Name: rhel-system-roles
190903
%else
190903
Name: linux-system-roles
190903
%endif
190903
Summary: Set of interfaces for unified system management
190903
Version: 1.0
190903
Release: 5%{?dist}
190903
190903
#Group: Development/Libraries
190903
License: GPLv3+ and MIT and BSD
190903
%if 0%{?rhel}
190903
%global rolealtprefix linux-system-roles.
190903
%endif
190903
%global roleprefix %{name}.
190903
190903
# For each role, call either defcommit() or deftag(). The other macros
190903
# (%%id and %%shortid) can be then used in the same way in both cases.
190903
# This way  the rest of the spec file des not need to know whether we are
190903
# dealing with a tag or a commit.
190903
%define defcommit() %{expand:%%global id%{1} %{2}
190903
%%global shortid%{1} %%(c=%%{id%{1}}; echo ${c:0:7})
190903
}
190903
190903
%define deftag() %{expand:%%global id%{1} %{2}
190903
%%global shortid%{1} %{2}
190903
}
190903
190903
%defcommit 0 4b40b01079e82b1c5f948ae87d81a135069747cc
190903
%global rolename0 kdump
190903
#%%deftag 0 1.0.0
190903
190903
#%%defcommit 1 43eec5668425d295dce3801216c19b1916df1f9b
190903
%global rolename1 postfix
190903
%deftag 1 0.1
190903
190903
#%%defcommit 2 6dd057aa434a31cb6ee67d02967362f9131e0c50
190903
%global rolename2 selinux
190903
%deftag 2 1.0.0
190903
190903
#%%defcommit 3 33a1a8c349de10d6281ed83d4c791e9177d7a141
190903
%global rolename3 timesync
190903
%deftag 3 1.0.0
190903
190903
%defcommit 5 64b2d76de74df2d480394d02aae204beda4d9257
190903
%global rolename5 network
190903
#%%deftag 5 1.0.0
190903
190903
Source: https://github.com/linux-system-roles/%{rolename0}/archive/%{id0}.tar.gz#/%{rolename0}-%{shortid0}.tar.gz
190903
Source1: https://github.com/linux-system-roles/%{rolename1}/archive/%{id1}.tar.gz#/%{rolename1}-%{shortid1}.tar.gz
190903
Source2: https://github.com/linux-system-roles/%{rolename2}/archive/%{id2}.tar.gz#/%{rolename2}-%{shortid2}.tar.gz
190903
Source3: https://github.com/linux-system-roles/%{rolename3}/archive/%{id3}.tar.gz#/%{rolename3}-%{shortid3}.tar.gz
190903
Source5: https://github.com/linux-system-roles/%{rolename5}/archive/%{id5}.tar.gz#/%{rolename5}-%{shortid5}.tar.gz
190903
190903
Source6: timesync-playbook.yml
190903
Source7: timesync-pool-playbook.yml
190903
190903
Source8: md2html.sh
190903
190903
%if "%{roleprefix}" != "linux-system-roles."
190903
Patch1: rhel-system-roles-%{rolename1}-prefix.diff
190903
Patch2: rhel-system-roles-%{rolename2}-prefix.diff
190903
Patch3: rhel-system-roles-%{rolename3}-prefix.diff
190903
Patch5: rhel-system-roles-%{rolename5}-prefix.diff
190903
%endif
190903
190903
Patch11: rhel-system-roles-postfix-pr5.diff
190903
Patch101: rhel-system-roles-kdump-pr22.diff
190903
190903
Patch52: network-permissions.diff
190903
190903
Url: https://github.com/linux-system-roles/
190903
BuildArch: noarch
190903
190903
BuildRequires: asciidoc
190903
BuildRequires: pandoc
190903
BuildRequires: highlight
190903
190903
Requires: python3-jmespath
190903
190903
Obsoletes: rhel-system-roles-techpreview < 1.0-3
190903
190903
# We need to put %%description within the if block to avoid empty
190903
# lines showing up.
190903
%if 0%{?rhel}
190903
%description
190903
Collection of Ansible roles and modules that provide a stable and
190903
consistent configuration interface for managing multiple versions
190903
of Red Hat Enterprise Linux.
190903
%else
190903
%description
190903
Collection of Ansible roles and modules that provide a stable and
190903
consistent configuration interface for managing multiple versions
190903
of Fedora, Red Hat Enterprise Linux & CentOS.
190903
%endif
190903
190903
%prep
190903
%setup -qc -a1 -a2 -a3 -a5
190903
cd %{rolename0}-%{id0}
190903
%patch101 -p1
190903
cd ..
190903
cd %{rolename1}-%{id1}
190903
%if "%{roleprefix}" != "linux-system-roles."
190903
%patch1 -p1
190903
%endif
190903
%patch11 -p1
190903
cd ..
190903
cd %{rolename2}-%{id2}
190903
%if "%{roleprefix}" != "linux-system-roles."
190903
%patch2 -p1
190903
%endif
190903
cd ..
190903
cd %{rolename3}-%{id3}
190903
%if "%{roleprefix}" != "linux-system-roles."
190903
%patch3 -p1
190903
%endif
190903
cd ..
190903
cd %{rolename5}-%{id5}
190903
%if "%{roleprefix}" != "linux-system-roles."
190903
%patch5 -p1
190903
%endif
190903
%patch52 -p1
190903
cd ..
190903
190903
%build
190903
sh %{SOURCE8} \
190903
%{rolename0}-%{id0}/README.md \
190903
%{rolename1}-%{id1}/README.md \
190903
%{rolename2}-%{id2}/README.md \
190903
%{rolename3}-%{id3}/README.md \
190903
%{rolename5}-%{id5}/README.md
190903
190903
%install
190903
mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles
190903
190903
cp -pR %{rolename0}-%{id0}      $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}%{rolename0}
190903
cp -pR %{rolename1}-%{id1}      $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}%{rolename1}
190903
cp -pR %{rolename2}-%{id2}      $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}%{rolename2}
190903
cp -pR %{rolename3}-%{id3}      $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}%{rolename3}
190903
cp -pR %{rolename5}-%{id5}      $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}%{rolename5}
190903
190903
%if 0%{?rolealtprefix:1}
190903
ln -s    %{roleprefix}%{rolename0}   $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename0}
190903
ln -s    %{roleprefix}%{rolename1}   $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename1}
190903
ln -s    %{roleprefix}%{rolename2}   $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename2}
190903
ln -s    %{roleprefix}%{rolename3}   $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename3}
190903
ln -s    %{roleprefix}%{rolename5}   $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename5}
190903
%endif
190903
190903
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/kdump
190903
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/postfix
190903
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/selinux
190903
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/timesync
190903
install -p -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_pkgdocdir}/timesync/example-timesync-playbook.yml
190903
install -p -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_pkgdocdir}/timesync/example-timesync-pool-playbook.yml
190903
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/network
190903
190903
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}kdump/README.md \
190903
    $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}kdump/README.html \
190903
    $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}kdump/COPYING \
190903
    $RPM_BUILD_ROOT%{_pkgdocdir}/kdump
190903
190903
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}postfix/README.md \
190903
    $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}postfix/README.html \
190903
    $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}postfix/COPYING \
190903
    $RPM_BUILD_ROOT%{_pkgdocdir}/postfix
190903
190903
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}selinux/README.md \
190903
    $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}selinux/README.html \
190903
    $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}selinux/COPYING \
190903
    $RPM_BUILD_ROOT%{_pkgdocdir}/selinux
190903
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}selinux/selinux-playbook.yml \
190903
    $RPM_BUILD_ROOT%{_pkgdocdir}/selinux/example-selinux-playbook.yml
190903
190903
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}timesync/README.md \
190903
    $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}timesync/README.html \
190903
    $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}timesync/COPYING \
190903
    $RPM_BUILD_ROOT%{_pkgdocdir}/timesync
190903
190903
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/README.md \
190903
    $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/README.html \
190903
    $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/LICENSE \
190903
    $RPM_BUILD_ROOT%{_pkgdocdir}/network
190903
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/bond-with-vlan.yml \
190903
    $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-bond-with-vlan-playbook.yml
190903
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/bridge-with-vlan.yml \
190903
    $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-bridge-with-vlan-playbook.yml
190903
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/eth-simple-auto.yml \
190903
    $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-eth-simple-auto-playbook.yml
190903
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/eth-with-vlan.yml \
190903
    $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-eth-with-vlan-playbook.yml
190903
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/infiniband.yml \
190903
    $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-infiniband-playbook.yml
190903
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/macvlan.yml \
190903
    $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-macvlan-playbook.yml
190903
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/remove-profile.yml \
190903
    $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-remove-profile-playbook.yml
190903
rm $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/remove-profile.yml
190903
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/down-profile.yml \
190903
    $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-down-profile-playbook.yml
190903
rm $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/down-profile.yml
190903
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/inventory \
190903
   $RPM_BUILD_ROOT%{_pkgdocdir}/network/example-inventory
190903
190903
rm $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/.gitignore
190903
rm $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/tests/.gitignore
190903
rm $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/roles
190903
rmdir $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples
190903
190903
%files
190903
%dir %{_datadir}/ansible
190903
%dir %{_datadir}/ansible/roles
190903
%if 0%{?rolealtprefix:1}
190903
%{_datadir}/ansible/roles/%{rolealtprefix}kdump
190903
%{_datadir}/ansible/roles/%{rolealtprefix}postfix
190903
%{_datadir}/ansible/roles/%{rolealtprefix}selinux
190903
%{_datadir}/ansible/roles/%{rolealtprefix}timesync
190903
%{_datadir}/ansible/roles/%{rolealtprefix}network
190903
%endif
190903
%{_datadir}/ansible/roles/%{roleprefix}kdump
190903
%{_datadir}/ansible/roles/%{roleprefix}postfix
190903
%{_datadir}/ansible/roles/%{roleprefix}selinux
190903
%{_datadir}/ansible/roles/%{roleprefix}timesync
190903
%{_datadir}/ansible/roles/%{roleprefix}network
190903
%doc %{_pkgdocdir}/*/example-*-playbook.yml
190903
%doc %{_pkgdocdir}/network/example-inventory
190903
%doc %{_pkgdocdir}/*/README.md
190903
%doc %{_pkgdocdir}/*/README.html
190903
%doc %{_datadir}/ansible/roles/%{roleprefix}kdump/README.md
190903
%doc %{_datadir}/ansible/roles/%{roleprefix}postfix/README.md
190903
%doc %{_datadir}/ansible/roles/%{roleprefix}selinux/README.md
190903
%doc %{_datadir}/ansible/roles/%{roleprefix}timesync/README.md
190903
%doc %{_datadir}/ansible/roles/%{roleprefix}network/README.md
190903
%doc %{_datadir}/ansible/roles/%{roleprefix}kdump/README.html
190903
%doc %{_datadir}/ansible/roles/%{roleprefix}postfix/README.html
190903
%doc %{_datadir}/ansible/roles/%{roleprefix}selinux/README.html
190903
%doc %{_datadir}/ansible/roles/%{roleprefix}timesync/README.html
190903
%doc %{_datadir}/ansible/roles/%{roleprefix}network/README.html
190903
190903
190903
%license %{_pkgdocdir}/*/COPYING
190903
%license %{_pkgdocdir}/*/LICENSE
190903
%license %{_datadir}/ansible/roles/%{roleprefix}kdump/COPYING
190903
%license %{_datadir}/ansible/roles/%{roleprefix}postfix/COPYING
190903
%license %{_datadir}/ansible/roles/%{roleprefix}selinux/COPYING
190903
%license %{_datadir}/ansible/roles/%{roleprefix}timesync/COPYING
190903
%license %{_datadir}/ansible/roles/%{roleprefix}network/LICENSE
190903
190903
%changelog
190903
* Sat Jan 12 2019 Pavel Cahyna <pcahyna@redhat.com> - 1.0-5
190903
- spec file improvement: Unify the source macros with deftag() and defcommit()
190903
- Update to upstream released versions and drop unnecessary patches.
190903
- Unify the spec file with Fedora (no functional changes intended).
190903
- Misc spec file comments fixes (by Mike DePaulo)
190903
- Fix rpmlint error by escaping a previous changelog entry with a macro (by Mike DePaulo)
190903
- Comply with Fedora guidelines by always using "cp -p" in %%install (by Mike DePaulo)
190903
- Rebase network role - doc improvements, Fedora 29 and Ansible 2.7 support
190903
- Regenerate network role patch to apply without offset
190903
- Rebase kdump role to fix a forgotten edit, rhbz#1645633
190903
- Update timesync examples: add var prefix (rhbz#1642152), correct role prefix
190903
- Add Obsoletes for the -techpreview subpackage
190903
- Add warnings to role READMEs and other doc updates, rhbz#1616018
190903
- network: split the state setting into state and persistent_state, rhbz#1616014
190903
- depend on python-jmespath as Ansible will not ship it, rhbz#1660559
190903
190903
* Tue Aug 14 2018 Pavel Cahyna <pcahyna@redhat.com> - 1.0-4
190903
- Format the READMEs as html, by vdolezal, with changes to use highlight
190903
  (source-highlight does not understand YAML)
190903
190903
* Thu Aug  9 2018 Pavel Cahyna <pcahyna@redhat.com> - 1.0-3
190903
- Rebase the network role to the last revision (d866422).
190903
  Many improvements to tests, introduces autodetection of the current provider
190903
  and defaults to using profile name as interface name.
190903
- Rebase the selinux, timesync and kdump roles to their 1.0rc1 versions.
190903
  Many changes to the role interfaces to make them more consistent
190903
  and conforming to Ansible best practices.
190903
- Update the description.
190903
190903
* Fri May 11 2018 Pavel Cahyna <pcahyna@redhat.com> - 0.6-4
190903
- Fix complaints about /usr/bin/python during RPM build by making the affected scripts non-exec
190903
- Fix merge botch
190903
190903
* Mon Mar 19 2018 Troy Dawson <tdawson@redhat.com> - 0.6-3.1
190903
- Use -a (after cd) instead of -b (before cd) in %setup
190903
190903
* Wed Mar 14 2018 Pavel Cahyna <pcahyna@redhat.com> - 0.6-3
190903
- Minor corrections of the previous change by Till Maas.
190903
190903
* Fri Mar  9 2018 Pavel Cahyna <pcahyna@redhat.com> - 0.6-2
190903
- Document network role options: static routes, ethernet, dns
190903
  Upstream PR#36, bz1550128, documents bz1487747 and bz1478576
190903
190903
* Tue Jan 30 2018 Pavel Cahyna <pcahyna@redhat.com> - 0.6-1
190903
- Drop hard dependency on ansible (#1525655), patch from Yaakov Selkowitz
190903
- Update the network role to version 0.4, solves bz#1487747, bz#1478576
190903
190903
* Tue Dec 19 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.5-3
190903
- kdump: fix the wrong conditional for ssh checking and improve test (PR#10)
190903
190903
* Tue Nov 07 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.5-2
190903
- kdump: add ssh support. upstream PR#9, rhbz1478707
190903
190903
* Tue Oct 03 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.5-1
190903
- SELinux: fix policy reload when SELinux is disabled on CentOS/RHEL 6
190903
  (bz#1493574)
190903
- network: update to b856c7481bf5274d419f71fb62029ea0044b3ec1 :
190903
  makes the network role idempotent (bz#1476053) and fixes manual
190903
  network provider selection (bz#1485074).
190903
190903
* Mon Aug 28 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.4-1
190903
- network: update to b9b6f0a7969e400d8d6ba0ac97f69593aa1e8fa5:
190903
  ensure that state:absent followed by state:up works (bz#1478910), and change
190903
  the example IP adresses to the IANA-assigned ones.
190903
- SELinux: fix the case when SELinux is disabled (bz#1479546).
190903
190903
* Tue Aug 8 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.3-2
190903
- We can't change directories to symlinks (rpm bug #447156) so keep the old
190903
  names and create the new names as symlinks.
190903
190903
* Tue Aug 8 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.3-1
190903
- Change the prefix to linux-system-roles., keeping compatibility
190903
  symlinks.
190903
- Update the network role to dace7654feb7b5629ded0734c598e087c2713265:
190903
  adds InfiniBand support and other fixes.
190903
- Drop a patch included upstream.
190903
190903
* Mon Jun 26 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.2-2
190903
- Leave a copy of README and COPYING in every role's directory, as suggested by T. Bowling.
190903
- Move the network example inventory to the documentation directory together.
190903
  with the example playbooks and delete the now empty "examples" directory.
190903
- Use proper reserved (by RFC 7042) MAC addresses in the network examples.
190903
190903
* Tue Jun 6 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.2-1
190903
- Update the networking role to version 0.2 (#1459203)
190903
- Version every role and the package separately. They live in separate repos
190903
  and upstream release tags are not coordinated.
190903
190903
* Mon May 22 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.1-2
190903
- Prefix the roles in examples and documentation with rhel-system-roles.
190903
190903
* Thu May 18 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.1-1
190903
- Update to 0.1 (first upstream release).
190903
- Remove the tuned role, it is not ready yet.
190903
- Move the example playbooks to /usr/share/doc/rhel-system-roles/$SUBSYSTEM
190903
  directly to get rid of an extra directory.
190903
- Depend on ansible.
190903
190903
* Thu May 4 2017  Pavel Cahyna <pcahyna@redhat.com> - 0-0.1.20170504
190903
- Initial release.
190903
- kdump r. fe8bb81966b60fa8979f3816a12b0c7120d71140
190903
- postfix r. 43eec5668425d295dce3801216c19b1916df1f9b
190903
- selinux r. 1e4a21f929455e5e76dda0b12867abaa63795ae7
190903
- timesync r. 33a1a8c349de10d6281ed83d4c791e9177d7a141
190903
- tuned r. 2e8bb068b9815bc84287e9b6dc6177295ffdf38b
190903
- network r. 03ff040df78a14409a0d89eba1235b8f3e50a750
190903