You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by iw...@apache.org on 2021/03/03 07:10:10 UTC
[bigtop] branch master updated: BIGTOP-3514. Bump GPDB to 5.28.5.
(#746)
This is an automated email from the ASF dual-hosted git repository.
iwasakims pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bigtop.git
The following commit(s) were added to refs/heads/master by this push:
new 66ed0ac BIGTOP-3514. Bump GPDB to 5.28.5. (#746)
66ed0ac is described below
commit 66ed0acc2a9bbdda8533d885dc94c0bd3a015705
Author: Kengo Seki <se...@apache.org>
AuthorDate: Wed Mar 3 16:10:03 2021 +0900
BIGTOP-3514. Bump GPDB to 5.28.5. (#746)
---
.../puppet/modules/gpdb/manifests/init.pp | 128 ++++-----------------
.../common/gpdb/patch1-specify-python-version.diff | 8 +-
bigtop-packages/src/deb/gpdb/control | 2 +-
bigtop-packages/src/rpm/gpdb/SPECS/gpdb.spec | 1 +
bigtop.bom | 2 +-
5 files changed, 27 insertions(+), 114 deletions(-)
diff --git a/bigtop-deploy/puppet/modules/gpdb/manifests/init.pp b/bigtop-deploy/puppet/modules/gpdb/manifests/init.pp
index 97c7822..f5a2525 100644
--- a/bigtop-deploy/puppet/modules/gpdb/manifests/init.pp
+++ b/bigtop-deploy/puppet/modules/gpdb/manifests/init.pp
@@ -40,7 +40,7 @@ class gpdb {
gp_home => $gp_home,
master_port => $master_db_port,
segment_port_prefix => $segment_db_port_prefix,
- require => [Class['gpdb::common::prepare_file_structure'], Package["gpdb"]]
+ require => [Class['gpdb::common::prepare_file_structure'], Exec["install_python_packages"]]
}
gpdb::server{"stop_if_running":
@@ -94,113 +94,25 @@ class gpdb {
}
class install_packages{
- case $operatingsystem{
- /(?i:(centos|fedora|redhat))/: {
- if ($operatingsystem != 'Fedora') {
- if (versioncmp($operatingsystemmajrelease, '8') < 0) {
- $base_url = 'http://download.fedoraproject.org/pub/epel/$releasever/$basearch'
- $python_devel = 'python-devel'
- $python_lockfile = 'python-lockfile'
- } else {
- $base_url = 'http://download.fedoraproject.org/pub/epel/$releasever/Everything/$basearch'
- $python_devel = 'python2-devel'
- $python_lockfile = 'python2-lockfile'
- }
- } else {
- # Looks like it works, at least with Fedora 31
- $base_url = 'http://download.fedoraproject.org/pub/epel/7/$basearch'
- $python_devel = 'python2-devel'
- $python_lockfile = 'python2-lockfile'
- }
- yumrepo { "epel":
- baseurl => $base_url,
- descr => "epel packages",
- enabled => 1,
- gpgcheck => 0,
- }
- package { [$python_devel]:
- ensure => latest,
- }
- package { ["libffi-devel"]:
- ensure => latest,
- }
- package { ["openssl-devel"]:
- ensure => latest,
- }
- package { [$python_lockfile]:
- ensure => latest,
- }
- package { ["gcc"]:
- ensure => latest,
- }
- package { ["make"]:
- ensure => latest,
- }
- package { ["python2-psutil"]:
- ensure => latest,
- }
- package { ["paramiko"]:
- ensure => latest,
- provider => pip,
- require => Package["setuptools"],
- }
- package { ["setuptools"]:
- ensure => latest,
- provider => pip,
- require => Package["pip"],
- }
- package { ["pip"]:
- ensure => latest,
- provider => pip,
- require => File["/usr/bin/pip-python"],
- }
- package { ["python2-pip"]:
- ensure => latest,
- require => [
- Yumrepo["epel"],
- Package["libffi-devel"],
- Package["openssl-devel"],
- Package[$python_lockfile],
- ],
- }
- file { '/usr/bin/pip-python':
- ensure => 'link',
- require => Package["python2-pip"],
- target => '/usr/bin/pip',
- }
- }
- /(?i:(SLES|opensuse))/: {
- }
- /(Amazon)/: { }
- /(Ubuntu|Debian)/: {
- package { ["libffi-dev"]:
- ensure => latest,
- }
- package { ["libssl-dev"]:
- ensure => latest,
- }
- package { ["python-lockfile"]:
- ensure => latest,
- }
- package { ["psutil"]:
- ensure => latest,
- provider => pip,
- require => Package["python-pip"],
- }
- package { ["paramiko"]:
- ensure => latest,
- provider => pip,
- require => Package["python-pip"],
- }
- package { ["python-pip"]:
- ensure => latest,
- require => [
- Package["libffi-dev"],
- Package["libssl-dev"],
- Package["python-lockfile"],
- ],
- }
- }
+ # GPDB 5.x only supports Python 2.x, but we dropped pip for python2 in BIGTOP-3491.
+ # In addition, the latest versions of some distros (Fedora and Ubuntu, at least)
+ # doesn't seem to provide it as a standard package. So we use get-pip.py
+ # (https://pip.pypa.io/en/stable/installing/#installing-with-get-pip-py)
+ # here to install it on all distros.
+ exec { 'download_get_pip':
+ cwd => '/tmp',
+ command => '/usr/bin/curl -sLO https://bootstrap.pypa.io/2.7/get-pip.py'
+ }
+ exec { 'install_pip':
+ cwd => '/tmp',
+ command => '/usr/bin/python2 get-pip.py',
+ require => [Exec["download_get_pip"], Package["gpdb"]],
+ }
+ # GPDB requires the following python packages as of v5.28.5. See
+ # https://github.com/greenplum-db/gpdb/tree/5X_STABLE#building-greenplum-database-with-gporca.
+ exec { 'install_python_packages':
+ command => '/usr/bin/env pip install -q lockfile paramiko psutil',
+ require => [Exec["install_pip"]],
}
package { ["gpdb"]:
ensure => latest,
diff --git a/bigtop-packages/src/common/gpdb/patch1-specify-python-version.diff b/bigtop-packages/src/common/gpdb/patch1-specify-python-version.diff
index 7da7e6a..ea7804a 100644
--- a/bigtop-packages/src/common/gpdb/patch1-specify-python-version.diff
+++ b/bigtop-packages/src/common/gpdb/patch1-specify-python-version.diff
@@ -108,8 +108,8 @@ index d0330c6cac..a81950c072 100644
elif [ "$(BLD_ARCH)" = 'aix7_ppc_64' ]; then \
cd $(PYLIB_SRC)/$(PYGRESQL_DIR) && DESTDIR="$(DESTDIR)" CC="$(CC)" python_64 setup.py build; \
else \
-- cd $(PYLIB_SRC)/$(PYGRESQL_DIR) && DESTDIR="$(DESTDIR)" CC="$(CC)" python setup.py build; \
-+ cd $(PYLIB_SRC)/$(PYGRESQL_DIR) && DESTDIR="$(DESTDIR)" CC="$(CC)" python2 setup.py build; \
+- cd $(PYLIB_SRC)/$(PYGRESQL_DIR) && DESTDIR="$(DESTDIR)" CC="$(CC)" LDFLAGS='$(LDFLAGS) $(PYGRESQL_LDFLAGS)' python setup.py build; \
++ cd $(PYLIB_SRC)/$(PYGRESQL_DIR) && DESTDIR="$(DESTDIR)" CC="$(CC)" LDFLAGS='$(LDFLAGS) $(PYGRESQL_LDFLAGS)' python2 setup.py build; \
fi
mkdir -p $(PYLIB_DIR)/pygresql
if [ `uname -s` = 'Darwin' ]; then \
@@ -147,8 +147,8 @@ index d0330c6cac..a81950c072 100644
- cd $(PYLIB_SRC)/subprocess32 && CC="$(CC)" python setup.py build; \
+ cd $(PYLIB_SRC)/subprocess32 && CC="$(CC)" python2 setup.py build; \
cp -f $(PYLIB_SRC)/subprocess32/build/lib.*/* $(PYLIB_DIR)/; \
+ cp -f $(PYLIB_SRC)/subprocess32/ChangeLog $(PYLIB_DIR)/subprocess32-ChangeLog; \
fi
-
@@ -187,7 +187,7 @@ SETUP_TOOLS_DIR=setuptools-$(SETUP_TOOLS_VERSION)
PARSE_DIR=parse-$(PARSE_VERSION)
ARG_PARSE_DIR=argparse-$(ARG_PARSE_VERSION)
@@ -1983,7 +1983,7 @@ index 40325782fc..40f366d806 100755
--- a/gpMgmt/sbin/packcore
+++ b/gpMgmt/sbin/packcore
@@ -1,4 +1,4 @@
--#!/bin/env python
+-#!/usr/bin/env python
+#!/usr/bin/env python2
# Copyright Pivotal 2014
diff --git a/bigtop-packages/src/deb/gpdb/control b/bigtop-packages/src/deb/gpdb/control
index d7c15a6..0d1f331 100644
--- a/bigtop-packages/src/deb/gpdb/control
+++ b/bigtop-packages/src/deb/gpdb/control
@@ -22,6 +22,6 @@ Homepage: https://github.com/greenplum-db/gpdb
Package: gpdb
Architecture: any
-Depends: ${shlibs:Depends}, python (>= 2.6)
+Depends: ${shlibs:Depends}, python (>= 2.6), python (<< 3)
Description: Greenplum MPP database engine
Provides the Greenplum MPP database engine
diff --git a/bigtop-packages/src/rpm/gpdb/SPECS/gpdb.spec b/bigtop-packages/src/rpm/gpdb/SPECS/gpdb.spec
index f1e9ee8..8ccb45f 100644
--- a/bigtop-packages/src/rpm/gpdb/SPECS/gpdb.spec
+++ b/bigtop-packages/src/rpm/gpdb/SPECS/gpdb.spec
@@ -39,6 +39,7 @@ Source2: install_gpdb.sh
Source3: do-component-configure
#BIGTOP_PATCH_FILES
AutoReqProv: %{autorequire}
+Requires: python2
%description
gpdb
diff --git a/bigtop.bom b/bigtop.bom
index 72b50bc..991a4bf 100644
--- a/bigtop.bom
+++ b/bigtop.bom
@@ -383,7 +383,7 @@ bigtop {
'gpdb' {
name = 'gpdb'
relNotes = 'GreenPlum'
- version { base = '5.10.0'; pkg = '5.10.0'; release = 1 }
+ version { base = '5.28.5'; pkg = '5.28.5'; release = 1 }
tarball { destination = "$name-${version.base}.tar.gz"
source = "${version.base}.tar.gz" }
url { site = "https://github.com/greenplum-db/gpdb/archive/"