GitHub CI: ARM build - use appimagetool 12

Git master version now doesn't contain the original build.sh script but
only docker one, which is difficult to use now.

+ added patch to compile
This commit is contained in:
Martin Pulec
2021-01-06 08:37:19 +01:00
parent 8278e15201
commit 7400038ffc
3 changed files with 59 additions and 1 deletions

View File

@@ -21,5 +21,5 @@ else
sudo chroot $BUILD_DIR /bin/sh -ec 'apt-get -y install libavcodec-dev libavformat-dev libswscale-dev'
fi
sudo chroot $BUILD_DIR /bin/sh -ec 'apt-get -y install desktop-file-utils git-core libfuse-dev libcairo2-dev cmake wget zsync' # to build appimagetool
sudo chroot $BUILD_DIR /bin/sh -ec 'git clone https://github.com/AppImage/AppImageKit.git && cd AppImageKit && ./build.sh && cd build && cmake -DAUXILIARY_FILES_DESTINATION= .. && make install || exit 1'
sudo chroot $BUILD_DIR /bin/sh -ec 'git clone -b 12 https://github.com/AppImage/AppImageKit.git && cd AppImageKit && patch -N -p1 < /mksquashfs-compilation-fix.patch && ./build.sh && cd build && cmake -DAUXILIARY_FILES_DESTINATION= .. && make install || exit 1'
sudo chroot $BUILD_DIR /bin/sh -ec 'rm -rf AppImageKit; apt-get -y clean'

View File

@@ -0,0 +1,57 @@
From 345fceaf049a5f9628d3c2385f2dc2ebe7ff84e3 Mon Sep 17 00:00:00 2001
From: Martin Pulec <martin.pulec@cesnet.cz>
Date: Wed, 6 Jan 2021 10:14:08 +0100
Subject: [PATCH] mksquashfs compilation fix
---
cmake/dependencies.cmake | 2 +-
src/mksquashfs-compilation-fix.patch | 24 ++++++++++++++++++++++++
2 files changed, 25 insertions(+), 1 deletion(-)
create mode 100644 src/mksquashfs-compilation-fix.patch
diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake
index 9f7901f..33cad73 100644
--- a/cmake/dependencies.cmake
+++ b/cmake/dependencies.cmake
@@ -53,7 +53,7 @@ ExternalProject_Add(mksquashfs
GIT_REPOSITORY https://github.com/plougher/squashfs-tools/
GIT_TAG 5be5d61
UPDATE_COMMAND "" # ${MAKE} sure CMake won't try to fetch updates unnecessarily and hence rebuild the dependency every time
- PATCH_COMMAND patch -N -p1 < ${PROJECT_SOURCE_DIR}/src/mksquashfs-mkfs-fixed-timestamp.patch || true
+ PATCH_COMMAND patch -N -p1 < ${PROJECT_SOURCE_DIR}/src/mksquashfs-mkfs-fixed-timestamp.patch && patch -N -p1 < ${PROJECT_SOURCE_DIR}/src/mksquashfs-compilation-fix.patch || true
CONFIGURE_COMMAND ${SED} -i "s|CFLAGS += -DXZ_SUPPORT|CFLAGS += ${mksquashfs_cflags}|g" <SOURCE_DIR>/squashfs-tools/Makefile
COMMAND ${SED} -i "s|LIBS += -llzma|LIBS += -Bstatic ${mksquashfs_ldflags}|g" <SOURCE_DIR>/squashfs-tools/Makefile
COMMAND ${SED} -i "s|install: mksquashfs unsquashfs|install: mksquashfs|g" squashfs-tools/Makefile
diff --git a/src/mksquashfs-compilation-fix.patch b/src/mksquashfs-compilation-fix.patch
new file mode 100644
index 0000000..cfd7392
--- /dev/null
+++ b/src/mksquashfs-compilation-fix.patch
@@ -0,0 +1,24 @@
+From f0da623ffcacba3ce7c2c09cf2a1f151f99369d3 Mon Sep 17 00:00:00 2001
+From: Martin Pulec <martin.pulec@cesnet.cz>
+Date: Wed, 6 Jan 2021 10:12:14 +0100
+Subject: [PATCH] compilation fix
+
+---
+ squashfs-tools/mksquashfs.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c
+index e7965c4..bdbe6f4 100644
+--- a/squashfs-tools/mksquashfs.c
++++ b/squashfs-tools/mksquashfs.c
+@@ -42,6 +42,7 @@
+ #include <stdlib.h>
+ #include <signal.h>
+ #include <setjmp.h>
++#include <sys/sysmacros.h>
+ #include <sys/types.h>
+ #include <sys/mman.h>
+ #include <pthread.h>
+--
+2.27.0
+
--
2.27.0

View File

@@ -38,6 +38,7 @@ jobs:
sudo mkdir chroot
wget http://archive.raspbian.org/raspbian.public.key -O - | sudo apt-key add -q
sudo qemu-debootstrap --keyring=${{ matrix.keyring }} --arch ${{ matrix.arch }} buster chroot ${{ matrix.repo }}
sudo cp $GITHUB_WORKSPACE/.github/scripts/Linux/arm/mksquashfs-compilation-fix.patch chroot
sudo .github/scripts/Linux/arm/bootstrap.sh ${{ matrix.arch }} chroot
sudo tar cf chroot.tar chroot # Create archive for caching. Needs to be created as root, therefore created manually.
- name: Extract Cached Environment