NAME: gpdb Version: 6.17.0 Release: 1 Summary: Open Source Greenplum Database License: Apache 2.0 URL: https://github.com/greenplum-db/gpdb Source0: https://github.com/greenplum-db/gpdb/releases/download/%{version}/%{version}-src-full.tar.gz Patch0: orca1.patch Patch1: orca2.patch Patch2: unittest-fix.patch BuildRequires: python2-devel python2-pip BuildRequires: apr-devel bison bzip2-devel cmake3 flex gcc gcc-c++ krb5-devel libcurl-devel libevent-devel libkadm5 libyaml-devel libxml2-devel libzstd-devel openssl-devel perl-ExtUtils-Embed readline-devel xerces-c-devel zlib-devel Requires: apr apr-util bash bzip2 curl iproute krb5-devel less libcurl libxml2 libyaml net-tools openldap openssh openssh-clients openssh-server openssl perl readline rsync sed tar which zip zlib Requires: hostname net-tools iputils %description Greenplum Database - Massively Parallel PostgreSQL for Analytics. An open-source massively parallel data platform for analytics, machine learning and AI. %prep %setup -q -n gpdb_src %patch0 -p1 %patch1 -p1 %patch2 -p1 # gpdb has extra components that depends on headers and libs to be installed first, so set prefix to a writable path and move it back later. ./configure --enable-orca --with-gssapi --disable-rpath --prefix=$PWD/greenplum-db-%{version} --with-libxml --with-openssl --enable-cassert --enable-debug --enable-debug-extensions --disable-mapreduce --enable-orafce --without-perl --with-python %build make %{?_smp_mflags} install %install rm -rf $RPM_BUILD_ROOT mkdir -p %{buildroot}/usr/local cp -rf %{_builddir}/gpdb_src/greenplum-db-%{version} %{buildroot}/usr/local/ %check # Unit test source greenplum-db-%{version}/greenplum_path.sh %ifarch x86_64 make -s unittest-check %endif # There is a known issue on ARM tests, which is related with mockery framework. # Upstream issue: https://github.com/google/cmockery/issues/67 # For the following test, only the 1 test is failure. # So we force to run the test on aarch64 platform. %ifarch aarch64 make -s unitest-check || true %endif # warmup env sleep 5 # regression test TEST_USER=$USER # setup password-less login echo "y" | ssh-keygen -f ~/.ssh/id_rsa -P "" touch ~/.ssh/authorized_keys chmod 600 ~/.ssh/authorized_keys cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys export USER=$TEST_USER export PGUSER=$TEST_USER # setup gpdb cluster ulimit -n 65535 make -C gpAux/gpdemo cluster warmup env sleep 5 source gpAux/gpdemo/gpdemo-env.sh make -C src/test/regress installcheck %files %dir /usr/local/greenplum-db-%{version} /usr/local/greenplum-db-%{version}