I am distributing my RHEL6 rpm from a windows server. I have some information in a configuration file (such as the name and address of the server) that I bundle into a tgz with the rpm. I then have a specific place I want to put the configuration file.
The problem I'm having is that the current working directory when the spec scripts execute seems to be /. Ideally, I'd have a person untar the tgz and then run rpm and the config file is right there. . . but I have no idea where I am because my context gets switched to root.
Is there a way to know where the rpm is getting installed from in the spec scripts? Any other thoughts/comments/jokes about what I'm trying to do?