If you run `make install' twice for the web pages, then you will get broken symlinks for the security patches: export DESTDIR=$(mktemp -d); WEB_ONLY=YES make install; egrep -rl wosch $DESTDIR >/dev/null ====> Creating symlinks in /tmp/tmp.cro8qBGF/data/security/patches tcp47.patch -> SA-04:04/tcp47.patch tcp47.patch.asc -> SA-04:04/tcp47.patch.asc tcp52.patch -> SA-04:04/tcp52.patch tcp52.patch.asc -> SA-04:04/tcp52.patch.asc SA-10-05 -> SA-10:05 SA-04:09/kadmind.patch -> kadmin.patch SA-04:09/kadmind.patch.asc -> kadmin.patch.asc SA-02:40/kadmin.patch -> kadmind.patch SA-02:40/kadmin.patch.asc -> kadmind.patch.asc SA-00:23/ip_options.diff -> ip-options.diff SA-00:23/ip_options.diff.asc -> ip-options.diff.asc WEB_ONLY=YES make install; egrep -rl wosch $DESTDIR >/dev/null ====> Creating symlinks in /tmp/tmp.cro8qBGF/data/security/patches tcp47.patch -> SA-04:04/tcp47.patch tcp47.patch.asc -> SA-04:04/tcp47.patch.asc tcp52.patch -> SA-04:04/tcp52.patch tcp52.patch.asc -> SA-04:04/tcp52.patch.asc SA-10-05 -> SA-10:05 SA-04:09/kadmind.patch -> kadmin.patch SA-04:09/kadmind.patch.asc -> kadmin.patch.asc SA-02:40/kadmin.patch -> kadmind.patch SA-02:40/kadmin.patch.asc -> kadmind.patch.asc SA-00:23/ip_options.diff -> ip-options.diff SA-00:23/ip_options.diff.asc -> ip-options.diff.asc egrep: /tmp/tmp.cro8qBGF/data/security/patches/SA-10:05/SA-10:05: Too many levels of symbolic links egrep: /tmp/tmp.cro8qBGF/data/security/patches/SA-10-05/SA-10:05: Too many levels of symbolic links
I think the problem is in doc/en_US.ISO8859-1/htdocs/security/patches/Makefile f16141f111f (bz 2012-09-17 08:42:56 +0000 19) SYMLINKS+= SA-10:05 SA-10-05 so, SA-10-05 will be symlinked itself. Bjoern?
Actually, I think the error is that the SYMLINK features which works only for files and not for a directory. The semantic of `ln -fs' is special if you run it for directories twice, e.g. mkdir from ln -sf from to find . -name from -or -name to ./to ./from now run it again ln -sf from to find . -name from -or -name to ./to ./from ./from/from ls -l from total 1 lrwxrwxr-x 1 wosch devel 4 Oct 6 13:54 from -> from Proposed fix: in share/mk/web.site.mk we need to delete the target first before we call ln -fs
A commit references this bug: Author: wosch Date: Sat Oct 7 09:03:10 UTC 2017 New revision: 51070 URL: https://svnweb.freebsd.org/changeset/doc/51070 Log: we need to delete the target symlink first before we can create it This solved the issue with symlinks to directories. The semantic of `ln -fs' is special if you run it for directories twice, e.g. mkdir from ln -sf from to find . -name from -or -name to ./to ./from now run it again ln -sf from to find . -name from -or -name to ./to ./from ./from/from ls -l from total 1 lrwxrwxr-x 1 wosch devel 4 Oct 6 13:54 from -> from PR: 222737 Changes: head/share/mk/web.site.mk