You are not logged in.

#1 2021-10-08 16:54:15

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,328
Website

How to source a branch of github repo in a PKGBUILD [SOLVED]

For github the syntax is:

source=(
  "git://github.com/xbmc/xbmc.git#branch=$_name"

I cannot locate the equivalent syntax for a gitlab repo.  Little help?

Last edited by graysky (2021-10-08 17:32:28)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Online

#2 2021-10-08 17:02:49

ayekat
Member
Registered: 2011-01-17
Posts: 1,467
Website

Re: How to source a branch of github repo in a PKGBUILD [SOLVED]

The `#branch=$name` syntax is something makepkg-specific, not GitHub. It should work for all Git repositories, regardless of where they are hosted (GitLab, locally, or wherever else).

If not, can you please provide the specific case where it doesn't work?


{,META,RE}PKGBUILDSpacman-hacks (includes makemetapkg and remakepkg) │ dotfiles

Offline

#3 2021-10-08 17:06:55

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,328
Website

Re: How to source a branch of github repo in a PKGBUILD [SOLVED]

I would like to modify shinobi-git to pull the dev branch using that syntax but it does not work.

source=(git://gitlab.com/Shinobi-Systems/Shinobi.git#branch=dev
==> Retrieving sources...
  -> Cloning Shinobi git repo...
Cloning into bare repository '/scratch/shinobi-git/Shinobi'...
fatal: read error: Connection reset by peer
==> ERROR: Failure while downloading Shinobi git repo
    Aborting...
==> ERROR: Could not download sources.

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Online

#4 2021-10-08 17:13:41

Raynman
Member
Registered: 2011-10-22
Posts: 1,337

Re: How to source a branch of github repo in a PKGBUILD [SOLVED]

You didn't just add the branch, you also switched the protocol from https to git.

Offline

#5 2021-10-08 17:18:49

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,328
Website

Re: How to source a branch of github repo in a PKGBUILD [SOLVED]

Raynman wrote:

You didn't just add the branch, you also switched the protocol from https to git.

In my kodi-git package, that protocol and syntax works with github but not with gitlab.  But, to your point, making it git+https works.

source=(git+https://gitlab.com/Shinobi-Systems/Shinobi.git#branch=dev

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Online

Board footer

Powered by FluxBB