Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 521140 - merge rap feature in bootstrap script
Summary: merge rap feature in bootstrap script
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Benda Xu
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 519080 628874
  Show dependency tree
 
Reported: 2014-08-26 16:36 UTC by Christoph Junghans (RETIRED)
Modified: 2017-08-25 02:46 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Junghans (RETIRED) gentoo-dev 2014-08-26 16:36:44 UTC
There are 3 flavors of the bootstrap script:
- prefix original: <http://prefix.gentooexperimental.org/hg/prefix-tree/raw-file/default/scripts/bootstrap-prefix.sh>
- heroxbd's version <http://git.overlays.gentoo.org/gitweb/?p=dev/heroxbd.git;a=blob_plain;f=scripts/bootstrap-rap.sh>
- redlizard's version

It would be nice to have an official one.
Comment 1 Benda Xu gentoo-dev 2014-12-04 04:41:24 UTC
With redlizard's recent work on bootstrap-prefix.sh (till 60330:9a1cece5a854), we are very close to merging RAP bootstrap script into the official one.

I have one suggestion though: to split the stage3 into stage3 (setup portage, compiler and linker in EPREFIX/tmp) and stage4 (setup @system in EPREFIX).  If so, the differences between prefix original and RAP are restricted in stage4.  What do you think, Ruud?
Comment 2 Ruud Koolen (RETIRED) archtester gentoo-dev Security 2014-12-16 01:20:17 UTC
I did something similar.
Comment 3 Benda Xu gentoo-dev 2015-05-01 02:34:13 UTC
Ruud, any updates in 2015?
Comment 4 Benda Xu gentoo-dev 2016-06-03 09:37:38 UTC
Hi folks,

I have pushed my bootstrap script to,

  https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?h=rap0

Please have a look. I intend to merge the script to master after a couple of tests.
Comment 5 Fabian Groffen gentoo-dev 2016-06-03 09:39:57 UTC
is it useful to have a separate start-script in the repo instead of wgetting it?
Comment 6 Benda Xu gentoo-dev 2016-06-03 09:58:48 UTC
(In reply to Fabian Groffen from comment #5)
> is it useful to have a separate start-script in the repo instead of wgetting
> it?

I am using the main repo gentoo.git instead of prefix.git. Is startprefix.in good to be there?  android.git overlay should finally be gone, I don't think that is a good place to put startprefix.in either.
Comment 7 Benda Xu gentoo-dev 2016-06-10 03:50:29 UTC
Hi, I have done some minor updates to the branch rap0,

  https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?h=rap0

Does it look good to be merged?
Comment 8 Benda Xu gentoo-dev 2016-06-30 13:49:44 UTC
Fabian, need input from your expertise.  Thanks :)
Comment 9 Fabian Groffen gentoo-dev 2016-07-01 08:41:38 UTC
the move of the temp tools rm looks ok to me

