WhitewaterFoundry / Fedora-Remix-for-WSL

Fedora Remix for Windows Subsystem for Linux.
Other
698 stars 51 forks source link

Cannot enable COPRs #76

Open xasx opened 4 years ago

xasx commented 4 years ago

Describe the bug Whenever I try to enable a COPR, it cannot be enabled due to missing builds although there are builds for Fedora 31.

You are about to enable 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/fif/tdiff? [y/N]: y
Error: This repository does not have any builds yet so you cannot enable it now.

To Reproduce Steps to reproduce the behavior:

  1. sudo dnf copr enable fif/tdiff (refer to https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-for-january-2020/ for more info)
  2. Confirm enabling by Y
  3. See error

Expected behavior The COPR is enabled and software from it ready to be installed via dnf.

Additional context

$ cat /etc/os-release
NAME="Fedora Remix for WSL"
VERSION="31"
ID=fedoraremixforwsl
ID_LIKE=fedora
VERSION_ID=31
PLATFORM_ID="platform:f31"
PRETTY_NAME="Fedora Remix for WSL"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:fedoraproject:fedora:31"
HOME_URL="https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL"
SUPPORT_URL="https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL"
BUG_REPORT_URL="https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL/issues"
PRIVACY_POLICY_URL="https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL/blob/master/PRIVACY.md"

$ dnf copr --version
4.2.18
  Installed: dnf-0:4.2.18-1.fc31.noarch at Tue 04 Feb 2020 11:25:45 AM GMT
  Built    : Fedora Project at Wed 15 Jan 2020 01:58:49 PM GMT

  Installed: rpm-0:4.15.1-1.fc31.x86_64 at Tue 04 Feb 2020 11:24:44 AM GMT
  Built    : Fedora Project at Tue 19 Nov 2019 09:40:20 AM GMT

Example COPR used here: https://copr.fedorainfracloud.org/coprs/fif/tdiff/

Basic Troubleshooting Checklist

[x] I have searched Google for the error message. [ ] I have checked official WSL troubleshooting documentation: https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#confirm-wsl-is-enabled. [ ] I have searched the official Microsoft WSL issues page: https://github.com/Microsoft/WSL/issues. [x] I have searched the WLinux issues page: https://github.com/WhitewaterFoundry/WLinux/issues. [ ] I have reset WLinux: Settings->Apps->Apps & features->WLinux->Advanced Options->Reset. [ ] I have disabled and re-enabled WSL in Windows Features. [ ] I have run Windows 10 updates and restarted.

What other troubleshooting have you attempted?

Insert here:

WLinux Version

image

Insert here:

Windows Build

image

crramirez commented 4 years ago

Hello,

Thanks for reporting. Yesterday I tested this, and I thought that the repository indeed didn't have any packages until you wrote this issue.

We will investigate what is happening.

Regards, Carlos

xasx commented 4 years ago

Somehow, the distro identifier within the URL is messed up:

OSError: Status code: 404 for https://copr.fedorainfracloud.org/coprs/fif/tdiff/repo/epel-31/dnf.repo?arch=x86_64 (IP: 3.81.0.123)
crramirez commented 4 years ago

Good finding this should be :https://copr.fedorainfracloud.org/coprs/fif/tdiff/repo/fedora-31/dnf.repo?arch=x86_64 right?

Let's check the os-release

crramirez commented 4 years ago

Try this:

sudo dnf copr enable fif/tdiff fedora-31-x86_64

crramirez commented 4 years ago

I created a how-to based on this: https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL/wiki/Enable-COPRs

xasx commented 4 years ago

Thank you, this works.

Could you get to the source causing this behaviour?

crramirez commented 4 years ago

In summary, this command won't work with remixes:

Unfortunately the command provided on the COPR site does not work on Fedora remixes such as Korora. The command attempts to determine the version and arch you are running but doesn’t recognize a remix. You must provide this information as an additional argument.

https://jimdean.id.au/2016/03/04/fedoras-copr-and-remixes/

xasx commented 4 years ago

Strangely, on my other PC running 1.31.14.0 it works without the chroot parameter.

crramirez commented 4 years ago

In the version when you issue:

$ cat /etc/os-release

NAME is without quotes?

NAME=Fedora Remix for WSL

xasx commented 4 years ago

The 1.31.14.0 has as you said, no quotes for NAME:

NAME=Fedora Remix for WSL
VERSION="31"
ID=fedoraremixforwsl
ID_LIKE=fedora
VERSION_ID=31
PLATFORM_ID="platform:f31"
PRETTY_NAME="Fedora Remix for WSL"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:fedoraproject:fedora:31"
crramirez commented 4 years ago

Due to the spaces in previous versions, the NAME variable becomes Fedora. We fixed that due to other problems and now this fix broke dnf copr which should use the ID_LIKE variable