You are not logged in.

#1 2022-12-23 01:57:47

lenhuppe
Member
From: New Hampshire USA
Registered: 2018-12-10
Posts: 271
Website

[SOLVED] AUR build fails when cloning git repo

I am trying to compile ls-icons and I get the following:

git clone https://aur.archlinux.org/ls-icons /tmp/ls-icons

Cloning into '/tmp/ls-icons'...
remote: Enumerating objects: 18, done.
remote: Counting objects: 100% (18/18), done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 18 (delta 0), reused 18 (delta 0), pack-reused 0
Receiving objects: 100% (18/18), 5.24 KiB | 5.24 MiB/s, done.

cd /tmp/ls-icons && makepkg --noconfirm -sic PKGBUILD

==> Making package: ls-icons v8.27+48+gc5f26413b-1 (Thu 22 Dec 2022 08:49:36 PM EST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Cloning ls-icons git repo...
Cloning into bare repository '/tmp/ls-icons/ls-icons'...
fatal: unable to connect to github.com:
github.com[0: 140.82.113.4]: errno=Connection timed out

==> ERROR: Failure while downloading ls-icons git repo
    Aborting...

It looks like make is cloning the git repo into the same location that the AUR package was cloned into.

I tried cloning the AUR package into a different location but I get the same error.

Last edited by lenhuppe (2022-12-23 20:07:21)


Why do we drive on the parkway and then park in the driveway?

Offline

#2 2022-12-23 02:07:34

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: [SOLVED] AUR build fails when cloning git repo

1) there is no need to pass "PKGBUILD" as an argument to makepkg; it's not doing what you think it's doing.  This is harmless as all it really does is creates an empty environment variable called PKGBUILD, but it serves no purpose.

2) The package itself is incorrectly named as it should be ls-icons-git, but that isn't related to the current error.

3) Your error doesn't really have anything to do with this package: your system cannot connect to github.com.  Can you ping github.com?

Sidenote) I've never bothered to figure out why, but git:// urls have never worked for me (I think my crappy ISP router may block a relevant port for that), but editing the PKGBUILD source variable to use git+https:// works fine.  But if this were your problem you'd not get the error message you did.  EDIT: I suppose I shouldn't have discarded this idea.  I get a different error from the git:// urls due to my router/ISP, but as noted below github also would not respond to git:// urls anyways.

Last edited by Trilby (2022-12-23 16:40:12)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#3 2022-12-23 03:27:44

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: [SOLVED] AUR build fails when cloning git repo

In addition, it is not cloning into the same location. One is into /tmp/ls-icons and the other into /tmp/ls-icons/ls-icons. If you clone from the AUR into <path>, you'll get a clone from github into <path>/ls-icons. At least, you would if you could connect to github.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#4 2022-12-23 03:46:29

lenhuppe
Member
From: New Hampshire USA
Registered: 2018-12-10
Posts: 271
Website

Re: [SOLVED] AUR build fails when cloning git repo

Trilby wrote:

1) there is no need to pass "PKGBUILD" as an argument to makepkg; it's not doing what you think it's doing.  This is harmless as all it really does is creates an empty environment variable called PKGBUILD, but it serves no purpose.

2) The package itself is incorrectly named as it should be ls-icons-git, but that isn't related to the current error.

3) Your error doesn't really have anything to do with this package: your system cannot connect to github.com.  Can you ping github.com?

Sidenote) I've never bothered to figure out why, but git:// urls have never worked for me (I think my crappy ISP router may block a relevant port for that), but editing the PKGBUILD source variable to use git+https:// works fine.  But if this were your problem you'd not get the error message you did.

To answer your query - I can ping github.com ok, and I can clone the github package repo. Also thanks for the tip on passing PKGBUILD to makepkg.

Last edited by lenhuppe (2022-12-23 04:02:23)


Why do we drive on the parkway and then park in the driveway?

Offline

