diff options
author | CoprDistGit <infra@openeuler.org> | 2024-08-20 11:21:29 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-08-20 11:21:29 +0000 |
commit | 1eb4ed68231d2237d5938dd48ee0033dc8a7e94f (patch) | |
tree | b06794fb13b5439c7aa803e72007ca4654765627 | |
parent | e0faffd93e4175b19760ff2788f6c76478307197 (diff) |
automatic import of ansible-core
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | ansible-core.spec | 152 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 154 insertions, 0 deletions
@@ -0,0 +1 @@ +/ansible_core-2.16.10.tar.gz diff --git a/ansible-core.spec b/ansible-core.spec new file mode 100644 index 0000000..4134c6b --- /dev/null +++ b/ansible-core.spec @@ -0,0 +1,152 @@ +%global _empty_manifest_terminate_build 0 + +Name: ansible-core +Version: 2.16.10 +Release: 1 +Summary: Radically simple IT automation +License: GPLv3+ +URL: https://ansible.com/ +Source0: https://files.pythonhosted.org/packages/c3/94/a4ce3ff57aebbf5350ea983b6e67b769711449241423d47d8ee3724e3062/ansible_core-2.16.10.tar.gz + +BuildArch: noarch +%description +%{common_description} + + +# Base build requires +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pbr +BuildRequires: python3-pip +BuildRequires: python3-wheel +# General build requires +BuildRequires: python3-jinja2 >= 3.0.0 +BuildRequires: python3-pyyaml >= 5.1 +BuildRequires: python3-cryptography +BuildRequires: python3-packaging +BuildRequires: python3-resolvelib < 1.1.0 +BuildRequires: python3-resolvelib >= 0.5.3 +# General requires +Requires: python3-jinja2 >= 3.0.0 +Requires: python3-pyyaml >= 5.1 +Requires: python3-cryptography +Requires: python3-packaging +BuildRequires: python3-resolvelib < 1.1.0 +BuildRequires: python3-resolvelib >= 0.5.3 + + + +%package help +Summary: Radically simple IT automation +Provides: ansible-core-doc +%description help +%{common_description} + +%prep +%autosetup -n ansible_core-%{version} + +%build +%py3_build + +# Build manpages +mkdir -p docs/man/man1 +%{__python3} packaging/cli-doc/build.py man --output-dir docs/man/man1 + +%install +%py3_install + +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +# Create system directories that Ansible defines as default locations in +# ansible/config/base.yml +DATADIR_LOCATIONS='%{_datadir}/ansible/collections +%{_datadir}/ansible/collections/ansible_collections +%{_datadir}/ansible/plugins/doc_fragments +%{_datadir}/ansible/plugins/action +%{_datadir}/ansible/plugins/become +%{_datadir}/ansible/plugins/cache +%{_datadir}/ansible/plugins/callback +%{_datadir}/ansible/plugins/cliconf +%{_datadir}/ansible/plugins/connection +%{_datadir}/ansible/plugins/filter +%{_datadir}/ansible/plugins/httpapi +%{_datadir}/ansible/plugins/inventory +%{_datadir}/ansible/plugins/lookup +%{_datadir}/ansible/plugins/modules +%{_datadir}/ansible/plugins/module_utils +%{_datadir}/ansible/plugins/netconf +%{_datadir}/ansible/roles +%{_datadir}/ansible/plugins/strategy +%{_datadir}/ansible/plugins/terminal +%{_datadir}/ansible/plugins/test +%{_datadir}/ansible/plugins/vars' + + +UPSTREAM_DATADIR_LOCATIONS=$(grep -ri default lib/ansible/config/base.yml| tr ':' '\n' | grep '/usr/share/ansible') + +if [ "$SYSTEM_LOCATIONS" != "$UPSTREAM_SYSTEM_LOCATIONS" ] ; then + echo "The upstream Ansible datadir locations have changed. Spec file needs to be updated" + exit 1 +fi + +mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/plugins/ +for location in $DATADIR_LOCATIONS ; do + mkdir $RPM_BUILD_ROOT"$location" +done +mkdir -p $RPM_BUILD_ROOT/etc/ansible/ +mkdir -p $RPM_BUILD_ROOT/etc/ansible/roles/ + +mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1 +cp -v docs/man/man1/*.1 $RPM_BUILD_ROOT/%{_mandir}/man1/ + + +#mkdir -p %{buildroot}%{_datadir}/ansible/plugins/ +#for location in $DATADIR_LOCATIONS ; do +# mkdir %{buildroot}"$location" +#done + +#mkdir -p %{buildroot}%{_sysconfdir}/ansible/ +#mkdir -p %{buildroot}%{_sysconfdir}/ansible/roles/ + +#mkdir -p %{buildroot}/%{_mandir}/man1 +#cp -v docs/man/man1/*.1 %{buildroot}/%{_mandir}/man1/ + +%check + + +%files -n ansible-core -f filelist.lst +%dir %{python3_sitelib}/* +%dir %{_sysconfdir}/ansible/ +%config(noreplace) %{_sysconfdir}/ansible/* +%{_mandir}/man1/ansible* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon Aug 19 2024 OpenStack_SIG <openstack@openeuler.org> - 2.16.10-1 +- Init package ansible-core of version 2.16.10 @@ -0,0 +1 @@ +b6fd8f6b684a32a48aea78d229ba7ebf ansible_core-2.16.10.tar.gz |