@@ -804,82 +804,11 @@ RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc
804
804
# ###################
805
805
# 30-plrust.yml
806
806
# ###################
807
- FROM ccache as plrust-source
807
+ FROM base as plrust-source
808
808
ARG plrust_release
809
- ARG plrust_release_checksum
810
809
ARG plrust_language_version=1.70.0
811
- ARG plrust_pgrx_version=0.9.7
812
-
813
- ADD --checksum=${plrust_release_checksum} \
814
- "https://github.com/tcdi/plrust/archive/refs/tags/v${plrust_release}.tar.gz" \
815
- /tmp/plrust.tar.gz
816
- RUN tar -xvf /tmp/plrust.tar.gz -C /tmp && \
817
- rm -rf /tmp/plrust.tar.gz
818
-
819
- RUN apt-get update && apt-get install -y --no-install-recommends \
820
- ca-certificates \
821
- clang \
822
- clang-11 \
823
- gcc \
824
- git \
825
- gnupg \
826
- libssl-dev \
827
- llvm-11 \
828
- lsb-release \
829
- make \
830
- pkg-config \
831
- wget \
832
- && rm -rf /var/lib/apt/lists/*
833
-
834
- # Build from source
835
- WORKDIR /tmp/plrust-${plrust_release}
836
-
837
- RUN wget -qO- https://sh.rustup.rs | \
838
- sh -s -- \
839
- -y \
840
- --profile minimal \
841
- --default-toolchain=${plrust_language_version}
842
-
843
- # Make sure we have the cargo environment
844
- ENV PATH "/root/.cargo/bin:$PATH"
845
-
846
-
847
- # Install required Rust components and target
848
- RUN rustup toolchain install ${plrust_language_version} && \
849
- rustup default ${plrust_language_version} && \
850
- rustup component add llvm-tools-preview rustc-dev && \
851
- rustup target install x86_64-unknown-linux-gnu && \
852
- rustup target install aarch64-unknown-linux-gnu
853
-
854
- # Install cargo-pgrx
855
- RUN cargo install cargo-pgrx --version ${plrust_pgrx_version} --locked && \
856
- cargo pgrx init --pg${postgresql_major} /usr/bin/pg_config
857
-
858
- # build plrustc
859
- RUN cd plrustc && ./build.sh
860
-
861
- RUN mv build/bin/plrustc /root/.cargo/bin/
862
-
863
- RUN arch=$([ "$TARGETARCH" = "arm64" ] && echo "aarch64" || echo "$TARGETARCH" ) && \
864
- cd plrust && \
865
- PG_VER=${postgresql_major} \
866
- STD_TARGETS=$arch-postgres-linux-gnu \
867
- ./build
868
-
869
- RUN cd plrust && cargo pgrx package --profile=release --features trusted -c /usr/bin/pg_config --out-dir=/tmp
870
-
871
- # build .deb package
872
- ENV PLRUST_PACKAGE_DIR /tmp/plrust-${plrust_release}-pg${postgresql_major}-$TARGETARCH-unknown-linux-gnu
873
- RUN mkdir -p $PLRUST_PACKAGE_DIR/DEBIAN
874
- RUN touch $PLRUST_PACKAGE_DIR/DEBIAN/control
875
- RUN echo 'Package: plrust' >> $PLRUST_PACKAGE_DIR/DEBIAN/control
876
- RUN echo 'Version: ' ${plrust_release} >> $PLRUST_PACKAGE_DIR/DEBIAN/control
877
- RUN echo 'Architecture: ' $TARGETARCH >> $PLRUST_PACKAGE_DIR/DEBIAN/control
878
- RUN echo 'Maintainer: TCDI' >> $PLRUST_PACKAGE_DIR/DEBIAN/control
879
- RUN echo 'Description: PL for the Rust programming language' >> $PLRUST_PACKAGE_DIR/DEBIAN/control
880
- RUN mv /tmp/usr $PLRUST_PACKAGE_DIR
881
-
882
- RUN dpkg-deb --build --root-owner-group $PLRUST_PACKAGE_DIR
810
+ ADD "https://github.com/tcdi/plrust/releases/download/v${plrust_release}/plrust-trusted-${plrust_release}_${plrust_language_version}-debian-pg${postgresql_major}-${TARGETARCH}.deb" \
811
+ /tmp/plrust.deb
883
812
884
813
# ###################
885
814
# internal/supautils.yml
0 commit comments