Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-osx
Navigation:
Lists: gentoo-osx: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-osx@g.o
From: Michael Haubenwallner <michael.haubenwallner@...>
Subject: Re: [PREFIX] LD_LIBRARY_PATH issue
Date: Thu, 07 Sep 2006 11:26:24 +0200
On Wed, 2006-09-06 at 21:20 +0200, Grobian wrote:
> On 06-09-2006 15:37:31 +0200, Michael Haubenwallner wrote:
> With respect, but I think the reason we don't use toolbox is because I
> never got it to bootstrap anything :(

IIRC you did not manage to inform it where to download things from.
But it's ok for me to have a bootstrap-script in the tree, even i don't
plan to use it.


Well, here are the two portage patches for dynamically duping
environment values. Patch-Numbers fit into my previous mail containing a
bunch of other patches [1].

[06-env-conf+ext.patch]
Let portage create /etc/env.conf containing somewhat a dump of the
environment bits found in /etc/env.d/*, to be read by /sbin/extenv, see
below (the baselayout-prefix.ebuild).

[07-env-dup.patch]
Interpret variables PORTAGE_ENVDUP* found in /etc/env.d/*, to dupe
values from one environment variable to another. Example is to dupe
values from LDPATH to LD_LIBRARY_PATH, SHLIB_PATH or LIBPATH, see below
(the baselayout-linux.ebuild).


[baselayout-prefix-0.1.ebuild]
[baselayout-prefix-0.1_files.tar.gz]
Installs these (eprefix'ed) files:
  /etc/profile
    The entry point for this eprefix.
    Utilizes /sbin/extenv to add values the environment.
    It also sets up an alias 'eenv-clear', which sources /etc/unprofile,
    to be able to remove all the environment values for this eprefix.
  /sbin/extenv
    Interprets /etc/env.conf and generates a list of shell commands (for
    sh and csh) adding values to the environment.
  /etc/unprofile
    The exit point from this eprefix.
    Also utilizes /sbin/extenv to remove values from the environment.
    Also unaliases 'eenv-clear'.
  /etc/env.d/98secondary
    Contains values for PATH,ROOTPATH,LDPATH,... for this eprefix.
  /var/spool/emerge/doasroot
    Create it as empty file, currently not in use.
    Intention is to collect commands from enewuser/enewgroup/... when
    not run as real root (uid 0).

Additionally, two symlinks are created:
   /sbin/functions.sh -> /usr/lib/portage/bin/isolated-functions.sh
   /etc/init.d/functions.sh -> /sbin/functions.sh

I use /usr/lib/portage/bin/isolated-functions.sh because i did not know
better where to get those functions.sh from.


[baselayout-linux-0.1.ebuild]
Installs only one file:
  /etc/env.d/99system
    Only contains two lines:
      PORTAGE_ENVDUP="LDPATH"
      PORTAGE_ENVDUP_LDPATH="LD_LIBRARY_PATH"
    This configures portage (with 07-env-dup.patch) to dupe collected
    values from LDPATH into LD_LIBRARY_PATH.

Idea is to let make.profile symlink unmask different packages for hpux
and aix, to dupe LDPATH value into SHLIB_PATH and LIBPATH respectively.

Comments welcome!

[1] http://thread.gmane.org/gmane.linux.gentoo.macosx/1080/focus=1080

-haubi-
-- 
Michael Haubenwallner                    SALOMON Automation GmbH
Forschung & Entwicklung                  A-8114 Friesach bei Graz
mailto:michael.haubenwallner@...  http://www.salomon.at
No HTML/MIME please, see http://expita.com/nomime.html
Attachment:
06-env-conf+ext.patch (Text Data)
Attachment:
07-env-dup.patch (Text Data)
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /cvsroot/secondary-portage/sys-apps/baselayout-secondary/baselayout-secondary-0.1.ebuild,v 1.4 2005/09/14 06:59:13 haubi Exp $

DESCRIPTION="Baselayout for Secondary Package Manager extending the environment"
HOMEPAGE=""
SRC_URI=""

LICENSE=""
SLOT="0"
EAPI="prefix"
KEYWORDS="x86"
IUSE=""

#PDEPEND=">=portage-2.1_pre"
DEPEND="app-shells/bash"
RDEPEND=""

src_install() {
	insinto /etc || die
	newins ${FILESDIR}/${PV}-inputrc inputrc || die
	newins ${FILESDIR}/${PV}-profile profile || die
	newins ${FILESDIR}/${PV}-unprofile unprofile || die
	into /
	newsbin ${FILESDIR}/${PV}-extenv extenv || die
	cu_bash=${BASH}
	test -r "${ROOT}/bin/bash" && cu_bash="${EPREFIX}/bin/bash"
	dosed "s,@EPREFIX@,${EPREFIX},g
		  ;s,@BASH@,${cu_bash},g
		  ;s,@rootuser@,${PORTAGE_ROOTUSER:-$(id -un)},
		" \
		/etc/profile \
		/etc/unprofile \
		/sbin/extenv \
	|| die
	fperms a+x /sbin/extenv
	insinto /etc/env.d
	cat >> "${D}"/etc/env.d/98secondary <<-EOE
		# /${EPREFIX}etc/env.d/98secondary

		PATH='${EPREFIX}/usr/bin:${EPREFIX}/bin'
		ROOTPATH='${EPREFIX}/usr/sbin:${EPREFIX}/sbin:${EPREFIX}/usr/bin:${EPREFIX}/bin'
		LDPATH='${EPREFIX}/usr/lib:${EPREFIX}/lib'
		INFODIR='${EPREFIX}/usr/share/info'
		INFOPATH='${EPREFIX}/usr/share/info'
		MANPATH='${EPREFIX}/usr/share/man'
	EOE

	dodir /etc/init.d || die
	dosym /usr/lib/portage/bin/isolated-functions.sh /sbin/functions.sh || die
	dosym /sbin/functions.sh /etc/init.d/functions.sh || die
	dodir /var/spool/emerge || die
	touch "${D}"/var/spool/emerge/doasroot || die
}
Attachment:
baselayout-prefix-0.1_files.tar.gz (application/compressed-tar)
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /cvsroot/secondary-portage/sys-apps/baselayout-secondary/baselayout-secondary-0.1.ebuild,v 1.4 2005/09/14 06:59:13 haubi Exp $

DESCRIPTION="Baselayout for Secondary Package Manager extending the environment"
HOMEPAGE=""
SRC_URI=""

LICENSE=""
SLOT="0"
EAPI="prefix"
KEYWORDS="x86"
IUSE=""

DEPEND=""
RDEPEND="sys-apps/baselayout-prefix"
PROVIDE="virtual/baselayout"

src_install() {
	cat >> "${T}"/99system <<-EOE
		# /${EPREFIX}etc/env.d/99system

		PORTAGE_ENVDUP="LDPATH"
		PORTAGE_ENVDUP_LDPATH="LD_LIBRARY_PATH"
	EOE
	doenvd "${T}"/99system || die
}
References:
[PREFIX] LD_LIBRARY_PATH issue
-- Grobian
Re: [PREFIX] LD_LIBRARY_PATH issue
-- Michael Haubenwallner
Re: [PREFIX] LD_LIBRARY_PATH issue
-- Grobian
Navigation:
Lists: gentoo-osx: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: [PREFIX] LD_LIBRARY_PATH issue
Next by thread:
Re: [PREFIX] LD_LIBRARY_PATH issue
Previous by date:
RE: [PREFIX] LD_LIBRARY_PATH issue
Next by date:
Re: [PREFIX] LD_LIBRARY_PATH issue


Updated Jun 17, 2009

Summary: Archive of the gentoo-osx mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.