Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arm64 #9

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
22 changes: 16 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
FROM debian:9
FROM debian:bullseye-slim

RUN apt-get update && apt-get install -y apt-utils && \
apt-get install -y build-essential debhelper git && \
echo 'deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main' > /etc/apt/sources.list.d/pgdg.list && \
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
apt-get update && apt-get install -y postgresql-common postgresql-server-dev-all
RUN dpkg --add-architecture arm64 && \
apt-get update && apt-get install -y apt-utils aptitude && \
apt-get install -y build-essential crossbuild-essential-arm64 debhelper git && \
echo 'deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main' > /etc/apt/sources.list.d/pgdg.list && \
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && apt-get update && \
aptitude install -y postgresql-client-10:arm64 postgresql-common:arm64 postgresql-server-dev-10:arm64 && \
mv /usr/lib/postgresql/10/bin/pg_config /usr/lib/postgresql/10/bin/pg_config.alien && \
apt-get download postgresql-server-dev-all:arm64 && \
dpkg-deb -R postgresql-server-dev-all* psda/ && \
grep -v '^Depends: .*' psda/DEBIAN/control > psda/DEBIAN/control_new && \
mv psda/DEBIAN/control_new psda/DEBIAN/control && \
dpkg-deb -b psda/ && \
dpkg -i psda.deb

COPY pg_config.minimal /usr/lib/postgresql/10/bin/pg_config

WORKDIR "/mnt/build"
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ node ('docker') {
}
}
stage ('Build debian packages') {
sh "docker run -v $WORKSPACE:/mnt --rm ${img.id} dpkg-buildpackage -b";
sh "docker run -v $WORKSPACE:/mnt --rm ${img.id} CC=aarch64-linux-gnu-gcc CONFIG_SITE=/etc/dpkg-cross/cross-config.arm64 DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -aarm64 -Pcross,nocheck -b"
sh "ls ${WORKSPACE}; ls ${WORKSPACE}/";
}
dir ("${WORKSPACE}")
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ REGRESS_OPTS = --inputdir=test
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
CC = aarch64-linux-gnu-gcc
13 changes: 2 additions & 11 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,17 @@ Source: count-distinct
Section: database
Priority: optional
Maintainer: Alexey Bashtanov <[email protected]>
Build-Depends: debhelper (>= 9), postgresql-server-dev-all (>= 180)
Build-Depends: debhelper (>= 9), postgresql-server-dev-10:arm64 (>= 10.18-1.pgdg100+1)
Standards-Version: 3.9.8
Homepage: https://github.com/BrandwatchLtd/count_distinct
Vcs-Git: [email protected]:BrandwatchLtd/count_distinct.git
Vcs-Browser: https://github.com/BrandwatchLtd/count_distinct

Package: postgresql-count-distinct-10
Architecture: any
Architecture: arm64
Depends: postgresql-10, ${shlibs:Depends}, ${misc:Depends}
Description: COUNT_DISTINCT aggregate
This extension provides an alternative to COUNT(DISTINCT ...) which
for large amounts of data often ends in sorting and poor performance.
.
This package contains the server extension for PostgreSQL 10.

Package: postgresql-count-distinct-13
Architecture: any
Depends: postgresql-13, ${shlibs:Depends}, ${misc:Depends}
Description: COUNT_DISTINCT aggregate
This extension provides an alternative to COUNT(DISTINCT ...) which
for large amounts of data often ends in sorting and poor performance.
.
This package contains the server extension for PostgreSQL 13.
4 changes: 2 additions & 2 deletions debian/control.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ Source: count-distinct
Section: database
Priority: optional
Maintainer: Alexey Bashtanov <[email protected]>
Build-Depends: debhelper (>= 9), postgresql-server-dev-all (>= 180)
Build-Depends: debhelper (>= 9), postgresql-server-dev-10:arm64 (>= 10.18-1.pgdg100+1)
Standards-Version: 3.9.8
Homepage: https://github.com/BrandwatchLtd/count_distinct
Vcs-Git: [email protected]:BrandwatchLtd/count_distinct.git
Vcs-Browser: https://github.com/BrandwatchLtd/count_distinct

Package: postgresql-count-distinct-PGVERSION
Architecture: any
Architecture: arm64
Depends: postgresql-PGVERSION, ${shlibs:Depends}, ${misc:Depends}
Description: COUNT_DISTINCT aggregate
This extension provides an alternative to COUNT(DISTINCT ...) which
Expand Down
1 change: 0 additions & 1 deletion debian/pgversions
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# Versions of Postgres to build against
10
13
6 changes: 6 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

# TODO: set CC in Makefile based on one of these
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
Expand All @@ -23,6 +26,9 @@ override_dh_auto_install:
override_dh_installdocs:
dh_installdocs --all README.md LICENSE

override_dh_auto_clean:
+pg_buildext clean postgresql-count-distinct-%v

%:
dh $@

Expand Down