#!/bin/bash set -e # # grab and compare slackware linux kernel config changes # enable as a weekly cron job # # we use .txt extension here as it makes it easier to host on lab.nethence.com # without the need to tune the nginx default mime type # day=`date +%Y-%m-%d` workdir=/data/www/lab.nethence.com/confdiff/$day/ #mirror=`grep -vE '^#|^$' /etc/slackpkg/mirrors` # we would not go for patches/ against current #mirror=http://nephtys.lip6.fr/pub/linux/distributions/slackware/slackware64-current/ # we go for patches/ for releases mirror=http://nephtys.lip6.fr/pub/linux/distributions/slackware/slackware64-15.0/ echo workdir is $workdir mkdir -p $workdir/patch/ cd $workdir/ echo echo mirror is $mirror echo wget -q -O - $mirror/kernels/VERSIONS.TXT > VERIONS.TXT wget -q -O - $mirror/kernels/huge.s/config > config wget -q -O - $mirror/patches/FILE_LIST > FILE_LIST grep -vE '^#|^$' config | sort -V > config.clean.txt pkg=`grep -E 'kernel-huge-.*.txz$' FILE_LIST | awk '{print $NF}'` [[ -z $pkg ]] && echo could not define kernel-huge file name out of FILE_LIST && exit 1 echo pkg is $pkg echo wget -q -O - $mirror/patches/$pkg | tar xJf - -C patch/ rm -f patch/boot/vmlinuz-* cd ../ grep -vE '^#|^$' $day/patch/boot/config-huge-* | sort -V > $day/patch/boot/config-huge.clean.txt #echo produce diff between release kernel config and latest from release patches echo diff since release diff -bu $day/config.clean.txt $day/patch/boot/config-huge.clean.txt > $day-since-release.txt \ || true echo -n config symlink... ln -sf $day/patch/boot/config-huge.clean.txt config.txt && echo done cat <