Re: [Pharo-users] Bootstrap how to

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] Bootstrap how to

alistairgrant
Hi Hilaire,

Moving this to pharo-dev...


On Thu, Mar 08, 2018 at 11:34:55AM +0100, Hilaire wrote:
> I give again a try to bootstrap (after my last summer fail). Here how far I
> went:
>
> Do people really like git or pretend to because
> everyone is using it.

Maybe there's a better source management system out there, but for me
git is much better than any of the alternatives I've used (rcs, svn, vcs
and a couple I've forgotten (cms?)).


> 1. Fetched the repo https://github.com/pharo-project/pharo. I have to fetch
> a fresh one as updating my repo failed with the git command
> pull/fetch/merge/reset hard does not work. Incredible how simple thinks does
> not work simply with git.

I consider myself far from a git expert, so take the following with a
grain of salt...

You haven't given much detail, but when you have a clone think of the
branches that are upstream as being "read only" (typically master and
development).  They should only ever be modified by merging in the
branch from upstream.  If you're writing (committing) to your clone, it
should always be in a separate branch.

When updating, e.g. master, from upstream, get in to the habit of
enforcing fast-foward only e.g.:

git checkout master
git fetch --prune upstream
git merge --ff-only upstream/master
git push

It's more steps, but will ensure you don't get in to the problem you
describe above.  git pull will do a merge if necessary, making future
updates hard / impossible.



> 2. Followed instructions to build a bootstrap.
>
> BUILD_NUMBER=42 BOOTSTRAP_ARCH=32 sh ./bootstrap/scripts/bootstrap.sh

The script I've been using is:


#!/bin/bash

export JOB=bootstrap
export BOOTSTRAP_ARCH=32
export PHARO_VERSION=60
export BUILD_NUMBER=$(date "+%m%d")
./bootstrap/scripts/bootstrap.sh


It would be good to have a readme in the bootstrap directory that
provides basic instructions on what the key variables are and how to run
the bootstrap.


> The resulting image bootstrap-cache/bootstrap.image is built after 1 or 2
> hours. Its size is 3,4MB, when started there is only blank screen, I guess
> it is the expected outcome.

My 4 year old Dell XPS-13 (i7) takes about 30-40 minutes to do the build.



> 3. Followed instructions to load pharo environment:
>
> ??BUILD_NUMBER=42 BOOTSTRAP_ARCH=32 ./bootstrap/scripts/build.sh

This is called by bootstrap.sh, so it shouldn't be necessary for you to
call it directly.


> Several attempts were needed and the build.sh script is fragile and fail
> when at the repeated attempts, some cleaning were needed.
>
> I suggest two things :
>
> 1. you add -p to your mkdir commands (in build.sh and get-vm.sh
>    scripts) as it make your script less fragile !
> 2. Also checking for the existence of the Pharo.source will avoid to
>    have duplicted uncessary downloaded source file version.
>    (Pharo.source1, Pharo.source2):
>
>        if test ! -e PharoV60.sources
>         ???? then
>         ???????????? wget http://files.pharo.org/sources/PharoV60.sources
>        fi
>
> Now the image is building, will see next.

I agree that it would be nice if it was possible to avoid downloading
the files each time, and also possible separate the process in to a
number of stages, and restart from a nominated stage.

Maybe the stages could be:

1. Download all requirements (stable vm (6.0), target vm (7.0),
bootstrapImage.zip and anything else I've forgotten).
2. The build steps in bootstrap.sh.
3. The build steps in build.sh

There could be a "clean" option that would be called as part of the CI
process to ensure that everything is always up to date.

Esteban and co.:  How open are you to refactoring the scripts to
support this?  Or is there something I don't understand that means it
doesn't make sense?


Cheers,
Alistair

Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] Bootstrap how to

HilaireFernandes
Le 08/03/2018 à 19:07, Alistair Grant a écrit :

Thanks for the Git tips.

>> The resulting image bootstrap-cache/bootstrap.image is built after 1 or 2
>> hours. Its size is 3,4MB, when started there is only blank screen, I guess
>> it is the expected outcome.
> My 4 year old Dell XPS-13 (i7) takes about 30-40 minutes to do the build.

So it is in line with the time taken by my 7 years old i3.
>> 3. Followed instructions to load pharo environment:
>>
>> ??BUILD_NUMBER=42 BOOTSTRAP_ARCH=32 ./bootstrap/scripts/build.sh
> This is called by bootstrap.sh, so it shouldn't be necessary for you to
> call it directly.

Ok, the info was writing something else.
I am still in the middle of nowhere, what is the expected outcomes in
term of images and how I can apply it to Dr. Geo?

Thanks

--
Dr. Geo
http://drgeo.eu