#5 2022-12-23 04:11:32

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: [SOLVED] AUR build fails when cloning git repo

lenhuppe wrote:

and I can clone the github package repo

You've done this manually and it succeeds?  What's the exact command used for this?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#6 2022-12-23 04:40:45

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,466

Re: [SOLVED] AUR build fails when cloning git repo

The package in question is still trying to access github through git://. Github shut this off months ago, you must use https://.

Online

#7 2022-12-23 15:16:36

lenhuppe
Member
From: New Hampshire USA
Registered: 2018-12-10
Posts: 271
Website

Re: [SOLVED] AUR build fails when cloning git repo

Trilby wrote:
lenhuppe wrote:

and I can clone the github package repo

You've done this manually and it succeeds?  What's the exact command used for this?

I used the URL from PKGBUILD

git clone https://github.com/sebastiencs/ls-icons /tmp/ls-icons
-->
Cloning into '/tmp/ls-icons'...
remote: Enumerating objects: 170836, done.
remote: Total 170836 (delta 0), reused 0 (delta 0), pack-reused 170836
Receiving objects: 100% (170836/170836), 37.58 MiB | 47.87 MiB/s, done.
Resolving deltas: 100% (129777/129777), done.

When I saw that makepkg is attempting to clone the github repo into the same location that the AUR package already resides in I decided to try it by hand.

git clone https://aur.archlinux.org/ls-icons /tmp/ls-icons
-->
Cloning into '/tmp/ls-icons'...
remote: Enumerating objects: 18, done.
remote: Counting objects: 100% (18/18), done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 18 (delta 0), reused 18 (delta 0), pack-reused 0
Receiving objects: 100% (18/18), 5.24 KiB | 5.24 MiB/s, done.

git clone https://github.com/sebastiencs/ls-icons /tmp/ls-icons
-->
fatal: destination path '/tmp/ls-icons' already exists and is not an empty directory.

I also saw that the AUR package includes a patch file that needs to be applied by hand or added to PKGBUILD

Never patched an AUR package but I'm sure it's simple enough.


Why do we drive on the parkway and then park in the driveway?

Offline

#8 2022-12-23 15:20:13

lenhuppe
Member
From: New Hampshire USA
Registered: 2018-12-10
Posts: 271
Website

Re: [SOLVED] AUR build fails when cloning git repo

Scimmia wrote:

The package in question is still trying to access github through git://. Github shut this off months ago, you must use https://.

I checked PKGBUILD and it lists https in the url

url="https://github.com/sebastiencs/ls-icons"

Why do we drive on the parkway and then park in the driveway?

Offline

#9 2022-12-23 15:21:21

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,466

Re: [SOLVED] AUR build fails when cloning git repo

We're talking about the source.

Online

#10 2022-12-23 15:57:19

schard
Member
From: Hannover
Registered: 2016-05-06
Posts: 1,932
Website

Re: [SOLVED] AUR build fails when cloning git repo

Totally reproduces in a clean chroot:

0 ✓ build@srv ~ $ git clone -o aur https://aur.archlinux.org/ls-icons 
Klone nach 'ls-icons'...
remote: Enumerating objects: 18, done.
remote: Counting objects: 100% (18/18), done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 18 (delta 0), reused 18 (delta 0), pack-reused 0
Empfange Objekte: 100% (18/18), 5.24 KiB | 5.24 MiB/s, fertig.
0 ✓ build@srv ~ $ cd ls-icons/
0 ✓ build@srv ~/ls-icons $ makechrootpkg -cr /var/build 
==> Synchronizing chroot copy [/var/build/root] -> [build]...done
==> Making package: ls-icons v8.27+48+gc5f26413b-1 (Fri Dec 23 16:52:59 2022)
==> Retrieving sources...
  -> Cloning ls-icons git repo...
Cloning into bare repository '/home/build/ls-icons/ls-icons'...
fatal: unable to connect to github.com:
github.com[0: 140.82.121.3]: errno=Connection timed out

