Last active
March 6, 2018 04:57
-
-
Save dhavalgshah/bbf68db8381567132f5b50391af81297 to your computer and use it in GitHub Desktop.
How to patch xorg in ubuntu 16.04.4 (bug of keyboard layout change)
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
# Bug https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1683383 | |
# Original article https://habrahabr.ru/post/87408/ | |
# @Todo- Automate the version detection | |
# @Todo- Use version variable in commands below so script don't break when new major or minor versions are released | |
# create directory | |
mkdir xorg-server | |
cd xorg-server | |
# get sources of required package | |
# may be need to uncomment 'deb-src' lines in sources.list before | |
apt-get source xorg-server-hwe-16.04 | |
# install dependencies required for building | |
sudo apt-get build-dep xorg-server-hwe-16.04 | |
sudo apt install devscripts | |
# download patch | |
wget https://bugs.freedesktop.org/attachment.cgi?id=129861 | |
# apply patch | |
#patch xserver-xorg-core-hwe-16.04_19.3.1/xkb/xkbAction.c < attachment.cgi\?id\=129861 | |
patch xorg-server-hwe-16.04-1.19.3/xkb/xkbActions.c < attachment.cgi\?id\=129861 | |
# build | |
cd xorg-server-hwe-16.04-1.19.3 | |
debuild -us -uc | |
cd .. | |
# install patched package | |
#sudo dpkg -i ./xserver-xorg-core-hwe-16.04_1.19.3-1ubuntu1-16.04.2_amd64.deb | |
sudo dpkg -i ./xserver-xorg-core-hwe-16.04_1.19.3-1ubuntu1~16.04.4_amd64.deb | |
# pin version of this package to prevent updating later | |
cat <<EOF>> /etc/apt/preferences.d/xserver-xorg-core-hwe | |
Package: xserver-xorg-core-hwe-16.04 | |
Pin: version 2:1.19.3-1ubuntu1~16.04.4 | |
Pin-Priority: 700 | |
EOF | |
# check that pinning works properly | |
apt-cache policy xserver-xorg-core-hwe-16.04 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment