Skip to content

Commit 6a3dc91

Browse files
Remove patchelf
#29 (comment)
1 parent 07bab63 commit 6a3dc91

10 files changed

+10
-16
lines changed

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ This is an (as of yet experimental) plugin for linuxdeploy. Its job is to bundle
66

77
This plugin requires the following dependencies in order to work properly:
88

9-
- `patchelf` command
109
- `file` command
1110
- `find` command
1211
- `pkg-config` or `pkgconf` command

containers/gtk3/Dockerfile.debian

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ARG APPDIR=/AppDir
66
ARG TZ=UTC
77
RUN ln -snf "/usr/share/zoneinfo/$TZ" "/etc/localtime" && echo "$TZ" > /etc/timezone
88
RUN apt-get update && \
9-
apt-get install -y wget patchelf librsvg2-dev file findutils pkg-config libgtk-3-0 libgtk-3-dev gtk-3-examples
9+
apt-get install -y wget librsvg2-dev file findutils pkg-config libgtk-3-0 libgtk-3-dev gtk-3-examples
1010
COPY . .
1111
ADD "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" .
1212
RUN chmod +x *.sh *.AppImage

containers/gtk3/Dockerfile.fedora

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM docker.io/fedora:latest AS build-stage
22
WORKDIR /linuxdeploy
33
ENV APPIMAGE_EXTRACT_AND_RUN=1
44
ARG APPDIR=/AppDir
5-
RUN dnf install -y wget patchelf librsvg2-devel file findutils pkgconfig gtk3 gtk3-devel
5+
RUN dnf install -y wget librsvg2-devel file findutils pkgconfig gtk3 gtk3-devel
66
COPY . .
77
ADD "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" .
88
RUN chmod +x *.sh *.AppImage

containers/gtk3/Dockerfile.opensuse

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM docker.io/opensuse/leap:15 AS build-stage
22
WORKDIR /linuxdeploy
33
ENV APPIMAGE_EXTRACT_AND_RUN=1
44
ARG APPDIR=/AppDir
5-
RUN zypper install -y wget patchelf librsvg2-devel file findutils pkg-config gtk3 gtk3-devel
5+
RUN zypper install -y wget librsvg2-devel file findutils pkg-config gtk3 gtk3-devel
66
COPY . .
77
ADD "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" .
88
RUN chmod +x *.sh *.AppImage

containers/gtk3/Dockerfile.ubuntu

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ARG APPDIR=/AppDir
66
ARG TZ=UTC
77
RUN ln -snf "/usr/share/zoneinfo/$TZ" "/etc/localtime" && echo "$TZ" > /etc/timezone
88
RUN apt-get update && \
9-
apt-get install -y wget patchelf librsvg2-dev file findutils pkg-config libgtk-3-0 libgtk-3-dev gtk-3-examples
9+
apt-get install -y wget librsvg2-dev file findutils pkg-config libgtk-3-0 libgtk-3-dev gtk-3-examples
1010
COPY . .
1111
ADD "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" .
1212
RUN chmod +x *.sh *.AppImage

containers/gtk4/Dockerfile.debian

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ARG APPDIR=/AppDir
77
ARG TZ=UTC
88
RUN ln -snf "/usr/share/zoneinfo/$TZ" "/etc/localtime" && echo "$TZ" > /etc/timezone
99
RUN apt-get update && \
10-
apt-get install -y wget patchelf librsvg2-dev file findutils pkg-config && \
10+
apt-get install -y wget librsvg2-dev file findutils pkg-config && \
1111
apt-get install -y -t experimental libgtk-4-1 libgtk-4-dev gtk-4-examples
1212
COPY . .
1313
ADD "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" .

containers/gtk4/Dockerfile.fedora

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM docker.io/fedora:latest AS build-stage
22
WORKDIR /linuxdeploy
33
ENV APPIMAGE_EXTRACT_AND_RUN=1
44
ARG APPDIR=/AppDir
5-
RUN dnf install -y wget patchelf librsvg2-devel file findutils pkgconfig gtk4 gtk4-devel gtk4-devel-tools
5+
RUN dnf install -y wget librsvg2-devel file findutils pkgconfig gtk4 gtk4-devel gtk4-devel-tools
66
COPY . .
77
ADD "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" .
88
RUN chmod +x *.sh *.AppImage

containers/gtk4/Dockerfile.opensuse

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM docker.io/opensuse/tumbleweed:latest AS build-stage
33
WORKDIR /linuxdeploy
44
ENV APPIMAGE_EXTRACT_AND_RUN=1
55
ARG APPDIR=/AppDir
6-
RUN zypper install -y wget patchelf librsvg2-devel file findutils pkg-config gtk4 gtk4-devel
6+
RUN zypper install -y wget librsvg2-devel file findutils pkg-config gtk4 gtk4-devel
77
COPY . .
88
ADD "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" .
99
RUN chmod +x *.sh *.AppImage

containers/gtk4/Dockerfile.ubuntu

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ARG APPDIR=/AppDir
66
ARG TZ=UTC
77
RUN ln -snf "/usr/share/zoneinfo/$TZ" "/etc/localtime" && echo "$TZ" > /etc/timezone
88
RUN apt-get update && \
9-
apt-get install -y wget patchelf librsvg2-dev file findutils pkg-config libgtk-4-1 libgtk-4-dev gtk-4-examples
9+
apt-get install -y wget librsvg2-dev file findutils pkg-config libgtk-4-1 libgtk-4-dev gtk-4-examples
1010
COPY . .
1111
ADD "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" .
1212
RUN chmod +x *.sh *.AppImage

linuxdeploy-plugin-gtk.sh

+2-7
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,6 @@ if ! command -v find &>/dev/null && ! type find &>/dev/null; then
133133
exit 1
134134
fi
135135

136-
if ! command -v patchelf &>/dev/null && ! type patchelf &>/dev/null; then
137-
echo -e "$0: patchelf not found.\nInstall patchelf then re-run the plugin."
138-
exit 1
139-
fi
140-
141136
if [ -z "$LINUXDEPLOY" ]; then
142137
echo -e "$0: LINUXDEPLOY environment variable is not set.\nDownload a suitable linuxdeploy AppImage, set the environment variable and re-run the plugin."
143138
exit 1
@@ -296,6 +291,8 @@ done
296291

297292
env LINUXDEPLOY_PLUGIN_MODE=1 "$LINUXDEPLOY" --appdir="$APPDIR" "${LIBRARIES[@]}"
298293

294+
# Create symbolic links as a workaround
295+
# Details: https://github.com/linuxdeploy/linuxdeploy-plugin-gtk/issues/24#issuecomment-1030026529
299296
echo "Manually setting rpath for GTK modules"
300297
PATCH_ARRAY=(
301298
"$gtk3_immodulesdir"
@@ -304,8 +301,6 @@ PATCH_ARRAY=(
304301
)
305302
for directory in "${PATCH_ARRAY[@]}"; do
306303
while IFS= read -r -d '' file; do
307-
# shellcheck disable=SC2016
308-
patchelf --set-rpath '$ORIGIN' "$APPDIR/$file"
309304
ln $verbose -s "${file/\/usr\/lib\//}" "$APPDIR/usr/lib"
310305
done < <(find "$directory" -name '*.so' -print0)
311306
done

0 commit comments

Comments
 (0)