Search for the package that contains a file

sudo pacman -S pkgfile
sudo pkgfile --update
pkgfile $filename