On 02/17/2011 01:59 PM, Marcus Meissner wrote:
On Thu, Feb 17, 2011 at 01:49:01PM +0200, Dave Plater wrote:
On 02/17/2011 01:29 PM, Yamaban wrote:
On Thu, 17 Feb 2011 11:49, Dave Plater
wrote: Hi, I home:plater:kde4/plasmoid-yawp has a new file "%{_kde_share_dir}/apps/ion_accuweather/satellite_map.conf" so I added : "%config %{_kde_share_dir}/apps/ion_accuweather/satellite_map.conf" to the files section, I didn't own the directory but 11.3 gives the same error :
<snip>
RPM build errors: File must begin with "/": /usr/share/kde4/apps/ion_accuweather/satellite_map.conf
Removing %config and owning the new directory results in a successful build. The bottom line is, I still don't understand "%config" and haven't yet nailed down a place where it's explained properly. The file "satellite_map.conf" isn't meant to be changed by user.
AFAIK %config is only for 'changeable' config-files e.g. /etc/blah, that will get an 'extra' handling on update/upgrading and removal of the package, probable NOT want you want. (It wont be deleted on removal, nor changed on update (the new file will be 'filename.rpmnew') if the file marked with %config is changed since install (see rpm --verify).
In this case I'd use a simple entry in %files, as it provides 'just' the base-config (defaults).
Hope this helps, cheers, Yamaban out
It's set my mind at ease but rpmbuild sure has a weird way of saying that what I did was wrong. Anything under %_datadir is supposed to be read only so I should have known better.
usually if RPM says "File must begin with "/":" it means just that.
Check if the macro is expanded, if there are no leading spaces etc?
Perhaps %config /%{_kde_share_dir}/apps/ion_accuweather/satellite_map.conf
Ciao, Marcus
I've left the online package correct but thought I'd try your suggestion to see what happens. If I put the "/" in front of "%{_kde_share_dir}" it makes rpmbuild happy but rpmlint says : plasmoid-yawp.x86_64: W: non-etc-or-var-file-marked-as-conffile /usr/share/kde4/apps/ion_accuweather/satellite_map.conf A file not in /etc or /var is marked as being a configuration file. Please put your conf files in /etc or /var. So now I know for sure that %config is only for /etc or /var and I've found a bug in rpmbuild, which I don't have the time to report and it would end up being very complicated anyway. I've used %config on files under /etc before and haven't had a problem, in fact IIRC rpmlint complains if you don't use %config in that case. Thanks Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org