Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions GNUmakefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,17 @@ check-tests installcheck installcheck-parallel installcheck-tests: submake-gener
$(MAKE) -C src/test/regress $@

check:
if [ ! -f $(prefix)/greenplum_path.sh ]; then \
if [ ! -f $(prefix)/cloudberry-env.sh ]; then \
$(MAKE) -C $(top_builddir) install; \
fi
. $(prefix)/greenplum_path.sh; \
. $(prefix)/cloudberry-env.sh; \
if pg_isready 1>/dev/null; then \
$(MAKE) -C $(top_builddir) installcheck; \
else \
if [ ! -f $(top_builddir)/gpAux/gpdemo/gpdemo-env.sh ]; then \
. $(prefix)/greenplum_path.sh && $(MAKE) -C $(top_builddir) create-demo-cluster; \
. $(prefix)/cloudberry-env.sh && $(MAKE) -C $(top_builddir) create-demo-cluster; \
fi; \
. $(prefix)/greenplum_path.sh && . $(top_builddir)/gpAux/gpdemo/gpdemo-env.sh && $(MAKE) -C $(top_builddir) installcheck; \
. $(prefix)/cloudberry-env.sh && . $(top_builddir)/gpAux/gpdemo/gpdemo-env.sh && $(MAKE) -C $(top_builddir) installcheck; \
fi

$(call recurse,check-world,src/test src/pl src/interfaces/ecpg contrib src/bin gpcontrib,check)
Expand Down
2 changes: 1 addition & 1 deletion contrib/pax_storage/src/test/regress/mem_quota_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from multiprocessing import Process
from gppylib.commands import unix
except Exception as e:
sys.exit('Cannot import modules. Please check that you have sourced greenplum_path.sh. Detail: ' + str(e))
sys.exit('Cannot import modules. Please check that you have sourced cloudberry-env.sh. Detail: ' + str(e))

def parseargs( help=False ):
parser = OptionParser()
Expand Down
2 changes: 1 addition & 1 deletion deploy/build/README.CentOS.bash
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ sudo yum install -y \
xerces-c-devel \
zlib-devel

# Needed for pygresql, or you can source greenplum_path.sh after compiling database and installing python-dependencies then
# Needed for pygresql, or you can source cloudberry-env.sh after compiling database and installing python-dependencies then
sudo yum install -y \
postgresql \
postgresql-devel
Expand Down
4 changes: 2 additions & 2 deletions deploy/build/README.Linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ After you have installed all the dependencies and performed the prerequisite pla
make -j8 install
```

3. Bring in the Greenplum environment for your running shell.
3. Bring in the Cloudberry environment for your running shell.

```bash
cd ..
Expand All @@ -179,7 +179,7 @@ After you have installed all the dependencies and performed the prerequisite pla
chown -R gpadmin:gpadmin cloudberry/
su - gpadmin
cd cloudberry/
source /usr/local/cloudberry/greenplum_path.sh
source /usr/local/cloudberry/cloudberry-env.sh
```

4. Start the demo cluster.
Expand Down
4 changes: 2 additions & 2 deletions deploy/build/README.macOS.bash
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if [ ! -d /tmp/cbdb-devenv/gp-xerces ] ; then
cd - || exit
fi

# Needed for pygresql, or you can source greenplum_path.sh after compiling database and installing python-dependencies then
# Needed for pygresql, or you can source cloudberry-env.sh after compiling database and installing python-dependencies then
brew install postgresql@14

brew install python3
Expand Down Expand Up @@ -107,7 +107,7 @@ cat << EOF

================

Please source greenplum_path.sh after compiling database, then
Please source cloudberry-env.sh after compiling database, then

pip3 install --user -r ../../python-dependencies.txt

Expand Down
4 changes: 2 additions & 2 deletions deploy/build/README.macOS.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ BREWPREFIX=$(brew --prefix); export PATH="$BREWPREFIX/opt/gnu-sed/libexec/gnubin
make -j8
make -j8 install

# 3. Bring in Greenplum environment for Apache Cloudberry into your running shell.
# 3. Bring in Cloudberry environment for Apache Cloudberry into your running shell.

source $(cd ~; pwd)/install/cbdb/greenplum_path.sh
source $(cd ~; pwd)/install/cbdb/cloudberry-env.sh

# 4. Install the Python dependencies.

Expand Down
4 changes: 2 additions & 2 deletions deploy/build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ This guides describes how to build Apache Cloudberry from source code.
make -j8
make -j8 install

# Bring in greenplum environment for CBDB into your running shell
source /usr/local/cloudberry/greenplum_path.sh
# Bring in cloudberry environment for CBDB into your running shell
source /usr/local/cloudberry/cloudberry-env.sh

# Start demo cluster
make create-demo-cluster
Expand Down
3 changes: 1 addition & 2 deletions gpAux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ define BUILD_STEPS
cd $(BUILDDIR) && PYGRESQL_LDFLAGS=' -Wl,-rpath,\$$$$ORIGIN/.. -Wl,--enable-new-dtags ' $(MAKE) $(PARALLEL_MAKE_OPTS) install
cd $(BUILDDIR)/src/pl/plpython && $(MAKE) clean && $(MAKE) $(PARALLEL_MAKE_OPTS) install && cd $(BUILDDIR)
cd $(BUILDDIR)/src/pl/plperl && $(MAKE) clean && echo "LDFLAGS += -Wl,-rpath,$(perl_archlibexp)/CORE -Wl,--enable-new-dtags" >> GNUmakefile && echo "LDFLAGS_SL += -Wl,-rpath,$(perl_archlibexp)/CORE -Wl,--enable-new-dtags" >> GNUmakefile && $(MAKE) $(PARALLEL_MAKE_OPTS) install && cd $(BUILDDIR)
#@$(MAKE) greenplum_path INSTLOC=$(INSTLOC)
#@$(MAKE) mgmtcopy INSTLOC=$(INSTLOC)
@$(MAKE) copylibs INSTLOC=$(INSTLOC)
@$(MAKE) clients INSTLOC=$(INSTLOC) CLIENTSINSTLOC=$(CLIENTSINSTLOC)
Expand All @@ -233,7 +232,7 @@ endef
ifeq "$(BLD_GPDB_BUILDSET)" "partial"
define BUILD_STEPS
rm -rf $(INSTLOC)
cd $(BUILDDIR)/gpMgmt/ && $(MAKE) generate_greenplum_path_file
cd $(BUILDDIR)/gpMgmt/ && $(MAKE) generate_cloudberry_env_file
cd $(BUILDDIR)/src/backend/ && $(MAKE) ../../src/include/parser/gram.h
cd $(BUILDDIR)/src/backend/ && $(MAKE) ../../src/include/utils/errcodes.h
cd $(BUILDDIR)/src/backend/ && $(MAKE) ../../src/include/utils/fmgroids.h
Expand Down
4 changes: 2 additions & 2 deletions gpAux/client/install/src/windows/CreatePackage.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set VERSION=%2
echo %VERSION% > %GPDB_INSTALL_PATH%\VERSION
copy ..\..\..\..\..\NOTICE %GPDB_INSTALL_PATH%
copy ..\..\..\..\..\LICENSE %GPDB_INSTALL_PATH%
copy ..\..\..\scripts\greenplum_clients_path.bat %GPDB_INSTALL_PATH%
copy ..\..\..\scripts\cloudberry_clients_path.bat %GPDB_INSTALL_PATH%
mkdir %GPDB_INSTALL_PATH%\lib\python\yaml
copy ..\..\..\..\..\gpMgmt\bin\gpload.py %GPDB_INSTALL_PATH%\bin
mkdir %GPDB_INSTALL_PATH%\bin\gppylib
Expand All @@ -15,4 +15,4 @@ for %%f in (..\..\..\..\..\gpMgmt\bin\pythonSrc\ext\PyYAML-*.tar.gz) do tar -xf
for /D %%d in (PyYAML-*) do copy %%d\lib\yaml\* %GPDB_INSTALL_PATH%\lib\python\yaml
perl -p -e "s,__VERSION_PLACEHOLDER__,%VERSION%," greenplum-clients.wxs > greenplum-clients-%VERSION%.wxs
candle.exe -nologo greenplum-clients-%VERSION%.wxs -out greenplum-clients-%VERSION%.wixobj -dSRCDIR=%GPDB_INSTALL_PATH% -dVERSION=%VERSION%
light.exe -nologo -sval greenplum-clients-%VERSION%.wixobj -out greenplum-clients-x86_64.msi
light.exe -nologo -sval greenplum-clients-%VERSION%.wixobj -out greenplum-clients-x86_64.msi
2 changes: 1 addition & 1 deletion gpAux/client/install/src/windows/greenplum-clients.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,7 @@ If you want to review or change any of your installation settings, click Back. C
<Environment Id="CLIENTS_ENV" Action="set" Permanent="no" System="yes" Part="all" Name="GPHOME_CLIENTS" Value="[BASEDIR]" />
<Environment Id="PYTHON_ENV" Action="set" Permanent="no" System="yes" Part="last" Name="PYTHONPATH" Value="%GPHOME_CLIENTS%\lib\python" />
<Environment Id="PATH_ENV" Action="set" Permanent="no" System="yes" Part="last" Name="PATH" Value="%GPHOME_CLIENTS%bin;%GPHOME_CLIENTS%lib" />
<File Id="greenplum_clients_path.bat" Name="greenplum_clients_path.bat" ShortName="BIZGRES1.BAT" Source="$(var.SRCDIR)\greenplum_clients_path.bat" />
<File Id="cloudberry_clients_path.bat" Name="cloudberry_clients_path.bat" ShortName="BIZGRES1.BAT" Source="$(var.SRCDIR)\cloudberry_clients_path.bat" />
<File Id="LICENSE" Name="Pivotal License" ShortName="LICENSE" Source="$(var.SRCDIR)\LICENSE" />
<File Id="NOTICE" Name="Thirdpary Notice" ShortName="NOTICE" Source="$(var.SRCDIR)\NOTICE" />
<File Id="VERSION" Name="GPDB Clients Version" ShortName="VERSION" Source="$(var.SRCDIR)\VERSION" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
# --------------------------------------------------------------------
# NOTICE from the Apache Cloudberry PPMC
# --------------------------------------------------------------------
# This file uses the term 'greenplum' to maintain compatibility with
# earlier versions of Apache Cloudberry, which was originally called
# Greenplum. This usage does not refer to VMware Tanzu Greenplum,
# nor does it imply that Apache Cloudberry (Incubating) is affiliated
# with, endorsed by, or sponsored by Broadcom Inc.
#
# This file will be renamed in a future Apache Cloudberry release to
# ensure compliance with Apache Software Foundation guidelines.
# We will announce the change on the project mailing list and website.
#
# See: https://lists.apache.org/thread/b8o974mnnqk6zpy86dgll2pgqcvqgnwm
# --------------------------------------------------------------------

if test -n "${ZSH_VERSION:-}"; then
# zsh
Expand Down
6 changes: 3 additions & 3 deletions gpAux/gpdemo/README
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ RUNNING GP DEMO

su - gpadmin

2. Source greenplum_path.sh
2. Source cloudberry-env.sh

. /usr/local/gpdb/greenplum_path.sh
. /usr/local/cloudberry-db/cloudberry-env.sh

Note: There is a space between the dot and the slash.

The "." will source the greenplum_path.sh into the current
The "." will source the cloudberry-env.sh into the current
shell, instead of starting a subprocess.

3. Create the cluster at the current directory:
Expand Down
4 changes: 2 additions & 2 deletions gpAux/gpdemo/demo_cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ cleanDemo(){
##

(export COORDINATOR_DATA_DIRECTORY=$QDDIR/${SEG_PREFIX}-1;
source ${GPHOME}/greenplum_path.sh;
source ${GPHOME}/cloudberry-env.sh;
gpstop -ai)

##
Expand Down Expand Up @@ -180,7 +180,7 @@ done
if [ -z "${GPHOME}" ]; then
echo "FATAL: The GPHOME environment variable is not set."
echo ""
echo " You can set it by sourcing the greenplum_path.sh"
echo " You can set it by sourcing the cloudberry-env.sh"
echo " file in your Cloudberry installation directory."
echo ""
exit 1
Expand Down
4 changes: 2 additions & 2 deletions gpAux/releng/gppkg.mk
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ ifdef DEPENDENT_RPMS
cp $${dep_rpm} gppkg/deps; \
done
endif
source $(INSTLOC)/greenplum_path.sh && gppkg --build gppkg
source $(INSTLOC)/cloudberry-env.sh && gppkg --build gppkg
rm -rf gppkg

clean:
Expand All @@ -74,6 +74,6 @@ ifdef EXTRA_CLEAN
endif

install: $(TARGET_GPPKG)
source $(INSTLOC)/greenplum_path.sh && gppkg -i $(TARGET_GPPKG)
source $(INSTLOC)/cloudberry-env.sh && gppkg -i $(TARGET_GPPKG)

.PHONY: install clean
6 changes: 3 additions & 3 deletions gpMgmt/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ SUBDIRS= sbin bin doc

$(recurse)

generate_greenplum_path_file:
generate_cloudberry_env_file:
mkdir -p $(DESTDIR)$(prefix)
unset LIBPATH; \
bin/generate-greenplum-path.sh > $(DESTDIR)$(prefix)/greenplum_path.sh
bin/generate-cloudberry-env.sh > $(DESTDIR)$(prefix)/cloudberry-env.sh

install: generate_greenplum_path_file
install: generate_cloudberry_env_file
mkdir -p $(DESTDIR)$(prefix)/lib/python

# Setup /lib/python contents
Expand Down
2 changes: 1 addition & 1 deletion gpMgmt/bin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ To run any of these python scripts, necessary libraries must be installed, and P
PYTHONPATH="\$GPHOME/lib/python:${PYTHONPATH}"
```

