ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ltib] spec file pulling from CVS


From: Andrea Galbusera
Subject: Re: [Ltib] spec file pulling from CVS
Date: Mon, 15 Mar 2010 14:17:08 +0100

Hi Stuart,
I'm moving "directory building" thing on the top of my stack again! I
attach below the relevant part of a previous thread we had a few months
ago. You were suggesting a .spec to let me build a package from CVS
pulled sources instead of .tar.gz archived + patches.

The point is that I can't see my custom %prep rule (basically checking
out sources from CVS) being executed by ltib. I'm running ltib 10.1.1
(up-to-date with savannah) and my .spec is attached. When running with
"-m prep" switch, ltib is complaining like this:

> $ ./ltib -m prep -p tpt2000-cvs.spec
> 
> Processing: tpt2000-cvs
> =========================
> Build path taken because: directory build, build key set, no prebuilt
> rpm, 
> 
> 
> f_prep() returned an error, exiting
> traceback:
> main:566
> 
> Exiting on error or interrupt

After some inspection I noticed ltib was returning from sub build_rpm in
the following code section.

> if( $dir_bld ) {
>                 # Don't allow scbuild/scdeploy of host rpms
>                 if($cf->{hostinst} || $cf->{mode} ne 'buildrpms') {
>                     warn(<<TXT) unless $tok->{version} eq 'local';
> 
> Cowardly refusing to clobber existing directory:
>  $cf->{rpmdir}/BUILD/$tok->{pkg_dir_name}
> Remove this by hand if you really want to rebuild this package from scratch
> 
> TXT
>                     $cf->{pkg_build_failures} .= "$sn ";
>                   return;
>                 }

Am I missing something? I understand the %prep rule to be responsible
for checking out from CVS if %{buildsubdir} is not already there...

Anyone is accustomed with this kind of builds?
Please help me figuring this out.

TIA and regards,
Andrea

On Tue, 2009-11-24 at 18:06 +0000, Stuart Hughes wrote:
> Hi Andrea,
> 
> Yes this is possible, but not necessarily recommended.
> 
> Basically to do this for CVS (or any other SCM) system you basically 
> need a spec file that is a variation of a directory build style .spec. 
> The key is to have no source/patch references and a custom %prep section 
> and to define the buildsubdir
> 
> Here's an example idea of the kind of thing I mean:
> 
> 
> ------ example.spec
> 
> %define pfx /opt/freescale/rootfs/%{_target_cpu}
> %define buildsubdir %{name}-%{version}
> 
> Summary     : An example
> Name        : example
> Version     : local
> Release     : 1
> License     : GPL
> Vendor      : Some vendor
> Packager    : Some person
> Group       : Applications/Test
> BuildRoot   : %{_tmppath}/%{name}
> Prefix      : %{pfx}
> 
> %Description
> %{summary}
> 
> %Prep
> if [ ! -d %{buildsubdir} ]
> then
>      cvs checkout some_cvs_url -d %{buildsubdir}
> fi
> 
> %Build
> cd %{_builddir}/%{buildsubdir}
> cvs up
> ./configure --prefix=%{_prefix} --host=$CFGHOST --build=%{_build}
> make
> 
> %Install
> cd %{_builddir}/%{buildsubdir}
> rm -rf $RPM_BUILD_ROOT
> make install DESTDIR=$RPM_BUILD_ROOT/%{pfx}
> 
> %Clean
> rm -rf $RPM_BUILD_ROOT
> 
> %Files
> %defattr(-,root,root)
> %{pfx}/*
> 
> -----------------
> 
> Regards, Stuart
> 
> 
> Andrea Galbusera wrote:
> > Hi ltib people,
> > 
> > I was asking myself if it is possible to instruct a spec file to pull
> > package sources from a CVS repository instead of uncompressing a
> > source archive. The idea is to have an option to build a
> > 'state-of-the-art' version of the an application which is under
> > development, without having to make snapshot archives from the CVS. Is
> > this feasible anyhow? I did not find any clue in FAQ an previous list
> > thread.
> > 
> > T.I.A. for any feedback
> > Andrea
> 
> 

Attachment: tpt2000-cvs.spec
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]