set release 32
set build (fedpkg verrel)
set pkg (string split -m 2 -r - $build)[1]
set tag (fedpkg request-side-tag --base-tag f$release-build | grep -oE "(f[0-9]{2}-build-side-[0-9]{5})" | head -1)
fedpkg clone $pkg
cd $pkg
fedpkg request-branch f$release --no-git-branch
set buildroot (~/rust-buildroot.py list-buildroot $build)
set buildroot_pkgs (string split -m 2 -r - $buildroot | grep '^rust-' | sort)
koji add-pkg --owner releng $tag $buildroot_pkgs $pkg --force
koji tag-build $tag $buildroot
echo $buildroot | xargs -P32 -n1 koji wait-repo $tag --build
fedpkg build --target $tag --skip-nvr-check
koji untag-build $tag $buildroot
# Create bodhi update
-
-
Save eclipseo/63f52eb51535a4c90908f5f3a3caaf09 to your computer and use it in GitHub Desktop.
Rust on Side Tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import sys | |
import click | |
import koji as _koji | |
@click.group() | |
@click.option('--profile', default='koji', help='Koji profile') | |
@click.pass_context | |
def cli(ctx, profile): | |
koji = _koji.get_profile_module(profile) | |
session_opts = koji.grab_session_options(koji.config) | |
session = koji.ClientSession(koji.config.server, session_opts) | |
ctx.obj = session | |
@cli.command() | |
@click.argument('nvr') | |
@click.pass_obj | |
def list_buildroot(session, nvr): | |
build = session.getBuild(nvr, strict=True) | |
if build['state'] != _koji.BUILD_STATES['COMPLETE']: | |
click.echo('Build is not in the COMPLETE state') | |
sys.exit(1) | |
task = session.listTasks(opts={'method': 'buildArch', | |
'parent': build['task_id']}, | |
queryOpts={'limit': 1})[0] | |
buildroot = session.listBuildroots(taskID=task['id'], | |
queryOpts={'order': '-id', | |
'limit': 1})[0] | |
rpms = session.listRPMs(componentBuildrootID=buildroot['id']) | |
with session.multicall(strict=True) as m: | |
srpms = [m.listRPMs(buildID=rpm['build_id'], | |
arches='src', | |
queryOpts={'limit': 1}) | |
for rpm in rpms | |
if rpm['name'].startswith('rust-') and rpm['name'].endswith('-devel')] | |
nvrs = set(data.result[0]['nvr'] for data in srpms) | |
print('\n'.join(sorted(nvrs))) | |
if __name__ == '__main__': | |
cli() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment