It’s not entirely relevant to your question, but yum accepts a search pattern for the 3rd argument, so piping into grep isn’t necessary:
yum list installed syncthing
Is that a data center channel?
Syncthing isn’t in the stock @base and @updates channels for CentOS 7.
syncthing --version returning a different version isn’t unusual. It’s fairly common to have multiple versions of tools on a server.
Issuing a command without the full pathname (e.g., /usr/bin/syncthing) results in crawling the search path and executing the first match found.
What’s the output from the following command?
echo $PATH
(Please consider updating the title of your post, because unfortunately, “What is the current version?” could be easily mistakenly interpreted as asking what the current version of Syncthing is, which is much easier to find on the downloads and GitHub release pages than it is to register and post a support question on the user forum. )
Hope you don’t mind that I edited the title of the thread for you.
The output from which syncthing and echo $PATH look normal.
According to the RPM file, the Syncthing binary is installed as /usr/local/bin/syncthing. What does the following command return?
rpm --query --list syncthing
Without knowing more about the sequence of events and how your CentOS box is set up, best guess is that you might have conflicting repositories configured. Would you mind posting the contents of /etc/yum.repos.d/?
One thing to try is this:
killall syncthing
yum autoremove syncthing
yum clean all
yum install syncthing
During the reinstall, note which version is going to be installed and from which repo.
At this point I’d do a filesystem search for all instances of syncthing:
find / -name "syncthing"
The only way that currently comes to mind that would explain the results you’ve been posting are that either there are two (or more) different syncthing binaries on your system and the command search path leads to the older version first, or there’s a shell alias involved.
Either way, if it were me, I’d first remove Syncthing and clean things up. I’d keep going until issuing the command syncthing and /usr/bin/syncthing returns the error “command not found”.
Only then would I check to see how many Syncthing packages are available from the configured repos – i.e., a yum list syncthing should only return one match with the version you want. Anything else requires more extensive cleanup first.
I loaded the RPM from Copr, converted it with rpm2archive, and unpacked the tarball to take a peek.
Sure enough, the syncthing binary says it’s 1.21.0 even though the RPM is labeled as 1.23.5. Copr’s build log for the package says it’s supposed to be 1.23.5 and when I checked the Syncthing source tarball that was used the release file also said 1.23.5.