1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 03:05:48 +03:00
aports/community/git-lfs/APKBUILD
Craig Andrews dc00dba73a community/git-lfs: upgrade to 3.3.0
Signed-off-by: Craig Andrews <candrews@integralblue.com>
2023-03-08 22:33:24 +00:00

83 lines
2.3 KiB
Text

# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=git-lfs
pkgver=3.3.0
pkgrel=0
pkgdesc="Git extension for versioning large files"
url="https://git-lfs.github.io/"
arch="all"
license="MIT"
depends="git"
makedepends="asciidoctor go ronn"
checkdepends="bash coreutils git-daemon perl-utils"
install="$pkgname.post-install $pkgname.pre-deinstall"
subpackages="$pkgname-doc"
source="git-lfs-$pkgver.tar.gz::https://github.com/git-lfs/git-lfs/archive/v$pkgver.tar.gz
makefile-extra_go_flags.patch
fix-test-branch-name.patch
"
[ "$CARCH" = "x86" ] && options="!check" # tests broken on x86
# secfixes:
# 3.1.2-r4:
# - CVE-2022-27191
# 3.1.2-r3:
# - CVE-2021-38561
# 0:
# - CVE-2020-27955 # (only affect windows)
# -tags netcgo - use system's DNS resolver by default. Go's built-in DNS
# resolver is buggy; it resolved localhost to totally wrong IP
# address on ARM builders and so caused test failures.
_goflags="$GOFLAGS -v -tags netcgo"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
prepare() {
default_prepare
# upgrade golang.org/x/text - CVE-2021-38561
go get golang.org/x/text
# CVE-2022-27191
go get golang.org/x/crypto/ssh
}
build() {
make \
EXTRA_GO_FLAGS="$_goflags" \
GIT_LFS_SHA="v$pkgver" \
VERSION="v$pkgver"
make man
}
check() {
make integration EXTRA_GO_FLAGS="$_goflags" TEST_SKIP_LFS_TRANSFER=true
}
package() {
local docdir="$pkgdir/usr/share/doc/$pkgname"
local mandir="$pkgdir/usr/share/man"
install -Dm755 bin/$pkgname "$pkgdir"/usr/bin/$pkgname
install -Dm644 man/man1/*.1 -t "$mandir"/man1/
install -Dm644 man/man5/*.5 -t "$mandir"/man5/
mkdir -p "$docdir"
cp -r docs/*.md docs/api "$docdir"/
rm -r "$docdir"/api/schemas
}
cleanup_srcdir() {
go clean -modcache
default_cleanup_srcdir
}
sha512sums="
c339a61c23950d249ac135d75c9b9c4b871f491535d6d6a0accbf06efe36798566502ab310396f44acdc1d93aa7358a719a81428042fb2eda1ab237b08e4ba41 git-lfs-3.3.0.tar.gz
2d793da75b37324936407948fdb634ff4c510c4dd4d3575c2459b81a0a6eb8f2464f5066ae99e88d5bf69e357fd60354b9d9d53e062cb6ba709f5f3a39858466 makefile-extra_go_flags.patch
7bf0db3be06ba75429a3bbe7d45c4738443912e8e0c80fa2cbdfe76a5ffca720c0f6f638178e0dcc3e2781613b4be575e6583ca3e55f430ab76420118d87cb45 fix-test-branch-name.patch
"