[opensuse-packaging] Help with illogical %files error

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 : + /usr/lib/rpm/brp-lib64-linux sf@suse.de: if you find problems with this script, drop me a note + /usr/lib/rpm/brp-permissions setting / to root:root 0755. (wrong owner/group abuild:abuild) setting /usr/ to root:root 0755. (wrong owner/group abuild:abuild) + /usr/lib/rpm/brp-compress + /usr/lib/rpm/brp-strip-debug + /usr/lib/rpm/brp-check-la + /usr/lib/rpm/brp-symlink + /usr/lib/rpm/brp-desktop WARNING: '/usr/lib/rpm/brp-desktop.data/suse-screensavers.menu' does not exist WARNING: '/usr/lib/rpm/brp-desktop.data/preferences-gnome.menu' does not exist WARNING: '/usr/lib/rpm/brp-desktop.data/applications-kmenuedit.menu' does not exist + /usr/lib/rpm/brp-rpath + /usr/lib/rpm/brp-pie + /usr/lib/rpm/brp-rootfs + /usr/lib/rpm/brp-tcl + /usr/lib/rpm/brp-check-python + /usr/lib/rpm/brp-boot-scripts + /usr/lib/rpm/brp-hook Processing files: plasmoid-yawp-0.3.6.457-0.x86_64 error: File must begin with "/": /usr/share/kde4/apps/ion_accuweather/satellite_map.conf Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.VU7Wxj + umask 022 + cd /usr/src/packages/BUILD + cd yawp-0.3.6.457 + DOCDIR=/usr/src/packages/BUILDROOT/plasmoid-yawp-0.3.6.457-0.x86_64/usr/share/doc/packages/plasmoid-yawp + export DOCDIR + rm -rf /usr/src/packages/BUILDROOT/plasmoid-yawp-0.3.6.457-0.x86_64/usr/share/doc/packages/plasmoid-yawp + /bin/mkdir -p /usr/src/packages/BUILDROOT/plasmoid-yawp-0.3.6.457-0.x86_64/usr/share/doc/packages/plasmoid-yawp + cp -pr README TODO CHANGELOG COPYRIGHT LICENSE-BSD LICENSE-GPL2 LICENSE-LGPL-2 /usr/src/packages/BUILDROOT/plasmoid-yawp-0.3.6.457-0.x86_64/usr/share/doc/packages/plasmoid-yawp + exit 0 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. Thanks Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

On Thu, 17 Feb 2011 11:49, Dave Plater <davejplater@...> 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 -- -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

On 02/17/2011 01:29 PM, Yamaban wrote:
On Thu, 17 Feb 2011 11:49, Dave Plater <davejplater@...> 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. Thanks Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

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 <davejplater@...> 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 -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

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 <davejplater@...> 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
participants (3)
-
Dave Plater
-
Marcus Meissner
-
Yamaban