This adds syncing for multi-arch ostrees. Tested this out in stage by commenting out various parts of the script and running it. See following logs:
INFO:updates-sync:OSTree at /mnt/fedora_koji_prod/koji/atomic/27, ref fedora/27/x86_64/testing/atomic-host in sync INFO:updates-sync:Syncing OSTree to /mnt/fedora_koji_prod/koji/atomic/27, ref fedora/27/aarch64/testing/atomic-host: 29757b6c48f12cf9121eca6ff5ec297a328541d4a24f6b688d9ca2b866de463c -> ---- INFO:updates-sync:Syncing OSTree to /mnt/fedora_koji_prod/koji/atomic/27, ref fedora/27/ppc64le/testing/atomic-host: 8bf273ceb73582e8c9432229529d6f9a24442b26deab5db2d4b7cffa4896558a -> ---- INFO:updates-sync:OSTree at /mnt/fedora_koji_prod/koji/atomic/27, ref fedora/27/x86_64/updates/atomic-host in sync INFO:updates-sync:Syncing OSTree to /mnt/fedora_koji_prod/koji/atomic/27, ref fedora/27/aarch64/updates/atomic-host: 2111ab79828346c0d34ee7e60a80baef68e6b137ce54ccb0e82e5ffad354b099 -> a4459cbd87b23749bc49ca5875b6bc3b03a9edcaaebbcb4bc55dabba7f4611d9 INFO:updates-sync:Syncing OSTree to /mnt/fedora_koji_prod/koji/atomic/27, ref fedora/27/ppc64le/updates/atomic-host: 90806822b053d30a07e833ac5bd2c7c5979e1c7f53d1d0cd62c093eb7c8207f7 -> 33e605a413818d3de5f88eddf9e5aa4450591a40a026d0f6ee462e67445918c4 INFO:updates-sync:OSTree at /mnt/fedora_koji_prod/koji/atomic/26, ref fedora/26/x86_64/testing/atomic-host in sync INFO:updates-sync:OSTree at /mnt/fedora_koji_prod/koji/atomic/26, ref fedora/26/x86_64/updates/atomic-host in sync
This allows for syncing out aarch64 and ppc64le ostrees in addition to x86_64 trees. --- roles/bodhi2/backend/files/new-updates-sync | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/roles/bodhi2/backend/files/new-updates-sync b/roles/bodhi2/backend/files/new-updates-sync index ae977b1..4d2be72 100755 --- a/roles/bodhi2/backend/files/new-updates-sync +++ b/roles/bodhi2/backend/files/new-updates-sync @@ -24,8 +24,9 @@ RELEASES = {'f27': {'topic': 'fedora', 'modules': ['fedora', 'fedora-secondary'], 'repos': {'updates': { 'from': 'f27-updates', - 'ostree': {'ref': 'fedora/27/x86_64/updates/atomic-host', - 'dest': os.path.join(ATOMICDEST, '27')}, + 'ostree': {'ref': 'fedora/27/%s/updates/atomic-host', + 'dest': os.path.join(ATOMICDEST, '27'), + 'arches': ['x86_64', 'aarch64', 'ppc64le']}, 'to': [{'arches': ['x86_64', 'armhfp', 'source'], 'dest': os.path.join(FEDORADEST, '27')}, {'arches': ['aarch64', 'i386', 'ppc64', 'ppc64le', 's390x'], @@ -33,8 +34,9 @@ RELEASES = {'f27': {'topic': 'fedora', ]}, 'updates-testing': { 'from': 'f27-updates-testing', - 'ostree': {'ref': 'fedora/27/x86_64/testing/atomic-host', - 'dest': os.path.join(ATOMICDEST, '27')}, + 'ostree': {'ref': 'fedora/27/%s/testing/atomic-host', + 'dest': os.path.join(ATOMICDEST, '27'), + 'arches': ['x86_64', 'aarch64', 'ppc64le']}, 'to': [{'arches': ['x86_64', 'armhfp', 'source'], 'dest': os.path.join(FEDORADEST, 'testing', '27')}, {'arches': ['aarch64', 'i386', 'ppc64', 'ppc64le', 's390x'], @@ -60,8 +62,9 @@ RELEASES = {'f27': {'topic': 'fedora', 'modules': ['fedora', 'fedora-secondary'], 'repos': {'updates': { 'from': 'f26-updates', - 'ostree': {'ref': 'fedora/26/x86_64/updates/atomic-host', - 'dest': os.path.join(ATOMICDEST, '26')}, + 'ostree': {'ref': 'fedora/26/%s/updates/atomic-host', + 'dest': os.path.join(ATOMICDEST, '26'), + 'arches': ['x86_64']}, 'to': [{'arches': ['x86_64', 'armhfp', 'source'], 'dest': os.path.join(FEDORADEST, '26')}, {'arches': ['aarch64', 'i386', 'ppc64', 'ppc64le'], @@ -69,8 +72,9 @@ RELEASES = {'f27': {'topic': 'fedora', ]}, 'updates-testing': { 'from': 'f26-updates-testing', - 'ostree': {'ref': 'fedora/26/x86_64/testing/atomic-host', - 'dest': os.path.join(ATOMICDEST, '26')}, + 'ostree': {'ref': 'fedora/26/%s/testing/atomic-host', + 'dest': os.path.join(ATOMICDEST, '26'), + 'arches': ['x86_64']}, 'to': [{'arches': ['x86_64', 'armhfp', 'source'], 'dest': os.path.join(FEDORADEST, 'testing', '26')}, {'arches': ['aarch64', 'i386', 'ppc64', 'ppc64le'], @@ -301,7 +305,8 @@ def sync_single_release(release):
if 'ostree' in RELEASES[release]['repos'][repo]: ostree = RELEASES[release]['repos'][repo]['ostree'] - sync_ostree(ostree['dest'], ostree['ref']) + for arch in ostree['arches']: + sync_ostree(ostree['dest'], ostree['ref'] % arch)
return needssync
infrastructure@lists.fedoraproject.org