Bug 1415075 - RFE: Make 'dnf copr' work in copr
Summary: RFE: Make 'dnf copr' work in copr
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Copr Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-20 07:44 UTC by Pavel Raiskup
Modified: 2020-03-17 04:43 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)

Description Pavel Raiskup 2017-01-20 07:44:20 UTC
I have tried today

    $ mock --dnf-cmd copr enable praiskup/postgresql-rhbz1348125

But the error output was:

    ...
    [Errno 20] Not a directory: '/dev/null/_copr_praiskup-postgresql-rhbz1348125.repo'
    ERROR: Command failed. See logs for output.
    ...

Comment 1 Michael Simacek 2017-01-20 11:40:10 UTC
The configs that mock ships set reposdir to /dev/null. Configs generated by koji also do that. To make this work, mock will need to override reposdir option to $chroot_path/yum.repos.d. Note that just leaving reposdir to default wouldn't work (it would use system-wide repos).
As a workaround for now, you can set it manually in the config - find reposdir option and replace /dev/null with $chroot_path/yum.repos.d, where you obtain $chroot_path with `mock -p`.

Comment 2 Miroslav Suchý 2017-04-25 17:00:19 UTC
This is problem. Yum and intial version of DNF have problematic handling of --installroot. It was basically undefined if some path will be used from installroot or from host. Latest DNF do that correctly.

If we change reposdir in all config, that may do inpropper things with older YUM (e.g. on EL7).
On the other hand passing --setopt=reposdir=<reposdir> to DNF is not possible because:

>· config  file  and  reposdir  are  searched inside the installroot first. If  they are not present, they are taken from host system.  Note:
>         When a path is specified within command line argument (--config=<config file> in case of config file and --setopt=reposdir=<reposdir> for
>         reposdir) then this path is always related to the host with no exceptions.

I suppose that safest option would be curl repofile and --copyin option.
Or manually set reposdir in your config and use DNF. But that cannot be done for all users.

Comment 3 Fedora Admin XMLRPC Client 2020-03-17 04:43:03 UTC
This package has changed maintainer in the Fedora.
Reassigning to the new maintainer of this component.


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