mirror of
https://github.com/audacity/linuxdeploy.git
synced 2026-04-12 21:25:04 -05:00
32-bit CentOS 6 builds
This commit is contained in:
@@ -20,3 +20,6 @@ RUN yum install -y gcc-c++ && \
|
||||
popd && \
|
||||
rm -r patchelf/
|
||||
|
||||
ENV ARCH=x86_64
|
||||
COPY entrypoint.sh /
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
48
travis/Dockerfile.centos6-i386
Normal file
48
travis/Dockerfile.centos6-i386
Normal file
@@ -0,0 +1,48 @@
|
||||
FROM i386/centos:6
|
||||
|
||||
SHELL ["/bin/bash", "-x", "-c"]
|
||||
|
||||
# during Docker build, yum doesn't detect it's an i386 environment on x86_64 machines, and tries to install x86_64 packages, which can't work
|
||||
# this little command fixes this
|
||||
RUN sed -i 's/$basearch/i386/g' /etc/yum.repos.d/CentOS-Base.repo
|
||||
|
||||
# thanks CloudLinux, you're really helping us poor AppImage creators seeking for maximum compatibility by providing devtoolset i386 builds
|
||||
RUN yum install -y yum-utils && \
|
||||
rpm --import https://repo.cloudlinux.com/cloudlinux/security/RPM-GPG-KEY-CloudLinux && \
|
||||
yum-config-manager --add-repo https://www.repo.cloudlinux.com/cloudlinux/6/sclo/devtoolset-7/i386/ && \
|
||||
yum install -y devtoolset-7 wget curl patchelf vim-common fuse libfuse2 libtool autoconf automake zlib-devel libjpeg-devel libpng-devel nano git
|
||||
|
||||
# the shell wrapper takes care of enabling devtoolset and running a shell properly
|
||||
# unfortunately this is the easiest and most solid workaround to the limitations of the scl command
|
||||
COPY entrypoint.sh /
|
||||
ENV ARCH=i386
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
SHELL ["/entrypoint.sh", "bash", "-x", "-c"]
|
||||
|
||||
# old git doesn't support cloning tags with -b, therefore cloning remote HEAD and then manually checking out the requested tag
|
||||
RUN git clone https://github.com/Kitware/CMake && \
|
||||
cd CMake && \
|
||||
git checkout v3.14.3 && \
|
||||
./configure --prefix=/usr/local --parallel=$(nproc) && \
|
||||
make -j$(nproc) all && \
|
||||
make install && \
|
||||
cd .. && \
|
||||
rm -r CMake/
|
||||
# wget https://github.com/Kitware/CMake/releases/download/v3.13.4/cmake-3.13.4-Linux-x86_64.tar.gz -O- | tar xz --strip-components=1 -C/usr/local
|
||||
|
||||
#RUN wget http://springdale.math.ias.edu/data/puias/computational/6/x86_64//patchelf-0.8-2.sdl6.x86_64.rpm && \
|
||||
# echo "3d746306f5f7958b9487e6d08f53bb13 patchelf-0.8-2.sdl6.x86_64.rpm" || md5sum -c && \
|
||||
# rpm -i patchelf-0.8-2.sdl6.x86_64.rpm
|
||||
|
||||
RUN yum install -y gcc-c++ && \
|
||||
git clone https://github.com/NixOS/patchelf.git && \
|
||||
pushd patchelf && \
|
||||
# cannot use -b since it's not supported in really old versions of git
|
||||
git checkout 0.8 && \
|
||||
./bootstrap.sh && \
|
||||
./configure --prefix=/usr/local && \
|
||||
make -j $(nproc) && \
|
||||
make install && \
|
||||
popd && \
|
||||
rm -r patchelf/
|
||||
|
||||
@@ -8,6 +8,11 @@ here=$(readlink -f $(dirname "$0"))
|
||||
DOCKERFILE="$here"/Dockerfile.centos6
|
||||
IMAGE=linuxdeploy-build-centos6
|
||||
|
||||
if [ "$ARCH" == "i386" ]; then
|
||||
DOCKERFILE="$DOCKERFILE"-i386
|
||||
IMAGE="$IMAGE"-i386
|
||||
fi
|
||||
|
||||
(cd "$here" && docker build -f "$DOCKERFILE" -t "$IMAGE" .)
|
||||
|
||||
docker run --rm -i -v "$here"/..:/ws:ro -v "$old_cwd":/out -e OUTDIR_OWNER=$(id -u) "$IMAGE" /bin/bash -xe /ws/travis/build-centos6.sh
|
||||
|
||||
@@ -2,12 +2,6 @@
|
||||
|
||||
set -xe
|
||||
|
||||
# get a compiler that allows for using modern-ish C++ (>= 11) on a distro that doesn't normally support it
|
||||
# before you ask: yes, the binaries will work on CentOS 6 even without devtoolset (they somehow partially link C++
|
||||
# things statically while using others from the system...)
|
||||
# so, basically, it's magic!
|
||||
. /opt/rh/devtoolset-6/enable
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
@@ -28,12 +22,15 @@ tar cfvz /out/appdir.tgz AppDir
|
||||
# cannot add appimage plugin yet, since it won't work on CentOS 6 (at least for now)
|
||||
# therefore we also need to use appimagetool directly to build an AppImage
|
||||
# but we can still prepare the AppDir
|
||||
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
|
||||
chmod +x appimagetool-x86_64.AppImage
|
||||
APPIMAGETOOL_ARCH="$ARCH"
|
||||
if [ "$APPIMAGETOOL_ARCH" == "i386" ]; then APPIMAGETOOL_ARCH="i686"; fi
|
||||
|
||||
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-"$APPIMAGETOOL_ARCH".AppImage
|
||||
chmod +x appimagetool-"$APPIMAGETOOL_ARCH".AppImage
|
||||
sed -i 's/AI\x02/\x00\x00\x00/' appimagetool*.AppImage
|
||||
|
||||
appimage=linuxdeploy-centos6-x86_64.AppImage
|
||||
./appimagetool-x86_64.AppImage --appimage-extract
|
||||
appimage=linuxdeploy-centos6-"$ARCH".AppImage
|
||||
./appimagetool-"$APPIMAGETOOL_ARCH".AppImage --appimage-extract
|
||||
squashfs-root/AppRun AppDir "$appimage" 2>&1
|
||||
|
||||
chown "$OUTDIR_OWNER" "$appimage"
|
||||
|
||||
9
travis/entrypoint.sh
Executable file
9
travis/entrypoint.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#! /bin/bash
|
||||
|
||||
# get a compiler that allows for using modern-ish C++ (>= 11) on a distro that doesn't normally support it
|
||||
# before you ask: yes, the binaries will work on CentOS 6 even without devtoolset (they somehow partially link C++
|
||||
# things statically while using others from the system...)
|
||||
# so, basically, it's magic!
|
||||
source /opt/rh/devtoolset-*/enable
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user