cat /etc/os-release
NAME="openEuler"
VERSION="22.03 (LTS-SP3)"
ID="openEuler"
VERSION_ID="22.03"
PRETTY_NAME="openEuler 22.03 (LTS-SP3)"
ANSI_COLOR="0;31"
目前已经试过从git-lfs的centos的各种版本源码编译,最终得到的都是:```
求成功安装的大佬分享一下步骤
cat /etc/os-release
NAME="openEuler"
VERSION="22.03 (LTS-SP3)"
ID="openEuler"
VERSION_ID="22.03"
PRETTY_NAME="openEuler 22.03 (LTS-SP3)"
ANSI_COLOR="0;31"
目前已经试过从git-lfs的centos的各种版本源码编译,最终得到的都是:```
求成功安装的大佬分享一下步骤
OEPKGS-SEARCH中提供了20.03版本的git-lfs
其他版本可以从src-openEuler中下载构建脚本和源码,在本地安装,下面是我在22.03-sp2下的安装过程,楼主可以参考一下
git clone https://gitee.com/src-openeuler/git-lfs
cd git-lfs
dnf install rpm-build
mkdir -p ~/rpmbuild/SPECS
mkdir -p ~/rpmbuild/RPMS
mkdir -p ~/rpmbuild/SOURCES
mkdir -p ~/rpmbuild/BUILD
cp ./git-lfs.spec ~/rpmbuild/SPECS/
cp ./git-lfs-v3.2.0.tar.gz ~/rpmbuild/SOURCES
cp ./0001-use-vendor-dir-for-build.patch ~/rpmbuild/SOURCES
dnf install golang
cd ~/rpmbuild/SPECS
rpmbuild -bb git-lfs.spec
dnf install ../RPMS/x86/git-lfs-3.2.0-1.x86_64.rpm
楼主给个解决方案,赞,一键三连!!
谢谢大佬分享!但是我还没有成功
可以贴一下报错
TLDR: 疑似是在~/rpmbuild/BUILD/git-lfs-3.2.0/src/github.com/git-lfs/git-lfs
里面执行make
的时候出错了,连续报了一堆fatal: not a git repository (or any of the parent directories): .git
(应该是解压出来的src目录里面没有.git
导致的)?
执行的步骤是
cd ~/rpmbuild/SPECS
rpmbuild -bb git-lfs.spec
dnf install ../RPMS/x86/git-lfs-3.2.0-1.x86_64.rpm
得到如下报错
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.s74rWi
+ umask 022
+ cd /home/ma-user/rpmbuild/BUILD
+ cd /home/ma-user/rpmbuild/BUILD
+ rm -rf git-lfs-3.2.0
+ /usr/bin/gzip -dc /home/ma-user/rpmbuild/SOURCES/git-lfs-v3.2.0.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd git-lfs-3.2.0
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ /usr/bin/cat /home/ma-user/rpmbuild/SOURCES/0001-use-vendor-dir-for-build.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ cd ..
+ mv git-lfs-3.2.0 git-lfs
+ mkdir -p git-lfs-3.2.0/src/github.com/git-lfs
+ mv git-lfs git-lfs-3.2.0/src/github.com/git-lfs/
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.YbPHKf
+ umask 022
+ cd /home/ma-user/rpmbuild/BUILD
+ cd git-lfs-3.2.0
+ pushd src/github.com/git-lfs/git-lfs
~/rpmbuild/BUILD/git-lfs-3.2.0/src/github.com/git-lfs/git-lfs ~/rpmbuild/BUILD/git-lfs-3.2.0
+ make
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
delete this step
git-lfs: skipping fmt, no goimports found at `goimports` ...
delete this step
mkdir -p po/build
if command -v msgfmt >/dev/null 2>&1; \
then \
msgfmt -o po/build/es.mo po/es.po; \
fi
delete this step
fatal: not a git repository (or any of the parent directories): .git
GO111MODULE=on GOOS= GOARCH= go build -mod=vendor -ldflags=""-linkmode=external" -X github.c
om/git-lfs/git-lfs/config.GitCommit= -s -w " -gcflags=" " -trimpath -o ./bin/git-lfs ./git-l
fs.go
+ popd
~/rpmbuild/BUILD/git-lfs-3.2.0
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.tSwaaS
+ umask 022
+ cd /home/ma-user/rpmbuild/BUILD
+ '[' /home/ma-user/rpmbuild/BUILDROOT/git-lfs-3.2.0-1.aarch64 '!=' / ']'
+ rm -rf /home/ma-user/rpmbuild/BUILDROOT/git-lfs-3.2.0-1.aarch64
++ dirname /home/ma-user/rpmbuild/BUILDROOT/git-lfs-3.2.0-1.aarch64
+ mkdir -p /home/ma-user/rpmbuild/BUILDROOT
+ mkdir /home/ma-user/rpmbuild/BUILDROOT/git-lfs-3.2.0-1.aarch64
+ cd git-lfs-3.2.0
+ install -Dpm0755 src/github.com/git-lfs/git-lfs/bin/git-lfs /home/ma-user/rpmbuild/BUILDRO
OT/git-lfs-3.2.0-1.aarch64/usr/bin/git-lfs
+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/brp-ldconfig
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-strip /usr/bin/strip
+ /usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
+ /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1 1
+ /usr/lib/rpm/brp-python-hardlink
Processing files: git-lfs-3.2.0-1.aarch64
__brp_dim_baseline not set, ignore dim baseline generating
Provides: git-lfs = 3.2.0-1 git-lfs(aarch-64) = 3.2.0-1
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpml
ib(PayloadFilesHavePrefix) <= 4.0-1
Requires: libc.so.6()(64bit) libc.so.6(GLIBC_2.17)(64bit) libc.so.6(GLIBC_2.32)(64bit) libc.
so.6(GLIBC_2.34)(64bit) rtld(GNU_HASH)
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/ma-user/rpmbuild/BUILDROOT/g
it-lfs-3.2.0-1.aarch64
Wrote: /home/ma-user/rpmbuild/RPMS/aarch64/git-lfs-3.2.0-1.aarch64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.CTYwWW
+ umask 022
+ cd /home/ma-user/rpmbuild/BUILD
+ cd git-lfs-3.2.0
+ /usr/bin/rm -rf /home/ma-user/rpmbuild/BUILDROOT/git-lfs-3.2.0-1.aarch64
+ RPM_EC=0
++ jobs -p
+ exit 0
Repository base is listed more than once in the configuration
Error: This command has to be run with superuser privileges (under the root user on most sys
tems).