Skip to content

Commit 0db55a3

Browse files
committed
fix libselinux
1 parent bf53f10 commit 0db55a3

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,13 @@ RUN apt-get update && apt-get install -y \
5858
git texinfo pax-utils && \
5959
rm -rf /var/lib/apt/lists/*
6060

61+
# https://github.com/AppImageCommunity/pkg2appimage/issues/83
62+
# but single is_selinux_enabled function is not enough
63+
RUN wget -O libselinux-dummy.tar.gz https://github.com/blahgeek/libselinux-dummy/archive/refs/tags/20220102.tar.gz && \
64+
tar xf libselinux-dummy.tar.gz && \
65+
cd libselinux-dummy-20220102 && \
66+
make && make install && \
67+
ln -sf /lib/libselinux.so.1 /lib/$(uname -m)-linux-gnu/libselinux.so.1 && \
68+
cd .. && rm -rf libselinux-dummy-20220102 libselinux-dummy.tar.gz
69+
6170
ADD scripts /work/scripts

scripts/build_emacs_in_docker.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,3 @@ popd
6767

6868
cp $SCRIPT_DIR/AppRun $DIST_APPDIR/AppRun
6969
python3 $SCRIPT_DIR/postprocess.py $DIST_APPDIR
70-
71-
# https://github.com/AppImageCommunity/pkg2appimage/issues/83
72-
echo "extern int is_selinux_enabled(void){return 0;}" > /tmp/selinux-mock.c
73-
gcc-8 -s -shared -o /tmp/libselinux.so.1 -Wl,-soname,libselinux.so.1 /tmp/selinux-mock.c
74-
mv /tmp/libselinux.so.1 ${DIST_APPDIR}/lib/

0 commit comments

Comments
 (0)