supplierdeeply

metadata generator / build process (Re: CHIMP)

  • 17 Replies
  • 1451 Views
metadata generator / build process (Re: CHIMP)
« on: 06 / June / 2017, 07:25:46 »
Advertisements
OK, I've checked into trunk. I'm going to let it sit a little a day or two before moving over to the stable branch.
Thanks.

Quote
but I'm wondering if we really want the version string to be an interface that has compatibility implications?
I'm not sure what compatibility implications you're referring to, but I suppose it's time to add metadata to the packages.

I've made some decent progress on implementing metadata generators. I'll submit a fresh patch once I integrate those into the build process.
Author of CHIMP, Canon Hack Installation and Management Platform

*

Offline reyalp

  • ******
  • 11392
Re: metadata generator / build process (Re: CHIMP)
« Reply #1 on: 06 / June / 2017, 16:10:20 »
I'm not sure what compatibility implications you're referring to, but I suppose it's time to add metadata to the packages.
All I meant was that it would be easy for someone to make a seemingly innocuous change to the splash screen / build info code isn't compatible with apps like yours.

Quote
I've made some decent progress on implementing metadata generators. I'll submit a fresh patch once I integrate those into the build process.
Thanks for that. Feel free to post any question you have about the build process.
Don't forget what the H stands for.

Re: metadata generator / build process (Re: CHIMP)
« Reply #2 on: 06 / June / 2017, 18:34:56 »
This is what the addition to Makefile looks like at the moment:
Code: [Select]
GEN_SOFTWARE=$(topdir)tools/gen_meta_software$(EXE)
GEN_SOFTWARE_FLAGS=--category-name PS --product-name CHDK --product-version $(BUILD_NUMBER).$(BUILD_SVNREV) --product-created `date +%Y-%m-%dT%H:%M:%SZ -u` --build-changeset $(BUILD_SVNREV) --camera-platform $(PLATFORM) --camera-revision $(PLATFORMSUB) --source-name $(VER) --compiler-name GCC --compiler-version $(GCC_VERSION)

ifdef STATE
GEN_SOFTWARE_FLAGS+= --build-status $(STATE)
endif

ifdef OPT_DE_VERSION
GEN_SOFTWARE_FLAGS+= --product-language de
ifeq ($(BUILD_NUMBER),1.5.0)
GEN_SOFTWARE_FLAGS+= --source-url http://forum.chdk-treff.de/download_dev.php
else
GEN_SOFTWARE_FLAGS+= --source-url http://forum.chdk-treff.de/download.php
endif
else
GEN_SOFTWARE_FLAGS+= --product-language en
ifeq ($(BUILD_NUMBER),1.5.0)
GEN_SOFTWARE_FLAGS+= --source-url http://mighty-hoernsche.de/trunk/
else
GEN_SOFTWARE_FLAGS+= --source-url http://mighty-hoernsche.de/
endif
endif

ifeq ($(BUILD_NUMBER),1.5.0)
GEN_SOFTWARE_FLAGS+= --source-channel trunk
else
GEN_SOFTWARE_FLAGS+= --source-channel release
endif

ifdef NEED_ENCODED_DISKBOOT
GEN_SOFTWARE_FLAGS+= --encoding-name dancingbits --encoding-version $(NEED_ENCODED_DISKBOOT)
endif

Is there an elegant way of discovering the channel (trunk/release)?
Author of CHIMP, Canon Hack Installation and Management Platform

*

Offline reyalp

  • ******
  • 11392
Re: metadata generator / build process (Re: CHIMP)
« Reply #3 on: 07 / June / 2017, 00:34:58 »
Is there an elegant way of discovering the channel (trunk/release)?
Not really, but they will always be in different branches, so it could just be a single define that updated as part of the release process.

For the source URL, it might be preferable to require that it be defined outside of the normal makefiles (on the make command line or localbuildconf.inc) so random user builds would not point to the official servers.
Don't forget what the H stands for.


Re: metadata generator / build process (Re: CHIMP)
« Reply #4 on: 07 / June / 2017, 08:04:56 »
For the source URL, it might be preferable to require that it be defined outside of the normal makefiles (on the make command line or localbuildconf.inc) so random user builds would not point to the official servers.

That was the original intention:

  • source - mapping, source distribution details (N/A in manual builds):

However, I'm not very fond of the idea of adding a required flag. Perhaps I could rely on BUILD_SVNREV being 0 in manual builds?

P.S. Nope, that wouldn't work.
« Last Edit: 07 / June / 2017, 08:37:44 by dmitrys »
Author of CHIMP, Canon Hack Installation and Management Platform

Re: metadata generator / build process (Re: CHIMP)
« Reply #5 on: 07 / June / 2017, 11:25:30 »
I'm attaching a patch with the software metadata generator. There should also be modules metadata, but that generator needs more work.

BUILD_SOURCE is a required variable, which must be set to trunk or release (or to anything else if the source parameters shouldn't be included in SOFTWARE.JSN).
Author of CHIMP, Canon Hack Installation and Management Platform

*

Offline reyalp

  • ******
  • 11392
Re: metadata generator / build process (Re: CHIMP)
« Reply #6 on: 10 / June / 2017, 16:41:15 »
My apologies about that patch. GCC 4.9.3 insists on putting the added string in a location that's separate from the previous three.
OK, I've checked into trunk. I'm going to let it sit a little a day or two before moving over to the stable branch.
This is now in the 1.4 branch as well (r4823)
Don't forget what the H stands for.

Re: metadata generator / build process (Re: CHIMP)
« Reply #7 on: 11 / June / 2017, 16:34:33 »
This is now in the 1.4 branch as well (r4823)

Thanks. Any feedback on the metadata generator?
Author of CHIMP, Canon Hack Installation and Management Platform


*

Offline reyalp

  • ******
  • 11392
Re: metadata generator / build process (Re: CHIMP)
« Reply #8 on: 11 / June / 2017, 16:41:29 »
Thanks. Any feedback on the metadata generator?
Sorry, haven't had a chance to really look at it yet.
Don't forget what the H stands for.

Re: metadata generator / build process (Re: CHIMP)
« Reply #9 on: 17 / June / 2017, 17:00:41 »
@reyalp I managed to port the module metadata code to CHDK (to run as a module).

Question: How do I go about sharing code between tools and modules, e.g. meta_modules.c that needs to be built in both.
Author of CHIMP, Canon Hack Installation and Management Platform