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 Build System

 
 
LinkBack Thread Tools
 
Old 11-01-2010, 06:46 AM
Allen Hewes
 
Default Koji 1.4.0 on RHEL 5.5

Hi Folks,

I am assuming I have the right list? I thought that the infrastructure@ one could be a possibility, but I see some of the koji nijas here... If I am in the wrong place, lemme know where the right place is! ;-)

I have followed the Koji guide at http://fedoraproject.org/wiki/Koji/ServerHowTo.
I also followed the "server bootstrap" guide at http://fedoraproject.org/wiki/Koji/ServerBootstrap.
I am a real koji noob, so I am not comfortable with all the terms and flow. I am still working on understanding how koji works.

I can do all kinds of stuff with the koji cli, so I know I at least got something right.

But I get errors on task newRepo. After getting koji up to snuff via the ServerHowTo, I run these commands from kojiadmin user;

koji import ifstat-1.1-1.3.el5.src.rpm
koji add-tag dist-foo
koji add-pkg --owner allen dist-foo ifstat
koji tag-pkg dist-foo ifstat-1.1-1.3.el5
koji add-tag --parent dist-foo --arches i386 dist-foo-build
koji add-target dist-foo dist-foo-build

Then I get in /var/log/kojid.log:

2010-11-01 03:03:01,390 [WARNING] koji.build.TaskManager: TRACEBACK: Traceback (most recent call last):
File "/usr/sbin/kojid", line 1458, in runTask
response = (handler.run(),)
File "/usr/sbin/kojid", line 1534, in run
return self.handler(*self.params,**self.opts)
File "/usr/sbin/kojid", line 3772, in handler
for f in os.listdir(self.datadir):
OSError: [Errno 2] No such file or directory: '/mnt/koji/kojid/tasks/4/4/repo/repodata'

Then further down:

2010-11-01 03:03:19,708 [WARNING] koji.build.TaskManager: FAULT:
Traceback (most recent call last):
File "/usr/sbin/kojid", line 1458, in runTask
response = (handler.run(),)
File "/usr/sbin/kojid", line 1534, in run
return self.handler(*self.params,**self.opts)
File "/usr/sbin/kojid", line 3729, in handler
results = self.wait(subtasks.values(), all=True, failany=True)
File "/usr/sbin/kojid", line 1621, in wait
return dict(session.host.taskWaitResults(self.id,subtasks ))
File "/usr/lib/python2.4/site-packages/koji/__init__.py", line 1468, in __call__
return self.__func(self.__name,args,opts)
File "/usr/lib/python2.4/site-packages/koji/__init__.py", line 1718, in _callMethod
raise err
Fault: <Fault 1: 'Traceback (most recent call last):
File "/usr/sbin/kojid", line 1458, in runTask
response = (handler.run(),)
File "/usr/sbin/kojid", line 1534, in run
return self.handler(*self.params,**self.opts)
File "/usr/sbin/kojid", line 3772, in handler
for f in os.listdir(self.datadir):
OSError: [Errno 2] No such file or directory: '/mnt/koji/kojid/tasks/4/4/repo/repodata'
'>


tagBuild and tagNotification complete OK, they are task 1 and 2. From the DB, I can tell that newRepo is task 3 and createrepo is task 4, both are failing with the same "No such file or directory".

I am using koji and all associated RPMs from EPEL and base RHEL. This is a RHEL 5.5 machine. I do use some RPMForge bits, but the koji parts from the guides are either RH or EPEL. I am also running everything on one server; apache (koji-hub), kojid and kojira.

I can run mock just fine and createrepo works also.

I have seen a few posts with the same errors, but the response wasn't clear to me. I didn't quite get what the responder was saying, because mock and createrepo work on my system.

Any ideas?

Thanks much,

-Allen
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 11-01-2010, 09:35 PM
Pierre Guillet
 
Default Koji 1.4.0 on RHEL 5.5

Hi,

On 5.5 you need to install python-hashlib and python-createrepo RPM packages. These required packages are installed if you are using koji RPM.
The createrepo task creates the repository with the python library and not with createrepo command and createrepo RPM on REHL5.5 don't contain this library.

Regards,
Pierre