I didn't see any other changes than that.
Comment 10 Benda Xu gentoo-dev 2016-07-02 01:37:19 UTC
(In reply to Fabian Groffen from comment #9)
> the move of the temp tools rm looks ok to me
> 
> I didn't see any other changes than that.

They are a series of commits in branch rap0.

  https://gitweb.gentoo.org/repo/proj/prefix.git/log/?h=rap0

From "scripts/bootstrap-prefix.sh: rap helpers for profiles and portage tree."
to "s/bootstrap-prefix.sh: remove EPREFIX/tmp after "emerge -e system"." you mentioned.
Comment 11 Fabian Groffen gentoo-dev 2016-07-02 07:24:56 UTC
scripts/bootstrap-prefix.sh: rap helpers for profiles and portage tree.

ok, the is-rap && LATEST_TREE=1 could use a small comment IMO


scripts/bootstrap-prefix.sh: emacs local setup for the code standard.

ok


scripts/bootstrap-prefix.sh: setup android overlay as staged RAP repo.

ok, maybe use <<- EOF so you can indent the repos.conf entry.


scripts/bootstrap-prefix.sh: USE=-acl for linux-standalone.

is this ever going to work (after bootstrap)?  if no, mask in the profiles, else ok.


scripts/bootstrap-prefix.sh: disable sandbox.

I would prefer a simple if is-rap ; then ... instead of the inline rapx calls here.


bootstrap-prefix.sh: no USR SPLIT for RAP. Support Debian multiarch.

ok


bootstrap-prefix.sh: get_libdir for multilib support on RAP.

move get_libdir into stage3 such that it cannot be used in locations where portage isn't yet installed (correctly).


scripts/b-p.sh: link /usr/{lib -> lib64} in stage1

ok


scripts/bootstrap-prefix.sh: support sys-libs/glibc.

I suspect the --with-sysroot=/ is going to break prefix.  Maybe Haubi knows, but I would only add it if is-rap to be on the safe side.

DEFAULT_PATH=$(echo "${ROOT}"/{,tmp/}{,usr/}{s,}bin | tr ' ' ':')
ROOT can contain spaces on OSX, I'd prefer to at least cater for that here since it's still easy at this stage.  Does this work with prefix?

cat > "${ROOT}"/usr/bin/makeinfo <<EOF
use <<- EOF and properly indent the case, it's unreadable right now for no good reason.


scripts/bootstrap-prefix.sh: remove libgcc hack on RAP.

ok


scripts/b-p.sh: calculate kernel version and select legacy profiles.

move kver and profile-legacy into bootstrap_setup.


scripts/bootstrap-prefix.sh: startprefix for RAP.

ok
Comment 12 Benda Xu gentoo-dev 2016-07-07 02:50:44 UTC
Thanks Fabian, I have merged the commits with modifications based on your comments.

(In reply to Fabian Groffen from comment #11)
> scripts/bootstrap-prefix.sh: rap helpers for profiles and portage tree.
> 
> ok, the is-rap && LATEST_TREE=1 could use a small comment IMO

Comments added.
 
> scripts/bootstrap-prefix.sh: emacs local setup for the code standard.
> 
> ok
> 
> 
> scripts/bootstrap-prefix.sh: setup android overlay as staged RAP repo.
> 
> ok, maybe use <<- EOF so you can indent the repos.conf entry.

Indented.
 
> scripts/bootstrap-prefix.sh: USE=-acl for linux-standalone.
> 
> is this ever going to work (after bootstrap)?  if no, mask in the profiles,
> else ok.

Yeah, after bootstrap acl can be used.
 
> scripts/bootstrap-prefix.sh: disable sandbox.
> 
> I would prefer a simple if is-rap ; then ... instead of the inline rapx
> calls here.

Made it unconditional, because sandbox does not work on Prefix either.
 
> bootstrap-prefix.sh: no USR SPLIT for RAP. Support Debian multiarch.
> 
> ok
> 
> 
> bootstrap-prefix.sh: get_libdir for multilib support on RAP.
> 
> move get_libdir into stage3 such that it cannot be used in locations where
> portage isn't yet installed (correctly).

Done.
 
> scripts/b-p.sh: link /usr/{lib -> lib64} in stage1
> 
> ok
> 
> 
> scripts/bootstrap-prefix.sh: support sys-libs/glibc.
> 
> I suspect the --with-sysroot=/ is going to break prefix.  Maybe Haubi knows,
> but I would only add it if is-rap to be on the safe side.

Conditioned to RAP.
 
> DEFAULT_PATH=$(echo "${ROOT}"/{,tmp/}{,usr/}{s,}bin | tr ' ' ':')
> ROOT can contain spaces on OSX, I'd prefer to at least cater for that here
> since it's still easy at this stage.  Does this work with prefix?

Protected against spaces in ${ROOT}.
 
> cat > "${ROOT}"/usr/bin/makeinfo <<EOF
> use <<- EOF and properly indent the case, it's unreadable right now for no
> good reason.
 
Indented.

> scripts/bootstrap-prefix.sh: remove libgcc hack on RAP.
> 
> ok
> 
> 
> scripts/b-p.sh: calculate kernel version and select legacy profiles.
> 
> move kver and profile-legacy into bootstrap_setup.

Done.

> scripts/bootstrap-prefix.sh: startprefix for RAP.
> 
> ok