PatchingBashOnDebian

31st May 2016 at 4:25pm
Bash Debian DebianPackaging TechnicalNotes

The following will enable syslog history functionality in bash so that your bash command line history will be sent to syslog. (By default to the USER faclity, loglevel INFO).

sudo apt-get install quilt devscripts build-essential
sudo apt-get build-dep bash
cd ~
apt-get source bash
cd bash-4.3/
export QUILT_PATCHES=debian/patches
quilt push -a
quilt new enable-syslog.diff
quilt add config-top.h
sed -ri 's,^/\*.*(#define SYSLOG_HISTORY) .+,\1,' config-top.h
quilt refresh
quilt pop -a
debuild -uc -us

You may also find the following useful which explain a little more detail about what the above commands are actually doing: