[opensuse-packaging] how to convert pkg-config checks to BuildRequires (was: Re: openSUSE GNOME meeting (2007/10/25))
Rodrigo Moya wrote:
- Stanislav had a tool to analyze pkg-config checks for automatically update BuildRequires
It's still unfinished and might be broken... I made my proof of concept public: http://pack.suse.cz/sbrabec/pkg-buildrequires/ Technical background and problems: - It's not easy to get package dependency data from configure.in. m4 expansion may occur and shell expansion may occur as well. Finally it's not easy to guess, which branch of code is actully active => The simplest way is modifying or wrapping of pkg-config itself. Solved. - RPM offers no way how to get data collected by %build back to the spec file preamble. We need a simple but enforcing way to perform this step manually. Still needs proper solution. Proposed usage: BuildRequires: pkg-buildrequires and replace %configure by %pkg_buildrequires_configure -- Best Regards / S pozdravem, Stanislav Brabec software developer --------------------------------------------------------------------- SUSE LINUX, s. r. o. e-mail: sbrabec@suse.cz Lihovarská 1060/12 tel: +420 284 028 966 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Stanislav Brabec wrote:
Rodrigo Moya wrote:
- Stanislav had a tool to analyze pkg-config checks for automatically update BuildRequires
I just released first working version with a documentation: Sources: http://pack.suse.cz/sbrabec/pkg-buildrequires/ OBS: https://build.opensuse.org/package/show?project=home%3Asbrabec&package=pkg-buildrequires RPMs (noarch): http://download.opensuse.org/repositories/home:/sbrabec/ pkg-buildrequires This package provides a way to automatically maintain RPM BuildRequires introduced by pkg-config dependencies. Because it is not possible to update BuildRequires from build log directly, it must be done in two passes: 1) Run configure and analyze results. Compare requirements results with requirements actually uses. Fail if it does not equal. 2) Update BuildRequires of spec file. Run build again. How to use it: 1) Add pkg-buildrequires to your BuildRequires. 2) Replace %configure by %pkg_buildrequires_configure 3) Run build and fix failure by proposed way 4) Reduce manually created BuildRequires as needed. -- Best Regards / S pozdravem, Stanislav Brabec software developer --------------------------------------------------------------------- SUSE LINUX, s. r. o. e-mail: sbrabec@suse.cz Lihovarská 1060/12 tel: +420 284 028 966 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (1)
-
Stanislav Brabec