Mike can you keep the sed in the Rakefile and change the /etc/foreman path according to the SYSCONFDIR setting? We now allow users to use Rakefile in tarball distribution, this is hardcoded now. It would be something like (not tested):

    sh 'sed -i "s#\(.*CONFIG_FILE\) = '/etc.*#\1 = \"%s\" + config_filename#" %s' % ["#{SYSCONFDIR}/foreman/", t.name]

Does not look nice, if you coud introduce something like BASE_CONFIG_DIR variable and sed that, would be much nicer.