From 7838d9ea5fa9b46f6ea5ccec5772462264364831 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 8 Jan 2015 06:29:16 -0800 Subject: [PATCH] tizen-distro: configure combo-layer Up to this point, the tizen-distro repository is identical to the poky master branch minus the "yocto" and "documentation" parts. It was created by checking out 081fddd3e464935e5f438a7686eb8f8856da6281 (the commit where "dizzy" was branched off from master) and stripping out these undesired files with: git filter-branch --prune-empty --tree-filter 'rm -rf *yocto* documentation' HEAD Then the last_revision properties for bitbake and openembedded-core were set based on the commit messages generated in poky by the combo-layer commit hook. Because these extra comments are useful, the same commit hooks are also used in tizen-distro. Now the repository is ready for importing the other components. --- README.tizen-distro | 50 +++++++++++++++++++++++++++++++ conf/.gitignore | 1 + conf/combo-layer-local-sample.conf | 14 +++++++++ conf/combo-layer.conf | 34 +++++++++++++++++++++ conf/combo-layerhook-bitbake.sh | 13 ++++++++ conf/combo-layerhook-meta-openembedded.sh | 12 ++++++++ conf/combo-layerhook-meta-qt5.sh | 12 ++++++++ conf/combo-layerhook-meta-tizen.sh | 19 ++++++++++++ conf/combo-layerhook-openembedded-core.sh | 12 ++++++++ 9 files changed, 167 insertions(+) create mode 100644 README.tizen-distro create mode 100644 conf/.gitignore create mode 100644 conf/combo-layer-local-sample.conf create mode 100644 conf/combo-layer.conf create mode 100755 conf/combo-layerhook-bitbake.sh create mode 100755 conf/combo-layerhook-meta-openembedded.sh create mode 100755 conf/combo-layerhook-meta-qt5.sh create mode 100755 conf/combo-layerhook-meta-tizen.sh create mode 100755 conf/combo-layerhook-openembedded-core.sh diff --git a/README.tizen-distro b/README.tizen-distro new file mode 100644 index 0000000..e32ce5c --- /dev/null +++ b/README.tizen-distro @@ -0,0 +1,50 @@ +About tizen-distro +================== + +tizen-distro is a combination of several different components in a +single repository: +- bitbake +- openembedded-core +- meta-openembedded +- meta-qt5 +- meta-tizen + +The top-level directory comes from openembedded-core, everything else +is in its own sub-directory. tizen-distro gets updated by copying +importing patches from the component's repostories. Please submit +patches against those instead of tizen-distro. + +Updating tizen-distro +===================== + +Everyone with a copy of the tizen-distro repository can use +scripts/combo-layer to import patches from the components. That works +because the "last_revision" property which gets changed after each +import gets committed to the combined repostory. + +First, copy conf/combo-layer-local-sample.conf into +conf/combo-layer-local.conf and set the paths for each component +repository to a suitable location. + +Then run: +- "scripts/combo-layer init" (only once) +- "scripts/combo-layer update " where is either one of + components above (for updating just that one) or empty (for updating all) + +Branching tizen-distro +====================== + +Each branch in tizen-distro tracks one branch in each component. To +create a new branch: +- checkout a new branch in tizen-component +- change the "branch" properties in conf/combo-layer.conf +- change the branch part in the last_revision sections +- commit +- continue as before + +This works best if the last imported revision from each component is +the branching point of that component. Ensure that by updating before +the components branch. If it is too late, either select patches +interactively or import too many patches and then drop unwanted ones +via "git rebase" or "git reset --hard". Remember to keep +"last_revision" correct when doing that. diff --git a/conf/.gitignore b/conf/.gitignore new file mode 100644 index 0000000..c241ecf --- /dev/null +++ b/conf/.gitignore @@ -0,0 +1 @@ +combo-layer-local.conf diff --git a/conf/combo-layer-local-sample.conf b/conf/combo-layer-local-sample.conf new file mode 100644 index 0000000..c644d4f --- /dev/null +++ b/conf/combo-layer-local-sample.conf @@ -0,0 +1,14 @@ +[bitbake] +local_repo_dir = /foo/bar/bitbake + +[openembedded-core] +local_repo_dir = /foo/bar/openembedded-core + +[meta-openembedded] +local_repo_dir = /foo/bar/meta-openembedded + +[meta-qt5] +local_repo_dir = /foo/bar/meta-qt5 + +[meta-tizen] +local_repo_dir = /foo/bar/meta-tizen diff --git a/conf/combo-layer.conf b/conf/combo-layer.conf new file mode 100644 index 0000000..880a335 --- /dev/null +++ b/conf/combo-layer.conf @@ -0,0 +1,34 @@ +[bitbake] +src_uri = git://git.openembedded.org/bitbake +dest_dir = bitbake +hook = conf/combo-layerhook-bitbake.sh +branch = master +last_revision = 2ac33aac3446cb12227f1b8daa5f27f417c9bb9e + +[openembedded-core] +src_uri = git://git.openembedded.org/openembedded-core +dest_dir = . +hook = conf/combo-layerhook-openembedded-core.sh +branch = master +last_revision = 97756472d3a69eaca95d105494ffea78c6b077e0 + +[meta-openembedded] +src_uri = git://git.openembedded.org/meta-openembedded +dest_dir = meta-openembedded +hook = conf/combo-layerhook-meta-openembedded.sh +branch = master +last_revision = + +[meta-qt5] +src_uri = git://github.com/meta-qt5/meta-qt5.git +dest_dir = meta-qt5 +hook = conf/combo-layerhook-meta-qt5.sh +branch = master +last_revision = + +[meta-tizen] +src_uri = git://review.tizen.org/scm/bb/meta-tizen +dest_dir = meta-tizen +hook = conf/combo-layerhook-meta-tizen.sh +branch = tizen +last_revision = diff --git a/conf/combo-layerhook-bitbake.sh b/conf/combo-layerhook-bitbake.sh new file mode 100755 index 0000000..ba8dd50 --- /dev/null +++ b/conf/combo-layerhook-bitbake.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# Hook to add source component/revision info to commit message +# Parameter: +# $1 patch-file +# $2 revision +# $3 reponame + +patchfile=$1 +rev=$2 +reponame=$3 + +sed -i -e "s#Subject: \[PATCH\] \(.*\)#Subject: \[PATCH\] bitbake: \1#" $patchfile +sed -i -e "0,/^Signed-off-by:/s#\(^Signed-off-by:.*\)#\(Bitbake rev: $rev\)\n\n\1#" $patchfile diff --git a/conf/combo-layerhook-meta-openembedded.sh b/conf/combo-layerhook-meta-openembedded.sh new file mode 100755 index 0000000..04d1fdd --- /dev/null +++ b/conf/combo-layerhook-meta-openembedded.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# Hook to add source component/revision info to commit message +# Parameter: +# $1 patch-file +# $2 revision +# $3 reponame + +patchfile=$1 +rev=$2 +reponame=$3 + +sed -i -e "0,/^Signed-off-by:/s#\(^Signed-off-by:.*\)#\(From meta-openembedded rev: $rev\)\n\n\1#" $patchfile diff --git a/conf/combo-layerhook-meta-qt5.sh b/conf/combo-layerhook-meta-qt5.sh new file mode 100755 index 0000000..76689d1 --- /dev/null +++ b/conf/combo-layerhook-meta-qt5.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# Hook to add source component/revision info to commit message +# Parameter: +# $1 patch-file +# $2 revision +# $3 reponame + +patchfile=$1 +rev=$2 +reponame=$3 + +sed -i -e "0,/^Signed-off-by:/s#\(^Signed-off-by:.*\)#\(From meta-qt5 rev: $rev\)\n\n\1#" $patchfile diff --git a/conf/combo-layerhook-meta-tizen.sh b/conf/combo-layerhook-meta-tizen.sh new file mode 100755 index 0000000..6c4a0bb --- /dev/null +++ b/conf/combo-layerhook-meta-tizen.sh @@ -0,0 +1,19 @@ +#!/bin/sh +# Hook to add source component/revision info to commit message +# Parameter: +# $1 patch-file +# $2 revision +# $3 reponame + +patchfile=$1 +rev=$2 +reponame=$3 + +# Some patches in meta-tizen follow the "component: change" pattern, +# some do not. Even if used, the component can be misleading because +# it appears in both meta-tizen (as .bbappend file) and other +# components (as .bb file). Therefore always add the "meta-tizen" +# prefix. +sed -i -e "s#Subject: \[PATCH\] \(.*\)#Subject: \[PATCH\] meta-tizen: \1#" $patchfile + +sed -i -e "0,/^Signed-off-by:/s#\(^Signed-off-by:.*\)#\(From meta-tizen rev: $rev\)\n\n\1#" $patchfile diff --git a/conf/combo-layerhook-openembedded-core.sh b/conf/combo-layerhook-openembedded-core.sh new file mode 100755 index 0000000..d347891 --- /dev/null +++ b/conf/combo-layerhook-openembedded-core.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# Hook to add source component/revision info to commit message +# Parameter: +# $1 patch-file +# $2 revision +# $3 reponame + +patchfile=$1 +rev=$2 +reponame=$3 + +sed -i -e "0,/^Signed-off-by:/s#\(^Signed-off-by:.*\)#\(From OE-Core rev: $rev\)\n\n\1#" $patchfile -- 2.7.4