|
|

12-02-2007, 09:22 PM
|
|
|
mock 0.8.9
I am trying to use mock 0.8.
Executing a simple man mock, gives me:
SYNTAX
****** mock* [options] --rebuild SRPM [SRPM...]
****** mock* [options] --chroot <cmd>
****** mock* [options] {--init|clean|shell}
****** mock* [options] --installdeps {SRPM|RPM}
****** mock* [options] --install PACKAGE
----------------------------------------------------------
In fact,
mock -r fedora-8-i386 --init
does not work at all. It must be:
mock -r fedora-8-i386 init
Therefore, I think that an update for man mock (0.8.9) is in order, right?
It was this way in mock 0.7.
Thanks.
--
Paulo Roma Cavalcanti
LCG - UFRJ
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
|
|

12-02-2007, 09:41 PM
|
|
|
mock 0.8.9
On Sun, 2007-12-02 at 19:22 -0200, Paulo Cavalcanti wrote:
> In fact,
>
> mock -r fedora-8-i386 --init
>
> does not work at all. It must be:
>
> mock -r fedora-8-i386 init
Certainly a bug.
> Therefore, I think that an update for man mock (0.8.9) is in order,
> right?
Right. Please open a bug report in bugzilla:
http://bugzilla.redhat.com/
Thanks,
--
Lubomir Kundrak (Red Hat Security Response Team)
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
|
|

12-03-2007, 06:11 AM
|
|
|
mock 0.8.9
On Sun, Dec 02, 2007 at 07:22:22PM -0200, Paulo Cavalcanti wrote:
> I am trying to use mock 0.8.
>
> Executing a simple man mock, gives me:
>
> SYNTAX
> mock [options] --rebuild SRPM [SRPM...]
>
> mock [options] --chroot <cmd>
>
> mock [options] {--init|clean|shell}
>
> mock [options] --installdeps {SRPM|RPM}
>
> mock [options] --install PACKAGE
>
> ----------------------------------------------------------
>
> In fact,
>
> mock -r fedora-8-i386 --init
>
> does not work at all. It must be:
>
> mock -r fedora-8-i386 init
>
> Therefore, I think that an update for man mock (0.8.9) is in order, right?
> It was this way in mock 0.7.
This was something I overlooked and it is fixed in 0.8.10 already, which
should be making its way to testing repos.
--
Michael
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
|
|

12-03-2007, 08:45 AM
|
|
|
mock 0.8.9
On Dec 3, 2007 4:11 AM, Michael E Brown <Michael_E_Brown@dell.com> wrote:
On Sun, Dec 02, 2007 at 07:22:22PM -0200, Paulo Cavalcanti wrote:
> I am trying to use mock 0.8.
>
> Executing a simple man mock, gives me:
>
> SYNTAX
> * * * *mock *[options] --rebuild SRPM [SRPM...]
>
> * * * *mock *[options] --chroot <cmd>
>
> * * * *mock *[options] {--init|clean|shell}
>
> * * * *mock *[options] --installdeps {SRPM|RPM}
>
> * * * *mock *[options] --install PACKAGE
>
> ----------------------------------------------------------
>
> In fact,
>
> mock -r fedora-8-i386 --init
>
> does not work at all. It must be:
>
> mock -r fedora-8-i386 init
>
> Therefore, I think that an update for man mock (0.8.9) is in order, right?
> It was this way in mock 0.7.
This was something I overlooked and it is fixed in 0.8.10 already, which
should be making its way to testing repos.
Thanks. I filed a bug report anyway.
Just a curiosity, what is the reason for the change?
mock is written in python, and it would have been simpler
to parse the arguments keeping the "--".
Another thing is that in version 0.7 I could open a mock shell
and check the installed rpms or install an rpm (rpm -ivh). If I try this
in version 0.8 I get an error. I know I can use mock install outside
the mock shell, but via shell should still work in my opinion.
Finally, how do I pass an argument for building via mock,
--define or --with something?
Thanks.
--
Paulo Roma Cavalcanti
LCG - UFRJ
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
|
|

