You are not logged in.

#1 2017-03-10 21:53:52

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

[Solved] How To Checksum Files From Git Repo?

I finally felt the need to create my first PKGBUILD and I have it fully working, except I don't know how to create sums for all the files that are cloned from the repo. I initially I had it so that it downloads the zip file and I summed that but ran into issues later on so I looked up how to clone a repo in a PKGBUILD.

Here's the source. Any other suggestions would be appreciated before I submit it to the AUR.

# Maintainer: Brandon Golway <brando56894@gmail dot com>
pkgname=freenas-vm-tools
pkgver=1.0
pkgrel=1
pkgdesc="Bhyve VM tools for FreeNAS 10"
arch=(x86_64)
url="https://www.freenas.org"
license=('GPL')
depends=(poco)
makedepends=(git cmake binutils clang libmariadbclient libtool unixodbc)
provides=('freenas-vm-tools')
conflicts=('freenas-vm-tools')
source=("git+https://github.com/freenas/freenas-vm-tools.git")

build() {
        cd "$pkgname"
        export CXX=clang++
        cmake .
        make
}

package() {
        cd "$pkgname"
        make DESTDIR="$pkgdir/" install
        cd "$srcdir/freenas-vm-tools/systemd"
        mkdir -p $pkgdir/usr/lib/systemd/system
        install -m755 freenas-vm-tools.service  $pkgdir/usr/lib/systemd/system/freenas-vm-tools.service
}

Last edited by brando56894 (2017-03-11 03:47:39)

Offline

#2 2017-03-10 23:02:13

mychris
Member
From: Munich
Registered: 2012-09-15
Posts: 68

Re: [Solved] How To Checksum Files From Git Repo?

I guess you mean the checksum? If the source is not static, you should use SKIP:
https://wiki.archlinux.org/index.php/VC … guidelines

Offline

#3 2017-03-11 02:10:47

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: [Solved] How To Checksum Files From Git Repo?

mychris wrote:

I guess you mean the checksum? If the source is not static, you should use SKIP:
https://wiki.archlinux.org/index.php/VC … guidelines

In addition to this, the pkgname should be suffixed with "-git". Typically you would do something like this:

_pkgname=freenas-vm-tools
pkgname="$_pkgname"-git
...
source=("git+https://github.com/freenas/${_pkgname}.git")
...
build() {
        cd "$_pkgname"
...

My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#4 2017-03-11 03:17:04

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: [Solved] How To Checksum Files From Git Repo?

Thanks for the help guys, I was going to append -git once I knew everything worked, thanks for the reminder!

Offline

#5 2017-03-12 15:00:13

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [Solved] How To Checksum Files From Git Repo?

Checksums are unnecessary for git repositories, as git already has mechanisms to prevent corrupted downloads. This is besides the fact that by definition a git repo gets updated versions that would have a different checksum should such a thing exist anyway...
So that is integrity taken care of. wink

As for authenticity, checksums don't really provide sufficient proof of authorship, you should be using GPG signatures (or convincing upstream to generate GPG signatures)... fortunately, the next version of makepkg will have support for verify GPG-signed git commits/tags. smile


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB