cosmic-applets icon indicating copy to clipboard operation
cosmic-applets copied to clipboard

Building on Arch Linux using the AUR helper script fails

Open lion7 opened this issue 1 year ago • 1 comments

I'm trying to build the entire Cosmic DE on Arch Linux using the AUR helper script. Unfortunately this fails when trying to checkout the smithay client-toolkit. My best guess is that it's caused by the double slash at the end of the URL in https://github.com/pop-os/cosmic-applets/blob/b7b7b9541e254a7cedc06a4104733617ebb18e03/Cargo.toml#L50

E.g. this fails:

❯ git fetch --tags --force --update-head-ok 'https://github.com/smithay/client-toolkit//' '+refs/heads/*:refs/remotes/origin/*' '+HEAD:refs/remotes/origin/HEAD'
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

But this works:

❯ git fetch --tags --force --update-head-ok 'https://github.com/smithay/client-toolkit/' '+refs/heads/*:refs/remotes/origin/*' '+HEAD:refs/remotes/origin/HEAD'
remote: Enumerating objects: 94863, done.
remote: Counting objects: 100% (35768/35768), done.
remote: Compressing objects: 100% (1811/1811), done.
remote: Total 94863 (delta 33575), reused 35527 (delta 33412), pack-reused 59095
Receiving objects: 100% (94863/94863), 24.79 MiB | 1.15 MiB/s, done.
Resolving deltas: 100% (89438/89438), done.

Full error I got from the AUR helper script:

Submodule path 'xdg-desktop-portal-cosmic': checked out 'b0783c726a593ca44959c50d7306ac3581826dcb'
~/.cache/yay/cosmic-epoch-git/src/cosmic-epoch/cosmic-applets ~/.cache/yay/cosmic-epoch-git/src/cosmic-epoch
    Updating git repository `https://github.com/smithay/client-toolkit//`
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
error: failed to load source for dependency `smithay-client-toolkit`

Caused by:
  Unable to update https://github.com/smithay/client-toolkit//?rev=e63ab5f#e63ab5f0

Caused by:
  failed to clone into: /home/gerard/.cache/yay/cosmic-epoch-git/src/cargo-home/git/db/_empty-f31853f5765173d8

Caused by:
  process didn't exit successfully: `git fetch --tags --force --update-head-ok 'https://github.com/smithay/client-toolkit//' '+refs/heads/*:refs/remotes/origin/*' '+HEAD:refs/remotes/origin/HEAD'` (exit status: 128)
==> ERROR: A failure occurred in prepare().
    Aborting...
 -> error making: cosmic-epoch-git-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
cosmic-epoch-git - exit status 4

lion7 avatar Nov 24 '23 08:11 lion7

Just found https://github.com/rust-lang/cargo/issues/5478 , I already tried using the following URLs with no succes:

  • https://github.com/Smithay/client-toolkit.git
  • https://github.com:443/Smithay/client-toolkit

The following seems to work: https://github.com//Smithay/client-toolkit

I also had to replace a few other patched URLs. In the end I just ran these commands which fixed my issues:

  grep "https://github.com/smithay//smithay" . -r --include=Cargo.toml -l | xargs -l sed -i 's|git = "https://github.com/smithay//smithay"|git = "https://github.com//smithay/smithay"|'
  grep "https://github.com/.*//" . -r --include=Cargo.toml -l | xargs -l sed -i 's|git = "https://github.com/\(.*\)//"|git = "https://github.com//\1"|'

lion7 avatar Nov 24 '23 10:11 lion7

Is the aur helper script maintained by the devs here or a community thing? If the latter reporting here does nothing. Even more so if the issue is with cargo itself.

Kartonrealista avatar Aug 02 '24 09:08 Kartonrealista

@Kartonrealista It would be maintained by the AUR maintainer. We only maintain Pop!_OS packaging.

mmstick avatar Aug 02 '24 10:08 mmstick