Subject: bug#17149: shred - tape data

From: Pádraig Brady <[email-masked]>
Date: Fri, 04 Apr 2014 12:03:04 +0100

On 04/04/2014 11:49 AM, Rupert Russell wrote:
> Paul,
> 
> I have a confession to make and that is I'm not sure really how to deal with the diff file and now the fixup for the patch.
> Googling around, I can see that 
> patch -p1 < shred1.diff 
> needs to be run from where the source resides.
> But then it's not immediately obvious to me, at my relatively light level of Linux knowledge, if this requires a remake or compilation of the kernel.
> If it does, then it's not something I've done before, and depending on where I read, the methods for doing this aren't universally the same.
> 
> Might I have a few pointers please?

The patch works around the kernel behavior and so no changes are needed there.
To compile a new shred binary for testing:

  mkdir shred-test && cd shred-test
  wget http://ftp.gnu.org/gnu/coreutils/coreutils-8.22.tar.xz
  tar -xf coreutils-8.22.tar.xz
  cd coreutils-8.22
  wget 'http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=patch;h=88545ad0' -O- | patch -p1
  ./configure --quiet && make -j $(nproc)

Now the new shred is available in src/shred.
You can run it directly from there or copy to somewhere like /usr/local/bin.

cheers,
Pádraig.