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

Tim.Bird at sony.com Tim.Bird at sony.com
Thu Mar 22 01:03:49 UTC 2018


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
+
+# 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



More information about the Fuego mailing list