Generally speaking the role affects the design, Sniper usually assassinate high value target with one shot while DMR is the guy in the squad good at long range engagement. If everything go to plan snipers could probably use a single shot 338 rifle while semi auto would be best for DMR.
That is more Hollywood’s version of a sniper,
Urban operations have pushed military snipers to increasingly favor semiautomatic weapons as it allows rapid follow up and even use in clearing a site to use for a nest.
This is also preferred in counter terror. The bolt action class is preferred for longer reach with more specific ammunition yet even then there are semi automatic rifles in such calibers available.
examples of the former HK PSG-1, M110/SR25, Walther 2000, M21
The preference for a bolt action was based on three reasons. First reliability, stability, availability (often based off commercial target rifles, hunting rifles or older service rifles).
The lines between a sniper and a Designated marksman are more clear today but primarily it’s one of if the Soldier is attached to a unit organically or not. If the former than he is a Designated marksman. If the latter a sniper. If you go back to WW2 the rifles used were often interchangeable between Sniper and marksman and differed only from the standard issue rifle in having a scope.
As for who is targeted again not as clear cut. Although high ranking officials would be so might a forward observer, radio operator, basically anyone who is a specialist fits the bill.
Today because of the accuracy of high quality manufacturing in rifles a precision built rifle like the M110A1 could with a high powered telescope and one set of kit serve as a Sniper rifle well with a lesser scope and accessories be a DMR.
It’s not about the Rifle it’s about how it’s used.