12-03-2007, 08:59 PM
|
|
|
mock 0.8.9
On Mon, Dec 03, 2007 at 06:45:23AM -0200, Paulo Cavalcanti wrote:
> On Dec 3, 2007 4:11 AM, Michael E Brown <Michael_E_Brown@dell.com> wrote:
>
> > On Sun, Dec 02, 2007 at 07:22:22PM -0200, Paulo Cavalcanti wrote:
> > > I am trying to use mock 0.8.
> > >
> > > Executing a simple man mock, gives me:
> > >
> > > SYNTAX
> > > mock [options] --rebuild SRPM [SRPM...]
> > >
> > > mock [options] --chroot <cmd>
> > >
> > > mock [options] {--init|clean|shell}
> > >
> > > mock [options] --installdeps {SRPM|RPM}
> > >
> > > mock [options] --install PACKAGE
> > >
> > > ----------------------------------------------------------
> > >
> > > In fact,
> > >
> > > mock -r fedora-8-i386 --init
> > >
> > > does not work at all. It must be:
> > >
> > > mock -r fedora-8-i386 init
> > >
> > > Therefore, I think that an update for man mock (0.8.9) is in order,
> > right?
> > > It was this way in mock 0.7.
> >
> > This was something I overlooked and it is fixed in 0.8.10 already, which
> > should be making its way to testing repos.
> >
>
> Thanks. I filed a bug report anyway.
>
> Just a curiosity, what is the reason for the change?
> mock is written in python, and it would have been simpler
> to parse the arguments keeping the "--".
Actually, this was the change that was made. Old way: "rebuild", new
way: "--rebuild". I've tried to keep backwards compatibility for people
using the old method and dont intend to drop that.
>
> Another thing is that in version 0.7 I could open a mock shell
> and check the installed rpms or install an rpm (rpm -ivh). If I try this
> in version 0.8 I get an error. I know I can use mock install outside
> the mock shell, but via shell should still work in my opinion.
It would be easier to debug given the actual error output.
New mock provides "mock --install REPOPKG" if you want to install an RPM
from one of the configured repos.
> Finally, how do I pass an argument for building via mock,
>
> --define or --with something?
you can pass it in the .rpmmacros file by editing the mock config file.
Look in /etc/mock/defaults.cfg for information, see the
config_opts['macros'] line.
You can put this directive in the chroot config file or the defaults.cfg
file.
--
Michael
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
|
|

12-03-2007, 09:46 PM
|
|
|
mock 0.8.9
On Monday 03 December 2007, Michael E Brown wrote:
> On Mon, Dec 03, 2007 at 06:45:23AM -0200, Paulo Cavalcanti wrote:
>
> > Finally, how do I pass an argument for building via mock,
> >
> > --define or --with something?
>
> you can pass it in the .rpmmacros file by editing the mock config file.
> Look in /etc/mock/defaults.cfg for information, see the
> config_opts['macros'] line.
>
> You can put this directive in the chroot config file or the defaults.cfg
> file.
mach can do that from the command line. I suppose the mock and mach code
bases are pretty different nowadays but this feature could be an easy one to
bring back from mach (or reimplement) - I think it's an important one.
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
|
|

12-03-2007, 10:08 PM
|
|
|
mock 0.8.9
On Mon, Dec 03, 2007 at 11:46:55PM +0200, Ville Skyttä wrote:
> On Monday 03 December 2007, Michael E Brown wrote:
> > On Mon, Dec 03, 2007 at 06:45:23AM -0200, Paulo Cavalcanti wrote:
> >
> > > Finally, how do I pass an argument for building via mock,
> > >
> > > --define or --with something?
> >
> > you can pass it in the .rpmmacros file by editing the mock config file.
> > Look in /etc/mock/defaults.cfg for information, see the
> > config_opts['macros'] line.
> >
> > You can put this directive in the chroot config file or the defaults.cfg
> > file.
>
> mach can do that from the command line. I suppose the mock and mach code
> bases are pretty different nowadays but this feature could be an easy one to
> bring back from mach (or reimplement) - I think it's an important one.
Patches welcome.
--
Michael
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
|
|

