Commit graph

44 commits

Author SHA1 Message Date
Fedora Release Engineering
70793ea5d8 Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-16 03:44:04 +00:00
Fedora Release Engineering
dcb226da0b Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-23 17:02:49 +00:00
Fedora Release Engineering
a136449565 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-16 11:09:42 +00:00
Maxwell G
e09cb09842 Temporarily disable tests subpackage on EL 10 2024-12-17 11:35:13 -06:00
Maxwell G
c7bca0022d
lint ruff: use ruff check to address deprecation 2024-09-20 10:50:58 -05:00
Fedora Release Engineering
a8e6aeb5a2 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-17 17:05:45 +00:00
Maxwell G
65040b8666
%ansible_test_unit: handle test dependencies on other collections 2024-02-11 00:47:19 +00:00
Maxwell G
f820268993
add tox.ini to run linters 2024-02-11 00:30:13 +00:00
Maxwell G
bc04ccc9d3
ansible_collection.py: fix argument parser setup 2024-02-05 02:45:38 +00:00
Fedora Release Engineering
e3e463b2ea Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-22 23:08:36 +00:00
Fedora Release Engineering
07453de40b Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-19 13:04:11 +00:00
Maxwell G
313c537b69
add package gating configuration 2023-12-05 02:10:18 +00:00
Maxwell G
168a1f7535
%ansible_collection_url: handle new URL scheme 2023-12-05 02:08:26 +00:00
Fedora Release Engineering
47142722f2 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-19 13:22:34 +00:00
Maxwell G
280a87e80b
add tmt tests to rebuild dependents 2023-05-12 20:27:12 +00:00
Maxwell G
64a06a4843
include LICENSE in ansible-srpm-macros 2023-05-12 18:54:17 +00:00
Maxwell G
4cecf06ccb
tests: remove pytest-forked req with core 2.16
ansible-test units doesn't depend on pytest-forked as of
676b731e6f.
This is expected to land in ansible-core 2.16.
2023-05-12 18:54:17 +00:00
Maxwell G
62d087930a
collection_install: disable GALAXY_COLLECTIONS_PATH_WARNING
This silences spurious warnings when installing collections into a directory
outside ansible's configured collections path.

Relates: https://github.com/ansible/ansible/pull/78487
2023-05-12 18:54:17 +00:00
Maxwell G
e967649fbc
remove unnecessary bashisms 2023-05-12 18:54:17 +00:00
Fedora Release Engineering
a7e7605670 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-18 21:49:07 +00:00
Maxwell G
f85cd2c4b6
Escape macro in changelog 2022-09-30 15:40:24 -05:00
Maxwell G
7ea0e618c9
Update changelog 2022-09-30 15:33:25 -05:00
Maxwell G
fc8efd22ba
Undefine %%_package_note_file
to stop that file from leaking into collection artifacts
2022-09-30 15:33:25 -05:00
Maxwell G
c67bd58e79
%ansible_collection_url: Don't require control macros
Reimplement %ansible_collection_url to accept the collection namespace
and name as arguments instead of requiring oblique control macros. This
also adds some basic tests to ensure that the macro behaves properly.
2022-09-30 15:33:25 -05:00
Maxwell G
e3d150ec90
Flush stdout before subprocess.run
This commit adds sys.stdout.flush() before subprocess.run() in
ansible_collection.py. Without this, the print statements are shown
after the command output when building in mock.
2022-09-30 15:14:22 -05:00
Maxwell G
5e5c534c32
Check if artifact exists before trying to install it 2022-09-30 15:14:22 -05:00
Maxwell G
b1de39d9c6
Add new %ansible_collection_filelist macro
%ansible_collection_files cannot be adapted to dynamically determine the
collection namespace. We need to use a file list for that.
%ansible_collection_install writes out a file list to
%ansible_collection_filelist. Packagers would pass
`%{ansible_collection_filelist}` to `%files -f`.

Eventually, I'd like to deprecate %ansible_collection_files. That won't
happen until the new approach has gotten more testing and adoption.
2022-09-25 23:07:27 -05:00
Maxwell G
78dcf4c992
Outsource %ansible_test_unit logic to helper script
We want %ansible_test_unit to retrieve the collection name{,space} from
galaxy.yml. This removes the need for the %collection_name{,space}
macros and utilizes ansible_collection.py's more robust approach to
running the tests.
2022-09-25 23:07:27 -05:00
Maxwell G
deee147c95
Refactor %ansible_collection_install
This change removes %ansible_collection_install's dependence on the
%collection_namespace and %collection_name macros. Now, the macro uses
the new helper script which extracts this information from galaxy.yml.

Parsing the galaxy.yml instead of using %{version} to determine the
collection version also lends another benefit: it allows us to package
pre-releases. Previously, discrepancies between %{version} and the
upstream version (eg. "3.0.0~rc1" vs "3.0.0-rc1") broke the macro.
2022-09-25 23:07:26 -05:00
Maxwell G
bc337bd8e4
Add ansible_collection.py helper script
The %collection_namespace and %collection_name macros are clunky. This
script preforms two tasks:
    - install: extract the namespace, name, and version from galaxy.yml,
      run `ansible-galaxy install`, and write a filelist for use with
      %files -f.

    - test: create a temporary build directory with the required
      directory structure for ansible-test to work and run `ansible-test
      units`.
2022-09-25 23:07:26 -05:00
Maxwell G
2f4f3dbe16
Add %ansible_roles_dir and %ansible_collections_dir
We expect collections to use %ansible_collection_install and
%ansible_collection_file{s,list}. I'm mainly defining
%ansible_collection_dir for use in our macros.

There are a couple packaged roles in Fedora that can use
%ansible_roles_dir. This can also be used if we decide to implement
macros for packaging roles.
2022-09-23 18:00:58 -05:00
Maxwell G
1fe80d26d6
Add tests meta subpackage 2022-08-13 13:13:47 -05:00
Maxwell G
247eaefd98
Adopt new licensing guidelines 2022-08-13 12:48:14 -05:00
Maxwell G
a5b014cf29
Only build against ansible-core
We want the newest ansible-test, and we may add other macros that
require the newest version. The generated runtime Requires remain the
same.
2022-08-13 12:48:14 -05:00
Maxwell G
098f96c5bb
Properly handle ansible_test_unit macro arguments 2022-08-13 12:48:14 -05:00
Maxwell G
4397502948 Add initial ansible_test_unit macro 2022-08-01 23:08:59 +02:00
Fedora Release Engineering
aee1b8704c Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-20 20:53:40 +00:00
Maxwell G
1fc7f6293b
Split macros required for building SRPMs into a separate package. 2022-05-17 16:27:05 -05:00
Maxwell G
854a0868b7
Restore compatability with f34 and f35. 2022-04-26 21:13:39 -05:00
Neal Gompa
d349c3c366 Drop legacy ansible package support and make compatibile with RHEL 8.6+ 2022-01-31 20:40:17 -05:00
Fedora Release Engineering
04cd2f83ed - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-19 21:19:58 +00:00
Neal Gompa
76cc4a6e18 Only set conflicts on anything not RHEL 9+ 2022-01-13 20:22:49 -05:00
Neal Gompa
6ae39f7436 Initial packaging split out of ansible-core (#2038591) 2022-01-13 20:18:24 -05:00
Gwyn Ciesla
f48e360c4b Added the README 2022-01-10 16:49:48 +00:00