Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora Build System (http://www.linux-archive.org/fedora-build-system/)
-   -   How init mock in Koji? (http://www.linux-archive.org/fedora-build-system/129310-how-init-mock-koji.html)

Linul 07-22-2008 09:31 AM

How init mock in Koji?
 
Hi..

I have already set my koji server and every component is work OK.

But not have any document mention howto init the buildroot?(or use mock environment)

is any body can tell me??


tks..
--
================================================== ===========================
林毓能
Linul
RedHat Certified Engineer

TsLG網路工作室:http://www.tslg.idv.tw

TsLG城市午後:http://blog.tslg.idv.tw
Linul攝影紀實:http://photo.tslg.idv.tw
手機:0939797462
E-mail : kevin.linul@gmail.com; linul@tslg.idv.tw

================================================== ===========================

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

Mike McLean 07-22-2008 02:48 PM

How init mock in Koji?
 
Linul wrote:
> I have already set my koji server and every component is work OK.
>
> But not have any document mention howto init the buildroot?(or use mock
> environment)

It's not entirely clear what you're asking, but here goes...

mock is used by koji-builder to create buildroots. In normal operation,
you submit a build to the system, the builders pick it up and use mock
to create a buildroot and run the build.

If, on the other hand, you want to run mock manually against the repos
that koji maintains (not normal operation, but useful nonetheless), then
you should just be able to generate a mock config with the 'koji
mock-config' command. You can use that config with a manual run of mock.
Sometimes the config may need a little tweaking.

If this doesn't answer your question, then perhaps you could provide a
bit more context.

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

Naveen Gavini 07-22-2008 09:27 PM

How init mock in Koji?
 
Mike McLean wrote:
> Linul wrote:
>
>> I have already set my koji server and every component is work OK.
>>
>> But not have any document mention howto init the buildroot?(or use mock
>> environment)
>>
>
>
We are having a similar issue with problems on how to init the buildroot.
We generated a config using 'koji mock-config' and copied this to
site-defaults.cfg and default.cfg but we get the following error:

When manually running mock it seems to init properly (we did not test
with a package).

This is the error with building from an SRPM via koji build:

2008-07-22 21:14:42,845 [WARNING] koji.build.TaskManager: could not init
mock buildroot, mock exited with status 30

Is there any further documentation on how to do this step?

Thanks for your help.

> It's not entirely clear what you're asking, but here goes...
>
> mock is used by koji-builder to create buildroots. In normal operation,
> you submit a build to the system, the builders pick it up and use mock
> to create a buildroot and run the build.
>
> If, on the other hand, you want to run mock manually against the repos
> that koji maintains (not normal operation, but useful nonetheless), then
> you should just be able to generate a mock config with the 'koji
> mock-config' command. You can use that config with a manual run of mock.
> Sometimes the config may need a little tweaking.
>
> If this doesn't answer your question, then perhaps you could provide a
> bit more context.
>


--
Naveen Gavini
Student Systems Programmer
OSS/CSS - OIT Rutgers
ngavini@jla.rutgers.edu

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

Mike McLean 07-22-2008 09:37 PM

How init mock in Koji?
 
Naveen Gavini wrote:
> We are having a similar issue with problems on how to init the buildroot.
> We generated a config using 'koji mock-config' and copied this to
> site-defaults.cfg and default.cfg but we get the following error:
>
> When manually running mock it seems to init properly (we did not test
> with a package).
>
> This is the error with building from an SRPM via koji build:
>
> 2008-07-22 21:14:42,845 [WARNING] koji.build.TaskManager: could not init
> mock buildroot, mock exited with status 30

You're asking about koji mock-config, but showing me an error from
kojid. This makes no sense. The 'koji mock-config' command is a debug
tool that allows users to duplicate the mock configuration outside of kojid.

kojid itself generates its own mock configuration on the fly (a new one
for every build in fact). You should not need any sort of default mock
config on the builders for kojid to function.

As for the cause of the mock error 30. You should look at the mock logs
under /var/lib/mock. If the error is not there, you might try running
kojid in the foreground (--fg) so you can see mock's stdout and stderr.

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

Doug Ledford 07-22-2008 09:45 PM

How init mock in Koji?
 
On Tue, 2008-07-22 at 17:27 -0400, Naveen Gavini wrote:
> Mike McLean wrote:
> > Linul wrote:
> >
> >> I have already set my koji server and every component is work OK.
> >>
> >> But not have any document mention howto init the buildroot?(or use mock
> >> environment)
> >>
> >
> >
> We are having a similar issue with problems on how to init the buildroot.
> We generated a config using 'koji mock-config' and copied this to
> site-defaults.cfg and default.cfg but we get the following error:
>
> When manually running mock it seems to init properly (we did not test
> with a package).
>
> This is the error with building from an SRPM via koji build:
>
> 2008-07-22 21:14:42,845 [WARNING] koji.build.TaskManager: could not init
> mock buildroot, mock exited with status 30
>
> Is there any further documentation on how to do this step?
>
> Thanks for your help.

My understanding is the mock fu is supposed to happen all behind the
scenes more or less. Which is to say that A) as long as the mock topdir
in /etc/kojid/kojid.conf is valid and accessible as kojibuilder
(assuming you are running mock as kojibuilder, again settable in
kojid.conf) and B) your build group settings are sane (aka, the package
list to be installed is valid and will produce a reasonable build
environment), then it should all just work.

These are the things I had to make sure were correct to get it working
on my setup:

in /etc/kojid/kojid.conf:
mockdir and mockusr I left at the defaults (/var/lib/mock and
kojibuilder)
pkgurl must be a valid url on your web server and your wer server must
point that url to the root of the koji package tree (when yum runs in
the mock buildroot, it needs this to retrieve packages)

in /etc/kojira/kojira.conf
topdir must be correctly set to the same as KojiDir
in /etc/httpd/conf.d/kojihub.conf

in the koji database:
the build target must be valid
the build group for the build target must contain valid package names
(trying to use a comps group or meta package didn't work for me,
although it might be possible to make it work, I don't know, I was
unable to do so)

those were the major things that had to be correct as I recall, but I
could be missing something along the way...

> > It's not entirely clear what you're asking, but here goes...
> >
> > mock is used by koji-builder to create buildroots. In normal operation,
> > you submit a build to the system, the builders pick it up and use mock
> > to create a buildroot and run the build.
> >
> > If, on the other hand, you want to run mock manually against the repos
> > that koji maintains (not normal operation, but useful nonetheless), then
> > you should just be able to generate a mock config with the 'koji
> > mock-config' command. You can use that config with a manual run of mock.
> > Sometimes the config may need a little tweaking.
> >
> > If this doesn't answer your question, then perhaps you could provide a
> > bit more context.
> >
>
>
--
Doug Ledford <dledford@redhat.com>
GPG KeyID: CFBFF194
http://people.redhat.com/dledford

Infiniband specific RPMs available at
http://people.redhat.com/dledford/Infiniband

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


All times are GMT. The time now is 02:57 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.