12-04-2007, 10:37 AM
|
|
|
mock 0.8.9
Michael E Brown wrote:
> Patches welcome.
Here's one. This adds a --define option, which may be used multiple
times. Usage is pretty much like the rpm --define option:
$ mock --define="with_extra_cheese 1" --define="packager Monkey" ...
Rather than pass the define options directly to rpmbuild, they are
added to the .rpmmacros file in the chroot. I'm not sure if there's
much difference in practice. If anyone knows differently, please
speak up.
--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
Giving a politician access to your wallet is like giving a dog access
to your refrigerator.
-- Tim Barber
diff --git a/docs/mock.1 b/docs/mock.1
index 3adc047..17b5081 100644
--- a/docs/mock.1
+++ b/docs/mock.1
@@ -56,6 +56,11 @@ Dont clean chroot after building. If automatic cleanup is enabled, use this to d
fB--arch=fRfIARCHfP
Specify target build arch.
.TP
+fB--define=fR"fIMACRO EXPRfP"
+Specify macro definitions used for the build. This option may be used multiple times, just as the rpmbuild --define option can be. For example:
+
+fB--define="with_extra_cheese 1" --define="packager Monkey"fR
+.TP
fB--resultdir=fRfIRESULTDIRfP
Change directory where resulting files (RPMs and build logs) are written. Resultdir can contain python-string substitutions for any variable in the chroot config. For example:
diff --git a/py/mock.py b/py/mock.py
index bb5df8c..b78d37a 100755
--- a/py/mock.py
+++ b/py/mock.py
@@ -104,6 +104,9 @@ def command_parse(config_opts):
" cleanup is enabled, use this to disable.", )
parser.add_option("--arch", action ="store", dest="arch",
default=None, help="target build arch")
+ parser.add_option("--define", action="append", dest="rpmmacros",
+ default=[], type="string", metavar="'MACRO EXPR'",
+ help="define an rpm macro (may be used more than once)")
parser.add_option("--resultdir", action="store", type="string",
default=None, help="path for resulting files to be put")
parser.add_option("--uniqueext", action="store", type="string",
@@ -222,6 +225,17 @@ def set_config_opts_per_cmdline(config_opts, options):
if not options.clean:
config_opts['clean'] = options.clean
+ for macro in options.rpmmacros:
+ try:
+ k, v = macro.split(" ", 1)
+ if not k.startswith('%'):
+ k = '%%%s' % k
+ config_opts['macros'].update({k: v})
+ except:
+ raise mock.exception.BadCmdline(
+ "Bad option for '--define' (%s). Use --define 'macro expr'"
+ % macro)
+
if options.resultdir:
config_opts['resultdir'] = os.path.expanduser(options.resultdir)
if options.uniqueext:
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
|
|

12-04-2007, 04:05 PM
|
|
|
mock 0.8.9
Todd Zullinger wrote:
Michael E Brown wrote:
Patches welcome.
Here's one. This adds a --define option, which may be used multiple
times. Usage is pretty much like the rpm --define option:
$ mock --define="with_extra_cheese 1" --define="packager Monkey" ...
Rather than pass the define options directly to rpmbuild, they are
added to the .rpmmacros file in the chroot. I'm not sure if there's
much difference in practice. If anyone knows differently, please
speak up.
Anything written to the buildroot might get cached, mightn't it?
Paul.
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
|
|

12-04-2007, 04:27 PM
|
|
|
mock 0.8.9
On Tuesday 04 December 2007, Todd Zullinger wrote:
> Michael E Brown wrote:
> > Patches welcome.
>
> Here's one. This adds a --define option, which may be used multiple
> times. Usage is pretty much like the rpm --define option:
>
> $ mock --define="with_extra_cheese 1" --define="packager Monkey" ...
That's nice, but even better IMHO would be something that could be used to
pass arbitrary options (or at least -D, --define, --with, --without
and --target) as-is to rpmbuild, for example everything after a "--", like
mock rebuild foo.src.rpm -- --define="foo bar" --target=i686 --with
foo --without bar --define 'quux baz'
mach can do that (without the -- though; it passes everything after the
src.rpm names to rpmbuild).
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
|
|
|
All times are GMT. The time now is 03:08 PM.
VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org
|