Last active
June 6, 2021 07:25
-
-
Save CzBiX/e64256b23687bb13da02 to your computer and use it in GitHub Desktop.
Patch glib to fix this bug: https://bugs.launchpad.net/ubuntu/+source/glib2.0/+bug/1495781
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: CzBiX | |
# URL: https://gist.github.com/CzBiX/e64256b23687bb13da02 | |
# Support only Ubuntu 16.04 | |
DEST_PACKAGE="libglib2.0-0" | |
DEST_VERSION="2.48.1-1~ubuntu16.04.1" | |
DEST_FILE="/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.4800.1" | |
PATCH_DATA="f626c: eb" | |
SUCCESS_MSG="Please quit nautilus with 'nautilus -q' to make sure patch worked." | |
function failed { | |
echo >&2 $1; | |
exit 1; | |
} | |
[ $(arch) == 'x86_64' ] || failed "only support x86_64." | |
type xxd >/dev/null 2>&1 || failed "xxd not found, please install vim." | |
[ $(apt-cache policy $DEST_PACKAGE | grep Installed | cut -d ' ' -f 4) == $DEST_VERSION ] || failed "$DEST_PACKAGE version not match with '$DEST_VERSION'." | |
echo $PATCH_DATA | sudo xxd -r - $DEST_FILE || failed "patch failed." | |
echo $SUCCESS_MSG |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Sadi58 Sorry, but the steps are hard to teach if you are not developer.
@AntoniosHadji compile source without
debian/patches/0001-Fix-trashing-on-overlayfs.patch
.