|
|
@ -1,5 +1,7 @@ |
|
|
|
%define fullversion 2021-10-13T00-23-17Z |
|
|
|
%define fullversion 2021-10-23T03-28-24Z |
|
|
|
%define realversion %(echo %{fullversion} | sed -e 's/[^0-9]//g' | cut -c -8) |
|
|
|
%define realversion %(echo %{fullversion} | sed -e 's/[^0-9]//g' | cut -c -8) |
|
|
|
|
|
|
|
%define clientversion 2021-10-07T04-19-58Z |
|
|
|
|
|
|
|
%define clientshort %(echo %{fullversion} | sed -e 's/[^0-9]//g' | cut -c -8) |
|
|
|
|
|
|
|
|
|
|
|
%global _hardened_build 1 |
|
|
|
%global _hardened_build 1 |
|
|
|
%define minio_user minio |
|
|
|
%define minio_user minio |
|
|
@ -44,6 +46,12 @@ Requires: minio |
|
|
|
Minio Gateway Package |
|
|
|
Minio Gateway Package |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package client |
|
|
|
|
|
|
|
Summary: Web Object Cloud Storage Client |
|
|
|
|
|
|
|
%description client |
|
|
|
|
|
|
|
Minio Client |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep |
|
|
|
%prep |
|
|
|
%setup -T -q -c %{name}-%{realversion} |
|
|
|
%setup -T -q -c %{name}-%{realversion} |
|
|
|
export GOPATH=`pwd` |
|
|
|
export GOPATH=`pwd` |
|
|
@ -51,6 +59,7 @@ export GO111MODULE=on |
|
|
|
mkdir -p go/src/github.com/minio/ |
|
|
|
mkdir -p go/src/github.com/minio/ |
|
|
|
cd go/src/github.com/minio/ |
|
|
|
cd go/src/github.com/minio/ |
|
|
|
git clone https://github.com/minio/minio |
|
|
|
git clone https://github.com/minio/minio |
|
|
|
|
|
|
|
git clone https://github.com/minio/mc |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build |
|
|
|
%build |
|
|
@ -58,7 +67,8 @@ export GOPATH=`pwd` |
|
|
|
export GO111MODULE=on |
|
|
|
export GO111MODULE=on |
|
|
|
export CGO_ENABLED=0 |
|
|
|
export CGO_ENABLED=0 |
|
|
|
export GOPROXY=https://goproxy.io |
|
|
|
export GOPROXY=https://goproxy.io |
|
|
|
cd go/src/github.com/minio/minio |
|
|
|
cd go/src/github.com/minio |
|
|
|
|
|
|
|
pushd minio |
|
|
|
git checkout tags/RELEASE.%{fullversion} |
|
|
|
git checkout tags/RELEASE.%{fullversion} |
|
|
|
export COMMIT=$(git rev-parse HEAD) |
|
|
|
export COMMIT=$(git rev-parse HEAD) |
|
|
|
export SHORTCOMMIT=$(git rev-parse --short HEAD) |
|
|
|
export SHORTCOMMIT=$(git rev-parse --short HEAD) |
|
|
@ -70,10 +80,16 @@ sed 's/CommitID = goGetTag/CommitID = "'$COMMIT'"/' -i cmd/build-constants.go |
|
|
|
sed 's/ShortCommitID = CommitID\[:12\]/ShortCommitID = "'$SHORTCOMMIT'"/' -i cmd/build-constants.go |
|
|
|
sed 's/ShortCommitID = CommitID\[:12\]/ShortCommitID = "'$SHORTCOMMIT'"/' -i cmd/build-constants.go |
|
|
|
go generate |
|
|
|
go generate |
|
|
|
go build -v -tags kqueue -trimpath --ldflags "-X github.com/minio/minio/cmd.ReleaseTag=RELEASE.%{fullversion} -X github.com/minio/minio/cmd.CommitID=$COMMIT -X github.com/minio/minio/cmd.ShortCommitID=$SHORTCOMMIT -X github.com/minio/minio/cmd.Version=%{version} -extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid %{version}" -o minio |
|
|
|
go build -v -tags kqueue -trimpath --ldflags "-X github.com/minio/minio/cmd.ReleaseTag=RELEASE.%{fullversion} -X github.com/minio/minio/cmd.CommitID=$COMMIT -X github.com/minio/minio/cmd.ShortCommitID=$SHORTCOMMIT -X github.com/minio/minio/cmd.Version=%{version} -extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid %{version}" -o minio |
|
|
|
|
|
|
|
popd |
|
|
|
|
|
|
|
pushd mc |
|
|
|
|
|
|
|
git checkout tags/RELEASE.%{clientversion} |
|
|
|
|
|
|
|
go build -v -tags kqueue -trimpath --ldflags "-X github.com/minio/minio/cmd.ReleaseTag=RELEASE.%{fullversion} -X github.com/minio/minio/cmd.CommitID=$COMMIT -X github.com/minio/minio/cmd.ShortCommitID=$SHORTCOMMIT -X github.com/minio/minio/cmd.Version=%{version} -extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid %{version}" -o minio-mc |
|
|
|
|
|
|
|
popd |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install |
|
|
|
%install |
|
|
|
install -p -D -m 0555 go/src/github.com/minio/minio/minio %{buildroot}%{_bindir}/minio |
|
|
|
install -p -D -m 0555 go/src/github.com/minio/minio/minio %{buildroot}%{_bindir}/minio |
|
|
|
|
|
|
|
install -p -D -m 0555 go/src/github.com/minio/mc/minio-mc %{buildroot}%{_bindir}/minio-mc |
|
|
|
install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/minio/server |
|
|
|
install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/minio/server |
|
|
|
install -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/minio/gateway |
|
|
|
install -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/minio/gateway |
|
|
|
install -p -D -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/minio-server.service |
|
|
|
install -p -D -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/minio-server.service |
|
|
@ -126,4 +142,8 @@ test "$v" = RELEASE.%{fullversion} |
|
|
|
%{_unitdir}/minio-gateway.service |
|
|
|
%{_unitdir}/minio-gateway.service |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files client |
|
|
|
|
|
|
|
%{_bindir}/minio-mc |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog |
|
|
|
%changelog |
|
|
|