From b5421d386e9ac37b6eb6e8d85cd146a26e83d005 Mon Sep 17 00:00:00 2001 From: Johannes Kastl Date: Sun, 18 Dec 2022 21:02:36 +0000 Subject: [PATCH] Accepting request 1043661 from home:ojkastl_buildservice:Branch_systemsmanagement_ansible - disable automatic generation of RPM dependencies from files in collections The files are not meant to be executed on the Ansible controller (i.e. the machine where this package is being installed), but rather on the targets that get modified. So e.g. python2 is not needed as a dependency on the ansible controller - do no longer change shebangs in files from collections OBS-URL: https://build.opensuse.org/request/show/1043661 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:ansible/ansible?expand=0&rev=9 --- ansible.changes | 10 ++++++++++ ansible.spec | 11 ++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ansible.changes b/ansible.changes index a01fbf3..1237746 100644 --- a/ansible.changes +++ b/ansible.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Sun Dec 18 20:23:17 UTC 2022 - Johannes Kastl + +- disable automatic generation of RPM dependencies from files in collections + The files are not meant to be executed on the Ansible controller + (i.e. the machine where this package is being installed), but rather + on the targets that get modified. So e.g. python2 is not needed as + a dependency on the ansible controller +- do no longer change shebangs in files from collections + ------------------------------------------------------------------- Thu Dec 8 14:32:29 UTC 2022 - Johannes Kastl diff --git a/ansible.spec b/ansible.spec index e7d2e2e..f62f58a 100644 --- a/ansible.spec +++ b/ansible.spec @@ -51,6 +51,10 @@ BuildRequires: ansible-core >= 2.14.1 Requires: %{ansible_python}-base >= 3.9 Requires: ansible-core >= 2.14.1 + +# Do not check any files in collections for requires +%global __requires_exclude_from ^%{ansible_python_sitelib}/.*$ + BuildArch: noarch %description @@ -70,13 +74,6 @@ done # fix for wrong shebang: sed -i 's|/Users/kbreit/Documents/Programming/ansible_collections/cisco/meraki/venv/bin/python|%{_bindir}/%{ansible_python_executable}|g' ansible_collections/cisco/meraki/scripts/sublime-build/build.py.generic -# Replace all #!/usr/bin/env lines to use #!/usr/bin/$1 directly. -find ./ -type f -exec \ - sed -i '1s|^#!%{_bindir}/env |#!%{_bindir}/|' {} \; - -find ./ -type f -exec \ - sed -i '1s|python$|%{ansible_python_executable}|' {} \; - # remove .keep and .gitignore files find ./ansible_collections/ -iname .gitignore -delete find ./ansible_collections/ -iname .keep -delete