[Fuego] RFC [PATCH] Put fuego-core inside fuego directory, to simplify install

Guilherme Camargo guicc at profusion.mobi
Thu Mar 22 16:27:53 UTC 2018


Hello, Tim. I agree that having fuego-core inside fuego
should make things simpler.

I saw that you're explicitly cloning fuego-core inside the
install script. Did you consider using a git submodule
instead? This would allow us to make fuego track a specific
version (commit hash) of fuego-core, locking it into that version.

Comes with the downside that we would need to create a commit
to update the hash that's being tracked, every time that changes
are pushed to fuego-core, though. So I'm not sure if this would be
the best option.

On Wed, Mar 21, 2018 at 10:03 PM, <Tim.Bird at sony.com> wrote:

> The following is a patch I'm considering, to move fuego-core
> inside the 'fuego' directory, at the top level, parallel to
> fuego-ro and fuego-rw.  I think this simplifies our current
> installation a bit.  This setup still allows us to upgrade fuego
> and fuego-core separately, if needed.  But IMHO it's easier
> to understand.
>
> Note - I'm aware that profusion developers are working
> to eliminate the need for the image build, which might
> make this patch unnecessary.  But I thought I'd throw this
> out there for the Fuego 1.3 release (which I'd like to cut soon).
>
> Please let me know if you have any feedback.
> -----
> Modify install.sh to automatically download fuego-core if it's
> not already present, into the current directory.  Use a nested
> directory instead of having fuego-core in a parallel directory
> because it's simplifies the install (removes one step), and
> keeps things more nicely contained.
>
> Alter the create-container scripts to use the new location.
>
> Signed-off-by: Tim Bird <tim.bird at sony.com>
> ---
>  .gitignore                                            |  1 +
>  fuego-host-scripts/docker-create-container.sh         |  2 +-
>  .../docker-create-usb-privileged-container.sh         |  2 +-
>  install.sh                                            | 19
> ++++++++++++++++++-
>  4 files changed, 21 insertions(+), 3 deletions(-)
>
> diff --git a/.gitignore b/.gitignore
> index 408537a..6f33f41 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -1 +1,2 @@
>  fuego-rw
> +fuego-core
> diff --git a/fuego-host-scripts/docker-create-container.sh
> b/fuego-host-scripts/docker-create-container.sh
> index 20f4b59..1224ae2 100755
> --- a/fuego-host-scripts/docker-create-container.sh
> +++ b/fuego-host-scripts/docker-create-container.sh
> @@ -21,6 +21,6 @@ sudo docker create -it --name ${DOCKERCONTAINER} \
>      -v /boot:/boot:ro \
>      -v $DIR/../fuego-rw:/fuego-rw \
>      -v $DIR/../fuego-ro:/fuego-ro:ro \
> -    -v $DIR/../../fuego-core:/fuego-core:ro \
> +    -v $DIR/../fuego-core:/fuego-core:ro \
>      --net="host" ${DOCKERIMAGE} || \
>      echo "Could not create fuego-container. See error messages."
> diff --git a/fuego-host-scripts/docker-create-usb-privileged-container.sh
> b/fuego-host-scripts/docker-create-usb-privileged-container.sh
> index b3a55c4..58e7d8d 100755
> --- a/fuego-host-scripts/docker-create-usb-privileged-container.sh
> +++ b/fuego-host-scripts/docker-create-usb-privileged-container.sh
> @@ -27,6 +27,6 @@ sudo docker create -it --name ${DOCKERCONTAINER} \
>      -v /dev/serial:/dev/serial \
>      -v $DIR/../fuego-rw:/fuego-rw \
>      -v $DIR/../fuego-ro:/fuego-ro:ro \
> -    -v $DIR/../../fuego-core:/fuego-core:ro \
> +    -v $DIR/../fuego-core:/fuego-core:ro \
>      --net="host" ${DOCKERIMAGE} || \
>      echo "Could not create fuego-container. See error messages."
> diff --git a/install.sh b/install.sh
> index 2193559..caf128f 100755
> --- a/install.sh
> +++ b/install.sh
> @@ -1,2 +1,19 @@
> -source fuego-host-scripts/docker-build-image.sh $1
> +#!/bin/bash
> +
> +# Fuego install.sh
> +# clone fuego-core (nested inside current dir) if not present
> +# this requires that install.sh be executed at the top fuego dir.
> +if [ ! -e fuego-core/engine/scripts/ftc ] ; then
> +    git clone
> ​​
> http://bitbucket.org/tbird20d/fuego-core.git
> +fi
>

I suggest using --depth and --single-branch on this one as follows:

git clone --depth 1 --single-branch --branch master
http://bitbucket.org/tbird20d/fuego-core.git

The fuego-core repo is large enough that we might save some megabytes by
doing that.



> +
> +# indicate fuego-core version, just to remind user
> +# (in case they are using an existing repo)
> +pushd fuego-core
> +CORE_VERSION=$(git describe)
> +echo "Using fuego-core version: $CORE_VERSION"
> +popd
> +
>  sudo /bin/sh -c "if [ -f /etc/ttc.conf -a ! -f fuego-ro/conf/ttc.conf ] ;
> then cp /etc/ttc.conf fuego-ro/conf/ttc.conf ; fi"
> +
> +source fuego-host-scripts/docker-build-image.sh $1
> --
> 1.9.1
>
> _______________________________________________
> Fuego mailing list
> Fuego at lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/fuego


​Thanks​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/fuego/attachments/20180322/d3ee7c42/attachment.html>


More information about the Fuego mailing list