summaryrefslogtreecommitdiffstats
path: root/.github/actions
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-07 04:48:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-07 04:48:35 +0000
commit207df6fc406e81bfeebdff7f404bd242ff3f099f (patch)
treea1a796b056909dd0a04ffec163db9363a8757808 /.github/actions
parentReleasing progress-linux version 0.11.2-1~progress7.99u1. (diff)
downloadlnav-207df6fc406e81bfeebdff7f404bd242ff3f099f.tar.xz
lnav-207df6fc406e81bfeebdff7f404bd242ff3f099f.zip
Merging upstream version 0.12.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--.github/actions/muslbuilder/Dockerfile265
-rwxr-xr-x.github/actions/muslbuilder/entrypoint.sh10
2 files changed, 152 insertions, 123 deletions
diff --git a/.github/actions/muslbuilder/Dockerfile b/.github/actions/muslbuilder/Dockerfile
index 41d0910..dc545fc 100644
--- a/.github/actions/muslbuilder/Dockerfile
+++ b/.github/actions/muslbuilder/Dockerfile
@@ -1,56 +1,16 @@
-FROM alpine:3.16
+FROM --platform=$TARGETPLATFORM alpine:latest AS depsbuilder
-LABEL com.github.actions.name="C++ MUSL Builder Slim"
-LABEL com.github.actions.description="Provides a C++ MUSL environment"
-LABEL com.github.actions.icon="settings"
-LABEL com.github.actions.color="orange"
-
-RUN apk update && apk add --no-cache \
- build-base \
- binutils \
- m4 \
- git \
- cmake \
- make \
- libgcc \
- musl-dev \
- gcc \
- g++ \
- lz4 \
- lz4-dev \
- lz4-static \
- zip \
- zstd \
- zstd-dev \
- zstd-static \
- perl \
+RUN apk add --no-cache \
autoconf \
automake \
- elfutils \
- elfutils-dev \
- libelf-static \
- libexecinfo-dev \
- libexecinfo-static \
- libtool \
- libunwind \
- libunwind-dev \
- libunwind-static \
- linux-headers
-
-ADD https://www.libarchive.org/downloads/libarchive-3.6.2.tar.gz /
-ADD https://ftp.gnu.org/gnu/make/make-4.2.1.tar.gz /
-ADD https://ftp.gnu.org/gnu/ncurses/ncurses-6.4.tar.gz /
-ADD https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.42/pcre2-10.42.tar.gz /
-ADD https://ftp.gnu.org/gnu/readline/readline-6.3.tar.gz /
-ADD https://zlib.net/zlib-1.2.13.tar.gz /
-ADD https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz /
-ADD https://www.sqlite.org/2023/sqlite-autoconf-3420000.tar.gz /
-ADD https://www.openssl.org/source/openssl-1.0.2n.tar.gz /
-ADD https://www.libssh2.org/download/libssh2-1.11.0.tar.gz /
-ADD https://curl.se/download/curl-8.1.2.tar.gz /
-ADD https://tukaani.org/xz/xz-5.4.3.tar.gz /
-
-RUN mkdir -p /fake.root /packages /extract
+ build-base \
+ curl \
+ ncurses \
+ ncurses-terminfo \
+ zip
+
+RUN mkdir -p /fake.root /extract
+
ENV SQLITE_CFLAGS="\
-DSQLITE_ENABLE_COLUMN_METADATA \
-DSQLITE_SOUNDEX \
@@ -84,79 +44,142 @@ xterm,\
xterm-256color\
"
-RUN cd /extract && for pkg in /*.tar.gz; do tar xvfz "$pkg"; done
-
-RUN cd /extract/bzip2-1.0.8 && make install PREFIX=/fake.root && make clean
-
-RUN cd /extract/zlib-* && ./configure --prefix=/fake.root && make -j2 && make install && make clean
-
-RUN cd /extract/xz-* && \
- ./configure --prefix=/fake.root \
- --disable-shared \
- "LDFLAGS=-L/fake.root/lib" \
- "CPPFLAGS=-I/fake.root/include" \
- && \
- make -j2 && \
- make install && make clean
-
-RUN cd /extract/libarchive-* && \
- ./configure --prefix=/fake.root \
- --disable-shared \
- "LDFLAGS=-L/fake.root/lib" \
- "CPPFLAGS=-I/fake.root/include" \
- && \
- make -j2 && \
- make install && make clean
-
-RUN cd /extract/make-4.2.1 && ./configure --prefix=/fake.root && make -j2 && make install && make clean
-RUN cd /extract/readline-* && ./configure --prefix=/fake.root && make -j2 && make install && make clean
-
-RUN cd /extract/sqlite-* && \
- ./configure --disable-editline --prefix=/fake.root \
- CFLAGS="${SQLITE_CFLAGS}" \
+RUN curl -sSL https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz | tar xvzC /extract/ && \
+ cd /extract/bzip* && \
+ make install PREFIX=/fake.root && \
+ cd /extract && rm -rf *
+
+RUN curl -sSL https://github.com/lz4/lz4/archive/refs/tags/v1.9.4.tar.gz | tar xvzC /extract/ && \
+ cd /extract/lz4* && \
+ make install PREFIX=/fake.root && \
+ cd /extract && rm -rf *
+
+RUN curl -sSL https://github.com/facebook/zstd/releases/download/v1.5.5/zstd-1.5.5.tar.gz | tar xvzC /extract/ && \
+ cd /extract/zstd* && \
+ make install PREFIX=/fake.root && \
+ cd /extract && rm -rf *
+
+RUN curl -sSL https://www.zlib.net/zlib-1.3.1.tar.gz | tar xvzC /extract/ && \
+ cd /extract/zlib-* && ./configure --prefix=/fake.root --static && \
+ make -j2 && \
+ make install && \
+ cd /extract && rm -rf *
+
+RUN curl -sSL https://tukaani.org/xz/xz-5.4.3.tar.gz | tar xvzC /extract/ && \
+ cd /extract/xz-* && \
+ ./configure --prefix=/fake.root \
+ --disable-shared \
+ "LDFLAGS=-L/fake.root/lib" \
+ "CPPFLAGS=-I/fake.root/include" \
+ && \
+ make -j2 && \
+ make install && \
+ cd /extract && rm -rf *
+
+RUN curl -sSL https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.42/pcre2-10.42.tar.gz | tar xvzC /extract/ && \
+ cd /extract/pcre2-* && \
+ ./configure --prefix=/fake.root \
+ --enable-jit \
+ --disable-shared \
&& \
- make -j2 && make install && make clean
-
-RUN cd /extract/openssl-* && \
- ./config --prefix=/fake.root -fPIC && \
- make -j2 && \
- make install && make clean
-
-RUN cd /extract/ncurses-* && \
- ./configure --prefix=/fake.root \
- --enable-ext-mouse \
- --enable-sigwinch \
- --with-default-terminfo-dir=/usr/share/terminfo \
- --enable-ext-colors \
- --enable-widec \
- --enable-termcap \
- --with-fallbacks=$NCURSES_FALLBACKS \
- && \
- make -j2 && make install && make clean
+ make -j2 && \
+ make install && \
+ cd /extract && rm -rf *
+
+RUN curl -sSL https://ftp.gnu.org/gnu/ncurses/ncurses-6.4.tar.gz | tar xvzC /extract/ && \
+ cd /extract/ncurses-* && \
+ ./configure --prefix=/fake.root \
+ --enable-ext-mouse \
+ --enable-sigwinch \
+ --enable-ext-colors \
+ --enable-widec \
+ --enable-termcap \
+ --with-fallbacks=$NCURSES_FALLBACKS \
+ --without-shared \
+ --without-progs \
+ --without-manpages \
+ --without-tests \
+ && \
+ make -j2 install && \
+ cd /extract && rm -rf *
+
+RUN curl -sSL https://www.openssl.org/source/openssl-1.0.2n.tar.gz | tar xvzC /extract/ && \
+ cd /extract/openssl-* && \
+ ./config --prefix=/fake.root no-shared -fPIC && \
+ make -j2 && \
+ make install && \
+ cd /extract && rm -rf *
+
+RUN curl -sSL https://www.libssh2.org/download/libssh2-1.11.0.tar.gz | tar xvzC /extract/ && \
+ cd /extract/libssh2-* && \
+ ./configure --prefix=/fake.root \
+ --with-libssl-prefix=/fake.root \
+ --with-libz-prefix=/fake.root \
+ --disable-shared \
+ "CPPFLAGS=-I/fake.root/include" \
+ "LDFLAGS=-L/fake.root/lib" && \
+ make -j2 && \
+ make install && \
+ cd /extract && rm -rf *
+
+RUN curl -sSL https://ftp.gnu.org/gnu/readline/readline-8.2.tar.gz | tar xvzC /extract/ && \
+ cd /extract/readline-* && \
+ ./configure --prefix=/fake.root --disable-shared && \
+ make -j2 && \
+ make install && \
+ cd /extract && rm -rf *
+
+RUN curl -sSL https://www.libarchive.org/downloads/libarchive-3.7.2.tar.gz | tar xvzC /extract/ && \
+ cd /extract/libarchive-* && \
+ ./configure --prefix=/fake.root \
+ --disable-shared \
+ "LDFLAGS=-L/fake.root/lib" \
+ "CPPFLAGS=-I/fake.root/include" \
+ && \
+ make -j2 && \
+ make install && \
+ cd /extract && rm -rf *
+
+RUN curl -sSL https://curl.se/download/curl-8.6.0.tar.gz | tar xvzC /extract/ && \
+ cd /extract/curl-* && \
+ ./configure --prefix=/fake.root \
+ --disable-shared \
+ --with-libssh2=/fake.root \
+ --without-libpsl \
+ --with-ssl=/fake.root \
+ --with-zlib=/fake.root && \
+ make -j2 && \
+ make install && \
+ cd /extract && rm -rf *
+
+RUN curl -sSL https://www.sqlite.org/2024/sqlite-autoconf-3450100.tar.gz | tar xvzC /extract/ && \
+ cd /extract/sqlite-* && \
+ ./configure --disable-editline \
+ --disable-shared \
+ --prefix=/fake.root \
+ CFLAGS="${SQLITE_CFLAGS}" \
+ && \
+ make -j2 && \
+ make install && \
+ cd /extract && rm -rf *
+
+FROM --platform=$TARGETPLATFORM alpine:latest
+
+COPY --from=depsbuilder /fake.root /fake.root
-RUN cd /extract/pcre2-* && \
- ./configure --prefix=/fake.root \
- --enable-jit \
- && \
- make -j2 && make install && make clean
-
-RUN cd /extract/libssh2-* && \
- ./configure --prefix=/fake.root \
- --with-libssl-prefix=/fake.root \
- --with-libz-prefix=/fake.root \
- "CPPFLAGS=-I/fake.root/include" \
- "LDFLAGS=-ldl -L/fake.root/lib" && \
- make -j2 && \
- make install && make clean
-
-RUN cd /extract/curl-* && \
- ./configure --prefix=/fake.root \
- --with-libssh2=/fake.root \
- --with-ssl=/fake.root \
- --with-zlib=/fake.root \
- "LDFLAGS=-ldl" && \
- make -j2 && \
- make install && make clean
+LABEL com.github.actions.name="C++ MUSL Builder Slim"
+LABEL com.github.actions.description="Provides a C++ MUSL environment"
+LABEL com.github.actions.icon="settings"
+LABEL com.github.actions.color="orange"
+
+RUN apk add --no-cache \
+ autoconf \
+ automake \
+ build-base \
+ cargo \
+ git \
+ rust \
+ zip
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
diff --git a/.github/actions/muslbuilder/entrypoint.sh b/.github/actions/muslbuilder/entrypoint.sh
index 7c40420..6e2eac7 100755
--- a/.github/actions/muslbuilder/entrypoint.sh
+++ b/.github/actions/muslbuilder/entrypoint.sh
@@ -2,7 +2,13 @@
set -Eeuxo pipefail
-cd $GITHUB_WORKSPACE
+if [ -z ${GITHUB_WORKSPACE:-} ]; then
+ git clone --depth 1 https://github.com/tstack/lnav.git
+ cd lnav
+else
+ cd ${GITHUB_WORKSPACE}
+fi
+
./autogen.sh
mkdir lbuild
cd lbuild
@@ -12,7 +18,7 @@ cd lbuild
CXXFLAGS='-static -g1 -gz=zlib -U__unused -no-pie -O2' \
LDFLAGS="-L/fake.root/lib" \
CPPFLAGS="-I/fake.root/include" \
- LIBS="-L/fake.root/lib -lexecinfo -lssh2 -llzma -lssl -lcrypto -lz -llz4" \
+ LIBS="-L/fake.root/lib -lssh2 -llzma -lssl -lcrypto -lz -llz4" \
--enable-static \
PATH="/fake.root/bin:${PATH}"
make -j2