[opensuse-buildservice] Problem building a library package for OpenSUSE_11.2

Hello everyone, I am a new user of Build Service but an old user of OpenSUSE. I am trying to provide a repository for a project I am involved in, called OrfeoToolbox. https://build.opensuse.org/package/show?package=OrfeoToolbox&project=home%3A... With the help from people over the #opensuse-buildservice Freenode channel, I managed to fix some errors in the spec file I created, and my package now builds correctly (with no errors, only few warnings) for Factory and OpenSUSE_11.3 The spec file is here: https://build.opensuse.org/package/view_file?file=OrfeoToolbox.spec&package=... When I try to build for OpenSUSE_11.2 I get the following error: |... running 03-check-binary-kernel-log ... running 04-check-filelist ... checking filelist OrfeoToolbox-3.6.0-74.1.i586.rpm: directories not owned by a package: - /usr/lib/otb OrfeoToolbox-devel-3.6.0-74.1.i586.rpm: directories not owned by a package: - /usr/lib/otb System halted. https://build.opensuse.org/package/live_build_log?arch=i586&package=OrfeoToo... |I got suggestions to list every file of my package in the %files section, but they are way too many to do this. Also, I tried other ways of declaring my file list, like /usr/lib/otb/* with same results (errors only for OpenSUSE_11.2) Can someone please propose a solution to this? Regards, Angelos -- Angelos Tzotsos Remote Sensing Laboratory National Technical University of Athens http://users.ntua.gr/tzotsos -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