Le 1 nov. 2010 à 08:46, Allen Hewes a écrit :

Hi Folks,

I am assuming I have the right list? I thought that the infrastructure@ one could be a possibility, but I see some of the koji nijas here... If I am in the wrong place, lemme know where the right place is! ;-)

I have followed the Koji guide at http://fedoraproject.org/wiki/Koji/ServerHowTo.
I also followed the "server bootstrap" guide at http://fedoraproject.org/wiki/Koji/ServerBootstrap.
I am a real koji noob, so I am not comfortable with all the terms and flow. I am still working on understanding how koji works.

I can do all kinds of stuff with the koji cli, so I know I at least got something right.

But I get errors on task newRepo. After getting koji up to snuff via the ServerHowTo, I run these commands from kojiadmin user;

koji import ifstat-1.1-1.3.el5.src.rpm
koji add-tag dist-foo
koji add-pkg --owner allen dist-foo ifstat
koji tag-pkg dist-foo ifstat-1.1-1.3.el5
koji add-tag --parent dist-foo --arches i386 dist-foo-build
koji add-target dist-foo dist-foo-build

Then I get in /var/log/kojid.log:

2010-11-01 03:03:01,390 [WARNING] koji.build.TaskManager: TRACEBACK: Traceback (most recent call last):
File "/usr/sbin/kojid", line 1458, in runTask
response = (handler.run(),)
File "/usr/sbin/kojid", line 1534, in run
return self.handler(*self.params,**self.opts)
File "/usr/sbin/kojid", line 3772, in handler
for f in os.listdir(self.datadir):
OSError: [Errno 2] No such file or directory: '/mnt/koji/kojid/tasks/4/4/repo/repodata'

Then further down:

2010-11-01 03:03:19,708 [WARNING] koji.build.TaskManager: FAULT:
Traceback (most recent call last):
File "/usr/sbin/kojid", line 1458, in runTask
response = (handler.run(),)
File "/usr/sbin/kojid", line 1534, in run
return self.handler(*self.params,**self.opts)
File "/usr/sbin/kojid", line 3729, in handler
results = self.wait(subtasks.values(), all=True, failany=True)
File "/usr/sbin/kojid", line 1621, in wait
return dict(session.host.taskWaitResults(self.id,subtasks ))
File "/usr/lib/python2.4/site-packages/koji/__init__.py", line 1468, in __call__
return self.__func(self.__name,args,opts)
File "/usr/lib/python2.4/site-packages/koji/__init__.py", line 1718, in _callMethod
raise err
Fault: <Fault 1: 'Traceback (most recent call last):
File "/usr/sbin/kojid", line 1458, in runTask
response = (handler.run(),)
File "/usr/sbin/kojid", line 1534, in run
return self.handler(*self.params,**self.opts)
File "/usr/sbin/kojid", line 3772, in handler
for f in os.listdir(self.datadir):
OSError: [Errno 2] No such file or directory: '/mnt/koji/kojid/tasks/4/4/repo/repodata'
'>


tagBuild and tagNotification complete OK, they are task 1 and 2. From the DB, I can tell that newRepo is task 3 and createrepo is task 4, both are failing with the same "No such file or directory".

I am using koji and all associated RPMs from EPEL and base RHEL. This is a RHEL 5.5 machine. I do use some RPMForge bits, but the koji parts from the guides are either RH or EPEL. I am also running everything on one server; apache (koji-hub), kojid and kojira.

I can run mock just fine and createrepo works also.

I have seen a few posts with the same errors, but the response wasn't clear to me. I didn't quite get what the responder was saying, because mock and createrepo work on my system.

Any ideas?

Thanks much,

-Allen
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys

--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 11-03-2010, 07:06 AM
Allen Hewes
 
Default Koji 1.4.0 on RHEL 5.5

> On 5.5 you need to install python-hashlib and
> python-createrepo RPM packages. These required packages are
> installed if you are using koji RPM.
> The createrepo task creates the repository with the python
> library and not with createrepo command and createrepo RPM on
> REHL5.5 don't contain this library.

Hi Pierre,

That doesn't seem to be my issue. I am not even getting far enough to fire up createrepo. The pkglist (/mnt/koji/repos/dist-foo-build/6/i386/pkglist) file is zero bytes, which means it isn't getting updated with the package I am trying to build.

Here is what I have determined;

I followed the directions from: http://fedoraproject.org/wiki/Koji/ServerHowTo
Then I bootstraped my Koji like so: http://fedoraproject.org/wiki/Koji/ServerBootstrap

The koji commands I run are:
<start apache (kojihub) so koji cli commands can run>

koji add-user kojira;
koji grant-permission repo kojira;
koji add-host websvr0.vzw.decisiv.net i386;
koji add-host-to-channel websvr0.vzw.decisiv.net createrepo;

<start kojid>
<start kojira>

koji import ifstat-1.1-1.3.el5.src.rpm;
koji add-tag dist-foo;
koji add-pkg --owner=kojiadmin dist-foo ifstat;
koji call tagBuildBypass dist-foo ifstat-1.1-1.3.el5;
koji add-tag --parent dist-foo --arches i386 dist-foo-build;
koji add-target dist-foo dist-foo-build;
koji add-group dist-foo-build build;
koji add-group-pkg dist-foo-build build ifstat;

So I guess my first question is, what are the steps for loading and build a test SRPM after koji has been installed and configured? Because I think I am doing something very wrong....

I haven't been able to find a workflow for koji when building your own. The bootstrap help page doesn't work, has something changed since the document was witten and koji 1.4.0?

Is there something special in the SRPMs that I must add or do? I didn't try to grap some EPEL SRPMs...

Thanks,

-Allen
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 11-03-2010, 07:31 AM
Allen Hewes
 
Default Koji 1.4.0 on RHEL 5.5

> On 5.5 you need to install python-hashlib and python-createrepo RPM
> packages. These required packages are installed if you are using koji
> RPM.
> The createrepo task creates the repository with the python library and
> not with createrepo command and createrepo RPM on
> REHL5.5 don't contain this library.

Pierre,

I forgot to add that I did see your post... ;-)


And here's the installed RPMs on my box...

$ sudo rpm -qa | grep 'createrepo|hashlib|koji'
koji-web-1.4.0-2.el5.noarch
createrepo-0.4.11-3.el5.noarch
koji-hub-1.4.0-2.el5.noarch
koji-1.4.0-2.el5.noarch
koji-utils-1.4.0-2.el5.noarch
koji-builder-1.4.0-2.el5.noarch
python-createrepo-0.9.6-1.el5.noarch
koji-hub-plugins-1.4.0-2.el5.noarch
python-hashlib-20081119-4.el5.i386

-Allen
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 11-03-2010, 01:31 PM
Pierre Guillet
 
Default Koji 1.4.0 on RHEL 5.5

Allen,

It seems you have all needed packages.

Your ifstat reference is in /mnt/koji/repos/dist-foo-build/latest/groups/comps.xml in build group. It will be in pgklist after the build.
May be you need to add extra packages to build your SRPM..


Koji creates for you a Yum repodata composed with all RPM attached to the koji tag and a Mock environment to build your SRPM.

The mock environment is a chroot created from the koji repodata.
Also to build your SRPM the chroot must be initialized with some build tools (gcc, make,...).


Look logs in /var/lib/mock/dist-foo..../result/

I don't build my SRPM using import + add-group-pkg. I have used this
guide : http://fedoraproject.org/wiki/Koji/ExternalRepoServerBootstrap

I am using koji to build CentOS5.5 RPM. I have added CentOS 5.5 mirror (can be a file:// on your own distrib) as external repo. I have added buildsys-build RPM in this repo and in dist-foo-build build tag (koji add-group-pkg dist-foo-build build buildsys-build).

Now to build my own SRPM I use :
koji build dist-foo* /path/on/xxx.src.rpm

To build the SRPM koji creates the chroot and install the "build" group (buildsys-build with dependencies) and the SRPM with the build dependencies (BuildRequires from the spec file).


You can find buildsys-build here: http://buildsys.fedoraproject.org/buildgroups/rhel5/

Regards,
Pierre

2010/11/3 Allen Hewes <allen@decisiv.net>


> On 5.5 you need to install *python-hashlib and python-createrepo RPM

> packages. These required packages are installed if you are using koji

> RPM.

> The createrepo task creates the repository with the python library and

> not with createrepo command and createrepo RPM on

> REHL5.5 don't contain this library.



Pierre,



I forgot to add that I did see your post... ;-)





And here's the installed RPMs on my box...



$ sudo rpm -qa | grep 'createrepo|hashlib|koji'

koji-web-1.4.0-2.el5.noarch

createrepo-0.4.11-3.el5.noarch

koji-hub-1.4.0-2.el5.noarch

koji-1.4.0-2.el5.noarch

koji-utils-1.4.0-2.el5.noarch

koji-builder-1.4.0-2.el5.noarch

python-createrepo-0.9.6-1.el5.noarch

koji-hub-plugins-1.4.0-2.el5.noarch

python-hashlib-20081119-4.el5.i386



-Allen

--

buildsys mailing list

buildsys@lists.fedoraproject.org

https://admin.fedoraproject.org/mailman/listinfo/buildsys



--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 11-03-2010, 07:43 PM
Mike McLean
 
Default Koji 1.4.0 on RHEL 5.5

On 11/01/2010 03:46 AM, Allen Hewes wrote:
> But I get errors on task newRepo. After getting koji up to snuff via the ServerHowTo, I run these commands from kojiadmin user;
>
> koji import ifstat-1.1-1.3.el5.src.rpm
> koji add-tag dist-foo
> koji add-pkg --owner allen dist-foo ifstat
> koji tag-pkg dist-foo ifstat-1.1-1.3.el5
> koji add-tag --parent dist-foo --arches i386 dist-foo-build
> koji add-target dist-foo dist-foo-build

Do you mean these are the exact commands you entered? Specifically, is
ifstat-1.1-1.3.el5.src.rpm the only rpm you imported?

Importing srpms alone is almost always incorrect. This has been
discussed before:
http://lists.fedoraproject.org/pipermail/buildsys/2010-March/002969.html

If that is the case, then the problem is that your dist-foo tag has no
content to generate a repo from. Koji does not include source rpms in
repos by default. Even if it did or if you imported the ifstat binary
rpms, a repo containing only ifstat would be entirely useless for
building. A similar situation has been discussed before:
http://lists.fedoraproject.org/pipermail/buildsys/2010-March/002986.html

I'm not quite sure what your goals are with Koji. To get a functional
build repo you'll want to either import and tag sufficient rpms to
populate it, or add an external repo to the tag.
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 11-03-2010, 08:54 PM
Allen Hewes
 
Default Koji 1.4.0 on RHEL 5.5

Mike--

>
> On 11/01/2010 03:46 AM, Allen Hewes wrote:
> > But I get errors on task newRepo. After getting koji up to
> snuff via
> > the ServerHowTo, I run these commands from kojiadmin user;
> >
> > koji import ifstat-1.1-1.3.el5.src.rpm koji add-tag dist-foo koji
> > add-pkg --owner allen dist-foo ifstat koji tag-pkg dist-foo
> > ifstat-1.1-1.3.el5 koji add-tag --parent dist-foo --arches i386
> > dist-foo-build koji add-target dist-foo dist-foo-build
>
> Do you mean these are the exact commands you entered?
> Specifically, is ifstat-1.1-1.3.el5.src.rpm the only rpm you imported?


Yes, Mike. I ran those commands. Yes, ifstat-1.1-1.3.el5.src.rpm was the only RPM I imported.

See more below...


>
> Importing srpms alone is almost always incorrect. This has
> been discussed before:
> http://lists.fedoraproject.org/pipermail/buildsys/2010-March/0
02969.html


Yes, came across this...


>
> If that is the case, then the problem is that your dist-foo
> tag has no content to generate a repo from. Koji does not
> include source rpms in repos by default. Even if it did or if
> you imported the ifstat binary rpms, a repo containing only
> ifstat would be entirely useless for building. A similar
> situation has been discussed before:
> http://lists.fedoraproject.org/pipermail/buildsys/2010-March/0
02986.html

Ahyeap, I reached out to Steve Traylen from CERN (b/c of his sweet slides) and he helped me out. He got me pointed in the right direction.

