Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot modify default copr port/protocol #1654

Open
t184256 opened this issue Aug 26, 2024 · 3 comments
Open

cannot modify default copr port/protocol #1654

t184256 opened this issue Aug 26, 2024 · 3 comments
Labels
Priority: LOW RFE Request For Enhancement (as opposed to a bug)

Comments

@t184256
Copy link

t184256 commented Aug 26, 2024

On a clean Fedora 41 install:

# rpm -q dnf5-plugins
dnf5-plugins-5.2.5.0-2.fc41.x86_64
# dnf copr debug
default_hubspec: copr.fedorainfracloud.org
default_hub_hostname: copr.fedorainfracloud.org
name_version: fedora-41
arch: x86_64
repo_fallback_priority:
  - fedora-41

I'd like to modify the default copr port and protocol:

# cat > /etc/dnf/plugins/copr.conf <<EOF
[copr.fedorainfracloud.org]
hostname = copr.fedorainfracloud.org
protocol = http
port = 80

[fedora]
hostname = copr.fedorainfracloud.org
protocol = http
port = 80
EOF

but both of these are ignored:

# dnf copr enable asosedkin/crypto-policies-extras
 https://copr.fedorainfracloud.org/api_3/rpmrepo/asosedkin/crypto-policies-extras/fedora-41/   ???% |   0.0   B/s |   0.0   B |  00m00s
>>> Curl error (56): Failure when receiving data from the peer for https://copr.fedorainfracloud.org/api_3/rpmrepo/asosedkin/crypto-pol
>>> Curl error (56): Failure when receiving data from the peer for https://copr.fedorainfracloud.org/api_3/rpmrepo/asosedkin/crypto-pol
>>> Curl error (56): Failure when receiving data from the peer for https://copr.fedorainfracloud.org/api_3/rpmrepo/asosedkin/crypto-pol
>>> Curl error (56): Failure when receiving data from the peer for https://copr.fedorainfracloud.org/api_3/rpmrepo/asosedkin/crypto-pol
>>> Curl error (56): Failure when receiving data from the peer for https://copr.fedorainfracloud.org/api_3/rpmrepo/asosedkin/crypto-polFailed to download files
 Librepo error: Curl error (56): Failure when receiving data from the peer for https://copr.fedorainfracloud.org/api_3/rpmrepo/asosedkin/crypto-policies-extras/fedora-41/ [CONNECT tunnel failed, response 501]

There seems to be some special-casing of empty hubspec:

if (hubspec.empty())

but this leaves me with a feeling that I need to create a section with an empty title:

if (this->has_section(hubspec)) {

and that's not allowed:

Error in configuration file "/etc/dnf/plugins/copr.conf"
 Empty section name on line 1

Could it, please, pick up the section with the default hubspec instead?

@ppisar ppisar added RFE Request For Enhancement (as opposed to a bug) Priority: LOW labels Aug 27, 2024
@jan-kolarik
Copy link
Member

@praiskup Please could you check this COPR-related issue?

@praiskup
Copy link
Member

Thank you for the report, @t184256

Indeed it looks like we need to finish something in this plugin :-/

The configuration you do is mixing up HUBSPEC and HUBURL. Can you try:

[fedora_insecure]
hostname = copr.fedorainfracloud.org
protocol = http
port = 80

And then dnf copr enable fedora_insecure/asosedkin/crypto-policies-extras?

There don't seem to be a way to pick the "default" section (default Copr hub) from dnf.conf, yet.

@t184256
Copy link
Author

t184256 commented Sep 17, 2024

yeah, defining a custom one will work, the problem is specifically with the inability to override the default hub case (asosedkin/crypto-policies-extras)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: LOW RFE Request For Enhancement (as opposed to a bug)
Projects
Status: Backlog
Development

No branches or pull requests

5 participants
@ppisar @praiskup @t184256 @jan-kolarik and others