#4237 buildinfo lists internal paths to packages
Closed: Invalid by alexi. Opened by alexi.

On the CLI, when running koji buildinfo <nvr>, the list of RPMs has the path to the RPM on the internal fileshare of Koji. This isn't particularly useful to the user, as they can't copy the packages from there. Why not list a https://kojiserver/kojifiles/... URL instead, which would allow them to know where to download the packages from?


It gives you prefix from topdir in your config. If it is not set up, then it will provide that mountpoint. So for Fedora it looks like this:

# with default config
$ koji -p fedora buildinfo 1
BUILD: system-config-securitylevel-1.6.27-1 [1]
State: COMPLETE
Built by: jkeating
Volume: fedora_koji_archive00
Task: none
Finished: Thu, 05 Apr 2007 13:27:18 CEST
Tags: dist-fc6
RPMs:
/mnt/koji/vol/fedora_koji_archive00/packages/system-config-securitylevel/1.6.27/1/src/system-config-securitylevel-1.6.27-1.src.rpm
/mnt/koji/vol/fedora_koji_archive00/packages/system-config-securitylevel/1.6.27/1/ppc/system-config-securitylevel-tui-1.6.27-1.ppc.rpm
/mnt/koji/vol/fedora_koji_archive00/packages/system-config-securitylevel/1.6.27/1/ppc/system-config-securitylevel-debuginfo-1.6.27-1.ppc.rpm
/mnt/koji/vol/fedora_koji_archive00/packages/system-config-securitylevel/1.6.27/1/ppc/system-config-securitylevel-1.6.27-1.ppc.rpm
/mnt/koji/vol/fedora_koji_archive00/packages/system-config-securitylevel/1.6.27/1/x86_64/system-config-securitylevel-debuginfo-1.6.27-1.x86_64.rpm
/mnt/koji/vol/fedora_koji_archive00/packages/system-config-securitylevel/1.6.27/1/x86_64/system-config-securitylevel-tui-1.6.27-1.x86_64.rpm
/mnt/koji/vol/fedora_koji_archive00/packages/system-config-securitylevel/1.6.27/1/x86_64/system-config-securitylevel-1.6.27-1.x86_64.rpm
/mnt/koji/vol/fedora_koji_archive00/packages/system-config-securitylevel/1.6.27/1/ppc64/system-config-securitylevel-debuginfo-1.6.27-1.ppc64.rpm
/mnt/koji/vol/fedora_koji_archive00/packages/system-config-securitylevel/1.6.27/1/ppc64/system-config-securitylevel-tui-1.6.27-1.ppc64.rpm
/mnt/koji/vol/fedora_koji_archive00/packages/system-config-securitylevel/1.6.27/1/ppc64/system-config-securitylevel-1.6.27-1.ppc64.rpm
/mnt/koji/vol/fedora_koji_archive00/packages/system-config-securitylevel/1.6.27/1/i386/system-config-securitylevel-1.6.27-1.i386.rpm
/mnt/koji/vol/fedora_koji_archive00/packages/system-config-securitylevel/1.6.27/1/i386/system-config-securitylevel-tui-1.6.27-1.i386.rpm
/mnt/koji/vol/fedora_koji_archive00/packages/system-config-securitylevel/1.6.27/1/i386/system-config-securitylevel-debuginfo-1.6.27-1.i386.rpm
# updated config
$ cat /etc/koji.conf.d/fedora.conf 
[fedora]
;configuration for koji cli tool
;url of XMLRPC server
server = https://koji.fedoraproject.org/kojihub
;url of web interface
weburl = https://koji.fedoraproject.org/koji
;url of package download site
topurl = https://kojipkgs.fedoraproject.org/
topdir = https://kojipkgs.fedoraproject.org
authtype = kerberos
use_fast_upload = yes
$ koji -p fedora buildinfo 1
BUILD: system-config-securitylevel-1.6.27-1 [1]
State: COMPLETE
Built by: jkeating
Volume: fedora_koji_archive00
Task: none
Finished: Thu, 05 Apr 2007 13:27:18 CEST
Tags: dist-fc6
RPMs:
https://kojipkgs.fedoraproject.org/vol/fedora_koji_archive00/packages/system-config-securitylevel/1.6.27/1/src/system-config-securitylevel-1.6.27-1.src.rpm
https://kojipkgs.fedoraproject.org/vol/fedora_koji_archive00/packages/system-config-securitylevel/1.6.27/1/ppc/system-config-securitylevel-tui-1.6.27-1.ppc.rpm
https://kojipkgs.fedoraproject.org/vol/fedora_koji_archive00/packages/system-config-securitylevel/1.6.27/1/ppc/system-config-securitylevel-debuginfo-1.6.27-1.ppc.rpm
https://kojipkgs.fedoraproject.org/vol/fedora_koji_archive00/packages/system-config-securitylevel/1.6.27/1/ppc/system-config-securitylevel-1.6.27-1.ppc.rpm
https://kojipkgs.fedoraproject.org/vol/fedora_koji_archive00/packages/system-config-securitylevel/1.6.27/1/x86_64/system-config-securitylevel-debuginfo-1.6.27-1.x86_64.rpm
https://kojipkgs.fedoraproject.org/vol/fedora_koji_archive00/packages/system-config-securitylevel/1.6.27/1/x86_64/system-config-securitylevel-tui-1.6.27-1.x86_64.rpm
https://kojipkgs.fedoraproject.org/vol/fedora_koji_archive00/packages/system-config-securitylevel/1.6.27/1/x86_64/system-config-securitylevel-1.6.27-1.x86_64.rpm
https://kojipkgs.fedoraproject.org/vol/fedora_koji_archive00/packages/system-config-securitylevel/1.6.27/1/ppc64/system-config-securitylevel-debuginfo-1.6.27-1.ppc64.rpm
https://kojipkgs.fedoraproject.org/vol/fedora_koji_archive00/packages/system-config-securitylevel/1.6.27/1/ppc64/system-config-securitylevel-tui-1.6.27-1.ppc64.rpm
https://kojipkgs.fedoraproject.org/vol/fedora_koji_archive00/packages/system-config-securitylevel/1.6.27/1/ppc64/system-config-securitylevel-1.6.27-1.ppc64.rpm
https://kojipkgs.fedoraproject.org/vol/fedora_koji_archive00/packages/system-config-securitylevel/1.6.27/1/i386/system-config-securitylevel-1.6.27-1.i386.rpm
https://kojipkgs.fedoraproject.org/vol/fedora_koji_archive00/packages/system-config-securitylevel/1.6.27/1/i386/system-config-securitylevel-tui-1.6.27-1.i386.rpm
https://kojipkgs.fedoraproject.org/vol/fedora_koji_archive00/packages/system-config-securitylevel/1.6.27/1/i386/system-config-securitylevel-debuginfo-1.6.27-1.i386.rpm

Metadata Update from @tkopecek:
- Custom field Size adjusted to None

Ok, I didn't know that. It's a bit odd, though, I would have expected it to use topurl instead. The docs could be improved:

topurl=http://hub.example.com/kojifiles
    The URL where the main Koji volume can be accessed. The builder uses this url for most file access.
topdir=/mnt/koji
    The location where the main Koji volume is mounted. This mount is mainly used during createrepo tasks, and should be read-only.

Ok, never mind, I'm reading the wrong docs. Sorry for the noise!

Metadata Update from @alexi:
- Issue close_status updated to: Invalid
- Issue status updated to: Closed (was: Open)

It is a bit weird use case in CLI as koji library uses it also on builders/hub where topdir and topurl means different things. In the "older days" it was expected that you've /mnt/koji mounted somewhere on your working machine and update topdir (or symlink it to /mnt/koji), so it still really was a topdir. What I'm suggesting here is a bit hackish workaround.

Maybe it could be of some use to add --urls to buildinfo to use topurl instead of topdir.

E.g. list-signed command still expects thay you've todpir locally accessible, so headers can be read :-(

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/koji/koji/issues/4237

Please continue any further discussion there.

Metadata