==> ERROR: Failure while downloading ls-icons git repo
    Aborting...
==> ERROR: Could not download sources.
255 ✗ build@srv ~/ls-icons $ 

Clones fine with this patch:

0 ✓ build@srv ~/ls-icons $ git diff
diff --git a/PKGBUILD b/PKGBUILD
index f6f6f5f..587ed38 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,7 +10,7 @@ license=('GPL3')
 depends=('icons-in-terminal>=r93.b12286d-3' 'libcap')
 makedepends=('git' 'gperf' 'rsync' 'clang')
 _patches=('ls-icons-st-term-icons-cutoff-fix.patch')
-source=('git://github.com/sebastiencs/ls-icons.git'
+source=('git+https://github.com/sebastiencs/ls-icons.git'
         "${_patches[@]}")
 sha1sums=('SKIP'
           '4d69c3b01252cfbb5d42e62546d96ac11daa14a1')
0 ✓ build@srv ~/ls-icons $ 

Offline

#11 2022-12-23 16:52:19

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: [SOLVED] AUR build fails when cloning git repo

lenhuppe wrote:
git clone https://github.com/sebastiencs/ls-icons /tmp/ls-icons
-->
Cloning into '/tmp/ls-icons'...

This is not what makepkg was doing according to your original post.

lenhuppe wrote:

When I saw that makepkg is attempting to clone the github repo into the same location that the AUR package already resides in I decided to try it by hand.

It is not doing that according to the output you yourself originally posted.

lenhuppe wrote:
git clone https://aur.archlinux.org/ls-icons /tmp/ls-icons
-->
Cloning into '/tmp/ls-icons'...
remote: Enumerating objects: 18, done.
remote: Counting objects: 100% (18/18), done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 18 (delta 0), reused 18 (delta 0), pack-reused 0
Receiving objects: 100% (18/18), 5.24 KiB | 5.24 MiB/s, done.

Yes ...

lenhuppe wrote:
git clone https://github.com/sebastiencs/ls-icons /tmp/ls-icons

Which is not what makepkg did. You are confusing /tmp/ls-icons with /tmp/ls-icons/ls-icons and the target for the first git clone from AUR with the target for the second git clone performed by makepkg.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#12 2022-12-23 18:29:57

lenhuppe
Member
From: New Hampshire USA
Registered: 2018-12-10
Posts: 271
Website

Re: [SOLVED] AUR build fails when cloning git repo

cfr wrote:

You are confusing /tmp/ls-icons with /tmp/ls-icons/ls-icons and the target for the first git clone from AUR with the target for the second git clone performed by makepkg.

You are right so thank you for catching that ... honestly not sure how that happened.
I created a new script for testing AUR packages which will give me a better view:

#!/usr/bin/env bash

# error handling
set -Euo pipefail

# stubs
print() { tput setaf 2 ; echo -e "\n\t$1\n" ; tput sgr0 ; }

## -- MAIN -- ##

# AUR packages
aur_pkgs='icons-in-terminal ls-icons'

# install from AUR
for pkg in $aur_pkgs ; do
print "building $pkg" 
build=/tmp/"$pkg"
git clone -q https://aur.archlinux.org/"$pkg" "$build"
cd "$build" && makepkg --noconfirm -sic
done

Here is what I am getting:

	building icons-in-terminal

==> Making package: icons-in-terminal r93.b12286d-4 (Fri 23 Dec 2022 12:55:14 PM EST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Cloning icons-in-terminal git repo...
Cloning into bare repository '/tmp/icons-in-terminal/icons-in-terminal'...
remote: Enumerating objects: 587, done.
remote: Counting objects: 100% (30/30), done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 587 (delta 9), reused 22 (delta 6), pack-reused 557
Receiving objects: 100% (587/587), 10.83 MiB | 19.02 MiB/s, done.
Resolving deltas: 100% (345/345), done.
==> Validating source files with sha1sums...
    icons-in-terminal ... Skipped
==> Extracting sources...
  -> Creating working copy of icons-in-terminal git repo...
Cloning into 'icons-in-terminal'...
done.
==> Starting prepare()...
==> Starting pkgver()...
==> Entering fakeroot environment...
==> Starting package()...
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "icons-in-terminal"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Adding install file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: icons-in-terminal r93.b12286d-4 (Fri 23 Dec 2022 12:55:16 PM EST)
==> Installing package icons-in-terminal with pacman -U...
[sudo] password for lenny: 
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (1) icons-in-terminal-r93.b12286d-4

Total Installed Size:  1.66 MiB

:: Proceed with installation? [Y/n] 
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
checking available disk space...
:: Processing package changes...
installing icons-in-terminal...
	Font(s) that should use icons are added to file /usr/share/fontconfig/conf.avail/30-icons-in-terminal.conf
	Use command 'icons-in-terminal' to view a list of available icons.
:: Running post-transaction hooks...
(1/4) Arming ConditionNeedsUpdate...
(2/4) Updating fontconfig cache...
(3/4) Running Pkgfile Hook
:: Updating 3 repos...
  community is up to date
  core is up to date
  extra is up to date
(4/4) Running Sync Hook
==> Cleaning up...

	building ls-icons

==> Making package: ls-icons v8.27+48+gc5f26413b-1 (Fri 23 Dec 2022 12:55:21 PM EST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Cloning ls-icons git repo...
Cloning into bare repository '/tmp/ls-icons/ls-icons'...
fatal: unable to connect to github.com:
github.com[0: 140.82.113.3]: errno=Connection timed out

==> ERROR: Failure while downloading ls-icons git repo
    Aborting...

This is obviously a bling but I am interested in learning what I can from it.
@schard posted a patch that I will try once I learn how.

Last edited by lenhuppe (2022-12-23 18:32:27)


Why do we drive on the parkway and then park in the driveway?

Offline

#13 2022-12-23 18:36:21

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: [SOLVED] AUR build fails when cloning git repo

lenhuppe wrote:

...once I learn how.

You literally just add "+https" to the source line to change it from git://... to git+https://...


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#14 2022-12-23 20:06:55

lenhuppe
Member
From: New Hampshire USA
Registered: 2018-12-10
Posts: 271
Website

Re: [SOLVED] AUR build fails when cloning git repo

Solution:

1) Created the patch file provided by @schard and added it to the  _patches array in PKBUILD
2) Added "+https" to the source line in PKBUILD per the post by @trilby
3) Added --skipchecksums when running makepkg

Edit:

Adding "+https" to the source line in PKBUILD per @trilby was all that it needed

Last edited by lenhuppe (2022-12-23 20:49:43)


Why do we drive on the parkway and then park in the driveway?

Offline

#15 2022-12-23 20:13:33

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: [SOLVED] AUR build fails when cloning git repo

Number 1 was nonsensical, but harmless because the PKGBUILD no longer uses the _patches variable anyways.  Number 3 was pointless on two counts: changing from the git to https protocol would not change the checksum of anything and checksums for the vcs source is already SKIPed anyways.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#16 2022-12-23 20:50:21

lenhuppe
Member
From: New Hampshire USA
Registered: 2018-12-10
Posts: 271
Website

Re: [SOLVED] AUR build fails when cloning git repo

Trilby wrote:

Number 1 was nonsensical, but harmless because the PKGBUILD no longer uses the _patches variable anyways.  Number 3 was pointless on two counts: changing from the git to https protocol would not change the checksum of anything and checksums for the vcs source is already SKIPed anyways.

I clearly have a lot to learn about packages. That said I have learned a lot by reading your informative posts.

Last edited by lenhuppe (2022-12-23 21:02:31)


Why do we drive on the parkway and then park in the driveway?

Offline

Board footer

Powered by FluxBB