Re: Using mock with --scm-enable and external spec file

2012-11-13 Thread Suvayu Ali
Hi dex,

On Tue, Nov 13, 2012 at 12:28:53AM +, dexter wrote:
> On 11 November 2012 01:38, Suvayu Ali  wrote:
> > Hello again,
> >
> > I mentioned in another thread that I have been trying to build git
> > snapshots for a few packages I use.  I tried mock's --scm-enable option
> > to get the packages from git.  The spec file in the repository is buggy,
> > so I would like to use the spec file used for Fedora builds with small
> > modifications, however that seems to be not possible.
> >
> > Am I wrong, or did I miss something?
> 
> Errm you missed something :-)
> man mock should be your first point of call this should point you to
> /etc/mock/site-defaults.cfg
> from there you can concoct a command like:
> mock --scm-enable --scm-option git_get='git clone SCM_BRN
> git://localhost/SCM_PKG.git SCM_PKG' \
> --scm-option spec=path/to/my.spec
> more options are in the cfg file oh btw I ain't tried it :-)
> 

The man page is rather sparse, for example no description of the SCM_*
macros recognised by mock.  In any case I did look at site-defaults.cfg,
for testing I decided to provide everything on the command line and the
following is what I came up with.


$ mock --buildsrpm --scm-enable \
   --scm-option spec=/path/to/outoftree/SCM_PKG.spec \
   --scm-option method=git \
   --scm-option package=notmuch \
   --scm-option git_get='git clone SCM_BRN /localpath/SCM_PKG SCM_PKG' \
   --scm-option branch=master \
   --scm-option write_tar=True -v


And I get an error message like this:

[...]

DEBUG: Preparing SCM sources
ERROR: Can't find spec file
/tmp/tmpHd0D2H.mock-scm.notmuch/notmuch//path/to/outoftree/notmuch.spec
DEBUG: Clean SCM checkout directory
DEBUG: remove tree: /tmp/tmpHd0D2H.mock-scm.notmuch


Now instead if I put the relative path of the buggy spec file in the
repository like this:

  --scm-option spec=relative/path/to/intree/SCM_PKG.spec

then the srpm build is finished correctly.

What this tells me, mock can either get everything from scm, or
everything locally but there is no way of using an out-of-tree spec file
with a snapshot from an scm.  Do you think there can be any other
possibilities?  If not, would this be a valid feature request?

Thanks for your opinion.

-- 
Suvayu

Open source is the future. It sets us free.
-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


Re: Using mock with --scm-enable and external spec file

2012-11-12 Thread dexter
On 11 November 2012 01:38, Suvayu Ali  wrote:
> Hello again,
>
> I mentioned in another thread that I have been trying to build git
> snapshots for a few packages I use.  I tried mock's --scm-enable option
> to get the packages from git.  The spec file in the repository is buggy,
> so I would like to use the spec file used for Fedora builds with small
> modifications, however that seems to be not possible.
>
> Am I wrong, or did I miss something?

Errm you missed something :-)
man mock should be your first point of call this should point you to
/etc/mock/site-defaults.cfg
from there you can concoct a command like:
mock --scm-enable --scm-option git_get='git clone SCM_BRN
git://localhost/SCM_PKG.git SCM_PKG' \
--scm-option spec=path/to/my.spec
more options are in the cfg file oh btw I ain't tried it :-)

   ...dex
-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


Using mock with --scm-enable and external spec file

2012-11-10 Thread Suvayu Ali
Hello again,

I mentioned in another thread that I have been trying to build git
snapshots for a few packages I use.  I tried mock's --scm-enable option
to get the packages from git.  The spec file in the repository is buggy,
so I would like to use the spec file used for Fedora builds with small
modifications, however that seems to be not possible.

Am I wrong, or did I miss something?

Thanks,

-- 
Suvayu

Open source is the future. It sets us free.
-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org