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 01-03-2012, 02:34 PM
Gordan Bobic
 
Default PATH in mock disappears

On Tue, 3 Jan 2012 15:52:45 +0100, Elias Abacioglu
<elias.rabi@gmail.com> wrote:

Hey,

I have an issue. Trying to build a package in mock, package B.
Package

B requires a installed package, package A.
Package A installs on a custom PATH and requires the PATH to be set
in

order for package B to compile.

I tried adding config_opts['environment']['PATH'] =
'/bin:/blabla:....' to /etc/mock/site-defaults.cfg.
The path works when i use mock --shell.

But when I do a mock --no-clean package.B.src.rpm, the path is
missing, and the build fails.

Is there a way to set the PATH so that it is used during the
"--rebuild" process?
I'm running mock 1.1.18.


Google a recent solution on how to set LD_PRELOAD environment in mock
chroot. You could probably use a similar trick to set the PATH.


Gordan
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 01-03-2012, 03:08 PM
Elias Abacioglu
 
Default PATH in mock disappears

2012/1/3 Gordan Bobic <gordan@bobich.net>

On Tue, 3 Jan 2012 15:52:45 +0100, Elias Abacioglu <elias.rabi@gmail.com> wrote:


Hey,



I have an issue. Trying to build a package in mock, package B. Package

B requires a installed package, package A.

Package A installs on a custom PATH and requires the PATH to be set in

order for package B to compile.



I tried adding config_opts['environment']['PATH'] =

'/bin:/blabla:....' to /etc/mock/site-defaults.cfg.

The path works when i use mock --shell.



But when I do a mock --no-clean package.B.src.rpm, the path is

missing, and the build fails.



Is there a way to set the PATH so that it is used during the

"--rebuild" process?

I'm running mock 1.1.18.




Google a recent solution on how to set LD_PRELOAD environment in mock chroot. You could probably use a similar trick to set the PATH.


It worked. And it's probably worth repeating

Added this to site-defaults.cfg:
config_opts['files']['etc/profile.d/mystuff.sh'] = """
export PATH=$PATH:/custom/path

"""

Thanks Gordan

--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 01-03-2012, 03:18 PM
Clark Williams
 
Default PATH in mock disappears

On Tue, 3 Jan 2012 17:08:54 +0100
Elias Abacioglu <elias.rabi@gmail.com> wrote:

> 2012/1/3 Gordan Bobic <gordan@bobich.net>
>
> > On Tue, 3 Jan 2012 15:52:45 +0100, Elias Abacioglu <elias.rabi@gmail.com>
> > wrote:
> >
> >> Hey,
> >>
> >> I have an issue. Trying to build a package in mock, package B. Package
> >> B requires a installed package, package A.
> >> Package A installs on a custom PATH and requires the PATH to be set in
> >> order for package B to compile.
> >>
> >> I tried adding config_opts['environment']['**PATH'] =
> >> '/bin:/blabla:....' to /etc/mock/site-defaults.cfg.
> >> The path works when i use mock --shell.
> >>
> >> But when I do a mock --no-clean package.B.src.rpm, the path is
> >> missing, and the build fails.
> >>
> >> Is there a way to set the PATH so that it is used during the
> >> "--rebuild" process?
> >> I'm running mock 1.1.18.
> >>
> >
> > Google a recent solution on how to set LD_PRELOAD environment in mock
> > chroot. You could probably use a similar trick to set the PATH.
> >
> > It worked. And it's probably worth repeating
>
> Added this to site-defaults.cfg:
> config_opts['files']['etc/profile.d/mystuff.sh'] = """
> export PATH=$PATH:/custom/path
> """
>
> Thanks Gordan

I'm glad you've got a workaround, but I'm curious as to why it worked
with --shell and didn't work with --rebuild.

I'll poke at it some to see if i can resolve that, since I'm trying to
get to the point where --rebuild, --chroot and --shell all have the
same environment.

Clark
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 01-03-2012, 05:35 PM
Colin Walters
 
Default PATH in mock disappears

On Tue, 2012-01-03 at 15:34 +0000, Gordan Bobic wrote:
> On Tue, 3 Jan 2012 15:52:45 +0100, Elias Abacioglu
> <elias.rabi@gmail.com> wrote:
> > Hey,
> >
> > I have an issue. Trying to build a package in mock, package B.
> > Package
> > B requires a installed package, package A.
> > Package A installs on a custom PATH and requires the PATH to be set
> > in
> > order for package B to compile.

1) Change A to install a pkg-config file (.pc) which contains the
variable that should be added to the PATH. B can then extract it in its
build scripts with "pkg-config --variable binpath A.pc"
2) Change A to install an executable shell script which, when run,
outputs the path element. Relevant art: ls /usr/bin/*config on a recent
Fedora install with a wide selection of -devel packages.
3) Hardcode the path in B

Don't try to fix at the meta-build (mock) level problems which are
perfectly solvable at the component (package) level.



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

Thread Tools




All times are GMT. The time now is 10:30 AM.

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