Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 675140 - koji should be able to download a scratch build
koji should be able to download a scratch build
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: koji (Show other bugs)
rawhide
Unspecified Unspecified
urgent Severity urgent
: ---
: ---
Assigned To: Adam Williamson
Fedora Extras Quality Assurance
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-04 07:53 EST by Petr Machata
Modified: 2016-05-23 17:09 EDT (History)
25 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-23 17:09:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Petr Machata 2011-02-04 07:53:32 EST
Description of problem:
Koji can't download a scratch build.

Version-Release number of selected component (if applicable):
koji-1.6.0-1.fc14.noarch

How reproducible:
Always

Steps to Reproduce:
1. Pick a scratch build
   e.g. http://koji.fedoraproject.org/koji/taskinfo?taskID=2760766
   (Which is actually a task.  If there is actual build available, I don't know what it's number is.)
2. issue "koji download-build 2760766"
  
Actual results:
No such build: 2760766

Expected results:
Starts downloading packages.
Comment 1 Steve Tyler 2011-04-04 13:03:21 EDT
Thanks for opening this bug.

There is a script to download scratch builds.
Why not package it with koji-utils?

http://people.redhat.com/mikeb/scripts/download-scratch.py

$ download-scratch.py --help
Usage: download-scratch.py [options] task-ID [task-ID...]

Options:
  -h, --help   show this help message and exit
  --arch=ARCH  Only download packages of the given arch (may be specified
               multiple times)

Example usage:
$ download-scratch.py 2971231 --arch=x86_64

What is the "official" way to download scratch builds from Koji?
David Malcolm
Tue, 16 Mar 2010 11:58:26 -0700
http://www.mail-archive.com/devel@lists.fedoraproject.org/msg04909.html

Here is a patch to koji submitted by lkundrak on 09/09/10 22:24:21:

[PATCH] Add option to get task output to download-build
download-build --task to get rpms given a task id, analogously to what is done for build id. Makes it possible to easily get packages from a scratch build.
https://fedorahosted.org/koji/ticket/189

See also:

koji download-build for scratch builds
https://fedorahosted.org/koji/ticket/163
Comment 2 Steve Tyler 2011-04-05 05:23:22 EDT
Jiri Moskovcak has written a scratch downloader with a GUI:

(In reply to comment #10)
> 
> [1] abrt has so many packages, I thought it would good to use koji to download
> them. Instead, there is:
> Bug 675140 - koji should be able to download a scratch build

- I wrote a scratch downloader, you can download it here:
http://jmoskovc.fedorapeople.org/scratchdown.zip

the usage is: 
./koji_downloader -u <user who owns the build> -t <task_id>

so in this case:

./koji_downloader -u npajkovs -t 2971231


Copied from Bug 692590, Comment 13.
Comment 3 Jaroslav Škarvada 2012-07-30 08:18:25 EDT
Please fix it, it is really annoying that koji can't do it out of the box. This feature if implemented should save me considerable amount of time. There is also https://fedorahosted.org/koji/ticket/237
Comment 4 Ivan Romanov 2012-10-09 21:36:55 EDT
it is affected me too.
Comment 5 Jeff Peeler 2013-01-15 12:23:14 EST
FWIW, koji-download-scratch is packaged in fedora-review.
Comment 6 Fedora End Of Life 2013-04-03 14:08:24 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19
Comment 7 Karel Zak 2015-02-10 04:23:07 EST
4 years old report, 19 people in CC, the same issue opened 3 years ago on koji upstream (the report contains a patch!):
https://fedorahosted.org/koji/ticket/237

... guys, it's pretty difficult to stay polite, really.
Comment 9 Milan Broz 2015-06-05 04:10:42 EDT
This is quite important feature!

Is there at least a plan when downloading of scratch build could appear in tools?

I see no response (ditto for ticket in comment#7), it would be nice to know if we should still write ugly scripts or there is a hope than the feature will be merged eventually.

Thanks.
Comment 10 Adam Williamson 2015-07-30 15:19:35 EDT
Milan: you can at least install fedora-review and use koji-download-scratch . Note its defaults are a bit different from koji's: it downloads log files and debuginfo packages. (I've just sent sochotni a patch to make those optional).

But it would be nice to get this merged, so we'd only need one tool and the behaviour would be consistent (and we wouldn't need to install all of fedora-review and its deps just to download scratch builds).
Comment 11 Milan Broz 2015-07-31 05:26:14 EDT
Well, for years I ended with this crazy script (and the whole point of this bug is avoid such a constructions... :)

TASK=<num>
URL="http://koji.fedoraproject.org/koji/taskinfo?taskID=$TASK"
wget -q -O - "$URL" | grep 'href="[^"]*\.rpm"' | wget -l0 -nd -A .rpm -F -i - -B "$URL/index.html"
Comment 12 Adam Williamson 2015-07-31 05:38:06 EDT
Dennis merged the #237 patch today. I'll probably send a patch to make it behave more similarly to download-build in a couple of ways tomorrow.

https://git.fedorahosted.org/cgit/koji/commit/?id=4ec6cd34ada3e5b621ef0260d6d656ca9796b2a5
Comment 13 Pavol Babinčák 2015-09-03 05:19:04 EDT
Reassigning to Adam: https://bugzilla.redhat.com/show_bug.cgi?id=675140#c12
Comment 14 Victor Costan 2015-11-11 14:16:18 EST
Please implement this. I got asked to test out a scratch build in response to a bug [1], and it took a while to figure out why the koji CLI tool wouldn't fetch it for me.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1275593
Comment 15 Adam Williamson 2015-11-11 14:49:56 EST
It's already in git, just needs package builds...
Comment 16 Victor Costan 2015-11-12 01:11:48 EST
Thank you for clarifying! Please consider my comment to say "please ship this" instead.  I think and hope that making testing easier will get Fedora more testers.
Comment 17 Mike McCune 2016-03-28 18:18:06 EDT
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions
Comment 18 Dan Callaghan 2016-05-23 16:50:57 EDT
It looks like this new command got renamed to download-task, and is released in 1.10.1... Should this bug be closed?
Comment 19 Richard W.M. Jones 2016-05-23 17:09:08 EDT
Looks like it.

Note You need to log in before you can comment on or make changes to this bug.