Don't try to create the link if the target dir doesn't exist
The %post fails when you do an 8.1 minimal install (ie. no graphical interface) with CERN tools.
...
Running transaction
Preparing : 1/1
Installing : locmap-firstboot-2.1-3.el8.cern.noarch 1/1
Running scriptlet: locmap-firstboot-2.1-3.el8.cern.noarch 1/1
warning: %post(locmap-firstboot-2.1-3.el8.cern.noarch) scriptlet failed, exit status 1
Error in POSTIN scriptlet in rpm package locmap-firstboot
Verifying : locmap-firstboot-2.1-3.el8.cern.noarch 1/1
Installed:
locmap-firstboot-2.1-3.el8.cern.noarch
Complete!
This could probably do with some more testing...