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
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ rpm-tar: rpm
mkdir -p build/{stagerpm,distrpm}
set -e ;\
GP_MAJOR_VERSION=$$(cat $(SOURCE_EXTENSION_DIR)/build/metadata/gp_major_version) ;\
PXF_RPM_FILE=$$(find build/rpmbuild/RPMS -name cloudberry-pxf-*.rpm) ;\
PXF_RPM_FILE=$$(find build/rpmbuild/RPMS -name apache-cloudberry-pxf-incubating-*.rpm) ;\
PXF_RPM_BASE_NAME=$$(basename $${PXF_RPM_FILE%*.rpm}) ;\
PXF_PACKAGE_NAME=$${PXF_RPM_BASE_NAME%.*} ;\
mkdir -p build/stagerpm/$${PXF_PACKAGE_NAME} ;\
Expand All @@ -176,14 +176,14 @@ deb: stage
cp -a package/DEBIAN/* build/debbuild/DEBIAN/ ;\
sed -i -e "s/%VERSION%/$${PXF_MAIN_VERSION}-$${PXF_RELEASE}/" -e "s/%MAINTAINER%/${VENDOR}/" -e "s/%ARCH%/$$(dpkg --print-architecture)/" build/debbuild/DEBIAN/control ;\
dpkg-deb --build build/debbuild ;\
mv build/debbuild.deb build/cloudberry-pxf-$${PXF_MAIN_VERSION}-$${PXF_RELEASE}-$$(lsb_release -si | tr '[:upper:]' '[:lower:]')$$(lsb_release -sr)-$$(dpkg --print-architecture).deb
mv build/debbuild.deb build/apache-cloudberry-pxf-incubating-$${PXF_MAIN_VERSION}-$${PXF_RELEASE}-$$(lsb_release -si | tr '[:upper:]' '[:lower:]')$$(lsb_release -sr)-$$(dpkg --print-architecture).deb

deb-tar: deb
rm -rf build/{stagedeb,distdeb}
mkdir -p build/{stagedeb,distdeb}
set -e ;\
GP_MAJOR_VERSION=$$(cat $(SOURCE_EXTENSION_DIR)/build/metadata/gp_major_version) ;\
PXF_DEB_FILE=$$(find build/ -name cloudberry-pxf*.deb) ;\
PXF_DEB_FILE=$$(find build/ -name apache-cloudberry-pxf-incubating*.deb) ;\
PXF_PACKAGE_NAME=$$(dpkg-deb --field $${PXF_DEB_FILE} Package)-$$(dpkg-deb --field $${PXF_DEB_FILE} Version)-$$(lsb_release -si | tr '[:upper:]' '[:lower:]')$$(lsb_release -rs) ;\
mkdir -p build/stagedeb/$${PXF_PACKAGE_NAME} ;\
cp $${PXF_DEB_FILE} build/stagedeb/$${PXF_PACKAGE_NAME} ;\
Expand Down
2 changes: 1 addition & 1 deletion package/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Package: cloudberry-pxf
Package: apache-cloudberry-pxf-incubating
Version: %VERSION%
Architecture: %ARCH%
Maintainer: %MAINTAINER%
Expand Down
10 changes: 5 additions & 5 deletions package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ Apache Cloudberry PXF (Platform Extension Framework) consists of 3 groups of art
The PXF build system can create an RPM package on CentOS platform and a DEB package on Ubuntu platform,
respectively. PXF compiles against and generates packages for Apache Cloudberry.

For example, `cloudberry-pxf-1.2.3-1.el7.x86_64.rpm` represents an RPM package of PXF version 1.2.3 intended to work with
For example, `apache-cloudberry-pxf-incubating-1.2.3-1.el7.x86_64.rpm` represents an RPM package of PXF version 1.2.3 intended to work with
Apache Cloudberry on CentOS / Red Hat 7 operating systems.

## PXF RPM specification
On CentOS platforms PXF product is packaged as an RPM. The specification on how to build the RPM is provided by the
`cloudberry-pxf.spec` file in this directory. The following key design decisions were made:

* the name of the RPM package is `cloudberry-pxf`
* the name of the RPM package is `apache-cloudberry-pxf-incubating`
* to install a newer RPM package, a user will have to upgrade the PXF RPM
* the RPM installs PXF server into `/usr/local/cloudberry-pxf-[VERSION]` directory (e.g. `/usr/local/cloudberry-pxf-1.2.3`)
* the RPM is relocatable, a user can specify --prefix option when installing the RPM to install the server into another directory
* the PXF Apache Cloudberry extension is initially installed by RPM alongside the PXF server and is not initially active
* the PXF Apache Cloudberry extension is copied into Cloudberry install location during `pxf init` command issued by a user after the install
* the PXF RPM version number follows 3-number semantic versioning and must be provided during the RPM build process
* the PXF RPM release number is usually specified as `1`
* example PXF RPM names are : `cloudberry-pxf-1.2.3-1.el7.x86_64.rpm` and `cloudberry-pxf-1.2.3-1.el8.x86_64.rpm`
* example PXF RPM names are : `apache-cloudberry-pxf-incubating-1.2.3-1.el7.x86_64.rpm` and `apache-cloudberry-pxf-incubating-1.2.3-1.el8.x86_64.rpm`

## PXF RPM build process

Expand All @@ -45,7 +45,7 @@ To install PXF from an RPM, follow these steps:
installation should either be the same as the one owning the Cloudberry installation or have write privileges to the
Cloudberry installation directory. This is necessary to be able to register the PXF Apache Cloudberry extension with Cloudberry.
3. If a previous PXF version has been installed, stop the PXF server.
4. As a superuser, run `rpm -Uvh cloudberry-pxf-1.2.3-1.el7.x86_64.rpm` to install the RPM into `/usr/local/cloudberry-pxf-1.2.3`
4. As a superuser, run `rpm -Uvh apache-cloudberry-pxf-incubating-1.2.3-1.el7.x86_64.rpm` to install the RPM into `/usr/local/cloudberry-pxf-1.2.3`
5. As a superuser, run `chown gpadmin:gpadmin /usr/local/cloudberry-pxf-1.2.3` to change ownership of PXF installation to the user `gpadmin`.
Specify a different user other than `gpadmin`, if desired.

Expand All @@ -56,5 +56,5 @@ The PXF configuration directory should remain intact. You will need to have Java
## PXF removal process
To remove the installed PXF package, follow these steps:
1. Stop the PXF server.
2. As a superuser, run `rpm -e cloudberry-pxf`. This will remove all files installed by the RPM package
2. As a superuser, run `rpm -e apache-cloudberry-pxf-incubating`. This will remove all files installed by the RPM package
and the PXF runtime directories. The PXF configuration directory should remain intact.
10 changes: 5 additions & 5 deletions package/cloudberry-pxf.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Disable automatic dependency processing both for requirements and provides
AutoReqProv: no

Name: cloudberry-pxf
Name: apache-cloudberry-pxf-incubating
Version: %{pxf_version}
Release: %{pxf_release}%{?dist}

Expand All @@ -16,7 +16,7 @@ URL: https://cloudberry.apache.org
Vendor: %{vendor}
Group: Applications/Databases

Prefix: /usr/local/%{name}-%{version}
Prefix: /usr/local/cloudberry-pxf-%{version}

# Java server can be installed on a new node, only bash is needed for
# management scripts
Expand Down Expand Up @@ -78,7 +78,7 @@ fi
%__cp -R %{_sourcedir}/* %{buildroot}/%{prefix}

# Create symlink
%__ln_s %{prefix} %{buildroot}/usr/local/%{name}
%__ln_s %{prefix} %{buildroot}/usr/local/cloudberry-pxf

%post
sed -i "s|directory =.*|directory = '${RPM_INSTALL_PREFIX}/gpextable/'|g" "${RPM_INSTALL_PREFIX}/gpextable/pxf.control"
Expand All @@ -91,7 +91,7 @@ fi

%files
%{prefix}
/usr/local/%{name}
/usr/local/cloudberry-pxf

# If a file is not marked as a config file, or if a file has not been altered
# since installation, then it will be silently replaced by the version from the
Expand Down Expand Up @@ -129,5 +129,5 @@ fi
%preun
# Remove symlink on uninstall
if [ $1 -eq 0 ] ; then
%__rm -f /usr/local/%{name}
%__rm -f /usr/local/cloudberry-pxf
fi
Loading