Package: patch
Version: 2.7.4-1
Severity: serious
Justification: causes FTBFS in other packages

Hi,

I think patch now refuses a legitimate use of directory symlinks,
causing nvidia-graphics-drivers to FTBFS.
It does not involve creating symlinks and only uses relative "forward" symlinks
for directories, not the files involved, reproduce as follows:

mkdir -p a/link b/link
echo hello > a/link/file
echo world > b/link/file
diff -u a/link/file b/link/file > the.patch
rm -f a/link/file b/link/file
rmdir a/link b/link a b

mkdir dir
ln -s dir link
echo hello > dir/file

$ cat link/file
hello

$ patch -p1 --debug 32 < the.patch
Resolving path "link/" (failed)
Refusing to follow symbolic link link

$ patch -p1 --follow-symlinks --debug 32 < the.patch
Resolving path "link/" (failed)
Refusing to follow symbolic link link

The description of the --follow-symlinks option did not sound like it
was intended for this case (but rather for symlinks to file targets),
but I tried it anyway.

Looking at the code, getting into a ELOOP situation here sounds like a
logic flaw.


Andreas


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to