This will be set automatically with a `source $GPHOME/greenplum_path.sh`
This will be set automatically with a `source $GPHOME/cloudberry-env.sh`


## Python Version
Expand Down
2 changes: 1 addition & 1 deletion gpMgmt/bin/analyzedb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ try:
from gppylib.operations.unix import CheckDir, CheckFile, MakeDir

except ImportError as e:
sys.exit('Cannot import modules. Please check that you have sourced greenplum_path.sh. Detail: ' + str(e))
sys.exit('Cannot import modules. Please check that you have sourced cloudberry-env.sh. Detail: ' + str(e))

EXECNAME = 'analyzedb'
STATEFILE_DIR = 'db_analyze'
Expand Down
63 changes: 63 additions & 0 deletions gpMgmt/bin/generate-cloudberry-env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/usr/bin/env bash

cat <<"EOF"
if test -n "${ZSH_VERSION:-}"; then
# zsh
SCRIPT_PATH="${(%):-%x}"
elif test -n "${BASH_VERSION:-}"; then
# bash
SCRIPT_PATH="${BASH_SOURCE[0]}"
else
# Unknown shell, hope below works.
# Tested with dash
result=$(lsof -p $$ -Fn | tail --lines=1 | xargs --max-args=2 | cut --delimiter=' ' --fields=2)
SCRIPT_PATH=${result#n}
fi

if test -z "$SCRIPT_PATH"; then
echo "The shell cannot be identified. \$GPHOME may not be set correctly." >&2
fi
SCRIPT_DIR="$(cd "$(dirname "${SCRIPT_PATH}")" >/dev/null 2>&1 && pwd)"

if [ ! -L "${SCRIPT_DIR}" ]; then
GPHOME=${SCRIPT_DIR}
else
GPHOME=$(readlink "${SCRIPT_DIR}")
fi
EOF

cat <<"EOF"
PYTHONPATH="${GPHOME}/lib/python"
PATH="${GPHOME}/bin:${PATH}"
LD_LIBRARY_PATH="${GPHOME}/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"

if [ -e "${GPHOME}/etc/openssl.cnf" ]; then
OPENSSL_CONF="${GPHOME}/etc/openssl.cnf"
fi

#setup JAVA_HOME
if [ -x "${GPHOME}/ext/jdk/bin/java" ]; then
JAVA_HOME="${GPHOME}/ext/jdk"
PATH="${JAVA_HOME}/bin:${PATH}"
CLASSPATH=${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tool.jar
fi

export GPHOME
export PATH
export PYTHONPATH
export LD_LIBRARY_PATH
export OPENSSL_CONF
export JAVA_HOME
export CLASSPATH

# Load the external environment variable files
if [ -d "${GPHOME}/etc/environment.d" ]; then
LOGGER=$(which logger 2> /dev/null || which true)
set -o allexport
for env in $(find "${GPHOME}/etc/environment.d" -regextype sed -regex '.*\/[0-9][0-9]-.*\.conf$' -type f | sort -n); do
$LOGGER -t "greenplum-path.sh" "loading environment from ${env}"
source "${env}"
done
set +o allexport
fi
EOF
Loading
Loading