Skip to content

Commit

Permalink
Add debian package for Ubuntu build
Browse files Browse the repository at this point in the history
Co-authored-by: Xin Zhang <xzhang@pivotal.io>
Co-authored-by: Larry Hamel <lhamel@pivotal.io>
Co-authored-by: David Sharp <dsharp@pivotal.io>
Co-authored-by: Fei Yang <fyang@pivotal.io>
  • Loading branch information
4 people committed Nov 8, 2018
1 parent f3b0338 commit 559c7ae
Show file tree
Hide file tree
Showing 10 changed files with 129 additions and 1 deletion.
11 changes: 10 additions & 1 deletion concourse/pipelines/5X_STABLE-generated.yml
Expand Up @@ -12,7 +12,7 @@
## file (example: templates/gpdb-tpl.yml) and regenerate the pipeline
## using appropriate tool (example: gen_pipeline.py -t prod).
## ----------------------------------------------------------------------
## Generated by gen_pipeline.py at: 2018-11-07 16:16:50.726522
## Generated by gen_pipeline.py at: 2018-11-07 16:18:53.533099
## Template file: gpdb-tpl.yml
## OS Types: ['centos6', 'centos7', 'sles', 'aix7', 'win', 'ubuntu16']
## Test Sections: ['ICW', 'CS', 'MPP', 'MM', 'DPM', 'UD', 'FileRep', 'AA']
Expand Down Expand Up @@ -660,6 +660,15 @@ resources:
secret_access_key: {{bucket-secret-access-key}}
regexp: deliverables/greenplum-loaders-5.(.*)-sles11-x86_64.zip

- name: deb_package_ubuntu16
type: s3
source:
access_key_id: ((bucket-access-key-id))
bucket: ((bucket-name))
region_name: ((aws-region))
secret_access_key: ((bucket-secret-access-key))
regexp: deb_package_ubuntu16/greenplum-db_(.*)_amd64.deb

- name: deb_package_open_source_ubuntu16
type: s3
source:
Expand Down
9 changes: 9 additions & 0 deletions concourse/pipelines/templates/gpdb-tpl.yml
Expand Up @@ -689,6 +689,15 @@ resources:
secret_access_key: {{bucket-secret-access-key}}
regexp: deliverables/greenplum-loaders-5.(.*)-sles11-x86_64.zip

- name: deb_package_ubuntu16
type: s3
source:
access_key_id: ((bucket-access-key-id))
bucket: ((bucket-name))
region_name: ((aws-region))
secret_access_key: ((bucket-secret-access-key))
regexp: deb_package_ubuntu16/greenplum-db_(.*)_amd64.deb

- name: deb_package_open_source_ubuntu16
type: s3
source:
Expand Down
15 changes: 15 additions & 0 deletions src/tools/docker/ubuntu16-debian/debian/Dockerfile
@@ -0,0 +1,15 @@
FROM ubuntu_ent_build:16.04_dist

RUN apt-get update && \
apt-get install -y software-properties-common \
debmake \
equivs \
git

COPY . /tmp/gpdb_src/debian/

WORKDIR /tmp/gpdb_src

RUN ./debian/build_debian.sh

WORKDIR /tmp
9 changes: 9 additions & 0 deletions src/tools/docker/ubuntu16-debian/debian/build_debian.sh
@@ -0,0 +1,9 @@
#!/usr/bin/env sh

set -ex

VERSION=$(</tmp/gpdb_src/VERSION awk '{print $1}')
dch --create -M --package greenplum-db -v "${VERSION}" "Enterprise Release"
yes | mk-build-deps -i debian/control
DEB_BUILD_OPTIONS='nocheck parallel=6' debuild -us -uc -b
echo The debian package is at /tmp/greenplum-db_${VERSION}.build.dev_amd64.deb
1 change: 1 addition & 0 deletions src/tools/docker/ubuntu16-debian/debian/compat
@@ -0,0 +1 @@
9
31 changes: 31 additions & 0 deletions src/tools/docker/ubuntu16-debian/debian/control
@@ -0,0 +1,31 @@
Source: greenplum-db
Maintainer: Omitted <no-reply@example.com>
Section: database
Build-Depends: debhelper (>= 9)

