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 Development

 
 
LinkBack Thread Tools
 
Old 07-18-2008, 04:20 AM
"Martin Langhoff"
 
Default Strange mock behaviour - buildrequires in the host?

Hi,

while building some packages for the OLPC XS I am seeing some odd
behaviour from Mock. I am not certain whether this is expected...

1 - The F9 host had httpd installed (unbeknownst to me)
2 - The install script in the package was (wrongly) trying to do
install -o apache /file - which errored out "no such user"
3 - Adding a BuildRequires to the spec file fixed the problem - mock
installed httpd in the chroot - however, install would still fail as
it was not running as root.
4 - I spotted httpd on the host and removed it. I can no longer build
the package - "httpd is needed by ds-backup-x-y-z..."

There are 2 weird things in here for me:

- In step 4 - the host environment not having httpd should not affect
the build chroot.

- In step 3, I was expecting the rpmbuild running the "install" target
inside mock to be using fakeroot or something similar.

Apologies in advance if these questions are basic - a review of the
Mock wiki and man pages did not help, and my rpm packaging skills have
last been used in late 2000.

cheers,


m

--
martin.langhoff@gmail.com
martin@laptop.org -- School Server Architect
- ask interesting questions
- don't get distracted with shiny stuff - working code first
- http://wiki.laptop.org/go/User:Martinlanghoff

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-19-2008, 08:47 AM
"Martin Langhoff"
 
Default Strange mock behaviour - buildrequires in the host?

On Fri, Jul 18, 2008 at 4:20 PM, Martin Langhoff
<martin.langhoff@gmail.com> wrote:
> - In step 4 - the host environment not having httpd should not affect
> the build chroot.

Debugged this -- and mock is not to blame. The build scripts I have
first build the source package outsider the mock chroot and then use
mock to build the binaries.

Any reason rpmbuild -bs checks dependencies?

> - In step 3, I was expecting the rpmbuild running the "install" target
> inside mock to be using fakeroot or something similar.

This is still puzzling. Why does the `make install` in mock not get
wrapped by a fakeroot-ish trick?

cheers,



martin
--
martin.langhoff@gmail.com
martin@laptop.org -- School Server Architect
- ask interesting questions
- don't get distracted with shiny stuff - working code first
- http://wiki.laptop.org/go/User:Martinlanghoff

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-19-2008, 09:48 AM
Michael Schwendt
 
Default Strange mock behaviour - buildrequires in the host?

On Sat, 19 Jul 2008 20:47:01 +1200, Martin Langhoff wrote:

> Any reason rpmbuild -bs checks dependencies?

Yes. To check that you don't build and publish a src.rpm which
has unresolved build dependencies. If you want to skip that check,
use -bs --nodeps but be careful.

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-19-2008, 02:32 PM
Dennis Gilmore
 
Default Strange mock behaviour - buildrequires in the host?

On Saturday 19 July 2008, Martin Langhoff wrote:
> On Fri, Jul 18, 2008 at 4:20 PM, Martin Langhoff
>
> <martin.langhoff@gmail.com> wrote:
> > - In step 4 - the host environment not having httpd should not affect
> > the build chroot.
>
> Debugged this -- and mock is not to blame. The build scripts I have
> first build the source package outsider the mock chroot and then use
> mock to build the binaries.
>
> Any reason rpmbuild -bs checks dependencies?
add a --nodeps and it wont

> > - In step 3, I was expecting the rpmbuild running the "install" target
> > inside mock to be using fakeroot or something similar.
>
> This is still puzzling. Why does the `make install` in mock not get
> wrapped by a fakeroot-ish trick?
it installs into a directory on its own you need to support DEST= in your
makefiles. it gets installed into its own tree.

If you have ideas of features you would like to see in rpm go to rpm.org and
work upstream to get them in

--
Dennis Gilmore

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-20-2008, 11:12 PM
"Martin Langhoff"
 
Default Strange mock behaviour - buildrequires in the host?

On Sat, Jul 19, 2008 at 9:48 PM, Michael Schwendt <mschwendt@gmail.com> wrote:
> On Sat, 19 Jul 2008 20:47:01 +1200, Martin Langhoff wrote:
>
>> Any reason rpmbuild -bs checks dependencies?
>
> Yes. To check that you don't build and publish a src.rpm which
> has unresolved build dependencies. If you want to skip that check,
> use -bs --nodeps but be careful.

Ok. In the script I am using the rpm gets built right after with mock,
so it makes sense to use --nodeps. Funny thing though, I had searched
the man page for 'dep' hoping to find the 'nodeps' option. It is not
mentioned anywhere.

Perhaps on purpose?

cheers,



m
--
martin.langhoff@gmail.com
martin@laptop.org -- School Server Architect
- ask interesting questions
- don't get distracted with shiny stuff - working code first
- http://wiki.laptop.org/go/User:Martinlanghoff

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-24-2008, 09:19 AM
Paul Howarth
 
Default Strange mock behaviour - buildrequires in the host?

Martin Langhoff wrote:

Hi,

while building some packages for the OLPC XS I am seeing some odd
behaviour from Mock. I am not certain whether this is expected...

1 - The F9 host had httpd installed (unbeknownst to me)
2 - The install script in the package was (wrongly) trying to do
install -o apache /file - which errored out "no such user"
3 - Adding a BuildRequires to the spec file fixed the problem - mock
installed httpd in the chroot - however, install would still fail as
it was not running as root.
4 - I spotted httpd on the host and removed it. I can no longer build
the package - "httpd is needed by ds-backup-x-y-z..."

There are 2 weird things in here for me:

- In step 4 - the host environment not having httpd should not affect
the build chroot.

- In step 3, I was expecting the rpmbuild running the "install" target
inside mock to be using fakeroot or something similar.


The fix for this is to remove (patch out) the "-o httpd" option from the
install section of the Makefile (the chown won't work as a non-root
user, and RPMs should always be built as non-root users), and instead
use %attr in the spec file's %files section to indicate that the
installed file should be owned by the "httpd" user. Check out the specs
for most web apps in Fedora for examples.


This method will mean that you don't need to buildrequire httpd too
(though you will still need to require it as a runtime dependency so
ensure that the httpd account exists on the target system).


Paul.

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-27-2008, 02:38 AM
"Martin Langhoff"
 
Default Strange mock behaviour - buildrequires in the host?

On Thu, Jul 24, 2008 at 9:19 PM, Paul Howarth <paul@city-fan.org> wrote:
> The fix for this is to remove (patch out) the "-o httpd" option from the
> install section of the Makefile (the chown won't work as a non-root user,
> and RPMs should always be built as non-root users), and instead use %attr in
> the spec file's %files section to indicate that the installed file should be

Thanks! I hadn't seen the reply earlier - probably due to the odd
reply-to settings in the list). This is the same conclusion I came to.

For tools other software tools that expect to chown from within their
Makefile, this is probably a bit awkward.

> This method will mean that you don't need to buildrequire httpd too

Yes. Removed that one too.

thanks!



martin
--
martin.langhoff@gmail.com
martin@laptop.org -- School Server Architect
- ask interesting questions
- don't get distracted with shiny stuff - working code first
- http://wiki.laptop.org/go/User:Martinlanghoff

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

Thread Tools




All times are GMT. The time now is 12:19 AM.

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