Skip to content

libpg 12+ working branch #98

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

Draft
wants to merge 4 commits into
base: main
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
9 changes: 0 additions & 9 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
name: nightly
on:
schedule:
- cron: '0 10 * * *' # everyday at 10am
push:
branches:
- 'main'
pull_request:
branches:
- 'main'

jobs:
docker:
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/stable.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
name: stable
on:
schedule:
- cron: '0 12 * * *' # everyday at noon
push:
branches:
- 'main'
pull_request:
branches:
- 'main'

jobs:
docker:
Expand Down
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ COPY etc/profile.d/cargo.sh /etc/profile.d/cargo.sh
ENV SSL_VER="1.1.1o" \
CURL_VER="7.83.1" \
ZLIB_VER="1.2.12" \
PQ_VER="11.12" \
PQ_VER="14.3" \
SQLITE_VER="3380500" \
CC=musl-gcc \
PREFIX=/musl \
Expand Down Expand Up @@ -104,6 +104,8 @@ RUN curl -sSL https://ftp.postgresql.org/pub/source/v$PQ_VER/postgresql-$PQ_VER.
--without-readline \
--with-openssl \
--prefix=$PREFIX --host=x86_64-unknown-linux-musl && \
cd src/common && make -s -j$(nproc) all && make -s install && cd ../.. && \
cd src/port && make -s -j$(nproc) all && make -s install && cd ../.. && \
cd src/interfaces/libpq make -s -j$(nproc) all-static-lib && make -s install install-lib-static && \
cd ../../bin/pg_config && make -j $(nproc) && make install && \
cd .. && rm -rf postgresql-$PQ_VER
Expand All @@ -126,11 +128,15 @@ RUN curl -sSL https://www.sqlite.org/2022/sqlite-autoconf-$SQLITE_VER.tar.gz | t
# It needs the non-musl pg_config to set this up with libpq-dev (depending on libssl-dev)
# See https://github.com/sgrif/pq-sys/pull/18
ENV PATH=$PREFIX/bin:$PATH \
TARGET=x86_64_unknown_linux_musl \
HOST=x86_64_unknown_linux_gnu \
PKG_CONFIG_ALLOW_CROSS=true \
PKG_CONFIG_ALL_STATIC=true \
PQ_LIB_STATIC_X86_64_UNKNOWN_LINUX_MUSL=true \
PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig \
PKG_CONFIG_PATH_X86_64_UNKNOWN_LINUX_MUSL=$PREFIX/lib/pkgconfig \
PG_CONFIG_X86_64_UNKNOWN_LINUX_GNU=/usr/bin/pg_config \
PG_CONFIG_X86_64_UNKNOWN_LINUX_MUSL=/musl/bin/pg_config \
OPENSSL_STATIC=true \
OPENSSL_DIR=$PREFIX \
SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt \
Expand Down
3 changes: 2 additions & 1 deletion test/pqcrate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ name = "pqcrate"
version = "0.1.0"

[dependencies]
pq-sys = "0.4.5"
#pq-sys = "0.4.5"
pq-sys = { git = "https://github.com/golddranks/pq-sys.git", rev = "8bc178b2a3859704585f4d4b39d2942c040e350b" }
openssl = "*"
2 changes: 1 addition & 1 deletion update_libs.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def rustup_version():
if __name__ == '__main__':
PACKAGES = {
'CURL': pkgver('curl'),
#'PQ': pkgver('postgresql-old-upgrade'), # see https://github.com/clux/muslrust/issues/81
'PQ': pkgver('postgresql'),
'SQLITE': convert_sqlite_version(pkgver('sqlite')),
'SSL': convert_openssl_version(pkgver('openssl')),
'ZLIB': pkgver('zlib'),
Expand Down