You are not logged in.

#1 2023-03-05 23:20:48

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

[SOLVED]makepkg hanging when downloading git source

I've never encountered this before, and I am sure I am missing something subtle.
I am trying to build libonion-git.

makepkg gets as far as cloning libonion from github and it hangs.     Killing makepkg and attempting the download by hand also hangs.  Changing the URL from git:// to https:// works, and the download succeeds.  Attempting to run makepkg at this point (with the plan being to use the manually downloaded source) fails with the assertion it is not a clone of the git://


ewaller@odin/~/devel/build/libonion-git% makepkg -si                           [git][libonion-git/.][masterU]
==> Making package: libonion-git 0.8.r169.gf14048b-1 (Sun 05 Mar 2023 03:03:31 PM PST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Cloning onion git repo...
Cloning into bare repository '/home/ewaller/devel/build/libonion-git/onion'...
^C
==> ERROR: Aborted by user! Exiting...

ewaller@odin/~/devel/build/libonion-git[130]% git clone git://github.com/davidmoreno/onion
Cloning into 'onion'...
^C
ewaller@odin/~/devel/build/libonion-git[130]% git clone https://github.com/davidmoreno/onion
Cloning into 'onion'...
remote: Enumerating objects: 10261, done.
remote: Counting objects: 100% (207/207), done.
remote: Compressing objects: 100% (125/125), done.
remote: Total 10261 (delta 104), reused 144 (delta 79), pack-reused 10054
Receiving objects: 100% (10261/10261), 3.57 MiB | 14.74 MiB/s, done.
Resolving deltas: 100% (6231/6231), done.
ewaller@odin/~/devel/build/libonion-git% makepkg -si                           [git][libonion-git/.][masterU]
==> Making package: libonion-git 0.8.r169.gf14048b-1 (Sun 05 Mar 2023 03:05:27 PM PST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
==> ERROR: /home/ewaller/devel/build/libonion-git/onion is not a clone of git://github.com/davidmoreno/onion
    Aborting...
ewaller@odin/~/devel/build/libonion-git[1]%                                    [git][libonion-git/.][masterU]

As a sanity check,  I can change to the onion directory, run cmake, and then make.  And, I can link against the library that is generated.   Of course, I don't plan to run make install; I want to build a package and install it with pacman.

Any suggestions on how to debug this?


Edit:  BTW, here is the PKGBUILD:

# Maintainer: Anatol Pomozov <anatol.pomozov@gmail.com>
# Contributor: Thomas Oster <thomas.oster@rwth-aachen.de>

pkgname=libonion-git
pkgver=0.8.r169.gf14048b
pkgrel=1
pkgdesc='lightweight C library that facilitate to create simple HTTP servers'
arch=(i686 x86_64)
url='https://github.com/davidmoreno/onion/'
license=(LGPL)
makedepends=(git)
#options=(staticlibs)
source=(git://github.com/davidmoreno/onion)
sha1sums=('SKIP')

pkgver() {
  cd onion
  git describe --tags | sed 's/^v//; s/-/.r/; s/-/./'
}

build() {
  cd onion
  mkdir build
  cd build
  cmake -DONION_USE_SYSTEMD=ON -DONION_USE_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr "$srcdir/onion"
  make
}

# Tests are broken
#check() {
#  cd onion/build
#  make test
#}

package() {
  cd onion/build
  make DESTDIR="$pkgdir" install
}

Last edited by ewaller (2023-03-05 23:57:20)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#2 2023-03-05 23:33:22

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: [SOLVED]makepkg hanging when downloading git source

The simplest "fix" would be to change the source in the PKGBUILD to use https://.  Given you can not manually clone the git:// source, this points at not a makepkg issue.

Offline

#3 2023-03-05 23:38:20

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: [SOLVED]makepkg hanging when downloading git source

One would think so ....

ewaller@odin/~/devel/build/libonion-git% makepkg                               [git][libonion-git/.][masterU]
==> Making package: libonion-git 0.8.r169.gf14048b-1 (Sun 05 Mar 2023 03:35:59 PM PST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading onion...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  249k    0  249k    0     0   442k      0 --:--:-- --:--:-- --:--:--  442k
==> Validating source files with sha1sums...
    onion ... Skipped
==> Extracting sources...
==> Starting pkgver()...
/home/ewaller/devel/build/libonion-git/PKGBUILD: line 17: cd: onion: Not a directory
==> ERROR: A failure occurred in pkgver().
    Aborting...
ewaller@odin/~/devel/build/libonion-git[4]% head onion                         [git][libonion-git/.][masterU]







<!DOCTYPE html>
<html lang="en" data-color-mode="auto" data-light-theme="light" data-dark-theme="dark" data-a11y-animated-images="system">
  <head>
ewaller@odin/~/devel/build/libonion-git%           

But, rather than a directory containing the repositry, I get a rather large HTML file.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#4 2023-03-05 23:50:40

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

Re: [SOLVED]makepkg hanging when downloading git source

You need to change it not to just https but git+https:

source=(git+https://github.com/davidmoreno/onion)

FWIW, I've never also not been able to clone git:// urls on any of my arch systems on any network and if a PKGBUILD includes one I just manually edit it to git+https.  I just tested switching it to just https and confirmed that I also just had a html file in the source dir as a result.

EDIT: "never" is likely incorrect as Scimmia clarifies that actual cause below.  But this has been for quite some time now.  If it is a github limitation, then it would affect all users and the PKGBUILD should be updated to use git+https.

Last edited by Trilby (2023-03-06 02:30:37)


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

Offline

#5 2023-03-05 23:54:31

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: [SOLVED]makepkg hanging when downloading git source

Thanks Trilby, that did it.  Why?   I guess the real question is what document did I miss?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#6 2023-03-06 01:11:17

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

Re: [SOLVED]makepkg hanging when downloading git source

git:// itself isn't a problem, the problem is that github shut off access to that a while ago. As for the syntax of using git over https, it's in the PKGBUILD man page, "USING VCS SOURCES" section

Edit: ref https://github.blog/2021-09-01-improvin … ty-github/

Last edited by Scimmia (2023-03-06 01:15:11)

Offline

#7 2023-03-06 02:01:13

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: [SOLVED]makepkg hanging when downloading git source

man PKGBUILD wrote:

url
           The URL to the VCS repository. This must include the VCS in the URL protocol for makepkg to
           recognize this as a VCS source. If the protocol does not include the VCS name, it can be added
           by prefixing the URL with vcs+. For example, using a Git repository over HTTPS would have a
           source URL in the form: git+https://....

So, the git+https// is a PKGBUILD construct.   If I understand that correctly, if the url had been of the form https://github.com/davidmoreno/onion-git it would have worked without the 'git+' prefix?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#8 2023-03-06 02:07:46

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: [SOLVED]makepkg hanging when downloading git source

ewaller wrote:

So, the git+https// is a PKGBUILD construct.   If I understand that correctly, if the url had been of the form https://github.com/davidmoreno/onion-git it would have worked without the 'git+' prefix?

makepkg needs to know which protocol to use to download the source.  Adding "git+" to the "https://..." tells makepkg that this is a git source and not an ordinary file download.

Offline

#9 2023-03-06 02:23:23

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: [SOLVED]makepkg hanging when downloading git source

I guess my question now is, is that mandatory or can it be coded in the name of the file being downloaded ?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#10 2023-03-06 02:29:25

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: [SOLVED]makepkg hanging when downloading git source

It is mandatory.  makepkg only looks at the protocol section of the url to determine how to download the source.  Parsing the name of the file being downloaded would be too fragile.

Offline

#11 2023-03-06 15:13:16

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: [SOLVED]makepkg hanging when downloading git source

Thank you everyone.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB