Message ID | 1431002286-27030-1-git-send-email-mike.holmes@linaro.org |
---|---|
State | Accepted |
Commit | 1d9a27f7bf8e138dec003d150b63addabf76bfbf |
Headers | show |
v2 patch is ok, going to apply it if no more objections. Maxim. On 05/07/2015 15:38, Mike Holmes wrote: > Signed-off-by: Mike Holmes <mike.holmes@linaro.org> > --- > > V2 > Reduce the number fo files touched. > > platform/Makefile.inc | 4 ++++ > platform/linux-generic/odp_impl.c | 14 ++++++++++++-- > scripts/git_hash.sh | 9 +++++++++ > 3 files changed, 25 insertions(+), 2 deletions(-) > create mode 100755 scripts/git_hash.sh > > diff --git a/platform/Makefile.inc b/platform/Makefile.inc > index 9e73fc4..4000d64 100644 > --- a/platform/Makefile.inc > +++ b/platform/Makefile.inc > @@ -11,3 +11,7 @@ VPATH = $(srcdir) $(builddir) > lib_LTLIBRARIES = $(LIB)/libodp.la > > AM_LDFLAGS += -version-number '$(ODP_LIBSO_VERSION)' > + > +GIT_DESC !=$(top_builddir)/scripts/git_hash.sh > +AM_CFLAGS += "-DGIT_HASH=$(GIT_DESC)" > +AM_CFLAGS += -DPLATFORM=${with_platform} > diff --git a/platform/linux-generic/odp_impl.c b/platform/linux-generic/odp_impl.c > index ca3224d..46d0e40 100644 > --- a/platform/linux-generic/odp_impl.c > +++ b/platform/linux-generic/odp_impl.c > @@ -20,8 +20,18 @@ extern "C" { > > #include <odp/version.h> > > -#define ODP_VERSION_IMPL 0 > -#define ODP_VERSION_IMPL_STR ODP_VERSION_TO_STR(ODP_VERSION_IMPL) > +#define ODP_VERSION_IMPL 0 > +#define ODP_VERSION_IMPL_STR \ > + ODP_VERSION_TO_STR(PLATFORM) " " \ > + ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \ > + ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \ > + ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR) "-" \ > + ODP_VERSION_TO_STR(ODP_VERSION_IMPL) " (v" \ > + ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \ > + ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \ > + ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR) ") " \ > + __DATE__ " " __TIME__ " " \ > + ODP_VERSION_TO_STR(GIT_HASH) > > const char *odp_version_impl_str(void) > { > diff --git a/scripts/git_hash.sh b/scripts/git_hash.sh > new file mode 100755 > index 0000000..c9f1faf > --- /dev/null > +++ b/scripts/git_hash.sh > @@ -0,0 +1,9 @@ > +#!/bin/bash > + > +repo=https://git.linaro.org/lng/odp.git > +hash=$(git describe | tr -d "\n") > +if git diff-index --name-only HEAD &>/dev/null ; then > + dirty=-dirty > +fi > + > +echo -n "'${repo}' (${hash}${dirty})"
I think we may have made a mistake. We need a way to indicate linux-generic changes that do not in any way touch the API given that linux-generic and the API are released together. We have that information already it is the version digit that was returned by odp_version_api_str() <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> and was set to 0 We should be releasing 1.1.0-0 right now, and when we make a point release that in no way touches the API will will release maybe 1.1.0-1. However we just re-purposed odp_version_api_str() <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> from returning that "1" to a string that is good for debug logs. I think we need a new API for the verbose string. odp_version_api_str <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> = 1.1.0 odp_version_api_str() <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> = 0 << revert this to its old purpose odp_version_description_str() <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> << add this = linux-generic 1.0.4-0 (v1.0.4) May 8 2015 07:34:05 ' https://git.linaro.org/lng/odp.git' (v1.0.4-22-g9a02ee4-dirty) On 8 May 2015 at 06:20, Maxim Uvarov <maxim.uvarov@linaro.org> wrote: > v2 patch is ok, going to apply it if no more objections. > > Maxim. > > > > On 05/07/2015 15:38, Mike Holmes wrote: > >> Signed-off-by: Mike Holmes <mike.holmes@linaro.org> >> --- >> >> V2 >> Reduce the number fo files touched. >> >> platform/Makefile.inc | 4 ++++ >> platform/linux-generic/odp_impl.c | 14 ++++++++++++-- >> scripts/git_hash.sh | 9 +++++++++ >> 3 files changed, 25 insertions(+), 2 deletions(-) >> create mode 100755 scripts/git_hash.sh >> >> diff --git a/platform/Makefile.inc b/platform/Makefile.inc >> index 9e73fc4..4000d64 100644 >> --- a/platform/Makefile.inc >> +++ b/platform/Makefile.inc >> @@ -11,3 +11,7 @@ VPATH = $(srcdir) $(builddir) >> lib_LTLIBRARIES = $(LIB)/libodp.la >> AM_LDFLAGS += -version-number '$(ODP_LIBSO_VERSION)' >> + >> +GIT_DESC !=$(top_builddir)/scripts/git_hash.sh >> +AM_CFLAGS += "-DGIT_HASH=$(GIT_DESC)" >> +AM_CFLAGS += -DPLATFORM=${with_platform} >> diff --git a/platform/linux-generic/odp_impl.c >> b/platform/linux-generic/odp_impl.c >> index ca3224d..46d0e40 100644 >> --- a/platform/linux-generic/odp_impl.c >> +++ b/platform/linux-generic/odp_impl.c >> @@ -20,8 +20,18 @@ extern "C" { >> #include <odp/version.h> >> -#define ODP_VERSION_IMPL 0 >> -#define ODP_VERSION_IMPL_STR ODP_VERSION_TO_STR(ODP_VERSION_IMPL) >> +#define ODP_VERSION_IMPL 0 >> +#define ODP_VERSION_IMPL_STR \ >> + ODP_VERSION_TO_STR(PLATFORM) " " \ >> + ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \ >> + ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \ >> + ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR) "-" \ >> + ODP_VERSION_TO_STR(ODP_VERSION_IMPL) " (v" \ >> + ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \ >> + ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \ >> + ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR) ") " \ >> + __DATE__ " " __TIME__ " " \ >> + ODP_VERSION_TO_STR(GIT_HASH) >> const char *odp_version_impl_str(void) >> { >> diff --git a/scripts/git_hash.sh b/scripts/git_hash.sh >> new file mode 100755 >> index 0000000..c9f1faf >> --- /dev/null >> +++ b/scripts/git_hash.sh >> @@ -0,0 +1,9 @@ >> +#!/bin/bash >> + >> +repo=https://git.linaro.org/lng/odp.git >> +hash=$(git describe | tr -d "\n") >> +if git diff-index --name-only HEAD &>/dev/null ; then >> + dirty=-dirty >> +fi >> + >> +echo -n "'${repo}' (${hash}${dirty})" >> > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp >
sorry paste failed me insert odp_version_impl_str However we just re-purposed odp_version_impl_str from returning that "1" to a string that is good for debug logs. odp_version_impl_str = 0 << revert this to its old purpose On 8 May 2015 at 08:38, Mike Holmes <mike.holmes@linaro.org> wrote: > I think we may have made a mistake. > > We need a way to indicate linux-generic changes that do not in any way > touch the API given that linux-generic and the API are released together. > We have that information already it is the version digit that was returned > by odp_version_api_str() > <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> and > was set to 0 > > We should be releasing 1.1.0-0 right now, and when we make a point release > that in no way touches the API will will release maybe 1.1.0-1. However we > just re-purposed odp_version_api_str() > <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> from > returning that "1" to a string that is good for debug logs. > > I think we need a new API for the verbose string. > > odp_version_api_str > <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> > = 1.1.0 > odp_version_api_str() > <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> > = 0 << revert this to its old purpose > > odp_version_description_str() > <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> > << add this = linux-generic 1.0.4-0 (v1.0.4) May 8 2015 07:34:05 ' > https://git.linaro.org/lng/odp.git' (v1.0.4-22-g9a02ee4-dirty) > > > > > On 8 May 2015 at 06:20, Maxim Uvarov <maxim.uvarov@linaro.org> wrote: > >> v2 patch is ok, going to apply it if no more objections. >> >> Maxim. >> >> >> >> On 05/07/2015 15:38, Mike Holmes wrote: >> >>> Signed-off-by: Mike Holmes <mike.holmes@linaro.org> >>> --- >>> >>> V2 >>> Reduce the number fo files touched. >>> >>> platform/Makefile.inc | 4 ++++ >>> platform/linux-generic/odp_impl.c | 14 ++++++++++++-- >>> scripts/git_hash.sh | 9 +++++++++ >>> 3 files changed, 25 insertions(+), 2 deletions(-) >>> create mode 100755 scripts/git_hash.sh >>> >>> diff --git a/platform/Makefile.inc b/platform/Makefile.inc >>> index 9e73fc4..4000d64 100644 >>> --- a/platform/Makefile.inc >>> +++ b/platform/Makefile.inc >>> @@ -11,3 +11,7 @@ VPATH = $(srcdir) $(builddir) >>> lib_LTLIBRARIES = $(LIB)/libodp.la >>> AM_LDFLAGS += -version-number '$(ODP_LIBSO_VERSION)' >>> + >>> +GIT_DESC !=$(top_builddir)/scripts/git_hash.sh >>> +AM_CFLAGS += "-DGIT_HASH=$(GIT_DESC)" >>> +AM_CFLAGS += -DPLATFORM=${with_platform} >>> diff --git a/platform/linux-generic/odp_impl.c >>> b/platform/linux-generic/odp_impl.c >>> index ca3224d..46d0e40 100644 >>> --- a/platform/linux-generic/odp_impl.c >>> +++ b/platform/linux-generic/odp_impl.c >>> @@ -20,8 +20,18 @@ extern "C" { >>> #include <odp/version.h> >>> -#define ODP_VERSION_IMPL 0 >>> -#define ODP_VERSION_IMPL_STR ODP_VERSION_TO_STR(ODP_VERSION_IMPL) >>> +#define ODP_VERSION_IMPL 0 >>> +#define ODP_VERSION_IMPL_STR \ >>> + ODP_VERSION_TO_STR(PLATFORM) " " \ >>> + ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \ >>> + ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \ >>> + ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR) "-" \ >>> + ODP_VERSION_TO_STR(ODP_VERSION_IMPL) " (v" \ >>> + ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \ >>> + ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \ >>> + ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR) ") " \ >>> + __DATE__ " " __TIME__ " " \ >>> + ODP_VERSION_TO_STR(GIT_HASH) >>> const char *odp_version_impl_str(void) >>> { >>> diff --git a/scripts/git_hash.sh b/scripts/git_hash.sh >>> new file mode 100755 >>> index 0000000..c9f1faf >>> --- /dev/null >>> +++ b/scripts/git_hash.sh >>> @@ -0,0 +1,9 @@ >>> +#!/bin/bash >>> + >>> +repo=https://git.linaro.org/lng/odp.git >>> +hash=$(git describe | tr -d "\n") >>> +if git diff-index --name-only HEAD &>/dev/null ; then >>> + dirty=-dirty >>> +fi >>> + >>> +echo -n "'${repo}' (${hash}${dirty})" >>> >> >> _______________________________________________ >> lng-odp mailing list >> lng-odp@lists.linaro.org >> https://lists.linaro.org/mailman/listinfo/lng-odp >> > > > > -- > Mike Holmes > Technical Manager - Linaro Networking Group > Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs > > >
I guess the question is: 1. Who was using these? 2. How do we intend for them to be used going forward? If we can answer those questions then any needed "course correction" should be clearer. On Fri, May 8, 2015 at 7:40 AM, Mike Holmes <mike.holmes@linaro.org> wrote: > sorry paste failed me insert odp_version_impl_str > > However we just re-purposed odp_version_impl_str from returning that "1" > to a string that is good for debug logs. > > odp_version_impl_str = 0 << revert this to its old purpose > > On 8 May 2015 at 08:38, Mike Holmes <mike.holmes@linaro.org> wrote: > >> I think we may have made a mistake. >> >> We need a way to indicate linux-generic changes that do not in any way >> touch the API given that linux-generic and the API are released together. >> We have that information already it is the version digit that was >> returned by odp_version_api_str() >> <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> and >> was set to 0 >> >> We should be releasing 1.1.0-0 right now, and when we make a point >> release that in no way touches the API will will release maybe 1.1.0-1. >> However we just re-purposed odp_version_api_str() >> <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> from >> returning that "1" to a string that is good for debug logs. >> >> I think we need a new API for the verbose string. >> >> odp_version_api_str >> <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> >> = 1.1.0 >> odp_version_api_str() >> <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> >> = 0 << revert this to its old purpose >> >> odp_version_description_str() >> <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> >> << add this = linux-generic 1.0.4-0 (v1.0.4) May 8 2015 07:34:05 ' >> https://git.linaro.org/lng/odp.git' (v1.0.4-22-g9a02ee4-dirty) >> >> >> >> >> On 8 May 2015 at 06:20, Maxim Uvarov <maxim.uvarov@linaro.org> wrote: >> >>> v2 patch is ok, going to apply it if no more objections. >>> >>> Maxim. >>> >>> >>> >>> On 05/07/2015 15:38, Mike Holmes wrote: >>> >>>> Signed-off-by: Mike Holmes <mike.holmes@linaro.org> >>>> --- >>>> >>>> V2 >>>> Reduce the number fo files touched. >>>> >>>> platform/Makefile.inc | 4 ++++ >>>> platform/linux-generic/odp_impl.c | 14 ++++++++++++-- >>>> scripts/git_hash.sh | 9 +++++++++ >>>> 3 files changed, 25 insertions(+), 2 deletions(-) >>>> create mode 100755 scripts/git_hash.sh >>>> >>>> diff --git a/platform/Makefile.inc b/platform/Makefile.inc >>>> index 9e73fc4..4000d64 100644 >>>> --- a/platform/Makefile.inc >>>> +++ b/platform/Makefile.inc >>>> @@ -11,3 +11,7 @@ VPATH = $(srcdir) $(builddir) >>>> lib_LTLIBRARIES = $(LIB)/libodp.la >>>> AM_LDFLAGS += -version-number '$(ODP_LIBSO_VERSION)' >>>> + >>>> +GIT_DESC !=$(top_builddir)/scripts/git_hash.sh >>>> +AM_CFLAGS += "-DGIT_HASH=$(GIT_DESC)" >>>> +AM_CFLAGS += -DPLATFORM=${with_platform} >>>> diff --git a/platform/linux-generic/odp_impl.c >>>> b/platform/linux-generic/odp_impl.c >>>> index ca3224d..46d0e40 100644 >>>> --- a/platform/linux-generic/odp_impl.c >>>> +++ b/platform/linux-generic/odp_impl.c >>>> @@ -20,8 +20,18 @@ extern "C" { >>>> #include <odp/version.h> >>>> -#define ODP_VERSION_IMPL 0 >>>> -#define ODP_VERSION_IMPL_STR ODP_VERSION_TO_STR(ODP_VERSION_IMPL) >>>> +#define ODP_VERSION_IMPL 0 >>>> +#define ODP_VERSION_IMPL_STR \ >>>> + ODP_VERSION_TO_STR(PLATFORM) " " \ >>>> + ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \ >>>> + ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \ >>>> + ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR) "-" \ >>>> + ODP_VERSION_TO_STR(ODP_VERSION_IMPL) " (v" \ >>>> + ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \ >>>> + ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \ >>>> + ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR) ") " \ >>>> + __DATE__ " " __TIME__ " " \ >>>> + ODP_VERSION_TO_STR(GIT_HASH) >>>> const char *odp_version_impl_str(void) >>>> { >>>> diff --git a/scripts/git_hash.sh b/scripts/git_hash.sh >>>> new file mode 100755 >>>> index 0000000..c9f1faf >>>> --- /dev/null >>>> +++ b/scripts/git_hash.sh >>>> @@ -0,0 +1,9 @@ >>>> +#!/bin/bash >>>> + >>>> +repo=https://git.linaro.org/lng/odp.git >>>> +hash=$(git describe | tr -d "\n") >>>> +if git diff-index --name-only HEAD &>/dev/null ; then >>>> + dirty=-dirty >>>> +fi >>>> + >>>> +echo -n "'${repo}' (${hash}${dirty})" >>>> >>> >>> _______________________________________________ >>> lng-odp mailing list >>> lng-odp@lists.linaro.org >>> https://lists.linaro.org/mailman/listinfo/lng-odp >>> >> >> >> >> -- >> Mike Holmes >> Technical Manager - Linaro Networking Group >> Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs >> >> >> > > > -- > Mike Holmes > Technical Manager - Linaro Networking Group > Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs > > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp > >
On 8 May 2015 at 08:47, Bill Fischofer <bill.fischofer@linaro.org> wrote: > I guess the question is: > > 1. Who was using these? > Applications want to know the implementation and API versions, I think that was the driver to adding the APIs originally and I think that remains true. Certainly the patch as it stands subverts the original APIs intention of indicating just the implementation revision level. > 2. How do we intend for them to be used going forward? > Original APIs for the version remain as originally intended, the new API makes debugging and identification of the code in use much easier > > If we can answer those questions then any needed "course correction" > should be clearer. > > On Fri, May 8, 2015 at 7:40 AM, Mike Holmes <mike.holmes@linaro.org> > wrote: > >> sorry paste failed me insert odp_version_impl_str >> >> However we just re-purposed odp_version_impl_str from returning that >> "1" to a string that is good for debug logs. >> >> odp_version_impl_str = 0 << revert this to its old purpose >> >> On 8 May 2015 at 08:38, Mike Holmes <mike.holmes@linaro.org> wrote: >> >>> I think we may have made a mistake. >>> >>> We need a way to indicate linux-generic changes that do not in any way >>> touch the API given that linux-generic and the API are released together. >>> We have that information already it is the version digit that was >>> returned by odp_version_api_str() >>> <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> and >>> was set to 0 >>> >>> We should be releasing 1.1.0-0 right now, and when we make a point >>> release that in no way touches the API will will release maybe 1.1.0-1. >>> However we just re-purposed odp_version_api_str() >>> <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> from >>> returning that "1" to a string that is good for debug logs. >>> >>> I think we need a new API for the verbose string. >>> >>> odp_version_api_str >>> <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> >>> = 1.1.0 >>> odp_version_api_str() >>> <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> >>> = 0 << revert this to its old purpose >>> >>> odp_version_description_str() >>> <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> >>> << add this = linux-generic 1.0.4-0 (v1.0.4) May 8 2015 07:34:05 ' >>> https://git.linaro.org/lng/odp.git' (v1.0.4-22-g9a02ee4-dirty) >>> >>> >>> >>> >>> On 8 May 2015 at 06:20, Maxim Uvarov <maxim.uvarov@linaro.org> wrote: >>> >>>> v2 patch is ok, going to apply it if no more objections. >>>> >>>> Maxim. >>>> >>>> >>>> >>>> On 05/07/2015 15:38, Mike Holmes wrote: >>>> >>>>> Signed-off-by: Mike Holmes <mike.holmes@linaro.org> >>>>> --- >>>>> >>>>> V2 >>>>> Reduce the number fo files touched. >>>>> >>>>> platform/Makefile.inc | 4 ++++ >>>>> platform/linux-generic/odp_impl.c | 14 ++++++++++++-- >>>>> scripts/git_hash.sh | 9 +++++++++ >>>>> 3 files changed, 25 insertions(+), 2 deletions(-) >>>>> create mode 100755 scripts/git_hash.sh >>>>> >>>>> diff --git a/platform/Makefile.inc b/platform/Makefile.inc >>>>> index 9e73fc4..4000d64 100644 >>>>> --- a/platform/Makefile.inc >>>>> +++ b/platform/Makefile.inc >>>>> @@ -11,3 +11,7 @@ VPATH = $(srcdir) $(builddir) >>>>> lib_LTLIBRARIES = $(LIB)/libodp.la >>>>> AM_LDFLAGS += -version-number '$(ODP_LIBSO_VERSION)' >>>>> + >>>>> +GIT_DESC !=$(top_builddir)/scripts/git_hash.sh >>>>> +AM_CFLAGS += "-DGIT_HASH=$(GIT_DESC)" >>>>> +AM_CFLAGS += -DPLATFORM=${with_platform} >>>>> diff --git a/platform/linux-generic/odp_impl.c >>>>> b/platform/linux-generic/odp_impl.c >>>>> index ca3224d..46d0e40 100644 >>>>> --- a/platform/linux-generic/odp_impl.c >>>>> +++ b/platform/linux-generic/odp_impl.c >>>>> @@ -20,8 +20,18 @@ extern "C" { >>>>> #include <odp/version.h> >>>>> -#define ODP_VERSION_IMPL 0 >>>>> -#define ODP_VERSION_IMPL_STR ODP_VERSION_TO_STR(ODP_VERSION_IMPL) >>>>> +#define ODP_VERSION_IMPL 0 >>>>> +#define ODP_VERSION_IMPL_STR \ >>>>> + ODP_VERSION_TO_STR(PLATFORM) " " \ >>>>> + ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \ >>>>> + ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \ >>>>> + ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR) "-" \ >>>>> + ODP_VERSION_TO_STR(ODP_VERSION_IMPL) " (v" \ >>>>> + ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \ >>>>> + ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \ >>>>> + ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR) ") " \ >>>>> + __DATE__ " " __TIME__ " " \ >>>>> + ODP_VERSION_TO_STR(GIT_HASH) >>>>> const char *odp_version_impl_str(void) >>>>> { >>>>> diff --git a/scripts/git_hash.sh b/scripts/git_hash.sh >>>>> new file mode 100755 >>>>> index 0000000..c9f1faf >>>>> --- /dev/null >>>>> +++ b/scripts/git_hash.sh >>>>> @@ -0,0 +1,9 @@ >>>>> +#!/bin/bash >>>>> + >>>>> +repo=https://git.linaro.org/lng/odp.git >>>>> +hash=$(git describe | tr -d "\n") >>>>> +if git diff-index --name-only HEAD &>/dev/null ; then >>>>> + dirty=-dirty >>>>> +fi >>>>> + >>>>> +echo -n "'${repo}' (${hash}${dirty})" >>>>> >>>> >>>> _______________________________________________ >>>> lng-odp mailing list >>>> lng-odp@lists.linaro.org >>>> https://lists.linaro.org/mailman/listinfo/lng-odp >>>> >>> >>> >>> >>> -- >>> Mike Holmes >>> Technical Manager - Linaro Networking Group >>> Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM >>> SoCs >>> >>> >>> >> >> >> -- >> Mike Holmes >> Technical Manager - Linaro Networking Group >> Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs >> >> >> >> _______________________________________________ >> lng-odp mailing list >> lng-odp@lists.linaro.org >> https://lists.linaro.org/mailman/listinfo/lng-odp >> >> >
On Fri, May 08, 2015 at 08:40:39AM -0400, Mike Holmes wrote: > sorry paste failed me insert odp_version_impl_str > > However we just re-purposed odp_version_impl_str from returning that "1" > to a string that is good for debug logs. > > odp_version_impl_str = 0 << revert this to its old purpose Wouldn't it make sense for this function to return a string that matches the name of the tag that gets applied for releases that change the implementation and not the API?.. surely that won't be "0" By the way, looking at bugzilla it seems we're using the API version for all ODP bugs, but most of them are actually with the implementation. > > On 8 May 2015 at 08:38, Mike Holmes <mike.holmes@linaro.org> wrote: > > > I think we may have made a mistake. > > > > We need a way to indicate linux-generic changes that do not in any way > > touch the API given that linux-generic and the API are released together. > > We have that information already it is the version digit that was returned > > by odp_version_api_str() > > <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> and > > was set to 0 > > > > We should be releasing 1.1.0-0 right now, and when we make a point release > > that in no way touches the API will will release maybe 1.1.0-1. However we > > just re-purposed odp_version_api_str() > > <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> from > > returning that "1" to a string that is good for debug logs. > > > > I think we need a new API for the verbose string. > > > > odp_version_api_str > > <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> > > = 1.1.0 > > odp_version_api_str() > > <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> > > = 0 << revert this to its old purpose > > > > odp_version_description_str() > > <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> > > << add this = linux-generic 1.0.4-0 (v1.0.4) May 8 2015 07:34:05 ' > > https://git.linaro.org/lng/odp.git' (v1.0.4-22-g9a02ee4-dirty) > > Makes sense to me, though I would name this odp_version_str(). -- Stuart.
On 8 May 2015 at 09:37, Stuart Haslam <stuart.haslam@linaro.org> wrote: > On Fri, May 08, 2015 at 08:40:39AM -0400, Mike Holmes wrote: > > sorry paste failed me insert odp_version_impl_str > > > > However we just re-purposed odp_version_impl_str from returning that "1" > > to a string that is good for debug logs. > > > > odp_version_impl_str = 0 << revert this to its old purpose > > Wouldn't it make sense for this function to return a string that > matches the name of the tag that gets applied for releases that change > the implementation and not the API?.. surely that won't be "0" > We did start with this solution concatenating the api number and an implementation number only. For this next release it would be 1.1.0.0 and the tag in the repo should be v1.1.0.0 so I think you are suggesting the original proposal. For a non API change if it happened right after 1.1 it becomes 1.1.0.1 > > By the way, looking at bugzilla it seems we're using the API version for > all ODP bugs, but most of them are actually with the implementation. > Agree, that is what started the discussion and then resulted in this patch. > > > > > On 8 May 2015 at 08:38, Mike Holmes <mike.holmes@linaro.org> wrote: > > > > > I think we may have made a mistake. > > > > > > We need a way to indicate linux-generic changes that do not in any way > > > touch the API given that linux-generic and the API are released > together. > > > We have that information already it is the version digit that was > returned > > > by odp_version_api_str() > > > < > http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> > and > > > was set to 0 > > > > > > We should be releasing 1.1.0-0 right now, and when we make a point > release > > > that in no way touches the API will will release maybe 1.1.0-1. > However we > > > just re-purposed odp_version_api_str() > > > < > http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> > from > > > returning that "1" to a string that is good for debug logs. > > > > > > I think we need a new API for the verbose string. > > > > > > odp_version_api_str > > > < > http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6 > > > > > = 1.1.0 > > > odp_version_api_str() > > > < > http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6 > > > > > = 0 << revert this to its old purpose > > > > > > odp_version_description_str() > > > < > http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6 > > > > > << add this = linux-generic 1.0.4-0 (v1.0.4) May 8 2015 07:34:05 ' > > > https://git.linaro.org/lng/odp.git' (v1.0.4-22-g9a02ee4-dirty) > > > > > Makes sense to me, though I would name this odp_version_str(). > I like it, agree and will make that change if we go this route. > > -- > Stuart. >
On Fri, May 08, 2015 at 09:48:39AM -0400, Mike Holmes wrote: > On 8 May 2015 at 09:37, Stuart Haslam <stuart.haslam@linaro.org> wrote: > > > On Fri, May 08, 2015 at 08:40:39AM -0400, Mike Holmes wrote: > > > sorry paste failed me insert odp_version_impl_str > > > > > > However we just re-purposed odp_version_impl_str from returning that "1" > > > to a string that is good for debug logs. > > > > > > odp_version_impl_str = 0 << revert this to its old purpose > > > > Wouldn't it make sense for this function to return a string that > > matches the name of the tag that gets applied for releases that change > > the implementation and not the API?.. surely that won't be "0" > > > > We did start with this solution concatenating the api number and an > implementation number only. For this next release it would be 1.1.0.0 and > the tag in the repo should be v1.1.0.0 so I think you are suggesting the > original proposal. For a non API change if it happened right after 1.1 it > becomes 1.1.0.1 Actually I didn't really know what to suggest so I was just asking a question :).. point is that the implementation version string should actually be useful for both tracking down where the release originated from (git tag) and using in bug reports (dropdown box in bugzilla). I think just appending it to the API version is going be confusing (it already is), but given that we can't make API and implementation releases independently perhaps it's still the best thing to do. Still not clear on how tags would be applied though, would both API version and implementation version tags be applied for releases that change both? -- Stuart.
Hello Anders, can you please take a look what is portable solution here? Thank you, Maxim. On 05/18/2015 17:52, Nicolas Morey-Chaisemartin wrote: > > On 05/07/2015 02:38 PM, Mike Holmes wrote: >> Signed-off-by: Mike Holmes <mike.holmes@linaro.org> >> + >> +GIT_DESC !=$(top_builddir)/scripts/git_hash.sh > This breaks the build on "older" distrib (Centos 7). It seems the != is only available in Make >= 4.0 > I replaced it by this: > GIT_DESC = $(shell $(top_srcdir)/scripts/git_hash.sh) > > This generates a warning but works with older Make versions: > platform/Makefile.inc:15: warning: shell $(top_srcdir: non-POSIX variable name > platform/Makefile.inc:15: (probably a GNU make extension) > > I am no Automake expert so I'm not sure what's the cleanest way to handle this > > Nicolas > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp
Nicolas does that work on your Makefile? -GIT_DESC !=$(top_srcdir)/scripts/git_hash.sh +GIT_DESC=`$(top_srcdir)/scripts/git_hash.sh` Thanks, Maxim. On 05/18/2015 18:32, Maxim Uvarov wrote: > Hello Anders, > > can you please take a look what is portable solution here? > > Thank you, > Maxim. > > On 05/18/2015 17:52, Nicolas Morey-Chaisemartin wrote: >> >> On 05/07/2015 02:38 PM, Mike Holmes wrote: >>> Signed-off-by: Mike Holmes <mike.holmes@linaro.org> >>> + >>> +GIT_DESC !=$(top_builddir)/scripts/git_hash.sh >> This breaks the build on "older" distrib (Centos 7). It seems the != >> is only available in Make >= 4.0 >> I replaced it by this: >> GIT_DESC = $(shell $(top_srcdir)/scripts/git_hash.sh) >> >> This generates a warning but works with older Make versions: >> platform/Makefile.inc:15: warning: shell $(top_srcdir: non-POSIX >> variable name >> platform/Makefile.inc:15: (probably a GNU make extension) >> >> I am no Automake expert so I'm not sure what's the cleanest way to >> handle this >> >> Nicolas >> >> _______________________________________________ >> lng-odp mailing list >> lng-odp@lists.linaro.org >> https://lists.linaro.org/mailman/listinfo/lng-odp >
diff --git a/platform/Makefile.inc b/platform/Makefile.inc index 9e73fc4..4000d64 100644 --- a/platform/Makefile.inc +++ b/platform/Makefile.inc @@ -11,3 +11,7 @@ VPATH = $(srcdir) $(builddir) lib_LTLIBRARIES = $(LIB)/libodp.la AM_LDFLAGS += -version-number '$(ODP_LIBSO_VERSION)' + +GIT_DESC !=$(top_builddir)/scripts/git_hash.sh +AM_CFLAGS += "-DGIT_HASH=$(GIT_DESC)" +AM_CFLAGS += -DPLATFORM=${with_platform} diff --git a/platform/linux-generic/odp_impl.c b/platform/linux-generic/odp_impl.c index ca3224d..46d0e40 100644 --- a/platform/linux-generic/odp_impl.c +++ b/platform/linux-generic/odp_impl.c @@ -20,8 +20,18 @@ extern "C" { #include <odp/version.h> -#define ODP_VERSION_IMPL 0 -#define ODP_VERSION_IMPL_STR ODP_VERSION_TO_STR(ODP_VERSION_IMPL) +#define ODP_VERSION_IMPL 0 +#define ODP_VERSION_IMPL_STR \ + ODP_VERSION_TO_STR(PLATFORM) " " \ + ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \ + ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \ + ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR) "-" \ + ODP_VERSION_TO_STR(ODP_VERSION_IMPL) " (v" \ + ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \ + ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \ + ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR) ") " \ + __DATE__ " " __TIME__ " " \ + ODP_VERSION_TO_STR(GIT_HASH) const char *odp_version_impl_str(void) { diff --git a/scripts/git_hash.sh b/scripts/git_hash.sh new file mode 100755 index 0000000..c9f1faf --- /dev/null +++ b/scripts/git_hash.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +repo=https://git.linaro.org/lng/odp.git +hash=$(git describe | tr -d "\n") +if git diff-index --name-only HEAD &>/dev/null ; then + dirty=-dirty +fi + +echo -n "'${repo}' (${hash}${dirty})"
Signed-off-by: Mike Holmes <mike.holmes@linaro.org> --- V2 Reduce the number fo files touched. platform/Makefile.inc | 4 ++++ platform/linux-generic/odp_impl.c | 14 ++++++++++++-- scripts/git_hash.sh | 9 +++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100755 scripts/git_hash.sh