Accepting request 924778 from server:database
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/924778 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/percona-toolkit?expand=0&rev=40
This commit is contained in:
commit
f60b17d6b2
29
go-build.patch
Normal file
29
go-build.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
Index: percona-toolkit-3.3.1/src/go/Makefile
|
||||||
|
===================================================================
|
||||||
|
--- percona-toolkit-3.3.1.orig/src/go/Makefile
|
||||||
|
+++ percona-toolkit-3.3.1/src/go/Makefile
|
||||||
|
@@ -14,9 +14,9 @@ FILES = $(shell find . -type f -name '*.
|
||||||
|
|
||||||
|
PREFIX=$(shell pwd)
|
||||||
|
TOP_DIR=$(shell git rev-parse --show-toplevel)
|
||||||
|
-BIN_DIR=$(shell git rev-parse --show-toplevel)/bin
|
||||||
|
-SRC_DIR=$(shell git rev-parse --show-toplevel)/src/go
|
||||||
|
-LDFLAGS="-X main.Version=${VERSION} -X main.Build=${BUILD} -X main.GoVersion=${GOVERSION} -X main.Commit=${COMMIT} -s -w"
|
||||||
|
+BIN_DIR=$(TOP_DIR)/bin
|
||||||
|
+SRC_DIR=$(TOP_DIR)/src/go
|
||||||
|
+LDFLAGS="-X main.Version=${VERSION} -X main.Build=${BUILD} -X main.GoVersion=${GOVERSION} -X main.Commit=${COMMIT} -w"
|
||||||
|
|
||||||
|
TEST_PSMDB_VERSION?=4.0
|
||||||
|
TEST_MONGODB_FLAVOR?=percona/percona-server-mongodb
|
||||||
|
@@ -111,6 +111,11 @@ env-down: env ## Clean-up MongoDB doc
|
||||||
|
docker-compose down -v
|
||||||
|
rm .env
|
||||||
|
|
||||||
|
+linux: ## Build Mongo tools for linux-amd64
|
||||||
|
+ echo "Building linux binaries in ${BIN_DIR}"
|
||||||
|
+ $(foreach pkg,$(pkgs),rm -f ${BIN_DIR}/$(pkg) 2> /dev/null;)
|
||||||
|
+ $(foreach pkg,$(pkgs),go build -mod=vendor -buildmode=pie -ldflags ${LDFLAGS} -o ${BIN_DIR}/$(pkg) ./$(pkg);)
|
||||||
|
+
|
||||||
|
linux-amd64: ## Build Mongo tools for linux-amd64
|
||||||
|
@echo "Building linux/amd64 binaries in ${BIN_DIR}"
|
||||||
|
@cd ${TOP_DIR} && go get ./...
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Oct 5 02:35:34 UTC 2021 - Marcus Rueckert <mrueckert@suse.de>
|
||||||
|
|
||||||
|
- enable golang based tools
|
||||||
|
1. package is no longer noarch
|
||||||
|
2. added go-build.patch
|
||||||
|
3. add BR for golang tools
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Apr 30 06:39:28 UTC 2021 - Denys Kondratenko <stdden@opensuse.org>
|
Fri Apr 30 06:39:28 UTC 2021 - Denys Kondratenko <stdden@opensuse.org>
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
%define revision 6917c5d
|
||||||
|
|
||||||
Name: percona-toolkit
|
Name: percona-toolkit
|
||||||
Version: 3.3.1
|
Version: 3.3.1
|
||||||
@ -24,7 +25,10 @@ License: GPL-2.0-only
|
|||||||
Group: Productivity/Databases/Tools
|
Group: Productivity/Databases/Tools
|
||||||
URL: https://www.percona.com/software/percona-toolkit/
|
URL: https://www.percona.com/software/percona-toolkit/
|
||||||
Source: https://www.percona.com/downloads/%{name}/%{version}/source/tarball/%{name}-%{version}.tar.gz
|
Source: https://www.percona.com/downloads/%{name}/%{version}/source/tarball/%{name}-%{version}.tar.gz
|
||||||
|
Source1: vendor.tar.xz
|
||||||
Source2: %{name}.conf
|
Source2: %{name}.conf
|
||||||
|
Source9: series
|
||||||
|
Patch1: go-build.patch
|
||||||
Requires: perl(DBD::mysql) >= 1.0
|
Requires: perl(DBD::mysql) >= 1.0
|
||||||
Requires: perl(DBI) >= 1.13
|
Requires: perl(DBI) >= 1.13
|
||||||
Requires: perl(IO::Socket::SSL)
|
Requires: perl(IO::Socket::SSL)
|
||||||
@ -32,8 +36,10 @@ Requires: perl(Term::ReadKey) >= 2.10
|
|||||||
Requires: perl(Time::HiRes)
|
Requires: perl(Time::HiRes)
|
||||||
Provides: maatkit = 7410.%{version}
|
Provides: maatkit = 7410.%{version}
|
||||||
Obsoletes: maatkit < 7410
|
Obsoletes: maatkit < 7410
|
||||||
BuildArch: noarch
|
BuildRequires: golang-packaging
|
||||||
|
BuildRequires: golang(API)
|
||||||
%{perl_requires}
|
%{perl_requires}
|
||||||
|
%{go_nostrip}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Percona Toolkit is a collection of advanced command-line tools used by
|
Percona Toolkit is a collection of advanced command-line tools used by
|
||||||
@ -52,13 +58,21 @@ visit http://www.percona.com/software/.
|
|||||||
This collection was formerly known as Maatkit.
|
This collection was formerly known as Maatkit.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup
|
%autosetup -p1 -a 1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
perl Makefile.PL INSTALLDIRS=vendor < /dev/null
|
perl Makefile.PL INSTALLDIRS=vendor < /dev/null
|
||||||
sed -i 's|%{_bindir}/env perl|%{_bindir}/perl|' bin/*
|
sed -i 's|%{_bindir}/env perl|%{_bindir}/perl|' bin/*
|
||||||
sed -i 's|%{_bindir}/env bash|%{_bindir}/bash|' bin/*
|
sed -i 's|%{_bindir}/env bash|%{_bindir}/bash|' bin/*
|
||||||
%make_build
|
%make_build
|
||||||
|
pushd src/go
|
||||||
|
make linux \
|
||||||
|
TOP_DIR=../../ \
|
||||||
|
BIN_DIR=../../bingo/ \
|
||||||
|
VERSION=%{version} \
|
||||||
|
BUILD=$(date -u '+%FT%T%z' -d @${SOURCE_DATE_EPOCH}) \
|
||||||
|
COMMIT=%{revision}
|
||||||
|
popd
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%perl_make_install
|
%perl_make_install
|
||||||
@ -70,6 +84,7 @@ rm -rf %{buildroot}%{_localstatedir}/adm/perl-modules/%{name}
|
|||||||
# a blank configuration file
|
# a blank configuration file
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/%{name}
|
mkdir -p %{buildroot}%{_sysconfdir}/%{name}
|
||||||
cp %{SOURCE2} %{buildroot}%{_sysconfdir}/%{name}/
|
cp %{SOURCE2} %{buildroot}%{_sysconfdir}/%{name}/
|
||||||
|
cp -a bingo/* %{buildroot}%{_bindir}/
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license COPYING
|
%license COPYING
|
||||||
|
3
vendor.tar.xz
Normal file
3
vendor.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:f517890e013ad0e9c06b8137181a2775e94fe77e6e2b8dca8b76ff60d721629a
|
||||||
|
size 1860576
|
Loading…
Reference in New Issue
Block a user