#1134509 False positive: maintainer-script-switches-dir-to-symlink-unsafely

#1134509#5
Date:
2026-04-21 02:15:52 UTC
From:
To:
The regex for maintainer-script-switches-dir-to-symlink-unsafely seems
far too broad, and I don't know why doc is even relevant here.

The regex: ln[ ]*-f?s.*doc

Note that this tag was previously enabled in bug #917567, and reverted
due to nuisance false positives, I assume it should not have been
re-enabled again.

I would recommend reverting be114d99beec08a28d2501e59a01f451591fd8e2

I ran into this in debusine-server which has this in its postinst:

        if [ "$RET" = "nginx" ] && [ -d /etc/nginx/sites-enabled ]; then
                ln -s /usr/share/doc/debusine-server/examples/nginx-vhost.conf /etc/nginx/sites-enabled/
debusine-server || true
                ln -s /usr/share/doc/debusine-server/examples/nginx-vhost-deb.conf /etc/nginx/sites-enabled/debusine-server || true

Obviously a false positive here.

 maintainer-script-switches-dir-to-symlink-unsafely "ln -s /usr/share/doc" [postinst:95]
 maintainer-script-switches-dir-to-symlink-unsafely "ln -s /usr/share/doc" [postinst:96]

Stefano

#1134509#10
Date:
2026-04-21 15:10:44 UTC
From:
To:
As per git history this was introduced in 2015 and was exp yes even then: https://salsa.debian.org/lintian/lintian/-/commit/7939aad86a8da0f7ef428decc4a8e6629b825032

I've opened with more explanation in https://salsa.debian.org/lintian/lintian/-/merge_requests/707 - we
should be able to merge this once salsa CI problems are fixed.

This bug will need to stay open until a proper fix for this FP is found. I also think it is not a bad idea
to drop the tag altogether.

Best,
Nilesh