Needless to say, I was missing the obvious which you (and Steve) nailed here....

I feel like a doofus... Duh-- I need either an external repo or enough (correct/revelant packages in my Koji instance to build stuff...

After I read all the Koji pages (except the External Repo one! Ugh!) on fedoraproject.org, I just thought Koji was the smartest thing ever!

I was like damn! Koji is rocks! I need to use it instead of what I am doing.


>
> I'm not quite sure what your goals are with Koji. To get a
> functional build repo you'll want to either import and tag
> sufficient rpms to populate it, or add an external repo to the tag.


Got it now. Working on the correct way to build/load my Koji server.

Kudos to Pierre, you and Steve Traylen. You guys got me on the right path.

I am in the middle of following the correct directions for what I want to do,
which is use an external repo and add my custom packages.

Thanks again Pierre, you and Steve!

/allen
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 11-04-2010, 07:58 AM
Allen Hewes
 
Default Koji 1.4.0 on RHEL 5.5

Mike,

> Importing srpms alone is almost always incorrect. This has
> been discussed before:
> http://lists.fedoraproject.org/pipermail/buildsys/2010-March/0
> 02969.html
>
> If that is the case, then the problem is that your dist-foo
> tag has no content to generate a repo from. Koji does not
> include source rpms in repos by default. Even if it did or if
> you imported the ifstat binary rpms, a repo containing only
> ifstat would be entirely useless for building. A similar
> situation has been discussed before:
> http://lists.fedoraproject.org/pipermail/buildsys/2010-March/0
> 02986.html
>


Ok, I have gotten much further using the external repo guide, helps to use the right stuff...

I am getting a mock init error, which I can work on tomorrow. I have had working mock installs.

After I have gotten all the parts working (i.e. newRepo(dist-foo-build) is successful), I am running:
koji build --scratch dist-foo ifstat-1.1-1.rf.src.rpm
(As a sanity test. Is this the right command to test build a SRPM within my build tag?)

...and getting:
FAILED: BuildrootError: could not init mock buildroot, mock exited with status 2; see root.log for more information
FAILED: BuildrootError: could not init mock buildroot, mock exited with status 1; see build.log for more information

I can't find any files from those error messages. And I can't run kojid like this:
sudo kojid -c /etc/kojid/kojid.conf --fg --force-lock --debug-mock --verbose

Because the mock version I have doesn't support '--debug'. I noticed that mock came from DAG, but I changed it to use EPEL. The error went from build.log (DAG) to root.log (EPEL).

I see there is a koji command to generate the mock config used. So I can troubleshoot this some more by getting that into a file inside /var/lib/mock/<chroot>/ and running the mock init command, right? Is this how you would debug mock troubles?

My end result is to put all of my custom RPMs (some are in source code others are SRPMs, I know I have to have everything under source control) that I have to maintain for my company into Koji so that it makes managing the building, deps and repo management easier for me. I use RHEL for serving up my company apps. I already have a yum setup but wanted the extra coolness of Koji.

Thanks for your help,

/allen
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 11-04-2010, 08:51 PM
Mike McLean
 
Default Koji 1.4.0 on RHEL 5.5

On 11/04/2010 04:58 AM, Allen Hewes wrote:
> I can't find any files from those error messages. And I can't run kojid like this:
> sudo kojid -c /etc/kojid/kojid.conf --fg --force-lock --debug-mock --verbose

You could always just run mock directly. The config kojid tried to use
is under /etc/mock/koji on the builder. That may make the issue clearer.
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 11-04-2010, 11:56 PM
Allen Hewes
 
Default Koji 1.4.0 on RHEL 5.5

> > I can't find any files from those error messages. And I
> can't run kojid like this:
> > sudo kojid -c /etc/kojid/kojid.conf --fg --force-lock --debug-mock
> > --verbose
>
> You could always just run mock directly. The config kojid
> tried to use is under /etc/mock/koji on the builder. That may
> make the issue clearer.
> --


Hi Mike,


Got it. I had a perms issue on KojiDir. Fixed that, then I got scratch build to complete, YEA!

Thanks for your help!

ciao,

/allen
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 

Thread Tools




All times are GMT. The time now is 08:39 AM.

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