View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0017459 | Scribus | Build System | public | 2025-03-17 18:00 | 2025-03-20 16:24 |
Reporter | ale | Assigned To | ale | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | resolved | Resolution | fixed | ||
Fixed in Version | 1.7.1.svn | ||||
Summary | 0017459: Update AppRun and bundle.sh for Scribus 1.7 | ||||
Description | AppRun and bundle.sh need to be slightly modified, to generate the Appimage in the Gitlab CI. | ||||
Tags | No tags attached. | ||||
Patch | Yes | ||||
|
here is a patch... appimage-1.7.diff (5,246 bytes)
From 433aeb738b445bcd33c3a3bc219d7118b20a8b64 Mon Sep 17 00:00:00 2001 From: ale rimoldi <ale@graphicslab.org> Date: Mon, 17 Mar 2025 20:29:14 +0100 Subject: create appimages for scribus 1.7 diff --git a/AppImage-package/AppRun b/AppImage-package/AppRun index 98a1a0cb2..fa4cf2de9 100644 --- a/AppImage-package/AppRun +++ b/AppImage-package/AppRun @@ -57,7 +57,7 @@ export TK_LIBRARY="${HERE}"/usr/share/tcltk/tk8.6:$TK_LIBRARY:$TCL_LIBRARY # This allows the bundle to run even on older systems than the one it was built on ############################################################################################ -if [ -e "$HERE/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2" ] ; then +if [ -e "$HERE/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2" ] ; then echo "Run experimental bundle that bundles everything" export GCONV_PATH="$HERE/usr/lib/x86_64-linux-gnu/gconv" export FONTCONFIG_FILE="$HERE/etc/fonts/fonts.conf" @@ -72,7 +72,7 @@ if [ -e "$HERE/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2" ] ; then export LIBRARY_PATH="$HERE/usr/lib/x86_64-linux-gnu/pulseaudio":$LIBRARY_PATH export LIBRARY_PATH="$HERE/usr/lib/x86_64-linux-gnu/alsa-lib":$LIBRARY_PATH export LIBRARY_PATH=$GDK_PIXBUF_MODULEDIR:$LIBRARY_PATH # Otherwise getting "Unable to load image-loading module" - exec "${HERE}/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2" --inhibit-cache --library-path "${LIBRARY_PATH}" "${MAIN}" "$@" + exec "${HERE}/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2" --inhibit-cache --argv0 "${MAIN}" --library-path "${LIBRARY_PATH}" "${MAIN}" "$@" else exec "${MAIN}" "$@" fi diff --git a/AppImage-package/bundle.sh b/AppImage-package/bundle.sh index eff0eaf31..c0c116726 100644 --- a/AppImage-package/bundle.sh +++ b/AppImage-package/bundle.sh @@ -4,7 +4,7 @@ cat /proc/1/cgroup # Check if we run in Docker; https://github.com/AppImage/AppI # for docker images: # if qt is not in the standard path, load its environment variables -. /opt/qt*/bin/qt*-env.sh || true +# . /opt/qt*/bin/qt*-env.sh || true SCRIBUS_VERSION=nightly @@ -15,11 +15,11 @@ SCRIBUS_VERSION=nightly cmake . -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ -DCMAKE_INSTALL_PREFIX=/usr \ + -DWANT_DEBUG=0 \ -DWANT_RELOCATABLE=1 \ - -DWANT_HUNSPELL=1 \ -DWITH_PODOFO=1 \ -DWANT_GRAPHICSMAGICK=1 \ - -DWANT_DEBUG=0 \ + -DQT_VERSION_MAJOR=6 \ -DWANT_SVNVERSION=0 make -j$(nproc) @@ -31,7 +31,6 @@ cp AppImage-package/AppRun appdir/ chmod +x appdir/AppRun cp ./appdir/usr/share/icons/hicolor/256x256/apps/scribus.png ./appdir/ - # TODO: is this needed? sed -i -e 's|^Icon=.*|Icon=scribus|g' ./appdir/usr/share/applications/scribus.desktop @@ -43,8 +42,8 @@ sed -i -e 's|^Icon=.*|Icon=scribus|g' ./appdir/usr/share/applications/scribus.de cd appdir/ # Bundle all of glibc; this should eventually be done by linuxdeployqt -apt-get update -q -apt-get download libc6 +apt update -q +apt download libc6 find *.deb -exec dpkg-deb -x {} . \; rm *deb @@ -57,7 +56,7 @@ mkdir -p etc/fonts/ cp /etc/fonts/fonts.conf etc/fonts/ # Bundle Python -apt-get download python3.6 python3.6-minimal libpython3.6-minimal libpython3.6-stdlib python3-tk +apt download python3.12 python3.12-minimal libpython3.12-minimal libpython3.12-stdlib python3-tk find *.deb -exec dpkg-deb -x {} . \; rm *deb cd - @@ -70,9 +69,12 @@ cd - # applicationDirPath() is not usr/bin but lib/x86_64-linux-gnu/ # when AppRun invokes the binary with # exec "${HERE}/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2" --inhibit-cache --library-path "${LIBRARY_PATH}" "${MAIN}" "$@" -# hence we add a symlink here to mitigate this -cd appdir/lib/ -ln -s ../usr/* . +# hence we add symlinks here to mitigate this + +cd appdir/ +# On Ubuntu 24.04 /lib is a symlink to /usr/lib +ln -s usr/lib lib +ln -s usr/lib64 lib64 cd - ######################################################################## @@ -92,7 +94,7 @@ mkdir -p appdir/lib/x86_64-linux-gnu/ cat > appdir/lib/x86_64-linux-gnu/qt.conf <<\EOF # Why is this needed here? Bug? [Paths] -Prefix = ../../usr +Prefix = ../../../usr Plugins = plugins Imports = qml Qml2Imports = qml @@ -105,8 +107,9 @@ EOF # Finalize AppDir but do not turn into AppImage just yet wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" chmod a+x linuxdeployqt-continuous-x86_64.AppImage + ARCH=x86_64 VERSION=$SCRIBUS_VERSION ./linuxdeployqt-continuous-x86_64.AppImage --appimage-extract-and-run appdir/usr/share/applications/scribus.desktop \ - -appimage -unsupported-bundle-everything \ - -executable=appdir/usr/bin/python3.6 \ - -executable=appdir/usr/lib/python3.6/lib-dynload/_tkinter.cpython-36m-x86_64-linux-gnu.so \ - -extra-plugins=platformthemes/libqgtk2.so,styles/libqgtk2style.so + -appimage -unsupported-bundle-everything \ + -executable=appdir/usr/bin/python3.12 \ + -executable=appdir/usr/lib/python3.12/lib-dynload/_tkinter.cpython-312-x86_64-linux-gnu.so \ + -qmake=qmake6; |
|
ooops, i also need some changes in .gitlab-ci.yaml |
|
gitlab-ci-1.7.diff (969 bytes)
From 0c760697427c261be5b1b1fcb5862b1f62c4984e Mon Sep 17 00:00:00 2001 From: ale rimoldi <ale@graphicslab.org> Date: Mon, 17 Mar 2025 20:44:24 +0100 Subject: gitlab-ci file for 1.7 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c12e24904..a9d20a57b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,7 @@ # Dependencies are managed in the Dockerfile in the scribus-ci-docker # Git repository. Change them there, wait a bit, and then we'll use # the new ones here in these builds. -image: registry.gitlab.com/scribus/scribus-ci-docker/master +image: registry.gitlab.com/scribus/scribus-ci-docker/main variables: GIT_DEPTH: "10" @@ -22,7 +22,9 @@ appimage:linux: - export CCACHE_DIR=${PWD}/ccache script: - bash -ex AppImage-package/bundle.sh + rules: + - if: '$CI_COMMIT_BRANCH == "master"' artifacts: expire_in: 14 days paths: - - ./Scribus*.AppImage* \ No newline at end of file + - ./Scribus*.AppImage* |
|
Applied, thanks! |
|
Thanks! |
|
sadly, the .gitlab-ci files triggers an error. let's hope that this version is better! gitlab-only-master.diff (554 bytes)
From e27d6c5a232e921acfaa098cafd27a680694e134 Mon Sep 17 00:00:00 2001 From: ale rimoldi <ale@graphicslab.org> Date: Tue, 18 Mar 2025 18:00:38 +0100 Subject: gitlab: only master diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a9d20a57b..b2542a46b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,8 +22,8 @@ appimage:linux: - export CCACHE_DIR=${PWD}/ccache script: - bash -ex AppImage-package/bundle.sh - rules: - - if: '$CI_COMMIT_BRANCH == "master"' + only: + - master artifacts: expire_in: 14 days paths: |
|
Applied too! |
|
next try: - creating the symlinks a bit earlier - using again apt-get instead of apt ln-lib-earlier.diff (2,961 bytes)
From 8d33febf17a9d4a21d88aa33d2cc3880967ded72 Mon Sep 17 00:00:00 2001 From: ale rimoldi <ale@graphicslab.org> Date: Wed, 19 Mar 2025 20:09:12 +0100 Subject: symlink lib a bit earlier; use again apt-get (more low level; for scripting) diff --git a/AppImage-package/bundle.sh b/AppImage-package/bundle.sh index c0c116726..2b6c41086 100644 --- a/AppImage-package/bundle.sh +++ b/AppImage-package/bundle.sh @@ -34,6 +34,22 @@ cp ./appdir/usr/share/icons/hicolor/256x256/apps/scribus.png ./appdir/ # TODO: is this needed? sed -i -e 's|^Icon=.*|Icon=scribus|g' ./appdir/usr/share/applications/scribus.desktop +######################################################################## +# Work around side effect of bundling everything +######################################################################## + +# https://github.com/scribusproject/scribus/issues/111#issuecomment-457823282 +# applicationDirPath() is not usr/bin but lib/x86_64-linux-gnu/ +# when AppRun invokes the binary with +# exec "${HERE}/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2" --inhibit-cache --library-path "${LIBRARY_PATH}" "${MAIN}" "$@" +# hence we add symlinks here to mitigate this + +cd appdir/ +# On Ubuntu 24.04 /lib is a symlink to /usr/lib +ln -s usr/lib lib +ln -s usr/lib64 lib64 +cd - + ######################################################################## # Bundle everything # to allow the AppImage to run on older systems as well @@ -42,8 +58,8 @@ sed -i -e 's|^Icon=.*|Icon=scribus|g' ./appdir/usr/share/applications/scribus.de cd appdir/ # Bundle all of glibc; this should eventually be done by linuxdeployqt -apt update -q -apt download libc6 +apt-get update -q +apt-get download libc6 find *.deb -exec dpkg-deb -x {} . \; rm *deb @@ -56,27 +72,11 @@ mkdir -p etc/fonts/ cp /etc/fonts/fonts.conf etc/fonts/ # Bundle Python -apt download python3.12 python3.12-minimal libpython3.12-minimal libpython3.12-stdlib python3-tk +apt-get download python3.12 python3.12-minimal libpython3.12-minimal libpython3.12-stdlib python3-tk find *.deb -exec dpkg-deb -x {} . \; rm *deb cd - -######################################################################## -# Work around side effect of bundling everything -######################################################################## - -# https://github.com/scribusproject/scribus/issues/111#issuecomment-457823282 -# applicationDirPath() is not usr/bin but lib/x86_64-linux-gnu/ -# when AppRun invokes the binary with -# exec "${HERE}/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2" --inhibit-cache --library-path "${LIBRARY_PATH}" "${MAIN}" "$@" -# hence we add symlinks here to mitigate this - -cd appdir/ -# On Ubuntu 24.04 /lib is a symlink to /usr/lib -ln -s usr/lib lib -ln -s usr/lib64 lib64 -cd - - ######################################################################## # Also bundle Tcl/Tk, Tkinter (for Calendar script) ######################################################################## |
|
I don't think your move of the "Work around side effect..." section is correct : at the point where you are trying to create the symlinks, the appdir/usr/lib and appdir/usr/lib64 directories do not exist. In my 1.7.0 appimage generation script, I perform the symlink creation right after libc6 package download : # Bundle all of glibc; this should eventually be done by linuxdeployqt sudo apt-get update -q apt-get download libc6 find *.deb -exec dpkg-deb -x {} . \; rm *deb # On Ubuntu 24.04 /lib is a symlink to /usr/lib ln -s usr/lib lib ln -s usr/lib64 lib64 |
|
I applied a patch which bring the bundle.sh closer to what my script do, let's hope it works this time. |
|
it worked! thanks jean! |
Date Modified | Username | Field | Change |
---|---|---|---|
2025-03-17 18:00 | ale | New Issue | |
2025-03-17 19:30 | ale | Note Added: 0052247 | |
2025-03-17 19:30 | ale | File Added: appimage-1.7.diff | |
2025-03-17 19:31 | ale | Summary | Update AppRun and bundle.sh for Scribus 1.7 => [PATCH] Update AppRun and bundle.sh for Scribus 1.7 |
2025-03-17 19:31 | ale | Patch | No => Yes |
2025-03-17 19:45 | ale | Note Added: 0052248 | |
2025-03-17 19:46 | ale | Note Added: 0052249 | |
2025-03-17 19:46 | ale | File Added: gitlab-ci-1.7.diff | |
2025-03-17 20:38 | jghali | Category | General => Build System |
2025-03-17 20:38 | jghali | Summary | [PATCH] Update AppRun and bundle.sh for Scribus 1.7 => Update AppRun and bundle.sh for Scribus 1.7 |
2025-03-17 20:39 | jghali | Assigned To | => ale |
2025-03-17 20:39 | jghali | Status | new => resolved |
2025-03-17 20:39 | jghali | Resolution | open => fixed |
2025-03-17 20:39 | jghali | Fixed in Version | => 1.7.1.svn |
2025-03-17 20:39 | jghali | Note Added: 0052251 | |
2025-03-18 02:29 | qirat | Note Added: 0052259 | |
2025-03-18 17:02 | ale | Note Added: 0052261 | |
2025-03-18 17:02 | ale | File Added: gitlab-only-master.diff | |
2025-03-18 19:18 | jghali | Note Added: 0052263 | |
2025-03-19 19:10 | ale | Note Added: 0052268 | |
2025-03-19 19:10 | ale | File Added: ln-lib-earlier.diff | |
2025-03-19 22:10 | jghali | Note Added: 0052270 | |
2025-03-19 22:10 | jghali | Note Edited: 0052270 | |
2025-03-19 23:35 | jghali | Note Added: 0052272 | |
2025-03-20 16:24 | ale | Note Added: 0052276 |