Skip to content

Instantly share code, notes, and snippets.

@probonopd
Last active November 15, 2015 22:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save probonopd/46cca5eeb65e7560f43e to your computer and use it in GitHub Desktop.
Save probonopd/46cca5eeb65e7560f43e to your computer and use it in GitHub Desktop.
Try to compile Subsurface and bundle it as an AppImage on CentOS 6
Moved to https://github.com/probonopd/AppImages/blob/master/recipes/subsurface.centos6.sh
# THIS DOES NOT WORK, uSE THE ONE AT https://github.com/probonopd/AppImages/blob/master/recipes/subsurface.centos6.sh
# Cannot use CentOS-5.6-x86_64-LiveCD.iso since it uses squashfs3 which
# cannot easily be mounted by later systems.
# So I have tried the following, but it seems like a lot of work is required
# to make Subsurface build on CentOS 5.
sudo su
mkdir -p /tmp/unionfs/rw
mkdir -p /tmp/union
apt-get -y install rinse
rinse --distribution centos-5 --arch amd64 --directory /tmp/unionfs/root
# or
# mock -v -r epel-6-x86_64 --init
unionfs-fuse -o allow_other,use_ino,suid,dev,nonempty -ocow,chroot=/tmp/unionfs/,max_files=32768 /rw=RW:/root=RO /tmp/union
mount -t proc proc /tmp/union/proc
mount --bind /var/lib/dbus /tmp/union/var/lib/dbus
touch /tmp/union/etc/resolv.conf || echo ""
mount --bind /etc/resolv.conf /tmp/union/etc/resolv.conf
xhost local: >/dev/null 2>&1 # otherwise "cannot open display: :0.0"
# cat /etc/*release
# CentOS release 5.11 (Final)
yum -y install epel-release
yum -y install wget keyutils-libs git sudo tar gzip which p7zip make autoconf automake
# Fake sudo so that scripts using it can run
echo "" > /usr/bin/sudo
===
wget https://gist.githubusercontent.com/probonopd/46cca5eeb65e7560f43e/raw/b66e0314b7281121c1433b7e06cf8459810aad85/build-centos-6.5.sh --no-check-certificate
bash -ex build-centos-6.5.sh amd64
===
set +e
umount -l /tmp/union/var/lib/dbus 2>/dev/null
umount -l /tmp/union/etc/resolv.conf 2>/dev/null
umount -l /tmp/union/proc 2>/dev/null
umount -l /tmp/union/opt 2>/dev/null
umount -l /tmp/union 2>/dev/null
umount -l /tmp/unionfs/root 2>/dev/null
sudo killall unionfs-fuse 2>/dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment