You are not logged in.
Pages: 1
Topic closed
Hello,
as I was installing some yubikey software with yaourt, I noticed that makepkg cannot clone GIT repositories. In fact, installation only works when the cloning is specified under the build() function in a PKGBUILD file.
Makepkg.conf confirms that there is not a GIT handler:
DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
'http::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u'
'https::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u'
'rsync::/usr/bin/rsync -z %u %o'
'scp::/usr/bin/scp -C %u %o')
The current version of pacman is 4.0.3-5 and reinstalling it does not fix the problem. I could write my own handler for the "git://" protocol, but it seems bizarre that it is not already supported by the base system.
What am I missing ?
Thanks
Offline
Doing it in the build() section is correct. Makepkg has some smartness regarding -git packages. See:
pacman -S abs && less /usr/share/pacman/PKGBUILD-git.proto
Offline
Doing it in the build() section is correct. Makepkg has some smartness regarding -git packages. See:
pacman -S abs && less /usr/share/pacman/PKGBUILD-git.proto
Checking the guidelines, I notice that makepkg can directly handle GIT repo when using pacman 4.1 or later.
# here is the fun bit. makepkg knows it's a git repo because the url starts with 'git'
# it then knows to checkout the branch 'pacman41' upon cloning, expediating versioning.
source=("git://github.com/falconindy/expac.git#branch=pacman41")
How can I get pacman v4.1 if its latest release is 4.0.3 ?
Offline
Pacman is 4.1 is not released yet. The wiki is just telling you about the new feature in the next pacman.
Offline
Pacman is 4.1 is not released yet. The wiki is just telling you about the new feature in the next pacman.
I see, but I do not understand why I already encounter PKGBUILDs written with the aforementioned "style".
For instance, giving a look to pacman-git, I find:
source=(git://projects.archlinux.org/pacman.git)
sha1sums=('SKIP')
pkgver() {
cd pacman
git describe | sed 's/^v//;s/-/./g'
}
build() {
cd "pacman"
./autogen.sh
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--enable-doc \
--enable-git-version \
--enable-debug \
--with-scriptlet-shell=/usr/bin/bash \
--with-ldconfig=/usr/bin/ldconfig
make
make -C contrib
}
As I said, my makepkg cannot handle that source and there is not an official way to fix it, apparently.
Offline
You would have to make your own PKGBUILD for pacman-git. You could try this one:
https://github.com/berbae/pacman-git
However installing pacman-git just so you can install pacman-git seems kinda pointless, nah?
Offline
Just edit the PKGDIR like this:
1) Change the source url to the url of zip archive on github.
2) add this to prepare():
mv ${srcdir}/${pkgname}-<downloaded-branch> ${srcdir}/${pkgname}
This should do the job.
Last edited by saga (2017-01-15 06:31:05)
Offline
saga, this was 3 years ago, before makepkg had git support. Even your solution is no longer required.
Offline
Offline
Pages: 1
Topic closed