FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 11-06-2008, 10:01 AM
"Richard W.M. Jones"
 
Default Automatic BuildRequires

[I'm sure this isn't the first time this has occurred to someone, or
even been done -- but couldn't find anything for it in Google ...]

http://et.redhat.com/~rjones/auto-buildrequires/

This tries to find the correct set of BuildRequires automatically when
running 'rpmbuild'. Just replace the ordinary rpmbuild command with
auto-br-rpmbuild, and it will print out a suggested set of
BuildRequires lines at the end. For example:

$ auto-br-rpmbuild -ba mingw32-iconv.spec
[...]
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/rjones/rpmbuild/BUILDROOT/mingw32-iconv-1.12-5.fc10.x86_64
Wrote: /home/rjones/rpmbuild/SRPMS/mingw32-iconv-1.12-5.fc10.src.rpm
Wrote: /home/rjones/rpmbuild/RPMS/noarch/mingw32-iconv-1.12-5.fc10.noarch.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.XpFhTF
+ umask 022
+ cd /home/rjones/rpmbuild/BUILD
+ cd libiconv-1.12
+ rm -rf /home/rjones/rpmbuild/BUILDROOT/mingw32-iconv-1.12-5.fc10.x86_64
+ exit 0
BuildRequires: bash = 3.2.29.fc10.x86_64
BuildRequires: binutils = 2.18.50.0.9.7.fc10.x86_64
BuildRequires: ccache = 2.4.13.fc9.x86_64
BuildRequires: coreutils = 6.12.16.fc10.x86_64
BuildRequires: diffutils = 2.8.1.21.fc9.x86_64
BuildRequires: file = 4.26.3.fc10.x86_64
BuildRequires: findutils = 1:4.4.0.1.fc10.x86_64
BuildRequires: gawk = 3.1.5.18.fc10.x86_64
BuildRequires: gcc-gfortran = 4.3.2.6.x86_64
BuildRequires: gettext = 0.17.8.fc10.x86_64
BuildRequires: glibc-common = 2.8.90.14.x86_64
BuildRequires: grep = 2.5.1a.61.fc10.x86_64
BuildRequires: gzip = 1.3.12.7.fc10.x86_64
BuildRequires: make = 1:3.81.14.fc10.x86_64
BuildRequires: mingw32-binutils = 2.18.50_20080109_2.8.fc9.x86_64
BuildRequires: mingw32-filesystem = 34.1.fc9.noarch
BuildRequires: mingw32-gcc-c++ = 4.3.2.8.fc9.x86_64
BuildRequires: mingw32-gcc = 4.3.2.8.fc9.x86_64
BuildRequires: mingw32-gettext = 0.17.6.fc9.noarch
BuildRequires: mingw32-iconv = 1.12.4.fc9.noarch
BuildRequires: mingw32-runtime = 3.15.1.1.fc9.noarch
BuildRequires: mingw32-w32api = 3.12.1.fc9.noarch
BuildRequires: net-tools = 1.60.91.fc10.x86_64
BuildRequires: sed = 4.1.5.10.fc9.x86_64
BuildRequires: tar = 2:1.20.3.fc10.x86_64

As you can see it's not perfect. It doesn't ignore 'core' packages
which are always expected in a mock/koji build. Also because autoconf
scripts tend to touch the C++ and Fortran compilers, even when they
are not used, it always suggests those packages. Also it doesn't
exclude some tools like tar which are touched by rpmbuild itself.

The implementation is a simple LD_PRELOAD script that analyzes open(2)
and execve(2) system calls, a Perl script that does the analysis, and
some shell scripts to hang it all together.

Rich.

--
Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 11-06-2008, 10:15 AM
Ignacio Vazquez-Abrams
 
Default Automatic BuildRequires

On Thu, 2008-11-06 at 11:01 +0000, Richard W.M. Jones wrote:
> [I'm sure this isn't the first time this has occurred to someone, or
> even been done -- but couldn't find anything for it in Google ...]
>
> http://et.redhat.com/~rjones/auto-buildrequires/
>
> This tries to find the correct set of BuildRequires automatically when
> running 'rpmbuild'. Just replace the ordinary rpmbuild command with
> auto-br-rpmbuild, and it will print out a suggested set of
> BuildRequires lines at the end. For example:

I take it that it needs to be run in a system/root that already has the
appropriate packages installed?

--
Ignacio Vazquez-Abrams <ivazqueznet@gmail.com>

PLEASE don't CC me; I'm already subscribed
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 11-06-2008, 10:16 AM
"Richard W.M. Jones"
 
Default Automatic BuildRequires

On Thu, Nov 06, 2008 at 06:15:38AM -0500, Ignacio Vazquez-Abrams wrote:
> On Thu, 2008-11-06 at 11:01 +0000, Richard W.M. Jones wrote:
> > [I'm sure this isn't the first time this has occurred to someone, or
> > even been done -- but couldn't find anything for it in Google ...]
> >
> > http://et.redhat.com/~rjones/auto-buildrequires/
> >
> > This tries to find the correct set of BuildRequires automatically when
> > running 'rpmbuild'. Just replace the ordinary rpmbuild command with
> > auto-br-rpmbuild, and it will print out a suggested set of
> > BuildRequires lines at the end. For example:
>
> I take it that it needs to be run in a system/root that already has the
> appropriate packages installed?

Yes, you just run it on a normal system. The main idea is so you
don't have to keep submitting Koji jobs because you missed out some
BuildRequires.

Rich.

--
Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 11-06-2008, 05:23 PM
Michael Schwendt
 
Default Automatic BuildRequires

On Thu, 6 Nov 2008 11:01:42 +0000, Richard W.M. Jones wrote:

> [I'm sure this isn't the first time this has occurred to someone, or
> even been done -- but couldn't find anything for it in Google ...]
>
> http://et.redhat.com/~rjones/auto-buildrequires/

There's one slightly similar one, which is several years old:

https://www.europe.redhat.com/documentation/rhl6.2/rhl_6.2_sw_repository/rhl_6.2_powertools/InDependence-1.0-6.i386.php3

Download it here for example:
http://www.filewatcher.com/m/InDependence-1.0-6.src.rpm.16197.0.0.html

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 11-09-2008, 07:49 PM
Matt Domsch
 
Default Automatic BuildRequires

On Thu, Nov 06, 2008 at 07:23:02PM +0100, Michael Schwendt wrote:
> On Thu, 6 Nov 2008 11:01:42 +0000, Richard W.M. Jones wrote:
>
> > [I'm sure this isn't the first time this has occurred to someone, or
> > even been done -- but couldn't find anything for it in Google ...]
> >
> > http://et.redhat.com/~rjones/auto-buildrequires/
>
> There's one slightly similar one, which is several years old:
>
> https://www.europe.redhat.com/documentation/rhl6.2/rhl_6.2_sw_repository/rhl_6.2_powertools/InDependence-1.0-6.i386.php3
>
> Download it here for example:
> http://www.filewatcher.com/m/InDependence-1.0-6.src.rpm.16197.0.0.html

this might be useful on conjunction with the occasional "full rawhide
rebuilds using rpmbuild on a system with Everything installed" run
that someone (sorry, I forget who did this) does. That has the added
benefit of picking up features that configure auto-discovers but if
missing BRs, won't discover.

--
Matt Domsch
Linux Technology Strategist, Dell Office of the CTO
linux.dell.com & www.dell.com/linux

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 11-09-2008, 08:01 PM
Matt Domsch
 
Default Automatic BuildRequires

On Sun, Nov 09, 2008 at 02:49:46PM -0600, Matt Domsch wrote:
> On Thu, Nov 06, 2008 at 07:23:02PM +0100, Michael Schwendt wrote:
> > On Thu, 6 Nov 2008 11:01:42 +0000, Richard W.M. Jones wrote:
> >
> > > [I'm sure this isn't the first time this has occurred to someone, or
> > > even been done -- but couldn't find anything for it in Google ...]
> > >
> > > http://et.redhat.com/~rjones/auto-buildrequires/
> >
> > There's one slightly similar one, which is several years old:
> >
> > https://www.europe.redhat.com/documentation/rhl6.2/rhl_6.2_sw_repository/rhl_6.2_powertools/InDependence-1.0-6.i386.php3
> >
> > Download it here for example:
> > http://www.filewatcher.com/m/InDependence-1.0-6.src.rpm.16197.0.0.html
>
> this might be useful on conjunction with the occasional "full rawhide
> rebuilds using rpmbuild on a system with Everything installed" run
> that someone (sorry, I forget who did this) does. That has the added
> benefit of picking up features that configure auto-discovers but if
> missing BRs, won't discover.

It was Karsten Hopp back in March 2008.
https://www.redhat.com/archives/fedora-devel-list/2008-March/msg01257.html

--
Matt Domsch
Linux Technology Strategist, Dell Office of the CTO
linux.dell.com & www.dell.com/linux

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 11-09-2008, 08:49 PM
Dennis Gilmore
 
Default Automatic BuildRequires

On Thursday 06 November 2008 05:16:50 am Richard W.M. Jones wrote:
> On Thu, Nov 06, 2008 at 06:15:38AM -0500, Ignacio Vazquez-Abrams wrote:
> > On Thu, 2008-11-06 at 11:01 +0000, Richard W.M. Jones wrote:
> > > [I'm sure this isn't the first time this has occurred to someone, or
> > > even been done -- but couldn't find anything for it in Google ...]
> > >
> > > http://et.redhat.com/~rjones/auto-buildrequires/
> > >
> > > This tries to find the correct set of BuildRequires automatically when
> > > running 'rpmbuild'. Just replace the ordinary rpmbuild command with
> > > auto-br-rpmbuild, and it will print out a suggested set of
> > > BuildRequires lines at the end. For example:
> >
> > I take it that it needs to be run in a system/root that already has the
> > appropriate packages installed?
>
> Yes, you just run it on a normal system. The main idea is so you
> don't have to keep submitting Koji jobs because you missed out some
> BuildRequires.
Thats what mock on your local system is for. Please don't abuse koji by doing
that. if you have it right on one arch using scratch builds in koji to test
all arches is appropriate. but not to work out missing BuildRequires. Again
please be thoughtful with the resources fedora provides they are not infinite.

Dennis

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 11-09-2008, 10:04 PM
"Richard W.M. Jones"
 
Default Automatic BuildRequires

On Sun, Nov 09, 2008 at 03:49:42PM -0600, Dennis Gilmore wrote:
> On Thursday 06 November 2008 05:16:50 am Richard W.M. Jones wrote:
> > On Thu, Nov 06, 2008 at 06:15:38AM -0500, Ignacio Vazquez-Abrams wrote:
> > > On Thu, 2008-11-06 at 11:01 +0000, Richard W.M. Jones wrote:
> > > > [I'm sure this isn't the first time this has occurred to someone, or
> > > > even been done -- but couldn't find anything for it in Google ...]
> > > >
> > > > http://et.redhat.com/~rjones/auto-buildrequires/
> > > >
> > > > This tries to find the correct set of BuildRequires automatically when
> > > > running 'rpmbuild'. Just replace the ordinary rpmbuild command with
> > > > auto-br-rpmbuild, and it will print out a suggested set of
> > > > BuildRequires lines at the end. For example:
> > >
> > > I take it that it needs to be run in a system/root that already has the
> > > appropriate packages installed?
> >
> > Yes, you just run it on a normal system. The main idea is so you
> > don't have to keep submitting Koji jobs because you missed out some
> > BuildRequires.
> Thats what mock on your local system is for.

Or the same for mock ...

Rich.

--
Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 11-11-2008, 06:48 PM
"Horst H. von Brand"
 
Default Automatic BuildRequires

Dennis Gilmore <dennis@ausil.us> wrote:

[...]

> Thats what mock on your local system is for. Please don't abuse koji by
> doing that. if you have it right on one arch using scratch builds in
> koji to test all arches is appropriate. but not to work out missing
> BuildRequires. Again please be thoughtful with the resources fedora
> provides they are not infinite.

Last time I tried to use mock it spent 10 times as much resources setting
up the same environment over and over than doing useful work. Gave up.
--
Dr. Horst H. von Brand User #22616 counter.li.org
Departamento de Informatica Fono: +56 32 2654431
Universidad Tecnica Federico Santa Maria +56 32 2654239
Casilla 110-V, Valparaiso, Chile 2340000 Fax: +56 32 2797513

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 11-11-2008, 06:55 PM
Jarod Wilson
 
Default Automatic BuildRequires

On Tuesday 11 November 2008 14:48:15 Horst H. von Brand wrote:
> Dennis Gilmore <dennis@ausil.us> wrote:
>
> [...]
>
> > Thats what mock on your local system is for. Please don't abuse koji by
> > doing that. if you have it right on one arch using scratch builds in
> > koji to test all arches is appropriate. but not to work out missing
> > BuildRequires. Again please be thoughtful with the resources fedora
> > provides they are not infinite.
>
> Last time I tried to use mock it spent 10 times as much resources setting
> up the same environment over and over than doing useful work. Gave up.

*cough* mock --no-clean *cough*

--
Jarod Wilson
jarod@redhat.com

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 

Thread Tools




All times are GMT. The time now is 05:12 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org