#43 Replace lsr_role2collection with release_collection
Merged 2 years ago by nhosoi. Opened 2 years ago by nhosoi.
rpms/ nhosoi/linux-system-roles release_collection  into  rawhide

file modified
+3
@@ -165,3 +165,6 @@ 

  /vpn-1.2.1.tar.gz

  /ansible-sshd-v0.14.1.tar.gz

  /network-c0f603808217f691f603d535becf7ff307790cac.tar.gz

+ /auto-maintenance-aed8f06d63e2d7bf08f6bbad0904e90ce2648043.tar.gz

+ /auto-maintenance-73e7adaf787961dd284ba9f552e0a15a9dd94ef8.tar.gz

+ /auto-maintenance-faf1a88325996248df6f2820787297aff7405fe1.tar.gz

file modified
+9 -23
@@ -181,7 +181,7 @@ 

  %global rolename18 vpn

  %deftag 18 1.2.1

  

- %global mainid 2dd50c8a16af647e4c7a768c481335e97735958a

+ %global mainid faf1a88325996248df6f2820787297aff7405fe1

  Source: %{url}/auto-maintenance/archive/%{mainid}/auto-maintenance-%{mainid}.tar.gz

  Source1: %{archiveurl1}

  Source2: %{archiveurl2}
@@ -233,6 +233,8 @@ 

  

  # Requirements for galaxy_transform.py

  BuildRequires: python3

+ # Requirements for release_collection.py

+ BuildRequires: python-packaging

  %if 0%{?fedora} || 0%{?rhel} >= 8

  BuildRequires: python3dist(ruamel.yaml)

  
@@ -428,13 +430,15 @@ 

  ./galaxy_transform.py "%{collection_namespace}" "%{collection_name}" "%{collection_version}" "Red Hat Enterprise Linux System Roles Ansible Collection" > galaxy.yml.tmp

  mv galaxy.yml.tmp galaxy.yml

  

+ includes=""

  for role in %{rolenames}; do

-     python3 lsr_role2collection.py --role "$role" --src-path "$role" \

-         --src-owner %{name} --subrole-prefix %{subrole_prefix} --dest-path .collections \

-         --readme lsr_role2collection/collection_readme.md \

-         --namespace %{collection_namespace} --collection %{collection_name}

+     includes="$includes --include $role"

  done

  

+ python3 release_collection.py --galaxy-yml galaxy.yml --src-path $(pwd) \

+     --dest-path $(pwd)/.collections $includes --force --no-update \

+ 	--skip-git --skip-check --debug

+ 

  %if 0%{?rhel}

  # Convert vendored plugins to FQCN for collection

  #   ansible.netcommon:
@@ -457,24 +461,6 @@ 

         .collections/ansible_collections/%{collection_namespace}/%{collection_name}/bindep.txt

  fi

  

- rm -f .collections/ansible_collections/%{collection_namespace}/%{collection_name}/tests/sanity/ignore-2.9.txt

- # Merge .sanity-ansible-ignore-2.9-ROLENAME.txt into tests/sanity/ignore-2.9.txt

- mkdir -p .collections/ansible_collections/%{collection_namespace}/%{collection_name}/tests/sanity

- for role in %{rolenames}; do

-     if [ -f .collections/ansible_collections/%{collection_namespace}/%{collection_name}/.sanity-ansible-ignore-2.9-"$role".txt ];

-     then

-       cat .collections/ansible_collections/%{collection_namespace}/%{collection_name}/.sanity-ansible-ignore-2.9-"$role".txt \

-         >> .collections/ansible_collections/%{collection_namespace}/%{collection_name}/tests/sanity/ignore-2.9.txt

-       rm -f .collections/ansible_collections/%{collection_namespace}/%{collection_name}/.sanity-ansible-ignore-*-"$role".txt

-     fi

- done

- 

- # removing dot files/dirs

- rm -r .collections/ansible_collections/%{collection_namespace}/%{collection_name}/.[A-Za-z]*

- 

- cp -p galaxy.yml lsr_role2collection/.ansible-lint \

-     .collections/ansible_collections/%{collection_namespace}/%{collection_name}

- 

  # Remove table of contents from logging README.md

  # It is not needed for html and AH/Galaxy

  sed -i -e 's/^\(## Table of Contents\)/## Background\n\1/' \

file modified
+1 -1
@@ -1,4 +1,4 @@ 

- SHA512 (auto-maintenance-2dd50c8a16af647e4c7a768c481335e97735958a.tar.gz) = 78fc58352259a64cbaff645253c552b40123bd803162d5ced1c3b50771fb5066718e241e17c7c32eaff5613b541627493665b3098fb978fb0b2c3a79e7e945a0

+ SHA512 (auto-maintenance-faf1a88325996248df6f2820787297aff7405fe1.tar.gz) = 1c57d98c74c1399e3369ca1f80bd78256d10aec95f29821f97f7fd32d3e62acaf27f1f37b7c931b39233cfbf9b2aac735ac6051c1bb16688753cd3870bf092a7

  SHA512 (ansible-sshd-v0.14.1.tar.gz) = 00fcec57c1f6109aec654bea6ede02dbfc0ed26acf835c040253d2d1499cf79fac37a65586bcd4737f5a2db662f56907496c2befc46310ca30b989a943a84139

  SHA512 (certificate-1.1.0.tar.gz) = 6b44267951fb2f2e9f1f75d8639618bf16b9cf8759883237aa577c06e73597abf5d8337418f87e0d08d40ec4e3c6f3febd3f64aca28214b6dce6e7a0ccc8cbc0

  SHA512 (crypto_policies-1.2.0.tar.gz) = 3a985b7194332195c70005acfd562e772ae304c6af2d1a790541de7986be5b9896667e0081e5cfc7a5247b4739db4054d3cd74cb07b1e127e59b77f2f9620391

Replace lsr_role2collection with release_collection to take advantage
of its generating associated files - .ansible-lint, ignore files for
ansible-test.

scratch build:
Replace lsr_role2collection with release_collection to take advantage

I don't think you need this - includes is used as a regular scalar variable below, not an array

so just

includes=""

rebased onto 6c7a141

2 years ago

Thank you for reviewing this pr, @rmeggins!

Pull-Request has been merged by nhosoi

2 years ago