mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-09 22:36:36 +02:00
community/git-lfs2: new aport
See !27376 Co-Authored-By: Simon Frankenberger <simon-alpine@fraho.eu>
This commit is contained in:
parent
db3124946b
commit
6708603fc4
75
community/git-lfs2/APKBUILD
Normal file
75
community/git-lfs2/APKBUILD
Normal file
@ -0,0 +1,75 @@
|
||||
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
||||
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
|
||||
pkgname=git-lfs2
|
||||
_projname=git-lfs
|
||||
pkgver=2.13.3
|
||||
pkgrel=0
|
||||
pkgdesc="Git extension for versioning large files (version 2.x)"
|
||||
url="https://git-lfs.github.io/"
|
||||
arch="all"
|
||||
license="MIT"
|
||||
depends="git !git-lfs"
|
||||
makedepends="go ronn"
|
||||
checkdepends="bash coreutils git-daemon perl-utils"
|
||||
install="$pkgname.post-install $pkgname.pre-deinstall"
|
||||
subpackages="$pkgname-doc"
|
||||
source="https://github.com/git-lfs/git-lfs/archive/v$pkgver/$_projname-$pkgver.tar.gz
|
||||
makefile-extra_go_flags.patch
|
||||
patch-env-compare-git-grep-prefix.patch
|
||||
"
|
||||
builddir="$srcdir/$_projname-$pkgver"
|
||||
|
||||
[ "$CARCH" = "x86" ] && options="!check" # tests broken on x86
|
||||
|
||||
# secfixes:
|
||||
# 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="-v -tags netcgo"
|
||||
|
||||
|
||||
build() {
|
||||
make \
|
||||
EXTRA_GO_FLAGS="$_goflags" \
|
||||
GIT_LFS_SHA="v$pkgver" \
|
||||
VERSION="v$pkgver"
|
||||
make man
|
||||
}
|
||||
|
||||
check() {
|
||||
make integration EXTRA_GO_FLAGS="$_goflags"
|
||||
}
|
||||
|
||||
package() {
|
||||
local docdir="$pkgdir/usr/share/doc/git-lfs"
|
||||
local mandir="$pkgdir/usr/share/man"
|
||||
|
||||
install -Dm755 bin/git-lfs "$pkgdir"/usr/bin/git-lfs
|
||||
|
||||
mkdir -p "$mandir"/man1 "$mandir"/man5
|
||||
install -m 644 man/*.1 "$mandir"/man1/
|
||||
install -m 644 man/*.5 "$mandir"/man5/
|
||||
|
||||
mkdir -p "$docdir"
|
||||
cp -r docs/*.md docs/api "$docdir"/
|
||||
rm -r "$docdir"/api/schemas
|
||||
}
|
||||
|
||||
doc() {
|
||||
default_doc
|
||||
depends="!git-lfs-doc"
|
||||
}
|
||||
|
||||
cleanup_srcdir() {
|
||||
go clean -modcache
|
||||
default_cleanup_srcdir
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
2c9e10e4f2fdb5d6bae8994db5879f50596109f3057e7369a9edca3c13c3f4d77e268e3903a0abca60cf8e342ff54bc4920c01a530f8eb400e3a0cc11a171f74 git-lfs-2.13.3.tar.gz
|
||||
2d793da75b37324936407948fdb634ff4c510c4dd4d3575c2459b81a0a6eb8f2464f5066ae99e88d5bf69e357fd60354b9d9d53e062cb6ba709f5f3a39858466 makefile-extra_go_flags.patch
|
||||
335ee5ef04247f8420051c75d04a59d1ebbd0cad9ec1da25ae07b5940d419c15b154f946f3c3e1fa9978201bb730f2401c5f7f606377c114fc224b8be5027d6c patch-env-compare-git-grep-prefix.patch
|
||||
"
|
||||
3
community/git-lfs2/git-lfs2.post-install
Normal file
3
community/git-lfs2/git-lfs2.post-install
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
git-lfs install --skip-repo --system
|
||||
3
community/git-lfs2/git-lfs2.pre-deinstall
Normal file
3
community/git-lfs2/git-lfs2.pre-deinstall
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
git-lfs uninstall --system
|
||||
24
community/git-lfs2/makefile-extra_go_flags.patch
Normal file
24
community/git-lfs2/makefile-extra_go_flags.patch
Normal file
@ -0,0 +1,24 @@
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -136,7 +136,7 @@
|
||||
# It uses BUILD_MAIN as defined above to specify the entrypoint for building Git
|
||||
# LFS.
|
||||
BUILD = GOOS=$(1) GOARCH=$(2) \
|
||||
- $(GO) build \
|
||||
+ $(GO) build $(EXTRA_GO_FLAGS) \
|
||||
-ldflags="$(LD_FLAGS)" \
|
||||
-gcflags="$(GC_FLAGS)" \
|
||||
-asmflags="$(ASM_FLAGS)" \
|
||||
|
||||
--- a/t/Makefile
|
||||
+++ b/t/Makefile
|
||||
@@ -45,7 +45,7 @@
|
||||
$(RM) $(TEST_CMDS)
|
||||
|
||||
../bin/%$X : cmd/%.go
|
||||
- go build -o $@ $^
|
||||
+ go build $(EXTRA_GO_FLAGS) -o $@ $^
|
||||
|
||||
../bin/git-lfs-test-server-api$X : $(TEST_API_SRCS)
|
||||
- go build -o $@ $^
|
||||
+ go build $(EXTRA_GO_FLAGS) -o $@ $^
|
||||
203
community/git-lfs2/patch-env-compare-git-grep-prefix.patch
Normal file
203
community/git-lfs2/patch-env-compare-git-grep-prefix.patch
Normal file
@ -0,0 +1,203 @@
|
||||
Patch-Source: https://github.com/git-lfs/git-lfs/pull/4678
|
||||
--- old/t/t-env.sh
|
||||
+++ new/t/t-env.sh
|
||||
@@ -26,7 +26,7 @@
|
||||
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/.git/lfs")
|
||||
localmedia=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/objects")
|
||||
tempdir=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/tmp")
|
||||
- envVars=$(printf "%s" "$(env | grep "^GIT")")
|
||||
+ envVars=$(printf "%s" "$(env | grep "^GIT_")")
|
||||
|
||||
expected=$(printf '%s
|
||||
%s
|
||||
@@ -79,7 +79,7 @@
|
||||
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/.git/lfs")
|
||||
localmedia=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/objects")
|
||||
tempdir=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/tmp")
|
||||
- envVars=$(printf "%s" "$(env | grep "^GIT")")
|
||||
+ envVars=$(printf "%s" "$(env | grep "^GIT_")")
|
||||
expected=$(printf '%s
|
||||
%s
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/.git/lfs")
|
||||
localmedia=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/objects")
|
||||
tempdir=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/tmp")
|
||||
- envVars=$(printf "%s" "$(env | grep "^GIT")")
|
||||
+ envVars=$(printf "%s" "$(env | grep "^GIT_")")
|
||||
expected=$(printf '%s
|
||||
%s
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/.git/lfs")
|
||||
localmedia=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/objects")
|
||||
tempdir=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/tmp")
|
||||
- envVars=$(printf "%s" "$(env | grep "^GIT")")
|
||||
+ envVars=$(printf "%s" "$(env | grep "^GIT_")")
|
||||
|
||||
expected=$(printf '%s
|
||||
%s
|
||||
@@ -255,7 +255,7 @@
|
||||
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/.git/lfs")
|
||||
localmedia=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/objects")
|
||||
tempdir=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/tmp")
|
||||
- envVars=$(printf "%s" "$(env | grep "^GIT")")
|
||||
+ envVars=$(printf "%s" "$(env | grep "^GIT_")")
|
||||
expected=$(printf '%s
|
||||
%s
|
||||
|
||||
@@ -316,7 +316,7 @@
|
||||
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/.git/lfs")
|
||||
localmedia=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/objects")
|
||||
tempdir=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/tmp")
|
||||
- envVars=$(printf "%s" "$(env | grep "^GIT")")
|
||||
+ envVars=$(printf "%s" "$(env | grep "^GIT_")")
|
||||
expected=$(printf '%s
|
||||
%s
|
||||
|
||||
@@ -377,7 +377,7 @@
|
||||
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/.git/lfs")
|
||||
localmedia=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/objects")
|
||||
tempdir=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/tmp")
|
||||
- envVars=$(printf "%s" "$(env | grep "^GIT")")
|
||||
+ envVars=$(printf "%s" "$(env | grep "^GIT_")")
|
||||
expected=$(printf '%s
|
||||
%s
|
||||
|
||||
@@ -447,7 +447,7 @@
|
||||
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/.git/lfs")
|
||||
localmedia=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/objects")
|
||||
tempdir=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/tmp")
|
||||
- envVars=$(printf "%s" "$(env | grep "^GIT")")
|
||||
+ envVars=$(printf "%s" "$(env | grep "^GIT_")")
|
||||
expected=$(printf '%s
|
||||
%s
|
||||
|
||||
@@ -504,7 +504,7 @@
|
||||
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/.git/lfs")
|
||||
localmedia=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/objects")
|
||||
tempdir=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/tmp")
|
||||
- envVars="$(GIT_DIR=$gitDir GIT_WORK_TREE=$workTree env | grep "^GIT" | sort)"
|
||||
+ envVars="$(GIT_DIR=$gitDir GIT_WORK_TREE=$workTree env | grep "^GIT_" | sort)"
|
||||
expected=$(printf '%s
|
||||
%s
|
||||
|
||||
@@ -553,7 +553,7 @@
|
||||
| grep -v "^GIT_EXEC_PATH=")
|
||||
contains_same_elements "$expected" "$actual4"
|
||||
|
||||
- envVars="$(GIT_DIR=$gitDir GIT_WORK_TREE=a/b env | grep "^GIT" | sort)"
|
||||
+ envVars="$(GIT_DIR=$gitDir GIT_WORK_TREE=a/b env | grep "^GIT_" | sort)"
|
||||
|
||||
# `a/b` is an invalid relative path from where we are now and results in an
|
||||
# error, so resulting output will have many fields blank or invalid
|
||||
@@ -594,7 +594,7 @@
|
||||
contains_same_elements "$expected5" "$actual5"
|
||||
|
||||
cd $TRASHDIR/$reponame/a/b
|
||||
- envVars="$(GIT_DIR=$gitDir env | grep "^GIT" | sort)"
|
||||
+ envVars="$(GIT_DIR=$gitDir env | grep "^GIT_" | sort)"
|
||||
expected7=$(printf '%s
|
||||
%s
|
||||
|
||||
@@ -627,7 +627,7 @@
|
||||
contains_same_elements "$expected7" "$actual7"
|
||||
|
||||
cd $TRASHDIR/$reponame/a
|
||||
- envVars="$(GIT_WORK_TREE=$workTree env | grep "^GIT" | sort)"
|
||||
+ envVars="$(GIT_WORK_TREE=$workTree env | grep "^GIT_" | sort)"
|
||||
expected8=$(printf '%s
|
||||
%s
|
||||
|
||||
@@ -674,7 +674,7 @@
|
||||
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/lfs")
|
||||
localmedia=$(canonical_path "$TRASHDIR/$reponame/lfs/objects")
|
||||
tempdir=$(canonical_path "$TRASHDIR/$reponame/lfs/tmp")
|
||||
- envVars=$(printf "%s" "$(env | grep "^GIT")")
|
||||
+ envVars=$(printf "%s" "$(env | grep "^GIT_")")
|
||||
|
||||
expected=$(printf "%s\n%s\n
|
||||
LocalWorkingDir=
|
||||
@@ -744,7 +744,7 @@
|
||||
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/lfs")
|
||||
localmedia=$(canonical_path "$TRASHDIR/$reponame/lfs/objects")
|
||||
tempdir=$(canonical_path "$TRASHDIR/$reponame/lfs/tmp")
|
||||
- envVars=$(printf "%s" "$(env | grep "^GIT")")
|
||||
+ envVars=$(printf "%s" "$(env | grep "^GIT_")")
|
||||
|
||||
localwd=$(canonical_path "$TRASHDIR/$reponame")
|
||||
localgit=$(canonical_path "$TRASHDIR/$reponame/.git")
|
||||
@@ -752,7 +752,7 @@
|
||||
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/.git/lfs")
|
||||
localmedia=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/objects")
|
||||
tempdir=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/tmp")
|
||||
- envVars=$(printf "%s" "$(env | grep "^GIT")")
|
||||
+ envVars=$(printf "%s" "$(env | grep "^GIT_")")
|
||||
|
||||
expectedenabled=$(printf '%s
|
||||
%s
|
||||
@@ -819,7 +819,7 @@
|
||||
contains_same_elements "$expecteddisabled" "$actual"
|
||||
|
||||
# now enable via env var
|
||||
- envVarsEnabled=$(printf "%s" "$(GIT_LFS_SKIP_DOWNLOAD_ERRORS=1 env | grep "^GIT")")
|
||||
+ envVarsEnabled=$(printf "%s" "$(GIT_LFS_SKIP_DOWNLOAD_ERRORS=1 env | grep "^GIT_")")
|
||||
expectedenabled2=$(printf '%s
|
||||
%s
|
||||
|
||||
@@ -873,7 +873,7 @@
|
||||
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/lfs")
|
||||
localmedia=$(canonical_path "$TRASHDIR/$reponame/lfs/objects")
|
||||
tempdir=$(canonical_path "$TRASHDIR/$reponame/lfs/tmp")
|
||||
- envVars=$(printf "%s" "$(env | grep "^GIT")")
|
||||
+ envVars=$(printf "%s" "$(env | grep "^GIT_")")
|
||||
|
||||
localwd=$(canonical_path "$TRASHDIR/$reponame")
|
||||
localgit=$(canonical_path "$TRASHDIR/$reponame/.git")
|
||||
@@ -881,7 +881,7 @@
|
||||
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/.git/lfs")
|
||||
localmedia=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/objects")
|
||||
tempdir=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/tmp")
|
||||
- envVars=$(printf "%s" "$(env | grep "^GIT")")
|
||||
+ envVars=$(printf "%s" "$(env | grep "^GIT_")")
|
||||
|
||||
expectedenabled=$(printf '%s
|
||||
%s
|
||||
@@ -940,7 +940,7 @@
|
||||
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/.git/lfs")
|
||||
localmedia=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/objects")
|
||||
tempdir=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/tmp")
|
||||
- envVars=$(printf "%s" "$(env | grep "^GIT")")
|
||||
+ envVars=$(printf "%s" "$(env | grep "^GIT_")")
|
||||
expected=$(printf '%s
|
||||
%s
|
||||
|
||||
@@ -1005,7 +1005,7 @@
|
||||
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/.git/lfs")
|
||||
localmedia=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/objects")
|
||||
tempdir=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/tmp")
|
||||
- envVars=$(printf "%s" "$(env | grep "^GIT")")
|
||||
+ envVars=$(printf "%s" "$(env | grep "^GIT_")")
|
||||
expected=$(printf '%s
|
||||
%s
|
||||
|
||||
--- old/t/t-worktree.sh
|
||||
+++ new/t/t-worktree.sh
|
||||
@@ -49,7 +49,7 @@
|
||||
AccessUpload=none
|
||||
DownloadTransfers=basic,lfs-standalone-file
|
||||
UploadTransfers=basic,lfs-standalone-file
|
||||
-$(escape_path "$(env | grep "^GIT")")
|
||||
+$(escape_path "$(env | grep "^GIT_")")
|
||||
%s
|
||||
" "$(git lfs version)" "$(git version)" "$envInitConfig")
|
||||
actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
|
||||
@@ -85,7 +85,7 @@
|
||||
AccessUpload=none
|
||||
DownloadTransfers=basic,lfs-standalone-file
|
||||
UploadTransfers=basic,lfs-standalone-file
|
||||
-$(escape_path "$(env | grep "^GIT")")
|
||||
+$(escape_path "$(env | grep "^GIT_")")
|
||||
%s
|
||||
" "$(git lfs version)" "$(git version)" "$envInitConfig")
|
||||
actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
|
||||
Loading…
x
Reference in New Issue
Block a user