Package: greenplum-db
Architecture: amd64
Depends: bison,
curl,
iputils-ping,
less,
libapr1,
libbz2-1.0,
libcurl3-gnutls,
libevent-2.0-5,
libreadline6,
libxerces-c3.1,
libxml2-dev,
locales,
net-tools,
openssh-client,
openssh-server,
openssl,
python-lockfile,
python-paramiko,
python-psutil,
python-yaml,
python-pip,
rsync,
zlib1g
Description: Greenplum Database is an advanced, fully featured, open source data platform. It provides powerful and rapid analytics on petabyte scale data volumes. Uniquely geared toward big data analytics, Greenplum Database is powered by the world’s most advanced cost-based query optimizer delivering high analytical query performance on large data volumes.The Greenplum Database® project is released under the Apache 2 license. We want to thank all our current community contributors and all who are interested in new contributions. For the Greenplum Database community, no contribution is too small, we encourage all types of contributions.
2 changes: 2 additions & 0 deletions src/tools/docker/ubuntu16-debian/debian/copyright
@@ -0,0 +1,2 @@
Portions Copyright (c) 2005-2008, Greenplum inc
Portions Copyright (c) 2012-Present Pivotal Software, Inc.
1 change: 1 addition & 0 deletions src/tools/docker/ubuntu16-debian/debian/install
@@ -0,0 +1 @@
debian/build/* /opt/gpdb
50 changes: 50 additions & 0 deletions src/tools/docker/ubuntu16-debian/debian/rules
@@ -0,0 +1,50 @@
#!/usr/bin/make -f

# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
DH_VERBOSE = 1
DPKG_EXPORT_BUILDFLAGS = 1

GPDB_SRC_DIR := /tmp/gpdb_src
VERSION := $(shell cat $(GPDB_SRC_DIR)/VERSION | awk '{print $$1}')
PACKAGE := $(shell cat debian/control | egrep "^Package: " | cut -d " " -f 2)

# This destination should NOT be debian/tmp, where certain packaging info stored and erased via dh_prep
DEBIAN_DESTINATION := $(shell pwd)/debian/build

include /usr/share/dpkg/default.mk

%:
dh $@ --parallel

override_dh_auto_configure:
echo "Skipping configure"

override_dh_auto_install:
mkdir -p ${DEBIAN_DESTINATION}
cp -r /usr/local/greenplum-db-devel/* ${DEBIAN_DESTINATION}
sed -i "s#GPHOME=.*#GPHOME=/opt/gpdb#g" ${DEBIAN_DESTINATION}/greenplum_path.sh
# Remove fault injector and other packages
while read file; do\
if [ -f "${DEBIAN_DESTINATION}/$${file}" ]; then\
echo "Deleting: ${DEBIAN_DESTINATION}/$${file}"; \
rm "${DEBIAN_DESTINATION}/$${file}"; \
else\
echo "File $${file} does not exist. Skipping." ; \
fi;\
done < ${GPDB_SRC_DIR}/gpAux/releng/NON_PRODUCTION_FILES.txt

override_dh_auto_build:
echo "Skipping build"

override_dh_auto_clean:
echo "Skipping clean"

override_dh_gencontrol:
echo "using version $(VERSION) for binary"
dpkg-gencontrol -v$(VERSION) -Pdebian/$(PACKAGE)

override_dh_shlibdeps:
LD_LIBRARY_PATH=${DEBIAN_DESTINATION}/lib dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info > /tmp/dp_shlibdeps.out.txt 2>&1 || echo "Error with dp_shlibsdeps, output: $(cat /tmp/dp_shlibdeps.out.txt)"

clean_dev_local:
rm -rf ${DEBIAN_DESTINATION}
1 change: 1 addition & 0 deletions src/tools/docker/ubuntu16-debian/debian/source/format
@@ -0,0 +1 @@
3.0 (quilt)

0 comments on commit 559c7ae

Please sign in to comment.