On Fri, 03 Dec 2010 19:36:56 +0200 Angelos Tzotsos <gcpp.kalxas@gmail.com> wrote:
OrfeoToolbox-3.6.0-74.1.i586.rpm: directories not owned by a package:
- /usr/lib/otb
OrfeoToolbox-devel-3.6.0-74.1.i586.rpm: directories not owned by a package:
- /usr/lib/otb
Hi In the %files section add; %dir /usr/lib %dir /usr/lib/otb I would put a suse version wrapper around it as well. -- Cheers Malcolm °¿° (Linux Counter #276890) SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.24-0.2-default up 10 days 17:26, 3 users, load average: 0.25, 0.09, 0.02 GPU GeForce 8600 GTS Silent - Driver Version: 260.19.21 -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

On Fri, Dec 03, 2010 at 11:50:32AM -0600, Malcolm wrote:
On Fri, 03 Dec 2010 19:36:56 +0200 Angelos Tzotsos <gcpp.kalxas@gmail.com> wrote:
OrfeoToolbox-3.6.0-74.1.i586.rpm: directories not owned by a package:
- /usr/lib/otb
OrfeoToolbox-devel-3.6.0-74.1.i586.rpm: directories not owned by a package:
- /usr/lib/otb
In the %files section add;
%dir /usr/lib %dir /usr/lib/otb
Please use %_libdir to address this independent of the arch. See /usr/lib/rpm/macros and /usr/lib/rpm/suse_macros for the definitions. Lars -- Lars Müller [ˈlaː(r)z ˈmʏlɐ] Samba Team SUSE Linux, Maxfeldstraße 5, 90409 Nürnberg, Germany

Hi Malcolm, I have 2 %files section, with files splitting in 2 rpm packages. Should I add this to both? Is this what you propose? %files %defattr(-,root,root,-) %if %suse_version <= 1120 %dir /usr/bin %dir %{_libdir}/otb/lib*.so.* %else %{_bindir}/* %{_libdir}/otb/lib*.so.* %endif %files devel %defattr(-,root,root,-) %if %suse_version <= 1120 %dir %{_includedir}/otb/ %dir %{_libdir}/otb/lib*.so %dir %{_libdir}/otb/*.cmake %else %{_includedir}/otb/ %{_libdir}/otb/lib*.so %{_libdir}/otb/*.cmake %endif Thank you very much, Angelos On 12/03/2010 07:50 PM, Malcolm wrote:
On Fri, 03 Dec 2010 19:36:56 +0200 Angelos Tzotsos<gcpp.kalxas@gmail.com> wrote:
OrfeoToolbox-3.6.0-74.1.i586.rpm: directories not owned by a package:
- /usr/lib/otb
OrfeoToolbox-devel-3.6.0-74.1.i586.rpm: directories not owned by a package:
- /usr/lib/otb
Hi In the %files section add;
%dir /usr/lib %dir /usr/lib/otb
I would put a suse version wrapper around it as well.
-- Angelos Tzotsos Remote Sensing Laboratory National Technical University of Athens http://users.ntua.gr/tzotsos -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

Or perhaps something like this? %files %defattr(-,root,root,-) %if %suse_version <= 1120 %dir %{_bindir} %{_bindir}/* %dir %{_libdir}/otb %{_libdir}/otb/lib*.so.* %else %{_bindir}/* %{_libdir}/otb/lib*.so.* %endif %files devel %defattr(-,root,root,-) %if %suse_version <= 1120 %dir %{_includedir}/otb/ %{_includedir}/otb/* %dir %{_libdir}/otb %{_libdir}/otb/lib*.so %{_libdir}/otb/*.cmake %else %{_includedir}/otb/ %{_libdir}/otb/lib*.so %{_libdir}/otb/*.cmake %endif Regards, Angelos On 12/03/2010 08:30 PM, Angelos Tzotsos wrote:
Hi Malcolm,
I have 2 %files section, with files splitting in 2 rpm packages. Should I add this to both?
Is this what you propose?
%files %defattr(-,root,root,-) %if %suse_version <= 1120 %dir /usr/bin %dir %{_libdir}/otb/lib*.so.* %else %{_bindir}/* %{_libdir}/otb/lib*.so.* %endif
%files devel %defattr(-,root,root,-) %if %suse_version <= 1120 %dir %{_includedir}/otb/ %dir %{_libdir}/otb/lib*.so %dir %{_libdir}/otb/*.cmake %else %{_includedir}/otb/ %{_libdir}/otb/lib*.so %{_libdir}/otb/*.cmake %endif
Thank you very much, Angelos
On 12/03/2010 07:50 PM, Malcolm wrote:
On Fri, 03 Dec 2010 19:36:56 +0200 Angelos Tzotsos<gcpp.kalxas@gmail.com> wrote:
OrfeoToolbox-3.6.0-74.1.i586.rpm: directories not owned by a package:
- /usr/lib/otb
OrfeoToolbox-devel-3.6.0-74.1.i586.rpm: directories not owned by a package:
- /usr/lib/otb
Hi In the %files section add;
%dir /usr/lib %dir /usr/lib/otb
I would put a suse version wrapper around it as well.
-- Angelos Tzotsos Remote Sensing Laboratory National Technical University of Athens http://users.ntua.gr/tzotsos -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

On 2010-12-03 20:38:34 +0200, Angelos Tzotsos wrote:
%files %defattr(-,root,root,-) %if %suse_version <= 1120 %dir %{_bindir} %{_bindir}/* %dir %{_libdir}/otb %{_libdir}/otb/lib*.so.* %else %{_bindir}/* %{_libdir}/otb/lib*.so.* %endif
%files devel %defattr(-,root,root,-) %if %suse_version <= 1120 %dir %{_includedir}/otb/ %{_includedir}/otb/* %dir %{_libdir}/otb %{_libdir}/otb/lib*.so %{_libdir}/otb/*.cmake %else %{_includedir}/otb/ %{_libdir}/otb/lib*.so %{_libdir}/otb/*.cmake %endif
just ARGH just because the other distros do not complain about that, doesnt mean it is correct on them %files %defattr(-,root,root,-) %{_bindir}/* %dir %{_libdir}/otb %{_libdir}/otb/lib*.so.* %files devel %{_includedir}/otb/ %{_libdir}/otb/lib*.so %{_libdir}/otb/*.cmake 1. _bindir is covered by the filesystems package. same as _libdir and _includedir. 2. just %{_includedir}/otb/. not %dir %{_includedir}/otb/ not %{_includedir}/otb/*, just %{_includedir}/otb/ why? because rpm will include all subdirs and files in the directory automatically. 3. the %dir %{_libdir}/otb is also not needed. you require the main package and that owns the subdir already. a general advice .... if a solution looks complicated and ugly, it mostlikely is wrong. think simple and direct. darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

Hi Marcus, I try this complicated solution, because the simple one fails for 11.2 The simple one was this: %files %defattr(-,root,root,-) %{_bindir}/* %{_libdir}/otb/lib*.so.* %files devel %defattr(-,root,root,-) %{_includedir}/otb/ %{_libdir}/otb/lib*.so %{_libdir}/otb/*.cmake and failed... Can you spot any errors in this version? Regards, Angelos On 12/03/2010 08:49 PM, Marcus Rueckert wrote:
On 2010-12-03 20:38:34 +0200, Angelos Tzotsos wrote:
%files %defattr(-,root,root,-) %if %suse_version<= 1120 %dir %{_bindir} %{_bindir}/* %dir %{_libdir}/otb %{_libdir}/otb/lib*.so.* %else %{_bindir}/* %{_libdir}/otb/lib*.so.* %endif
%files devel %defattr(-,root,root,-) %if %suse_version<= 1120 %dir %{_includedir}/otb/ %{_includedir}/otb/* %dir %{_libdir}/otb %{_libdir}/otb/lib*.so %{_libdir}/otb/*.cmake %else %{_includedir}/otb/ %{_libdir}/otb/lib*.so %{_libdir}/otb/*.cmake %endif just ARGH
just because the other distros do not complain about that, doesnt mean it is correct on them %files %defattr(-,root,root,-) %{_bindir}/* %dir %{_libdir}/otb %{_libdir}/otb/lib*.so.*
%files devel %{_includedir}/otb/ %{_libdir}/otb/lib*.so %{_libdir}/otb/*.cmake
1. _bindir is covered by the filesystems package. same as _libdir and _includedir.
2. just %{_includedir}/otb/. not %dir %{_includedir}/otb/ not %{_includedir}/otb/*, just %{_includedir}/otb/ why? because rpm will include all subdirs and files in the directory automatically.
3. the %dir %{_libdir}/otb is also not needed. you require the main package and that owns the subdir already.
a general advice .... if a solution looks complicated and ugly, it mostlikely is wrong. think simple and direct.
darix
-- Angelos Tzotsos Remote Sensing Laboratory National Technical University of Athens http://users.ntua.gr/tzotsos -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

Thanks Marcus and Malcolm, Problem solved. Regards, Angelos On 12/03/2010 08:49 PM, Marcus Rueckert wrote:
On 2010-12-03 20:38:34 +0200, Angelos Tzotsos wrote:
%files %defattr(-,root,root,-) %if %suse_version<= 1120 %dir %{_bindir} %{_bindir}/* %dir %{_libdir}/otb %{_libdir}/otb/lib*.so.* %else %{_bindir}/* %{_libdir}/otb/lib*.so.* %endif
%files devel %defattr(-,root,root,-) %if %suse_version<= 1120 %dir %{_includedir}/otb/ %{_includedir}/otb/* %dir %{_libdir}/otb %{_libdir}/otb/lib*.so %{_libdir}/otb/*.cmake %else %{_includedir}/otb/ %{_libdir}/otb/lib*.so %{_libdir}/otb/*.cmake %endif just ARGH
just because the other distros do not complain about that, doesnt mean it is correct on them %files %defattr(-,root,root,-) %{_bindir}/* %dir %{_libdir}/otb %{_libdir}/otb/lib*.so.*
%files devel %{_includedir}/otb/ %{_libdir}/otb/lib*.so %{_libdir}/otb/*.cmake
1. _bindir is covered by the filesystems package. same as _libdir and _includedir.
2. just %{_includedir}/otb/. not %dir %{_includedir}/otb/ not %{_includedir}/otb/*, just %{_includedir}/otb/ why? because rpm will include all subdirs and files in the directory automatically.
3. the %dir %{_libdir}/otb is also not needed. you require the main package and that owns the subdir already.
a general advice .... if a solution looks complicated and ugly, it mostlikely is wrong. think simple and direct.
darix
-- Angelos Tzotsos Remote Sensing Laboratory National Technical University of Athens http://users.ntua.gr/tzotsos -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

On Friday 03 December 2010 19:36:56 Angelos Tzotsos wrote:
Hello everyone,
I am a new user of Build Service but an old user of OpenSUSE. I am trying to provide a repository for a project I am involved in, called OrfeoToolbox.
https://build.opensuse.org/package/show?package=OrfeoToolbox&project=home%3A tzotsos
With the help from people over the #opensuse-buildservice Freenode channel, I managed to fix some errors in the spec file I created, and my package now builds correctly (with no errors, only few warnings) for Factory and OpenSUSE_11.3
The spec file is here:
https://build.opensuse.org/package/view_file?file=OrfeoToolbox.spec&package= OrfeoToolbox&project=home%3Atzotsos&srcmd5=ffb5591057cc7a0413f69dcc8105ff2d
When I try to build for OpenSUSE_11.2 I get the following error: |... running 03-check-binary-kernel-log
... running 04-check-filelist
... checking filelist
OrfeoToolbox-3.6.0-74.1.i586.rpm: directories not owned by a package:
- /usr/lib/otb
OrfeoToolbox-devel-3.6.0-74.1.i586.rpm: directories not owned by a package:
- /usr/lib/otb
System halted.
https://build.opensuse.org/package/live_build_log?arch=i586&package=OrfeoToo lbox&project=home%3Atzotsos&repository=openSUSE_11.2
|I got suggestions to list every file of my package in the
%files section, but they are way too many to do this.
Also, I tried other ways of declaring my file list, like /usr/lib/otb/* with same results (errors only for OpenSUSE_11.2)
Can someone please propose a solution to this?
Either package the entire directory with all content via /usr/lib/otb or just package the directory: %dir /usr/lib/otb or maybe better via %dir %_libdir/otb in case it is different on lib64 systems. bye adrian -- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

Thank you Adrian, Problem was solved :) Regards, Angelos On 12/06/2010 02:52 PM, Adrian Schröter wrote:
On Friday 03 December 2010 19:36:56 Angelos Tzotsos wrote:
Hello everyone,
I am a new user of Build Service but an old user of OpenSUSE. I am trying to provide a repository for a project I am involved in, called OrfeoToolbox.
https://build.opensuse.org/package/show?package=OrfeoToolbox&project=home%3A tzotsos
With the help from people over the #opensuse-buildservice Freenode channel, I managed to fix some errors in the spec file I created, and my package now builds correctly (with no errors, only few warnings) for Factory and OpenSUSE_11.3
The spec file is here:
https://build.opensuse.org/package/view_file?file=OrfeoToolbox.spec&package= OrfeoToolbox&project=home%3Atzotsos&srcmd5=ffb5591057cc7a0413f69dcc8105ff2d
When I try to build for OpenSUSE_11.2 I get the following error: |... running 03-check-binary-kernel-log
... running 04-check-filelist
... checking filelist
OrfeoToolbox-3.6.0-74.1.i586.rpm: directories not owned by a package:
- /usr/lib/otb
OrfeoToolbox-devel-3.6.0-74.1.i586.rpm: directories not owned by a package:
- /usr/lib/otb
System halted.
https://build.opensuse.org/package/live_build_log?arch=i586&package=OrfeoToo lbox&project=home%3Atzotsos&repository=openSUSE_11.2
|I got suggestions to list every file of my package in the
%files section, but they are way too many to do this.
Also, I tried other ways of declaring my file list, like /usr/lib/otb/* with same results (errors only for OpenSUSE_11.2)
Can someone please propose a solution to this?
Either package the entire directory with all content via
/usr/lib/otb
or just package the directory:
%dir /usr/lib/otb
or maybe better via
%dir %_libdir/otb
in case it is different on lib64 systems.
bye adrian
-- Angelos Tzotsos Remote Sensing Laboratory National Technical University of Athens http://users.ntua.gr/tzotsos -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (5)
-
Adrian Schröter
-
Angelos Tzotsos
-
Lars Müller
-
Malcolm
-
Marcus Rueckert