* [gentoo-embedded] [PATCH 0/2] Some crossdev ideas
@ 2013-12-10 16:33 Joakim Tjernlund
2013-12-10 16:33 ` [gentoo-embedded] [PATCH 1/2] Move make.profile from etc to etc/portage Joakim Tjernlund
2013-12-10 16:33 ` [gentoo-embedded] [PATCH 2/2] Add SYSROOT definition in ${SYSROOT}/etc/profile.env Joakim Tjernlund
0 siblings, 2 replies; 6+ messages in thread
From: Joakim Tjernlund @ 2013-12-10 16:33 UTC (permalink / raw
To: gentoo-embedded; +Cc: Joakim Tjernlund
Was playing around with crossdev again and stumbeled over
these 2 items.
The first one just makes sense to me.
The other one is something I am playing with and I wanted
to hear if I am barking up the wrong tree :)
Not tested.
Joakim Tjernlund (2):
Move make.profile from etc to etc/portage
Add SYSROOT definition in ${SYSROOT}/etc/profile.env
wrappers/Makefile | 2 +-
wrappers/emerge-wrapper | 5 +++++
wrappers/etc/portage/bashrc | 2 +-
3 files changed, 7 insertions(+), 2 deletions(-)
--
1.8.3.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* [gentoo-embedded] [PATCH 1/2] Move make.profile from etc to etc/portage
2013-12-10 16:33 [gentoo-embedded] [PATCH 0/2] Some crossdev ideas Joakim Tjernlund
@ 2013-12-10 16:33 ` Joakim Tjernlund
2013-12-23 2:54 ` Mike Frysinger
2013-12-10 16:33 ` [gentoo-embedded] [PATCH 2/2] Add SYSROOT definition in ${SYSROOT}/etc/profile.env Joakim Tjernlund
1 sibling, 1 reply; 6+ messages in thread
From: Joakim Tjernlund @ 2013-12-10 16:33 UTC (permalink / raw
To: gentoo-embedded; +Cc: Joakim Tjernlund
This is where make.profile belongs in current portage
---
wrappers/Makefile | 2 +-
wrappers/etc/portage/bashrc | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/wrappers/Makefile b/wrappers/Makefile
index eaa4115..144ecc1 100644
--- a/wrappers/Makefile
+++ b/wrappers/Makefile
@@ -18,6 +18,6 @@ install:
sed -i -e s@__PREFIX__@$(PREFIX)@g $(DESTDIR)/$(PREFIX)/bin/emerge-wrapper
sed -i -e s@__TOPDIR__@$(SITE)@g $(DESTDIR)/$(SITE)/config.site
mv $(DESTDIR)/$(SITE)/config.site $(DESTDIR)/$(PREFIX)/share/
- ln -sf $(PORTDIR)/profiles/embedded $(DESTDIR)/$(PREFIX)/share/crossdev/etc/make.profile
+ ln -sf $(PORTDIR)/profiles/embedded $(DESTDIR)/$(PREFIX)/share/crossdev/etc/portage/make.profile
.PHONY: all install
diff --git a/wrappers/etc/portage/bashrc b/wrappers/etc/portage/bashrc
index e78b634..4ca2768 100644
--- a/wrappers/etc/portage/bashrc
+++ b/wrappers/etc/portage/bashrc
@@ -1,4 +1,4 @@
-[[ $(basename $(readlink -f $PORTAGE_CONFIGROOT/etc/make.profile)) == "embedded" ]] && . ${PORTDIR}/profiles/base/profile.bashrc
+[[ $(basename $(readlink -f $PORTAGE_CONFIGROOT/etc/portage/make.profile)) == "embedded" ]] && . ${PORTDIR}/profiles/base/profile.bashrc
post_src_install() {
[[ -d ${D} ]] || return 0
--
1.8.3.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-embedded] [PATCH 2/2] Add SYSROOT definition in ${SYSROOT}/etc/profile.env
2013-12-10 16:33 [gentoo-embedded] [PATCH 0/2] Some crossdev ideas Joakim Tjernlund
2013-12-10 16:33 ` [gentoo-embedded] [PATCH 1/2] Move make.profile from etc to etc/portage Joakim Tjernlund
@ 2013-12-10 16:33 ` Joakim Tjernlund
2013-12-23 3:05 ` Mike Frysinger
1 sibling, 1 reply; 6+ messages in thread
From: Joakim Tjernlund @ 2013-12-10 16:33 UTC (permalink / raw
To: gentoo-embedded; +Cc: Joakim Tjernlund
env. variables in profile.env are expanded in make.conf so
one can use ROOT=${SYSROOT}
---
wrappers/emerge-wrapper | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper
index be81f95..bc6328d 100755
--- a/wrappers/emerge-wrapper
+++ b/wrappers/emerge-wrapper
@@ -36,6 +36,11 @@ cross_wrap_etc()
cp -a "${PREFIX}"/share/crossdev/etc ${SYSROOT}/ || return 1
+ mkdir -p ${SYSROOT}/etc/env.d
+ echo "SYSROOT=${SYSROOT}" > ${SYSROOT}/etc/env.d/01sysroot
+ #Generate ${SYSROOT}/etc/profile.env
+ ROOT=${SYSROOT}/ env-update --no-ldconfig
+
local conf=${SYSROOT}/etc/portage/make.conf
# Re-use existing CHOST->portage ARCH mapping code
--
1.8.3.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [gentoo-embedded] [PATCH 1/2] Move make.profile from etc to etc/portage
2013-12-10 16:33 ` [gentoo-embedded] [PATCH 1/2] Move make.profile from etc to etc/portage Joakim Tjernlund
@ 2013-12-23 2:54 ` Mike Frysinger
0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2013-12-23 2:54 UTC (permalink / raw
To: gentoo-embedded; +Cc: Joakim Tjernlund
[-- Attachment #1: Type: Text/Plain, Size: 149 bytes --]
On Tuesday 10 December 2013 11:33:42 Joakim Tjernlund wrote:
> This is where make.profile belongs in current portage
thanks, i've merged this
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-embedded] [PATCH 2/2] Add SYSROOT definition in ${SYSROOT}/etc/profile.env
2013-12-10 16:33 ` [gentoo-embedded] [PATCH 2/2] Add SYSROOT definition in ${SYSROOT}/etc/profile.env Joakim Tjernlund
@ 2013-12-23 3:05 ` Mike Frysinger
2013-12-23 10:48 ` Joakim Tjernlund
0 siblings, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2013-12-23 3:05 UTC (permalink / raw
To: gentoo-embedded; +Cc: Joakim Tjernlund
[-- Attachment #1: Type: Text/Plain, Size: 968 bytes --]
On Tuesday 10 December 2013 11:33:43 Joakim Tjernlund wrote:
> env. variables in profile.env are expanded in make.conf so
> one can use ROOT=${SYSROOT}
> ---
> wrappers/emerge-wrapper | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper
> index be81f95..bc6328d 100755
> --- a/wrappers/emerge-wrapper
> +++ b/wrappers/emerge-wrapper
> @@ -36,6 +36,11 @@ cross_wrap_etc()
>
> cp -a "${PREFIX}"/share/crossdev/etc ${SYSROOT}/ || return 1
>
> + mkdir -p ${SYSROOT}/etc/env.d
> + echo "SYSROOT=${SYSROOT}" > ${SYSROOT}/etc/env.d/01sysroot
> + #Generate ${SYSROOT}/etc/profile.env
> + ROOT=${SYSROOT}/ env-update --no-ldconfig
> +
> local conf=${SYSROOT}/etc/portage/make.conf
>
> # Re-use existing CHOST->portage ARCH mapping code
i don't see how this would help. portage doesn't load shell env files from
$SYSROOT, so making it available in that wouldn't help.
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-embedded] [PATCH 2/2] Add SYSROOT definition in ${SYSROOT}/etc/profile.env
2013-12-23 3:05 ` Mike Frysinger
@ 2013-12-23 10:48 ` Joakim Tjernlund
0 siblings, 0 replies; 6+ messages in thread
From: Joakim Tjernlund @ 2013-12-23 10:48 UTC (permalink / raw
To: gentoo-embedded; +Cc: Joakim Tjernlund
-----Mike Frysinger <vapier@gentoo.org> wrote: -----
=======================
To: gentoo-embedded@lists.gentoo.org
From: Mike Frysinger <vapier@gentoo.org>
Date: 23/12/2013 4:05
Cc: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Subject: Re: [gentoo-embedded] [PATCH 2/2] Add SYSROOT definition in ${SYSROOT}/etc/profile.env
=======================
On Tuesday 10 December 2013 11:33:43 Joakim Tjernlund wrote:
> env. variables in profile.env are expanded in make.conf so
> one can use ROOT=${SYSROOT}
> ---
> wrappers/emerge-wrapper | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper
> index be81f95..bc6328d 100755
> --- a/wrappers/emerge-wrapper
> +++ b/wrappers/emerge-wrapper
> @@ -36,6 +36,11 @@ cross_wrap_etc()
>
> cp -a "${PREFIX}"/share/crossdev/etc ${SYSROOT}/ || return 1
>
> + mkdir -p ${SYSROOT}/etc/env.d
> + echo "SYSROOT=${SYSROOT}" > ${SYSROOT}/etc/env.d/01sysroot
> + #Generate ${SYSROOT}/etc/profile.env
> + ROOT=${SYSROOT}/ env-update --no-ldconfig
> +
> local conf=${SYSROOT}/etc/portage/make.conf
>
> # Re-use existing CHOST->portage ARCH mapping code
i don't see how this would help. portage doesn't load shell env files from
$SYSROOT, so making it available in that wouldn't help.
-mike
True, I figured it would load profile.env from PORTAGE_CONFIGROOT but later found that portage uses eroot for that,
Feels like a bug to me, all config should come from configroot I think. I have mentioned this in a bug but as I am on vacation now,
I do not have that bug handy.
As a workaround one have to set ROOT to configroot too.
On anoter note(dont know if I mentioned this already) but ARCH and ELIBC should be defined within the profile as
these are profile only vars. Just create a profile dir inside configroot/etc/portage and add a file which defines them.
Sorry for beeing a bit vauge but that is what I can do ATM as I am traveling the next 2 weeks.
Jocke
[attachment(s) signature.asc removed by Joakim Tjernlund/Transmode]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-12-23 10:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-10 16:33 [gentoo-embedded] [PATCH 0/2] Some crossdev ideas Joakim Tjernlund
2013-12-10 16:33 ` [gentoo-embedded] [PATCH 1/2] Move make.profile from etc to etc/portage Joakim Tjernlund
2013-12-23 2:54 ` Mike Frysinger
2013-12-10 16:33 ` [gentoo-embedded] [PATCH 2/2] Add SYSROOT definition in ${SYSROOT}/etc/profile.env Joakim Tjernlund
2013-12-23 3:05 ` Mike Frysinger
2013-12-23 10:48 ` Joakim Tjernlund
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox