diff --git a/roles/bodhi2/backend/files/new-updates-sync b/roles/bodhi2/backend/files/new-updates-sync index 3bcfbea..1cb22c2 100755 --- a/roles/bodhi2/backend/files/new-updates-sync +++ b/roles/bodhi2/backend/files/new-updates-sync @@ -20,7 +20,23 @@ FEDORAALTDEST = '/pub/fedora-secondary/updates/' EPELDEST = '/pub/epel/' ATOMICSOURCE = '/mnt/koji/compose/atomic/repo/' ATOMICDEST = '/mnt/koji/atomic/repo/' -RELEASES = {'f29': {'topic': 'fedora', +RELEASES = {'f30': {'topic': 'fedora', + 'version': '30', + 'modules': ['fedora', 'fedora-secondary'], + 'repos': {'rawhide': { + 'from': 'f30', + 'ostrees': [{'ref': 'fedora/rawhide/%(arch)s/atomic-host', + 'dest': ATOMICDEST, + 'arches': ['x86_64', 'ppc64le', 'aarch64']}, + {'ref': 'fedora/rawhide/x86_64/silverblue', + 'dest': ATOMICDEST}, + 'to': [{'arches': ['x86_64', 'armhfp', 'aarch64', 'source'], + 'dest': os.path.join(FEDORADEST, '30', 'Everything')}, + {'arches': ['i386', 'ppc64le', 's390x'], + 'dest': os.path.join(FEDORAALTDEST, '30', 'Everything')} + ]}}, + }, + 'f29': {'topic': 'fedora', 'version': '29', 'modules': ['fedora', 'fedora-secondary'], 'repos': {'updates': { @@ -28,10 +44,10 @@ RELEASES = {'f29': {'topic': 'fedora', 'ostrees': [{'ref': 'fedora/29/%(arch)s/updates/atomic-host', 'dest': ATOMICDEST, 'arches': ['x86_64', 'ppc64le', 'aarch64']}, - {'ref': 'fedora/29/x86_64/updates/workstation', + {'ref': 'fedora/29/x86_64/updates/silverblue', 'dest': ATOMICDEST}, # Hack around for the fact that ostree on f25 doesn't know links - {'ref': 'fedora/29/x86_64/workstation', + {'ref': 'fedora/29/x86_64/silverblue', 'dest': ATOMICDEST}], 'to': [{'arches': ['x86_64', 'armhfp', 'aarch64', 'source'], 'dest': os.path.join(FEDORADEST, '29', 'Everything')}, @@ -43,7 +59,7 @@ RELEASES = {'f29': {'topic': 'fedora', 'ostrees': [{'ref': 'fedora/29/%(arch)s/testing/atomic-host', 'dest': ATOMICDEST, 'arches': ['x86_64', 'ppc64le', 'aarch64']}, - {'ref': 'fedora/29/x86_64/testing/workstation', + {'ref': 'fedora/29/x86_64/testing/silverblue', 'dest': ATOMICDEST}], 'to': [{'arches': ['x86_64', 'aarch64', 'armhfp', 'source'], 'dest': os.path.join(FEDORADEST, 'testing', '29', 'Everything')},
Seems odd to me to compose something in rawhide, then sync it here... but ok, it should work, I just think it will end up being confusing. :)
kevin
I think you talked to patrick about this and I'll trust him on whether this change will actually work or not. As far as the configs it looks ok to me except for one small typo (missing end brace):
diff --git a/roles/bodhi2/backend/files/new-updates-sync b/roles/bodhi2/backend/files/new-updates-sync index 1cb22c21d..9ddc59100 100755 --- a/roles/bodhi2/backend/files/new-updates-sync +++ b/roles/bodhi2/backend/files/new-updates-sync @@ -29,7 +29,7 @@ RELEASES = {'f30': {'topic': 'fedora', 'dest': ATOMICDEST, 'arches': ['x86_64', 'ppc64le', 'aarch64']}, {'ref': 'fedora/rawhide/x86_64/silverblue', - 'dest': ATOMICDEST}, + 'dest': ATOMICDEST}], 'to': [{'arches': ['x86_64', 'armhfp', 'aarch64', 'source'], 'dest': os.path.join(FEDORADEST, '30', 'Everything')}, {'arches': ['i386', 'ppc64le', 's390x'],
diff --git a/roles/bodhi2/backend/files/new-updates-sync b/roles/bodhi2/backend/files/new-updates-sync index 9ddc591..4537f0b 100755 --- a/roles/bodhi2/backend/files/new-updates-sync +++ b/roles/bodhi2/backend/files/new-updates-sync @@ -14,6 +14,7 @@ logger = logging.getLogger('updates-sync')
SOURCE = '/mnt/koji/compose/updates/' +RAWHIDESOURCE = '/mnt/koji/compose/rawhide/' FEDORADEST = '/pub/fedora/linux/updates/' FEDORAMODDEST = '/pub/fedora/linux/modular/updates/' FEDORAALTDEST = '/pub/fedora-secondary/updates/' @@ -24,7 +25,7 @@ RELEASES = {'f30': {'topic': 'fedora', 'version': '30', 'modules': ['fedora', 'fedora-secondary'], 'repos': {'rawhide': { - 'from': 'f30', + 'from': 'latest-Fedora-Rawhide', 'ostrees': [{'ref': 'fedora/rawhide/%(arch)s/atomic-host', 'dest': ATOMICDEST, 'arches': ['x86_64', 'ppc64le', 'aarch64']}, @@ -291,6 +292,8 @@ def to_human(num_bytes):
def sync_single_repo_arch(release, repo, arch, dest_path): + if repo == 'rawhide': + SOURCE = RAWHIDESOURCE source_path = os.path.join(SOURCE, RELEASES[release]['repos'][repo]['from'], 'compose', 'Everything', arch) @@ -356,6 +359,8 @@ def sync_single_repo(release, repo):
def determine_last_link(release, repo): + if repo == 'rawhide': + SOURCE = RAWHIDESOURCE source_path = os.path.join(SOURCE, RELEASES[release]['repos'][repo]['from']) target = os.readlink(source_path)
I guess this should fix the traceback: Traceback (most recent call last): File "/usr/local/bin/new-updates-sync", line 443, in <module> main() File "/usr/local/bin/new-updates-sync", line 434, in main if sync_single_release(release): File "/usr/local/bin/new-updates-sync", line 371, in sync_single_release target = determine_last_link(release, repo) File "/usr/local/bin/new-updates-sync", line 361, in determine_last_link target = os.readlink(source_path) OSError: [Errno 2] No such file or directory: '/mnt/koji/compose/updates/f30'
I dont like using 'latest-Fedora-Rawhide' but unless we create another symlink this is the only option.
On Mon, Aug 27, 2018 at 3:02 PM Dusty Mabe dusty@dustymabe.com wrote:
I think you talked to patrick about this and I'll trust him on whether this change will actually work or not. As far as the configs it looks ok to me except for one small typo (missing end brace):
diff --git a/roles/bodhi2/backend/files/new-updates-sync b/roles/bodhi2/backend/files/new-updates-sync index 1cb22c21d..9ddc59100 100755 --- a/roles/bodhi2/backend/files/new-updates-sync +++ b/roles/bodhi2/backend/files/new-updates-sync @@ -29,7 +29,7 @@ RELEASES = {'f30': {'topic': 'fedora', 'dest': ATOMICDEST, 'arches': ['x86_64', 'ppc64le', 'aarch64']}, {'ref': 'fedora/rawhide/x86_64/silverblue',
'dest': ATOMICDEST},
'dest': ATOMICDEST}], 'to': [{'arches': ['x86_64', 'armhfp', 'aarch64',
'source'], 'dest': os.path.join(FEDORADEST, '30', 'Everything')}, {'arches': ['i386', 'ppc64le', 's390x'],
mostly looks good a few nits inline
On 08/27/2018 03:57 PM, Mohan Boddu wrote:
diff --git a/roles/bodhi2/backend/files/new-updates-sync b/roles/bodhi2/backend/files/new-updates-sync index 9ddc591..4537f0b 100755 --- a/roles/bodhi2/backend/files/new-updates-sync +++ b/roles/bodhi2/backend/files/new-updates-sync @@ -14,6 +14,7 @@ logger = logging.getLogger('updates-sync') SOURCE = '/mnt/koji/compose/updates/' +RAWHIDESOURCE = '/mnt/koji/compose/rawhide/' FEDORADEST = '/pub/fedora/linux/updates/' FEDORAMODDEST = '/pub/fedora/linux/modular/updates/' FEDORAALTDEST = '/pub/fedora-secondary/updates/' @@ -24,7 +25,7 @@ RELEASES = {'f30': {'topic': 'fedora', 'version': '30', 'modules': ['fedora', 'fedora-secondary'], 'repos': {'rawhide': { - 'from': 'f30', + 'from': 'latest-Fedora-Rawhide', 'ostrees': [{'ref': 'fedora/rawhide/%(arch)s/atomic-host', 'dest': ATOMICDEST, 'arches': ['x86_64', 'ppc64le', 'aarch64']}, @@ -291,6 +292,8 @@ def to_human(num_bytes): def sync_single_repo_arch(release, repo, arch, dest_path): + if repo == 'rawhide': + SOURCE = RAWHIDESOURCE
can we make a local variable for this rather than re-assigning the value of the global variable?
source_path = os.path.join(SOURCE, RELEASES[release]['repos'][repo]['from'], 'compose', 'Everything', arch) @@ -356,6 +359,8 @@ def sync_single_repo(release, repo): def determine_last_link(release, repo): + if repo == 'rawhide': + SOURCE = RAWHIDESOURCE
same comment as above
source_path = os.path.join(SOURCE, RELEASES[release]['repos'][repo]['from']) target = os.readlink(source_path)
I guess this should fix the traceback: Traceback (most recent call last): File "/usr/local/bin/new-updates-sync", line 443, in <module> main() File "/usr/local/bin/new-updates-sync", line 434, in main if sync_single_release(release): File "/usr/local/bin/new-updates-sync", line 371, in sync_single_release target = determine_last_link(release, repo) File "/usr/local/bin/new-updates-sync", line 361, in determine_last_link target = os.readlink(source_path) OSError: [Errno 2] No such file or directory: '/mnt/koji/compose/updates/f30'
I dont like using 'latest-Fedora-Rawhide' but unless we create another symlink this is the only option.
latest-Fedora-Rawhide works for me.
Dusty, how about this:
diff --git a/roles/bodhi2/backend/files/new-updates-sync b/roles/bodhi2/backend/files/new-updates-sync index 9ddc591..194e2bd 100755 --- a/roles/bodhi2/backend/files/new-updates-sync +++ b/roles/bodhi2/backend/files/new-updates-sync @@ -14,6 +14,7 @@ logger = logging.getLogger('updates-sync')
SOURCE = '/mnt/koji/compose/updates/' +RAWHIDESOURCE = '/mnt/koji/compose/rawhide/' FEDORADEST = '/pub/fedora/linux/updates/' FEDORAMODDEST = '/pub/fedora/linux/modular/updates/' FEDORAALTDEST = '/pub/fedora-secondary/updates/' @@ -24,7 +25,7 @@ RELEASES = {'f30': {'topic': 'fedora', 'version': '30', 'modules': ['fedora', 'fedora-secondary'], 'repos': {'rawhide': { - 'from': 'f30', + 'from': 'latest-Fedora-Rawhide', 'ostrees': [{'ref': 'fedora/rawhide/%(arch)s/atomic-host', 'dest': ATOMICDEST, 'arches': ['x86_64', 'ppc64le', 'aarch64']}, @@ -291,9 +292,14 @@ def to_human(num_bytes):
def sync_single_repo_arch(release, repo, arch, dest_path): - source_path = os.path.join(SOURCE, - RELEASES[release]['repos'][repo]['from'], - 'compose', 'Everything', arch) + if repo == 'rawhide': + source_path = os.path.join(RAWHIDESOURCE, + RELEASES[release]['repos'][repo]['from'], + 'compose', 'Everything', arch) + else: + source_path = os.path.join(SOURCE, + RELEASES[release]['repos'][repo]['from'], + 'compose', 'Everything', arch)
maindir = 'tree' if arch == 'source' else 'os'
@@ -356,8 +362,12 @@ def sync_single_repo(release, repo):
def determine_last_link(release, repo): - source_path = os.path.join(SOURCE, - RELEASES[release]['repos'][repo]['from']) + if repo == 'rawhide': + source_path = os.path.join(RAWHIDESOURCE, + RELEASES[release]['repos'][repo]['from']) + else: + source_path = os.path.join(SOURCE, + RELEASES[release]['repos'][repo]['from']) target = os.readlink(source_path) logger.info('Release %s, repo %s, target %s', release, repo, target) RELEASES[release]['repos'][repo]['from'] = target
On Mon, Aug 27, 2018 at 4:02 PM Dusty Mabe dusty@dustymabe.com wrote:
mostly looks good a few nits inline
On 08/27/2018 03:57 PM, Mohan Boddu wrote:
diff --git a/roles/bodhi2/backend/files/new-updates-sync
b/roles/bodhi2/backend/files/new-updates-sync
index 9ddc591..4537f0b 100755 --- a/roles/bodhi2/backend/files/new-updates-sync +++ b/roles/bodhi2/backend/files/new-updates-sync @@ -14,6 +14,7 @@ logger = logging.getLogger('updates-sync')
SOURCE = '/mnt/koji/compose/updates/' +RAWHIDESOURCE = '/mnt/koji/compose/rawhide/' FEDORADEST = '/pub/fedora/linux/updates/' FEDORAMODDEST = '/pub/fedora/linux/modular/updates/' FEDORAALTDEST = '/pub/fedora-secondary/updates/' @@ -24,7 +25,7 @@ RELEASES = {'f30': {'topic': 'fedora', 'version': '30', 'modules': ['fedora', 'fedora-secondary'], 'repos': {'rawhide': {
'from': 'f30',
'from': 'latest-Fedora-Rawhide', 'ostrees': [{'ref':
'fedora/rawhide/%(arch)s/atomic-host',
'dest': ATOMICDEST, 'arches': ['x86_64', 'ppc64le',
'aarch64']},
@@ -291,6 +292,8 @@ def to_human(num_bytes):
def sync_single_repo_arch(release, repo, arch, dest_path):
- if repo == 'rawhide':
SOURCE = RAWHIDESOURCE
can we make a local variable for this rather than re-assigning the value of the global variable?
source_path = os.path.join(SOURCE, RELEASES[release]['repos'][repo]['from'], 'compose', 'Everything', arch)
@@ -356,6 +359,8 @@ def sync_single_repo(release, repo):
def determine_last_link(release, repo):
- if repo == 'rawhide':
SOURCE = RAWHIDESOURCE
same comment as above
source_path = os.path.join(SOURCE, RELEASES[release]['repos'][repo]['from']) target = os.readlink(source_path)
I guess this should fix the traceback: Traceback (most recent call last): File "/usr/local/bin/new-updates-sync", line 443, in <module> main() File "/usr/local/bin/new-updates-sync", line 434, in main if sync_single_release(release): File "/usr/local/bin/new-updates-sync", line 371, in
sync_single_release
target = determine_last_link(release, repo)
File "/usr/local/bin/new-updates-sync", line 361, in
determine_last_link
target = os.readlink(source_path)
OSError: [Errno 2] No such file or directory:
'/mnt/koji/compose/updates/f30'
I dont like using 'latest-Fedora-Rawhide' but unless we create another
symlink
this is the only option.
latest-Fedora-Rawhide works for me.
LGTM
On 08/27/2018 04:07 PM, Mohan Boddu wrote:
Dusty, how about this:
diff --git a/roles/bodhi2/backend/files/new-updates-sync b/roles/bodhi2/backend/files/new-updates-sync index 9ddc591..194e2bd 100755 --- a/roles/bodhi2/backend/files/new-updates-sync +++ b/roles/bodhi2/backend/files/new-updates-sync @@ -14,6 +14,7 @@ logger = logging.getLogger('updates-sync') SOURCE = '/mnt/koji/compose/updates/' +RAWHIDESOURCE = '/mnt/koji/compose/rawhide/' FEDORADEST = '/pub/fedora/linux/updates/' FEDORAMODDEST = '/pub/fedora/linux/modular/updates/' FEDORAALTDEST = '/pub/fedora-secondary/updates/' @@ -24,7 +25,7 @@ RELEASES = {'f30': {'topic': 'fedora', 'version': '30', 'modules': ['fedora', 'fedora-secondary'], 'repos': {'rawhide': { - 'from': 'f30', + 'from': 'latest-Fedora-Rawhide', 'ostrees': [{'ref': 'fedora/rawhide/%(arch)s/atomic-host', 'dest': ATOMICDEST, 'arches': ['x86_64', 'ppc64le', 'aarch64']}, @@ -291,9 +292,14 @@ def to_human(num_bytes): def sync_single_repo_arch(release, repo, arch, dest_path): - source_path = os.path.join(SOURCE, - RELEASES[release]['repos'][repo]['from'], - 'compose', 'Everything', arch) + if repo == 'rawhide': + source_path = os.path.join(RAWHIDESOURCE, + RELEASES[release]['repos'][repo]['from'], + 'compose', 'Everything', arch) + else: + source_path = os.path.join(SOURCE, + RELEASES[release]['repos'][repo]['from'], + 'compose', 'Everything', arch) maindir = 'tree' if arch == 'source' else 'os' @@ -356,8 +362,12 @@ def sync_single_repo(release, repo): def determine_last_link(release, repo): - source_path = os.path.join(SOURCE, - RELEASES[release]['repos'][repo]['from']) + if repo == 'rawhide': + source_path = os.path.join(RAWHIDESOURCE, + RELEASES[release]['repos'][repo]['from']) + else: + source_path = os.path.join(SOURCE, + RELEASES[release]['repos'][repo]['from']) target = os.readlink(source_path) logger.info http://logger.info('Release %s, repo %s, target %s', release, repo, target) RELEASES[release]['repos'][repo]['from'] = target
Hopefully this is the last change:
--- a/roles/bodhi2/backend/files/new-updates-sync +++ b/roles/bodhi2/backend/files/new-updates-sync @@ -18,11 +18,13 @@ RAWHIDESOURCE = '/mnt/koji/compose/rawhide/' FEDORADEST = '/pub/fedora/linux/updates/' FEDORAMODDEST = '/pub/fedora/linux/modular/updates/' FEDORAALTDEST = '/pub/fedora-secondary/updates/' +RAWHIDEDEST = '/pub/fedora/linux/development/' +RAWHIDEALTDEST = '/pub/fedora-secondary/development/' EPELDEST = '/pub/epel/' ATOMICSOURCE = '/mnt/koji/compose/atomic/repo/' ATOMICDEST = '/mnt/koji/atomic/repo/' -RELEASES = {'f30': {'topic': 'fedora', - 'version': '30', +RELEASES = {'rawhide': {'topic': 'fedora', + 'version': 'rawhide', 'modules': ['fedora', 'fedora-secondary'], 'repos': {'rawhide': { 'from': 'latest-Fedora-Rawhide', @@ -32,9 +34,9 @@ RELEASES = {'f30': {'topic': 'fedora', {'ref': 'fedora/rawhide/x86_64/silverblue', 'dest': ATOMICDEST}], 'to': [{'arches': ['x86_64', 'armhfp', 'aarch64', 'source'], - 'dest': os.path.join(FEDORADEST, '30', 'Everything')}, + 'dest': os.path.join(RAWHIDEDEST, 'rawhide', 'Everything')}, {'arches': ['i386', 'ppc64le', 's390x'], - 'dest': os.path.join(FEDORAALTDEST, '30', 'Everything')} + 'dest': os.path.join(RAWHIDEALTDEST, 'rawhide', 'Everything')} ]}}, }, 'f29': {'topic': 'fedora',
On Mon, Aug 27, 2018 at 4:14 PM Dusty Mabe dusty@dustymabe.com wrote:
LGTM
On 08/27/2018 04:07 PM, Mohan Boddu wrote:
Dusty, how about this:
diff --git a/roles/bodhi2/backend/files/new-updates-sync
b/roles/bodhi2/backend/files/new-updates-sync
index 9ddc591..194e2bd 100755 --- a/roles/bodhi2/backend/files/new-updates-sync +++ b/roles/bodhi2/backend/files/new-updates-sync @@ -14,6 +14,7 @@ logger = logging.getLogger('updates-sync')
SOURCE = '/mnt/koji/compose/updates/' +RAWHIDESOURCE = '/mnt/koji/compose/rawhide/' FEDORADEST = '/pub/fedora/linux/updates/' FEDORAMODDEST = '/pub/fedora/linux/modular/updates/' FEDORAALTDEST = '/pub/fedora-secondary/updates/' @@ -24,7 +25,7 @@ RELEASES = {'f30': {'topic': 'fedora', 'version': '30', 'modules': ['fedora', 'fedora-secondary'], 'repos': {'rawhide': {
'from': 'f30',
'from': 'latest-Fedora-Rawhide', 'ostrees': [{'ref':
'fedora/rawhide/%(arch)s/atomic-host',
'dest': ATOMICDEST, 'arches': ['x86_64', 'ppc64le',
'aarch64']},
@@ -291,9 +292,14 @@ def to_human(num_bytes):
def sync_single_repo_arch(release, repo, arch, dest_path):
- source_path = os.path.join(SOURCE,
RELEASES[release]['repos'][repo]['from'],
'compose', 'Everything', arch)
- if repo == 'rawhide':
source_path = os.path.join(RAWHIDESOURCE,
RELEASES[release]['repos'][repo]['from'],
'compose', 'Everything', arch)
- else:
source_path = os.path.join(SOURCE,
RELEASES[release]['repos'][repo]['from'],
'compose', 'Everything', arch)
maindir = 'tree' if arch == 'source' else 'os'
@@ -356,8 +362,12 @@ def sync_single_repo(release, repo):
def determine_last_link(release, repo):
- source_path = os.path.join(SOURCE,
RELEASES[release]['repos'][repo]['from'])
- if repo == 'rawhide':
source_path = os.path.join(RAWHIDESOURCE,
RELEASES[release]['repos'][repo]['from'])
- else:
source_path = os.path.join(SOURCE,
RELEASES[release]['repos'][repo]['from'])
target = os.readlink(source_path) logger.info <http://logger.info>('Release %s, repo %s, target %s',
release, repo, target)
RELEASES[release]['repos'][repo]['from'] = target
infrastructure@lists.fedoraproject.org