blino's website

Free software developer and more

The big part is rediffing the loop-AES patch. Fortunately, upstream provides a patch for 2.14, but I want to update util-linux-ng to 2.14.1, so it has to be reworked. This new 2.14.1 version introduces a patch to support loopback autoclear on umount, which gets in the way of the loop-AES patch, so better remove it.

Since the loop-AES patch is quite intrusive, to rediff it, it is easier to start for an old tree with loop-AES, and apply the upstream diff from 2.14 to 2.14.1 on it.

wget http://loop-aes.sourceforge.net/updates/util-linux-ng-2.14-20080624.diff.bz2
wget ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/util-linux-ng-2.14.tar.bz2
wget ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/util-linux-ng-2.14.1.tar.bz2
tar xjf util-linux-ng-2.14.tar.bz2
tar xjf util-linux-ng-2.14.1.tar.bz2
# extract the autoclear on umount patch from a util-linux-ng git checkout
git show e84feaecfdf44a33ef9eccc5a56c8a6999466140 > util-linux-ng-2.14.1-umount-autoclear.patch

# prepare a 2.14.1 tree without the annoying umount autoclear patch
cp -a util-linux-ng-2.14.1 util-linux-ng-2.14.1-no-umount-autoclear
patch -p1 -R -d util-linux-ng-2.14.1-no-umount-autoclear < util-linux-ng-2.14.1-umount-autoclear.patch
rm -f util-linux-ng-2.14.1-no-umount-autoclear/mount/lomount.c.orig

# get a diff between the old and new versions
diff -rNu util-linux-ng-2.14{,.1-no-umount-autoclear} > 2.14.1.patch

# start from the old version with the loop-AES patch
cp -a util-linux-ng-2.14 util-linux-ng-2.14.1-loop-aes
bzip2 -dc util-linux-ng-2.14-20080624.diff.bz2 | patch -p1 -d util-linux-ng-2.14.1-loop-aes

# apply the upstream diff from 2.14 to 2.14.1
patch -p1 -d util-linux-ng-2.14.1-loop-aes < 2.14.1.patch

# find and fix (or drop) the few rejects
find util-linux-ng-2.14.1-loop-aes -name '*.rej'
emacs util-linux-ng-2.14.1-loop-aes/mount/Makefile.am

# write the update loop-AES patch
diff -rNu -x Makefile.in -x semantic.cache -x '*~' -x '*.orig' -x '*.rej' \
     util-linux-ng-2.14.1 util-linux-ng-2.14.1-loop-aes \
     > util-linux-ng-2.14.1-loopAES.patch
# check that no files are missing or incorrectly touched
diffstat util-linux-ng-2.14.1-loopAES.patch


Comments are closed for this story.

Trackbacks are closed for this story.

blosxom Optimised for standards.
Olivier Blin (2005)