Dns copr httpproxy httpport in Fedora template

sudo rpm --httpproxy 127.0.0.1 --httpport 8082 --import https://mirror.mwt.me/ghd/gpgkey

allows rpm to use the proxy. If https://github.com/yuezk/GlobalProtect-openconnect is to be installed in the Fedora template, how then to avoid a connection error?

sudo dnf copr enable yuezk/globalprotect-openconnect
sudo dnf install globalprotect-openconnect

Adding a repository and installing the package

Now, when your build has been finished, you can add the repository and install your package:

First, make sure you have installed dnf core plugins:

$ sudo dnf install dnf-plugins-core

Enable your repository:

$ sudo dnf copr enable your_name/test-project

And install the package:

$ sudo dnf install package

https://developer.fedoraproject.org/deployment/copr/copr-cli.html

I’ve checked myself and it’s no longer required to install dnf-plugins-core package to use copr.
So what errors do you have?
dnf is using proxy in template by default as you can see in template’s /etc/dnf/dnf.conf.

[user@fedora-36 ~]$ sudo dnf copr enable yuezk/globalprotect-openconnect
Enabling a Copr repository. Please note that this repository is not part
of the main distribution, and quality may vary.

The Fedora Project does not exercise any power over the contents of
this repository beyond the rules outlined in the Copr FAQ at
<https://docs.pagure.org/copr.copr/user_documentation.html#what-i-can-build-in-copr>,
and packages are not held to any quality or security level.

Please do not file bug reports about these packages in Fedora
Bugzilla. In case of problems, contact the owner of this repository.

Do you really want to enable copr.fedorainfracloud.org/yuezk/globalprotect-openconnect? [y/N]: y
Error: Failed to connect to https://copr.fedorainfracloud.org/coprs/yuezk/globalprotect-openconnect/repo/fedora-36/dnf.repo?arch=x86_64: Temporary failure in name resolution

[user@fedora-36 ~]$ cat /etc/dnf/dnf.conf
# see `man dnf.conf` for defaults and possible options

[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
best=False
skip_if_unavailable=True
### QUBES BEGIN ###
# This part of configuration, until QUBES END, is automatically generated by
# /usr/lib/qubes/update-proxy-configs. All changes here will be overriden.
# If you want to override any option set here, set it again to desired value,
# below this section
proxy=http://127.0.0.1:8082/
### QUBES END ###
deltarpm=False
[user@fedora-36 ~]$

Try it like this:
https_proxy=http://127.0.0.1:8082/ http_proxy=http://127.0.0.1:8082/ sudo dnf copr enable yuezk/globalprotect-openconnect

[user@fedora-36 ~]$ https_proxy=http://127.0.0.1:8082/ http_proxy=http://127.0.0.1:8082/ sudo dnf copr enable yuezk/globalprotect-openconnect
Enabling a Copr repository. Please note that this repository is not part
of the main distribution, and quality may vary.
...
Do you really want to enable copr.fedorainfracloud.org/yuezk/globalprotect-openconnect? [y/N]: y
Error: Failed to connect to https://copr.fedorainfracloud.org/coprs/yuezk/globalprotect-openconnect/repo/fedora-36/dnf.repo?arch=x86_64: Temporary failure in name resolution
[user@fedora-36 ~]$ https_proxy=http://127.0.0.1:8082/ http_proxy=http://127.0.0.1:8082/ sudo dnf copr enable yuezk/globalprotect-openconnect
Enabling a Copr repository. Please note that this repository is not part
of the main distribution, and quality may vary.
...
Do you really want to enable copr.fedorainfracloud.org/yuezk/globalprotect-openconnect? [y/N]: y
Error: Failed to connect to https://copr.fedorainfracloud.org/coprs/yuezk/globalprotect-openconnect/repo/fedora-36/dnf.repo?arch=x86_64: Temporary failure in name resolution

It works for me in fedora-35-minimal. I’ll try to install fedora-36 and check it there but I think it should work as well.

I tried on a native bare-metal Fedora 36 installation in which adding the copr works. I also tried in another Qubes OS installation on a Laptop where it fails identically. Not sure, which resolver Fedora uses.

What if you try to just download it directly in template?
https_proxy=http://127.0.0.1:8082/ http_proxy=http://127.0.0.1:8082/ wget --secure-protocol=TLSv1_2 -O dnf.repo "https://copr.fedorainfracloud.org/coprs/yuezk/globalprotect-openconnect/repo/fedora-36/dnf.repo?arch=x86_64"

1 Like
https_proxy=http://127.0.0.1:8082/ http_proxy=http://127.0.0.1:8082/ wget --secure-protocol=TLSv1_2 -O dnf.repo "https://copr.fedorainfracloud.org/coprs/yuezk/globalprotect-openconnect/repo/fedora-36/dnf.repo?arch=x86_64"

sudo cp dnf.repo /etc/yum.repos.d/_copr:copr.fedorainfracloud.org:yuezk:globalprotect-openconnect.repo

sudo dnf install globalprotect-openconnect

gpclient

does the job. However when trying to connect to my company, then:

Gateway authentication failed. Error occurred on the gateway prelogin interface.

as opposed to the bare-metal Fedora which works fine.

Do you try to connect from template?
You should create AppVM based on this template and try to connect from there.

Right. I did not run firstly in the app-cube because I forgot to refresh i.e. re-boot. Now, works fine and worth the effort. Thanks for the excellent support!

Also xfreerdp in conjunction works well.

Question: when I install software in the template to be available to the app-cuble, I have to reboot and tried refreshing w/o success; how to make software available immediately?

After you install software or make changes in template you need to shutdown this template and then restart the running AppVMs based on this template.

1 Like

Quite strange, copr enable typically worked on our quasi-non-networked templates and suddenly with jdoss/slack-repo it did not, exactly with the same error mentioned above.

UPD: adding https_proxy before corp enable did help indeed. Shouldn’t dnf handle this internally?